blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2
values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82
values | src_encoding stringclasses 28
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 7 5.41M | extension stringclasses 11
values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a629d47029f77b16bbdb19c7241b5c421b80288f | c80b3cab307796adcdc7749a272e7cdc3ced8632 | /app/src/main/java/com/zuzex/konio/Popups/PayPopupWindow.java | 4e10857af2378f0d0f2a1f1ed0147bf7310300b4 | [] | no_license | skartiev/Konio | 0321ac8b4064787868ddd0b53f1b932e02d6fd3b | 29f42cd9943b9618547dbfda289710a90ae59031 | refs/heads/master | 2021-01-20T09:37:20.164258 | 2017-05-04T14:01:52 | 2017-05-04T14:01:52 | 90,270,124 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,628 | java | package com.zuzex.konio.Popups;
import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.PopupWindow;
import android.widget.Spinner;
import android.widget.TextView;
import com.badoo.mobile.util.WeakHandler;
import com.squareup.okhttp.Callback;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import com.zuzex.konio.Adapters.AmountSpinnerAdapter;
import com.zuzex.konio.R;
import com.zuzex.konio.Utils.DecimalFilter;
import com.zuzex.konio.Utils.UiHelper;
import com.zuzex.konio.api.BaseModel;
import com.zuzex.konio.api.HttpApi;
import com.zuzex.konio.api.PaymentModel;
import org.json.JSONException;
import java.io.IOException;
/**
* Created by dgureev on 18.12.14.
*/
public class PayPopupWindow extends PopupWindow {
private Context mContext;
private View popupPayView;
EditText editAmountValue;
WeakHandler handler;
public PayPopupWindow(Context context, PaymentModel paymentModel, WeakHandler handler) {
super(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
this.mContext = context;
this.handler = handler;
this.setFocusable(true);
LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
popupPayView = layoutInflater.inflate(R.layout.pay_start_popup, null);
showPayPopup(paymentModel);
this.setContentView(popupPayView);
showAtLocation(popupPayView, Gravity.CENTER, 0, 0);
}
public void showPayPopup(final PaymentModel payModel) {
TextView subject = (TextView) popupPayView.findViewById(R.id.pay_popup_subject);
subject.setText(payModel.subject);
TextView message = (TextView) popupPayView.findViewById(R.id.pay_message);
message.setText(payModel.message);
TextView currency = (TextView) popupPayView.findViewById(R.id.pay_currency);
currency.setText(payModel.currency);
//normal
switch (payModel.payType) {
case PAY_TYPE_OPTIONS:
TextView pay_currency = (TextView) popupPayView.findViewById(R.id.pay_currency);
pay_currency.setVisibility(View.GONE);
Spinner amountSpinner = (Spinner) popupPayView.findViewById(R.id.amount_spinner);
amountSpinner.setVisibility(View.VISIBLE);
AmountSpinnerAdapter amountSpinnerAdapter =
new AmountSpinnerAdapter(mContext, R.layout.amount_spinner_layout, payModel);
amountSpinner.setAdapter(amountSpinnerAdapter);
amountSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
payModel.selectedOption = payModel.options.get(position).value;
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
break;
case PAY_TYPE_NORMAL:
currency.setVisibility(View.VISIBLE);
TextView amountValue = (TextView) popupPayView.findViewById(R.id.pay_amount_value);
amountValue.setVisibility(View.VISIBLE);
amountValue.setText(String.valueOf(payModel.amount));
break;
case PAY_TYPE_DONATION:
currency.setVisibility(View.VISIBLE);
editAmountValue = (EditText) popupPayView.findViewById(R.id.pay_amount_editable);
editAmountValue.setVisibility(View.VISIBLE);
editAmountValue.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
editAmountValue.addTextChangedListener(new DecimalFilter(editAmountValue));
break;
}
TextView recipientName = (TextView) popupPayView.findViewById(R.id.pay_recipient_name);
recipientName.setText(payModel.recipient);
Button payAcceptButton = (Button) popupPayView.findViewById(R.id.pay_button_accept);
Button payCancelButton = (Button) popupPayView.findViewById(R.id.pay_button_cancel);
final String[] accounts = payModel.payFrom.keySet().toArray(new String [0]);
Spinner accouuntSpinner = (Spinner) popupPayView.findViewById(R.id.account_spinner);
ArrayAdapter<String> spinnerAccountAdapter
= new ArrayAdapter<String>(mContext, R.layout.spinner_item, accounts);
spinnerAccountAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
accouuntSpinner.setAdapter(spinnerAccountAdapter);
accouuntSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
payModel.payFromSelected = accounts[position];
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
payCancelButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
closePayPopup();
handler.post(new Runnable() {
@Override
public void run() {
UiHelper.showToast(mContext, mContext.getString(R.string.pay_cancel));
payModel.payFromSelected = "";
}
});
}
});
payAcceptButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(editAmountValue != null) {
String editAmountString = editAmountValue.getText().toString();
if(!editAmountString.isEmpty()) {
payModel.amount = Double.valueOf(editAmountString);
}
}
handler.post(new Runnable() {
@Override
public void run() {
if(!payModel.payFromSelected.isEmpty()) {
confirmPayment(payModel);
closePayPopup();
} else {
if(mContext != null) {
UiHelper.showToast(mContext, "pay from not set");
}
}
}
});
}
});
}
public void closePayPopup() {
dismiss();
popupPayView = null;
}
private void confirmPayment(PaymentModel payModel) {
HttpApi.getInstance().confirmPayment(payModel, new Callback() {
@Override
public void onFailure(Request request, IOException e) {
handler.post(new Runnable() {
@Override
public void run() {
if(mContext != null) {
UiHelper.showToast(mContext, mContext.getString(R.string.network_error));
}
}
});
}
@Override
public void onResponse(final Response response) throws IOException {
String responseString = null;
responseString = response.body().string();
try {
BaseModel answer = new BaseModel(responseString);
final String message = answer.message;
handler.post(new Runnable() {
@Override
public void run() {
UiHelper.showToast(mContext, message);
}
});
} catch (JSONException e) {
handler.post(new Runnable() {
@Override
public void run() {
UiHelper.showToast(mContext, mContext.getString(R.string.data_error));
}
});
}
}
});
}
}
| [
"sanchir@mentalstack.com"
] | sanchir@mentalstack.com |
c5513d8204dae31fba25e8be5497a1e5fc79f7a9 | ef8ae7f744e2ed31b4a07cbed3d52f83ac6ad92b | /src/main/java/com/github/rightshiro/shiro/matcher/JwtMatcher.java | 6c198913c9cbf8d846789392eb4710681437a888 | [
"Apache-2.0"
] | permissive | weiguangchao/right-shiro | a9f06234d0c048aeba8cd4e70f4d72349b9e4919 | 6c87982fcf482451d2c119bb72476c165c3d99ed | refs/heads/main | 2023-02-04T12:14:57.785768 | 2020-12-25T07:56:52 | 2020-12-25T07:56:52 | 324,315,143 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,458 | java | package com.github.rightshiro.shiro.matcher;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.credential.CredentialsMatcher;
import com.github.rightshiro.shiro.token.JwtToken;
import com.github.rightshiro.util.JwtUtils;
import cn.hutool.core.util.StrUtil;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.ExpiredJwtException;
import io.jsonwebtoken.Jws;
/**
* @author weiguangchao
* @date 2020/11/18
*/
public class JwtMatcher implements CredentialsMatcher {
@Override
public boolean doCredentialsMatch(AuthenticationToken token, AuthenticationInfo info) {
String jwt = (String) info.getCredentials();
JwtToken jwtToken = (JwtToken) token;
String sub;
try {
// 验签之后判断用户与令牌是否对应
Jws<Claims> claimsJws = JwtUtils.verifyJwt(jwt);
sub = claimsJws.getBody().get("sub", String.class);
}
catch (ExpiredJwtException eje) {
throw new AuthenticationException("expiredJwt"); // 令牌过期
}
catch (Exception ex) {
throw new AuthenticationException("errJwt"); // 令牌错误
}
if (!StrUtil.equals(sub, jwtToken.getAppId())) {
throw new AuthenticationException("errJwt"); // 令牌错误
}
return true;
}
}
| [
"3409885610@qq.com"
] | 3409885610@qq.com |
b6f897d69bf2bb2bf9521f8e185743c9dc576113 | b3836503c8cf0cdb89b0877d1cf6503749fef86c | /hw09orm/src/main/java/ru.otus/core/model/Account.java | cf3b4059497946cb25689b8d364df6cd5b66784d | [] | no_license | Bored-tester/2019-12-otus-java-malikov | 534a77316bae9035584d8f097a422d0d9d3ce889 | bd2659c14daef33966003c318605c39712e415de | refs/heads/master | 2022-12-24T02:36:27.403034 | 2020-11-05T08:14:03 | 2020-11-05T08:14:03 | 232,081,061 | 0 | 0 | null | 2022-12-16T15:49:29 | 2020-01-06T10:50:35 | Java | UTF-8 | Java | false | false | 554 | java | package ru.otus.core.model;
import lombok.Getter;
import ru.otus.core.annotations.Id;
import java.math.BigInteger;
@Getter
public class Account {
@Id
private BigInteger no;
private final String type;
private final int rest;
public Account(String type, int rest) {
this.type = type;
this.rest = rest;
}
@Override
public String toString() {
return "User{" +
"no=" + no +
", type='" + type +
", rest='" + rest + '\'' +
'}';
}
}
| [
"igor.malikov@gett.com"
] | igor.malikov@gett.com |
9e8438742fadb363fe3ad385feed2d9fd1cc16a0 | d60e287543a95a20350c2caeabafbec517cabe75 | /LACCPlus/Hadoop/588_1.java | b11d1411266fad0bc0d5b58a2bd89fc0483c67fc | [
"MIT"
] | permissive | sgholamian/log-aware-clone-detection | 242067df2db6fd056f8d917cfbc143615c558b2c | 9993cb081c420413c231d1807bfff342c39aa69a | refs/heads/main | 2023-07-20T09:32:19.757643 | 2021-08-27T15:02:50 | 2021-08-27T15:02:50 | 337,837,827 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 656 | java | //,temp,ProcessTree.java,53,67,temp,TestProcfsBasedProcessTree.java,883,897
//,2
public class xxx {
private static boolean isSetsidSupported() {
ShellCommandExecutor shexec = null;
boolean setsidSupported = true;
try {
String[] args = {"setsid", "bash", "-c", "echo $$"};
shexec = new ShellCommandExecutor(args);
shexec.execute();
} catch (IOException ioe) {
LOG.warn("setsid is not available on this machine. So not using it.");
setsidSupported = false;
} finally { // handle the exit code
LOG.info("setsid exited with exit code " + shexec.getExitCode());
}
return setsidSupported;
}
}; | [
"sgholami@uwaterloo.ca"
] | sgholami@uwaterloo.ca |
2b70307919b99075c209f4e90a16770a37d64122 | c4ae20bb696baf30b5073cb539434177361fd173 | /strategy/src/main/java/temp/YHEntry.java | f647c7c30c4543e19efdff752f419c5ba6b2a2cc | [] | no_license | kerno1018/st | 2333745ed8c647174dc13f403a7bbfcba659e00a | 930c7494272eeb505f21351d30147c4a13e398b2 | refs/heads/master | 2021-08-22T06:13:59.943472 | 2017-11-29T12:54:54 | 2017-11-29T12:54:54 | 112,474,553 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,083 | java | //package temp;
//
//import com.sun.deploy.net.URLEncoder;
//
//import java.io.UnsupportedEncodingException;
//
///**
// * Created by kerno on 1/23/2016.
// */
//public class YHEntry {
// private YHEntry(){}
// public static YHEntry entry = new YHEntry();
// public String entry(String plainText) {
//// String plainText="001004001010101";
//// plainText="010100074075";
// String encText="";
//// plainText = jsencode(plainText);
// if(plainText!="")
// {
// for(int i = 0; i < plainText.length(); i++)
// {
// encText += plainText.charAt(i) - 23;
// }
// encText = "enc||"+ jsencode(encText);
// }
// try {
// return URLEncoder.encode(encText,"UTF-8");
// } catch (UnsupportedEncodingException e) {
// e.printStackTrace();
// }
// return "";
// }
// private String jsencode(String input){
// String _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";;
// String output = "";
// char chr1, chr2, chr3;
// int enc1, enc2, enc3, enc4;
// int i = 0;
// input = _utf8_encode(input);
// while (i < input.length()) {
// chr1 = input.charAt(i++);
// chr2 = input.charAt(i++);
// chr3 = input.charAt(i++);
// enc1 = chr1 >> 2;
// enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
// enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
// enc4 = chr3 & 63;
// if (!isNumber(chr2)) {
// enc3 = enc4 = 64;
// } else if (!isNumber(chr3)) {
// enc4 = 64;
// }
// output = output +
// _keyStr.charAt(enc1) + _keyStr.charAt(enc2) +
// _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
// }
// return output;
// }
//
// private String _utf8_encode(String string){
// string = string.replaceAll("/\\r\\n/g","\n");
// String utftext = "";
// for (int n = 0; n < string.length(); n++) {
// char c = string.charAt(n);
// if (c < 128) {
// utftext += String.valueOf(c);
// } else if((c > 127) && (c < 2048)) {
// utftext += String.valueOf((c >> 6) | 192);
// utftext += String.valueOf((c & 63) | 128);
// } else {
// utftext += String.valueOf((c >> 12) | 224);
// utftext += String.valueOf(((c >> 6) & 63) | 128);
// utftext += String.valueOf((c & 63) | 128);
// }
//
// }
// return utftext;
// }
// public boolean isNumber(char str)
// {
// java.util.regex.Pattern pattern=java.util.regex.Pattern.compile("[0-9]*");
// java.util.regex.Matcher match=pattern.matcher(String.valueOf(str));
// if(match.matches()==false)
// {
// return false;
// }
// else
// {
// return true;
// }
// }
//
//}
| [
"kerno1018@163.com"
] | kerno1018@163.com |
f51de11b356e71c140406e57f3324211a82b763b | c33ce6435f868c25b23c5c065e2116c856d67b65 | /app/src/main/java/com/hanshin/ncs_travled/CT_Create.java | af475bf681c4211c8c9fb21546c9d08e776eb43d | [] | no_license | ChoiSuhyeonA/NCS_Traveled_Project | 11190faca20715aaf615145f3cc93c2982ad5d07 | 5830e013ead8869e43d112ffdc0fa0c71aa85d2b | refs/heads/main | 2023-05-10T02:54:02.698338 | 2021-05-31T12:42:24 | 2021-05-31T12:42:24 | 356,463,439 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,049 | java | package com.hanshin.ncs_travled;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
import android.text.Editable;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import com.google.android.gms.auth.api.signin.GoogleSignIn;
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.UploadTask;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import static com.hanshin.ncs_travled.CT_Activity.listAdapter;
public class CT_Create extends Activity {
Button ct_close_btn, ct_SaveBtn;
ImageButton ct_createImage;
EditText ct_createTitle,ct_createDate, ct_createContent;
//선택한 갤러리 이미지
Uri image;
//구글로그인 회원정보 및 데이타
String loginName ="";
String loginEmail = "";
String pageNumber="";
static CT_Create_Item ct_item = new CT_Create_Item();
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ct_create);
//로그인한 회원정보를 가져오는 변수
GoogleSignInAccount signInAccount = GoogleSignIn.getLastSignedInAccount(this);
if(signInAccount != null){
//회원정보 이름
loginName = signInAccount.getDisplayName();
//회원정보 이메일
loginEmail = signInAccount.getEmail();
}
ct_close_btn= findViewById(R.id.ct_close_btn);
ct_SaveBtn = findViewById(R.id.ct_SaveBtn);
ct_createImage = findViewById(R.id.ct_createImage);
ct_createContent = findViewById(R.id.ct_createContent);
ct_createTitle = findViewById(R.id.ct_createTitle);
ct_createDate = findViewById(R.id.ct_createDate);
//업로드할때 날짜를 폴더명뒤에 지정해서, 파일을 분류
SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd.hh.mm.ss");
Date now = new Date();
final String Datename = formatter.format(now);
//커뮤니티 게시글을 분류
pageNumber = loginEmail+"|"+Datename;
//갤러리 선택 버튼 클릭시.
ct_createImage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//갤러리 이동해서 이미지 선택할 수 있게 클릭
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
intent.setType("image/* ");
startActivityForResult(intent, 1000);
}
});
//닫기 버튼 클릭했을 경우
ct_close_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getApplicationContext(), CT_Activity.class);
startActivity(intent);
finish();
}
});
//저장 버튼 클릭했을 경우
ct_SaveBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//제목 + 내용 정보를 UI를 통해서 가져온다.
if(image==null){
Toast.makeText(CT_Create.this, "이미지를 선택해주세요", Toast.LENGTH_SHORT).show();
}else if(String.valueOf(ct_createTitle.getText()).equals("")){
Toast.makeText(CT_Create.this, "제목을 입력해주세요", Toast.LENGTH_SHORT).show();
}else if(String.valueOf(ct_createContent.getText()).equals("")){
Toast.makeText(CT_Create.this, "내용을 입력해주세요", Toast.LENGTH_SHORT).show();
}else if(String.valueOf(ct_createDate.getText()).equals("")){
Toast.makeText(CT_Create.this, "날짜를 입력해주세요", Toast.LENGTH_SHORT).show();
}
else{
ct_item.setTitle(String.valueOf(ct_createTitle.getText()));
ct_item.setContents(String.valueOf(ct_createContent.getText()));
ct_item.setDate(String.valueOf(ct_createDate.getText()));
ct_item.setEmail(loginEmail);
ct_item.setName(loginName);
ct_item.setPageNumber(pageNumber);
ct_item.setRealDate(Datename);
dataUpload();
}
}
});
}
private void dataUpload() {
Map<String, Object> community = new HashMap<>();
community.put("email", ct_item.getEmail());
community.put("name", ct_item.getName());
community.put("date", ct_item.getDate());
community.put("title", ct_item.getTitle());
community.put("contents", ct_item.getContents());
community.put("pageNumber", ct_item.getPageNumber());
community.put("realDate", ct_item.getRealDate());
//파이어스토리지 업로드
FirebaseStorage storage = FirebaseStorage.getInstance();
StorageReference storageRef = storage.getReference();
//이미지 리스트를 파이어베이스에 업로드
//파이어베이스 스토어 업로드 (데이터)
FirebaseFirestore db = FirebaseFirestore.getInstance();
// 파이어스토어 ( 이메일명/ 지역 / 도시 /포토북명으로 데이터 분류)
db.collection("community").document().set(community).addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
// CT_Activity.listAdapter.notifyDataSetChanged();
Toast.makeText(CT_Create.this, "데이터 업로드 성공", Toast.LENGTH_SHORT).show();
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(CT_Create.this, "데이터 업로드 실패", Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
});
StorageReference imageRef = storageRef.child("community" +"/" + loginEmail + "/" + pageNumber ); //파이어베이스에 업로드할 이미지 이름 지정
UploadTask uploadTask = imageRef.putFile(image);
uploadTask.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
// CT_Activity.listAdapter.notifyDataSetChanged();
//업로드 성공할시 데이타 초기화
ct_item = new CT_Create_Item();
Intent intent = new Intent(getApplicationContext(), CT_Activity.class);
startActivity(intent);
finish();
}
});
}
//갤러리 생성하기 필요한 메서드
@RequiresApi(api = Build.VERSION_CODES.O)
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 1000) {
image = data.getData();
ct_createImage.setImageURI(image);
}
}
}
| [
"suhyeon1137@gmail.com"
] | suhyeon1137@gmail.com |
ed8e7f9d007b176acdaec874d67261a3eef2fc75 | 5c41116d17ef8864423bcc5498c4efd6c696cbac | /com/rwtema/extrautils/multipart/RegisterMicroMaterials.java | ec119462a6b88c1689cc79fbd28da8d4f20bc236 | [] | no_license | richardhendricks/ExtraUtilities | 519175ce14406f95620c34a425e1fd54964cbcf6 | 1b9d60a14cc7f76754eb8f0e7c1e1c77f3bda7a6 | refs/heads/master | 2021-07-14T11:56:53.480656 | 2017-10-19T16:03:19 | 2017-10-19T16:03:19 | 107,566,180 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,712 | java | /* 1: */ package com.rwtema.extrautils.multipart;
/* 2: */
/* 3: */ import codechicken.microblock.BlockMicroMaterial;
/* 4: */ import codechicken.microblock.MicroMaterialRegistry;
/* 5: */ import com.rwtema.extrautils.LogHelper;
/* 6: */ import com.rwtema.extrautils.block.BlockColor;
/* 7: */ import com.rwtema.extrautils.block.BlockGreenScreen;
/* 8: */ import net.minecraft.block.Block;
/* 9: */
/* 10: */ public class RegisterMicroMaterials
/* 11: */ {
/* 12: */ public static void registerBlock(Block block)
/* 13: */ {
/* 14:12 */ if (block != null) {
/* 15:13 */ BlockMicroMaterial.createAndRegister(block, 0);
/* 16: */ }
/* 17: */ }
/* 18: */
/* 19: */ public static void registerFullBright(BlockGreenScreen block)
/* 20: */ {
/* 21:18 */ if (block != null) {
/* 22:19 */ for (int m = 0; m < 16; m++) {
/* 23:20 */ MicroMaterialRegistry.registerMaterial(new FullBrightMicroMaterial(block, m), block.getUnlocalizedName() + (m > 0 ? "_" + m : ""));
/* 24: */ }
/* 25: */ }
/* 26: */ }
/* 27: */
/* 28: */ public static void registerColorBlock(BlockColor block)
/* 29: */ {
/* 30:25 */ if (block != null) {
/* 31:26 */ for (int m = 0; m < 16; m++) {
/* 32:27 */ MicroMaterialRegistry.registerMaterial(new ColoredBlockMicroMaterial(block, m), block.getUnlocalizedName() + (m > 0 ? "_" + m : ""));
/* 33: */ }
/* 34: */ }
/* 35: */ }
/* 36: */
/* 37: */ public static void registerConnectedTexture(Block block, int m)
/* 38: */ {
/* 39:32 */ if (block != null) {
/* 40: */ try
/* 41: */ {
/* 42:34 */ MicroMaterialRegistry.registerMaterial(new ConnectedTextureMicroMaterial(block, m), block.getUnlocalizedName() + (m > 0 ? "_" + m : ""));
/* 43: */ }
/* 44: */ catch (Throwable err)
/* 45: */ {
/* 46:36 */ Throwable e = err;
/* 47:37 */ while (e != null)
/* 48: */ {
/* 49:38 */ LogHelper.info("-------", new Object[0]);
/* 50: */
/* 51: */
/* 52:41 */ LogHelper.info(e.getMessage(), new Object[0]);
/* 53:43 */ for (Throwable f : e.getSuppressed())
/* 54: */ {
/* 55:44 */ LogHelper.info("Found supressed error", new Object[0]);
/* 56:45 */ f.printStackTrace();
/* 57: */ }
/* 58:47 */ for (StackTraceElement f : e.getStackTrace()) {
/* 59:48 */ LogHelper.info(f.getClassName() + " " + f.getMethodName() + " " + f.getFileName() + " " + f.getLineNumber() + " " + f.isNativeMethod(), new Object[0]);
/* 60: */ }
/* 61:51 */ e = e.getCause();
/* 62: */ }
/* 63:53 */ throw new RuntimeException(e);
/* 64: */ }
/* 65: */ }
/* 66: */ }
/* 67: */
/* 68: */ public static void registerBlock(Block block, int m)
/* 69: */ {
/* 70:59 */ if (block != null) {
/* 71:60 */ MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(block, m), block.getUnlocalizedName() + (m > 0 ? "_" + m : ""));
/* 72: */ }
/* 73: */ }
/* 74: */
/* 75: */ public static void registerBlock(Block block, int from, int to)
/* 76: */ {
/* 77:65 */ for (int i = from; i < to; i++) {
/* 78:66 */ registerBlock(block, i);
/* 79: */ }
/* 80: */ }
/* 81: */ }
/* Location: E:\TechnicPlatform\extrautilities\extrautilities-1.2.13.jar
* Qualified Name: com.rwtema.extrautils.multipart.RegisterMicroMaterials
* JD-Core Version: 0.7.0.1
*/ | [
"richard.hendricks@silabs.com"
] | richard.hendricks@silabs.com |
6f6b591b41c76d25b23e04d831fb35467027d5e3 | ef0ba7f13f6ee0d76e1abd4342abe575412f972c | /src/main/java/ru/job4j/h2mapping/t3carmarket/controller/DayServlet.java | cf1e59c9025c59d3a58a7bdebeb85bf6f5a1cd3e | [
"Apache-2.0"
] | permissive | Ravmouse/job4j_hibernate | fd47efb25eb77db7e7ab4b800408b352d78fba6b | 056b10bf5ae2df7754470a899ba9fc689ce939f9 | refs/heads/master | 2022-11-20T07:23:53.856337 | 2020-02-26T19:15:57 | 2020-02-26T19:15:57 | 218,717,944 | 0 | 0 | Apache-2.0 | 2022-11-15T23:52:52 | 2019-10-31T08:24:16 | Java | UTF-8 | Java | false | false | 1,611 | java | package ru.job4j.h2mapping.t3carmarket.controller;
import org.apache.log4j.Logger;
import ru.job4j.h2mapping.t3carmarket.entity.Offer;
import ru.job4j.h2mapping.t3carmarket.model.TransactionManager;
import ru.job4j.h2mapping.t3carmarket.model.impl.TxManager;
import ru.job4j.utils.Utils;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import static ru.job4j.utils.Utils.jsonFromList;
/**
* @author Vitaly Vasilyev, e-mail: rav.energ@rambler.ru
* @version 1.0
*/
public class DayServlet extends HttpServlet {
/**
* Логгер.
*/
private static final Logger LOGGER = Logger.getLogger(Utils.getNameOfTheClass());
/**
* Менеджер транзакций.
*/
private static final TransactionManager<Offer> MANAGER = TxManager.getInstance();
/**
* @param req запрос.
* @param resp ответ.
* @throws ServletException искл.
* @throws IOException искл.
*/
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.setCharacterEncoding("UTF-8");
try (final PrintWriter w = resp.getWriter()) {
final String results = jsonFromList(MANAGER.selectOffersByDay());
resp.setContentType("application/json");
w.write(results);
w.flush();
} catch (Exception e) {
LOGGER.warn(e);
}
}
} | [
"rav.energ@rambler.ru"
] | rav.energ@rambler.ru |
609a87fb1ea8b1c1c8e7801b29a31e3f8382647d | a09a83413ac9148c616ec7cce8ee391c81b4ceee | /v2/common/src/test/java/com/google/cloud/teleport/v2/transforms/FormatDatastreamRecordToJsonTest.java | aaba0e7654d62309b1fbfe40523052c32cb5a9b3 | [
"Apache-2.0"
] | permissive | wtrasowech/DataflowTemplates | 2683b634ce9961569d1f55fc0b9bd9b6d615c365 | ee560fc77ff556aec40940a14b30dce3bf6dbbb5 | refs/heads/master | 2023-08-15T14:14:10.878092 | 2021-09-15T18:02:07 | 2021-09-15T18:02:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,226 | java | /*
* Copyright (C) 2020 Google LLC
*
* 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.google.cloud.teleport.v2.transforms;
import static org.junit.Assert.assertEquals;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import org.apache.avro.file.DataFileReader;
import org.apache.avro.generic.GenericDatumReader;
import org.apache.avro.generic.GenericRecord;
import org.apache.avro.io.DatumReader;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Tests for FormatDatastreamRecordToJson function. These check appropriate Avro-to-Json conv. */
@RunWith(JUnit4.class)
public class FormatDatastreamRecordToJsonTest {
private static final String EXPECTED_FIRST_RECORD =
"{\"LOCATION_ID\":1000.0,"
+ "\"STREET_ADDRESS\":\"1297 Via Cola di Rie\","
+ "\"POSTAL_CODE\":\"00989\","
+ "\"CITY\":\"Roma\","
+ "\"STATE_PROVINCE\":null,"
+ "\"COUNTRY_ID\":\"IT\","
+ "\"_metadata_stream\":\"projects/596161805475/locations/us-central1/streams/dylan-stream-20200810test2\","
+ "\"_metadata_timestamp\":1597101230,"
+ "\"_metadata_read_timestamp\":1597101230,"
+ "\"_metadata_read_method\":\"oracle_dump\","
+ "\"_metadata_source_type\":\"oracle_dump\","
+ "\"_metadata_deleted\":false,"
+ "\"_metadata_table\":\"LOCATIONS\","
+ "\"_metadata_change_type\":null,"
+ "\"_metadata_schema\":\"HR\","
+ "\"_metadata_row_id\":\"AAAEALAAEAAAACdAAB\","
+ "\"_metadata_scn\":null,"
+ "\"_metadata_ssn\":null,"
+ "\"_metadata_rs_id\":null,"
+ "\"_metadata_tx_id\":null,"
+ "\"_metadata_source\":{\"schema\":\"HR\","
+ "\"table\":\"LOCATIONS\","
+ "\"database\":\"XE\","
+ "\"row_id\":\"AAAEALAAEAAAACdAAB\"}}";
private static final String EXPECTED_NUMERIC_RECORD =
"{\"id\":2,\"bitty\":0,\"booly\":0,\"tiny\":-1,\"small\":-1,\"medium\":-1,"
+ "\"inty\":-1,\"big\":-1,\"floater\":1.2,\"doubler\":1.3,"
+ "\"decimaler\":\"11.22\",\"tinyu\":255,\"smallu\":65535,\"mediumu\":16777215,"
+ "\"intyu\":4294967295,\"bigu\":\"0\","
+ "\"_metadata_stream\":\"projects/545418958905/locations/us-central1/streams/stream31\","
+ "\"_metadata_timestamp\":1628184913,"
+ "\"_metadata_read_timestamp\":1628184913,"
+ "\"_metadata_read_method\":\"mysql-cdc-binlog\","
+ "\"_metadata_source_type\":\"mysql\","
+ "\"_metadata_deleted\":false,"
+ "\"_metadata_table\":\"numbers\","
+ "\"_metadata_change_type\":\"INSERT\","
+ "\"_metadata_schema\":\"user1\","
+ "\"_metadata_log_file\":\"mysql-bin.000025\","
+ "\"_metadata_log_position\":\"78443804\","
+ "\"_metadata_source\":{\"table\":\"numbers\",\"database\":\"user1\","
+ "\"primary_keys\":[\"id\"],\"log_file\":\"mysql-bin.000025\","
+ "\"log_position\":78443804,\"change_type\":\"INSERT\",\"is_deleted\":false}}";
@Test
public void testParseAvroGenRecord() throws IOException, URISyntaxException {
URL resource =
getClass()
.getClassLoader()
.getResource("FormatDatastreamRecordToJsonTest/avro_file_ut.avro");
File file = new File(resource.toURI());
DatumReader<GenericRecord> datumReader = new GenericDatumReader<>();
DataFileReader<GenericRecord> dataFileReader = new DataFileReader<>(file, datumReader);
GenericRecord record = dataFileReader.next();
String jsonData = FormatDatastreamRecordToJson.create().apply(record).getOriginalPayload();
assertEquals(EXPECTED_FIRST_RECORD, jsonData);
while (dataFileReader.hasNext()) {
record = dataFileReader.next();
FormatDatastreamRecordToJson.create().apply(record);
}
}
public void testParseMySQLNumbers() throws IOException, URISyntaxException {
URL resource =
getClass()
.getClassLoader()
.getResource("FormatDatastreamRecordToJsonTest/mysql_numbers_test.avro");
File file = new File(resource.toURI());
DatumReader<GenericRecord> datumReader = new GenericDatumReader<>();
DataFileReader<GenericRecord> dataFileReader = new DataFileReader<>(file, datumReader);
// mysql_numbers_test.avro has 2 records. We are interested in testing the second record
dataFileReader.next();
GenericRecord record = dataFileReader.next();
String jsonData = FormatDatastreamRecordToJson.create().apply(record).getOriginalPayload();
assertEquals(EXPECTED_NUMERIC_RECORD, jsonData);
}
}
| [
"cloud-teleport@google.com"
] | cloud-teleport@google.com |
c1d7b4c613154a83b807b0b850c13cb60e8f27aa | 7086f838b07304e24838c9fabddd7ccc3ef93d5c | /src/hackerrank/domains/algorithms/FlippingBits.java | af0bdc75e50d2c675de306cbc6417bcc850faa4d | [] | no_license | ecalado/hackerrank | 87c7c08ca730528019030085a821bc16c7afa2ac | 2eddcf63c13a65bcdd965fb21e2abafe0d3ce3b2 | refs/heads/master | 2020-09-14T04:46:41.381795 | 2020-05-02T17:06:43 | 2020-05-02T17:06:43 | 223,021,530 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,279 | java | package hackerrank.domains.algorithms;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class FlippingBits {
static long flippingBits(long n) {
String in = Long.toBinaryString(n);
StringBuffer inn = new StringBuffer();
for (int i = 0; i < 32 - in.length(); i++) {
inn.append(0);
}
inn.append(in);
StringBuffer out = new StringBuffer();
int i = 0;
while (i < inn.length()) {
int x = Character.getNumericValue(inn.codePointAt(i));
out.append(Math.abs(x - 1));
i++;
}
return Long.parseLong(out.toString(), 2);
}
private static final Scanner scanner = new Scanner(System.in);
public static void main(String[] args) throws IOException {
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
int q = scanner.nextInt();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
for (int qItr = 0; qItr < q; qItr++) {
long n = scanner.nextLong();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
long result = flippingBits(n);
bufferedWriter.write(String.valueOf(result));
bufferedWriter.newLine();
}
bufferedWriter.close();
scanner.close();
}
}
| [
"ecalado@gmail.com"
] | ecalado@gmail.com |
3e3053b9cfa890c329beb7d763ad2213a1ed244e | 311871dd5c88ffee8272ce39c3e2339ece15392f | /src/com/fumitti/vfdlib/Writer/SimpleWriter.java | 7e2d0bcbe4212b4b214ac0ec6734c151d82402c1 | [] | no_license | fumitti/VFDLib | 4ab4be7ebece1a089db1a1fd35c915c7a21febaf | 32385a8e15357b9c4aec47be4cb3c03f1fb94312 | refs/heads/master | 2021-01-10T11:09:51.530633 | 2015-11-14T13:17:35 | 2017-02-15T07:27:37 | 46,175,398 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 183 | java | package com.fumitti.vfdlib.Writer;
/**
* Created by fumitti on 2015/07/21.
*/
public class SimpleWriter implements WriterInterface {
@Override
public void run() {
}
}
| [
"fumitti@gmail.com"
] | fumitti@gmail.com |
18e058c5bc872fd8219277f2e44d8fa2de9153a6 | d5f09c7b0e954cd20dd613af600afd91b039c48a | /sources/com/coolapk/market/view/userv9/UserQRCodeFragment$setupView$4.java | b2369b0b4de1c284f1e7f5ff9c1cc9172e82bbc1 | [] | no_license | t0HiiBwn/CoolapkRelease | af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3 | a6a2b03e32cde0e5163016e0078391271a8d33ab | refs/heads/main | 2022-07-29T23:28:35.867734 | 2021-03-26T11:41:18 | 2021-03-26T11:41:18 | 345,290,891 | 5 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,538 | java | package com.coolapk.market.view.userv9;
import android.view.View;
import com.coolapk.market.util.BitmapUtil;
import com.coolapk.market.util.CoolFileUtils;
import com.coolapk.market.widget.Toast;
import java.io.File;
import kotlin.Metadata;
import org.apache.commons.io.FileUtils;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "", "it", "Landroid/view/View;", "kotlin.jvm.PlatformType", "onClick"}, k = 3, mv = {1, 4, 2})
/* compiled from: UserQRCodeFragment.kt */
final class UserQRCodeFragment$setupView$4 implements View.OnClickListener {
final /* synthetic */ UserQRCodeFragment this$0;
UserQRCodeFragment$setupView$4(UserQRCodeFragment userQRCodeFragment) {
this.this$0 = userQRCodeFragment;
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
try {
File file = this.this$0.saveToTempPath();
File createBitmapSavePath = BitmapUtil.createBitmapSavePath();
FileUtils.copyFile(file, createBitmapSavePath);
CoolFileUtils.notifyNewMediaFile(this.this$0.getActivity(), createBitmapSavePath);
file.delete();
Toast.show$default(this.this$0.getActivity(), "保存成功", 0, false, 12, null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"test@gmail.com"
] | test@gmail.com |
285f278e3341ef539eeb4d3a2e48830fb7c3dc6b | 686b422f721a53614bced6849e9323c124c906c0 | /PrintName.java | c4c08e0860c4311a19aba67dad3460390259e4f6 | [] | no_license | juveria-manzar/Core-Java | 4e7b4a3d9c2fdbb430d10840b7a9752e50d3e890 | 6ed3c4197522cd78c716a70652441d8fad427943 | refs/heads/master | 2021-07-18T13:32:26.603610 | 2021-02-18T22:14:09 | 2021-02-18T22:14:09 | 237,299,014 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 218 | java | import myPackage.MyClass;
public class PrintName
{
public static void main(String args[])
{
String name = "Hello World";
MyClass obj = new MyClass();
obj.getNames(name);
}
} | [
"juveriamanzar29@gmail.com"
] | juveriamanzar29@gmail.com |
7aa1c712c196bcfd1dbd622eb24db47aac70dab1 | caf38f68b37b0b973d3316e13c922fd3ff2eed41 | /primefaces_6_1/src/main/java/org/cyk/playground/ui/primefaces/model/PhoneNumberType.java | 44195dfa705cf56d011a01ed8f0689187adc1687 | [] | no_license | devlopper/org.cyk.playground.ui.primefaces | 097b320e4927e3983ce470cb55fbf542df5055c9 | 10570a45f86567077091aef9717aaa3c2ba4314d | refs/heads/master | 2021-05-08T00:44:56.142019 | 2018-05-24T12:54:15 | 2018-05-24T12:54:15 | 107,716,029 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,314 | java | package org.cyk.playground.ui.primefaces.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
@Getter @Setter @Accessors(chain=true)
public class PhoneNumberType extends AbstractIdentified {
public static final List<PhoneNumberType> COLLECTION = new ArrayList<>();
static {
COLLECTION.add(new PhoneNumberType().setCode("LAND").setName("Fixe"));
COLLECTION.add(new PhoneNumberType().setCode("MOBILE").setName("Mobile"));
}
@Override
public PhoneNumberType setName(String name) {
return (PhoneNumberType) super.setName(name);
}
@Override
public PhoneNumberType setCode(String code) {
return (PhoneNumberType) super.setCode(code);
}
public static PhoneNumberType get(String code) {
for(PhoneNumberType phoneNumberType : COLLECTION)
if(phoneNumberType.getCode().equals(code))
return phoneNumberType;
return null;
}
/**/
@Getter @Setter
public static class Filter extends AbstractIdentified.Filter<PhoneNumberType> implements Serializable {
private static final long serialVersionUID = -1498269103849317057L;
}
public static List<PhoneNumberType> filter(Filter filter,Collection<PhoneNumberType> phoneNumberTypes){
Map<String,Object> map = new HashMap<>();
map.put("globalIdentifier.code", filter.getGlobalIdentifier().getCode().getPreparedValue());
map.put("globalIdentifier.name", filter.getGlobalIdentifier().getName().getPreparedValue());
List<PhoneNumberType> filtered = new ArrayList<PhoneNumberType>();
for(PhoneNumberType phoneNumberType : phoneNumberTypes){
for(Map.Entry<String, Object> entry : map.entrySet()){
if("globalIdentifier.code".equals(entry.getKey()) && phoneNumberType.getGlobalIdentifier().getCode().contains((String)entry.getValue())){
filtered.add(phoneNumberType);
break;
}else if("globalIdentifier.name".equals(entry.getKey()) && phoneNumberType.getGlobalIdentifier().getName().contains((String)entry.getValue())){
filtered.add(phoneNumberType);
break;
}
}
}
return filtered;
}
public static List<PhoneNumberType> filter(Filter filter){
return filter(filter,COLLECTION);
}
} | [
"Christian@CYK-HP-LAPTOP"
] | Christian@CYK-HP-LAPTOP |
f4ef41f79e0e9ca2df0c764f90164a3e7dde3e25 | a96cf2038255a060ea34913e23e0138b6d211a75 | /src/main/java/com/neliaoalves/cursomc/services/BoletoService.java | 2b5f1feb38a0a805eac8c2eccb38179f80dd3e66 | [] | no_license | JoaoAJRomao/cursomc | 6c3267c93c562c53d3a74a6cc49fe40fe5834e3c | 13a7e30732806dda926218a41f8e5cbce7da9695 | refs/heads/master | 2023-02-27T01:08:40.396289 | 2021-02-05T02:55:53 | 2021-02-05T02:55:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 490 | java | package com.neliaoalves.cursomc.services;
import java.util.Calendar;
import java.util.Date;
import org.springframework.stereotype.Service;
import com.neliaoalves.cursomc.domain.PagamentoComBoleto;
@Service
public class BoletoService {
public void preencherPagamentoComBoleto(PagamentoComBoleto pagto, Date instanteDoPedido) {
Calendar cal = Calendar.getInstance();
cal.setTime(instanteDoPedido);
cal.add(Calendar.DAY_OF_MONTH, 7);
pagto.setDataPagamento(cal.getTime());
}
}
| [
"tupi_1800@hotmail.com"
] | tupi_1800@hotmail.com |
ba2a4434b6dd61ea771039753719e918df4be15f | 831e24704d4e0b3ce6b428c1fc429c477dabf9ba | /globalshop-biz1-app/src/main/java/com/wangqin/globalshop/biz1/app/dal/mapper/InventoryOutManifestDOMapper.java | 4d9d38fe10e12b6c59a1985ddc05237d004dbc13 | [] | no_license | wang-shun/erp_xiajun | 97ce1684c3229004dcbd58710430b85c15ae6209 | 6ded6552e30ba71f4343ed43f9a6188384898f4d | refs/heads/master | 2020-04-02T03:52:41.840395 | 2018-08-31T07:59:14 | 2018-08-31T07:59:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 509 | java | package com.wangqin.globalshop.biz1.app.dal.mapper;
import com.wangqin.globalshop.biz1.app.dal.dataObject.InventoryOutManifestDO;
public interface InventoryOutManifestDOMapper {
int deleteByPrimaryKey(Long id);
int insert(InventoryOutManifestDO record);
int insertSelective(InventoryOutManifestDO record);
InventoryOutManifestDO selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(InventoryOutManifestDO record);
int updateByPrimaryKey(InventoryOutManifestDO record);
} | [
"xiongjy2104@gmail.com"
] | xiongjy2104@gmail.com |
79628b04c78902c66a2e40670f1424e4911889b0 | 1a1db602177866cca6f203521ab84ea568f8d38c | /FRC-5568-2020Comp-Imported/src/main/java/frc/robot/classes/BlinkIn.java | f6156cb8e0e6fdd8ac8296a49d994f04c608f404 | [] | no_license | KKAY99/RecycleRush2015 | 527786ea8f2ab22e3f01c887e0a3f39e59ab5309 | 87288f8bbeb39e188143c87d30d090f6c2299afe | refs/heads/main | 2023-05-05T09:57:18.247287 | 2021-05-23T15:08:12 | 2021-05-23T15:08:12 | 29,322,251 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,506 | java | /*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package frc.robot.classes;
import edu.wpi.first.wpilibj.Spark;
import edu.wpi.first.networktables.NetworkTableEntry;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
/**
* This class controls the Blinkin Lights
*/
public class BlinkIn {
// Create BlinkIn Spark
Spark BlinkIn;
// Create Configurable Values
public NetworkTableEntry m_PwmOutput;
/**
* Initializes the BlinkIn controller and base settings.
*
* @param blinkIn The Spark that the BlinkIn is on.
* @param defaultPwmOutput The default lighting code for the BlinkIn
*/
public BlinkIn(Spark blinkIn, double defaultPwmOutput) {
BlinkIn = blinkIn;
m_PwmOutput = Shuffleboard.getTab("SubSystems").add("BlinkIn PWM Output", defaultPwmOutput)
.withWidget("Number Slider").withPosition(2, 1).withSize(2, 1).getEntry();
}
/**
* Updates the BlinkIn each loop.
*/
public void update() {
BlinkIn.set(m_PwmOutput.getDouble(0));
}
}
| [
"kkay99@gmail.com"
] | kkay99@gmail.com |
38e320a292ff3c0aaac7d3cdc49c50c8ab9a0159 | d30d04e3443b98c6c0cc3e9e83fe1c4fa55649a0 | /timeAngle.java | 7a0aba80c06ae9c11304515ff5361a776046cd12 | [] | no_license | Shiva1029/Coding | b139c9c3e50bdf8ae4af63c79effc7f5d257be79 | 5d4b0f11aef8ee43dc74c0277b0bf9122db6e88f | refs/heads/master | 2021-01-10T15:39:24.749817 | 2015-11-09T21:27:52 | 2015-11-09T21:27:52 | 45,848,466 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 824 | java |
public class time {
public static double timeToAngle(String t) {
String[] b = t.split(":", 3);
int h = Integer.parseInt(b[0]);
int m = Integer.parseInt(b[1]);
int s = Integer.parseInt(b[2]);
// Input Validation
if ( h < 0 || h > 23 || m < 0 || m > 60 || s < 0 || s > 60 ) {
System.out.println("I/O Error - Out of Range");
return 0.00;
}
else {
double ha = 0.5 * ( 60 * ( h % 12 ) + m );
double ma = 6 * m;
if ( ha > ma )
return ( (ha - ma) % 360 );
else
return ( (ma - ha) % 360 );
}
}
public static void main (String args[])
{
double angle = timeToAngle("3:30:12");
System.out.println(angle);
}
}
| [
"Shiva1029@users.noreply.github.com"
] | Shiva1029@users.noreply.github.com |
832210fa63b4220b0227960ca528bc963c035d2b | 27b052c54bcf922e1a85cad89c4a43adfca831ba | /src/ya.java | e033243b4efda40cda802103514ae7869847f0d0 | [] | no_license | dreadiscool/YikYak-Decompiled | 7169fd91f589f917b994487045916c56a261a3e8 | ebd9e9dd8dba0e657613c2c3b7036f7ecc3fc95d | refs/heads/master | 2020-04-01T10:30:36.903680 | 2015-04-14T15:40:09 | 2015-04-14T15:40:09 | 33,902,809 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,333 | java | import android.view.View;
public final class ya
{
public static void a(View paramView, float paramFloat)
{
if (yc.a) {
yc.a(paramView).a(paramFloat);
}
for (;;)
{
return;
yb.a(paramView, paramFloat);
}
}
public static void b(View paramView, float paramFloat)
{
if (yc.a) {
yc.a(paramView).b(paramFloat);
}
for (;;)
{
return;
yb.b(paramView, paramFloat);
}
}
public static void c(View paramView, float paramFloat)
{
if (yc.a) {
yc.a(paramView).c(paramFloat);
}
for (;;)
{
return;
yb.c(paramView, paramFloat);
}
}
public static void d(View paramView, float paramFloat)
{
if (yc.a) {
yc.a(paramView).d(paramFloat);
}
for (;;)
{
return;
yb.d(paramView, paramFloat);
}
}
public static void e(View paramView, float paramFloat)
{
if (yc.a) {
yc.a(paramView).e(paramFloat);
}
for (;;)
{
return;
yb.e(paramView, paramFloat);
}
}
public static void f(View paramView, float paramFloat)
{
if (yc.a) {
yc.a(paramView).f(paramFloat);
}
for (;;)
{
return;
yb.f(paramView, paramFloat);
}
}
public static void g(View paramView, float paramFloat)
{
if (yc.a) {
yc.a(paramView).g(paramFloat);
}
for (;;)
{
return;
yb.g(paramView, paramFloat);
}
}
public static void h(View paramView, float paramFloat)
{
if (yc.a) {
yc.a(paramView).h(paramFloat);
}
for (;;)
{
return;
yb.h(paramView, paramFloat);
}
}
public static void i(View paramView, float paramFloat)
{
if (yc.a) {
yc.a(paramView).i(paramFloat);
}
for (;;)
{
return;
yb.i(paramView, paramFloat);
}
}
public static void j(View paramView, float paramFloat)
{
if (yc.a) {
yc.a(paramView).j(paramFloat);
}
for (;;)
{
return;
yb.j(paramView, paramFloat);
}
}
}
/* Location: C:\Users\dreadiscool\Desktop\tools\classes-dex2jar.jar
* Qualified Name: ya
* JD-Core Version: 0.7.0.1
*/ | [
"paras@protrafsolutions.com"
] | paras@protrafsolutions.com |
e41da39906c93cf0594038e9efc9403f3471f59b | 3f6101293f8b8bf049ab64a8bb5794ae4cbd2466 | /src/main/java/com/bupt/aiya/blockchain/core/entity/BC/Block/BlockBody.java | 99fa2ebfeec675c81bb9a2d36bac4af70d4c9c4e | [] | no_license | aiyiyayayaya/bcForSupply | 903276aa73badb1e8258fe5a35f876525668c433 | b8d4be2be3d596c49028284c4d145a0473a28537 | refs/heads/master | 2022-06-23T02:50:59.503788 | 2020-01-07T02:02:46 | 2020-01-07T02:02:46 | 224,626,741 | 0 | 0 | null | 2022-06-17T02:44:48 | 2019-11-28T10:19:49 | Java | UTF-8 | Java | false | false | 1,395 | java | package com.bupt.aiya.blockchain.core.entity.BC.Block;
import com.bupt.aiya.blockchain.Util.MessageSignature;
import com.bupt.aiya.blockchain.Util.SerializeUtils;
import java.security.PrivateKey;
import java.security.SignatureException;
import java.security.interfaces.ECPrivateKey;
import java.util.Base64;
import java.util.List;
/**
* Created by aiya on 2019/1/9 下午4:09
*/
public class BlockBody {
private List<BlockDetail> blockDetails;
private byte[] sign;
public String toString(){
return "BlockBody{"+
"BlockDetails = "+blockDetails.toString()+
"sign = " + Base64.getEncoder().encodeToString(sign) +
"}";
}
public List<BlockDetail> getBlockDetails() {
return blockDetails;
}
public void setBlockDetails(List<BlockDetail> blockDetails) {
this.blockDetails = blockDetails;
}
public byte[] getSign() {
return sign;
}
public void setSign(byte[] sign) {
this.sign = sign;
}
public void generateSign(List<BlockDetail> transactions, PrivateKey privateKey) throws SignatureException {//BlockBody blockBody
MessageSignature messageSignature = new MessageSignature();
//String content = transactions.toString();
sign = messageSignature.ECSign(SerializeUtils.serialize(transactions), (ECPrivateKey) privateKey);
}
}
| [
"zhuyanyu@zuoyebang.com"
] | zhuyanyu@zuoyebang.com |
f12993b829ac9c86736e1477e14226a6c49ff2ce | 882e77219bce59ae57cbad7e9606507b34eebfcf | /mi2s_10_miui12/src/main/java/com/android/server/am/ProcessPolicyConfig.java | 8553cfb1ad33c4c97eb7ea339c21eb9c4d9653e8 | [] | no_license | CrackerCat/XiaomiFramework | 17a12c1752296fa1a52f61b83ecf165f328f4523 | 0b7952df317dac02ebd1feea7507afb789cef2e3 | refs/heads/master | 2022-06-12T03:30:33.285593 | 2020-05-06T11:30:54 | 2020-05-06T11:30:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 898 | java | package com.android.server.am;
import java.util.ArrayList;
public class ProcessPolicyConfig {
static final ArrayList<String> sDelayBootPersistentAppList = new ArrayList<>();
static final ArrayList<String> sImportantProcessList = new ArrayList<>();
static final ArrayList<String> sNeedTraceProcessList = new ArrayList<>();
static final ArrayList<String> sProcessCleanProtectedList = new ArrayList<>();
static {
sNeedTraceProcessList.add("com.android.phone");
sNeedTraceProcessList.add("com.miui.whetstone");
sNeedTraceProcessList.add("com.android.nfc");
sNeedTraceProcessList.add("com.fingerprints.serviceext");
sDelayBootPersistentAppList.add("com.securespaces.android.ssm.service");
sImportantProcessList.add("com.mobiletools.systemhelper:register");
sProcessCleanProtectedList.add("com.miui.screenrecorder");
}
}
| [
"sanbo.xyz@gmail.com"
] | sanbo.xyz@gmail.com |
2267e773c86a5f5941fabec9b1cde1f36b279b04 | d901a9c1c39b09d1eadfe02e851535c854c214ee | /app/src/main/java/com/vinnlook/www/surface/mvp/view/BrowseView.java | 2615adaff14c514ad3ae5605c01b66f198b3b85d | [] | no_license | pengkun3508/App | 8a9d49b48b08d76a4678dfb0eab0ae1e535b5fe5 | ad8f140fcde2b373d39dcfa103355795d752c67c | refs/heads/master | 2023-06-20T08:49:00.723673 | 2021-07-08T10:59:29 | 2021-07-08T10:59:29 | 362,320,832 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 354 | java | package com.vinnlook.www.surface.mvp.view;
import com.dm.lib.core.mvp.MvpView;
import com.vinnlook.www.surface.bean.BrowseListBean;
/**
* @Description:
* @Time:2020/9/9$
* @Author:pk$
*/
public interface BrowseView extends MvpView {
void getBrowseListSuccess(int code, BrowseListBean data);
void getBrowseListFail(int code, String msg);
}
| [
"350869854@qq.com"
] | 350869854@qq.com |
debf2445e0529045e52c4185445c9db1f65a9b84 | bf0a24f50c0026629fe0cd462dceecb145dcd606 | /login/src/main/java/com/co/example/service/CustomUserDetailsService.java | c243da23e0a757086a40b65528deb524619c0453 | [] | no_license | moncat/mpackage | d21af9c1a208b3847cfae482408f6ebbdf28088b | 4347f18cb7a8317be7461c493167594f529120d5 | refs/heads/master | 2022-12-10T09:59:21.590725 | 2020-03-09T01:15:00 | 2020-03-09T01:15:00 | 94,493,254 | 3 | 2 | null | 2022-12-06T00:40:56 | 2017-06-16T01:35:25 | Roff | UTF-8 | Java | false | false | 943 | java | package com.co.example.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;
import com.co.example.entity.user.TUsers;
import com.co.example.service.user.TUsersService;
@Component
public class CustomUserDetailsService implements UserDetailsService {
@Autowired
private TUsersService userRepository;
@Override
public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException {
TUsers user = userRepository.queryByLoginName(userName);
if (user == null) {
throw new UsernameNotFoundException("UserName " + userName + " not found");
}
return new SecurityUser(user);
}
}
| [
"Administrator@SKY-20160518SVB"
] | Administrator@SKY-20160518SVB |
d0e3708a90b7cb27dc523461630d1dbf130349c4 | 33bda4148f69ace41451497821cf260207ce84f7 | /app/src/main/java/bisma/rabia/gogreenantalya/fragment/CouponListFragment.java | 759e343ff8d6b01f061570e5aa48b6a76cedf5ea | [
"MIT"
] | permissive | bismarabia/GoGreenAntalya | 3afa7b6a52f6168947eb548316b972a4ddbe5bb0 | 2e7a50ae62413cf00b82c033c5b822d4b938163a | refs/heads/master | 2020-11-25T02:18:26.079427 | 2019-12-19T06:22:30 | 2019-12-19T06:22:30 | 228,449,221 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,646 | java | package bisma.rabia.gogreenantalya.fragment;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.app.Fragment;
import java.util.ArrayList;
import java.util.List;
import bisma.rabia.gogreenantalya.R;
import bisma.rabia.gogreenantalya.databinding.FragmentCouponListBinding;
import bisma.rabia.gogreenantalya.databinding.LayoutCouponListItemBinding;
public class CouponListFragment extends Fragment {
FragmentCouponListBinding fragmentCouponListBinding;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
fragmentCouponListBinding = DataBindingUtil.inflate(LayoutInflater.from(getActivity()), R.layout.fragment_coupon_list, container, false);
return fragmentCouponListBinding.getRoot();
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
fragmentCouponListBinding.lvCouponsList.setAdapter(new CouponAdapter(getActivity(), new ArrayList<Coupon>() {{
add(new Coupon("Get 5% discount", "Migros", "100"));
add(new Coupon("Get 10% discount", "Şok", "80"));
add(new Coupon("Get 1 free Ice Cream", "McDonald's", "30"));
}}));
}
private class CouponAdapter extends ArrayAdapter<Coupon> {
private Context mContext;
CouponAdapter(@NonNull Context context, List<Coupon> coupons) {
super(context, R.layout.layout_coupon_list_item, coupons);
mContext = context;
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
if (convertView == null) {
LayoutCouponListItemBinding layoutCouponListItemBinding = DataBindingUtil.inflate(LayoutInflater.from(mContext), R.layout.layout_coupon_list_item, parent, false);
Coupon item = getItem(position);
if (layoutCouponListItemBinding != null && item != null) {
layoutCouponListItemBinding.txvCouponListPoint.setText(String.format("%s\nPoints", item.getPoint()));
layoutCouponListItemBinding.txvCouponListTitleStore.setText(String.format("%s in %s", item.getDiscountTitle(), item.getStore()));
return layoutCouponListItemBinding.getRoot();
}
}
return convertView;
}
}
class Coupon {
String store;
String discountTitle;
String point;
public Coupon(String discountTitle, String store, String point) {
this.store = store;
this.discountTitle = discountTitle;
this.point = point;
}
public String getStore() {
return store;
}
public void setStore(String store) {
this.store = store;
}
public String getDiscountTitle() {
return discountTitle;
}
public void setDiscountTitle(String discountTitle) {
this.discountTitle = discountTitle;
}
public String getPoint() {
return point;
}
public void setPoint(String point) {
this.point = point;
}
}
} | [
"rabismail@hotech.systems"
] | rabismail@hotech.systems |
ee57f33daf0b7d001d03f1ed7ca5117b0ef3a590 | 7bb7fad017b33b7b2b88250337377234fd1f85c3 | /chapter_006/src/main/java/ru/job4j/socet/server/Server.java | cb434c91d2f2b1ffb8fc6b0e63c325e0abfbff40 | [
"Apache-2.0"
] | permissive | Zhitenev/job4j | 099dc801822da6e1083175597a5c3a0f8b97794f | 83bc4af86619ff16c783eb035ad2afabd357fd4e | refs/heads/master | 2021-06-29T05:26:29.069898 | 2020-03-06T05:03:09 | 2020-03-06T05:03:09 | 167,960,170 | 0 | 0 | Apache-2.0 | 2020-10-13T11:52:11 | 2019-01-28T12:39:37 | Java | UTF-8 | Java | false | false | 1,277 | java | package ru.job4j.socet.server;
import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
public class Server {
private static final int PORT = 5000;
private static final String EXIT = "exit";
private static final String HELLO = "hello oracle";
private final Socket socket;
public Server(Socket socket) {
this.socket = socket;
}
public static void main(String[] args) throws IOException {
try (Socket socket = new ServerSocket(PORT).accept()) {
new Server(socket).init();
}
}
public void init() throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(this.socket.getInputStream()));
PrintWriter out = new PrintWriter(this.socket.getOutputStream(), true);
String line;
do {
System.out.println("Waiting command...");
line = in.readLine();
System.out.println(line);
if (HELLO.equals(line)) {
out.println("Hello, dear friend. I'm oracle.");
out.println("");
} else if (!(EXIT.equals(line))) {
out.println("I don't understand");
out.println("");
}
} while (!(EXIT.equals(line)));
}
} | [
"oleg@openres.ru"
] | oleg@openres.ru |
7cc7c67c5c3d98abca3f0b5155ecb284b98ea6e2 | b200eea2b4755e1e0ca23b6606cceff43edf5d8b | /src/main/java/spring/TerminatorQuoter.java | 2377711d49ce9758ef89a9f3a5cca59885da2f36 | [] | no_license | macaleks/testall2 | 90c25370994b3c3db276490c5a7878532457e083 | 93a330cc6be0fe03aab6792d2a07e422740f6884 | refs/heads/master | 2023-06-04T17:18:37.907250 | 2021-06-21T06:34:44 | 2021-06-21T06:34:44 | 378,831,139 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 791 | java | package spring;
import javax.annotation.PostConstruct;
@Profiling
public class TerminatorQuoter implements Quoter {
@InjectRandomInt(min = 2, max = 4)
private int repeat;
private String message;
@PostConstruct
public void init() {
System.out.println("Phase 2");
System.out.println(repeat);
}
public TerminatorQuoter() {
System.out.println("Phase 1");
System.out.println(repeat);
}
public void setMessage(String message) {
System.out.println("Phase 1.1");
this.message = message;
}
@Override
@PostProxy
public void sayQuote() {
System.out.println("Phase 3");
for (int i = 0; i < repeat; i++) {
System.out.println("message = " + message);
}
}
}
| [
"msxander@gmail.com"
] | msxander@gmail.com |
80bd5e6a52129f761b560761422efc940a2e5f0d | 1e702c3a6a3a8574da01c857ee8c88fb9b2426c0 | /src/com/javarush/test/level13/lesson11/home04/Solution.java | 9cc77185da44f93008528dc9b4e045fceab75ad0 | [] | no_license | kaktuuuz/JavaRushHomeWork | e2ed335b7f2d5f28eaab19ce0f1c3d0c6b03b508 | e672334b5565f55f9404e6b7624a8184d96bd1ec | refs/heads/master | 2021-01-10T09:37:45.058734 | 2016-03-12T18:55:52 | 2016-03-12T18:55:52 | 53,748,100 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,153 | java | package com.javarush.test.level13.lesson11.home04;
/* Запись в файл
1. Прочесть с консоли имя файла.
2. Считывать строки с консоли, пока пользователь не введет строку "exit".
3. Вывести все строки в файл, каждую строчку с новой стороки.
*/
import java.io.*;
import java.util.ArrayList;
public class Solution
{
public static void main(String[] args) throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String filename = reader.readLine();
OutputStream outputStream = new FileOutputStream(filename);
ArrayList<String> arr = new ArrayList<String>();
String temp=reader.readLine();
while (!temp.equals("exit")){
arr.add(temp);
temp=reader.readLine();
}
arr.add("exit");
for(int i=0;i<arr.size();i++)
{
outputStream.write(arr.get(i).getBytes());
outputStream.write("\r\n".getBytes());
}
outputStream.close();
}
}
| [
"romachello@bigmir.net"
] | romachello@bigmir.net |
b5f8cef63ea8b6d79399dee62258d34dbdb6b5d2 | 390c17e9f36f28823c65b19935498729b3b23a88 | /src/main/java/org/recap/service/executor/datadump/DeletedDataDumpExecutorService.java | 71e2cf005a57af39e9ed361c38f1596567e88481 | [
"Apache-2.0"
] | permissive | saravana77git/scsb-etl | d78dc1578fd9dff03dcb5af4f868523dd5f56b56 | df734c59739ffa63da62414e2314d60efcfb461e | refs/heads/master | 2021-01-22T17:58:11.627058 | 2016-10-06T15:28:58 | 2016-10-06T15:28:58 | 68,592,856 | 0 | 0 | null | 2016-09-19T09:56:06 | 2016-09-19T09:56:06 | null | UTF-8 | Java | false | false | 2,166 | java | package org.recap.service.executor.datadump;
import org.recap.ReCAPConstants;
import org.recap.model.export.DataDumpRequest;
import org.recap.model.export.DeletedDataDumpCallable;
import org.recap.model.export.FullDataDumpCallable;
import org.recap.repository.BibliographicDetailsRepository;
import org.recap.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
/**
* Created by premkb on 27/9/16.
*/
@Service
public class DeletedDataDumpExecutorService extends AbstractDataDumpExecutorService {
@Autowired
private BibliographicDetailsRepository bibliographicDetailsRepository;
@Autowired
private ApplicationContext appContext;
@Override
public boolean isInterested(String fetchType) {
return fetchType.equals(ReCAPConstants.DATADUMP_FETCHTYPE_DELETED) ? true:false;
}
@Override
public Callable getCallable(int pageNum, int batchSize, DataDumpRequest dataDumpRequest, BibliographicDetailsRepository bibliographicDetailsRepository) {
Callable callable = appContext.getBean(DeletedDataDumpCallable.class,pageNum,batchSize,dataDumpRequest,bibliographicDetailsRepository);
return callable;
}
@Override
public Long getTotalRecordsCount(DataDumpRequest dataDumpRequest) {
Date inputDate = DateUtil.getDateFromString(dataDumpRequest.getDate(), ReCAPConstants.DATE_FORMAT_YYYYMMDDHHMM);
Long totalRecordCount;
if (dataDumpRequest.getDate()==null) {
totalRecordCount = bibliographicDetailsRepository.countDeletedRecordsForFullDump(dataDumpRequest.getCollectionGroupIds(), dataDumpRequest.getInstitutionCodes(), ReCAPConstants.IS_DELETED);
} else {
totalRecordCount = bibliographicDetailsRepository.countDeletedRecordsForIncremental(dataDumpRequest.getCollectionGroupIds(), dataDumpRequest.getInstitutionCodes(),inputDate, ReCAPConstants.IS_DELETED);
}
return totalRecordCount;
}
}
| [
"prem143india"
] | prem143india |
6a260faf9af2d28def90933cfc58d1a64b611743 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/21/21_afc07d80a9fc28d89034a9cc2b578770802faadc/NavigatorSplashScreen/21_afc07d80a9fc28d89034a9cc2b578770802faadc_NavigatorSplashScreen_s.java | 6084d608420531d0cbe344baf718014576fcba25 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 15,455 | java | /***************************************************
*
* cismet GmbH, Saarbruecken, Germany
*
* ... and it just works.
*
****************************************************/
package Sirius.navigator;
import Sirius.navigator.exception.ExceptionManager;
import Sirius.navigator.method.MultithreadedMethod;
import Sirius.navigator.ui.progress.ProgressObserver;
import org.apache.log4j.Logger;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.*;
import de.cismet.tools.CismetThreadPool;
/**
* DOCUMENT ME!
*
* @author pascal
* @version $Revision$, $Date$
*/
public class NavigatorSplashScreen extends JFrame {
//~ Instance fields --------------------------------------------------------
private final ProgressObserver progressObserver;
private final NavigatorLoader navigatorLoader;
private final Logger logger;
private ProgressObserver pluginProgressObserver;
private Timer timer;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnApply;
private javax.swing.JButton jButton1;
private javax.swing.JLabel logoLabel;
private javax.swing.JPanel panButtons;
private javax.swing.JPanel panCenter;
private javax.swing.JPanel panConnection;
private javax.swing.JPanel panProgress;
private javax.swing.JPanel panProxy;
private javax.swing.JProgressBar progressBar;
private javax.swing.JProgressBar progressBarPlugin;
// End of variables declaration//GEN-END:variables
//~ Constructors -----------------------------------------------------------
/**
* Creates new form JWindow.
*
* @param progressObserver DOCUMENT ME!
* @param logo DOCUMENT ME!
*/
public NavigatorSplashScreen(final ProgressObserver progressObserver, final Icon logo) {
this.setUndecorated(true);
// this.setAlwaysOnTop(true);
this.initComponents();
this.logger = Logger.getLogger(this.getClass());
this.panConnection.setVisible(false);
this.progressObserver = progressObserver;
pluginProgressObserver = progressObserver.getSubProgressObserver();
this.progressObserver.addPropertyChangeListener(new ProgressListener(progressObserver, progressBar));
this.navigatorLoader = new NavigatorLoader(this.progressObserver);
this.logoLabel.setIcon(logo);
this.logoLabel.setPreferredSize(new Dimension(logo.getIconWidth(), logo.getIconHeight()));
timer = new Timer(100, new TimerListener());
progressBarPlugin.setVisible(false);
final int[] pixels = new int[1];
final BufferedImage img = new BufferedImage(logo.getIconWidth(),
logo.getIconHeight(),
BufferedImage.TYPE_INT_ARGB); // you can change the type as needed
final Graphics2D g = img.createGraphics();
logo.paintIcon(new JPanel(), g, 0, 0);
final int cCode = img.getRGB(0, logo.getIconHeight() - 1);
final Color col = new Color(cCode);
progressBar.setForeground(col);
progressBarPlugin.setForeground(col);
panCenter.setBackground(col);
timer.start();
pack();
}
//~ Methods ----------------------------------------------------------------
@Override
public void show() {
// NOTE: This call can not be substituted by StaticSwingTools.showDialog(this) because
// show() method overwrites JDialog.show(). StaticSwingTools.showDialog() calls
// setVisible(true) which internally calls JDialog show() -> endless recursion if
// StaticSwingTools.showDialog() is called here
super.show();
this.navigatorLoader.invoke(null);
}
/**
* This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The
* content of this method is always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
panCenter = new javax.swing.JPanel();
logoLabel = new javax.swing.JLabel();
panProgress = new javax.swing.JPanel();
progressBar = new javax.swing.JProgressBar();
progressBarPlugin = new javax.swing.JProgressBar();
panConnection = new javax.swing.JPanel();
panButtons = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
btnApply = new javax.swing.JButton();
panProxy = new javax.swing.JPanel();
addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosing(final java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
panCenter.setLayout(new java.awt.BorderLayout());
logoLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
logoLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
logoLabel.setVerifyInputWhenFocusTarget(false);
panCenter.add(logoLabel, java.awt.BorderLayout.CENTER);
panProgress.setLayout(new java.awt.BorderLayout());
progressBar.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
progressBar.setBorderPainted(false);
progressBar.setDoubleBuffered(true);
progressBar.setFocusable(false);
progressBar.setStringPainted(true);
progressBar.setVerifyInputWhenFocusTarget(false);
panProgress.add(progressBar, java.awt.BorderLayout.NORTH);
progressBarPlugin.setMaximum(1000);
progressBarPlugin.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
progressBarPlugin.setBorderPainted(false);
progressBarPlugin.setDoubleBuffered(true);
progressBarPlugin.setFocusable(false);
progressBarPlugin.setString(org.openide.util.NbBundle.getMessage(
NavigatorSplashScreen.class,
"NavigatorSplashSceen.progressBarPlugin.string")); // NOI18N
progressBarPlugin.setStringPainted(true);
progressBarPlugin.setVerifyInputWhenFocusTarget(false);
panProgress.add(progressBarPlugin, java.awt.BorderLayout.SOUTH);
panCenter.add(panProgress, java.awt.BorderLayout.PAGE_END);
getContentPane().add(panCenter, java.awt.BorderLayout.CENTER);
panConnection.setLayout(new java.awt.BorderLayout());
jButton1.setText("Abbrechen");
jButton1.setPreferredSize(new java.awt.Dimension(100, 29));
jButton1.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(final java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
panButtons.add(jButton1);
btnApply.setText("Anwenden");
btnApply.setPreferredSize(new java.awt.Dimension(100, 29));
panButtons.add(btnApply);
panConnection.add(panButtons, java.awt.BorderLayout.SOUTH);
panConnection.add(panProxy, java.awt.BorderLayout.CENTER);
getContentPane().add(panConnection, java.awt.BorderLayout.EAST);
pack();
} // </editor-fold>//GEN-END:initComponents
/**
* Exit the Application.
*
* @param evt DOCUMENT ME!
*/
private void exitForm(final java.awt.event.WindowEvent evt) //GEN-FIRST:event_exitForm
{
System.exit(0);
} //GEN-LAST:event_exitForm
/**
* DOCUMENT ME!
*
* @param evt DOCUMENT ME!
*/
private void jButton1ActionPerformed(final java.awt.event.ActionEvent evt) { //GEN-FIRST:event_jButton1ActionPerformed
System.exit(0);
} //GEN-LAST:event_jButton1ActionPerformed
/**
* Sets the ProxyOption panel by adding it at the CENTER position of the panConnection.
*
* @param panProxyOptions DOCUMENT ME!
*/
public void setProxyOptionsPanel(final JPanel panProxyOptions) {
panConnection.add(panProxyOptions, BorderLayout.CENTER);
}
/**
* Adds an ActionListner to the "Apply"-button of the ProxyOptions panel.
*
* @param al DOCUMENT ME!
*/
public void addApplyButtonActionListener(final ActionListener al) {
btnApply.addActionListener(al);
}
/**
* Shows or hides the ProxyOptions panel.
*
* @param isVisible DOCUMENT ME!
*/
public void setProxyOptionsVisible(final boolean isVisible) {
panConnection.setVisible(isVisible);
panConnection.validate();
pack();
}
/**
* Returns if the ProxyOptions panel is visible or not.
*
* @return true if ProxyOptions panel is visible, else false
*/
public boolean isProxyOptionsVisible() {
return panConnection.isVisible();
}
//~ Inner Classes ----------------------------------------------------------
/**
* DOCUMENT ME!
*
* @version $Revision$, $Date$
*/
private final class ProgressListener implements PropertyChangeListener {
//~ Instance fields ----------------------------------------------------
ProgressObserver observer;
JProgressBar bar;
//~ Constructors -------------------------------------------------------
/**
* Creates a new ProgressListener object.
*
* @param observer DOCUMENT ME!
* @param bar DOCUMENT ME!
*/
public ProgressListener(final ProgressObserver observer, final JProgressBar bar) {
this.observer = observer;
this.bar = bar;
}
//~ Methods ------------------------------------------------------------
@Override
public void propertyChange(final PropertyChangeEvent evt) {
bar.setValue(progressObserver.getPercentage());
bar.setString(progressObserver.getMessage());
bar.repaint();
if (observer.isInterrupted() || observer.isFinished()) {
timer.stop();
timer = null;
dispose();
}
}
}
/**
* DOCUMENT ME!
*
* @version $Revision$, $Date$
*/
private final class NavigatorLoader extends MultithreadedMethod {
//~ Constructors -------------------------------------------------------
/**
* Creates a new NavigatorLoader object.
*
* @param progressObserver DOCUMENT ME!
*/
private NavigatorLoader(final ProgressObserver progressObserver) {
super(progressObserver);
}
//~ Methods ------------------------------------------------------------
@Override
protected void doInvoke() {
final Thread t = new Thread() {
@Override
public void run() {
try {
if (logger.isInfoEnabled()) {
logger.info("creating navigator instance"); // NOI18N
}
final Navigator navigator = new Navigator(
NavigatorLoader.this.progressObserver,
NavigatorSplashScreen.this);
if (logger.isInfoEnabled()) {
logger.info("new navigator instance created"); // NOI18N
}
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
navigator.setVisible(true);
}
});
} catch (Throwable t) {
logger.fatal("could not create navigator instance", t); // NOI18N
ExceptionManager.getManager()
.showExceptionDialog(
ExceptionManager.FATAL,
org.openide.util.NbBundle.getMessage(
NavigatorSplashScreen.class,
"NavigatorSplashScreen.NavigatorLoader.doInvoke().ExceptionManager_anon.name"), // NOI18N
org.openide.util.NbBundle.getMessage(
NavigatorSplashScreen.class,
"NavigatorSplashScreen.NavigatorLoader.doInvoke().ExceptionManager_anon.message"), // NOI18N
t);
System.exit(1);
}
}
};
CismetThreadPool.execute(t);
}
}
/**
* DOCUMENT ME!
*
* @version $Revision$, $Date$
*/
private class TimerListener implements ActionListener {
//~ Methods ------------------------------------------------------------
@Override
public void actionPerformed(final ActionEvent evt) {
// plugin progress
final ProgressObserver pluginPogressObserver = progressObserver.getSubProgressObserver();
if (pluginPogressObserver != null) {
// pluginBorder.setTitle(pluginPogressObserver.getName());
if (!progressBarPlugin.isVisible()) {
progressBarPlugin.setVisible(true);
pack();
}
progressBarPlugin.setValue(pluginPogressObserver.getProgress());
String msg = ""; // NOI18N
if (pluginPogressObserver.getMessage() != null) {
msg = pluginPogressObserver.getMessage();
}
progressBarPlugin.setString(msg);
// progressBarPlugin.setValue(pluginPogressObserver.getMessage());
}
repaint();
if (progressObserver.isFinished()) {
timer.stop();
timer = null;
repaint();
}
/*}
* catch (Throwable t) { t.printStackTrace(); //progressBar.setValue(navigatorLoader.max);
* statusLabel.setText(navigatorLoader.errorMessage); restartButton.setEnabled(true);
* cancelButton.setEnabled(false); Toolkit.getDefaultToolkit().beep(); navigator = null; timer.stop();
* repaint();}*/
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
be728fd3d96001deb5ef3698535257ce46612563 | 1c40b7839027cf2ef11826a31d65e6fea18c0b38 | /testframewok/src/main/java/jet/opengl/demos/nvidia/hbaoplus/GFSDK_SSAO_DepthStorage.java | bfd61123640c788e7533fb71118c6e2de1a288ca | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mzhg/PostProcessingWork | 5370d37597015a178aef8cb631cc2925e4dde71e | fbc0f2a4693995102f623bf5b7643c15d7309f9a | refs/heads/master | 2022-10-21T04:32:24.792131 | 2022-10-06T06:37:31 | 2022-10-06T06:37:31 | 86,224,204 | 17 | 8 | null | null | null | null | UTF-8 | Java | false | false | 264 | java | package jet.opengl.demos.nvidia.hbaoplus;
public enum GFSDK_SSAO_DepthStorage {
/** Store the internal view depths in FP16 (recommended) */
GFSDK_SSAO_FP16_VIEW_DEPTHS,
/** Store the internal view depths in FP32 (slower) */
GFSDK_SSAO_FP32_VIEW_DEPTHS,
}
| [
"mzhg001@sina.com"
] | mzhg001@sina.com |
94c3caf44452e818ec9e8ac172874fc7d8658757 | cb33a9d06a786497c68d58ee3b80a11cb96539e4 | /src/test/java/com/gargoylesoftware/htmlunit/libraries/MooTools121Test.java | fe05addee4b6c8991b65df4f1b19d4e1309f7ba5 | [
"Apache-2.0"
] | permissive | JavaQualitasCorpus/htmlunit-2.8 | b449acb9b22a63be88875e274e0455c09d0a937e | 2c5223910e0495a13981d726778b852910de1879 | refs/heads/master | 2023-08-28T19:42:08.117581 | 2020-06-02T17:45:00 | 2020-06-02T17:45:00 | 167,004,766 | 0 | 0 | NOASSERTION | 2022-07-07T23:09:48 | 2019-01-22T14:07:33 | JavaScript | UTF-8 | Java | false | false | 3,131 | java | /*
* Copyright (c) 2002-2010 Gargoyle Software Inc.
*
* 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.gargoylesoftware.htmlunit.libraries;
import static org.junit.Assert.assertNotNull;
import java.io.File;
import java.net.URL;
import java.util.List;
import junit.framework.AssertionFailedError;
import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.gargoylesoftware.htmlunit.BrowserRunner;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.WebTestCase;
import com.gargoylesoftware.htmlunit.BrowserRunner.Tries;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
/**
* Tests for compatibility with version 1.2.1 of the <a href="http://mootools.net/">MooTools JavaScript library</a>.
*
* @version $Revision: 5684 $
* @author Daniel Gredler
*/
@RunWith(BrowserRunner.class)
public class MooTools121Test extends WebTestCase {
private WebClient client_;
/**
* @throws Exception if an error occurs
*/
@Test
@Tries(3)
@SuppressWarnings("unchecked")
public void mooTools() throws Exception {
final String resource = "libraries/mootools/1.2.1/Specs/index.html";
final URL url = getClass().getClassLoader().getResource(resource);
assertNotNull(url);
client_ = getWebClient();
final HtmlPage page = client_.getPage(url);
final HtmlElement progress = page.getElementById("progress");
client_.waitForBackgroundJavaScriptStartingBefore(2000 * 100);
final String prevProgress = progress.asText();
FileUtils.writeStringToFile(new File("/tmp/mootols.html"), page.asXml());
final String xpath = "//ul[@class='specs']/li[@class!='success']";
final List<HtmlElement> failures = (List<HtmlElement>) page.getByXPath(xpath);
if (!failures.isEmpty()) {
final StringBuilder sb = new StringBuilder();
for (HtmlElement failure : failures) {
sb.append(failure.asXml()).append("\n\n");
}
throw new AssertionFailedError(sb.toString());
}
assertEquals("364", page.getElementById("total_examples").asText());
assertEquals("0", page.getElementById("total_failures").asText());
assertEquals("0", page.getElementById("total_errors").asText());
assertEquals("100", prevProgress);
}
/**
* Performs post-test deconstruction.
*/
@After
public void tearDown() {
client_.closeAllWindows();
}
}
| [
"taibi@sonar-scheduler.rd.tut.fi"
] | taibi@sonar-scheduler.rd.tut.fi |
3e48a56088d996b08dc14c78d4d7ce788ad1b085 | 7a688352f155780296105df2dd86502c325623ca | /brand_feign/src/main/java/com/jgix/BrandFeignApp.java | 7aba0e8899669a21f42dcc8d934fe1f9ab2127ed | [] | no_license | jungexi/shop_cloud | 1c23030e34240c1195006cb1e2a6f49cef210b93 | 6805b5601801f8d752f9558f86a94d9a0bf4fbae | refs/heads/master | 2023-03-13T04:33:33.660571 | 2021-03-04T03:54:37 | 2021-03-04T03:54:37 | 344,342,860 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,417 | java | package com.jgix;
import com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsStreamServlet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
/**
* Hello world!
*
*/
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients//声明fegin
@EnableHystrix //声明hystrix
@EnableCircuitBreaker
public class BrandFeignApp
{
public static void main( String[] args )
{
SpringApplication.run(BrandFeignApp.class,args);
}
/* 提供监控平台的路径*/
@Bean
public ServletRegistrationBean getServlet() {
HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
registrationBean.setLoadOnStartup(1);
registrationBean.addUrlMappings("/hystrix.stream");
registrationBean.setName("HystrixMetricsStreamServlet");
return registrationBean;
}
}
| [
"806114896@qq.com"
] | 806114896@qq.com |
434a2f0c4bed07b1781503597267bfc1c67148de | 2ce5d25f866d937fa1e6cf4f7d13fc984ad39693 | /src/org/tilegames/hexicube/pokeclone/pokemonmoves/PokemonMove045RainDance.java | 780b0d9fe9782fe1f54e629ff079efa47db96a87 | [] | no_license | Daft-Freak/PokeClone | d8bca07c5a53c9e9eba3a9724c5d48e9d50959a0 | 244c61bf44c2209c081871f91a6dea3220295d5a | refs/heads/master | 2021-01-17T23:28:11.273573 | 2013-02-06T17:12:57 | 2013-02-06T17:12:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,508 | java | package org.tilegames.hexicube.pokeclone.pokemonmoves;
import org.tilegames.pokeclone.pokemon.PokemonMonster;
import org.tilegames.pokeclone.pokemon.PokemonMonsterType;
import bot.pokemon.PokemonBattle;
public class PokemonMove045RainDance extends PokemonMove
{
public PokemonMove045RainDance()
{
super(45);
}
@Override
public String getName()
{
return "Rain Dance";
}
@Override
public PokemonMonsterType getDamageType()
{
return PokemonMonsterType.water;
}
@Override
public PokemonMoveType getMoveType()
{
return PokemonMoveType.other;
}
@Override
public int movePower()
{
return 0;
}
@Override
public int moveAccuracy()
{
return 0;
}
@Override
public int moveMaxUses()
{
return 5;
}
@Override
public boolean moveDamaging()
{
return false;
}
@Override
public int getMovePriority()
{
return 0;
}
@Override
public boolean highCrit()
{
return false;
}
@Override
public int performMove(PokemonMonster source, PokemonMonster target,
int repeatCount, boolean wentFirst, PokemonMove opponentMove,
PokemonBattle battle) {
int a = 0; //TODO: weather
battle.tellTrainers("Nothing happened, probably because there's no weather yet...");
battle.tellTrainers("Maybe you should pester Hexicube about it!");
return 0;
}
@Override
public String info()
{
return "The user summons a heavy rain that falls for five turns, powering up Water-type moves.";
}
@Override
public PokemonMove copy()
{
return new PokemonMove045RainDance();
}
} | [
"hexicube@tilegames.org"
] | hexicube@tilegames.org |
43023cc1938f5a5ffe49bf7aa89190ffa41fb1c7 | 2a0b2b386e96257b7a969521ebbb62ea22517726 | /src/Client.java | 46d62c92f2f85935c017ee30c2e049c6844da88d | [] | no_license | VladSafronov/socket-app | fb36900cc11c03236c9f3b32414c1e8ed159ad9c | e5f6687e7534ec7bb1a4a48bf717ebfada9db640 | refs/heads/master | 2021-05-06T12:57:03.979956 | 2017-12-05T16:16:25 | 2017-12-05T16:16:25 | 113,204,815 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,153 | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Scanner;
/**
* Created by vladsafronov on 5.12.17.
*/
public class Client
{
public static void main( String[] args )
{
String hostName = "localhost";
int portNumber = 8000;
Scanner scan = new Scanner(System.in);
try(
Socket socket = new Socket( hostName,portNumber );
PrintWriter out = new PrintWriter( socket.getOutputStream(),true );
BufferedReader in = new BufferedReader( new InputStreamReader( socket.getInputStream() ) )
) {
out.println("Hello server, I am client");
System.out.println(in.readLine());
String userInput;
System.out.println("Please input smt:");
while((userInput = scan.nextLine()) != null) {
out.println(userInput);
System.out.println(in.readLine());
}
} catch( UnknownHostException e ) {
e.printStackTrace();
} catch( IOException e ) {
e.printStackTrace();
}
}
}
| [
"Uladzislau.Safronau@ihg.com"
] | Uladzislau.Safronau@ihg.com |
ea5370b2b101753d845902a846bf64a34794d817 | 532caec66582913133aefe7e60bb959e5f3073ba | /app/src/main/java/br/ufc/quixada/backontrackservertest/model/Exercise.java | 33047cfaf9780ef75685bbf5f66b853e2515b422 | [] | no_license | SamuelIGT/BackOnTrackServerTest | a79cc3640831207acb47bb9b78e3e48f549ebd3a | 05e877a067a87ea01571ff1ce2e401a5d3abf0f4 | refs/heads/master | 2021-08-26T07:27:17.520876 | 2017-11-22T07:42:22 | 2017-11-22T07:42:22 | 111,651,708 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,102 | java | package br.ufc.quixada.backontrackservertest.model;
/**
* Created by samue on 22/11/2017.
*/
import java.util.List;
public class Exercise {
private int id;
private String title;
private String description;
private Midia midia;
private List<Object> objects;
public Exercise(){
}
public Exercise(String title){
this.title = title;
}
public Integer getId() {
return id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public void setId(int id) {
this.id = id;
}
public Midia getMidia() {
return midia;
}
public void setMidia(Midia midia) {
this.midia = midia;
}
public List<Object> getObjects() {
return objects;
}
public void setObjects(List<Object> objects) {
this.objects = objects;
}
} | [
"samuel.br.igt@gmail.com"
] | samuel.br.igt@gmail.com |
b600ed00b90337f728d4038bac9eaa4f791f47b5 | 13f9df50bb91ee95ca1b77f4599b90439aec8702 | /src/HomeWork7/Task2.java | bd39355ae4bbc46ea628092e948ee89d70ec11b0 | [] | no_license | KlymyshynAndrii/headtail | 5b71391d1cefe9d87cb3ed047d70d99bb3f290ed | aa0214f71978880f9043f4c36e6fef8824a25ed5 | refs/heads/master | 2023-07-28T01:52:25.414496 | 2021-09-14T00:10:45 | 2021-09-14T00:10:45 | 405,801,848 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 981 | java | package HomeWork7;
import java.util.Scanner;
public class Task2 {
public static void main(String[] args) {
/*
Using a scanner ask the user to provide starting and ending numbers.
Print the numbers divisible by 3 and 5 between given number AND print count of those numbers
which is divisible by 3 and 5.
EXAMPLE:
First number: 5
Second number: 65
Output:
15
30
45
60
Total number that divisible by 3 and 5 is 4.
*/
Scanner in=new Scanner(System.in);
System.out.println("Please enter a starting number");
int a= in.nextInt();
System.out.println("Please enter an ending number");
int b = in.nextInt();
int count=0;
while (a<=b ){
if (a%3==0 && a%5==0){
System.out.println(a);
count++;
}
a++;
}
System.out.println("Total number that divisible by 3 and 5 is "+count);
}
}
| [
"andklymyshyn@gmail.com"
] | andklymyshyn@gmail.com |
db27ab4a8474faae4230049b2262aacc68bb6edc | 6303a1cbe401c055e3da37d281df477e8e68f1b2 | /app/src/main/java/me/exerosis/nanodegree/movies/implementation/view/movies/container/MoviesContainerView.java | 2f85ef50ed04399723044656348909824e466c75 | [] | no_license | Exerosis/Movies | 9ed46a0a09ef20ba31481ccf9514737922c68612 | 61262eb94198bc0e3be9838642d27aaec57f56dc | refs/heads/master | 2021-06-30T08:17:20.443458 | 2017-09-20T05:49:32 | 2017-09-20T05:49:32 | 68,122,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 932 | java | package me.exerosis.nanodegree.movies.implementation.view.movies.container;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import me.exerosis.nanodegree.movies.R;
import me.exerosis.nanodegree.movies.databinding.AppScaffoldingViewBinding;
import me.exerosis.nanodegree.movies.mvc.Container;
public class MoviesContainerView implements Container {
private final AppScaffoldingViewBinding binding;
public MoviesContainerView(AppCompatActivity activity) {
binding = DataBindingUtil.setContentView(activity, R.layout.app_scaffolding_view);
}
@Override
public int getContainerID() {
return binding.appScaffoldingContainer.getId();
}
@Override
public View getRoot() {
return binding.getRoot();
}
@Override
public Bundle getViewState() {
return null;
}
} | [
"theexerosisgaming@gmail.com"
] | theexerosisgaming@gmail.com |
1ddbf00604af4bd3ede98200e9137623a3415e9f | 8a4f815a705fb018f4f108aa7d6050ae9faaab0e | /app/src/main/java/kz/qazapp/myatek/DB/DBHelper.java | 5347fa69a58196bce07ec4e95663fbd4ba4026b9 | [] | no_license | Zangar9805/MyAtek | da383eae972e32967fab3205d68839d50b5ac642 | d007c6076b866feacb4872852464c5132ac4384f | refs/heads/master | 2020-05-31T23:54:27.444107 | 2019-06-06T08:46:57 | 2019-06-06T08:46:57 | 190,546,809 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,973 | java | package kz.qazapp.myatek.DB;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DBHelper extends SQLiteOpenHelper {
public static final int DB_VER = 1;
public static final String DB_NAME = "Sheds";
public static final String TABLE_NAME = "Shed";
public static final String ID = "_id";
public static final String DAY = "days";
public static final String SUB1 = "sub1";
public static final String SUB1TEACH = "sub1teach";
public static final String SUB1LEC = "sub1lec";
public static final String SUB2 = "sub2";
public static final String SUB2TEACH = "sub2teach";
public static final String SUB2LEC = "sub2lec";
public static final String SUB3 = "sub3";
public static final String SUB3TEACH = "sub3teach";
public static final String SUB3LEC = "sub3lec";
public static final String SUB4 = "sub4";
public static final String SUB4TEACH = "sub4teach";
public static final String SUB4LEC = "sub4lec";
public DBHelper(Context context) {
super(context, DB_NAME, null, DB_VER);
}
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
sqLiteDatabase.execSQL("create table "+TABLE_NAME+" ("+
ID+" integer primary key,"+
DAY+" text,"+
SUB1+" text,"+
SUB1TEACH+" text,"+
SUB1LEC+" text,"+
SUB2+" text,"+
SUB2TEACH+" text,"+
SUB2LEC+" text,"+
SUB3+" text,"+
SUB3TEACH+" text,"+
SUB3LEC+" text,"+
SUB4+" text,"+
SUB4TEACH+" text,"+
SUB4LEC+" text"+")");
}
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
sqLiteDatabase.execSQL("drop table if exists "+TABLE_NAME);
onCreate(sqLiteDatabase);
}
}
| [
"zangar9805@gmail.com"
] | zangar9805@gmail.com |
5ae975981cb5374cc4d138c65c8f1f4d97cbac49 | 6d9117d81dd4d590c4871828e9776a031119c63f | /java/test/se/saidaspen/aoc2019/day13/Day13Test.java | e6d8b586c9f5a2addb605aa9d5052c6cc60625ca | [
"MIT"
] | permissive | saidaspen/aoc2019 | 031f38971f6e33793361bb82d6910662e49cddac | 7fadd4855fb27a63ff1e829ff0164146afe67029 | refs/heads/master | 2020-09-21T07:20:06.314283 | 2020-01-05T06:03:59 | 2020-01-05T06:03:59 | 224,721,553 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 463 | java | package se.saidaspen.aoc2019.day13;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static se.saidaspen.aoc2019.AocUtil.input;
public final class Day13Test {
@Test
public void part1() throws IOException {
assertEquals("205", new Day13(input(13)).part1());
}
@Test
public void part2() throws IOException {
assertEquals("10292", new Day13(input(13)).part2());
}
}
| [
"mail@saidaspen.se"
] | mail@saidaspen.se |
09f18c02c172a30eb4da9640801810c1e9cf95b3 | e226c665359ecf6c41180af271d16da45bfef6d0 | /GoodDogTestDrive.java | b138478da51db08cf01281c53bf88e610f6fd017 | [] | no_license | Aray26/Python_Code | aa69eb3dd1cc3abdffe7694b9f6277edd33663a3 | 9fc2b0e045333ec7050770c7e5b22b530993ccd6 | refs/heads/master | 2020-05-21T23:27:41.886361 | 2017-06-07T20:46:25 | 2017-06-07T20:46:25 | 55,926,278 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 645 | java | public class GoodDogTestDrive
{
public static void main(String[] args)
{
GoodDog doggie = new GoodDog();
System.out.println("doogie.getSize = " + doggie.getSize());
doggie.setSize(100);
System.out.println("doogie.getSize is now = " + doggie.getSize());
GoodDog doggie2 = new GoodDog();
System.out.println("doogie2.getSize = " + doggie2.getSize());
doggie2.setSize(50);
System.out.println("doogie2.getSize is now = " + doggie2.getSize());
System.out.print("doogie.bark() ");
doggie.bark();
System.out.print("doogie2.bark() ");
doggie2.bark();
}
} | [
"noreply@github.com"
] | noreply@github.com |
cc6ba488126c709834f2f1544fb7041f81c9937e | 4f41632a2fd9844de08a3114141d982f50eeffff | /src/main/java/com/pinwheel/gofast/service/SimpleVerificationTokenService.java | de1a35fde80af32f4ac7266f4385154b04e91500 | [] | no_license | allofapiece/gofast | 895ea26a370d08ab1750e5b275ce10432142a6e1 | 825acff77b28ee4b5133f632263737ef9932f6e1 | refs/heads/master | 2022-12-13T11:28:52.076855 | 2020-04-28T18:20:15 | 2020-04-28T18:20:15 | 223,808,702 | 0 | 0 | null | 2022-12-11T14:41:43 | 2019-11-24T20:54:17 | Java | UTF-8 | Java | false | false | 2,785 | java | package com.pinwheel.gofast.service;
import com.pinwheel.gofast.entity.User;
import com.pinwheel.gofast.entity.VerificationToken;
import com.pinwheel.gofast.repository.VerificationTokenRepository;
import com.pinwheel.gofast.util.DateUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.Calendar;
import java.util.Date;
import java.util.UUID;
/**
* Simple verification token service. Contains maintain logic for {@link VerificationToken} entity. Implements
* {@link VerificationTokenService} interface.
*
* @version 1.0.0
*/
@RequiredArgsConstructor
@Service
public class SimpleVerificationTokenService implements VerificationTokenService {
/**
* Life time of the verification token in minutes.
*/
@Value("#{new Integer('${application.token.verification.expiration}')}")
private int expiration;
/**
* Injection of {@link VerificationTokenRepository} bean.
*/
private final VerificationTokenRepository verificationTokenRepository;
/**
* {@inheritDoc}
*/
public VerificationToken create(User user) {
return create(user, generate());
}
/**
* {@inheritDoc}
*/
@Override
public VerificationToken create(User user, String token) {
user.getVerificationTokens().forEach(verificationToken -> {
verificationToken.setExpire(new Date());
verificationTokenRepository.save(verificationToken);
});
final VerificationToken verificationToken = VerificationToken.builder()
.user(user)
.token(token)
.expire(DateUtils.expire(this.expiration))
.build();
user.addVerificationToken(verificationToken);
return verificationTokenRepository.save(verificationToken);
}
/**
* {@inheritDoc}
*/
@Override
public String generate() {
return UUID.randomUUID().toString();
}
/**
* {@inheritDoc}
*/
@Override
public boolean isExpired(VerificationToken verificationToken) {
if (verificationToken == null) {
return true;
}
final Calendar cal = Calendar.getInstance();
return (verificationToken.getExpire().getTime() - cal.getTime().getTime()) <= 0;
}
/**
* {@inheritDoc}
*/
@Override
public void reject(VerificationToken verificationToken) {
verificationToken.setExpire(new Date());
verificationTokenRepository.save(verificationToken);
}
/**
* {@inheritDoc}
*/
@Override
public VerificationToken findByToken(String token) {
return verificationTokenRepository.findByToken(token);
}
}
| [
"stasana1998@gmail.com"
] | stasana1998@gmail.com |
ad3798e1939215cb57e058d62a2bc5153b188066 | 21e2db7e9ae516cc2d0c755d0132fe054b6c7622 | /weather/app/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/androidx/core/R.java | 58619096d981821b87b62d25f077d24c98d08d4b | [] | no_license | zhengzekun/coolweather | e9b3cb7fea1fa3025f4f9a7ad847daeda243d184 | e6fda4ec0a0906625dca6fa9eda054a43598ecb9 | refs/heads/master | 2020-07-01T04:49:29.687777 | 2019-08-09T05:41:21 | 2019-08-09T05:41:21 | 201,052,945 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,627 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package androidx.core;
public final class R {
private R() {}
public static final class attr {
private attr() {}
public static final int alpha = 0x7f020027;
public static final int font = 0x7f02007a;
public static final int fontProviderAuthority = 0x7f02007c;
public static final int fontProviderCerts = 0x7f02007d;
public static final int fontProviderFetchStrategy = 0x7f02007e;
public static final int fontProviderFetchTimeout = 0x7f02007f;
public static final int fontProviderPackage = 0x7f020080;
public static final int fontProviderQuery = 0x7f020081;
public static final int fontStyle = 0x7f020082;
public static final int fontVariationSettings = 0x7f020083;
public static final int fontWeight = 0x7f020084;
public static final int ttcIndex = 0x7f02013c;
}
public static final class color {
private color() {}
public static final int notification_action_color_filter = 0x7f04003f;
public static final int notification_icon_bg_color = 0x7f040040;
public static final int ripple_material_light = 0x7f04004a;
public static final int secondary_text_default_material_light = 0x7f04004c;
}
public static final class dimen {
private dimen() {}
public static final int compat_button_inset_horizontal_material = 0x7f05004b;
public static final int compat_button_inset_vertical_material = 0x7f05004c;
public static final int compat_button_padding_horizontal_material = 0x7f05004d;
public static final int compat_button_padding_vertical_material = 0x7f05004e;
public static final int compat_control_corner_material = 0x7f05004f;
public static final int compat_notification_large_icon_max_height = 0x7f050050;
public static final int compat_notification_large_icon_max_width = 0x7f050051;
public static final int notification_action_icon_size = 0x7f05005b;
public static final int notification_action_text_size = 0x7f05005c;
public static final int notification_big_circle_margin = 0x7f05005d;
public static final int notification_content_margin_start = 0x7f05005e;
public static final int notification_large_icon_height = 0x7f05005f;
public static final int notification_large_icon_width = 0x7f050060;
public static final int notification_main_column_padding_top = 0x7f050061;
public static final int notification_media_narrow_margin = 0x7f050062;
public static final int notification_right_icon_size = 0x7f050063;
public static final int notification_right_side_padding_top = 0x7f050064;
public static final int notification_small_icon_background_padding = 0x7f050065;
public static final int notification_small_icon_size_as_large = 0x7f050066;
public static final int notification_subtext_size = 0x7f050067;
public static final int notification_top_pad = 0x7f050068;
public static final int notification_top_pad_large_text = 0x7f050069;
}
public static final class drawable {
private drawable() {}
public static final int notification_action_background = 0x7f060058;
public static final int notification_bg = 0x7f060059;
public static final int notification_bg_low = 0x7f06005a;
public static final int notification_bg_low_normal = 0x7f06005b;
public static final int notification_bg_low_pressed = 0x7f06005c;
public static final int notification_bg_normal = 0x7f06005d;
public static final int notification_bg_normal_pressed = 0x7f06005e;
public static final int notification_icon_background = 0x7f06005f;
public static final int notification_template_icon_bg = 0x7f060060;
public static final int notification_template_icon_low_bg = 0x7f060061;
public static final int notification_tile_bg = 0x7f060062;
public static final int notify_panel_notification_icon_bg = 0x7f060063;
}
public static final class id {
private id() {}
public static final int action_container = 0x7f07000d;
public static final int action_divider = 0x7f07000f;
public static final int action_image = 0x7f070010;
public static final int action_text = 0x7f070016;
public static final int actions = 0x7f070017;
public static final int async = 0x7f07001e;
public static final int blocking = 0x7f070022;
public static final int chronometer = 0x7f07002c;
public static final int forever = 0x7f070044;
public static final int icon = 0x7f07004a;
public static final int icon_group = 0x7f07004b;
public static final int info = 0x7f07004e;
public static final int italic = 0x7f070051;
public static final int line1 = 0x7f070053;
public static final int line3 = 0x7f070054;
public static final int normal = 0x7f07005f;
public static final int notification_background = 0x7f070060;
public static final int notification_main_column = 0x7f070061;
public static final int notification_main_column_container = 0x7f070062;
public static final int right_icon = 0x7f07006c;
public static final int right_side = 0x7f07006d;
public static final int tag_transition_group = 0x7f07008e;
public static final int tag_unhandled_key_event_manager = 0x7f07008f;
public static final int tag_unhandled_key_listeners = 0x7f070090;
public static final int text = 0x7f070091;
public static final int text2 = 0x7f070092;
public static final int time = 0x7f070095;
public static final int title = 0x7f070096;
}
public static final class integer {
private integer() {}
public static final int status_bar_notification_info_maxnum = 0x7f080004;
}
public static final class layout {
private layout() {}
public static final int notification_action = 0x7f090022;
public static final int notification_action_tombstone = 0x7f090023;
public static final int notification_template_custom_big = 0x7f090024;
public static final int notification_template_icon_group = 0x7f090025;
public static final int notification_template_part_chronometer = 0x7f090026;
public static final int notification_template_part_time = 0x7f090027;
}
public static final class string {
private string() {}
public static final int status_bar_notification_info_overflow = 0x7f0b0029;
}
public static final class style {
private style() {}
public static final int TextAppearance_Compat_Notification = 0x7f0c00ec;
public static final int TextAppearance_Compat_Notification_Info = 0x7f0c00ed;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0c00ee;
public static final int TextAppearance_Compat_Notification_Time = 0x7f0c00ef;
public static final int TextAppearance_Compat_Notification_Title = 0x7f0c00f0;
public static final int Widget_Compat_NotificationActionContainer = 0x7f0c0158;
public static final int Widget_Compat_NotificationActionText = 0x7f0c0159;
}
public static final class styleable {
private styleable() {}
public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f020027 };
public static final int ColorStateListItem_android_color = 0;
public static final int ColorStateListItem_android_alpha = 1;
public static final int ColorStateListItem_alpha = 2;
public static final int[] FontFamily = { 0x7f02007c, 0x7f02007d, 0x7f02007e, 0x7f02007f, 0x7f020080, 0x7f020081 };
public static final int FontFamily_fontProviderAuthority = 0;
public static final int FontFamily_fontProviderCerts = 1;
public static final int FontFamily_fontProviderFetchStrategy = 2;
public static final int FontFamily_fontProviderFetchTimeout = 3;
public static final int FontFamily_fontProviderPackage = 4;
public static final int FontFamily_fontProviderQuery = 5;
public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f02007a, 0x7f020082, 0x7f020083, 0x7f020084, 0x7f02013c };
public static final int FontFamilyFont_android_font = 0;
public static final int FontFamilyFont_android_fontWeight = 1;
public static final int FontFamilyFont_android_fontStyle = 2;
public static final int FontFamilyFont_android_ttcIndex = 3;
public static final int FontFamilyFont_android_fontVariationSettings = 4;
public static final int FontFamilyFont_font = 5;
public static final int FontFamilyFont_fontStyle = 6;
public static final int FontFamilyFont_fontVariationSettings = 7;
public static final int FontFamilyFont_fontWeight = 8;
public static final int FontFamilyFont_ttcIndex = 9;
public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 };
public static final int GradientColor_android_startColor = 0;
public static final int GradientColor_android_endColor = 1;
public static final int GradientColor_android_type = 2;
public static final int GradientColor_android_centerX = 3;
public static final int GradientColor_android_centerY = 4;
public static final int GradientColor_android_gradientRadius = 5;
public static final int GradientColor_android_tileMode = 6;
public static final int GradientColor_android_centerColor = 7;
public static final int GradientColor_android_startX = 8;
public static final int GradientColor_android_startY = 9;
public static final int GradientColor_android_endX = 10;
public static final int GradientColor_android_endY = 11;
public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 };
public static final int GradientColorItem_android_color = 0;
public static final int GradientColorItem_android_offset = 1;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
7fce4ace17f4e75936b91ced5ac9bdbeae5e5fd9 | 5f6bcf17ea2ce27e5cfade2183cd6f5e05421813 | /TeamAceMVC_0801/src/filters/LoginFilter.java | 40ef3fa355b423131c71a5018f352d408bbe1103 | [] | no_license | Joy-byte/DA101G1 | 7458392127b5bbfb879863b309969308e3b7393d | 9a961dbad05569ca3660dbbeefe91e121a0315df | refs/heads/master | 2020-06-29T00:43:12.163435 | 2019-08-12T14:12:49 | 2019-08-12T14:12:49 | 200,388,455 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 951 | java | package filters;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class LoginFilter implements Filter {
private FilterConfig config;
public void init(FilterConfig config) {
this.config = config;
}
public void destroy() {
config = null;
}
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws ServletException, IOException {
HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse res = (HttpServletResponse) response;
// �i���o session�j
HttpSession session = req.getSession();
// �i�q session �P�_��user�O�_�n�J�L�j
Object account = session.getAttribute("memberVO");
if (account == null) {
session.setAttribute("location", req.getRequestURI());
res.sendRedirect(req.getContextPath() + "/front-end/member/login.jsp");
return;
} else {
chain.doFilter(request, response);
}
}
} | [
"53656451+Joy-byte@users.noreply.github.com"
] | 53656451+Joy-byte@users.noreply.github.com |
f5fbe408a7e022be155e2ca0e939b0165ae4fc98 | 656250610865d59f2cdb72bcf2c07a7cbf9d927e | /app/src/main/java/com/sven/huinews/international/entity/response/AliyunInfoResponse.java | 5df13116867ff205c003655b65e0153a09be3744 | [] | no_license | hechunjiang/we | 033f2f6c07b18846133e3c09ff74d5e47524547b | 3c7f16e38364287a1f4e74723a56981b418b333a | refs/heads/master | 2020-04-05T11:31:37.473553 | 2018-11-15T09:03:26 | 2018-11-15T09:03:26 | 156,838,166 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,341 | java | package com.sven.huinews.international.entity.response;
import com.sven.huinews.international.base.BaseResponse;
import java.io.Serializable;
public class AliyunInfoResponse extends BaseResponse implements Serializable {
/**
* data : {"RequestId":"E571CC8A-F9FA-4EF5-9F6A-DA3A034C88E1","AccessKeyId":"STS.NK4q3seyXdTFVqKpqZxLcASPq","AccessKeySecret":"4pqPvW1FVnATcNpNTJWFmDHomP6PhQJ1kaiBGwfLai2Y","Expiration":"2018-09-19T16:42:14Z","SecurityToken":"CAISrgJ1q6Ft5B2yfSjIr4iBOonHiKZ505atVFf6lHEPdMNPrpb7kzz2IHxKeXVgCekfsv4ylGlW6P4ZlqwsE8AaGxQ72nSNWdAFnzm6aq/t5uZThN5t0e9FcAr+Ihr/29CoVYedZdjBe/CrRknZnytou9XTfimjWFrXH//0l5lrPP8NUwCkYAdeANBfKjVjpMIdVwXPMvr/CBPkmGfLDHdwvg11hV1+5am4oLCC7RaMp0f3w/MYmpz1JZGoTsxlM5oFJLXT5uFtcbfb2yN98gVD8LwM7JZJ4jDapNqQcTIzilekS7OMqYU/d1MpP/hhQ/Uf/aLG+Kcm6rCJpePe0A1QOOxZaSPbSb27zdHMcOHTbYpnKOqray2UjorSZsCr7Vt/ex8HORhWIsrpybzh/8WuIxqAAQEE4wdsjEEBQezGrnGVaQoSTPXLPDE1SnbnCtFGDi9QPnLthlmk5hbn9bKk3sTCB9CpnVQUif2l4ZQhWBzfhjN08LPwUtl+FeTuszM+MEWIi3QCYHkfTiA9vUlI4fWKMCQwenF1WhxDdL1egXPZTMo3Y3ct1O065S8Ke//tzWRI"}
*/
private DataBean data;
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public static class DataBean implements Serializable {
/**
* RequestId : E571CC8A-F9FA-4EF5-9F6A-DA3A034C88E1
* AccessKeyId : STS.NK4q3seyXdTFVqKpqZxLcASPq
* AccessKeySecret : 4pqPvW1FVnATcNpNTJWFmDHomP6PhQJ1kaiBGwfLai2Y
* Expiration : 2018-09-19T16:42:14Z
* SecurityToken : CAISrgJ1q6Ft5B2yfSjIr4iBOonHiKZ505atVFf6lHEPdMNPrpb7kzz2IHxKeXVgCekfsv4ylGlW6P4ZlqwsE8AaGxQ72nSNWdAFnzm6aq/t5uZThN5t0e9FcAr+Ihr/29CoVYedZdjBe/CrRknZnytou9XTfimjWFrXH//0l5lrPP8NUwCkYAdeANBfKjVjpMIdVwXPMvr/CBPkmGfLDHdwvg11hV1+5am4oLCC7RaMp0f3w/MYmpz1JZGoTsxlM5oFJLXT5uFtcbfb2yN98gVD8LwM7JZJ4jDapNqQcTIzilekS7OMqYU/d1MpP/hhQ/Uf/aLG+Kcm6rCJpePe0A1QOOxZaSPbSb27zdHMcOHTbYpnKOqray2UjorSZsCr7Vt/ex8HORhWIsrpybzh/8WuIxqAAQEE4wdsjEEBQezGrnGVaQoSTPXLPDE1SnbnCtFGDi9QPnLthlmk5hbn9bKk3sTCB9CpnVQUif2l4ZQhWBzfhjN08LPwUtl+FeTuszM+MEWIi3QCYHkfTiA9vUlI4fWKMCQwenF1WhxDdL1egXPZTMo3Y3ct1O065S8Ke//tzWRI
*/
private String RequestId;
private String AccessKeyId;
private String AccessKeySecret;
private String Expiration;
private String SecurityToken;
public String getRequestId() {
return RequestId;
}
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
public String getAccessKeyId() {
return AccessKeyId;
}
public void setAccessKeyId(String AccessKeyId) {
this.AccessKeyId = AccessKeyId;
}
public String getAccessKeySecret() {
return AccessKeySecret;
}
public void setAccessKeySecret(String AccessKeySecret) {
this.AccessKeySecret = AccessKeySecret;
}
public String getExpiration() {
return Expiration;
}
public void setExpiration(String Expiration) {
this.Expiration = Expiration;
}
public String getSecurityToken() {
return SecurityToken;
}
public void setSecurityToken(String SecurityToken) {
this.SecurityToken = SecurityToken;
}
}
}
| [
"2654313873@qq.com"
] | 2654313873@qq.com |
3bac405d4f3693e4661f106ae78a8bc1eafbcb0a | 94745c1200e7bbdcfaa534f327cf64ebc0139c26 | /app/src/main/java/com/example/a21753725a/todo/MainActivity.java | 9d356e6d94a1e78813f227f76fc8f28a1e700c4d | [] | no_license | Osanchmo/TODOlist | b32aadcb57732b694214c103b1936b2eab35cde3 | 86332b2f4300d7735eda131eed5737a28a6b3377 | refs/heads/master | 2021-01-13T13:46:08.601976 | 2017-03-28T17:58:19 | 2017-03-28T17:58:19 | 79,249,233 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,405 | java | package com.example.a21753725a.todo;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"21753725a@iespoblenou.org"
] | 21753725a@iespoblenou.org |
ea0a2d2b1bd33ad8b8fef752f7a9a97b232b9713 | 771940a19978ce880d8d02cab4d4cb156462c400 | /src/ui/Connect4GUI.java | 6fe05f1cf85057044de2c908058c386a4a7907ac | [] | no_license | abegomez/Connect4 | 77325e9272f5647b9ee4d8ba29ee84b8302bbf4d | 120eb056fc1c9cd0b5bd11cc2d1e9568a203268e | refs/heads/master | 2020-07-22T12:07:49.411330 | 2019-09-30T15:42:42 | 2019-09-30T15:42:42 | 207,197,303 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,455 | java | package ui;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import core.Connect4;
import core.Connect4.GameBoard;
import core.Connect4.Player;
import core.Connect4ComputerPlayer;
import javafx.animation.PauseTransition;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.util.Callback;
import javafx.util.Duration;
import javafx.scene.Scene;
import javafx.scene.control.ButtonBar.ButtonData;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Dialog;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Line;
import javafx.scene.shape.Ellipse;
/**
* GUI for computer game
* @author Abraham Gomez
* @version 3.0
*/
public class Connect4GUI extends Application {
protected Player playerX;
protected Player playerO;
protected GameBoard gb;
protected Connect4 connect4;
private boolean play;
protected int compCol;
private Label lblStatus;
protected boolean isPlayerOpponent;
protected Player currPlayer;
protected Cell[][] cells = new Cell[6][7];
/**
* Entry for JavaFX
* Creates dialog alert to prompt user for a player or computer opponent. Sets up the game board.
*/
@Override
public void start(Stage primaryStage) throws Exception {
lblStatus = new Label("Click a column to place your token!");
Dialog<Boolean> dialog = new Dialog<>();
dialog.setTitle("Play against another player or against a computer?");
dialog.setResizable(true);
dialog.setHeaderText("Welcome to Connect4. Who is your opponent?");
ButtonType playerType = new ButtonType("Player", ButtonData.LEFT);
ButtonType computerType = new ButtonType("Computer", ButtonData.RIGHT);
dialog.getDialogPane().getButtonTypes().addAll(playerType,computerType);
dialog.setResultConverter(new Callback<ButtonType, Boolean>() {
@Override
public Boolean call(ButtonType b) {
return b == playerType;
}
});
Optional<Boolean> result = dialog.showAndWait();
initializeGame(result.get());
play = true;
GridPane pane = new GridPane();
BorderPane borderPane = new BorderPane();
borderPane.setCenter(pane);
borderPane.setBottom(lblStatus);
for (int i = 0; i < 6; i++)
for (int j = 0; j < 7; j++)
pane.add(cells[i][j] = new Cell(i,j), j, i);
Scene scene = new Scene(borderPane, 450, 385);
primaryStage.setTitle("Welcome to Connect4"); // Set the stage title
primaryStage.setScene(scene); // Place the scene in the stage
primaryStage.show(); // Display the stage
}
/**
* Initializes the game depending on if the opponent is a player or a computer
* Changes the names accordingly.
*
* @param playerOpponent boolean if the opponent is a player
*/
protected void initializeGame(boolean playerOpponent) {
connect4 = new Connect4();
playerX = connect4.new Player('X');
isPlayerOpponent = playerOpponent;
if(playerOpponent) {
playerO = connect4.new Player('O');
playerO.setName("Yellow");
playerX.setName("Red");
} else {
playerX.setName("You");
playerO = new Connect4ComputerPlayer(connect4, 'O');
playerO.setName("Computer");
}
currPlayer = playerX;
gb = connect4.getGameBoard();
}
/**
* Entry point for the JavaFx GUI
*
* @param args arguments sent to the main function
*/
public static void main(String[] args) {
launch(args);
}
/**
* Calls the function to draw on the correct cell
*
* @param cell Which cell to draw the token
*/
public void drawToken(Cell cell) {
cell.setToken();
}
/**
* Calls check winner on the connect4 object and prints status in the bottom label
*
* @param c The character to check win condition on
* @return true if winner or full game
*/
public boolean checkWinner(char c) {
// Check game status
if (connect4.checkWinner(currPlayer)) {
lblStatus.setText(currPlayer.getName() + " won! The game is over");
play = false; // Game is over
return true;
}
else if (gb.isFull()) {
lblStatus.setText("Draw! The game is over");
play= false; // Game is over
return true;
}
return false;
}
/**
* Cell class that is the space for where a user can place a token.
*
* @author Abraham Gomez
* @version 1.0
*
*/
public class Cell extends Pane {
// Token used for this cell
private char token = ' ';
private int column;
private int row;
/**
* Constructs the cell with appropriate dimensions and default appearance
*
* @param i The cell's row
* @param j The cell's column
*/
public Cell(int i, int j) {
setStyle("-fx-border-color: blue; -fx-background-color:BLUE");
this.setPrefSize(2000, 2000);
this.setOnMouseClicked(e -> handleMouseClick());
this.column = j;
this.row = i;
Ellipse e = new Ellipse(this.getWidth() / 2,
this.getHeight() / 2, this.getWidth() / 2 - 10,
this.getHeight() / 2 - 10);
e.centerXProperty().bind(this.widthProperty().divide(2));
e.centerYProperty().bind(this.heightProperty().divide(2));
e.radiusXProperty().bind(this.widthProperty().divide(2).subtract(10));
e.radiusYProperty().bind(this.heightProperty().divide(2).subtract(10));
e.setStroke(Color.WHITE);
e.setFill(Color.WHITE);
e.setStyle("-fx-stroke-width:10px");
getChildren().add(e); // Add the ellipse to the pane
}
/**
* Sets token in gameboard and draws the token in the correct cell
*
* @param column the column to set the token in
* @param c the player character to decide which symbol to print
*/
public void setTokenInGB(int column, char c) {
int setRow = gb.setToken(column+1, c);
Cell setCell = cells[setRow][column];
drawToken(setCell);
}
/**
* Draws the current players token on the GUI
*/
public void setToken() {
token = currPlayer.getChar();
if (token == 'X') {
Ellipse ellipse = new Ellipse(this.getWidth() / 2,
this.getHeight() / 2, this.getWidth() / 2 - 10,
this.getHeight() / 2 - 10);
ellipse.centerXProperty().bind(this.widthProperty().divide(2));
ellipse.centerYProperty().bind(this.heightProperty().divide(2));
ellipse.radiusXProperty().bind(this.widthProperty().divide(2).subtract(10));
ellipse.radiusYProperty().bind(this.heightProperty().divide(2).subtract(10));
ellipse.setStroke(Color.RED);
ellipse.setFill(Color.RED);
ellipse.setStyle("-fx-stroke-width:10px");
getChildren().add(ellipse); // Add the ellipse to the pane
}
else if (token == 'O') {
Ellipse ellipse = new Ellipse(this.getWidth() / 2,
this.getHeight() / 2, this.getWidth() / 2 - 10,
this.getHeight() / 2 - 10);
ellipse.centerXProperty().bind(this.widthProperty().divide(2));
ellipse.centerYProperty().bind(this.heightProperty().divide(2));
ellipse.radiusXProperty().bind(this.widthProperty().divide(2).subtract(10));
ellipse.radiusYProperty().bind(this.heightProperty().divide(2).subtract(10));
ellipse.setStroke(Color.YELLOW);
ellipse.setFill(Color.YELLOW);
ellipse.setStyle("-fx-stroke-width:10px");
getChildren().add(ellipse); // Add the ellipse to the pane
}
}
public void setToken(char otherToken) {
token = otherToken;
if (token == 'X') {
Ellipse ellipse = new Ellipse(this.getWidth() / 2,
this.getHeight() / 2, this.getWidth() / 2 - 10,
this.getHeight() / 2 - 10);
ellipse.centerXProperty().bind(this.widthProperty().divide(2));
ellipse.centerYProperty().bind(this.heightProperty().divide(2));
ellipse.radiusXProperty().bind(this.widthProperty().divide(2).subtract(10));
ellipse.radiusYProperty().bind(this.heightProperty().divide(2).subtract(10));
ellipse.setStroke(Color.RED);
ellipse.setFill(Color.RED);
ellipse.setStyle("-fx-stroke-width:10px");
getChildren().add(ellipse); // Add the ellipse to the pane
}
else if (token == 'O') {
Ellipse ellipse = new Ellipse(this.getWidth() / 2,
this.getHeight() / 2, this.getWidth() / 2 - 10,
this.getHeight() / 2 - 10);
ellipse.centerXProperty().bind(this.widthProperty().divide(2));
ellipse.centerYProperty().bind(this.heightProperty().divide(2));
ellipse.radiusXProperty().bind(this.widthProperty().divide(2).subtract(10));
ellipse.radiusYProperty().bind(this.heightProperty().divide(2).subtract(10));
ellipse.setStroke(Color.YELLOW);
ellipse.setFill(Color.YELLOW);
ellipse.setStyle("-fx-stroke-width:10px");
getChildren().add(ellipse); // Add the ellipse to the pane
}
}
/**
* Handles when a column is clicked. Checks for winner and swaps the control to opponent.
*/
private void handleMouseClick() {
// If cell is empty and game is not over
if (gb.isValidColumn(this.column) && play) {
setTokenInGB(this.column, currPlayer.getChar()); // Set token in the cell
if(!checkWinner(currPlayer.getChar()) && play) {
currPlayer = currPlayer == playerX ? playerO : playerX;
if(isPlayerOpponent && play)
lblStatus.setText(currPlayer.getName() + "'s turn.");
if(currPlayer.getClass() == Connect4ComputerPlayer.class) {
this.getParent().getParent().setDisable(true);
compCol = currPlayer.takeTurnGUI();
setTokenInGB(compCol, currPlayer.getChar());
if(!checkWinner(currPlayer.getChar()))
lblStatus.setText("Computer(Yellow) chose col: " +
(compCol+1) +". Now, it is your(Red) turn.");
currPlayer = playerX;
this.getParent().getParent().setDisable(false);
}
}
}else if(play) {
lblStatus.setText("That column is full. Try again.");
}
}
}
}
| [
"agomez717@gmail.com"
] | agomez717@gmail.com |
f3e294236e8fa51c0f7cc39d4ee08e1450ca5ffc | dc25b27fbd248c708089e1ff2ae73eada13d51fc | /esta/esta-core/src/main/java/ch/hfict/esta/core/domain/Student.java | 53ca4edbfd829ebe9bb73300d51ae0ab733517a6 | [] | no_license | shizonic/study | bfa1c75c6c096286db78437bddf11b1abd15541d | b15f89d8930e5b86cc0632a8a8901b3b42e0f03c | refs/heads/master | 2020-09-14T20:13:24.010030 | 2017-06-15T16:36:42 | 2017-06-15T16:36:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,026 | java | package ch.hfict.esta.core.domain;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;
@Entity
public class Student {
@Id
@GeneratedValue
private Long id;
private String firstname;
private String lastname;
@Temporal(TemporalType.DATE)
private Date birthdate;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getLastname() {
return lastname;
}
public void setLastname(String lastname) {
this.lastname = lastname;
}
public Date getBirthdate() {
return birthdate;
}
public void setBirthdate(Date birthdate) {
this.birthdate = birthdate;
}
}
| [
"thomas@Thomass-MacBook-Pro.local"
] | thomas@Thomass-MacBook-Pro.local |
8ef8409843cd87446c47d65f1a9f41cb649d49c2 | 3f9c95578fdf6905353594c7cf6c3ad11d51d98f | /src/test/java/com/cos/blog/domain/RoleTypeTest.java | 1ce718a2a69daad6b803c60cca2f832df4d5b77c | [] | no_license | codingspecialist/Springboot-Security-OAuth2.0-V3 | 510e20f31be4c9f03b3aa9acdb0f9589d8cf803b | 1e80135bd6857d4d3c8566d429e665aa236c87c7 | refs/heads/master | 2023-03-26T18:56:39.529535 | 2021-03-15T06:25:58 | 2021-03-15T06:25:58 | 347,860,153 | 9 | 1 | null | null | null | null | UTF-8 | Java | false | false | 387 | java | package com.cos.blog.domain;
import org.junit.jupiter.api.Test;
import com.cos.blog.domain.user.RoleType;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class RoleTypeTest {
@Test
public void role_값검증() {
log.debug("1 : "+RoleType.ADMIN);
log.debug("2 : "+RoleType.USER);
log.debug("3 : "+RoleType.ADMIN.ordinal());
log.debug("4 : "+RoleType.USER.ordinal());
}
}
| [
"ssar@nate.com"
] | ssar@nate.com |
2b565e13f10205c1c95207f5354061bb3f02d639 | 6c8c5b9112ad33e6a7ff3a803cdcb674e367b22a | /plugins/gradle/testSources/org/jetbrains/plugins/gradle/importing/GradleImportingTestCase.java | 97ea3bb4ad83cfd3285d3dc83a0dea958ad9368b | [] | no_license | liveqmock/ui5-idea | 516238e5639a43e8fbcc1c6b06429063ec012d51 | 6d4909b0ca7655e8ccdc2c0a9794d46eb3139baa | refs/heads/master | 2021-01-18T11:25:43.282737 | 2014-11-26T02:57:36 | 2014-11-26T02:57:36 | 35,553,128 | 0 | 2 | null | 2015-05-13T14:15:05 | 2015-05-13T14:15:05 | null | UTF-8 | Java | false | false | 7,313 | java | /*
* Copyright 2000-2014 JetBrains s.r.o.
*
* 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.jetbrains.plugins.gradle.importing;
import com.intellij.compiler.server.BuildManager;
import com.intellij.openapi.externalSystem.model.ProjectSystemId;
import com.intellij.openapi.externalSystem.model.settings.ExternalSystemExecutionSettings;
import com.intellij.openapi.externalSystem.settings.ExternalProjectSettings;
import com.intellij.openapi.externalSystem.test.ExternalSystemImportingTestCase;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.ui.TestDialog;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import org.gradle.util.GradleVersion;
import org.gradle.wrapper.GradleWrapperMain;
import org.hamcrest.CoreMatchers;
import org.hamcrest.CustomMatcher;
import org.hamcrest.Matcher;
import org.intellij.lang.annotations.Language;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.gradle.settings.DistributionType;
import org.jetbrains.plugins.gradle.settings.GradleProjectSettings;
import org.jetbrains.plugins.gradle.settings.GradleSettings;
import org.jetbrains.plugins.gradle.tooling.annotation.TargetVersions;
import org.jetbrains.plugins.gradle.tooling.util.VersionMatcher;
import org.jetbrains.plugins.gradle.util.GradleConstants;
import org.junit.Rule;
import org.junit.rules.TestName;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Properties;
import static org.jetbrains.plugins.gradle.tooling.builder.AbstractModelBuilderTest.DistributionLocator;
import static org.jetbrains.plugins.gradle.tooling.builder.AbstractModelBuilderTest.SUPPORTED_GRADLE_VERSIONS;
import static org.junit.Assume.assumeThat;
/**
* @author Vladislav.Soroka
* @since 6/30/2014
*/
@RunWith(value = Parameterized.class)
public abstract class GradleImportingTestCase extends ExternalSystemImportingTestCase {
private static final int GRADLE_DAEMON_TTL_MS = 10000;
@Rule public TestName name = new TestName();
@Rule public VersionMatcherRule versionMatcherRule = new VersionMatcherRule();
@NotNull
@org.junit.runners.Parameterized.Parameter(0)
public String gradleVersion;
private GradleProjectSettings myProjectSettings;
@Override
public void setUp() throws Exception {
super.setUp();
assumeThat(gradleVersion, versionMatcherRule.getMatcher());
myProjectSettings = new GradleProjectSettings();
GradleSettings.getInstance(myProject).setGradleVmOptions("-Xmx64m -XX:MaxPermSize=64m");
System.setProperty(ExternalSystemExecutionSettings.REMOTE_PROCESS_IDLE_TTL_IN_MS_KEY, String.valueOf(GRADLE_DAEMON_TTL_MS));
configureWrapper();
}
@Override
public void tearDown() throws Exception {
try {
Messages.setTestDialog(TestDialog.DEFAULT);
FileUtil.delete(BuildManager.getInstance().getBuildSystemDirectory());
}
finally {
super.tearDown();
}
}
@Override
public String getName() {
return name.getMethodName() == null ? super.getName() : FileUtil.sanitizeFileName(name.getMethodName());
}
@Parameterized.Parameters(name = "{index}: with Gradle-{0}")
public static Collection<Object[]> data() throws Throwable {
return Arrays.asList(SUPPORTED_GRADLE_VERSIONS);
}
@Override
protected String getTestsTempDir() {
return "gradleImportTests";
}
@Override
protected String getExternalSystemConfigFileName() {
return "build.gradle";
}
@Override
protected void importProject(@NonNls @Language("Groovy") String config) throws IOException {
super.importProject(config);
}
@Override
protected ExternalProjectSettings getCurrentExternalProjectSettings() {
return myProjectSettings;
}
@Override
protected ProjectSystemId getExternalSystemId() {
return GradleConstants.SYSTEM_ID;
}
protected VirtualFile createSettingsFile(@NonNls @Language("Groovy") String content) throws IOException {
return createProjectSubFile("settings.gradle", content);
}
private void configureWrapper() throws IOException, URISyntaxException {
final URI distributionUri = new DistributionLocator().getDistributionFor(GradleVersion.version(gradleVersion));
myProjectSettings.setDistributionType(DistributionType.DEFAULT_WRAPPED);
final VirtualFile wrapperJarFrom = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(wrapperJar());
assert wrapperJarFrom != null;
final VirtualFile wrapperJarFromTo = createProjectSubFile("gradle/wrapper/gradle-wrapper.jar");
wrapperJarFromTo.setBinaryContent(wrapperJarFrom.contentsToByteArray());
Properties properties = new Properties();
properties.setProperty("distributionBase", "GRADLE_USER_HOME");
properties.setProperty("distributionPath", "wrapper/dists");
properties.setProperty("zipStoreBase", "GRADLE_USER_HOME");
properties.setProperty("zipStorePath", "wrapper/dists");
properties.setProperty("distributionUrl", distributionUri.toString());
StringWriter writer = new StringWriter();
properties.store(writer, null);
createProjectSubFile("gradle/wrapper/gradle-wrapper.properties", writer.toString());
}
private static File wrapperJar() {
URI location;
try {
location = GradleWrapperMain.class.getProtectionDomain().getCodeSource().getLocation().toURI();
}
catch (URISyntaxException e) {
throw new RuntimeException(e);
}
if (!location.getScheme().equals("file")) {
throw new RuntimeException(String.format("Cannot determine classpath for wrapper JAR from codebase '%s'.", location));
}
return new File(location.getPath());
}
private static class VersionMatcherRule extends TestWatcher {
@Nullable
private CustomMatcher myMatcher;
@NotNull
public Matcher getMatcher() {
return myMatcher != null ? myMatcher : CoreMatchers.anything();
}
@Override
protected void starting(Description d) {
final TargetVersions targetVersions = d.getAnnotation(TargetVersions.class);
if (targetVersions == null) return;
myMatcher = new CustomMatcher<String>("Gradle version '" + targetVersions.value() + "'") {
@Override
public boolean matches(Object item) {
return item instanceof String && new VersionMatcher(GradleVersion.version(item.toString())).isVersionMatch(targetVersions);
}
};
}
}
}
| [
"rhymeweaponlegend@gmail.com"
] | rhymeweaponlegend@gmail.com |
6d37990032f34b2a0950d4c442a65825f4fa4568 | ce434a06afbe61fe168f81e40de6ce8fe3fbbd7c | /weex/src/main/java/dahei/me/weex/util/AppConfigXmlParser.java | aa5bd7cbabea3117b0dddcdff7cda03befca6971 | [] | no_license | halibobo/OneAppp | 465919d93f04f59b97b38f2d3987d3c413b456f6 | 6e635c671577fb36bbc911828905e643b524da23 | refs/heads/master | 2020-03-29T08:12:24.794096 | 2018-09-21T08:57:46 | 2018-09-21T08:57:46 | 149,699,191 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,749 | java | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF 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 dahei.me.weex.util;
import android.content.Context;
import android.util.Log;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
import java.util.Locale;
public class AppConfigXmlParser {
private static String TAG = "AppConfigXmlParser";
private AppPreferences prefs = new AppPreferences();
public AppPreferences getPreferences() {
return prefs;
}
public synchronized void parse(Context action) {
// First checking the class namespace for config.xml
int id = action.getResources().getIdentifier("app_config", "xml", action.getClass().getPackage()
.getName());
if (id == 0) {
// If we couldn't find config.xml there, we'll look in the namespace from AndroidManifest.xml
id = action.getResources().getIdentifier("app_config", "xml", action.getPackageName());
if (id == 0) {
Log.e(TAG, "res/xml/app_config.xml is missing!");
return;
}
}
parse(action.getResources().getXml(id));
}
public void parse(XmlPullParser xml) {
int eventType = -1;
while (eventType != XmlPullParser.END_DOCUMENT) {
if (eventType == XmlPullParser.START_TAG) {
handleStartTag(xml);
} else if (eventType == XmlPullParser.END_TAG) {
handleEndTag(xml);
}
try {
eventType = xml.next();
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
private void handleStartTag(XmlPullParser xml) {
String strNode = xml.getName();
if (strNode.equals("preference")) {
String name = xml.getAttributeValue(null, "name").toLowerCase(Locale.ENGLISH);
String value = xml.getAttributeValue(null, "value");
prefs.set(name, value);
}
}
private void handleEndTag(XmlPullParser xml) {
}
}
| [
"294927433@qq.com"
] | 294927433@qq.com |
5c298057c750e089f2d69b9ad16792c4f3a757c3 | 0995a12bd232b6dbb0df54fd7129425a2756294b | /core-java/src/main/java/com/baeldung/stackoverflowerror/RecursionWithCorrectTerminationCondition.java | 0c0c392532f87e7ae86a9a4cc89e67cfd043d622 | [] | no_license | mohsennn/tutorials | abbe95d93c2a33d951ca20e28d8efedd68a4cfe4 | 7c73abdedece1c118be4a9d60b574cd85639b473 | refs/heads/master | 2020-12-30T15:42:11.697036 | 2017-05-12T18:32:54 | 2017-05-12T18:32:54 | 91,165,809 | 0 | 1 | null | 2017-05-13T10:13:03 | 2017-05-13T10:13:03 | null | UTF-8 | Java | false | false | 248 | java | package com.baeldung.stackoverflowerror;
public class RecursionWithCorrectTerminationCondition {
public static int calculateFactorial(final int number) {
return number <= 1 ? 1 : number * calculateFactorial(number - 1);
}
}
| [
"pedja4@users.noreply.github.com"
] | pedja4@users.noreply.github.com |
9f627f4af596053d85e5eca7e51815d08766d99f | 40ab8f7d4489acd66fb5e78c4d83bee38b008acb | /com.pholser.util.properties.propertybinder/src/main/java/com/pholser/util/properties/conversions/java/time/DurationConversion.java | 8d9b478e30236db121db6ec505433ac6d4066d43 | [
"MIT"
] | permissive | pholser/property-binder | d1ffee74196cf6f2eb2839080c9daee76172271b | 1c5e16a781b8514205e793d23dc28838e806fa33 | refs/heads/master | 2023-06-29T11:49:58.439136 | 2021-11-19T20:21:30 | 2021-11-19T20:21:30 | 863,061 | 7 | 6 | NOASSERTION | 2023-06-14T22:44:35 | 2010-08-26T01:17:44 | Java | UTF-8 | Java | false | false | 1,524 | java | /*
The MIT License
Copyright (c) 2009-2021 Paul R. Holser, Jr.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.pholser.util.properties.conversions.java.time;
import com.pholser.util.properties.conversions.Conversion;
import java.time.Duration;
import java.util.List;
public class DurationConversion extends Conversion<Duration> {
public DurationConversion() {
super(Duration.class);
}
@Override public Duration convert(String value, List<String> patterns) {
return Duration.parse(value);
}
}
| [
"pholser@alumni.rice.edu"
] | pholser@alumni.rice.edu |
e4a5408d1d46d98062bad8705c02f2e072fa0bdc | 1020d5081c2e1b1b5b09551316cc77315add9efb | /chapter04/src/com/restbucks/StateMachineController.java | 86447c51c4ee826031a8976594ab46c4c259b330 | [] | no_license | caelum/restbucks-java | 7a542534c45d16b3094b89e737027585554d21d9 | e75ed2c29ca522a7d253e890f44197b3a73700b7 | refs/heads/master | 2021-01-25T08:28:40.196294 | 2010-01-25T15:27:01 | 2010-01-25T15:27:01 | 366,182 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 133 | java | package com.restbucks;
public interface StateMachineController<T> {
public String getBaseUri();
public T retrieve(String id);
}
| [
"guilherme.silveira@caelum.com.br"
] | guilherme.silveira@caelum.com.br |
da108a7b155137afae186429b39741af942e594c | 2e4df3cc0489099a5b6a9d723b79af062e0cd1c3 | /src/main/java/com/skr/airasia/orderapi/mapper/OrderMapper.java | 09ce4598220aee2cafe81d179dfc782d5b4dda24 | [] | no_license | sijuthomas1988/orderapi | 124e267439acf84400e428a86b972fc26dd05a52 | 3783be705f0bd5245cfc65defcce7605653cf857 | refs/heads/master | 2023-01-05T01:44:01.711625 | 2020-11-01T18:36:50 | 2020-11-01T18:36:50 | 308,407,674 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,775 | java | package com.skr.airasia.orderapi.mapper;
import com.skr.airasia.orderapi.dto.HotelBookingDto;
import com.skr.airasia.orderapi.dto.OrderDto;
import com.skr.airasia.orderapi.dto.CustomerDto;
import com.skr.airasia.orderapi.model.OrderRequest;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
/**
* Class that enables to map from request to dto object
*/
public class OrderMapper {
/**
* Converts request to dto object
*
* @param orderRequest
* request object
* @param transactionId
* unique id generated value
* @return dto object
*
*/
public static OrderDto convertRequestToDto(OrderRequest orderRequest, String transactionId ) {
OrderDto orderDto = new OrderDto();
CustomerDto customerDto = new CustomerDto();
HotelBookingDto hotelBookingDto = new HotelBookingDto();
hotelBookingDto.setHotelCheckInDate(parseDateFromString(orderRequest.getHotelDetails().getHotelCheckInDate()));
hotelBookingDto.setHotelCheckOutDate(parseDateFromString(orderRequest.getHotelDetails().getHotelCheckOutDate()));
hotelBookingDto.setCustomerDto(customerDto);
hotelBookingDto.setHotelId(orderRequest.getHotelDetails().getHotelId());
hotelBookingDto.setHotelName(orderRequest.getHotelDetails().getHotelName());
hotelBookingDto.setHotelRoomId(orderRequest.getHotelDetails().getHotelRoomId());
hotelBookingDto.setNoOfGuests(Long.parseLong(orderRequest.getHotelDetails().getHotelNumberOfGuests()));
hotelBookingDto.setRoomType(orderRequest.getHotelDetails().getHotelRoomType().name());
hotelBookingDto.setNoOfRooms(orderRequest.getHotelDetails().getNoOfRooms());
customerDto.setHotelBookingDetails(Arrays.asList(hotelBookingDto));
customerDto.setEmail(orderRequest.getCustomerDetails().getCustomerEmail());
customerDto.setName(orderRequest.getCustomerDetails().getCustomerName());
customerDto.setCustomer_id(orderRequest.getCustomerDetails().getCustomerId());
customerDto.setPhoneNumber(orderRequest.getCustomerDetails().getCustomerNumber());
customerDto.setOrderDetails(orderDto);
orderDto.setCustomerDto(customerDto);
orderDto.setTotalAmount(orderRequest.getAmount());
orderDto.setTransactionId(transactionId);
return orderDto;
}
/**
* Function to parse date from string
*
* @param dateString
* date string value
* @return date
*/
private static Date parseDateFromString(String dateString) {
long date=new SimpleDateFormat("dd-MM-yyyy").parse(dateString, new ParsePosition(0)).getTime();
return new java.sql.Date(date);
}
} | [
"sijuthomas1988@gmail.com"
] | sijuthomas1988@gmail.com |
d63ad3bb783ef14b1826787fa5b5f75de4d9e29d | 553eeffb20ad2b194d6946aed8dc7c27d085b35c | /src/test/java/ru/kruvv/myrestfull/service/BlackListServiceTest.java | 811a890c29028c37bb3b55f65b7a2d1e821d0be1 | [] | no_license | kruvv/myrestfullexample | 83b50f69aecc70c2878dbb184453cf686f22d888 | 5270f87c118f7411e927fdf306fffe3f7d8d06a4 | refs/heads/master | 2021-07-03T21:11:53.245655 | 2019-06-17T14:24:33 | 2019-06-17T14:24:33 | 188,873,635 | 0 | 0 | null | 2020-10-13T13:29:57 | 2019-05-27T16:05:56 | Java | UTF-8 | Java | false | false | 1,255 | java | package ru.kruvv.myrestfull.service;
import static org.junit.Assert.assertTrue;
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;
import ru.kruvv.myrestfull.domain.BlackList;
import ru.kruvv.myrestfull.domain.Person;
import ru.kruvv.myrestfull.repository.BlackListRepository;
import ru.kruvv.myrestfull.repository.PersonRepository;
@RunWith(SpringRunner.class)
@SpringBootTest
public class BlackListServiceTest {
@Autowired
private PersonRepository persons;
@Autowired
private BlackListRepository blacklists;
@Autowired
private BlackListService service;
@Test
public void whenPersonInBlackListThenReturnTrue() {
Person person = this.persons.save(new Person("Viktor", "Krupkin"));
this.blacklists.save(new BlackList(person));
boolean result = this.service.isBlackListPerson(person.getId());
assertTrue(result);
}
@Test
public void whenBlackListEmptyThenAnyPersonNotIn() {
Person person = this.persons.save(new Person("Viktor", "Krupkin"));
boolean result = this.service.isBlackListPerson(person.getId());
assertTrue(result);
}
}
| [
"kruvv@mail.ru"
] | kruvv@mail.ru |
76c2e5e44550abb926245dd56c5a368efe616a2a | c18b5664955393816000a51e26a33cc7bc0a4cf9 | /app/src/main/java/com/yunbao/phonelive/mob/MobCallback.java | c99f11223af696a120c16a8c2610201faf8649d9 | [] | no_license | zhaojipu/eightGirls | b8243eaac41c84de3e427dfc4ce54bf203499d1d | a9ed13d5837ab48c37c914d43c3fce330eae5de7 | refs/heads/master | 2020-11-29T09:10:21.727086 | 2019-12-25T09:17:36 | 2019-12-25T09:17:36 | 230,076,209 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 207 | java | package com.yunbao.phonelive.mob;
/**
* Created by cxf on 2018/9/21.
*/
public interface MobCallback {
void onSuccess(Object data);
void onError();
void onCancel();
void onFinish();
}
| [
"!BJjp191024"
] | !BJjp191024 |
773bfe8ad748b87ca7918464253512c425b96923 | 2396d6b6fdd6f48b26fb3b20c2cf86a2943a0ba9 | /modules/server/src/main/java/cn/keepbx/jpom/controller/node/script/ScriptController.java | 5799b6ccc850681aa5663aa0fd06bf4619bd53a2 | [
"MIT"
] | permissive | aohanhongzhi/Jpom | 00420aaad9a18eca21bfd9de8ba6b6622515ca14 | 4bf2ab7ec33d1dd149345c8d567e7212eea71679 | refs/heads/master | 2020-06-28T20:46:09.407602 | 2019-07-29T07:38:39 | 2019-07-29T07:38:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,181 | java | package cn.keepbx.jpom.controller.node.script;
import cn.hutool.core.util.StrUtil;
import cn.keepbx.jpom.common.BaseServerController;
import cn.keepbx.jpom.common.forward.NodeForward;
import cn.keepbx.jpom.common.forward.NodeUrl;
import cn.keepbx.jpom.common.interceptor.UrlPermission;
import cn.keepbx.jpom.model.Role;
import cn.keepbx.jpom.model.log.UserOperateLogV1;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* 脚本管理
*
* @author jiangzeyin
* @date 2019/4/24
*/
@Controller
@RequestMapping(value = "/node/script")
public class ScriptController extends BaseServerController {
@RequestMapping(value = "list.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE)
public String list() {
JSONArray jsonArray = NodeForward.requestData(getNode(), NodeUrl.Script_List, getRequest(), JSONArray.class);
setAttribute("array", jsonArray);
return "node/script/list";
}
@RequestMapping(value = "item.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE)
public String item(String id) {
setAttribute("type", "add");
if (StrUtil.isNotEmpty(id)) {
JSONObject jsonObject = NodeForward.requestData(getNode(), NodeUrl.Script_Item, getRequest(), JSONObject.class);
if (jsonObject != null) {
setAttribute("type", "edit");
setAttribute("item", jsonObject);
}
}
return "node/script/edit";
}
/**
* 保存脚本
*
* @return json
*/
@RequestMapping(value = "save.json", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
@UrlPermission(value = Role.System, optType = UserOperateLogV1.OptType.Save_Script)
public String save() {
return NodeForward.request(getNode(), getRequest(), NodeUrl.Script_Save).toString();
}
@RequestMapping(value = "del.json", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
@UrlPermission(value = Role.System, optType = UserOperateLogV1.OptType.Save_Del)
public String del() {
return NodeForward.request(getNode(), getRequest(), NodeUrl.Script_Del).toString();
}
/**
* 导入脚本
*
* @return json
*/
@RequestMapping(value = "upload", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
@UrlPermission(value = Role.System, optType = UserOperateLogV1.OptType.Save_Upload)
public String upload() {
return NodeForward.requestMultipart(getNode(), getMultiRequest(), NodeUrl.Script_Upload).toString();
}
@RequestMapping(value = "console.html", method = RequestMethod.GET, produces = MediaType.TEXT_HTML_VALUE)
public String console(String id) {
return "node/script/console";
}
}
| [
"bwcx_jzy@163.com"
] | bwcx_jzy@163.com |
0558bb891cf8c0d1c457211e93ba1a242b6a711d | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module1677/src/java/module1677/a/Foo3.java | ccf04b7307c858ee5eea9fbecdd7b8ba0f875209 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 1,497 | java | package module1677.a;
import javax.lang.model.*;
import javax.management.*;
import javax.naming.directory.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.nio.file.FileStore
* @see java.sql.Array
* @see java.util.logging.Filter
*/
@SuppressWarnings("all")
public abstract class Foo3<R> extends module1677.a.Foo2<R> implements module1677.a.IFoo3<R> {
java.util.zip.Deflater f0 = null;
javax.annotation.processing.Completion f1 = null;
javax.lang.model.AnnotatedConstruct f2 = null;
public R element;
public static Foo3 instance;
public static Foo3 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module1677.a.Foo2.create(input);
}
public String getName() {
return module1677.a.Foo2.getInstance().getName();
}
public void setName(String string) {
module1677.a.Foo2.getInstance().setName(getName());
return;
}
public R get() {
return (R)module1677.a.Foo2.getInstance().get();
}
public void set(Object element) {
this.element = (R)element;
module1677.a.Foo2.getInstance().set(this.element);
}
public R call() throws Exception {
return (R)module1677.a.Foo2.getInstance().call();
}
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
fb0a7453a39178c6c1eded63841ff82d421b8809 | 23d9577d1abe4125ae2e0c12f32b7987487be50d | /si-lab03/src/main/java/br/com/si_lab03/api/controller/TarefaController.java | 8d5c2042191b7c33cb99b0f95406180e24768214 | [] | no_license | Luiz-FS/si-lab03 | 56a3923922ce6ed7d6eef0db661f76c4ba936315 | 6cfd3d9e07ab319555b695826d369633411f2bdd | refs/heads/master | 2021-01-11T21:01:47.429615 | 2017-02-09T00:17:45 | 2017-02-09T00:17:45 | 80,135,369 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,941 | java | package br.com.si_lab03.api.controller;
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.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import br.com.si_lab03.api.controller.operacoes.OperacoesComBanco;
import br.com.si_lab03.api.model.tarefa.Tarefa;
@RestController
public class TarefaController {
@Autowired
private OperacoesComBanco operacoesComBanco;
@RequestMapping(method=RequestMethod.POST, value="/listas/{idLista}", consumes=MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Tarefa> salvarTarefa(@PathVariable Integer idLista, @RequestBody Tarefa tarefa) {
Tarefa tarefaSalva = operacoesComBanco.salvarTarefa(idLista, tarefa);
if (tarefaSalva != null)
return new ResponseEntity<>(tarefaSalva, HttpStatus.OK);
else
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}
@RequestMapping(method=RequestMethod.PUT, value="/listas/tarefa", consumes=MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Tarefa> alterarTarefa(@RequestBody Tarefa tarefa) {
Tarefa tarefaAlterada = operacoesComBanco.alterarTarefa(tarefa);
return new ResponseEntity<>(tarefaAlterada, HttpStatus.OK);
}
@RequestMapping(method=RequestMethod.DELETE, value="/listas/{idLista}/{idTarefa}")
public ResponseEntity<Tarefa> deletarTarefa(@PathVariable Integer idLista, @PathVariable Integer idTarefa) {
boolean deletou = operacoesComBanco.deletarTarefa(idLista, idTarefa);
if (deletou)
return new ResponseEntity<>(HttpStatus.OK);
else
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}
}
| [
"luiz.silva@ccc.ufcg.edu.br"
] | luiz.silva@ccc.ufcg.edu.br |
4ec338fefb6055048308f7ede8333810fe7f55c6 | 0ee9a822ae1fc97d6bb8653a9de25f0b8def7c1b | /app/src/androidTest/java/com/example/yunbox/twyd01/ExampleInstrumentedTest.java | 9261a3b4c6ae702fa2025869cfa26cbe12f6d15b | [] | no_license | yunbox-jp/twyd | 5f1c9ac8fd898ea1e51ba69ed16241192f17c890 | 2d58f5a172a2ba4dae3927a2f46581711295ff44 | refs/heads/master | 2021-01-23T04:19:22.973814 | 2017-06-02T04:32:19 | 2017-06-02T04:32:19 | 92,924,076 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 754 | java | package com.example.yunbox.twyd01;
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.example.yunbox.twyd01", appContext.getPackageName());
}
}
| [
"yunbox.official@gmail.com"
] | yunbox.official@gmail.com |
0ef19822239bbca4442091133fff8807f05abb1f | a1b864b42dd70b7f8d966c835a3519595cefdaa0 | /src/main/java/com/ERS/dao/ConnectionManager.java | ef650968ea6e26db11d6220704b5a10cae116df3 | [] | no_license | bir1in/ERS | e4bcebaea357689062102b48029d76ccb4c5225d | 6be9fb5514942da27fee28b548913da9a1909f23 | refs/heads/master | 2020-05-17T09:18:36.026032 | 2019-04-26T13:12:10 | 2019-04-26T13:12:10 | 183,630,267 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,666 | java | package com.ERS.dao;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;
public class ConnectionManager {
public static Connection getConnection() {
final Properties props = getJdbcProperties();
//System.out.println("-------- Oracle JDBC Connection Testing ------");
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
System.out.println("Where is your JDBC Driver?");
e.printStackTrace();
return null;
}
//root@localhost:3306
Connection connection = null;
try {
connection = DriverManager.getConnection(props.getProperty("jdbc.url"), props.getProperty("jdbc.username"), props.getProperty("jdbc.password"));
} catch (SQLException e) {
System.out.println("Connection Failed! Check output console");
e.printStackTrace();
return null;
}
if (connection != null) {
System.out.println("You made it, take control your database now!");
} else {
System.out.println("Failed to make connection!");
}
return connection;
}
public static void main(String[] args) {
ConnectionManager.getConnection();
}
private static Properties getJdbcProperties() {
Properties props = new Properties();
try {
props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("ERS.properties"));
} catch (IOException ex) {
throw new RuntimeException("Failed to load application.properties");
}
return props;
}
}
| [
"jiversen.tu@gmail.com"
] | jiversen.tu@gmail.com |
65e8fd85862f5913a40a8a7cfa29baa53d6c8c61 | 4ae8c9258496610529a50b071c703027105f0ffc | /aliyun-java-sdk-r-kvstore/src/main/java/com/aliyuncs/r_kvstore/model/v20150101/ModifyInstanceMaintainTimeRequest.java | bf089b42e422c2a69781403c595e5272627ba152 | [
"Apache-2.0"
] | permissive | haoqicherish/aliyun-openapi-java-sdk | 78185684bff9faaa09e39719757987466c30b820 | 3ff5e4551ce0dd534c21b42a96402c44f3c75599 | refs/heads/master | 2020-03-09T16:43:36.806041 | 2018-04-10T06:59:45 | 2018-04-10T06:59:45 | 128,892,355 | 1 | 0 | null | 2018-04-10T07:31:42 | 2018-04-10T07:31:41 | null | UTF-8 | Java | false | false | 3,733 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF 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 com.aliyuncs.r_kvstore.model.v20150101;
import com.aliyuncs.RpcAcsRequest;
/**
* @author auto create
* @version
*/
public class ModifyInstanceMaintainTimeRequest extends RpcAcsRequest<ModifyInstanceMaintainTimeResponse> {
public ModifyInstanceMaintainTimeRequest() {
super("R-kvstore", "2015-01-01", "ModifyInstanceMaintainTime", "redisa");
}
private Long resourceOwnerId;
private String instanceId;
private String securityToken;
private String resourceOwnerAccount;
private String maintainStartTime;
private String ownerAccount;
private Long ownerId;
private String maintainEndTime;
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
public void setResourceOwnerId(Long resourceOwnerId) {
this.resourceOwnerId = resourceOwnerId;
if(resourceOwnerId != null){
putQueryParameter("ResourceOwnerId", resourceOwnerId.toString());
}
}
public String getInstanceId() {
return this.instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
if(instanceId != null){
putQueryParameter("InstanceId", instanceId);
}
}
public String getSecurityToken() {
return this.securityToken;
}
public void setSecurityToken(String securityToken) {
this.securityToken = securityToken;
if(securityToken != null){
putQueryParameter("SecurityToken", securityToken);
}
}
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
public void setResourceOwnerAccount(String resourceOwnerAccount) {
this.resourceOwnerAccount = resourceOwnerAccount;
if(resourceOwnerAccount != null){
putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
}
public String getMaintainStartTime() {
return this.maintainStartTime;
}
public void setMaintainStartTime(String maintainStartTime) {
this.maintainStartTime = maintainStartTime;
if(maintainStartTime != null){
putQueryParameter("MaintainStartTime", maintainStartTime);
}
}
public String getOwnerAccount() {
return this.ownerAccount;
}
public void setOwnerAccount(String ownerAccount) {
this.ownerAccount = ownerAccount;
if(ownerAccount != null){
putQueryParameter("OwnerAccount", ownerAccount);
}
}
public Long getOwnerId() {
return this.ownerId;
}
public void setOwnerId(Long ownerId) {
this.ownerId = ownerId;
if(ownerId != null){
putQueryParameter("OwnerId", ownerId.toString());
}
}
public String getMaintainEndTime() {
return this.maintainEndTime;
}
public void setMaintainEndTime(String maintainEndTime) {
this.maintainEndTime = maintainEndTime;
if(maintainEndTime != null){
putQueryParameter("MaintainEndTime", maintainEndTime);
}
}
@Override
public Class<ModifyInstanceMaintainTimeResponse> getResponseClass() {
return ModifyInstanceMaintainTimeResponse.class;
}
}
| [
"haowei.yao@alibaba-inc.com"
] | haowei.yao@alibaba-inc.com |
f56e39007023eec12013ed44c84146062e614ef0 | 34f8d4ba30242a7045c689768c3472b7af80909c | /jdk-14/src/jdk.localedata/sun/util/resources/cldr/ext/LocaleNames_yo.java | 4713ddc8c9bf5f285542e06aca547885d268bb5a | [
"Apache-2.0"
] | permissive | lovelycheng/JDK | 5b4cc07546f0dbfad15c46d427cae06ef282ef79 | 19a6c71e52f3ecd74e4a66be5d0d552ce7175531 | refs/heads/master | 2023-04-08T11:36:22.073953 | 2022-09-04T01:53:09 | 2022-09-04T01:53:09 | 227,544,567 | 0 | 0 | null | 2019-12-12T07:18:30 | 2019-12-12T07:18:29 | null | UTF-8 | Java | false | false | 30,034 | java | /*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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 General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* COPYRIGHT AND PERMISSION NOTICE
*
* Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
* Distributed under the Terms of Use in
* http://www.unicode.org/copyright.html.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of the Unicode data files and any associated documentation
* (the "Data Files") or Unicode software and any associated documentation
* (the "Software") to deal in the Data Files or Software
* without restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, and/or sell copies of
* the Data Files or Software, and to permit persons to whom the Data Files
* or Software are furnished to do so, provided that
* (a) this copyright and permission notice appear with all copies
* of the Data Files or Software,
* (b) this copyright and permission notice appear in associated
* documentation, and
* (c) there is clear notice in each modified Data File or in the Software
* as well as in the documentation associated with the Data File(s) or
* Software that the data or software has been modified.
*
* THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
* ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT OF THIRD PARTY RIGHTS.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
* NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
* DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THE DATA FILES OR SOFTWARE.
*
* Except as contained in this notice, the name of a copyright holder
* shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in these Data Files or Software without prior
* written authorization of the copyright holder.
*/
package sun.util.resources.cldr.ext;
import sun.util.resources.OpenListResourceBundle;
public class LocaleNames_yo extends OpenListResourceBundle {
@Override
protected final Object[][] getContents() {
final Object[][] data = new Object[][] {
{ "003", "\u00c0r\u00edw\u00e1 Am\u1eb9\u0301r\u00edk\u00e0" },
{ "005", "G\u00fa\u00fa\u1e63\u00f9 Am\u1eb9\u0301r\u00edk\u00e0" },
{ "011", "\u00ccw\u1ecd\u0300 oor\u00f9n Af\u00edr\u00edk\u00e0" },
{ "013", "\u00c0\u00e0rin Gb\u00f9gb\u00f9n \u00c0m\u1eb9\u0301r\u00edk\u00e0" },
{ "014", "\u00ccl\u00e0 Oor\u00f9n \u00c1f\u00edr\u00edk\u00e0" },
{ "017", "\u00c0\u00e0r\u00edn gb\u00f9ngb\u00f9n Af\u00edr\u00edk\u00e0" },
{ "018", "Ap\u00e1g\u00fa\u00fas\u00f9 \u00c1f\u00edr\u00edk\u00e0" },
{ "021", "Ap\u00e1\u00e0r\u00edw\u00e1 Am\u1eb9\u0301r\u00edk\u00e0" },
{ "029", "K\u00e1r\u00edb\u00ed\u00e0n\u00f9" },
{ "030", "\u00ccl\u00e0 \u00d2\u00f2r\u00f9n E\u1e63\u00ed\u00e0" },
{ "034", "G\u00fa\u00fa\u1e63\u00f9 E\u1e63\u00ed\u00e0" },
{ "035", "G\u00fa\u00fa\u1e63\u00f9 \u00ecl\u00e0 \u00f2\u00f2r\u00f9n \u00c9\u1e63\u00ed\u00e0" },
{ "039", "G\u00fa\u00fa\u1e63\u00f9 Y\u00far\u00f3\u00f2p\u00f9" },
{ "053", "\u1ecc\u1e63ir\u00e9la\u1e63\u00ed\u00e0" },
{ "054", "M\u1eb9lan\u00e9\u1e63\u00ed\u00e0" },
{ "057", "Agb\u00e8gb\u00e8 Maikiron\u00e9\u1e63\u00ed\u00e0" },
{ "061", "Poline\u1e63\u00ed\u00e0" },
{ "143", "\u00c0\u00e0rin Gb\u00f9ngb\u00f9n \u00c9\u1e63\u00ed\u00e0" },
{ "145", "\u00ccw\u1ecd\u0300 \u00d2\u00f2r\u00f9n E\u1e63\u00ed\u00e0" },
{ "151", "\u00ccl\u00e0 \u00d2r\u00f9n Y\u00far\u00f3p\u00f9" },
{ "154", "Northern Europe" },
{ "155", "\u00ccw\u1ecd\u0300 \u00d2\u00f2r\u00f9n Y\u00far\u00f3p\u00f9" },
{ "419", "L\u00e1t\u00edn Am\u1eb9\u0301r\u00edk\u00e0" },
{ "AD", "Or\u00edl\u1eb9\u0301\u00e8de \u00c0\u00e0nd\u00f3r\u00e0" },
{ "AE", "Or\u00edl\u1eb9\u0301\u00e8de \u1eb8mirate ti Aw\u1ecdn Arabu" },
{ "AF", "Or\u00edl\u1eb9\u0301\u00e8de \u00c0f\u00f9g\u00e0n\u00edst\u00e1n\u00ec" },
{ "AG", "Or\u00edl\u1eb9\u0301\u00e8de \u00c0\u00e0nt\u00edg\u00fa\u00e0 \u00e0ti B\u00e1r\u00edb\u00fad\u00e0" },
{ "AI", "Or\u00edl\u1eb9\u0301\u00e8de \u00c0\u00e0ng\u00fal\u00edl\u00e0" },
{ "AL", "Or\u00edl\u1eb9\u0301\u00e8de \u00c0l\u00f9b\u00e0n\u00ed\u00e1n\u00ec" },
{ "AM", "Or\u00edl\u1eb9\u0301\u00e8de Am\u00e9n\u00ed\u00e0" },
{ "AO", "Or\u00edl\u1eb9\u0301\u00e8de \u00c0\u00e0ng\u00f3l\u00e0" },
{ "AR", "Or\u00edl\u1eb9\u0301\u00e8de Agent\u00edn\u00e0" },
{ "AS", "S\u00e1m\u00f3\u00e1n\u00ec ti Or\u00edl\u1eb9\u0301\u00e8de \u00c0m\u00e9r\u00edk\u00e0" },
{ "AT", "Or\u00edl\u1eb9\u0301\u00e8de As\u00edt\u00edr\u00ed\u00e0" },
{ "AU", "Or\u00edl\u1eb9\u0301\u00e8de \u00c1str\u00e0l\u00ec\u00e1" },
{ "AW", "Or\u00edl\u1eb9\u0301\u00e8de \u00c1r\u00fab\u00e0" },
{ "AZ", "Or\u00edl\u1eb9\u0301\u00e8de As\u1eb9\u0301b\u00e1j\u00e1n\u00ec" },
{ "BA", "Or\u00edl\u1eb9\u0301\u00e8de B\u1ecd\u0300s\u00edn\u00ed\u00e0 \u00e0ti \u1eb8tis\u1eb9g\u00f3f\u00edn\u00e0" },
{ "BB", "Or\u00edl\u1eb9\u0301\u00e8de B\u00e1b\u00e1d\u00f3s\u00ec" },
{ "BD", "Or\u00edl\u1eb9\u0301\u00e8de B\u00e1ng\u00e1l\u00e1d\u00e9s\u00ec" },
{ "BE", "Or\u00edl\u1eb9\u0301\u00e8de B\u00e9g\u00ed\u1ecd\u0301m\u00f9" },
{ "BF", "Or\u00edl\u1eb9\u0301\u00e8de B\u00f9\u00f9k\u00edn\u00e1 Fas\u00f2" },
{ "BG", "Or\u00edl\u1eb9\u0301\u00e8de B\u00f9\u00f9g\u00e1r\u00ed\u00e0" },
{ "BH", "Or\u00edl\u1eb9\u0301\u00e8de B\u00e1r\u00e1n\u00ec" },
{ "BI", "Or\u00edl\u1eb9\u0301\u00e8de B\u00f9\u00f9r\u00fand\u00ec" },
{ "BJ", "Or\u00edl\u1eb9\u0301\u00e8de B\u1eb9\u0300n\u1eb9\u0300" },
{ "BM", "Or\u00edl\u1eb9\u0301\u00e8de B\u00e9m\u00fad\u00e0" },
{ "BN", "Or\u00edl\u1eb9\u0301\u00e8de B\u00far\u00fan\u1eb9\u0301l\u00ec" },
{ "BO", "Or\u00edl\u1eb9\u0301\u00e8de B\u1ecd\u0300l\u00edf\u00edy\u00e0" },
{ "BR", "Oril\u1eb9\u0300-\u00e8d\u00e8 B\u00e0r\u00e0s\u00edl\u00ec" },
{ "BS", "Or\u00edl\u1eb9\u0301\u00e8de B\u00e0h\u00e1m\u00e1s\u00ec" },
{ "BT", "Or\u00edl\u1eb9\u0301\u00e8de B\u00fat\u00e1n\u00ec" },
{ "BW", "Or\u00edl\u1eb9\u0301\u00e8de B\u1ecd\u0300t\u00ecs\u00faw\u00e1n\u00e0" },
{ "BY", "Or\u00edl\u1eb9\u0301\u00e8de B\u00e9l\u00e1r\u00fas\u00ec" },
{ "BZ", "Or\u00edl\u1eb9\u0301\u00e8de B\u00e8l\u00eds\u1eb9\u0300" },
{ "CA", "Or\u00edl\u1eb9\u0301\u00e8de K\u00e1n\u00e1d\u00e0" },
{ "CD", "Oril\u1eb9\u0301\u00e8de K\u00f3ng\u00f2" },
{ "CF", "Or\u00edl\u1eb9\u0301\u00e8de \u00c0rin g\u00f9ngun \u00c1f\u00edr\u00edk\u00e0" },
{ "CG", "Or\u00edl\u1eb9\u0301\u00e8de K\u00f3ng\u00f2" },
{ "CH", "Or\u00edl\u1eb9\u0301\u00e8de switi\u1e63ilandi" },
{ "CI", "Or\u00edl\u1eb9\u0301\u00e8de K\u00f3\u00fat\u00e8 for\u00e0" },
{ "CK", "Or\u00edl\u1eb9\u0301\u00e8de Et\u00edokun K\u00f9\u00fak\u00f9" },
{ "CL", "Or\u00edl\u1eb9\u0301\u00e8de \u1e63\u00edl\u00e8" },
{ "CM", "Or\u00edl\u1eb9\u0301\u00e8de Kamer\u00fa\u00fan\u00ec" },
{ "CN", "Oril\u1eb9\u0300-\u00e8d\u00e8 \u1e62\u00e1\u00edn\u00e0" },
{ "CO", "Or\u00edl\u1eb9\u0301\u00e8de K\u00f2l\u00f3m\u00edb\u00eca" },
{ "CR", "Or\u00edl\u1eb9\u0301\u00e8de Kuusita R\u00edk\u00e0" },
{ "CU", "Or\u00edl\u1eb9\u0301\u00e8de K\u00fab\u00e0" },
{ "CV", "Or\u00edl\u1eb9\u0301\u00e8de Et\u00edokun K\u00e1p\u00e9 f\u00e9nd\u00e8" },
{ "CY", "Or\u00edl\u1eb9\u0301\u00e8de K\u00far\u00fas\u00ec" },
{ "CZ", "Or\u00edl\u1eb9\u0301\u00e8de \u1e63\u1eb9\u0301\u1eb9\u0301k\u00ec" },
{ "DE", "Or\u00edl\u1eb9\u00e8d\u00e8 J\u00e1m\u00e1n\u00ec" },
{ "DJ", "Or\u00edl\u1eb9\u0301\u00e8de D\u00edb\u1ecd\u0301\u00f3t\u00ec" },
{ "DK", "Or\u00edl\u1eb9\u0301\u00e8de D\u1eb9\u0301m\u00e1k\u00ec" },
{ "DM", "Or\u00edl\u1eb9\u0301\u00e8de D\u00f2m\u00edn\u00edk\u00e0" },
{ "DO", "Oril\u1eb9\u0301\u00e8de D\u00f2m\u00edn\u00edk\u00e1n\u00ec" },
{ "DZ", "Or\u00edl\u1eb9\u0301\u00e8de \u00c0l\u00f9g\u00e8r\u00ed\u00e1n\u00ec" },
{ "EC", "Or\u00edl\u1eb9\u0301\u00e8de Eku\u00e1d\u00f2" },
{ "EE", "Or\u00edl\u1eb9\u0301\u00e8de Esitonia" },
{ "EG", "Or\u00edl\u1eb9\u0301\u00e8de \u00c9g\u00edp\u00edt\u00ec" },
{ "EH", "\u00ccw\u1ecd\u0300\u00f2\u00f2r\u00f9n S\u00e0h\u00e1r\u00e0" },
{ "ER", "Or\u00edl\u1eb9\u0301\u00e8de Eritira" },
{ "ES", "Or\u00edl\u1eb9\u0301\u00e8de Sipani" },
{ "ET", "Or\u00edl\u1eb9\u0301\u00e8de Etopia" },
{ "EU", "\u00cc\u1e63\u1ecd\u0300kan Y\u00far\u00f2p\u00f9" },
{ "FI", "Or\u00edl\u1eb9\u0301\u00e8de Filandi" },
{ "FJ", "Or\u00edl\u1eb9\u0301\u00e8de Fiji" },
{ "FK", "Or\u00edl\u1eb9\u0301\u00e8de Etikun Fakalandi" },
{ "FM", "Or\u00edl\u1eb9\u0301\u00e8de Makoronesia" },
{ "FR", "Or\u00edl\u1eb9\u0301\u00e8de Faranse" },
{ "GA", "Or\u00edl\u1eb9\u0301\u00e8de Gabon" },
{ "GB", "Or\u00edl\u1eb9\u0301\u00e8d\u00e8 G\u1eb9\u0300\u1eb9\u0301s\u00ec" },
{ "GD", "Or\u00edl\u1eb9\u0301\u00e8de Genada" },
{ "GE", "Or\u00edl\u1eb9\u0301\u00e8de G\u1ecdgia" },
{ "GF", "Or\u00edl\u1eb9\u0301\u00e8de Firen\u1e63i Guana" },
{ "GH", "Or\u00edl\u1eb9\u0301\u00e8de Gana" },
{ "GI", "Or\u00edl\u1eb9\u0301\u00e8de Gibaratara" },
{ "GL", "Or\u00edl\u1eb9\u0301\u00e8de Gerelandi" },
{ "GM", "Or\u00edl\u1eb9\u0301\u00e8de Gambia" },
{ "GN", "Or\u00edl\u1eb9\u0301\u00e8de Gene" },
{ "GP", "Or\u00edl\u1eb9\u0301\u00e8de Gadelope" },
{ "GQ", "Or\u00edl\u1eb9\u0301\u00e8de Ekutoria Gini" },
{ "GR", "Or\u00edl\u1eb9\u0301\u00e8de Geriisi" },
{ "GT", "Or\u00edl\u1eb9\u0301\u00e8de Guatemala" },
{ "GU", "Or\u00edl\u1eb9\u0301\u00e8de Guamu" },
{ "GW", "Or\u00edl\u1eb9\u0301\u00e8de Gene-Busau" },
{ "GY", "Or\u00edl\u1eb9\u0301\u00e8de Guyana" },
{ "HN", "Or\u00edl\u1eb9\u0301\u00e8de Hondurasi" },
{ "HR", "Or\u00edl\u1eb9\u0301\u00e8de K\u00f2r\u00f3\u00e1t\u00ed\u00e0" },
{ "HT", "Or\u00edl\u1eb9\u0301\u00e8de Haati" },
{ "HU", "Or\u00edl\u1eb9\u0301\u00e8de Hungari" },
{ "ID", "Or\u00edl\u1eb9\u0301\u00e8de Indonesia" },
{ "IE", "Or\u00edl\u1eb9\u0301\u00e8de Ailandi" },
{ "IL", "Or\u00edl\u1eb9\u0301\u00e8de Iser\u1eb9li" },
{ "IN", "Or\u00edl\u1eb9\u0301\u00e8de India" },
{ "IO", "Or\u00edl\u1eb9\u0301\u00e8de Et\u00edkun \u00cdnd\u00ed\u00e1n\u00ec ti \u00ccl\u00fa B\u00edr\u00edt\u00eds\u00ec" },
{ "IQ", "Or\u00edl\u1eb9\u0301\u00e8de Iraki" },
{ "IR", "Or\u00edl\u1eb9\u0301\u00e8de Irani" },
{ "IS", "Or\u00edl\u1eb9\u0301\u00e8de A\u1e63ilandi" },
{ "IT", "Or\u00edl\u1eb9\u0301\u00e8de It\u00e1li" },
{ "JM", "Or\u00edl\u1eb9\u0301\u00e8de Jamaika" },
{ "JO", "Or\u00edl\u1eb9\u0301\u00e8de J\u1ecddani" },
{ "JP", "Or\u00edl\u1eb9\u0301\u00e8de Japani" },
{ "KE", "Or\u00edl\u1eb9\u0301\u00e8de Kenya" },
{ "KG", "Or\u00edl\u1eb9\u0301\u00e8de Kuri\u1e63isitani" },
{ "KH", "Or\u00edl\u1eb9\u0301\u00e8de K\u00e0m\u00f9b\u00f3d\u00ed\u00e0" },
{ "KI", "Or\u00edl\u1eb9\u0301\u00e8de Kiribati" },
{ "KM", "Or\u00edl\u1eb9\u0301\u00e8de K\u00f2m\u00f2r\u00f3s\u00ec" },
{ "KN", "Or\u00edl\u1eb9\u0301\u00e8de Kiiti ati Neefi" },
{ "KP", "Or\u00edl\u1eb9\u0301\u00e8de Guusu K\u1ecdria" },
{ "KR", "Or\u00edl\u1eb9\u0301\u00e8de Ariwa K\u1ecdria" },
{ "KW", "Or\u00edl\u1eb9\u0301\u00e8de Kuweti" },
{ "KY", "Or\u00edl\u1eb9\u0301\u00e8de Et\u00edokun K\u00e1m\u00e1n\u00ec" },
{ "KZ", "Or\u00edl\u1eb9\u0301\u00e8de Ka\u1e63a\u1e63atani" },
{ "LA", "Or\u00edl\u1eb9\u0301\u00e8de Laosi" },
{ "LB", "Or\u00edl\u1eb9\u0301\u00e8de Lebanoni" },
{ "LC", "Or\u00edl\u1eb9\u0301\u00e8de Lu\u1e63ia" },
{ "LI", "Or\u00edl\u1eb9\u0301\u00e8de L\u1eb9\u1e63it\u1eb9nisiteni" },
{ "LK", "Or\u00edl\u1eb9\u0301\u00e8de Siri Lanka" },
{ "LR", "Or\u00edl\u1eb9\u0301\u00e8de Laberia" },
{ "LS", "Or\u00edl\u1eb9\u0301\u00e8de Lesoto" },
{ "LT", "Or\u00edl\u1eb9\u0301\u00e8de Lituania" },
{ "LU", "Or\u00edl\u1eb9\u0301\u00e8de Lusemogi" },
{ "LV", "Or\u00edl\u1eb9\u0301\u00e8de Latifia" },
{ "LY", "Or\u00edl\u1eb9\u0301\u00e8de Libiya" },
{ "MA", "Or\u00edl\u1eb9\u0301\u00e8de Moroko" },
{ "MC", "Or\u00edl\u1eb9\u0301\u00e8de Monako" },
{ "MD", "Or\u00edl\u1eb9\u0301\u00e8de Modofia" },
{ "MG", "Or\u00edl\u1eb9\u0301\u00e8de Madasika" },
{ "MH", "Or\u00edl\u1eb9\u0301\u00e8de Etikun M\u00e1\u1e63ali" },
{ "MK", "\u00c0r\u00edw\u00e1 Macedonia" },
{ "ML", "Or\u00edl\u1eb9\u0301\u00e8de Mali" },
{ "MM", "Or\u00edl\u1eb9\u0301\u00e8de Manamari" },
{ "MN", "Or\u00edl\u1eb9\u0301\u00e8de Mogolia" },
{ "MP", "Or\u00edl\u1eb9\u0301\u00e8de Etikun Guusu Mariana" },
{ "MQ", "Or\u00edl\u1eb9\u0301\u00e8de Matinikuwi" },
{ "MR", "Or\u00edl\u1eb9\u0301\u00e8de Maritania" },
{ "MS", "Or\u00edl\u1eb9\u0301\u00e8de Motserati" },
{ "MT", "Or\u00edl\u1eb9\u0301\u00e8de Malata" },
{ "MU", "Or\u00edl\u1eb9\u0301\u00e8de Maritiusi" },
{ "MV", "Or\u00edl\u1eb9\u0301\u00e8de Maladifi" },
{ "MW", "Or\u00edl\u1eb9\u0301\u00e8de Malawi" },
{ "MX", "Or\u00edl\u1eb9\u0301\u00e8de Mesiko" },
{ "MY", "Or\u00edl\u1eb9\u0301\u00e8de Malasia" },
{ "MZ", "Or\u00edl\u1eb9\u0301\u00e8de Mo\u1e63amibiku" },
{ "NA", "Or\u00edl\u1eb9\u0301\u00e8de Namibia" },
{ "NC", "Or\u00edl\u1eb9\u0301\u00e8de Kaledonia Titun" },
{ "NE", "Or\u00edl\u1eb9\u0301\u00e8de N\u00e0\u00ecj\u00e1" },
{ "NF", "Or\u00edl\u1eb9\u0301\u00e8de Etikun N\u1ecd\u0301\u00faf\u00f3k\u00ec" },
{ "NG", "Oril\u1eb9\u0300-\u00e8d\u00e8 N\u00e0\u00ecj\u00edr\u00ed\u00e0" },
{ "NI", "Or\u00edl\u1eb9\u0301\u00e8de NIkaragua" },
{ "NL", "Or\u00edl\u1eb9\u0301\u00e8de Nedalandi" },
{ "NO", "Or\u00edl\u1eb9\u0301\u00e8de N\u1ecd\u1ecdwii" },
{ "NP", "Or\u00edl\u1eb9\u0301\u00e8de Nepa" },
{ "NR", "Or\u00edl\u1eb9\u0301\u00e8de Nauru" },
{ "NU", "Or\u00edl\u1eb9\u0301\u00e8de Niue" },
{ "NZ", "Or\u00edl\u1eb9\u0301\u00e8de \u1e63ilandi Titun" },
{ "OM", "Or\u00edl\u1eb9\u0301\u00e8de \u1ecc\u1ecdma" },
{ "PA", "Or\u00edl\u1eb9\u0301\u00e8de Panama" },
{ "PE", "Or\u00edl\u1eb9\u0301\u00e8de Peru" },
{ "PF", "Or\u00edl\u1eb9\u0301\u00e8de Firen\u1e63i Polinesia" },
{ "PG", "Or\u00edl\u1eb9\u0301\u00e8de Paapu ti Giini" },
{ "PH", "Or\u00edl\u1eb9\u0301\u00e8de filipini" },
{ "PK", "Or\u00edl\u1eb9\u0301\u00e8de Pakisitan" },
{ "PL", "Or\u00edl\u1eb9\u0301\u00e8de Polandi" },
{ "PM", "Or\u00edl\u1eb9\u0301\u00e8de P\u1eb9\u1eb9ri ati mikuloni" },
{ "PN", "Or\u00edl\u1eb9\u0301\u00e8de Pikarini" },
{ "PR", "Or\u00edl\u1eb9\u0301\u00e8de P\u1ecdto Riko" },
{ "PS", "Agb\u00e8gb\u00e8 Pal\u1eb9s\u00edt\u00ed\u00e0n\u00f9" },
{ "PT", "Or\u00edl\u1eb9\u0301\u00e8de P\u1ecd\u0301t\u00fag\u00e0" },
{ "PW", "Or\u00edl\u1eb9\u0301\u00e8de Paalu" },
{ "PY", "Or\u00edl\u1eb9\u0301\u00e8de Paraguye" },
{ "QA", "Or\u00edl\u1eb9\u0301\u00e8de Kota" },
{ "RE", "Or\u00edl\u1eb9\u0301\u00e8de Riuniyan" },
{ "RO", "Or\u00edl\u1eb9\u0301\u00e8de Romaniya" },
{ "RU", "Or\u00edl\u1eb9\u0301\u00e8de R\u1ecd\u1e63ia" },
{ "RW", "Or\u00edl\u1eb9\u0301\u00e8de Ruwanda" },
{ "SA", "Or\u00edl\u1eb9\u0301\u00e8de Saudi Arabia" },
{ "SB", "Or\u00edl\u1eb9\u0301\u00e8de Etikun Solomoni" },
{ "SC", "Or\u00edl\u1eb9\u0301\u00e8de se\u1e63\u1eb9l\u1eb9si" },
{ "SD", "Or\u00edl\u1eb9\u0301\u00e8de Sudani" },
{ "SE", "Or\u00edl\u1eb9\u0301\u00e8de Swidini" },
{ "SG", "Or\u00edl\u1eb9\u0301\u00e8de Singapo" },
{ "SH", "Or\u00edl\u1eb9\u0301\u00e8de H\u1eb9lena" },
{ "SI", "Or\u00edl\u1eb9\u0301\u00e8de Silofania" },
{ "SK", "Or\u00edl\u1eb9\u0301\u00e8de Silofakia" },
{ "SL", "Or\u00edl\u1eb9\u0301\u00e8de Siria looni" },
{ "SM", "Or\u00edl\u1eb9\u0301\u00e8de Sani Marino" },
{ "SN", "Or\u00edl\u1eb9\u0301\u00e8de S\u1eb9n\u1eb9ga" },
{ "SO", "Or\u00edl\u1eb9\u0301\u00e8de Somalia" },
{ "SR", "Or\u00edl\u1eb9\u0301\u00e8de Surinami" },
{ "SS", "G\u00fa\u00fas\u00f9 Sudan" },
{ "ST", "Or\u00edl\u1eb9\u0301\u00e8de Sao tomi ati pirii\u1e63ipi" },
{ "SV", "Or\u00edl\u1eb9\u0301\u00e8de \u1eb8\u1eb9s\u00e1f\u00e1d\u00f2" },
{ "SY", "Or\u00edl\u1eb9\u0301\u00e8de Siria" },
{ "SZ", "Or\u00edl\u1eb9\u0301\u00e8de Sa\u1e63iland" },
{ "TC", "Or\u00edl\u1eb9\u0301\u00e8de T\u1ecd\u1ecdki ati Etikun Kak\u1ecdsi" },
{ "TD", "Or\u00edl\u1eb9\u0301\u00e8de \u1e63\u00e0\u00e0d\u00ec" },
{ "TF", "Agb\u00e8gb\u00e8 G\u00fa\u00fas\u00f9 Faran\u1e63\u00e9" },
{ "TG", "Or\u00edl\u1eb9\u0301\u00e8de Togo" },
{ "TH", "Or\u00edl\u1eb9\u0301\u00e8de Tailandi" },
{ "TJ", "Or\u00edl\u1eb9\u0301\u00e8de Takisitani" },
{ "TK", "Or\u00edl\u1eb9\u0301\u00e8de Tokelau" },
{ "TL", "Or\u00edl\u1eb9\u0301\u00e8de \u00ccl\u00e0O\u00f2r\u00f9n T\u00edm\u1ecd\u0300" },
{ "TM", "Or\u00edl\u1eb9\u0301\u00e8de T\u1ecd\u1ecdkimenisita" },
{ "TN", "Or\u00edl\u1eb9\u0301\u00e8de Tuni\u1e63ia" },
{ "TO", "Or\u00edl\u1eb9\u0301\u00e8de Tonga" },
{ "TR", "Or\u00edl\u1eb9\u0301\u00e8de T\u1ecd\u1ecdki" },
{ "TT", "Or\u00edl\u1eb9\u0301\u00e8de Tirinida ati Tobaga" },
{ "TV", "Or\u00edl\u1eb9\u0301\u00e8de Tufalu" },
{ "TW", "Or\u00edl\u1eb9\u0301\u00e8de Taiwani" },
{ "TZ", "Or\u00edl\u1eb9\u0301\u00e8de T\u00e0\u01f9s\u00e1n\u00ed\u00e0" },
{ "UA", "Or\u00edl\u1eb9\u0301\u00e8de Ukarini" },
{ "UG", "Or\u00edl\u1eb9\u0301\u00e8de Uganda" },
{ "UN", "\u00cc\u1e63\u1ecd\u0300kan \u00e0gb\u00e1y\u00e9" },
{ "US", "Or\u00edl\u1eb9\u0300-\u00e8d\u00e8 Am\u1eb9rik\u00e0" },
{ "UY", "Or\u00edl\u1eb9\u0301\u00e8de Nruguayi" },
{ "UZ", "Or\u00edl\u1eb9\u0301\u00e8de N\u1e63ib\u1eb9kisitani" },
{ "VA", "\u00ccl\u00fa Vatican" },
{ "VC", "Or\u00edl\u1eb9\u0301\u00e8de Fis\u1eb9nnti ati Genadina" },
{ "VE", "Or\u00edl\u1eb9\u0301\u00e8de F\u1eb9n\u1eb9\u1e63u\u1eb9la" },
{ "VG", "Or\u00edl\u1eb9\u0301\u00e8de Et\u00edkun F\u00e1g\u00edn\u00ec ti \u00ecl\u00fa B\u00edr\u00edt\u00eds\u00ec" },
{ "VI", "Or\u00edl\u1eb9\u0301\u00e8de Etikun Fagini ti Am\u1eb9rika" },
{ "VN", "Or\u00edl\u1eb9\u0301\u00e8de F\u1eb9tinami" },
{ "VU", "Or\u00edl\u1eb9\u0301\u00e8de Faniatu" },
{ "WF", "Or\u00edl\u1eb9\u0301\u00e8de Wali ati futuna" },
{ "WS", "Or\u00edl\u1eb9\u0301\u00e8de Sam\u1ecd" },
{ "XK", "K\u00f2s\u00f3f\u00f2" },
{ "YE", "Or\u00edl\u1eb9\u0301\u00e8de yemeni" },
{ "YT", "Or\u00edl\u1eb9\u0301\u00e8de Mayote" },
{ "ZA", "G\u00fa\u00fa\u1e63\u00f9 \u00c1f\u00edr\u00edk\u00e0" },
{ "ZM", "Or\u00edl\u1eb9\u0301\u00e8de \u1e63amibia" },
{ "ZW", "Or\u00edl\u1eb9\u0301\u00e8de \u1e63imibabe" },
{ "ZZ", "\u00c0gb\u00e8gb\u00e8 \u00e0\u00ecm\u1ecd\u0300" },
{ "af", "\u00c8d\u00e8 Afrikani" },
{ "ak", "\u00c8d\u00e8 Akani" },
{ "am", "\u00c8d\u00e8 Amariki" },
{ "ar", "\u00c8d\u00e8 \u00c1r\u00e1b\u00eck\u00ec" },
{ "as", "Ti Assam" },
{ "az", "\u00c8d\u00e8 Azerbaijani" },
{ "be", "\u00c8d\u00e8 Belarusi" },
{ "bg", "\u00c8d\u00e8 Bugaria" },
{ "bn", "\u00c8d\u00e8 Bengali" },
{ "br", "\u00c8d\u00e8 Bretoni" },
{ "bs", "\u00c8d\u00e8 Bosnia" },
{ "ca", "\u00c8d\u00e8 Catala" },
{ "cs", "\u00c8d\u00e8 seeki" },
{ "cy", "\u00c8d\u00e8 Welshi" },
{ "da", "\u00c8d\u00e8 Il\u1eb9\u0300 Denmark" },
{ "de", "\u00c8d\u00e8 J\u00e1m\u00e1n\u00ec" },
{ "el", "\u00c8d\u00e8 Giriki" },
{ "en", "\u00c8d\u00e8 G\u1eb9\u0300\u1eb9\u0301s\u00ec" },
{ "eo", "\u00c8d\u00e8 Esperanto" },
{ "es", "\u00c8d\u00e8 S\u00edp\u00e1n\u00ed\u00ec\u1e63\u00ec" },
{ "et", "\u00c8d\u00e8 Estonia" },
{ "eu", "\u00c8d\u00e8 Baski" },
{ "fa", "\u00c8d\u00e8 Pasia" },
{ "ff", "\u00c8d\u00e8 F\u00fal\u00e0n\u00ed" },
{ "fi", "\u00c8d\u00e8 Finisi" },
{ "fo", "\u00c8d\u00e8 Faroesi" },
{ "fr", "\u00c8d\u00e8 Farans\u00e9" },
{ "fy", "\u00c8d\u00e8 Frisia" },
{ "ga", "\u00c8d\u00e8 Ireland" },
{ "gd", "\u00c8d\u00e8 Gaelik ti Ilu Scotland" },
{ "gl", "\u00c8d\u00e8 Galicia" },
{ "gn", "\u00c8d\u00e8 Guarani" },
{ "gu", "\u00c8d\u00e8 Gujarati" },
{ "ha", "\u00c8d\u00e8 Hausa" },
{ "he", "\u00c8d\u00e8 Heberu" },
{ "hi", "\u00c8d\u00e8 H\u00ed\u0144d\u00ec" },
{ "hr", "\u00c8d\u00e8 Kroatia" },
{ "hu", "\u00c8d\u00e8 Hungaria" },
{ "hy", "\u00c8d\u00e8 Ile Armenia" },
{ "ia", "\u00c8d\u00e8 pipo" },
{ "id", "\u00c8d\u00e8 Indon\u00e9\u1e63\u00ed\u00e0" },
{ "ie", "Iru \u00c8d\u00e8" },
{ "ig", "\u00c8d\u00e8 Y\u00edb\u00f2" },
{ "is", "\u00c8d\u00e8 Icelandic" },
{ "it", "\u00c8d\u00e8 \u00cdt\u00e1l\u00ec" },
{ "ja", "\u00c8d\u00e8 J\u00e0p\u00e1\u00e0n\u00f9" },
{ "jv", "\u00c8d\u00e8 Javanasi" },
{ "ka", "\u00c8d\u00e8 Georgia" },
{ "km", "\u00c8d\u00e8 kameri" },
{ "kn", "\u00c8d\u00e8 Kannada" },
{ "ko", "\u00c8d\u00e8 K\u00f2r\u00ed\u00e0" },
{ "la", "\u00c8d\u00e8 Latini" },
{ "lt", "\u00c8d\u00e8 Lithuania" },
{ "lv", "\u00c8d\u00e8 Latvianu" },
{ "mk", "\u00c8d\u00e8 Macedonia" },
{ "mr", "\u00c8d\u00e8 marathi" },
{ "ms", "\u00c8d\u00e8 Malaya" },
{ "mt", "\u00c8d\u00e8 Malta" },
{ "my", "\u00c8d\u00e8 Bumiisi" },
{ "ne", "\u00c8d\u00e8 Nepali" },
{ "nl", "\u00c8d\u00e8 D\u1ecd\u0301\u1ecd\u0300\u1e63\u00ec" },
{ "no", "\u00c8d\u00e8 Norway" },
{ "oc", "\u00c8d\u00e8 Occitani" },
{ "pa", "\u00c8d\u00e8 Punjabi" },
{ "pl", "\u00c8d\u00e8 P\u00f3l\u00e1\u01f9d\u00ec" },
{ "pt", "\u00c8d\u00e8 P\u1ecdtog\u00ed" },
{ "ro", "\u00c8d\u00e8 Romania" },
{ "ru", "\u00c8d\u00e8 R\u1ecd\u0301\u1e63\u00ed\u00e0" },
{ "rw", "\u00c8d\u00e8 Ruwanda" },
{ "sa", "\u00c8d\u00e8 awon ara Indo" },
{ "sd", "\u00c8d\u00e8 Sindhi" },
{ "sh", "\u00c8d\u00e8 Serbo-Croatiani" },
{ "si", "\u00c8d\u00e8 Sinhalese" },
{ "sk", "\u00c8d\u00e8 Slovaki" },
{ "sl", "\u00c8d\u00e8 Slovenia" },
{ "so", "\u00c8d\u00e8 ara Somalia" },
{ "sq", "\u00c8d\u00e8 Albania" },
{ "sr", "\u00c8d\u00e8 Serbia" },
{ "st", "\u00c8d\u00e8 Sesoto" },
{ "su", "\u00c8d\u00e8 Sudani" },
{ "sv", "\u00c8d\u00e8 Suwidiisi" },
{ "sw", "\u00c8d\u00e8 Swahili" },
{ "ta", "\u00c8d\u00e8 Tamili" },
{ "te", "\u00c8d\u00e8 Telugu" },
{ "th", "\u00c8d\u00e8 Tai" },
{ "ti", "\u00c8d\u00e8 Tigrinya" },
{ "tk", "\u00c8d\u00e8 Turkmen" },
{ "tr", "\u00c8d\u00e8 T\u1ecd\u1ecdkisi" },
{ "uk", "\u00c8d\u00e8 Ukania" },
{ "ur", "\u00c8d\u00e8 Udu" },
{ "uz", "\u00c8d\u00e8 Uzbek" },
{ "vi", "\u00c8d\u00e8 Jetinamu" },
{ "xh", "\u00c8d\u00e8 Xhosa" },
{ "yi", "\u00c8d\u00e8 Yiddishi" },
{ "yo", "\u00c8d\u00e8 Yor\u00f9b\u00e1" },
{ "zh", "\u00c8d\u00e8 Mandarin t\u00ed w\u1ecd\u0301n \u0144 s\u1ecd l\u00f3r\u00edl\u1eb9\u0300-\u00e8d\u00e8 \u1e62\u00e1\u00edn\u00e0" },
{ "zu", "\u00c8d\u00e8 \u1e62ulu" },
{ "fil", "\u00c8d\u00e8 Filipino" },
{ "tlh", "\u00c8d\u00e8 Klingoni" },
{ "und", "\u00c8d\u00e8 \u00e0\u00ecm\u1ecd\u0300" },
{ "Arab", "\u00e8d\u00e8 L\u00e1r\u00fab\u00e1w\u00e1" },
{ "Cyrl", "\u00e8d\u00e8 il\u1eb9\u0300 R\u1ecd\u0301\u1e63\u00ed\u00e0" },
{ "Hans", "t\u00ed w\u1ecd\u0301n m\u00fa r\u1ecdr\u00f9n." },
{ "Hant", "Hans \u00e0t\u1ecdw\u1ecd\u0301d\u1ecd\u0301w\u1ecd\u0301" },
{ "Jpan", "\u00e8d\u00e8 j\u00e0p\u00e1\u00e0n\u00f9" },
{ "Kore", "K\u00f3r\u00ed\u00e0" },
{ "Latn", "\u00c8d\u00e8 L\u00e1t\u00ecn" },
{ "Zxxx", "Aik\u1ecdsil\u1eb9" },
{ "Zzzz", "\u00cc\u1e63\u1ecdw\u1ecd\u0301k\u1ecd\u0300w\u00e9 \u00e0\u00ecm\u1ecd\u0300" },
{ "de_AT", "\u00c8d\u00e8 J\u00e1m\u00e1n\u00ec (\u1ecc\u0301s\u00edr\u00ed\u00e0 )" },
{ "de_CH", "\u00c8d\u00e8 Il\u1eb9\u0300 J\u00e1m\u00e1n\u00ec (Or\u00edl\u1eb9\u0301\u00e8de sw\u00edts\u00e0land\u00ec)" },
{ "en_AU", "\u00c8d\u00e8 G\u1eb9\u0300\u1eb9\u0301s\u00ec (\u00f3r\u00edl\u1eb9\u0300-\u00e8d\u00e8 \u1eccsir\u00e9l\u00ed\u00e0)" },
{ "en_CA", "\u00c8d\u00e8 G\u1eb9\u0300\u1eb9\u0301s\u00ec (Or\u00edl\u1eb9\u0300-\u00e8d\u00e8 K\u00e1n\u00e1d\u00e0)" },
{ "en_GB", "\u00c8d\u00e8 \u00f2y\u00ecnb\u00f3 G\u1eb9\u0300\u1eb9\u0301s\u00ec" },
{ "es_ES", "\u00c8d\u00e8 S\u00edp\u00e1n\u00ed\u00ec\u1e63\u00ec (or\u00edl\u1eb9\u0300-\u00e8d\u00e8 Y\u00far\u00f3\u00f2p\u00f9)" },
{ "es_MX", "\u00c8d\u00e8 S\u00edp\u00e1n\u00ed\u00ec\u1e63\u00ec (or\u00edl\u1eb9\u0300-\u00e8d\u00e8 M\u1eb9\u0301s\u00edk\u00f2)" },
{ "fr_CA", "\u00c8d\u00e8 Farans\u00e9 (or\u00edl\u1eb9\u0300-\u00e8d\u00e8 K\u00e1n\u00e1d\u00e0)" },
{ "fr_CH", "\u00c8d\u00e8 Faran\u1e63\u00e9 (S\u00faw\u00eds\u00e0la\u01f9d\u00ec)" },
{ "pt_BR", "\u00c8d\u00e8 P\u1ecdtog\u00ed (Oril\u1eb9\u0300-\u00e8d\u00e8 Br\u00e0s\u00edl)" },
{ "pt_PT", "\u00c8d\u00e8 P\u1ecdtog\u00ed (or\u00edl\u1eb9\u0300-\u00e8d\u00e8 Y\u00far\u00f3\u00f2p\u00f9)" },
{ "es_419", "\u00c8d\u00e8 S\u00edp\u00e1n\u00ed\u00ec\u1e63\u00ec (or\u00edl\u1eb9\u0300-\u00e8d\u00e8 L\u00e1t\u00ecn-Am\u1eb9\u0301r\u00edk\u00e0) ( \u00c8d\u00e8 S\u00edp\u00e1n\u00ed\u00ecsh\u00ec (L\u00e1t\u00ecn-Am\u1eb9\u0301r\u00edk\u00e0)" },
{ "type.nu.latn", "D\u00edj\u00ed\u00edt\u00ec \u00ccw\u1ecd\u0300 O\u00f2r\u00f9n" },
{ "type.ca.iso8601", "K\u00e0l\u1eb9\u0301\u0144d\u00e0 ISO-8601" },
{ "type.co.standard", "\u00ccl\u00e0n\u00e0 On\u00edr\u00faur\u00fa \u00c8t\u00f2" },
{ "type.ca.gregorian", "K\u00e0l\u1eb9\u0301\u0144d\u00e0 Gregory" },
};
return data;
}
}
| [
"zeng-dream@live.com"
] | zeng-dream@live.com |
4a50782e6ff3b8d7eb6bad6d4c8b42ab36b6037a | 6e498099b6858eae14bf3959255be9ea1856f862 | /test/com/facebook/buck/testutil/endtoend/EndToEndHelper.java | 35c4e15d4df5698054ec33110fd1c35280f214ce | [
"Apache-2.0"
] | permissive | Bonnie1312/buck | 2dcfb0791637db675b495b3d27e75998a7a77797 | 3cf76f426b1d2ab11b9b3d43fd574818e525c3da | refs/heads/master | 2020-06-11T13:29:48.660073 | 2019-06-26T19:59:32 | 2019-06-26T21:06:24 | 193,979,660 | 2 | 0 | Apache-2.0 | 2019-09-22T07:23:56 | 2019-06-26T21:24:33 | Java | UTF-8 | Java | false | false | 1,805 | java | /*
* Copyright 2018-present Facebook, Inc.
*
* 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.facebook.buck.testutil.endtoend;
import com.facebook.buck.core.model.BuildTarget;
import com.facebook.buck.core.model.BuildTargetFactory;
import com.facebook.buck.core.model.Flavor;
import com.facebook.buck.core.model.UserFlavor;
import com.facebook.buck.testutil.PlatformUtils;
import java.util.Optional;
/**
* Util class that provides various useful functions needed by many EndToEndTests and their
* components
*/
public class EndToEndHelper {
private static PlatformUtils platformUtils = PlatformUtils.getForPlatform();
// util class, no instances
private EndToEndHelper() {}
/**
* Given a fully qualified build target string, this will get the name for that target with
* appropriate flavours.
*/
public static String getProperBuildTarget(String target) {
BuildTarget buildTarget = BuildTargetFactory.newInstance(target);
Optional<String> platformFlavorName = platformUtils.getFlavor();
if (platformFlavorName.isPresent()) {
Flavor platformFlavor = UserFlavor.of(platformFlavorName.get(), platformFlavorName.get());
buildTarget = buildTarget.withFlavors(platformFlavor);
}
return buildTarget.getFullyQualifiedName();
}
}
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
6018e21538bfbcd7151dc587a55299d709a3928e | 4fdde1645222cb7a63924737fb5d0da1fedfa127 | /dde/src/ua/com/integer/dde/res/load/descriptor/CompositePathDescriptor.java | bdeb867230180c5f1a263c1efaf3ef72531c8cb4 | [] | no_license | 1nt3g3r/dde-legacy | 3e088b26a33c7e06163517c9b90f938c60fa4a0e | 3950c6d2ca0342c6f2a694ed2fe2c5b43b903740 | refs/heads/master | 2021-01-12T21:07:32.630187 | 2015-10-21T14:24:32 | 2015-10-21T14:24:32 | 27,767,107 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,014 | java | package ua.com.integer.dde.res.load.descriptor;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.utils.Array;
public class CompositePathDescriptor extends PathDescriptor {
private Array<PathDescriptor> descriptors = new Array<PathDescriptor>();
public void addDescriptor(PathDescriptor descriptor) {
descriptors.add(descriptor);
}
public Array<PathDescriptor> getDescriptors() {
return descriptors;
}
public FileHandle getDirectory() {
return null;
};
@Override
public FileHandle getFile(String name) {
for(PathDescriptor descriptor: descriptors) {
FileHandle dir = descriptor.getDirectory();
if (dir != null) {
FileHandle handle = dir.child(name);
if (handle.exists()) {
return handle;
}
}
}
return null;
}
public static CompositePathDescriptor multiple(PathDescriptor ... multipleDescriptors) {
CompositePathDescriptor result = new CompositePathDescriptor();
result.descriptors.addAll(multipleDescriptors);
return result;
}
}
| [
"cadet.ua@xakep.ru"
] | cadet.ua@xakep.ru |
bc190165c1d25803c412cfda5ffafa3b9ba06d96 | e6d4ed0797b06784996361f5ee081ba01ba67091 | /src/finalProject/GUI/Buttons.java | 3d02b7fd66f37325fa87ca9061bb34a808569b04 | [] | no_license | DalidaMartinez/Princesa-Peach | 1a2403a2fc3024f592e4ba9f5f77221c25902244 | d57c6e1e1d9dbd1dcdfb0ea72c093783598be99e | refs/heads/master | 2020-07-08T10:11:32.126302 | 2016-09-27T17:59:57 | 2016-09-27T17:59:57 | 66,753,022 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,469 | java | package finalProject.GUI;
import java.awt.Color;
import java.awt.Graphics;
import finalProject.Game;
import java.awt.FontMetrics;
import java.awt.Font;
public class Buttons {
public int x,y;
public int width,height;
public String label;
public Buttons(int x, int y, int width, int height, String label) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
this.label = label;
}
public void draw(Graphics g){
g.setColor(Color.WHITE);
g.setFont(new Font("Courier",Font.BOLD,40));
FontMetrics fm = g.getFontMetrics();
int stringX = (getWidth() - fm.stringWidth(getLabel()))/2;
int stringY = (fm.getAscent() + getHeight() - fm.getAscent() + fm.getDescent())/2;
g.drawString(getLabel(), getX()+stringX, getY()+stringY);
}
public void TriggerEvent(){
if(getLabel().toLowerCase().contains("start")){
Game.playing = true;
}else if(getLabel().toLowerCase().contains("exit")) System.exit(0);
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}
| [
"dalidamartinez@gmail.com"
] | dalidamartinez@gmail.com |
51b7de2e94cf19d77501c35d362be07b3f3bf3dc | 0b9e43822d6cf33153802f3873a14dd6d1c42c07 | /app/src/main/java/com/example/veloxigami/pari/ViewPagerAdapter.java | 168b606418c9e59b74056512e84bd09e86ecf400 | [] | no_license | Veloxigami/ChatApp | 8db35c2e6e40854b5f0aaab9765bdf2ee6931998 | 667a1675f2323335df5ff2dcc4fc37415cbfd8cc | refs/heads/master | 2020-03-13T06:07:05.336546 | 2018-04-25T12:09:53 | 2018-04-25T12:09:53 | 130,997,759 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 926 | java | package com.example.veloxigami.pari;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import java.util.ArrayList;
/**
* Created by Anil on 25-04-2018.
*/
public class ViewPagerAdapter extends FragmentPagerAdapter {
ArrayList<Fragment> fragments = new ArrayList<>();
ArrayList<String> tabTitles = new ArrayList<>();
public void addFragments(Fragment frag, String title){
fragments.add(frag);
tabTitles.add(title);
}
public ViewPagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
return fragments.get(position);
}
@Override
public int getCount() {
return fragments.size();
}
@Override
public CharSequence getPageTitle(int position) {
return tabTitles.get(position);
}
}
| [
"mysevenfighters@gmail.com"
] | mysevenfighters@gmail.com |
3dc11f318f069fc0895dcd453be3a0a42a335f1e | 4f67cda43c6163e89707a0281e3f5cdb17cadbb4 | /Hibernate-Projekt/src/vae/Traveler.java | dde3816e131fe779dc3f723e0d594ef57a07aded | [] | no_license | MarvinJWendt/hhn-vae-abgabe | 7cf7f15e3a1b61f7828359c4b75ef7661f485fa3 | 4ac85730ba9ee967acbd6de02c23db15cc3f2c4d | refs/heads/master | 2023-02-01T01:22:47.684101 | 2020-12-21T11:24:20 | 2020-12-21T11:24:20 | 323,305,809 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,432 | java | /**
* "Visual Paradigm: DO NOT MODIFY THIS FILE!"
*
* This is an automatic generated file. It will be regenerated every time
* you generate persistence class.
*
* Modifying its content may cause the program not work, or your work may lost.
*/
/**
* Licensee: Marvin Wendt(Hochschule Heilbronn)
* License Type: Academic
*/
package vae;
import java.io.Serializable;
import javax.persistence.*;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="Traveler")
public class Traveler extends vae.User implements Serializable {
public Traveler() {
}
private java.util.Set this_getSet (int key) {
if (key == ORMConstants.KEY_TRAVELER_TRIP) {
return ORM_trip;
}
else if (key == ORMConstants.KEY_TRAVELER_REVIEW) {
return ORM_review;
}
else if (key == ORMConstants.KEY_TRAVELER_MEDICAL_PROVIDER) {
return ORM_medical_provider;
}
return null;
}
private void this_setOwner(Object owner, int key) {
if (key == ORMConstants.KEY_TRAVELER_TRAVEL_SERVICE) {
this.travel_service = (vae.Insurance) owner;
}
}
@Transient
org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
public java.util.Set getSet(int key) {
return this_getSet(key);
}
public void setOwner(Object owner, int key) {
this_setOwner(owner, key);
}
};
@ManyToOne(targetEntity=vae.Insurance.class, fetch=FetchType.LAZY)
@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})
@JoinColumns(value={ @JoinColumn(name="InsuranceId", referencedColumnName="Id") }, foreignKey=@ForeignKey(name="buy"))
private vae.Insurance travel_service;
@OneToMany(mappedBy="traveler", targetEntity=vae.Trip.class)
@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})
@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)
private java.util.Set ORM_trip = new java.util.HashSet();
@ManyToMany(mappedBy="ORM_evaluator", targetEntity=vae.Review.class)
@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})
@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)
private java.util.Set ORM_review = new java.util.HashSet();
@ManyToMany(mappedBy="ORM_patient", targetEntity=vae.MedicalHelp.class)
@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})
@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)
private java.util.Set ORM_medical_provider = new java.util.HashSet();
private void setORM_Trip(java.util.Set value) {
this.ORM_trip = value;
}
private java.util.Set getORM_Trip() {
return ORM_trip;
}
@Transient
public final vae.TripSetCollection trip = new vae.TripSetCollection(this, _ormAdapter, ORMConstants.KEY_TRAVELER_TRIP, ORMConstants.KEY_TRIP_TRAVELER, ORMConstants.KEY_MUL_ONE_TO_MANY);
private void setORM_Review(java.util.Set value) {
this.ORM_review = value;
}
private java.util.Set getORM_Review() {
return ORM_review;
}
@Transient
public final vae.ReviewSetCollection review = new vae.ReviewSetCollection(this, _ormAdapter, ORMConstants.KEY_TRAVELER_REVIEW, ORMConstants.KEY_REVIEW_EVALUATOR, ORMConstants.KEY_MUL_MANY_TO_MANY);
private void setORM_Medical_provider(java.util.Set value) {
this.ORM_medical_provider = value;
}
private java.util.Set getORM_Medical_provider() {
return ORM_medical_provider;
}
@Transient
public final vae.MedicalHelpSetCollection medical_provider = new vae.MedicalHelpSetCollection(this, _ormAdapter, ORMConstants.KEY_TRAVELER_MEDICAL_PROVIDER, ORMConstants.KEY_MEDICALHELP_PATIENT, ORMConstants.KEY_MUL_MANY_TO_MANY);
public void setTravel_service(vae.Insurance value) {
if (travel_service != null) {
travel_service.traveler.remove(this);
}
if (value != null) {
value.traveler.add(this);
}
}
public vae.Insurance getTravel_service() {
return travel_service;
}
/**
* This method is for internal use only.
*/
public void setORM_Travel_service(vae.Insurance value) {
this.travel_service = value;
}
private vae.Insurance getORM_Travel_service() {
return travel_service;
}
public String toString() {
return super.toString();
}
}
| [
"git@marvinjwendt.com"
] | git@marvinjwendt.com |
2ff12b3ea551e5b478f0b48fd7f06682442807ac | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MATH-58b-2-15-MOEAD-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/analysis/function/Gaussian$Parametric_ESTest_scaffolding.java | c247102eef838101a5823cf8ac202b00f7b42a88 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,113 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Apr 08 09:31:38 UTC 2020
*/
package org.apache.commons.math.analysis.function;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class Gaussian$Parametric_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.analysis.function.Gaussian$Parametric";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Gaussian$Parametric_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.math.exception.util.Localizable",
"org.apache.commons.math.exception.NumberIsTooSmallException",
"org.apache.commons.math.analysis.function.Gaussian$Parametric",
"org.apache.commons.math.exception.MathRuntimeException",
"org.apache.commons.math.exception.MathIllegalArgumentException",
"org.apache.commons.math.exception.NullArgumentException",
"org.apache.commons.math.analysis.ParametricUnivariateRealFunction",
"org.apache.commons.math.util.FastMath",
"org.apache.commons.math.exception.DimensionMismatchException",
"org.apache.commons.math.exception.NotStrictlyPositiveException",
"org.apache.commons.math.exception.util.LocalizedFormats",
"org.apache.commons.math.exception.util.MessageFactory",
"org.apache.commons.math.exception.MathIllegalNumberException",
"org.apache.commons.math.exception.MathThrowable",
"org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction",
"org.apache.commons.math.analysis.UnivariateRealFunction",
"org.apache.commons.math.analysis.function.Gaussian",
"org.apache.commons.math.exception.util.ArgUtils"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
eae6edc60a4ac8f89d4872b9f1592a6ed07e0ba6 | c290e52a11124ba364f9561a3946ddacb6045b40 | /test/ApplicationTest.java | d824e8e021947bf167c1b01235e7d26a53a07fd4 | [
"Apache-2.0"
] | permissive | jrunde/Distillation-Simulation | b2c3365f8c6b830b88701f4edf9290442abcd277 | 948fd63b458c2bcf7f0675dd7c380f98c4436ae3 | refs/heads/master | 2021-01-25T03:48:26.800462 | 2016-02-29T17:21:17 | 2016-02-29T17:21:17 | 35,841,670 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 913 | java | import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.databind.JsonNode;
import org.junit.*;
import play.mvc.*;
import play.test.*;
import play.data.DynamicForm;
import play.data.validation.ValidationError;
import play.data.validation.Constraints.RequiredValidator;
import play.i18n.Lang;
import play.libs.F;
import play.libs.F.*;
import play.twirl.api.Content;
import static play.test.Helpers.*;
import static org.fest.assertions.Assertions.*;
/**
*
* Simple (JUnit) tests that can call all parts of a play app.
* If you are interested in mocking a whole application, see the wiki for more details.
*
*/
public class ApplicationTest {
@Test
public void simpleCheck() {
int a = 1 + 1;
assertThat(a).isEqualTo(2);
}
@Test
public void renderTemplate() {
// Write a render test
}
}
| [
"jrunde@glbrc.wisc.edu"
] | jrunde@glbrc.wisc.edu |
96de2fbb16003f9e230519a686b579a8f5ab286e | e9a0c84f79d8896d40bdd76fb4ce3c5ebccfe2de | /mediator_demo/Plane.java | 44c68fd9d102fbc396a057a6b7fec092219665c1 | [] | no_license | SailorJerry88/Mediator_Pattern_training | 6f45c8e999f2e12a2d8e49efedc571616d95e385 | a0c25f40dcc983a9967849039c5379c7cf72fb7c | refs/heads/master | 2020-08-28T21:56:08.259877 | 2019-10-27T11:22:30 | 2019-10-27T11:22:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 350 | java | package c_czynnosciowe.mediator_demo;
public abstract class Plane {
ServiceMediator mediator1;
String name1;
public Plane(ServiceMediator mediator1,String name1){
this.mediator1 = mediator1;
this.name1 = name1;
}
public abstract void raportFuel(String rcf);
public abstract void receiveFuel(String rcf);
}
| [
"michalmycek@protonmail.com"
] | michalmycek@protonmail.com |
136f27095bd158426c5c1e11d8312c22585edff4 | cef6d4f1a0d17f35f0bce0d21c1901e5e2db62ed | /7 ProyectosAlumnos/TallerReparacion/TallerReparacion/TallerReparacion/src/tallerreparacion/ClienteData.java | 9c674939e930c3ace5c6f2281b207b5c593127a9 | [] | no_license | babolat22/cotorras | 11057e649cb5f3c4cb3656b9518d5e366292b218 | 3a4ab8f6e14401885ee66ab56bc56806a3593cef | refs/heads/master | 2023-07-31T19:47:06.084164 | 2021-09-16T02:01:55 | 2021-09-16T02:01:55 | 406,980,628 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,502 | java | /*
*/
package tallerreparacion;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
public class ClienteData {
private Connection con;
public ClienteData(Conexion conexion) {
try {
con = conexion.getConexion();
} catch (SQLException ex) {
System.out.println("Error al obtener la conexion");
}
}
public void guardarCliente(Cliente cliente){
try {
String sql = "INSERT INTO cliente (nombre, dni, domicilio, celular) VALUES ( ? , ? , ? , ? );";
PreparedStatement ps = con.prepareStatement(sql,Statement.RETURN_GENERATED_KEYS);
ps.setString(1, cliente.getNombre());
ps.setInt(2, cliente.getDni());
ps.setString(3, cliente.getDomicilio());
ps.setInt(4, cliente.getCelular());
ps.executeUpdate();
ResultSet rs = ps.getGeneratedKeys();
if (rs.next()) {
cliente.setId(rs.getInt(1));
} else {
System.out.println("No se pudo obtener el id luego de insertar un cliente");
}
ps.close();
} catch (SQLException ex) {
System.out.println("Error al insertar un cliente: " + ex.getMessage());
}
}
public void actualizarCliente(Cliente cliente){
try {
String sql = "UPDATE cliente SET nombre = ?, dni = ? , domicilio = ? , celular = ?";
PreparedStatement ps = con.prepareStatement(sql);
ps.setString(1, cliente.getNombre());
ps.setInt(2, cliente.getDni());
ps.setString(3, cliente.getDomicilio());
ps.setInt(4, cliente.getCelular());
ps.executeUpdate();
ps.close();
} catch (SQLException ex) {
System.out.println("Error al actualizar el cliente: " + ex.getMessage());
}
}
public Cliente buscarCliente(int dni){
Cliente cliente = null;
try {
String sql = "SELECT * FROM cliente WHERE dni = ? ;";
PreparedStatement ps = con.prepareStatement(sql);
ps.setInt(1, dni);
ResultSet resultSet=ps.executeQuery();
while(resultSet.next()){
cliente = new Cliente();
cliente.setNombre(resultSet.getString("nombre"));
cliente.setDni(resultSet.getInt("dni"));
cliente.setDomicilio(resultSet.getString("domicilio"));
cliente.setCelular(resultSet.getInt("celular"));
}
ps.close();
} catch (SQLException ex) {
System.out.println("Error al busca un cliente: " + ex.getMessage());
}
return cliente;
}
public List<Cliente> obtenerClientes(){
List<Cliente> clientes = new ArrayList<Cliente>();
try {
String sql = "SELECT * FROM Cliente;";
PreparedStatement ps = con.prepareStatement(sql);
ResultSet resultSet = ps.executeQuery();
Cliente cliente;
while(resultSet.next()){
cliente = new Cliente();
cliente.setNombre(resultSet.getString("nombre"));
cliente.setDni(resultSet.getInt("dni"));
cliente.setDomicilio(resultSet.getString("domicilio"));
cliente.setCelular(resultSet.getInt("celular"));
clientes.add(cliente);
}
ps.close();
} catch (SQLException ex) {
System.out.println("Error: " + ex.getMessage());
}
return clientes;
}
public void borrarCliente(int dni){
try {
String sql = "DELETE FROM cliente WHERE dni =?;";
PreparedStatement ps = con.prepareStatement(sql);
ps.setInt(1, dni);
ps.executeUpdate();
ps.close();
} catch (SQLException ex) {
System.out.println("Error al borrar un alumno: " + ex.getMessage());
}
}
}
| [
"jjsaez@ulp.edu.ar"
] | jjsaez@ulp.edu.ar |
027601dd9b295a1e36431e8f49b99b94bf18ea95 | c4a97da22aa00a5441e827ef3f3e8f622b2ad368 | /src/main/java/br/com/sematec/carrinho/controller/CarrinhoServlet.java | f36963145ea75d47d63a52604deccb5cac2734c7 | [] | no_license | andreycarmisini/carrinhojsp | af040a484e817b6c576abc288de841ded3f41d07 | 56ffdd52137f963139ffbd28304b04ce8b58ee45 | refs/heads/master | 2020-12-24T07:15:24.126690 | 2016-11-16T20:47:40 | 2016-11-16T20:47:40 | 73,377,182 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,419 | java | package br.com.sematec.carrinho.controller;
import java.io.IOException;
import java.util.logging.Logger;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import br.com.sematec.carrinho.dao.CarrinhoDAO;
import br.com.sematec.carrinho.dao.ItemDAO;
import br.com.sematec.carrinho.modelo.Item;
import br.com.sematec.carrinho.modelo.Usuario;
@WebServlet(urlPatterns = "/carrinho")
public class CarrinhoServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
private final Logger LOGGER = Logger.getLogger(CarrinhoServlet.class.getName());
public CarrinhoServlet() {
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String funcao = req.getParameter("funcao");
switch (funcao) {
case "remove":
remove(req, resp);
break;
case "lista":
lista(req, resp);
break;
default:
LOGGER.warning("função desconhecida:" + funcao);
break;
}
}
private void lista(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Usuario u = (Usuario) req.getSession().getAttribute("usuarioLogado");
req.setAttribute("carrinho", CarrinhoDAO.getCarrinhos().get(u));
String pagina = "/WEB-INF/jsp/carrinho/lista.jsp";
RequestDispatcher dispatcher = req.getRequestDispatcher(pagina);
dispatcher.forward(req, resp);
}
private void remove(HttpServletRequest req, HttpServletResponse resp) throws IOException {
String text;
if (req.getParameter("id") != null) {
String id = String.valueOf(req.getParameter("id"));
Usuario u = (Usuario) req.getSession().getAttribute("usuarioLogado");
for (Item i : CarrinhoDAO.getCarrinhos().get(u).getItens()) {
if (i.getId().equals(id)) {
CarrinhoDAO.remove(u, i);
ItemDAO.remove(u, i);
break;
}
}
req.setAttribute("carrinho", CarrinhoDAO.getCarrinhos().get(u));
req.getSession().setAttribute("carrinhoTotal", CarrinhoDAO.getCarrinhos().get(u).getTotal());
text = "Item removido com sucesso.";
} else {
text = "id do item a ser removido não foi informado.";
}
resp.setContentType("text/plain");
resp.setCharacterEncoding("UTF-8");
resp.getWriter().write(text);
}
}
| [
"andrey.carmisini"
] | andrey.carmisini |
a9e6ae1f0fa2f5920f57bb9843bf066d4f63f09d | d258c6f60095dcabd100c99528bfa61aaf234822 | /L10jdbc/src/main/java/com/massita/service/db/dao/DataSetDaoImpl.java | 29a1d115edac7da730b0118051784a8b91487bdf | [] | no_license | massita99/otus2 | a63860a2858740fade96ef60ee0c3ae80c617fec | 68b38064f2b4529f126e7507d7db845d634c1e17 | refs/heads/master | 2022-12-23T09:58:51.043420 | 2019-06-18T20:30:55 | 2019-06-18T20:30:55 | 165,940,142 | 0 | 0 | null | 2022-12-16T04:47:10 | 2019-01-15T23:35:07 | Java | UTF-8 | Java | false | false | 4,074 | java | package com.massita.service.db.dao;
import com.healthmarketscience.sqlbuilder.InsertQuery;
import com.healthmarketscience.sqlbuilder.dbspec.basic.DbSchema;
import com.healthmarketscience.sqlbuilder.dbspec.basic.DbSpec;
import com.healthmarketscience.sqlbuilder.dbspec.basic.DbTable;
import com.massita.service.db.executors.Executor;
import com.massita.model.DataSet;
import com.massita.util.ReflectionUtil;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import java.lang.reflect.Field;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
import java.util.stream.IntStream;
import static com.massita.service.db.executors.JdbcHelper.loadResultSetIntoObject;
@RequiredArgsConstructor
public class DataSetDaoImpl<T extends DataSet> implements DataSetDao<T> {
private final Connection connection;
private static final String SELECT_TABLE = "SELECT * FROM %s WHERE id = ?";
private final Map<Class<?>, PreparedStatement> saveStatementsCache = new HashMap<>();
private final Map<Class<?>, PreparedStatement> selectStatementsCache = new HashMap<>();
@Override
public void save(T user) {
final PreparedStatement statement = saveStatementsCache.computeIfAbsent(user.getClass(), this::getPreparedInsertQuery);
List<Object> fieldsValues = new LinkedList<>();
// add all object field values to fieldsValues list
ReflectionUtil.handleAllFields(user.getClass(), field -> {
try {
if (field.getName().equals("id")) {
fieldsValues.add(null);
} else{
fieldsValues.add(field.get(user));
}
} catch (IllegalAccessException e) {
throw new RuntimeException("Unable to read field: " + field.getName(), e);
}
});
//Set all fieldsValues to PreparedStatement
IntStream.rangeClosed(1, fieldsValues.size()).forEach(counter -> {
try {
int fieldIndex = counter - 1;
statement.setObject(counter, fieldsValues.get(fieldIndex));
} catch (SQLException e) {
throw new RuntimeException("Unable to create sql query for: " + user.toString(), e);
}
});
Executor.updatePrepared(statement);
}
@SneakyThrows
private PreparedStatement getPreparedInsertQuery(Class<?> aClass) {
DbSpec spec = new DbSpec();
DbSchema schema = spec.addDefaultSchema();
DbTable table = schema.addTable(aClass.getSimpleName());
InsertQuery insertOrderQuery = new InsertQuery(table);
insertOrderQuery.addCustomPreparedColumns(ReflectionUtil.getAllSerializableFields(aClass)
.stream()
.map(Field::getName).toArray());
return connection.prepareStatement(insertOrderQuery.validate().toString());
}
@Override
@SneakyThrows
public T load(long id, Class<T> clazz) {
final PreparedStatement statement = selectStatementsCache.computeIfAbsent(clazz, this::getPreparedSelectQuery);
statement.setLong(1, id);
return Executor.queryPreparedForClass(statement, this::extract, clazz);
}
@Override
public long count(Class<T> clazz) {
throw new UnsupportedOperationException();
}
@SneakyThrows
private PreparedStatement getPreparedSelectQuery(Class<?> clazz) {
return connection.prepareStatement(String.format(SELECT_TABLE, clazz.getSimpleName()));
}
private T extract(ResultSet resultSet, Class<T> clazz) throws SQLException {
//Query return nothing:
if (!resultSet.next()) {
return null;
}
try {
T t = clazz.newInstance();
loadResultSetIntoObject(resultSet, t);
return t;
} catch (InstantiationException | IllegalAccessException e) {
throw new RuntimeException("Unable to create record: " + e.getMessage(), e);
}
}
}
| [
"max.kilin@gmail.com"
] | max.kilin@gmail.com |
78ff613a9409eb038818e0e4a5679697b99dc8e8 | 0f62da3af56d3481db79ba7c1b6c561800aa847a | /src/main/java/de/tobaccoshop/admin/customer/exceptions/CustomerNotFoundException.java | 5649e1dd68ad85c4b7c5603e72428766f12eb289 | [] | no_license | sisekipp/Tobacco_Shop | a41c85a60e39b8ae29bbc3eb4aa0be96c865344e | bc32e26ee2952be7f417000e0c1e195c56e6445b | refs/heads/master | 2020-12-24T05:31:08.276043 | 2017-07-09T20:12:28 | 2017-07-09T20:12:28 | 52,518,569 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 363 | java | package de.tobaccoshop.admin.customer.exceptions;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
/**
* Created by sebastian on 06.05.16.
*/
@ResponseStatus(value= HttpStatus.NOT_FOUND, reason="Kunde konnte nicht gefunden werden.")
public class CustomerNotFoundException extends RuntimeException {
}
| [
"kipping.sebastian@gmail.com"
] | kipping.sebastian@gmail.com |
6725c7249571a19ff397b31841cacef9c1968561 | 93fe6282c5bfc1c8b643fb116e8ea1457b1080ea | /ds/linked lists/sorted-union-of-two-lists/sortUnion.java | d23949bbb86e2d58d5bf2ce637ba3e794a6c102d | [] | no_license | Madhav2108/ds-algo-dump | 83cd15c1f0c673a9da83d8cfaffd781d8ed0bad9 | 2ddecf09eeea21cfb31b16d56d28071bb6ba855d | refs/heads/master | 2022-12-20T23:58:23.257020 | 2020-09-30T18:46:23 | 2020-09-30T18:46:23 | 300,008,394 | 0 | 1 | null | 2020-09-30T18:46:25 | 2020-09-30T18:02:16 | Java | UTF-8 | Java | false | false | 2,859 | java | import java.util.*;
class Node {
int data;
Node next;
Node(int d) {
data = d;
next = null;
}
}
class GFG2 {
Node head, tail;
/* Function to print linked list */
void printList(Node head) {
Node temp = head;
while (temp != null) {
System.out.print(temp.data + " ");
temp = temp.next;
}
System.out.println();
}
/* Inserts a new Node at front of the list. */
public void addToTheLast(Node node) {
if (head == null) {
head = node;
tail = node;
} else {
tail.next = node;
tail = tail.next;
}
}
/* Drier program to test above functions */
public static void main(String args[]) {
/*
* Constructed Linked List is 1->2->3->4->5->6-> 7->8->8->9->null
*/
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
GFG2 llist1 = new GFG2();
int a1 = sc.nextInt();
Node head = new Node(a1);
llist1.addToTheLast(head);
for (int i = 1; i < n; i++) {
int a = sc.nextInt();
llist1.addToTheLast(new Node(a));
}
llist1.head = head;
n = sc.nextInt();
a1 = sc.nextInt();
GFG2 llist2 = new GFG2();
Node head2 = new Node(a1);
llist2.addToTheLast(head2);
llist2.head = head2;
for (int i = 1; i < n; i++) {
int a = sc.nextInt();
llist2.addToTheLast(new Node(a));
}
GFG obj = new GFG();
Node start = obj.findUnion(llist1.head, llist2.head);
llist1.printList(start);
}
}
}
class GFG {
Node findUnion(Node head1, Node head2) {
HashSet<Integer> set = new HashSet<Integer>();
// Add values to HashSet
while (true) {
if (head1 != null) {
set.add(head1.data);
head1 = head1.next;
}
if (head2 != null) {
set.add(head2.data);
head2 = head2.next;
}
if (head1 == null && head2 == null)
break;
}
// Sort HashSet
List<Integer> list = new ArrayList<Integer>(set);
Collections.sort(list);
// Store sorted set into linked list
Node node = new Node(0);
Node temp = node;
Iterator<Integer> itr = list.iterator();
while (itr.hasNext()) {
temp.next = new Node(itr.next());
temp = temp.next;
}
return node.next;
}
} | [
"noreply@github.com"
] | noreply@github.com |
7f2ca412b3ccc57eb95f2cd695b34ddf950fcb39 | bbdcd6b5285345f663b6ba2a5c6b1c82dde31730 | /server/game/src/main/java/com/wanniu/game/sevengoal/SevenGoalManager.java | 5d9c1de94f78083e7ad948aca0759bbf981565a2 | [] | no_license | daxingyou/yxdl | 644074e78a9bdacf351959b00dc06322953a08d7 | ac571f9ebfb5a76e0c00e8dc3deddb5ea8c00b61 | refs/heads/master | 2022-12-23T02:25:23.967485 | 2020-09-27T09:05:34 | 2020-09-27T09:05:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 17,601 | java | package com.wanniu.game.sevengoal;
import com.wanniu.core.game.LangService;
import com.wanniu.core.game.entity.GEntity;
import com.wanniu.core.logfs.Out;
import com.wanniu.core.util.DateUtils;
import com.wanniu.game.GWorld;
import com.wanniu.game.common.Const;
import com.wanniu.game.common.ConstsTR;
import com.wanniu.game.common.DateUtils;
import com.wanniu.game.common.ModuleManager;
import com.wanniu.game.data.GameData;
import com.wanniu.game.data.SevDayTaskCO;
import com.wanniu.game.data.SevTaskInsCO;
import com.wanniu.game.data.ext.SevTaskRewardExt;
import com.wanniu.game.item.ItemUtil;
import com.wanniu.game.item.NormalItem;
import com.wanniu.game.player.GlobalConfig;
import com.wanniu.game.player.WNPlayer;
import com.wanniu.game.poes.SevenGoalPO;
import com.wanniu.redis.PlayerPOManager;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import pomelo.area.PlayerHandler;
import pomelo.sevengoal.SevenGoalHandler;
public class SevenGoalManager
extends ModuleManager {
public WNPlayer player;
public SevenGoalPO sevenGoalPO;
public enum SevenGoalTaskType {
MOUNT_UPGRADE_LV(1),
SOLO_ANTICIPATE(2),
ADD_FRIEND(3),
PAY_COUNT(4),
PET_UPGRADE_UPLV(5),
EQUIP_STRENTHEN_COUNT(6),
FIVE_MOUNTAIN_ANTICIPATE(7),
COST_DIAMOND_COUNT(8),
FIGHTPOWER_TO(9),
GEM_COMBINE_COUNT(10),
TRIAL_ANTICIPATE(11),
COST_DIAMOND_OR_BINDDIAMOND_COUNT(12),
EQUIP_REFINE_COUNT(13),
EQUIP_REBORN_COUNT(14),
EQUIP_REBUILD_COUNT(15),
DEMON_TOWER_COUNT(16),
AREA_BOSS_KILL_COUNT(17),
LEVEL_TO(18),
XIANYUAN_TO(19),
GUILD_BOSS_COUNT(20),
ILLUSION2_COUNT(21);
final int value;
SevenGoalTaskType(int value) {
this.value = value;
}
public static SevenGoalTaskType getType(int value) {
for (SevenGoalTaskType sevenGoalTaskType : values()) {
if (sevenGoalTaskType.value == value) {
return sevenGoalTaskType;
}
}
return null;
}
}
public SevenGoalManager(WNPlayer player) {
this.player = player;
this.sevenGoalPO = (SevenGoalPO) PlayerPOManager.findPO(ConstsTR.SevenGoal, player.getId(), SevenGoalPO.class);
if (this.sevenGoalPO == null) {
this.sevenGoalPO = new SevenGoalPO();
PlayerPOManager.put(ConstsTR.SevenGoal, player.getId(), (GEntity) this.sevenGoalPO);
}
}
public LocalDateTime getStartDateTime() {
Instant startInstant = null;
try {
startInstant = DateUtils.parse(GlobalConfig.SevenGoal_Begin, "yyyy-MM-dd HH:mm:ss").toInstant();
} catch (Exception exception) {
}
LocalDateTime startDateTime = LocalDateTime.ofInstant(startInstant, ZoneId.systemDefault());
startDateTime.toLocalDate().atTime(5, 0);
if (GWorld.OPEN_SERVER_DATE.atTime(5, 0).isAfter(startDateTime)) {
startDateTime = GWorld.OPEN_SERVER_DATE.atTime(5, 0);
}
return startDateTime;
}
public LocalDateTime getEndDateTime() {
return getStartDateTime().plus(GlobalConfig.SevenGoal_Continued, ChronoUnit.HOURS);
}
public boolean isActive() {
Instant startInstant = null;
try {
startInstant = DateUtils.parse(GlobalConfig.SevenGoal_Begin, "yyyy-MM-dd HH:mm:ss").toInstant();
} catch (Exception e) {
e.printStackTrace();
}
LocalDateTime startDateTime = LocalDateTime.ofInstant(startInstant, ZoneId.systemDefault());
startDateTime.toLocalDate().atTime(5, 0);
if (GWorld.OPEN_SERVER_DATE.atTime(5, 0).isAfter(startDateTime)) {
startDateTime = GWorld.OPEN_SERVER_DATE.atTime(5, 0);
}
int durationHour = GlobalConfig.SevenGoal_Continued;
LocalDateTime endDateTime = startDateTime.plus(durationHour, ChronoUnit.HOURS);
if (LocalDateTime.now().isBefore(startDateTime)) {
return false;
}
if (LocalDateTime.now().isAfter(endDateTime)) {
return false;
}
return true;
}
private int getDayId() {
Instant startInstant = null;
try {
startInstant = DateUtils.parse(GlobalConfig.SevenGoal_Begin, "yyyy-MM-dd HH:mm:ss").toInstant();
} catch (Exception e) {
e.printStackTrace();
}
LocalDate startDate = LocalDateTime.ofInstant(startInstant, ZoneId.systemDefault()).toLocalDate();
if (GWorld.OPEN_SERVER_DATE.isAfter(startDate)) {
startDate = GWorld.OPEN_SERVER_DATE;
}
return (int) ChronoUnit.DAYS.between(startDate, LocalDate.now()) + 1;
}
public void checkData() {
if (GlobalConfig.SevenGoal_CurrentTurn != this.sevenGoalPO.currentTurn) {
this.sevenGoalPO.reset(GlobalConfig.SevenGoal_CurrentTurn);
initData();
}
}
public SevenGoalHandler.GetSevenGoalResponse.Builder getSevenGoal() {
checkData();
SevenGoalHandler.GetSevenGoalResponse.Builder builder = SevenGoalHandler.GetSevenGoalResponse.newBuilder();
for (DayInfo dayInfo : this.sevenGoalPO.dayInfoMap.values()) {
SevenGoalHandler.DayInfo.Builder dayinfoBuilder = SevenGoalHandler.DayInfo.newBuilder();
dayinfoBuilder.setDayId(dayInfo.dayId);
for (TaskInfo taskInfo : dayInfo.taskMap.values()) {
SevenGoalHandler.TaskInfo.Builder taskInfoBuilder = SevenGoalHandler.TaskInfo.newBuilder();
taskInfoBuilder.setTaskId(taskInfo.taskId);
taskInfoBuilder.setFinishedNum(taskInfo.finishedNum);
dayinfoBuilder.addTaskInfo(taskInfoBuilder);
}
dayinfoBuilder.setFetched(dayInfo.fetched);
builder.addDayInfo(dayinfoBuilder);
}
builder.setCurrentDayId(getDayId());
builder.setStartTimestamp(getStartDateTime().format(DateUtils.F_YYYYMMDDHHMMSS));
builder.setEndTimestamp(getEndDateTime().format(DateUtils.F_YYYYMMDDHHMMSS));
builder.setS2CCode(200);
Out.error(new Object[]{builder});
return builder;
}
public SevenGoalHandler.FetchAwardResponse.Builder fetchAward(int dayId) {
checkData();
SevenGoalHandler.FetchAwardResponse.Builder builder = SevenGoalHandler.FetchAwardResponse.newBuilder();
if (!isActive()) {
builder.setS2CCode(500);
builder.setS2CMsg(LangService.getValue("SEVEN_GOAL_INACTIVED"));
return builder;
}
if (!this.sevenGoalPO.dayInfoMap.containsKey(Integer.valueOf(dayId))) {
builder.setS2CCode(500);
builder.setS2CMsg(LangService.getValue("SEVEN_GOAL_PARAM_ERROR"));
return builder;
}
if (dayId > getDayId()) {
builder.setS2CCode(500);
builder.setS2CMsg(LangService.getValue("SEVEN_GOAL_PARAM_ERROR"));
return builder;
}
DayInfo dayInfo = (DayInfo) this.sevenGoalPO.dayInfoMap.get(Integer.valueOf(dayId));
if (dayInfo.fetched == true) {
builder.setS2CCode(500);
builder.setS2CMsg(LangService.getValue("SEVEN_GOAL_FETCHED"));
return builder;
}
boolean allFinished = true;
for (TaskInfo taskInfo : dayInfo.taskMap.values()) {
SevDayTaskCO sevDayTaskCO = (SevDayTaskCO) GameData.SevDayTasks.get(Integer.valueOf(taskInfo.taskId));
if (taskInfo.finishedNum < sevDayTaskCO.targetNum) {
allFinished = false;
break;
}
}
if (!allFinished) {
builder.setS2CCode(500);
builder.setS2CMsg(LangService.getValue("SEVEN_GOAL_NOT_FINISHED"));
return builder;
}
dayInfo.fetched = true;
Out.info(new Object[]{"玩家:", this.player.getId(), " 领取了七日目标奖励,dayId:", Integer.valueOf(dayId)});
SevTaskRewardExt sevTaskRewardExt = (SevTaskRewardExt) GameData.SevTaskRewards.get(Integer.valueOf(dayInfo.dayId));
List<NormalItem> rewards = new ArrayList<>();
String[] rewardStrs = sevTaskRewardExt.reward.split(";");
for (String rewardSubStr : rewardStrs) {
String[] rewardSubStrs = rewardSubStr.split(":");
rewards.addAll(ItemUtil.createItemsByItemCode(rewardSubStrs[0], Integer.parseInt(rewardSubStrs[1])));
}
this.player.bag.addCodeItemMail(rewards, Const.ForceType.BIND, Const.GOODS_CHANGE_TYPE.SevenGoal, "Bag_full_common");
builder.setS2CCode(200);
updateSuperScript();
return builder;
}
public void processGoal(SevenGoalTaskType taskType, Object... params) {
if (!isActive()) {
return;
}
checkData();
int dayId = getDayId();
boolean done = false;
for (DayInfo dayInfo : this.sevenGoalPO.dayInfoMap.values()) {
for (TaskInfo taskInfo : dayInfo.taskMap.values()) {
SevDayTaskCO sevDayTaskCO = (SevDayTaskCO) GameData.SevDayTasks.get(Integer.valueOf(taskInfo.taskId));
if (sevDayTaskCO.style != taskType.value) {
continue;
}
if (sevDayTaskCO.date > dayId && sevDayTaskCO.advancedDown == 0) {
continue;
}
if (taskInfo.finishedNum >= sevDayTaskCO.targetNum) {
continue;
}
switch (taskType) {
case MOUNT_UPGRADE_LV:
taskInfo.finishedNum = Math.min(((Integer) params[0]).intValue(), sevDayTaskCO.targetNum);
done = true;
case SOLO_ANTICIPATE:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
case ADD_FRIEND:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
case PAY_COUNT:
taskInfo.finishedNum = Math.min(((Integer) params[0]).intValue(), sevDayTaskCO.targetNum);
done = true;
case PET_UPGRADE_UPLV:
taskInfo.finishedNum = Math.min(((Integer) params[0]).intValue(), sevDayTaskCO.targetNum);
done = true;
case EQUIP_STRENTHEN_COUNT:
taskInfo.finishedNum = Math.min(((Integer) params[0]).intValue(), sevDayTaskCO.targetNum);
done = true;
case FIVE_MOUNTAIN_ANTICIPATE:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
case COST_DIAMOND_COUNT:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
case FIGHTPOWER_TO:
taskInfo.finishedNum = Math.min(((Integer) params[0]).intValue(), sevDayTaskCO.targetNum);
done = true;
case GEM_COMBINE_COUNT:
if (((Integer) params[0]).intValue() == sevDayTaskCO.numParameter1) {
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + ((Integer) params[1]).intValue(), sevDayTaskCO.targetNum);
done = true;
}
case TRIAL_ANTICIPATE:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
case COST_DIAMOND_OR_BINDDIAMOND_COUNT:
taskInfo.finishedNum = Math.min(((Integer) params[0]).intValue(), sevDayTaskCO.targetNum);
done = true;
case EQUIP_REFINE_COUNT:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
case EQUIP_REBORN_COUNT:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
case EQUIP_REBUILD_COUNT:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
case DEMON_TOWER_COUNT:
taskInfo.finishedNum = Math.min(this.player.demonTowerManager.getMaxFloor() - 1, sevDayTaskCO.targetNum);
done = true;
case AREA_BOSS_KILL_COUNT:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
case LEVEL_TO:
taskInfo.finishedNum = Math.min(((Integer) params[0]).intValue(), sevDayTaskCO.targetNum);
done = true;
case XIANYUAN_TO:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + ((Integer) params[0]).intValue(), sevDayTaskCO.targetNum);
done = true;
case GUILD_BOSS_COUNT:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
case ILLUSION2_COUNT:
taskInfo.finishedNum = Math.min(taskInfo.finishedNum + 1, sevDayTaskCO.targetNum);
done = true;
}
}
}
if (done) {
updateSuperScript();
}
}
public void initData() {
if (!isActive()) {
return;
}
for (DayInfo dayInfo : this.sevenGoalPO.dayInfoMap.values()) {
for (TaskInfo taskInfo : dayInfo.taskMap.values()) {
int maxPetUpLv;
SevDayTaskCO sevDayTaskCO = (SevDayTaskCO) GameData.SevDayTasks.get(Integer.valueOf(taskInfo.taskId));
SevTaskInsCO sevTaskInsCO = (SevTaskInsCO) GameData.SevTaskInss.get(Integer.valueOf(sevDayTaskCO.style));
if (sevTaskInsCO.tip != 0) {
continue;
}
SevenGoalTaskType sevenGoalTaskType = SevenGoalTaskType.getType(sevDayTaskCO.style);
switch (sevenGoalTaskType) {
case MOUNT_UPGRADE_LV:
taskInfo.finishedNum = Math.min(this.player.mountManager.getMountLevel(), sevDayTaskCO.targetNum);
case PET_UPGRADE_UPLV:
maxPetUpLv = this.player.petNewManager.getMaxPetUpLv();
taskInfo.finishedNum = Math.min(maxPetUpLv, sevDayTaskCO.targetNum);
case EQUIP_STRENTHEN_COUNT:
taskInfo.finishedNum = Math.min(this.player.equipManager.getTotalStrenthenLv(), sevDayTaskCO.targetNum);
case FIGHTPOWER_TO:
taskInfo.finishedNum = Math.min(this.player.getFightPower(), sevDayTaskCO.targetNum);
case DEMON_TOWER_COUNT:
taskInfo.finishedNum = Math.min(this.player.demonTowerManager.getMaxFloor() - 1, sevDayTaskCO.targetNum);
case LEVEL_TO:
taskInfo.finishedNum = Math.min(this.player.getLevel(), sevDayTaskCO.targetNum);
}
}
}
updateSuperScript();
}
public void updateSuperScript() {
List<PlayerHandler.SuperScriptType> data = getSuperScript();
this.player.updateSuperScriptList(data);
}
public List<PlayerHandler.SuperScriptType> getSuperScript() {
List<PlayerHandler.SuperScriptType> ret = new ArrayList<>();
int day = getDayId();
int totalCount = 0;
for (DayInfo dayInfo : this.sevenGoalPO.dayInfoMap.values()) {
if (dayInfo.dayId > day || dayInfo.fetched) {
continue;
}
boolean allFinished = true;
for (TaskInfo taskInfo : dayInfo.taskMap.values()) {
SevDayTaskCO sevDayTaskCO = (SevDayTaskCO) GameData.SevDayTasks.get(Integer.valueOf(taskInfo.taskId));
if (taskInfo.finishedNum < sevDayTaskCO.targetNum) {
allFinished = false;
break;
}
}
if (allFinished) {
totalCount++;
}
}
PlayerHandler.SuperScriptType.Builder t = PlayerHandler.SuperScriptType.newBuilder();
t.setType(Const.SUPERSCRIPT_TYPE.SEVEN_GOAL.getValue());
int count = 0;
if (isActive()) {
count = 1;
if (totalCount > 0) {
count = 2;
}
}
t.setNumber(count);
ret.add(t.build());
return ret;
}
public void onPlayerEvent(Const.PlayerEventType eventType) {
}
public Const.ManagerType getManagerType() {
return Const.ManagerType.SEVEN_GOAL;
}
}
| [
"parasol_qian@qq.com"
] | parasol_qian@qq.com |
66f3412f63cc86e938900abdab5a941f29f09f14 | c6445dcbfff37bcac08d408a42aa97046f7933cf | /app/src/test/java/com/example/hemant/realifeearlylearningcenter/ExampleUnitTest.java | 029095e584b74bf31b8b78703129513644d644c2 | [] | no_license | HemantNimje/RealifeEarlyLearningCenter | 6b0c084cff8bdb94f985000199e0a74babb7746a | 645c6cfacf8ef38ba5dd861b2a1e7f5cb2a18e0b | refs/heads/master | 2021-01-12T09:04:08.963762 | 2017-01-10T23:54:32 | 2017-01-10T23:54:32 | 75,615,403 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 423 | java | package com.example.hemant.realifeearlylearningcenter;
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() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"nimje.hemant@gmail.com"
] | nimje.hemant@gmail.com |
7cb7199914bf38f147cf4baaba691ba9f7341dbd | 530cd1aebc394f7c4019279c7725cc9e942ce5f7 | /Workshop1/src/main/Main.java | 1598c15cce35701a40aec591271edf5c948b78b0 | [] | no_license | xwang345/java444 | 272c68f206cfa7a2d483f3e0e6ebc144b978b696 | af063c2383f09673aa54635d28c52285b179b6e3 | refs/heads/master | 2020-06-02T03:58:56.807133 | 2019-06-09T16:12:37 | 2019-06-09T16:12:37 | 191,028,367 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,708 | java | package main;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import shapes.Shape;
import shapes.Circle;
import shapes.CircleException;
import shapes.Parallelogram;
import shapes.ParallelogramException;
import shapes.Rectangle;
import shapes.Square;
import shapes.SquareException;
import shapes.Triangle;
import shapes.TriangleException;
public class Main {
public static void main(String[] args) {
Shape[] shapes = new Shape[50];
int index = 0;
System.out.println("------->JAC 444 Assignment 1<-------");
System.out.println("------->Task 1 ... <-------");
try (BufferedReader br = new BufferedReader(new FileReader("shapes.txt"))) {
String s;
while ((s = br.readLine()) != null) {
String[] tokens = s.split(",");
switch (tokens[0]) {
case "Circle":
try {
if (tokens.length == 2) {
shapes[index] = new Circle(Double.parseDouble(tokens[1]));
}
} catch (CircleException e) {
System.out.println(e.getMessage());
}
if (shapes[index] != null) {
index++;
}
break;
case "Parallelogram":
try {
if (tokens.length == 3) {
shapes[index] = new Parallelogram(Double.parseDouble(tokens[1]), Double.parseDouble(tokens[2]));
}
} catch (ParallelogramException e) {
System.out.println(e.getMessage());
} catch (SquareException e) {
System.out.println(e.getMessage());
}
if (shapes[index] != null) {
index++;
}
break;
case "Rectangle":
try {
if (tokens.length == 3) {
shapes[index] = new Rectangle(Double.parseDouble(tokens[1]), Double.parseDouble(tokens[2]));
}
} catch (ParallelogramException e) {
System.out.println(e.getMessage());
} catch (SquareException e) {
System.out.println(e.getMessage());
}
if (shapes[index] != null) {
index++;
}
break;
case "Square":
try {
if (tokens.length == 2) {
shapes[index] = new Square(Double.parseDouble(tokens[1]));
}
} catch (ParallelogramException e) {
System.out.println(e.getMessage());
} catch (SquareException e) {
System.out.println(e.getMessage());
}
if (shapes[index] != null) {
index++;
}
break;
case "Triangle":
try {
if (tokens.length == 4) {
shapes[index] = new Triangle(Double.parseDouble(tokens[1]), Double.parseDouble(tokens[2]), Double.parseDouble(tokens[3]));
}
} catch (TriangleException e) {
System.out.println(e.getMessage());
}
if (shapes[index] != null) {
index++;
}
break;
}
}
} catch (IOException e) {
System.out.println(e.getMessage());
}
System.out.printf("\n%d shapes were created:\n", index);
for (int i = 0; i < index; i++) {
System.out.println(shapes[i]);
System.out.println();
}
System.out.println("------->Task 2 ... <-------");
Shape[] shapes2 = new Shape[50];
double maxCirclePerimeter = 0.0;
double minTrianglePerimeter = 99999.0;
int index2 = 0;
// find out the circle's maximum perimeter and triangle's minimum perimeter
for (int i = 0; i < index; i++) {
if (shapes[i].getClass().getName().equals("shapes.Circle")) {
if (shapes[i].getPerimeter() > maxCirclePerimeter) {
maxCirclePerimeter = shapes[i].getPerimeter();
}
} else if (shapes[i].getClass().getName().equals("shapes.Triangle")) {
if (shapes[i].getPerimeter() < minTrianglePerimeter) {
minTrianglePerimeter = shapes[i].getPerimeter();
}
}
}
// store matched elements into a new array
for (int i = 0; i < index; i++) {
if ((shapes[i].getClass().getName().equals("shapes.Circle") && shapes[i].getPerimeter() == maxCirclePerimeter) ||
(shapes[i].getClass().getName().equals("shapes.Triangle") && shapes[i].getPerimeter() == minTrianglePerimeter)) {
// do nothing
} else {
shapes2[index2] = shapes[i];
index2++;
}
}
shapes = shapes2;
for (int i = 0; i < index2; i++) {
System.out.println(shapes[i]);
System.out.println();
}
System.out.println("------->Task 3 ... <-------");
double perimeterParallelogram = 0.0;
double perimeterTriangle = 0.0;
for (int i = 0; i < index2; i++) {
if (shapes[i].getClass().getName().equals("shapes.Parallelogram")) {
perimeterParallelogram += shapes[i].getPerimeter();
}
if (shapes[i].getClass().getName().equals("shapes.Triangle")) {
perimeterTriangle += shapes[i].getPerimeter();
}
}
System.out.println("Total perimeter of Parallelogram is: " + perimeterParallelogram);
System.out.println("Total perimeter of Triangle is: " + perimeterTriangle);
}
}
| [
"ryan.wang23@hotmail.com"
] | ryan.wang23@hotmail.com |
adab74b082bd9c422ce28b884d8bfdae53d7e34e | 086401d50df124164bc8c914c1d5b0710a0effb4 | /jeecms/src/com/jeecms/common/web/cos/CosMultipartResolver.java | 6b2930caa6cfa4b00f557e043f7d05c6128660f9 | [] | no_license | leoRui/jeecms | 2ba6453e8c4cfdec1b816a0d971e433c6964d97d | dcba632bd340f51beeaa761ebba614102d0f5282 | refs/heads/master | 2021-01-11T04:41:57.276283 | 2016-10-17T07:24:56 | 2016-10-17T07:24:56 | 71,110,852 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,138 | java | package com.jeecms.common.web.cos;
import java.io.File;
import java.io.IOException;
import java.util.Set;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.Resource;
import org.springframework.web.context.ServletContextAware;
import org.springframework.web.multipart.MaxUploadSizeExceededException;
import org.springframework.web.multipart.MultipartException;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.util.WebUtils;
/**
* {@link MultipartResolver} implementation for Jason Hunter's <a
* href="http://www.servlets.com/cos">COS (com.oreilly.servlet)</a>. Works with
* a COS MultipartRequest underneath.
*
* <p>
* Provides "maxUploadSize" and "defaultEncoding" settings as bean properties;
* see respective MultipartRequest constructor parameters for details. Default
* maximum file size is unlimited; fallback encoding is the platform's default.
*
* @author Juergen Hoeller
* @since 06.10.2003
* @see CosMultipartHttpServletRequest
* @see com.CosMultipartRequest.servlet.MultipartRequest
*/
public class CosMultipartResolver implements MultipartResolver,
ServletContextAware {
/**
* Constant identifier for the mulipart content type :
* 'multipart/form-data'.
*/
public static final String MULTIPART_CONTENT_TYPE = "multipart/form-data";
/** Logger available to subclasses */
protected final Logger logger = LoggerFactory.getLogger(getClass());
private int maxUploadSize = Integer.MAX_VALUE;
private String defaultEncoding = WebUtils.DEFAULT_CHARACTER_ENCODING;
private File uploadTempDir;
/**
* Constructor for use as bean. Determines the servlet container's temporary
* directory via the ServletContext passed in as through the
* ServletContextAware interface (typically by a WebApplicationContext).
*
* @see #setServletContext
* @see org.springframework.web.context.ServletContextAware
* @see org.springframework.web.context.WebApplicationContext
*/
public CosMultipartResolver() {
}
/**
* Constructor for standalone usage. Determines the servlet container's
* temporary directory via the given ServletContext.
*
* @param servletContext
* the ServletContext to use (must not be <code>null</code>)
* @throws IllegalArgumentException
* if the supplied {@link ServletContext} is <code>null</code>
*/
public CosMultipartResolver(ServletContext servletContext) {
this.uploadTempDir = WebUtils.getTempDir(servletContext);
}
/**
* Set the maximum allowed size (in bytes) before uploads are refused. -1
* indicates no limit (the default).
*
* @param maxUploadSize
* the maximum file size allowed
*/
public void setMaxUploadSize(int maxUploadSize) {
this.maxUploadSize = maxUploadSize;
}
/**
* Return the maximum allowed size (in bytes) before uploads are refused.
*/
protected int getMaxUploadSize() {
return maxUploadSize;
}
/**
* Set the default character encoding to use for parsing requests, to be
* applied to headers of individual parts and to form fields. Default is
* ISO-8859-1, according to the Servlet spec.
* <p>
* If the request specifies a character encoding itself, the request
* encoding will override this setting. This also allows for generically
* overriding the character encoding in a filter that invokes the
* ServletRequest.setCharacterEncoding method.
*
* @param defaultEncoding
* the character encoding to use
* @see #determineEncoding
* @see javax.servlet.ServletRequest#getCharacterEncoding
* @see javax.servlet.ServletRequest#setCharacterEncoding
* @see WebUtils#DEFAULT_CHARACTER_ENCODING
*/
public void setDefaultEncoding(String defaultEncoding) {
this.defaultEncoding = defaultEncoding;
}
/**
* Return the default character encoding to use for parsing requests.
*/
protected String getDefaultEncoding() {
return defaultEncoding;
}
/**
* Set the temporary directory where uploaded files get stored. Default is
* the servlet container's temporary directory for the web application.
*
* @see org.springframework.web.util.WebUtils#TEMP_DIR_CONTEXT_ATTRIBUTE
*/
public void setUploadTempDir(Resource uploadTempDir) throws IOException {
if (!uploadTempDir.exists() && !uploadTempDir.getFile().mkdirs()) {
throw new IllegalArgumentException("Given uploadTempDir ["
+ uploadTempDir + "] could not be created");
}
this.uploadTempDir = uploadTempDir.getFile();
}
/**
* Return the temporary directory where uploaded files get stored.
*/
protected File getUploadTempDir() {
return uploadTempDir;
}
public void setServletContext(ServletContext servletContext) {
if (this.uploadTempDir == null) {
this.uploadTempDir = WebUtils.getTempDir(servletContext);
}
}
public boolean isMultipart(HttpServletRequest request) {
return request.getContentType() != null
&& request.getContentType().startsWith(MULTIPART_CONTENT_TYPE);
}
public MultipartHttpServletRequest resolveMultipart(
HttpServletRequest request) throws MultipartException {
try {
CosMultipartRequest multipartRequest = newMultipartRequest(request);
if (logger.isDebugEnabled()) {
Set<String> fileNames = multipartRequest.getFileNames();
for (String fileName : fileNames) {
File file = multipartRequest.getFile(fileName);
logger.debug("Found multipart file '"
+ fileName
+ "' of size "
+ (file != null ? file.length() : 0)
+ " bytes with original filename ["
+ multipartRequest.getOriginalFileName(fileName)
+ "]"
+ (file != null ? "stored at ["
+ file.getAbsolutePath() + "]" : "empty"));
}
}
return new CosMultipartHttpServletRequest(request, multipartRequest);
} catch (IOException ex) {
// Unfortunately, COS always throws an IOException,
// so we need to check the error message here!
if (ex.getMessage().indexOf("exceeds limit") != -1) {
throw new MaxUploadSizeExceededException(this.maxUploadSize, ex);
} else {
throw new MultipartException(
"Could not parse multipart request", ex);
}
}
}
/**
* Create a com.oreilly.servlet.MultipartRequest for the given HTTP request.
* Can be overridden to use a custom subclass, e.g. for testing purposes.
*
* @param request
* current HTTP request
* @return the new MultipartRequest
* @throws IOException
* if thrown by the MultipartRequest constructor
*/
protected CosMultipartRequest newMultipartRequest(HttpServletRequest request)
throws IOException {
String tempPath = this.uploadTempDir.getAbsolutePath();
String enc = determineEncoding(request);
return new CosMultipartRequest(request, tempPath, this.maxUploadSize,
enc);
}
/**
* Determine the encoding for the given request. Can be overridden in
* subclasses.
* <p>
* The default implementation checks the request encoding, falling back to
* the default encoding specified for this resolver.
*
* @param request
* current HTTP request
* @return the encoding for the request (never <code>null</code>)
* @see javax.servlet.ServletRequest#getCharacterEncoding
* @see #setDefaultEncoding
*/
protected String determineEncoding(HttpServletRequest request) {
String enc = request.getCharacterEncoding();
if (enc == null) {
enc = this.defaultEncoding;
}
return enc;
}
public void cleanupMultipart(MultipartHttpServletRequest request) {
CosMultipartRequest multipartRequest = ((CosMultipartHttpServletRequest) request)
.getMultipartRequest();
Set<String> fileNames = multipartRequest.getFileNames();
for (String fileName : fileNames) {
File file = multipartRequest.getFile(fileName);
if (file != null) {
if (file.exists()) {
if (file.delete()) {
if (logger.isDebugEnabled()) {
logger.debug("Cleaned up multipart file '"
+ fileName
+ "' with original filename ["
+ multipartRequest
.getOriginalFileName(fileName)
+ "], stored at [" + file.getAbsolutePath()
+ "]");
}
} else {
logger.warn("Could not delete multipart file '"
+ fileName
+ "' with original filename ["
+ multipartRequest
.getOriginalFileName(fileName)
+ "], stored at [" + file.getAbsolutePath()
+ "]");
}
} else {
if (logger.isDebugEnabled()) {
logger
.debug("Multipart file '"
+ fileName
+ "' with original filename ["
+ multipartRequest
.getOriginalFileName(fileName)
+ "] has already been moved - no cleanup necessary");
}
}
}
}
}
}
| [
"Administrator@USERUSE-5P6AB6M"
] | Administrator@USERUSE-5P6AB6M |
7cbe53cc752060d7e57c6c72d991ce5cedde408a | 4c19b724f95682ed21a82ab09b05556b5beea63c | /XMSYGame/java2/server/robot-manager/src/main/java/com/xmsy/server/zxyy/robot/modules/manager/sys/entity/SysRoleEntity.java | b8dbfeea4e4f2bac5c5b57a5710ded0bacd8e02d | [] | no_license | angel-like/angel | a66f8fda992fba01b81c128dd52b97c67f1ef027 | 3f7d79a61dc44a9c4547a60ab8648bc390c0f01e | refs/heads/master | 2023-03-11T03:14:49.059036 | 2022-11-17T11:35:37 | 2022-11-17T11:35:37 | 222,582,930 | 3 | 5 | null | 2023-02-22T05:29:45 | 2019-11-19T01:41:25 | JavaScript | UTF-8 | Java | false | false | 2,067 | java | package com.xmsy.server.zxyy.robot.modules.manager.sys.entity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotBlank;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
/**
* 角色
*
* @author aleng
* @email xxxxxx
* @date 2016年9月18日 上午9:27:38
*/
@TableName("sys_role")
public class SysRoleEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
@TableId
private Long roleId;
/**
* 角色名称
*/
@NotBlank(message="角色名称不能为空")
private String roleName;
/**
* 备注
*/
private String remark;
/**
* 创建者ID
*/
private Long createUserId;
@TableField(exist=false)
private List<Long> menuIdList;
/**
* 创建时间
*/
private Date createTime;
/**
* 设置:
* @param roleId
*/
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
/**
* 获取:
* @return Long
*/
public Long getRoleId() {
return roleId;
}
/**
* 设置:角色名称
* @param roleName 角色名称
*/
public void setRoleName(String roleName) {
this.roleName = roleName;
}
/**
* 获取:角色名称
* @return String
*/
public String getRoleName() {
return roleName;
}
/**
* 设置:备注
* @param remark 备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* 获取:备注
* @return String
*/
public String getRemark() {
return remark;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public List<Long> getMenuIdList() {
return menuIdList;
}
public void setMenuIdList(List<Long> menuIdList) {
this.menuIdList = menuIdList;
}
public Long getCreateUserId() {
return createUserId;
}
public void setCreateUserId(Long createUserId) {
this.createUserId = createUserId;
}
}
| [
"163@qq.com"
] | 163@qq.com |
85a49250b4876e95c725dfa9e4f6a44eb2955fa9 | dbf5d01c0499243a4c03ae114ec7a9d50d3acaa1 | /src/main/java/es/flink/meetupStreaming/meetupWebSocketSource/MeetupEndpoint.java | 224b7f2ad3e96f2044072d5fda616c6039920a2d | [] | no_license | rubencasado/meetup | 03dcf931194ab0ae7dcd24a8eee542cff3ed01f2 | 2c2a13d5dc5d76cfecb01676b6dd757719aca2ab | refs/heads/master | 2020-04-24T09:47:22.705669 | 2019-03-13T12:40:42 | 2019-03-13T12:40:42 | 171,873,288 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,715 | java | package es.flink.meetupStreaming.meetupWebSocketSource;
/**
* Created by @ruben_casado and @0xNacho on 10/05/16.
*/
import org.apache.flink.streaming.api.functions.source.SourceFunction;
import java.net.URI;
import javax.websocket.ClientEndpoint;
import javax.websocket.CloseReason;
import javax.websocket.ContainerProvider;
import javax.websocket.OnClose;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.WebSocketContainer;
@ClientEndpoint
public class MeetupEndpoint {
Session userSession = null;
private MessageHandler messageHandler;
private SourceFunction.SourceContext context;
public MeetupEndpoint(URI endpointURI) {
try {
WebSocketContainer container = ContainerProvider
.getWebSocketContainer();
container.connectToServer(this, endpointURI);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@OnOpen
public void onOpen(Session userSession) {
this.userSession = userSession;
}
@OnClose
public void onClose(Session userSession, CloseReason reason) {
this.userSession = null;
}
@OnMessage
public void onMessage(String message) {
if (this.messageHandler != null)
this.messageHandler.handleMessage(message);
}
public void addMessageHandler(MessageHandler msgHandler) {
this.messageHandler = msgHandler;
}
public void sendMessage(String message) {
this.userSession.getAsyncRemote().sendText(message);
}
public static interface MessageHandler {
public void handleMessage(String message);
}
} | [
"ruben@lambdoop.com"
] | ruben@lambdoop.com |
8462cf056fb736c7c4b40aa714954cb91f87f146 | 70ceb35bf92d74f29fea25066eb297134ff50f4a | /app/src/main/java/com/harilee/movieman/ForgotPassword/VerifyMailResponse.java | 2aedd8ca468fd1909a23215be4fbc7b53ff2a92d | [] | no_license | harilee1325/MovieMan | 4ec32c75ed78d9c6bf6c50ab613b135de082e03a | c0f366805e93579acad79eb5a781cdadc4184580 | refs/heads/master | 2020-08-05T16:12:40.743417 | 2019-10-07T12:16:42 | 2019-10-07T12:16:42 | 212,610,126 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 585 | java | package com.harilee.movieman.ForgotPassword;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class VerifyMailResponse {
@SerializedName("success")
@Expose
private String success;
@SerializedName("msg")
@Expose
private String msg;
public String getSuccess() {
return success;
}
public void setSuccess(String success) {
this.success = success;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
| [
"leehari007@gmail.com"
] | leehari007@gmail.com |
2ef6cac6073b777595847817372d39980040b930 | 7b0e0015cad07fce81803cb8f7ccf0feeee62ec4 | /src/main/java/com/dw/suppercms/infrastructure/config/AppConfig.java | aa960170aa3a38692a9741da38bd691ca4392a8f | [] | no_license | shenqidekobe/supercms | ecb191c5537355a4de8a45f978932d8007fab9a6 | 0bb6afcb7a1bd2cada454ae29de2f54553436da7 | refs/heads/master | 2021-01-24T20:54:05.369022 | 2018-02-28T09:54:33 | 2018-02-28T09:54:33 | 123,263,266 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 792 | java | package com.dw.suppercms.infrastructure.config;
import java.util.ArrayList;
import java.util.List;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import com.dw.framework.core.config.CoreAppConfig;
import com.dw.framework.core.config.GenericAppConfig;
import com.dw.suppercms.application.Startup;
import com.dw.suppercms.infrastructure.web.security.SecurityDto.Permission;
@Configuration
@Import(CoreAppConfig.class)
public class AppConfig implements GenericAppConfig {
@Bean(name = "perms")
public List<Permission> perms() {
List<Permission> perms = new ArrayList<Permission>();
return perms;
}
@Bean
public Startup startup() {
return new Startup();
}
} | [
"liuyuan_kobe@163.com"
] | liuyuan_kobe@163.com |
6e0014699382e8a1e3cfa88b78fa1c78737840cb | 385efac703a6dcb61a34e1e385aa51e92e67550c | /src/game/score/ScoreInfoComparator.java | edaba490b7692b6b67b76c2c9f9678837077fdb8 | [] | no_license | TomerOvadia1/SpaceInvaders | bcbd10c0f3a0c6af451aa87731b47a134735560f | 331e05f9bc91911c48307e80e6d96242b272772f | refs/heads/master | 2020-12-15T01:58:22.104070 | 2020-01-19T20:36:16 | 2020-01-19T20:36:16 | 234,953,876 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 449 | java | package game.score;
import java.util.Comparator;
/**
* ScoreInfoComparator Class.
*
* @author Tomer Ovadia
*/
public class ScoreInfoComparator implements Comparator<ScoreInfo> {
@Override
public int compare(ScoreInfo s1, ScoreInfo s2) {
if (s1.getScore() > s2.getScore()) {
return -1;
} else if (s1.getScore() < s2.getScore()) {
return 1;
}
return 0;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
1f9a82f92a2d640eba303822e6c529063e5f7661 | f9136ec4902ffd0b3151d36801ed0cb16e34f06b | /myrelationstessdemo/src/main/java/myrelations/myrelationstessdemo/model/Tag.java | 3382eea27c8979858aa07b9bd5ad0e5666e59a66 | [] | no_license | CindoddCindy/manyToManyOneToMany | 444eb014019204322854f1ffa2cc6af17b6398e7 | ecf2c619e34fd21a5f10c098edcf19eb2bda56d0 | refs/heads/main | 2023-02-26T08:00:07.934736 | 2021-02-03T14:14:46 | 2021-02-03T14:14:46 | 334,442,968 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,611 | java | package myrelations.myrelationstessdemo.model;
import org.hibernate.annotations.NaturalId;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.HashSet;
import java.util.Set;
@Entity
@Table(name = "tags")
public class Tag extends AuditModel{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotNull
@Size(max = 100)
@NaturalId
private String name;
@ManyToMany(fetch = FetchType.LAZY,
cascade = {
CascadeType.PERSIST,
CascadeType.MERGE
},
mappedBy = "tags")
private Set<Comment> comments = new HashSet<>();
@ManyToMany(fetch = FetchType.LAZY,
cascade = {
CascadeType.PERSIST,
CascadeType.MERGE
},
mappedBy = "tags")
private Set<Like> likes = new HashSet<>();
public Tag() {
}
public Tag(String name) {
this.name = name;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Set<Comment> getComments() {
return comments;
}
public void setComments(Set<Comment> comments) {
this.comments = comments;
}
public Set<Like> getLikes() {
return likes;
}
public void setLikes(Set<Like> likes) {
this.likes = likes;
}
}
| [
"cindodcindy@gmail.com"
] | cindodcindy@gmail.com |
948df75d50e8584fff59493667d567e37828c1c0 | c4d93262070333b112c17ca569bbd444cfdede7e | /vote-ejb/src/java/de/vote/logic/to/AbstractTO.java | 7dcc74fdd2de06782b480695995222a50a4bdcda | [
"MIT"
] | permissive | maxstrauch/vote-javaee | a5782d3d2c635b1d91cbec55b55ff708f588111c | 4c861918460a4faf24a0e3d130a275266e4e5fcb | refs/heads/master | 2020-06-30T13:33:42.650321 | 2016-11-21T13:47:34 | 2016-11-21T13:47:34 | 74,366,745 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,159 | java | package de.vote.logic.to;
import java.io.Serializable;
import java.util.Objects;
/**
* Prototype of a transfer object ("TO"). A TO is a plain java object following
* the Java Beans convention of getters and setters. This classes also provide
* some simple methods perfoming basic actions like validation of objects. The
* reason therfore is that it is easier to place the validation logic, which
* is different for each TO, in these objects than in an extra class.
*
* @author Daniel Vivas Estevao
* @author maximilianstrauch
*/
public class AbstractTO implements Serializable {
private Integer id;
public AbstractTO(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Override
public int hashCode() {
int hash = 21;
hash = 42 * hash + Objects.hashCode(this.id);
return hash;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof AbstractTO) {
return Objects.equals(((AbstractTO) obj).id, id);
}
return false;
}
}
| [
"maximilianstrauch@JETHRO.fritz.box"
] | maximilianstrauch@JETHRO.fritz.box |
b24428481adb642ecbf35380a91e1f0b0b8e9231 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /single-large-project/src/main/java/org/gradle/test/performancenull_288/Productionnull_28723.java | a8ec45f1f5eb120bd9579a9759e44d72258b81b6 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 588 | java | package org.gradle.test.performancenull_288;
public class Productionnull_28723 {
private final String property;
public Productionnull_28723(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
a10eb728e537ea2b2d7fe3a4838d69dcaac910b6 | 00e8a13243fc96465bf7e9ed41bf1d28da9b43f8 | /src/BPlusTree/DataEntry.java | ce6bd0e20816118ff7c0fd2931bc41bd2d6a8014 | [] | no_license | BillTang111/CS5321-database-Practicum | f6ada8cb70409cff0d8134e3733fc05b3df1da28 | 0f05e71b7f344fe9748500e238012cc91f763e71 | refs/heads/master | 2020-03-22T06:02:37.271308 | 2017-12-21T02:26:07 | 2017-12-21T02:26:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 492 | java | package BPlusTree;
/** The class is to build data entry. A data entry need to have pageid and tupleId
* @author Lini Tan lt398
*/
public class DataEntry {
private int pageId;
private int tupleId;
public DataEntry(int pageId, int tupleId){
this.pageId = pageId;
this.tupleId = tupleId;
}
/**@return return the corresponding pageId*/
public int getPageId(){
return pageId;
}
/**@return return the corresponding tupleId*/
public int getTupleId(){
return tupleId;
}
}
| [
"lt398@cornell.edu"
] | lt398@cornell.edu |
fc7fcd8e97e1c3baa39d9d692ef2bfde7c3efa91 | 98d313cf373073d65f14b4870032e16e7d5466f0 | /gradle-open-labs/example/src/main/java/se/molybden/Class9485.java | 4870525c81ab53940ee459e3eefd92be2c2ab16d | [] | no_license | Molybden/gradle-in-practice | 30ac1477cc248a90c50949791028bc1cb7104b28 | d7dcdecbb6d13d5b8f0ff4488740b64c3bbed5f3 | refs/heads/master | 2021-06-26T16:45:54.018388 | 2016-03-06T20:19:43 | 2016-03-06T20:19:43 | 24,554,562 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 109 | java |
public class Class9485{
public void callMe(){
System.out.println("called");
}
}
| [
"jocce.nilsson@gmail.com"
] | jocce.nilsson@gmail.com |
061111b438fa6fc7c565648e831eb82eb2c8a2fb | 8749a8ef2e0c84bb20b832d334cdc6efb84a4f9c | /Movil/TServiceMobile/app/src/main/java/com/example/luisandres/tservicemobile/Connection.java | 6424989055e6b985eb1d4b665d953624ee9d3b5c | [] | no_license | anfertobe/T-Service-Proyecto | f9332f333087ee33c6e4b8a31cd3154cd7dddb76 | ebf9123fe100d8ecc8508025b5c67d0c01a51773 | refs/heads/master | 2021-01-25T05:34:15.020736 | 2015-05-19T07:51:17 | 2015-05-19T07:51:17 | 32,034,923 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,593 | java | package com.example.luisandres.tservicemobile;
import android.os.AsyncTask;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicHeader;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;
import org.json.JSONObject;
/**
* Created by LuisAndres on 2015/04/08.
*/
public class Connection extends AsyncTask<JSONObject,Integer,String> {
private String tipo;
private String resultado;
public String getResultado(){
return resultado;
}
public Connection(String tipo){
this.tipo=tipo;
}
@Override
protected void onPreExecute() {
}
@Override
protected String doInBackground(JSONObject... params){
if (params.length>0){
JSONObject jso= params[0];
DefaultHttpClient dhhtpc=new DefaultHttpClient();
HttpPut postreq=new HttpPut("http://proyecto-tservise-cosw.herokuapp.com/rest/tservice/Postulantes/");
if (tipo.trim().equals("Publicante")){
postreq=new HttpPut("http://proyecto-tservise-cosw.herokuapp.com/rest/tservice/Publicantes/");
}
StringEntity se=null;
System.out.println("LLamando post ...");
try{
se=new StringEntity(jso.toString());
System.out.println("JSon "+jso.toString());
}catch (Exception ae){
}
System.out.print(se);
se.setContentType("application/json;charset=UTF-8");
se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,"application/json;charset=UTF-8"));
postreq.setEntity(se);
System.out.println("Enviar post ...");
HttpResponse httpr;
try{
System.out.println("Ejecutando post ...");
httpr=dhhtpc.execute(postreq);
System.out.println("Resultado "+ EntityUtils.toString(httpr.getEntity()));
this.resultado = EntityUtils.toString(httpr.getEntity());
return EntityUtils.toString(httpr.getEntity());
}catch (Exception ar){
System.out.println("Error "+ar.getMessage());
return ar.getMessage();
}
}
System.out.println(" ");
return "";
}
@Override
protected void onPostExecute(String result) {
}
}
| [
"lagcoronell@gmail.com"
] | lagcoronell@gmail.com |
c3dabf011fce7ce6633aa378f3b445e13b910e8c | e2a0d69051225c4b20eebc6743296a6730df370a | /src/main/java/com/app/item/service/ItemServiceImpl.java | 4be0ea92513676ac42a22766a4d2fabcf5387e09 | [] | no_license | diana-estrada/springboot-items-service | a4da30c81366efe787db078125270514eafe56b9 | de550ffc7c2da3431a56f567b8250d51dea3c25e | refs/heads/master | 2022-12-06T18:17:37.855607 | 2020-08-27T20:36:48 | 2020-08-27T20:36:48 | 290,854,626 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,190 | java | package com.app.item.service;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import com.app.item.model.Item;
import com.app.commons.models.*;
@Service("serviceRestTemplate")
public class ItemServiceImpl implements ItemService{
@Autowired
private RestTemplate clientRest;
@Override
public List<Item> findAll() {
List<Product> products = Arrays.asList(
clientRest.getForObject("http://service-products/products/", Product[].class));
return products.stream().map(p -> new Item(p, 1)).collect(Collectors.toList());
}
@Override
public Item findById(Integer id, Integer quantity) {
Map<String, Integer> pathVariable = new HashMap<String, Integer>();
pathVariable.put("id", id);
Product product = clientRest.getForObject("http://service-products/products/{id}", Product.class, pathVariable);
return new Item(product, quantity);
}
@Override
public Product save(Product product) {
HttpEntity<Product> body = new HttpEntity<Product>(product);
ResponseEntity<Product> response = clientRest.exchange("http://service-products/products/", HttpMethod.POST, body, Product.class);
return response.getBody();
}
@Override
public Product update(Product product, Integer id) {
Map<String, Integer> pathVariable = new HashMap<String, Integer>();
pathVariable.put("id", id);
HttpEntity<Product> body = new HttpEntity<Product>(product);
ResponseEntity<Product> response = clientRest.exchange("http://service-products/products/{id}", HttpMethod.PUT, body, Product.class, pathVariable);
return response.getBody();
}
@Override
public void delete(Integer id) {
Map<String, Integer> pathVariable = new HashMap<String, Integer>();
pathVariable.put("id", id);
clientRest.delete("http://service-products/products/{id}", HttpMethod.DELETE, pathVariable);
}
}
| [
"diana.estrada.hdez@gmail.com"
] | diana.estrada.hdez@gmail.com |
c6ab721de3ade47300107a908c8e5f786afdf192 | 2e7d5a9130367aee0ce30fd174820154b70141a8 | /androidjokes/src/androidTest/java/com/udacity/gradle/androidjoke/ApplicationTest.java | fcc80b033b30d4c43dbabd2aa6be8aee5d181190 | [] | no_license | eliamyro/build_it_bigger | 431090699a6af0dd0283deb5e92f3ca084c79c2c | e605aa05559fbf8588fb5f3b1323aa115ff71290 | refs/heads/master | 2020-12-13T20:55:21.647235 | 2016-05-01T15:49:39 | 2016-05-01T15:49:39 | 46,065,483 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 361 | java | package com.udacity.gradle.androidjoke;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
} | [
"elias.myronidis@hotmail.com"
] | elias.myronidis@hotmail.com |
457fe27547b1306e1225ca5b47e2373fb5097b65 | 52f25aed45024d888f7eb48a81ddbea712eeb621 | /exercise/HortonExercises/Ch06/Shapes_Ex3/Rectangle.java | c27c088f6f2647bc098abb825a09c942894c62f0 | [] | no_license | asszem/JavaLearning | 7ef8e9fb0ec605340254ac604520a2b6484da299 | 1c0aae2e1f19e0f5f84315aafc9afd13c2b9a98d | refs/heads/master | 2021-01-23T01:55:41.428926 | 2017-07-09T10:42:02 | 2017-07-09T10:42:02 | 85,943,287 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,177 | java | // Chapter 6 Exercise 3
// This class now inherits implementation of the ShapeInterface
// interface so it must implement the show() method, otherwise
// it would be and abstract class.
package HortonExercises.Ch06.Shapes_Ex3;
public class Rectangle extends Shape {
// Bottom right of rectangle is defined relative to the reference point, position:
private Point bottomRight; // Bottom right of rectangle.
// Constructors:
public Rectangle(Point startDiag, Point endDiag) {
// Position of rectangle is top left corner - minimum x and y:
position = new Point(Math.min(startDiag.x,endDiag.x),Math.min(startDiag.y,endDiag.y));
// Bottom right is relative to top left:
bottomRight = new Point(Math.max(startDiag.x,endDiag.x) - position.x,
Math.max(startDiag.y,endDiag.y) - position.y);
}
@Override
public String toString() {
// Return a string representation of the object:
return "Rectangle: Top Left: " + position + " Bottom Right: " + position.add(bottomRight);
}
// Display the rectangle:
public void show() {
System.out.println("\n" + toString());
}
}
| [
"asszem78@gmail.com"
] | asszem78@gmail.com |
67ef3fd43bf7b5adaa62b26cf01b227a8d25108e | 6f8284f73d66d5b3f76c7ea0ece040efd86e4ee0 | /basic/src/com/rainy/mini/sample/action/OrderAction.java | 7a12a3aff3da5518e66caea7cc4cc9a5cd56c9b1 | [] | no_license | webvul/basic | cd0434b092465e0a4d92e0d948ca9c82fc648b0d | 40af7c4ec6c8ef9d0b1a9b2495aa6fcfd8e3b54d | refs/heads/master | 2021-01-20T03:25:45.649645 | 2013-07-08T09:01:20 | 2013-07-08T09:01:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,086 | java | /******************************************************************************
*本软件为zbb个人开发研制。 未经本人正式书面同意,其他任何个人、
* 团体不得使用、复制、修改或发布本软件.
*****************************************************************************/
package com.rainy.mini.sample.action;
import java.util.List;
import javax.annotation.Resource;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.opensymphony.xwork2.ModelDriven;
import com.rainy.mini.base.action.BaseAction;
import com.rainy.mini.sample.model.Order;
import com.rainy.mini.sample.service.OrderService;
/**
* 订单Action
*
* @author 张冰冰
* @since 1.0
* @version 2013-7-6 张冰冰
*/
@ParentPackage("json-package")
@Namespace("/sample")
public class OrderAction extends BaseAction implements ModelDriven<Order> {
/** */
private static final long serialVersionUID = -239638008247442823L;
private static final Logger LOGGER = LoggerFactory
.getLogger(OrderAction.class);
private final Order order = new Order();
@Resource
private OrderService orderService;
@Action(value = "preSelect", results = { @Result(name = "success", location = "/sample/select.jsp") })
public String preSelect() {
return SUCCESS;
}
@Action(value = "selectGrid", results = { @Result(name = "success", params = {
"root", "resultObj" }, type = "json") })
public String selectGrid() {
LOGGER.info("排序字段sort:{}", order.getSort());
List<Order> lstOrders = orderService.selectPage(order);
int count = orderService.count(order);
map.put(ROWS, objectToJsonArray(lstOrders));
map.put(TOTAL, count);
resultObj = objectToJsonObject(map);
return SUCCESS;
}
@Override
public Order getModel() {
return order;
}
}
| [
"rainysky2013@aliyun.com"
] | rainysky2013@aliyun.com |
4530538b647f44595d83e24ef5883d908eea0156 | 231aab606285d6dd9f2f4d54ed2557909aa604a0 | /hadoop/src/main/java/frequencyStripe/FrequencyStripeReducer.java | 8f8288af2637b0a9783d4e83e0bc205025218863 | [] | no_license | dawithw/MapReduce-BigData | 2836397c8d30fb4cbeac89b5b960b3de9554d17d | 2a416db368acbf6f3ca5760484a5b66fccc166b9 | refs/heads/master | 2023-03-19T02:24:55.728670 | 2020-03-06T09:44:22 | 2020-03-06T09:44:22 | 245,381,870 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,825 | java | package frequencyStripe;
import java.io.IOException;
import org.apache.hadoop.io.DoubleWritable;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.MapWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
public class FrequencyStripeReducer extends
Reducer<Text, MapWritable, Text, Text> {
public void reduce(Text key, Iterable<MapWritable> values, Context context)
throws IOException, InterruptedException {
int totalCount = 0;
MapWritable valueCounter = new MapWritable();
for(MapWritable map : values) {
for(MapWritable.Entry entry : map.entrySet()) {
Text k = (Text)entry.getKey();
IntWritable v = (IntWritable)entry.getValue();
totalCount += v.get();
if(valueCounter.containsKey(k)) {
IntWritable existingValue = (IntWritable)valueCounter.get(k);
valueCounter.put(k, new IntWritable(v.get() + existingValue.get()));
} else {
valueCounter.put(k, v);
}
}
}
for(MapWritable.Entry entry : valueCounter.entrySet()) {
double avg = ((IntWritable)entry.getValue()).get()*1.0/totalCount;
valueCounter.put((Text)entry.getKey(), new DoubleWritable(avg));
}
String valueString = "[ " + stringify(valueCounter) + "]";
context.write(key, new Text(valueString));
System.out.println(key + "\t" + (valueCounter.entrySet().size() > 0 ? valueString : "empty"));
}
private String stringify(MapWritable mw) {
String vals = "";
for(MapWritable.Entry entry : mw.entrySet()) {
double avg = ((DoubleWritable)entry.getValue()).get();
vals += "( " + entry.getKey() + "," + String.format("%.2f",avg) + ") ";
}
return vals;
}
}
| [
"dawithw@gmail.com"
] | dawithw@gmail.com |
c966b0573fca070230a880c7c77c5cad86ab2df2 | 6fc01c44a6b907f730ab6136bf89cbd26dbd2dca | /Task6/src/by/epam/preTraining/task6/view/Printer.java | b45fd570711c019e1df6eb5290b77decb3aec89e | [] | no_license | ViktorMedvedev/Epam-Pre-Training | 63b88f65f3b5597bf4e2d2388f31f3fbcd43ed98 | 04f942c37d7a446c326fe994a4250b4b9c59e10e | refs/heads/master | 2021-05-08T16:59:56.369367 | 2018-05-09T15:42:34 | 2018-05-09T15:42:34 | 119,240,845 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 147 | java | package by.epam.preTraining.task6.view;
public class Printer {
public static void print(Object msg){
System.out.println(msg);
}
}
| [
"vitreonik@gmail.com"
] | vitreonik@gmail.com |
fd8a35c09ec35214d1a02696483f294ba1a3aaf8 | 28757bc5ccdf12956cdc3227c6964d013f3b2370 | /Colors2/TCPGraphicGetting.java | 4283c5f5b12ca3e38ac18722ad2b23e174efc597 | [] | no_license | ka-zu/Colors2 | 50a0d0617cf2438635e3489ccbe36415192fcbc6 | 4fb2bbc5c6790892d11de5d700a2dd95a3e24512 | refs/heads/master | 2022-12-01T02:47:48.569904 | 2019-12-08T01:27:42 | 2019-12-08T01:27:42 | 138,245,187 | 0 | 0 | null | null | null | null | SHIFT_JIS | Java | false | false | 3,275 | java | import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Collections;
import java.nio.ByteBuffer;
public class TCPGraphicGetting extends Thread{
//public TCPGraphicGetting(){}
public static void main(String args[]) {
System.out.println("TCPサーバ起動");
int file_num = 0;
Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MMdd-HHmm");
final int PORT = 11451;
long size=0;
ServerSocket serverSocket = null;
while (true) {
byte[] data = new byte[16];
byte[] size_buf = new byte[64];
int len;
int num=0;
try {
// 新規サーバーソケットの生成
if( serverSocket == null ){
serverSocket = new ServerSocket(PORT);
System.out.println("サーバソケット作成");
for(NetworkInterface n: Collections.list(NetworkInterface.getNetworkInterfaces()) ) {
for (InetAddress addr : Collections.list(n.getInetAddresses())) {
if( addr instanceof Inet4Address && !addr.isLoopbackAddress() ){
System.out.println("IP: "+ addr.getHostAddress() +" PORT: "+ PORT);
}
}
}
}
// クライアントからの接続を待ちます
System.out.println("待機中");
Socket socket = serverSocket.accept();
File file = new File( "drawImages\\" + sdf.format(date) + "__" + file_num + ".png");
OutputStream out = new FileOutputStream(file);
InputStream in = socket.getInputStream();
System.out.println("画像取得中 : "+"drawSource\\" + sdf.format(date) + "__" + file_num + ".png");
size = 0;
for(int i=0;i<4;i++){
in.read(size_buf, 0, 16);
size += ByteBuffer.wrap(size_buf).getLong()<<16*i;
}
System.out.println(size);
while (num < size) {
if((len = in.read(data,0,16)) == -1){
out.flush();
out.close();
in.close();
file.delete();
throw new EOFException("File取得中の情報欠損エラー");
}
out.write(data,0,len);
num += len;
System.out.println("残り"+((double)num*100/size)+"%");
}
// 入出力ストリームを閉じる
out.flush();
out.close();
in.close();
System.out.println("done");
// ソケットを閉じる
socket.close();
file_num++;
}catch(Exception e){
e.printStackTrace();
}
}
}
}
| [
"yamakan1213@icloud.com"
] | yamakan1213@icloud.com |
5ea4e8e83b3d8354255299cd599f82b3b692913e | 7994ea241255bde79925d0ce5e5d4b548c702e18 | /src/Logic/Tactician.java | c79dc006394233d5632ce0a197b29193019f74e1 | [] | no_license | kkgomez2/Chess | e9d2a0d52f98247f53a43b89eff6facf39414c33 | e7609bb01581003c87a4176dfb85af6dd26e478b | refs/heads/master | 2021-01-20T19:59:44.738955 | 2016-05-30T19:18:58 | 2016-05-30T19:18:58 | 59,960,539 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 800 | java | package Logic;
/*
* Represents a custom chess Piece called Tactician.
* Tacticians move in one unit diagonal movements.
* @author Kevin Gomez kkgomez2@illinois.edu kevinkgomez.com
*/
public class Tactician extends Piece {
public Tactician(String color, Square square, ChessBoard board) {
super(color, "Tactician", square, board);
}
public Tactician(String color, int x, int y, ChessBoard board) {
super(color, "Tactician", x, y, board);
}
/*
* Checks whether the intended coordinates are
* a valid move for a Tactician, and returns that value.
* @return the corresponding boolean.
*/
@Override
public boolean validMove(int destX, int destY){
if((destX == x + 1 || destX == x - 1) &&
(destY == y + 1 || destY == y - 1)){
return true;
} else return false;
}
}
| [
"kkristoffergomez@gmail.com"
] | kkristoffergomez@gmail.com |
6c85184a3b353cfde0992042012ab7d975aab259 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/10/10_fc24c779228ac2322e9727c849da48462128f442/PhotoListenerThread/10_fc24c779228ac2322e9727c849da48462128f442_PhotoListenerThread_t.java | 7ee09e2a34285bc24d42ae366a1da57910cce2e8 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,441 | java | package PhotoListener;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import com.drew.imaging.ImageMetadataReader;
import com.drew.imaging.ImageProcessingException;
import com.drew.lang.GeoLocation;
import com.drew.metadata.Metadata;
import com.drew.metadata.MetadataException;
import com.drew.metadata.exif.ExifSubIFDDirectory;
import com.drew.metadata.exif.GpsDirectory;
import com.drew.metadata.jpeg.JpegDirectory;
import ActivationManager.ActivationManager;
import Common.GPSPoint;
import Common.Photo;
import android.os.Environment;
import android.os.FileObserver;
import android.util.Log;
public class PhotoListenerThread extends FileObserver {
private final String TAG = PhotoListenerThread.class.getName();
String absolutePath;
public PhotoListenerThread(String path) {
super(path, FileObserver.CLOSE_WRITE);
this.absolutePath = path;
}
@Override
public void onEvent(int event, String path) {
if (isExternalStorageReadable()) {
if (path.endsWith(".jpg")) {
Photo photo = null;
while (photo == null) {
String file = absolutePath + path;
try {
photo = createPhotoFromFile(file);
}
catch (ImageProcessingException e) { // this means photo was not saved fully
Log.e(TAG, "Sleeping until photo completely saved");
int counter = 0;
try {
counter++;
if (counter < 10)
Thread.sleep(2000, 0);
else {
// give up
return;
}
} catch (InterruptedException e1) {
Log.d(TAG, "onEvent: InterruptedException");
}
}
}
if (photo != null)
ActivationManager.getInstance().addToBuffer(photo);
}
}
else {
Log.d(TAG,"External storage is not readable");
}
}
public static Photo createPhotoFromFile(String file) throws ImageProcessingException {
File path = new File(file);
// extract photo metadata
Metadata metadata = null;
try {
metadata = ImageMetadataReader.readMetadata(path);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//get location
GpsDirectory directory1 = metadata.getDirectory(GpsDirectory.class);
GeoLocation location = directory1.getGeoLocation();
if (location == null) { // photo has not location
return null;
}
//get time
ExifSubIFDDirectory directory2 = metadata.getDirectory(ExifSubIFDDirectory.class);
Date date = directory2.getDate(ExifSubIFDDirectory.TAG_DATETIME_ORIGINAL);
Photo photo = null;
//get dimensions
JpegDirectory jpgDirectory = metadata.getDirectory(JpegDirectory.class);
try {
int width = jpgDirectory.getImageWidth();
int height = jpgDirectory.getImageHeight();
photo = new Photo(
date,
width,
height,
new GPSPoint(location.getLatitude(),location.getLongitude()),
path.getPath());
} catch (MetadataException e) {
// TODO ERROR reading EXIF details of photo
e.printStackTrace();
}
return photo;
}
// TODO: switch to private
/* Checks if external storage is available to at least read */
private static boolean isExternalStorageReadable() {
String state = Environment.getExternalStorageState();
if (Environment.MEDIA_MOUNTED.equals(state) ||
Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
return true;
}
return false;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.