blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2 values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 131 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 9.45M | extension stringclasses 32 values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 313 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a459fbe3e314bcdb3fe52541313d695df162eb65 | 836f4bd7168fb6f873d88ce9ef738475af6c6e64 | /src/main/java/cn/lzl/handler/One2OneMatchingHandler.java | 2391f4b831b84d7f02788ff2a32a7521156c94b2 | [] | no_license | li-ze-lin/easy-chatroom | b8ef8e9ea8e0f38dec7fecd0e43e02294763416a | 6c436a2f37c74ca1defa1655a323c19063e8b615 | refs/heads/master | 2023-01-02T04:41:30.760462 | 2020-10-29T05:46:40 | 2020-10-29T05:46:40 | 307,899,255 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,574 | java | package cn.lzl.handler;
import cn.lzl.handler.information.One2OneMatchingInformation;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http.DefaultFullHttpResponse;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.netty.handler.codec.http.HttpVersion;
import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
import io.netty.handler.codec.http.websocketx.PingWebSocketFrame;
import io.netty.handler.codec.http.websocketx.PongWebSocketFrame;
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
import io.netty.handler.codec.http.websocketx.WebSocketFrame;
import io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker;
import io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory;
import io.netty.util.CharsetUtil;
import java.util.UUID;
import java.util.concurrent.ConcurrentMap;
import static cn.lzl.handler.information.One2OneMatchingInformation.queue;
/**
*
* @author Dream
*
* 自定义的Handler
*/
public class One2OneMatchingHandler extends SimpleChannelInboundHandler<Object> {
private WebSocketServerHandshaker handshaker;
private ChannelHandlerContext ctx;
private String sessionId;
private String name;
@Override
protected void messageReceived(ChannelHandlerContext ctx, Object o) throws Exception {
if (o instanceof FullHttpRequest) { // 传统的HTTP接入
handleHttpRequest(ctx, (FullHttpRequest) o);
} else if (o instanceof WebSocketFrame) { // WebSocket接入
handleWebSocketFrame(ctx, (WebSocketFrame) o);
}
}
@Override
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
ctx.flush();
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
ctx.close();
}
@Override
public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
super.close(ctx, promise);
//关闭连接将移除该用户消息
Mage mage = new Mage();
mage.setName(this.name);
mage.setMessage("20002");
//将用户下线信息发送给为下线用户
String table = One2OneMatchingInformation.login.get(this.sessionId);
ConcurrentMap<String, One2OneMatchingInformation> cmap = One2OneMatchingInformation.map.get(table);
if (cmap != null) {
cmap.forEach((id, iom) -> {
try {
if (id != this.sessionId) iom.sead(mage);
} catch (Exception e) {
System.err.println(e);
}
});
}
One2OneMatchingInformation.login.remove(this.sessionId);
One2OneMatchingInformation.map.remove(table);
}
/**
* 处理Http请求,完成WebSocket握手<br/>
* 注意:WebSocket连接第一次请求使用的是Http
* @param ctx
* @param request
* @throws Exception
*/
private void handleHttpRequest(ChannelHandlerContext ctx, FullHttpRequest request) throws Exception {
// 如果HTTP解码失败,返回HTTP异常
if (!request.getDecoderResult().isSuccess() || (!"websocket".equals(request.headers().get("Upgrade")))) {
sendHttpResponse(ctx, request, new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.BAD_REQUEST));
return;
}
// 正常WebSocket的Http连接请求,构造握手响应返回
WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory("ws://" + request.headers().get(HttpHeaders.Names.HOST), null, false);
handshaker = wsFactory.newHandshaker(request);
if (handshaker == null) { // 无法处理的websocket版本
WebSocketServerHandshakerFactory.sendUnsupportedWebSocketVersionResponse(ctx.channel());
} else { // 向客户端发送websocket握手,完成握手
handshaker.handshake(ctx.channel(), request);
// 记录管道处理上下文,便于服务器推送数据到客户端
this.ctx = ctx;
}
}
/**
* Http返回
* @param ctx
* @param request
* @param response
*/
private static void sendHttpResponse(ChannelHandlerContext ctx, FullHttpRequest request, FullHttpResponse response) {
// 返回应答给客户端
if (response.getStatus().code() != 200) {
ByteBuf buf = Unpooled.copiedBuffer(response.getStatus().toString(), CharsetUtil.UTF_8);
response.content().writeBytes(buf);
buf.release();
HttpHeaders.setContentLength(response, response.content().readableBytes());
}
// 如果是非Keep-Alive,关闭连接
ChannelFuture f = ctx.channel().writeAndFlush(response);
if (!HttpHeaders.isKeepAlive(request) || response.getStatus().code() != 200) {
f.addListener(ChannelFutureListener.CLOSE);
}
}
/**
* 处理Socket请求
* @param ctx
* @param frame
* @throws Exception
*/
private void handleWebSocketFrame(ChannelHandlerContext ctx, WebSocketFrame frame) throws Exception {
// 判断是否是关闭链路的指令
if (frame instanceof CloseWebSocketFrame) {
handshaker.close(ctx.channel(), (CloseWebSocketFrame) frame.retain());
return;
}
// 判断是否是Ping消息
if (frame instanceof PingWebSocketFrame) {
ctx.channel().write(new PongWebSocketFrame(frame.content().retain()));
return;
}
// 当前只支持文本消息,不支持二进制消息
if ((frame instanceof TextWebSocketFrame)) {
//获取发来的消息
String text =((TextWebSocketFrame)frame).text();
System.out.println("mage : " + text);
//消息转成Mage
Mage mage = Mage.strJson2Mage(text);
if (mage.getMessage().equals("10001")) {
if (!One2OneMatchingInformation.login.containsKey(mage.getId())) {
One2OneMatchingInformation.login.put(mage.getId(), "");
One2OneMatchingInformation.offer(ctx, mage);
if (queue.size() >= 2) {
String tableId = UUID.randomUUID().toString();
One2OneMatchingInformation iom1 = queue.poll().setTableId(tableId);
One2OneMatchingInformation iom2 = queue.poll().setTableId(tableId);
One2OneMatchingInformation.add(iom1.getChannelHandlerContext(), iom1.getMage());
One2OneMatchingInformation.add(iom2.getChannelHandlerContext(), iom2.getMage());
iom1.sead(iom2.getMage());
iom2.sead(iom1.getMage());
}
} else {//用户已登录
mage.setMessage("-10001");
sendWebSocket(mage.toJson());
ctx.close();
}
} else {
//将用户发送的消息发给所有在同一聊天室内的用户
One2OneMatchingInformation.map.get(mage.getTable()).forEach((id, iom) -> {
try {
iom.sead(mage);
} catch (Exception e) {
System.err.println(e);
}
});
}
//记录id 当页面刷新或浏览器关闭时,注销掉此链路
this.sessionId = mage.getId();
this.name = mage.getName();
} else {
System.err.println("------------------error--------------------------");
}
}
/**
* WebSocket返回
*/
public void sendWebSocket(String msg) throws Exception {
if (this.handshaker == null || this.ctx == null || this.ctx.isRemoved()) {
throw new Exception("尚未握手成功,无法向客户端发送WebSocket消息");
}
//发送消息
this.ctx.channel().write(new TextWebSocketFrame(msg));
this.ctx.flush();
}
}
| [
"liweiyi@91jinrong.com"
] | liweiyi@91jinrong.com |
db7e6701eeb5f3a9db21ad7bd2842ee5b2d25f0a | e17dd7ee84962730b9f2b7c724b8f9dc4f857ab6 | /beautyeye_lnf/src/main/java/org/jb2011/lnf/beautyeye/ch3_button/__Icon9Factory__.java | 0b2813e48d711c99c40e99271878e0179fb27bdd | [
"Apache-2.0"
] | permissive | lnwazg/SWING-POM | 3ddade53497af03e6b86c06022f1892f40018527 | 12790a3a18c7d1ead046d1061aaff4a45dba5362 | refs/heads/master | 2022-12-15T02:49:32.565730 | 2019-08-29T12:01:04 | 2019-08-29T12:01:04 | 149,766,495 | 1 | 0 | Apache-2.0 | 2022-12-05T23:54:29 | 2018-09-21T13:21:14 | Java | UTF-8 | Java | false | false | 4,247 | java | /*
* Copyright (C) 2015 Jack Jiang(cngeeker.com) The BeautyEye Project.
* All rights reserved.
* Project URL:https://github.com/JackJiang2011/beautyeye
* Version 3.6
*
* Jack Jiang PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
* __Icon9Factory__.java at 2015-2-1 20:25:40, original version by Jack Jiang.
* You can contact author with jb2011@163.com.
*/
package org.jb2011.lnf.beautyeye.ch3_button;
import org.jb2011.lnf.beautyeye.utils.NinePatchHelper;
import org.jb2011.lnf.beautyeye.utils.RawCache;
import org.jb2011.ninepatch4j.NinePatch;
/**
* NinePatch图片(*.9.png)工厂类.
*
* @author Jack Jiang
* @version 1.0
*/
public class __Icon9Factory__ extends RawCache<NinePatch>
{
/** 相对路径根(默认是相对于本类的相对物理路径). */
public final static String IMGS_ROOT = "imgs/np";
/** The instance. */
private static __Icon9Factory__ instance = null;
/**
* Gets the single instance of __Icon9Factory__.
*
* @return single instance of __Icon9Factory__
*/
public static __Icon9Factory__ getInstance()
{
if (instance == null)
instance = new __Icon9Factory__();
return instance;
}
/* (non-Javadoc)
* @see org.jb2011.lnf.beautyeye.utils.RawCache#getResource(java.lang.String, java.lang.Class)
*/
@Override
protected NinePatch getResource(String relativePath, Class baseClass)
{
return NinePatchHelper.createNinePatch(baseClass.getResource(relativePath), false);
}
/**
* Gets the raw.
*
* @param relativePath the relative path
* @return the raw
*/
public NinePatch getRaw(String relativePath)
{
return getRaw(relativePath, this.getClass());
}
/**
* Gets the button icon_ normal green.
*
* @return the button icon_ normal green
*/
public NinePatch getButtonIcon_NormalGreen()
{
return getRaw(IMGS_ROOT + "/btn_special_default.9.png");
}
/**
* Gets the button icon_ normal gray.
*
* @return the button icon_ normal gray
*/
public NinePatch getButtonIcon_NormalGray()
{
return getRaw(IMGS_ROOT + "/btn_general_default.9.png");
}
/**
* Gets the button icon_ disable gray.
*
* @return the button icon_ disable gray
*/
public NinePatch getButtonIcon_DisableGray()
{
return getRaw(IMGS_ROOT + "/btn_special_disabled.9.png");
}
/**
* Gets the button icon_ pressed orange.
*
* @return the button icon_ pressed orange
*/
public NinePatch getButtonIcon_PressedOrange()
{
return getRaw(IMGS_ROOT + "/btn_general_pressed.9.png");
}
/**
* Gets the button icon_rover.
*
* @return the button icon_rover
*/
public NinePatch getButtonIcon_rover()
{
return getRaw(IMGS_ROOT + "/btn_general_rover.9.png");
}
/**
* Gets the button icon_ normal light blue.
*
* @return the button icon_ normal light blue
*/
public NinePatch getButtonIcon_NormalLightBlue()
{
return getRaw(IMGS_ROOT + "/btn_special_lightblue.9.png");
}
/**
* Gets the button icon_ normal red.
*
* @return the button icon_ normal red
*/
public NinePatch getButtonIcon_NormalRed()
{
return getRaw(IMGS_ROOT + "/btn_special_red.9.png");
}
/**
* Gets the button icon_ normal blue.
*
* @return the button icon_ normal blue
*/
public NinePatch getButtonIcon_NormalBlue()
{
return getRaw(IMGS_ROOT + "/btn_special_blue.9.png");
}
/**
* Gets the toggle button icon_ checked green.
*
* @return the toggle button icon_ checked green
*/
public NinePatch getToggleButtonIcon_CheckedGreen()
{
return getRaw(IMGS_ROOT + "/toggle_button_selected.9.png");
}
/**
* Gets the toggle button icon_ rover green.
*
* @return the toggle button icon_ rover green
*/
public NinePatch getToggleButtonIcon_RoverGreen()
{
return getRaw(IMGS_ROOT + "/toggle_button_rover.9.png");
}
} | [
"lnwazg@126.com"
] | lnwazg@126.com |
d44b28021c77ebc78fe5f463da95a24fc5060eb6 | aaf88036ff1b87a3bd4b60db5dd5ec9429808ca1 | /src/tanks/client/tank/Direction.java | 7dc1b8c5ac644b0aa405320e69f720649e01f551 | [] | no_license | kademika/jp-july14-aleksandr.lexmint | 8d282bcfb2ab7494da86db68466e00ddc1a1731c | 960635523727b91cdc4171af450dcb9930a2a89d | refs/heads/master | 2021-01-19T13:50:34.512494 | 2014-11-04T14:47:10 | 2014-11-04T14:47:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 172 | java | package tanks.client.tank;
public enum Direction {
UP(1), DOWN(2), LEFT(3), RIGHT(4), NONE(-1);
private int id;
Direction(int id) {
this.id = id;
}
}
| [
"lexmint@rambler.ru"
] | lexmint@rambler.ru |
5db4ec8a4d72bc43de3fd6f61b6508ef075c27ac | 02c0b6a65501a2612a1c0b1fdb990a7d79d77304 | /backend/src/main/java/com/devsuperior/dsvendas/dto/SaleDTO.java | d9e59afff123692c170d0d8a48c23450b79bbcad | [] | no_license | aewinformatica/dsvendas-sds4 | bb77f7792a688d7a534b1d54420e408c07bbd744 | a580846e3c786ca5e4efdd25903131ee47000aee | refs/heads/main | 2023-08-13T00:02:11.073349 | 2021-09-15T20:35:19 | 2021-09-15T20:35:19 | 406,903,019 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,481 | java | package com.devsuperior.dsvendas.dto;
import java.time.LocalDate;
import com.devsuperior.dsvendas.entities.Sale;
public class SaleDTO {
private Long id;
private Integer visited;
private Integer deals;
private Double amount;
private LocalDate date;
private SellerDTO seller;
public SaleDTO() {
}
public SaleDTO(Long id, Integer visited, Integer deals, Double amount, LocalDate date, SellerDTO seller) {
this.id = id;
this.visited = visited;
this.deals = deals;
this.amount = amount;
this.date = date;
this.seller = seller;
}
public SaleDTO(Sale entity) {
id = entity.getId();
visited = entity.getVisited();
deals = entity.getDeals();
amount = entity.getAmount();
date = entity.getDate();
seller = new SellerDTO(entity.getSeller());
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getVisited() {
return visited;
}
public void setVisited(Integer visited) {
this.visited = visited;
}
public Integer getDeals() {
return deals;
}
public void setDeals(Integer deals) {
this.deals = deals;
}
public Double getAmount() {
return amount;
}
public void setAmount(Double amount) {
this.amount = amount;
}
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public SellerDTO getSeller() {
return seller;
}
public void setSeller(SellerDTO seller) {
this.seller = seller;
}
}
| [
"wagner.jesus@esmenezes.com.br"
] | wagner.jesus@esmenezes.com.br |
facf7f7a480e3f63110c156ebb6a088f76e80cb0 | 7ef67b2a805d93c8bcabb3d46dc5375ec92d65ec | /JavaPersonal/src/service/LoginService.java | fb87868ab543d0c9037d5566d2a3ea188286d45f | [] | no_license | kay128/ProjectInEdu | 8a29882f9ea86488532fe69233a8933f652b7dc7 | b2860c6ade7e156fcef32e35cd16e7f109fce446 | refs/heads/master | 2021-09-24T18:53:27.253173 | 2018-10-13T12:24:46 | 2018-10-13T12:24:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 235 | java | package service;
import dbDAO.Dao;
import model.Member;
public class LoginService {
Dao mDao = new Dao();
public Member logSer(Member logMember) {
Member inMember = mDao.logIn(logMember);
return inMember;
}
}
| [
"KAY@gmail.com"
] | KAY@gmail.com |
766f72c8fbb0efc00feef75c2207d85f6e2c29df | 81e8e7fecb078ff77361a2d2d76a9b8626db5b22 | /mnote-member/src/main/java/com/loong/mnote/web/form/param/UpdateForgetPwdByEmailParam.java | 0e212aa27aad8520e27a9fc94e8b5659c34d67d5 | [] | no_license | tss0823/mnote | 173e61f13cbad5b245f9fcc6e463ea21b2d72ae7 | 91cb736eee47df9bdbdee03cdde5bc1de11e2a82 | refs/heads/master | 2020-05-24T09:31:27.373745 | 2019-05-17T13:00:44 | 2019-05-17T13:00:44 | 187,208,402 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,278 | java | package com.loong.mnote.web.form.param;
import com.loong.mnote.common.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;
/**
* @author: sam
* @date: 2019-02-14 16:23
*/
@ApiModel("用户修改密码参数")
public class UpdateForgetPwdByEmailParam extends BaseDomain {
@NotBlank(message="邮箱地址不能为空")
@ApiModelProperty(notes = "邮箱地址",example = "test@mnote.com",required = true)
private String email;
@NotBlank(message="邮箱验证码不能为空")
@ApiModelProperty(notes = "邮箱验证码",example = "1234",required = true)
private String checkCode;
@NotBlank(message="密码不能为空")
@ApiModelProperty(notes = "密码",example = "123456",required = true)
private String pwd;
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getCheckCode() {
return checkCode;
}
public void setCheckCode(String checkCode) {
this.checkCode = checkCode;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
}
| [
"sam@loong.ph"
] | sam@loong.ph |
0682d41707b37febb32b7ded303779a3b95c7f5e | 57c2f7e66db98fbc3b119b8fc10e206f85c26b97 | /app/src/main/java/io/abhisheksaha/abhishekweatherapp/Main.java | 81af20b32df6dbb1e6228edd01ec1fe2b100b390 | [] | no_license | AbhishekSaha/WeatherAppAndroid | a04105b90c646e60af8c238a1c0e81318bb89ce2 | 79fb32f938ac309d4cd9c75187611532fadd0afa | refs/heads/master | 2020-04-13T02:59:39.527932 | 2015-02-19T21:03:58 | 2015-02-19T21:03:58 | 30,977,474 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,237 | java | package io.abhisheksaha.abhishekweatherapp;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import junit.framework.Test;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import java.util.Locale;
//Abhishek Saha Production
public class Main extends Activity {
String ul = "http://api.worldweatheronline.com/free/v2/weather.ashx?key=51590f2da9a58a9b65af312c41fa9&q="; String rst = "&format=json";
public static String EXTRA_MESSAGE = "com.example.webapitutorial.MESSAGE";
public static String ZIP = "com.exap";
final Context context = this;
private class CallAPI extends AsyncTask<String, String, String> {
public String zipper;
@Override
protected String doInBackground(String... params) {
String urlString=params[0]; // URL to call
zipper = urlString;
String urll = ul.concat(urlString).concat(rst);
String apiOutput = ""; String resultToDisplay = "";
InputStream in = null;
// HTTP Get
try {
URL url = new URL(urll);
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestMethod("GET");
in = new BufferedInputStream(urlConnection.getInputStream());
if (urlConnection.getResponseCode() != 200)
{
throw new RuntimeException("Failed : HTTP error code : " + urlConnection.getResponseCode());
}
BufferedReader br = new BufferedReader(new InputStreamReader((urlConnection.getInputStream())));
apiOutput = br.readLine();
System.out.println(apiOutput);
Log.v("APICall", apiOutput);
urlConnection.disconnect();
/* JSONObject obj = new JSONObject(apiOutput);
JSONObject data = obj.getJSONObject("data");
JSONArray arr = data.getJSONArray("current_condition");
JSONObject today = arr.getJSONObject(0);
String temp_f = today.getString("temp_F");
System.out.println(temp_f);*/
return apiOutput;
} catch (NullPointerException e ) {
System.out.println("NPE exception");
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return "Hoppy";
}
protected void onPostExecute(String result) {
Intent intent = new Intent(getApplicationContext(), Weather.class);
Log.v("CallAPI","Entered OnPostExecute");
intent.putExtra(EXTRA_MESSAGE, result);
intent.putExtra(ZIP, zipper);
startActivity(intent);
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
/*Log.v("Main Method", "About to callAPI");
new CallAPI().execute(urll);
Log.v("Main Method", "About to call bill");
Log.v("Main Method", "called Bill");*/
final Button b1 = (Button) findViewById(R.id.button);
final Button b2 = (Button) findViewById(R.id.button2);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EditText ed = (EditText) findViewById(R.id.editText);
String zip = ed.getText().toString();
new CallAPI().execute(zip);
}
});
final AlertDialog alertDialog = new AlertDialog.Builder(this).create();
final AlertDialog headsup = new AlertDialog.Builder(this).create();
alertDialog.setTitle("GPS Turned Off");
headsup.setTitle("Triangulating Position");
alertDialog.setMessage("Please turn on GPS/Location");
headsup.setMessage("The device is currently triangulating your zip code, please wait");
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// here you can add functions
dialog.dismiss();
}
});
headsup.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// here you can add functions
dialog.dismiss();
}
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
headsup.show();
LocationManager localLocationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
localLocationManager.getLastKnownLocation("gps");
localLocationManager.requestLocationUpdates("gps", 2000L, 10.0F, new LocationListener() {
public void onLocationChanged(Location paramAnonymousLocation) {
double d1 = paramAnonymousLocation.getLatitude();
double d2 = paramAnonymousLocation.getLongitude();
Geocoder localGeocoder = new Geocoder(Main.this.getApplicationContext(), Locale.getDefault());
try {
List localList = localGeocoder.getFromLocation(d1, d2, 1);
if (localList.size() == 1) {
Address localAddress = (Address) localList.get(0);
Object[] arrayOfObject = new Object[3];
if (localAddress.getMaxAddressLineIndex() > 0) ;
String zip = localAddress.getPostalCode();
new CallAPI().execute(zip);
}
} catch (IOException localIOException) {
localIOException.printStackTrace();
return;
}
}
public void onProviderDisabled(String paramAnonymousString) {
// AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialog.show();
}
public void onProviderEnabled(String paramAnonymousString) {
//localTextView.setText("Triangulating position");
}
public void onStatusChanged(String paramAnonymousString, int paramAnonymousInt, Bundle paramAnonymousBundle) {
}
});
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.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();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"as1695@scarletmail.rutgers.edu"
] | as1695@scarletmail.rutgers.edu |
cd637d4df7b93bf466daeac5ce43cc78ac5abf2a | 571c075c531f13401cfc1b429a12122e13a35363 | /src/main/java/com/expidia/model/HotelPricingInfo.java | 2836c05efe75a71619a55d45c0a108939e5b7d65 | [] | no_license | wkaraleh/ExpediaAssignment | fb24134d3ca3856afae50ce967f91dc8970a54c8 | 8ff1d89cead394d91e0c8d182b0a04a0a032c295 | refs/heads/master | 2021-04-09T17:06:50.986604 | 2018-03-23T23:10:10 | 2018-03-23T23:10:10 | 125,659,601 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,436 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.expidia.model;
/**
*
* @author AD
*/
public class HotelPricingInfo {
/**
* totalPriceValue
*/
private String totalPriceValue;
/**
* averagePriceValue
*/
private String averagePriceValue;
/**
* originalPricePerNight
*/
private String originalPricePerNight;
/**
* drr
*/
private String drr;
/**
* percentSavings
*/
private String percentSavings;
/**
* currency
*/
private String currency;
/**
* crossOutPriceValue
*/
private String crossOutPriceValue;
/**
* getTotalPriceValue
*
* @return
*/
public String getTotalPriceValue() {
return totalPriceValue;
}
/**
* setTotalPriceValue
*
* @param totalPriceValue
*/
public void setTotalPriceValue(String totalPriceValue) {
this.totalPriceValue = totalPriceValue;
}
/**
* setAveragePriceValue
*
* @return
*/
public String getAveragePriceValue() {
return averagePriceValue;
}
/**
* setAveragePriceValue
*
* @param averagePriceValue
*/
public void setAveragePriceValue(String averagePriceValue) {
this.averagePriceValue = averagePriceValue;
}
/**
* getOriginalPricePerNight
*
* @return
*/
public String getOriginalPricePerNight() {
return originalPricePerNight;
}
/**
* setOriginalPricePerNight
*
* @param originalPricePerNight
*/
public void setOriginalPricePerNight(String originalPricePerNight) {
this.originalPricePerNight = originalPricePerNight;
}
/**
* getDrr
*
* @return
*/
public String getDrr() {
return drr;
}
/**
* setDrr
*
* @param drr
*/
public void setDrr(String drr) {
this.drr = drr;
}
/**
* getPercentSavings
*
* @return
*/
public String getPercentSavings() {
return percentSavings;
}
/**
* setPercentSavings
*
* @param percentSavings
*/
public void setPercentSavings(String percentSavings) {
this.percentSavings = percentSavings;
}
/**
* getCurrency
*
* @return
*/
public String getCurrency() {
return currency;
}
/**
* setCurrency
*
* @param currency
*/
public void setCurrency(String currency) {
this.currency = currency;
}
/**
* getCrossOutPriceValue
*
* @return
*/
public String getCrossOutPriceValue() {
return crossOutPriceValue;
}
/**
* setCrossOutPriceValue
*
* @param crossOutPriceValue
*/
public void setCrossOutPriceValue(String crossOutPriceValue) {
this.crossOutPriceValue = crossOutPriceValue;
}
@Override
public String toString() {
return "ClassPojo [totalPriceValue = " + totalPriceValue + ", averagePriceValue = " + averagePriceValue + ", originalPricePerNight = " + originalPricePerNight + ", drr = " + drr + ", percentSavings = " + percentSavings + ", currency = " + currency + ", crossOutPriceValue = " + crossOutPriceValue + "]";
}
}
| [
"karaleh@hotmail.com"
] | karaleh@hotmail.com |
d04c57074359562cf649f592b2f3a2ec5caa4464 | 196d64d834151b7ddf049e95766f96202805e099 | /zrpc-sample-server/src/main/java/indi/zproo/zrpc/sample/server/RpcBootstrap.java | ce2431a1216ee8f7531fa00983d6033424759a47 | [] | no_license | zproo/zrpc | a29c61237988de0a10bdec5d02cc07bb7a44ea5f | f341263ad3e17e1a42d8afc36cb1f5a6a9d763c1 | refs/heads/master | 2020-03-19T07:51:26.417129 | 2018-06-29T09:58:53 | 2018-06-29T09:58:53 | 136,154,535 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 515 | java | package indi.zproo.zrpc.sample.server;
import indi.zproo.zrpc.server.RpcServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* @author: zproo
* @create: 2018-06-08 11:40
**/
public class RpcBootstrap {
private static final Logger logger = LoggerFactory.getLogger(RpcBootstrap.class);
public static void main(String[] args) {
logger.debug("start server!!");
new ClassPathXmlApplicationContext("spring.xml");
}
}
| [
"630816477@qq.com"
] | 630816477@qq.com |
8273474c7cee06710329c9bfb397436c03343bb3 | 6d6f7df2e6ca8f45f2f31b3a7aa0289527af9bcd | /shiro-example-chapter11/src/main/java/com/github/zhangkaitao/shiro/chapter11/service/PasswordHelper.java | b4b33e011bb11bd20b5f657484dd9b79f49aa43b | [] | no_license | beipiaocanglang/shiro-example-kaitao | 98a58585a86afc838aca194e8736ef214b55c48a | 7845f2b32a7a9cf5173840ff4bc9ada793a9b82f | refs/heads/master | 2020-03-06T14:34:40.331033 | 2018-05-17T08:29:33 | 2018-05-17T08:29:33 | 126,938,232 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 943 | java | package com.github.zhangkaitao.shiro.chapter11.service;
import com.github.zhangkaitao.shiro.chapter11.entity.User;
import org.apache.shiro.crypto.RandomNumberGenerator;
import org.apache.shiro.crypto.SecureRandomNumberGenerator;
import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;
/**
* 生成散列值 盐值
*/
public class PasswordHelper {
private RandomNumberGenerator randomNumberGenerator = new SecureRandomNumberGenerator();
private String algorithmName = "md5";
private final int hashIterations = 2;
public void encryptPassword(User user) {
user.setSalt(randomNumberGenerator.nextBytes().toHex());
String newPassword = new SimpleHash(
algorithmName,
user.getPassword(),
ByteSource.Util.bytes(user.getCredentialsSalt()),
hashIterations).toHex();
user.setPassword(newPassword);
}
}
| [
"yUhU3552247687"
] | yUhU3552247687 |
8baf8800860d4b7c895f63f2db1c896f18422591 | b450a6179d6777410d6978ae6988859b50ce8d53 | /src/main/java/com/eyas/business/model/pojo/ServicesQueryDTO.java | 4787eb8d878f74f81a2c2a75ad2f97bf2ed9fab5 | [] | no_license | binglong180/PortalSite1 | 61cd628e5090afe20a1c3ee1dc6232578e623bdc | 7bedcf561c246e36d151eb18761c5083fe7e608c | refs/heads/master | 2020-05-24T07:47:11.530220 | 2019-02-25T08:57:19 | 2019-02-25T08:57:19 | 187,169,106 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,167 | java | package com.eyas.business.model.pojo;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @Auther: 王龙龙
* @Date: 2019/2/11 17:37
* @Description:
*/
public class ServicesQueryDTO {
private String title;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date starttime;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endtime;
private boolean validflag = true;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Date getStarttime() {
return starttime;
}
public void setStarttime(Date starttime) {
this.starttime = starttime;
}
public Date getEndtime() {
return endtime;
}
public void setEndtime(Date endtime) {
this.endtime = endtime;
}
public boolean isValidflag() {
return validflag;
}
public void setValidflag(boolean validflag) {
this.validflag = validflag;
}
}
| [
"646288178@qq.com"
] | 646288178@qq.com |
a4aac50573e7f2e5ef14f6d6134afdc4591d7c9c | f181b8bed704635849fd2ea5f35d82208dc8f34f | /microsrv-oauth2-authorization-code/src/main/java/com/spring/cloud/microsrvoauth2authorizationcode/config/AuthorizationServerConfiguration.java | b25334806146b6de2d58f719228a3c1e7ceb6b51 | [] | no_license | zhouyongtao/spring-cloud-microservice | 706cc6f60210d0c15826e62f9ba63fda4a681a28 | 3a2b385ff3ce85906cb840d26e616d93c8bf75c4 | refs/heads/master | 2022-01-22T17:58:26.089414 | 2022-01-09T16:40:33 | 2022-01-09T16:40:33 | 137,050,203 | 61 | 38 | null | 2022-01-09T16:40:34 | 2018-06-12T09:39:25 | Java | UTF-8 | Java | false | false | 4,398 | java | package com.spring.cloud.microsrvoauth2authorizationcode.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.crypto.factory.PasswordEncoderFactories;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
import org.springframework.security.oauth2.provider.token.store.KeyStoreKeyFactory;
import java.security.KeyPair;
import java.util.HashMap;
import java.util.Map;
/**
* Demo class
*
* @author: irving
* @date: 2018/12/7 21:57
* @version: v1.0
*/
@Configuration
@EnableAuthorizationServer
public class AuthorizationServerConfiguration extends AuthorizationServerConfigurerAdapter {
@Autowired
private AuthenticationManager authenticationManager;
@Autowired
private MyUserDetailsService userDetailsService;
@Override
public void configure(final AuthorizationServerSecurityConfigurer authorizationServerSecurityConfigurer) throws Exception {
authorizationServerSecurityConfigurer.tokenKeyAccess("permitAll()").checkTokenAccess("isAuthenticated()");
}
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
String secret = passwordEncoder.encode("secret");
clients.inMemory() // 使用in-memory存储
.withClient("client") // client_id
.secret(secret) // client_secret
//.autoApprove(true) //如果为true 则不会跳转到授权页面,而是直接同意授权返回code
.authorizedGrantTypes("authorization_code", "refresh_token") // 该client允许的授权类型
.scopes("app"); // 允许的授权范围
}
@Override
public void configure(final AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
endpoints.authenticationManager(authenticationManager).userDetailsService(userDetailsService)
.accessTokenConverter(accessTokenConverter())
.allowedTokenEndpointRequestMethods(HttpMethod.GET, HttpMethod.POST); //支持GET POST 请求获取token;
}
@Bean
public JwtAccessTokenConverter accessTokenConverter() {
JwtAccessTokenConverter converter = new JwtAccessTokenConverter() {
@Override
public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) {
String userName = authentication.getUserAuthentication().getName();
final Map<String, Object> additionalInformation = new HashMap<String, Object>();
additionalInformation.put("user_name", userName);
((DefaultOAuth2AccessToken) accessToken).setAdditionalInformation(additionalInformation);
OAuth2AccessToken token = super.enhance(accessToken, authentication);
return token;
}
};
//converter.setSigningKey("bcrypt");
KeyPair keyPair = new KeyStoreKeyFactory(new ClassPathResource("keystore.jks"), "foobar".toCharArray())
.getKeyPair("test");
converter.setKeyPair(keyPair);
return converter;
}
} | [
"ytzhou@homeinns.com"
] | ytzhou@homeinns.com |
e5b8b815e270a934aa2c806c288a2c094b70635b | a52151cd45a37c24513a72397bbb08bc01678bbd | /src/main/java/com/bosssoft/install/nontax/windows/action/InitConfig.java | 37ed4c3f3e4c3a928f6d5756d9379a8460cd25f3 | [] | no_license | 105032013072/notax_windows_install_new | 51e42826a99af01c2ce0f269531c1202e64a3db9 | 257b4ed5679f43ea7000827000351cc009a6c16a | refs/heads/master | 2021-01-01T04:38:40.198160 | 2017-09-13T11:42:22 | 2017-09-13T11:42:22 | 97,217,825 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,730 | java | package com.bosssoft.install.nontax.windows.action;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.util.Map;
import java.util.Properties;
import org.apache.log4j.Logger;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
import org.apache.velocity.app.VelocityEngine;
import com.bosssoft.platform.installer.core.IContext;
import com.bosssoft.platform.installer.core.InstallException;
import com.bosssoft.platform.installer.core.action.IAction;
import com.bosssoft.platform.installer.core.util.ExpressionParser;
public class InitConfig implements IAction{
transient Logger logger = Logger.getLogger(getClass());
public void execute(IContext context, Map params) throws InstallException {
String initFiles=params.get("INIT_FILES").toString();
String[] files=initFiles.split(",");
for (String ifile : files) {
Properties p=new Properties();
try{
InputStream fis=new FileInputStream(ifile);
p.load(fis);
fis.close();
String appConfig=p.getProperty("APP_CONFIG");
String conftemp=p.getProperty("CONFIG_TEMPLET");
String tempVars=p.getProperty("TEMPLET_variables");
doinit(appConfig,conftemp,tempVars,context);
}catch(Exception e){
e.printStackTrace();
}
}
}
private void doinit(String appConfig, String conftemp, String tempVars,IContext context) {
appConfig=ExpressionParser.parseString(appConfig);
conftemp=ExpressionParser.parseString(conftemp);
File f=new File(conftemp);
Properties p = new Properties();
// 初始化默认加载路径为:D:/template
p.setProperty(VelocityEngine.FILE_RESOURCE_LOADER_PATH, f.getParent());
p.setProperty(Velocity.ENCODING_DEFAULT, "UTF-8");
p.setProperty(Velocity.OUTPUT_ENCODING, "UTF-8");
// 初始化Velocity引擎,init对引擎VelocityEngine配置了一组默认的参数
Velocity.init(p);
Template t = Velocity.getTemplate(f.getName());
VelocityContext vc = new VelocityContext();
String[] vars=tempVars.split(",");
for (String v : vars) {
vc.put(v, context.getStringValue(v));
}
StringWriter writer = new StringWriter();
t.merge(vc, writer);
try {
BufferedWriter bw = new BufferedWriter (new OutputStreamWriter (new FileOutputStream(appConfig)));
bw.write (writer.toString());
bw.close();
} catch (IOException e) {
this.logger.error(e);
}
}
public void rollback(IContext context, Map params) throws InstallException {
}
}
| [
"1337893145@qq.com"
] | 1337893145@qq.com |
809487e0eb33aedbbf9f058caeac33e67433f228 | 74b966cf026a0b9e2e1fc57dfb1be0f3a681c4c6 | /ContractManage/src/main/java/cn/com/kxcomm/contractmanage/service/IRightService.java | f175c24ed997c9f21fc3021a69a5614cb40a3cdd | [] | no_license | liveqmock/Projects | 6f75cdb7e59015aed3ad851619676c392ea7fdec | 0b416e76f38dd7f21062199f0dcf6f893e111eca | refs/heads/master | 2021-01-14T12:31:44.197040 | 2015-04-12T08:38:19 | 2015-04-12T08:38:19 | 33,808,969 | 0 | 0 | null | 2015-04-12T08:21:07 | 2015-04-12T08:21:07 | null | UTF-8 | Java | false | false | 554 | java | package cn.com.kxcomm.contractmanage.service;
import java.util.List;
import cn.com.kxcomm.base.vo.MenuEntity;
import cn.com.kxcomm.contractmanage.entity.TbRight;
import cn.com.kxcomm.contractmanage.vo.RightVo;
public interface IRightService extends ICommonService<TbRight> {
/**
* 查找菜单
* @return
*/
public List<MenuEntity> queryMenu();
/**
*
* 查看所有权限
*
* @return
* @author zhangjh 新增日期:2013-3-21
* @since ContractManage
*/
public List<RightVo> queryAllRight();
}
| [
"chenliang@kxcomm.com.cn"
] | chenliang@kxcomm.com.cn |
63f475b9afeb963e33d6c74fe9793711547d4fa7 | 8246e05fe9af988c580c66573136deae598b6f72 | /src/com/stark/web/entity/RelArticleForward.java | 49f45ac96a8aa11f6b0193cf8a306372b2e79f89 | [] | no_license | songcser/Gam | 9cce4c5b98a7fbe30c0b432e79ce5656ffed93e9 | 7fb172a825bc4245adf424a918ea456b3dbf778a | refs/heads/master | 2021-01-10T19:40:33.362142 | 2015-07-02T09:53:54 | 2015-07-02T09:53:54 | 37,971,001 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 615 | java | package com.stark.web.entity;
import java.util.Date;
public class RelArticleForward {
private int id;
private ArticleInfo article;
private UserInfo user;
private Date date;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public ArticleInfo getArticle() {
return article;
}
public void setArticle(ArticleInfo article) {
this.article = article;
}
public UserInfo getUser() {
return user;
}
public void setUser(UserInfo user) {
this.user = user;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
}
| [
"songjiyi2008@163.com"
] | songjiyi2008@163.com |
68b4ffec6c576aad5df729f31f5ab62d14d60b9c | 728949c55f60435d517e080517bf62769ebe7e44 | /src/inter/controller/ManterQuartosController.java | 66efc85580b9836d1ea54af704cbe0163deed66c | [] | no_license | CarlosSaraiva-86/JavaFXProject | 1321c217067866159caba9b23c9b5c2685afa74c | da8aef0c2cbfd075c66847574d3ed4f72893cb84 | refs/heads/master | 2022-12-16T18:31:16.760534 | 2020-09-22T02:47:44 | 2020-09-22T02:47:44 | 297,145,190 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Java | false | false | 3,582 | java | package inter.controller;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Optional;
import inter.Main;
import inter.model.dao.QuartoDAO;
import inter.model.domain.Quarto;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonType;
import javafx.scene.control.TextField;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
public class ManterQuartosController{
@FXML
TextField txtId;
@FXML
TextField txtNmQuarto;
@FXML
TextField txtTipo;
@FXML
TextField txtValor;
QuartoDAO dao;
Quarto quarto;
@FXML
protected void salvarQuartos(ActionEvent event) throws SQLException {
int nmQuarto = 0;
float valor = 0;
try {
nmQuarto = Integer.parseInt(txtNmQuarto.getText());
valor = Float.parseFloat(txtValor.getText());
}
catch (Exception e) {
}
Quarto quarto = new Quarto(nmQuarto, txtTipo.getText(), valor);
dao = QuartoDAO.getDAOConnected();
if (txtId.getText().isEmpty()) {
quarto.setDisponibilidade("Disponível");
dao.create(quarto);
} else {
quarto.setId(Integer.parseInt(txtId.getText()));
dao.update(quarto);
}
Alert alert = new Alert(AlertType.INFORMATION);
alert.setHeaderText("Salvo com sucesso!");
alert.setContentText(null);
alert.showAndWait();
limparCampos();
}
@FXML
protected void buscarQuarto(ActionEvent event) throws IOException {
quarto = new Quarto();
boolean selectedQuarto = showBuscaQuarto(quarto);
if (selectedQuarto) {
txtId.setText(String.valueOf(quarto.getId()));
txtNmQuarto.setText(String.valueOf(quarto.getNmQuarto()));
txtTipo.setText(quarto.getTipo());
txtValor.setText(String.valueOf(quarto.getValor()));
}
}
@FXML
protected void excluirQuarto(ActionEvent event) throws NumberFormatException, SQLException {
if (!txtId.getText().isEmpty()) {
Alert alert = new Alert(AlertType.CONFIRMATION);
alert.setTitle("Excluir");
alert.setHeaderText("Deseja mesmo excluir o cadastro?");
alert.setContentText(null);
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK) {
dao = QuartoDAO.getDAOConnected();
dao.delete(Integer.parseInt(txtId.getText()));
alert = new Alert(AlertType.INFORMATION);
alert.setHeaderText("Excluido com sucesso!");
alert.setContentText(null);
alert.showAndWait();
limparCampos();
}
} else {
Alert alert = new Alert(AlertType.INFORMATION);
alert.setHeaderText("Selecione um cliente para excluir!");
alert.setContentText(null);
alert.showAndWait();
}
}
private boolean showBuscaQuarto(Quarto model) throws IOException {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(Main.class.getResource("views/BuscarQuartoView.fxml"));
AnchorPane root = (AnchorPane) loader.load();
Stage dialogStage = new Stage();
dialogStage.setTitle("Busca Hospede");
Scene scene = new Scene(root);
dialogStage.setScene(scene);
BuscarQuartoController controller = loader.getController();
controller.setDialogStage(dialogStage);
controller.setQuarto(model);
dialogStage.showAndWait();
this.quarto = controller.getQuarto();
return controller.isSelected();
}
protected void limparCampos() {
txtNmQuarto.setText("");
txtTipo.setText("");
txtValor.setText("");
txtId.setText("");
}
}
| [
"carlos@evolucaoinfo.com.br"
] | carlos@evolucaoinfo.com.br |
ce97d0c6265dceb3917970e1b644f0aab0bb65f2 | 83098d1ffa02ad34d4b6df3f21127075154c7127 | /hertz-mdm/src/main/java/com/orchestranetworks/ps/project/tablereffilter/SubjectTableRefFilter.java | f6aff62250e8e13676c1a238560ade7edeba2d71 | [] | no_license | JaganChinthakayala/myTestRepos | 6b9a103f6fd46c5cc1528f28321eabfb838ca1ba | 6cf0014aa5555559f74b75a1731abffe9f8589db | refs/heads/master | 2023-02-06T15:29:45.817708 | 2023-02-03T04:42:17 | 2023-02-03T04:42:17 | 125,117,254 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,528 | java | /*
* Copyright Orchestra Networks 2000-2012. All rights reserved.
*/
package com.orchestranetworks.ps.project.tablereffilter;
import java.util.*;
import com.onwbp.adaptation.*;
import com.orchestranetworks.instance.*;
import com.orchestranetworks.ps.project.path.*;
import com.orchestranetworks.ps.project.util.*;
import com.orchestranetworks.ps.util.*;
import com.orchestranetworks.schema.*;
/**
*/
public abstract class SubjectTableRefFilter implements TableRefFilter, SubjectPathCapable
{
protected abstract String getMasterDataSpaceName();
protected abstract boolean acceptProjectStatus(ValueContext projectContext);
protected abstract boolean acceptSubjectStatus(
ValueContext projectContext,
Adaptation subjectRecord);
protected abstract String getSubjectsNameForMessage();
protected String getFilterMessage()
{
return "Only valid " + getSubjectsNameForMessage()
+ " with the same region and the correct status for this project type can be chosen.";
}
@Override
public void setup(TableRefFilterContext context)
{
context.addFilterErrorMessage(getFilterMessage());
}
@Override
public String toUserDocumentation(Locale locale, ValueContext context)
throws InvalidSchemaException
{
return getFilterMessage();
}
@Override
public boolean accept(Adaptation adaptation, ValueContext context)
{
SubjectPathConfig pathConfig = getSubjectPathConfig();
// can't be associated with any other in-process project (unless it's the one already assigned)
String currentProjectType = ProjectUtil.getCurrentProjectType(
adaptation,
getMasterDataSpaceName(),
pathConfig);
if (currentProjectType != null)
{
Adaptation savedContextRecord = AdaptationUtil.getRecordForValueContext(context);
String subjectFK = (String) context.getValue(Path.SELF);
if (savedContextRecord == null
|| !adaptation.getOccurrencePrimaryKey().format().equals(subjectFK))
{
return false;
}
}
Path projectSubjectProjectFieldPath = pathConfig.getProjectSubjectProjectFieldPath();
ValueContext projectContext;
if (projectSubjectProjectFieldPath == null)
{
projectContext = context;
}
else
{
Adaptation projectRecord = AdaptationUtil.followFK(
context,
Path.PARENT.add(projectSubjectProjectFieldPath));
if (projectRecord == null)
{
return false;
}
projectContext = projectRecord.createValueContext();
}
if (acceptProjectStatus(projectContext))
{
return true;
}
return acceptSubjectStatus(projectContext, adaptation);
}
}
| [
"jagan.chinthakayala@gmail.com"
] | jagan.chinthakayala@gmail.com |
5b9e2826f988ddc5f56aca72efc0b1055808871e | 9ad92fea2e8662c1c128396169faca070d6e3a0b | /org.caudexorigo.jpt.v3/src/main/java/org/caudexorigo/jpt/JptAttributeNode.java | e626781b471f03a16097e612e74fd575735825e9 | [] | no_license | jneto81/javardices | 4d11f4a6762ee557a5f88c9fbe6f702085050ea5 | bd82119dcc635ec3ed4b9f1ebe2b966fc14b724f | refs/heads/master | 2023-03-16T04:22:17.198283 | 2018-03-04T09:36:04 | 2018-03-04T09:36:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,418 | java | package org.caudexorigo.jpt;
import java.io.IOException;
import java.io.Serializable;
import java.io.Writer;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import nu.xom.Attribute;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.caudexorigo.ErrorAnalyser;
import org.mvel2.MVEL;
import org.mvel2.ParserContext;
public class JptAttributeNode extends JptNode
{
private String _attr_exp;
private char[] _attribute_name;
private static final char[] EQUAL_SIGN = "=".toCharArray();
private static final char[] QUOTE = "\"".toCharArray();
private static final char[] SPACE = " ".toCharArray();
private boolean _isInSlot;
private Serializable _compiled_exp;
JptAttributeNode(Attribute attribute, boolean isInSlot)
{
_isInSlot = isInSlot;
_attribute_name = attribute.getQualifiedName().toCharArray();
_attr_exp = attribute.getValue().replace("\'", "\"").trim();
}
public int getChildCount()
{
return 0;
}
public JptNode getChild(int i)
{
throw new IndexOutOfBoundsException("Attributes do not have children");
}
public void render(Map<String, Object> context, Writer out) throws IOException
{
try
{
if (_compiled_exp == null)
{
ParserContext parser_context = ParserContext.create();
Set<Entry<String, Object>> ctx_entries = context.entrySet();
for (Entry<String, Object> entry : ctx_entries)
{
parser_context.addInput(entry.getKey(), entry.getValue().getClass());
}
// Compile the expression.
_compiled_exp = MVEL.compileExpression(_attr_exp, parser_context);
}
// System.err.println(String.format("attribute expression: '%s';%n\tcontext: %s", _attr_exp, context));
String v = String.valueOf(MVEL.executeExpression(_compiled_exp, context));
if (StringUtils.isNotBlank(v))
{
String sout = StringEscapeUtils.escapeXml(v);
out.write(SPACE, 0, 1);
out.write(_attribute_name, 0, _attribute_name.length);
out.write(EQUAL_SIGN, 0, 1);
out.write(QUOTE, 0, 1);
out.write(sout);
out.write(QUOTE, 0, 1);
}
}
catch (Throwable t)
{
Throwable r = ErrorAnalyser.findRootCause(t);
throw new RuntimeException(String.format("Error processing JptAttributeNode:%nexpression: '%s';%ncontext: %s;%nmessage: '%s'", _attr_exp, context, r.getMessage()));
}
}
public boolean isInSlot()
{
return _isInSlot;
}
}
| [
"luis.neves@gmail.com"
] | luis.neves@gmail.com |
0076d1556480be19fd7740588aea968eca5b1292 | 7f61d878a6d63167658c1e148330a0b14f44bf49 | /data/src/androidTest/java/mavliwala/nazmuddin/data/ExampleInstrumentedTest.java | 2f5effb0501652af77d8bcc54704ea003ea43f33 | [
"Apache-2.0"
] | permissive | nazmuddin77/zoloassignment | 55b2ccea6652e6dc624de342659285bb7c071629 | 8fa4e57bc444e5a85d7e6a443555b8a2e75eabb8 | refs/heads/master | 2021-01-01T19:33:03.698375 | 2017-07-30T16:27:54 | 2017-07-30T16:27:54 | 98,611,036 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 757 | java | package mavliwala.nazmuddin.data;
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("mavliwala.nazmuddin.data.test", appContext.getPackageName());
}
}
| [
"nazmuddinmavliwala@gmail.com"
] | nazmuddinmavliwala@gmail.com |
bf439eb189d260269b2a409b2a2628489a7e6c3f | 3b90bdcae211286911fa8824e6c93858ba38a9ca | /erp_app/src/main/java/com/erp/app/common/CommonInterceptor.java | 4ae101e6e5fbd65ffb949b1ad39bf2095597e97e | [] | no_license | jjstudylist/spring | c313cc348ce9cce236888f6a1304d070878761d9 | 0a716220c765876626c69a6eb701b394d7520872 | refs/heads/master | 2022-12-22T03:39:32.659312 | 2019-10-17T23:04:29 | 2019-10-17T23:04:29 | 215,899,767 | 1 | 0 | null | 2022-12-16T09:43:26 | 2019-10-17T22:59:12 | JavaScript | UTF-8 | Java | false | false | 1,500 | java | package com.erp.app.common;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
public class CommonInterceptor extends HandlerInterceptorAdapter {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
boolean result = true;
String uri = request.getRequestURI().toString().trim();
try {
// ������ ������ ���
if (uri.equals("/") || uri.equals("/login") || uri.equals("/signUp") || uri.equals("/navercallback")|| uri.equals("/naverInfo")){
if(request.getSession().getAttribute("LoginInfo") != null ){
response.sendRedirect("/main");
result = false;
}else{
result = true;
}
}
else if(uri.equals("/findUserInfo")) {
result = true;
}
//���ǰ��� ���ϰ��
else if(request.getSession().getAttribute("LoginInfo") == null ){
response.sendRedirect("/");
result = false;
}else{
result = true;
}
} catch (Exception e) {
e.printStackTrace();
result = false;
}
return result;
}
}
| [
"56702303+jjstudylist@users.noreply.github.com"
] | 56702303+jjstudylist@users.noreply.github.com |
4d4739f297e8a1a575089817d03dd76258c90c5a | 475cd67ba0157dc70598f5bcab411ec4b978b5f1 | /src/main/java/com/gonggongjohn/eok/data/GravelTweaker.java | 2e5d4b35fce901890fcb45e67ac1ea2a5bc7b0b9 | [] | no_license | gonggongjohn/Evolution-Of-Knowledge-Old | 36faeff5c8172f1d9b200755db55084e4b904537 | 12cddfad22c31602d28726769ccdf8380fdd7cd0 | refs/heads/master | 2022-12-07T10:24:36.162531 | 2020-08-30T13:35:01 | 2020-08-30T13:35:01 | 169,188,923 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,353 | java | package com.gonggongjohn.eok.data;
import java.util.Random;
import com.gonggongjohn.eok.handlers.ItemHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.block.BlockGravel;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.world.BlockEvent;
//
//作者:zi_jing
//用途:挖掘沙砾有一定概率掉落燧石碎片
//
public class GravelTweaker {
@SubscribeEvent
public void Tweak(BlockEvent.HarvestDropsEvent event) {
if(!event.world.isRemote) {
if(event.block instanceof BlockGravel) {
event.drops.clear();
//生成一个范围为0-100的随机整数
Random rand = new Random();
int i = rand.nextInt(100);
//判断随机数大小
if(i<=30) {
event.drops.add(new ItemStack(ItemHandler.itemFlintFragment));
event.dropChance = 1.0F;
//System.out.println(i+",燧石碎片!");
}
else {
event.drops.add(new ItemStack(Item.getItemFromBlock(Blocks.gravel)));
event.dropChance = 1.0F;
//System.out.println(i+",沙砾!");
}
//event.drops.add(new ItemStack(ItemHandler.itemFlintFragment));
}
}
}
//注册事件
public GravelTweaker() {
MinecraftForge.EVENT_BUS.register(this);
}
}
| [
"zi-jing@users.noreply.github.com"
] | zi-jing@users.noreply.github.com |
491cb25ff3d83a6975c3919ef582edd27c8f90f8 | 17107bfc937d9d283e4846b87eb725b3fe6a9250 | /src/main/java/edu/ucsf/rbvi/scNetViz/internal/api/StringMatrix.java | d02c8ef78bad4da25020e0d420cbfa0fb32713bd | [
"Apache-2.0"
] | permissive | RBVI/scNetViz | 6b9713c632afd5f731a2a0df08613262c684cffa | 336ac63775f80a9842867f6005a3dc95622ed3fb | refs/heads/master | 2022-06-20T16:10:19.128310 | 2022-05-17T16:47:39 | 2022-05-17T16:47:39 | 154,605,796 | 7 | 3 | Apache-2.0 | 2021-08-02T17:17:21 | 2018-10-25T03:37:46 | Java | UTF-8 | Java | false | false | 445 | java | package edu.ucsf.rbvi.scNetViz.internal.api;
public interface StringMatrix extends Matrix {
public String[][] getStringMatrix();
public String[][] getStringMatrix(boolean tranpose);
public String[][] getStringMatrix(boolean tranpose, boolean excludeControls);
public String getValue(String rowLabel, String colLabel);
public String getValue(int rowIndex, int colIndex);
public default Class<?> getMatrixClass() { return String.class; }
}
| [
"scooter@cgl.ucsf.edu"
] | scooter@cgl.ucsf.edu |
95e23236957b119298a47f971f3a6093dcad3299 | e858cd6804301d67639f8848e643646f1b2557e3 | /ctrlf_image/src/org/tensorflow/demo/DetectorActivity.java | e09e2aa25a8f2ba6dde5f706f99c9a395f9524a8 | [
"MIT"
] | permissive | XIAOAGE/ctrlf | cb63296a5553fcd1c813f2f15cf254d82166dc1b | 025d19dcba1df6e0f352696c282403ff4bc81da5 | refs/heads/master | 2020-03-18T17:43:10.258261 | 2018-05-27T03:29:01 | 2018-05-27T03:29:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,414 | java | /*
* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.tensorflow.demo;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.media.ImageReader.OnImageAvailableListener;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.SystemClock;
import android.util.Log;
import android.util.Size;
import android.util.TypedValue;
import android.view.Display;
import android.view.Surface;
import android.widget.Toast;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.Vector;
import org.tensorflow.demo.OverlayView.DrawCallback;
import org.tensorflow.demo.env.BorderedText;
import org.tensorflow.demo.env.ImageUtils;
import org.tensorflow.demo.env.Logger;
import org.tensorflow.demo.tracking.MultiBoxTracker;
import org.tensorflow.demo.R; // Explicit import needed for internal Google builds.
/**
* An activity that uses a TensorFlowMultiBoxDetector and ObjectTracker to detect and then track
* objects.
*/
public class DetectorActivity extends CameraActivity implements OnImageAvailableListener {
private static final Logger LOGGER = new Logger();
// Configuration values for the prepackaged multibox model.
private static final int MB_INPUT_SIZE = 224;
private static final int MB_IMAGE_MEAN = 128;
private static final float MB_IMAGE_STD = 128;
private static final String MB_INPUT_NAME = "ResizeBilinear";
private static final String MB_OUTPUT_LOCATIONS_NAME = "output_locations/Reshape";
private static final String MB_OUTPUT_SCORES_NAME = "output_scores/Reshape";
private static final String MB_MODEL_FILE = "file:///android_asset/multibox_model.pb";
private static final String MB_LOCATION_FILE =
"file:///android_asset/multibox_location_priors.txt";
private static final int TF_OD_API_INPUT_SIZE = 300;
private static final String TF_OD_API_MODEL_FILE =
"file:///android_asset/ssd_mobilenet_v1_android_export.pb";
private static final String TF_OD_API_LABELS_FILE = "file:///android_asset/coco_labels_list.txt";
// Configuration values for tiny-yolo-voc. Note that the graph is not included with TensorFlow and
// must be manually placed in the assets/ directory by the user.
// Graphs and models downloaded from http://pjreddie.com/darknet/yolo/ may be converted e.g. via
// DarkFlow (https://github.com/thtrieu/darkflow). Sample command:
// ./flow --model cfg/tiny-yolo-voc.cfg --load bin/tiny-yolo-voc.weights --savepb --verbalise
private static final String YOLO_MODEL_FILE = "file:///android_asset/graph-tiny-yolo-voc.pb";
private static final int YOLO_INPUT_SIZE = 416;
private static final String YOLO_INPUT_NAME = "input";
private static final String YOLO_OUTPUT_NAMES = "output";
private static final int YOLO_BLOCK_SIZE = 32;
// Which detection model to use: by default uses Tensorflow Object Detection API frozen
// checkpoints. Optionally use legacy Multibox (trained using an older version of the API)
// or YOLO.
private enum DetectorMode {
TF_OD_API, MULTIBOX, YOLO;
}
private static final DetectorMode MODE = DetectorMode.TF_OD_API;
// Minimum detection confidence to track a detection.
private static final float MINIMUM_CONFIDENCE_TF_OD_API = 0.6f;
private static final float MINIMUM_CONFIDENCE_MULTIBOX = 0.1f;
private static final float MINIMUM_CONFIDENCE_YOLO = 0.25f;
private static final boolean MAINTAIN_ASPECT = MODE == DetectorMode.YOLO;
private static final Size DESIRED_PREVIEW_SIZE = new Size(960, 720);
private static final boolean SAVE_PREVIEW_BITMAP = false;
private static final float TEXT_SIZE_DIP = 10;
private Integer sensorOrientation;
private Classifier detector;
private long lastProcessingTimeMs;
private Bitmap rgbFrameBitmap = null;
private Bitmap croppedBitmap = null;
private Bitmap cropCopyBitmap = null;
private boolean computingDetection = false;
private long timestamp = 0;
private Matrix frameToCropTransform;
private Matrix cropToFrameTransform;
private MultiBoxTracker tracker;
private byte[] luminanceCopy;
private BorderedText borderedText;
@Override
public void onPreviewSizeChosen(final Size size, final int rotation) {
final float textSizePx =
TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP, TEXT_SIZE_DIP, getResources().getDisplayMetrics());
borderedText = new BorderedText(textSizePx);
borderedText.setTypeface(Typeface.MONOSPACE);
tracker = new MultiBoxTracker(this);
int cropSize = TF_OD_API_INPUT_SIZE;
if (MODE == DetectorMode.YOLO) {
detector =
TensorFlowYoloDetector.create(
getAssets(),
YOLO_MODEL_FILE,
YOLO_INPUT_SIZE,
YOLO_INPUT_NAME,
YOLO_OUTPUT_NAMES,
YOLO_BLOCK_SIZE);
cropSize = YOLO_INPUT_SIZE;
} else if (MODE == DetectorMode.MULTIBOX) {
detector =
TensorFlowMultiBoxDetector.create(
getAssets(),
MB_MODEL_FILE,
MB_LOCATION_FILE,
MB_IMAGE_MEAN,
MB_IMAGE_STD,
MB_INPUT_NAME,
MB_OUTPUT_LOCATIONS_NAME,
MB_OUTPUT_SCORES_NAME);
cropSize = MB_INPUT_SIZE;
} else {
try {
detector = TensorFlowObjectDetectionAPIModel.create(
getAssets(), TF_OD_API_MODEL_FILE, TF_OD_API_LABELS_FILE, TF_OD_API_INPUT_SIZE);
cropSize = TF_OD_API_INPUT_SIZE;
} catch (final IOException e) {
LOGGER.e("Exception initializing classifier!", e);
Toast toast =
Toast.makeText(
getApplicationContext(), "Classifier could not be initialized", Toast.LENGTH_SHORT);
toast.show();
finish();
}
}
previewWidth = size.getWidth();
previewHeight = size.getHeight();
sensorOrientation = rotation - getScreenOrientation();
LOGGER.i("Camera orientation relative to screen canvas: %d", sensorOrientation);
LOGGER.i("Initializing at size %dx%d", previewWidth, previewHeight);
rgbFrameBitmap = Bitmap.createBitmap(previewWidth, previewHeight, Config.ARGB_8888);
croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Config.ARGB_8888);
frameToCropTransform =
ImageUtils.getTransformationMatrix(
previewWidth, previewHeight,
cropSize, cropSize,
sensorOrientation, MAINTAIN_ASPECT);
cropToFrameTransform = new Matrix();
frameToCropTransform.invert(cropToFrameTransform);
trackingOverlay = (OverlayView) findViewById(R.id.tracking_overlay);
trackingOverlay.addCallback(
new DrawCallback() {
@Override
public void drawCallback(final Canvas canvas) {
tracker.draw(canvas);
if (isDebug()) {
tracker.drawDebug(canvas);
}
}
});
addCallback(
new DrawCallback() {
@Override
public void drawCallback(final Canvas canvas) {
if (!isDebug()) {
return;
}
final Bitmap copy = cropCopyBitmap;
if (copy == null) {
return;
}
final int backgroundColor = Color.argb(100, 0, 0, 0);
//canvas.drawColor(backgroundColor);
final Matrix matrix = new Matrix();
final float scaleFactor = 2;
matrix.postScale(scaleFactor, scaleFactor);
matrix.postTranslate(
canvas.getWidth() - copy.getWidth() * scaleFactor,
canvas.getHeight() - copy.getHeight() * scaleFactor);
//canvas.drawBitmap(copy, matrix, new Paint());
final Vector<String> lines = new Vector<String>();
if (detector != null) {
final String statString = detector.getStatString();
final String[] statLines = statString.split("\n");
for (final String line : statLines) {
lines.add(line);
Log.e("aaaaa", line);
}
}
lines.add("");
lines.add("Frame: " + previewWidth + "x" + previewHeight);
lines.add("Crop: " + copy.getWidth() + "x" + copy.getHeight());
lines.add("View: " + canvas.getWidth() + "x" + canvas.getHeight());
lines.add("Rotation: " + sensorOrientation);
lines.add("Inference time: " + lastProcessingTimeMs + "ms");
borderedText.drawLines(canvas, 10, canvas.getHeight() - 10, lines);
}
});
}
OverlayView trackingOverlay;
@Override
protected void processImage() {
++timestamp;
final long currTimestamp = timestamp;
byte[] originalLuminance = getLuminance();
tracker.onFrame(
previewWidth,
previewHeight,
getLuminanceStride(),
sensorOrientation,
originalLuminance,
timestamp);
trackingOverlay.postInvalidate();
// No mutex needed as this method is not reentrant.
if (computingDetection) {
readyForNextImage();
return;
}
computingDetection = true;
LOGGER.i("Preparing image " + currTimestamp + " for detection in bg thread.");
rgbFrameBitmap.setPixels(getRgbBytes(), 0, previewWidth, 0, 0, previewWidth, previewHeight);
if (luminanceCopy == null) {
luminanceCopy = new byte[originalLuminance.length];
}
System.arraycopy(originalLuminance, 0, luminanceCopy, 0, originalLuminance.length);
readyForNextImage();
final Canvas canvas = new Canvas(croppedBitmap);
canvas.drawBitmap(rgbFrameBitmap, frameToCropTransform, null);
// For examining the actual TF input.
if (SAVE_PREVIEW_BITMAP) {
ImageUtils.saveBitmap(croppedBitmap);
}
runInBackground(
new Runnable() {
@Override
public void run() {
LOGGER.i("Running detection on image " + currTimestamp);
final long startTime = SystemClock.uptimeMillis();
final List<Classifier.Recognition> results = detector.recognizeImage(croppedBitmap);
lastProcessingTimeMs = SystemClock.uptimeMillis() - startTime;
cropCopyBitmap = Bitmap.createBitmap(croppedBitmap);
final Canvas canvas = new Canvas(cropCopyBitmap);
final Paint paint = new Paint();
paint.setColor(Color.WHITE);
paint.setStyle(Style.STROKE);
paint.setStrokeWidth(2.0f);
float minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;
switch (MODE) {
case TF_OD_API:
minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;
break;
case MULTIBOX:
minimumConfidence = MINIMUM_CONFIDENCE_MULTIBOX;
break;
case YOLO:
minimumConfidence = MINIMUM_CONFIDENCE_YOLO;
break;
}
final List<Classifier.Recognition> mappedRecognitions =
new LinkedList<Classifier.Recognition>();
for (final Classifier.Recognition result : results) {
Log.e("aaaaa", result.getTitle());
if(!CameraActivity.query.equals("") && result.getTitle().toLowerCase().contains(CameraActivity.query)) {
try {
Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);
r.play();
} catch (Exception e) {
e.printStackTrace();
}
}
final RectF location = result.getLocation();
if (location != null && result.getConfidence() >= minimumConfidence) {
// canvas.drawRect(location, paint);
cropToFrameTransform.mapRect(location);
result.setLocation(location);
mappedRecognitions.add(result);
}
}
tracker.trackResults(mappedRecognitions, luminanceCopy, currTimestamp);
trackingOverlay.postInvalidate();
requestRender();
computingDetection = false;
}
});
}
@Override
protected int getLayoutId() {
return R.layout.camera_connection_fragment_tracking;
}
@Override
protected Size getDesiredPreviewFrameSize() {
return DESIRED_PREVIEW_SIZE;
}
@Override
public void onSetDebug(final boolean debug) {
detector.enableStatLogging(debug);
}
}
| [
"leotianlizhan@gmail.com"
] | leotianlizhan@gmail.com |
7045661a3b972216935a437f8d9b9fbcb150abaf | 91a007333a294452cd0f1f53a89f9a2d29d4c43b | /src/main/java/com/d/main/bank/service/IMetadateService.java | 330282031f0fb20724f76f0e8b57c07e2f12b9df | [] | no_license | DertraumDong/dertraum | 1b4161a9d793d416700894d8aada29b9cfbeba35 | edd525f50874337c95958b87a2ebf5df7b0a492a | refs/heads/master | 2023-03-20T10:40:11.082399 | 2021-03-09T09:37:21 | 2021-03-09T09:37:21 | 338,948,480 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 767 | java | package com.d.main.bank.service;
import com.d.main.bank.model.Metadate;
import com.d.main.bank.model.MetadateDTO;
import java.util.List;
/**
* ������元数据 ����ʵ�ֲ�ӿ�
* @author Administrator
* @date 2020-04-01 02:20:00
*/
public interface IMetadateService {
/**
* ����������Id��ȡDTO
* @param id
*/
MetadateDTO findDTOById(String id)throws Exception;
/**
* ����������������ѯUser
* @param metadate
*/
public List<Metadate> selectAll(Metadate metadate);
Integer createMetadate(List<MetadateDTO> list) throws Exception;
Integer updateMetadate(MetadateDTO metadateDTO) throws Exception;
void taskVisit() throws Exception;
} | [
"liudong220@126.com"
] | liudong220@126.com |
7b5f89626e3c6a5e9b50384e4da7e2e66e94473d | 95bf08a832db97220b651ce64c6c8e7eb8ae9fc8 | /core/src/main/java/ch/dissem/bitmessage/entity/Version.java | 4d0fd05defeebe78f1051403a35f7a5d15aa42a4 | [
"Apache-2.0"
] | permissive | Carcophan/Jabit | ec4cec302997307d055cf95357c4fccd880acebb | 9adbace11c300e34e4e33fab982bc41d3e430061 | refs/heads/master | 2020-05-07T13:40:36.303645 | 2019-04-12T13:36:21 | 2019-04-12T13:36:21 | 180,559,601 | 1 | 0 | Apache-2.0 | 2019-04-10T10:36:45 | 2019-04-10T10:36:45 | null | UTF-8 | Java | false | false | 5,939 | java | /*
* Copyright 2015 Christian Basler
*
* 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 ch.dissem.bitmessage.entity;
import ch.dissem.bitmessage.BitmessageContext;
import ch.dissem.bitmessage.entity.valueobject.NetworkAddress;
import ch.dissem.bitmessage.utils.Encode;
import ch.dissem.bitmessage.utils.UnixTime;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
/**
* The 'version' command advertises this node's latest supported protocol version upon initiation.
*/
public class Version implements MessagePayload {
private static final long serialVersionUID = 7219240857343176567L;
/**
* Identifies protocol version being used by the node. Should equal 3. Nodes should disconnect if the remote node's
* version is lower but continue with the connection if it is higher.
*/
private final int version;
/**
* bitfield of features to be enabled for this connection
*/
private final long services;
/**
* standard UNIX timestamp in seconds
*/
private final long timestamp;
/**
* The network address of the node receiving this message (not including the time or stream number)
*/
private final NetworkAddress addrRecv;
/**
* The network address of the node emitting this message (not including the time or stream number and the ip itself
* is ignored by the receiver)
*/
private final NetworkAddress addrFrom;
/**
* Random nonce used to detect connections to self.
*/
private final long nonce;
/**
* User Agent (0x00 if string is 0 bytes long). Sending nodes must not include a user_agent longer than 5000 bytes.
*/
private final String userAgent;
/**
* The stream numbers that the emitting node is interested in. Sending nodes must not include more than 160000
* stream numbers.
*/
private final long[] streams;
private Version(Builder builder) {
version = builder.version;
services = builder.services;
timestamp = builder.timestamp;
addrRecv = builder.addrRecv;
addrFrom = builder.addrFrom;
nonce = builder.nonce;
userAgent = builder.userAgent;
streams = builder.streamNumbers;
}
public int getVersion() {
return version;
}
public long getServices() {
return services;
}
public long getTimestamp() {
return timestamp;
}
public NetworkAddress getAddrRecv() {
return addrRecv;
}
public NetworkAddress getAddrFrom() {
return addrFrom;
}
public long getNonce() {
return nonce;
}
public String getUserAgent() {
return userAgent;
}
public long[] getStreams() {
return streams;
}
@Override
public Command getCommand() {
return Command.VERSION;
}
@Override
public void write(OutputStream stream) throws IOException {
Encode.int32(version, stream);
Encode.int64(services, stream);
Encode.int64(timestamp, stream);
addrRecv.write(stream, true);
addrFrom.write(stream, true);
Encode.int64(nonce, stream);
Encode.varString(userAgent, stream);
Encode.varIntList(streams, stream);
}
@Override
public void write(ByteBuffer buffer) {
Encode.int32(version, buffer);
Encode.int64(services, buffer);
Encode.int64(timestamp, buffer);
addrRecv.write(buffer, true);
addrFrom.write(buffer, true);
Encode.int64(nonce, buffer);
Encode.varString(userAgent, buffer);
Encode.varIntList(streams, buffer);
}
public static final class Builder {
private int version;
private long services;
private long timestamp;
private NetworkAddress addrRecv;
private NetworkAddress addrFrom;
private long nonce;
private String userAgent;
private long[] streamNumbers;
public Builder defaults(long clientNonce) {
version = BitmessageContext.CURRENT_VERSION;
services = 1;
timestamp = UnixTime.now();
userAgent = "/Jabit:0.0.1/";
streamNumbers = new long[]{1};
nonce = clientNonce;
return this;
}
public Builder version(int version) {
this.version = version;
return this;
}
public Builder services(long services) {
this.services = services;
return this;
}
public Builder timestamp(long timestamp) {
this.timestamp = timestamp;
return this;
}
public Builder addrRecv(NetworkAddress addrRecv) {
this.addrRecv = addrRecv;
return this;
}
public Builder addrFrom(NetworkAddress addrFrom) {
this.addrFrom = addrFrom;
return this;
}
public Builder nonce(long nonce) {
this.nonce = nonce;
return this;
}
public Builder userAgent(String userAgent) {
this.userAgent = userAgent;
return this;
}
public Builder streams(long... streamNumbers) {
this.streamNumbers = streamNumbers;
return this;
}
public Version build() {
return new Version(this);
}
}
}
| [
"chrigu.meyer@gmail.com"
] | chrigu.meyer@gmail.com |
8ca8d1408b37691324791a56ac3798b5a92bbef6 | 75d7812f31219709c00477f49e1affc8604fca66 | /src/io/oblu/commn/MadgwickAHRS.java | db84ed0a85804e0fcd4d99722b6496f875aac6e3 | [
"CC-BY-4.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | oblu-iot/ObluScope-Java | 5919901fe7bd8939bac0bf27810e713b28dbefa7 | 4f7c90c69763d3eb2cd53a11ff4bd60efe20fc8b | refs/heads/master | 2020-03-30T19:00:52.713713 | 2018-11-19T05:20:14 | 2018-11-19T05:20:14 | 151,523,990 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 12,456 | java | /*
* Copyright (C) 2018 X-IO Technologies
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/*
* * Copyright (C) 2018 GT Silicon Pvt Ltd
*
* Licensed under the Creative Commons Attribution 4.0
* International Public License (the "CCBY4.0 License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://creativecommons.org/licenses/by/4.0/legalcode
*
* Note that the CCBY4.0 license is applicable only for the modifications
made
* by GT Silicon Pvt Ltd
*
* Modifications made by GT Silicon Pvt Ltd are within the following
comments:
* // BEGIN - Added by GT Silicon - BEGIN //
* {Code included or modified by GT Silicon}
* // END - Added by GT Silicon - END //
*
* */
package io.oblu.commn;
public class MadgwickAHRS {
private static double X = 0.0d;
private static double Y = 0.0d;
private static double Z = 0.0d;
private final float[] final_data = new float[3];
float sampleFreq = Constants.OUTRATE;//Constants.OUTRATE; // sample frequency in Hz
float betaDef = 0.04f; // 2 * proportional gain
// float betaDef = 0.3f;
//---------------------------------------------------------------------------------------------------
// Variable definitions
float beta = betaDef; // 2 * proportional gain (Kp)
float q0 = 1.0f, q1 = 0.0f, q2 = 0.0f, q3 = 0.0f, q4 = 0.0f; // quaternion of sensor frame relative to auxiliary frame
float[] quaternion = new float[4];
//---------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------
// AHRS algorithm update
void MadgwickAHRSupdate(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz) {
float recipNorm;
float s0, s1, s2, s3;
float qDot1, qDot2, qDot3, qDot4;
float hx, hy;
float _2q0mx, _2q0my, _2q0mz, _2q1mx, _2bx, _2bz, _4bx, _4bz, _2q0, _2q1, _2q2, _2q3, _2q0q2, _2q2q3, q0q0, q0q1, q0q2, q0q3, q1q1, q1q2, q1q3, q2q2, q2q3, q3q3;
// Use IMU algorithm if magnetometer measurement invalid (avoids NaN in magnetometer normalisation)
if ((mx == 0.0f) && (my == 0.0f) && (mz == 0.0f)) {
MadgwickAHRSupdateIMU(gx, gy, gz, ax, ay, az);
return;
}
// Rate of change of quaternion from gyroscope
qDot1 = 0.5f * (-q1 * gx - q2 * gy - q3 * gz);
qDot2 = 0.5f * (q0 * gx + q2 * gz - q3 * gy);
qDot3 = 0.5f * (q0 * gy - q1 * gz + q3 * gx);
qDot4 = 0.5f * (q0 * gz + q1 * gy - q2 * gx);
// Compute feedback only if accelerometer measurement valid (avoids NaN in accelerometer normalisation)
if (!((ax == 0.0f) && (ay == 0.0f) && (az == 0.0f))) {
// Normalise accelerometer measurement
recipNorm = invSqrt(ax * ax + ay * ay + az * az);
ax *= recipNorm;
ay *= recipNorm;
az *= recipNorm;
// Normalise magnetometer measurement
recipNorm = invSqrt(mx * mx + my * my + mz * mz);
mx *= recipNorm;
my *= recipNorm;
mz *= recipNorm;
// Auxiliary variables to avoid repeated arithmetic
_2q0mx = 2.0f * q0 * mx;
_2q0my = 2.0f * q0 * my;
_2q0mz = 2.0f * q0 * mz;
_2q1mx = 2.0f * q1 * mx;
_2q0 = 2.0f * q0;
_2q1 = 2.0f * q1;
_2q2 = 2.0f * q2;
_2q3 = 2.0f * q3;
_2q0q2 = 2.0f * q0 * q2;
_2q2q3 = 2.0f * q2 * q3;
q0q0 = q0 * q0;
q0q1 = q0 * q1;
q0q2 = q0 * q2;
q0q3 = q0 * q3;
q1q1 = q1 * q1;
q1q2 = q1 * q2;
q1q3 = q1 * q3;
q2q2 = q2 * q2;
q2q3 = q2 * q3;
q3q3 = q3 * q3;
// Reference direction of Earth's magnetic field
hx = mx * q0q0 - _2q0my * q3 + _2q0mz * q2 + mx * q1q1 + _2q1 * my * q2 + _2q1 * mz * q3 - mx * q2q2 - mx * q3q3;
hy = _2q0mx * q3 + my * q0q0 - _2q0mz * q1 + _2q1mx * q2 - my * q1q1 + my * q2q2 + _2q2 * mz * q3 - my * q3q3;
_2bx = (float) Math.sqrt(hx * hx + hy * hy);
_2bz = -_2q0mx * q2 + _2q0my * q1 + mz * q0q0 + _2q1mx * q3 - mz * q1q1 + _2q2 * my * q3 - mz * q2q2 + mz * q3q3;
_4bx = 2.0f * _2bx;
_4bz = 2.0f * _2bz;
// Gradient decent algorithm corrective step
s0 = -_2q2 * (2.0f * q1q3 - _2q0q2 - ax) + _2q1 * (2.0f * q0q1 + _2q2q3 - ay) - _2bz * q2 * (_2bx * (0.5f - q2q2 - q3q3) + _2bz * (q1q3 - q0q2) - mx) + (-_2bx * q3 + _2bz * q1) * (_2bx * (q1q2 - q0q3) + _2bz * (q0q1 + q2q3) - my) + _2bx * q2 * (_2bx * (q0q2 + q1q3) + _2bz * (0.5f - q1q1 - q2q2) - mz);
s1 = _2q3 * (2.0f * q1q3 - _2q0q2 - ax) + _2q0 * (2.0f * q0q1 + _2q2q3 - ay) - 4.0f * q1 * (1 - 2.0f * q1q1 - 2.0f * q2q2 - az) + _2bz * q3 * (_2bx * (0.5f - q2q2 - q3q3) + _2bz * (q1q3 - q0q2) - mx) + (_2bx * q2 + _2bz * q0) * (_2bx * (q1q2 - q0q3) + _2bz * (q0q1 + q2q3) - my) + (_2bx * q3 - _4bz * q1) * (_2bx * (q0q2 + q1q3) + _2bz * (0.5f - q1q1 - q2q2) - mz);
s2 = -_2q0 * (2.0f * q1q3 - _2q0q2 - ax) + _2q3 * (2.0f * q0q1 + _2q2q3 - ay) - 4.0f * q2 * (1 - 2.0f * q1q1 - 2.0f * q2q2 - az) + (-_4bx * q2 - _2bz * q0) * (_2bx * (0.5f - q2q2 - q3q3) + _2bz * (q1q3 - q0q2) - mx) + (_2bx * q1 + _2bz * q3) * (_2bx * (q1q2 - q0q3) + _2bz * (q0q1 + q2q3) - my) + (_2bx * q0 - _4bz * q2) * (_2bx * (q0q2 + q1q3) + _2bz * (0.5f - q1q1 - q2q2) - mz);
s3 = _2q1 * (2.0f * q1q3 - _2q0q2 - ax) + _2q2 * (2.0f * q0q1 + _2q2q3 - ay) + (-_4bx * q3 + _2bz * q1) * (_2bx * (0.5f - q2q2 - q3q3) + _2bz * (q1q3 - q0q2) - mx) + (-_2bx * q0 + _2bz * q2) * (_2bx * (q1q2 - q0q3) + _2bz * (q0q1 + q2q3) - my) + _2bx * q1 * (_2bx * (q0q2 + q1q3) + _2bz * (0.5f - q1q1 - q2q2) - mz);
recipNorm = invSqrt(s0 * s0 + s1 * s1 + s2 * s2 + s3 * s3); // normalise step magnitude
s0 *= recipNorm;
s1 *= recipNorm;
s2 *= recipNorm;
s3 *= recipNorm;
// Apply feedback step
qDot1 -= beta * s0;
qDot2 -= beta * s1;
qDot3 -= beta * s2;
qDot4 -= beta * s3;
}
// Integrate rate of change of quaternion to yield quaternion
q0 += qDot1 * (1.0f / sampleFreq);
q1 += qDot2 * (1.0f / sampleFreq);
q2 += qDot3 * (1.0f / sampleFreq);
q3 += qDot4 * (1.0f / sampleFreq);
// Normalise quaternion
recipNorm = invSqrt(q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3);
q0 *= recipNorm;
q1 *= recipNorm;
q2 *= recipNorm;
q3 *= recipNorm;
}
//---------------------------------------------------------------------------------------------------
// IMU algorithm update
public float[] MadgwickAHRSupdateIMU(float gx, float gy, float gz, float ax, float ay, float az) {
float recipNorm;
float s0, s1, s2, s3;
float qDot1, qDot2, qDot3, qDot4;
float _2q0, _2q1, _2q2, _2q3, _4q0, _4q1, _4q2, _8q1, _8q2, q0q0, q1q1, q2q2, q3q3;
// Rate of change of quaternion from gyroscope
qDot1 = 0.5f * (-q1 * gx - q2 * gy - q3 * gz);
qDot2 = 0.5f * (q0 * gx + q2 * gz - q3 * gy);
qDot3 = 0.5f * (q0 * gy - q1 * gz + q3 * gx);
qDot4 = 0.5f * (q0 * gz + q1 * gy - q2 * gx);
// Compute feedback only if accelerometer measurement valid (avoids NaN in accelerometer normalisation)
if (!((ax == 0.0f) && (ay == 0.0f) && (az == 0.0f))) {
// Normalise accelerometer measurement
recipNorm = invSqrt(ax * ax + ay * ay + az * az);
ax *= recipNorm;
ay *= recipNorm;
az *= recipNorm;
// Auxiliary variables to avoid repeated arithmetic
_2q0 = 2.0f * q0;
_2q1 = 2.0f * q1;
_2q2 = 2.0f * q2;
_2q3 = 2.0f * q3;
_4q0 = 4.0f * q0;
_4q1 = 4.0f * q1;
_4q2 = 4.0f * q2;
_8q1 = 8.0f * q1;
_8q2 = 8.0f * q2;
q0q0 = q0 * q0;
q1q1 = q1 * q1;
q2q2 = q2 * q2;
q3q3 = q3 * q3;
// Gradient decent algorithm corrective step
s0 = _4q0 * q2q2 + _2q2 * ax + _4q0 * q1q1 - _2q1 * ay;
s1 = _4q1 * q3q3 - _2q3 * ax + 4.0f * q0q0 * q1 - _2q0 * ay - _4q1 + _8q1 * q1q1 + _8q1 * q2q2 + _4q1 * az;
s2 = 4.0f * q0q0 * q2 + _2q0 * ax + _4q2 * q3q3 - _2q3 * ay - _4q2 + _8q2 * q1q1 + _8q2 * q2q2 + _4q2 * az;
s3 = 4.0f * q1q1 * q3 - _2q1 * ax + 4.0f * q2q2 * q3 - _2q2 * ay;
recipNorm = invSqrt(s0 * s0 + s1 * s1 + s2 * s2 + s3 * s3); // normalise step magnitude
s0 *= recipNorm;
s1 *= recipNorm;
s2 *= recipNorm;
s3 *= recipNorm;
// Apply feedback step
qDot1 -= beta * s0;
qDot2 -= beta * s1;
qDot3 -= beta * s2;
qDot4 -= beta * s3;
}
// Integrate rate of change of quaternion to yield quaternion
q0 += qDot1 * (1.0f / sampleFreq);
q1 += qDot2 * (1.0f / sampleFreq);
q2 += qDot3 * (1.0f / sampleFreq);
q3 += qDot4 * (1.0f / sampleFreq);
// System.out.println("sample freq"+sampleFreq);
// Normalise quaternion
recipNorm = invSqrt(q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3);
q0 *= recipNorm;
q1 *= recipNorm;
q2 *= recipNorm;
q3 *= recipNorm;
quaternion[0] = q0;
quaternion[1] = q1;
quaternion[2] = q2;
quaternion[3] = q3;
return quaternion;
}
//---------------------------------------------------------------------------------------------------
// Fast inverse square-root
// See: http://en.wikipedia.org/wiki/Fast_inverse_square_root
public static float invSqrt(float x) {
float xhalf = 0.5f * x;
int i = Float.floatToIntBits(x);
i = 0x5f3759df - (i >> 1);
x = Float.intBitsToFloat(i);
x *= (1.5f - xhalf * x * x);
return x;
}
// BEGIN - Added by GT Silicon - BEGIN //
public float[] quaternionToEulerAngle(float w, float x, float y, float z) {
double t0 = 2.0 * (w * x + y * z);
double t1 = 1.0 - 2.0 * (x * x + y * y);
X = Math.atan2(t0, t1);
double t2 = 2.0 * (w * y - z * x);
if(t2 > 1.0) {
t2 = 1.0;
} else if(t2 < -1.0){
t2 = -1.0;
}
Y = Math.asin(t2);
double t3 = 2.0 * (w * z + x * y);
double t4 = 1.0 - 2.0 * (y * y + z * z);
Z = Math.atan2(t3, t4);
final_data[0] = (float) X;//roll
final_data[1] = (float) Y;//pitch
final_data[2] = (float) Z;//azimuth
return final_data;
}
public void printMadgwickData(float[] data){
int i = 0;
float toprint1 = 0;
if (data == null) return;
for (float toprint:data) {
i++;
toprint1 += toprint*toprint;
String s = String.format("%f", toprint);
System.out.println("quaternion "+ i +" : "+ s);
if (i > 3) {
String s1 = String.format("%f", toprint1);
System.out.println("sqre "+ i +" : "+ s1);
}
}
}
// END - Added by GT Silicon - END //
}
| [
"noreply@github.com"
] | oblu-iot.noreply@github.com |
5bc6bda1e97e609bd197242d04975e9b72c53081 | b43a6f00cb7ba9196cd2ddfae847c8c64160ddfc | /ch05/Condition.java | b9cbeaf7e18eb07f6e4af9402e18e63181f2ad6d | [
"MIT"
] | permissive | douglasjd1/ThinkJavaCode | 6fb58b096fb3bcc86838e28bcc007b8fcce574f1 | ea65598116bee0e76a5fbbaf3b75c0bd713e8f5f | refs/heads/master | 2020-03-11T10:36:04.725410 | 2018-09-12T19:06:14 | 2018-09-12T19:06:14 | 129,947,252 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 345 | java | public class Condition
{
public static void main(String[] args)
{
int num1 = 1357;
int num2 = 2468;
String result = (num1 % 2 != 0)? "Odd" : "Even";
System.out.println(num1 + " is " + result);
result = (num2 % 2 != 0)? "Odd" : "Even";
System.out.println(num2 + " is " + result);
}
}
| [
"douglasjd09@gmail.com"
] | douglasjd09@gmail.com |
925c9907f9143bf66db04fc010e8f4ac344d2133 | 00c88cfbb75f669a6fa0cfade20b5ed90f48a984 | /src/main/java/view/controller/Controller.java | e0a2896283eb409233a5b89c6dadb1550a074d96 | [] | no_license | romain325/JavaFXGame2A | e9f0336a37ee5c3635792d49328f268b45b8d9ad | c03aadab0184fe3fa9e3cfc49e183b36cbacf826 | refs/heads/master | 2023-03-22T15:47:51.318653 | 2021-03-16T08:15:23 | 2021-03-16T08:15:23 | 331,248,285 | 0 | 0 | null | 2021-01-20T09:04:32 | 2021-01-20T08:58:44 | Java | UTF-8 | Java | false | false | 514 | java | package main.java.view.controller;
import javafx.fxml.Initializable;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import main.java.view.Navigator;
import java.io.Serializable;
public interface Controller extends Initializable {
/**
* Set the navigator used for the controller
* @param navigator navigator which will be used
*/
void setNavigator(Navigator navigator);
/**
* Stop the usage of the controller
*/
default void stop(){
return;
}
}
| [
"romainolivier42@gmail.com"
] | romainolivier42@gmail.com |
0dd4950b73431b2b0f49610ece7b6bdd70b3c76d | 3e04ad910512ccd73a300ac1686b4c429bd53e2f | /src/main/java/com/ideashin/attendance/controller/AttendanceTodayController.java | 8811cd848ea6bc26cac93352ff4d6fd158abd04e | [] | no_license | jiangzhixiao/AttendanceSystem | a5edf3e6723f2acfd0867316b59a48a91d5fe3da | 09c34d209be6a9e7dadc3b0ffdec2a5be52da5cc | refs/heads/master | 2022-12-27T04:24:39.559924 | 2019-07-25T08:13:16 | 2019-07-25T08:13:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,362 | java | package com.ideashin.attendance.controller;
import com.alibaba.fastjson.JSON;
import com.ideashin.attendance.entity.AttendanceRecord;
import com.ideashin.attendance.service.AttendanceRecordService;
import com.ideashin.attendance.service.EmployeeService;
import com.ideashin.attendance.service.impl.AttendanceRecordServiceImpl;
import com.ideashin.attendance.service.impl.EmployeeServiceImpl;
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 java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
/**
* @Author: Shin
* @Date: 2019/7/18 16:29
* @Blog: ideashin.com
*/
public class AttendanceTodayController extends HttpServlet {
private AttendanceRecordService attendanceRecordService;
@Override
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String opt = req.getAttribute("opt").toString();
switch (opt) {
case "findAllAttendanceRecords":
findAllAttendanceRecords(req, resp);
break;
case "findSomeAttendanceRecords":
findSomeAttendanceRecords(req, resp);
break;
case "addAttendanceRecord":
addAttendanceRecord(req, resp);
break;
default:
}
}
/**
* 查询所有
* @param req
* @param resp
* @throws ServletException
* @throws IOException
*/
public void findAllAttendanceRecords(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
int page = Integer.valueOf(req.getParameter("page"));
int rows = Integer.valueOf(req.getParameter("rows"));
EmployeeService employeeService = new EmployeeServiceImpl();
int total = employeeService.getCount();
List<AttendanceRecord> list = attendanceRecordService.findAllAttendanceRecords(page, rows);
HashMap<String, Object> map = new HashMap<>(2);
map.put("total", total);
map.put("rows", list);
String jsonString = JSON.toJSONString(map);
PrintWriter out = resp.getWriter();
out.print(jsonString);
out.flush();
out.close();
}
/**
* 条件查询
* @param req
* @param resp
* @throws ServletException
* @throws IOException
*/
public void findSomeAttendanceRecords(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Integer deptSelect = null;
if (!"全部".equals(req.getParameter("deptSelect"))) {
deptSelect = Integer.valueOf(req.getParameter("deptSelect"));
}
String attendanceDateS = req.getParameter("attendanceDate");
Date attendanceDate = null;
if (attendanceDateS != null && !attendanceDateS.equals("")) {
try {
attendanceDate = new SimpleDateFormat("yyyy-MM-dd").parse(attendanceDateS);
} catch (ParseException e) {
e.printStackTrace();
}
}
String attendanceTime = req.getParameter("attendanceTime");
int page = Integer.valueOf(req.getParameter("page"));
int rows = Integer.valueOf(req.getParameter("rows"));
EmployeeService employeeService = new EmployeeServiceImpl();
int total = employeeService.getCount();
List<AttendanceRecord> list = attendanceRecordService.findSomeAttendanceRecords(deptSelect, attendanceDate, attendanceTime, page, rows);
HashMap<String, Object> map = new HashMap<>(2);
map.put("total", total);
map.put("rows", list);
String jsonString = JSON.toJSONString(map);
PrintWriter out = resp.getWriter();
out.print(jsonString);
out.flush();
out.close();
}
/**
* 添加数据
* @param req
* @param resp
* @throws ServletException
* @throws IOException
*/
public void addAttendanceRecord(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String attendanceIDS = req.getParameter("attendanceID");
if (attendanceIDS != null && !"".equals(attendanceIDS)) {
Integer attendanceID = Integer.valueOf(attendanceIDS);
attendanceRecordService.removeOne(attendanceID);
}
Integer employeeID = Integer.valueOf(req.getParameter("employeeID"));
String cardNumber = req.getParameter("cardNumber");
Integer attendanceType = Integer.valueOf(req.getParameter("attendanceType"));
Integer noteID = Integer.valueOf(req.getParameter("noteID"));
String attendanceDateS = req.getParameter("attendanceDate");
Date attendanceDate = null;
if (attendanceDateS != null && !attendanceDateS.equals("")) {
try {
attendanceDate = new SimpleDateFormat("yyyy-MM-dd").parse(attendanceDateS);
} catch (ParseException e) {
e.printStackTrace();
}
}
String attendanceTime = req.getParameter("attendanceTime");
Integer tempDepartmentID = Integer.valueOf(req.getParameter("tempDepartmentID"));
AttendanceRecord attendanceRecord = new AttendanceRecord();
attendanceRecord.setEmployeeID(employeeID);
attendanceRecord.setCardNumber(cardNumber);
attendanceRecord.setNoteID(noteID);
attendanceRecord.setAttendanceType(attendanceType);
attendanceRecord.setAttendanceDate(attendanceDate);
attendanceRecord.setAttendanceTime(attendanceTime);
attendanceRecord.setTempDepartmentID(tempDepartmentID);
Boolean data = attendanceRecordService.addAttendanceRecord(attendanceRecord);
PrintWriter out = resp.getWriter();
out.print(data);
out.flush();
out.close();
}
@Override
public void destroy() {
super.destroy();
attendanceRecordService = null;
}
@Override
public void init() throws ServletException {
super.init();
attendanceRecordService = new AttendanceRecordServiceImpl();
}
}
| [
"isxin.wong@foxmail.com"
] | isxin.wong@foxmail.com |
cf8a451bd534de5768d442842d60323db0f2dc11 | cea48b461bfeb5677458fad98897a728aecf2009 | /src/InfoCidade.java | 263704999111c51a232f9a830395328dbb1067ce | [] | no_license | gustavoWaki/CRUD | 56830c26fe0ed56891ba7baabd503ab80460764f | 3d8d75edbfc1cce3913d54d99740d897b635ad23 | refs/heads/master | 2023-05-07T13:04:32.123269 | 2021-05-19T20:11:03 | 2021-05-19T20:11:03 | 368,156,359 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,326 | java | public class InfoCidade implements Cloneable
{
private String codigo_ibge;
public String getCodigo_ibge ()
{
return this.codigo_ibge;
}
public void setCodigo_ibge (String codigoIBGE) throws Exception
{
if (codigoIBGE==null || codigoIBGE.length()==0)
throw new Exception ("Codigo do IBGE ausente");
this.codigo_ibge = codigoIBGE;
}
private String area_km2;
public String getArea_km2()
{
return this.area_km2;
}
public void setArea_km2 (String areaEmKm2) throws Exception
{
if (areaEmKm2==null || areaEmKm2.length()==0)
throw new Exception ("Area ausente");
this.area_km2 = areaEmKm2;
}
public InfoCidade (String codigoIBGE, String areaEmKm2) throws Exception
{
this.setCodigo_ibge (codigoIBGE);
this.setArea_km2 (areaEmKm2);
}
// exigencia do mapeador de JSon
public InfoCidade () {}
public String toString ()
{
return "Codigo IBGE: "+
this.codigo_ibge+
" / Area(km2): "+
this.area_km2;
}
public boolean equals (Object obj)
{
if (this==obj)
return true;
if (obj==null)
return false;
//if (!(this.getClass() != obj.getClass())
//if (!(obj.getClass != InfoCidade.class))
if (!(obj instanceof InfoCidade))
return false;
InfoCidade infoCidade = (InfoCidade)obj;
if (!this.codigo_ibge.equals(infoCidade.codigo_ibge))
return false;
if (!this.area_km2.equals(infoCidade.area_km2))
return false;
return true;
}
public int hashCode ()
{
int ret=1;
ret = 2*ret + this.codigo_ibge.hashCode();
ret = 2*ret + this.area_km2 .hashCode();
return ret;
}
public InfoCidade (InfoCidade modelo) throws Exception
{
if (modelo==null)
throw new Exception ("Modelo inexistente");
this.codigo_ibge = modelo.codigo_ibge;
this.area_km2 = modelo.area_km2;
}
public Object clone ()
{
InfoCidade ret=null;
try
{
ret = new InfoCidade (this);
}
catch (Exception erro)
{}
return ret;
}
}
| [
"danielhenry1610@gmail.com"
] | danielhenry1610@gmail.com |
5f712e2aae088a5315dcbe5e85d50a4ab4311e1b | 056961a8efea1b2e3b195a8a0c110c01ed284b15 | /activiti/designer/src/main/java/org/nexusbpm/activiti/servicetasks/ScriptNexusTask.java | 75885b1ea0416b38cf7db28dfb4c9c8c290fa6cd | [] | no_license | duke-arioch/nexusbpm | ae1c6d56ce40e725219de025a702cc51fc04ee46 | 307ca7348d0ed8d69c254ff46381f28ff9f4eb09 | refs/heads/master | 2021-05-26T18:27:44.755953 | 2013-05-01T20:48:41 | 2013-05-01T20:48:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,478 | java | package org.nexusbpm.activiti.servicetasks;
import org.activiti.designer.integration.servicetask.AbstractCustomServiceTask;
import org.activiti.designer.integration.servicetask.PropertyType;
import org.activiti.designer.integration.servicetask.annotation.Help;
import org.activiti.designer.integration.servicetask.annotation.Property;
import org.activiti.designer.integration.servicetask.annotation.Runtime;
/**
* Defines the Script nexusbpm node.
*
* @author Matthew Sandoz
*/
@Runtime(delegationClass = "org.nexusbpm.activiti.ScriptNexusJavaDelegation")
@Help(displayHelpShort = "Runs code using a scripting language interpreter")
public class ScriptNexusTask extends AbstractCustomServiceTask {
@Property(type = PropertyType.BOOLEAN_CHOICE, displayName = "Skip header?", required = false, defaultValue = "true")
@Help(displayHelpShort = "Should the header be skipped while filling?")
private String skipHeader;
@Property(type = PropertyType.TEXT, displayName = "Column Limit", required = false)
@Help(displayHelpShort = "Max number of columns to populate")
private String columnLimit;
@Property(type = PropertyType.TEXT, displayName = "Anchor", required = true, defaultValue = "A1")
@Help(displayHelpShort = "Row/Column indicating fill start position")
private String anchor;
@Property(type = PropertyType.TEXT, displayName = "Row Limit", required = false)
@Help(displayHelpShort = "Max number of rows to populate")
private String rowLimit;
@Property(type = PropertyType.TEXT, displayName = "Sheet Name", defaultValue = "Sheet 1", required = false)
@Help(displayHelpShort = "Name the sheet being populated")
private String sheetName;
@Property(type = PropertyType.TEXT, displayName = "Template File", required = false)
@Help(displayHelpShort = "Name of the file resource to use as a template")
private String templateFile;
@Property(type = PropertyType.TEXT, displayName = "Data File", required = false)
@Help(displayHelpShort = "Name of the file resource to use for data")
private String dataFile;
@Property(type = PropertyType.TEXT, displayName = "Output File", required = false)
@Help(displayHelpShort = "Name of the file resource to use for output")
private String outputFile;
@Override
public String contributeToPaletteDrawer() {
return NexusConstants.NEXUS_PALETTE;
}
@Override
public String getName() {
return "Excel node";
}
@Override
public String getSmallIconPath() {
return "icons/script_enabled.gif";
}
}
| [
"msandoz@users.sourceforge.net"
] | msandoz@users.sourceforge.net |
4bb42d403e1a82d9b2f0d3ce19fc4ceabd062c09 | 581174313f8246927fab2da8987b724c7c2051ce | /src/test/java/poms/Content.java | c822929418d23691bb5567966eeebbaf8890d732 | [] | no_license | TanyaTitushkina/lab7_cucumbertest | 78ea4c6769e0b42280d3a94e6d49f7fc145e6599 | 74cc043265ee87bf454b59cd9b7c3cdd653178d9 | refs/heads/master | 2022-10-29T08:46:17.750812 | 2019-05-30T21:07:46 | 2019-05-30T21:07:46 | 189,482,658 | 0 | 0 | null | 2022-10-05T19:27:02 | 2019-05-30T21:07:29 | Java | UTF-8 | Java | false | false | 2,430 | java | package poms;
import controls.*;
import core.AbstractPOM;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import core.Helpers;
public class Content extends AbstractPOM {
public Content(WebDriver driver){
super(driver);
}
@FindBy(xpath = "//main//a[contains(.,'Add content')]")
public WebButton addContentBtn;
@FindBy(xpath = "//div[label[contains(text(), 'Action')]]/select[@id='edit-action']")
public WebSelect selectAction;
public WebElement editContentBtn(String title) {
log.info("Edit content of '" + title + "'" );
return driver.findElement(By.xpath("//td[a[contains(text(), '" + title + "')]]/following-sibling::td[@class='views-field views-field-operations']//a[contains(.,'Edit')]"));
}
@FindBy(xpath = "//input[@id='edit-submit']")
public WebButton applyBtn;
@FindBy(xpath = "//input[@id='edit-submit'][@value='Delete']")
public WebButton deleteBtn;
@FindBy(xpath = "//div[@class='messages messages--status']")
WebText infoMsg;
public void selectContent(String title) {
log.info("Select the item with title '" + title + "'");
driver.findElement(By.xpath("//td[a[contains(text(), '" + title + "')]]/preceding-sibling::td")).click();
}
public void goToContent(String title) {
log.info("Go to the item with title '" + title + "'" );
driver.findElement(By.xpath("//a[contains(text(), '" + title + "')]")).click();
}
public void checkContentMsgStatus(String msg) {
log.info("Check if the info message equals to '" + msg + "'" );
Helpers.check2StringIfContains(infoMsg.getText(), msg);
}
public void checkContentType(String title, String type) {
log.info("Check Type for '" + title + "'" );
Helpers.check2StringIfEquals(driver.findElement(By.xpath("//td[a[contains(text(), '"
+ title + "')]]/following-sibling::td[@class='views-field views-field-type']")).getText(), type);
}
public void checkContentStatus(String title, String status) {
log.info("Check Status for '" + title + "'" );
Helpers.check2StringIfEquals(driver.findElement(By.xpath("//td[a[contains(text(), '"
+ title + "')]]/following-sibling::td[@class='views-field views-field-status']")).getText(), status);
}
}
| [
"sf_tanya@mail.ru"
] | sf_tanya@mail.ru |
de7ac24001c20fb88309ef45376f37812b7fc3db | 2079aa7b989fd29b6af5be23526623b308684905 | /ioTManager/src/main/java/mygroupdi/myspringapp/MyspringappApplication.java | 09db9a53e8dcadd960646c286cf7d52509c7ef59 | [] | no_license | GiuseppeSaitta/PISSIR | cf6712dfc66ff47a410d7bb147fd722cec4a3e6d | 904b61ad0fe30018f567369292ac83bef0e9145b | refs/heads/main | 2023-04-11T00:21:21.320208 | 2021-04-26T12:29:57 | 2021-04-26T12:29:57 | 361,172,507 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,108 | java | package mygroupdi.myspringapp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@SuppressWarnings("deprecation")
@SpringBootApplication
public class MyspringappApplication {
public static void main(String[] args) {
SpringApplication.run(MyspringappApplication.class, args);
}
@Bean
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurerAdapter() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/iot").allowedOrigins("http://localhost:3000").allowedMethods("GET", "POST","PUT", "DELETE");
registry.addMapping("/checkAuthIot").allowedOrigins("http://localhost:8083").allowedMethods("GET", "POST","PUT", "DELETE");
}
};
}
}
| [
"noreply@github.com"
] | GiuseppeSaitta.noreply@github.com |
11b15cad7d0d3d32bb76c05a7714edef45df5e07 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a150/A150549Test.java | f517ab7a3b85fa072292cedbe0f378b6c30d504a | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 256 | java | package irvine.oeis.a150;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A150549Test extends AbstractSequenceTest {
@Override
protected int maxTerms() {
return 10;
}
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
467666fb7e2991ccb5e6a95fbb8a65bd428e8d18 | df58a5796a20f59942d4decb01ee9ee61b584e15 | /java/StructuralDP/FacadeDesign/BankAccountFacade.java | f2d0aa83902d703e02effb8436684904e4088654 | [] | no_license | daudzaidi/interview | 30da34f934902f0e871f485a9a9bd631b38174ed | 7beb4c632fbad1d3d73f30d31c2fb2428ec05c5f | refs/heads/master | 2021-01-23T00:28:55.941874 | 2017-01-16T17:54:06 | 2017-01-16T17:54:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,677 | java | package StructuralDP.FacadeDesign;
/**
* Created by shalvi on 09/04/16.
*/
public class BankAccountFacade {
private int accountNumber;
private int securityCode;
AccountNumberCheck accountChecker;
SecurityCodeCheck codeChecker;
FundsCheck fundsChecker;
WelcomeToBank welcomeToBank;
public BankAccountFacade(int accountNUmber, int securityCode){
this.accountNumber = accountNUmber;
this.securityCode = securityCode;
welcomeToBank = new WelcomeToBank();
accountChecker = new AccountNumberCheck();
codeChecker = new SecurityCodeCheck();
fundsChecker = new FundsCheck();
}
public int getAccountNumber() {
return accountNumber;
}
public int getSecurityCode() {
return securityCode;
}
public void withdrawCash(double cashToGet){
if(accountChecker.accountActive(getAccountNumber()) && codeChecker.isCodeCorrect(getSecurityCode())
&& fundsChecker.haveEnoughMoney(cashToGet)){
System.out.println("TRANSACTION COMPLETED");
System.out.println();
}
else{
System.out.println("TRANSACTION FAILED");
System.out.println();
}
}
public void depositCash(double cashToDeposit){
if(accountChecker.accountActive(getAccountNumber()) && codeChecker.isCodeCorrect(getSecurityCode())){
fundsChecker.makeDeposit(cashToDeposit);
System.out.println("TRANSACTION COMPLETED");
System.out.println();
}
else{
System.out.println("TRANSACTION FAILED");
System.out.println();
}
}
}
| [
"shyamsunderpandita@SHYAMs-MacBook-Pro.local"
] | shyamsunderpandita@SHYAMs-MacBook-Pro.local |
2b474b2ad10f9819a52fe6fcc826551084c66d04 | aea1ac1370e8c0b0350cbb6fa3e3eb8850d0d2dc | /gen/it/polito/dp2/RNS/sol1/jaxb/Localization.java | d27f2f69521454dff2521964795955b93ac96c06 | [
"MIT"
] | permissive | taveraantonio/RNS-serialization-and-java-library | 03a29bf9d46b3a36813e6283e45c997edd4bef8b | 69cd593508bc038fb6edc23146322a45a3556319 | refs/heads/master | 2020-04-21T20:40:32.344915 | 2019-02-10T10:15:00 | 2019-02-10T10:15:00 | 169,853,412 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,061 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.01.13 at 09:15:05 PM CET
//
package it.polito.dp2.RNS.sol1.jaxb;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for localization complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="localization">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="comesFrom" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="directedTo" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="position" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "localization", propOrder = {
"comesFrom",
"directedTo",
"position"
})
public class Localization {
@XmlElement(required = true)
protected String comesFrom;
@XmlElement(required = true)
protected String directedTo;
@XmlElement(required = true)
protected String position;
/**
* Gets the value of the comesFrom property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getComesFrom() {
return comesFrom;
}
/**
* Sets the value of the comesFrom property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setComesFrom(String value) {
this.comesFrom = value;
}
/**
* Gets the value of the directedTo property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDirectedTo() {
return directedTo;
}
/**
* Sets the value of the directedTo property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDirectedTo(String value) {
this.directedTo = value;
}
/**
* Gets the value of the position property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPosition() {
return position;
}
/**
* Sets the value of the position property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPosition(String value) {
this.position = value;
}
}
| [
"noreply@github.com"
] | taveraantonio.noreply@github.com |
a0f58c5e397a551ee4903c5d8b930c83e9068544 | 5bab03d654e5985c6b215008871d3425ef30fa3e | /src/main/java/com/CGM/exercise/Client.java | bac6cdedff47470d193abd582c0a2ff60e01546b | [] | no_license | GlobalGeneric/Test-c | f2f271a3bc4530fd089eeae0e3ee6ec3adb287a3 | 703d28f77124f8efe93364dd2a86d1b3efc2d828 | refs/heads/master | 2023-08-04T01:00:57.987729 | 2020-04-02T12:14:16 | 2020-04-02T12:14:16 | 251,579,900 | 0 | 0 | null | 2023-07-23T10:27:00 | 2020-03-31T11:13:02 | Java | UTF-8 | Java | false | false | 430 | java | package com.CGM.exercise;
import com.CGM.exercise.helper.Initializer;
import com.CGM.exercise.service.QuestionService;
import com.CGM.exercise.service.QuestionValidator;
/** entry point for test
* @version 1.0
*/
public class Client {
public static void main(String[] args) {
Initializer initializer = new Initializer(new QuestionService(new QuestionValidator()));
initializer.readTheQuestion();
}
}
| [
"a@q.com"
] | a@q.com |
03d5a2fa8aa0b75d6d0b31b4d9ffe4c56b7addd8 | 710ac28586a1e88b6c0ea8330e1030b7322fe1c1 | /Playground/jettyspringmvc/src/main/java/com/jxyu/HomeController.java | 4007870e56c918e66354908a58b815f5321321f8 | [] | no_license | onlyctonly/Spring | f5aa8613a606256b9a03d16f3a1fcafc959ae267 | 56fed5062bd1d44b7254b9df20a420f402bd10e4 | refs/heads/master | 2022-12-21T04:37:44.365079 | 2020-07-12T10:09:44 | 2020-07-12T10:09:44 | 57,515,097 | 0 | 0 | null | 2022-12-16T04:28:02 | 2016-05-01T05:16:41 | Java | UTF-8 | Java | false | false | 270 | java | package com.jxyu;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class HomeController {
@RequestMapping("/")
public String showMyPage() {
return "HelloWorld";
}
}
| [
"onlyctonly@gmail.com"
] | onlyctonly@gmail.com |
23a0ca50e67c0358549b27074da978569d16be22 | b5ece58f7e2cef31f8f4395430c4865a93f59382 | /karax/src/fr/neyrick/karax/model/MinimalFixedFeature.java | fb9e2cc93ff931841095ed08088f70a64a762ed1 | [] | no_license | neyrick/gayming | 7f359c49ecc69779f1ecfa81b4721fe82520b3e0 | d90d35b6472a0778552ed744ae1a36903193b080 | refs/heads/master | 2020-12-25T17:29:15.147026 | 2016-08-15T22:38:36 | 2016-08-15T22:38:36 | 7,762,289 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 501 | java | package fr.neyrick.karax.model;
import fr.neyrick.karax.entities.generic.CharacterEdit;
public class MinimalFixedFeature extends FixedNumericFeature{
@Override
public void recordEdit(CharacterEdit edit) {
if (edit.getIncrement().getAmount() < getAmount()) {
super.recordEdit(edit);
}
}
public MinimalFixedFeature(FeaturesCollection container, String key) {
super(container, key);
}
public MinimalFixedFeature(String key) {
super(key);
}
public MinimalFixedFeature() {
}
}
| [
"dev@neyrick.fr"
] | dev@neyrick.fr |
2ba77b0800c162db54b686e1d46f48e376a1c669 | 832bafbee74d268a97b7cdac91eff5ad6cc0155f | /L32-messagingSystem/springWebServer/src/main/java/ru/otus/Main.java | 9d08486e902a42b674026dc7cc95c1e8b0b5217e | [] | no_license | blummock/otus_java_2020_12 | da6b8b2d75cbc2d713804f5a48e8c2930a581ecf | effb48ba7732277ccabf9bc3aa850c62cdb4cf05 | refs/heads/main | 2023-06-25T06:47:18.573179 | 2021-07-24T09:18:50 | 2021-07-24T09:18:50 | 327,896,340 | 0 | 0 | null | 2021-07-25T06:40:17 | 2021-01-08T12:26:08 | Java | UTF-8 | Java | false | false | 333 | java | package ru.otus;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import ru.otus.messagesystem.MessageSystemImpl;
@SpringBootApplication
public class Main {
public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
}
| [
"blumock@yandex.ru"
] | blumock@yandex.ru |
01e89742dec1846ed5e8311c501e17080c7be884 | e4fe75d803093e13857090f1c91bfed3bc02bd6e | /Simulator/src/main/Transfer_Instructions.java | a3a69247db48585989287f216b9ec1f7193fff1a | [] | no_license | terrorgeek/Monitor | 2539f3910d10e5509f3c7ef763abc7f6ef3a2244 | 3edff263e3f4bb5c9a0039f7d2516ab4477410ec | refs/heads/master | 2022-05-04T22:32:36.472979 | 2013-03-18T18:10:39 | 2013-03-18T18:10:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,427 | java | package main;
import org.omg.PortableInterceptor.AdapterNameHelper;
import com.sun.org.apache.bcel.internal.generic.AALOAD;
import Register.CC;
import Register.PC;
import Register.R0;
import Register.R3;
public class Transfer_Instructions {
public static void JZ(int all_instructions[][],String instruction)
{
String register_number=instruction.substring(8,10);
String memory_address=instruction.substring(10);
memory_address=Instructions.Handle_Index_Address(instruction, memory_address);
memory_address=Instructions.Handle_Indirect_Address(instruction, memory_address);
String content=Instructions.Get_Content_According_To_Register(register_number);
int result=Analyze_Instructions.Change_Binary_To_Decimal(content);
if(result==0)
PC.pc=Analyze_Instructions.Change_Binary_To_Decimal(memory_address);
}
public static void JNE(int all_instructions[][],String instruction)
{
String register_number=instruction.substring(8,10);
String memory_address=instruction.substring(10);
memory_address=Instructions.Handle_Index_Address(instruction, memory_address);
memory_address=Instructions.Handle_Indirect_Address(instruction, memory_address);
String content=Instructions.Get_Content_According_To_Register(register_number);
int result=Analyze_Instructions.Change_Binary_To_Decimal(content);
if(result!=0)
PC.pc=Analyze_Instructions.Change_Binary_To_Decimal(memory_address);
}
public static void JCC(int all_instructions[][],String instruction)
{
String cc=instruction.substring(8,10);//condition code of cc that you want to test
String memory_address=instruction.substring(10);//binary
memory_address=Instructions.Handle_Index_Address(instruction, memory_address);
memory_address=Instructions.Handle_Indirect_Address(instruction, memory_address);
if(cc.equals("00"))
{
if(CC.value[0]=='1')
{PC.pc=Analyze_Instructions.Change_Binary_To_Decimal(memory_address);PC.pc--;}
}
if(cc.equals("01"))
{
if(CC.value[1]=='1')
{PC.pc=Analyze_Instructions.Change_Binary_To_Decimal(memory_address);PC.pc--;}
}
if(cc.equals("10"))
{
if(CC.value[2]=='1')
{PC.pc=Analyze_Instructions.Change_Binary_To_Decimal(memory_address);PC.pc--;}
}
if(cc.equals("11"))
{
if(CC.value[3]=='1')
{PC.pc=Analyze_Instructions.Change_Binary_To_Decimal(memory_address);PC.pc--;}
}
}
public static void JMP(int all_instructions[][],String instruction)
{
String memory_address=instruction.substring(10);
memory_address=Instructions.Handle_Index_Address(instruction, memory_address);
memory_address=Instructions.Handle_Indirect_Address(instruction, memory_address);
int result=Analyze_Instructions.Change_Binary_To_Decimal(memory_address);
PC.pc=result;PC.pc--;
}
public static void JSR(int all_instructions[][],String instruction)
{
String memory_address=instruction.substring(10);
memory_address=Instructions.Handle_Index_Address(instruction, memory_address);
memory_address=Instructions.Handle_Indirect_Address(instruction, memory_address);
R3.value=Instructions.Change_Decimal_To_Binary((PC.pc+1)+"");
PC.pc=Analyze_Instructions.Change_Binary_To_Decimal(memory_address);
}
public static void RFS(int all_instructions[][],String instruction)
{
//get the immed, totally 10 bits
String immed=instruction.substring(6);
R0.value="000000"+immed;
PC.pc=Analyze_Instructions.Change_Binary_To_Decimal(R3.value);
}
public static void SOB(int all_instructions[][],String instruction)
{
String register_number=instruction.substring(8,10);
String memory_address=instruction.substring(10);
memory_address=Instructions.Handle_Index_Address(instruction, memory_address);
memory_address=Instructions.Handle_Indirect_Address(instruction, memory_address);
int register_content_decimal=Analyze_Instructions.Change_Binary_To_Decimal(Instructions.Get_Content_According_To_Register(register_number));
register_content_decimal--;
Instructions.Assign_Register(register_number, Instructions.Change_Decimal_To_Binary((register_content_decimal)+""));
if(register_content_decimal>0)
{PC.pc=Analyze_Instructions.Change_Binary_To_Decimal((memory_address));PC.pc--;}
else
{}
}
}
| [
"bjslxxx@126.com"
] | bjslxxx@126.com |
654c7e9e0816cffe1f5a8bfe6294387471f6aa72 | 09a07b5f4718e2d691f25a6c2fa9f203ba0be9cd | /chapter1/src/main/java/com/smart/domain/LoginLog.java | 67e4b8b394f739d188c987db25b7ee7ccc1f7689 | [] | no_license | kqyang0000/chapter | fd07abeeff2071142d277ef3dd694859af921d6a | c0cc2d01b4a81a1a8cfa123841ba74faba7b0530 | refs/heads/master | 2020-05-23T06:09:29.915444 | 2019-05-22T15:51:54 | 2019-05-22T15:51:54 | 186,661,821 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 874 | java | package com.smart.domain;
import java.io.Serializable;
import java.util.Date;
/**
* Created by kqyang on 2019/5/15.
*/
public class LoginLog implements Serializable {
private int loginLogId;
private int userId;
private String ip;
private Date loginDatetime;
public int getLoginLogId() {
return loginLogId;
}
public void setLoginLogId(int loginLogId) {
this.loginLogId = loginLogId;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public Date getLoginDatetime() {
return loginDatetime;
}
public void setLoginDatetime(Date loginDatetime) {
this.loginDatetime = loginDatetime;
}
}
| [
"18410422493@163.com"
] | 18410422493@163.com |
6f4e32d5222c2b35abe075a12db7912ef0af38f3 | e417a573ef7f6c76fd47aeb04a7c97f241082ef3 | /netty/src/main/java/com/netty/queue/broker/strategy/BrokerProducerMessageStrategy.java | dd9c5d4818335ae4a203afa8e2a66137ab91aaf9 | [] | no_license | DADAFUFU/learn | 1d4e37d1561bdf66e71a681108d6ed5f69e53ffa | 8931f897e384b0d48d344d117d072f8e415c9531 | refs/heads/master | 2021-01-24T01:52:56.494884 | 2018-02-27T12:36:45 | 2018-02-27T12:36:45 | 122,827,163 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,749 | java | /**
* Copyright (C) 2016 Newland Group Holding Limited
*
* 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.netty.queue.broker.strategy;
import com.netty.queue.broker.ConsumerMessageListener;
import com.netty.queue.broker.ProducerMessageListener;
import com.netty.queue.model.RequestMessage;
import com.netty.queue.model.ResponseMessage;
import com.netty.queue.msg.Message;
import io.netty.channel.ChannelHandlerContext;
public class BrokerProducerMessageStrategy implements BrokerStrategy {
private ProducerMessageListener hookProducer;
private ChannelHandlerContext channelHandler;
public BrokerProducerMessageStrategy() {
}
public void messageDispatch(RequestMessage request, ResponseMessage response) {
Message message = (Message) request.getMsgParams();
hookProducer.hookProducerMessage(message, request.getMsgId(), channelHandler.channel());
}
public void setHookProducer(ProducerMessageListener hookProducer) {
this.hookProducer = hookProducer;
}
public void setChannelHandler(ChannelHandlerContext channelHandler) {
this.channelHandler = channelHandler;
}
public void setHookConsumer(ConsumerMessageListener hookConsumer) {
}
}
| [
"sunfc@dxy.cn"
] | sunfc@dxy.cn |
cfb6fc947ed45589cc76925939940c9c23901218 | 4f1e9e85d260c4be39f55cd377bd7f87892e5428 | /Chapter11/ecommerce_example/data/RegistrationInformation.java | 5d79db718545b8c8015bba351257632027c2069f | [
"Apache-2.0",
"BSD-2-Clause",
"Apache-1.1"
] | permissive | aihua/ProfessionalJavaSecurityCode | f5a538e2e44a8cfd347a0f890cca56d584d32ca8 | 3a12859b9db74d402371a2563144a209090d1d1a | refs/heads/master | 2020-04-16T02:00:19.639768 | 2017-02-07T21:17:36 | 2017-02-07T21:17:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 844 | java | package ecommerce_example.data;
import java.io.*;
/**
* Class to wrap up all of the user-entered information on the
* registration page
*/
public class RegistrationInformation implements Serializable {
private String mName;
private String mCertificateSerialNumber;
private String mCreditCardNumber;
private float mBalance;
public RegistrationInformation( String name, String certSerialNumber, String creditCardNumber, float balance ) {
mName = name;
mCertificateSerialNumber = certSerialNumber;
mCreditCardNumber = creditCardNumber;
mBalance = balance;
}
public String getName() {
return mName;
}
public String getCertificateSerialNumber() {
return mCertificateSerialNumber;
}
public String getCreditCardNumber() {
return mCreditCardNumber;
}
public float getBalance() {
return mBalance;
}
} | [
"jw362j@.ITServices.sbc.com"
] | jw362j@.ITServices.sbc.com |
2223dc3fbbfae43d5c002884299d4cf20d8d2759 | 0b323d9927c7f884f1d85f2efd859292ce29bc75 | /H071191044/Praktikum7/Praktikum7no2.java | a0b04d4a111288b9869a874c84e32e70e834febd | [] | no_license | YusufSyam/LAB-PP-PRAKTIKUM-4 | f691238801bca0d72dd47993b98b1e21b1e23b1c | 3608e48f2b3e8d7535c8ca079034fb15e958d76a | refs/heads/master | 2020-07-24T05:29:36.245117 | 2019-11-13T07:59:22 | 2019-11-13T07:59:22 | 207,815,194 | 0 | 0 | null | 2019-09-11T13:08:04 | 2019-09-11T13:08:04 | null | UTF-8 | Java | false | false | 1,554 | java | import java.util.Scanner;
import java.util.ArrayList;
import java.util.HashMap;
public class Praktikum7no2 {
public static void main(String [] args) {
Scanner xx= new Scanner(System.in);
int input1= xx.nextInt();
int input2= xx.nextInt();
int maks= Math.max(input1, input2);
int min= Math.min(input1, input2);
ArrayList<Integer> DeretAngkaYgBisaDibagi= new ArrayList<>();
System.out.print("[");
for(int i=min; i<=maks; i++) {
if(i%10!=0 && AngkaYgBisaDiBagi(i)!=10 || i==0) {
DeretAngkaYgBisaDibagi.add(AngkaYgBisaDiBagi(i));
}
}
for(int i=0; i<DeretAngkaYgBisaDibagi.size(); i++) {
if(i!=DeretAngkaYgBisaDibagi.size()-1) {
System.out.print(DeretAngkaYgBisaDibagi.get(i)+", ");
}else {
System.out.print(DeretAngkaYgBisaDibagi.get(i)+"]");
}
}
}
public static int AngkaYgBisaDiBagi(int a) {
int angka= Math.abs(a);
int indeks= 1, pengurang= 0 ;
HashMap <Integer, Integer> digit= new HashMap<>();
for(int i=10; i<1000000000; i*=10) {
if(angka-i>=0){
digit.put(indeks, (angka%i)-pengurang);
pengurang+= digit.get(indeks);
if(indeks>=1) {
digit.put(indeks, digit.get(indeks)/(i/10));
}
indeks++;
}else if(angka-i<0){
digit.put(indeks, (angka-pengurang)/(i/10));
break;
}
}
for(int i=1; i<=indeks; i++) {
if(a==0) {
return 0;
}
if(digit.get(i)==0) {
return 10;
}
if(angka%digit.get(i)!=0 ) {
return 10;
}
}
if (a<0) {
return angka*(-1);
}else{
return angka;
}
}
} | [
"muhyusufsyamsyam@gmail.com"
] | muhyusufsyamsyam@gmail.com |
61906ecf816b59c72e9aaab4744562288fc9e407 | 3052e593a9e4a7c731cad959616fe88db5a0ded9 | /fashionet-core/src/main/java/io/fashionet/core/base/redis/exception/RedisOperatorEngineKeyExistsException.java | a575297926066f2e1827929520f80186d02c8085 | [] | no_license | fashion-chain/F-Live | 07c46e705ae8f5ac3a58a1b38ce360f7541e995c | 8b35918f6314459c697b3842d99616095e03e035 | refs/heads/master | 2020-05-07T05:53:40.680334 | 2019-04-09T08:28:49 | 2019-04-09T08:28:49 | 180,291,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 219 | java | package io.fashionet.core.base.redis.exception;
public class RedisOperatorEngineKeyExistsException extends Exception {
public RedisOperatorEngineKeyExistsException(String message) {
super(message);
}
}
| [
"cloudsign@gmail.com"
] | cloudsign@gmail.com |
b5299575654994633e25b14ea93782019e869319 | 803b9d721dff4328ac0c3481cd9ec1cc39ceb3db | /GCD-Calculator/src/gcd/calculator/GCDCalculator.java | a37cd867562f3776159e19dcdab5b1f50dc6a101 | [] | no_license | zzArchive-if-05-22-C-fall-2017/coding-assignment1-leonkuchinka | 45fccabd19751b18da94285eb4a569781673605e | 4a0a46114609b96b376ff8e31a11afbaaa485b6e | refs/heads/master | 2021-07-01T13:17:51.548985 | 2017-09-21T06:50:46 | 2017-09-21T06:50:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,226 | java | package gcd.calculator;
/**
*
* @author LK
*/
public class GCDCalculator {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
//Testfall 1: gcd(24,16)
int a = 24;
int b = 16;
int c,d;
c = gcdEucledian(a,b);
d = gcdPrimeFactors(a,b);
System.out.println("gcd(24,16):\nExpected: 8\ngcdEucledian: " + c +"\ngcdPrimeFactors: "+d);
System.out.println("--------------------------");
//Testfall 2: gcd(3528, 3780)
a = 3528;
b = 3780;
c = gcdEucledian(a,b);
d = gcdPrimeFactors(a,b);
System.out.println("gcd(3528,3780):\nExpected: 252\ngcdEucledian: " + c +"\ngcdPrimeFactors: "+d);
System.out.println("--------------------------");
//Testfall 3: gcd(3528, 3780)
a = 144;
b = 160;
c = gcdEucledian(a,b);
d = gcdPrimeFactors(a,b);
System.out.println("gcd(144,160):\nExpected: 16\ngcdEucledian: " + c +"\ngcdPrimeFactors: "+d);
}
public static int gcdPrimeFactors(int a, int b)
{
int [] counterA = getPrimeFactors(a);
int [] counterB = getPrimeFactors(b);
int sum = 1;
for(int i = 0;i<counterA.length;i++)
{
sum *= Math.pow(i, Math.min(counterA[i], counterB[i]));
}
return sum;
}
public static int[] getPrimeFactors(int a)
{
int [] counter = new int[50];
while(a > 1)
{
int temp = 1;
int i = 2;
for(;i<50 && (isprime(i) == true && (a % i == 0)) != true;i++){
}
counter[i]++;
a /= i;
}
return counter;
}
public static boolean isprime(int a)
{
for(int i = 2;i<a;i++)
{
if(a % i == 0)
return false;
}
return true;
}
public static int gcdEucledian(int a, int b)
{
if(b == 0)
return a;
return gcdEucledian(b, a%b);
}
}
| [
"l.kuchinka@gmail.com"
] | l.kuchinka@gmail.com |
bf83889387add3784d652e74c46687e7347a682b | 547d2addc9015089776ed2a28fee6bf579682df4 | /Platform-4.0/src/com/datasphere/health/CacheHealth.java | ffaeec784d596e511b838f5a0e2db7b65a4c7cd2 | [] | no_license | datasphere-oss/datasphere-integration | c75ba5539b78b8ba827e37958633ea5cb39e1ae9 | d8e2056283e104547d2d5d06ccc0a162c62abaf9 | refs/heads/master | 2021-08-19T20:34:32.348821 | 2020-01-06T08:48:38 | 2020-01-06T08:48:38 | 210,347,616 | 50 | 23 | null | 2021-08-09T20:55:55 | 2019-09-23T12:18:07 | Java | UTF-8 | Java | false | false | 1,018 | java | package com.datasphere.health;
import com.datasphere.runtime.monitor.*;
public class CacheHealth implements ComponentHealth, CacheHealthMXBean
{
public long size;
public String fqCacheName;
public long lastRefresh;
public CacheHealth(final String fqCacheName) {
this.fqCacheName = fqCacheName;
}
public CacheHealth(final long size, final long lastRefresh, final String fqCacheName) {
this.size = size;
this.lastRefresh = lastRefresh;
this.fqCacheName = fqCacheName;
}
public void update(final long size, final long lastRefresh, final String fqCacheName) {
this.size = size;
this.lastRefresh = lastRefresh;
this.fqCacheName = fqCacheName;
}
@Override
public long getSize() {
return this.size;
}
@Override
public String getFqCacheName() {
return this.fqCacheName;
}
@Override
public long getLastRefresh() {
return this.lastRefresh;
}
}
| [
"theseusyang@192.168.0.103"
] | theseusyang@192.168.0.103 |
dd130556b48d359f1d4ad76499289c6a3496f3e3 | ee2bab76bfddb24be5227313811efc889f7c1ff2 | /Algorithms/4MedianOfTwoSortedArrays.java | 728d4486de82f74345a80bba101ee50a8b3d4cb5 | [] | no_license | xiemenger/Interesting-Problems | cbeb1bec90fb06de39e197780fda3a740f5fbcc4 | 60158561d0881a8008c46445a73ec9e0191b35de | refs/heads/master | 2021-06-29T05:29:00.598148 | 2018-12-20T03:19:48 | 2018-12-20T03:19:48 | 132,041,876 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,312 | java | class Solution {
public double findMedianSortedArrays(int[] nums1, int[] nums2) {
int m = nums1.length;
int n = nums2.length;
if (m > n) {
return findMedianSortedArrays(nums2, nums1);
}
int i = 0, j = 0, imin = 0, imax = m, half = (m + n + 1) / 2;
double maxLeft = 0, minRight = 0;
while(imin <= imax){
i = (imin + imax) / 2;
j = half - i;
if(j > 0 && i < m && nums2[j - 1] > nums1[i]){
imin = i + 1;
}else if(i > 0 && j < n && nums1[i - 1] > nums2[j]){
imax = i - 1;
}else{
if(i == 0){
maxLeft = (double)nums2[j - 1];
}else if(j == 0){
maxLeft = (double)nums1[i - 1];
}else{
maxLeft = (double)Math.max(nums1[i - 1], nums2[j - 1]);
}
break;
}
}
if((m + n) % 2 == 1){
return maxLeft;
}
if(i == m){
minRight = (double)nums2[j];
}else if(j == n){
minRight = (double)nums1[i];
}else{
minRight = (double)Math.min(nums1[i], nums2[j]);
}
return (double)(maxLeft + minRight) / 2;
}
} | [
"tbaby.menger@gmail.com"
] | tbaby.menger@gmail.com |
8f74ff0950a55c1129148647ebd3d175493a79ad | 60aea6220985b299747c0b9bfa21f8f821ccee7b | /app/src/main/java/com/example/ecommerceproject/Model/Sellers.java | 7ad97855b0ec73a7bb276ef20b0715e1d5d67476 | [] | no_license | saadzimat430/android | 8f5249ef6830ff0552897c7c5817bc221871f318 | fcaa44cd706e41be1f3a057e45a1c7f711e15dbd | refs/heads/master | 2021-02-13T17:29:53.226502 | 2020-06-05T15:29:08 | 2020-06-05T15:29:08 | 244,717,231 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,515 | java | package com.example.ecommerceproject.Model;
public class Sellers {
private String sid, sname, sphone,semail, spassword, simage, saddress;
public Sellers(){}
public Sellers(String sname,String sid, String sphone, String semail, String spassword, String simage, String saddress) {
this.sname = sname;
this.sphone = sphone;
this.semail = semail;
this.spassword = spassword;
this.simage = simage;
this.saddress = saddress;
this.sid = sid;
}
public String getSid() {
return sid;
}
public void setSid(String sid) {
this.sid = sid;
}
public String getSname() {
return sname;
}
public void setSname(String sname) {
this.sname = sname;
}
public String getSphone() {
return sphone;
}
public void setSphone(String sphone) {
this.sphone = sphone;
}
public String getSemail() {
return semail;
}
public void setSemail(String semail) {
this.semail = semail;
}
public String getSpassword() {
return spassword;
}
public void setSpassword(String spassword) {
this.spassword = spassword;
}
public String getSimage() {
return simage;
}
public void setSimage(String simage) {
this.simage = simage;
}
public String getSaddress() {
return saddress;
}
public void setSaddress(String saddress) {
this.saddress = saddress;
}
}
| [
"saadzimat430@gmail.com"
] | saadzimat430@gmail.com |
cf96d7a20f297f12ca569062dde700d737ef10d5 | e335dea1fb6582404cc117323dc572b68458adac | /hetforrent-master/src/main/java/pubsub/demo/SubscriberController.java | 2dcf0a96bd7f0aaa5fe3324c074791237e89057b | [] | no_license | anhlhpd/t1708e-sem4-wcd | 6e66f23d53440baa9a4e312ad81c87523741d0c8 | 5fd52f5ab46e0e271aa2f5598ee2c3c7f27aa3af | refs/heads/master | 2023-04-29T00:07:29.645953 | 2019-10-11T08:00:37 | 2019-10-11T08:00:37 | 214,378,015 | 0 | 0 | null | 2023-04-14T17:50:51 | 2019-10-11T07:59:39 | JavaScript | UTF-8 | Java | false | false | 1,794 | java | package pubsub.demo;
import com.google.api.gax.core.CredentialsProvider;
import com.google.auth.Credentials;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.cloud.pubsub.v1.AckReplyConsumer;
import com.google.cloud.pubsub.v1.MessageReceiver;
import com.google.cloud.pubsub.v1.Subscriber;
import com.google.pubsub.v1.ProjectSubscriptionName;
import com.google.pubsub.v1.PubsubMessage;
import pubsub.demo.util.PubsubConstant;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.IOException;
public class SubscriberController extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
ProjectSubscriptionName subscriptionName =
ProjectSubscriptionName.of(PubsubConstant.GOOGLE_CLOUD_PROJECT_ID, PubsubConstant.SUBSCRIPTION_ID);
Subscriber subscriber = Subscriber
.newBuilder(subscriptionName, new MessageReceiver() {
@Override
public void receiveMessage(PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) {
System.out.println("S Receive message: " + pubsubMessage.getData().toStringUtf8());
ackReplyConsumer.ack();
}
})
.setCredentialsProvider(() -> GoogleCredentials.fromStream(getClass()
.getClassLoader()
.getResourceAsStream(PubsubConstant.KEY_PATH)))
.build();
subscriber.startAsync();
System.out.println("S1 sub okie.");
}
}
| [
"anhlhpd00579@fpt.edu.vn"
] | anhlhpd00579@fpt.edu.vn |
21b1cad0b5e50c347139d49ac65505d6b72feeaf | 8d57977264074a27df695b0952cf9ed8a1a756ee | /app/src/main/java/cz/zcu/kiv/chatbot/WelcomeActivity.java | c00f821467d0014a8e1e65d5cdf1bed9e940bd6c | [
"MIT"
] | permissive | matmar3/chatbot | 97b47bab9a7cb6a65813247fa12064b5335e6549 | aa7252974e16ab60fb7dbb4cfb7765e49c281c03 | refs/heads/master | 2022-04-26T15:24:00.114058 | 2020-04-28T15:17:32 | 2020-04-28T15:17:32 | 258,795,651 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 781 | java | package cz.zcu.kiv.chatbot;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import cz.zcu.kiv.chatbot.connection.InternetConnection;
/**
* Welcome activity that shows ap icon and check internet connection.
*
* @author Martin Matas
* @version 1.0
* created on 2020-22-04
*/
public class WelcomeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (InternetConnection.check(getApplicationContext())) {
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
}
else {
InternetConnection.noConnectionDialog(this);
}
}
}
| [
"nouzovekonto@gmail.com"
] | nouzovekonto@gmail.com |
19fdc13825f431e0e5a845640df24077f276a715 | 42babbe6542129656d3dc2e83cdccb75816dc08f | /design-pattern/src/main/java/com/vbiso/basic/refreshsmell/BuilderPattern/example/ActorBuilder.java | 23160e13954fbe90b0b3c37e653a8eb5520be88f | [] | no_license | VbiosWen/Design-pattern | 691c1570dadb6f60c615a49bbd0563494101f2b5 | 41d3976f88bf5b34a1c50ee83588fcd53aecd256 | refs/heads/master | 2022-07-03T05:52:19.012407 | 2019-07-11T14:37:59 | 2019-07-11T14:37:59 | 139,861,833 | 1 | 0 | null | 2022-06-21T00:13:48 | 2018-07-05T14:34:32 | Java | UTF-8 | Java | false | false | 491 | java | package com.vbiso.basic.refreshsmell.BuilderPattern.example;
/**
* @Author: wenliujie
* @Description:
* @Date: Created in 下午9:39 2018/7/19
* @Modified By:
*/
public abstract class ActorBuilder {
public abstract void buildType();
public abstract void buildFace();
public abstract void buildSex();
public abstract void buildCostume();
public abstract void buildHairStyle();
protected Actor actor=new Actor();
public Actor createActor(){
return actor;
}
}
| [
"wenliujie@qipeng.com"
] | wenliujie@qipeng.com |
d3e01faca0aca382aa2fba00288cb3a4505db602 | 6b3a781d420c88a3a5129638073be7d71d100106 | /AdProxyPersist/src/main/java/com/ocean/persist/api/proxy/helian/HelianAdPuller.java | 93d35cfc3b6587f39106198f90b25022da2d0f87 | [] | no_license | Arthas-sketch/FrexMonitor | 02302e8f7be1a68895b9179fb3b30537a6d663bd | 125f61fcc92f20ce948057a9345432a85fe2b15b | refs/heads/master | 2021-10-26T15:05:59.996640 | 2019-04-13T07:52:57 | 2019-04-13T07:52:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,992 | java | package com.ocean.persist.api.proxy.helian;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import com.ocean.core.common.JsonUtils;
import com.ocean.core.common.http.Bean2Utils;
import com.ocean.core.common.http.HttpClient;
import com.ocean.core.common.http.HttpInvokeException;
import com.ocean.core.common.system.SystemContext;
import com.ocean.core.common.threadpool.Parameter;
import com.ocean.persist.api.proxy.AdPullException;
import com.ocean.persist.api.proxy.AdPullParams;
import com.ocean.persist.api.proxy.AdPullResponse;
import com.ocean.persist.api.proxy.AdPuller;
import com.ocean.persist.api.proxy.AdPullerBase;
import com.ocean.persist.common.ProxyConstants;
/** * @author Alex & E-mail:569246607@qq.com
@date 2017年6月15日
@version 1.0
*/
@Component(value="helianAdPuller")
public class HelianAdPuller extends AdPullerBase{
public AdPullResponse api(Parameter params,String ... exts) throws AdPullException {
StringBuilder url = new StringBuilder();
url.append(SystemContext.getDynamicPropertyHandler().get(ProxyConstants.HELIAN_URL));
url.append("?").append(Bean2Utils.toHttpParams(params));
logger.info("joinDSP:helian {} request param:{}",exts,url.toString());
HelianAdPullResponse data;
try {
String result = HttpClient.getInstance().get(url.toString());
if(StringUtils.isEmpty(result)){
return null;
}
data = JsonUtils.toBean(result, HelianAdPullResponse.class);
logger.info("joinDSP:helian {} reply result:{}",exts,result);
}
catch (HttpInvokeException e) {
throw new AdPullException(e.getCode(),"HttpInvokeException,"+e.getMessage());
}
if(data == null){
throw new AdPullException("ad request fairled,return empty!");
}
return data;
}
public boolean supports(Parameter params) throws AdPullException {
return HelianAdPullParams.class
.isAssignableFrom(params.getClass());
}
}
| [
"569246607@qq.com"
] | 569246607@qq.com |
a73873eff2884c63c0a075e1897c3c9c702673d1 | 4e01469cc355c7ed56fa9f2cf6a728e33c0b9ac6 | /View/View/src/main/java/com/example/View/model/Contact.java | 8c5e304fba6e53bee716aefbf1e4241d6dd6a784 | [] | no_license | AyshaHamna/Hotel-Reservation | 69a4908ba13a2b502e4e833101b1e84a49b4d930 | 64cfd9c0478851b469d4502a637c50e89d8260f1 | refs/heads/master | 2022-12-26T16:05:16.006472 | 2020-10-07T06:49:53 | 2020-10-07T06:49:53 | 301,936,116 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,335 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.example.View.model;
/**
*
* @author User
*/
public class Contact {
private int id;
private String contactReferenceId;
private String name;
private String email;
private String subject;
private String message;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getContactReferenceId() {
return contactReferenceId;
}
public void setContactReferenceId(String contactReferenceId) {
this.contactReferenceId = contactReferenceId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
| [
"ayshahamna57@gmail.com"
] | ayshahamna57@gmail.com |
e011db9155e070de254e6911df56618b5319d9bc | cb178defedc9b9415e644562f85cf820cf3e0812 | /build/tmp/recompileMc/sources/net/minecraftforge/common/capabilities/CapabilityManager.java | 77806e285da78ff20d421a3d805d43f5c93d14b4 | [] | no_license | boredhero/morefuelsmod-1.12 | 353102d4c9214913a86a7ff8da3fdd44698dad81 | 797a95810ac2fad633a81247be24792340a0906e | refs/heads/master | 2022-12-23T04:15:43.541587 | 2020-09-22T23:01:42 | 2020-09-22T23:01:42 | 97,418,811 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,883 | java | /*
* Minecraft Forge
* Copyright (c) 2016.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.common.capabilities;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.concurrent.Callable;
import org.objectweb.asm.Type;
import java.util.function.Function;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.discovery.ASMDataTable;
public enum CapabilityManager
{
INSTANCE;
/**
* Registers a capability to be consumed by others.
* APIs who define the capability should call this.
* To retrieve the Capability instance, use the @CapabilityInject annotation.
*
* @param type The Interface to be registered
* @param storage A default implementation of the storage handler.
* @param implementation A default implementation of the interface.
* @deprecated Use the overload that takes a factory instead of a class.
* You can easily do this by passing a constructor reference
* (MyImpl::new instead of MyImpl.class). TODO remove in 1.13.
*/
@Deprecated
public <T> void register(Class<T> type, Capability.IStorage<T> storage, final Class<? extends T> implementation)
{
Preconditions.checkArgument(implementation != null, "Attempted to register a capability with no default implementation");
register(type, storage, () ->
{
try {
return implementation.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
throw new RuntimeException(e);
}
});
}
/**
* Registers a capability to be consumed by others.
* APIs who define the capability should call this.
* To retrieve the Capability instance, use the @CapabilityInject annotation.
*
* @param type The Interface to be registered
* @param storage A default implementation of the storage handler.
* @param factory A Factory that will produce new instances of the default implementation.
*/
public <T> void register(Class<T> type, Capability.IStorage<T> storage, Callable<? extends T> factory)
{
Preconditions.checkArgument(type != null, "Attempted to register a capability with invalid type");
Preconditions.checkArgument(storage != null, "Attempted to register a capability with no storage implementation");
Preconditions.checkArgument(factory != null, "Attempted to register a capability with no default implementation factory");
String realName = type.getName().intern();
Preconditions.checkState(!providers.containsKey(realName), "Can not register a capability implementation multiple times: %s", realName);
Capability<T> cap = new Capability<T>(realName, storage, factory);
providers.put(realName, cap);
List<Function<Capability<?>, Object>> list = callbacks.get(realName);
if (list != null)
{
for (Function<Capability<?>, Object> func : list)
{
func.apply(cap);
}
}
}
// INTERNAL
private IdentityHashMap<String, Capability<?>> providers = Maps.newIdentityHashMap();
private IdentityHashMap<String, List<Function<Capability<?>, Object>>> callbacks = Maps.newIdentityHashMap();
public void injectCapabilities(ASMDataTable data)
{
for (ASMDataTable.ASMData entry : data.getAll(CapabilityInject.class.getName()))
{
final String targetClass = entry.getClassName();
final String targetName = entry.getObjectName();
Type type = (Type)entry.getAnnotationInfo().get("value");
if (type == null)
{
FMLLog.log.warn("Unable to inject capability at {}.{} (Invalid Annotation)", targetClass, targetName);
continue;
}
final String capabilityName = type.getInternalName().replace('/', '.').intern();
List<Function<Capability<?>, Object>> list = callbacks.computeIfAbsent(capabilityName, k -> Lists.newArrayList());
if (entry.getObjectName().indexOf('(') > 0)
{
list.add(new Function<Capability<?>, Object>()
{
@Override
public Object apply(Capability<?> input)
{
try
{
for (Method mtd : Class.forName(targetClass).getDeclaredMethods())
{
if (targetName.equals(mtd.getName() + Type.getMethodDescriptor(mtd)))
{
if ((mtd.getModifiers() & Modifier.STATIC) != Modifier.STATIC)
{
FMLLog.log.warn("Unable to inject capability {} at {}.{} (Non-Static)", capabilityName, targetClass, targetName);
return null;
}
mtd.setAccessible(true);
mtd.invoke(null, input);
return null;
}
}
FMLLog.log.warn("Unable to inject capability {} at {}.{} (Method Not Found)", capabilityName, targetClass, targetName);
}
catch (Exception e)
{
FMLLog.log.warn("Unable to inject capability {} at {}.{}", capabilityName, targetClass, targetName, e);
}
return null;
}
});
}
else
{
list.add(new Function<Capability<?>, Object>()
{
@Override
public Object apply(Capability<?> input)
{
try
{
Field field = Class.forName(targetClass).getDeclaredField(targetName);
if ((field.getModifiers() & Modifier.STATIC) != Modifier.STATIC)
{
FMLLog.log.warn("Unable to inject capability {} at {}.{} (Non-Static)", capabilityName, targetClass, targetName);
return null;
}
EnumHelper.setFailsafeFieldValue(field, null, input);
}
catch (Exception e)
{
FMLLog.log.warn("Unable to inject capability {} at {}.{}", capabilityName, targetClass, targetName, e);
}
return null;
}
});
}
}
}
} | [
"treeclan12@gmail.com"
] | treeclan12@gmail.com |
84b54a56d08c8f96a93059a404c7b762cbe3bdaf | 7356b44905d674b68594a2762fc46883119166cd | /driving-network/driving-network-server/src/main/java/com/fh/framework/receiver/MessageReceiver.java | 0c193fff6dafdbd9cc012361771dd549e98baa49 | [] | no_license | shanzheng250/driving | e8719955f95988911ab099941bcb75651f5be927 | 240dab435cfe9cf0ea870e2dcc8669005a8c1d48 | refs/heads/master | 2022-12-28T02:41:21.765518 | 2020-01-25T12:25:52 | 2020-01-25T12:25:52 | 236,162,177 | 0 | 0 | null | 2022-12-16T03:23:08 | 2020-01-25T11:38:23 | Java | UTF-8 | Java | false | false | 2,537 | java | package com.fh.framework.receiver;
import com.fh.framework.codec.Command;
import com.fh.framework.constant.StatusEnum;
import com.fh.framework.message.ErrorMessage;
import com.fh.framework.packet.Packet;
import com.fh.framework.session.Connection;
import com.fh.framework.utils.CommonUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Supplier;
/**
* @ClassName:MessageReceiver
* @Description: 用来保存packet和处理器之间的关系
* @Author: shanzheng
* @Date: 2019/12/19 10:46
* @Version:1.0
**/
public final class MessageReceiver {
private static final Logger logger = LoggerFactory.getLogger(MessageReceiver.class);
private final Map<Byte, IMessageHandler> handlers = new HashMap<>();
/**
* 分发处理
* @param packet
* @param connection
*/
public void onReceive(Packet packet, Connection connection) {
IMessageHandler handler = handlers.get(packet.cmd);
if (handler != null) {
Long startTime = CommonUtils.getCurTime();
try {
handler.handle(packet, connection);
} catch (Exception e) {
logger.error("dispatch message ex, packet={}, connect={}, body={}", packet, connection, packet.getBody(), e);
new ErrorMessage(packet, connection)
.setErrorCode(StatusEnum.DISPATCH_ERROR)
.send(null);
} finally {
logger.info("dispatch packet处理完成耗时为:{}ms",CommonUtils.getCurTime() - startTime);
}
} else {
logger.info("dispatch message failure, cmd={} unsupported, packet={}, connect={}, body={}" , Command.toCMD(packet.cmd), packet, connection);
new ErrorMessage(packet, connection)
.setErrorCode(StatusEnum.DISPATCH_ERROR)
.setReason("no command")
.send(null);
}
}
/**
* 注册到分发器上
* @param command
* @param handler
*/
public void register(Command command, IMessageHandler handler) {
handlers.put(command.cmd, handler);
}
public void register(Command command, Supplier<IMessageHandler> handlerSupplier) {
if (!handlers.containsKey(command.cmd)) {
register(command, handlerSupplier.get());
}
}
public IMessageHandler unRegister(Command command) {
return handlers.remove(command.cmd);
}
}
| [
"550994952@qq.com"
] | 550994952@qq.com |
1f763bbde6dea79ab76dc24d490c0ad056b0c972 | a104684e960b5bdfa7ad3b373939a8801a18fee4 | /FloatOps/FloatOps/src/NaN.java | a09ed1beecea1bda7c0fa25db4013d10c710ddd1 | [] | no_license | IssacYoung2013/javase | b53884848581114cc0a9caacaed9898e6480ae69 | 095733ca6a35af16b6d3b9559ff55c7757de7229 | refs/heads/master | 2020-03-23T07:26:29.938491 | 2018-07-27T09:50:31 | 2018-07-27T09:50:31 | 141,271,325 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 248 | java |
public class NaN {
public static void main(String[] args) {
double d1 = 0.0 / 0; // NaN
double d2 = 1.0 / 0; // Infinity
double d3 = -1.0 / 0; // -Infinity
System.out.println(d1);
System.out.println(d2);
System.out.println(d3);
}
}
| [
"yangwenyuan@mitong.com"
] | yangwenyuan@mitong.com |
a98dd1f23d482b765a05b3c8cbb39b9f43478d17 | 85b6523e077a4ccd3a65b25e57df3ce246daee26 | /app/src/main/java/com/techwarriors/mav_admin/SearchAndEdit.java | c852bf985783b95bdfb76adef637c0cbfa904b73 | [] | no_license | akashlimaye/MAVAdmin | 0aeba05db8dd07d0f64ae4861a28621c2cf4953a | b76856b0d619fe2d17dd226d4509359c213c84cb | refs/heads/master | 2020-06-12T11:18:48.263789 | 2019-06-28T13:59:03 | 2019-06-28T13:59:03 | 194,282,569 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,649 | java | package com.techwarriors.mav_admin;
import android.content.Intent;
import android.os.Bundle;
import android.os.StrictMode;
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.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.mongodb.BasicDBObject;
import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.MongoClient;
import com.mongodb.MongoClientURI;
import java.util.List;
public class SearchAndEdit extends AppCompatActivity {
String DATABASE_URI="mongodb:// 192.168.43.71:27017";
String DATABASE_NAME="mav";
String COLLECTION_NAME1="driver";
DBCollection drivercollection;
String name,phone,id;
BasicDBObject dbobj;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_search_and_edit);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
StrictMode.ThreadPolicy policy=new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
final EditText etutaid=(EditText)findViewById(R.id.PTdriverid_editing);
Button bsearch=(Button)findViewById(R.id.search);
bsearch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String utaid=etutaid.getText().toString();
if (utaid.length()<10){
Toast.makeText(getApplicationContext(),"Enter a valid 10-digit UTA ID",Toast.LENGTH_LONG).show();
}
else {
try {
MongoClientURI mongoClientURI = new MongoClientURI(DATABASE_URI);
MongoClient mongoClient = new MongoClient(mongoClientURI);
DB db = mongoClient.getDB(DATABASE_NAME);
drivercollection = db.getCollection(COLLECTION_NAME1);
DBCursor cur = drivercollection.find(new BasicDBObject("d_utaid", utaid));
if (cur.count() == 0) {
Toast.makeText(getApplicationContext(), "No Driver found!", Toast.LENGTH_LONG).show();
} else {
while (cur.hasNext()) {
dbobj = (BasicDBObject) cur.next();
//name=((BasicDBObject) cur.next()).getString("d_name");
name = dbobj.get("d_name").toString();
phone = dbobj.get("d_phone").toString();
id = dbobj.get("d_utaid").toString();
Intent i1 = new Intent(SearchAndEdit.this, EditDriverDetails.class);
// i1.putExtra("dbobj",dbobj);
i1.putExtra("name", name);
i1.putExtra("phone", phone);
i1.putExtra("id", id);
// i1.putExtra("phone",phone);
startActivity(i1);
}
}
} catch (Exception e) {
Log.d("logsample", e.toString());
}
}
}
});
}
}
| [
"akash.g.limaye@gmail.com"
] | akash.g.limaye@gmail.com |
a34adb374980c40de46081568c0b4ed6057b7fe3 | b736888fb96f821cc4231a64bbde1903fd3f9049 | /src/cardgame/CardTrick.java | 76c2970c0454167774a9c5001c74a2ae5bce1abe | [] | no_license | patenima/NimaPatel | 79b9b796d862e0dc89fe3900c5de67a3d6561684 | 9cfe8cd198aef97fe8da03652abae2cd30e09fcc | refs/heads/master | 2020-07-31T18:35:17.313238 | 2019-09-25T02:03:27 | 2019-09-25T02:03:27 | 210,712,086 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 942 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package cardgame;
/**
*
* @author Nima
*/
public class CardTrick {
public static void main(String[] args)
{
// TODO code application logic here
CardGame[] magicHand = new CardGame[7];//array of object
for(int i= 0; i<magicHand.length; i++){
CardGame c1 = new CardGame();//an object
c1.setValue(c1.ranValue());//random number from 1 to 13
c1.setSuit(CardGame.SUITS[c1.ranSuit()]);
magicHand[i] = c1;
System.out.println(magicHand[i].getSuit()+ " "+
magicHand[i].getValue());
}
//take input suit and value from user. compare within the array print
//your card is found.
}
}
| [
"patenima@sheridan.desire2learn.com"
] | patenima@sheridan.desire2learn.com |
63323d2c5987ed25596c6f798bd9f8caf5dcece9 | e04eaf81f95cc8d894694f4976c992665036749e | /org.eclipse.gmt.emfacade/src/org/eclipse/gmt/emfacade/EmfacadePackage.java | dfc1540e97843eec1f11bcde44262004468b6d25 | [] | no_license | hallvard/emfacade | d5fc3d669dfab100ffb2fb33e4315200b90417fe | c1f8b77be5200b233053606470290f61e49f5359 | refs/heads/master | 2020-05-17T11:36:37.711287 | 2011-11-14T08:36:57 | 2011-11-14T08:36:57 | 2,770,878 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 90,072 | java | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipse.gmt.emfacade;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
/**
* <!-- begin-user-doc -->
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.EmfacadeFactory
* @model kind="package"
* @generated
*/
public interface EmfacadePackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNAME = "emfacade";
/**
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "platform:/resource/org.eclipse.gmt.emfacade/model/emfacade.ecore";
/**
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_PREFIX = "emfacade";
/**
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EmfacadePackage eINSTANCE = org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl.init();
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.DefaultNameImpl <em>Default Name</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.DefaultNameImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getDefaultName()
* @generated
*/
int DEFAULT_NAME = 0;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DEFAULT_NAME__NAME = 0;
/**
* The number of structural features of the '<em>Default Name</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int DEFAULT_NAME_FEATURE_COUNT = 1;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.InterfaceImplementationImpl <em>Interface Implementation</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.InterfaceImplementationImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getInterfaceImplementation()
* @generated
*/
int INTERFACE_IMPLEMENTATION = 1;
/**
* The feature id for the '<em><b>Method Implementations</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int INTERFACE_IMPLEMENTATION__METHOD_IMPLEMENTATIONS = 0;
/**
* The feature id for the '<em><b>Inferred Interface Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int INTERFACE_IMPLEMENTATION__INFERRED_INTERFACE_TYPE = 1;
/**
* The number of structural features of the '<em>Interface Implementation</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int INTERFACE_IMPLEMENTATION_FEATURE_COUNT = 2;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.InterfaceMethodImplementationImpl <em>Interface Method Implementation</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.InterfaceMethodImplementationImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getInterfaceMethodImplementation()
* @generated
*/
int INTERFACE_METHOD_IMPLEMENTATION = 2;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int INTERFACE_METHOD_IMPLEMENTATION__NAME = DEFAULT_NAME__NAME;
/**
* The feature id for the '<em><b>Interface Implementation</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int INTERFACE_METHOD_IMPLEMENTATION__INTERFACE_IMPLEMENTATION = DEFAULT_NAME_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Interface Method</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int INTERFACE_METHOD_IMPLEMENTATION__INTERFACE_METHOD = DEFAULT_NAME_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Method Body</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int INTERFACE_METHOD_IMPLEMENTATION__METHOD_BODY = DEFAULT_NAME_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Inferred Method Body</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int INTERFACE_METHOD_IMPLEMENTATION__INFERRED_METHOD_BODY = DEFAULT_NAME_FEATURE_COUNT + 3;
/**
* The number of structural features of the '<em>Interface Method Implementation</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int INTERFACE_METHOD_IMPLEMENTATION_FEATURE_COUNT = DEFAULT_NAME_FEATURE_COUNT + 4;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.EClassMappingImpl <em>EClass Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EClassMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEClassMapping()
* @generated
*/
int ECLASS_MAPPING = 6;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.EFeatureMappingImpl <em>EFeature Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EFeatureMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEFeatureMapping()
* @generated
*/
int EFEATURE_MAPPING = 10;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyImpl <em>Feature Mapping Strategy</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getFeatureMappingStrategy()
* @generated
*/
int FEATURE_MAPPING_STRATEGY = 9;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.NameTypePatternFMSImpl <em>Name Type Pattern FMS</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.NameTypePatternFMSImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getNameTypePatternFMS()
* @generated
*/
int NAME_TYPE_PATTERN_FMS = 15;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.NameTypePatternImpl <em>Name Type Pattern</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.NameTypePatternImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getNameTypePattern()
* @generated
*/
int NAME_TYPE_PATTERN = 17;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.FacadeModelImpl <em>Facade Model</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.FacadeModelImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getFacadeModel()
* @generated
*/
int FACADE_MODEL = 3;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FACADE_MODEL__NAME = DEFAULT_NAME__NAME;
/**
* The feature id for the '<em><b>Gen Model</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FACADE_MODEL__GEN_MODEL = DEFAULT_NAME_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Uses Facade Models</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FACADE_MODEL__USES_FACADE_MODELS = DEFAULT_NAME_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Feature Mapping Strategies</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FACADE_MODEL__FEATURE_MAPPING_STRATEGIES = DEFAULT_NAME_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Base Package</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FACADE_MODEL__BASE_PACKAGE = DEFAULT_NAME_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>EPackages</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FACADE_MODEL__EPACKAGES = DEFAULT_NAME_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Classifier Mappings</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FACADE_MODEL__CLASSIFIER_MAPPINGS = DEFAULT_NAME_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Imports</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FACADE_MODEL__IMPORTS = DEFAULT_NAME_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Feature Mapping Defaults</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FACADE_MODEL__FEATURE_MAPPING_DEFAULTS = DEFAULT_NAME_FEATURE_COUNT + 7;
/**
* The number of structural features of the '<em>Facade Model</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FACADE_MODEL_FEATURE_COUNT = DEFAULT_NAME_FEATURE_COUNT + 8;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.ImportDirectiveImpl <em>Import Directive</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.ImportDirectiveImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getImportDirective()
* @generated
*/
int IMPORT_DIRECTIVE = 4;
/**
* The feature id for the '<em><b>Imported Namespace</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IMPORT_DIRECTIVE__IMPORTED_NAMESPACE = 0;
/**
* The number of structural features of the '<em>Import Directive</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int IMPORT_DIRECTIVE_FEATURE_COUNT = 1;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.EClassifierMappingImpl <em>EClassifier Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EClassifierMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEClassifierMapping()
* @generated
*/
int ECLASSIFIER_MAPPING = 5;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASSIFIER_MAPPING__NAME = DEFAULT_NAME__NAME;
/**
* The number of structural features of the '<em>EClassifier Mapping</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASSIFIER_MAPPING_FEATURE_COUNT = DEFAULT_NAME_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASS_MAPPING__NAME = ECLASSIFIER_MAPPING__NAME;
/**
* The feature id for the '<em><b>EClass</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASS_MAPPING__ECLASS = ECLASSIFIER_MAPPING_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>JClass</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASS_MAPPING__JCLASS = ECLASSIFIER_MAPPING_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Create Expression</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASS_MAPPING__CREATE_EXPRESSION = ECLASSIFIER_MAPPING_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Life Cycle Handler</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASS_MAPPING__LIFE_CYCLE_HANDLER = ECLASSIFIER_MAPPING_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Dispose Expression</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASS_MAPPING__DISPOSE_EXPRESSION = ECLASSIFIER_MAPPING_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Feature Mappings</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASS_MAPPING__FEATURE_MAPPINGS = ECLASSIFIER_MAPPING_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Feature Mapping Defaults</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASS_MAPPING__FEATURE_MAPPING_DEFAULTS = ECLASSIFIER_MAPPING_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Event Handlers</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASS_MAPPING__EVENT_HANDLERS = ECLASSIFIER_MAPPING_FEATURE_COUNT + 7;
/**
* The number of structural features of the '<em>EClass Mapping</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ECLASS_MAPPING_FEATURE_COUNT = ECLASSIFIER_MAPPING_FEATURE_COUNT + 8;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.LifeCycleImplementationImpl <em>Life Cycle Implementation</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.LifeCycleImplementationImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getLifeCycleImplementation()
* @generated
*/
int LIFE_CYCLE_IMPLEMENTATION = 7;
/**
* The feature id for the '<em><b>Method Implementations</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int LIFE_CYCLE_IMPLEMENTATION__METHOD_IMPLEMENTATIONS = INTERFACE_IMPLEMENTATION__METHOD_IMPLEMENTATIONS;
/**
* The feature id for the '<em><b>Inferred Interface Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int LIFE_CYCLE_IMPLEMENTATION__INFERRED_INTERFACE_TYPE = INTERFACE_IMPLEMENTATION__INFERRED_INTERFACE_TYPE;
/**
* The number of structural features of the '<em>Life Cycle Implementation</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int LIFE_CYCLE_IMPLEMENTATION_FEATURE_COUNT = INTERFACE_IMPLEMENTATION_FEATURE_COUNT + 0;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.EventHandlerImpl <em>Event Handler</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EventHandlerImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEventHandler()
* @generated
*/
int EVENT_HANDLER = 8;
/**
* The feature id for the '<em><b>Method Implementations</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EVENT_HANDLER__METHOD_IMPLEMENTATIONS = INTERFACE_IMPLEMENTATION__METHOD_IMPLEMENTATIONS;
/**
* The feature id for the '<em><b>Inferred Interface Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EVENT_HANDLER__INFERRED_INTERFACE_TYPE = INTERFACE_IMPLEMENTATION__INFERRED_INTERFACE_TYPE;
/**
* The feature id for the '<em><b>Interface Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EVENT_HANDLER__INTERFACE_TYPE = INTERFACE_IMPLEMENTATION_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Event Handler</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EVENT_HANDLER_FEATURE_COUNT = INTERFACE_IMPLEMENTATION_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY__NAME = DEFAULT_NAME__NAME;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.EEnumMappingImpl <em>EEnum Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EEnumMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEEnumMapping()
* @generated
*/
int EENUM_MAPPING = 13;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.EEnumLiteralMappingImpl <em>EEnum Literal Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EEnumLiteralMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEEnumLiteralMapping()
* @generated
*/
int EENUM_LITERAL_MAPPING = 14;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.EDataTypeMappingImpl <em>EData Type Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EDataTypeMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEDataTypeMapping()
* @generated
*/
int EDATA_TYPE_MAPPING = 12;
/**
* The feature id for the '<em><b>Impl Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY__IMPL_TYPE = DEFAULT_NAME_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Interface Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY__INTERFACE_TYPE = DEFAULT_NAME_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Patterns</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY__PATTERNS = DEFAULT_NAME_FEATURE_COUNT + 2;
/**
* The number of structural features of the '<em>Feature Mapping Strategy</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY_FEATURE_COUNT = DEFAULT_NAME_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EFEATURE_MAPPING__NAME = DEFAULT_NAME__NAME;
/**
* The feature id for the '<em><b>Method Implementations</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EFEATURE_MAPPING__METHOD_IMPLEMENTATIONS = DEFAULT_NAME_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Inferred Interface Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EFEATURE_MAPPING__INFERRED_INTERFACE_TYPE = DEFAULT_NAME_FEATURE_COUNT + 1;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.MemberPatternImpl <em>Member Pattern</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.MemberPatternImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getMemberPattern()
* @generated
*/
int MEMBER_PATTERN = 16;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.TypeListPatternImpl <em>Type List Pattern</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.TypeListPatternImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getTypeListPattern()
* @generated
*/
int TYPE_LIST_PATTERN = 18;
/**
* The feature id for the '<em><b>EClass Mapping</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EFEATURE_MAPPING__ECLASS_MAPPING = DEFAULT_NAME_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Options</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EFEATURE_MAPPING__OPTIONS = DEFAULT_NAME_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>EFeature</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EFEATURE_MAPPING__EFEATURE = DEFAULT_NAME_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>JClass</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EFEATURE_MAPPING__JCLASS = DEFAULT_NAME_FEATURE_COUNT + 5;
/**
* The number of structural features of the '<em>EFeature Mapping</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EFEATURE_MAPPING_FEATURE_COUNT = DEFAULT_NAME_FEATURE_COUNT + 6;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.EFeatureMappingOptionsImpl <em>EFeature Mapping Options</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EFeatureMappingOptionsImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEFeatureMappingOptions()
* @generated
*/
int EFEATURE_MAPPING_OPTIONS = 11;
/**
* The feature id for the '<em><b>Strategy</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EFEATURE_MAPPING_OPTIONS__STRATEGY = 0;
/**
* The number of structural features of the '<em>EFeature Mapping Options</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EFEATURE_MAPPING_OPTIONS_FEATURE_COUNT = 1;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EDATA_TYPE_MAPPING__NAME = ECLASSIFIER_MAPPING__NAME;
/**
* The feature id for the '<em><b>EData Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EDATA_TYPE_MAPPING__EDATA_TYPE = ECLASSIFIER_MAPPING_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>JClass</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EDATA_TYPE_MAPPING__JCLASS = ECLASSIFIER_MAPPING_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Convert Expression</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EDATA_TYPE_MAPPING__CONVERT_EXPRESSION = ECLASSIFIER_MAPPING_FEATURE_COUNT + 2;
/**
* The number of structural features of the '<em>EData Type Mapping</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EDATA_TYPE_MAPPING_FEATURE_COUNT = ECLASSIFIER_MAPPING_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EENUM_MAPPING__NAME = EDATA_TYPE_MAPPING__NAME;
/**
* The feature id for the '<em><b>EData Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EENUM_MAPPING__EDATA_TYPE = EDATA_TYPE_MAPPING__EDATA_TYPE;
/**
* The feature id for the '<em><b>JClass</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EENUM_MAPPING__JCLASS = EDATA_TYPE_MAPPING__JCLASS;
/**
* The feature id for the '<em><b>Convert Expression</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EENUM_MAPPING__CONVERT_EXPRESSION = EDATA_TYPE_MAPPING__CONVERT_EXPRESSION;
/**
* The feature id for the '<em><b>Literal Mappings</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EENUM_MAPPING__LITERAL_MAPPINGS = EDATA_TYPE_MAPPING_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>EEnum Mapping</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EENUM_MAPPING_FEATURE_COUNT = EDATA_TYPE_MAPPING_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EENUM_LITERAL_MAPPING__NAME = DEFAULT_NAME__NAME;
/**
* The feature id for the '<em><b>Enum Literal</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EENUM_LITERAL_MAPPING__ENUM_LITERAL = DEFAULT_NAME_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Convert Expression</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EENUM_LITERAL_MAPPING__CONVERT_EXPRESSION = DEFAULT_NAME_FEATURE_COUNT + 1;
/**
* The number of structural features of the '<em>EEnum Literal Mapping</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int EENUM_LITERAL_MAPPING_FEATURE_COUNT = DEFAULT_NAME_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NAME_TYPE_PATTERN_FMS__NAME = FEATURE_MAPPING_STRATEGY__NAME;
/**
* The feature id for the '<em><b>Impl Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NAME_TYPE_PATTERN_FMS__IMPL_TYPE = FEATURE_MAPPING_STRATEGY__IMPL_TYPE;
/**
* The feature id for the '<em><b>Interface Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NAME_TYPE_PATTERN_FMS__INTERFACE_TYPE = FEATURE_MAPPING_STRATEGY__INTERFACE_TYPE;
/**
* The feature id for the '<em><b>Patterns</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NAME_TYPE_PATTERN_FMS__PATTERNS = FEATURE_MAPPING_STRATEGY__PATTERNS;
/**
* The feature id for the '<em><b>Pattern</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NAME_TYPE_PATTERN_FMS__PATTERN = FEATURE_MAPPING_STRATEGY_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Name Type Pattern FMS</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NAME_TYPE_PATTERN_FMS_FEATURE_COUNT = FEATURE_MAPPING_STRATEGY_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Name Pattern</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int MEMBER_PATTERN__NAME_PATTERN = 0;
/**
* The feature id for the '<em><b>Type Pattern</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int MEMBER_PATTERN__TYPE_PATTERN = 1;
/**
* The feature id for the '<em><b>Parameter List Pattern</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int MEMBER_PATTERN__PARAMETER_LIST_PATTERN = 2;
/**
* The number of structural features of the '<em>Member Pattern</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int MEMBER_PATTERN_FEATURE_COUNT = 3;
/**
* The feature id for the '<em><b>Member Patterns</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NAME_TYPE_PATTERN__MEMBER_PATTERNS = 0;
/**
* The number of structural features of the '<em>Name Type Pattern</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NAME_TYPE_PATTERN_FEATURE_COUNT = 1;
/**
* The feature id for the '<em><b>Parameter Type Patterns</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TYPE_LIST_PATTERN__PARAMETER_TYPE_PATTERNS = 0;
/**
* The number of structural features of the '<em>Type List Pattern</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TYPE_LIST_PATTERN_FEATURE_COUNT = 1;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyPatternImpl <em>Feature Mapping Strategy Pattern</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyPatternImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getFeatureMappingStrategyPattern()
* @generated
*/
int FEATURE_MAPPING_STRATEGY_PATTERN = 19;
/**
* The feature id for the '<em><b>Strategy</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY_PATTERN__STRATEGY = 0;
/**
* The feature id for the '<em><b>Feature Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY_PATTERN__FEATURE_NAME = 1;
/**
* The feature id for the '<em><b>Type Parameters</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY_PATTERN__TYPE_PARAMETERS = 2;
/**
* The feature id for the '<em><b>Method Patterns</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY_PATTERN__METHOD_PATTERNS = 3;
/**
* The number of structural features of the '<em>Feature Mapping Strategy Pattern</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY_PATTERN_FEATURE_COUNT = 4;
/**
* The meta object id for the '{@link org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyMethodPatternImpl <em>Feature Mapping Strategy Method Pattern</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyMethodPatternImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getFeatureMappingStrategyMethodPattern()
* @generated
*/
int FEATURE_MAPPING_STRATEGY_METHOD_PATTERN = 20;
/**
* The feature id for the '<em><b>Strategy Method</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY_METHOD_PATTERN__STRATEGY_METHOD = 0;
/**
* The feature id for the '<em><b>Target Member</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY_METHOD_PATTERN__TARGET_MEMBER = 1;
/**
* The feature id for the '<em><b>Target Body</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY_METHOD_PATTERN__TARGET_BODY = 2;
/**
* The number of structural features of the '<em>Feature Mapping Strategy Method Pattern</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int FEATURE_MAPPING_STRATEGY_METHOD_PATTERN_FEATURE_COUNT = 3;
/**
* The meta object id for the '<em>Jvm Inferrer Helper</em>' data type.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.util.EmfacadeJvmInferrerHelper
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEmfacadeJvmInferrerHelper()
* @generated
*/
int EMFACADE_JVM_INFERRER_HELPER = 21;
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.DefaultName <em>Default Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Default Name</em>'.
* @see org.eclipse.gmt.emfacade.DefaultName
* @generated
*/
EClass getDefaultName();
/**
* Returns the meta object for the attribute '{@link org.eclipse.gmt.emfacade.DefaultName#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Name</em>'.
* @see org.eclipse.gmt.emfacade.DefaultName#getName()
* @see #getDefaultName()
* @generated
*/
EAttribute getDefaultName_Name();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.InterfaceImplementation <em>Interface Implementation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Interface Implementation</em>'.
* @see org.eclipse.gmt.emfacade.InterfaceImplementation
* @generated
*/
EClass getInterfaceImplementation();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.InterfaceImplementation#getMethodImplementations <em>Method Implementations</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Method Implementations</em>'.
* @see org.eclipse.gmt.emfacade.InterfaceImplementation#getMethodImplementations()
* @see #getInterfaceImplementation()
* @generated
*/
EReference getInterfaceImplementation_MethodImplementations();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.InterfaceImplementation#getInferredInterfaceType <em>Inferred Interface Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Inferred Interface Type</em>'.
* @see org.eclipse.gmt.emfacade.InterfaceImplementation#getInferredInterfaceType()
* @see #getInterfaceImplementation()
* @generated
*/
EReference getInterfaceImplementation_InferredInterfaceType();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.InterfaceMethodImplementation <em>Interface Method Implementation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Interface Method Implementation</em>'.
* @see org.eclipse.gmt.emfacade.InterfaceMethodImplementation
* @generated
*/
EClass getInterfaceMethodImplementation();
/**
* Returns the meta object for the container reference '{@link org.eclipse.gmt.emfacade.InterfaceMethodImplementation#getInterfaceImplementation <em>Interface Implementation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the container reference '<em>Interface Implementation</em>'.
* @see org.eclipse.gmt.emfacade.InterfaceMethodImplementation#getInterfaceImplementation()
* @see #getInterfaceMethodImplementation()
* @generated
*/
EReference getInterfaceMethodImplementation_InterfaceImplementation();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.InterfaceMethodImplementation#getInterfaceMethod <em>Interface Method</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Interface Method</em>'.
* @see org.eclipse.gmt.emfacade.InterfaceMethodImplementation#getInterfaceMethod()
* @see #getInterfaceMethodImplementation()
* @generated
*/
EReference getInterfaceMethodImplementation_InterfaceMethod();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.InterfaceMethodImplementation#getMethodBody <em>Method Body</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Method Body</em>'.
* @see org.eclipse.gmt.emfacade.InterfaceMethodImplementation#getMethodBody()
* @see #getInterfaceMethodImplementation()
* @generated
*/
EReference getInterfaceMethodImplementation_MethodBody();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.InterfaceMethodImplementation#getInferredMethodBody <em>Inferred Method Body</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Inferred Method Body</em>'.
* @see org.eclipse.gmt.emfacade.InterfaceMethodImplementation#getInferredMethodBody()
* @see #getInterfaceMethodImplementation()
* @generated
*/
EReference getInterfaceMethodImplementation_InferredMethodBody();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.EClassMapping <em>EClass Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>EClass Mapping</em>'.
* @see org.eclipse.gmt.emfacade.EClassMapping
* @generated
*/
EClass getEClassMapping();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.EClassMapping#getEClass <em>EClass</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>EClass</em>'.
* @see org.eclipse.gmt.emfacade.EClassMapping#getEClass()
* @see #getEClassMapping()
* @generated
*/
EReference getEClassMapping_EClass();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.EClassMapping#getJClass <em>JClass</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>JClass</em>'.
* @see org.eclipse.gmt.emfacade.EClassMapping#getJClass()
* @see #getEClassMapping()
* @generated
*/
EReference getEClassMapping_JClass();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.EClassMapping#getCreateExpression <em>Create Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Create Expression</em>'.
* @see org.eclipse.gmt.emfacade.EClassMapping#getCreateExpression()
* @see #getEClassMapping()
* @generated
*/
EReference getEClassMapping_CreateExpression();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.EClassMapping#getLifeCycleHandler <em>Life Cycle Handler</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Life Cycle Handler</em>'.
* @see org.eclipse.gmt.emfacade.EClassMapping#getLifeCycleHandler()
* @see #getEClassMapping()
* @generated
*/
EReference getEClassMapping_LifeCycleHandler();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.EClassMapping#getDisposeExpression <em>Dispose Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Dispose Expression</em>'.
* @see org.eclipse.gmt.emfacade.EClassMapping#getDisposeExpression()
* @see #getEClassMapping()
* @generated
*/
EReference getEClassMapping_DisposeExpression();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.EClassMapping#getFeatureMappings <em>Feature Mappings</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Feature Mappings</em>'.
* @see org.eclipse.gmt.emfacade.EClassMapping#getFeatureMappings()
* @see #getEClassMapping()
* @generated
*/
EReference getEClassMapping_FeatureMappings();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.EClassMapping#getFeatureMappingDefaults <em>Feature Mapping Defaults</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Feature Mapping Defaults</em>'.
* @see org.eclipse.gmt.emfacade.EClassMapping#getFeatureMappingDefaults()
* @see #getEClassMapping()
* @generated
*/
EReference getEClassMapping_FeatureMappingDefaults();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.EClassMapping#getEventHandlers <em>Event Handlers</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Event Handlers</em>'.
* @see org.eclipse.gmt.emfacade.EClassMapping#getEventHandlers()
* @see #getEClassMapping()
* @generated
*/
EReference getEClassMapping_EventHandlers();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.LifeCycleImplementation <em>Life Cycle Implementation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Life Cycle Implementation</em>'.
* @see org.eclipse.gmt.emfacade.LifeCycleImplementation
* @generated
*/
EClass getLifeCycleImplementation();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.EventHandler <em>Event Handler</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Event Handler</em>'.
* @see org.eclipse.gmt.emfacade.EventHandler
* @generated
*/
EClass getEventHandler();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.EventHandler#getInterfaceType <em>Interface Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Interface Type</em>'.
* @see org.eclipse.gmt.emfacade.EventHandler#getInterfaceType()
* @see #getEventHandler()
* @generated
*/
EReference getEventHandler_InterfaceType();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.EFeatureMapping <em>EFeature Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>EFeature Mapping</em>'.
* @see org.eclipse.gmt.emfacade.EFeatureMapping
* @generated
*/
EClass getEFeatureMapping();
/**
* Returns the meta object for the container reference '{@link org.eclipse.gmt.emfacade.EFeatureMapping#getEClassMapping <em>EClass Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the container reference '<em>EClass Mapping</em>'.
* @see org.eclipse.gmt.emfacade.EFeatureMapping#getEClassMapping()
* @see #getEFeatureMapping()
* @generated
*/
EReference getEFeatureMapping_EClassMapping();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.EFeatureMapping#getOptions <em>Options</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Options</em>'.
* @see org.eclipse.gmt.emfacade.EFeatureMapping#getOptions()
* @see #getEFeatureMapping()
* @generated
*/
EReference getEFeatureMapping_Options();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.EFeatureMapping#getEFeature <em>EFeature</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>EFeature</em>'.
* @see org.eclipse.gmt.emfacade.EFeatureMapping#getEFeature()
* @see #getEFeatureMapping()
* @generated
*/
EReference getEFeatureMapping_EFeature();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.EFeatureMapping#getJClass <em>JClass</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>JClass</em>'.
* @see org.eclipse.gmt.emfacade.EFeatureMapping#getJClass()
* @see #getEFeatureMapping()
* @generated
*/
EReference getEFeatureMapping_JClass();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.EFeatureMappingOptions <em>EFeature Mapping Options</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>EFeature Mapping Options</em>'.
* @see org.eclipse.gmt.emfacade.EFeatureMappingOptions
* @generated
*/
EClass getEFeatureMappingOptions();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.EFeatureMappingOptions#getStrategy <em>Strategy</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Strategy</em>'.
* @see org.eclipse.gmt.emfacade.EFeatureMappingOptions#getStrategy()
* @see #getEFeatureMappingOptions()
* @generated
*/
EReference getEFeatureMappingOptions_Strategy();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.EEnumMapping <em>EEnum Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>EEnum Mapping</em>'.
* @see org.eclipse.gmt.emfacade.EEnumMapping
* @generated
*/
EClass getEEnumMapping();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.EEnumMapping#getLiteralMappings <em>Literal Mappings</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Literal Mappings</em>'.
* @see org.eclipse.gmt.emfacade.EEnumMapping#getLiteralMappings()
* @see #getEEnumMapping()
* @generated
*/
EReference getEEnumMapping_LiteralMappings();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.EEnumLiteralMapping <em>EEnum Literal Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>EEnum Literal Mapping</em>'.
* @see org.eclipse.gmt.emfacade.EEnumLiteralMapping
* @generated
*/
EClass getEEnumLiteralMapping();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.EEnumLiteralMapping#getEnumLiteral <em>Enum Literal</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Enum Literal</em>'.
* @see org.eclipse.gmt.emfacade.EEnumLiteralMapping#getEnumLiteral()
* @see #getEEnumLiteralMapping()
* @generated
*/
EReference getEEnumLiteralMapping_EnumLiteral();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.EEnumLiteralMapping#getConvertExpression <em>Convert Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Convert Expression</em>'.
* @see org.eclipse.gmt.emfacade.EEnumLiteralMapping#getConvertExpression()
* @see #getEEnumLiteralMapping()
* @generated
*/
EReference getEEnumLiteralMapping_ConvertExpression();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.EDataTypeMapping <em>EData Type Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>EData Type Mapping</em>'.
* @see org.eclipse.gmt.emfacade.EDataTypeMapping
* @generated
*/
EClass getEDataTypeMapping();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.EDataTypeMapping#getEDataType <em>EData Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>EData Type</em>'.
* @see org.eclipse.gmt.emfacade.EDataTypeMapping#getEDataType()
* @see #getEDataTypeMapping()
* @generated
*/
EReference getEDataTypeMapping_EDataType();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.EDataTypeMapping#getJClass <em>JClass</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>JClass</em>'.
* @see org.eclipse.gmt.emfacade.EDataTypeMapping#getJClass()
* @see #getEDataTypeMapping()
* @generated
*/
EReference getEDataTypeMapping_JClass();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.EDataTypeMapping#getConvertExpression <em>Convert Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Convert Expression</em>'.
* @see org.eclipse.gmt.emfacade.EDataTypeMapping#getConvertExpression()
* @see #getEDataTypeMapping()
* @generated
*/
EReference getEDataTypeMapping_ConvertExpression();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategy <em>Feature Mapping Strategy</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Feature Mapping Strategy</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategy
* @generated
*/
EClass getFeatureMappingStrategy();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategy#getImplType <em>Impl Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Impl Type</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategy#getImplType()
* @see #getFeatureMappingStrategy()
* @generated
*/
EReference getFeatureMappingStrategy_ImplType();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategy#getInterfaceType <em>Interface Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Interface Type</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategy#getInterfaceType()
* @see #getFeatureMappingStrategy()
* @generated
*/
EReference getFeatureMappingStrategy_InterfaceType();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategy#getPatterns <em>Patterns</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Patterns</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategy#getPatterns()
* @see #getFeatureMappingStrategy()
* @generated
*/
EReference getFeatureMappingStrategy_Patterns();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.NameTypePatternFMS <em>Name Type Pattern FMS</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Name Type Pattern FMS</em>'.
* @see org.eclipse.gmt.emfacade.NameTypePatternFMS
* @generated
*/
EClass getNameTypePatternFMS();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.NameTypePatternFMS#getPattern <em>Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Pattern</em>'.
* @see org.eclipse.gmt.emfacade.NameTypePatternFMS#getPattern()
* @see #getNameTypePatternFMS()
* @generated
*/
EReference getNameTypePatternFMS_Pattern();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.NameTypePattern <em>Name Type Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Name Type Pattern</em>'.
* @see org.eclipse.gmt.emfacade.NameTypePattern
* @generated
*/
EClass getNameTypePattern();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.NameTypePattern#getMemberPatterns <em>Member Patterns</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Member Patterns</em>'.
* @see org.eclipse.gmt.emfacade.NameTypePattern#getMemberPatterns()
* @see #getNameTypePattern()
* @generated
*/
EReference getNameTypePattern_MemberPatterns();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.FacadeModel <em>Facade Model</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Facade Model</em>'.
* @see org.eclipse.gmt.emfacade.FacadeModel
* @generated
*/
EClass getFacadeModel();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.FacadeModel#getGenModel <em>Gen Model</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Gen Model</em>'.
* @see org.eclipse.gmt.emfacade.FacadeModel#getGenModel()
* @see #getFacadeModel()
* @generated
*/
EReference getFacadeModel_GenModel();
/**
* Returns the meta object for the reference list '{@link org.eclipse.gmt.emfacade.FacadeModel#getUsesFacadeModels <em>Uses Facade Models</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Uses Facade Models</em>'.
* @see org.eclipse.gmt.emfacade.FacadeModel#getUsesFacadeModels()
* @see #getFacadeModel()
* @generated
*/
EReference getFacadeModel_UsesFacadeModels();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.FacadeModel#getFeatureMappingStrategies <em>Feature Mapping Strategies</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Feature Mapping Strategies</em>'.
* @see org.eclipse.gmt.emfacade.FacadeModel#getFeatureMappingStrategies()
* @see #getFacadeModel()
* @generated
*/
EReference getFacadeModel_FeatureMappingStrategies();
/**
* Returns the meta object for the attribute '{@link org.eclipse.gmt.emfacade.FacadeModel#getBasePackage <em>Base Package</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Base Package</em>'.
* @see org.eclipse.gmt.emfacade.FacadeModel#getBasePackage()
* @see #getFacadeModel()
* @generated
*/
EAttribute getFacadeModel_BasePackage();
/**
* Returns the meta object for the reference list '{@link org.eclipse.gmt.emfacade.FacadeModel#getEPackages <em>EPackages</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>EPackages</em>'.
* @see org.eclipse.gmt.emfacade.FacadeModel#getEPackages()
* @see #getFacadeModel()
* @generated
*/
EReference getFacadeModel_EPackages();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.FacadeModel#getClassifierMappings <em>Classifier Mappings</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Classifier Mappings</em>'.
* @see org.eclipse.gmt.emfacade.FacadeModel#getClassifierMappings()
* @see #getFacadeModel()
* @generated
*/
EReference getFacadeModel_ClassifierMappings();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.FacadeModel#getImports <em>Imports</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Imports</em>'.
* @see org.eclipse.gmt.emfacade.FacadeModel#getImports()
* @see #getFacadeModel()
* @generated
*/
EReference getFacadeModel_Imports();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.FacadeModel#getFeatureMappingDefaults <em>Feature Mapping Defaults</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Feature Mapping Defaults</em>'.
* @see org.eclipse.gmt.emfacade.FacadeModel#getFeatureMappingDefaults()
* @see #getFacadeModel()
* @generated
*/
EReference getFacadeModel_FeatureMappingDefaults();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.ImportDirective <em>Import Directive</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Import Directive</em>'.
* @see org.eclipse.gmt.emfacade.ImportDirective
* @generated
*/
EClass getImportDirective();
/**
* Returns the meta object for the attribute '{@link org.eclipse.gmt.emfacade.ImportDirective#getImportedNamespace <em>Imported Namespace</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Imported Namespace</em>'.
* @see org.eclipse.gmt.emfacade.ImportDirective#getImportedNamespace()
* @see #getImportDirective()
* @generated
*/
EAttribute getImportDirective_ImportedNamespace();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.EClassifierMapping <em>EClassifier Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>EClassifier Mapping</em>'.
* @see org.eclipse.gmt.emfacade.EClassifierMapping
* @generated
*/
EClass getEClassifierMapping();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.MemberPattern <em>Member Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Member Pattern</em>'.
* @see org.eclipse.gmt.emfacade.MemberPattern
* @generated
*/
EClass getMemberPattern();
/**
* Returns the meta object for the attribute '{@link org.eclipse.gmt.emfacade.MemberPattern#getNamePattern <em>Name Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Name Pattern</em>'.
* @see org.eclipse.gmt.emfacade.MemberPattern#getNamePattern()
* @see #getMemberPattern()
* @generated
*/
EAttribute getMemberPattern_NamePattern();
/**
* Returns the meta object for the attribute '{@link org.eclipse.gmt.emfacade.MemberPattern#getTypePattern <em>Type Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Type Pattern</em>'.
* @see org.eclipse.gmt.emfacade.MemberPattern#getTypePattern()
* @see #getMemberPattern()
* @generated
*/
EAttribute getMemberPattern_TypePattern();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.MemberPattern#getParameterListPattern <em>Parameter List Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Parameter List Pattern</em>'.
* @see org.eclipse.gmt.emfacade.MemberPattern#getParameterListPattern()
* @see #getMemberPattern()
* @generated
*/
EReference getMemberPattern_ParameterListPattern();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.TypeListPattern <em>Type List Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Type List Pattern</em>'.
* @see org.eclipse.gmt.emfacade.TypeListPattern
* @generated
*/
EClass getTypeListPattern();
/**
* Returns the meta object for the attribute list '{@link org.eclipse.gmt.emfacade.TypeListPattern#getParameterTypePatterns <em>Parameter Type Patterns</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Parameter Type Patterns</em>'.
* @see org.eclipse.gmt.emfacade.TypeListPattern#getParameterTypePatterns()
* @see #getTypeListPattern()
* @generated
*/
EAttribute getTypeListPattern_ParameterTypePatterns();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategyPattern <em>Feature Mapping Strategy Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Feature Mapping Strategy Pattern</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategyPattern
* @generated
*/
EClass getFeatureMappingStrategyPattern();
/**
* Returns the meta object for the container reference '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategyPattern#getStrategy <em>Strategy</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the container reference '<em>Strategy</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategyPattern#getStrategy()
* @see #getFeatureMappingStrategyPattern()
* @generated
*/
EReference getFeatureMappingStrategyPattern_Strategy();
/**
* Returns the meta object for the attribute '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategyPattern#getFeatureName <em>Feature Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Feature Name</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategyPattern#getFeatureName()
* @see #getFeatureMappingStrategyPattern()
* @generated
*/
EAttribute getFeatureMappingStrategyPattern_FeatureName();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategyPattern#getTypeParameters <em>Type Parameters</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Type Parameters</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategyPattern#getTypeParameters()
* @see #getFeatureMappingStrategyPattern()
* @generated
*/
EReference getFeatureMappingStrategyPattern_TypeParameters();
/**
* Returns the meta object for the containment reference list '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategyPattern#getMethodPatterns <em>Method Patterns</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Method Patterns</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategyPattern#getMethodPatterns()
* @see #getFeatureMappingStrategyPattern()
* @generated
*/
EReference getFeatureMappingStrategyPattern_MethodPatterns();
/**
* Returns the meta object for class '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategyMethodPattern <em>Feature Mapping Strategy Method Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Feature Mapping Strategy Method Pattern</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategyMethodPattern
* @generated
*/
EClass getFeatureMappingStrategyMethodPattern();
/**
* Returns the meta object for the reference '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategyMethodPattern#getStrategyMethod <em>Strategy Method</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Strategy Method</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategyMethodPattern#getStrategyMethod()
* @see #getFeatureMappingStrategyMethodPattern()
* @generated
*/
EReference getFeatureMappingStrategyMethodPattern_StrategyMethod();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategyMethodPattern#getTargetMember <em>Target Member</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Target Member</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategyMethodPattern#getTargetMember()
* @see #getFeatureMappingStrategyMethodPattern()
* @generated
*/
EReference getFeatureMappingStrategyMethodPattern_TargetMember();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.gmt.emfacade.FeatureMappingStrategyMethodPattern#getTargetBody <em>Target Body</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Target Body</em>'.
* @see org.eclipse.gmt.emfacade.FeatureMappingStrategyMethodPattern#getTargetBody()
* @see #getFeatureMappingStrategyMethodPattern()
* @generated
*/
EReference getFeatureMappingStrategyMethodPattern_TargetBody();
/**
* Returns the meta object for data type '{@link org.eclipse.gmt.emfacade.util.EmfacadeJvmInferrerHelper <em>Jvm Inferrer Helper</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for data type '<em>Jvm Inferrer Helper</em>'.
* @see org.eclipse.gmt.emfacade.util.EmfacadeJvmInferrerHelper
* @model instanceClass="org.eclipse.gmt.emfacade.util.EmfacadeJvmInferrerHelper"
* @generated
*/
EDataType getEmfacadeJvmInferrerHelper();
/**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/
EmfacadeFactory getEmfacadeFactory();
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @generated
*/
interface Literals {
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.DefaultNameImpl <em>Default Name</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.DefaultNameImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getDefaultName()
* @generated
*/
EClass DEFAULT_NAME = eINSTANCE.getDefaultName();
/**
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute DEFAULT_NAME__NAME = eINSTANCE.getDefaultName_Name();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.InterfaceImplementationImpl <em>Interface Implementation</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.InterfaceImplementationImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getInterfaceImplementation()
* @generated
*/
EClass INTERFACE_IMPLEMENTATION = eINSTANCE.getInterfaceImplementation();
/**
* The meta object literal for the '<em><b>Method Implementations</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference INTERFACE_IMPLEMENTATION__METHOD_IMPLEMENTATIONS = eINSTANCE.getInterfaceImplementation_MethodImplementations();
/**
* The meta object literal for the '<em><b>Inferred Interface Type</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference INTERFACE_IMPLEMENTATION__INFERRED_INTERFACE_TYPE = eINSTANCE.getInterfaceImplementation_InferredInterfaceType();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.InterfaceMethodImplementationImpl <em>Interface Method Implementation</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.InterfaceMethodImplementationImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getInterfaceMethodImplementation()
* @generated
*/
EClass INTERFACE_METHOD_IMPLEMENTATION = eINSTANCE.getInterfaceMethodImplementation();
/**
* The meta object literal for the '<em><b>Interface Implementation</b></em>' container reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference INTERFACE_METHOD_IMPLEMENTATION__INTERFACE_IMPLEMENTATION = eINSTANCE.getInterfaceMethodImplementation_InterfaceImplementation();
/**
* The meta object literal for the '<em><b>Interface Method</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference INTERFACE_METHOD_IMPLEMENTATION__INTERFACE_METHOD = eINSTANCE.getInterfaceMethodImplementation_InterfaceMethod();
/**
* The meta object literal for the '<em><b>Method Body</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference INTERFACE_METHOD_IMPLEMENTATION__METHOD_BODY = eINSTANCE.getInterfaceMethodImplementation_MethodBody();
/**
* The meta object literal for the '<em><b>Inferred Method Body</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference INTERFACE_METHOD_IMPLEMENTATION__INFERRED_METHOD_BODY = eINSTANCE.getInterfaceMethodImplementation_InferredMethodBody();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.EClassMappingImpl <em>EClass Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EClassMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEClassMapping()
* @generated
*/
EClass ECLASS_MAPPING = eINSTANCE.getEClassMapping();
/**
* The meta object literal for the '<em><b>EClass</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ECLASS_MAPPING__ECLASS = eINSTANCE.getEClassMapping_EClass();
/**
* The meta object literal for the '<em><b>JClass</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ECLASS_MAPPING__JCLASS = eINSTANCE.getEClassMapping_JClass();
/**
* The meta object literal for the '<em><b>Create Expression</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ECLASS_MAPPING__CREATE_EXPRESSION = eINSTANCE.getEClassMapping_CreateExpression();
/**
* The meta object literal for the '<em><b>Life Cycle Handler</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ECLASS_MAPPING__LIFE_CYCLE_HANDLER = eINSTANCE.getEClassMapping_LifeCycleHandler();
/**
* The meta object literal for the '<em><b>Dispose Expression</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ECLASS_MAPPING__DISPOSE_EXPRESSION = eINSTANCE.getEClassMapping_DisposeExpression();
/**
* The meta object literal for the '<em><b>Feature Mappings</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ECLASS_MAPPING__FEATURE_MAPPINGS = eINSTANCE.getEClassMapping_FeatureMappings();
/**
* The meta object literal for the '<em><b>Feature Mapping Defaults</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ECLASS_MAPPING__FEATURE_MAPPING_DEFAULTS = eINSTANCE.getEClassMapping_FeatureMappingDefaults();
/**
* The meta object literal for the '<em><b>Event Handlers</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ECLASS_MAPPING__EVENT_HANDLERS = eINSTANCE.getEClassMapping_EventHandlers();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.LifeCycleImplementationImpl <em>Life Cycle Implementation</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.LifeCycleImplementationImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getLifeCycleImplementation()
* @generated
*/
EClass LIFE_CYCLE_IMPLEMENTATION = eINSTANCE.getLifeCycleImplementation();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.EventHandlerImpl <em>Event Handler</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EventHandlerImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEventHandler()
* @generated
*/
EClass EVENT_HANDLER = eINSTANCE.getEventHandler();
/**
* The meta object literal for the '<em><b>Interface Type</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EVENT_HANDLER__INTERFACE_TYPE = eINSTANCE.getEventHandler_InterfaceType();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.EFeatureMappingImpl <em>EFeature Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EFeatureMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEFeatureMapping()
* @generated
*/
EClass EFEATURE_MAPPING = eINSTANCE.getEFeatureMapping();
/**
* The meta object literal for the '<em><b>EClass Mapping</b></em>' container reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EFEATURE_MAPPING__ECLASS_MAPPING = eINSTANCE.getEFeatureMapping_EClassMapping();
/**
* The meta object literal for the '<em><b>Options</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EFEATURE_MAPPING__OPTIONS = eINSTANCE.getEFeatureMapping_Options();
/**
* The meta object literal for the '<em><b>EFeature</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EFEATURE_MAPPING__EFEATURE = eINSTANCE.getEFeatureMapping_EFeature();
/**
* The meta object literal for the '<em><b>JClass</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EFEATURE_MAPPING__JCLASS = eINSTANCE.getEFeatureMapping_JClass();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.EFeatureMappingOptionsImpl <em>EFeature Mapping Options</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EFeatureMappingOptionsImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEFeatureMappingOptions()
* @generated
*/
EClass EFEATURE_MAPPING_OPTIONS = eINSTANCE.getEFeatureMappingOptions();
/**
* The meta object literal for the '<em><b>Strategy</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EFEATURE_MAPPING_OPTIONS__STRATEGY = eINSTANCE.getEFeatureMappingOptions_Strategy();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.EEnumMappingImpl <em>EEnum Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EEnumMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEEnumMapping()
* @generated
*/
EClass EENUM_MAPPING = eINSTANCE.getEEnumMapping();
/**
* The meta object literal for the '<em><b>Literal Mappings</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EENUM_MAPPING__LITERAL_MAPPINGS = eINSTANCE.getEEnumMapping_LiteralMappings();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.EEnumLiteralMappingImpl <em>EEnum Literal Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EEnumLiteralMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEEnumLiteralMapping()
* @generated
*/
EClass EENUM_LITERAL_MAPPING = eINSTANCE.getEEnumLiteralMapping();
/**
* The meta object literal for the '<em><b>Enum Literal</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EENUM_LITERAL_MAPPING__ENUM_LITERAL = eINSTANCE.getEEnumLiteralMapping_EnumLiteral();
/**
* The meta object literal for the '<em><b>Convert Expression</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EENUM_LITERAL_MAPPING__CONVERT_EXPRESSION = eINSTANCE.getEEnumLiteralMapping_ConvertExpression();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.EDataTypeMappingImpl <em>EData Type Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EDataTypeMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEDataTypeMapping()
* @generated
*/
EClass EDATA_TYPE_MAPPING = eINSTANCE.getEDataTypeMapping();
/**
* The meta object literal for the '<em><b>EData Type</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EDATA_TYPE_MAPPING__EDATA_TYPE = eINSTANCE.getEDataTypeMapping_EDataType();
/**
* The meta object literal for the '<em><b>JClass</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EDATA_TYPE_MAPPING__JCLASS = eINSTANCE.getEDataTypeMapping_JClass();
/**
* The meta object literal for the '<em><b>Convert Expression</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference EDATA_TYPE_MAPPING__CONVERT_EXPRESSION = eINSTANCE.getEDataTypeMapping_ConvertExpression();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyImpl <em>Feature Mapping Strategy</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getFeatureMappingStrategy()
* @generated
*/
EClass FEATURE_MAPPING_STRATEGY = eINSTANCE.getFeatureMappingStrategy();
/**
* The meta object literal for the '<em><b>Impl Type</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FEATURE_MAPPING_STRATEGY__IMPL_TYPE = eINSTANCE.getFeatureMappingStrategy_ImplType();
/**
* The meta object literal for the '<em><b>Interface Type</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FEATURE_MAPPING_STRATEGY__INTERFACE_TYPE = eINSTANCE.getFeatureMappingStrategy_InterfaceType();
/**
* The meta object literal for the '<em><b>Patterns</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FEATURE_MAPPING_STRATEGY__PATTERNS = eINSTANCE.getFeatureMappingStrategy_Patterns();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.NameTypePatternFMSImpl <em>Name Type Pattern FMS</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.NameTypePatternFMSImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getNameTypePatternFMS()
* @generated
*/
EClass NAME_TYPE_PATTERN_FMS = eINSTANCE.getNameTypePatternFMS();
/**
* The meta object literal for the '<em><b>Pattern</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference NAME_TYPE_PATTERN_FMS__PATTERN = eINSTANCE.getNameTypePatternFMS_Pattern();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.NameTypePatternImpl <em>Name Type Pattern</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.NameTypePatternImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getNameTypePattern()
* @generated
*/
EClass NAME_TYPE_PATTERN = eINSTANCE.getNameTypePattern();
/**
* The meta object literal for the '<em><b>Member Patterns</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference NAME_TYPE_PATTERN__MEMBER_PATTERNS = eINSTANCE.getNameTypePattern_MemberPatterns();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.FacadeModelImpl <em>Facade Model</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.FacadeModelImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getFacadeModel()
* @generated
*/
EClass FACADE_MODEL = eINSTANCE.getFacadeModel();
/**
* The meta object literal for the '<em><b>Gen Model</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FACADE_MODEL__GEN_MODEL = eINSTANCE.getFacadeModel_GenModel();
/**
* The meta object literal for the '<em><b>Uses Facade Models</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FACADE_MODEL__USES_FACADE_MODELS = eINSTANCE.getFacadeModel_UsesFacadeModels();
/**
* The meta object literal for the '<em><b>Feature Mapping Strategies</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FACADE_MODEL__FEATURE_MAPPING_STRATEGIES = eINSTANCE.getFacadeModel_FeatureMappingStrategies();
/**
* The meta object literal for the '<em><b>Base Package</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute FACADE_MODEL__BASE_PACKAGE = eINSTANCE.getFacadeModel_BasePackage();
/**
* The meta object literal for the '<em><b>EPackages</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FACADE_MODEL__EPACKAGES = eINSTANCE.getFacadeModel_EPackages();
/**
* The meta object literal for the '<em><b>Classifier Mappings</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FACADE_MODEL__CLASSIFIER_MAPPINGS = eINSTANCE.getFacadeModel_ClassifierMappings();
/**
* The meta object literal for the '<em><b>Imports</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FACADE_MODEL__IMPORTS = eINSTANCE.getFacadeModel_Imports();
/**
* The meta object literal for the '<em><b>Feature Mapping Defaults</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FACADE_MODEL__FEATURE_MAPPING_DEFAULTS = eINSTANCE.getFacadeModel_FeatureMappingDefaults();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.ImportDirectiveImpl <em>Import Directive</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.ImportDirectiveImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getImportDirective()
* @generated
*/
EClass IMPORT_DIRECTIVE = eINSTANCE.getImportDirective();
/**
* The meta object literal for the '<em><b>Imported Namespace</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute IMPORT_DIRECTIVE__IMPORTED_NAMESPACE = eINSTANCE.getImportDirective_ImportedNamespace();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.EClassifierMappingImpl <em>EClassifier Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.EClassifierMappingImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEClassifierMapping()
* @generated
*/
EClass ECLASSIFIER_MAPPING = eINSTANCE.getEClassifierMapping();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.MemberPatternImpl <em>Member Pattern</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.MemberPatternImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getMemberPattern()
* @generated
*/
EClass MEMBER_PATTERN = eINSTANCE.getMemberPattern();
/**
* The meta object literal for the '<em><b>Name Pattern</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute MEMBER_PATTERN__NAME_PATTERN = eINSTANCE.getMemberPattern_NamePattern();
/**
* The meta object literal for the '<em><b>Type Pattern</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute MEMBER_PATTERN__TYPE_PATTERN = eINSTANCE.getMemberPattern_TypePattern();
/**
* The meta object literal for the '<em><b>Parameter List Pattern</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference MEMBER_PATTERN__PARAMETER_LIST_PATTERN = eINSTANCE.getMemberPattern_ParameterListPattern();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.TypeListPatternImpl <em>Type List Pattern</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.TypeListPatternImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getTypeListPattern()
* @generated
*/
EClass TYPE_LIST_PATTERN = eINSTANCE.getTypeListPattern();
/**
* The meta object literal for the '<em><b>Parameter Type Patterns</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute TYPE_LIST_PATTERN__PARAMETER_TYPE_PATTERNS = eINSTANCE.getTypeListPattern_ParameterTypePatterns();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyPatternImpl <em>Feature Mapping Strategy Pattern</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyPatternImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getFeatureMappingStrategyPattern()
* @generated
*/
EClass FEATURE_MAPPING_STRATEGY_PATTERN = eINSTANCE.getFeatureMappingStrategyPattern();
/**
* The meta object literal for the '<em><b>Strategy</b></em>' container reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FEATURE_MAPPING_STRATEGY_PATTERN__STRATEGY = eINSTANCE.getFeatureMappingStrategyPattern_Strategy();
/**
* The meta object literal for the '<em><b>Feature Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute FEATURE_MAPPING_STRATEGY_PATTERN__FEATURE_NAME = eINSTANCE.getFeatureMappingStrategyPattern_FeatureName();
/**
* The meta object literal for the '<em><b>Type Parameters</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FEATURE_MAPPING_STRATEGY_PATTERN__TYPE_PARAMETERS = eINSTANCE.getFeatureMappingStrategyPattern_TypeParameters();
/**
* The meta object literal for the '<em><b>Method Patterns</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FEATURE_MAPPING_STRATEGY_PATTERN__METHOD_PATTERNS = eINSTANCE.getFeatureMappingStrategyPattern_MethodPatterns();
/**
* The meta object literal for the '{@link org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyMethodPatternImpl <em>Feature Mapping Strategy Method Pattern</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.impl.FeatureMappingStrategyMethodPatternImpl
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getFeatureMappingStrategyMethodPattern()
* @generated
*/
EClass FEATURE_MAPPING_STRATEGY_METHOD_PATTERN = eINSTANCE.getFeatureMappingStrategyMethodPattern();
/**
* The meta object literal for the '<em><b>Strategy Method</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FEATURE_MAPPING_STRATEGY_METHOD_PATTERN__STRATEGY_METHOD = eINSTANCE.getFeatureMappingStrategyMethodPattern_StrategyMethod();
/**
* The meta object literal for the '<em><b>Target Member</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FEATURE_MAPPING_STRATEGY_METHOD_PATTERN__TARGET_MEMBER = eINSTANCE.getFeatureMappingStrategyMethodPattern_TargetMember();
/**
* The meta object literal for the '<em><b>Target Body</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference FEATURE_MAPPING_STRATEGY_METHOD_PATTERN__TARGET_BODY = eINSTANCE.getFeatureMappingStrategyMethodPattern_TargetBody();
/**
* The meta object literal for the '<em>Jvm Inferrer Helper</em>' data type.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.gmt.emfacade.util.EmfacadeJvmInferrerHelper
* @see org.eclipse.gmt.emfacade.impl.EmfacadePackageImpl#getEmfacadeJvmInferrerHelper()
* @generated
*/
EDataType EMFACADE_JVM_INFERRER_HELPER = eINSTANCE.getEmfacadeJvmInferrerHelper();
}
} //EmfacadePackage
| [
"hal@idi.ntnu.no"
] | hal@idi.ntnu.no |
80ef45a93ca7db99fde787e189cf926fede58806 | bd466c17f668d6165e8f104ea12aa8ec93aa5c19 | /src/main/java/net/lynchTech/HAD/Doctor.java | 968f2baead3224a167c7222324bbc3a02edd093c | [] | no_license | jimzqw/Health-artificial-data | 0db116a9c6f663340f092bd6cc34067424af215e | 717454ee357d584415d52f00063c7702415cae3c | refs/heads/master | 2020-03-18T02:11:51.083225 | 2018-05-20T19:26:47 | 2018-05-20T19:26:47 | 134,179,196 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,380 | java | package net.lynchTech.HAD;
import java.util.Arrays;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Random;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
public class Doctor
{
//hello Jim mmmm
private String Doc_Firstname;
private String Doc_Lastname;
private Sheet first_Sheet;
private Sheet last_Sheet;
private static int visit_Start_Year = 2010; // ******************
private static int visit_End_Year = 2016; // *******************
public static int randBetween(int start, int end)
{
return start + (int) Math.round(Math.random() * (end - start));
}
public static String randomDate()
{
GregorianCalendar gc = new GregorianCalendar();
int year = randBetween(visit_Start_Year, visit_End_Year);
gc.set(Calendar.YEAR, year);
int dayOfYear = randBetween(1, gc.getActualMaximum(Calendar.DAY_OF_YEAR));
gc.set(Calendar.DAY_OF_YEAR, dayOfYear);
String date = gc.get(Calendar.YEAR) + "-"
+ String.format("%1$02d", (gc.get(Calendar.MONTH) + 1)) + "-"
+ String.format("%1$02d", gc.get(Calendar.DAY_OF_MONTH));
return date;
}
public String[] getDates() // Could specify how many times default = 5
{
String[] dates;
Random r = new Random();
int times = r.nextInt(5) + 1;
dates = new String[times];
for (int i = 0; i < times; i++)
{
String date = randomDate();
dates[i] = date;
}
Arrays.sort(dates);
return dates;
}
public Doctor(Sheet first, Sheet last)
{
this.first_Sheet = first;
this.last_Sheet = last;
}
public String getFirstname()
{
int row_num = this.first_Sheet.getLastRowNum();
Random random = new Random();
int select = random.nextInt(row_num) + 1;
Row DocFirst_Row = this.first_Sheet.getRow(select);
Cell DocFirst_Cell = DocFirst_Row.getCell(0);
Doc_Firstname = DocFirst_Cell.toString();
return Doc_Firstname;
}
public String getLastname()
{
int row_num = this.last_Sheet.getLastRowNum();
Random random = new Random();
int select = random.nextInt(row_num) + 1;
Row DocLast_Row = this.last_Sheet.getRow(select);
Cell DocLast_Cell = DocLast_Row.getCell(0);
Doc_Lastname = DocLast_Cell.toString();
return Doc_Lastname;
}
}
| [
"noreply@github.com"
] | jimzqw.noreply@github.com |
121d5adf9c42547723077854e9c9c2553a03f3d2 | 42225595b09e50912757074f8fbd05b8359fc9e0 | /src/main/java/com/iworkcloud/utils/GetMessageCode.java | 9906dade2dad0c04b700d95fc005878fab4c7fb7 | [] | no_license | guanbiaoHuang/iworkcloud | 1fe514ac804511d5a7dcfd382bcf299dc284b6f8 | dfd12f84ddfba39e6f2aa747d1c46ff8b3f4df9b | refs/heads/master | 2022-12-23T16:16:25.730278 | 2019-07-27T07:14:38 | 2019-07-27T07:14:38 | 196,934,481 | 0 | 0 | null | 2022-12-16T10:32:06 | 2019-07-15T06:05:52 | Java | UTF-8 | Java | false | false | 4,380 | java | package com.iworkcloud.utils;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.json.JSONObject;
/**
* <p>Title: GetMessageCode</p>
* <p>Description: </p>
*
* @author zhoumeng
* @date 2018年4月19日
*/
public class GetMessageCode {
private static final String QUERY_PATH = "https://api.miaodiyun.com/20150822/industrySMS/sendSMS";
private static final String ACCOUNT_SID = "c680ef439ce3400e8485e11f335014fe";
private static final String AUTH_TOKEN = "b7ba9884f1844df8944d970f1face347";
//根据相应的手机号发送验证码
public static String getCode(String phone) {
String rod = smsCode();
String timestamp = getTimestamp();
String sig = getMD5(ACCOUNT_SID, AUTH_TOKEN, timestamp);
String tamp = "【软酷网络】登录验证码:" + rod + ",如非本人操作,请忽略此短信。";
OutputStreamWriter out = null;
BufferedReader br = null;
StringBuilder result = new StringBuilder();
try {
URL url = new URL(QUERY_PATH);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setDoInput(true);//设置是否允许数据写入
connection.setDoOutput(true);//设置是否允许参数数据输出
connection.setConnectTimeout(5000);//设置链接响应时间
connection.setReadTimeout(10000);//设置参数读取时间
connection.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
//提交请求
out = new OutputStreamWriter(connection.getOutputStream(), StandardCharsets.UTF_8);
String args = getQueryArgs(ACCOUNT_SID, tamp, phone, timestamp, sig, "JSON");
out.write(args);
out.flush();
//读取返回参数
br = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8));
String temp = "";
while ((temp = br.readLine()) != null) {
result.append(temp);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
JSONObject json = new JSONObject(result.toString());
String respCode = json.getString("respCode");
String defaultRespCode = "00000";
if (defaultRespCode.equals(respCode)) {
return rod;
} else {
return defaultRespCode;
}
}
//定义一个请求参数拼接方法
public static String getQueryArgs(String accountSid, String smsContent, String to, String timestamp, String sig, String respDataType) {
return "accountSid=" + accountSid + "&smsContent=" + smsContent + "&to=" + to + "×tamp=" + timestamp + "&sig=" + sig + "&respDataType=" + respDataType;
}
//获取时间戳
public static String getTimestamp() {
return new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
}
//sing签名
public static String getMD5(String sid, String token, String timestamp) {
StringBuilder result = new StringBuilder();
String source = sid + token + timestamp;
//获取某个类的实例
try {
MessageDigest digest = MessageDigest.getInstance("MD5");
//要进行加密的东西
byte[] bytes = digest.digest(source.getBytes());
for (byte b : bytes) {
String hex = Integer.toHexString(b & 0xff);
if (hex.length() == 1) {
result.append("0" + hex);
} else {
result.append(hex);
}
}
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result.toString();
}
//创建验证码
public static String smsCode() {
String random = (int) ((Math.random() * 9 + 1) * 100000) + "";
return random;
}
}
| [
"820245630@qq.com"
] | 820245630@qq.com |
406938af23a42597ab53f5e1493e483ba9f696cb | d9d7bf3d0dca265c853cb58c251ecae8390135e0 | /gcld/src/com/reign/gcld/slave/service/ISlaveService.java | cfdf81eef37fe1bfcb642f966f89de1907ba047b | [] | no_license | Crasader/workspace | 4da6bd746a3ae991a5f2457afbc44586689aa9d0 | 28e26c065a66b480e5e3b966be4871b44981b3d8 | refs/heads/master | 2020-05-04T21:08:49.911571 | 2018-11-19T08:14:27 | 2018-11-19T08:14:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 973 | java | package com.reign.gcld.slave.service;
import com.reign.gcld.player.dto.*;
import com.reign.gcld.slave.domain.*;
public interface ISlaveService
{
byte[] getSlaveInfo(final PlayerDto p0);
byte[] lash(final PlayerDto p0, final int p1);
byte[] makeCell(final PlayerDto p0);
byte[] escape(final PlayerDto p0, final int p1);
byte[] viewMaster(final PlayerDto p0, final int p1);
byte[] freedom(final PlayerDto p0, final int p1);
byte[] updateLimbo(final PlayerDto p0);
byte[] updateLashLv(final int p0);
boolean dealSlave(final String p0);
void escapeJob(final String p0);
void resetSlaveSystem(final int p0);
boolean haveLimboPic(final int p0, final int p1);
void addLimboPic(final int p0, final int p1, final int p2);
void addPoint(final Slaveholder p0);
byte[] useInTaril(final PlayerDto p0);
byte[] getTrailGold(final PlayerDto p0);
}
| [
"359569198@qq.com"
] | 359569198@qq.com |
30a41331274da687e597130e7de45d5cc8413f0b | 8ae5724181c622b509e8456fe243dab3a840552c | /app/src/main/java/indexfragment/WashServiceIntroduce.java | 8a541729fd45e31b8caa396b1355e3eae1c16a51 | [] | no_license | youareapig/MyProject | b933aee74b91408fb68b0dbcb8f42de12bfbd650 | f0800c32b1564eac1060dc1f9027db7290f25642 | refs/heads/master | 2021-01-12T16:24:41.023858 | 2017-01-06T01:21:18 | 2017-01-06T01:21:18 | 71,990,504 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,228 | java | package indexfragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.myproject.R;
import myview.WashStep;
/**
* Created by Administrator on 2016/11/2 0002.
*/
public class WashServiceIntroduce extends Fragment {
private WashStep step1, step2, step3;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.washservice_introduce, container, false);
step1 = (WashStep) view.findViewById(R.id.step1);
step2 = (WashStep) view.findViewById(R.id.step2);
step3 = (WashStep) view.findViewById(R.id.step3);
step1.setTextView("步骤1:洗车洗车洗车洗车洗车");
step1.setImageView(R.mipmap.washstep);
step2.setTextView("步骤1:洗车洗车洗车洗车洗车");
step2.setImageView(R.mipmap.washstep);
step3.setTextView("步骤1:洗车洗车洗车洗车洗车");
step3.setImageView(R.mipmap.washstep);
return view;
}
}
| [
"840855165@qq.com"
] | 840855165@qq.com |
123d253fcf14a0baa86b0daf2d74c23aeb21dafc | 0a69a3c6f5cfb236ee09b7b8adacebb349a2cb9a | /src/main/java/controle/RecomendadorCursos.java | 12067b66684de34ff72cba632a6f9833414f253a | [] | no_license | thiagorainmaker/mahout_toy | 44b4bd7d54099ec0d2c3f2e32e07a04e00dacf84 | ed6af9fe6f9c3206d318749a5312e5dc066e1862 | refs/heads/master | 2020-04-01T18:56:12.003324 | 2018-10-17T22:13:09 | 2018-10-17T22:13:09 | 153,524,542 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,117 | java | package controle;
import java.io.File;
import java.io.IOException;
import java.util.List;
import org.apache.mahout.cf.taste.common.TasteException;
import org.apache.mahout.cf.taste.impl.model.file.FileDataModel;
import org.apache.mahout.cf.taste.impl.neighborhood.ThresholdUserNeighborhood;
import org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender;
import org.apache.mahout.cf.taste.impl.similarity.PearsonCorrelationSimilarity;
import org.apache.mahout.cf.taste.model.DataModel;
import org.apache.mahout.cf.taste.neighborhood.UserNeighborhood;
import org.apache.mahout.cf.taste.recommender.RecommendedItem;
import org.apache.mahout.cf.taste.recommender.UserBasedRecommender;
import org.apache.mahout.cf.taste.similarity.UserSimilarity;
public class RecomendadorCursos {
private DataModel model;
private String path;
private UserBasedRecommender recommender;
private Recomendador rec;
public DataModel getModel() {
return model;
}
public void setModel(DataModel model) {
this.model = model;
}
public DataModel createDataModel(String path) {
try {
this.model = new FileDataModel(new File(path));
} catch (IOException e) {
e.printStackTrace();
}
return model;
}
public Double avalia(Double avaliacao, Double teste) {
Avaliador a = new Avaliador();
a.setPercentualAvaliacao(avaliacao); //0.9
a.setPercentualTeste(teste); //1.0
return a.avaliador(path, rec);
}
public List<RecommendedItem> recomenda(String path, Integer user, Integer quantidade) {
this.path = path;
List<RecommendedItem> recommendations = null;
rec = new Recomendador();
try {
DataModel model = this.createDataModel(path);
UserSimilarity similarity = new PearsonCorrelationSimilarity(model);
UserNeighborhood neighborhood = new ThresholdUserNeighborhood(0.1, similarity, model);
recommender = rec.buildRecommender(model);//new GenericUserBasedRecommender(model, neighborhood, similarity);
recommendations = recommender.recommend(user, quantidade);
} catch (TasteException e) {
e.printStackTrace();
}
return recommendations;
}
}
| [
"thiago.sousa@ifg.edu.br"
] | thiago.sousa@ifg.edu.br |
de9ce11e23572d27c87c07aa8c7b608200a695b9 | c41b0b7329b306daa16181ec614f37ff154bb9af | /BankEclipse/src/util/DateConverter.java | b0d9b60403cfe66e9ecd680daa3abb98a3ae4976 | [] | no_license | MathieuTraparic/Projet-Appli-banque | 8d5baa6e5400f9f08a71b824c0b58eeb5838e063 | ff579eb6dac16856183f4bb827cd9990f4028071 | refs/heads/master | 2021-01-18T17:27:14.483257 | 2017-05-12T14:59:53 | 2017-05-12T14:59:53 | 86,802,369 | 1 | 1 | null | 2017-04-08T08:48:21 | 2017-03-31T09:29:13 | CSS | UTF-8 | Java | false | false | 636 | java | /*
* Author: Sylvain Labasse / AtelierFX
*/
package util;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;
public class DateConverter {
/**Converting localdate to date
* @param local date
* @return date
*/
public static Date LocalDate2Date(LocalDate local) {
return Date.from(local.atStartOfDay(ZoneId.systemDefault()).toInstant());
}
/**Converting date to localdate
* @param date
* @return local date
*/
public static LocalDate DateToLocalDate(Date date) {
return Instant.ofEpochMilli(date.getTime()).atZone(ZoneId.systemDefault()).toLocalDate();
}
}
| [
"lucien.bouletroblin@gmail.com"
] | lucien.bouletroblin@gmail.com |
2a854d4b0ee13b0adc199bda7d10b644de26c176 | e2ebdf712ca617b399b60eefd304c084bcdfc18f | /Application Swing B/Application Swing/src/gestionGraph/DeleteVertexMenuItem.java | a3e0a320156ae8f734bb701931ffa2d155e691b5 | [] | no_license | Fabiocosta10/3iL-Interfaces-graphiques-et-3D-TP | 6319ed011d7c3a17cdff4dc30c8330bdaffa6856 | 79e77f835b2ee28642611ed35ad4126129098af8 | refs/heads/main | 2023-08-06T04:56:54.108658 | 2021-09-27T16:27:37 | 2021-09-27T16:27:37 | 409,184,368 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,472 | java | /*
* DeleteVertexMenuItem.java
*
* Created on March 21, 2007, 2:03 PM; Updated May 29, 2007
*
* Copyright March 21, 2007 Grotto Networking
*
*/
package gestionGraph;
import edu.uci.ics.jung.visualization.VisualizationViewer;
import edu.uci.ics.jung.visualization.picking.PickedState;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JMenuItem;
/**
* A class to implement the deletion of a vertex from within a
* PopupVertexEdgeMenuMousePlugin.
*
* @author Dr. Greg M. Bernstein
*/
public class DeleteVertexMenuItem<V> extends JMenuItem implements VertexMenuListener<V> {
private V vertex;
private VisualizationViewer visComp;
/** Creates a new instance of DeleteVertexMenuItem */
public DeleteVertexMenuItem() {
super("Delete Vertex");
this.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
visComp.getPickedVertexState().pick(vertex, false);
visComp.getGraphLayout().getGraph().removeVertex(vertex);
visComp.repaint();
}
});
}
/**
* Implements the VertexMenuListener interface.
*
* @param v
* @param visComp
*/
public void setVertexAndView(V v, VisualizationViewer visComp) {
this.vertex = v;
this.visComp = visComp;
this.setText("Supprimer le noeud " + v.toString().replaceAll("�", ""));
}
}
| [
"charlenenguenkep20@gmail.com"
] | charlenenguenkep20@gmail.com |
b1d7b2409cca7eb727482a1fd9d55afbbd3f054d | 8804bd93d6c144f28289cc176f370842e3c64928 | /src/cn/hybj/web/form/HybjOutlineForm.java | f600245ed1ffe6b3c9bf39cd295f798bb6c01e6b | [] | no_license | AlexFuLei87/hybj | 0f6b033ea89bf127fc749ad09bc905b0e8871cb1 | 5609bdd3bdda6f97b1bddfa2ec2f9cbae8f2733d | refs/heads/master | 2021-05-13T19:18:27.307176 | 2019-10-09T13:27:22 | 2019-10-09T13:27:22 | 116,889,836 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 988 | java | package cn.hybj.web.form;
@SuppressWarnings("serial")
public class HybjOutlineForm implements java.io.Serializable {
private String id;
private String outlineName;
private String outline;
private String details;
private String status;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getOutlineName() {
return outlineName;
}
public void setOutlineName(String outlineName) {
this.outlineName = outlineName;
}
public String getOutline() {
return outline;
}
public void setOutline(String outline) {
this.outline = outline;
}
public String getDetails() {
return details;
}
public void setDetails(String details) {
this.details = details;
}
}
| [
"776588214@qq.com"
] | 776588214@qq.com |
6e5bfc1913fd185e77a35a54afcda9e16637e486 | 31d2da327ac187e863df499cf328e88bd2fe2766 | /src/main/java/com/aaronmartin/fp_record_keeper/repo/ParentRepository.java | d56be4f094fe7903ae8c9b24dd4d3b55ae45b5d3 | [] | no_license | aaron-martin/fp_record_keeper | fd88d93b7b9704e0add7126d293240c028afe9aa | eff98c56964e99a6a4e338ecc86db9917566907c | refs/heads/main | 2023-04-14T00:38:15.121410 | 2021-04-15T01:11:05 | 2021-04-15T01:11:05 | 356,951,951 | 0 | 0 | null | 2021-04-15T01:11:05 | 2021-04-11T18:48:52 | Java | UTF-8 | Java | false | false | 245 | java | package com.aaronmartin.fp_record_keeper.repo;
import org.springframework.data.jpa.repository.JpaRepository;
import com.aaronmartin.fp_record_keeper.entity.Parent;
public interface ParentRepository extends JpaRepository<Parent, Integer> {
}
| [
"Aaron@Aarons-MBP.woodhulltel.com"
] | Aaron@Aarons-MBP.woodhulltel.com |
09a8439764d67cbf994f86b4ab78a6c004fc66e0 | 6482753b5eb6357e7fe70e3057195e91682db323 | /io/netty/util/internal/shaded/org/jctools/queues/BaseLinkedQueuePad0.java | bc533c2cbb671fd3663e908ad1ac133ee2fd2502 | [] | no_license | TheShermanTanker/Server-1.16.3 | 45cf9996afa4cd4d8963f8fd0588ae4ee9dca93c | 48cc08cb94c3094ebddb6ccfb4ea25538492bebf | refs/heads/master | 2022-12-19T02:20:01.786819 | 2020-09-18T21:29:40 | 2020-09-18T21:29:40 | 296,730,962 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 403 | java | package io.netty.util.internal.shaded.org.jctools.queues;
import java.util.AbstractQueue;
abstract class BaseLinkedQueuePad0<E> extends AbstractQueue<E> implements MessagePassingQueue<E> {
long p00;
long p01;
long p02;
long p03;
long p04;
long p05;
long p06;
long p07;
long p10;
long p11;
long p12;
long p13;
long p14;
long p15;
long p16;
}
| [
"tanksherman27@gmail.com"
] | tanksherman27@gmail.com |
9ce7adc4322315ccf2c30891197e009da1b0318d | bd863ce48659d0335fd530a507dd2a40d0ad9320 | /src/main/java/pageObjects/RetailPageObject.java | 920b01bbeef544253d3ecff469def7b101d08840 | [] | no_license | Esan2021/com.tekschool.retail | dc91e482eb1d5f4a709540a352ac614d64dc75c2 | 0fde28c7eb66813f166ef3331e91e61ac003313f | refs/heads/main | 2023-04-06T13:34:38.803727 | 2021-03-30T12:39:09 | 2021-03-30T12:39:09 | 340,512,023 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,757 | java | package pageObjects;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import core.Base;
import utilities.WebDriverUtility;
public class RetailPageObject extends Base {
public RetailPageObject() {
PageFactory.initElements(driver, this);
}
@FindBy(xpath ="(//*[@class='hidden-xs hidden-sm hidden-md'])[3]")
private WebElement clickOnMyAccount;
public void userClickOnMyAccount() {
WebDriverUtility.clickOnElement(clickOnMyAccount);
}
@FindBy(linkText ="Login")
private WebElement clickOnLogin;
public void userClickOnLogin() {
WebDriverUtility.clickOnElement(clickOnLogin);
}
@FindBy(xpath ="//*[@id='input-email']")
private WebElement emailFieled;
public void enterUserName(String email) {
WebDriverUtility.enterValue(emailField, email);
}
@FindBy(xpath ="//*[@id='input-password']")
private WebElement passwordField ;
public void enterPassword(String password) {
WebDriverUtility.enterValue(passwordField, password);
}
@FindBy(xpath ="(//*[@class='btn btn-primary'])[2]")
private WebElement loginButton;
public void userClickOnLoginButton() {
WebDriverUtility.clickOnElement(loginButton);
}
@FindBy(id = "//*[@id = 'common-success']")
private WebElement accountDashBoard;
public boolean isDashBoardDisplayed() {
if(accountDashBoard.isDisplayed())
return true;
else
return false;
}
@FindBy(xpath ="//*[contains(text(), 'Register for an affiliate account')]")
private WebElement registerForAnAffiliateAccountLink;
public void clickOnAffiliateLink() {
WebDriverUtility.clickOnElement(registerForAnAffiliateAccountLink);
}
@FindBy(xpath ="//*[@id='input-company']")
private WebElement companyField;
public void userFillCompanyField(String companyName) {
WebDriverUtility.enterValue(companyField, companyName);
}
@FindBy(xpath ="//*[@id='input-website']")
private WebElement websiteField;
public void userFillWebsiteField(String websiteName) {
WebDriverUtility.enterValue(websiteField, websiteName);
}
@FindBy(xpath ="//*[@id='input-tax']")
private WebElement taxIDField;
public void userFillTaxIdField(String taxID) {
WebDriverUtility.enterValue(taxIDField, taxID);
}
@FindBy(xpath ="(//*[@type='radio'])[1]")
private WebElement paymentMethodField;
public void userFillpaymentField(String payment) {
WebDriverUtility.enterValue(paymentMethodField, payment);
}
@FindBy(xpath = "//*[@id='input-cheque']")
private WebElement ChequePayeeName;
public void filldChequePayeeName(String ChequePayee) {
WebDriverUtility.enterValue(ChequePayeeName, ChequePayee);
}
@FindBy(xpath ="//*[@type='checkbox']")
private WebElement checkbox;
public void userCheckOnCheckBox() {
WebDriverUtility.clickOnElement(checkbox);
}
@FindBy(xpath ="//*[@value='Continue']")
private WebElement continueButton;
public void clickOnContinueButtuon() {
WebDriverUtility.clickOnElement(continueButton);
}
@FindBy(xpath ="//*/div[@id='account-account']/div[1]")
private WebElement successMessage;
public boolean successMessageDisplayed() {
if(successMessage.isDisplayed())
return true;
else
return false;
}
@FindBy(xpath ="//*[contains(text(),'Edit your affiliate information')]")
private WebElement editYourAffiliateAccountInformation;
public void userEditAffiliateInformationLink() {
WebDriverUtility.clickOnElement(editYourAffiliateAccountInformation);
}
@FindBy(xpath ="(//*[@type='radio'])[3]")
private WebElement transferRadioButton;
public void userClickOnBankTransferRadioButton() {
WebDriverUtility.clickOnElement(transferRadioButton);
}
@FindBy(xpath ="//*[@id='input-bank-name']")
private WebElement bankNameField;
public void userFillBankNameField(String bankName) {
WebDriverUtility.enterValue(bankNameField, bankName);
}
@FindBy(xpath ="//*[@id='input-bank-branch-number']")
private WebElement abaNumberField;
public void userFillabaNumberField(String abaNum) {
WebDriverUtility.enterValue(abaNumberField, abaNum);
}
@FindBy(xpath ="//*[@id='input-bank-swift-code']")
private WebElement swiftCodeField;
public void userFillSwiftCodeField(String swiftCode) {
WebDriverUtility.enterValue(swiftCodeField, swiftCode);
}
@FindBy(xpath ="//*[@id='input-bank-account-name']")
private WebElement accountNameField;
public void userFillAccountNameField(String accountName) {
WebDriverUtility.enterValue(accountNameField, accountName);
}
@FindBy(xpath ="//*[@id='input-bank-account-number']")
private WebElement accountNumberField;
public void userFillAccountNumberField(String accountNumber) {
WebDriverUtility.enterValue(accountNumberField, accountNumber);
}
@FindBy(xpath ="//*[@class='btn btn-primary']")
private WebElement MyAffiliateAccountcontinueButton;
public void userClickOnContinueButton() {
WebDriverUtility.clickOnElement(MyAffiliateAccountcontinueButton);
}
@FindBy(xpath ="//*/div[@id='account-account']/div[1]")
private WebElement MyAffiliateAccountsuccessMessage;
public boolean userSeeSuccessMessage() {
if(MyAffiliateAccountsuccessMessage.isDisplayed())
return true;
else
return false;
}
@FindBy(xpath ="//*[@id=\"content\"]/ul[1]/li[1]/a")
private WebElement editYourAccountInformation;
public void clickOnEditAccountInformation() {
WebDriverUtility.clickOnElement(editYourAccountInformation);
}
@FindBy(xpath ="//*[@id='input-firstname']")
private WebElement firstNameField;
public void userEnterFirstNameField(String firstName) {
WebDriverUtility.enterValue(firstNameField, firstName);
}
@FindBy(xpath ="//*[@id='input-lastname']")
private WebElement lastNameField;
public void userEnterLastNameField(String lastName) {
WebDriverUtility.enterValue(lastNameField, lastName);
}
@FindBy(xpath ="//*[@id='input-email']")
private WebElement emailField;
public void userEnterEmailField(String email) {
WebDriverUtility.enterValue(emailField, email);
}
@FindBy(xpath ="//*[@id='input-telephone']")
private WebElement telephoneField;
public void userEnterTelephoneNumber(String phoneNumber) {
WebDriverUtility.enterValue(telephoneField, phoneNumber);
}
@FindBy(xpath ="//*[@type='submit']")
private WebElement editYourAccountInformationContinueButton;
public void userClickOnContinueButtonOfEditLink() {
WebDriverUtility.clickOnElement(editYourAccountInformationContinueButton);
}
@FindBy(xpath ="//*[@class='alert alert-success alert-dismissible']")
private WebElement editYourAccountInformationsuccessMessage;
public boolean editAccountSuccessMessage() {
boolean editYourAccountInfosuccessMessage = editYourAccountInformationsuccessMessage.isDisplayed();
return editYourAccountInfosuccessMessage;
}
}
| [
"esan2035@gmail.com"
] | esan2035@gmail.com |
dde7e67fa839cde07ffff30510f112760664d22a | 42ddd9f693d8071de1cdb799eba17b845434d527 | /app/src/main/java/com/gotoapps/walkin/model/Company.java | d82a10df409553c0c2cccf69debeabd9cf111d28 | [] | no_license | S-Jegan/walkin-mobile-app | b83ea1c495c407b04692676f0912948e0cf7e787 | eac49ee801462663eccbec97adb0470bed86ef42 | refs/heads/main | 2023-02-02T05:52:16.886124 | 2020-12-12T13:31:15 | 2020-12-12T13:31:15 | 320,830,864 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,378 | java | package com.gotoapps.walkin.model;
import com.google.gson.annotations.SerializedName;
public class Company {
@SerializedName("id")
private Integer id;
@SerializedName("name")
private String name;
@SerializedName("logo")
private String logo;
@SerializedName("banner")
private String banner;
@SerializedName("type")
private String companyType;
@SerializedName("city")
private String city;
@SerializedName("state")
private String state;
@SerializedName("country")
private String country;
@SerializedName("address")
private String address;
@SerializedName("pincode")
private String pincode;
@SerializedName("email")
private String email;
@SerializedName("phone")
private String phone;
@SerializedName("about_company")
private String about_company;
@SerializedName("website")
private String website;
public Company() {
}
public Company(Integer id, String name, String logo, String banner, String companyType, String city, String state, String country, String address, String pincode, String email, String phone, String about_company, String website) {
this.id = id;
this.name = name;
this.logo = logo;
this.banner = banner;
this.companyType = companyType;
this.city = city;
this.state = state;
this.country = country;
this.address = address;
this.pincode = pincode;
this.email = email;
this.phone = phone;
this.about_company = about_company;
this.website = website;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public String getBanner() {
return banner;
}
public void setBanner(String banner) {
this.banner = banner;
}
public String getCompanyType() {
return companyType;
}
public void setCompanyType(String companyType) {
this.companyType = companyType;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getPincode() {
return pincode;
}
public void setPincode(String pincode) {
this.pincode = pincode;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getAbout_company() {
return about_company;
}
public void setAbout_company(String about_company) {
this.about_company = about_company;
}
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
@Override
public String toString() {
return "Company{" +
"id=" + id +
", name='" + name + '\'' +
", logo='" + logo + '\'' +
", banner='" + banner + '\'' +
", companyType='" + companyType + '\'' +
", city='" + city + '\'' +
", state='" + state + '\'' +
", country='" + country + '\'' +
", address='" + address + '\'' +
", pincode=" + pincode +
", email='" + email + '\'' +
", phone='" + phone + '\'' +
", about_company='" + about_company + '\'' +
", website='" + website + '\'' +
'}';
}
}
| [
"jeganpandi.selvaraj@gmail.com"
] | jeganpandi.selvaraj@gmail.com |
281bf539c55ecfe539ea6687e2c33f9c1931a6ff | f06a455049b45ca0cac679d749afa50b7bfa0f8c | /src/com/mike/kulasinski/paczka/modyfikator1/sub/DefaultClassSub.java | bb69fa66df6abb2bce3f0b1f74987227a78ad980 | [] | no_license | mikeKulasinski/packageExample | c85bce08c306e11eedc57a25d6cf04a867e9aad5 | f9d3a3747f0a45d0d4299df0b4c9ae9f6098aece | refs/heads/master | 2020-04-23T15:02:14.564270 | 2019-02-18T09:16:29 | 2019-02-18T09:16:29 | 171,251,190 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 202 | java | package com.mike.kulasinski.paczka.modyfikator1.sub;
class DefaultClassSub {
public int publicWartosc;
protected int protectedWartosc;
int defaultWartosc;
private int privateWartosc;
}
| [
"mike.kulasinski@gmail.com"
] | mike.kulasinski@gmail.com |
0b77ed17123d398b9fb7fb332ca5839fa5da782c | af14ce803c40dcceef24c7295a6459f8ba47ceda | /server/src/main/java/pers/cy/geeclass/server/service/FileService.java | e82849e4ad29308b949e2238837303f075140cb3 | [] | no_license | NULL2048/geeclass | 0e9937144f7ee1b3055dcd628b263ffd79db527a | 8e8730ebaff68f04ae4f0d7ee9d91f16c2823368 | refs/heads/master | 2023-04-12T04:33:46.324148 | 2021-05-14T13:01:13 | 2021-05-14T13:01:13 | 330,361,527 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,171 | java | package pers.cy.geeclass.server.service;
import com.fasterxml.jackson.databind.util.BeanUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import pers.cy.geeclass.server.domain.File;
import pers.cy.geeclass.server.domain.FileExample;
import pers.cy.geeclass.server.dto.FileDto;
import pers.cy.geeclass.server.dto.PageDto;
import pers.cy.geeclass.server.mapper.FileMapper;
import pers.cy.geeclass.server.util.CopyUtil;
import pers.cy.geeclass.server.util.UuidUtil;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Date;
@Service
public class FileService {
@Resource
private FileMapper fileMapper;
/**
* 列表查询
* @param pageDto
*/
public void list(PageDto pageDto) {
// 查找第一页,每一页有一条数据
PageHelper.startPage(pageDto.getPage(), pageDto.getSize());
FileExample fileExample = new FileExample();
List<File> fileList = fileMapper.selectByExample(fileExample);
PageInfo pageInfo = new PageInfo<>(fileList);
pageDto.setTotal(pageInfo.getTotal());
List<FileDto> fileDtoList = new ArrayList<FileDto>();
for (int i = 0, l = fileList.size(); i < l ; i++) {
File file = fileList.get(i);
FileDto fileDto = new FileDto();
BeanUtils.copyProperties(file, fileDto);
fileDtoList.add(fileDto);
}
pageDto.setList(fileDtoList);
}
/**
* 添加课程
* 保存,id有值时更新,无值时新增
*/
public void save(FileDto fileDto) {
File file = CopyUtil.copy(fileDto, File.class);
File fileDb = selectByKey(fileDto.getKey());
if (fileDb == null) {
this.insert(file);
} else {
fileDb.setShardIndex(fileDto.getShardIndex());
this.update(fileDb);
}
}
/**
* 新增
*/
private void insert(File file) {
Date now = new Date();
file.setCreatedAt(now);
file.setUpdatedAt(now);
file.setId(UuidUtil.getShortUuid());
fileMapper.insert(file);
}
/**
* 更新
*/
private void update(File file) {
file.setUpdatedAt(new Date());
fileMapper.updateByPrimaryKey(file);
}
/**
* 删除
*/
public void delete(String id) {
fileMapper.deleteByPrimaryKey(id);
}
public File selectByKey(String key) {
FileExample example = new FileExample();
example.createCriteria().andKeyEqualTo(key);
List<File> fileList = fileMapper.selectByExample(example);
if (CollectionUtils.isEmpty(fileList)) {
return null;
} else {
return fileList.get(0);
}
}
/**
* 根据文件标识查询数据库记录
*/
public FileDto findByKey(String key) {
return CopyUtil.copy(selectByKey(key), FileDto.class);
}
}
| [
"973071263@qq.com"
] | 973071263@qq.com |
cee2bf9cf2657cfa2c3065d8a331408fddb91868 | 472d7acd20b546ebafb99e1c3e74607cab180e1a | /design_patterns/src/com/hao/designpatterns/chainfilter/Filter.java | 7c017133b875aaa1d09e4a2d72a4eee8b1a16dcf | [] | no_license | haojiahong/deeplearning | 6078007b98dd5f83a6180d0f5a8252e1341813a8 | 13c5b0a7fd81ff8c46ec41fd8c9f5fbde743897c | refs/heads/master | 2021-01-10T11:37:58.505854 | 2016-04-15T16:27:05 | 2016-04-15T16:27:05 | 55,913,584 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 168 | java | package com.hao.designpatterns.chainfilter;
public interface Filter {
/**
* 字符串过滤
* @param str
* @return
*/
public String doFilter(String str);
}
| [
"1548620258@qq.com"
] | 1548620258@qq.com |
2c294ba68d7634ae068175ada8bd00f89efbd689 | a9a16c8aff5943bc41759bcb1a14886c21916747 | /core/src/main/java/org/vertexium/path/PathFindingAlgorithm.java | 57a15412653465cdda5c2a5282c3a54b5a3e914f | [
"Apache-2.0"
] | permissive | amccurry/vertexium | 322104e657ab4866fa4ea21575de2a3dc5305b45 | d8338c420f8e6cf7f6e1d5577803df977a830aaf | refs/heads/master | 2020-12-31T03:41:07.063489 | 2015-04-22T13:04:33 | 2015-04-22T13:04:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 279 | java | package org.vertexium.path;
import org.vertexium.*;
import org.vertexium.*;
public interface PathFindingAlgorithm {
Iterable<Path> findPaths(Graph graph, Vertex sourceVertex, Vertex destVertex, int hops, ProgressCallback progressCallback, Authorizations authorizations);
}
| [
"joe@fernsroth.com"
] | joe@fernsroth.com |
6a0b8eafaa31ea7044b970be37400cb1100472d9 | 6067bbdf15ca9dadd175ce2920a5d0b97549b696 | /proyectoBase/src/main/java/com/usa/demo/InterfaceSpecialty.java | d173616be06b67f224d11d548348a47361ccbfaf | [] | no_license | penadaniel/TicRetos | 8fa937a0515d33645ea4a9ff7f2c8b12475a01fa | 25237a82e4da0252360360921253d33e8967c2cb | refs/heads/master | 2023-09-04T00:24:34.775080 | 2021-11-02T22:06:28 | 2021-11-02T22:06:28 | 423,646,397 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 381 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.usa.demo;
import org.springframework.data.repository.CrudRepository;
/**
*
* @author USER
*/
public interface InterfaceSpecialty extends CrudRepository<Specialty,Integer>{
}
| [
"dniel.rx@gmail.com"
] | dniel.rx@gmail.com |
0e60b8193c1f02a42f71e44510307428b4635fbe | 06a63cbf5a5c9404c7d6b9e24c337a26b84e542c | /MobileKeeasy/src/cn/keeasy/mobilekeeasy/zing/CaptureActivityHandler.java | d131b2c4cb25a00ac584ecfc74d6a007e19f0249 | [] | no_license | dunyuling/keeasy | 6a68a7ae41996fe97ffd6cf2740e090e8996b1b5 | 2bf1f3bc2fa57ff344d0def5a66f48c93e0edb23 | refs/heads/master | 2020-12-11T01:56:47.917202 | 2014-03-13T10:12:25 | 2014-03-13T10:12:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,818 | java | /*
* Copyright (C) 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.keeasy.mobilekeeasy.zing;
import java.util.Vector;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.Result;
import cn.keeasy.mobilekeeasy.CaptureActivity;
import cn.keeasy.mobilekeeasy.R;
/**
*
* 条码
*
* @author
*/
public final class CaptureActivityHandler extends Handler {
private static final String TAG = "CaptureActivityHandler";
private final CaptureActivity activity;
private final DecodeThread decodeThread;
private State state;
private enum State {
PREVIEW, SUCCESS, DONE
}
public CaptureActivityHandler(CaptureActivity activity,
Vector<BarcodeFormat> decodeFormats, String characterSet) {
this.activity = activity;
decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
new ViewfinderResultPointCallback(activity.getViewfinderView()));
decodeThread.start();
state = State.SUCCESS;
// Start ourselves capturing previews and decoding.
CameraManager.get().startPreview();
restartPreviewAndDecode();
}
@Override
public void handleMessage(Message message) {
switch (message.what) {
case R.id.auto_focus:
if (state == State.PREVIEW) {
CameraManager.get().requestAutoFocus(this, R.id.auto_focus);
}
break;
case R.id.restart_preview:
Log.d(TAG, "Got restart preview message");
restartPreviewAndDecode();
break;
case R.id.decode_succeeded:
Log.d(TAG, "Got decode succeeded message");
state = State.SUCCESS;
activity.handleDecode((Result) message.obj);
break;
case R.id.decode_failed:
// We're decoding as fast as possible, so when one decode fails,
// start another.
state = State.PREVIEW;
CameraManager.get().requestPreviewFrame(decodeThread.getHandler(),
R.id.decode);
break;
case R.id.return_scan_result:
Log.d(TAG, "Got return scan result message");
activity.setResult(Activity.RESULT_OK, (Intent) message.obj);
activity.finish();
break;
case R.id.launch_product_query:
Log.d(TAG, "Got product query message");
String url = (String) message.obj;
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
activity.startActivity(intent);
break;
}
}
public void quitSynchronously() {
state = State.DONE;
CameraManager.stopPreview();
Message quit = Message.obtain(decodeThread.getHandler(), R.id.quit);
quit.sendToTarget();
try {
decodeThread.join();
} catch (InterruptedException e) {
// continue
}
// Be absolutely sure we don't send any queued up messages
removeMessages(R.id.decode_succeeded);
removeMessages(R.id.decode_failed);
}
private void restartPreviewAndDecode() {
if (state == State.SUCCESS) {
state = State.PREVIEW;
CameraManager.get().requestPreviewFrame(decodeThread.getHandler(),
R.id.decode);
CameraManager.get().requestAutoFocus(this, R.id.auto_focus);
activity.drawViewfinder();
}
}
}
| [
"4168628@gmail.com"
] | 4168628@gmail.com |
932987fe1d95e9237a975a7d4da387b1ac7ba767 | f1f14650ef28653e674736f3d181400e7aea3911 | /app/src/main/java/br/com/neolog/cplmobile/monitorable/api/MonitorableApi.java | b059ffc97e46959ed03e40841aa0e644e001d93b | [] | no_license | DenisHDG/cpl-mobile | efc9ee1f620ad31a910ad0a997d54aa82057540b | 7090761de335f25c6a7eec2702b2033aa505fdee | refs/heads/master | 2020-04-10T07:20:06.649059 | 2018-12-07T21:45:52 | 2018-12-07T21:45:52 | 160,878,055 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,242 | java | package br.com.neolog.cplmobile.monitorable.api;
import java.util.List;
import android.arch.lifecycle.LiveData;
import br.com.neolog.cplmobile.api.ApiResponse;
import br.com.neolog.monitoring.monitorable.model.rest.RestMonitorable;
import br.com.neolog.monitoring.monitorable.model.rest.RestRemoteMessage;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
public interface MonitorableApi
{
@GET( "monitoring/monitorable/{monitorableId}" )
Call<RestMonitorable> findById(
@Path( "monitorableId" ) int monitorableId );
@POST( "monitoring/monitorable/findByIds" )
LiveData<ApiResponse<List<RestMonitorable>>> findByIds(
@Body List<Integer> monitorableIds );
@GET( "monitoring-business-rules/monitorable/find/mobile/deviceId-and-providerId" )
LiveData<ApiResponse<RestMonitorable>> findByDeviceIdAndProviderId(
@Query( "deviceId" ) String deviceId,
@Query( "providerId" ) String providerId );
@POST( "monitoring-business-rules/monitorable/finishMonitorablesById" )
Call<List<RestRemoteMessage>> finishMonitorables(
@Body List<Integer> monitorableId );
}
| [
"denishdg@gmail.com"
] | denishdg@gmail.com |
d5bb643fbdfa5f6b313a70ae99de78863bc92490 | 915ca0f4ba2e9b1eb79eb7a74cd088dbe0056e4b | /src/mainpackage/mainclass.java | 6130972cd3a39f93c3e610f4465f878dd21a2930 | [] | no_license | altaygencaslan/InheritanceAbstractInterfacePolymorphism | a5c81b597558aa6d6c58429ca2db9e77c44a7e57 | cc702ed04c738fb97e9121ae11fc54e51bf66334 | refs/heads/master | 2020-07-05T09:07:20.765827 | 2019-08-15T21:26:57 | 2019-08-15T21:26:57 | 202,602,435 | 0 | 0 | null | null | null | null | ISO-8859-9 | Java | false | false | 1,566 | java | package mainpackage;
import inheritancepackage.*;
public class mainclass {
public static void main(String[] args) {
// TODO Auto-generated method stub
//Kalıtım'da tüm alt sınıflar üst sınıfların parametrelerine ve metodlarına
//eğer izin verilmişse (private değillerse) ulaşabilirler.
/*
System.out.println("CanliClass:");
CanliClass canliclass = new CanliClass();
canliclass.Beslen();
System.out.println("-----------");
System.out.println("BitkiClass:");
BitkiClass bitkiclass = new BitkiClass();
bitkiclass.Beslen();
bitkiclass.Fotosentez();
System.out.println("-----------");
System.out.println("PapatyaClass:");
PapatyaClass papatyaclass = new PapatyaClass();
papatyaclass.Beslen();
papatyaclass.Fotosentez();
papatyaclass.Kokla();
System.out.println(papatyaclass.toString());
//papatyaclass.KimsinSen = "Lale"; //Final ile işaretlendiğinden değiştirilemez
System.out.println(papatyaclass.KimsinSen);
System.out.println("-----------");
System.out.println("LaleClass:");
LaleClass laleclass = new LaleClass();
laleclass.Beslen();
laleclass.Fotosentez();
laleclass.Uza();
System.out.println("-----------");
*/
//Upcasting / Downcasting
/*
KirmiziGülClass kirmizigul = new KirmiziGülClass();
kirmizigul.KimsinSen();
CanliClass canli1 = kirmizigul;
canli1.KimsinSen();
KirmiziGülClass kirmizigul2 = (KirmiziGülClass)canli1;
kirmizigul2.KimsinSen();
CanliClass canli2 = (CanliClass) new SariGülClass();
canli2.KimsinSen();
*/
}
}
| [
"wK9R2H6uvFE7s2rMYQg6"
] | wK9R2H6uvFE7s2rMYQg6 |
e256f40aff3ca1937189e5a2c05730e1795aad94 | 2aac215310128c98582a3fd12727b77346f04ff6 | /SampleProject/src/Hello2030.java | 708ffc01332d9fd4c144d6e7cfda864862282f6c | [] | no_license | jang6129/JavaProject | 148c12b2f3a4f6bfdf840b0bda336d21700dbdeb | 708fead1e6e0250dd902004e35843f7dcba7e65e | refs/heads/main | 2023-08-30T16:25:42.232604 | 2021-11-06T02:44:33 | 2021-11-06T02:44:33 | 386,262,709 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 125 | java |
public class Hello2030 {
public static void main(String[] args) {
int n = 2030;
System.out.print("Çï·Î" + n);
}
}
| [
"jang6129@naver.com"
] | jang6129@naver.com |
7690e2e320a578022f2acf1749f68f03c3b61219 | 4b93689da8c27f7a9b4b556ba1f249c72a7e1e60 | /JW_201802104042_21/out/JW_201802104042_18/src/cn/edu/sdjzu/xg/bysj/controller/basic/department/ListDepartmentController.java | 0346b949aca3145ed7750d2219ccdef6dc3834e8 | [] | no_license | abc227/xg201802104042 | 3da1962df400cd7db79b90595e25efb29af7df03 | d6313c85366e412ae598b98a668cb852e869cb28 | refs/heads/master | 2022-12-25T02:14:15.255899 | 2019-12-09T11:38:28 | 2019-12-09T11:38:28 | 225,816,744 | 0 | 0 | null | 2022-12-16T11:18:15 | 2019-12-04T08:27:47 | JavaScript | UTF-8 | Java | false | false | 1,615 | java | package cn.edu.sdjzu.xg.bysj.controller.basic.department;
import cn.edu.sdjzu.xg.bysj.domain.Department;
import cn.edu.sdjzu.xg.bysj.service.DepartmentService;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
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 java.io.IOException;
import java.sql.SQLException;
import java.util.Collection;
@WebServlet("/department/list.ctl")
public class ListDepartmentController extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
}
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//设置utf8代码
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
try {
//创建departments集合
Collection<Department> departments = DepartmentService.getInstance().getAll();
//将departments转换成字串
String departments_str = JSON.toJSONString(departments, SerializerFeature.DisableCircularReferenceDetect);
System.out.println(departments_str);
//向客户端发送departments_str字串
response.getWriter().println(departments_str);
}catch(SQLException e){
e.printStackTrace();
}
}
}
| [
"2596964801@qq.com"
] | 2596964801@qq.com |
bf6bf9001aff4419fdb144e3867582b7d217848e | defb85ce2a3ba3539f927a699d626a330aa6b954 | /interactive_engine/src/v2/src/main/java/com/alibaba/maxgraph/v2/store/executor/jna/JnaEngineServerResponse.java | 41c9f6f957c6493353c6fb56500e7fc2b3606e85 | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-elastic-license-2018",
"LicenseRef-scancode-other-permissive"
] | permissive | MJY-HUST/GraphScope | c96d2f8a15f25fc1cc1f3e3d71097ac71819afce | d2ab25976edb4cae3e764c53102ded688a56a08c | refs/heads/main | 2023-08-17T00:30:38.113834 | 2021-07-15T16:27:05 | 2021-07-15T16:27:05 | 382,337,023 | 0 | 0 | Apache-2.0 | 2021-07-02T12:17:46 | 2021-07-02T12:17:46 | null | UTF-8 | Java | false | false | 1,201 | java | /**
* Copyright 2020 Alibaba Group Holding Limited.
*
* 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.alibaba.maxgraph.v2.store.executor.jna;
import com.sun.jna.Structure;
import java.io.Closeable;
import java.util.Arrays;
import java.util.List;
public class JnaEngineServerResponse extends Structure implements Closeable {
public int errCode;
public String errMsg;
public String address;
@Override
protected List<String> getFieldOrder() {
return Arrays.asList("errCode", "errMsg", "address");
}
@Override
public void close() {
setAutoSynch(false);
ExecutorLibrary.INSTANCE.dropJnaServerResponse(this);
}
}
| [
"noreply@github.com"
] | MJY-HUST.noreply@github.com |
71e00f8ac66fd32eaffebb64b6e7021bb1005021 | 67d6f5ce38a3c900a34a41cbbf8fc8287256dd59 | /UoHSheTeam/app/src/main/java/com/example/uohsheteam/ForgotPassword.java | 9323fcdc57631dd8df7dff321b10d403bdcaacb1 | [] | no_license | naveen56/SheTeam | f591e4f622051ebaeff7832f648fd1e4e63557ad | ec4a6d08c1e552fc86d1e79b84a82c3a0c20c61d | refs/heads/master | 2020-05-05T04:26:45.383357 | 2019-04-09T17:37:38 | 2019-04-09T17:37:38 | 179,712,307 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,197 | java | package com.example.uohsheteam;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
public class ForgotPassword extends AppCompatActivity {
private EditText passEmail;
private Button resetPass;
private FirebaseAuth firebaseAuth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_forgot_password);
passEmail =(EditText)findViewById(R.id.etPassEmail);
resetPass=(Button)findViewById(R.id.btnNewPass);
firebaseAuth = FirebaseAuth.getInstance();
resetPass.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String userEmail =passEmail.getText().toString().trim();
if(userEmail.equals("")){
Toast.makeText(ForgotPassword.this,"Please Enter Your Registered Email Id",Toast.LENGTH_SHORT).show();
}else {
firebaseAuth.sendPasswordResetEmail(userEmail).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if(task.isSuccessful()){
Toast.makeText(ForgotPassword.this,"Password Reset Email Sent!!",Toast.LENGTH_SHORT).show();
finish();
startActivity(new Intent(ForgotPassword.this,MainActivity.class));
}else{
Toast.makeText(ForgotPassword.this,"Error In Sending Password Reset E-Mail!!",Toast.LENGTH_SHORT).show();
}
}
});
}
}
});
}
}
| [
"naveenveligatla@gmail.com"
] | naveenveligatla@gmail.com |
13b0e76fefd15041640e602630469bfe9bbcc9f6 | 0d4410dcc5376758d152957ede22ed53176b1542 | /SynacorCodeChallenge/app/src/main/java/com/example/sean/synacorcodechallenge/Movie.java | ab8d0765333b68b8ef67c266cbce257d97b1fc3f | [] | no_license | OrangeBlurz/SynacorCodeChallenge | 34e3d80261b03ff57559fc5f3878769b78cdab92 | ab39398b6ad8c4775d704a0b162d32a626893445 | refs/heads/master | 2016-09-14T14:16:59.839956 | 2016-05-18T13:29:52 | 2016-05-18T13:29:52 | 59,044,502 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,213 | java | package com.example.sean.synacorcodechallenge;
import info.movito.themoviedbapi.model.MovieDb;
/**
* Custom Movie data model
* Name: Matthew Sean Brett
*/
public class Movie {
private String title;
private int releaseYear;
private int voteCount;
public Movie (MovieDb movie){
title = movie.getTitle();
String year = movie.getReleaseDate();
year = year.split("-")[0];
releaseYear = Integer.parseInt(year);
voteCount = movie.getVoteCount();
}
public Movie (String title, int releaseYear, int voteCount){
this.title = title;
this.releaseYear = releaseYear;
this.voteCount = voteCount;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getReleaseYear() {
return releaseYear;
}
public void setReleaseYear(int releaseYear) {
this.releaseYear = releaseYear;
}
public int getVoteCount() {
return voteCount;
}
public void setVoteCount(int voteCount) {
this.voteCount = voteCount;
}
public String toString(){ return "("+releaseYear+")\t" + title;}
}
| [
"sbrett@wirelessedgeint.com"
] | sbrett@wirelessedgeint.com |
3d5d3bdf8052e2705fee2387b8d7dda2540e4ba7 | 6d311c71ec54d8f06f31097c471cff383e8957e0 | /src/_0220/_0220.java | d798904836270fddc7ac43d8f2d5f5c2562eba35 | [] | no_license | LuJian4012/LeetCode | 22a6ac40656ae8421d52b66ed1604375403a5542 | 6efc1e80338b5f6887df195954804b67173208bd | refs/heads/master | 2021-07-10T05:12:12.155466 | 2021-04-01T01:52:35 | 2021-04-01T01:52:35 | 242,285,895 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 684 | java | package _0220;
public class _0220
{
public static void main(String[] args)
{
Solution s = new Solution();
System.out.println(s.containsNearbyAlmostDuplicate(new int[] { 1, 2, 3, 1 }, 3, 0));
System.out.println(s.containsNearbyAlmostDuplicate(new int[] { 1, 0, 1, 1 }, 1, 2));
System.out.println(s.containsNearbyAlmostDuplicate(new int[] { 1, 5, 9, 1, 5, 9 }, 2, 3));
}
}
class Solution
{
public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t)
{
if (nums.length >= k)
{
for (int left = 0; left < nums.length - k; left++)
{
int right = left + k;
if (Math.abs(nums[right] - nums[left]) == t)
return true;
}
}
return false
}
} | [
"3160104012@zju.edu.cn"
] | 3160104012@zju.edu.cn |
215120fe723bb3aa343ed0a990c4275403b2a07c | 295a386496f11e22b74c1070cde6f0a499fa193d | /erp-web/src/main/java/com/isoft/erp/web/filter/LoginFilter.java | 92142ccb1933467712341313cbe94d0fd28ee4b7 | [] | no_license | SlashTeen/erp-parent | 9d04ec6bcb590e052b6855697f9d6bae36e42a43 | 5c8021091658776f8431a0406ba7445250d06b3e | refs/heads/master | 2021-01-20T23:03:03.936184 | 2017-08-30T04:02:38 | 2017-08-30T04:02:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,058 | java | package com.isoft.erp.web.filter;
import org.springframework.web.filter.OncePerRequestFilter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* Created by dell on 2017/4/26.
*/
public class LoginFilter extends OncePerRequestFilter{
@Override
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response,
FilterChain filterChain) throws ServletException, IOException {
String[] notFilter=new String[]{"user/login","/login.jsp"};
String contextPath = request.getContextPath();///erp
String requestURI = request.getRequestURI();///erp/login.jsp
if(requestURI.indexOf(".jsp")!=-1){//如果请求路径含有.jsp形式
boolean isFilter=true;
for(String s:notFilter){
if(requestURI.indexOf(s)!=-1){//如果包含不过滤的URL
isFilter=false;
break;
}
}
if(isFilter){//开始过滤
if(null==request.getSession().getAttribute("user")){
System.out.println(requestURI+">>>用户没有登陆");
response.sendRedirect(contextPath+"/login.jsp");
return;
}else {
System.out.println(requestURI+">>>用户已经登陆");
filterChain.doFilter(request,response);
return;
}
}else {//不过滤直接放行
System.out.println(requestURI+">>>不过滤放行");
filterChain.doFilter(request,response);
return;
}
}else {//如果请求路径不含有.jsp形式
System.out.println(requestURI+">>>不过滤放行");
filterChain.doFilter(request,response);
return;
}
}
}
| [
"991952759@qq.com"
] | 991952759@qq.com |
231dcd788038e95cf60d465a0858beb420a7e154 | a1374efd322293eafe2045c5c701c4f34243c7f8 | /Admin.java | 7f08d056ad5ee995473e46651515996f04e0142d | [] | no_license | sidrumade/Online-Notice-Board | 86d77709f0ea8d2eae77c2fe3d69a6c0ef8a5ad4 | dedd50c597970c9982fb45e269fea12b434dd084 | refs/heads/master | 2020-12-02T04:29:53.982563 | 2019-12-30T09:44:38 | 2019-12-30T09:44:38 | 230,888,188 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 472 | java | package com.example.noticeboard10;
class Admin {
String mKey,uid;
Admin()
{
}
Admin(String mKey,String uid)
{
this.mKey=mKey;
this.uid=uid;
}
public String getmKey() {
return mKey;
}
public void setmKey(String mKey) {
this.mKey = mKey;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
}
| [
"noreply@github.com"
] | sidrumade.noreply@github.com |
23e502ff32b39e223f232db479f9bb408971811e | 3d9a69aa265903c2aed9c748750273d961cd2553 | /HelloWorldSpringDemo/src/main/java/com/yash/configuration/HelloWorldInitializer.java | 81495be417d522eb2a7cc2165e2fa89737732ba3 | [] | no_license | Harshada-B/Spring | 626f63ec7b1c9247387d9969c7e8a21d1c7827f7 | 95a109cf5fe7843ce43880fd1b46a2c94357a0a1 | refs/heads/main | 2023-08-29T00:21:08.663215 | 2021-10-03T14:32:07 | 2021-10-03T14:32:07 | 406,430,618 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 895 | java | package com.yash.configuration;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;
public class HelloWorldInitializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext context) throws ServletException {
AnnotationConfigWebApplicationContext ctx=new AnnotationConfigWebApplicationContext();
ctx.register(HelloWorldConfiguration.class);
ctx.setServletContext(context);
ServletRegistration.Dynamic servlet= context.addServlet("dispatcher", new
DispatcherServlet(ctx));
servlet.setLoadOnStartup(1);
servlet.addMapping("/");
}
}
| [
"noreply@github.com"
] | Harshada-B.noreply@github.com |
fdcddc1461f0daeda98f391c63a9d23e7f55b42b | 3ef7c6ae21eb0db1bf2d3b556ae39ece80ebfad9 | /src/main/java/com/xk/msa/api/mo/common/CorsConfig.java | e5b68ff43040d8999fd2feb9f42ede552f11c91b | [] | no_license | hasan2015/com.xk.msa.api.moserivce | 0a17abecb1138a7ebd56473561a1b26fd60be06e | e3b6f63306288b421d9b03d83a1e1e5b460e9fb6 | refs/heads/master | 2021-01-22T19:04:15.906159 | 2017-03-28T06:30:45 | 2017-03-28T06:30:45 | 85,157,371 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 996 | java | package com.xk.msa.api.mo.common;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
/**
*
* @author yanhaixun
* @date 2017年3月20日 下午3:12:48
*
*/
//@Configuration
public class CorsConfig {
private CorsConfiguration buildConfig() {
CorsConfiguration corsConfiguration = new CorsConfiguration();
corsConfiguration.setAllowCredentials(true);
corsConfiguration.addAllowedOrigin("*"); // 1
corsConfiguration.addAllowedHeader("*"); // 2
corsConfiguration.addAllowedMethod("*"); // 3
return corsConfiguration;
}
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", buildConfig()); // 4
return new CorsFilter(source);
}
}
| [
"yanhaixun@360ser.com"
] | yanhaixun@360ser.com |
8f7ac42d458b488a26b0af63e9def97cce6a376f | d2e239e9394134695d49a7e085e573b86bc1e7c9 | /webtester-support-junit5/src/main/java/info/novatec/testit/webtester/junit5/extensions/NoManagedBrowserForNameException.java | f28c6e13e219aa990d5b09641ce1b25d5d8c86b8 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Drakojin/webtester2-core | 4a959f40dc3c140ded3084670efaa58a4829d76b | 6aa1ca3167ccda63d1949bbcc9e5164aa6253ced | refs/heads/master | 2022-05-01T04:56:55.304694 | 2022-04-01T16:31:11 | 2022-04-01T16:31:11 | 59,283,347 | 0 | 0 | null | 2016-05-20T09:45:05 | 2016-05-20T09:45:05 | null | UTF-8 | Java | false | false | 620 | java | package info.novatec.testit.webtester.junit5.extensions;
import lombok.Getter;
import info.novatec.testit.webtester.browser.Browser;
/**
* This exception is thrown in case there is no managed {@link Browser} with a given name when execution an extension.
*
* @since 2.1
*/
@Getter
public class NoManagedBrowserForNameException extends TestClassFormatException {
/** The name of the browser that wasn't found. */
private final String name;
public NoManagedBrowserForNameException(String name) {
super("There is no managed browser with the name: " + name);
this.name = name;
}
}
| [
"stefan.ludwig@novatec-gmbh.de"
] | stefan.ludwig@novatec-gmbh.de |
3063eca453f3efb946e6316c02612961d1b81bd6 | 8ca72511eca2eb450dd02647547fc593a258083a | /BO/src/main/java/com/grupo38/tiendagenerica/DTO/ClienteVO.java | 014f83c2b1122b7e2c1a13b24e7aec6764938480 | [] | no_license | acaycedo/G38Equipo3Ciclo3 | 359db18fecdae0fb65f3d3e4b2e5fc7ecd893d97 | 96abf586ddc994c1dcf7f9b92949aa1f618c5925 | refs/heads/main | 2023-09-05T17:54:08.688560 | 2021-10-18T04:52:35 | 2021-10-18T04:52:35 | 408,648,193 | 1 | 1 | null | 2021-09-27T03:11:29 | 2021-09-21T01:05:00 | Java | UTF-8 | Java | false | false | 1,478 | java | package com.grupo38.tiendagenerica.DTO;
import java.io.Serializable;
//Todas las clases entidad deben ser serializables, y deben estan encapsuladas
//Solo las clases DTO implementan Serializable
public class ClienteVO implements Serializable {
//Identificador unico para las clases entidad
private static final long serialVersionUID = 1L;
private Integer cedula_cliente;
private String direccion_cliente;
private String email_cliente;
private String nombre_cliente;
private String telefono_cliente;
/**
* @return the cedula_usuario
*/
public Integer getCedula_cliente() {
return cedula_cliente;
}
public void setCedula_cliente(Integer cedula_cliente) {
this.cedula_cliente = cedula_cliente;
}
public String getDireccion_cliente() {
return direccion_cliente;
}
public void setDireccion_cliente(String direccion_cliente) {
this.direccion_cliente = direccion_cliente;
}
public String getEmail_cliente() {
return email_cliente;
}
public void setEmail_cliente(String email_cliente) {
this.email_cliente = email_cliente;
}
public String getNombre_cliente() {
return nombre_cliente;
}
public void setNombre_cliente(String nombre_cliente) {
this.nombre_cliente = nombre_cliente;
}
public String getTelefono_cliente() {
return telefono_cliente;
}
public void setTelefono_cliente(String telefono_cliente) {
this.telefono_cliente = telefono_cliente;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
}
| [
"afcaycedo14@gmail.com"
] | afcaycedo14@gmail.com |
f36708250884134006b8c0c5e5456793dfe74291 | 05889dfb06e0b74c8e7c055036a08320d23abd08 | /src/Task7.java | d8487345e10f8c3ec04e3cb69be13b1bc056507e | [] | no_license | tomaszKrawczyk/taskArray | 27be467670337b63552ad8cbcb8070dbd2ab0b77 | 090dfcec7136673af51873250840c3217c426719 | refs/heads/master | 2020-03-10T09:36:57.115178 | 2018-04-12T21:45:04 | 2018-04-12T21:45:04 | 129,313,799 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 736 | java | /**
* Created by Tomek Krawczyk on 15.09.2017.
*/
public class Task7 {
public static void main(String[] args) {
int[] array = {1, 1, 2, 2, 3, 3, 3, 5};
boolean isTrue = false;
for (int firstLoop : array) {
int counter = 0;
for (int secondLoop : array) {
if (firstLoop == secondLoop) {
counter++;
}
if (counter >= 3) {
isTrue = true;
break;
}
}
}
if (isTrue) {
System.out.println("Yes, some number repeat 3 times");
} else
System.out.println("No, any number don't repeat 3 times");
}
} | [
"tom_krawczyk@op.pl"
] | tom_krawczyk@op.pl |
f9dc5d58df6f0896cb921314d1092f2a4e68b027 | 97649e96255710d2ce785aca020b9fa18d7ba6f7 | /app/src/main/java/com/virmana/status_app_all/Adapters/PayoutAdapter.java | ea17b5f1d14b78b679b4427833946fece81b805f | [] | no_license | freelanceapp/Status1 | 4a57b7bc45e0e4fe12a4be8fea54a56aa6034747 | 367799c12c99d66fee5ec8d209564395ab3712b6 | refs/heads/master | 2020-08-08T16:08:10.808224 | 2019-04-21T14:48:47 | 2019-04-21T14:48:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,902 | java | package com.virmana.status_app_all.Adapters;
import android.content.Context;
import android.graphics.Color;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.virmana.status_app_all.R;
import com.virmana.status_app_all.model.Payout;
import java.util.ArrayList;
import java.util.List;
public class PayoutAdapter extends RecyclerView.Adapter<PayoutAdapter.PayoutHolder> {
private List<Payout> payoutList= new ArrayList<>();
private Context context;
public PayoutAdapter(List<Payout> payoutList, Context context){
this.context=context;
this.payoutList=payoutList;
}
@Override
public PayoutHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View viewHolder= LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_payout, null, false);
viewHolder.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
return new PayoutAdapter.PayoutHolder(viewHolder);
}
@Override
public void onBindViewHolder(PayoutHolder holder,final int position) {
holder.text_view_item_payout_account.setText(payoutList.get(position).getAccount());
holder.text_view_item_payout_name.setText(payoutList.get(position).getName());
holder.text_view_item_payout_amount.setText(payoutList.get(position).getAmount());
holder.text_view_item_payout_points.setText(payoutList.get(position).getPoints().toString()+" P");
holder.text_view_item_payout_date.setText(payoutList.get(position).getDate());
holder.text_view_item_payout_method.setText(payoutList.get(position).getMethod());
holder.text_view_item_payout_state.setText(payoutList.get(position).getState());
if (payoutList.get(position).getState().equals("Pending")){
holder.text_view_item_payout_state.setBackgroundColor(Color.parseColor("#ffbc12"));
}else if (payoutList.get(position).getState().equals("Paid")){
holder.text_view_item_payout_state.setBackgroundColor(Color.parseColor("#48ba21"));
}else if (payoutList.get(position).getState().equals("Rejected")){
holder.text_view_item_payout_state.setBackgroundColor(Color.parseColor("#ba2145"));
}
}
@Override
public int getItemCount() {
return payoutList.size();
}
public static class PayoutHolder extends RecyclerView.ViewHolder {
private final TextView text_view_item_payout_account;
private final TextView text_view_item_payout_name;
private final TextView text_view_item_payout_state;
private final TextView text_view_item_payout_method;
private final TextView text_view_item_payout_amount;
private final TextView text_view_item_payout_points;
private final TextView text_view_item_payout_date;
public PayoutHolder(View itemView) {
super(itemView);
this.text_view_item_payout_account = (TextView) itemView.findViewById(R.id.text_view_item_payout_account);
this.text_view_item_payout_name = (TextView) itemView.findViewById(R.id.text_view_item_payout_name);
this.text_view_item_payout_state = (TextView) itemView.findViewById(R.id.text_view_item_payout_state);
this.text_view_item_payout_method = (TextView) itemView.findViewById(R.id.text_view_item_payout_method);
this.text_view_item_payout_amount = (TextView) itemView.findViewById(R.id.text_view_item_payout_amount);
this.text_view_item_payout_points = (TextView) itemView.findViewById(R.id.text_view_item_payout_points);
this.text_view_item_payout_date = (TextView) itemView.findViewById(R.id.text_view_item_payout_date);
}
}
} | [
"prabhu.prem.g@gmail.com"
] | prabhu.prem.g@gmail.com |
1952f71c166b93298dc425b4eaa360da934e533a | 84048ccf78482b72789bc1080eab0916884f95ab | /src/com/hiltonrobotics/steamworksbot/commands/ArmExtremeCommand.java | 7a9babde6c6b4708c94ec04af0986e9582c77fa7 | [] | no_license | powerboat9/2018_practice | 9cb3991a4af6d6d0c360fecfacaed5bb2f1f06b8 | 8f2c68cbfd460bed8303d5312f26909857ce714b | refs/heads/master | 2020-03-13T09:15:18.923772 | 2018-04-19T19:35:22 | 2018-04-19T19:35:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 906 | java | package com.hiltonrobotics.steamworksbot.commands;
import com.hiltonrobotics.steamworksbot.OI;
import com.hiltonrobotics.steamworksbot.subsystems.ArmSubsystem;
import edu.wpi.first.wpilibj.command.Command;
public class ArmExtremeCommand extends Command {
private boolean isTop;
public ArmExtremeCommand(boolean isTopIn) {
isTop = isTopIn;
requires(ArmSubsystem.getInstance());
}
@Override
protected void execute() {
super.execute();
System.out.println("Executing ArmExtreme");
if ((isTop ? OI.limitHigh : OI.limitLow).get()) {
System.out.println("Stopping");
OI.clawMotorL.set(0);
OI.clawMotorR.set(0);
} else {
System.out.println("Running");
OI.clawMotorL.set(isTop ? 0.4 : -0.4);
OI.clawMotorR.set(isTop ? -0.4 : 0.4);
}
}
@Override
protected boolean isFinished() {
System.out.println("Ending");
return (isTop ? OI.limitHigh : OI.limitLow).get();
}
}
| [
"21oavery@ga.hiltoncsd.net"
] | 21oavery@ga.hiltoncsd.net |
e00a2069ec65d066f72f626682ff112a7917c644 | 5118a8bf33184b3016cac3711a862b0d78c91733 | /src/main/java/kodlamaio/hrmsdemo/business/concretes/JobManager.java | 7861a8cf14ff38d59c0ece6ff5541f780fd0f777 | [] | no_license | oguzhanbelli/hrms | 8c01038bb783bb6f039fbcee3f51c004a9cf6bd2 | a8cc20d9ca0935219c9129fe0789d21550e1c0f8 | refs/heads/master | 2023-06-29T10:53:20.367469 | 2021-07-31T20:34:14 | 2021-07-31T20:34:14 | 371,128,968 | 6 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,586 | java | package kodlamaio.hrmsdemo.business.concretes;
import java.util.List;
import java.util.Optional;
import kodlamaio.hrmsdemo.core.utilities.results.*;
import kodlamaio.hrmsdemo.dataAccess.abstracts.AdvertisementDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import kodlamaio.hrmsdemo.business.abstracts.JobService;
import kodlamaio.hrmsdemo.dataAccess.abstracts.JobDao;
import kodlamaio.hrmsdemo.entities.concretes.Job;
import org.springframework.web.bind.annotation.RequestBody;
@Service
public class JobManager implements JobService {
private JobDao jobDao;
private AdvertisementDao advertisementDao;
@Autowired
public JobManager(JobDao jobDao, AdvertisementDao adversitementDao) {
super();
this.jobDao = jobDao;
this.advertisementDao =adversitementDao;
}
@Override
public DataResult<List<Job>> getAll() {
// TODO Auto-generated method stub
return new SuccessDataResult<List<Job>>(this.jobDao.findAll(), "Pozisyonlar Listelendi");
}
@Override
public DataResult<Optional<Job>> getById(int id) {
// TODO Auto-generated method stub
return new SuccessDataResult<Optional<Job>>(this.jobDao.findById(id));
}
@Override
public Result add(@RequestBody Job job) {
if(jobDao.existsByJobName(job.getJobName())){
return new ErrorResult("Pozisyon ismi var");
}else{
jobDao.save(job);
return new SuccessResult("Başarıyla İş Eklendi");
}
}
}
| [
"75687376+oguzhanbelli@users.noreply.github.com"
] | 75687376+oguzhanbelli@users.noreply.github.com |
a689576c1cb24775b045f564171e0b0dcf5d1aec | 55e5c2a4b0fc91be3623308404fabb300dcdace9 | /app/src/main/java/cn/xylink/mting/contract/DelStoreContact.java | 2c614b44cbc97164ddeec85d62a7222fccaec6c1 | [] | no_license | dooqu/mting3 | e002ae46386fd163be0987b132fa793a3f93ce7c | a1e71957391a39b3ed7576ea2592d43845fa58f5 | refs/heads/master | 2022-12-25T15:37:08.678278 | 2020-05-14T08:10:54 | 2020-05-14T08:10:54 | 304,654,192 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 623 | java | package cn.xylink.mting.contract;
import cn.xylink.mting.base.BaseResponse;
import cn.xylink.mting.bean.ArticleIdsRequest;
/**
* -----------------------------------------------------------------
* 2019/11/26 14:28 : Create DelStoreContact.java (JoDragon);
* -----------------------------------------------------------------
*/
public interface DelStoreContact {
interface IDelStoreView extends IBaseView {
void onDelStoreSuccess(BaseResponse response);
void onDelStoreError(int code, String errorMsg);
}
interface Presenter<T> {
void delStore(ArticleIdsRequest request);
}
}
| [
"zhaoxiaolong@xylink.cn"
] | zhaoxiaolong@xylink.cn |
8eb6fba91188967025fa12b1d20c997c1ffa83d8 | c942ead80bd36ed566a40f4ff16786cb8dca0b20 | /src/leetcode/problem637/Main.java | 9e3a1a269b7ad3a6fd4e322bbd7e9eaddee4a8bb | [] | no_license | dongzhiru123/MyAlgorithm | 10216591464759e96bf856c5532bc1bc236ee267 | 7de8242dee0c377f60d76a66e954e6c1ff9da3cc | refs/heads/master | 2022-12-07T02:37:14.536732 | 2020-09-03T02:21:02 | 2020-09-03T02:21:02 | 270,976,201 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,732 | java | package leetcode.problem637;
import java.util.LinkedList;
import java.util.List;
/**
* 给定一个非空二叉树, 返回一个由每层节点平均值组成的数组。
*
* 示例 1:
* 输入:
* 3
* / \
* 9 20
* / \
* 15 7
* 输出:[3, 14.5, 11]
* 解释:
* 第 0 层的平均值是 3 , 第1层是 14.5 , 第2层是 11 。因此返回 [3, 14.5, 11] 。
*
* 提示:
* 节点值的范围在32位有符号整数范围内。
*/
public class Main {
public static void main(String[] args) {
TreeNode root = new TreeNode(2);
root.left = new TreeNode(2);
root.right = new TreeNode(5);
root.left.left = new TreeNode(2);
root.left.right = new TreeNode(3);
Main main = new Main();
List<Double> doubles = main.averageOfLevels(root);
for (double num : doubles) {
System.out.println(num);
}
}
public List<Double> averageOfLevels(TreeNode root) {
List<Double> result = new LinkedList<>();
if (root == null) return result;
LinkedList<TreeNode> linkedList = new LinkedList<>();
linkedList.add(root);
while (!linkedList.isEmpty()) {
int size = linkedList.size();
double sum = 0;
for (int i = 0; i < size; i++) {
TreeNode temp = linkedList.poll();
sum += temp.val;
if (temp.left != null) linkedList.add(temp.left);
if (temp.right != null) linkedList.add(temp.right);
}
result.add(sum / size);
}
return result;
}
}
class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) { val = x; }
} | [
"2201357779@qq.com"
] | 2201357779@qq.com |
503089e639bb349db39a341c30cd423034de9126 | 94177a0063e4b4bb878f7357b2516d946c4bf45a | /app/src/main/java/br/com/personal/carrefour/carrefourpersonal/model/UsuarioLogin.java | 996ecdb32679897d464452f9d3e17e995946eaec | [] | no_license | leeoassis/Carrefour-Documents-APP | 562d560a7d600e20480b022eb7bf392f55926f06 | 9bcc07a467b67632d8ad56f8ce5b19b623f70f81 | refs/heads/master | 2021-04-26T23:27:12.332663 | 2018-03-06T00:35:53 | 2018-03-06T00:35:53 | 123,996,985 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 458 | java | package br.com.personal.carrefour.carrefourpersonal.model;
/**
* Created by ASUS on 23/02/2018.
*/
public class UsuarioLogin {
private String nome;
private String senha;
public String getNome() {
return nome;
}
public void setNome(String usuario) {
this.nome = usuario;
}
public String getSenha() {
return senha;
}
public void setSenha(String senha) {
this.senha = senha;
}
}
| [
"leoslassis@gmail.com"
] | leoslassis@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.