blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
0b9fa8e9aba6a4c34288aa5d2111f6dcf12fc9ba
62cec8da88e11112efa163297e61fb460eb4d390
/src/main/java/com/wang/redis/connection/ConnectionPool.java
fce017d63620d8a4598be23f1132a50741cb156c
[]
no_license
cold-mountain-moon/rediswang
ec7327a1379bf456aa0d04b97ceb061e00954c66
baf09718e6a42c1c0c5c105c37c60a9cd5176454
refs/heads/master
2020-07-13T16:47:56.572866
2019-08-29T08:21:39
2019-08-29T08:21:39
205,117,688
1
0
null
2019-08-29T08:32:49
2019-08-29T08:32:49
null
UTF-8
Java
false
false
201
java
package com.wang.redis.connection; public interface ConnectionPool { Connection getConnection(); Connection getConnection(long second); void releaseConnection(Connection connection); }
[ "731461008@qq.com" ]
731461008@qq.com
64d7595e0b519e3800d075bcf6fd98665d2e4be8
970b8bfd3367e546e7f48af6d36677d6c76d5c1a
/test/src/entity/Person.java
1b8cf9ee7ff688e858671230fcb29adfc1277b18
[]
no_license
lgw-repo/test-repo
b694038d364e3e0a04e15b607a822d2d7f05835a
b64b280d465fd50054082b5e44f560a39ecfe025
refs/heads/master
2023-04-22T21:45:36.740283
2021-05-04T07:09:55
2021-05-04T07:09:55
364,174,425
0
0
null
null
null
null
UTF-8
Java
false
false
283
java
package entity; public class Person { public int age; public String name; public Person(int age, String name) { this.age = age; this.name = name; } @Override public String toString() { return "Person{" + "age=" + age + ", name='" + name + '\'' + '}'; } }
[ "2662265164@qq.com" ]
2662265164@qq.com
1cac7215cb8bd5f8c0f3540461e87f74c6f0f773
7df4a9125723a6da1a0e6328ad035dde7f40b979
/3.JavaMultithreading/src/com/javarush/task/task22/task2202/Solution.java
1f5a1342c754ecad568b93b3503d1ae4fa736011
[]
no_license
fighter-hd/JavaRushTasks
1c472728473a9bece162752f1734fd482ef4c847
3e4b5ed70e578bde6a769210b7403d4547f046c0
refs/heads/master
2020-05-30T17:43:23.231214
2019-11-02T20:31:49
2019-11-02T20:31:49
189,878,332
1
2
null
null
null
null
UTF-8
Java
false
false
815
java
package com.javarush.task.task22.task2202; /* Найти подстроку */ public class Solution { public static void main(String[] args) { System.out.println(getPartOfString("JavaRush - лучший сервис обучения Java.")); } public static String getPartOfString(String string) { StringBuilder result = new StringBuilder(); try { String[] aroundSpaces = string.split(" "); for (int i = 1; i < 5; i++) { result.append(aroundSpaces[i]); result.append(" "); } } catch (Exception exception) { throw new TooShortStringException(); } return result.toString().trim(); } public static class TooShortStringException extends RuntimeException { } }
[ "deng19081994@mail.ru" ]
deng19081994@mail.ru
38b8784420e146571d3b362f35aec7b247466ed4
2e8cca60310dd2a9a526580c57172f44e6fd6938
/Task3_1/src/main/java/com/a1/service/FileService.java
0096956dd8d42b6c784af87ae11197f8c141ff6b
[]
no_license
VladTVN/A1_Tasks
da467033d780be006428f74e9bfbe9ef3ea7ca36
87fe1780fe38e57a05ccc137d51f82be06f64e91
refs/heads/master
2023-01-02T04:33:30.453376
2020-10-22T14:12:27
2020-10-22T14:12:27
306,115,892
0
0
null
null
null
null
UTF-8
Java
false
false
4,579
java
package com.a1.service; import com.a1.model.Login; import com.a1.model.Posting; import java.io.File; import java.io.FileNotFoundException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; public class FileService { public static String readFile(String path){ StringBuffer readData = new StringBuffer(); File file = new File(path); try { Scanner in = new Scanner(file); while(in.hasNext()){ readData.append(in.nextLine()+"\n"); } } catch (FileNotFoundException e) { e.printStackTrace(); } return readData.toString(); } public static String[] splitOnLines(String data){ String[] dataOnLine = data.split("\n"); return dataOnLine; } public static String[] splitOnSemicolon(String data){ String[] splitData = data.split(";"); return splitData; } public static String replaceCommas(String line){ return line.replaceAll(",",";"); } public static String replaceSpace(String line){ return line.replaceAll("\t",""); } public static String replaceCommasOnDots(String line){ return line.replaceAll(",", "."); } public static Date convertDate(String StringDate){ Date date = new Date(); SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy", Locale.ENGLISH); try { date = formatter.parse(StringDate); } catch (ParseException e) { e.printStackTrace(); } return date; } public static Posting createModelPosting(String[] data){ String matDoc; int item; Date docDate; Date pstngDate; String materialDescription; int quantity; String bun; double amountLC; String crcy; String userName; matDoc = data[0]; item = Integer.parseInt(data[1]); docDate = convertDate(data[2]); pstngDate = convertDate(data[3]); materialDescription = data[4]; quantity = Math.abs(Integer.parseInt(data[5])); bun = data[6]; amountLC = Math.abs(Double.parseDouble(data[7])); crcy = data[8]; userName = data[9]; Posting posting =new Posting(matDoc, item, docDate, pstngDate, materialDescription, quantity, bun, amountLC, crcy, userName); return posting; } public static Login createModelLogin (String[] data){ String application; String appAccountName; boolean isActive; String jobTitle; String department; application = data[0]; appAccountName = data[1]; isActive = Boolean.parseBoolean(data[2]); jobTitle = data[3]; department = data[4]; Login login = new Login(application, appAccountName, isActive, jobTitle, department); return login; } public static List<Posting> setAuthorizedDelivery(List<Login> loginList, List<Posting> postingList){ for (int i = 0; i < postingList.size(); i++) { if(loginList.contains(postingList.get(i)) && loginList.get(i).isActive()){ postingList.get(i).setAuthorizedDelivery(true); } } return postingList; } public static List<Login> parseLogins(){ List<Login> list = new ArrayList<>(); String readData = readFile("H:\\Games\\Downloads\\logins.csv"); readData = replaceCommas(readData); readData = replaceSpace(readData); String[] dataOnLines = splitOnLines(readData); for (int i = 1; i < dataOnLines.length; i++) { String[] splitedData = splitOnSemicolon(dataOnLines[i]); list.add(createModelLogin(splitedData)); } return list; } public static List<Posting> parsePostings(){ List<Posting> list = new ArrayList<>(); String readData = readFile("H:\\Games\\Downloads\\postings.csv"); readData = replaceCommasOnDots(readData); readData = replaceSpace(readData); String[] dataOnLines = splitOnLines(readData); for (int i = 2; i < dataOnLines.length; i++) { String[] splitedData = splitOnSemicolon(dataOnLines[i]); list.add(createModelPosting(splitedData)); } return list; } public static List<Posting> getPostings(List<Login> loginList){ List<Posting> list = setAuthorizedDelivery(loginList, parsePostings()); return list; } }
[ "vlad-tereshko@tut.by" ]
vlad-tereshko@tut.by
bc9b4cf6be633b7230ff9c50a869308af1d796b0
a90a7bfc49b5fe3533857383d3e7e5407fe03f82
/xconf-automation-tests/src/test/java/com/comcast/xconf/thucydides/pages/dcm/LogUploadSettingsViewPageObjects.java
4530ab67c6323343f25352b5219c01a8adaa018e
[ "MIT", "Apache-2.0" ]
permissive
comcast-icfar/xconfserver
d8406f4d3baffd511ec386bef9b6c31e65943e63
a13989e16510c734d13a1575f992f8eacca8250b
refs/heads/main
2023-01-11T19:40:56.417261
2020-11-17T20:22:37
2020-11-17T20:22:37
308,412,315
0
1
NOASSERTION
2020-11-18T16:48:16
2020-10-29T18:11:58
Java
UTF-8
Java
false
false
3,178
java
/* * If not stated otherwise in this file or this component's Licenses.txt file the * following copyright and licenses apply: * * Copyright 2018 RDK Management * * 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. * * Author: Stanislav Menshykov * Created: 3/29/16 10:48 AM */ package com.comcast.xconf.thucydides.pages.dcm; import net.thucydides.core.annotations.findby.FindBy; import net.thucydides.core.pages.PageObject; import net.thucydides.core.pages.WebElementFacade; import org.openqa.selenium.WebDriver; public class LogUploadSettingsViewPageObjects extends PageObject { public LogUploadSettingsViewPageObjects(WebDriver webDriver) { super(webDriver); } @FindBy(css = "input#logUploadSettingsName") private WebElementFacade name; @FindBy(css = "input#uploadOnReboot") private WebElementFacade uploadOnReboot; @FindBy(css = "input#numberOfDays") private WebElementFacade numberOfDays; @FindBy(css = "input#settingsAreActive") private WebElementFacade settingsAreActive; @FindBy(css = "input#uploadRepository") private WebElementFacade uploadRepository; @FindBy(css = "input#scheduleType") private WebElementFacade scheduleType; @FindBy(css = "input#cronExpression") private WebElementFacade cronExpression; @FindBy(css = "input#timeWindow") private WebElementFacade timeWindow; @FindBy(css = "input#expressionL1") private WebElementFacade expressionL1; @FindBy(css = "input#expressionL2") private WebElementFacade expressionL2; @FindBy(css = "input#expressionL3") private WebElementFacade expressionL3; public String getName() { return name.getValue(); } public String getUploadOnReboot() { return uploadOnReboot.getValue(); } public String getNumberOfDays() { return numberOfDays.getValue(); } public String getSettingsAreActive() { return settingsAreActive.getValue(); } public String getUploadRepository() { return uploadRepository.getValue(); } public String getScheduleType() { return scheduleType.getValue(); } public String getCronExpression() { return cronExpression.getValue(); } public String getTimeWindow() { return timeWindow.getValue(); } public String getExpressionL1() { return expressionL1.getValue(); } public String getExpressionL2() { return expressionL2.getValue(); } public String getExpressionL3() { return expressionL3.getValue(); } }
[ "Gabriel_DeJesus@cable.comcast.com" ]
Gabriel_DeJesus@cable.comcast.com
73a7dc02a46c5853aba6f9f0e56e880bdb617b70
5602d5eed74577b32045c54ef4fd44059bae51e1
/src/main/java/com/springboot/app/config/BasicConfiguration.java
5432e6d521cdcce6ff92856984387b87ccaec25b
[]
no_license
gilibertMoreno/TestLogin
23dad191fe239fff92dbd8c33f2544cd1028eddc
0dcfe81672d10d44a3d396fa792d34ff3f560e0c
refs/heads/master
2022-10-30T07:36:52.793748
2020-06-11T18:50:21
2020-06-11T18:50:21
271,281,121
0
0
null
null
null
null
UTF-8
Java
false
false
2,184
java
package com.springboot.app.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import com.springboot.app.service.impl.LoginUserImpl; @Configuration @EnableWebSecurity public class BasicConfiguration extends WebSecurityConfigurerAdapter { @Autowired private LoginUserImpl loginUser; @Autowired private BCryptPasswordEncoder encoder; @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(loginUser).passwordEncoder(encoder); } @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() // URLs matching for access rights .antMatchers("/").permitAll() .antMatchers("/formRegister").permitAll() .antMatchers("/register").permitAll() .antMatchers("/login").permitAll() .antMatchers("/home").hasAnyAuthority("ADMIN") .anyRequest().authenticated() .and() // form login .csrf().disable().formLogin() .loginPage("/login") .failureUrl("/login?error=true") .defaultSuccessUrl("/home") .usernameParameter("username") .passwordParameter("password") .and() // logout .logout() .logoutRequestMatcher(new AntPathRequestMatcher("/logout")) .logoutSuccessUrl("/").and() .exceptionHandling() .accessDeniedPage("/access-denied"); } @Override public void configure(WebSecurity web) throws Exception { web.ignoring().antMatchers("/resources/**", "/static/**", "/css/**", "/js/", "/images/*"); } }
[ "giliberth.934@gmail.com" ]
giliberth.934@gmail.com
31b39c86455b271948c03c5e120f2b4a3aee0d41
45e81e93fb18cf731c6be8462dd100bc8871cb9f
/jeemicro/src/main/java/com/jeemicro/weixin/common/persistence/dialect/db/SQLServerDialect.java
50891a92021d429a4d6e21400400245a593d92f7
[ "Apache-2.0" ]
permissive
yixinsiyu/microsite
1094d65b1c5c245329acd8975e169f23e4494255
8269fd04668dcfd88b7a9751415b2e495a231bc8
refs/heads/master
2020-03-19T15:33:52.929362
2018-06-09T07:26:45
2018-06-09T07:26:45
136,675,760
0
0
null
null
null
null
UTF-8
Java
false
false
1,695
java
/** * Copyright &copy; 2012-2016 < All rights reserved. */ package com.jeemicro.weixin.common.persistence.dialect.db; import com.jeemicro.weixin.common.persistence.dialect.Dialect; /** * MSSQLServer 数据库实现分页方言 * * @author poplar.yfyang * @version 1.0 2010-10-10 下午12:31 * @since JDK 1.5 */ public class SQLServerDialect implements Dialect { public boolean supportsLimit() { return true; } static int getAfterSelectInsertPoint(String sql) { int selectIndex = sql.toLowerCase().indexOf("select"); final int selectDistinctIndex = sql.toLowerCase().indexOf("select distinct"); return selectIndex + (selectDistinctIndex == selectIndex ? 15 : 6); } public String getLimitString(String sql, int offset, int limit) { return getLimit(sql, offset, limit); } /** * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换. * <pre> * 如mysql * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回 * select * from user limit :offset,:limit * </pre> * * @param sql 实际SQL语句 * @param offset 分页开始纪录条数 * @param limit 分页每页显示纪录条数 * @return 包含占位符的分页sql */ public String getLimit(String sql, int offset, int limit) { if (offset > 0) { throw new UnsupportedOperationException("sql server has no offset"); } return new StringBuffer(sql.length() + 8) .append(sql) .insert(getAfterSelectInsertPoint(sql), " top " + limit) .toString(); } }
[ "jinghua.zhao@atos.net" ]
jinghua.zhao@atos.net
0ff4a32e9018e0fd8cfccb3f72b8c6fe9d95bc76
14956dbed8ae4fba1d65b9829d9405fcf43ac698
/Cyber Security/Capture the Flag Competitions/2020/STACK the Flags/Mobile/Decompiled/sources/b/d/a/a/r/d.java
7c7169f6cecfb167d50ff82d58c79102ac6844d9
[]
no_license
Hackin7/Programming-Crappy-Solutions
ae8bbddad92a48cf70976cec91bf66234c9b4d39
ffa3b3c26a6a06446cc49c8ac4f35b6d30b1ee0f
refs/heads/master
2023-03-21T01:21:00.764957
2022-12-28T14:22:33
2022-12-28T14:22:33
201,292,128
12
7
null
2023-03-05T16:05:34
2019-08-08T16:00:21
Roff
UTF-8
Java
false
false
4,927
java
package b.d.a.a.r; import a.b.p.i0; import android.annotation.TargetApi; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.Gravity; import b.d.a.a.j; public class d extends i0 { public Drawable q; public final Rect r; public final Rect s; public int t; public boolean u; public boolean v; public d(Context context, AttributeSet attrs) { this(context, attrs, 0); } public d(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); this.r = new Rect(); this.s = new Rect(); this.t = 119; this.u = true; this.v = false; TypedArray a2 = f.h(context, attrs, j.ForegroundLinearLayout, defStyle, 0, new int[0]); this.t = a2.getInt(j.ForegroundLinearLayout_android_foregroundGravity, this.t); Drawable d2 = a2.getDrawable(j.ForegroundLinearLayout_android_foreground); if (d2 != null) { setForeground(d2); } this.u = a2.getBoolean(j.ForegroundLinearLayout_foregroundInsidePadding, true); a2.recycle(); } public int getForegroundGravity() { return this.t; } public void setForegroundGravity(int foregroundGravity) { if (this.t != foregroundGravity) { if ((8388615 & foregroundGravity) == 0) { foregroundGravity |= 8388611; } if ((foregroundGravity & 112) == 0) { foregroundGravity |= 48; } this.t = foregroundGravity; if (foregroundGravity == 119 && this.q != null) { this.q.getPadding(new Rect()); } requestLayout(); } } public boolean verifyDrawable(Drawable who) { return super.verifyDrawable(who) || who == this.q; } public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); Drawable drawable = this.q; if (drawable != null) { drawable.jumpToCurrentState(); } } public void drawableStateChanged() { super.drawableStateChanged(); Drawable drawable = this.q; if (drawable != null && drawable.isStateful()) { this.q.setState(getDrawableState()); } } public void setForeground(Drawable drawable) { Drawable drawable2 = this.q; if (drawable2 != drawable) { if (drawable2 != null) { drawable2.setCallback(null); unscheduleDrawable(this.q); } this.q = drawable; if (drawable != null) { setWillNotDraw(false); drawable.setCallback(this); if (drawable.isStateful()) { drawable.setState(getDrawableState()); } if (this.t == 119) { drawable.getPadding(new Rect()); } } else { setWillNotDraw(true); } requestLayout(); invalidate(); } } public Drawable getForeground() { return this.q; } @Override // a.b.p.i0 public void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); this.v |= changed; } public void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); this.v = true; } public void draw(Canvas canvas) { super.draw(canvas); if (this.q != null) { Drawable foreground = this.q; if (this.v) { this.v = false; Rect selfBounds = this.r; Rect overlayBounds = this.s; int w = getRight() - getLeft(); int h = getBottom() - getTop(); if (this.u) { selfBounds.set(0, 0, w, h); } else { selfBounds.set(getPaddingLeft(), getPaddingTop(), w - getPaddingRight(), h - getPaddingBottom()); } Gravity.apply(this.t, foreground.getIntrinsicWidth(), foreground.getIntrinsicHeight(), selfBounds, overlayBounds); foreground.setBounds(overlayBounds); } foreground.draw(canvas); } } @TargetApi(21) public void drawableHotspotChanged(float x, float y) { super.drawableHotspotChanged(x, y); Drawable drawable = this.q; if (drawable != null) { drawable.setHotspot(x, y); } } }
[ "zunmun@gmail.com" ]
zunmun@gmail.com
f8e4ac0cdee8f24d2a6294565e8adc355461509b
74c4c41f33683fbdbf91ae923ac51c735bb469a1
/app/src/main/java/hu/bme/aut/csmark/placesandroid/fragment/OwnPlacesFragment.java
1bdf466041df79c8787db72a8cda0bec1ea09330
[]
no_license
csmark97/PlacesAndroid
f4cbb7b701c70b7fa9555a79ba0d1dcab0a95816
9ca68d80ea28881dcb7362ad873db988d25e98b8
refs/heads/master
2020-07-31T18:39:02.004984
2019-09-24T23:13:10
2019-09-24T23:13:10
210,713,402
0
0
null
null
null
null
UTF-8
Java
false
false
3,304
java
package hu.bme.aut.csmark.placesandroid.fragment; import android.arch.persistence.room.Room; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import java.util.List; import hu.bme.aut.csmark.placesandroid.R; import hu.bme.aut.csmark.placesandroid.adapter.PlacesAdapter; import hu.bme.aut.csmark.placesandroid.model.place.Place; import hu.bme.aut.csmark.placesandroid.model.place.PlaceDatabase; /** * A simple {@link Fragment} subclass. */ public class OwnPlacesFragment extends Fragment implements PlacesAdapter.PlaceClickListener, AddPlaceFragment.AddPlaceListener { private RecyclerView recyclerView; private static PlacesAdapter adapter; private static PlaceDatabase database; private View contentView; private static long userId; public OwnPlacesFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment contentView = LayoutInflater.from(getContext()).inflate(R.layout.fragment_own_places, null); userId = getArguments().getLong(getString(R.string.userID)); database = Room.databaseBuilder( getActivity().getApplicationContext(), PlaceDatabase.class, getString(R.string.place) ).build(); recyclerView = contentView.findViewById(R.id.OwnPlaceRecyclerView); adapter = new PlacesAdapter(this, 1); loadOwnItemsInBackground(); recyclerView.setLayoutManager(new LinearLayoutManager(contentView.getContext())); recyclerView.setAdapter(adapter); recyclerView.setItemAnimator(new DefaultItemAnimator()); return contentView; } private static void loadOwnItemsInBackground() { new AsyncTask<Void, Void, List<Place>>() { @Override protected List<Place> doInBackground(Void... voids) { return database.placeDao().getAllOwn(userId); } @Override protected void onPostExecute(List<Place> places) { adapter.update(places); } }.execute(); } @Override public void onPlaceChanged(Place item) { } @Override public void onPlaceDeleted(final Place placeItem) { placeDeleted(placeItem); } private static void placeDeleted(final Place placeItem) { new AsyncTask<Void, Void, Boolean>() { @Override protected Boolean doInBackground(Void... voids) { database.placeDao().delete(placeItem); return true; } @Override protected void onPostExecute(Boolean isSuccessful) { Log.d("MainActivity", "Place deletion was successful"); } }.execute(); } @Override public void onPlaceCreated(Place newPlace) { } }
[ "36475822+csmark97@users.noreply.github.com" ]
36475822+csmark97@users.noreply.github.com
1e7771905a5bd429fbaa3ff54659a59e7de3a144
2dc6af7e02ca8d2f4b7644558efd59bed8657e64
/SystemX/testproj/testmod/src/main/java/test4/TypeC.java
7069e7f35693b12d0e850072f139080a8907b1a4
[ "MIT" ]
permissive
MSUSEL/msusel-software-injector
003950eb254dc30ad91176fa3d173b0cae9d2678
06cd41fd4fe188ee7a6684ab6f173490a66582b4
refs/heads/master
2023-05-28T13:00:59.488746
2021-10-29T17:52:10
2021-10-29T17:52:10
132,442,691
0
0
null
null
null
null
UTF-8
Java
false
false
1,641
java
/* * The MIT License (MIT) * * MSUSEL Software Injector * Copyright (c) 2015-2020 Montana State University, Gianforte School of Computing, * Software Engineering Laboratory and Idaho State University, Informatics and * Computer Science, Empirical Software Engineering Laboratory * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package test4; public class TypeC { private int cX; private int cY; private int cZ; public final void methodC1(int x) { this.cX = X; this.methodC2(); } public void methodC2() { } public void methodC3() { } }
[ "isaacgriffith@gmail.com" ]
isaacgriffith@gmail.com
ce900f987800e37f7c27440257a7da856d25b7e5
03962ab5d62340ddb1666b80a3aea8e7a60534d1
/component_base/src/main/java/com/framework/yison/component_base/base/mvc/BaseVcPermissionActivity.java
defd382482809adf62623c0f7651d005dced8cc7
[]
no_license
adai12388/framework
dc2f7e020338101291c447f1a5f9782b623c443e
caa75123f344c7ec28594047a19718c79bce8967
refs/heads/master
2020-04-12T02:39:06.404436
2018-12-18T07:38:29
2018-12-18T07:38:29
162,216,275
1
0
null
null
null
null
UTF-8
Java
false
false
4,943
java
package com.framework.yison.component_base.base.mvc; import android.app.Dialog; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.provider.Settings; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.view.View; import com.framework.yison.component_base.R; import com.framework.yison.component_base.dialog.MyAlertDialog; import com.framework.yison.component_base.util.L; /** * @Created by TOME . * @时间 2018/5/17 17:11 * @描述 ${permissionsdispatcher 处理权限管理} */ public abstract class BaseVcPermissionActivity extends BaseVcActivity { /***照相机权限*/ public static final int PERMISSION_CAMERA = 10001; /**文件管理权限*/ public static final int PERMISSION_STORAGE = 10002; /***电话权限*/ public static final int PERMISSION_PHONE = 10003; private boolean isShouldShow=false; public MyAlertDialog dialog; /**判断是否含有当前权限*/ public boolean getPermission(String permission,int requestCode){ L.d("申请权限!isGranted(permission)="+!isGranted(permission)); L.d("申请权限isMarshmallow="+isMarshmallow()); if (!isGranted(permission)&&isMarshmallow()){ //当前权限未授权,并且系统版本为6.0以上,需要申请权限 if (ActivityCompat.shouldShowRequestPermissionRationale(this,permission)){ isShouldShow = true; L.d("申请权限="+permission); ActivityCompat.requestPermissions(this,new String[]{permission},requestCode); }else{ L.d("没有申请权限="+permission); isShouldShow = false; showPresmissionDialog(requestCode); } return false; } return true; } /**判断当前是否已经授权*/ protected boolean isGranted(String permission){ int granted = ActivityCompat.checkSelfPermission(this, permission); return granted == PackageManager.PERMISSION_GRANTED; } /**判断当前版本为6.0以上*/ protected boolean isMarshmallow(){ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M; } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); if (permissions!=null&&permissions.length>0&&grantResults!=null&&grantResults.length>0){ int grantResult = grantResults[0]; String permission = permissions[0]; if (grantResult==PackageManager.PERMISSION_DENIED&&!ActivityCompat.shouldShowRequestPermissionRationale(this,permission)&&!isShouldShow){ //没有获取到权限,并且用户选择了不在提醒 showPresmissionDialog(requestCode); } } } private void showPresmissionDialog(int requestCode){ // dialog = new MyAlertDialog("权限设置",initView(requestCode),"取消",new String[]{"去设置"},null,this, AlertView.Style.Alert, IFlag.FLAG_SET_PERMISSION,this); dialog = new MyAlertDialog(this) .builder() .setTitle("权限设置") .setMsg(initView(requestCode)) .setNegativeButton("取消", new View.OnClickListener() { @Override public void onClick(View v) { dialog.dismiss(); } }).setPositiveButton("去设置", new MyAlertDialog.OnClickListenerAlertDialog() { @Override public void onClick(View v, Dialog dialog) { //去设置 dialog.dismiss(); Uri packageURI = Uri.parse("package:"+getPackageName()); Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,packageURI); startActivity(intent); } }); dialog.show(); } public String initView(int requestCode) { String message = ""; if (requestCode== BaseVcPermissionActivity.PERMISSION_CAMERA){ //照相机权限 message = getString(R.string.home_permission_camera); }else if(requestCode == BaseVcPermissionActivity.PERMISSION_PHONE){ //电话权限 message = getString(R.string.home_permission_phone); }else if(requestCode == BaseVcPermissionActivity.PERMISSION_STORAGE){ //文件操作权限 message = getString(R.string.home_permission_storage); }else{ message = getString(R.string.home_permission_default); } return message; // return requestCode+""; } }
[ "window_binyi@ibotn.com" ]
window_binyi@ibotn.com
8bd8b01c9e2ce75f28bf4fd701e0e0e5445038d7
023393924213255dbbc2dbeb97c14f11a40e34e3
/springcloud-parent/eureka/src/main/java/com/dkp/springcloud/dao/UserDao.java
7c5c1e28c4e5fbca8305cd1a6d6ab9af9318992d
[]
no_license
falcoKunPeng/springcloud_demo
e2eb693127507b9a2bd8b3763ebeaac642db2c20
4e7aaf6215b6232c57f3b36b18fb18b72e91a6c9
refs/heads/master
2020-06-26T01:18:59.786261
2019-07-30T07:13:18
2019-07-30T07:13:18
199,479,884
0
0
null
null
null
null
UTF-8
Java
false
false
197
java
package com.dkp.springcloud.dao; import org.springframework.stereotype.Component; import com.dkp.springcloud.domain.User; @Component public interface UserDao { public User findUser(); }
[ "2416534662@qq.com" ]
2416534662@qq.com
eeab499329989fe51941310e0969008cd612a8fb
027f6c5ece5214aada59f58edbdd221695d7247c
/design/src/main/java/com/lidaming/design11/bridge/Human.java
23341d5dd8c170c4eec2fb0de7debeb1aac40989
[]
no_license
IAMMing/designpattern
c3661d9922bcf74aa9ed53e22c9275c6391708a0
6a016f3a776e8ef0cf504100fded14d61d647a25
refs/heads/master
2021-01-10T17:47:07.563570
2016-05-06T05:43:21
2016-05-06T05:43:21
55,677,706
0
1
null
null
null
null
UTF-8
Java
false
false
210
java
package com.lidaming.design11.bridge; public abstract class Human implements IHuman { protected IAction action; public Human(IAction action) { this.action = action; } public abstract void party(); }
[ "hpucode@gmail.com" ]
hpucode@gmail.com
af0a84b087fd87a3deb4ae11e69033b4c0cef31b
c68ad3362704a9a4d34c060ab3ca7dafc5d104c0
/android/app/src/main/java/com/carpooling/project/MainActivity.java
cde68190686b8d7c16aa57802f5ac2eacc4fd8b2
[]
no_license
chahlaouy/er7ab
4e654c6b525299bd73caccfdd09f3fae9210446c
3bc19f5025677f0e104f82e1a866b856410678d6
refs/heads/main
2023-07-13T10:55:05.908014
2021-08-02T13:30:59
2021-08-02T13:30:59
391,960,107
0
0
null
null
null
null
UTF-8
Java
false
false
540
java
package com.carpooling.project; import android.os.Bundle; import com.getcapacitor.BridgeActivity; import com.getcapacitor.Plugin; import java.util.ArrayList; public class MainActivity extends BridgeActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Initializes the Bridge this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{ // Additional plugins you've installed go here // Ex: add(TotallyAwesomePlugin.class); }}); } }
[ "chahlaouy1991@gmail.com" ]
chahlaouy1991@gmail.com
8916187c84d855cb3656e498df80c9d12a6ecde2
fcae2399e4622e7e2cef495977c3837536abee7a
/src.java/org/anodyneos/sfs/impl/translater/ProcessorIf.java
8f10ce5711383f1e64340b0b952dabce5220fa27
[ "MIT" ]
permissive
vaamyob/aos-sfs
9942dda1e53d8f1d8dd11daf3c99b0a110cabc84
3fc57f8d4973cf8353028340aa16132f3a7d629b
refs/heads/master
2021-04-15T07:18:57.396000
2010-09-10T20:58:10
2010-09-10T20:58:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,401
java
package org.anodyneos.sfs.impl.translater; import org.anodyneos.commons.xml.sax.ElementProcessor; import org.anodyneos.sfs.impl.util.CodeWriter; import org.anodyneos.sfs.impl.util.Util; import org.xml.sax.Attributes; import org.xml.sax.SAXException; class ProcessorIf extends HelperProcessorNS { private ProcessorContent processorContent; private StringBuffer sb; public static final String A_TEST = "test"; public static final String A_EXPR = "expr"; public ProcessorIf(TranslaterContext ctx, ProcessorContent p) { super(ctx); this.processorContent = p; } public ElementProcessor getProcessorFor(String uri, String localName, String qName) throws SAXException { // looks like a new element is comming, so flush characters. flushCharacters(); return processorContent.getProcessorFor(uri, localName, qName); } public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { // handle "expr" attribute if exists String test = attributes.getValue(A_TEST); String expr = attributes.getValue(A_EXPR); CodeWriter out = getTranslaterContext().getCodeWriter(); out.printIndent().println("if(" + test + ") {"); out.indentPlus(); if (null != expr && expr.length() > 0) { out.printIndent().println("sfsContentHandler.characters(" + expr.trim() + ");"); } } // TODO: use processorContent for this public void characters(char[] ch, int start, int length) { if (null == sb) { sb = new StringBuffer(); } sb.append(ch, start, length); } private void flushCharacters() { // what about strip-space? Is this what we want? Configurable? CodeWriter out = getTranslaterContext().getCodeWriter(); if (sb != null) { String s = sb.toString(); String t = s.trim(); // don't output if only whitespace if (! "".equals(t)) { out.printIndent().println("sfsContentHandler.characters(" + Util.escapeStringQuoted(s) + ");"); } sb = null; } } public void endElement(String uri, String localName, String qName) { flushCharacters(); CodeWriter out = getTranslaterContext().getCodeWriter(); out.endBlock(); } }
[ "git@netcc.us" ]
git@netcc.us
4ffd8ee6224dbc0f14a504bb842c6a962487b9a5
7b086612885df67f8dd70228115fc369f665d09c
/gmall-mbg/src/main/java/com/hz/gmall/pms/entity/ProductAttribute.java
e78e8339b73793f124bbf7785085006e5bbecedb
[]
no_license
Natvel/gmall-parent
1ec656a286fbb70b9bb2eb9b4d5050c853fe946d
a869e5b7ced9b890fd6c424fd23786b4d55c21aa
refs/heads/master
2023-08-31T00:44:13.127684
2020-05-11T15:06:52
2020-05-11T15:06:52
250,538,698
1
0
null
null
null
null
UTF-8
Java
false
false
2,381
java
package com.hz.gmall.pms.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** * <p> * 商品属性参数表 * </p> * * @author Enzo * @since 2020-03-30 */ @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) @TableName("pms_product_attribute") @ApiModel(value="ProductAttribute对象", description="商品属性参数表") public class ProductAttribute implements Serializable { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Long id; @TableField("product_attribute_category_id") private Long productAttributeCategoryId; @TableField("name") private String name; @ApiModelProperty(value = "属性选择类型:0->唯一;1->单选;2->多选") @TableField("select_type") private Integer selectType; @ApiModelProperty(value = "属性录入方式:0->手工录入;1->从列表中选取") @TableField("input_type") private Integer inputType; @ApiModelProperty(value = "可选值列表,以逗号隔开") @TableField("input_list") private String inputList; @ApiModelProperty(value = "排序字段:最高的可以单独上传图片") @TableField("sort") private Integer sort; @ApiModelProperty(value = "分类筛选样式:1->普通;1->颜色") @TableField("filter_type") private Integer filterType; @ApiModelProperty(value = "检索类型;0->不需要进行检索;1->关键字检索;2->范围检索") @TableField("search_type") private Integer searchType; @ApiModelProperty(value = "相同属性产品是否关联;0->不关联;1->关联") @TableField("related_status") private Integer relatedStatus; @ApiModelProperty(value = "是否支持手动新增;0->不支持;1->支持") @TableField("hand_add_status") private Integer handAddStatus; @ApiModelProperty(value = "属性的类型;0->规格;1->参数") @TableField("type") private Integer type; }
[ "13586541001@163.com" ]
13586541001@163.com
90f64f1a55e75447264959f6fd599976cead3939
c2e6f7c40edce79fd498a5bbaba4c2d69cf05e0c
/src/main/java/com/google/android/gms/maps/internal/zzbz.java
75bd9793a094d3b4429e6ba30dda556074b5df21
[]
no_license
pengju1218/decompiled-apk
7f64ee6b2d7424b027f4f112c77e47cd420b2b8c
b60b54342a8e294486c45b2325fb78155c3c37e6
refs/heads/master
2022-03-23T02:57:09.115704
2019-12-28T23:13:07
2019-12-28T23:13:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,836
java
package com.google.android.gms.maps.internal; import android.annotation.SuppressLint; import android.content.Context; import android.util.Log; import androidx.annotation.Nullable; import com.google.android.gms.common.GooglePlayServicesUtil; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.dynamite.DynamiteModule; public class zzbz { private static final String TAG = "zzbz"; @SuppressLint({"StaticFieldLeak"}) @Nullable private static Context zzck; private static zze zzcl; /* JADX WARNING: type inference failed for: r1v4, types: [android.os.IInterface] */ /* JADX WARNING: Multi-variable type inference failed */ /* JADX WARNING: Unknown variable types count: 1 */ /* Code decompiled incorrectly, please refer to instructions dump. */ public static com.google.android.gms.maps.internal.zze zza(android.content.Context r3) { /* com.google.android.gms.common.internal.Preconditions.checkNotNull(r3) com.google.android.gms.maps.internal.zze r0 = zzcl if (r0 == 0) goto L_0x0008 return r0 L_0x0008: r0 = 13400000(0xcc77c0, float:1.87774E-38) int r0 = com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(r3, r0) if (r0 != 0) goto L_0x005f java.lang.String r0 = TAG java.lang.String r1 = "Making Creator dynamically" android.util.Log.i(r0, r1) android.content.Context r0 = zzb(r3) java.lang.ClassLoader r0 = r0.getClassLoader() java.lang.String r1 = "com.google.android.gms.maps.internal.CreatorImpl" java.lang.Object r0 = zza(r0, r1) android.os.IBinder r0 = (android.os.IBinder) r0 if (r0 != 0) goto L_0x002c r0 = 0 goto L_0x0040 L_0x002c: java.lang.String r1 = "com.google.android.gms.maps.internal.ICreator" android.os.IInterface r1 = r0.queryLocalInterface(r1) boolean r2 = r1 instanceof com.google.android.gms.maps.internal.zze if (r2 == 0) goto L_0x003a r0 = r1 com.google.android.gms.maps.internal.zze r0 = (com.google.android.gms.maps.internal.zze) r0 goto L_0x0040 L_0x003a: com.google.android.gms.maps.internal.zzf r1 = new com.google.android.gms.maps.internal.zzf r1.<init>(r0) r0 = r1 L_0x0040: zzcl = r0 com.google.android.gms.maps.internal.zze r0 = zzcl // Catch:{ RemoteException -> 0x0058 } android.content.Context r3 = zzb(r3) // Catch:{ RemoteException -> 0x0058 } android.content.res.Resources r3 = r3.getResources() // Catch:{ RemoteException -> 0x0058 } com.google.android.gms.dynamic.IObjectWrapper r3 = com.google.android.gms.dynamic.ObjectWrapper.wrap(r3) // Catch:{ RemoteException -> 0x0058 } int r1 = com.google.android.gms.common.GooglePlayServicesUtil.GOOGLE_PLAY_SERVICES_VERSION_CODE // Catch:{ RemoteException -> 0x0058 } r0.zza((com.google.android.gms.dynamic.IObjectWrapper) r3, (int) r1) // Catch:{ RemoteException -> 0x0058 } com.google.android.gms.maps.internal.zze r3 = zzcl return r3 L_0x0058: r3 = move-exception com.google.android.gms.maps.model.RuntimeRemoteException r0 = new com.google.android.gms.maps.model.RuntimeRemoteException r0.<init>(r3) throw r0 L_0x005f: com.google.android.gms.common.GooglePlayServicesNotAvailableException r3 = new com.google.android.gms.common.GooglePlayServicesNotAvailableException r3.<init>(r0) throw r3 */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.maps.internal.zzbz.zza(android.content.Context):com.google.android.gms.maps.internal.zze"); } private static <T> T zza(Class<?> cls) { try { return cls.newInstance(); } catch (InstantiationException unused) { String valueOf = String.valueOf(cls.getName()); throw new IllegalStateException(valueOf.length() != 0 ? "Unable to instantiate the dynamic class ".concat(valueOf) : new String("Unable to instantiate the dynamic class ")); } catch (IllegalAccessException unused2) { String valueOf2 = String.valueOf(cls.getName()); throw new IllegalStateException(valueOf2.length() != 0 ? "Unable to call the default constructor of ".concat(valueOf2) : new String("Unable to call the default constructor of ")); } } private static <T> T zza(ClassLoader classLoader, String str) { try { return zza(((ClassLoader) Preconditions.checkNotNull(classLoader)).loadClass(str)); } catch (ClassNotFoundException unused) { String valueOf = String.valueOf(str); throw new IllegalStateException(valueOf.length() != 0 ? "Unable to find dynamic class ".concat(valueOf) : new String("Unable to find dynamic class ")); } } @Nullable private static Context zzb(Context context) { Context context2 = zzck; if (context2 != null) { return context2; } Context zzc = zzc(context); zzck = zzc; return zzc; } @Nullable private static Context zzc(Context context) { try { return DynamiteModule.load(context, DynamiteModule.PREFER_REMOTE, "com.google.android.gms.maps_dynamite").getModuleContext(); } catch (Exception e) { Log.e(TAG, "Failed to load maps module, use legacy", e); return GooglePlayServicesUtil.getRemoteContext(context); } } }
[ "apoorwaand@gmail.com" ]
apoorwaand@gmail.com
064e041f4c5aac6ccbd63a9d7cf98f565b0ddd72
ca9215dddedfd8954ed94c2e8706b7816f5bb44b
/xoado/xoado-organize/src/main/java/com/xoado/organize/pojo/OrganizeXoadoT.java
182288046fd37da4d268a6e727299097e5431920
[]
no_license
xoadoCompany/xoado
13446553dc12004f53536178d7db8e9637697912
4865368b4d920f4a51eb6e9b540e32e9ca498b23
refs/heads/master
2020-03-29T04:42:41.939479
2018-10-09T03:48:43
2018-10-09T03:48:43
146,867,612
0
0
null
null
null
null
UTF-8
Java
false
false
432
java
package com.xoado.organize.pojo; public class OrganizeXoadoT { private String organizeid; private String organizeName; public String getOrganizeid() { return organizeid; } public void setOrganizeid(String organizeid) { this.organizeid = organizeid; } public String getOrganizeName() { return organizeName; } public void setOrganizeName(String organizeName) { this.organizeName = organizeName; } }
[ "42627661+xoadogithub@users.noreply.github.com" ]
42627661+xoadogithub@users.noreply.github.com
ddfe17585cfb6d4231215570e83107083c612ae8
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-eflo-controller/src/main/java/com/aliyuncs/eflo_controller/model/v20221215/TagResourcesResponse.java
ec4f0fb952089a797e4c4df34bab9fdc41aedfd3
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,310
java
/* * 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.aliyuncs.eflo_controller.model.v20221215; import com.aliyuncs.AcsResponse; import com.aliyuncs.eflo_controller.transform.v20221215.TagResourcesResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class TagResourcesResponse extends AcsResponse { private String requestId; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } @Override public TagResourcesResponse getInstance(UnmarshallerContext context) { return TagResourcesResponseUnmarshaller.unmarshall(this, context); } @Override public boolean checkShowJsonItemName() { return false; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
ed8511a82fd3c198a215c64c16d5be02a1c1b5b0
517aa4435465728af772bfc1d2314438cde34937
/src/main/java/feedy/domain/Task.java
df13ba57e03409933440736e95c4001e59747025
[]
no_license
CalinAndrea/feedy
98954628f0c051968bc3c283828c6bed01df353f
ed2a38bc3bebe80bc3935509825e1379f0081335
refs/heads/master
2021-01-22T22:09:20.966790
2017-03-19T22:41:46
2017-03-19T22:41:46
85,513,340
0
0
null
null
null
null
UTF-8
Java
false
false
1,767
java
package feedy.domain; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "task_list") public class Task { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "task_id") private int id; @Column(name = "task_name") private String taskName; @Column(name = "task_description") private String taskDescription; @Column(name = "task_priority") private String taskPriority; @Column(name = "task_status") private String taskStatus; @Column(name = "task_archived") private int taskArchived = 0; public int getTaskId() { return id; } public void setTaskId(int taskId) { this.id = taskId; } public String getTaskName() { return taskName; } public void setTaskName(String taskName) { this.taskName = taskName; } public String getTaskDescription() { return taskDescription; } public void setTaskDescription(String taskDescription) { this.taskDescription = taskDescription; } public String getTaskPriority() { return taskPriority; } public void setTaskPriority(String taskPriority) { this.taskPriority = taskPriority; } public String getTaskStatus() { return taskStatus; } public void setTaskStatus(String taskStatus) { this.taskStatus = taskStatus; } public int isTaskArchived() { return taskArchived; } public void setTaskArchived(int taskArchived) { this.taskArchived = taskArchived; } @Override public String toString() { return "Task [id=" + id + ", taskName=" + taskName + ", taskDescription=" + taskDescription + ", taskPriority=" + taskPriority + ",taskStatus=" + taskStatus + "]"; } }
[ "andrea.n.calin@gmail.com" ]
andrea.n.calin@gmail.com
bd6eec714941e6f6275f98793d8e5487540f7e17
ae5fb8e762559c13d09c0724f95f8e0dbbe6a58d
/ext/bundles/org.springframework.web/src/main/java/org/springframework/web/context/support/RequestHandledEvent.java
cdb75aef75460860a41587c677154c216f7613ad
[ "Apache-2.0" ]
permissive
GIP-RECIA/esco-grouper-ui
1b840844aa18ea6a752399b4ba8441fd08766aa1
d48ad3cb0a71d5811bbd49f9e6911ee778af1c78
refs/heads/master
2021-01-10T17:30:30.880810
2014-09-02T08:11:55
2014-09-02T08:11:55
8,556,656
0
1
null
2014-09-02T08:11:55
2013-03-04T14:01:17
Java
UTF-8
Java
false
false
5,489
java
/** * Copyright (C) 2009 GIP RECIA http://www.recia.fr * @Author (C) 2009 GIP RECIA <contact@recia.fr> * @Contributor (C) 2009 SOPRA http://www.sopragroup.com/ * @Contributor (C) 2011 Pierre Legay <pierre.legay@recia.fr> * * 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. */ /* * Copyright 2002-2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.context.support; import org.springframework.context.ApplicationEvent; /** * Event raised when a request is handled within an ApplicationContext. * * <p>Supported by Spring's own FrameworkServlet (through a specific * ServletRequestHandledEvent subclass), but can also be raised by any * other web component. Used, for example, by Spring's out-of-the-box * PerformanceMonitorListener. * * @author Rod Johnson * @author Juergen Hoeller * @since January 17, 2001 * @see ServletRequestHandledEvent * @see PerformanceMonitorListener * @see org.springframework.web.servlet.FrameworkServlet * @see org.springframework.context.ApplicationContext#publishEvent */ public class RequestHandledEvent extends ApplicationEvent { /** Session id that applied to the request, if any */ private String sessionId; /** Usually the UserPrincipal */ private String userName; /** Request processing time */ private final long processingTimeMillis; /** Cause of failure, if any */ private Throwable failureCause; /** * Create a new RequestHandledEvent with session information. * @param source the component that published the event * @param sessionId the id of the HTTP session, if any * @param userName the name of the user that was associated with the * request, if any (usually the UserPrincipal) * @param processingTimeMillis the processing time of the request in milliseconds */ public RequestHandledEvent(Object source, String sessionId, String userName, long processingTimeMillis) { super(source); this.sessionId = sessionId; this.userName = userName; this.processingTimeMillis = processingTimeMillis; } /** * Create a new RequestHandledEvent with session information. * @param source the component that published the event * @param sessionId the id of the HTTP session, if any * @param userName the name of the user that was associated with the * request, if any (usually the UserPrincipal) * @param processingTimeMillis the processing time of the request in milliseconds * @param failureCause the cause of failure, if any */ public RequestHandledEvent( Object source, String sessionId, String userName, long processingTimeMillis, Throwable failureCause) { this(source, sessionId, userName, processingTimeMillis); this.failureCause = failureCause; } /** * Return the processing time of the request in milliseconds. */ public long getProcessingTimeMillis() { return this.processingTimeMillis; } /** * Return the id of the HTTP session, if any. */ public String getSessionId() { return this.sessionId; } /** * Return the name of the user that was associated with the request * (usually the UserPrincipal). * @see javax.servlet.http.HttpServletRequest#getUserPrincipal() */ public String getUserName() { return this.userName; } /** * Return whether the request failed. */ public boolean wasFailure() { return (this.failureCause != null); } /** * Return the cause of failure, if any. */ public Throwable getFailureCause() { return this.failureCause; } /** * Return a short description of this event, only involving * the most important context data. */ public String getShortDescription() { StringBuffer sb = new StringBuffer(); sb.append("session=[").append(this.sessionId).append("]; "); sb.append("user=[").append(this.userName).append("]; "); return sb.toString(); } /** * Return a full description of this event, involving * all available context data. */ public String getDescription() { StringBuffer sb = new StringBuffer(); sb.append("session=[").append(this.sessionId).append("]; "); sb.append("user=[").append(this.userName).append("]; "); sb.append("time=[").append(this.processingTimeMillis).append("ms]; "); sb.append("status=["); if (!wasFailure()) { sb.append("OK"); } else { sb.append("failed: ").append(this.failureCause); } sb.append(']'); return sb.toString(); } public String toString() { return ("RequestHandledEvent: " + getDescription()); } }
[ "julien.gribonvald@gmail.com" ]
julien.gribonvald@gmail.com
d88b5e24a3867f3bd8f486f92cce996e5d7b9567
84eaeb699f9ebeb21c53b7e3f3b3eed5f3231261
/src/main/java/com/tai/bookmaker/repository/package-info.java
5ab46da269a7011df137f7040dc308b74c6465bf
[]
no_license
MF57/bookmaker
53f4edfdab7cb525eb0d8f94098da2e2a2acdf31
fd241adb87482c79c65822c6add9187a05feb72b
refs/heads/master
2021-01-17T12:38:02.081778
2016-06-27T18:23:09
2016-06-27T18:23:09
58,805,201
1
0
null
null
null
null
UTF-8
Java
false
false
79
java
/** * Spring Data JPA repositories. */ package com.tai.bookmaker.repository;
[ "p-bochenek@outlook.com" ]
p-bochenek@outlook.com
eeeda830816a84d929261781f6a7b8252df91286
24bc32e0a59c1def4fe5c42110e48e23c39bd288
/LeetCode/src/Medium/no18/Solution.java
e97f628a28d81f5effb0eb29135bd902d9cc79e3
[]
no_license
Sword-Is-Cat/LeetCode
01e47108153d816947cad48f4b073a1743dd46c8
73b08b0945810fb4b976a2a5d3bc46cefbd923b6
refs/heads/master
2023-08-30T21:45:58.136842
2023-08-29T00:22:35
2023-08-29T00:22:35
253,831,514
0
0
null
null
null
null
UTF-8
Java
false
false
765
java
package Medium.no18; import java.util.ArrayList; import java.util.Arrays; import java.util.List; class Solution { List<List<Integer>> answer; int[] num; Integer[] arr; public List<List<Integer>> fourSum(int[] nums, int target) { answer = new ArrayList<>(); arr = new Integer[4]; Arrays.sort(nums); num = nums; process(0, -1, 0, target); return answer; } void process(int depth, int index, int sum, int target) { if (depth == 4) { if (sum == target) answer.add(Arrays.asList(arr.clone())); return; } int checkDupl = 1000000001; for (int i = index + 1; i < num.length; i++) { if (num[i] == checkDupl) continue; checkDupl = num[i]; arr[depth] = num[i]; process(depth + 1, i, sum + num[i], target); } } }
[ "jhbsp@naver.com" ]
jhbsp@naver.com
f90fd75e4e622b73b73801d5242fdded25ab89bf
e3919b97faf9bdb7bacbb126208bc9b0676184de
/dtm-query-execution-core/src/test/java/io/arenadata/dtm/query/execution/core/dml/service/view/ViewReplacerServiceTest.java
c1950466dc7fcf6d7e8463c3312e90b6e76282cd
[ "Apache-2.0" ]
permissive
atester-1/prostore
023dec4cafd0d0296fcfff513056255b6ef016d1
6cff3b49ebd35edd8df7b92f991df41745b0ca6a
refs/heads/master
2023-06-18T19:11:43.535104
2021-07-20T08:25:42
2021-07-20T08:25:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
45,595
java
/* * Copyright © 2021 ProStore * * 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 io.arenadata.dtm.query.execution.core.dml.service.view; import io.arenadata.dtm.common.delta.DeltaInformation; import io.arenadata.dtm.common.delta.DeltaType; import io.arenadata.dtm.common.delta.SelectOnInterval; import io.arenadata.dtm.common.exception.DeltaRangeInvalidException; import io.arenadata.dtm.common.model.ddl.Entity; import io.arenadata.dtm.common.model.ddl.EntityType; import io.arenadata.dtm.query.calcite.core.configuration.CalciteCoreConfiguration; import io.arenadata.dtm.query.calcite.core.service.DefinitionService; import io.arenadata.dtm.query.calcite.core.util.CalciteUtil; import io.arenadata.dtm.query.execution.core.base.repository.ServiceDbFacade; import io.arenadata.dtm.query.execution.core.base.repository.ServiceDbFacadeImpl; import io.arenadata.dtm.query.execution.core.base.repository.zookeeper.EntityDao; import io.arenadata.dtm.query.execution.core.base.repository.zookeeper.ServiceDbDao; import io.arenadata.dtm.query.execution.core.base.repository.zookeeper.impl.EntityDaoImpl; import io.arenadata.dtm.query.execution.core.base.repository.zookeeper.impl.ServiceDbDaoImpl; import io.arenadata.dtm.query.execution.core.base.service.delta.DeltaInformationExtractor; import io.arenadata.dtm.query.execution.core.base.service.delta.DeltaInformationService; import io.arenadata.dtm.query.execution.core.calcite.configuration.CalciteConfiguration; import io.arenadata.dtm.query.execution.core.calcite.service.CoreCalciteDefinitionService; import io.vertx.core.Future; import io.vertx.junit5.VertxTestContext; import lombok.extern.slf4j.Slf4j; import lombok.val; import org.apache.calcite.sql.SqlNode; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.concurrent.TimeUnit; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @Slf4j class ViewReplacerServiceTest { public static final String EXPECTED_WITHOUT_JOIN = "SELECT `v`.`col1` AS `c`, `v`.`col2` AS `r`\n" + "FROM (SELECT `col4`, `col5`\n" + "FROM `tblx` FOR SYSTEM_TIME AS OF '2019-12-23 15:15:14'\n" + "WHERE `tblx`.`col6` = 0) AS `v`"; public static final String EXPECTED_WITH_JOIN = "SELECT `v`.`col1` AS `c`, `v`.`col2` AS `r`\n" + "FROM `tbl` FOR SYSTEM_TIME AS OF '2019-12-23 15:15:14' AS `t`\n" + "INNER JOIN (SELECT `col4`, `col5`\n" + "FROM `tblx` FOR SYSTEM_TIME AS OF '2018-07-29 23:59:59'\n" + "WHERE `tblx`.`col6` = 0) AS `v` ON `t`.`col3` = `v`.`col4`"; public static final String EXPECTED_WITH_JOIN_WITHOUT_ALIAS = "SELECT `view`.`col1` AS `c`, `view`.`col2` AS `r`\n" + "FROM (SELECT `col4`, `col5`\n" + "FROM `tblx`\n" + "WHERE `tblx`.`col6` = 0) AS `view`"; public static final String EXPECTED_WITH_JOIN_AND_WHERE = "SELECT `v`.`col1` AS `c`, `v`.`col2` AS `r`\n" + "FROM `tbl` FOR SYSTEM_TIME AS OF '2019-12-23 15:15:14' AS `t`\n" + "INNER JOIN (SELECT `col4`, `col5`\n" + "FROM `tblx` FOR SYSTEM_TIME AS OF '2018-07-29 23:59:59'\n" + "WHERE `tblx`.`col6` = 0) AS `v` ON `t`.`col3` = `v`.`col4`\n" + "WHERE EXISTS (SELECT `id`\n" + "FROM (SELECT `col4`, `col5`\n" + "FROM `tblx`\n" + "WHERE `tblx`.`col6` = 0) AS `view`)"; public static final String EXPECTED_WITH_SELECT = "SELECT `t`.`col1` AS `c`, (SELECT `id`\n" + "FROM (SELECT `col4`, `col5`\n" + "FROM `tblx`\n" + "WHERE `tblx`.`col6` = 0) AS `view`\n" + "LIMIT 1) AS `r`\n" + "FROM `tblt` AS `t`"; public static final String EXPECTED_WITH_DATAMART = "SELECT `v`.`col1` AS `c`, `v`.`col2` AS `r`\n" + "FROM (SELECT `col4`, `col5`\n" + "FROM `tblx`\n" + "WHERE `tblx`.`col6` = 0) AS `v`"; public static final String EXPECTED_WITH_DELTA_NUM = "SELECT `v`.`col1` AS `c`, `v`.`col2` AS `r`\n" + "FROM (SELECT `col4`, `col5`\n" + "FROM `tblx` FOR SYSTEM_TIME AS OF DELTA_NUM 5\n" + "WHERE `tblx`.`col6` = 0) AS `v`"; private final CalciteConfiguration config = new CalciteConfiguration(); private final ServiceDbFacade serviceDbFacade = mock(ServiceDbFacadeImpl.class); private final ServiceDbDao serviceDbDao = mock(ServiceDbDaoImpl.class); private final EntityDao entityDao = mock(EntityDaoImpl.class); private final CalciteCoreConfiguration calciteCoreConfiguration = new CalciteCoreConfiguration(); private final DefinitionService<SqlNode> definitionService = new CoreCalciteDefinitionService(config.configEddlParser(calciteCoreConfiguration.eddlParserImplFactory())); private final LogicViewReplacer logicViewReplacer = new LogicViewReplacer(definitionService); private final DeltaInformationExtractor deltaInformationExtractor = mock(DeltaInformationExtractor.class); private final DeltaInformationService deltaInformationService = mock(DeltaInformationService.class); private final MaterializedViewReplacer materializedViewReplacer = new MaterializedViewReplacer(definitionService, deltaInformationExtractor, deltaInformationService); private final ViewReplacerService viewReplacerService = new ViewReplacerService(entityDao, logicViewReplacer, materializedViewReplacer); private VertxTestContext testContext; @BeforeEach void setUp() { when(serviceDbFacade.getServiceDbDao()).thenReturn(serviceDbDao); when(serviceDbDao.getEntityDao()).thenReturn(entityDao); testContext = new VertxTestContext(); } @AfterEach public void check() throws InterruptedException { assertThat(testContext.awaitCompletion(5, TimeUnit.SECONDS)).isTrue(); if (testContext.failed()) { fail(testContext.causeOfFailure()); } } @Test @SuppressWarnings("unchecked") void withoutJoin() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.VIEW) .name("view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM test.view FOR SYSTEM_TIME AS OF '2019-12-23 15:15:14' v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines(EXPECTED_WITHOUT_JOIN); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void withDatamart() { when(entityDao.getEntity(any(), any())) .thenReturn(Future.succeededFuture(Entity.builder() .entityType(EntityType.VIEW) .name("view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM test.view v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines(EXPECTED_WITH_DATAMART); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void withoutJoin_withoutAlias() { when(entityDao.getEntity(any(), any())) .thenReturn(Future.succeededFuture(Entity.builder() .entityType(EntityType.VIEW) .name("view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val sql = "SELECT view.Col1 as c, view.Col2 r\n" + "FROM view"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines(EXPECTED_WITH_JOIN_WITHOUT_ALIAS); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void withJoin() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tbl") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.VIEW) .name("view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM tbl FOR SYSTEM_TIME AS OF '2019-12-23 15:15:14' t\n" + "JOIN view FOR SYSTEM_TIME AS OF '2018-07-29 23:59:59' v\n" + "ON t.Col3 = v.Col4"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines(EXPECTED_WITH_JOIN); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void withJoinAndWhere() { when(entityDao.getEntity(any(), any())) .thenReturn(Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tbl") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.VIEW) .name("view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.VIEW) .name("view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM tbl FOR SYSTEM_TIME AS OF '2019-12-23 15:15:14' t\n" + "JOIN view FOR SYSTEM_TIME AS OF '2018-07-29 23:59:59' v\n" + "ON t.Col3 = v.Col4 \n" + "WHERE exists (select id from view)"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines(EXPECTED_WITH_JOIN_AND_WHERE); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void withJoinAndSelect() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.VIEW) .name("view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblt") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val sql = "SELECT t.Col1 as c, (select id from view limit 1) r\n" + "FROM tblt t"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines(EXPECTED_WITH_SELECT); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void testMatViewNotReplacedWhenNoHints() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .name("mat_view") .build()) ); val deltaInformation = new DeltaInformation( "", null, false, DeltaType.WITHOUT_SNAPSHOT, null, null, "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT * FROM mat_view v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines("SELECT *\nFROM `mat_view` AS `v`"); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void testMatViewWithoutDeltaNumReplacedForSystemTime() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(null) // Never synced .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", "'2019-12-23 15:15:14'", false, DeltaType.DATETIME, null, null, "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); doAnswer(answer -> Future.succeededFuture(5L)).when(deltaInformationService) .getDeltaNumByDatetime("datamart", CalciteUtil.parseLocalDateTime("2019-12-23 15:15:14")); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME AS OF '2019-12-23 15:15:14' v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines(EXPECTED_WITHOUT_JOIN); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void testMatViewReplacedForSystemTimeWhenNotSync() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(4L) // deltaNum 4 is less then requested delta 5 below .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", "'2019-12-23 15:15:14'", false, DeltaType.DATETIME, null, null, "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); doAnswer(answer -> Future.succeededFuture(5L)).when(deltaInformationService) .getDeltaNumByDatetime("datamart", CalciteUtil.parseLocalDateTime("2019-12-23 15:15:14")); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME AS OF '2019-12-23 15:15:14' v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines(EXPECTED_WITHOUT_JOIN); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void testMatViewNotReplacedForSystemTimeWhenSync() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(6L) // deltaNum 6 is greater then requested delta 5 below .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", "'2019-12-23 15:15:14'", false, DeltaType.DATETIME, null, null, "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); doAnswer(answer -> Future.succeededFuture(5L)).when(deltaInformationService) .getDeltaNumByDatetime("datamart", CalciteUtil.parseLocalDateTime("2019-12-23 15:15:14")); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME AS OF '2019-12-23 15:15:14' v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()) .isEqualToNormalizingNewlines("SELECT `v`.`col1` AS `c`, `v`.`col2` AS `r`\nFROM `mat_view` FOR SYSTEM_TIME AS OF '2019-12-23 15:15:14' AS `v`"); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void testMatViewWithoutDeltaNumReplacedForDeltaNum() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(null) // Never synced .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", null, false, DeltaType.NUM, 5L, null, "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME AS OF DELTA_NUM 5 v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines(EXPECTED_WITH_DELTA_NUM); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void testMatViewReplacedForDeltaNumWhenNotSynced() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(4L) // Less then delta from the request. Replace .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", null, false, DeltaType.NUM, 5L, null, "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME AS OF DELTA_NUM 5 v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines(EXPECTED_WITH_DELTA_NUM); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void testMatViewNotReplacedForDeltaNumWhenSynced() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(5L) // Equals to delta from the request. Not replacing .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", null, false, DeltaType.NUM, 5L, null, "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME AS OF DELTA_NUM 5 v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines("SELECT `v`.`col1` AS `c`, `v`.`col2` AS `r`\n" + "FROM `mat_view` FOR SYSTEM_TIME AS OF DELTA_NUM 5 AS `v`"); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void testLatestUncommittedDeltaIsNotSupportedForMatViews() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(10L) .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", null, true, DeltaType.NUM, null, null, "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME AS OF LATEST_UNCOMMITTED_DELTA v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { // DeltaRangeInvalidException is expected, the test should fail testContext.failNow(sqlResult.cause()); } else { assertThat(sqlResult.cause()).isInstanceOf(DeltaRangeInvalidException.class); testContext.completeNow(); } }); } @Test @SuppressWarnings("unchecked") void testMatViewThrowsErrorForStartedInWrongPeriod() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(5L) // 5 is less than "to": (2, 6) .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", null, false, DeltaType.STARTED_IN, null, new SelectOnInterval(2L, 6L), "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME STARTED IN (2, 6) v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { // DeltaRangeInvalidException is expected, the test should fail testContext.failNow(sqlResult.cause()); } else { assertThat(sqlResult.cause()).isInstanceOf(DeltaRangeInvalidException.class); testContext.completeNow(); } }); } @Test @SuppressWarnings("unchecked") void testMatViewThrowsErrorForStartedInWhenNotSynced() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(null) // never synced .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", null, false, DeltaType.STARTED_IN, null, new SelectOnInterval(2L, 6L), "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME STARTED IN (2, 6) v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { // DeltaRangeInvalidException is expected, the test should fail testContext.failNow(sqlResult.cause()); } else { assertThat(sqlResult.cause()).isInstanceOf(DeltaRangeInvalidException.class); testContext.completeNow(); } }); } @Test @SuppressWarnings("unchecked") void testMatViewForStartedIn() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(15L) // 15 is considered "sync" for period: (10, 15) .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", null, false, DeltaType.STARTED_IN, null, new SelectOnInterval(10L, 15L), "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME STARTED IN (10, 15) v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines("SELECT `v`.`col1` AS `c`, `v`.`col2` AS `r`\n" + "FROM `mat_view` FOR SYSTEM_TIME STARTED IN (10,15) AS `v`"); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } @Test @SuppressWarnings("unchecked") void testMatViewThrowsErrorForFinishedInWrongPeriod() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(5L) // 5 is less than "to": (2, 6) .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", null, false, DeltaType.FINISHED_IN, null, new SelectOnInterval(2L, 6L), "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME FINISHED IN (2, 6) v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { // DeltaRangeInvalidException is expected, the test should fail testContext.failNow(sqlResult.cause()); } else { assertThat(sqlResult.cause()).isInstanceOf(DeltaRangeInvalidException.class); testContext.completeNow(); } }); } @Test @SuppressWarnings("unchecked") void testMatViewThrowsErrorForFinishedInWhenNotSynced() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(null) // never synced .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", null, false, DeltaType.FINISHED_IN, null, new SelectOnInterval(2L, 6L), "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME FINISHED IN (2, 6) v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { // DeltaRangeInvalidException is expected, the test should fail testContext.failNow(sqlResult.cause()); } else { assertThat(sqlResult.cause()).isInstanceOf(DeltaRangeInvalidException.class); testContext.completeNow(); } }); } @Test @SuppressWarnings("unchecked") void testMatViewForFinishedIn() { when(entityDao.getEntity(any(), any())) .thenReturn( Future.succeededFuture(Entity.builder() .entityType(EntityType.MATERIALIZED_VIEW) .materializedDeltaNum(15L) // 15 is considered "sync" for period: (10, 15) .name("mat_view") .viewQuery("SELECT Col4, Col5 \n" + "FROM tblX \n" + "WHERE tblX.Col6 = 0") .build()), Future.succeededFuture(Entity.builder() .entityType(EntityType.TABLE) .name("tblX") .build()) ); val deltaInformation = new DeltaInformation( "", null, false, DeltaType.FINISHED_IN, null, new SelectOnInterval(10L, 15L), "datamart", "mat_view", null ); when(deltaInformationExtractor.getDeltaInformation(any(), any())) .thenReturn(deltaInformation); val sql = "SELECT v.Col1 as c, v.Col2 r\n" + "FROM mat_view FOR SYSTEM_TIME FINISHED IN (10, 15) v"; SqlNode sqlNode = definitionService.processingQuery(sql); viewReplacerService.replace(sqlNode, "datamart") .onComplete(sqlResult -> { if (sqlResult.succeeded()) { assertThat(sqlResult.result().toString()).isEqualToNormalizingNewlines("SELECT `v`.`col1` AS `c`, `v`.`col2` AS `r`\n" + "FROM `mat_view` FOR SYSTEM_TIME FINISHED IN (10,15) AS `v`"); testContext.completeNow(); } else { testContext.failNow(sqlResult.cause()); } }); } }
[ "artem.krutov@genesys.com" ]
artem.krutov@genesys.com
0c8dafddc12aa4aebcd5376d73150911945a6f20
ae4b8ce2d03bef957d996727c1f549ba1bf00bda
/src/main/java/stacs/nathan/core/audit/AuditConfiguration.java
576a8ec8a5c78db45c0224ef81a266f7a9f8dbca
[]
no_license
jiayilee97/Nathan-Backend
38849a17c4e8371a9e1e32e5705bf24286e94006
8eb553da1e406ea2da648f595617c963fca941bd
refs/heads/master
2023-02-04T07:48:26.695987
2020-12-24T11:10:13
2020-12-24T11:10:13
324,133,392
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
package stacs.nathan.core.audit; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; @Configuration @EnableJpaAuditing(auditorAwareRef = "auditorRef") public class AuditConfiguration { @Bean public AuditAware auditorRef() { return new AuditAware(); } }
[ "tracy.thandaaye@gmail.com" ]
tracy.thandaaye@gmail.com
0d76fa47129d7a957c3324a9bb830e1f4e800076
217eecf7591052e599a0d3c06266c42304129f86
/src/v1/Driver.java
3ec84cab648dd16606d0457e17df10d79fb2a5d1
[]
no_license
sorsini4/BankingGUI
fbb6d02f686211dc69ea71dd2a72e3e9a153ae14
d42a22100dec33e13ad24e54701f0167c46ca8b7
refs/heads/master
2023-03-10T18:45:59.999582
2021-02-27T19:26:34
2021-02-27T19:26:34
342,940,242
0
0
null
null
null
null
UTF-8
Java
false
false
1,263
java
package v1; public class Driver { public static void main(String args[]) { Bank tdbank = new Bank("TD Bank"); Person myself = new Person("Steven"); Person dad = new Person("Mark"); CheckingAcct checking = new CheckingAcct(myself, tdbank, "sorsini29", "Maverick1120"); SavingsAcct savings = new SavingsAcct(dad, tdbank, "mrkso928", "poop"); checking.setPassword("Kayla324"); checking.setUserName("orsini29"); savings.setPassword("steve"); System.out.println(checking.getUserName()); System.out.println(checking.getPassword()); System.out.println(tdbank.numberOfAccounts()); System.out.println(checking.getAccountNumber()); tdbank.getAccounts(); System.out.println(checking.checkBalance()); checking.deposit(900); checking.withdraw(100.95); System.out.println(checking.checkBalance()); System.out.println(checking.toString()); System.out.println(tdbank.numberOfAccounts()); Person person = new Person("Steve"); person.addChecking(checking); person.addSavings(savings); System.out.println(person.hasChecking()); System.out.println(person.hasSavings()); System.out.println(person.checking.toString()); System.out.println(person.savings.toString()); System.out.println(person.amtOfAccounts()); } }
[ "sorsini4@yahoo.com" ]
sorsini4@yahoo.com
6db094c016c63fd87c4bd2837fb7c99a2255e9db
b1b77bb1ed47586f96d8f2554a65bcbd0c7162cc
/NETFLIX/staash/staash-mesh/src/main/java/com/netflix/staash/mesh/InstanceInfo.java
860fc2ccf3d297209ff72367b5cb53103fc9fbcf
[]
no_license
DanHefrman/stuff
b3624d7089909972ee806211666374a261c02d08
b98a5c80cfe7041d8908dcfd4230cf065c17f3f6
refs/heads/master
2023-07-10T09:47:04.780112
2021-08-13T09:55:17
2021-08-13T09:55:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,317
java
/******************************************************************************* * /*** * * * * Copyright 2013 Netflix, Inc. * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * * ******************************************************************************/ package com.netflix.staash.mesh; import java.util.UUID; public class InstanceInfo { private final UUID uuid; private final String id; public InstanceInfo(String id, UUID uuid) { this.uuid = uuid; this.id = id; } public UUID getUuid() { return uuid; } public String getId() { return id; } public String toString() { return uuid.toString() + "(" + id + ")"; } }
[ "bryan.guner@gmail.com" ]
bryan.guner@gmail.com
a25091a37a03f635f8a0f8c69762d26798f0296b
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE190_Integer_Overflow/CWE190_Integer_Overflow__byte_max_add_31.java
33bd764da565407d39d80de31d233b134983618d
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
3,160
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__byte_max_add_31.java Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-31.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: max Set data to the max value for byte * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: add * GoodSink: Ensure there will not be an overflow before adding 1 to data * BadSink : Add 1 to data, which can cause an overflow * Flow Variant: 31 Data flow: make a copy of data within the same method * * */ package testcases.CWE190_Integer_Overflow; import testcasesupport.*; import java.sql.*; import javax.servlet.http.*; public class CWE190_Integer_Overflow__byte_max_add_31 extends AbstractTestCase { public void bad() throws Throwable { byte data_copy; { byte data; /* POTENTIAL FLAW: Use the maximum size of the data type */ data = Byte.MAX_VALUE; data_copy = data; } { byte data = data_copy; /* POTENTIAL FLAW: if data == Byte.MAX_VALUE, this will overflow */ byte result = (byte)(data + 1); IO.writeLine("result: " + result); } } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { byte data_copy; { byte data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; data_copy = data; } { byte data = data_copy; /* POTENTIAL FLAW: if data == Byte.MAX_VALUE, this will overflow */ byte result = (byte)(data + 1); IO.writeLine("result: " + result); } } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { byte data_copy; { byte data; /* POTENTIAL FLAW: Use the maximum size of the data type */ data = Byte.MAX_VALUE; data_copy = data; } { byte data = data_copy; /* FIX: Add a check to prevent an overflow from occurring */ if (data < Byte.MAX_VALUE) { byte result = (byte)(data + 1); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too large to perform addition."); } } } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
dcb2952d67cb4e81c558c0c28fa33e3e8a266ce7
28df3c13a6cc3217f7ca341fe47c2a3743be1674
/app/src/main/java/senac/macariocalcadosadmin/models/Upload.java
4bb1c768da7d0502d2e983604c9541a631af6a3e
[]
no_license
moraesBR/MacarioCaladosAdmin
e6236b958aacdadc06a4368a742ef416cceb6f29
4ae5932acdde2fd501fe6eba5be26c6d97bbdef8
refs/heads/master
2020-06-26T12:09:46.869878
2019-10-08T14:45:35
2019-10-08T14:45:35
199,626,731
0
0
null
null
null
null
UTF-8
Java
false
false
1,492
java
package senac.macariocalcadosadmin.models; import android.net.Uri; import android.os.Parcel; import android.os.Parcelable; public class Upload implements Parcelable { private String nome; private Uri url; public Upload() { } public Upload(String nome) { this.nome = nome; } public Upload(Uri url) { this.url = url; } public Upload(String nome, Uri url) { if(nome.trim().equals("")){ nome = "Sem nome"; } this.nome = nome; this.url = url; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public Uri getUrl() { return url; } public void setUrl(Uri url) { this.url = url; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.nome); dest.writeParcelable(this.url, flags); } protected Upload(Parcel in) { this.nome = in.readString(); this.url = in.readParcelable(Uri.class.getClassLoader()); } public static final Creator<Upload> CREATOR = new Creator<Upload>() { @Override public Upload createFromParcel(Parcel source) { return new Upload(source); } @Override public Upload[] newArray(int size) { return new Upload[size]; } }; }
[ "albert.richard@gmail.com" ]
albert.richard@gmail.com
e91c75dd5f27d4c934d9a9570939313266fe4c2c
965234b6bb1e41fa59c109a416ce9af8d724228c
/src/main/java/com/javacourse/security/command/ShowSignInCommand.java
f336d179221eda579f126c63361afc39f0607c22
[]
no_license
KoisX/JavaExternalFinalProject
26b62697ee6ca93e7c873030c1a3a745a6bcad87
7c818a326d91e2116ff99524d47e1be25e9359e0
refs/heads/master
2020-04-09T19:42:27.156003
2019-01-14T22:32:53
2019-01-14T22:32:53
160,551,058
1
0
null
null
null
null
UTF-8
Java
false
false
483
java
package com.javacourse.security.command; import com.javacourse.shared.Command; import com.javacourse.shared.WebPage; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import static com.javacourse.shared.WebPage.WebPageBase; public class ShowSignInCommand implements Command { @Override public WebPage execute(HttpServletRequest request, HttpServletResponse response) { return new WebPage(WebPageBase.LOGIN_PAGE); } }
[ "kois@ukr.net" ]
kois@ukr.net
763f5cd11065ef637c8d6bccd0fe8545e113cf36
c6870da4dc683752b03104b9f0730b8047266886
/src/main/java/org/springframework/social/tumblr/api/Followers.java
5b3693ebb222d554222bb55d4b30949b4bb02ea3
[ "Apache-2.0" ]
permissive
bas/spring-social-tumblr
29f760169a700eac1b9d3c5c533f01044e15b6b6
a9903cf708e01e9a33fb205fb1fa51797a9aa5ef
refs/heads/master
2021-01-25T02:37:37.781508
2012-07-16T17:31:35
2012-07-16T17:31:35
5,064,307
0
1
null
null
null
null
UTF-8
Java
false
false
586
java
package org.springframework.social.tumblr.api; import java.util.ArrayList; import java.util.List; public class Followers { private int totalFollowers; private List<Follower> followers = new ArrayList<Follower>(); public int getTotalFollowers() { return totalFollowers; } public void setTotalFollowers(int totalFollowers) { this.totalFollowers = totalFollowers; } public List<Follower> getFollowers() { return followers; } public void setFollowers(List<Follower> followers) { this.followers = followers; } }
[ "sdouglassdev@gmail.com" ]
sdouglassdev@gmail.com
e111e06813baf540b236815d998d62f29beacf74
e1b3ef5b25776f6aa1358664c3fd8ff84efa4b48
/PortalCV/src/java/entity/Quota.java
08b05976cd902d5927fb442e4016839936e828d4
[]
no_license
hortelanobruno/brunouade
ce53c91075067bb72caf74d05846004f364a30f5
4ce808f58ac5eeb6651dff636440b45b30ed6ac1
refs/heads/master
2020-05-18T04:50:13.951036
2014-06-14T15:17:56
2014-06-14T15:17:56
34,494,896
0
0
null
null
null
null
UTF-8
Java
false
false
4,372
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package entity; import java.io.Serializable; import java.math.BigInteger; import javax.persistence.*; import javax.validation.constraints.Size; import javax.xml.bind.annotation.XmlRootElement; /** * * @author bruno */ @Entity @Table(name = "portalcv_quota") @XmlRootElement @NamedQueries({ @NamedQuery(name = "Quota.findAll", query = "SELECT q FROM Quota q"), @NamedQuery(name = "Quota.findById", query = "SELECT q FROM Quota q WHERE q.id = :id"), @NamedQuery(name = "Quota.findByUsername", query = "SELECT q FROM Quota q WHERE q.username = :username"), @NamedQuery(name = "Quota.findByUsernameAndService", query = "SELECT q FROM Quota q WHERE q.username = :username and q.service = :service"), @NamedQuery(name = "Quota.findByUsernameByType", query = "SELECT q FROM Quota q WHERE q.username = :username and q.type = :type"), @NamedQuery(name = "Quota.findByUsernameByTypeByService", query = "SELECT q FROM Quota q WHERE q.username = :username and q.type = :type and q.service = :service"), @NamedQuery(name = "Quota.findByAttribute", query = "SELECT q FROM Quota q WHERE q.attribute = :attribute"), @NamedQuery(name = "Quota.findByOp", query = "SELECT q FROM Quota q WHERE q.op = :op"), @NamedQuery(name = "Quota.findByValue", query = "SELECT q FROM Quota q WHERE q.value = :value"), @NamedQuery(name = "Quota.findByType", query = "SELECT q FROM Quota q WHERE q.type = :type")}) public class Quota implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "id") private Integer id; @Size(max = 45) @Column(name = "username") private String username; @Size(max = 30) @Column(name = "attribute") private String attribute; @Size(max = 5) @Column(name = "op") private String op; @Column(name = "value") private BigInteger value; @Size(max = 10) @Column(name = "type") private String type; @Size(max = 45) @Column(name = "service") private String service; @Column(name = "session_quota") private BigInteger sessionQuota = new BigInteger("0"); public Quota() { } public Quota(Integer id) { this.id = id; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getAttribute() { return attribute; } public void setAttribute(String attribute) { this.attribute = attribute; } public String getOp() { return op; } public void setOp(String op) { this.op = op; } public BigInteger getValue() { return value; } public void setValue(BigInteger value) { this.value = value; } public String getType() { return type; } public void setType(String type) { this.type = type; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Quota)) { return false; } Quota other = (Quota) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "entity.Quota[ id=" + id + " ]"; } public String getService() { return service; } public void setService(String service) { this.service = service; } public BigInteger getSessionQuota() { return sessionQuota; } public void setSessionQuota(BigInteger sessionQuota) { this.sessionQuota = sessionQuota; } }
[ "hortelanobruno@bbc01b02-664b-0410-8048-2f08f105149e" ]
hortelanobruno@bbc01b02-664b-0410-8048-2f08f105149e
3965db7021084a0d5fdd3a1820a3d0caf2174e21
cadd285c2760f3ccf96783ab6264c67e131db9f4
/src/test/java/com/jhipster/projetsoa/service/mapper/UserMapperTest.java
1b3e7494f8c8e31f513572608c697e451bd8cc27
[]
no_license
kalthoum23/TpSOA1
614dd129500a5528092ba4ee6e4f22aab1ba673d
310cd9c5a4f32651435ec6610f8509bb624ac11b
refs/heads/master
2023-02-04T09:54:14.884337
2020-12-25T17:47:36
2020-12-25T17:47:36
324,405,424
0
0
null
null
null
null
UTF-8
Java
false
false
4,338
java
package com.jhipster.projetsoa.service.mapper; import com.jhipster.projetsoa.domain.User; import com.jhipster.projetsoa.service.dto.UserDTO; import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import static org.assertj.core.api.Assertions.assertThat; /** * Unit tests for {@link UserMapper}. */ public class UserMapperTest { private static final String DEFAULT_LOGIN = "johndoe"; private static final Long DEFAULT_ID = 1L; private UserMapper userMapper; private User user; private UserDTO userDto; @BeforeEach public void init() { userMapper = new UserMapper(); user = new User(); user.setLogin(DEFAULT_LOGIN); user.setPassword(RandomStringUtils.random(60)); user.setActivated(true); user.setEmail("johndoe@localhost"); user.setFirstName("john"); user.setLastName("doe"); user.setImageUrl("image_url"); user.setLangKey("en"); userDto = new UserDTO(user); } @Test public void usersToUserDTOsShouldMapOnlyNonNullUsers() { List<User> users = new ArrayList<>(); users.add(user); users.add(null); List<UserDTO> userDTOS = userMapper.usersToUserDTOs(users); assertThat(userDTOS).isNotEmpty(); assertThat(userDTOS).size().isEqualTo(1); } @Test public void userDTOsToUsersShouldMapOnlyNonNullUsers() { List<UserDTO> usersDto = new ArrayList<>(); usersDto.add(userDto); usersDto.add(null); List<User> users = userMapper.userDTOsToUsers(usersDto); assertThat(users).isNotEmpty(); assertThat(users).size().isEqualTo(1); } @Test public void userDTOsToUsersWithAuthoritiesStringShouldMapToUsersWithAuthoritiesDomain() { Set<String> authoritiesAsString = new HashSet<>(); authoritiesAsString.add("ADMIN"); userDto.setAuthorities(authoritiesAsString); List<UserDTO> usersDto = new ArrayList<>(); usersDto.add(userDto); List<User> users = userMapper.userDTOsToUsers(usersDto); assertThat(users).isNotEmpty(); assertThat(users).size().isEqualTo(1); assertThat(users.get(0).getAuthorities()).isNotNull(); assertThat(users.get(0).getAuthorities()).isNotEmpty(); assertThat(users.get(0).getAuthorities().iterator().next().getName()).isEqualTo("ADMIN"); } @Test public void userDTOsToUsersMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() { userDto.setAuthorities(null); List<UserDTO> usersDto = new ArrayList<>(); usersDto.add(userDto); List<User> users = userMapper.userDTOsToUsers(usersDto); assertThat(users).isNotEmpty(); assertThat(users).size().isEqualTo(1); assertThat(users.get(0).getAuthorities()).isNotNull(); assertThat(users.get(0).getAuthorities()).isEmpty(); } @Test public void userDTOToUserMapWithAuthoritiesStringShouldReturnUserWithAuthorities() { Set<String> authoritiesAsString = new HashSet<>(); authoritiesAsString.add("ADMIN"); userDto.setAuthorities(authoritiesAsString); User user = userMapper.userDTOToUser(userDto); assertThat(user).isNotNull(); assertThat(user.getAuthorities()).isNotNull(); assertThat(user.getAuthorities()).isNotEmpty(); assertThat(user.getAuthorities().iterator().next().getName()).isEqualTo("ADMIN"); } @Test public void userDTOToUserMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() { userDto.setAuthorities(null); User user = userMapper.userDTOToUser(userDto); assertThat(user).isNotNull(); assertThat(user.getAuthorities()).isNotNull(); assertThat(user.getAuthorities()).isEmpty(); } @Test public void userDTOToUserMapWithNullUserShouldReturnNull() { assertThat(userMapper.userDTOToUser(null)).isNull(); } @Test public void testUserFromId() { assertThat(userMapper.userFromId(DEFAULT_ID).getId()).isEqualTo(DEFAULT_ID); assertThat(userMapper.userFromId(null)).isNull(); } }
[ "kaltoum.taieb23@gmail.com" ]
kaltoum.taieb23@gmail.com
71a6647ac8d1373891eb53deed498aa8340bfcca
8cbd3e4ab0556e757590c69986dfc7e8eb8a13e9
/src/main/java/com/example/storefrontdemo/services/Repository/CreditCardRepoServiceRepository.java
57828c798d69428d803b4276da5f7c331e32106d
[]
no_license
KarenLatsch/store-demo
6d01b95168b4dea24eaaaec5ef40ce6af2e38569
28714f2e91f6208757582b23a863cab8fee5c24b
refs/heads/master
2021-07-12T02:44:39.022203
2020-10-26T17:53:21
2020-10-26T17:53:21
215,146,866
0
0
null
null
null
null
UTF-8
Java
false
false
507
java
package com.example.storefrontdemo.services.Repository; import com.example.storefrontdemo.domain.entities.CreditCard; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface CreditCardRepoServiceRepository extends JpaRepository<CreditCard, Integer> { List<CreditCard> findByCustomerId(Integer customerId); CreditCard findByCustomerIdAndId(Integer customerId, Integer creditCardId); }
[ "dklatsch@sbcglobal.net" ]
dklatsch@sbcglobal.net
f7732b6851b927c43f521b963429feb402c968d8
6b4a06b33656e5a7948155477e2d889b7ea0da48
/src/com/github/lyokofirelyte/WaterCloset/WACommandEx.java
fffa87fd518a9587d05583bfabe2fb218c249b9b
[]
no_license
lyokofirelyte/WaterCloset
f0b9ae7ff14bfccbbb35703499d774cf3fe98eeb
38c97222820feea668bd421b2acb1adc73c70d31
refs/heads/master
2016-09-06T18:37:39.590369
2013-10-27T10:33:27
2013-10-27T10:33:27
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
70,776
java
package com.github.lyokofirelyte.WaterCloset; import java.util.List; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.block.Sign; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.event.Listener; import com.github.lyokofirelyte.WaterCloset.Util.Utils; import com.github.lyokofirelyte.WaterCloset.Util.WCVault; public class WACommandEx implements CommandExecutor, Listener { WCMain plugin; String waaprefix = ChatColor.WHITE + "waOS " + ChatColor.BLUE + "// " + ChatColor.AQUA; String waheader = ChatColor.GREEN + "| " + ChatColor.AQUA; public WACommandEx(WCMain instance) { this.plugin = instance; } @SuppressWarnings("deprecation") public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if ((cmd.getName().equalsIgnoreCase("waa")) && ((sender instanceof Player))) { Player p = (Player)sender; String pl = p.getName(); if (args.length > 0) { if (args[0].equalsIgnoreCase("help")) { if (args.length == 1) { sender.sendMessage(new String[] { this.waaprefix + "Worlds Apart Alliances Help Core", ChatColor.RED + "........................", this.waheader + "/waa help general " + ChatColor.WHITE + "- " + ChatColor.AQUA + "General help commands", this.waheader + "/waa help leadership " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Alliance upgrading help commands", this.waheader + "/waa help chat " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Alliance chat help commands", ChatColor.RED + ".w.e...a.r.e...w.a.t.c.h.i.n.g...y.o.u.......a.l.w.a.y.s." }); return true; } if (args[1].equalsIgnoreCase("general")) { sender.sendMessage(new String[] { this.waaprefix + "General Help", ChatColor.RED + "........................", this.waheader + "/waa info " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Displays your WAA info", this.waheader + "/waa lookup <alliance> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "View info about an alliance", this.waheader + "/waa request " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Request an alliance formation", this.waheader + "/waa approve <alliance> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "(STAFF) Approve an alliance for tier upgrade", this.waheader + "/waa accept " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Accept an alliance invite", this.waheader + "/waa decline " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Decline an alliance invite", this.waheader + "/waa pay <alliance> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Give money to an alliance" }); return true; } if (args[1].equalsIgnoreCase("leadership")) { sender.sendMessage(new String[] { this.waaprefix + "Leadership Help", ChatColor.RED + "........................", this.waheader + "/waa invite <player> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Invite someone to your alliance", this.waheader + "/waa upgrade " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Upgrade your alliance after inspection", this.waheader + "/waa colors <color 1> <color 2> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Set your alliance chat colors", this.waheader + "/waa leader <new leader> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Choose someone else to be leader", this.waheader + "/waa setrank <player> <rank> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Give someone a personal alliance rank", this.waheader + "/waa levels " + ChatColor.WHITE + "- " + ChatColor.AQUA + "View upgrade levels and requirements", this.waheader + "/waa disband (There is no confirm for this!) " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Goodbye, alliance!", this.waheader + "/waa kick <player> <oldrank> <newrank> (STAFF) " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Kick someone from a town" }); return true; } if (args[1].equalsIgnoreCase("chat")) { sender.sendMessage(new String[] { this.waaprefix + "Alliance Chat Help", ChatColor.RED + "........................", this.waheader + "/waa chat leave " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Leave your alliance chat", this.waheader + "/waa chat join " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Join your alliance chat", this.waheader + "/waa chat kick <player> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Kick someone from your alliance chat (ADMIN)", this.waheader + "/waa chat ban <player> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Ban someone from your alliance chat (ADMIN)", this.waheader + "/waa chat unban <player> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Unban someone in your alliance chat (ADMIN)", this.waheader + "/waa chat admin add <player> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Add <player> to admin in your alliance chat (LEADER)", this.waheader + "/waa chat admin rem <player> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Remove <player> from admin in your alliance chat (LEADER)", this.waheader + "/waa chat visit <alliance> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Visit a different alliance chat as a guest", this.waheader + "/waa chat list " + ChatColor.WHITE + "- " + ChatColor.AQUA + "List the users in your current alliance chat channel", this.waheader + "/waa chat color <color> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Change your default chat color. See /news 2 for the list.", this.waheader + "/l <message> " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Quick message alliance chat" }); return true; } sender.sendMessage(new String[] { this.waaprefix + "Worlds Apart Alliances Help Core", ChatColor.RED + "........................", this.waheader + "/waa help general " + ChatColor.WHITE + "- " + ChatColor.AQUA + "General help commands", this.waheader + "/waa help leadership " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Alliance upgrading help commands", this.waheader + "/waa help chat " + ChatColor.WHITE + "- " + ChatColor.AQUA + "Alliance chat help commands", ChatColor.RED + ".w.e...a.r.e...w.a.t.c.h.i.n.g...y.o.u.......a.l.w.a.y.s." }); return true; } if (args[0].equalsIgnoreCase("chat")) { if (args.length == 3 && args[1].equalsIgnoreCase("color")){ String allowedColors = "1 2 3 4 5 6 7 8 9 0 a b c d e f o l m k n r"; if (!allowedColors.contains(args[2])){ sender.sendMessage(waaprefix + "That's not a color. See /news 2."); return true; } else { plugin.WAAlliancesdatacore.set("Users." + sender.getName() + ".CustomColor", args[2]); sender.sendMessage(Utils.AS(waaprefix + "You've set your color as &" + args[2] + "this.")); return true; } } if (args.length == 1) { Boolean inChat = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".inChat")); if (!inChat.booleanValue()) { sender.sendMessage(this.waaprefix + "You are not currently in an alliance chat. Visit someone elses alliance chat with /waa chat visit <alliance>"); return true; } Boolean chatToggle = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".chatToggle")); if (!chatToggle.booleanValue()) { this.plugin.WAAlliancesconfig.set("Users." + pl + ".chatToggle", true); sender.sendMessage(this.waaprefix + "You are now talking in alliance chat without using /l."); return true; } this.plugin.WAAlliancesconfig.set("Users." + pl + ".chatToggle", false); sender.sendMessage(this.waaprefix + "You are no longer talking in alliance chat, but you can still see it and talk with /l."); return true; } if (args[1].equalsIgnoreCase("join")) { Boolean inAlliance = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".InAlliance")); if (!inAlliance.booleanValue()) { sender.sendMessage(this.waaprefix + "You are not currently in an alliance. Visit someone elses alliance chat with /waa chat visit <alliance>"); return true; } String Alliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); List<String> chatUsers = this.plugin.WAAlliancesconfig.getStringList("Alliances." + Alliance + ".chatUsers"); if (this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".inChat")) { sender.sendMessage(this.waaprefix + "You have already joined an alliance chat."); return true; } chatUsers.add(sender.getName()); this.plugin.WAAlliancesconfig.set("Users." + pl + ".inChat", true); this.plugin.WAAlliancesconfig.set("Users." + pl + ".currentChat", Alliance); this.plugin.WAAlliancesconfig.set("Users." + pl + ".AllianceRank2", this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank")); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".chatUsers", chatUsers); this.plugin.WAAlliancesconfig.set("Users." + pl + ".chatGuest", false); for (String currentMember : chatUsers){ if (Bukkit.getOfflinePlayer(currentMember).isOnline()) { Bukkit.getPlayer(currentMember).sendMessage(this.waaprefix + Bukkit.getPlayer(pl).getDisplayName() + " has joined the alliance chat channel"); } } sender.sendMessage(this.waaprefix + "You have joined your alliance chat. Toggle chat with /waa chat or quick message with /l <message>."); return true; } if (args[1].equalsIgnoreCase("leave")) { String currentChat = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".currentChat"); List<String> chatUsers = this.plugin.WAAlliancesconfig.getStringList("Alliances." + currentChat + ".chatUsers"); if (!this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".inChat")) { sender.sendMessage(this.waaprefix + "You have already left an alliance chat."); return true; } chatUsers.remove(sender.getName()); this.plugin.WAAlliancesconfig.set("Users." + pl + ".inChat", false); this.plugin.WAAlliancesconfig.set("Alliances." + currentChat + ".chatUsers", chatUsers); for (String currentMember : chatUsers){ if (Bukkit.getOfflinePlayer(currentMember).isOnline()) { Bukkit.getPlayer(currentMember).sendMessage(this.waaprefix + Bukkit.getPlayer(pl).getDisplayName() + " has left the alliance chat channel"); } } sender.sendMessage(this.waaprefix + "You have left alliance chat and will no longer see messages from it."); return true; } if (args[1].equalsIgnoreCase("visit")) { if (args.length != 3) { sender.sendMessage(this.waaprefix + "Try using /waa chat visit <alliance> instead!"); } if (this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".inChat")) { sender.sendMessage(this.waaprefix + "You must leave your chat first. Not your house. Just the chat. /waa chat leave."); return true; } if (!this.plugin.WAAlliancesconfig.getBoolean("Alliances." + args[2] + ".Created")) { sender.sendMessage(this.waaprefix + "That alliance chat does not exist. Sorry! Try putting down the vodka and spell it right?"); return true; } if (this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".inAlliance")) { if (args[2].equalsIgnoreCase(this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"))) { sender.sendMessage(this.waaprefix + "Use /waa chat join instead to join your own alliance's chat."); return true; } } if (this.plugin.WAAlliancesconfig.getBoolean("Alliances." + args[2] + ".chatBanList." + sender.getName())) { sender.sendMessage(this.waaprefix + "You were banned from that alliance chat."); return true; } List<String> chatUsers = this.plugin.WAAlliancesconfig.getStringList("Alliances." + args[2] + ".chatUsers"); chatUsers.add(sender.getName()); this.plugin.WAAlliancesconfig.set("Users." + pl + ".currentChat", args[2]); this.plugin.WAAlliancesconfig.set("Users." + pl + ".inChat", true); this.plugin.WAAlliancesconfig.set("Alliances." + args[2] + ".chatUsers", chatUsers); this.plugin.WAAlliancesconfig.set("Users." + pl + ".chatGuest", true); this.plugin.WAAlliancesconfig.set("Users." + pl + ".AllianceRank2", "Guest"); for (String p3 : chatUsers) { if (Bukkit.getOfflinePlayer(p3).isOnline()) { Bukkit.getPlayer(p3).sendMessage(this.waaprefix + Bukkit.getPlayer(pl).getDisplayName() + " has joined the alliance chat channel"); } } sender.sendMessage(this.waaprefix + "You have joined an alliance chat. Toggle chat with /waa chat or quick message with /l <message>."); return true; } if (args[1].equalsIgnoreCase("kick")) { if ((this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equals("Leader")) || (this.plugin.WAAlliancesconfig.getBoolean("Alliances." + this.plugin.WAAlliancesconfig.getString(new StringBuilder("Users.").append(pl).append(".currentChat").toString()) + ".chatAdmins." + pl))) { String currentChat = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".currentChat"); List<String> channelMembers = this.plugin.WAAlliancesconfig.getStringList("Alliances." + currentChat + ".chatUsers"); if (!channelMembers.contains(args[2])) { sender.sendMessage(this.waaprefix + "That user is not currently in the channel."); return true; } for (String a : channelMembers) { if (Bukkit.getOfflinePlayer(a).isOnline()) { Bukkit.getPlayer(a).sendMessage(this.waaprefix + Bukkit.getPlayer(args[2]).getDisplayName() + " was kicked from the alliance channel"); } } channelMembers.remove(args[2]); this.plugin.WAAlliancesconfig.set("Alliances." + currentChat + ".chatUsers", channelMembers); this.plugin.WAAlliancesconfig.set("Users." + args[2] + ".inChat", false); this.plugin.WAAlliancesconfig.set("Users." + args[2] + ".currentChat", null); } else { sender.sendMessage(this.waaprefix + "You are not authorized to use that command."); return true; } } else if (args[1].equalsIgnoreCase("list")) { String currentChat = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".currentChat"); List<String> channelMembers = this.plugin.WAAlliancesconfig.getStringList("Alliances." + currentChat + ".chatUsers"); sender.sendMessage(this.waaprefix + "Current Channel Members (" + channelMembers.size() + ")"); for (String chatList : channelMembers) { sender.sendMessage(chatList); } } else if (args[1].equalsIgnoreCase("ban")) { if (args.length != 3) { sender.sendMessage(this.waaprefix + "See /waa help chat, you messed something up."); return true; } if ((this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equals("Leader")) || (this.plugin.WAAlliancesconfig.getBoolean("Alliances." + this.plugin.WAAlliancesconfig.getString(new StringBuilder("Users.").append(pl).append(".currentChat").toString()) + ".chatAdmins." + pl))) { String currentChat = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".currentChat"); List<String> channelMembers = this.plugin.WAAlliancesconfig.getStringList("Alliances." + currentChat + ".chatUsers"); if (!channelMembers.contains(args[2])) { sender.sendMessage(this.waaprefix + "That user is not currently in the channel."); return true; } for (String b : channelMembers) { if (Bukkit.getOfflinePlayer(b).isOnline()) { Bukkit.getPlayer(b).sendMessage(this.waaprefix + Bukkit.getPlayer(args[2]).getDisplayName() + " was banned from the alliance channel"); } } channelMembers.remove(args[2]); this.plugin.WAAlliancesconfig.set("Alliances." + currentChat + ".chatUsers", channelMembers); this.plugin.WAAlliancesconfig.set("Alliances." + currentChat + ".chatBanList." + args[2], true); this.plugin.WAAlliancesconfig.set("Users." + args[2] + ".inChat", false); this.plugin.WAAlliancesconfig.set("Users." + args[2] + ".currentChat", null); } else { sender.sendMessage(this.waaprefix + "You are not authorized to use that command."); return true; } } else if (args[1].equalsIgnoreCase("unban")) { if (args.length != 3) { sender.sendMessage(this.waaprefix + "See /waa help chat, you messed something up."); return true; } if ((this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equals("Leader")) || (this.plugin.WAAlliancesconfig.getBoolean("Alliances." + this.plugin.WAAlliancesconfig.getString(new StringBuilder("Users.").append(pl).append(".currentChat").toString()) + ".chatAdmins." + pl))) { String currentChat = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".currentChat"); this.plugin.WAAlliancesconfig.set("Alliances." + currentChat + ".chatBanList." + args[2], false); List<String> channelMembers = this.plugin.WAAlliancesconfig.getStringList("Alliances." + currentChat + ".chatUsers"); for (String c : channelMembers) { if (Bukkit.getOfflinePlayer(c).isOnline()) { Bukkit.getPlayer(c).sendMessage(this.waaprefix + Bukkit.getPlayer(args[2]).getDisplayName() + " was unbanned from the alliance channel"); } } } else { sender.sendMessage(this.waaprefix + "You are not authorized to use that command."); return true; } } else if (args[1].equalsIgnoreCase("admin")) { if (this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equals("Leader")) { if (args.length != 4) { sender.sendMessage(this.waaprefix + "Try /waa help chat - you did something wrong."); return true; } if (args[2].equalsIgnoreCase("add")) { String currentChat = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".currentChat"); this.plugin.WAAlliancesconfig.set("Alliances." + currentChat + ".chatAdmins." + args[3], true); sender.sendMessage(this.waaprefix + "Added " + args[3] + " to channel admin."); return true; } if (args[2].equalsIgnoreCase("rem")) { String currentChat = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".currentChat"); this.plugin.WAAlliancesconfig.set("Alliances." + currentChat + ".chatAdmins." + args[3], null); sender.sendMessage(this.waaprefix + "Removed " + args[3] + " from channel admin."); return true; } } sender.sendMessage(this.waaprefix + "Only the leader can use this command!"); } else { sender.sendMessage(this.waaprefix + "Try /waa help chat"); return true; } } else if (args[0].equalsIgnoreCase("info")) { String currentAlliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); String allianceRank = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank"); String allianceLeader = this.plugin.WAAlliancesconfig.getString("Alliances." + currentAlliance + ".Leader"); Integer allianceTier = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + currentAlliance + ".Tier")); Integer allianceBank = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + currentAlliance + ".Bank")); Boolean inAlliance = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".InAlliance")); Boolean doors = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Alliances." + currentAlliance + ".DoorLock")); Boolean mobs = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Alliances." + currentAlliance + ".MobSpawn")); if (!inAlliance.booleanValue()) { sender.sendMessage(this.waaprefix + "You are not in an alliance."); return true; } sender.sendMessage(new String[] { this.waaprefix + "You are in " + currentAlliance + " which is tier " + allianceTier + ".", this.waaprefix + "Your alliance rank is: " + allianceRank, this.waaprefix + "The leader is " + allianceLeader + " and the bank currently holds " + allianceBank + " shinies.", this.waaprefix + "Door locks: " + doors + ", Mob Spawning: " + mobs, this.waaprefix + "Perks" + ChatColor.WHITE + ":", ChatColor.YELLOW + "...................." }); if (allianceTier.intValue() == 0) { sender.sendMessage(new String[] { ChatColor.GREEN + "| " + ChatColor.AQUA + "Protection Radius" + ChatColor.WHITE + ": " + ChatColor.AQUA + "85", ChatColor.GREEN + "| " + ChatColor.AQUA + "Extras" + ChatColor.WHITE + ": " + ChatColor.AQUA + "Creeper, fire-spread, enderman, and TNT protection" }); } else if (allianceTier.intValue() == 1) { sender.sendMessage(new String[] { ChatColor.GREEN + "| " + ChatColor.AQUA + "Protection Radius" + ChatColor.WHITE + ": " + ChatColor.AQUA + "100", ChatColor.GREEN + "| " + ChatColor.AQUA + "Extras" + ChatColor.WHITE + ": " + ChatColor.AQUA + "Mall warp access, closer to something better!" }); } else if (allianceTier.intValue() == 2) { sender.sendMessage(new String[] { ChatColor.GREEN + "| " + ChatColor.AQUA + "Protection Radius" + ChatColor.WHITE + ": " + ChatColor.AQUA + "120", ChatColor.GREEN + "| " + ChatColor.AQUA + "Extras" + ChatColor.WHITE + ": " + ChatColor.AQUA + "Custom nether portal, allliance disposal sign" }); } else if (allianceTier.intValue() == 3) { sender.sendMessage(new String[] { ChatColor.GREEN + "| " + ChatColor.AQUA + "Protection Radius" + ChatColor.WHITE + ": " + ChatColor.AQUA + "140", ChatColor.GREEN + "| " + ChatColor.AQUA + "Extras" + ChatColor.WHITE + ": " + ChatColor.AQUA + "Mob spawning on/off toggle" }); } else if (allianceTier.intValue() == 4) { sender.sendMessage(new String[] { ChatColor.GREEN + "| " + ChatColor.AQUA + "Protection Radius" + ChatColor.WHITE + ": " + ChatColor.AQUA + "155", ChatColor.GREEN + "| " + ChatColor.AQUA + "Extras" + ChatColor.WHITE + ": " + ChatColor.AQUA + "Alliance embassy, placed on embassy row" }); } else if (allianceTier.intValue() == 5) { sender.sendMessage(new String[] { ChatColor.GREEN + "| " + ChatColor.AQUA + "Protection Radius" + ChatColor.WHITE + ": " + ChatColor.AQUA + "170", ChatColor.GREEN + "| " + ChatColor.AQUA + "Extras" + ChatColor.WHITE + ": " + ChatColor.AQUA + "Alliance heal sign, extra disposal sign" }); } else if (allianceTier.intValue() == 6) { sender.sendMessage(new String[] { ChatColor.GREEN + "| " + ChatColor.AQUA + "Protection Radius" + ChatColor.WHITE + ": " + ChatColor.AQUA + "195", ChatColor.GREEN + "| " + ChatColor.AQUA + "Extras" + ChatColor.WHITE + ": " + ChatColor.AQUA + "Warp hub access" }); } else if (allianceTier.intValue() == 7) { sender.sendMessage(new String[] { ChatColor.GREEN + "| " + ChatColor.AQUA + "Protection Radius" + ChatColor.WHITE + ": " + ChatColor.AQUA + "205", ChatColor.GREEN + "| " + ChatColor.AQUA + "Extras" + ChatColor.WHITE + ": " + ChatColor.AQUA + "Alliance outpost (30X30)" }); } else if (allianceTier.intValue() == 8) { sender.sendMessage(new String[] { ChatColor.GREEN + "| " + ChatColor.AQUA + "Protection Radius" + ChatColor.WHITE + ": " + ChatColor.AQUA + "220", ChatColor.GREEN + "| " + ChatColor.AQUA + "Extras" + ChatColor.WHITE + ": " + ChatColor.AQUA + "Improved outpost (alliance warp sign)" }); } } else if (args[0].equalsIgnoreCase("request")) { sender.sendMessage(this.waaprefix + "To submit an alliance request, please see http://tinyurl.com/a25as5b and scroll down to Alliance Application"); } else if ((args[0].equalsIgnoreCase("create")) && (sender.hasPermission("wa.staff"))) { if ((args.length == 1) || (args.length == 2) || (args.length == 3) || (args.length == 4) || (args.length > 5)) { sender.sendMessage(new String[] { this.waaprefix + "To form an alliance, stand in the center of that town.", this.waaprefix + "Then, type /waa create <town name> <leader> <color 1> <color 2>. Make <color 2> the same if you only want one color.", this.waaprefix + "For example, /waa create Winhaven Hugh_Jasses 2 2", this.waaprefix + "If you mess up, just disband the town and try again." }); } else if (!this.plugin.WAAlliancesconfig.getBoolean("Alliances." + args[1] + ".created")) { if (sender.isOp()) { this.plugin.WAAlliancesconfig.set("Users." + sender.getName() + ".isOp", true); } sender.setOp(true); this.plugin.WAAlliancesconfig.set("Alliances." + args[1] + ".Created", Boolean.valueOf(true)); this.plugin.WAAlliancesconfig.set("Alliances." + args[1] + ".Leader", args[2]); this.plugin.WAAlliancesconfig.set("Alliances." + args[1] + ".Color1", args[3]); this.plugin.WAAlliancesconfig.set("Alliances." + args[1] + ".Color2", args[4]); this.plugin.WAAlliancesconfig.set("Alliances." + args[1] + ".Tier", Integer.valueOf(0)); this.plugin.WAAlliancesconfig.set("Alliances." + args[1] + ".Bank", Integer.valueOf(0)); this.plugin.WAAlliancesconfig.set("Alliances." + args[1] + ".MemberCount", Integer.valueOf(1)); this.plugin.WAAlliancesconfig.set("Alliances." + args[1] + ".Disbanded", false); this.plugin.WAAlliancesconfig.set("Colors.Taken." + args[3] + args[4], Boolean.valueOf(true)); this.plugin.WAAlliancesconfig.set("Users." + args[2] + ".AllianceRank", "Leader"); this.plugin.WAAlliancesconfig.set("Users." + args[2] + ".Alliance", args[1]); this.plugin.WAAlliancesconfig.set("Users." + args[2] + ".InAlliance", Boolean.valueOf(true)); Bukkit.getServer().dispatchCommand(sender, "setwarp " + args[1]); Bukkit.getServer().dispatchCommand(sender, "/pos1"); Bukkit.getServer().dispatchCommand(sender, "/pos2"); Bukkit.getServer().dispatchCommand(sender, "/outset 85"); Bukkit.getServer().dispatchCommand(sender, "rg define " + args[1]); Bukkit.getServer().dispatchCommand(sender, "rg setpriority " + args[1] + " 10"); Bukkit.getServer().dispatchCommand(sender, "rg flag " + args[1] + " creeper-explosion deny"); Bukkit.getServer().dispatchCommand(sender, "rg flag " + args[1] + " fire-spread deny"); Bukkit.getServer().dispatchCommand(sender, "rg flag " + args[1] + " tnt deny"); Bukkit.getServer().dispatchCommand(sender, "rg flag " + args[1] + " enderman-grief deny"); Bukkit.getServer().dispatchCommand(sender, "rg addowner " + args[1] + " g:" + args[1]); Bukkit.getServer().dispatchCommand(sender, "pex group " + args[1] + " create"); Bukkit.getServer().dispatchCommand(sender, "pex group " + args[1] + " user add " + args[2]); Bukkit.broadcastMessage(this.waaprefix + args[2] + " has formed an alliance named " + args[1] + "!"); sender.sendMessage(this.waaprefix + "Bank account created for this alliance - please use that from now on!"); if (!this.plugin.WAAlliancesconfig.getBoolean("Users." + sender.getName() + ".isOp")) { sender.setOp(false); } String Alliance = this.plugin.WAAlliancesconfig.getString("Users." + args[2] + ".Alliance"); String Color1 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color1"); String Color2 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color2"); String nick = this.plugin.WAAlliancesconfig.getString("Users." + args[2] + ".Nick"); Player name = Bukkit.getPlayer(args[2]); int midpoint = nick.length() / 2; String firstHalf = nick.substring(0, midpoint); String secondHalf = nick.substring(midpoint); if (Bukkit.getPlayer(args[2]).hasPermission("wa.staff")) { String firstHalfColors = "&" + Color1 + "&o" + firstHalf; String secondHalfColors = "&" + Color2 + "&o" + secondHalf; String completed = firstHalfColors + secondHalfColors; Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + args[2] + " " + completed); name.sendMessage(this.waaprefix + "Your name was updated."); this.plugin.saveYamls(); return true; } String firstHalfColors = "&" + Color1 + firstHalf; String secondHalfColors = "&" + Color2 + secondHalf; String completed = firstHalfColors + secondHalfColors; Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + args[2] + " " + completed); name.sendMessage(this.waaprefix + "Your name was updated."); this.plugin.saveYamls(); } else { sender.sendMessage(this.waaprefix + "That alliance already exists!"); } } else if ((args[0].equalsIgnoreCase("colors")) && (args.length == 1)) { String alliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); Boolean colorized = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Alliances." + alliance + ".Colorized")); Boolean extraColorized = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Alliances." + alliance + ".extraColorized")); if ((colorized.booleanValue()) && (!extraColorized.booleanValue())) { sender.sendMessage(this.waaprefix + "Alliance colors can only be changed once and will cost 50k. If you accept these terms, type /waa colors <color 1> <color 2>"); sender.sendMessage(this.waaprefix + "Remember to use only the number or letter. For example. &1 would just be 1. DO NOT INCLUDE THE &!"); } else if (colorized.booleanValue()) { sender.sendMessage(this.waaprefix + "You have reached the limit on color changes."); } } else { String alliance; if ((args[0].equalsIgnoreCase("colors")) && (args.length == 3)) { alliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); Boolean colorized = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Alliances." + alliance + ".Colorized")); Boolean extraColorized = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Alliances." + alliance + ".extraColorized")); String Color1 = this.plugin.WAAlliancesconfig.getString("Alliances." + alliance + ".Color1"); String Color2 = this.plugin.WAAlliancesconfig.getString("Alliances." + alliance + ".Color2"); Integer Bank = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + alliance + ".Bank")); if ((colorized.booleanValue()) && (extraColorized.booleanValue())) { sender.sendMessage(this.waaprefix + "You have reached the limit on color changes."); return true; } if (!this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equalsIgnoreCase("Leader")) { sender.sendMessage(this.waaprefix + "You must be the leader to change colors."); return true; } if (Bank.intValue() < 100000) { sender.sendMessage(this.waaprefix + "Your alliance lacks the funds to carry out this operation! #tear"); return true; } if (this.plugin.WAAlliancesconfig.getBoolean("Colors.Taken." + args[1] + args[2])) { sender.sendMessage(this.waaprefix + "Those colors are alredy taken!"); return true; } if ((args[1].equals("1")) || (args[1].equals("2")) || (args[1].equals("3")) || (args[1].equals("4")) || (args[1].equals("5")) || (args[1].equals("6")) || (args[1].equals("9")) || (args[1].equals("a")) || (args[1].equals("b")) || (args[1].equals("c")) || (args[1].equals("d")) || (args[1].equals("e"))) { if ((args[2].equals("1")) || (args[2].equals("2")) || (args[2].equals("3")) || (args[2].equals("4")) || (args[2].equals("5")) || (args[2].equals("6")) || (args[2].equals("9")) || (args[2].equals("a")) || (args[2].equals("b")) || (args[2].equals("c")) || (args[2].equals("d")) || (args[2].equals("e")) || (args[2].equals("f"))) { this.plugin.WAAlliancesconfig.set("Colors.Taken." + Color1 + Color2, false); this.plugin.WAAlliancesconfig.set("Alliances." + alliance + ".extraColorized", Boolean.valueOf(true)); this.plugin.WAAlliancesconfig.set("Alliances." + alliance + ".Colors", Boolean.valueOf(true)); this.plugin.WAAlliancesconfig.set("Alliances." + alliance + ".Color1", args[1]); this.plugin.WAAlliancesconfig.set("Alliances." + alliance + ".Color2", args[2]); this.plugin.WAAlliancesconfig.set("Colors.Taken." + args[1] + args[2], Boolean.valueOf(true)); Integer Bank2 = Integer.valueOf(Bank.intValue() - 100000); this.plugin.WAAlliancesconfig.set("Alliances." + alliance + ".Bank", Bank2); this.plugin.WAAlliancesconfig.set("Alliances." + alliance + ".Colorized", Boolean.valueOf(true)); sender.sendMessage(this.waaprefix + "Colors changed. Effected player names will be updated when they log in."); } else { sender.sendMessage(this.waaprefix + "Those colors are not acceptable!"); return true; } } else { sender.sendMessage(this.waaprefix + "Those colors are not acceptable!"); return true; } } else if (args[0].equalsIgnoreCase("setsign")) { if (!this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".InAlliance")) { sender.sendMessage(this.waaprefix + "You are not in an alliance!"); return true; } if (!this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equalsIgnoreCase("Leader")) { sender.sendMessage(this.waaprefix + "Only the leader can set the sign location."); return true; } try { @SuppressWarnings("unused") Sign sign = (Sign)p.getTargetBlock(null, 10).getState(); } catch (Exception ex) { p.sendMessage(this.waaprefix + "That is not a sign."); return true; } String alliance3 = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); this.plugin.WAAlliancesdatacore.set("Alliances." + alliance3 + ".SignX", Double.valueOf(p.getTargetBlock(null, 10).getLocation().getX())); this.plugin.WAAlliancesdatacore.set("Alliances." + alliance3 + ".SignY", Double.valueOf(p.getTargetBlock(null, 10).getLocation().getY())); this.plugin.WAAlliancesdatacore.set("Alliances." + alliance3 + ".SignZ", Double.valueOf(p.getTargetBlock(null, 10).getLocation().getZ())); p.sendMessage(this.waaprefix + "Sign location set. It should update once you change a town setting by typing TOWNMANAGE."); } else if (args[0].equalsIgnoreCase("invite")) { if (args.length == 1) { sender.sendMessage(this.waaprefix + "Try /waa invite <playername>"); return true; } if (this.plugin.WAAlliancesconfig.getBoolean("Users." + args[1] + ".InAlliance")) { sender.sendMessage(this.waaprefix + "That player is already in an alliance!"); return true; } if (!this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".InAlliance")) { sender.sendMessage(this.waaprefix + "You are not in an alliance!"); return true; } if (this.plugin.WAAlliancesconfig.getBoolean("Users." + args[1] + ".HasInvite")) { sender.sendMessage(this.waaprefix + "That user already has a pending request. Tell them to deny it!"); return true; } if (!this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equalsIgnoreCase("Leader")) { sender.sendMessage(this.waaprefix + "Only the leader can invite people."); return true; } Player player = Bukkit.getPlayer(args[1]); String alliance2 = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); Integer members = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + alliance2 + ".MemberCount")); if (player == null) { sender.sendMessage(ChatColor.RED + "That player either does not exist or is offline."); return true; } this.plugin.WAAlliancesconfig.set("Users." + args[1] + ".HasInvite", Boolean.valueOf(true)); this.plugin.WAAlliancesconfig.set("Users." + args[1] + ".Invite", alliance2); this.plugin.WAAlliancesconfig.set("Users." + args[1] + ".Inviter", pl); sender.sendMessage(this.waaprefix + "Request sent!"); player.sendMessage(this.waaprefix + p.getDisplayName() + " has invited you to join their alliance, " + alliance2 + ". Type /waa accept or /waa decline."); player.sendMessage(this.waaprefix + "They currently have " + members + " members."); } else if (args[0].equalsIgnoreCase("accept")) { if (!this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".HasInvite")) { sender.sendMessage(this.waaprefix + "You do not have any pending invites. #foreveralone"); return true; } String pending = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Invite"); this.plugin.WAAlliancesconfig.set("Users." + pl + ".HasInvite", false); this.plugin.WAAlliancesconfig.set("Users." + pl + ".InAlliance", Boolean.valueOf(true)); this.plugin.WAAlliancesconfig.set("Users." + pl + ".AllianceRank", "Member"); this.plugin.WAAlliancesconfig.set("Users." + pl + ".Alliance", pending); Integer allianceMembers = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + pending + ".MemberCount")); Integer newMembers = Integer.valueOf(allianceMembers.intValue() + 1); this.plugin.WAAlliancesconfig.set("Alliances." + pending + ".MemberCount", newMembers); if (this.plugin.WAAlliancesconfig.getBoolean("Users." + sender.getName() + ".Staff")) { String pNick = this.plugin.WAAlliancesconfig.getString("Users." + sender.getName() + ".Nick"); String Alliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); String Color1 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color1"); String Color2 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color2"); int midpoint = pNick.length() / 2; String firstHalf = pNick.substring(0, midpoint); String secondHalf = pNick.substring(midpoint); String firstHalfColors = "&" + Color1 + "&o" + firstHalf; String secondHalfColors = "&" + Color2 + "&o" + secondHalf; String completed = firstHalfColors + secondHalfColors; Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + pl + " " + completed); p.sendMessage(this.waaprefix + "Your name was updated."); Bukkit.broadcastMessage(this.waaprefix + p.getDisplayName() + " has joined " + Alliance + " !"); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "pex group " + Alliance + " user add " + pl); return true; } String pNick = this.plugin.WAAlliancesconfig.getString("Users." + sender.getName() + ".Nick"); String Alliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); String Color1 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color1"); String Color2 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color2"); int midpoint = pNick.length() / 2; String firstHalf = pNick.substring(0, midpoint); String secondHalf = pNick.substring(midpoint); String firstHalfColors = "&" + Color1 + firstHalf; String secondHalfColors = "&" + Color2 + secondHalf; String completed = firstHalfColors + secondHalfColors; Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + pl + " " + completed); p.sendMessage(this.waaprefix + "Your name was updated."); Bukkit.broadcastMessage(this.waaprefix + p.getDisplayName() + " has joined " + Alliance + " !"); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "pex group " + Alliance + " user add " + pl); this.plugin.WAAlliancesconfig.set("Users." + pl + ".disHandeled", Boolean.valueOf(true)); } else if ((args[0].equalsIgnoreCase("save")) && (sender.hasPermission("wa.staff"))) { this.plugin.saveYamls(); sender.sendMessage(this.waaprefix + "Config saved!"); } else if ((args[0].equalsIgnoreCase("reload")) && (sender.hasPermission("wa.staff"))) { sender.sendMessage(this.waaprefix + "Config reloaded!"); this.plugin.loadYamls(); } else { if (args[0].equalsIgnoreCase("approve") && (args.length == 2) && (sender.hasPermission("wa.staff"))){ Boolean AllianceCheck = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Alliances." + args[1] + ".Created")); if (!AllianceCheck.booleanValue()) { sender.sendMessage(this.waaprefix + "That alliance does not exist!"); return true; } Boolean Checked = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Alliances." + args[1] + ".Approved")); if (Checked.booleanValue()) { sender.sendMessage(this.waaprefix + "That alliances has already been approved for the next rankup!"); return true; } this.plugin.WAAlliancesconfig.set("Alliances." + args[1] + ".Approved", Boolean.valueOf(true)); Bukkit.broadcastMessage(this.waaprefix + args[1] + " has been approved for tier upgrade; the leader must execute /waa upgrade"); return true; } if (args[0].equalsIgnoreCase("decline")) { if (!this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".HasInvite")) { sender.sendMessage(this.waaprefix + "You do not have any pending invites. #foreveralone"); } else { String pendingReturn = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Inviter"); Player prr = Bukkit.getPlayer(pendingReturn); this.plugin.WAAlliancesconfig.set("Users." + pl + ".HasInvite", false); sender.sendMessage(this.waaprefix + "Request denied."); prr.sendMessage(this.waaprefix + "Your request was denied."); } } else if (args[0].equalsIgnoreCase("upgrade")) { if (!this.plugin.WAAlliancesconfig.getBoolean("Users." + pl + ".InAlliance")) { sender.sendMessage(this.waaprefix + "You are not in an alliance!"); return true; } if (!this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equalsIgnoreCase("Leader")) { sender.sendMessage(this.waaprefix + "Only the leader can upgrade!"); return true; } String Alliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); Integer tier = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + Alliance + ".Tier")); Integer bank = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + Alliance + ".Bank")); Boolean approved = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Alliances." + Alliance + ".Approved")); if (sender.isOp()) { this.plugin.WAAlliancesconfig.set("Users." + sender.getName() + ".isOp", Boolean.valueOf(true)); } sender.setOp(true); allianceUpgrade(Alliance, tier, bank, approved, sender); if (plugin.WAAlliancesconfig.getBoolean("Users." + sender.getName() + ".isOp") == false) { sender.setOp(false); } } else if (args[0].equalsIgnoreCase("kick")) { if (sender.hasPermission("wa.mod2") == false) { sender.sendMessage(this.waaprefix + "You must be staff to use this command!"); return true; } if (args.length != 4) { sender.sendMessage(this.waaprefix + "Correct usage is /waa kick <player> <oldrank> <newrank>"); return true; } Player p2 = Bukkit.getPlayer(args[1]); if (p2 == null) { sender.sendMessage(this.waaprefix + "That player is not online."); return true; } if (!this.plugin.WAAlliancesconfig.getBoolean("Users." + args[1] + ".InAlliance")) { sender.sendMessage(this.waaprefix + "That user is not in an alliance!"); return true; } if (this.plugin.WAAlliancesconfig.getString("Users." + args[1] + ".AllianceRank").equals("Leader")) { sender.sendMessage(this.waaprefix + "You must transfer leadership to someone else first!"); return true; } String p2Alliance = this.plugin.WAAlliancesconfig.getString("Users." + args[1] + ".Alliance"); Integer p2AllianceCount = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + p2Alliance + ".MemberCount")); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "pex user " + args[1] + " group remove " + p2Alliance); this.plugin.WAAlliancesconfig.set("Users." + args[1] + ".InAlliance", false); this.plugin.WAAlliancesconfig.set("Users." + args[1] + ".AllianceRank", null); this.plugin.WAAlliancesconfig.set("Alliances." + p2Alliance + ".MemberCount", Integer.valueOf(p2AllianceCount.intValue() - 1)); this.plugin.WAAlliancesconfig.set("Users." + args[1] + ".Alliance", null); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "pex user " + args[1] + " group remove " + args[2]); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "pex user " + args[1] + " group add " + args[3]); Bukkit.broadcastMessage(this.waaprefix + p.getDisplayName() + " has kicked " + p2.getDisplayName() + " from their alliance!"); if (this.plugin.WAAlliancesconfig.getBoolean("Users." + p2.getName() + ".Staff")) { Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + p2.getName() + " " + "&7&o" + this.plugin.WAAlliancesconfig.getString(new StringBuilder("Users.").append(p2.getName()).append(".Nick").toString())); return true; } Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + p2.getName() + " " + "&7" + this.plugin.WAAlliancesconfig.getString(new StringBuilder("Users.").append(p2.getName()).append(".Nick").toString())); } else if (args[0].equalsIgnoreCase("disband")) { if (!this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equalsIgnoreCase("Leader")) { sender.sendMessage(this.waaprefix + "Only the leader can disband the alliance."); return true; } String Alliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); String C1 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color1"); String C2 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color2"); Bukkit.broadcastMessage(this.waaprefix + Alliance + " has been disbanded by " + pl + "!"); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "pex group " + Alliance + " delete"); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "rg remove " + Alliance + " -w world"); Integer Bank = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + Alliance + ".Bank")); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "eco give " + pl + " " + Bank); this.plugin.WAAlliancesconfig.set("Colors.Taken." + C1 + C2, null); this.plugin.WAAlliancesconfig.set("Disbanded." + Alliance, Boolean.valueOf(true)); this.plugin.WAAlliancesconfig.set("Users." + pl + ".Alliance", null); this.plugin.WAAlliancesconfig.set("Users." + pl + ".InAlliance", null); this.plugin.WAAlliancesconfig.set("Users." + pl + ".AllianceRank", null); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".created", null); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".Colors", null); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".Leader", null); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".Color1", null); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".Color2", null); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".Tier", null); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".Bank", null); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".MemberCount", null); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".Colorized", null); this.plugin.WAAlliancesconfig.set("Alliances." + Alliance + ".extraColorized", null); if (this.plugin.WAAlliancesconfig.getBoolean("Users." + sender.getName() + ".Staff")) { Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + pl + " " + "&7&o" + this.plugin.WAAlliancesconfig.getString(new StringBuilder("Users.").append(pl).append(".Nick").toString())); this.plugin.saveYamls(); return true; } Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + pl + " " + "&7" + this.plugin.WAAlliancesconfig.getString(new StringBuilder("Users.").append(pl).append(".Nick").toString())); this.plugin.saveYamls(); } else if ((args[0].equalsIgnoreCase("lookup")) && (args.length == 2)) { if (!this.plugin.WAAlliancesconfig.getBoolean("Alliances." + args[1] + ".Created")) { sender.sendMessage(this.waaprefix + "That alliance does not exist!"); } else { Integer tier = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + args[1] + ".Tier")); Integer bank = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + args[1] + ".Bank")); Integer members = Integer.valueOf(this.plugin.WAAlliancesconfig.getInt("Alliances." + args[1] + ".MemberCount")); String Leader = this.plugin.WAAlliancesconfig.getString("Alliances." + args[1] + ".Leader"); String color1 = this.plugin.WAAlliancesconfig.getString("Alliances." + args[1] + ".Color1"); String color2 = this.plugin.WAAlliancesconfig.getString("Alliances." + args[1] + ".Color2"); List <String> users = plugin.mail.getStringList("Users.Total"); plugin.datacore.set("AllianceDataDisplay", ""); for (String lol : users){ Boolean inAlliance = plugin.WAAlliancesconfig.getBoolean("Users." + lol + ".InAlliance"); if (inAlliance){ String allianceCheck = plugin.WAAlliancesconfig.getString("Users." + lol + ".Alliance"); if (allianceCheck.equals(args[1])){ String userDisplay = plugin.datacore.getString("AllianceDataDisplay"); int midpoint = lol.length() / 2; String firstHalf = lol.substring(0, midpoint); String secondHalf = lol.substring(midpoint); String lolColor1 = "&" + color1 + firstHalf; String lolColor2 = "&" + color2 + secondHalf; String complete = lolColor1 + lolColor2; plugin.datacore.set("AllianceDataDisplay", userDisplay + "&f, " + complete); } } } sender.sendMessage(new String[] { this.waaprefix + "Selected Alliance: " + args[1], ChatColor.GREEN + "| Tier: " + tier, ChatColor.GREEN + "| Bank: " + bank, ChatColor.GREEN + "| Members: " + members, ChatColor.GREEN + "| Leader: " + Leader, ChatColor.GREEN + "| Colors: " + "&" + color1 + "," + " " + "&" + color2, ChatColor.GREEN + "| Users: " + Utils.AS(plugin.datacore.getString("AllianceDataDisplay"))}); } } else if (args[0].equalsIgnoreCase("levels")) { sender.sendMessage(this.waaprefix + "Check out http://worldsapart.no-ip.org/?p=alliances"); } else if ((args[0].equalsIgnoreCase("setrank")) && (args.length == 3)) { if (!this.plugin.WAAlliancesconfig.getBoolean("Users." + args[1] + ".InAlliance")) { sender.sendMessage(this.waaprefix + "That user is not even in an alliance!"); return true; } if (!this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equalsIgnoreCase("Leader")) { sender.sendMessage(this.waaprefix + "Only the leader can disband the alliance."); return true; } if (args[2].equalsIgnoreCase("Leader")) { sender.sendMessage(this.waaprefix + "You can't make someone leader like that."); return true; } if (!this.plugin.WAAlliancesconfig.getString("Users." + args[1] + ".Alliance").equals(this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"))) { sender.sendMessage(this.waaprefix + "That user is not a part of your alliance."); return true; } if (args[1].equalsIgnoreCase(pl)) { sender.sendMessage(this.waaprefix + "You can't make change your own title, otherwise there won't be a leader!"); return true; } this.plugin.WAAlliancesconfig.set("Users." + args[1] + ".AllianceRank", args[2]); sender.sendMessage(this.waaprefix + "Updated the title of " + args[1] + " to " + args[2]); if (this.plugin.WAAlliancesconfig.getString("Users." + args[1] + ".currentChat").equals(this.plugin.WAAlliancesconfig.getString("Users." + args[1] + ".Alliance"))) { this.plugin.WAAlliancesconfig.set("Users." + args[1] + ".AllianceRank2", args[2]); } } else { if ((args[0].equalsIgnoreCase("leader")) && (args.length == 2)) { if (!this.plugin.WAAlliancesconfig.getString("Users." + pl + ".AllianceRank").equalsIgnoreCase("Leader")) { sender.sendMessage(this.waaprefix + "Only the leader can change leaders."); return true; } String senderAlliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); String receivingAlliance = this.plugin.WAAlliancesconfig.getString("Users." + args[1] + ".Alliance"); if (!senderAlliance.equals(receivingAlliance)) { sender.sendMessage(this.waaprefix + "The person isn't even in your alliance. Go home you're drunk."); return true; } this.plugin.WAAlliancesconfig.set("Users." + pl + ".AllianceRank", "Member"); this.plugin.WAAlliancesconfig.set("Users." + args[1] + ".AllianceRank", "Leader"); this.plugin.WAAlliancesconfig.set("Alliances." + senderAlliance + ".Leader", args[1]); sender.sendMessage(this.waaprefix + "Leader changed to " + args[1] + " !"); Player qmsg = Bukkit.getPlayer(args[1]); Bukkit.broadcastMessage(this.waaprefix + pl + " has transferred leadership of their alliance to " + args[1]); qmsg.sendMessage(this.waaprefix + "You were made leader of your alliance!"); return true; } if ((args[0].equalsIgnoreCase("pay")) && (args.length == 3)) { Boolean Alliance = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Alliances." + args[1] + ".Created")); if (!Alliance.booleanValue()) { sender.sendMessage(this.waaprefix + "This alliance does not exist!"); return true; } if (!isInteger(args[2])) { sender.sendMessage(this.waaprefix + "Try /waa pay <alliance> <amount> using numbers this time. #worried about your health"); return true; } if (args[2].startsWith("-")) { sender.sendMessage(this.waaprefix + "Why the hell would you want to make the balance go DOWN?"); return true; } if (args[2].startsWith("0")) { sender.sendMessage(this.waaprefix + "I don't even..."); return true; } int Bank = this.plugin.WAAlliancesconfig.getInt("Alliances." + args[1] + ".Bank"); int sending = Integer.parseInt(args[2]) + 1; if (!WCVault.econ.has(pl, sending)) { sender.sendMessage(this.waaprefix + "You lack the funds to do that. #maths are hard. (You must have 1 more shiny than you are donating)"); return true; } int Bank2 = Bank + sending - 1; this.plugin.WAAlliancesconfig.set("Alliances." + args[1] + ".Bank", Integer.valueOf(Bank2)); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "eco take " + pl + " " + (sending - 1)); sender.sendMessage(this.waaprefix + "The alliance bank now holds " + Bank2 + " shinies."); this.plugin.saveYamls(); return true; } } } } } else { sender.sendMessage("Try /waa help"); } } if ((cmd.getName().equalsIgnoreCase("nick")) && ((sender instanceof Player))) { if (args.length > 0) { String name = sender.getName(); String nameCheck = args[0].substring(0, Math.min(args[0].length(), 3)); if (args[0].length() > 16) { sender.sendMessage(this.waaprefix + "Your nickname can't be longer than 16 characters!"); return true; } if (args[0].length() < 3) { sender.sendMessage(this.waaprefix + "Your nickname must contain the first three letters of your name."); return true; } if (args[0].contains("&")) { sender.sendMessage(this.waaprefix + "Do not try to set colors. Those will automatically be applied based on your alliance."); return true; } if (!name.toLowerCase().startsWith(nameCheck.toLowerCase())) { sender.sendMessage(this.waaprefix + "You must use the first three letters of your name."); return true; } Boolean InAlliance = Boolean.valueOf(this.plugin.WAAlliancesconfig.getBoolean("Users." + sender.getName() + ".InAlliance")); if (!InAlliance.booleanValue()) { if (this.plugin.WAAlliancesconfig.getBoolean("Users." + sender.getName() + ".Staff")) { String newNick = args[0].replaceAll("§", "_"); this.plugin.WAAlliancesconfig.set("Users." + sender.getName() + ".Nick", newNick); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + sender.getName() + " &7&o" + newNick); return true; } String newNick = args[0].replaceAll("§", "_"); this.plugin.WAAlliancesconfig.set("Users." + sender.getName() + ".Nick", newNick); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + sender.getName() + " &7" + newNick); return true; } if (this.plugin.WAAlliancesconfig.getBoolean("Users." + sender.getName() + ".Staff")) { String pl = sender.getName(); String Alliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); String Color1 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color1"); String Color2 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color2"); String newNick = args[0].replaceAll("§", "_"); this.plugin.WAAlliancesconfig.set("Users." + sender.getName() + ".Nick", newNick); int midpoint = newNick.length() / 2; String firstHalf = newNick.substring(0, midpoint); String secondHalf = newNick.substring(midpoint); String firstHalfColors = "&" + Color1 + "&o" + firstHalf; String secondHalfColors = "&" + Color2 + "&o" + secondHalf; String completed = firstHalfColors + secondHalfColors; Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + pl + " " + completed); return true; } String pl = sender.getName(); String Alliance = this.plugin.WAAlliancesconfig.getString("Users." + pl + ".Alliance"); String Color1 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color1"); String Color2 = this.plugin.WAAlliancesconfig.getString("Alliances." + Alliance + ".Color2"); String newNick = args[0].replaceAll("§", "_"); this.plugin.WAAlliancesconfig.set("Users." + sender.getName() + ".Nick", newNick); int midpoint = newNick.length() / 2; String firstHalf = newNick.substring(0, midpoint); String secondHalf = newNick.substring(midpoint); String firstHalfColors = "&" + Color1 + firstHalf; String secondHalfColors = "&" + Color2 + secondHalf; String completed = firstHalfColors + secondHalfColors; Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "enick " + pl + " " + completed); return true; } sender.sendMessage(this.waaprefix + "Correct usage is /nick <newnick>"); return true; } return true; } public boolean isLeader(String pl, String allianceName) { String player = this.plugin.WAAlliancesconfig.getString("Users." + pl); String leader = this.plugin.WAAlliancesconfig.getString("Alliances." + allianceName + ".Leader"); if (leader.equalsIgnoreCase(player)) { return true; } return false; } public static boolean isInteger(String s) { try { Integer.parseInt(s); } catch (NumberFormatException e) { return false; } return true; } private void allianceUpgrade(String alliance, Integer tier, Integer bank, Boolean approved, CommandSender sender) { if (approved == false){ sender.sendMessage(waaprefix + "Your alliance must be approved by a staff member before you do this!"); return; } String tierPrices = "60000 75000 90000 105000 125000 145000 165000 180000"; String outsetLevels = "15 15 20 20 15 25 10 15"; String[] prices = tierPrices.split(" "); String[] outsets = outsetLevels.split(" "); if (bank < Integer.parseInt(prices[(tier)])){ sender.sendMessage(this.waaprefix + "Your alliance lackcs the proper funds to carry out this operation!"); return; } plugin.WAAlliancesconfig.set("Alliances." + alliance + ".Approved", false); plugin.WAAlliancesconfig.set("Alliances." + alliance + ".Tier", (tier+1)); plugin.WAAlliancesconfig.set("Alliances." + alliance + ".Bank", (bank-(Integer.parseInt(prices[(tier)])))); Bukkit.getServer().dispatchCommand(sender, "rg select " + alliance); Bukkit.getServer().dispatchCommand(sender, "/outset " + outsets[(tier)]); Bukkit.getServer().dispatchCommand(sender, "/rg redefine " + alliance); Bukkit.broadcastMessage(waaprefix + alliance + " has been upgraded to Tier " + (tier+1) + "!"); } }
[ "lyokofirelyte@gmail.com" ]
lyokofirelyte@gmail.com
ca92ec4dbaa3261d7430a04c09f10bb9fdbaf041
94b97f7af619896c438bd0aa15e82b0c37f9de75
/app/src/main/java/com/app/foody/Fragments/KhamPhaFragment.java
01fd3ecbdb47a78283c3a5c24f5469003a3855b0
[]
no_license
hieugiddy/Foody
6bfaa363c28c50b66242de8438e3670a10f750e9
a9746ff0a055537c90105734300dffd44ab35bda
refs/heads/master
2023-02-05T16:23:47.650623
2020-12-22T16:49:14
2020-12-22T16:49:14
305,984,466
0
0
null
2020-12-22T13:02:35
2020-10-21T10:12:43
Java
UTF-8
Java
false
false
3,045
java
package com.app.foody.Fragments; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RadioButton; import android.widget.RadioGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.viewpager.widget.ViewPager; import com.app.foody.Adapters.AdapterViewPagerKhamPha; import com.app.foody.R; import com.app.foody.View.Themquanan; public class KhamPhaFragment extends Fragment implements ViewPager.OnPageChangeListener, RadioGroup.OnCheckedChangeListener{ ViewPager viewPagerTrangChu; RadioButton rbOdau, rbAnGi; RadioGroup groupOdauAngi; ImageView btt_back,themQuanAN; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View v = inflater.inflate(R.layout.khampha_activity, container, false); viewPagerTrangChu = (ViewPager) v.findViewById(R.id.viewpager_trangchu); rbOdau = (RadioButton) v.findViewById(R.id.rb_odau); rbAnGi = (RadioButton) v.findViewById(R.id.rb_angi); btt_back=(ImageView) v.findViewById(R.id.btt_back); themQuanAN=v.findViewById(R.id.themQuanAN); groupOdauAngi = (RadioGroup) v.findViewById(R.id.group_odau_angi); btt_back.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { getActivity().onBackPressed(); } }); AdapterViewPagerKhamPha adapterViewPagerKhamPha = new AdapterViewPagerKhamPha(getChildFragmentManager()); viewPagerTrangChu.setAdapter(adapterViewPagerKhamPha); viewPagerTrangChu.addOnPageChangeListener(this); groupOdauAngi.setOnCheckedChangeListener(this); themQuanAN.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent=new Intent(getActivity(), Themquanan.class); startActivity(intent); } }); return v; } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { switch (position){ case 0: rbOdau.setChecked(true); break; case 1: rbAnGi.setChecked(true); break; } } @Override public void onPageScrollStateChanged(int state) { } @Override public void onCheckedChanged(RadioGroup group, int checkedId) { switch (checkedId){ case R.id.rb_angi: viewPagerTrangChu.setCurrentItem(1); break; case R.id.rb_odau: viewPagerTrangChu.setCurrentItem(0); break; } } }
[ "hieugiddy.pro@gmail.com" ]
hieugiddy.pro@gmail.com
ff6cc234f77317574a35e2fe2736c695a824cebf
c4623aa95fb8cdd0ee1bc68962711c33af44604e
/src/com/yelp/android/bj/b.java
0bf9346d124118b41150f40fe19716c5bc94be05
[]
no_license
reverseengineeringer/com.yelp.android
48f7f2c830a3a1714112649a6a0a3110f7bdc2b1
b0ac8d4f6cd5fc5543f0d8de399b6d7b3a2184c8
refs/heads/master
2021-01-19T02:07:25.997811
2016-07-19T16:37:24
2016-07-19T16:37:24
38,555,675
1
0
null
null
null
null
UTF-8
Java
false
false
119,844
java
package com.yelp.android.bj; import android.location.Location; import android.os.Binder; import android.os.Bundle; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.Parcelable.Creator; import android.os.RemoteException; import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.CircleOptions; import com.google.android.gms.maps.model.GroundOverlayOptions; import com.google.android.gms.maps.model.MarkerOptions; import com.google.android.gms.maps.model.PolygonOptions; import com.google.android.gms.maps.model.PolylineOptions; import com.google.android.gms.maps.model.TileOverlayOptions; import com.google.android.gms.maps.model.l; import com.google.android.gms.maps.model.m; import com.google.android.gms.maps.model.s; import com.yelp.android.bk.a; import com.yelp.android.bk.d; import com.yelp.android.bk.e; import com.yelp.android.bk.e.a; import com.yelp.android.bk.h; public abstract interface b extends IInterface { public abstract CameraPosition a() throws RemoteException; public abstract a a(PolylineOptions paramPolylineOptions) throws RemoteException; public abstract com.yelp.android.bk.c a(CircleOptions paramCircleOptions) throws RemoteException; public abstract d a(GroundOverlayOptions paramGroundOverlayOptions) throws RemoteException; public abstract com.yelp.android.bk.f a(MarkerOptions paramMarkerOptions) throws RemoteException; public abstract com.yelp.android.bk.g a(PolygonOptions paramPolygonOptions) throws RemoteException; public abstract h a(TileOverlayOptions paramTileOverlayOptions) throws RemoteException; public abstract void a(int paramInt) throws RemoteException; public abstract void a(int paramInt1, int paramInt2, int paramInt3, int paramInt4) throws RemoteException; public abstract void a(Bundle paramBundle) throws RemoteException; public abstract void a(com.google.android.gms.dynamic.c paramc) throws RemoteException; public abstract void a(com.google.android.gms.dynamic.c paramc, int paramInt, r paramr) throws RemoteException; public abstract void a(com.google.android.gms.dynamic.c paramc, r paramr) throws RemoteException; public abstract void a(ab paramab) throws RemoteException; public abstract void a(ac paramac) throws RemoteException; public abstract void a(ad paramad) throws RemoteException; public abstract void a(ae paramae) throws RemoteException; public abstract void a(af paramaf) throws RemoteException; public abstract void a(ag paramag) throws RemoteException; public abstract void a(ah paramah) throws RemoteException; public abstract void a(ai paramai) throws RemoteException; public abstract void a(aj paramaj) throws RemoteException; public abstract void a(ak paramak) throws RemoteException; public abstract void a(al paramal) throws RemoteException; public abstract void a(c paramc) throws RemoteException; public abstract void a(o paramo, com.google.android.gms.dynamic.c paramc) throws RemoteException; public abstract void a(t paramt) throws RemoteException; public abstract void a(u paramu) throws RemoteException; public abstract void a(v paramv) throws RemoteException; public abstract void a(w paramw) throws RemoteException; public abstract void a(x paramx) throws RemoteException; public abstract void a(y paramy) throws RemoteException; public abstract void a(z paramz) throws RemoteException; public abstract void a(String paramString) throws RemoteException; public abstract void a(boolean paramBoolean) throws RemoteException; public abstract float b() throws RemoteException; public abstract void b(Bundle paramBundle) throws RemoteException; public abstract void b(com.google.android.gms.dynamic.c paramc) throws RemoteException; public abstract boolean b(boolean paramBoolean) throws RemoteException; public abstract float c() throws RemoteException; public abstract void c(Bundle paramBundle) throws RemoteException; public abstract void c(boolean paramBoolean) throws RemoteException; public abstract void d() throws RemoteException; public abstract void d(boolean paramBoolean) throws RemoteException; public abstract void e() throws RemoteException; public abstract int f() throws RemoteException; public abstract boolean g() throws RemoteException; public abstract boolean h() throws RemoteException; public abstract boolean i() throws RemoteException; public abstract Location j() throws RemoteException; public abstract j k() throws RemoteException; public abstract f l() throws RemoteException; public abstract boolean m() throws RemoteException; public abstract e n() throws RemoteException; public abstract void o() throws RemoteException; public abstract void p() throws RemoteException; public abstract void q() throws RemoteException; public abstract void r() throws RemoteException; public abstract boolean s() throws RemoteException; public abstract void t() throws RemoteException; public static abstract class a extends Binder implements b { public static b a(IBinder paramIBinder) { if (paramIBinder == null) { return null; } IInterface localIInterface = paramIBinder.queryLocalInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if ((localIInterface != null) && ((localIInterface instanceof b))) { return (b)localIInterface; } return new a(paramIBinder); } public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2) throws RemoteException { int i = 0; int j = 0; int k = 0; boolean bool2 = false; int m = 0; boolean bool3 = false; int n = 0; boolean bool1 = false; a locala = null; Object localObject2 = null; Object localObject3 = null; Object localObject4 = null; Object localObject6 = null; Object localObject7 = null; Object localObject5 = null; Object localObject8 = null; Object localObject1 = null; float f; switch (paramInt1) { default: return super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2); case 1598968902: paramParcel2.writeString("com.google.android.gms.maps.internal.IGoogleMapDelegate"); return true; case 1: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); paramParcel1 = a(); paramParcel2.writeNoException(); if (paramParcel1 != null) { paramParcel2.writeInt(1); paramParcel1.writeToParcel(paramParcel2, 1); return true; } paramParcel2.writeInt(0); return true; case 2: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); f = b(); paramParcel2.writeNoException(); paramParcel2.writeFloat(f); return true; case 3: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); f = c(); paramParcel2.writeNoException(); paramParcel2.writeFloat(f); return true; case 4: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(com.google.android.gms.dynamic.c.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 5: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); b(com.google.android.gms.dynamic.c.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 6: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(com.google.android.gms.dynamic.c.a.a(paramParcel1.readStrongBinder()), r.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 7: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(com.google.android.gms.dynamic.c.a.a(paramParcel1.readStrongBinder()), paramParcel1.readInt(), r.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 8: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); d(); paramParcel2.writeNoException(); return true; case 9: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) {} for (paramParcel1 = PolylineOptions.CREATOR.a(paramParcel1);; paramParcel1 = null) { locala = a(paramParcel1); paramParcel2.writeNoException(); paramParcel1 = (Parcel)localObject1; if (locala != null) { paramParcel1 = locala.asBinder(); } paramParcel2.writeStrongBinder(paramParcel1); return true; } case 10: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) {} for (paramParcel1 = PolygonOptions.CREATOR.a(paramParcel1);; paramParcel1 = null) { localObject1 = a(paramParcel1); paramParcel2.writeNoException(); paramParcel1 = locala; if (localObject1 != null) { paramParcel1 = ((com.yelp.android.bk.g)localObject1).asBinder(); } paramParcel2.writeStrongBinder(paramParcel1); return true; } case 11: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) {} for (paramParcel1 = MarkerOptions.CREATOR.a(paramParcel1);; paramParcel1 = null) { localObject1 = a(paramParcel1); paramParcel2.writeNoException(); paramParcel1 = (Parcel)localObject2; if (localObject1 != null) { paramParcel1 = ((com.yelp.android.bk.f)localObject1).asBinder(); } paramParcel2.writeStrongBinder(paramParcel1); return true; } case 12: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) {} for (paramParcel1 = GroundOverlayOptions.CREATOR.a(paramParcel1);; paramParcel1 = null) { localObject1 = a(paramParcel1); paramParcel2.writeNoException(); paramParcel1 = (Parcel)localObject3; if (localObject1 != null) { paramParcel1 = ((d)localObject1).asBinder(); } paramParcel2.writeStrongBinder(paramParcel1); return true; } case 13: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) {} for (paramParcel1 = TileOverlayOptions.CREATOR.a(paramParcel1);; paramParcel1 = null) { localObject1 = a(paramParcel1); paramParcel2.writeNoException(); paramParcel1 = (Parcel)localObject4; if (localObject1 != null) { paramParcel1 = ((h)localObject1).asBinder(); } paramParcel2.writeStrongBinder(paramParcel1); return true; } case 14: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); e(); paramParcel2.writeNoException(); return true; case 15: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); paramInt1 = f(); paramParcel2.writeNoException(); paramParcel2.writeInt(paramInt1); return true; case 16: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(paramParcel1.readInt()); paramParcel2.writeNoException(); return true; case 17: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); bool1 = g(); paramParcel2.writeNoException(); if (bool1) {} for (paramInt1 = 1;; paramInt1 = 0) { paramParcel2.writeInt(paramInt1); return true; } case 18: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) { bool1 = true; } a(bool1); paramParcel2.writeNoException(); return true; case 19: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); bool1 = h(); paramParcel2.writeNoException(); paramInt1 = i; if (bool1) { paramInt1 = 1; } paramParcel2.writeInt(paramInt1); return true; case 20: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) {} for (bool1 = true;; bool1 = false) { bool1 = b(bool1); paramParcel2.writeNoException(); paramInt1 = j; if (bool1) { paramInt1 = 1; } paramParcel2.writeInt(paramInt1); return true; } case 21: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); bool1 = i(); paramParcel2.writeNoException(); paramInt1 = k; if (bool1) { paramInt1 = 1; } paramParcel2.writeInt(paramInt1); return true; case 22: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); bool1 = bool2; if (paramParcel1.readInt() != 0) { bool1 = true; } c(bool1); paramParcel2.writeNoException(); return true; case 23: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); paramParcel1 = j(); paramParcel2.writeNoException(); if (paramParcel1 != null) { paramParcel2.writeInt(1); paramParcel1.writeToParcel(paramParcel2, 1); return true; } paramParcel2.writeInt(0); return true; case 24: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(c.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 25: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); localObject1 = k(); paramParcel2.writeNoException(); paramParcel1 = (Parcel)localObject6; if (localObject1 != null) { paramParcel1 = ((j)localObject1).asBinder(); } paramParcel2.writeStrongBinder(paramParcel1); return true; case 26: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); localObject1 = l(); paramParcel2.writeNoException(); paramParcel1 = (Parcel)localObject7; if (localObject1 != null) { paramParcel1 = ((f)localObject1).asBinder(); } paramParcel2.writeStrongBinder(paramParcel1); return true; case 27: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(u.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 28: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(ab.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 29: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(ad.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 30: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(af.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 31: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(ag.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 32: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(x.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 33: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(t.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 35: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) {} for (paramParcel1 = CircleOptions.CREATOR.a(paramParcel1);; paramParcel1 = null) { localObject1 = a(paramParcel1); paramParcel2.writeNoException(); paramParcel1 = (Parcel)localObject5; if (localObject1 != null) { paramParcel1 = ((com.yelp.android.bk.c)localObject1).asBinder(); } paramParcel2.writeStrongBinder(paramParcel1); return true; } case 36: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(ai.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 37: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(ah.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 38: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(o.a.a(paramParcel1.readStrongBinder()), com.google.android.gms.dynamic.c.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 39: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(paramParcel1.readInt(), paramParcel1.readInt(), paramParcel1.readInt(), paramParcel1.readInt()); paramParcel2.writeNoException(); return true; case 40: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); bool1 = m(); paramParcel2.writeNoException(); paramInt1 = m; if (bool1) { paramInt1 = 1; } paramParcel2.writeInt(paramInt1); return true; case 41: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); bool1 = bool3; if (paramParcel1.readInt() != 0) { bool1 = true; } d(bool1); paramParcel2.writeNoException(); return true; case 42: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(ac.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 44: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); localObject1 = n(); paramParcel2.writeNoException(); paramParcel1 = (Parcel)localObject8; if (localObject1 != null) { paramParcel1 = ((e)localObject1).asBinder(); } paramParcel2.writeStrongBinder(paramParcel1); return true; case 45: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(w.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 53: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(ae.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 54: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) {} for (paramParcel1 = (Bundle)Bundle.CREATOR.createFromParcel(paramParcel1);; paramParcel1 = null) { a(paramParcel1); paramParcel2.writeNoException(); return true; } case 55: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); o(); paramParcel2.writeNoException(); return true; case 56: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); p(); paramParcel2.writeNoException(); return true; case 57: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); q(); paramParcel2.writeNoException(); return true; case 58: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); r(); paramParcel2.writeNoException(); return true; case 59: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); bool1 = s(); paramParcel2.writeNoException(); paramInt1 = n; if (bool1) { paramInt1 = 1; } paramParcel2.writeInt(paramInt1); return true; case 60: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) {} for (paramParcel1 = (Bundle)Bundle.CREATOR.createFromParcel(paramParcel1);; paramParcel1 = null) { b(paramParcel1); paramParcel2.writeNoException(); if (paramParcel1 == null) { break; } paramParcel2.writeInt(1); paramParcel1.writeToParcel(paramParcel2, 1); return true; } paramParcel2.writeInt(0); return true; case 61: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(paramParcel1.readString()); paramParcel2.writeNoException(); return true; case 80: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(aj.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 81: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramParcel1.readInt() != 0) {} for (paramParcel1 = (Bundle)Bundle.CREATOR.createFromParcel(paramParcel1);; paramParcel1 = null) { c(paramParcel1); paramParcel2.writeNoException(); return true; } case 82: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); t(); paramParcel2.writeNoException(); return true; case 83: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(v.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 84: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(z.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 85: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(ak.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 86: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(y.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; } paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a(al.a.a(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; } private static class a implements b { private IBinder a; a(IBinder paramIBinder) { a = paramIBinder; } /* Error */ public CameraPosition a() throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_0 // 15: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 18: iconst_1 // 19: aload_2 // 20: aload_3 // 21: iconst_0 // 22: invokeinterface 39 5 0 // 27: pop // 28: aload_3 // 29: invokevirtual 42 android/os/Parcel:readException ()V // 32: aload_3 // 33: invokevirtual 46 android/os/Parcel:readInt ()I // 36: ifeq +21 -> 57 // 39: getstatic 52 com/google/android/gms/maps/model/CameraPosition:CREATOR Lcom/google/android/gms/maps/model/e; // 42: aload_3 // 43: invokevirtual 57 com/google/android/gms/maps/model/e:a (Landroid/os/Parcel;)Lcom/google/android/gms/maps/model/CameraPosition; // 46: astore_1 // 47: aload_3 // 48: invokevirtual 60 android/os/Parcel:recycle ()V // 51: aload_2 // 52: invokevirtual 60 android/os/Parcel:recycle ()V // 55: aload_1 // 56: areturn // 57: aconst_null // 58: astore_1 // 59: goto -12 -> 47 // 62: astore_1 // 63: aload_3 // 64: invokevirtual 60 android/os/Parcel:recycle ()V // 67: aload_2 // 68: invokevirtual 60 android/os/Parcel:recycle ()V // 71: aload_1 // 72: athrow // Local variable table: // start length slot name signature // 0 73 0 this a // 46 13 1 localCameraPosition CameraPosition // 62 10 1 localObject Object // 3 65 2 localParcel1 Parcel // 7 57 3 localParcel2 Parcel // Exception table: // from to target type // 8 47 62 finally } /* Error */ public a a(PolylineOptions paramPolylineOptions) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +51 -> 66 // 18: aload_2 // 19: iconst_1 // 20: invokevirtual 66 android/os/Parcel:writeInt (I)V // 23: aload_1 // 24: aload_2 // 25: iconst_0 // 26: invokevirtual 72 com/google/android/gms/maps/model/PolylineOptions:writeToParcel (Landroid/os/Parcel;I)V // 29: aload_0 // 30: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 33: bipush 9 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 76 android/os/Parcel:readStrongBinder ()Landroid/os/IBinder; // 52: invokestatic 81 com/yelp/android/bk/a$a:a (Landroid/os/IBinder;)Lcom/yelp/android/bk/a; // 55: astore_1 // 56: aload_3 // 57: invokevirtual 60 android/os/Parcel:recycle ()V // 60: aload_2 // 61: invokevirtual 60 android/os/Parcel:recycle ()V // 64: aload_1 // 65: areturn // 66: aload_2 // 67: iconst_0 // 68: invokevirtual 66 android/os/Parcel:writeInt (I)V // 71: goto -42 -> 29 // 74: astore_1 // 75: aload_3 // 76: invokevirtual 60 android/os/Parcel:recycle ()V // 79: aload_2 // 80: invokevirtual 60 android/os/Parcel:recycle ()V // 83: aload_1 // 84: athrow // Local variable table: // start length slot name signature // 0 85 0 this a // 0 85 1 paramPolylineOptions PolylineOptions // 3 77 2 localParcel1 Parcel // 7 69 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 74 finally // 18 29 74 finally // 29 56 74 finally // 66 71 74 finally } /* Error */ public com.yelp.android.bk.c a(CircleOptions paramCircleOptions) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +51 -> 66 // 18: aload_2 // 19: iconst_1 // 20: invokevirtual 66 android/os/Parcel:writeInt (I)V // 23: aload_1 // 24: aload_2 // 25: iconst_0 // 26: invokevirtual 85 com/google/android/gms/maps/model/CircleOptions:writeToParcel (Landroid/os/Parcel;I)V // 29: aload_0 // 30: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 33: bipush 35 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 76 android/os/Parcel:readStrongBinder ()Landroid/os/IBinder; // 52: invokestatic 90 com/yelp/android/bk/c$a:a (Landroid/os/IBinder;)Lcom/yelp/android/bk/c; // 55: astore_1 // 56: aload_3 // 57: invokevirtual 60 android/os/Parcel:recycle ()V // 60: aload_2 // 61: invokevirtual 60 android/os/Parcel:recycle ()V // 64: aload_1 // 65: areturn // 66: aload_2 // 67: iconst_0 // 68: invokevirtual 66 android/os/Parcel:writeInt (I)V // 71: goto -42 -> 29 // 74: astore_1 // 75: aload_3 // 76: invokevirtual 60 android/os/Parcel:recycle ()V // 79: aload_2 // 80: invokevirtual 60 android/os/Parcel:recycle ()V // 83: aload_1 // 84: athrow // Local variable table: // start length slot name signature // 0 85 0 this a // 0 85 1 paramCircleOptions CircleOptions // 3 77 2 localParcel1 Parcel // 7 69 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 74 finally // 18 29 74 finally // 29 56 74 finally // 66 71 74 finally } /* Error */ public d a(GroundOverlayOptions paramGroundOverlayOptions) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +51 -> 66 // 18: aload_2 // 19: iconst_1 // 20: invokevirtual 66 android/os/Parcel:writeInt (I)V // 23: aload_1 // 24: aload_2 // 25: iconst_0 // 26: invokevirtual 94 com/google/android/gms/maps/model/GroundOverlayOptions:writeToParcel (Landroid/os/Parcel;I)V // 29: aload_0 // 30: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 33: bipush 12 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 76 android/os/Parcel:readStrongBinder ()Landroid/os/IBinder; // 52: invokestatic 99 com/yelp/android/bk/d$a:a (Landroid/os/IBinder;)Lcom/yelp/android/bk/d; // 55: astore_1 // 56: aload_3 // 57: invokevirtual 60 android/os/Parcel:recycle ()V // 60: aload_2 // 61: invokevirtual 60 android/os/Parcel:recycle ()V // 64: aload_1 // 65: areturn // 66: aload_2 // 67: iconst_0 // 68: invokevirtual 66 android/os/Parcel:writeInt (I)V // 71: goto -42 -> 29 // 74: astore_1 // 75: aload_3 // 76: invokevirtual 60 android/os/Parcel:recycle ()V // 79: aload_2 // 80: invokevirtual 60 android/os/Parcel:recycle ()V // 83: aload_1 // 84: athrow // Local variable table: // start length slot name signature // 0 85 0 this a // 0 85 1 paramGroundOverlayOptions GroundOverlayOptions // 3 77 2 localParcel1 Parcel // 7 69 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 74 finally // 18 29 74 finally // 29 56 74 finally // 66 71 74 finally } /* Error */ public com.yelp.android.bk.f a(MarkerOptions paramMarkerOptions) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +51 -> 66 // 18: aload_2 // 19: iconst_1 // 20: invokevirtual 66 android/os/Parcel:writeInt (I)V // 23: aload_1 // 24: aload_2 // 25: iconst_0 // 26: invokevirtual 103 com/google/android/gms/maps/model/MarkerOptions:writeToParcel (Landroid/os/Parcel;I)V // 29: aload_0 // 30: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 33: bipush 11 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 76 android/os/Parcel:readStrongBinder ()Landroid/os/IBinder; // 52: invokestatic 108 com/yelp/android/bk/f$a:a (Landroid/os/IBinder;)Lcom/yelp/android/bk/f; // 55: astore_1 // 56: aload_3 // 57: invokevirtual 60 android/os/Parcel:recycle ()V // 60: aload_2 // 61: invokevirtual 60 android/os/Parcel:recycle ()V // 64: aload_1 // 65: areturn // 66: aload_2 // 67: iconst_0 // 68: invokevirtual 66 android/os/Parcel:writeInt (I)V // 71: goto -42 -> 29 // 74: astore_1 // 75: aload_3 // 76: invokevirtual 60 android/os/Parcel:recycle ()V // 79: aload_2 // 80: invokevirtual 60 android/os/Parcel:recycle ()V // 83: aload_1 // 84: athrow // Local variable table: // start length slot name signature // 0 85 0 this a // 0 85 1 paramMarkerOptions MarkerOptions // 3 77 2 localParcel1 Parcel // 7 69 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 74 finally // 18 29 74 finally // 29 56 74 finally // 66 71 74 finally } /* Error */ public com.yelp.android.bk.g a(PolygonOptions paramPolygonOptions) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +51 -> 66 // 18: aload_2 // 19: iconst_1 // 20: invokevirtual 66 android/os/Parcel:writeInt (I)V // 23: aload_1 // 24: aload_2 // 25: iconst_0 // 26: invokevirtual 112 com/google/android/gms/maps/model/PolygonOptions:writeToParcel (Landroid/os/Parcel;I)V // 29: aload_0 // 30: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 33: bipush 10 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 76 android/os/Parcel:readStrongBinder ()Landroid/os/IBinder; // 52: invokestatic 117 com/yelp/android/bk/g$a:a (Landroid/os/IBinder;)Lcom/yelp/android/bk/g; // 55: astore_1 // 56: aload_3 // 57: invokevirtual 60 android/os/Parcel:recycle ()V // 60: aload_2 // 61: invokevirtual 60 android/os/Parcel:recycle ()V // 64: aload_1 // 65: areturn // 66: aload_2 // 67: iconst_0 // 68: invokevirtual 66 android/os/Parcel:writeInt (I)V // 71: goto -42 -> 29 // 74: astore_1 // 75: aload_3 // 76: invokevirtual 60 android/os/Parcel:recycle ()V // 79: aload_2 // 80: invokevirtual 60 android/os/Parcel:recycle ()V // 83: aload_1 // 84: athrow // Local variable table: // start length slot name signature // 0 85 0 this a // 0 85 1 paramPolygonOptions PolygonOptions // 3 77 2 localParcel1 Parcel // 7 69 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 74 finally // 18 29 74 finally // 29 56 74 finally // 66 71 74 finally } /* Error */ public h a(TileOverlayOptions paramTileOverlayOptions) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +51 -> 66 // 18: aload_2 // 19: iconst_1 // 20: invokevirtual 66 android/os/Parcel:writeInt (I)V // 23: aload_1 // 24: aload_2 // 25: iconst_0 // 26: invokevirtual 121 com/google/android/gms/maps/model/TileOverlayOptions:writeToParcel (Landroid/os/Parcel;I)V // 29: aload_0 // 30: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 33: bipush 13 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 76 android/os/Parcel:readStrongBinder ()Landroid/os/IBinder; // 52: invokestatic 126 com/yelp/android/bk/h$a:a (Landroid/os/IBinder;)Lcom/yelp/android/bk/h; // 55: astore_1 // 56: aload_3 // 57: invokevirtual 60 android/os/Parcel:recycle ()V // 60: aload_2 // 61: invokevirtual 60 android/os/Parcel:recycle ()V // 64: aload_1 // 65: areturn // 66: aload_2 // 67: iconst_0 // 68: invokevirtual 66 android/os/Parcel:writeInt (I)V // 71: goto -42 -> 29 // 74: astore_1 // 75: aload_3 // 76: invokevirtual 60 android/os/Parcel:recycle ()V // 79: aload_2 // 80: invokevirtual 60 android/os/Parcel:recycle ()V // 83: aload_1 // 84: athrow // Local variable table: // start length slot name signature // 0 85 0 this a // 0 85 1 paramTileOverlayOptions TileOverlayOptions // 3 77 2 localParcel1 Parcel // 7 69 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 74 finally // 18 29 74 finally // 29 56 74 finally // 66 71 74 finally } public void a(int paramInt) throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); localParcel1.writeInt(paramInt); a.transact(16, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void a(int paramInt1, int paramInt2, int paramInt3, int paramInt4) throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); localParcel1.writeInt(paramInt1); localParcel1.writeInt(paramInt2); localParcel1.writeInt(paramInt3); localParcel1.writeInt(paramInt4); a.transact(39, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } /* Error */ public void a(Bundle paramBundle) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +42 -> 57 // 18: aload_2 // 19: iconst_1 // 20: invokevirtual 66 android/os/Parcel:writeInt (I)V // 23: aload_1 // 24: aload_2 // 25: iconst_0 // 26: invokevirtual 131 android/os/Bundle:writeToParcel (Landroid/os/Parcel;I)V // 29: aload_0 // 30: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 33: bipush 54 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 60 android/os/Parcel:recycle ()V // 52: aload_2 // 53: invokevirtual 60 android/os/Parcel:recycle ()V // 56: return // 57: aload_2 // 58: iconst_0 // 59: invokevirtual 66 android/os/Parcel:writeInt (I)V // 62: goto -33 -> 29 // 65: astore_1 // 66: aload_3 // 67: invokevirtual 60 android/os/Parcel:recycle ()V // 70: aload_2 // 71: invokevirtual 60 android/os/Parcel:recycle ()V // 74: aload_1 // 75: athrow // Local variable table: // start length slot name signature // 0 76 0 this a // 0 76 1 paramBundle Bundle // 3 68 2 localParcel1 Parcel // 7 60 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 65 finally // 18 29 65 finally // 29 48 65 finally // 57 62 65 finally } /* Error */ public void a(com.google.android.gms.dynamic.c paramc) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +42 -> 57 // 18: aload_1 // 19: invokeinterface 137 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: iconst_4 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 60 android/os/Parcel:recycle ()V // 52: aload_2 // 53: invokevirtual 60 android/os/Parcel:recycle ()V // 56: return // 57: aconst_null // 58: astore_1 // 59: goto -34 -> 25 // 62: astore_1 // 63: aload_3 // 64: invokevirtual 60 android/os/Parcel:recycle ()V // 67: aload_2 // 68: invokevirtual 60 android/os/Parcel:recycle ()V // 71: aload_1 // 72: athrow // Local variable table: // start length slot name signature // 0 73 0 this a // 0 73 1 paramc com.google.android.gms.dynamic.c // 3 65 2 localParcel1 Parcel // 7 57 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 62 finally // 18 25 62 finally // 25 48 62 finally } /* Error */ public void a(com.google.android.gms.dynamic.c paramc, int paramInt, r paramr) throws RemoteException { // Byte code: // 0: aconst_null // 1: astore 4 // 3: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 6: astore 5 // 8: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 11: astore 6 // 13: aload 5 // 15: ldc 29 // 17: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 20: aload_1 // 21: ifnull +75 -> 96 // 24: aload_1 // 25: invokeinterface 137 1 0 // 30: astore_1 // 31: aload 5 // 33: aload_1 // 34: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 37: aload 5 // 39: iload_2 // 40: invokevirtual 66 android/os/Parcel:writeInt (I)V // 43: aload 4 // 45: astore_1 // 46: aload_3 // 47: ifnull +10 -> 57 // 50: aload_3 // 51: invokeinterface 144 1 0 // 56: astore_1 // 57: aload 5 // 59: aload_1 // 60: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 63: aload_0 // 64: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 67: bipush 7 // 69: aload 5 // 71: aload 6 // 73: iconst_0 // 74: invokeinterface 39 5 0 // 79: pop // 80: aload 6 // 82: invokevirtual 42 android/os/Parcel:readException ()V // 85: aload 6 // 87: invokevirtual 60 android/os/Parcel:recycle ()V // 90: aload 5 // 92: invokevirtual 60 android/os/Parcel:recycle ()V // 95: return // 96: aconst_null // 97: astore_1 // 98: goto -67 -> 31 // 101: astore_1 // 102: aload 6 // 104: invokevirtual 60 android/os/Parcel:recycle ()V // 107: aload 5 // 109: invokevirtual 60 android/os/Parcel:recycle ()V // 112: aload_1 // 113: athrow // Local variable table: // start length slot name signature // 0 114 0 this a // 0 114 1 paramc com.google.android.gms.dynamic.c // 0 114 2 paramInt int // 0 114 3 paramr r // 1 43 4 localObject Object // 6 102 5 localParcel1 Parcel // 11 92 6 localParcel2 Parcel // Exception table: // from to target type // 13 20 101 finally // 24 31 101 finally // 31 43 101 finally // 50 57 101 finally // 57 85 101 finally } /* Error */ public void a(com.google.android.gms.dynamic.c paramc, r paramr) throws RemoteException { // Byte code: // 0: aconst_null // 1: astore_3 // 2: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 5: astore 4 // 7: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 10: astore 5 // 12: aload 4 // 14: ldc 29 // 16: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 19: aload_1 // 20: ifnull +68 -> 88 // 23: aload_1 // 24: invokeinterface 137 1 0 // 29: astore_1 // 30: aload 4 // 32: aload_1 // 33: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 36: aload_3 // 37: astore_1 // 38: aload_2 // 39: ifnull +10 -> 49 // 42: aload_2 // 43: invokeinterface 144 1 0 // 48: astore_1 // 49: aload 4 // 51: aload_1 // 52: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 55: aload_0 // 56: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 59: bipush 6 // 61: aload 4 // 63: aload 5 // 65: iconst_0 // 66: invokeinterface 39 5 0 // 71: pop // 72: aload 5 // 74: invokevirtual 42 android/os/Parcel:readException ()V // 77: aload 5 // 79: invokevirtual 60 android/os/Parcel:recycle ()V // 82: aload 4 // 84: invokevirtual 60 android/os/Parcel:recycle ()V // 87: return // 88: aconst_null // 89: astore_1 // 90: goto -60 -> 30 // 93: astore_1 // 94: aload 5 // 96: invokevirtual 60 android/os/Parcel:recycle ()V // 99: aload 4 // 101: invokevirtual 60 android/os/Parcel:recycle ()V // 104: aload_1 // 105: athrow // Local variable table: // start length slot name signature // 0 106 0 this a // 0 106 1 paramc com.google.android.gms.dynamic.c // 0 106 2 paramr r // 1 36 3 localObject Object // 5 95 4 localParcel1 Parcel // 10 85 5 localParcel2 Parcel // Exception table: // from to target type // 12 19 93 finally // 23 30 93 finally // 30 36 93 finally // 42 49 93 finally // 49 77 93 finally } /* Error */ public void a(ab paramab) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 149 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 28 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramab ab // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(ac paramac) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 153 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 42 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramac ac // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(ad paramad) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 157 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 29 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramad ad // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(ae paramae) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 161 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 53 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramae ae // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(af paramaf) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 165 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 30 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramaf af // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(ag paramag) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 169 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 31 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramag ag // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(ah paramah) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 173 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 37 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramah ah // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(ai paramai) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 177 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 36 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramai ai // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(aj paramaj) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 181 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 80 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramaj aj // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(ak paramak) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 185 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 85 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramak ak // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(al paramal) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 189 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 87 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramal al // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(c paramc) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 193 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 24 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramc c // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(o paramo, com.google.android.gms.dynamic.c paramc) throws RemoteException { // Byte code: // 0: aconst_null // 1: astore_3 // 2: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 5: astore 4 // 7: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 10: astore 5 // 12: aload 4 // 14: ldc 29 // 16: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 19: aload_1 // 20: ifnull +68 -> 88 // 23: aload_1 // 24: invokeinterface 197 1 0 // 29: astore_1 // 30: aload 4 // 32: aload_1 // 33: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 36: aload_3 // 37: astore_1 // 38: aload_2 // 39: ifnull +10 -> 49 // 42: aload_2 // 43: invokeinterface 137 1 0 // 48: astore_1 // 49: aload 4 // 51: aload_1 // 52: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 55: aload_0 // 56: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 59: bipush 38 // 61: aload 4 // 63: aload 5 // 65: iconst_0 // 66: invokeinterface 39 5 0 // 71: pop // 72: aload 5 // 74: invokevirtual 42 android/os/Parcel:readException ()V // 77: aload 5 // 79: invokevirtual 60 android/os/Parcel:recycle ()V // 82: aload 4 // 84: invokevirtual 60 android/os/Parcel:recycle ()V // 87: return // 88: aconst_null // 89: astore_1 // 90: goto -60 -> 30 // 93: astore_1 // 94: aload 5 // 96: invokevirtual 60 android/os/Parcel:recycle ()V // 99: aload 4 // 101: invokevirtual 60 android/os/Parcel:recycle ()V // 104: aload_1 // 105: athrow // Local variable table: // start length slot name signature // 0 106 0 this a // 0 106 1 paramo o // 0 106 2 paramc com.google.android.gms.dynamic.c // 1 36 3 localObject Object // 5 95 4 localParcel1 Parcel // 10 85 5 localParcel2 Parcel // Exception table: // from to target type // 12 19 93 finally // 23 30 93 finally // 30 36 93 finally // 42 49 93 finally // 49 77 93 finally } /* Error */ public void a(t paramt) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 201 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 33 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramt t // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(u paramu) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 205 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 27 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramu u // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(v paramv) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 209 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 83 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramv v // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(w paramw) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 213 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 45 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramw w // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(x paramx) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 217 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 32 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramx x // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(y paramy) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 221 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 86 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramy y // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } /* Error */ public void a(z paramz) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +43 -> 58 // 18: aload_1 // 19: invokeinterface 225 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: bipush 84 // 36: aload_2 // 37: aload_3 // 38: iconst_0 // 39: invokeinterface 39 5 0 // 44: pop // 45: aload_3 // 46: invokevirtual 42 android/os/Parcel:readException ()V // 49: aload_3 // 50: invokevirtual 60 android/os/Parcel:recycle ()V // 53: aload_2 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: return // 58: aconst_null // 59: astore_1 // 60: goto -35 -> 25 // 63: astore_1 // 64: aload_3 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: aload_2 // 69: invokevirtual 60 android/os/Parcel:recycle ()V // 72: aload_1 // 73: athrow // Local variable table: // start length slot name signature // 0 74 0 this a // 0 74 1 paramz z // 3 66 2 localParcel1 Parcel // 7 58 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 63 finally // 18 25 63 finally // 25 49 63 finally } public void a(String paramString) throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); localParcel1.writeString(paramString); a.transact(61, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void a(boolean paramBoolean) throws RemoteException { int i = 0; Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramBoolean) { i = 1; } localParcel1.writeInt(i); a.transact(18, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public IBinder asBinder() { return a; } public float b() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(2, localParcel1, localParcel2, 0); localParcel2.readException(); float f = localParcel2.readFloat(); return f; } finally { localParcel2.recycle(); localParcel1.recycle(); } } /* Error */ public void b(Bundle paramBundle) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +54 -> 69 // 18: aload_2 // 19: iconst_1 // 20: invokevirtual 66 android/os/Parcel:writeInt (I)V // 23: aload_1 // 24: aload_2 // 25: iconst_0 // 26: invokevirtual 131 android/os/Bundle:writeToParcel (Landroid/os/Parcel;I)V // 29: aload_0 // 30: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 33: bipush 60 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 46 android/os/Parcel:readInt ()I // 52: ifeq +8 -> 60 // 55: aload_1 // 56: aload_3 // 57: invokevirtual 238 android/os/Bundle:readFromParcel (Landroid/os/Parcel;)V // 60: aload_3 // 61: invokevirtual 60 android/os/Parcel:recycle ()V // 64: aload_2 // 65: invokevirtual 60 android/os/Parcel:recycle ()V // 68: return // 69: aload_2 // 70: iconst_0 // 71: invokevirtual 66 android/os/Parcel:writeInt (I)V // 74: goto -45 -> 29 // 77: astore_1 // 78: aload_3 // 79: invokevirtual 60 android/os/Parcel:recycle ()V // 82: aload_2 // 83: invokevirtual 60 android/os/Parcel:recycle ()V // 86: aload_1 // 87: athrow // Local variable table: // start length slot name signature // 0 88 0 this a // 0 88 1 paramBundle Bundle // 3 80 2 localParcel1 Parcel // 7 72 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 77 finally // 18 29 77 finally // 29 60 77 finally // 69 74 77 finally } /* Error */ public void b(com.google.android.gms.dynamic.c paramc) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +42 -> 57 // 18: aload_1 // 19: invokeinterface 137 1 0 // 24: astore_1 // 25: aload_2 // 26: aload_1 // 27: invokevirtual 140 android/os/Parcel:writeStrongBinder (Landroid/os/IBinder;)V // 30: aload_0 // 31: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 34: iconst_5 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 60 android/os/Parcel:recycle ()V // 52: aload_2 // 53: invokevirtual 60 android/os/Parcel:recycle ()V // 56: return // 57: aconst_null // 58: astore_1 // 59: goto -34 -> 25 // 62: astore_1 // 63: aload_3 // 64: invokevirtual 60 android/os/Parcel:recycle ()V // 67: aload_2 // 68: invokevirtual 60 android/os/Parcel:recycle ()V // 71: aload_1 // 72: athrow // Local variable table: // start length slot name signature // 0 73 0 this a // 0 73 1 paramc com.google.android.gms.dynamic.c // 3 65 2 localParcel1 Parcel // 7 57 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 62 finally // 18 25 62 finally // 25 48 62 finally } /* Error */ public boolean b(boolean paramBoolean) throws RemoteException { // Byte code: // 0: iconst_1 // 1: istore_3 // 2: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 5: astore 4 // 7: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 10: astore 5 // 12: aload 4 // 14: ldc 29 // 16: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 19: iload_1 // 20: ifeq +57 -> 77 // 23: iconst_1 // 24: istore_2 // 25: aload 4 // 27: iload_2 // 28: invokevirtual 66 android/os/Parcel:writeInt (I)V // 31: aload_0 // 32: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 35: bipush 20 // 37: aload 4 // 39: aload 5 // 41: iconst_0 // 42: invokeinterface 39 5 0 // 47: pop // 48: aload 5 // 50: invokevirtual 42 android/os/Parcel:readException ()V // 53: aload 5 // 55: invokevirtual 46 android/os/Parcel:readInt ()I // 58: istore_2 // 59: iload_2 // 60: ifeq +22 -> 82 // 63: iload_3 // 64: istore_1 // 65: aload 5 // 67: invokevirtual 60 android/os/Parcel:recycle ()V // 70: aload 4 // 72: invokevirtual 60 android/os/Parcel:recycle ()V // 75: iload_1 // 76: ireturn // 77: iconst_0 // 78: istore_2 // 79: goto -54 -> 25 // 82: iconst_0 // 83: istore_1 // 84: goto -19 -> 65 // 87: astore 6 // 89: aload 5 // 91: invokevirtual 60 android/os/Parcel:recycle ()V // 94: aload 4 // 96: invokevirtual 60 android/os/Parcel:recycle ()V // 99: aload 6 // 101: athrow // Local variable table: // start length slot name signature // 0 102 0 this a // 0 102 1 paramBoolean boolean // 24 55 2 i int // 1 63 3 bool boolean // 5 90 4 localParcel1 Parcel // 10 80 5 localParcel2 Parcel // 87 13 6 localObject Object // Exception table: // from to target type // 12 19 87 finally // 25 59 87 finally } public float c() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(3, localParcel1, localParcel2, 0); localParcel2.readException(); float f = localParcel2.readFloat(); return f; } finally { localParcel2.recycle(); localParcel1.recycle(); } } /* Error */ public void c(Bundle paramBundle) throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_1 // 15: ifnull +42 -> 57 // 18: aload_2 // 19: iconst_1 // 20: invokevirtual 66 android/os/Parcel:writeInt (I)V // 23: aload_1 // 24: aload_2 // 25: iconst_0 // 26: invokevirtual 131 android/os/Bundle:writeToParcel (Landroid/os/Parcel;I)V // 29: aload_0 // 30: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 33: bipush 81 // 35: aload_2 // 36: aload_3 // 37: iconst_0 // 38: invokeinterface 39 5 0 // 43: pop // 44: aload_3 // 45: invokevirtual 42 android/os/Parcel:readException ()V // 48: aload_3 // 49: invokevirtual 60 android/os/Parcel:recycle ()V // 52: aload_2 // 53: invokevirtual 60 android/os/Parcel:recycle ()V // 56: return // 57: aload_2 // 58: iconst_0 // 59: invokevirtual 66 android/os/Parcel:writeInt (I)V // 62: goto -33 -> 29 // 65: astore_1 // 66: aload_3 // 67: invokevirtual 60 android/os/Parcel:recycle ()V // 70: aload_2 // 71: invokevirtual 60 android/os/Parcel:recycle ()V // 74: aload_1 // 75: athrow // Local variable table: // start length slot name signature // 0 76 0 this a // 0 76 1 paramBundle Bundle // 3 68 2 localParcel1 Parcel // 7 60 3 localParcel2 Parcel // Exception table: // from to target type // 8 14 65 finally // 18 29 65 finally // 29 48 65 finally // 57 62 65 finally } public void c(boolean paramBoolean) throws RemoteException { int i = 0; Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramBoolean) { i = 1; } localParcel1.writeInt(i); a.transact(22, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void d() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(8, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void d(boolean paramBoolean) throws RemoteException { int i = 0; Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); if (paramBoolean) { i = 1; } localParcel1.writeInt(i); a.transact(41, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void e() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(14, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public int f() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(15, localParcel1, localParcel2, 0); localParcel2.readException(); int i = localParcel2.readInt(); return i; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public boolean g() throws RemoteException { boolean bool = false; Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(17, localParcel1, localParcel2, 0); localParcel2.readException(); int i = localParcel2.readInt(); if (i != 0) { bool = true; } return bool; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public boolean h() throws RemoteException { boolean bool = false; Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(19, localParcel1, localParcel2, 0); localParcel2.readException(); int i = localParcel2.readInt(); if (i != 0) { bool = true; } return bool; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public boolean i() throws RemoteException { boolean bool = false; Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(21, localParcel1, localParcel2, 0); localParcel2.readException(); int i = localParcel2.readInt(); if (i != 0) { bool = true; } return bool; } finally { localParcel2.recycle(); localParcel1.recycle(); } } /* Error */ public Location j() throws RemoteException { // Byte code: // 0: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 3: astore_2 // 4: invokestatic 27 android/os/Parcel:obtain ()Landroid/os/Parcel; // 7: astore_3 // 8: aload_2 // 9: ldc 29 // 11: invokevirtual 33 android/os/Parcel:writeInterfaceToken (Ljava/lang/String;)V // 14: aload_0 // 15: getfield 17 com/yelp/android/bj/b$a$a:a Landroid/os/IBinder; // 18: bipush 23 // 20: aload_2 // 21: aload_3 // 22: iconst_0 // 23: invokeinterface 39 5 0 // 28: pop // 29: aload_3 // 30: invokevirtual 42 android/os/Parcel:readException ()V // 33: aload_3 // 34: invokevirtual 46 android/os/Parcel:readInt ()I // 37: ifeq +26 -> 63 // 40: getstatic 254 android/location/Location:CREATOR Landroid/os/Parcelable$Creator; // 43: aload_3 // 44: invokeinterface 260 2 0 // 49: checkcast 251 android/location/Location // 52: astore_1 // 53: aload_3 // 54: invokevirtual 60 android/os/Parcel:recycle ()V // 57: aload_2 // 58: invokevirtual 60 android/os/Parcel:recycle ()V // 61: aload_1 // 62: areturn // 63: aconst_null // 64: astore_1 // 65: goto -12 -> 53 // 68: astore_1 // 69: aload_3 // 70: invokevirtual 60 android/os/Parcel:recycle ()V // 73: aload_2 // 74: invokevirtual 60 android/os/Parcel:recycle ()V // 77: aload_1 // 78: athrow // Local variable table: // start length slot name signature // 0 79 0 this a // 52 13 1 localLocation Location // 68 10 1 localObject Object // 3 71 2 localParcel1 Parcel // 7 63 3 localParcel2 Parcel // Exception table: // from to target type // 8 53 68 finally } public j k() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(25, localParcel1, localParcel2, 0); localParcel2.readException(); j localj = j.a.a(localParcel2.readStrongBinder()); return localj; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public f l() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(26, localParcel1, localParcel2, 0); localParcel2.readException(); f localf = f.a.a(localParcel2.readStrongBinder()); return localf; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public boolean m() throws RemoteException { boolean bool = false; Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(40, localParcel1, localParcel2, 0); localParcel2.readException(); int i = localParcel2.readInt(); if (i != 0) { bool = true; } return bool; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public e n() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(44, localParcel1, localParcel2, 0); localParcel2.readException(); e locale = e.a.a(localParcel2.readStrongBinder()); return locale; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void o() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(55, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void p() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(56, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void q() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(57, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void r() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(58, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public boolean s() throws RemoteException { boolean bool = false; Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(59, localParcel1, localParcel2, 0); localParcel2.readException(); int i = localParcel2.readInt(); if (i != 0) { bool = true; } return bool; } finally { localParcel2.recycle(); localParcel1.recycle(); } } public void t() throws RemoteException { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate"); a.transact(82, localParcel1, localParcel2, 0); localParcel2.readException(); return; } finally { localParcel2.recycle(); localParcel1.recycle(); } } } } } /* Location: * Qualified Name: com.yelp.android.bj.b * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
0ff8559d828fefddd6b69669768c41d5f0f1ac54
7b6392cd1a094975df833023901fba32e362ae94
/lista3/src/main/java/Endereco.java
30b1d7197619a8a5ed1496700b2be63bc7206f72
[]
no_license
sarahalvesc/Lista3_C206
06e4bd7de91567321613ed7c94da28f0a64ce013
e775fd17cd4ab6c24c221434e2952b0f4cd55f33
refs/heads/main
2023-08-06T07:05:07.936954
2021-10-04T00:20:45
2021-10-04T00:20:45
413,227,095
0
0
null
null
null
null
UTF-8
Java
false
false
236
java
public class Endereco { public String rua; public String bairro; public int num; public void Endereco(String rua, String bairro, int num){ this.rua=rua; this.bairro=bairro; this.num=num; } }
[ "mairaalves@gec.inatel.br" ]
mairaalves@gec.inatel.br
72543cff3161dcb6aba639bd359c35a67c24bd17
8b88d34f9310317535a49480d724fd4a0fea1657
/service/src/main/java/com/test/elasticsearch/config/listener/SaveEventListener.java
e8ce997687039a2077c4eee25c381f82513fb391
[]
no_license
yemingrujing/elasticDemo
0eca501dc58b0e7224d3fb6be6fd218e334e0da8
413ce19cb805b8ec280041c9e19237d006bf0c0b
refs/heads/master
2022-07-25T02:47:08.401011
2020-01-02T10:24:45
2020-01-02T10:24:45
187,190,404
0
0
null
2022-06-21T01:08:35
2019-05-17T09:44:34
Java
UTF-8
Java
false
false
2,716
java
package com.test.elasticsearch.config.listener; import com.test.elasticsearch.anno.AutoValue; import com.test.elasticsearch.entity.mongodb.SeqInfo; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.FindAndModifyOptions; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener; import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent; import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Update; import org.springframework.stereotype.Component; import org.springframework.util.ReflectionUtils; /** * @ProjectName: elasticsearch * @Package: com.test.elasticsearch.config.listener * @ClassName: SaveEventListener * @Author: guang * @Description: mongoDB主键自增 * @Date: 2019/6/10 17:06 * @Version: 1.0 */ @Slf4j @Component public class SaveEventListener extends AbstractMongoEventListener<Object> { @Autowired private MongoTemplate mongoTemplate; @Override public void onBeforeConvert(BeforeConvertEvent<Object> event) { final Object source = event.getSource(); if (source != null) { log.info(source.toString()); ReflectionUtils.doWithFields(source.getClass(), field -> { ReflectionUtils.makeAccessible(field); // 如果字段添加了我们自定义的AutoValue注解 if (field.isAnnotationPresent(AutoValue.class) && field.get(source) instanceof Number && Long.valueOf(field.get(source).toString()) == 0) { field.set(source, getNextId(source.getClass().getSimpleName())); log.info("集合的ID为:{}", source); } }); } } /** * 获取下一个自增ID * @param collName 集合(这里用类名,就唯一性来说最好还是存放长类名)名称 * @return 序列值 */ private Long getNextId(String collName) { Query query = new Query(Criteria.where("collName").is(collName)); Update update = new Update(); update.inc("seqId", 1); FindAndModifyOptions options = new FindAndModifyOptions(); options.upsert(Boolean.TRUE); options.returnNew(Boolean.TRUE); SeqInfo seqInfo = mongoTemplate.findAndModify(query, update, options, SeqInfo.class); log.info(collName + "集合的ID为:{}", seqInfo.getSeqId()); return seqInfo.getSeqId(); } }
[ "yemingrujing@users.noreply.github.com" ]
yemingrujing@users.noreply.github.com
17cfc032669ecd20520d5ec483c8764619bdd240
f52b257310c91cbc6348e147088cde40bb36137f
/src/graph/BreadFirstSearch.java
6345436c67c45264e55345fc04e88f2581515b04
[ "BSD-3-Clause" ]
permissive
Bob-King/algorithm-exercise
38f210cdf3478b5bb4d3a6946ba7395606091cbf
b22909700b4c226dc24dcd5807ea74ff8b196df4
refs/heads/master
2021-01-01T16:05:24.108545
2016-11-21T00:21:18
2016-11-21T00:21:18
23,579,981
0
1
null
null
null
null
UTF-8
Java
false
false
1,071
java
package graph; import java.util.LinkedList; import java.util.Queue; public class BreadFirstSearch { public interface Worker { void preWork(Graph g, int v); } public void run(Graph graph, int start, Worker worker) { if (graph == null || worker == null) { throw new IllegalArgumentException("Graph or worker can't be null!"); } if (graph.getVertexCount() <= 0) { throw new IllegalArgumentException("Invalid graph!"); } final int N = graph.getVertexCount(); if (start < 0 || start >= N) { throw new IllegalArgumentException("Invalid start point!"); } Queue<Integer> queue = new LinkedList<Integer>(); boolean[] marks = new boolean[N]; int v; queue.add(start); marks[start] = true; while (!queue.isEmpty()) { start = queue.poll(); worker.preWork(graph, start); try { v = 0; v = graph.findEdgedVertex(start, v); while (v != -1) { if (!marks[v]) { queue.add(v); marks[v] = true; } v = graph.findEdgedVertex(start, v + 1); } } catch (Exception e) { } } } }
[ "do.as.i.please@gmail.com" ]
do.as.i.please@gmail.com
c901540dff0373684c375bcafa0b989d0a0d6faf
e65f4925dca1846e4456ccf797d7fd790db0e2df
/TankWar1.8/src/Explode.java
50e08b71b3aad2731fae0cd336e9b0dcb2fc70b0
[]
no_license
cynwang/TankWar
85ae2c8fef7d9af9314a1a2bd68f8051284ad42a
1a495e999e44eba5365e759ea9daa9d4c8f57ff3
refs/heads/master
2021-01-19T07:24:38.165923
2016-05-28T14:26:07
2016-05-28T14:26:07
65,020,829
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
645
java
import java.awt.Color; import java.awt.Graphics; public class Explode { private int x,y; private boolean live=true; TankClient tc; int[] diameter={4,8,12,20,40,50,45,40,32,25,12,3}; int step=0; public Explode(int x, int y, TankClient tc) { this.x = x; this.y = y; this.tc = tc; } /** * »­³ö±¬Õ¨×Ô¼º * @param g */ public void draw(Graphics g){ if(!live){ // tc.explodes.remove(e); return; } Color c=g.getColor(); g.setColor(Color.RED); if(step==diameter.length){ live=false; step=0; return; } g.drawOval(x, y, diameter[step], diameter[step]); g.setColor(c); step++; } }
[ "1328893531@qq.com" ]
1328893531@qq.com
943f0a6ce27fb63dfa8649c8ec058b2422dbe036
13a75d4f2af09757f935cd8278e810f3a3a883a2
/applock/app/src/main/java/com/app/lock/utils/ScreenUtil.java
bc9eab49f3fc340e08cc83ae27ebb0a6f482a8cd
[ "Apache-2.0" ]
permissive
aseveny/applock
acf217585786c7893f57d1573f73b120f6ad0f85
22e76e5116630e5eeae9729b5e92c33481ee9281
refs/heads/master
2021-09-01T18:08:09.784052
2017-12-28T06:29:13
2017-12-28T06:29:13
115,589,644
0
0
null
null
null
null
UTF-8
Java
false
false
1,189
java
package com.app.lock.utils; import android.content.Context; import android.util.DisplayMetrics; /** * Created by xian on 2017/2/17. */ public class ScreenUtil { /** * 获取屏幕高度 * * @param context * @return */ public static int getPhoneHeight(Context context) { DisplayMetrics dm = getDisplayMetrics(context); return dm.heightPixels; } /** * 获取屏幕宽度 * * @param context * @return */ public static int getPhoneWidth(Context context) { DisplayMetrics dm = getDisplayMetrics(context); return dm.widthPixels; } /** * 获取屏幕的分辨率 * * @param context * @return */ public static DisplayMetrics getDisplayMetrics(Context context) { DisplayMetrics dm = context.getResources().getDisplayMetrics(); return dm; } /** * 获取屏幕旋转方向 * @param context 上下文 * @return 屏幕方向 ORIENTATION_LANDSCAPE, ORIENTATION_PORTRAIT. */ public static int getDisplayOrient (Context context) { return context.getResources().getConfiguration().orientation; } }
[ "aseveny@gmail.com" ]
aseveny@gmail.com
9dafcc4a9d31b14a396949b3d286245b9fdc335c
7cc39b1ee93832aed70e14224f8a3d991570cca6
/aws-java-sdk-eventbridge/src/main/java/com/amazonaws/services/eventbridge/AmazonEventBridgeClient.java
4ecca55c085441192fa2560a2d2889086076f831
[ "Apache-2.0" ]
permissive
yijiangliu/aws-sdk-java
74e626e096fe4cee22291809576bb7dc70aef94d
b75779a2ab0fe14c91da1e54be25b770385affac
refs/heads/master
2022-12-17T10:24:59.549226
2020-08-19T23:46:40
2020-08-19T23:46:40
289,107,793
1
0
Apache-2.0
2020-08-20T20:49:17
2020-08-20T20:49:16
null
UTF-8
Java
false
false
125,490
java
/* * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.eventbridge; import org.w3c.dom.*; import java.net.*; import java.util.*; import javax.annotation.Generated; import org.apache.commons.logging.*; import com.amazonaws.*; import com.amazonaws.annotation.SdkInternalApi; import com.amazonaws.auth.*; import com.amazonaws.handlers.*; import com.amazonaws.http.*; import com.amazonaws.internal.*; import com.amazonaws.internal.auth.*; import com.amazonaws.metrics.*; import com.amazonaws.regions.*; import com.amazonaws.transform.*; import com.amazonaws.util.*; import com.amazonaws.protocol.json.*; import com.amazonaws.util.AWSRequestMetrics.Field; import com.amazonaws.annotation.ThreadSafe; import com.amazonaws.client.AwsSyncClientParams; import com.amazonaws.client.builder.AdvancedConfig; import com.amazonaws.services.eventbridge.AmazonEventBridgeClientBuilder; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.eventbridge.model.*; import com.amazonaws.services.eventbridge.model.transform.*; /** * Client for accessing Amazon EventBridge. All service calls made using this client are blocking, and will not return * until the service call completes. * <p> * <p> * Amazon EventBridge helps you to respond to state changes in your AWS resources. When your resources change state, * they automatically send events into an event stream. You can create rules that match selected events in the stream * and route them to targets to take action. You can also use rules to take action on a predetermined schedule. For * example, you can configure rules to: * </p> * <ul> * <li> * <p> * Automatically invoke an AWS Lambda function to update DNS entries when an event notifies you that Amazon EC2 instance * enters the running state. * </p> * </li> * <li> * <p> * Direct specific API records from AWS CloudTrail to an Amazon Kinesis data stream for detailed analysis of potential * security or availability risks. * </p> * </li> * <li> * <p> * Periodically invoke a built-in target to create a snapshot of an Amazon EBS volume. * </p> * </li> * </ul> * <p> * For more information about the features of Amazon EventBridge, see the <a * href="https://docs.aws.amazon.com/eventbridge/latest/userguide">Amazon EventBridge User Guide</a>. * </p> */ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonEventBridgeClient extends AmazonWebServiceClient implements AmazonEventBridge { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonEventBridge.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "events"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConcurrentModificationException").withExceptionUnmarshaller( com.amazonaws.services.eventbridge.model.transform.ConcurrentModificationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("PolicyLengthExceededException").withExceptionUnmarshaller( com.amazonaws.services.eventbridge.model.transform.PolicyLengthExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidStateException").withExceptionUnmarshaller( com.amazonaws.services.eventbridge.model.transform.InvalidStateExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidEventPatternException").withExceptionUnmarshaller( com.amazonaws.services.eventbridge.model.transform.InvalidEventPatternExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("LimitExceededException").withExceptionUnmarshaller( com.amazonaws.services.eventbridge.model.transform.LimitExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("OperationDisabledException").withExceptionUnmarshaller( com.amazonaws.services.eventbridge.model.transform.OperationDisabledExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.eventbridge.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceAlreadyExistsException").withExceptionUnmarshaller( com.amazonaws.services.eventbridge.model.transform.ResourceAlreadyExistsExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalException").withExceptionUnmarshaller( com.amazonaws.services.eventbridge.model.transform.InternalExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ManagedRuleException").withExceptionUnmarshaller( com.amazonaws.services.eventbridge.model.transform.ManagedRuleExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.eventbridge.model.AmazonEventBridgeException.class)); public static AmazonEventBridgeClientBuilder builder() { return AmazonEventBridgeClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on Amazon EventBridge using the specified parameters. * * <p> * All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonEventBridgeClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on Amazon EventBridge using the specified parameters. * * <p> * All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonEventBridgeClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("events.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/eventbridge/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/eventbridge/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** * <p> * Activates a partner event source that has been deactivated. Once activated, your matching event bus will start * receiving events from the event source. * </p> * * @param activateEventSourceRequest * @return Result of the ActivateEventSource operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws InvalidStateException * The specified state is not a valid state for an event source. * @throws InternalException * This exception occurs due to unexpected causes. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.ActivateEventSource * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ActivateEventSource" * target="_top">AWS API Documentation</a> */ @Override public ActivateEventSourceResult activateEventSource(ActivateEventSourceRequest request) { request = beforeClientExecution(request); return executeActivateEventSource(request); } @SdkInternalApi final ActivateEventSourceResult executeActivateEventSource(ActivateEventSourceRequest activateEventSourceRequest) { ExecutionContext executionContext = createExecutionContext(activateEventSourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<ActivateEventSourceRequest> request = null; Response<ActivateEventSourceResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ActivateEventSourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(activateEventSourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ActivateEventSource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<ActivateEventSourceResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ActivateEventSourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Creates a new event bus within your account. This can be a custom event bus which you can use to receive events * from your custom applications and services, or it can be a partner event bus which can be matched to a partner * event source. * </p> * * @param createEventBusRequest * @return Result of the CreateEventBus operation returned by the service. * @throws ResourceAlreadyExistsException * The resource you are trying to create already exists. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws InvalidStateException * The specified state is not a valid state for an event source. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws LimitExceededException * You tried to create more rules or add more targets to a rule than is allowed. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.CreateEventBus * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreateEventBus" target="_top">AWS API * Documentation</a> */ @Override public CreateEventBusResult createEventBus(CreateEventBusRequest request) { request = beforeClientExecution(request); return executeCreateEventBus(request); } @SdkInternalApi final CreateEventBusResult executeCreateEventBus(CreateEventBusRequest createEventBusRequest) { ExecutionContext executionContext = createExecutionContext(createEventBusRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<CreateEventBusRequest> request = null; Response<CreateEventBusResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateEventBusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createEventBusRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateEventBus"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<CreateEventBusResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateEventBusResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Called by an SaaS partner to create a partner event source. This operation is not used by AWS customers. * </p> * <p> * Each partner event source can be used by one AWS account to create a matching partner event bus in that AWS * account. A SaaS partner must create one partner event source for each AWS account that wants to receive those * event types. * </p> * <p> * A partner event source creates events based on resources within the SaaS partner's service or application. * </p> * <p> * An AWS account that creates a partner event bus that matches the partner event source can use that event bus to * receive events from the partner, and then process them using AWS Events rules and targets. * </p> * <p> * Partner event source names follow this format: * </p> * <p> * <code> <i>partner_name</i>/<i>event_namespace</i>/<i>event_name</i> </code> * </p> * <p> * <i>partner_name</i> is determined during partner registration and identifies the partner to AWS customers. * <i>event_namespace</i> is determined by the partner and is a way for the partner to categorize their events. * <i>event_name</i> is determined by the partner, and should uniquely identify an event-generating resource within * the partner system. The combination of <i>event_namespace</i> and <i>event_name</i> should help AWS customers * decide whether to create an event bus to receive these events. * </p> * * @param createPartnerEventSourceRequest * @return Result of the CreatePartnerEventSource operation returned by the service. * @throws ResourceAlreadyExistsException * The resource you are trying to create already exists. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws LimitExceededException * You tried to create more rules or add more targets to a rule than is allowed. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.CreatePartnerEventSource * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreatePartnerEventSource" * target="_top">AWS API Documentation</a> */ @Override public CreatePartnerEventSourceResult createPartnerEventSource(CreatePartnerEventSourceRequest request) { request = beforeClientExecution(request); return executeCreatePartnerEventSource(request); } @SdkInternalApi final CreatePartnerEventSourceResult executeCreatePartnerEventSource(CreatePartnerEventSourceRequest createPartnerEventSourceRequest) { ExecutionContext executionContext = createExecutionContext(createPartnerEventSourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<CreatePartnerEventSourceRequest> request = null; Response<CreatePartnerEventSourceResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreatePartnerEventSourceRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createPartnerEventSourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePartnerEventSource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<CreatePartnerEventSourceResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreatePartnerEventSourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * You can use this operation to temporarily stop receiving events from the specified partner event source. The * matching event bus is not deleted. * </p> * <p> * When you deactivate a partner event source, the source goes into PENDING state. If it remains in PENDING state * for more than two weeks, it is deleted. * </p> * <p> * To activate a deactivated partner event source, use <a>ActivateEventSource</a>. * </p> * * @param deactivateEventSourceRequest * @return Result of the DeactivateEventSource operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws InvalidStateException * The specified state is not a valid state for an event source. * @throws InternalException * This exception occurs due to unexpected causes. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.DeactivateEventSource * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeactivateEventSource" * target="_top">AWS API Documentation</a> */ @Override public DeactivateEventSourceResult deactivateEventSource(DeactivateEventSourceRequest request) { request = beforeClientExecution(request); return executeDeactivateEventSource(request); } @SdkInternalApi final DeactivateEventSourceResult executeDeactivateEventSource(DeactivateEventSourceRequest deactivateEventSourceRequest) { ExecutionContext executionContext = createExecutionContext(deactivateEventSourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<DeactivateEventSourceRequest> request = null; Response<DeactivateEventSourceResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeactivateEventSourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deactivateEventSourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeactivateEventSource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<DeactivateEventSourceResult>> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeactivateEventSourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Deletes the specified custom event bus or partner event bus. All rules associated with this event bus need to be * deleted. You can't delete your account's default event bus. * </p> * * @param deleteEventBusRequest * @return Result of the DeleteEventBus operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @sample AmazonEventBridge.DeleteEventBus * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteEventBus" target="_top">AWS API * Documentation</a> */ @Override public DeleteEventBusResult deleteEventBus(DeleteEventBusRequest request) { request = beforeClientExecution(request); return executeDeleteEventBus(request); } @SdkInternalApi final DeleteEventBusResult executeDeleteEventBus(DeleteEventBusRequest deleteEventBusRequest) { ExecutionContext executionContext = createExecutionContext(deleteEventBusRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<DeleteEventBusRequest> request = null; Response<DeleteEventBusResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteEventBusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteEventBusRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteEventBus"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<DeleteEventBusResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteEventBusResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * This operation is used by SaaS partners to delete a partner event source. This operation is not used by AWS * customers. * </p> * <p> * When you delete an event source, the status of the corresponding partner event bus in the AWS customer account * becomes DELETED. * </p> * <p/> * * @param deletePartnerEventSourceRequest * @return Result of the DeletePartnerEventSource operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.DeletePartnerEventSource * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeletePartnerEventSource" * target="_top">AWS API Documentation</a> */ @Override public DeletePartnerEventSourceResult deletePartnerEventSource(DeletePartnerEventSourceRequest request) { request = beforeClientExecution(request); return executeDeletePartnerEventSource(request); } @SdkInternalApi final DeletePartnerEventSourceResult executeDeletePartnerEventSource(DeletePartnerEventSourceRequest deletePartnerEventSourceRequest) { ExecutionContext executionContext = createExecutionContext(deletePartnerEventSourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<DeletePartnerEventSourceRequest> request = null; Response<DeletePartnerEventSourceResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeletePartnerEventSourceRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deletePartnerEventSourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePartnerEventSource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<DeletePartnerEventSourceResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePartnerEventSourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Deletes the specified rule. * </p> * <p> * Before you can delete the rule, you must remove all targets, using <a>RemoveTargets</a>. * </p> * <p> * When you delete a rule, incoming events might continue to match to the deleted rule. Allow a short period of time * for changes to take effect. * </p> * <p> * Managed rules are rules created and managed by another AWS service on your behalf. These rules are created by * those other AWS services to support functionality in those services. You can delete these rules using the * <code>Force</code> option, but you should do so only if you are sure the other service is not still using that * rule. * </p> * * @param deleteRuleRequest * @return Result of the DeleteRule operation returned by the service. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws ManagedRuleException * This rule was created by an AWS service on behalf of your account. It is managed by that service. If you * see this error in response to <code>DeleteRule</code> or <code>RemoveTargets</code>, you can use the * <code>Force</code> parameter in those calls to delete the rule or remove targets from the rule. You * cannot modify these managed rules by using <code>DisableRule</code>, <code>EnableRule</code>, * <code>PutTargets</code>, <code>PutRule</code>, <code>TagResource</code>, or <code>UntagResource</code>. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @sample AmazonEventBridge.DeleteRule * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteRule" target="_top">AWS API * Documentation</a> */ @Override public DeleteRuleResult deleteRule(DeleteRuleRequest request) { request = beforeClientExecution(request); return executeDeleteRule(request); } @SdkInternalApi final DeleteRuleResult executeDeleteRule(DeleteRuleRequest deleteRuleRequest) { ExecutionContext executionContext = createExecutionContext(deleteRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<DeleteRuleRequest> request = null; Response<DeleteRuleResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteRuleRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRule"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<DeleteRuleResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteRuleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Displays details about an event bus in your account. This can include the external AWS accounts that are * permitted to write events to your default event bus, and the associated policy. For custom event buses and * partner event buses, it displays the name, ARN, policy, state, and creation time. * </p> * <p> * To enable your account to receive events from other accounts on its default event bus, use <a>PutPermission</a>. * </p> * <p> * For more information about partner event buses, see <a>CreateEventBus</a>. * </p> * * @param describeEventBusRequest * @return Result of the DescribeEventBus operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.DescribeEventBus * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventBus" target="_top">AWS * API Documentation</a> */ @Override public DescribeEventBusResult describeEventBus(DescribeEventBusRequest request) { request = beforeClientExecution(request); return executeDescribeEventBus(request); } @SdkInternalApi final DescribeEventBusResult executeDescribeEventBus(DescribeEventBusRequest describeEventBusRequest) { ExecutionContext executionContext = createExecutionContext(describeEventBusRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<DescribeEventBusRequest> request = null; Response<DescribeEventBusResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEventBusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeEventBusRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEventBus"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<DescribeEventBusResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEventBusResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * This operation lists details about a partner event source that is shared with your account. * </p> * * @param describeEventSourceRequest * @return Result of the DescribeEventSource operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws InternalException * This exception occurs due to unexpected causes. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.DescribeEventSource * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventSource" * target="_top">AWS API Documentation</a> */ @Override public DescribeEventSourceResult describeEventSource(DescribeEventSourceRequest request) { request = beforeClientExecution(request); return executeDescribeEventSource(request); } @SdkInternalApi final DescribeEventSourceResult executeDescribeEventSource(DescribeEventSourceRequest describeEventSourceRequest) { ExecutionContext executionContext = createExecutionContext(describeEventSourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<DescribeEventSourceRequest> request = null; Response<DescribeEventSourceResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEventSourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeEventSourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEventSource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<DescribeEventSourceResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEventSourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * An SaaS partner can use this operation to list details about a partner event source that they have created. AWS * customers do not use this operation. Instead, AWS customers can use <a>DescribeEventSource</a> to see details * about a partner event source that is shared with them. * </p> * * @param describePartnerEventSourceRequest * @return Result of the DescribePartnerEventSource operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws InternalException * This exception occurs due to unexpected causes. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.DescribePartnerEventSource * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribePartnerEventSource" * target="_top">AWS API Documentation</a> */ @Override public DescribePartnerEventSourceResult describePartnerEventSource(DescribePartnerEventSourceRequest request) { request = beforeClientExecution(request); return executeDescribePartnerEventSource(request); } @SdkInternalApi final DescribePartnerEventSourceResult executeDescribePartnerEventSource(DescribePartnerEventSourceRequest describePartnerEventSourceRequest) { ExecutionContext executionContext = createExecutionContext(describePartnerEventSourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<DescribePartnerEventSourceRequest> request = null; Response<DescribePartnerEventSourceResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribePartnerEventSourceRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describePartnerEventSourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePartnerEventSource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<DescribePartnerEventSourceResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribePartnerEventSourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Describes the specified rule. * </p> * <p> * DescribeRule does not list the targets of a rule. To see the targets associated with a rule, use * <a>ListTargetsByRule</a>. * </p> * * @param describeRuleRequest * @return Result of the DescribeRule operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.DescribeRule * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeRule" target="_top">AWS API * Documentation</a> */ @Override public DescribeRuleResult describeRule(DescribeRuleRequest request) { request = beforeClientExecution(request); return executeDescribeRule(request); } @SdkInternalApi final DescribeRuleResult executeDescribeRule(DescribeRuleRequest describeRuleRequest) { ExecutionContext executionContext = createExecutionContext(describeRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<DescribeRuleRequest> request = null; Response<DescribeRuleResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeRuleRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeRule"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<DescribeRuleResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeRuleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Disables the specified rule. A disabled rule won't match any events, and won't self-trigger if it has a schedule * expression. * </p> * <p> * When you disable a rule, incoming events might continue to match to the disabled rule. Allow a short period of * time for changes to take effect. * </p> * * @param disableRuleRequest * @return Result of the DisableRule operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws ManagedRuleException * This rule was created by an AWS service on behalf of your account. It is managed by that service. If you * see this error in response to <code>DeleteRule</code> or <code>RemoveTargets</code>, you can use the * <code>Force</code> parameter in those calls to delete the rule or remove targets from the rule. You * cannot modify these managed rules by using <code>DisableRule</code>, <code>EnableRule</code>, * <code>PutTargets</code>, <code>PutRule</code>, <code>TagResource</code>, or <code>UntagResource</code>. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.DisableRule * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DisableRule" target="_top">AWS API * Documentation</a> */ @Override public DisableRuleResult disableRule(DisableRuleRequest request) { request = beforeClientExecution(request); return executeDisableRule(request); } @SdkInternalApi final DisableRuleResult executeDisableRule(DisableRuleRequest disableRuleRequest) { ExecutionContext executionContext = createExecutionContext(disableRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<DisableRuleRequest> request = null; Response<DisableRuleResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DisableRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disableRuleRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisableRule"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<DisableRuleResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DisableRuleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Enables the specified rule. If the rule does not exist, the operation fails. * </p> * <p> * When you enable a rule, incoming events might not immediately start matching to a newly enabled rule. Allow a * short period of time for changes to take effect. * </p> * * @param enableRuleRequest * @return Result of the EnableRule operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws ManagedRuleException * This rule was created by an AWS service on behalf of your account. It is managed by that service. If you * see this error in response to <code>DeleteRule</code> or <code>RemoveTargets</code>, you can use the * <code>Force</code> parameter in those calls to delete the rule or remove targets from the rule. You * cannot modify these managed rules by using <code>DisableRule</code>, <code>EnableRule</code>, * <code>PutTargets</code>, <code>PutRule</code>, <code>TagResource</code>, or <code>UntagResource</code>. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.EnableRule * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/EnableRule" target="_top">AWS API * Documentation</a> */ @Override public EnableRuleResult enableRule(EnableRuleRequest request) { request = beforeClientExecution(request); return executeEnableRule(request); } @SdkInternalApi final EnableRuleResult executeEnableRule(EnableRuleRequest enableRuleRequest) { ExecutionContext executionContext = createExecutionContext(enableRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<EnableRuleRequest> request = null; Response<EnableRuleResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new EnableRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(enableRuleRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "EnableRule"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<EnableRuleResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new EnableRuleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Lists all the event buses in your account, including the default event bus, custom event buses, and partner event * buses. * </p> * * @param listEventBusesRequest * @return Result of the ListEventBuses operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.ListEventBuses * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventBuses" target="_top">AWS API * Documentation</a> */ @Override public ListEventBusesResult listEventBuses(ListEventBusesRequest request) { request = beforeClientExecution(request); return executeListEventBuses(request); } @SdkInternalApi final ListEventBusesResult executeListEventBuses(ListEventBusesRequest listEventBusesRequest) { ExecutionContext executionContext = createExecutionContext(listEventBusesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<ListEventBusesRequest> request = null; Response<ListEventBusesResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListEventBusesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listEventBusesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEventBuses"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<ListEventBusesResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEventBusesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * You can use this to see all the partner event sources that have been shared with your AWS account. For more * information about partner event sources, see <a>CreateEventBus</a>. * </p> * * @param listEventSourcesRequest * @return Result of the ListEventSources operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.ListEventSources * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventSources" target="_top">AWS * API Documentation</a> */ @Override public ListEventSourcesResult listEventSources(ListEventSourcesRequest request) { request = beforeClientExecution(request); return executeListEventSources(request); } @SdkInternalApi final ListEventSourcesResult executeListEventSources(ListEventSourcesRequest listEventSourcesRequest) { ExecutionContext executionContext = createExecutionContext(listEventSourcesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<ListEventSourcesRequest> request = null; Response<ListEventSourcesResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListEventSourcesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listEventSourcesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEventSources"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<ListEventSourcesResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEventSourcesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * An SaaS partner can use this operation to display the AWS account ID that a particular partner event source name * is associated with. This operation is not used by AWS customers. * </p> * * @param listPartnerEventSourceAccountsRequest * @return Result of the ListPartnerEventSourceAccounts operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws InternalException * This exception occurs due to unexpected causes. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.ListPartnerEventSourceAccounts * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSourceAccounts" * target="_top">AWS API Documentation</a> */ @Override public ListPartnerEventSourceAccountsResult listPartnerEventSourceAccounts(ListPartnerEventSourceAccountsRequest request) { request = beforeClientExecution(request); return executeListPartnerEventSourceAccounts(request); } @SdkInternalApi final ListPartnerEventSourceAccountsResult executeListPartnerEventSourceAccounts(ListPartnerEventSourceAccountsRequest listPartnerEventSourceAccountsRequest) { ExecutionContext executionContext = createExecutionContext(listPartnerEventSourceAccountsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<ListPartnerEventSourceAccountsRequest> request = null; Response<ListPartnerEventSourceAccountsResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListPartnerEventSourceAccountsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listPartnerEventSourceAccountsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPartnerEventSourceAccounts"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<ListPartnerEventSourceAccountsResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPartnerEventSourceAccountsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * An SaaS partner can use this operation to list all the partner event source names that they have created. This * operation is not used by AWS customers. * </p> * * @param listPartnerEventSourcesRequest * @return Result of the ListPartnerEventSources operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.ListPartnerEventSources * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSources" * target="_top">AWS API Documentation</a> */ @Override public ListPartnerEventSourcesResult listPartnerEventSources(ListPartnerEventSourcesRequest request) { request = beforeClientExecution(request); return executeListPartnerEventSources(request); } @SdkInternalApi final ListPartnerEventSourcesResult executeListPartnerEventSources(ListPartnerEventSourcesRequest listPartnerEventSourcesRequest) { ExecutionContext executionContext = createExecutionContext(listPartnerEventSourcesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<ListPartnerEventSourcesRequest> request = null; Response<ListPartnerEventSourcesResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListPartnerEventSourcesRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listPartnerEventSourcesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPartnerEventSources"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<ListPartnerEventSourcesResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPartnerEventSourcesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Lists the rules for the specified target. You can see which of the rules in Amazon EventBridge can invoke a * specific target in your account. * </p> * * @param listRuleNamesByTargetRequest * @return Result of the ListRuleNamesByTarget operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @sample AmazonEventBridge.ListRuleNamesByTarget * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRuleNamesByTarget" * target="_top">AWS API Documentation</a> */ @Override public ListRuleNamesByTargetResult listRuleNamesByTarget(ListRuleNamesByTargetRequest request) { request = beforeClientExecution(request); return executeListRuleNamesByTarget(request); } @SdkInternalApi final ListRuleNamesByTargetResult executeListRuleNamesByTarget(ListRuleNamesByTargetRequest listRuleNamesByTargetRequest) { ExecutionContext executionContext = createExecutionContext(listRuleNamesByTargetRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<ListRuleNamesByTargetRequest> request = null; Response<ListRuleNamesByTargetResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListRuleNamesByTargetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listRuleNamesByTargetRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRuleNamesByTarget"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<ListRuleNamesByTargetResult>> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRuleNamesByTargetResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Lists your Amazon EventBridge rules. You can either list all the rules or you can provide a prefix to match to * the rule names. * </p> * <p> * ListRules does not list the targets of a rule. To see the targets associated with a rule, use * <a>ListTargetsByRule</a>. * </p> * * @param listRulesRequest * @return Result of the ListRules operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @sample AmazonEventBridge.ListRules * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRules" target="_top">AWS API * Documentation</a> */ @Override public ListRulesResult listRules(ListRulesRequest request) { request = beforeClientExecution(request); return executeListRules(request); } @SdkInternalApi final ListRulesResult executeListRules(ListRulesRequest listRulesRequest) { ExecutionContext executionContext = createExecutionContext(listRulesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<ListRulesRequest> request = null; Response<ListRulesResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListRulesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listRulesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRules"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<ListRulesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRulesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Displays the tags associated with an EventBridge resource. In EventBridge, rules and event buses can be tagged. * </p> * * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.ListTagsForResource * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTagsForResource" * target="_top">AWS API Documentation</a> */ @Override public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) { request = beforeClientExecution(request); return executeListTagsForResource(request); } @SdkInternalApi final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) { ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<ListTagsForResourceRequest> request = null; Response<ListTagsForResourceResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<ListTagsForResourceResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Lists the targets assigned to the specified rule. * </p> * * @param listTargetsByRuleRequest * @return Result of the ListTargetsByRule operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.ListTargetsByRule * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTargetsByRule" target="_top">AWS * API Documentation</a> */ @Override public ListTargetsByRuleResult listTargetsByRule(ListTargetsByRuleRequest request) { request = beforeClientExecution(request); return executeListTargetsByRule(request); } @SdkInternalApi final ListTargetsByRuleResult executeListTargetsByRule(ListTargetsByRuleRequest listTargetsByRuleRequest) { ExecutionContext executionContext = createExecutionContext(listTargetsByRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<ListTargetsByRuleRequest> request = null; Response<ListTargetsByRuleResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTargetsByRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTargetsByRuleRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTargetsByRule"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<ListTargetsByRuleResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTargetsByRuleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Sends custom events to Amazon EventBridge so that they can be matched to rules. * </p> * * @param putEventsRequest * @return Result of the PutEvents operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.PutEvents * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutEvents" target="_top">AWS API * Documentation</a> */ @Override public PutEventsResult putEvents(PutEventsRequest request) { request = beforeClientExecution(request); return executePutEvents(request); } @SdkInternalApi final PutEventsResult executePutEvents(PutEventsRequest putEventsRequest) { ExecutionContext executionContext = createExecutionContext(putEventsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<PutEventsRequest> request = null; Response<PutEventsResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutEventsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putEventsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutEvents"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<PutEventsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutEventsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * This is used by SaaS partners to write events to a customer's partner event bus. AWS customers do not use this * operation. * </p> * * @param putPartnerEventsRequest * @return Result of the PutPartnerEvents operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws OperationDisabledException * The operation you are attempting is not available in this region. * @sample AmazonEventBridge.PutPartnerEvents * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPartnerEvents" target="_top">AWS * API Documentation</a> */ @Override public PutPartnerEventsResult putPartnerEvents(PutPartnerEventsRequest request) { request = beforeClientExecution(request); return executePutPartnerEvents(request); } @SdkInternalApi final PutPartnerEventsResult executePutPartnerEvents(PutPartnerEventsRequest putPartnerEventsRequest) { ExecutionContext executionContext = createExecutionContext(putPartnerEventsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<PutPartnerEventsRequest> request = null; Response<PutPartnerEventsResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutPartnerEventsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putPartnerEventsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutPartnerEvents"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<PutPartnerEventsResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutPartnerEventsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Running <code>PutPermission</code> permits the specified AWS account or AWS organization to put events to the * specified <i>event bus</i>. Amazon EventBridge (CloudWatch Events) rules in your account are triggered by these * events arriving to an event bus in your account. * </p> * <p> * For another account to send events to your account, that external account must have an EventBridge rule with your * account's event bus as a target. * </p> * <p> * To enable multiple AWS accounts to put events to your event bus, run <code>PutPermission</code> once for each of * these accounts. Or, if all the accounts are members of the same AWS organization, you can run * <code>PutPermission</code> once specifying <code>Principal</code> as "*" and specifying the AWS organization ID * in <code>Condition</code>, to grant permissions to all accounts in that organization. * </p> * <p> * If you grant permissions using an organization, then accounts in that organization must specify a * <code>RoleArn</code> with proper permissions when they use <code>PutTarget</code> to add your account's event bus * as a target. For more information, see <a * href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html" * >Sending and Receiving Events Between AWS Accounts</a> in the <i>Amazon EventBridge User Guide</i>. * </p> * <p> * The permission policy on the default event bus cannot exceed 10 KB in size. * </p> * * @param putPermissionRequest * @return Result of the PutPermission operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws PolicyLengthExceededException * The event bus policy is too long. For more information, see the limits. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @sample AmazonEventBridge.PutPermission * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPermission" target="_top">AWS API * Documentation</a> */ @Override public PutPermissionResult putPermission(PutPermissionRequest request) { request = beforeClientExecution(request); return executePutPermission(request); } @SdkInternalApi final PutPermissionResult executePutPermission(PutPermissionRequest putPermissionRequest) { ExecutionContext executionContext = createExecutionContext(putPermissionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<PutPermissionRequest> request = null; Response<PutPermissionResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutPermissionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putPermissionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutPermission"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<PutPermissionResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutPermissionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Creates or updates the specified rule. Rules are enabled by default, or based on value of the state. You can * disable a rule using <a>DisableRule</a>. * </p> * <p> * A single rule watches for events from a single event bus. Events generated by AWS services go to your account's * default event bus. Events generated by SaaS partner services or applications go to the matching partner event * bus. If you have custom applications or services, you can specify whether their events go to your default event * bus or a custom event bus that you have created. For more information, see <a>CreateEventBus</a>. * </p> * <p> * If you are updating an existing rule, the rule is replaced with what you specify in this <code>PutRule</code> * command. If you omit arguments in <code>PutRule</code>, the old values for those arguments are not kept. Instead, * they are replaced with null values. * </p> * <p> * When you create or update a rule, incoming events might not immediately start matching to new or updated rules. * Allow a short period of time for changes to take effect. * </p> * <p> * A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a * matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can * have both an EventPattern and a ScheduleExpression, in which case the rule triggers on matching events as well as * on a schedule. * </p> * <p> * When you initially create a rule, you can optionally assign one or more tags to the rule. Tags can help you * organize and categorize your resources. You can also use them to scope user permissions, by granting a user * permission to access or change only rules with certain tag values. To use the <code>PutRule</code> operation and * assign tags, you must have both the <code>events:PutRule</code> and <code>events:TagResource</code> permissions. * </p> * <p> * If you are updating an existing rule, any tags you specify in the <code>PutRule</code> operation are ignored. To * update the tags of an existing rule, use <a>TagResource</a> and <a>UntagResource</a>. * </p> * <p> * Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, EventBridge * uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event * patterns so that they match the ARN syntax in the event you want to match. * </p> * <p> * In EventBridge, it is possible to create rules that lead to infinite loops, where a rule is fired repeatedly. For * example, a rule might detect that ACLs have changed on an S3 bucket, and trigger software to change them to the * desired state. If the rule is not written carefully, the subsequent change to the ACLs fires the rule again, * creating an infinite loop. * </p> * <p> * To prevent this, write the rules so that the triggered actions do not re-fire the same rule. For example, your * rule could fire only if ACLs are found to be in a bad state, instead of after any change. * </p> * <p> * An infinite loop can quickly cause higher than expected charges. We recommend that you use budgeting, which * alerts you when charges exceed your specified limit. For more information, see <a * href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html">Managing Your * Costs with Budgets</a>. * </p> * * @param putRuleRequest * @return Result of the PutRule operation returned by the service. * @throws InvalidEventPatternException * The event pattern is not valid. * @throws LimitExceededException * You tried to create more rules or add more targets to a rule than is allowed. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws ManagedRuleException * This rule was created by an AWS service on behalf of your account. It is managed by that service. If you * see this error in response to <code>DeleteRule</code> or <code>RemoveTargets</code>, you can use the * <code>Force</code> parameter in those calls to delete the rule or remove targets from the rule. You * cannot modify these managed rules by using <code>DisableRule</code>, <code>EnableRule</code>, * <code>PutTargets</code>, <code>PutRule</code>, <code>TagResource</code>, or <code>UntagResource</code>. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @sample AmazonEventBridge.PutRule * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutRule" target="_top">AWS API * Documentation</a> */ @Override public PutRuleResult putRule(PutRuleRequest request) { request = beforeClientExecution(request); return executePutRule(request); } @SdkInternalApi final PutRuleResult executePutRule(PutRuleRequest putRuleRequest) { ExecutionContext executionContext = createExecutionContext(putRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<PutRuleRequest> request = null; Response<PutRuleResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putRuleRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutRule"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<PutRuleResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutRuleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Adds the specified targets to the specified rule, or updates the targets if they are already associated with the * rule. * </p> * <p> * Targets are the resources that are invoked when a rule is triggered. * </p> * <p> * You can configure the following as targets for Events: * </p> * <ul> * <li> * <p> * EC2 instances * </p> * </li> * <li> * <p> * SSM Run Command * </p> * </li> * <li> * <p> * SSM Automation * </p> * </li> * <li> * <p> * AWS Lambda functions * </p> * </li> * <li> * <p> * Data streams in Amazon Kinesis Data Streams * </p> * </li> * <li> * <p> * Data delivery streams in Amazon Kinesis Data Firehose * </p> * </li> * <li> * <p> * Amazon ECS tasks * </p> * </li> * <li> * <p> * AWS Step Functions state machines * </p> * </li> * <li> * <p> * AWS Batch jobs * </p> * </li> * <li> * <p> * AWS CodeBuild projects * </p> * </li> * <li> * <p> * Pipelines in AWS CodePipeline * </p> * </li> * <li> * <p> * Amazon Inspector assessment templates * </p> * </li> * <li> * <p> * Amazon SNS topics * </p> * </li> * <li> * <p> * Amazon SQS queues, including FIFO queues * </p> * </li> * <li> * <p> * The default event bus of another AWS account * </p> * </li> * <li> * <p> * Amazon API Gateway REST APIs * </p> * </li> * </ul> * <p> * Creating rules with built-in targets is supported only in the AWS Management Console. The built-in targets are * <code>EC2 CreateSnapshot API call</code>, <code>EC2 RebootInstances API call</code>, * <code>EC2 StopInstances API call</code>, and <code>EC2 TerminateInstances API call</code>. * </p> * <p> * For some target types, <code>PutTargets</code> provides target-specific parameters. If the target is a Kinesis * data stream, you can optionally specify which shard the event goes to by using the <code>KinesisParameters</code> * argument. To invoke a command on multiple EC2 instances with one rule, you can use the * <code>RunCommandParameters</code> field. * </p> * <p> * To be able to make API calls against the resources that you own, Amazon EventBridge (CloudWatch Events) needs the * appropriate permissions. For AWS Lambda and Amazon SNS resources, EventBridge relies on resource-based policies. * For EC2 instances, Kinesis data streams, AWS Step Functions state machines and API Gateway REST APIs, EventBridge * relies on IAM roles that you specify in the <code>RoleARN</code> argument in <code>PutTargets</code>. For more * information, see <a * href="https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html" * >Authentication and Access Control</a> in the <i>Amazon EventBridge User Guide</i>. * </p> * <p> * If another AWS account is in the same region and has granted you permission (using <code>PutPermission</code>), * you can send events to that account. Set that account's event bus as a target of the rules in your account. To * send the matched events to the other account, specify that account's event bus as the <code>Arn</code> value when * you run <code>PutTargets</code>. If your account sends events to another account, your account is charged for * each sent event. Each event sent to another account is charged as a custom event. The account receiving the event * is not charged. For more information, see <a href="https://aws.amazon.com/eventbridge/pricing/">Amazon * EventBridge (CloudWatch Events) Pricing</a>. * </p> * <note> * <p> * <code>Input</code>, <code>InputPath</code>, and <code>InputTransformer</code> are not available with * <code>PutTarget</code> if the target is an event bus of a different AWS account. * </p> * </note> * <p> * If you are setting the event bus of another account as the target, and that account granted permission to your * account through an organization instead of directly by the account ID, then you must specify a * <code>RoleArn</code> with proper permissions in the <code>Target</code> structure. For more information, see <a * href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html"> * Sending and Receiving Events Between AWS Accounts</a> in the <i>Amazon EventBridge User Guide</i>. * </p> * <p> * For more information about enabling cross-account events, see <a>PutPermission</a>. * </p> * <p> * <b>Input</b>, <b>InputPath</b>, and <b>InputTransformer</b> are mutually exclusive and optional parameters of a * target. When a rule is triggered due to a matched event: * </p> * <ul> * <li> * <p> * If none of the following arguments are specified for a target, then the entire event is passed to the target in * JSON format (unless the target is Amazon EC2 Run Command or Amazon ECS task, in which case nothing from the event * is passed to the target). * </p> * </li> * <li> * <p> * If <b>Input</b> is specified in the form of valid JSON, then the matched event is overridden with this constant. * </p> * </li> * <li> * <p> * If <b>InputPath</b> is specified in the form of JSONPath (for example, <code>$.detail</code>), then only the part * of the event specified in the path is passed to the target (for example, only the detail part of the event is * passed). * </p> * </li> * <li> * <p> * If <b>InputTransformer</b> is specified, then one or more specified JSONPaths are extracted from the event and * used as values in a template that you specify as the input to the target. * </p> * </li> * </ul> * <p> * When you specify <code>InputPath</code> or <code>InputTransformer</code>, you must use JSON dot notation, not * bracket notation. * </p> * <p> * When you add targets to a rule and the associated rule triggers soon after, new or updated targets might not be * immediately invoked. Allow a short period of time for changes to take effect. * </p> * <p> * This action can partially fail if too many requests are made at the same time. If that happens, * <code>FailedEntryCount</code> is non-zero in the response and each entry in <code>FailedEntries</code> provides * the ID of the failed target and the error code. * </p> * * @param putTargetsRequest * @return Result of the PutTargets operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws LimitExceededException * You tried to create more rules or add more targets to a rule than is allowed. * @throws ManagedRuleException * This rule was created by an AWS service on behalf of your account. It is managed by that service. If you * see this error in response to <code>DeleteRule</code> or <code>RemoveTargets</code>, you can use the * <code>Force</code> parameter in those calls to delete the rule or remove targets from the rule. You * cannot modify these managed rules by using <code>DisableRule</code>, <code>EnableRule</code>, * <code>PutTargets</code>, <code>PutRule</code>, <code>TagResource</code>, or <code>UntagResource</code>. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.PutTargets * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutTargets" target="_top">AWS API * Documentation</a> */ @Override public PutTargetsResult putTargets(PutTargetsRequest request) { request = beforeClientExecution(request); return executePutTargets(request); } @SdkInternalApi final PutTargetsResult executePutTargets(PutTargetsRequest putTargetsRequest) { ExecutionContext executionContext = createExecutionContext(putTargetsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<PutTargetsRequest> request = null; Response<PutTargetsResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutTargetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putTargetsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutTargets"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<PutTargetsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutTargetsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Revokes the permission of another AWS account to be able to put events to the specified event bus. Specify the * account to revoke by the <code>StatementId</code> value that you associated with the account when you granted it * permission with <code>PutPermission</code>. You can find the <code>StatementId</code> by using * <a>DescribeEventBus</a>. * </p> * * @param removePermissionRequest * @return Result of the RemovePermission operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @sample AmazonEventBridge.RemovePermission * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemovePermission" target="_top">AWS * API Documentation</a> */ @Override public RemovePermissionResult removePermission(RemovePermissionRequest request) { request = beforeClientExecution(request); return executeRemovePermission(request); } @SdkInternalApi final RemovePermissionResult executeRemovePermission(RemovePermissionRequest removePermissionRequest) { ExecutionContext executionContext = createExecutionContext(removePermissionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<RemovePermissionRequest> request = null; Response<RemovePermissionResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RemovePermissionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(removePermissionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemovePermission"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<RemovePermissionResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RemovePermissionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Removes the specified targets from the specified rule. When the rule is triggered, those targets are no longer be * invoked. * </p> * <p> * When you remove a target, when the associated rule triggers, removed targets might continue to be invoked. Allow * a short period of time for changes to take effect. * </p> * <p> * This action can partially fail if too many requests are made at the same time. If that happens, * <code>FailedEntryCount</code> is non-zero in the response and each entry in <code>FailedEntries</code> provides * the ID of the failed target and the error code. * </p> * * @param removeTargetsRequest * @return Result of the RemoveTargets operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws ManagedRuleException * This rule was created by an AWS service on behalf of your account. It is managed by that service. If you * see this error in response to <code>DeleteRule</code> or <code>RemoveTargets</code>, you can use the * <code>Force</code> parameter in those calls to delete the rule or remove targets from the rule. You * cannot modify these managed rules by using <code>DisableRule</code>, <code>EnableRule</code>, * <code>PutTargets</code>, <code>PutRule</code>, <code>TagResource</code>, or <code>UntagResource</code>. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.RemoveTargets * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemoveTargets" target="_top">AWS API * Documentation</a> */ @Override public RemoveTargetsResult removeTargets(RemoveTargetsRequest request) { request = beforeClientExecution(request); return executeRemoveTargets(request); } @SdkInternalApi final RemoveTargetsResult executeRemoveTargets(RemoveTargetsRequest removeTargetsRequest) { ExecutionContext executionContext = createExecutionContext(removeTargetsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<RemoveTargetsRequest> request = null; Response<RemoveTargetsResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RemoveTargetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(removeTargetsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemoveTargets"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<RemoveTargetsResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RemoveTargetsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Assigns one or more tags (key-value pairs) to the specified EventBridge resource. Tags can help you organize and * categorize your resources. You can also use them to scope user permissions by granting a user permission to * access or change only resources with certain tag values. In EventBridge, rules and event buses can be tagged. * </p> * <p> * Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters. * </p> * <p> * You can use the <code>TagResource</code> action with a resource that already has tags. If you specify a new tag * key, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is * already associated with the resource, the new tag value that you specify replaces the previous value for that * tag. * </p> * <p> * You can associate as many as 50 tags with a resource. * </p> * * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ManagedRuleException * This rule was created by an AWS service on behalf of your account. It is managed by that service. If you * see this error in response to <code>DeleteRule</code> or <code>RemoveTargets</code>, you can use the * <code>Force</code> parameter in those calls to delete the rule or remove targets from the rule. You * cannot modify these managed rules by using <code>DisableRule</code>, <code>EnableRule</code>, * <code>PutTargets</code>, <code>PutRule</code>, <code>TagResource</code>, or <code>UntagResource</code>. * @sample AmazonEventBridge.TagResource * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TagResource" target="_top">AWS API * Documentation</a> */ @Override public TagResourceResult tagResource(TagResourceRequest request) { request = beforeClientExecution(request); return executeTagResource(request); } @SdkInternalApi final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) { ExecutionContext executionContext = createExecutionContext(tagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<TagResourceRequest> request = null; Response<TagResourceResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<TagResourceResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Tests whether the specified event pattern matches the provided event. * </p> * <p> * Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, EventBridge * uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event * patterns so that they match the ARN syntax in the event you want to match. * </p> * * @param testEventPatternRequest * @return Result of the TestEventPattern operation returned by the service. * @throws InvalidEventPatternException * The event pattern is not valid. * @throws InternalException * This exception occurs due to unexpected causes. * @sample AmazonEventBridge.TestEventPattern * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TestEventPattern" target="_top">AWS * API Documentation</a> */ @Override public TestEventPatternResult testEventPattern(TestEventPatternRequest request) { request = beforeClientExecution(request); return executeTestEventPattern(request); } @SdkInternalApi final TestEventPatternResult executeTestEventPattern(TestEventPatternRequest testEventPatternRequest) { ExecutionContext executionContext = createExecutionContext(testEventPatternRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<TestEventPatternRequest> request = null; Response<TestEventPatternResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new TestEventPatternRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(testEventPatternRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TestEventPattern"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<TestEventPatternResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TestEventPatternResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * <p> * Removes one or more tags from the specified EventBridge resource. In Amazon EventBridge (CloudWatch Events, rules * and event buses can be tagged. * </p> * * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ResourceNotFoundException * An entity that you specified does not exist. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ConcurrentModificationException * There is concurrent modification on a rule or target. * @throws ManagedRuleException * This rule was created by an AWS service on behalf of your account. It is managed by that service. If you * see this error in response to <code>DeleteRule</code> or <code>RemoveTargets</code>, you can use the * <code>Force</code> parameter in those calls to delete the rule or remove targets from the rule. You * cannot modify these managed rules by using <code>DisableRule</code>, <code>EnableRule</code>, * <code>PutTargets</code>, <code>PutRule</code>, <code>TagResource</code>, or <code>UntagResource</code>. * @sample AmazonEventBridge.UntagResource * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/UntagResource" target="_top">AWS API * Documentation</a> */ @Override public UntagResourceResult untagResource(UntagResourceRequest request) { request = beforeClientExecution(request); return executeUntagResource(request); } @SdkInternalApi final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) { ExecutionContext executionContext = createExecutionContext(untagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<UntagResourceRequest> request = null; Response<UntagResourceResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EventBridge"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * Returns additional metadata for a previously executed successful, request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. * <p> * Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic * information for an executed request, you should use this method to retrieve it as soon as possible after * executing the request. * * @param request * The originally executed request * * @return The response metadata for the specified request, or null if none is available. */ public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private <X, Y extends AmazonWebServiceRequest> Response<X> invoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler, ExecutionContext executionContext) { return invoke(request, responseHandler, executionContext, null, null); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private <X, Y extends AmazonWebServiceRequest> Response<X> invoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler, ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) { executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider)); return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait); } /** * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will * be ignored for this operation. **/ private <X, Y extends AmazonWebServiceRequest> Response<X> anonymousInvoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext, null, null); } /** * Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the * ExecutionContext beforehand. **/ private <X, Y extends AmazonWebServiceRequest> Response<X> doInvoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler, ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) { if (discoveredEndpoint != null) { request.setEndpoint(discoveredEndpoint); request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery"); } else if (uriFromEndpointTrait != null) { request.setEndpoint(uriFromEndpointTrait); } else { request.setEndpoint(endpoint); } request.setTimeOffset(timeOffset); HttpResponseHandler<AmazonServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata()); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } @com.amazonaws.annotation.SdkInternalApi static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() { return protocolFactory; } }
[ "" ]
d2778e33c2a3498ba448fff8fb0d5545320d89ed
68a19507f18acff18aa4fa67d6611f5b8ac8913c
/piaoljf/jf-piaol/src/main/java/hgtech/jf/piaol/SetupPiaolApplicationContextHardCoded.java
c178c2d23fd2a76f59c42ae1b5789a426878e083
[]
no_license
ksksks2222/pl-workspace
cf0d0be2dfeaa62c0d4d5437f85401f60be0eadd
6146e3e3c2384c91cac459d25b27ffeb4f970dcd
refs/heads/master
2021-09-13T08:59:17.177105
2018-04-27T09:46:42
2018-04-27T09:46:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,754
java
/** * @文件名称:DomainSetup.java * @类路径:hgtech.jfaccount * @描述:TODO * @作者:xinglj * @时间:2014-9-5下午2:48:11 */ package hgtech.jf.piaol; import java.util.List; import hgtech.jf.JfProperty; import hgtech.jf.tree.TreeUtil; import hgtech.jf.tree.WithChildren; import hgtech.jfaccount.JfAccountTypeUK; import hgtech.jfaccount.JfTradeType; import hgtech.jfaccount.TradeType; import hgtech.jfaccount.Domain; import hgtech.jfaccount.IndustryType; import hgtech.jfaccount.JfAccountType; import hgtech.jfaccount.dao.JfAccountTypeDao; import hgtech.jfcal.model.CalModel; /** * @类功能说明:票量网积分的硬编码配置类 * @类修改者: * @修改日期:2014-9-5下午2:48:11 * @修改说明: * @公司名称:浙江汇购科技有限公司 * @作者:xinglj * @创建时间:2014-9-5下午2:48:11 * */ public class SetupPiaolApplicationContextHardCoded { /** * 这个内部积分系统的单位 */ public static Domain sysDomain; //消费类型:成长值、消费 private static TradeType ctGrow, ctConsume; /** * 行业类别 */ public static TradeType ctTravel; /** * 成长积分类型 */ public static JfAccountType accTypeGrow=new JfAccountType(); /** * 消费积分类型 */ public static JfAccountType accTypeConsume=new JfAccountType(); /** * 行业顶级积分类型 */ private static JfAccountType accTypeTravel; /** * */ public static JfAccountType topAcctType; public static JfAccountTypeDao acctTypeHome =new SetupSpiApplicationContext. JfAccountTypeMemDao(); public static CalModel calModel=new CalModel(); private static boolean init=false; public static void init(){ if(init) return; //积分交易类型 JfTradeType.init(); // 消费形态 //travel ctGrow=new TradeType(); ctGrow.code="grow"; ctGrow.name="成长值"; ctConsume=new TradeType(); ctConsume.code="consume"; ctConsume.name="票豆"; ctTravel =new TradeType(); ctTravel.code="e-ticket"; ctTravel.name="商旅业"; ctConsume.upperType=ctTravel; ctTravel.getSubList().add(ctConsume); ctGrow.upperType=ctTravel; ctTravel.getSubList().add(ctGrow); // 机构 sysDomain =new Domain(); sysDomain.code="piaol"; sysDomain.name="票量网"; sysDomain.jfRate=1.0f; sysDomain.type=ctTravel; sysDomain.ip=JfProperty.getProperties().getProperty("clientip"); topAcctType=acctTypeHome.genAccountTypeTree(acctTypeHome, sysDomain,sysDomain.type); topAcctType.setName("票量积分"); accTypeGrow=acctTypeHome.get(new JfAccountTypeUK( sysDomain, ctGrow)); accTypeGrow.setName("成长值"); accTypeConsume=acctTypeHome.get(new JfAccountTypeUK(sysDomain, ctConsume)); accTypeConsume.setName("票豆"); accTypeTravel=acctTypeHome.get(new JfAccountTypeUK(sysDomain, ctTravel)); System.out.println("all account types:\n"+acctTypeHome.getEntities()); System.out.println("trade:\n"+TreeUtil.toTreeString(ctTravel, 0)); System.out.println("domain:\n"+TreeUtil.toTreeString(sysDomain, 0)); System.out.println("accounttype:\n"+ TreeUtil.toTreeString(topAcctType, 0)); // rule init // calModel.project.ruleSet.add(r); init=true; } public static JfAccountType findType(String code){ List<WithChildren<JfAccountType>> list=accTypeTravel.getSubList(); for(WithChildren<JfAccountType> t:list){ JfAccountType account=(JfAccountType)t; if(account.getCode().equals(code)) return (JfAccountType)account; } return null; } public static void main(String[] args) { SetupSpiApplicationContext.init(); } }
[ "cangsong6908@gmail.com" ]
cangsong6908@gmail.com
f5cf9746981b1e7f75f5cc095b7dcc82b69500ca
4edafc8c9af7df066df4fa82c1a78143be91beca
/cap06/21/cap06/Esercizio3_3.java
a1a36cdc96f533fc8c69349dd91781235a279a41
[ "MIT" ]
permissive
garganti/info2_oop_unibg
be5e84828b757003f7dc4d887bbb503d519d3c1b
33a83d29c8701b5fa9ecc97b10cc359db73600cf
refs/heads/master
2021-08-23T09:45:21.672680
2021-06-15T15:19:56
2021-06-15T15:19:56
83,547,234
32
16
MIT
2020-03-05T17:20:18
2017-03-01T11:29:13
Java
ISO-8859-13
Java
false
false
983
java
package cap06; import java.util.StringTokenizer; import prog.io.FileInputManager; import prog.utili.SequenzaOrdinata; public class Esercizio3_3 { public static void main(String[] args) { FileInputManager java = new FileInputManager("java.txt"); SequenzaOrdinata<String> parole = new SequenzaOrdinata<>(); // leggo le parole nel file che potrebbero essere // su pił linee while(true) { // leggi una linea String line = java.readLine(); if (line == null) break; // spezza le parole nella linea line StringTokenizer st = new StringTokenizer(line); while(st.hasMoreTokens()) { // aggiungi la parola //parole.add(st.nextToken()); // variante, aggiungi il minuscolo solo se non presente String parola = st.nextToken().toLowerCase(); if (!parole.contains(parola)) { parole.add(parola); } } } // chiudiamo il file java.close(); // ristampa le parole for(String s: parole) { System.out.println(s); } } }
[ "angelo.gargantini@unibg.it" ]
angelo.gargantini@unibg.it
3b3df0456d1871613f431bda0b5216e20183546e
d4258237814c28ae4925119dcd058ce54d182282
/src/Day3_lab1/Countries.java
a53581f3e8d7d0314be998e9b72afffd10ef6120
[]
no_license
AhmedEko/ITI_Java_assignment
785dc9d34af485a49cb0efeea25dcc24f7ab7aad
3a8c6c4fc9909eac0c1056f43e944017cc20f69c
refs/heads/master
2023-05-03T19:32:33.564067
2021-05-30T10:21:54
2021-05-30T10:21:54
372,040,786
0
0
null
null
null
null
UTF-8
Java
false
false
707
java
package Day3_lab1; public class Countries { private int code; private String name; private String continent; public Countries(int code, String name, String continent) { this.code = code; this.name = name; this.continent = continent; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getContinent() { return continent; } public void setContinent(String continent) { this.continent = continent; } }
[ "ahmedeashry@gmail.com" ]
ahmedeashry@gmail.com
e08a4db6a6a2aee6eef928d470b7559ed563b697
01a458481521d72f3c403e9da692195ce56d5b3d
/src/main/java/com/arangodb/blueprints/client/ArangoDBSimpleEdge.java
d02f4fac761708b09e22506cc3fbde3de2790a24
[ "Apache-2.0" ]
permissive
rjarrett/blueprints-arangodb-graph
83767eb15b49266409c1283a35c0ae55fc75e710
da62913ab92a2a7b3675554d225c16c6c39662d0
refs/heads/master
2020-12-30T22:35:11.666628
2017-01-05T10:38:24
2017-01-05T10:38:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,843
java
////////////////////////////////////////////////////////////////////////////////////////// // // Implementation of a simple graph client for the ArangoDB. // // Copyright triAGENS GmbH Cologne. // ////////////////////////////////////////////////////////////////////////////////////////// package com.arangodb.blueprints.client; import java.util.Map; import com.tinkerpop.blueprints.util.StringFactory; /** * The ArangoDB simple edge class * * @author Achim Brandt (http://www.triagens.de) * @author Johannes Gocke (http://www.triagens.de) * @author Guido Schwab (http://www.triagens.de) */ public class ArangoDBSimpleEdge extends ArangoDBBaseDocument { /** * the name of the "to" attribute */ public static final String _TO = "_to"; /** * the name of the "from" attribute */ public static final String _FROM = "_from"; /** * Creates a new edge by a JSON document * * @param properties * The JSON document * * @throws ArangoDBException * if an error occurs */ public ArangoDBSimpleEdge(Map<String, Object> properties) throws ArangoDBException { this.setProperties(properties); checkHasProperty(_TO); checkHasProperty(_FROM); } /** * Returns the edge name * * @return the edge name */ public String getName() { return getDocumentKey(); } /** * Returns the identifier of the "to" vertex * * @return the identifier of the "to" vertex */ public String getToVertexId() { return getStringProperty(_TO); } /** * Returns the identifier of the "from" vertex * * @return the identifier of the "from" vertex */ public String getFromVertexId() { return getStringProperty(_FROM); } /** * Returns the edge label * * @return the edge label */ public String getLabel() { return getStringProperty(StringFactory.LABEL); } }
[ "a.brandt@triagens.de" ]
a.brandt@triagens.de
0fb9ac5c5ef96cf740b0963fcb2e477a0ad06390
411f3513e54040cbe516abee5eb6218372511360
/src/com/MyTrial/javaexamples/IntroClass.java
05f44ab64fa0ab474eaf3e9ab71530715c298e98
[]
no_license
subinp-source/FirstRepo
d989f0c1f2a5c70544da0b3e3b782ae8169afeed
cac3679b33bcfb59b57bc520f3af602da8cf8661
refs/heads/master
2023-06-18T02:31:58.892048
2021-04-10T10:49:22
2021-04-10T10:49:22
336,250,722
0
0
null
null
null
null
UTF-8
Java
false
false
375
java
package com.MyTrial.javaexamples; class person1{ String name; int age; void speak() { System.out.println("name is "+name+" and age is just "+age+" years old"); } } public class IntroClass { public static void main(String[] args){ person1 raju = new person1(); raju.name="raju"; raju.age=25; raju.speak(); } }
[ "subinandro@outlook.com" ]
subinandro@outlook.com
ed97c4d74056dc57dd2a245bb4dc7cb2ff1d8a8c
19b8a523157b0cbf846961b3ece4635a66893b5f
/src/models/SinhVien.java
e878dea902db6be343b60afd8d47a61cc41de3b2
[]
no_license
group7project/BaoCaoOnline
f5a04381ec74bad5de31302822911a4f36911611
39ffe01945e0f4442cae7a424d101a1971d12c6e
refs/heads/master
2021-01-12T07:05:53.070806
2016-12-20T01:05:29
2016-12-20T01:05:29
76,910,111
0
0
null
null
null
null
UTF-8
Java
false
false
994
java
package models; public class SinhVien { String masv; String matKhau; String hoTen; String sdt; String trangThai; public SinhVien(String masv, String matKhau, String hoTen, String sdt, String trangThai) { super(); this.masv = masv; this.matKhau = matKhau; this.hoTen = hoTen; this.sdt = sdt; this.trangThai = trangThai; } public SinhVien() { super(); // TODO Auto-generated constructor stub } public String getMasv() { return masv; } public void setMasv(String masv) { this.masv = masv; } public String getMatKhau() { return matKhau; } public void setMatKhau(String matKhau) { this.matKhau = matKhau; } public String getHoTen() { return hoTen; } public void setHoTen(String hoTen) { this.hoTen = hoTen; } public String getSdt() { return sdt; } public void setSdt(String sdt) { this.sdt = sdt; } public String getTrangThai() { return trangThai; } public void setTrangThai(String trangThai) { this.trangThai = trangThai; } }
[ "14110190@student.hcmute.edu.vn" ]
14110190@student.hcmute.edu.vn
e940b8494d9468bc699100996e26ed6155f75ed6
febc20f42188e534faff83536be814c869fb315d
/src/day6/ScannerPractice.java
0c1de0fda9c8ba3b0a351f629bef058c3e5279d2
[]
no_license
Abdullah-Sinan/JavaPractice
a42c75d0f5929a4e0d4d111338d9333bf9247f36
b44197aab832285dd9e35b4e79fc1d7e5291f77b
refs/heads/master
2020-06-07T10:22:41.510870
2019-06-20T23:21:29
2019-06-20T23:21:29
192,998,157
0
0
null
null
null
null
UTF-8
Java
false
false
799
java
package day6; import java.util.Scanner; public class ScannerPractice { public static void main(String[] args) { // creating a scanner object Scanner input = new Scanner(System.in) ; // ask user a question System.out.println("Enter your mood today : "); // save user input into String String mood = input.next(); // This will only pick up a word as String input.nextLine(); /// this will take car of ,Enter> you have clicked // ask user questions System.out.println("Enter your location today : "); // save user input into String String location = input.nextLine(); // output sth System.out.println("Your mood Today is : " + mood); System.out.println("Your location is : " + location); // close scanner after usage input.close(); } }
[ "a.sinanoduncu@gmail.com" ]
a.sinanoduncu@gmail.com
df0334db4e7d10b703ec113e2f53a7e160f72ad3
af4a880c4d21934daba5cdc3cb8ce19492d0755d
/src/amc/app/web/soft/dev/presentacion/ArticuloMB.java
a748b5b82d964c72504a9e16ded4ffd44413f807
[]
no_license
BinaryInHouse/WebArticulos
389c79c12c7eefd1517b1b6735e0b059229fd13d
bd8b1fbda89906ee92e4d21299aa17647cf46220
refs/heads/master
2021-10-27T01:13:03.392716
2019-04-15T05:38:45
2019-04-15T05:38:45
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
7,355
java
package amc.app.web.soft.dev.presentacion; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.context.FacesContext; import javax.servlet.http.HttpServletResponse; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; import amc.app.web.soft.dev.bean.ArticuloBean; import amc.app.web.soft.dev.service.inf.ArticuloService; @Controller(value="articuloMB") @Scope("session") public class ArticuloMB extends GenericoMB { private List<ArticuloBean> lstArticuloBeans; private ArticuloBean articuloBean; @Autowired private ArticuloService articuloService; @PostConstruct public void init() { this.setLstArticuloBeans(new ArrayList<ArticuloBean>()); this.setArticuloBean(new ArticuloBean()); this.listar(); } public String nuevo(){ this.setArticuloBean(new ArticuloBean()); return "articulo_registro"; } public String cancelar(){ this.setArticuloBean(new ArticuloBean()); return "articulo_listado"; } public String modificar(ArticuloBean articuloBean){ try { ArticuloBean oArticuloBean=this.getArticuloService().buscarXId(articuloBean); this.setArticuloBean(oArticuloBean); } catch (Exception e) { e.printStackTrace(); super.msgError("Error al modificar"); } return "articulo_registro"; } public void eliminar(ArticuloBean articuloBean){ try { super.setAuditoria(articuloBean); boolean sw =this.getArticuloService().eliminar(articuloBean); if (sw) { super.msgAviso("Exito al eliminar"); } else { super.msgError("Error al eliminar"); } } catch (Exception e) { super.msgError("Error al eliminar"); } } public void grabar(){ if (!this.validar()) { return; } super.setAuditoria(this.getArticuloBean()); try { System.out.println("Id "+this.getArticuloBean().getId()); boolean sw=false; if (this.getArticuloBean().getId()==0) { sw=this.getArticuloService().insertar(this.getArticuloBean()); }else{ sw=this.getArticuloService().actualizar(this.getArticuloBean()); } if (sw) { super.msgAviso("Exito al grabar"); } else { super.msgError("Error al grabar"); } } catch (Exception e) { } } public void listar(){ try { lstArticuloBeans=this.getArticuloService().listar(this.getArticuloBean()); for (ArticuloBean articuloBean : lstArticuloBeans) { System.out.println(articuloBean); } } catch (Exception e) { e.printStackTrace(); } } private boolean validar(){ if (this.getArticuloBean().getDescripcion().trim().length()<3 || this.getArticuloBean().getMarca().trim().length()<3 || this.getArticuloBean().getModelo().trim().length()<3) { super.msgAlerta("El Información es requerida y debe tener" + " como mínimo 3 caracteres"); return false; }else{ try { int ret=this.getArticuloService().validarNombre(this.getArticuloBean()); if (ret>0) { super.msgAlerta("El Articulo " + this.getArticuloBean().getDescripcion() +" ya existe"); return false; } } catch (Exception e) { return false; } } /* if (this.getArticuloBean().getPrecio()<=0) { super.msgAlerta("El precio es requerido y debe ser mayor que cero"); return false; }*/ return true; } public void exportExcel() { try { HttpServletResponse response = super.getResponse(); response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-Disposition", "attachment; filename=Listado_Articulos.xls"); HSSFWorkbook libro = new HSSFWorkbook(); HSSFSheet hoja = libro.createSheet("Listado de Articulos"); int countRow = 0; // CABECERA Row row = hoja.createRow(countRow); Cell cell = row.createCell(0); cell.setCellValue("Item"); super.setStyleLisCabecera(libro, cell); cell = row.createCell(1); cell.setCellValue("Id"); super.setStyleLisCabecera(libro, cell); cell = row.createCell(2); cell.setCellValue("Código"); super.setStyleLisCabecera(libro, cell); cell = row.createCell(3); cell.setCellValue("Serie"); super.setStyleLisCabecera(libro, cell); cell = row.createCell(4); cell.setCellValue("Descripcion"); super.setStyleLisCabecera(libro, cell); cell = row.createCell(5); cell.setCellValue("Marca"); super.setStyleLisCabecera(libro, cell); cell = row.createCell(6); cell.setCellValue("Modelo"); super.setStyleLisCabecera(libro, cell); // LISTADO int item = 0; for (ArticuloBean articuloBean : this.lstArticuloBeans) { countRow++; item++; row = hoja.createRow(countRow); cell = row.createCell(0); cell.setCellValue(item); // Id cell = row.createCell(1); cell.setCellValue(articuloBean.getId()); // Codigo cell = row.createCell(2); cell.setCellValue(articuloBean.getCodigo()); // Serie cell = row.createCell(3); cell.setCellValue(articuloBean.getSerie()); // Descripcion cell = row.createCell(4); cell.setCellValue(articuloBean.getDescripcion()); // Marca cell = row.createCell(5); cell.setCellValue(articuloBean.getMarca()); // Modelo cell = row.createCell(6); cell.setCellValue(articuloBean.getModelo()); } OutputStream out = response.getOutputStream(); libro.write(out); out.close(); FacesContext.getCurrentInstance().responseComplete(); } catch (Exception e) { e.printStackTrace(); } } public List<ArticuloBean> getLstArticuloBeans() { this.listar(); return lstArticuloBeans; } public void setLstArticuloBeans(List<ArticuloBean> lstArticuloBeans) { this.lstArticuloBeans = lstArticuloBeans; } public ArticuloBean getArticuloBean() { return articuloBean; } public void setArticuloBean(ArticuloBean articuloBean) { this.articuloBean = articuloBean; } public ArticuloService getArticuloService() { return articuloService; } public void setArticuloService(ArticuloService articuloService) { this.articuloService = articuloService; } }
[ "alexmeco95@gmail.com" ]
alexmeco95@gmail.com
86fae972b8793316dd2152a52a052925cd4bc898
c5d02976140a2a235f53a021f1d0ae6cc547cf77
/src/team4restaurant/mophong/Ban.java
f5ea57f4163f57f6c8f713f736a5e3151588fb2e
[]
no_license
BinhDuc/Java_Project
aa7de1fe5979477ebe164697037d2432de1694d3
2332cf50ad74ca48f00c686dce330a032fb5c322
refs/heads/master
2022-12-22T14:08:08.851742
2020-10-01T12:46:20
2020-10-01T12:46:20
300,275,577
1
0
null
null
null
null
UTF-8
Java
false
false
654
java
package team4restaurant.mophong; public class Ban { private String idban; private String soban; private String vitri; public Ban() { // TODO Auto-generated constructor stub } public Ban(String idban, String soban, String vitri) { this.idban=idban; this.soban=soban; this.vitri=vitri; } public String getIdban() { return idban; } public void setIdban(String idban) { this.idban = idban; } public String getSoban() { return soban; } public void setSoban(String soban) { this.soban = soban; } public String getVitri() { return vitri; } public void setVitri(String vitri) { this.vitri = vitri; } }
[ "binhduc1999@gmail.com" ]
binhduc1999@gmail.com
d67813aef03896ec58be973542a6ae845d2c0e33
565bec54c5a8b652694d6c1adbf82758d62ffefb
/src/main/java/com/datasphere/datasource/DataSourceAliasRepository.java
1ddc2389ee681a448b825f1f3aec8a87819ae739
[]
no_license
dawsongzhao/datasphere-datasource
b75d45d9cc51c25828ba1d218ec5051fef0d525d
f252bc8c350def4e92d5e48d02d953718bdc06e1
refs/heads/master
2020-08-08T02:23:14.105443
2019-09-26T02:17:36
2019-09-26T02:17:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,284
java
/* * Copyright 2019, Huahuidata, Inc. * DataSphere is licensed under the Mulan PSL v1. * You can use this software according to the terms and conditions of the Mulan PSL v1. * You may obtain a copy of Mulan PSL v1 at: * http://license.coscl.org.cn/MulanPSL * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. * See the Mulan PSL v1 for more details. */ package com.datasphere.datasource; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.rest.core.annotation.RepositoryRestResource; /** * Created by aladin on 2019. 8. 30.. */ @RepositoryRestResource(exported = false, excerptProjection = DataSourceAliasProjections.DefaultProjection.class) public interface DataSourceAliasRepository extends JpaRepository<DataSourceAlias, Long>, QuerydslPredicateExecutor<DataSourceAlias> { List<DataSourceAlias> findByDashBoardId(String dashboardId); DataSourceAlias findDistinctByDataSourceIdAndDashBoardIdAndFieldName(String dataSourceId, String dashboardId, String fieldName); }
[ "theseusyang@192.168.0.102" ]
theseusyang@192.168.0.102
6b7bb507c82f6149e3b64f49828a9d6a7f5172f8
a5d720296be9ebe995db6d101c29bd180f01a164
/src/breder/util/swing/Validator.java
391a0a960d3602631a8760608c9c1725fc68856e
[]
no_license
bernardobreder/java-utils
5145e012c893bcb3ceab5c70c878f87dfa12902c
a4f82c7f4581b5ffb02c4f02f43f70f345341091
refs/heads/master
2021-07-03T16:59:05.890157
2017-09-23T00:16:05
2017-09-23T00:16:05
104,528,897
0
1
null
null
null
null
UTF-8
Java
false
false
105
java
package breder.util.swing; public interface Validator { public boolean valid(String text); }
[ "bernardobreder@gmail.com" ]
bernardobreder@gmail.com
43eb1368b5ba2ecb16940fe97548f1b9716507b2
bdb84e5199f98e7f57f8da2d9e2c8eaeb5209536
/src/main/java/uk/co/nickthecoder/wrkfoo/Column.java
2e33c87e9ca0b83b36da94f7a3bd89df603c30db
[]
no_license
nickthecoder/wrkfoo
63e9681404f4f89a8a7d114cb351eb7a96425889
9247621bb0b5d9e87bd8d290462c6a0bdaba92c7
refs/heads/master
2021-01-17T04:20:10.685033
2017-04-13T07:52:35
2017-04-13T07:52:35
82,939,178
0
0
null
null
null
null
UTF-8
Java
false
false
3,464
java
package uk.co.nickthecoder.wrkfoo; import java.util.Comparator; import javax.swing.table.TableCellRenderer; import uk.co.nickthecoder.jguifier.util.Util; import uk.co.nickthecoder.wrkfoo.tool.ExportTableData; import uk.co.nickthecoder.wrkfoo.tool.WrkFTask; /** * * @param <R> * The type of the row, for example, File when using {@link WrkFTask} to list a directory. */ public abstract class Column<R> { private Columns<R> columns; public Class<?> klass; public final String key; public int width = 150; public int minWidth = 10; public int maxWidth = 1000; public String label; public boolean defaultSort = false; public boolean reverse = false; public boolean editable = false; public TableCellRenderer cellRenderer = null; public boolean visible = true; public Comparator<?> comparator; public int tooltipColumn = -1; public boolean save = true; public abstract Object getValue(R row); public Column(Class<?> klass, String key) { this(klass, key, Util.uncamel(key)); } public Column(Class<?> klass, String key, String label) { this.klass = klass; this.key = key; this.label = label; } public String getKey() { return key; } void setColumns(Columns<R> columns) { this.columns = columns; } public Columns<R> getColumns() { return columns; } public Column<R> width(int width) { this.width = width; return this; } public Column<R> maxWidth(int width) { this.maxWidth = width; return this; } public Column<R> minWidth(int width) { this.minWidth = width; return this; } public Column<R> lock() { this.minWidth = width; this.maxWidth = width; return this; } public Column<R> editable() { this.editable = true; return this; } public Column<R> hide() { this.visible = false; return this; } public Column<R> sort() { this.reverse = false; this.defaultSort = true; if (getColumns() != null) { getColumns().defaultSortColumnIndex = getColumns().indexOf(key); } return this; } public Column<R> reverseSort() { this.reverse = true; this.defaultSort = true; return this; } public Column<R> comparator(Comparator<?> value) { comparator = value; return this; } public Column<R> editable(boolean value) { this.editable = value; return this; } public Column<R> renderer(TableCellRenderer tcr) { this.cellRenderer = tcr; return this; } public Column<R> tooltip() { return tooltip(key); } public Column<R> tooltip(String columnKey) { tooltipColumn = getColumns().indexOf(columnKey); return this; } public Column<R> tooltipFor(String columnKey) { Column<R> other = getColumns().findColumn(columnKey); other.tooltipColumn = getColumns().indexOf(key); return this; } /** * Column is not saved by {@link ExportTableData}. Use this for icons and other non-data columns. * * @return this */ public Column<R> trivial() { this.save = false; return this; } }
[ "nickthecoder@gmail.com" ]
nickthecoder@gmail.com
2483430053d55402d35d760cd4fede351710f070
3cf870ec335aa1b95e8776ea9b2a9d6495377628
/admin-sponge/build/tmp/recompileMc/sources/net/minecraft/tileentity/TileEntitySign.java
4f39c334c8b00c8d3023f0cf26c6b1ce827c5d00
[]
no_license
yk133/MyMc
d6498607e7f1f932813178e7d0911ffce6e64c83
e1ae6d97415583b1271ee57ac96083c1350ac048
refs/heads/master
2020-04-03T16:23:09.774937
2018-11-05T12:17:39
2018-11-05T12:17:39
155,402,500
0
0
null
null
null
null
UTF-8
Java
false
false
8,880
java
package net.minecraft.tileentity; import javax.annotation.Nullable; import net.minecraft.command.CommandException; import net.minecraft.command.CommandResultStats; import net.minecraft.command.ICommandSender; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.server.MinecraftServer; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.Style; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentUtils; import net.minecraft.util.text.event.ClickEvent; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntitySign extends TileEntity { public final ITextComponent[] signText = new ITextComponent[] {new TextComponentString(""), new TextComponentString(""), new TextComponentString(""), new TextComponentString("")}; /** * The index of the line currently being edited. Only used on client side, but defined on both. Note this is only * really used when the > < are going to be visible. */ public int lineBeingEdited = -1; private boolean isEditable = true; private EntityPlayer player; private final CommandResultStats field_174883_i = new CommandResultStats(); public NBTTagCompound write(NBTTagCompound compound) { super.write(compound); for (int i = 0; i < 4; ++i) { String s = ITextComponent.Serializer.toJson(this.signText[i]); compound.putString("Text" + (i + 1), s); } this.field_174883_i.func_179670_b(compound); return compound; } protected void func_190201_b(World p_190201_1_) { this.setWorld(p_190201_1_); } public void read(NBTTagCompound compound) { this.isEditable = false; super.read(compound); ICommandSender icommandsender = new ICommandSender() { public String func_70005_c_() { return "Sign"; } public boolean func_70003_b(int p_70003_1_, String p_70003_2_) { return p_70003_1_ <= 2; //Forge: Fixes MC-75630 - Exploit with signs and command blocks } /** * Get the position in the world. <b>{@code null} is not allowed!</b> If you are not an entity in the world, * return the coordinates 0, 0, 0 */ public BlockPos getPosition() { return TileEntitySign.this.pos; } /** * Get the position vector. <b>{@code null} is not allowed!</b> If you are not an entity in the world, * return 0.0D, 0.0D, 0.0D */ public Vec3d getPositionVector() { return new Vec3d((double)TileEntitySign.this.pos.getX() + 0.5D, (double)TileEntitySign.this.pos.getY() + 0.5D, (double)TileEntitySign.this.pos.getZ() + 0.5D); } /** * Get the world, if available. <b>{@code null} is not allowed!</b> If you are not an entity in the world, * return the overworld */ public World getEntityWorld() { return TileEntitySign.this.world; } /** * Get the Minecraft server instance */ public MinecraftServer getServer() { return TileEntitySign.this.world.getServer(); } }; for (int i = 0; i < 4; ++i) { String s = compound.getString("Text" + (i + 1)); ITextComponent itextcomponent = ITextComponent.Serializer.fromJson(s); try { this.signText[i] = TextComponentUtils.func_179985_a(icommandsender, itextcomponent, (Entity)null); } catch (CommandException var7) { this.signText[i] = itextcomponent; } } this.field_174883_i.func_179668_a(compound); } /** * Retrieves packet to send to the client whenever this Tile Entity is resynced via World.notifyBlockUpdate. For * modded TE's, this packet comes back to you clientside in {@link #onDataPacket} */ @Nullable public SPacketUpdateTileEntity getUpdatePacket() { return new SPacketUpdateTileEntity(this.pos, 9, this.getUpdateTag()); } /** * Get an NBT compound to sync to the client with SPacketChunkData, used for initial loading of the chunk or when * many blocks change at once. This compound comes back to you clientside in {@link handleUpdateTag} */ public NBTTagCompound getUpdateTag() { return this.write(new NBTTagCompound()); } public boolean onlyOpsCanSetNbt() { return true; } public boolean getIsEditable() { return this.isEditable; } /** * Sets the sign's isEditable flag to the specified parameter. */ @SideOnly(Side.CLIENT) public void setEditable(boolean isEditableIn) { this.isEditable = isEditableIn; if (!isEditableIn) { this.player = null; } } public void setPlayer(EntityPlayer playerIn) { this.player = playerIn; } public EntityPlayer getPlayer() { return this.player; } public boolean executeCommand(final EntityPlayer playerIn) { ICommandSender icommandsender = new ICommandSender() { public String func_70005_c_() { return playerIn.func_70005_c_(); } public ITextComponent getDisplayName() { return playerIn.getDisplayName(); } /** * Send a chat message to the CommandSender */ public void sendMessage(ITextComponent component) { } public boolean func_70003_b(int p_70003_1_, String p_70003_2_) { return p_70003_1_ <= 2; } /** * Get the position in the world. <b>{@code null} is not allowed!</b> If you are not an entity in the world, * return the coordinates 0, 0, 0 */ public BlockPos getPosition() { return TileEntitySign.this.pos; } /** * Get the position vector. <b>{@code null} is not allowed!</b> If you are not an entity in the world, * return 0.0D, 0.0D, 0.0D */ public Vec3d getPositionVector() { return new Vec3d((double)TileEntitySign.this.pos.getX() + 0.5D, (double)TileEntitySign.this.pos.getY() + 0.5D, (double)TileEntitySign.this.pos.getZ() + 0.5D); } /** * Get the world, if available. <b>{@code null} is not allowed!</b> If you are not an entity in the world, * return the overworld */ public World getEntityWorld() { return playerIn.getEntityWorld(); } public Entity func_174793_f() { return playerIn; } public boolean func_174792_t_() { return false; } public void func_174794_a(CommandResultStats.Type p_174794_1_, int p_174794_2_) { if (TileEntitySign.this.world != null && !TileEntitySign.this.world.isRemote) { TileEntitySign.this.field_174883_i.func_184932_a(TileEntitySign.this.world.getServer(), this, p_174794_1_, p_174794_2_); } } /** * Get the Minecraft server instance */ public MinecraftServer getServer() { return playerIn.getServer(); } }; for (ITextComponent itextcomponent : this.signText) { Style style = itextcomponent == null ? null : itextcomponent.getStyle(); if (style != null && style.getClickEvent() != null) { ClickEvent clickevent = style.getClickEvent(); if (clickevent.getAction() == ClickEvent.Action.RUN_COMMAND) { playerIn.getServer().func_71187_D().func_71556_a(icommandsender, clickevent.getValue()); } } } return true; } public CommandResultStats func_174880_d() { return this.field_174883_i; } }
[ "1060682109@qq.com" ]
1060682109@qq.com
c56eb79fa068e21eccc2428ce289cb17351bd511
8a955337af2c092dee4caf80437888ea8720d7f9
/planetdominos/src/progen/output/outputers/FileOutput.java
0e6de571b472be7e50e8977c7bc514f77dc6e8b5
[]
no_license
GelidElf/planetdominos
873e24f5678b2ffeec5f65bb32a980cd56ca48c6
9aafff0d8d011ce6b973bbe902265aea24351f1b
refs/heads/master
2016-09-05T14:02:45.074783
2012-01-31T13:49:23
2012-01-31T13:49:23
32,348,432
0
0
null
null
null
null
UTF-8
Java
false
false
2,039
java
/** * */ package progen.output.outputers; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.Locale; import java.util.ResourceBundle; import progen.context.ProGenContext; /** * @author jirsis * @since 2.0 * */ public abstract class FileOutput implements Outputer { /** El escritor en fichero. */ protected PrintWriter writer; /** Nombre del fichero que contiene la salida. */ private String fileName; /** Indica si se va crear vacío o si se va a añadir más información. */ private boolean append; /** Almacén de todos los literales de texto que aparecerán en la salida. */ protected ResourceBundle literals; /** * Constructor que recibe como parámetro el nombre del fichero y en que modo * se crea el fichero, si será vaciado al crearlo o se añadirán nuevas * líneas. * @param fileName El nombre del fichero. * @param append <code>true</code> si se añadirán más líneas y <code>false</code> * en caso contrario. */ public FileOutput(String fileName, boolean append){ this.fileName=fileName; this.append=append; this.literals=ResourceBundle.getBundle("progen.output.outputers.literals", Locale.getDefault()); } /* (non-Javadoc) * @see progen.output.outputers.Outputer#close() */ public void close() { writer.flush(); writer.close(); } /* (non-Javadoc) * @see progen.output.outputers.Outputer#init() */ public void init() { try { StringBuilder outputDir = new StringBuilder(50); outputDir.append(ProGenContext.getMandatoryProperty("progen.output.dir")); outputDir.append(ProGenContext.getMandatoryProperty("progen.output.experiment")); outputDir.append(fileName); writer = new PrintWriter(new FileWriter(outputDir.toString(), append)); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } }
[ "GelidElf@Gmail.com@5884f7cc-b6ee-0f18-bd88-15764fc0c7e1" ]
GelidElf@Gmail.com@5884f7cc-b6ee-0f18-bd88-15764fc0c7e1
2050ce4f5dd28045a7f1f108d09559794f77266c
76a94c901d5699d3978568c7f51f07900bc86a21
/src/poker/machine/HighPayoff.java
c077872ef7eab0244fd4f7329fe48074fa6bea32
[]
no_license
rtayek/poker
abe5912ae326ff72b1e2bfd4b446723db9332543
92204663ef8716cfae7beb987b6866a7c4d10fa4
refs/heads/master
2021-01-10T04:29:17.759237
2015-11-06T12:55:05
2015-11-06T12:55:05
45,681,912
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
package poker.machine; import poker.*; public class HighPayoff implements PayMaster { public int payoff(PokerHand.HighType typeOfPokerHand,int handNumber) { int payoff=payoffs[typeOfPokerHand.ordinal()]; if(handNumber==royalFlush) payoff=250; if(handNumber>jacksOrBetter) payoff=0; return payoff; } private static final int jacksOrBetter=4218,royalFlush=14; private static final int payoffs[]= {0,1,2,3,4,6,9,25,50,250}; }
[ "ray@tayek.com" ]
ray@tayek.com
045dd4000189b8def03d82a6112117d0a5ba87ef
a035d1fe23e9e649e17de55cd55166d4b1bc7ce3
/jcert8_lambdaBuiltIns/src/com/example/lambda01/A03IterationTest.java
e23ecc7fb32d94f76c6140f36c1bac6e32619672
[]
no_license
jiturbide/training
2633723012b890deaaf7ed453a5961eccac9d6ad
6dbf3dbb2a214f30ad1547ff487cdb0588dbdf88
refs/heads/master
2021-01-01T17:05:31.677896
2017-01-10T05:11:37
2017-01-10T05:11:37
78,039,371
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
package com.example.lambda01; import java.util.List; /** * * @author oracle */ public class A03IterationTest { public static void main(String[] args) { List<SalesTxn> tList = SalesTxn.createTxnList(); System.out.println("\n== CA Transations Lambda =="); tList.stream() .filter(t -> t.getState().equals("CA")) .forEach(SalesTxn::printSummary); } }
[ "joseluis.iturbide@gmail.com" ]
joseluis.iturbide@gmail.com
07a140c666a2ca00e054fdbd85fa7ce5b2387ec9
5c13ed5e6619b664ffaf813a3a50eb3ee15b840b
/src/main/java/com/azimo/tool/task/interfaces/Uploader.java
dbd1f35fd3d44c7d6f51d327978b0f5be63ec020
[ "Apache-2.0" ]
permissive
AzimoLabs/Review-Reporter
611d237d1c4d986845ec717343271f15a318ca60
a531dbbaadb49d1dd83ccfd634d3b757eaf57135
refs/heads/master
2021-06-07T11:15:50.921715
2021-04-07T08:23:26
2021-04-07T08:23:26
80,517,780
151
13
null
null
null
null
UTF-8
Java
false
false
144
java
package com.azimo.tool.task.interfaces; /** * Created by F1sherKK on 27/01/17. */ public interface Uploader<T, R> { R upload(T model); }
[ "krzyk.kamil@gmail.com" ]
krzyk.kamil@gmail.com
7a249c4263b00abc48de246af123ed2a254c3a5b
ccaf7634a88c1427f5de91151b474e02afecbbd9
/PETstFriends/src/dao/FreeBoardDao.java
645b23600736014e1685977e388cd1c143d05f79
[]
no_license
yoosohyun/PETstFriendss
9d015792c96289c033c2ccf5c1f17e5b4237d524
1dea833454f77a42d870c506a9874bcf7e14a299
refs/heads/master
2020-03-26T20:49:02.167551
2018-08-08T08:34:44
2018-08-08T08:34:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,405
java
package dao; import java.util.HashMap; import java.util.List; import model.FreeBoard; import model.FreeComment; import model.FreeLikes; public interface FreeBoardDao { // public int insertBoard(FreeBoard freeboard); // public int updateBoard(FreeBoard freeBoard); // public int deleteBoard(int FreeBoard_boardname, int FreeBoard_boardno); // public FreeBoard selectOneBoard(int FreeBoard_boardname, int FreeBoard_boardno); // public List<FreeBoard> selectBoardbyId(int FreeBoard_boardname, String FreeBoard_id); // public List<FreeBoard> selectBoardAll(int FreeBoard_boardname); // public int getCount(HashMap<String, Object> params); // // //좋아요 // public boolean insertLikes(FreeLikes FreeLikes); // public boolean deleteLikes(int FreeBoard_boardname,int FreeBoard_boardno); // public FreeBoard selectOneLikes(int FreeBoard_boardname,int FreeBoard_boardno); // public List<FreeBoard> selectAllLikes(int FreeBoard_boardname,String FreeLikes_id); // // //댓글 // public int insertComment(FreeComment freecomment); // public int updateComment(FreeComment freecomment); // public int deleteComment(int FreeBoard_boardname,int FreeBoard_boardno,int FreeComments_commentno); // public List<FreeComment> selectCommentAllofOneWrite(int FreeBoard_boardname, int FreeBoard_boardno); // public List<FreeComment> selectCommentAllofOneboard(int FreeBoard_boardname); }
[ "rhdalflrhd@gmail.com" ]
rhdalflrhd@gmail.com
e8af55e3ee5e7d261d45dabe2bad6fe072dec1b6
dc0e9da7899c810225e10f59b00ee6a6c5377f60
/JdbcUsersEx/src/main/java/com/krootix/utils/FileReader.java
cd1ea0d249819ec6ede4c3f451ac76cf52b80a22
[]
no_license
krootix/JdbcUsersEx
0bc1689096562786b43110727eac72c50306a600
3505991da90ba063c94739a8dc5a1d745309de2c
refs/heads/master
2022-07-17T00:16:07.513060
2020-10-11T14:19:20
2020-10-11T14:19:20
199,877,246
0
0
null
2022-06-21T01:34:25
2019-07-31T14:56:01
Java
UTF-8
Java
false
false
2,235
java
package com.krootix.utils; import com.krootix.Main; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.net.URISyntaxException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Objects; import java.util.Properties; import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.Stream; import static java.util.Objects.requireNonNull; public class FileReader { private static final Logger logger = LoggerFactory.getLogger(FileReader.class); private static final String PATH = "db.properties"; private final PropertiesValidator propertiesValidator; public FileReader(Supplier<PropertiesValidator> propertiesValidator) { this.propertiesValidator = propertiesValidator.get(); } public Properties readProperties() { String rootPath = requireNonNull(Thread.currentThread().getContextClassLoader().getResource("")).getPath(); String defaultConfigPath = rootPath + PATH; final Properties dbProperties = new Properties(); try (final FileInputStream inStream = new FileInputStream(defaultConfigPath)) { dbProperties.load(inStream); boolean isValidated = propertiesValidator.validate(dbProperties); logger.info("validating properties. correct: {}", isValidated); if (!isValidated) throw new IllegalArgumentException("Check the properties file"); } catch (FileNotFoundException e) { logger.error("File {} not found", defaultConfigPath); } catch (IOException e) { logger.error("IOException: {}", e.getMessage()); } return dbProperties; } public String readSQLFile(String fileName) throws URISyntaxException, IOException { Class clazz = Main.class; Path path = Paths.get(Objects.requireNonNull(clazz.getClassLoader() .getResource(fileName)).toURI()); String data; try (Stream<String> lines = Files.lines(path)) { data = lines.collect(Collectors.joining("\n")); } return data; } }
[ "29konstantine@gmail.com" ]
29konstantine@gmail.com
39bb86c27b396ee5093cb14346fa46c683f7e7ce
73f62e55b5963d5a6e7a825ae9d1bcc43801e6a4
/refactoring-to-patterns/src/main/java/com/uj/study/EncapsulateClasseswithFactory/client/DescriptorClient.java
ee5b38632fe37b3096f546c57a82e98b376268bf
[]
no_license
unclejet/design-patterns
e68fa75871b7ec94b1535b5351984c97a3d07415
f3e84145f8b968ea58fb4b5c210fcd9ac19e3498
refs/heads/master
2022-12-28T02:00:01.982248
2020-10-13T23:31:11
2020-10-13T23:31:11
289,127,943
0
0
null
null
null
null
UTF-8
Java
false
false
947
java
package com.uj.study.EncapsulateClasseswithFactory.client; import com.uj.study.EncapsulateClasseswithFactory.descriptors.AttributeDescriptor; import java.util.ArrayList; import java.util.List; /** * @author :unclejet * @date :Created in 2020/9/8 上午6:52 * @description: * @modified By: * @version: */ public class DescriptorClient { protected List createAttributeDescriptors() { List result = new ArrayList(); result.add(AttributeDescriptor.forInteger("remoteId", getClass())); result.add(AttributeDescriptor.forDate("createdDate", getClass())); result.add(AttributeDescriptor.forDate("lastChangedDate", getClass())); result.add(AttributeDescriptor.forInteger("optimisticLockVersion", getClass())); result.add(AttributeDescriptor.forUser("createdBy", getClass())); result.add(AttributeDescriptor.forUser("lastChangedBy", getClass())); return result; } }
[ "unclejet@126.com" ]
unclejet@126.com
2d4b133d9e6a9aad38079c1a682a2d1a96c6e85d
d55d17769a21ed3d0bfc41c4eaa8f60711144621
/java-advanced/src/main/java/advanced/oop/abstraction/Shape.java
75c70b8ff426ca0222c77d790e0de15711b5bf4f
[]
no_license
rogers1235/new-project
fc42ca0f85c1a606a4196624088230338ddba496
b9df64b6f9e2924211fe70b80c8ab923624ec817
refs/heads/main
2023-08-04T08:28:18.018401
2021-09-16T20:22:38
2021-09-16T20:22:38
407,303,470
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
package advanced.oop.abstraction; public abstract class Shape { String color; // abstract class can have constructor public Shape(String color) { System.out.println("Shape constructor called"); this.color = color; } // abstract methods abstract double area(); public abstract String toString(); // concrete method public String getColor() { return color; } }
[ "craiova_2006@yahoo.it" ]
craiova_2006@yahoo.it
4bc1e31f50226bb66c0bd5f21253d49cd00fdbbe
9f7482d5b674469f2da45698f1c029bf0c01b629
/SN_parent_0.1.0_BR/sn_admin/src/main/java/cn/kanmars/sn/logic/OperationLogLogic.java
53a7881dd2de08727836b918176060a61839530d
[]
no_license
kanmars/springcloud_001
3b64501d3818b170b5b52a75b44da054b84c5f80
d77426897a4ce49d7ee98d81380ec12f16954899
refs/heads/master
2020-06-14T00:35:36.554824
2017-01-12T17:09:35
2017-01-12T17:09:35
75,539,574
1
2
null
null
null
null
UTF-8
Java
false
false
845
java
/** * SN Generator */ package cn.kanmars.sn.logic; import java.util.HashMap; import cn.kanmars.sn.entity.TblOperationLog; /** * 操作日志表 * tbl_operation_log */ public interface OperationLogLogic { /* * 查询信息 */ public TblOperationLog queryOperationLog(TblOperationLog tblOperationLog) throws Exception; /* * 新增信息 */ public Integer insertOperationLog(TblOperationLog tblOperationLog) throws Exception; /* * 修改信息 */ public Integer updateOperationLog(TblOperationLog tblOperationLog) throws Exception; /* * 删除信息 */ public Integer deleteOperationLog(TblOperationLog tblOperationLog) throws Exception; /* * 查询信息queryPage */ public HashMap queryPageOperationLog(HashMap paramMap) throws Exception; }
[ "x_wsb@aliyun.com" ]
x_wsb@aliyun.com
3b1184c6e43d84eafe0fe798e9d3dae6ec9867c4
d1225b59694d00a5075c209a8a4a07adb176ea0f
/server/src/main/java/io/kroki/server/service/Vega.java
fe04552d29524f3719d9257e7c737b32d438b7f8
[]
no_license
ka1bi4/kroki
ad7add8a97ec43b094122855bb0171713c5e1e3e
f9fd9097f484066f60ff23270d27808d1d9b2f0a
refs/heads/master
2021-01-26T15:06:27.824377
2020-02-25T17:39:04
2020-02-25T17:39:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,077
java
package io.kroki.server.service; import io.kroki.server.action.Commander; import io.kroki.server.decode.DiagramSource; import io.kroki.server.decode.SourceDecoder; import io.kroki.server.error.DecodeException; import io.kroki.server.format.FileFormat; import io.kroki.server.response.Caching; import io.kroki.server.response.DiagramResponse; import io.kroki.server.security.SafeMode; import io.vertx.core.Vertx; import io.vertx.core.http.HttpServerResponse; import io.vertx.core.json.JsonObject; import io.vertx.ext.web.RoutingContext; import java.io.IOException; import java.util.Arrays; import java.util.List; public class Vega implements DiagramService { private static final List<FileFormat> SUPPORTED_FORMATS = Arrays.asList(FileFormat.SVG, FileFormat.PNG, FileFormat.PDF); private final Vertx vertx; private final String binPath; private final SourceDecoder sourceDecoder; private final DiagramResponse diagramResponse; private final SafeMode safeMode; private final Commander commander; private final SpecFormat specFormat; public Vega(Vertx vertx, JsonObject config, SpecFormat specFormat, Commander commander) { this.vertx = vertx; this.binPath = config.getString("KROKI_VEGA_BIN_PATH", "vega"); this.sourceDecoder = new SourceDecoder() { @Override public String decode(String encoded) throws DecodeException { return DiagramSource.decode(encoded); } }; if (specFormat == SpecFormat.DEFAULT) { this.diagramResponse = new DiagramResponse(new Caching("5.9.1")); } else { this.diagramResponse = new DiagramResponse(new Caching("4.4.0")); // Vega Lite } this.safeMode = SafeMode.get(config.getString("KROKI_SAFE_MODE", "secure"), SafeMode.SECURE); this.commander = commander; this.specFormat = specFormat; } @Override public List<FileFormat> getSupportedFormats() { return SUPPORTED_FORMATS; } @Override public SourceDecoder getSourceDecoder() { return sourceDecoder; } @Override public void convert(RoutingContext routingContext, String sourceDecoded, String serviceName, FileFormat fileFormat) { HttpServerResponse response = routingContext.response(); vertx.executeBlocking(future -> { try { byte[] result = vega(sourceDecoded.getBytes(), fileFormat.getName()); future.complete(result); } catch (IOException | InterruptedException | IllegalStateException e) { future.fail(e); } }, res -> { if (res.failed()) { routingContext.fail(res.cause()); return; } byte[] result = (byte[]) res.result(); diagramResponse.end(response, sourceDecoded, fileFormat, result); }); } private byte[] vega(byte[] source, String format) throws IOException, InterruptedException, IllegalStateException { return commander.execute(source, binPath, "--output-format=" + format, "--safe-mode=" + safeMode.name().toLowerCase(), "--spec-format=" + specFormat.name().toLowerCase()); } public enum SpecFormat { DEFAULT, LITE; } }
[ "ggrossetie@gmail.com" ]
ggrossetie@gmail.com
ee86a2feca8fe41446177ad7754440cd065bbdea
6645dfe5591352eabdc143ccd7c11e7047bc28e7
/com/infinitecoder/sink/command/PluginCommand.java
92ceab645004faba4c9a5945e13de67bc00c9818
[]
no_license
infinitec0der/Sink-MC
945f30c5e7637775efd4036e607e9db560bac8d1
e870205b09822452930cc09af05356da4183816b
refs/heads/master
2020-04-05T15:29:51.047780
2014-09-06T22:56:14
2014-09-06T22:56:14
23,640,744
1
2
null
null
null
null
UTF-8
Java
false
false
1,275
java
package com.infinitecoder.sink.command; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.util.ChatComponentText; import com.infinitecoder.sink.Sink; import com.infinitecoder.sink.entity.Player; import com.infinitecoder.sink.util.ChatColor; public class PluginCommand extends CommandBase { private Command command; public PluginCommand(Command command) { this.command = command; } public String getCommandName() { return command.getName(); } public String getCommandUsage(ICommandSender commandSender) { return "/" + command.getName(); } public void processCommand(ICommandSender commandSender, String[] args) { EntityPlayerMP entityPlayer = args.length == 0 ? getCommandSenderAsPlayer(commandSender) : getPlayer(commandSender, args[0]); Player player = Sink.getServer().getPlayer(entityPlayer); if(!command.processCommand(player, args)) { player.sendMessage(new ChatComponentText(ChatColor.RED + "Unknown command. Type /help for a list of commands.")); } } public boolean isUsernameIndex(String[] p_82358_1_, int p_82358_2_) { return false; } }
[ "kitake.akuma@Stanley-PC" ]
kitake.akuma@Stanley-PC
9637981c894bfa59198734bbfd17764dce37262e
00729cca9eafd71221b7d08fa65e51ec8b88920a
/src/main/java/com/cqyc/spec/social/qq/connet/QQServiceProvider.java
130595bfd32ad7ec72c2f459766be43b714db553
[]
no_license
superychen/springsocial_qq
ea6f902d5e8b1f56417589257ba097218cc3cf1e
e4f1f62a3a15babcfe7601730178a342ef1b7042
refs/heads/master
2022-06-20T20:20:36.388793
2019-07-21T04:20:02
2019-07-21T04:20:02
195,348,730
1
0
null
2022-06-17T02:17:01
2019-07-05T06:08:44
Java
UTF-8
Java
false
false
1,111
java
package com.cqyc.spec.social.qq.connet; import com.cqyc.spec.social.qq.api.QQ; import com.cqyc.spec.social.qq.api.QQImpl; import org.springframework.social.oauth2.AbstractOAuth2ServiceProvider; /** * @Description: * @Author: * @Date: */ public class QQServiceProvider extends AbstractOAuth2ServiceProvider<QQ> { private String appId; private static final String URL_AUTHORIZE = "https://graph.qq.com/oauth2.0/authorize"; private static final String URL_ACCESS_TOKEN = "https://graph.qq.com/oauth2.0/token"; public QQServiceProvider(String appId,String appSecret) { //下面的四个参数分别表示,1,2两个表示用户在QQ互联中获取的appId以及appSecret, // 第三个参数对应的是spring social流程的第一步将用户导向认证服务器,第四个表示认证服务器申请令牌 super(new QQAuth2Template(appId,appSecret,URL_AUTHORIZE,URL_ACCESS_TOKEN)); this.appId = appId; } @Override public QQ getApi(String accessToken) { return new QQImpl(accessToken,appId); } }
[ "825467364@qq.com" ]
825467364@qq.com
4895d4a757cb309f54252e4d9cdbd04a87fa0e55
13f07e64e08e4babc4b8c46561dd9d30e71f508c
/app/src/main/java/com/example/lnmlaundry/dryClean.java
048546b66db041329968da2c525fda1028382cfc
[]
no_license
bhavyashah1226/LNMlaundry
6f8f87a809d0de17d91f8d78ae27498797f72346
756af379df1b55f242de3329ccae1d0d444d14d5
refs/heads/master
2022-04-11T13:32:18.351467
2020-04-08T20:47:39
2020-04-08T20:47:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,358
java
package com.example.lnmlaundry; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.DefaultItemAnimator; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import java.util.ArrayList; public class dryClean extends Fragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View FragView = inflater.inflate(R.layout.activity_dry_clean, container, false); ArrayList<String> items = new ArrayList<String>(); items.add("Shirt"); items.add("T-Shirt"); items.add("Jeans"); items.add("Trousers"); items.add("Lower"); items.add("Shorts"); items.add("Towel"); items.add("Bed sheets"); items.add("Pillow cover"); items.add("Top"); items.add("Jacket"); items.add("Sweater"); items.add("Hoodie"); items.add("Socks"); items.add("Thermals"); items.add("Handkerchief"); items.add("Face Towel"); items.add("Kurta"); items.add("Pajama"); ArrayList<orderType> orderTypes = new ArrayList<orderType>(); for (int i=0; i<items.size(); i++){ orderTypes.add(new orderType(items.get(i), 0)); } RecyclerView.Adapter adapter = new clothCatAdapter(orderTypes); RecyclerView recyclerView = (RecyclerView)FragView.findViewById(R.id.dcRecycler); RecyclerView.LayoutManager layoutManager = new GridLayoutManager(getActivity(),2); recyclerView.setLayoutManager(layoutManager); recyclerView.setItemAnimator(new DefaultItemAnimator()); recyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER); recyclerView.setAdapter(adapter); return FragView; } @Override public void onSaveInstanceState(@NonNull Bundle outState) { super.onSaveInstanceState(outState); } }
[ "kinarsharma@gmail.com" ]
kinarsharma@gmail.com
9115c734d45d49f3a6928f52bc481119f1ca6908
99a4686bac1fe80a584928bb9487b1c27d5d1a3a
/PhoneDirectorySystem/src/main/java/com/darius/phonesystem/PhoneDAO.java
93d04a2a99bf1b88eb94202276080937747f75a4
[]
no_license
dsakhapo/Phone-Pages
a24f21e35850cd820d244bfd393d9cc85306b3f8
ea325eca2fbe6dff2619f7aef25be89e7140bb5c
refs/heads/master
2021-01-18T00:32:35.411944
2017-02-02T00:40:01
2017-02-02T00:40:01
68,651,420
0
0
null
null
null
null
UTF-8
Java
false
false
3,705
java
package com.darius.phonesystem; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import java.util.ArrayList; import java.util.List; /** * Created by bicboi on 9/6/16. */ public class PhoneDAO { public void addEntry(PhoneEntryBean phoneEntryBean){ SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); Session session = sessionFactory.openSession(); session.beginTransaction(); addEntry(session, phoneEntryBean); session.getTransaction().commit(); session.close(); } private void addEntry(Session session, PhoneEntryBean phoneEntryBean){ PhoneEntry phoneEntry = new PhoneEntry(); phoneEntry.setName(phoneEntryBean.getName()); phoneEntry.setAddress(phoneEntryBean.getAddress()); phoneEntry.setPhoneNumber(phoneEntryBean.getPhoneNumber()); session.save(phoneEntry); } public void deleteEntry(PhoneEntryBean phoneEntryBean) { SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); Session session = sessionFactory.openSession(); session.beginTransaction(); deleteEntry(session, phoneEntryBean); session.getTransaction().commit(); session.close(); } private void deleteEntry(Session session, PhoneEntryBean phoneEntryBean){ try { PhoneEntry phoneEntry = new PhoneEntry(); phoneEntry.setName(phoneEntryBean.getName()); phoneEntry.setAddress(phoneEntryBean.getAddress()); phoneEntry.setPhoneNumber(phoneEntryBean.getPhoneNumber()); session.delete(phoneEntry); }catch(Exception ex) { ex.printStackTrace(); //TODO will throw a proper exception here later. } } public void updateEntry(PhoneEntryBean phoneEntryBean){ SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); Session session = sessionFactory.openSession(); session.beginTransaction(); updateEntry(session, phoneEntryBean); session.getTransaction().commit(); session.close(); } private void updateEntry(Session session, PhoneEntryBean phoneEntryBean){ try{ PhoneEntry phoneEntry = new PhoneEntry(); phoneEntry.setName(phoneEntryBean.getName()); phoneEntry.setAddress(phoneEntryBean.getAddress()); phoneEntry.setPhoneNumber(phoneEntryBean.getPhoneNumber()); session.update(phoneEntry); }catch(Exception ex){ ex.printStackTrace(); } } public PhoneEntryBean getByPhoneNumber(String phoneNumber) { SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); Session session = sessionFactory.openSession(); PhoneEntry phoneEntry = session.get(PhoneEntry.class, phoneNumber); PhoneEntryBean result = phoneEntry.toPhoneEntryBean(phoneEntry); session.close(); return result; } public List<PhoneEntryBean> getPhoneDirectory(){ SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); Session session = sessionFactory.openSession(); Query query = session.createQuery("from com.darius.phonesystem.PhoneEntry"); List<PhoneEntry> entries = query.list(); List<PhoneEntryBean> phoneDirectory = new ArrayList<PhoneEntryBean>(); for (PhoneEntry entry : entries) phoneDirectory.add(entry.toPhoneEntryBean(entry)); return phoneDirectory; } }
[ "dsakhapo@gmail.com" ]
dsakhapo@gmail.com
96368ce13a1a4bc9b17677fec0d94a698592d41c
b47a619f6ccd0f76ccce989e62d0c963a1c14ab4
/Java/Snakes and Ladders.java
e859a14842c1c3219452cb94900e688fb30e5037
[]
no_license
GreatTwang/lccc_solution
0799d19097549ef3c9beeebf6dc9960db9f9eb54
e75899634f45b0d60f8b3cb854ab9e503d676a57
refs/heads/master
2020-07-07T02:45:18.984502
2019-10-09T04:53:35
2019-10-09T04:53:35
203,219,848
1
0
null
null
null
null
UTF-8
Java
false
false
801
java
class Solution { public int snakesAndLadders(int[][] board) { int N = board.length; Map<Integer, Integer> dist = new HashMap(); dist.put(1, 0); Queue<Integer> queue = new LinkedList(); queue.add(1); while (!queue.isEmpty()) { int s = queue.remove(); if (s == N*N) return dist.get(s); for (int s2 = s+1; s2 <= Math.min(s+6, N*N); ++s2) { int rc = get(s2, N); int r = rc / N, c = rc % N; int s2Final = board[r][c] == -1 ? s2 : board[r][c]; if (!dist.containsKey(s2Final)) { dist.put(s2Final, dist.get(s) + 1); queue.add(s2Final); } } } return -1; }
[ "tianwang@bu.edu" ]
tianwang@bu.edu
0c5cce6f315b6256841705e168119ac884fa8117
8d1898288e30f522f546f004177473c38f1973d0
/src/main/java/challenge/jpa/entities/Subscription.java
977fd8c6f5e6a085e1f7cefc0272ccfe93b785f9
[]
no_license
fcgarbajosa/adidas-challenge
d7d886f972ba93fd3e97a7be14cd4587157014e7
1c87973890708410f4ca5252971a695035ab1932
refs/heads/master
2022-12-19T23:27:55.951777
2020-10-16T17:46:44
2020-10-16T17:46:44
304,697,880
0
0
null
null
null
null
UTF-8
Java
false
false
1,564
java
package challenge.jpa.entities; import javax.persistence.*; /** * The persistent class for the subscription database table. */ @Entity @Table(name = "SUBSCRIPTION") public class Subscription { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String email; private String firstName; private String gender; private String dateOfBirth; private String flagOfConsent; private Long idCampaign; public Subscription() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getGender() { return gender; } public void setGender(String gender) { this.gender = gender; } public String getDateOfBirth() { return dateOfBirth; } public void setDateOfBirth(String dateOfBirth) { this.dateOfBirth = dateOfBirth; } public String getFlagOfConsent() { return flagOfConsent; } public void setFlagOfConsent(String flagOfConsent) { this.flagOfConsent = flagOfConsent; } public Long getIdCampaign() { return idCampaign; } public void setIdCampaign(Long idCampaign) { this.idCampaign = idCampaign; } }
[ "fidel.garbajosa@gmail.com" ]
fidel.garbajosa@gmail.com
20aaf8c5953d09a0e497038498b19277d5d7b8d9
b4d6067818720f29544075d8019fa456fa9a27bb
/src/test/java/com/sam/myapp/web/rest/errors/ExceptionTranslatorIT.java
4669fa7d8a0f01f1946e3b224cc14c8f139fff7d
[]
no_license
OsaeJr/Tinymce-demo-app
e8e5a1302184c2c557ae7608619a67ea707f1bd9
0b80b8f89f39dca3939b5e96ae04c2944c34a9ae
refs/heads/main
2023-07-13T00:14:48.439668
2021-08-23T12:16:16
2021-08-23T12:16:16
397,937,737
0
0
null
null
null
null
UTF-8
Java
false
false
5,316
java
package com.sam.myapp.web.rest.errors; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.sam.myapp.IntegrationTest; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.web.servlet.MockMvc; /** * Integration tests {@link ExceptionTranslator} controller advice. */ @WithMockUser @AutoConfigureMockMvc @IntegrationTest class ExceptionTranslatorIT { @Autowired private MockMvc mockMvc; @Test void testConcurrencyFailure() throws Exception { mockMvc .perform(get("/api/exception-translator-test/concurrency-failure")) .andExpect(status().isConflict()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_CONCURRENCY_FAILURE)); } @Test void testMethodArgumentNotValid() throws Exception { mockMvc .perform(post("/api/exception-translator-test/method-argument").content("{}").contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_VALIDATION)) .andExpect(jsonPath("$.fieldErrors.[0].objectName").value("test")) .andExpect(jsonPath("$.fieldErrors.[0].field").value("test")) .andExpect(jsonPath("$.fieldErrors.[0].message").value("must not be null")); } @Test void testMissingServletRequestPartException() throws Exception { mockMvc .perform(get("/api/exception-translator-test/missing-servlet-request-part")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.400")); } @Test void testMissingServletRequestParameterException() throws Exception { mockMvc .perform(get("/api/exception-translator-test/missing-servlet-request-parameter")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.400")); } @Test void testAccessDenied() throws Exception { mockMvc .perform(get("/api/exception-translator-test/access-denied")) .andExpect(status().isForbidden()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.403")) .andExpect(jsonPath("$.detail").value("test access denied!")); } @Test void testUnauthorized() throws Exception { mockMvc .perform(get("/api/exception-translator-test/unauthorized")) .andExpect(status().isUnauthorized()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.401")) .andExpect(jsonPath("$.path").value("/api/exception-translator-test/unauthorized")) .andExpect(jsonPath("$.detail").value("test authentication failed!")); } @Test void testMethodNotSupported() throws Exception { mockMvc .perform(post("/api/exception-translator-test/access-denied")) .andExpect(status().isMethodNotAllowed()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.405")) .andExpect(jsonPath("$.detail").value("Request method 'POST' not supported")); } @Test void testExceptionWithResponseStatus() throws Exception { mockMvc .perform(get("/api/exception-translator-test/response-status")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.400")) .andExpect(jsonPath("$.title").value("test response status")); } @Test void testInternalServerError() throws Exception { mockMvc .perform(get("/api/exception-translator-test/internal-server-error")) .andExpect(status().isInternalServerError()) .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) .andExpect(jsonPath("$.message").value("error.http.500")) .andExpect(jsonPath("$.title").value("Internal Server Error")); } }
[ "samueladjar11@gmail.com" ]
samueladjar11@gmail.com
13cd63fb1a344a20beb695be040c21fc78d0a716
fe97075de69631e4a70fb52088d43c7abd5770d8
/src/ContainTester.java
0ff76c88c28ab0f9aa19ccf11e65e8162001bf22
[]
no_license
mgdabrowska/study
13f1c2958740ff83fdd42c5f338e0790d43f3260
d8d7e270f398841f1eb1e86069e04425aa0f9727
refs/heads/master
2021-01-23T19:14:31.660750
2016-03-17T10:21:04
2016-03-17T10:21:04
34,016,925
0
1
null
null
null
null
UTF-8
Java
false
false
597
java
import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class ContainTester extends AbstractTest implements Tester { public ContainTester(){ super("-contain"); } @Override public boolean test(File f) { if (parameterName == null) return true; try { Scanner scanner = new Scanner(f); while (scanner.hasNext()) { if (scanner.nextLine().contains(parameterValue)) { return true; } } } catch (FileNotFoundException fnfe) { System.err.println("nie znaleziono pliku " + f); } return false; } }
[ "m.dabrowska@TOSHIBA-MD.bluenet.pl" ]
m.dabrowska@TOSHIBA-MD.bluenet.pl
e0ed1d6a6a433259e7aef0c1c824c04d039c8406
e164ac67a9b4f70a18551272c287a00a1bd2c3fe
/src/main/java/com/ahhf/chen/distask/util/IPUtil.java
cc6bc5fc7874c858bd6a6869f7f2b7945606ef54
[]
no_license
519986208/chen
c1aed8df9a445801b16d597cfb8fd61eaf3c7167
46a7c555358d5b690d1db50a7c49139d9157a9df
refs/heads/master
2022-12-10T13:56:38.603986
2022-09-03T11:02:20
2022-09-03T11:02:20
156,506,458
0
0
null
2022-12-06T00:41:59
2018-11-07T07:24:10
Java
UTF-8
Java
false
false
2,613
java
package com.ahhf.chen.distask.util; import java.net.Inet6Address; import java.net.InetAddress; import java.net.NetworkInterface; import java.util.Enumeration; import org.apache.commons.lang3.StringUtils; public class IPUtil { /** * 单网卡名称 */ private static final String NETWORK_CARD = "eth0"; /** * 绑定网卡名称 */ private static final String NETWORK_CARD_BAND = "bond0"; /** * Description: 得到本机名<br> */ public static String getLocalHostName() { String localHostName = null; try { InetAddress addr = InetAddress.getLocalHost(); localHostName = addr.getHostName(); } catch (Exception e) { e.printStackTrace(); } return localHostName; } /** * Description: linux下获得本机IPv4 IP<br> */ public static String getLinuxLocalIP() { String ip = ""; try { Enumeration<NetworkInterface> e1 = (Enumeration<NetworkInterface>) NetworkInterface.getNetworkInterfaces(); while (e1.hasMoreElements()) { NetworkInterface ni = e1.nextElement(); //单网卡或者绑定双网卡 if ((NETWORK_CARD.equals(ni.getName())) || (NETWORK_CARD_BAND.equals(ni.getName()))) { Enumeration<InetAddress> e2 = ni.getInetAddresses(); while (e2.hasMoreElements()) { InetAddress ia = e2.nextElement(); if (ia instanceof Inet6Address) { continue; } ip = ia.getHostAddress(); } break; } else { continue; } } } catch (Exception e) { e.printStackTrace(); } return ip; } public static String getWinLocalIP() { String ip = null; try { ip = InetAddress.getLocalHost().getHostAddress().toString(); } catch (Exception ex) { ex.printStackTrace(); } return ip; } public static String getLocalIP() { String ip = System.getenv("HOST_IP"); if (StringUtils.isBlank(ip)) { if (!System.getProperty("os.name").contains("Win")) { ip = getLinuxLocalIP(); } else { ip = getWinLocalIP(); } } return ip; } }
[ "chengliyao@chengliyao.zaonline.com" ]
chengliyao@chengliyao.zaonline.com
f4d4982137ea4e2b60495ef7328074e9c66fda47
06dc2feec0143337fd403cc5c9b96461a0862223
/src/main/java/creational/factoryMethod/buttons/HtmlButton.java
eb248fe83663a82e9b9d4b8a3a505942c6b8ffeb
[]
no_license
IlliaDerhun/design_patterns
edd6b8a7c4fb4f884a18d27b8e1f6c0b3f20b904
963d71ffa08d6a548c9e9b0cc2d634056262651c
refs/heads/master
2020-07-29T21:28:44.068334
2019-09-25T15:51:42
2019-09-25T15:54:33
209,968,435
1
0
null
2019-09-25T15:54:34
2019-09-21T10:47:43
Java
UTF-8
Java
false
false
301
java
package creational.factoryMethod.buttons; /** * HTML button implementation */ public class HtmlButton implements Button { public void render() { System.out.println("Render HTML button"); } public void onClick() { System.out.print("You clicked on HTML button"); } }
[ "31287518+IlliaDerhun@users.noreply.github.com" ]
31287518+IlliaDerhun@users.noreply.github.com
b76506f59a6f2f48436e66d02268e4b74e5799bb
686e64782718f52d711506511512d8f7fc3d0d84
/src/main/java/com/sujie/modules/sys/service/impl/SysUserServiceImpl.java
c182ec950f84cccf4d5b9177f5d32e073dbdb7e5
[]
no_license
zhengshixuan/sujie
d0a8365c00aae2d277475d7c1608514e1414c286
7906cd0c0b568f74b80be12307752db6246d69a5
refs/heads/master
2022-07-24T18:03:26.333846
2019-10-07T15:01:07
2019-10-07T15:01:07
202,319,170
0
0
null
2022-07-06T20:41:05
2019-08-14T09:30:36
JavaScript
UTF-8
Java
false
false
3,410
java
package com.sujie.modules.sys.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.sujie.common.annotation.DataFilter; import com.sujie.common.shiro.ShiroUtils; import com.sujie.common.utils.Constant; import com.sujie.common.utils.PageUtils; import com.sujie.common.utils.Query; import com.sujie.modules.sys.dao.SysUserDao; import com.sujie.modules.sys.entity.SysDeptEntity; import com.sujie.modules.sys.entity.SysUserEntity; import com.sujie.modules.sys.service.SysDeptService; import com.sujie.modules.sys.service.SysUserRoleService; import com.sujie.modules.sys.service.SysUserService; import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.List; import java.util.Map; /** * 系统用户 * */ @Service("sysUserService") public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> implements SysUserService { @Autowired private SysUserRoleService sysUserRoleService; @Autowired private SysDeptService sysDeptService; @Override public List<Long> queryAllMenuId(Long userId) { return baseMapper.queryAllMenuId(userId); } @Override @DataFilter(subDept = true, user = false) public PageUtils queryPage(Map<String, Object> params) { String username = (String)params.get("username"); IPage<SysUserEntity> page = this.page( new Query<SysUserEntity>().getPage(params), new QueryWrapper<SysUserEntity>() .like(StringUtils.isNotBlank(username),"username", username) .apply(params.get(Constant.SQL_FILTER) != null, (String)params.get(Constant.SQL_FILTER)) ); for(SysUserEntity sysUserEntity : page.getRecords()){ SysDeptEntity sysDeptEntity = sysDeptService.getById(sysUserEntity.getDeptId()); sysUserEntity.setDeptName(sysDeptEntity.getName()); } return new PageUtils(page); } @Override @Transactional(rollbackFor = Exception.class) public void saveUser(SysUserEntity user) { user.setCreateTime(new Date()); //sha256加密 String salt = RandomStringUtils.randomAlphanumeric(20); user.setSalt(salt); user.setPassword(ShiroUtils.sha256(user.getPassword(), user.getSalt())); this.save(user); //保存用户与角色关系 sysUserRoleService.saveOrUpdate(user.getUserId(), user.getRoleIdList()); } @Override @Transactional(rollbackFor = Exception.class) public void update(SysUserEntity user) { if(StringUtils.isBlank(user.getPassword())){ user.setPassword(null); }else{ SysUserEntity userEntity = this.getById(user.getUserId()); user.setPassword(ShiroUtils.sha256(user.getPassword(), userEntity.getSalt())); } this.updateById(user); //保存用户与角色关系 sysUserRoleService.saveOrUpdate(user.getUserId(), user.getRoleIdList()); } @Override public boolean updatePassword(Long userId, String password, String newPassword) { SysUserEntity userEntity = new SysUserEntity(); userEntity.setPassword(newPassword); return this.update(userEntity, new QueryWrapper<SysUserEntity>().eq("user_id", userId).eq("password", password)); } }
[ "zhengsx@126.com" ]
zhengsx@126.com
acf17e904192fe4f7d6007d03a948ca68a9c5691
22a1ea469feb685feb86826fc9a2ddc39bbad853
/motion_cleaner/DuplicateCleaning.java
6a54f832c204769bab034ce719114905b80b4bdc
[]
no_license
cholewa1992/SBDM-project-3
06734afe7294209a0f65aaab7c45fd1cf524b7b7
62fcda2814b627b593ec491bbc0074247fb98fcf
refs/heads/master
2021-01-10T13:40:46.041294
2015-11-29T13:58:46
2015-11-29T13:58:46
47,065,109
0
0
null
null
null
null
UTF-8
Java
false
false
2,265
java
import java.io.IOException; import java.io.DataInput; import java.io.DataOutput; import java.util.StringTokenizer; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.io.RawComparator; import org.apache.hadoop.io.WritableComparator; import org.apache.hadoop.io.WritableComparable; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.Partitioner; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; public class DuplicateCleaning{ public static class DuplicateMapper extends Mapper<Object, Text, Text, NullWritable>{ public void map(Object key, Text value, Context context) throws IOException, InterruptedException { context.write(value,NullWritable.get()); } } public static class DuplicateReducer extends Reducer<Text,NullWritable,Text,NullWritable> { public void reduce(Text key, Iterable<NullWritable> values, Context context) throws IOException, InterruptedException { context.write(key, NullWritable.get()); } } public static void main(String[] args) throws Exception { Configuration conf = new Configuration(); Job job = Job.getInstance(conf, "Motion data cleaning"); job.setJarByClass(DuplicateCleaning.class); job.setMapperClass(DuplicateMapper.class); job.setReducerClass(DuplicateReducer.class); job.setCombinerClass(DuplicateReducer.class); job.setMapOutputKeyClass(Text.class); job.setMapOutputValueClass(NullWritable.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(NullWritable.class); FileInputFormat.addInputPaths(job, "input/motion"); FileOutputFormat.setOutputPath(job, new Path("input/motion_clean")); System.exit(job.waitForCompletion(true) ? 0 : 1); } }
[ "jbec@itu.dk" ]
jbec@itu.dk
b9d3dbf7c072c8a6752b89281e3d4e031b84e385
dc4e04105bc64f1c1300e00d9178883d3b44abfa
/src/main/java/khirtech/coronadz/demo/infection/GeoLocation.java
3a584874438f54da91ad403d736800732cf0a577
[]
no_license
benomase/dz-corona-backend
2b9709bb51cdef1a895f2eb7faf6c7aa3038db67
21de2b1e9d3e54163e73387bd2797c953db3bda2
refs/heads/master
2022-06-14T20:25:30.515010
2020-03-19T18:50:02
2020-03-19T18:50:02
247,468,492
3
1
null
2022-05-25T23:23:11
2020-03-15T13:09:10
Java
UTF-8
Java
false
false
211
java
package khirtech.coronadz.demo.infection; import lombok.Data; @Data public class GeoLocation { private int wilayaID; private int communeID; private Double latitude; private Double longitude; }
[ "alitarfa123@gmail.com" ]
alitarfa123@gmail.com
3136c6415227604dddd651ec9efc19d569e17744
7a6d80492fde9d2d5fb663b8df6e5a466e0fac09
/src/main/java/com/example/springboot/toools/Page.java
53a3477b3d678cf11ff30ce1b4f3da1e302c18e9
[]
no_license
jiazhibinjava/springboot
7c8109a30d02dcd18b8e9275461fcef76e8791a5
b4103e3f1ac174911e3fed6c75c0e5ea2e2a1ef0
refs/heads/master
2020-04-15T05:25:28.337916
2019-01-13T09:07:05
2019-01-13T09:07:05
164,421,520
0
0
null
null
null
null
UTF-8
Java
false
false
3,880
java
package com.example.springboot.toools; import org.springframework.jdbc.core.JdbcTemplate; import java.util.List; import java.util.Map; public class Page { //一页显示的记录数 private int numPerPage; //记录总数 private int totalRows; //总页数 private int totalPages; //当前页码 private int currentPage; //起始行数 private int startIndex; //结束行数 private int lastIndex; //结果集存放List private List<Map<String,Object>> resultList; /** * 分页构造函数 * @param sql 包含筛选条件的sql,但不包含分页相关约束,如mysql的list * @param currentPage 当前页 * @param numPerPage 每页记录数 * @param jdbcTemplate jdbcTemplate实例 */ public Page(String sql,int currentPage,int numPerPage,JdbcTemplate jdbcTemplate){ if(jdbcTemplate == null){ throw new IllegalArgumentException("Page.jdbcTemplate is null"); }else if(sql == null || sql.equals("")){ throw new IllegalArgumentException("Page.sql is empty"); } //设置每页显示记录数 setNumPerPage(numPerPage); //设置要显示的页数 setCurrentPage(currentPage); //计算总记录数 StringBuffer totalSQL = new StringBuffer(" SELECT count(*) FROM ( "); totalSQL.append(sql); totalSQL.append(" ) totalTable "); //总记录数 setTotalRows(jdbcTemplate.queryForObject(totalSQL.toString(),Integer.class)); //计算总页数 setTotalPages(); //计算起始行数 setStartIndex(); //计算结束行数 setLastIndex(); System.out.println("lastIndex="+lastIndex); //使用mysql时直接使用limits StringBuffer paginationSQL = new StringBuffer(); paginationSQL.append(sql); paginationSQL.append(" limit " + startIndex + "," + lastIndex); //装入结果集 setResultList(jdbcTemplate.queryForList(paginationSQL.toString())); } //计算总页数 public void setTotalPages() { if(totalRows % numPerPage == 0){ this.totalPages = totalRows / numPerPage; }else{ this.totalPages = (totalRows / numPerPage) + 1; } } public int getCurrentPage() { return currentPage; } public void setCurrentPage(int currentPage) { this.currentPage = currentPage; } public int getNumPerPage() { return numPerPage; } public void setNumPerPage(int numPerPage) { this.numPerPage = numPerPage; } public List<Map<String, Object>> getResultList() { return resultList; } public void setResultList(List<Map<String, Object>> resultList) { this.resultList = resultList; } public int getTotalPages() { return totalPages; } public int getTotalRows() { return totalRows; } public void setTotalRows(int totalRows) { this.totalRows = totalRows; } public int getStartIndex() { return startIndex; } public void setStartIndex() { this.startIndex = (currentPage - 1) * numPerPage; } public int getLastIndex() { return lastIndex; } //计算结束时候的索引 public void setLastIndex() { System.out.println("totalRows="+totalRows);/////////// System.out.println("numPerPage="+numPerPage);/////////// if( totalRows < numPerPage){ this.lastIndex = totalRows; }else if((totalRows % numPerPage == 0) || (totalRows % numPerPage != 0 && currentPage < totalPages)){ this.lastIndex = currentPage * numPerPage; }else if(totalRows % numPerPage != 0 && currentPage == totalPages){//最后一页 this.lastIndex = totalRows ; } } }
[ "2274694434@qq.com" ]
2274694434@qq.com
822bf64bdcabbcec08e418f02a654dd4e5b6a138
31f63618c7f57253140e333fc21bac2d71bc4000
/saflute/src/main/java/org/dbflute/remoteapi/exception/retry/ClientErrorRetryDeterminer.java
9e0d2768bd6afe621b49275399baad20b2f04072
[ "Apache-2.0" ]
permissive
dbflute-session/memorable-saflute
b6507d3a54dad5e9c67539a9178ff74287c0fe2b
c5c6cfe19c9dd52c429d160264e1c8e30b4d51c5
refs/heads/master
2023-03-07T11:02:15.495590
2023-02-22T13:20:03
2023-02-22T13:20:03
50,719,958
0
1
null
2023-02-22T13:20:05
2016-01-30T10:26:15
Java
UTF-8
Java
false
false
836
java
/* * Copyright 2015-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.dbflute.remoteapi.exception.retry; /** * @author jflute * @since 0.3.4 (2017/09/23 Sutarday) */ public interface ClientErrorRetryDeterminer { boolean ready(ClientErrorRetryResource resource); }
[ "p1us3inus2er0@gmail.com" ]
p1us3inus2er0@gmail.com
b6626e7c9b858afe5455b560e6a77e4aa6a7b895
ea0d4c7a4a4c84bf14419e7987a5dfd700850fc3
/SSMDemo/src/com/model/Travel.java
f39154541bed6002a04114779aea8ec89aeebf3a
[]
no_license
Jerry-WangYouJun/resthome
f8a8edbafdc281c34979154c4c228321c92a96c7
cd64a1c2835cff01ba01e4b87cbaaa1b45d43a3f
refs/heads/master
2021-01-19T23:53:20.150105
2017-04-27T14:34:40
2017-04-27T14:34:40
89,050,757
0
0
null
null
null
null
UTF-8
Java
false
false
1,135
java
package com.model; public class Travel { private Integer id ; private String cname ; private String place ; private String starttime ; private String endtime ; private String companion; private String description ; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getCname() { return cname; } public void setCname(String cname) { this.cname = cname; } public String getPlace() { return place; } public void setPlace(String place) { this.place = place; } public String getStarttime() { return starttime; } public void setStarttime(String starttime) { this.starttime = starttime; } public String getEndtime() { return endtime; } public void setEndtime(String endtime) { this.endtime = endtime; } public String getCompanion() { return companion; } public void setCompanion(String companion) { this.companion = companion; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }
[ "Administrator@PC-201604301005" ]
Administrator@PC-201604301005
3c5dadad88db4dc64b00ae22eaeefb47201827d4
2f17261f7735d5ec8dde685c6cd46a09f38a33e7
/src/com/smartgames/client/GreetingServiceAsync.java
620a80b1ba32e95494ee71ceee3e0aa281eb8c57
[]
no_license
provalentin/durak-card-game
3d7e557e06b797c4fb48f930ffc0a8fe568ac1c8
1430ea0db8260365e7ee2e963b10bdf8a65392ed
refs/heads/master
2016-08-06T01:24:10.932122
2012-06-16T17:20:07
2012-06-16T17:20:07
41,558,565
0
0
null
null
null
null
UTF-8
Java
false
false
294
java
package com.smartgames.client; import com.google.gwt.user.client.rpc.AsyncCallback; /** * The async counterpart of <code>GreetingService</code>. */ public interface GreetingServiceAsync { void greetServer(String input, AsyncCallback<String> callback) throws IllegalArgumentException; }
[ "provalentin@gmail.com" ]
provalentin@gmail.com
1f10a31dd3baaf50fb1e3c37ee2ab0f6c3cfa2a0
7383758b1c20f8ad24f8ae05908ba262e43b0c83
/Java/Cipher/EmptyCollectionException.java
e5fb12498dd39604e423b64947c6d5d7f5fc471a
[]
no_license
PVPN4799/portfolo
7345c5eb80d571352e8981235f007710b28e1fa2
8ab94c4d671442285c01efaa0ad7e9ee6ba18760
refs/heads/master
2020-07-25T13:44:46.070817
2012-10-29T14:19:35
2012-10-29T14:19:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
425
java
/** * EmptyCollectionException represents the situation in which a collection * is empty. * * @author Dr. Lewis * @author Dr. Chase * @version 1.0, 08/12/08 */ public class EmptyCollectionException extends RuntimeException { /** * Sets up this exception with an appropriate message. */ public EmptyCollectionException (String collection) { super ("The " + collection + " is empty."); } }
[ "mdbristol@radford.edu" ]
mdbristol@radford.edu
a2bb64faef917be7bceeabf10a6ca88dcb9969f8
00b045add86f65f8bda300a2f1c2f45442467074
/atcrowdfunding01-admin-parent/atcrowdfunding05-common-util/src/main/java/org/atcrowdfunding05/common/util/App.java
13cffa47da61e5b5215094c5d8a9201662b1d7bc
[]
no_license
Stefan-H-Machine/atcrowdfunding
12571dd1ffecbaaf6c025646549c86f7af0728e9
a3b2bbc6392e9ff91bb130eb0ed344d3dd894033
refs/heads/master
2023-03-16T07:47:34.495862
2021-03-07T15:03:30
2021-03-07T15:03:30
299,305,586
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package org.atcrowdfunding05.common.util; /** * Hello world! * */ public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }
[ "250215145@qq.com" ]
250215145@qq.com
c09e04284f71f3bae40eb10d1bd3c3a4e0742e2b
b6c047b12c62884a23953178c927f3286f759169
/BasicSeekBar/app/src/main/java/sousaitalo/cursoandroid/com/basicseekbar/MainActivity.java
525d95e6549f3edf35f723cf457342d007bdf37a
[]
no_license
SousaItalo/estudoAndroid
bbfb432b62b88bbfdc7141898485f665143b1389
0ca4e43593a4b161b671d5c971419fb1931caf1e
refs/heads/master
2021-01-19T11:28:52.600446
2017-03-02T19:14:03
2017-03-02T19:14:03
82,261,599
0
0
null
null
null
null
UTF-8
Java
false
false
1,917
java
package sousaitalo.cursoandroid.com.basicseekbar; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.ImageView; import android.widget.SeekBar; import android.widget.Toast; public class MainActivity extends AppCompatActivity { private ImageView imagemExibicao; private SeekBar seekBar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); imagemExibicao = (ImageView) findViewById(R.id.imagemExibicaoId); seekBar = (SeekBar) findViewById(R.id.seekBarId); //monitora mudanças na seekBar seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int i, boolean b) { //int i recebe o valor do progresso na seekBar switch (i){ case 1: imagemExibicao.setImageResource(R.drawable.medio); break; case 2: imagemExibicao.setImageResource(R.drawable.muito); break; case 3: imagemExibicao.setImageResource(R.drawable.susto); break; default: imagemExibicao.setImageResource(R.drawable.pouco); } } @Override public void onStartTrackingTouch(SeekBar seekBar) { Toast.makeText(MainActivity.this, "OnStartTrackingTouch", Toast.LENGTH_SHORT).show(); } @Override public void onStopTrackingTouch(SeekBar seekBar) { Toast.makeText(MainActivity.this, "OnStopTrackingTouch", Toast.LENGTH_SHORT).show(); } }); } }
[ "italops94@gmail.com" ]
italops94@gmail.com
990ed5496b763c9c913803e94e1b9e2e59edfff7
b09702bf586b424d8d6012693a4350a8f14ef624
/src/main/java/com/scienceminer/nerd/kb/db/IntLongDatabase.java
c002e4569179fa028d10ba3352aa2f71dc467977
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
kermitt2/entity-fishing
86fe3c3984b43a67b7991301658b04c0b2c92e8d
a6b07b94a766f4b32d238b134754048a4d106e4c
refs/heads/master
2023-08-31T15:38:59.274609
2023-08-25T13:02:20
2023-08-25T13:02:20
61,073,916
191
22
Apache-2.0
2023-03-09T19:23:45
2016-06-13T22:29:16
Java
UTF-8
Java
false
false
2,817
java
package com.scienceminer.nerd.kb.db; import org.apache.hadoop.record.CsvRecordInput; import java.io.*; import com.scienceminer.nerd.utilities.*; import com.scienceminer.nerd.exceptions.NerdResourceException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.fusesource.lmdbjni.*; import static org.fusesource.lmdbjni.Constants.*; public abstract class IntLongDatabase extends KBDatabase<Integer, Long> { private static final Logger logger = LoggerFactory.getLogger(IntLongDatabase.class); public IntLongDatabase(KBEnvironment envi, DatabaseType type) { super(envi, type); } public IntLongDatabase(KBEnvironment envi, DatabaseType type, String name) { super(envi, type, name); } // using standard LMDB copy mode @Override public Long retrieve(Integer key) { byte[] cachedData = null; Long record = null; try (Transaction tx = environment.createReadTransaction()) { cachedData = db.get(tx, KBEnvironment.serialize(key)); if (cachedData != null) { record = (Long)KBEnvironment.deserialize(cachedData); } } catch(Exception e) { logger.error("Cannot retrieve key " + key, e); } return record; } // using LMDB zero copy mode //@Override public Long retrieve2(Integer key) { byte[] cachedData = null; Long record = null; try (Transaction tx = environment.createReadTransaction(); BufferCursor cursor = db.bufferCursor(tx)) { cursor.keyWriteBytes(KBEnvironment.serialize(key)); if (cursor.seekKey()) { record = (Long)KBEnvironment.deserialize(cursor.valBytes()); } } catch(Exception e) { logger.error("cannot retrieve " + key, e); } return record; } public void loadFromFile(File dataFile, boolean overwrite) throws Exception { if (isLoaded && !overwrite) return; if (dataFile == null) throw new NerdResourceException("Resource file not found"); System.out.println("Loading " + name + " database"); BufferedReader input = new BufferedReader(new InputStreamReader(new FileInputStream(dataFile), "UTF-8")); long bytesRead = 0; String line = null; int nbToAdd = 0; Transaction tx = environment.createWriteTransaction(); while ((line=input.readLine()) != null) { if (nbToAdd == 10000) { tx.commit(); tx.close(); nbToAdd = 0; tx = environment.createWriteTransaction(); } bytesRead = bytesRead + line.length() + 1; CsvRecordInput cri = new CsvRecordInput(new ByteArrayInputStream((line + "\n").getBytes("UTF-8"))); KBEntry<Integer,Long> entry = deserialiseCsvRecord(cri); if (entry != null) { try { db.put(tx, KBEnvironment.serialize(entry.getKey()), KBEnvironment.serialize(entry.getValue())); nbToAdd++; } catch(Exception e) { e.printStackTrace(); } } } tx.commit(); tx.close(); input.close(); isLoaded = true; } }
[ "patrice.lopez@science-miner.com" ]
patrice.lopez@science-miner.com
6ed300976ee13be477eb5311dfc9636c39ead6c4
7679415120fa88165ce8ad71a91e83f317f2e45d
/Java/FightClub/src/main/java/com/revature/service/Fight.java
5015c8f717b380a8a92bab6bc48f5a7660b7d060
[ "MIT" ]
permissive
2008PegaUSF/BatchSource
13650a9c5c0f7a9295b6efda90dd39cae1fb0c3a
8b876f3876bd413663b3f720c489879df4610c19
refs/heads/master
2022-12-24T09:01:46.211573
2020-10-08T17:09:16
2020-10-08T17:09:16
290,351,098
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
package com.revature.service; import com.revature.beans.Warrior; import com.revature.util.FileStuff; import com.revature.util.Roster; public class Fight { public void fightTime(Warrior a, Warrior b) { //a is going to hit b int firstAttackPower= a.getAttackPower(); int secondHP= b.getHp(); b.setHp(secondHP-firstAttackPower); FileStuff.writeWarriorFile(Roster.warriorList); } }
[ "jason.knighten@revature.com" ]
jason.knighten@revature.com
d204b171de0fe84d2f67dc7df71e29b015e11bfd
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Math-6/org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer/BBC-F0-opt-20/tests/17/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/PowellOptimizer_ESTest.java
18e890a93e7a58f5f01ad491217c890fb1953465
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
11,312
java
/* * This file was automatically generated by EvoSuite * Thu Oct 21 10:32:59 GMT 2021 */ package org.apache.commons.math3.optim.nonlinear.scalar.noderiv; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.util.NoSuchElementException; import org.apache.commons.math3.exception.MathUnsupportedOperationException; import org.apache.commons.math3.optim.ConvergenceChecker; import org.apache.commons.math3.optim.InitialGuess; import org.apache.commons.math3.optim.OptimizationData; import org.apache.commons.math3.optim.PointValuePair; import org.apache.commons.math3.optim.SimpleBounds; import org.apache.commons.math3.optim.SimplePointChecker; import org.apache.commons.math3.optim.SimpleValueChecker; import org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class PowellOptimizer_ESTest extends PowellOptimizer_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { SimpleValueChecker simpleValueChecker0 = new SimpleValueChecker(1.2599210498948732, 1.2599210498948732); PowellOptimizer powellOptimizer0 = new PowellOptimizer(46.570322769005, 46.570322769005, simpleValueChecker0); assertNull(powellOptimizer0.getGoalType()); } @Test(timeout = 4000) public void test01() throws Throwable { SimpleValueChecker simpleValueChecker0 = new SimpleValueChecker((-662.452), 1840.5); PowellOptimizer powellOptimizer0 = null; try { powellOptimizer0 = new PowellOptimizer(1840.5, (-1.0), simpleValueChecker0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // -1 is smaller than, or equal to, the minimum (0) // verifyException("org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer", e); } } @Test(timeout = 4000) public void test02() throws Throwable { SimplePointChecker<PointValuePair> simplePointChecker0 = new SimplePointChecker<PointValuePair>(456.7231777083904, 456.7231777083904); PowellOptimizer powellOptimizer0 = null; try { powellOptimizer0 = new PowellOptimizer(0.0, 456.7231777083904, simplePointChecker0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // 0 is smaller than the minimum (0) // verifyException("org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer", e); } } @Test(timeout = 4000) public void test03() throws Throwable { SimpleValueChecker simpleValueChecker0 = new SimpleValueChecker(0.75, (-1224.95174)); PowellOptimizer powellOptimizer0 = new PowellOptimizer(128.534712332, 820.942763, 0.75, (-1224.95174), simpleValueChecker0); PowellOptimizer powellOptimizer1 = null; try { powellOptimizer1 = new PowellOptimizer(128.534712332, 2.0217439756338078E-10, simpleValueChecker0); // fail("Expecting exception: NoSuchElementException"); // Unstable assertion } catch(NoSuchElementException e) { // // no message in exception (getMessage() returned null) // verifyException("java.util.LinkedList", e); } } @Test(timeout = 4000) public void test04() throws Throwable { SimplePointChecker<PointValuePair> simplePointChecker0 = new SimplePointChecker<PointValuePair>(1816.3, 1816.3); PowellOptimizer powellOptimizer0 = null; try { powellOptimizer0 = new PowellOptimizer(1330.111495569, (-1842.58434), (-1842.58434), 0.9808930158615112, simplePointChecker0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // -1,842.584 is smaller than, or equal to, the minimum (0) // verifyException("org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer", e); } } @Test(timeout = 4000) public void test05() throws Throwable { PowellOptimizer powellOptimizer0 = new PowellOptimizer(0.09090909090909091, 0.09090909090909091); SimpleValueChecker simpleValueChecker0 = new SimpleValueChecker((-1336.5206), (-1336.5206)); PowellOptimizer powellOptimizer1 = null; try { powellOptimizer1 = new PowellOptimizer(390.4664578928941, 390.4664578928941, (-0.12502530217170715), 0.09090909090909091, simpleValueChecker0); // fail("Expecting exception: NoSuchElementException"); // Unstable assertion } catch(NoSuchElementException e) { // // no message in exception (getMessage() returned null) // verifyException("java.util.LinkedList", e); } } @Test(timeout = 4000) public void test06() throws Throwable { PowellOptimizer powellOptimizer0 = null; try { powellOptimizer0 = new PowellOptimizer((-1.0), (-1.0), 0.0, 0.0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // -1 is smaller than the minimum (0) // verifyException("org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer", e); } } @Test(timeout = 4000) public void test07() throws Throwable { PowellOptimizer powellOptimizer0 = new PowellOptimizer(1254.91345, 1254.91345); PowellOptimizer powellOptimizer1 = null; try { powellOptimizer1 = new PowellOptimizer(4865.862564404964, 63.10987163481965, (-2050.7252958830472), 1254.91345); // fail("Expecting exception: NoSuchElementException"); // Unstable assertion } catch(NoSuchElementException e) { // // no message in exception (getMessage() returned null) // verifyException("java.util.LinkedList", e); } } @Test(timeout = 4000) public void test08() throws Throwable { PowellOptimizer powellOptimizer0 = null; try { powellOptimizer0 = new PowellOptimizer(1.0, 0.0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // 0 is smaller than, or equal to, the minimum (0) // verifyException("org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer", e); } } @Test(timeout = 4000) public void test09() throws Throwable { PowellOptimizer powellOptimizer0 = null; try { powellOptimizer0 = new PowellOptimizer(0.0, (-1044.471999)); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // 0 is smaller than the minimum (0) // verifyException("org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer", e); } } @Test(timeout = 4000) public void test10() throws Throwable { SimpleValueChecker simpleValueChecker0 = new SimpleValueChecker(0.75, (-1224.95174)); PowellOptimizer powellOptimizer0 = new PowellOptimizer(128.534712332, 820.942763, 0.75, (-1224.95174), simpleValueChecker0); PowellOptimizer powellOptimizer1 = null; try { powellOptimizer1 = new PowellOptimizer(128.534712332, 820.942763); // fail("Expecting exception: NoSuchElementException"); // Unstable assertion } catch(NoSuchElementException e) { // // no message in exception (getMessage() returned null) // verifyException("java.util.LinkedList", e); } } @Test(timeout = 4000) public void test11() throws Throwable { SimpleValueChecker simpleValueChecker0 = new SimpleValueChecker(0.75, (-1224.95174)); PowellOptimizer powellOptimizer0 = new PowellOptimizer(128.534712332, 820.942763, 0.75, (-1224.95174), simpleValueChecker0); OptimizationData[] optimizationDataArray0 = new OptimizationData[8]; double[] doubleArray0 = new double[8]; InitialGuess initialGuess0 = new InitialGuess(doubleArray0); optimizationDataArray0[1] = (OptimizationData) initialGuess0; try { powellOptimizer0.optimize(optimizationDataArray0); fail("Expecting exception: IllegalStateException"); } catch(IllegalStateException e) { // // illegal state: maximal count (0) exceeded: evaluations // verifyException("org.apache.commons.math3.optim.BaseOptimizer$MaxEvalCallback", e); } } @Test(timeout = 4000) public void test12() throws Throwable { PowellOptimizer powellOptimizer0 = null; try { powellOptimizer0 = new PowellOptimizer(0.4342944622039795, (-271.983053), 1.0, 1.0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // -271.983 is smaller than, or equal to, the minimum (0) // verifyException("org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer", e); } } @Test(timeout = 4000) public void test13() throws Throwable { PowellOptimizer powellOptimizer0 = null; try { powellOptimizer0 = new PowellOptimizer((-2786.887159521), (-2786.887159521), (-2786.887159521), 1468.0, (ConvergenceChecker<PointValuePair>) null); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // -2,786.887 is smaller than the minimum (0) // verifyException("org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer", e); } } @Test(timeout = 4000) public void test14() throws Throwable { PowellOptimizer powellOptimizer0 = new PowellOptimizer(2356.77389, 2.0); OptimizationData[] optimizationDataArray0 = new OptimizationData[5]; SimpleBounds simpleBounds0 = SimpleBounds.unbounded(0); optimizationDataArray0[2] = (OptimizationData) simpleBounds0; // Undeclared exception! try { powellOptimizer0.optimize(optimizationDataArray0); fail("Expecting exception: MathUnsupportedOperationException"); } catch(MathUnsupportedOperationException e) { // // constraint // verifyException("org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer", e); } } @Test(timeout = 4000) public void test15() throws Throwable { PowellOptimizer powellOptimizer0 = new PowellOptimizer(4.440892098500626E-16, 0.087, 1660.5, 4.440892098500626E-16); // Undeclared exception! try { powellOptimizer0.doOptimize(); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer", e); } } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
521dd0300a0c074a056fd5dc67290ff8901bcf0a
b7138cfffcddd3d41de8a848e23776f9110e08e6
/src/radios/PCR1000.java
0faec29a52753e911a40dbb781a9ba39277b8ec9
[]
no_license
jchartkoff/jDriveTrack
a8e0df58d00c3b17016784d0f4479705678e54b4
e564f5fd2c01c1621399c40b22682b54447190d3
refs/heads/master
2021-01-21T21:55:02.732222
2016-03-21T11:01:33
2016-03-21T11:01:33
27,646,033
0
0
null
null
null
null
UTF-8
Java
false
false
34,075
java
package radios; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import javax.swing.SwingWorker; import javax.swing.Timer; import types.CalibrationDataObject; import jdrivetrack.Sinad; import jdrivetrack.Utility; import interfaces.RadioInterface; import jssc.SerialPort; import types.EmissionDesignator; public class PCR1000 implements RadioInterface { private static final String versionUID = "3045764079202066863"; private static final int BAUD_RATE = SerialPort.BAUDRATE_9600; private static final int PARITY = SerialPort.PARITY_NONE; private static final int STOP_BITS = SerialPort.STOPBITS_1; private static final int DATA_BITS = SerialPort.DATABITS_8; private static final int FLOW_CONTROL_IN = SerialPort.FLOWCONTROL_NONE; private static final int FLOW_CONTROL_OUT = SerialPort.FLOWCONTROL_NONE; private static final boolean DTR = true; private static final boolean RTS = true; private static final double MINIMUM_RX_FREQ = 0.050; private static final double MAXIMUM_RX_FREQ = 1300.0; private static final double MINIMUM_TX_FREQ = -1; private static final double MAXIMUM_TX_FREQ = -1; private static final String PAUSE_250MS = "PAUSE_250MS"; private static final String SHUTDOWN_REQ = "SHUTDOWN"; private static final int UPDATE_PERIOD = 100; private static final int SCAN_PERIOD = 700; private static final int SINAD_SAMPLE_PERIOD = 400; private static final int RECEIVER_SETTLE_PERIOD = 20; private static final int TERMINATION_WAIT_PERIOD = 250; private static final int BUSY_CLEARANCE_PERIOD = 500; private static final int RSSI_CLEARANCE_PERIOD = 500; private static final int WRITE_PAUSE = 20; private static final String[] AVAILABLE_BAUD_RATES = {"300","1200","4800","9600","19200","38400"}; private static final String[] AVAILABLE_FILTERS = {"2.8 kHz","6 kHz","15 kHz","50 kHz","230 kHz"}; private static final String[] TONE_SQUELCH_VALUES = { "OFF","67.0","69.3","71.0","71.9","74.4","77.0","79.7","82.5","85.4","88.5","91.5","94.8", "97.4","100.0","103.5","107.2","110.9","114.8","118.8","123.0","127.3","131.8","136.5", "141.3","146.2","151.4","156.7","159.8","162.2","165.5","167.9","173.8","177.3","179.9", "183.5","186.2","189.9","192.8","196.6","199.5","203.5","206.5","210.7","218.1","225.7", "229.1","233.6","241.8","250.3","254.1"}; private static final String[] DIGITAL_SQUELCH_VALUES = { "OFF", "123", "693", "710" }; private static final EmissionDesignator[] EMISSION_DESIGNATORS = { new EmissionDesignator("200KF8E"), new EmissionDesignator("20K0F3E"), new EmissionDesignator("11K2F3E"), new EmissionDesignator("6K00A3E"), new EmissionDesignator("2K80J3EY"), new EmissionDesignator("2K80J3EZ") }; public static final String crlf = "\r\n"; public static final double pcrdbl1e6 = 1000000.0; public static final String pcrBoolOn = "01"; public static final String pcrBoolOff = "00"; public static final String pcrFmt = "00"; public static final String pcrFrFmt = "0000000000"; public static final String pcrQueryFirmwareVersion = "G4?"; public static final String pcrQueryDSP = "GD?"; public static final String pcrQueryCountry = "GE?"; public static final String pcrQueryRxOn = "H1?"; public static final String pcrQuerySquelchSetting = "I0?"; public static final String pcrQuerySignalStrength = "I1?"; public static final String pcrQueryFrequencyOffset = "I2?"; public static final String pcrQueryDTMFTone = "I3?"; public static final String pcrCommandRxOn = "H101"; public static final String pcrCommandRxOff = "H100"; public static final String pcrCommandAutoUpdateOn = "G301"; public static final String pcrCommandAutoUpdateOff = "G300"; public static final String pcrCommandBandScopeOff = "ME0000100000000000000"; public static final String pcrCommandAFCPrefix = "J44"; public static final String pcrCommandAGCPrefix = "J45"; public static final String pcrCommandATTPrefix = "J47"; public static final String pcrCommandNBPrefix = "J46"; public static final String pcrCommandSquelchPrefix = "J41"; public static final String pcrCommandCTCSSPrefix = "J51"; public static final String pcrCommandVoiceScanPrefix = "J50"; public static final String pcrCommandVolumeLevelPrefix = "J40"; public static final String pcrCommandFrequencyPrefix = "K0"; public static final String pcrCommandIFShiftPrefix = "J43"; public static final String pcrReplyHeaderAck = "G0"; public static final String pcrReplyHeaderReceiveStatus = "I0"; public static final String pcrReplyHeaderRSSIChange = "I1"; public static final String pcrReplyHeaderSignalOffset = "I2"; public static final String pcrReplyHeaderDTMFDecode = "I3"; public static final String pcrReplyHeaderWaveFormData = "NE10"; public static final String pcrReplyHeaderScanStatus = "H9"; public static final String pcrReplyHeaderFirmware = "G4"; public static final String pcrReplyHeaderCountry = "GE"; public static final String pcrReplyHeaderOptionalDevice = "GD"; public static final String pcrReplyHeaderPower = "H1"; public static final String pcrReplyHeaderProtocol = "G2"; public static final String pcrInitialize = "LE20050" + crlf + "LE20040"; //$NON-NLS-2$ public static final String pcrCommandTrackingFilterAutomatic = "LD82NN"; private String signalOffset; private String dtmfDecode; private String scanStatus; private String waveFormData; private String modelNumber; private String serialNumber; private String protocol; private boolean afc; private boolean agc; private boolean attenuator; private String country; private String dsp; private int filter; private String firmware; private double frequency; private int ifShift; private int mode; private boolean noiseBlanker; private int squelch; private double toneSquelch; private int digitalSquelch; private boolean voiceScan; private int volume; private boolean vfoMode; private String txData; private String rxData; private CalibrationDataObject cdo = null; private boolean ready = false; private boolean sinadEnabled = false; private boolean rssiEnabled = false; private boolean scanEnabled = false; private int rssi; private Sinad sinad; private Object onLineHold = new Object(); private Runnable scanTimer; private ScheduledExecutorService scanTimerScheduler; private Runnable updateTimer; private ScheduledExecutorService updateTimerScheduler; private Timer busyTimer; private Timer rssiTimer; private Timer sinadTimer; private Timer receiverSettleTimer; private volatile BlockingQueue<String> itemsToWrite = new ArrayBlockingQueue<>(32); private volatile boolean isOnLine = false; private static boolean shuttingDown = false; private volatile static boolean terminated = false; private volatile int currentChannel = 0; private volatile boolean busy; private volatile List<Integer> rssiList = new ArrayList<>(10); private volatile List<Double> berList = new ArrayList<>(10); private volatile List<Double> dBmList = new ArrayList<>(10); private volatile List<Double> sinadList = new ArrayList<>(10); private volatile List<Double> scanList = new ArrayList<>(10); private volatile List<Boolean> scanSelectList = new ArrayList<>(10); private volatile boolean allowQueueing = false; private volatile boolean power = false; private volatile PropertyChangeSupport pcs = new PropertyChangeSupport(this); public PCR1000() { new Writer(); initializeArrays(); initializeTimers(); } private void initializeArrays() { this.rssiList = new ArrayList<>(Collections.nCopies(10, 0)); this.berList = new ArrayList<>(Collections.nCopies(10, 0d)); this.dBmList = new ArrayList<>(Collections.nCopies(10, -130d)); this.sinadList = new ArrayList<>(Collections.nCopies(10, 0d)); this.scanList = new ArrayList<>(Collections.nCopies(10, 162.4d)); this.scanSelectList = new ArrayList<>(Collections.nCopies(10, false)); } private void initializeTimers() { ActionListener busyTimerActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent event) { clearBusy(); } }; this.busyTimer = new Timer(BUSY_CLEARANCE_PERIOD, busyTimerActionListener); ActionListener rssiTimerActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent event) { clearRSSI(); } }; this.rssiTimer = new Timer(RSSI_CLEARANCE_PERIOD, rssiTimerActionListener); this.scanTimerScheduler = Executors.newSingleThreadScheduledExecutor(); this.scanTimer = new Runnable() { @Override public void run() { scanAdvance(); } }; this.scanTimerScheduler.execute(this.scanTimer); this.updateTimerScheduler = Executors.newSingleThreadScheduledExecutor(); this.updateTimer = new Runnable() { @Override public void run() { updateRequest(); } }; this.updateTimerScheduler.execute(this.updateTimer); ActionListener sinadTimerActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent event) { sinadSample(); } }; this.sinadTimer = new Timer(SINAD_SAMPLE_PERIOD, sinadTimerActionListener); this.sinadTimer.setRepeats(false); ActionListener receiverSettledTimerActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent event) { receiverSettled(); } }; this.receiverSettleTimer = new Timer(RECEIVER_SETTLE_PERIOD, receiverSettledTimerActionListener); this.receiverSettleTimer.setRepeats(false); } @Override public void processData(String input) { decode(input); } @Override public boolean isAFC() { return this.afc; } @Override public void setAFC(boolean afc) { this.afc = afc; cmdSwitch(afc, pcrCommandAFCPrefix); } @Override public void startSinad() { this.sinadEnabled = true; this.sinad = new Sinad(); this.sinad.start(); } @Override public void stopSinad() { this.sinadEnabled = false; if (this.sinad != null) this.sinad.stopSinad(); this.sinadTimer.stop(); } @Override public boolean isSinadEnabled() { return this.sinadEnabled; } @Override public boolean isAGC() { return this.agc; } @Override public void setAGC(boolean agc) { this.agc = agc; cmdSwitch(agc, pcrCommandAGCPrefix); } @Override public boolean isAttenuator() { return this.attenuator; } @Override public void setAttenuator(boolean attenuator) { this.attenuator = attenuator; cmdSwitch(attenuator, pcrCommandATTPrefix); } @Override public boolean isNoiseBlanker() { return this.noiseBlanker; } @Override public void setNoiseBlanker(boolean noiseBlanker) { this.noiseBlanker = noiseBlanker; cmdSwitch(noiseBlanker, pcrCommandNBPrefix); } @Override public boolean isVoiceScan() { return this.voiceScan; } @Override public void setVoiceScan(boolean voiceScan) { this.voiceScan = voiceScan; cmdSwitch(voiceScan, pcrCommandNBPrefix); } @Override public String getDSP() { return this.dsp; } @Override public String getFirmware() { return this.firmware; } @Override public String getCountry() { return this.country; } @Override public int getIFShift() { return this.ifShift; } @Override public void setIFShift(int ifShift) { if (ifShift >= 0 && ifShift <= 255) { this.ifShift = ifShift; if (this.allowQueueing) writeData(pcrCommandIFShiftPrefix + Utility.integerToHex(ifShift) + crlf); } } @Override public int getSquelch() { return this.squelch; } @Override public void setSquelch(int squelch) { if (squelch >= 0 && squelch <= 255) { this.squelch = squelch; if (this.allowQueueing) writeData(pcrCommandSquelchPrefix + Utility.integerToHex(squelch) + crlf); } } @Override public boolean isBusy() { return this.busy; } @Override public int getVolume() { return this.volume; } @Override public void setVolume(int volume) { if (this.squelch >= 0 && this.squelch <= 255) { this.volume = volume; if (this.allowQueueing) writeData(pcrCommandVolumeLevelPrefix + Utility.integerToHex(volume) + crlf); } } @Override public double getToneSquelch() { return this.toneSquelch; } @Override public void setToneSquelch(double toneSquelch) { if (toneSquelch >= 0.0 && toneSquelch <= Double.parseDouble(TONE_SQUELCH_VALUES[TONE_SQUELCH_VALUES.length-1])) { this.toneSquelch = toneSquelch; int toneSquelchCode = toneSquelchToPcrCode(toneSquelch); String toneSquelchHexCode = Utility.integerToHex(toneSquelchCode); if (this.allowQueueing) writeData(pcrCommandCTCSSPrefix + toneSquelchHexCode + crlf); } } private int toneSquelchToPcrCode(double toneSquelchFreq) { int code = 0; for (int i = 1; i < TONE_SQUELCH_VALUES.length; i++) { if (toneSquelchFreq == Double.parseDouble(TONE_SQUELCH_VALUES[i])) code = i; } return code; } @Override public int getDigitalSquelch() { return this.digitalSquelch; } @Override public void setDigitalSquelch(int digitalSquelch) { this.digitalSquelch = digitalSquelch; } private void setFrequencyModeFilter(double frequency, int mode, int filter) { if (frequency >= MINIMUM_RX_FREQ && frequency <= MAXIMUM_RX_FREQ) { this.frequency = frequency; this.mode = mode; this.filter = filter; sendFrequencyToPcr(frequency, mode, filter); } else { adviseUnsupportedFrequencyException(frequency); } } @Override public void setFrequency(double frequency) { if (frequency >= MINIMUM_RX_FREQ && frequency <= MAXIMUM_RX_FREQ) { this.frequency = frequency; sendFrequencyToPcr(frequency, this.mode, this.filter); } else { adviseUnsupportedFrequencyException(frequency); } } private void adviseUnsupportedFrequencyException(double frequency) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { DecimalFormat decimalFormat = new DecimalFormat("##00.000##"); JOptionPane.showMessageDialog(null, "This radio does not operate on " + decimalFormat.format(frequency) + " MHz", "Unsupported Frequency Exception", JOptionPane.ERROR_MESSAGE); } }); } @Override public int getMode() { return this.mode; } @Override public void setMode(int mode) { if (mode >= 0 && mode <= 5) { switch (mode) { case 0: this.mode = 6; break; case 1: this.mode = 5; break; case 2: this.mode = 5; break; case 3: this.mode = 2; break; case 4: this.mode = 1; break; case 5: this.mode = 0; break; } sendFrequencyToPcr(this.frequency, mode, this.filter); } } @Override public int getFilter() { return this.filter; } @Override public void setFilter(int filter) { if (filter >= 0 && filter <= 4) { switch (filter) { case 0: this.filter = 0; break; case 1: this.filter = 1; break; case 2: this.filter = 2; break; case 3: this.filter = 3; break; case 4: this.filter = 4; break; } sendFrequencyToPcr(this.frequency, this.mode, filter); } } private void decode(String msg) { int iHStart = 0; int iGStart = 0; int iIStart = 0; boolean sent; String rStr = ""; for (int i = 0; i < msg.length(); i++) { char c = msg.charAt(i); if (Character.isLetter(c) || Character.isDigit(c)) { rStr = rStr + c; } } do { sent = false; iHStart = rStr.indexOf("H", 0); iIStart = rStr.indexOf("I", 0); iGStart = rStr.indexOf("G", 0); if (iHStart >= 0 && rStr.length() >= iHStart + 4) { pcrDecoder(rStr.substring(iHStart, iHStart + 4)); if (rStr.length() >= 4) rStr = rStr.substring(iHStart + 4); sent = true; } if (iIStart >= 0 && rStr.length() >= iIStart + 4) { pcrDecoder(rStr.substring(iIStart, iIStart + 4)); if (rStr.length() >= 4) rStr = rStr.substring(iIStart + 4); sent = true; } if (iGStart >= 0 && rStr.length() >= iGStart + 4) { pcrDecoder(rStr.substring(iGStart, iGStart + 4)); if (rStr.length() >= 4) rStr = rStr.substring(iGStart + 4); sent = true; } } while (sent); } private void pcrDecoder(String data) { this.pcs.firePropertyChange(RX_DATA, null, data); this.rxData = data; switch (data.substring(0, 2)) { case pcrReplyHeaderAck: switch (data.substring(2, 4)) { case "01": this.pcs.firePropertyChange(ERROR, null, "Received Data Error"); break; case "00": this.pcs.firePropertyChange(ACK, null, "Data Acknowledged"); break; } break; case pcrReplyHeaderReceiveStatus: this.busy = decodeBusyStatus(data.substring(2, 4)); this.pcs.firePropertyChange(RadioInterface.BUSY, null, this.busy); this.busyTimer.restart(); break; case pcrReplyHeaderRSSIChange: if (data.length() == 4) { this.rssi = Integer.valueOf(data.substring(2, 4), 16); this.dBmList.set(this.currentChannel, this.cdo.getdBmElement(this.rssi)); if (this.rssiEnabled && !this.scanEnabled) this.pcs.firePropertyChange(RadioInterface.RSSI, null, this.rssi); this.rssiTimer.restart(); } break; case pcrReplyHeaderSignalOffset: this.signalOffset = data.substring(2, 4); this.pcs.firePropertyChange(RadioInterface.SIGNAL_OFFSET, null, this.signalOffset); break; case pcrReplyHeaderDTMFDecode: this.dtmfDecode = data.substring(2, 4); this.pcs.firePropertyChange(RadioInterface.DTMF_DECODE, null, this.dtmfDecode); break; case pcrReplyHeaderWaveFormData: this.waveFormData = data.substring(2, 4); this.pcs.firePropertyChange(RadioInterface.WAVEFORM_DATA, null, this.waveFormData); break; case pcrReplyHeaderScanStatus: this.scanStatus = data.substring(2, 4); this.pcs.firePropertyChange(RadioInterface.SCAN_STATUS, null, this.scanStatus); break; case pcrReplyHeaderFirmware: this.firmware = data.substring(2, 4); this.pcs.firePropertyChange(RadioInterface.FIRMWARE, null, this.firmware); break; case pcrReplyHeaderCountry: this.country = data.substring(2, 4); this.pcs.firePropertyChange(RadioInterface.COUNTRY, null, this.country); break; case pcrReplyHeaderOptionalDevice: this.dsp = data.substring(2, 4); this.pcs.firePropertyChange(RadioInterface.DSP, null, this.dsp); break; case pcrReplyHeaderPower: synchronized(this.onLineHold) { this.power = decodePowerStatus(data.substring(2, 4)); this.pcs.firePropertyChange(RadioInterface.POWER, null, this.power); if (this.power) { this.isOnLine = true; this.onLineHold.notifyAll(); } } break; case pcrReplyHeaderProtocol: this.protocol = data.substring(2, 4); this.pcs.firePropertyChange(RadioInterface.PROTOCOL, null, this.protocol); break; default: System.err.println("PCR1000 - Invalid Property Value : " + data); break; } } private boolean decodePowerStatus(String str) { switch (str) { case "00": return false; case "01": return true; } return false; } private boolean decodeBusyStatus(String str) { switch (str) { case "04": return false; case "07": return true; } return false; } @Override public void startRadio() { this.ready = false; this.isOnLine = false; this.itemsToWrite.clear(); this.allowQueueing = true; if (this.allowQueueing) writeData(pcrInitialize + crlf); if (this.allowQueueing) writeData(pcrCommandRxOn + crlf); if (this.allowQueueing) writeData(pcrCommandAutoUpdateOff + crlf); if (this.allowQueueing) writeData(pcrQueryFirmwareVersion + crlf); if (this.allowQueueing) writeData(pcrQueryCountry + crlf); if (this.allowQueueing) writeData(pcrQueryDSP + crlf); setFrequencyModeFilter(this.frequency, this.mode, this.filter); setVolume(this.volume); setSquelch(this.squelch); setToneSquelch(this.toneSquelch); cmdSwitch(this.voiceScan, pcrCommandVoiceScanPrefix); setIFShift(this.ifShift); cmdSwitch(this.agc, pcrCommandAGCPrefix); cmdSwitch(this.afc, pcrCommandAFCPrefix); cmdSwitch(this.noiseBlanker, pcrCommandNBPrefix); cmdSwitch(this.attenuator, pcrCommandATTPrefix); if (this.allowQueueing) writeData(pcrCommandBandScopeOff + crlf); if (this.allowQueueing) writeData(pcrQueryRxOn + crlf); if (this.sinadEnabled) startSinad(); if (!this.vfoMode) startScan(); requestReadyStatus(); } private void requestReadyStatus() { SwingWorker<Boolean,Void> worker = new SwingWorker<Boolean,Void>() { @Override protected Boolean doInBackground() throws Exception { int progress = 0; boolean onLine = false; for (int i = 0; i < 30; i++) { synchronized(PCR1000.this.onLineHold) { if (PCR1000.this.allowQueueing) writeData(pcrQueryRxOn + crlf); PCR1000.this.onLineHold.wait(1000); setProgress(progress++); if (PCR1000.this.isOnLine) { onLine = true; break; } } } return onLine; } @Override protected void done() { try { PCR1000.this.ready = get(); PCR1000.this.updateTimerScheduler.scheduleWithFixedDelay(PCR1000.this.updateTimer, UPDATE_PERIOD, UPDATE_PERIOD, TimeUnit.MILLISECONDS); PCR1000.this.pcs.firePropertyChange(READY, null, PCR1000.this.ready); } catch (InterruptedException | ExecutionException ex) { ex.printStackTrace(); } } }; worker.execute(); } @Override public void initiateRadioStop() { Thread thread = new Thread() { @Override public void run() { try { stopScan(); stopSinad(); PCR1000.this.updateTimerScheduler.shutdown(); PCR1000.this.rssiTimer.stop(); PCR1000.this.busyTimer.stop(); PCR1000.this.receiverSettleTimer.stop(); PCR1000.this.itemsToWrite.clear(); if (PCR1000.this.allowQueueing) writeData(pcrCommandAutoUpdateOff + crlf); PCR1000.this.power = true; if (PCR1000.this.allowQueueing) writeData(pcrCommandRxOff + crlf); sleep(80); if (PCR1000.this.allowQueueing) writeData(pcrQueryRxOn + crlf); sleep(40); while (PCR1000.this.power) { if (PCR1000.this.allowQueueing) writeData(pcrQueryRxOn + crlf); sleep(40); } PCR1000.this.allowQueueing = false; PCR1000.this.itemsToWrite.clear(); clearRSSI(); clearBusy(); PCR1000.this.pcs.firePropertyChange(CANCEL_EVENTS, null, true); PCR1000.this.scanTimerScheduler.awaitTermination(TERMINATION_WAIT_PERIOD, TimeUnit.MILLISECONDS); PCR1000.this.updateTimerScheduler.awaitTermination(TERMINATION_WAIT_PERIOD, TimeUnit.MILLISECONDS); PCR1000.this.pcs.firePropertyChange(CLOSE_SERIAL_PORT, null, true); PCR1000.this.pcs.firePropertyChange(RADIO_THREADS_TERMINATED, null, true); } catch (InterruptedException ex) { ex.printStackTrace(); } } }; thread.start(); } private void sendFrequencyToPcr(double freq, int mode, int filter) { DecimalFormat freqFormat = new DecimalFormat(pcrFrFmt); String strFr = pcrCommandFrequencyPrefix + freqFormat.format(freq * pcrdbl1e6); DecimalFormat pcrFormat = new DecimalFormat(pcrFmt); strFr = strFr + pcrFormat.format(mode) + pcrFormat.format(filter); strFr = strFr + pcrFmt; if (this.allowQueueing) writeData(strFr + crlf); } private void cmdSwitch(boolean bln, String cmd) { String str = pcrBoolOff; if (bln) str = pcrBoolOn; if (this.allowQueueing) writeData(cmd + str + crlf); } private void scanAdvance() { int numberOfSelectedChannels = 0; for (int i = 0; i < this.scanSelectList.size(); i++) { if (this.scanSelectList.get(i)) numberOfSelectedChannels++; } if (numberOfSelectedChannels == 0) return; do { this.currentChannel++; if (this.currentChannel > 9) this.currentChannel = 0; if (this.scanSelectList.get(this.currentChannel) && this.scanList.get(this.currentChannel) >= MINIMUM_RX_FREQ && this.scanList.get(this.currentChannel) <= MAXIMUM_RX_FREQ) { setFrequency(this.scanList.get(this.currentChannel)); this.receiverSettleTimer.start(); if (this.sinad != null) this.sinadTimer.start(); break; } } while (!this.scanSelectList.get(this.currentChannel) && this.scanList.get(this.currentChannel) >= MINIMUM_RX_FREQ && this.scanList.get(this.currentChannel) <= MAXIMUM_RX_FREQ); } private void updateRequest() { if (this.allowQueueing) writeData(pcrQuerySignalStrength + crlf); if (this.allowQueueing) writeData(pcrQuerySquelchSetting + crlf); } private void sinadSample() { this.sinadList.set(this.currentChannel, this.sinad.getSINAD()); if (this.sinadEnabled) scanChannelReady(); } void receiverSettled() { this.rssiList.set(this.currentChannel, this.rssi); if (!this.sinadEnabled) scanChannelReady(); } private void scanChannelReady() { this.pcs.firePropertyChange(SCAN_CHANNEL_READY, null, this.currentChannel); } @Override public double getSinad(int index) { return this.sinadList.get(index); } @Override public Double getBer(int index) { return this.berList.get(index); } private void clearRSSI() { this.rssi = 0; if (this.rssiEnabled && !this.scanEnabled) this.pcs.firePropertyChange(RSSI, null, this.rssi); } void clearBusy() { this.busy = false; this.pcs.firePropertyChange(BUSY, null, this.busy); } @Override public Integer[] getPercentArray() { Integer[] percentArray = new Integer[10]; for (int i = 0; i < 10; i++) { percentArray[i] = (int) dBmToPercent(this.dBmList.get(i)); } return percentArray; } @Override public List<Integer> getPercentList() { List<Integer> percentList = new ArrayList<>(10); for (int i = 0; i < 10; i++) { percentList.add(i, (int) dBmToPercent(this.dBmList.get(i))); // System.out.println("percent: " + dBmToPercent(dBmList.get(i)) + " " + "dBm: " + dBmList.get(i)); } return percentList; } @Override public List<Double> getdBmList() { return this.dBmList; } @Override public List<Double> getBerList() { return this.berList; } @Override public void setScanList(List<Double> scanList) { this.scanList = scanList; } @Override public List<Double> getScanList() { return this.scanList; } @Override public Double getScanList(int index) { return this.scanList.get(index); } @Override public void setSinadEnabled(boolean sinadEnabled) { this.sinadEnabled = sinadEnabled; } @Override public List<Double> getSinadList() { return this.sinadList; } @Override public void setScanSelectList(List<Boolean> scanSelectList) { this.scanSelectList = scanSelectList; } @Override public List<Boolean> getScanSelectList() { return this.scanSelectList; } @Override public Boolean getScanSelectList(int index) { return this.scanSelectList.get(index); } @Override public void setVfoMode(boolean vfoMode) { this.vfoMode = vfoMode; if (this.isOnLine && vfoMode) stopScan(); if (this.isOnLine && !vfoMode) startScan(); } @Override public boolean isVfoMode() { return this.vfoMode; } @Override public String getTransmittedData() { return "Tx Data: " + this.txData; } @Override public String getReceivedData() { return "Rx Data: " + this.rxData; } @Override public int getCurrentChannel() { return this.currentChannel; } @Override public String getModelNumber() { return this.modelNumber; } @Override public String getSerialNumber() { return this.serialNumber; } @Override public boolean isProgScan() { return false; } @Override public void setProgScan(boolean scan) { } @Override public boolean isSquelchDelay() { return false; } @Override public void startScan() { this.scanEnabled = true; this.scanTimerScheduler.scheduleWithFixedDelay(this.scanTimer, SCAN_PERIOD, SCAN_PERIOD, TimeUnit.MILLISECONDS); } @Override public void stopScan() { this.scanEnabled = false; this.scanTimerScheduler.shutdownNow();; this.currentChannel = 0; setFrequency(this.frequency); } @Override public void setSquelchDelayLong(boolean squelchDelay) { } @Override public boolean getDefaultDTR() { return DTR; } @Override public boolean getDefaultRTS() { return RTS; } @Override public int getDefaultBaudRate() { return BAUD_RATE; } @Override public int getDefaultParity() { return PARITY; } @Override public int getDefaultStopBits() { return STOP_BITS; } @Override public int getDefaultDataBits() { return DATA_BITS; } @Override public int getDefaultFlowControlIn() { return FLOW_CONTROL_IN; } @Override public int getDefaultFlowControlOut() { return FLOW_CONTROL_OUT; } @Override public boolean isCTSSupported() { return true; } @Override public void addPropertyChangeListener(PropertyChangeListener listener) { this.pcs.addPropertyChangeListener(listener); } @Override public void removePropertyChangeListener(PropertyChangeListener listener) { this.pcs.removePropertyChangeListener(listener); } @Override public String versionUID() { return versionUID; } @Override public double minimumRxFrequency() { return MINIMUM_RX_FREQ; } @Override public double maximumRxFrequency() { return MAXIMUM_RX_FREQ; } @Override public double minimumTxFrequency() { return MINIMUM_TX_FREQ; } @Override public double maximumTxFrequency() { return MAXIMUM_TX_FREQ; } @Override public EmissionDesignator[] getEmissionDesignators() { return EMISSION_DESIGNATORS; } @Override public String[] supportedToneSquelchCodes() { return TONE_SQUELCH_VALUES; } @Override public String[] supportedDigitalSquelchCodes() { return DIGITAL_SQUELCH_VALUES; } @Override public String[] availableFilters() { return AVAILABLE_FILTERS; } @Override public boolean supportsSinad() { return true; } @Override public boolean suportsBer() { return false; } @Override public boolean supportsRssi() { return true; } @Override public void setCalibrationDataObject(CalibrationDataObject cdo) { this.cdo = cdo; } private void writeData(String data) { if (shuttingDown || terminated) return; try { this.itemsToWrite.put(data); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); throw new RuntimeException("Unexpected Interruption"); } } @Override public void dispose() { shuttingDown = true; writeData(SHUTDOWN_REQ); initiateRadioStop(); } private class Writer extends Thread { String data = null; private Writer() { start(); } @Override public void run() { try { while (!(this.data = PCR1000.this.itemsToWrite.take()).equals(SHUTDOWN_REQ)) { try { sleep(WRITE_PAUSE); PCR1000.this.pcs.firePropertyChange("SEND_TO_SERIAL_PORT", null, this.data); if (this.data.equals(PAUSE_250MS)) sleep(250); } catch (InterruptedException ex) { ex.printStackTrace(); } } } catch (InterruptedException ex) { ex.printStackTrace(); } finally { terminated = true; PCR1000.this.itemsToWrite.clear(); } } } @Override public boolean isReady() { return this.ready; } @Override public String[] getAvailableBaudRates() { return AVAILABLE_BAUD_RATES; } @Override public boolean serialParametersFixed() { return true; } @Override public int getRSSI(int index) { return this.rssiList.get(index); } @Override public double getFrequency(int index) { return this.scanList.get(index); } @Override public double getdBm(int index) { return this.dBmList.get(index); } @Override public void sampleRssiValues(boolean sample) { this.rssiEnabled = sample; } @Override public void sampleBerValues(boolean sample) { } @Override public void setScanList(Double[] scan) { this.scanList = Arrays.asList(scan); } @Override public void setScanSelectList(Boolean[] scanSelect) { this.scanSelectList = Arrays.asList(scanSelect); } private double dBmToPercent(double dBm) { double minDBM = -130; double maxDBM = -50; return (100 - minDBM * (maxDBM - dBm) / maxDBM) * -1; } }
[ "jchartkoff@gmail.com" ]
jchartkoff@gmail.com
602f2774b2a1769b507280171e669eff88be9f81
5921920ff8168a00cf1e5374f1761dec9abcd610
/object_oriented_java/eclipse-workspace/PRINCETONAlgPONE/src/RandomizedQueue.java
11994a2a95b442f0befade803adc2d01f4e1711f
[ "MIT" ]
permissive
Arthur-Lanc/coursera
45e2bfd773ecc2d375870d7047c09b17c915de48
58cab28c723e2f60ddfdaa37acde6dc97c107222
refs/heads/master
2020-03-22T14:06:32.774107
2018-10-02T12:29:56
2018-10-02T12:29:56
140,153,945
0
0
null
null
null
null
UTF-8
Java
false
false
3,518
java
import java.util.Iterator; import java.util.NoSuchElementException; import edu.princeton.cs.algs4.StdRandom; public class RandomizedQueue<Item> implements Iterable<Item> { private Item[] s; private int N = 0; // construct an empty randomized queue public RandomizedQueue(){ s = (Item[]) new Object[1]; } // is the randomized queue empty? public boolean isEmpty(){ return N == 0; } // return the number of items on the randomized queue public int size(){ return N; } // add the item public void enqueue(Item item){ if (item == null) { throw new IllegalArgumentException(); } if (N == s.length) resize(2 * s.length); s[N++] = item; } private void resize(int capacity) { Item[] copy = (Item[]) new Object[capacity]; for (int i = 0; i < N; i++) copy[i] = s[i]; s = copy; } // remove and return a random item public Item dequeue(){ if (N == 0) { throw new NoSuchElementException(); } int randomIndex = StdRandom.uniform(0, N); Item item = s[randomIndex]; s[randomIndex] = s[N-1]; s[N-1] = null; N -= 1; if (N > 0 && N == s.length/4) resize(s.length/2); return item; } // return a random item (but do not remove it) public Item sample(){ if (N == 0) { throw new NoSuchElementException(); } return s[StdRandom.uniform(N)]; } // return an independent iterator over items in random order public Iterator<Item> iterator(){ return new RandomArrayIterator(); } private class RandomArrayIterator implements Iterator<Item>{ private int i = 0; Item[] copy; public RandomArrayIterator() { copy = (Item[]) new Object[N]; System.arraycopy( s, 0, copy, 0, N); StdRandom.shuffle(copy, 0, N); } public boolean hasNext() { return i < N; } public void remove() { throw new UnsupportedOperationException(); } public Item next() { if (i >= N) { throw new NoSuchElementException(); } return copy[i++]; } } // unit testing (optional) public static void main(String[] args){ System.out.println("start"); RandomizedQueue<String> randque = new RandomizedQueue<String>(); randque.enqueue("a"); randque.enqueue("b"); randque.enqueue("c"); randque.enqueue("e"); randque.enqueue("f"); System.out.println(randque.size()); // for(String str : randque) { // System.out.println(str); // } // System.out.println(randque.sample()); // System.out.println(randque.sample()); // System.out.println(randque.sample()); System.out.println(randque.dequeue()); // System.out.println(randque.size()); System.out.println(randque.dequeue()); // System.out.println(randque.size()); System.out.println(randque.dequeue()); // System.out.println(randque.size()); // System.out.println(randque.dequeue()); // System.out.println(randque.dequeue()); // System.out.println(randque.dequeue()); for(String str : randque) { System.out.println(str); } } }
[ "357720621@qq.com" ]
357720621@qq.com
8619bbb1f9aff473983f745ec55bb0c02faac084
4a5292ebb35fb7d3bf9fd35323a8d8317a73677c
/src/main/java/com/yang7/leetcode/editor/cn/StringToUrlLcci.java
8ffe9e740684e7c518d50da4eaa16608a3e960d6
[]
no_license
77yang/leetcode
6b7d37439d26f52530172b3a99b6258370b4f644
916deec46d4a59126aa70bbb65dfc2f80e715e20
refs/heads/master
2022-06-05T12:10:38.733723
2022-03-17T09:59:55
2022-03-17T09:59:55
149,733,845
0
0
null
null
null
null
UTF-8
Java
false
false
1,235
java
//URL化。编写一种方法,将字符串中的空格全部替换为%20。假定该字符串尾部有足够的空间存放新增字符,并且知道字符串的“真实”长度。(注:用Java实现的话, //请使用字符数组实现,以便直接在数组上操作。) // // // // 示例 1: // // //输入:"Mr John Smith ", 13 //输出:"Mr%20John%20Smith" // // // 示例 2: // // //输入:" ", 5 //输出:"%20%20%20%20%20" // // // // // 提示: // // // 字符串长度在 [0, 500000] 范围内。 // // Related Topics 字符串 👍 61 👎 0 package com.yang7.leetcode.editor.cn; public class StringToUrlLcci{ public static void main(String[] args) { Solution solution = new StringToUrlLcci().new Solution(); System.out.println(solution.replaceSpaces("Mr John Smith", 13)); System.out.println(solution.replaceSpaces(" ", 5)); } //leetcode submit region begin(Prohibit modification and deletion) class Solution { public String replaceSpaces(String S, int length) { return S.substring(0, length).replaceAll(" ", "%20"); } } //leetcode submit region end(Prohibit modification and deletion) }
[ "3227@winnermedical.com" ]
3227@winnermedical.com
cb2c71ae29e8d9dfb4ee3e3ed9a194a72d3abc74
4254951d3b5d59eef4649d098862be50fd6ce43c
/src/main/java/hellfirepvp/astralsorcery/common/registry/RegistryRecipes.java
3ab30be8731b99ba2d34ac929b324cb847b1d2ba
[]
no_license
whichonespink44/AstralSorcery
51b37a6056dc32f4bcfe9b2bfcaae608b7cd9e7b
c2437c05e8c2ee9556edbf4695fb06116d83cd8d
refs/heads/master
2021-05-01T23:38:31.006522
2016-12-31T00:25:48
2016-12-31T00:25:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
37,814
java
package hellfirepvp.astralsorcery.common.registry; import hellfirepvp.astralsorcery.common.block.BlockBlackMarble; import hellfirepvp.astralsorcery.common.block.BlockCustomOre; import hellfirepvp.astralsorcery.common.block.BlockMarble; import hellfirepvp.astralsorcery.common.crafting.ShapedLightProximityRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.AttunementRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.AttunementAltarRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.CollectorCrystalRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.ConstellationRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.GrindstoneRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.LensRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.PrismLensRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.RecipeRitualPedestal; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.upgrade.AttunementUpgradeRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.CrystalToolRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.DiscoveryRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.TelescopeRecipe; import hellfirepvp.astralsorcery.common.crafting.altar.recipes.upgrade.ConstellationUpgradeRecipe; import hellfirepvp.astralsorcery.common.crafting.helper.AccessibleRecipeAdapater; import hellfirepvp.astralsorcery.common.crafting.helper.ShapedRecipe; import hellfirepvp.astralsorcery.common.crafting.helper.ShapedRecipeSlot; import hellfirepvp.astralsorcery.common.crafting.helper.SmeltingRecipe; import hellfirepvp.astralsorcery.common.crafting.infusion.InfusionRecipeRegistry; import hellfirepvp.astralsorcery.common.item.ItemColoredLens; import hellfirepvp.astralsorcery.common.item.ItemCraftingComponent; import hellfirepvp.astralsorcery.common.lib.BlocksAS; import hellfirepvp.astralsorcery.common.lib.ItemsAS; import hellfirepvp.astralsorcery.common.util.OreDictAlias; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.RecipeSorter; import static hellfirepvp.astralsorcery.common.crafting.altar.AltarRecipeRegistry.*; /** * This class is part of the Astral Sorcery Mod * The complete source code for this mod can be found on github. * Class: RegistryRecipes * Created by HellFirePvP * Date: 31.07.2016 / 10:49 */ public class RegistryRecipes { public static ShapedRecipe rMarbleRuned, rMarbleEngraved, rMarbleChiseled, rMarbleArch, rMarblePillar, rMarbleBricks; public static ShapedRecipe rBlackMarbleRaw; //LightProximityRecipes public static ShapedRecipe rLPRAltar; public static ShapedRecipe rLPRWand; public static ShapedRecipe rRJournal; //Ugh. Important machines/stuff public static DiscoveryRecipe rJournal; public static DiscoveryRecipe rHandTelescope; public static TelescopeRecipe rTelescope; public static GrindstoneRecipe rGrindstone; public static DiscoveryRecipe rAltar; public static RecipeRitualPedestal rRitualPedestalRock, rRitualPedestalCel; public static DiscoveryRecipe rLightwell; public static AttunementRecipe rIlluminatorRock, rIlluminatorCel; public static AttunementRecipe rAttenuationAltarRelay; public static AttunementAltarRecipe rAttunementAltarRock, rAttunementAltarCel; public static AttunementRecipe rStarlightInfuserRock, rStarlightInfuserCel; public static AttunementRecipe rTreeBeacon; public static LensRecipe rLensRock, rLensCel; public static PrismLensRecipe rPrismRock, rPrismCel; public static CollectorCrystalRecipe rCollectRock, rCollectCel; public static AttunementUpgradeRecipe rAltarUpgradeAttenuationRock, rAltarUpgradeAttenuationCel; public static ConstellationUpgradeRecipe rAltarUpgradeConstellationRock, rAltarUpgradeConstellationCel; //public static SimpleCrystalAttunationRecipe rAttuneRockCrystalBasic, rAttuneCelestialCrystalBasic; //CraftingComponents //public static DiscoveryRecipe rCCGlassLensRockCrystal, rCCGlassLensCelCrystal; public static DiscoveryRecipe rCCGlassLens; public static AttunementRecipe rGlassLensFire, rGlassLensBreak, rGlassLensGrowth, rGlassLensDamage, rGlassLensRegeneration, rGlassLensNightvision; //Smelting public static SmeltingRecipe rSmeltStarmetalOre; //Tools public static CrystalToolRecipe rCToolRockPick, rCToolRockShovel, rCToolRockAxe, rCToolRockSword; public static CrystalToolRecipe rCToolCelPick, rCToolCelShovel, rCToolCelAxe, rCToolCelSword; public static DiscoveryRecipe rWand; public static ConstellationRecipe rLinkToolRock, rLinkToolCel; public static void init() { initVanillaRecipes(); initAltarRecipes(); initInfusionRecipes(); } public static void initInfusionRecipes() { InfusionRecipeRegistry.registerBasicInfusion(ItemCraftingComponent.MetaType.RESO_GEM.asStack(), ItemCraftingComponent.MetaType.AQUAMARINE.asStack()); } public static void initVanillaRecipes() { RecipeSorter.register("LightProximityCrafting", ShapedLightProximityRecipe.class, RecipeSorter.Category.SHAPED, "after:minecraft:shaped"); RecipeSorter.register("ShapedRecipeAdapter", AccessibleRecipeAdapater.class, RecipeSorter.Category.SHAPED, "after:minecraft:shaped"); CraftingManager manager = CraftingManager.getInstance(); rLPRAltar = new ShapedRecipe(BlocksAS.blockAltar) .addPart(BlockBlackMarble.BlackMarbleBlockType.RAW.asStack(), ShapedRecipeSlot.UPPER_CENTER) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.LOWER_LEFT, ShapedRecipeSlot.UPPER_RIGHT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_RIGHT) .addPart(OreDictAlias.BLOCK_CRAFTING_TABLE, ShapedRecipeSlot.CENTER); rLPRWand = new ShapedRecipe(ItemsAS.wand) .addPart(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.RIGHT) .addPart(OreDictAlias.ITEM_ENDERPEARL, ShapedRecipeSlot.UPPER_RIGHT) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.CENTER, ShapedRecipeSlot.LOWER_LEFT); rRJournal = new ShapedRecipe(ItemsAS.journal) .addPart(ItemsAS.constellationPaper, ShapedRecipeSlot.UPPER_CENTER) .addPart(Items.BOOK, ShapedRecipeSlot.CENTER) .addPart(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_CENTER); rBlackMarbleRaw = new ShapedRecipe(new ItemStack(BlocksAS.blockBlackMarble, 4, BlockBlackMarble.BlackMarbleBlockType.RAW.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_CENTER) .addPart(Items.COAL, ShapedRecipeSlot.CENTER); rMarbleEngraved = new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 5, BlockMarble.MarbleBlockType.ENGRAVED.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_CENTER) .addPart(BlockMarble.MarbleBlockType.CHISELED.asStack(), ShapedRecipeSlot.CENTER); rMarbleRuned = new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 3, BlockMarble.MarbleBlockType.RUNED.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT) .addPart(BlockMarble.MarbleBlockType.CHISELED.asStack(), ShapedRecipeSlot.UPPER_CENTER); rMarbleChiseled = new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 4, BlockMarble.MarbleBlockType.CHISELED.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_CENTER); rMarbleArch = new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 3, BlockMarble.MarbleBlockType.ARCH.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.UPPER_RIGHT); rMarblePillar = new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 2, BlockMarble.MarbleBlockType.PILLAR.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.LEFT); rMarbleBricks = new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 4, BlockMarble.MarbleBlockType.BRICKS.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.CENTER); rSmeltStarmetalOre = new SmeltingRecipe(ItemCraftingComponent.MetaType.STARMETAL_INGOT.asStack()) .setInput(new ItemStack(BlocksAS.customOre, 1, BlockCustomOre.OreType.STARMETAL.ordinal())) .setExp(2F); manager.addRecipe(rLPRAltar.makeLightProximityRecipe()); manager.addRecipe(rLPRWand.makeLightProximityRecipe()); manager.addRecipe(rRJournal.make()); manager.addRecipe(rBlackMarbleRaw.make()); manager.addRecipe(rMarbleArch.make()); manager.addRecipe(rMarblePillar.make()); manager.addRecipe(rMarbleRuned.make()); manager.addRecipe(rMarbleEngraved.make()); manager.addRecipe(rMarbleChiseled.make()); manager.addRecipe(rMarbleBricks.make()); rSmeltStarmetalOre.register(); } public static void initAltarRecipes() { //ItemStack mRuned = new ItemStack(BlocksAS.blockMarble, 1, BlockMarble.MarbleBlockType.RUNED.ordinal()); //ItemStack mChisel = new ItemStack(BlocksAS.blockMarble, 1, BlockMarble.MarbleBlockType.CHISELED.ordinal()); //ItemStack mEngraved = new ItemStack(BlocksAS.blockMarble, 1, BlockMarble.MarbleBlockType.ENGRAVED.ordinal()); //ItemStack mBricks = new ItemStack(BlocksAS.blockMarble, 1, BlockMarble.MarbleBlockType.BRICKS.ordinal()); //ItemStack mPillar = new ItemStack(BlocksAS.blockMarble, 1, BlockMarble.MarbleBlockType.PILLAR.ordinal()); //ItemStack mArch = new ItemStack(BlocksAS.blockMarble, 1, BlockMarble.MarbleBlockType.ARCH.ordinal()); //ItemStack mRaw = new ItemStack(BlocksAS.blockMarble, 1, BlockMarble.MarbleBlockType.RAW.ordinal()); //ItemStack aquamarine = new ItemStack(ItemsAS.craftingComponent, 1, ItemCraftingComponent.MetaType.AQUAMARINE.getItemMeta()); rTelescope = registerAltarRecipe(new TelescopeRecipe()); rGrindstone = registerAltarRecipe(new GrindstoneRecipe()); rRitualPedestalRock = registerAltarRecipe(new RecipeRitualPedestal(false)); rRitualPedestalCel = registerAltarRecipe(new RecipeRitualPedestal(true)); rLensRock = registerAltarRecipe(new LensRecipe(false)); rLensCel = registerAltarRecipe(new LensRecipe(true)); rPrismRock = registerAltarRecipe(new PrismLensRecipe(false)); rPrismCel = registerAltarRecipe(new PrismLensRecipe(true)); rCollectRock = registerAltarRecipe(new CollectorCrystalRecipe(false)); rCollectCel = registerAltarRecipe(new CollectorCrystalRecipe(true)); rAttunementAltarRock = registerAltarRecipe(new AttunementAltarRecipe(false)); rAttunementAltarCel = registerAltarRecipe(new AttunementAltarRecipe(true)); rAltarUpgradeAttenuationRock = registerAltarRecipe(new AttunementUpgradeRecipe(false)); rAltarUpgradeAttenuationCel = registerAltarRecipe(new AttunementUpgradeRecipe(true)); rAltarUpgradeConstellationRock = registerAltarRecipe(new ConstellationUpgradeRecipe(false)); rAltarUpgradeConstellationCel = registerAltarRecipe(new ConstellationUpgradeRecipe(true)); rTreeBeacon = registerAttenuationRecipe(new ShapedRecipe(BlocksAS.treeBeacon) .addPart(BlockMarble.MarbleBlockType.RUNED.asStack(), ShapedRecipeSlot.LOWER_LEFT, ShapedRecipeSlot.LOWER_RIGHT) .addPart(OreDictAlias.BLOCK_LEAVES, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT) .addPart(OreDictAlias.BLOCK_SAPLING, ShapedRecipeSlot.CENTER) .addPart(BlocksAS.fluidLiquidStarlight, ShapedRecipeSlot.LOWER_CENTER) .addPart(ItemCraftingComponent.MetaType.RESO_GEM.asStack(), ShapedRecipeSlot.UPPER_CENTER)); rTreeBeacon.setAttItem(BlockMarble.MarbleBlockType.RUNED.asStack(), AttunementRecipe.AltarSlot.LOWER_LEFT, AttunementRecipe.AltarSlot.LOWER_RIGHT); rTreeBeacon.setPassiveStarlightRequirement(3500); rStarlightInfuserRock = registerAttenuationRecipe(new ShapedRecipe(BlocksAS.starlightInfuser) .addPart(ItemsAS.rockCrystal, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT) .addPart(ItemCraftingComponent.MetaType.GLASS_LENS.asStack(), ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT) .addPart(BlockMarble.MarbleBlockType.RUNED.asStack(), ShapedRecipeSlot.LOWER_RIGHT, ShapedRecipeSlot.LOWER_CENTER, ShapedRecipeSlot.LOWER_LEFT) .addPart(BlocksAS.fluidLiquidStarlight, ShapedRecipeSlot.CENTER)); rStarlightInfuserRock.setAttItem(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), AttunementRecipe.AltarSlot.UPPER_LEFT, AttunementRecipe.AltarSlot.UPPER_RIGHT); rStarlightInfuserRock.setAttItem(BlockMarble.MarbleBlockType.ENGRAVED.asStack(), AttunementRecipe.AltarSlot.LOWER_LEFT, AttunementRecipe.AltarSlot.LOWER_RIGHT); rStarlightInfuserRock.setPassiveStarlightRequirement(3700); rStarlightInfuserCel = registerAttenuationRecipe(new ShapedRecipe(BlocksAS.starlightInfuser) .addPart(ItemsAS.celestialCrystal, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT) .addPart(ItemCraftingComponent.MetaType.GLASS_LENS.asStack(), ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT) .addPart(BlockMarble.MarbleBlockType.RUNED.asStack(), ShapedRecipeSlot.LOWER_RIGHT, ShapedRecipeSlot.LOWER_CENTER, ShapedRecipeSlot.LOWER_LEFT) .addPart(BlocksAS.fluidLiquidStarlight, ShapedRecipeSlot.CENTER)); rStarlightInfuserCel.setAttItem(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), AttunementRecipe.AltarSlot.UPPER_LEFT, AttunementRecipe.AltarSlot.UPPER_RIGHT); rStarlightInfuserCel.setAttItem(BlockMarble.MarbleBlockType.ENGRAVED.asStack(), AttunementRecipe.AltarSlot.LOWER_LEFT, AttunementRecipe.AltarSlot.LOWER_RIGHT); rStarlightInfuserCel.setPassiveStarlightRequirement(3700); rHandTelescope = registerDiscoveryRecipe(new ShapedRecipe(ItemsAS.handTelescope) .addPart(ItemCraftingComponent.MetaType.GLASS_LENS.asStack(), ShapedRecipeSlot.UPPER_RIGHT) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LOWER_CENTER) .addPart(OreDictAlias.ITEM_GOLD_INGOT, ShapedRecipeSlot.CENTER) .addPart(OreDictAlias.BLOCK_WOOD_PLANKS, ShapedRecipeSlot.LOWER_LEFT)); rGlassLensFire = registerAttenuationRecipe(new ShapedRecipe(ItemColoredLens.ColorType.FIRE.asStack()) .addPart(ItemCraftingComponent.MetaType.GLASS_LENS.asStack(), ShapedRecipeSlot.CENTER) .addPart(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LOWER_CENTER)); rGlassLensFire.setAttItem(Items.BLAZE_POWDER, AttunementRecipe.AltarSlot.values()); rGlassLensBreak = registerAttenuationRecipe(new ShapedRecipe(ItemColoredLens.ColorType.BREAK.asStack()) .addPart(ItemCraftingComponent.MetaType.GLASS_LENS.asStack(), ShapedRecipeSlot.CENTER) .addPart(OreDictAlias.ITEM_DIAMOND, ShapedRecipeSlot.UPPER_CENTER) .addPart(OreDictAlias.ITEM_GOLD_INGOT, ShapedRecipeSlot.LOWER_LEFT, ShapedRecipeSlot.LOWER_RIGHT)); rGlassLensBreak.setAttItem(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), AttunementRecipe.AltarSlot.UPPER_RIGHT, AttunementRecipe.AltarSlot.UPPER_LEFT); rGlassLensDamage = registerAttenuationRecipe(new ShapedRecipe(ItemColoredLens.ColorType.DAMAGE.asStack()) .addPart(ItemCraftingComponent.MetaType.GLASS_LENS.asStack(), ShapedRecipeSlot.CENTER) .addPart(Items.FLINT, ShapedRecipeSlot.LOWER_LEFT, ShapedRecipeSlot.LOWER_RIGHT) .addPart(OreDictAlias.ITEM_DIAMOND, ShapedRecipeSlot.UPPER_CENTER) .addPart(OreDictAlias.ITEM_IRON_INGOT, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT)); rGlassLensDamage.setAttItem(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), AttunementRecipe.AltarSlot.LOWER_LEFT, AttunementRecipe.AltarSlot.LOWER_RIGHT); rGlassLensGrowth = registerAttenuationRecipe(new ShapedRecipe(ItemColoredLens.ColorType.GROW.asStack()) .addPart(ItemCraftingComponent.MetaType.GLASS_LENS.asStack(), ShapedRecipeSlot.CENTER) .addPart(Items.WHEAT_SEEDS, ShapedRecipeSlot.LOWER_LEFT, ShapedRecipeSlot.LOWER_RIGHT) .addPart(OreDictAlias.ITEM_CARROT, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT) .addPart(OreDictAlias.ITEM_SUGARCANE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT) .addPart(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), ShapedRecipeSlot.UPPER_CENTER)); rGlassLensGrowth.setAttItem(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), AttunementRecipe.AltarSlot.values()); rGlassLensRegeneration = registerAttenuationRecipe(new ShapedRecipe(ItemColoredLens.ColorType.REGEN.asStack()) .addPart(ItemCraftingComponent.MetaType.GLASS_LENS.asStack(), ShapedRecipeSlot.CENTER) .addPart(Items.GHAST_TEAR, ShapedRecipeSlot.UPPER_CENTER) .addPart(OreDictAlias.ITEM_DIAMOND, ShapedRecipeSlot.LOWER_CENTER)); rGlassLensRegeneration.setAttItem(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), AttunementRecipe.AltarSlot.UPPER_LEFT, AttunementRecipe.AltarSlot.UPPER_RIGHT); rGlassLensNightvision = registerAttenuationRecipe(new ShapedRecipe(ItemColoredLens.ColorType.NIGHT.asStack()) .addPart(ItemCraftingComponent.MetaType.GLASS_LENS.asStack(), ShapedRecipeSlot.CENTER) .addPart(Items.GOLDEN_CARROT, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT) .addPart(OreDictAlias.ITEM_GLOWSTONE_DUST, ShapedRecipeSlot.LOWER_CENTER)); rGlassLensNightvision.setAttItem(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), AttunementRecipe.AltarSlot.UPPER_RIGHT, AttunementRecipe.AltarSlot.UPPER_LEFT); rAttenuationAltarRelay = registerAttenuationRecipe(new ShapedRecipe(BlocksAS.attunementRelay) .addPart(OreDictAlias.ITEM_GOLD_INGOT, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT) .addPart(OreDictAlias.BLOCK_WOOD_PLANKS, ShapedRecipeSlot.LOWER_LEFT, ShapedRecipeSlot.LOWER_RIGHT) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.LOWER_CENTER) .addPart(ItemCraftingComponent.MetaType.GLASS_LENS.asStack(), ShapedRecipeSlot.CENTER)); rLinkToolRock = registerConstellationRecipe(new ShapedRecipe(ItemsAS.linkingTool) .addPart(OreDictAlias.BLOCK_WOOD_LOGS, ShapedRecipeSlot.CENTER, ShapedRecipeSlot.LOWER_LEFT) .addPart(ItemCraftingComponent.MetaType.RESO_GEM.asStack(), ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.RIGHT) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.LOWER_RIGHT) .addPart(ItemsAS.rockCrystal, ShapedRecipeSlot.UPPER_RIGHT)) .setCstItem(OreDictAlias.ITEM_STICKS, ConstellationRecipe.AltarAdditionalSlot.UP_UP_LEFT, ConstellationRecipe.AltarAdditionalSlot.DOWN_RIGHT_RIGHT) .setCstItem(ItemCraftingComponent.MetaType.RESO_GEM.asStack(), ConstellationRecipe.AltarAdditionalSlot.UP_UP_RIGHT, ConstellationRecipe.AltarAdditionalSlot.UP_RIGHT_RIGHT); rLinkToolRock.setAttItem(OreDictAlias.BLOCK_WOOD_LOGS, AttunementRecipe.AltarSlot.LOWER_LEFT); rLinkToolCel = registerConstellationRecipe(new ShapedRecipe(ItemsAS.linkingTool) .addPart(OreDictAlias.BLOCK_WOOD_LOGS, ShapedRecipeSlot.CENTER, ShapedRecipeSlot.LOWER_LEFT) .addPart(ItemCraftingComponent.MetaType.RESO_GEM.asStack(), ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.RIGHT) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.LOWER_RIGHT) .addPart(ItemsAS.celestialCrystal, ShapedRecipeSlot.UPPER_RIGHT)) .setCstItem(OreDictAlias.ITEM_STICKS, ConstellationRecipe.AltarAdditionalSlot.UP_UP_LEFT, ConstellationRecipe.AltarAdditionalSlot.DOWN_RIGHT_RIGHT) .setCstItem(ItemCraftingComponent.MetaType.RESO_GEM.asStack(), ConstellationRecipe.AltarAdditionalSlot.UP_UP_RIGHT, ConstellationRecipe.AltarAdditionalSlot.UP_RIGHT_RIGHT); rLinkToolCel.setAttItem(OreDictAlias.BLOCK_WOOD_LOGS, AttunementRecipe.AltarSlot.LOWER_LEFT); rLightwell = registerDiscoveryRecipe(new ShapedRecipe(BlocksAS.blockWell) .addPart(BlockMarble.MarbleBlockType.RUNED.asStack(), ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT, ShapedRecipeSlot.LOWER_CENTER) .addPart(BlockMarble.MarbleBlockType.CHISELED.asStack(), ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT) .addPart(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), ShapedRecipeSlot.LOWER_LEFT, ShapedRecipeSlot.LOWER_RIGHT) .addPart(ItemsAS.rockCrystal, ShapedRecipeSlot.CENTER)); rLightwell.setPassiveStarlightRequirement(800); rIlluminatorRock = registerAttenuationRecipe(new ShapedRecipe(BlocksAS.blockIlluminator) .addPart(BlockMarble.MarbleBlockType.RUNED.asStack(), ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT, ShapedRecipeSlot.LOWER_LEFT, ShapedRecipeSlot.LOWER_RIGHT) .addPart(ItemsAS.rockCrystal, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT) .addPart(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LOWER_CENTER)) .setAttItem(OreDictAlias.ITEM_GLOWSTONE_DUST, AttunementRecipe.AltarSlot.values()); rIlluminatorRock.setPassiveStarlightRequirement(3700); rIlluminatorCel = registerAttenuationRecipe(new ShapedRecipe(BlocksAS.blockIlluminator) .addPart(BlockMarble.MarbleBlockType.RUNED.asStack(), ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT, ShapedRecipeSlot.LOWER_LEFT, ShapedRecipeSlot.LOWER_RIGHT) .addPart(ItemsAS.celestialCrystal, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT) .addPart(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LOWER_CENTER)) .setAttItem(OreDictAlias.ITEM_GLOWSTONE_DUST, AttunementRecipe.AltarSlot.values()); rIlluminatorCel.setPassiveStarlightRequirement(3700); rWand = registerAltarRecipe(new DiscoveryRecipe(new ShapedRecipe(ItemsAS.wand) .addPart(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.UPPER_CENTER) .addPart(OreDictAlias.ITEM_ENDERPEARL, ShapedRecipeSlot.UPPER_RIGHT) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.CENTER, ShapedRecipeSlot.LOWER_LEFT))); rWand.setPassiveStarlightRequirement(200); rJournal = registerDiscoveryRecipe(new ShapedRecipe(ItemsAS.journal) .addPart(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_CENTER) .addPart(Items.BOOK, ShapedRecipeSlot.CENTER) .addPart(ItemsAS.constellationPaper, ShapedRecipeSlot.UPPER_CENTER)); rJournal.setPassiveStarlightRequirement(20); registerDiscoveryRecipe(new ShapedRecipe(new ItemStack(BlocksAS.blockBlackMarble, 4, BlockBlackMarble.BlackMarbleBlockType.RAW.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_CENTER) .addPart(Items.COAL, ShapedRecipeSlot.CENTER)).setPassiveStarlightRequirement(20); registerAltarRecipe(new DiscoveryRecipe(new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 3, BlockMarble.MarbleBlockType.RUNED.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT) .addPart(BlockMarble.MarbleBlockType.CHISELED.asStack(), ShapedRecipeSlot.UPPER_CENTER))).setPassiveStarlightRequirement(20); registerAltarRecipe(new DiscoveryRecipe(new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 5, BlockMarble.MarbleBlockType.ENGRAVED.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_CENTER) .addPart(BlockMarble.MarbleBlockType.CHISELED.asStack(), ShapedRecipeSlot.CENTER))).setPassiveStarlightRequirement(20); registerAltarRecipe(new DiscoveryRecipe(new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 4, BlockMarble.MarbleBlockType.CHISELED.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_CENTER))).setPassiveStarlightRequirement(20); registerAltarRecipe(new DiscoveryRecipe(new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 3, BlockMarble.MarbleBlockType.ARCH.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.UPPER_RIGHT))).setPassiveStarlightRequirement(20); registerAltarRecipe(new DiscoveryRecipe(new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 2, BlockMarble.MarbleBlockType.PILLAR.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.LEFT))).setPassiveStarlightRequirement(20); registerAltarRecipe(new DiscoveryRecipe(new ShapedRecipe(new ItemStack(BlocksAS.blockMarble, 4, BlockMarble.MarbleBlockType.BRICKS.ordinal())) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.CENTER))).setPassiveStarlightRequirement(20); rAltar = registerAltarRecipe(new DiscoveryRecipe(new ShapedRecipe(BlocksAS.blockAltar) .addPart(OreDictAlias.BLOCK_CRAFTING_TABLE, ShapedRecipeSlot.CENTER) .addPart(BlockBlackMarble.BlackMarbleBlockType.RAW.asStack(), ShapedRecipeSlot.UPPER_CENTER) .addPart(OreDictAlias.BLOCK_MARBLE, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_RIGHT, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_LEFT, ShapedRecipeSlot.LOWER_RIGHT))); rAltar.setPassiveStarlightRequirement(10); rCCGlassLens = registerDiscoveryRecipe(new ShapedRecipe(ItemCraftingComponent.MetaType.GLASS_LENS.asStack()) .addPart(OreDictAlias.BLOCK_GLASS_PANE_NOCOLOR, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT, ShapedRecipeSlot.RIGHT, ShapedRecipeSlot.LOWER_CENTER) .addPart(ItemCraftingComponent.MetaType.AQUAMARINE.asStack(), ShapedRecipeSlot.CENTER)); rCCGlassLens.setPassiveStarlightRequirement(100); rCToolRockSword = registerAltarRecipe(new CrystalToolRecipe( new ShapedRecipe(ItemsAS.crystalSword) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.LOWER_CENTER) .addPart(ItemsAS.rockCrystal, ShapedRecipeSlot.CENTER, ShapedRecipeSlot.UPPER_CENTER), ShapedRecipeSlot.CENTER, ShapedRecipeSlot.UPPER_CENTER)); rCToolRockShovel = registerAltarRecipe(new CrystalToolRecipe( new ShapedRecipe(ItemsAS.crystalShovel) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.LOWER_CENTER, ShapedRecipeSlot.CENTER) .addPart(ItemsAS.rockCrystal, ShapedRecipeSlot.UPPER_CENTER), ShapedRecipeSlot.UPPER_CENTER)); rCToolRockPick = registerAltarRecipe(new CrystalToolRecipe( new ShapedRecipe(ItemsAS.crystalPickaxe) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.LOWER_CENTER, ShapedRecipeSlot.CENTER) .addPart(ItemsAS.rockCrystal, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.UPPER_RIGHT), ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.UPPER_RIGHT)); rCToolRockAxe = registerAltarRecipe(new CrystalToolRecipe( new ShapedRecipe(ItemsAS.crystalAxe) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.LOWER_CENTER, ShapedRecipeSlot.CENTER) .addPart(ItemsAS.rockCrystal, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT), ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT)); rCToolCelSword = registerAltarRecipe(new CrystalToolRecipe( new ShapedRecipe(ItemsAS.crystalSword) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.LOWER_CENTER) .addPart(ItemsAS.celestialCrystal, ShapedRecipeSlot.CENTER, ShapedRecipeSlot.UPPER_CENTER), ShapedRecipeSlot.CENTER, ShapedRecipeSlot.UPPER_CENTER)); rCToolCelShovel = registerAltarRecipe(new CrystalToolRecipe( new ShapedRecipe(ItemsAS.crystalShovel) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.LOWER_CENTER, ShapedRecipeSlot.CENTER) .addPart(ItemsAS.celestialCrystal, ShapedRecipeSlot.UPPER_CENTER), ShapedRecipeSlot.UPPER_CENTER)); rCToolCelPick = registerAltarRecipe(new CrystalToolRecipe( new ShapedRecipe(ItemsAS.crystalPickaxe) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.LOWER_CENTER, ShapedRecipeSlot.CENTER) .addPart(ItemsAS.celestialCrystal, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.UPPER_RIGHT), ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.UPPER_RIGHT)); rCToolCelAxe = registerAltarRecipe(new CrystalToolRecipe( new ShapedRecipe(ItemsAS.crystalAxe) .addPart(OreDictAlias.ITEM_STICKS, ShapedRecipeSlot.LOWER_CENTER, ShapedRecipeSlot.CENTER) .addPart(ItemsAS.celestialCrystal, ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT), ShapedRecipeSlot.UPPER_LEFT, ShapedRecipeSlot.UPPER_CENTER, ShapedRecipeSlot.LEFT)); } }
[ "dendorfer.maximilian0@googlemail.com" ]
dendorfer.maximilian0@googlemail.com
e803cb1716ff2fedf6d78e7b3c234c502f61231f
4f6489d04b33f99f017c575210b73ff32072a0af
/src/main/java/com/mycompany/actividad11java/Circle.java
3d53acbfac4863ae562687203d7150a7b226d9f5
[]
no_license
FelipeRdz17/Actividad-11.-Java
ea23ff96f4d2538ccb14512723fe624a8704d181
f60627545975dd2752493db149b6eafa5e732411
refs/heads/master
2023-01-07T22:03:07.217754
2020-11-06T03:28:14
2020-11-06T03:28:14
310,481,670
0
0
null
null
null
null
UTF-8
Java
false
false
1,154
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.mycompany.actividad11java; import java.util.Scanner; /** * * @author felip */ public class Circle { //DECLARACIÓN DE VARIABLES double area, r, perimeter,b,radio,pi; //INTERFAZ AREA public void getArea(){ Scanner inputUsuario = new Scanner(System.in); System.out.println("Opcion selecciona: Circulo."); System.out.println("Ingrese el radio del Circulo"); r = inputUsuario.nextDouble(); area = (((3.1416)*(r*r))); System.out.println(area); System.exit(0); } //INTERFAZ PERIMETRO public void getPerimeter(){ Scanner inputUsuario = new Scanner(System.in); System.out.println("Opcion selecciona: Circulo."); System.out.println("Ingrese el radio del Circulo"); r = inputUsuario.nextDouble(); pi = ((3.1416)*(3.1416)); perimeter = pi*r; System.out.println(perimeter); System.exit(0); } }
[ "feliperdz2009@hotmail.com" ]
feliperdz2009@hotmail.com
f5f2ba8c8fcb8404c4f26d462dd7b750cd621e14
d36609aad8f8ddf4150ba718d4cec44ea9b9b8bd
/kryo-serialisation/src/main/java/com/aristoula/messages/AnotherClass.java
52c6b7a75b0ab3300c820c957d34dc4aff9ab524
[]
no_license
arisgoulia/akka_play
d23bd2e69a6fef07be7c480b667cdb667bcaafae
60ab66da127d274c5e2a3756b407df3f87a56db1
refs/heads/master
2021-01-19T00:55:08.461001
2016-12-10T14:28:13
2016-12-10T14:28:13
64,414,023
1
0
null
null
null
null
UTF-8
Java
false
false
613
java
package com.aristoula.messages; import com.esotericsoftware.kryo.serializers.TaggedFieldSerializer; import org.apache.commons.lang3.builder.ToStringBuilder; public class AnotherClass { @TaggedFieldSerializer.Tag(1) private String epic; @TaggedFieldSerializer.Tag(2) private String another; public AnotherClass(final String epic) { this.epic = epic; } public String getEpic() { return epic; } @Override public String toString() { return new ToStringBuilder(this) .append("epic", epic) .toString(); } }
[ "aristoula.goulia@nexmo.com" ]
aristoula.goulia@nexmo.com
0a292b7dfa965f8fc3c03dfc6f8d28a4b1c552fa
416d726bd01ccc75298b730e32f8ff306c5b70bf
/MJCompiler/src/rs/ac/bg/etf/pp1/ast/GlobalVarList.java
fa578d8fdbea3c296a99ff110536c92c22428fa9
[]
no_license
DusanStijovic/micro-java-compiler
9707f8e06037094d767c9cc015f2721808ee862a
6f99bde5e94490e6b50a644337e9d6e46ba9273b
refs/heads/main
2023-03-04T05:59:20.799876
2021-02-14T22:01:57
2021-02-14T22:01:57
317,612,442
0
1
null
null
null
null
UTF-8
Java
false
false
828
java
// generated with ast extension for cup // version 0.8 // 20/0/2021 22:55:7 package rs.ac.bg.etf.pp1.ast; public abstract class GlobalVarList implements SyntaxNode { private SyntaxNode parent; private int line; public SyntaxNode getParent() { return parent; } public void setParent(SyntaxNode parent) { this.parent=parent; } public int getLine() { return line; } public void setLine(int line) { this.line=line; } public abstract void accept(Visitor visitor); public abstract void childrenAccept(Visitor visitor); public abstract void traverseTopDown(Visitor visitor); public abstract void traverseBottomUp(Visitor visitor); public String toString() { return toString(""); } public abstract String toString(String tab); }
[ "ducatt1sd9@gmail.com" ]
ducatt1sd9@gmail.com
7d95573fda52f7fdeace678ceb4279f34d50069e
658262a1556a157910e5052169f8f8ef7979ec6d
/src/main/java/com/google/jacquard/test/android/testAndroidBattery.java
526b9c84a11c2b61aebe06a4f4c0c294cd3e1cea
[]
no_license
omk2545/Jacquard_Google
c0dd16943b77f670321206f17278fa41d22f06eb
75996afdd53247f686725ecf26b4360cdfba115f
refs/heads/master
2020-12-02T22:17:35.631219
2017-07-05T15:12:09
2017-07-05T15:12:09
96,108,374
0
0
null
null
null
null
UTF-8
Java
false
false
4,888
java
package com.google.jacquard.test.android; import com.aventstack.extentreports.ExtentTest; import com.google.jacquard.android.JacquardAndroidHelper; import com.google.jacquard.ios.JacquardAppleHelper; import com.google.jacquard.test.base.TestBase; import io.appium.java_client.android.AndroidDriver; import io.appium.java_client.ios.IOSDriver; import org.testng.annotations.AfterMethod; import org.testng.annotations.Test; /** * Created by user on 6/1/17. */ public class testAndroidBattery extends TestBase{ public AndroidDriver androidDriver; public IOSDriver iosDriver; ExtentTest test; @Test public void testCompleteFlow() throws Exception { test = createTest("CompleteFlow Test"); //iosDriver = createSimulatorInstance(); androidDriver = createAndroidInstance(); iosDriver = createSimulatorInstance(); JacquardAndroidHelper androidHelper = new JacquardAndroidHelper(androidDriver,test); JacquardAppleHelper appleHelper = new JacquardAppleHelper(iosDriver,test); int initialBatteryLevel = androidHelper.logInitialBatteryLevel(); System.out.println(initialBatteryLevel); //androidHelper.launchJaquard(); androidHelper.printTheExistingScreen("Splash screen"); androidHelper.clickOngetStated(); androidHelper.printTheExistingScreen("Abilities screen"); androidHelper.swipeUp(); androidHelper.clickonEnableJacquard(); androidHelper.clickOnTagIsReady(); androidHelper.logAndroidRelativeBattery(initialBatteryLevel); // appleHelper.BrushIn(); androidHelper.clickOnAcceptAgrement(); androidHelper.printTheExistingScreen("Activate screen"); androidHelper.selectGoogleAccount(); androidHelper.printTheExistingScreen("select Google account"); // iosDriver = createSimulatorInstance(); // JacquardAppleHelper appleHelper = new JacquardAppleHelper(iosDriver,test); androidHelper.clickOnILookFab(); androidHelper.printTheExistingScreen("Put on your jacket screen"); androidHelper.allowBluetoothAccess(); androidHelper.printTheExistingScreen("Tuck and Snap screen"); if(androidHelper.selectAJacket()){ androidHelper.clickTryOutNewThreads(); androidHelper.printTheExistingScreen("Try out new threads"); androidHelper.clickOnlearnInteractions(); androidHelper.printTheExistingScreen("Learn interaction"); Thread.sleep(3000); if (appleHelper.IsEmulatorConnected()) { androidHelper.clickOnTutorialBrushIn(); Thread.sleep(3000); //appleHelper.BrushIn(); appleHelper.BrushIn(); appleHelper.BrushIn(); androidHelper.assignBrushInGesture(); Thread.sleep(2000); androidHelper.clickOnTutorialBrushOut(); // appleHelper.BrushOut(); appleHelper.BrushOut(); appleHelper.BrushOut(); androidHelper.assignBrushOutGesture(); Thread.sleep(3000); androidHelper.clickOnDoubleTapTutorial(); appleHelper.performDoubleTapMultiple(2); androidHelper.assignDoubleTapGesture(); Thread.sleep(2000); androidHelper.pressHome(); boolean show = true; for (int j = 0; j < androidHelper.getGestureRunTime(); j++) { if(j%5 == 0){ androidHelper.logAndroidRelativeBattery(initialBatteryLevel); if(show) { androidHelper.printTheExistingScreen("Interact"); show = false; }else{ androidHelper.printTheExistingScreen("Reflect"); } } appleHelper.performBlushInMultiple(2); //androidHelper.swipeLeft(); appleHelper.performBlushoutMultiple(2); androidHelper.swipeRight(); // appleHelper.performBlushoutMultiple(2); //androidHelper.swipeLeft(); appleHelper.performBlushInMultiple(2); //androidHelper.swipeRight(); appleHelper.performDoubleTapMultiple(2); androidHelper.logAndroidRelativeBattery(initialBatteryLevel); } }else{ System.out.println("Simulator is not connected "); test.fail("Simulator not created"); } } androidHelper.logAndroidRelativeBattery(initialBatteryLevel); } @AfterMethod public void closeInstances(){ extentReports.flush(); iosDriver.quit(); androidDriver.quit(); } }
[ "omk2545@gmail.com" ]
omk2545@gmail.com
b8a834ff3cce51ea693614509f9e54defc0706ea
b3fb9c0ec271b463c7dffe4133db6be7b57f4a62
/src/main/java/com/qk/service/impl/PropServiceImpl.java
9a469ee43fe25dd3989ca47abb8a562615b17ba2
[]
no_license
qfly96/JAVAPRO
e190a4816386cd7a4936529e81cf5abef847b4c9
e8f45b61fa71a8f25c6ff7fe1e3e0ed0ee0df647
refs/heads/master
2020-03-30T00:50:22.980271
2018-09-27T07:38:01
2018-09-27T07:38:01
150,546,694
0
0
null
null
null
null
UTF-8
Java
false
false
1,794
java
package com.qk.service.impl; import java.util.List; import java.util.UUID; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.google.gson.Gson; import com.qk.mapper.PropsMapper; import com.qk.model.Props; import com.qk.service.PropService; @Service public class PropServiceImpl implements PropService{ private static final String SUCCESS="SUCCESS"; private static final String ERROR="ERROR"; @Autowired private PropsMapper pm; @Autowired private Gson gson; public String insertProp(String propsName,String propsRole,String propsLevel,String propsDescribe) { Props p = new Props(); p.setPropsId(UUID.randomUUID().toString()); p.setPropsName(propsName); p.setPropsRole(propsRole); p.setPropsLevel(propsLevel); p.setPropsDescribe(propsDescribe); try { return pm.insert(p)>0?SUCCESS:ERROR; } catch (Exception e) { return ERROR; } } @Override public List<Props> selectAllProps() { return pm.selectAllProps(); } @Override public String removeProp(String propsId) { try { return pm.deleteByPrimaryKey(propsId)>0?SUCCESS:ERROR; } catch (Exception e) { return ERROR; } } @Override public String getAllPropByJson() { return gson.toJson(pm.selectAllProps()); } @Override @Transactional(rollbackFor=Exception.class) public String removePropByCheckedAjax(String[] ids) { try { int count = 0; for (int i = 0; i < ids.length; i++) { count += pm.deleteByPrimaryKey(ids[i].replaceAll("/", "")); } return count == ids.length?SUCCESS:ERROR; } catch (Exception e) { return ERROR; } } }
[ "Administrator@QK" ]
Administrator@QK
2ed145a5cdcefdb52e08838333f8e931d8484c52
bcc1eea8bff22eaff586119b511ddf34495eb9b9
/crazy-java/10/10.5/PrintStackTraceTest.java
9416d20f240904f3e2f65f9c5152b5321cd80286
[]
no_license
Alexander360/code-library
32dfc55cc5636ce508cb3a9880b40b793f09061f
bf943051066cf26fb6b7755e143f41fc48ff47ec
refs/heads/master
2020-04-10T00:55:28.324576
2018-12-06T03:41:04
2018-12-06T03:41:04
160,700,054
1
0
null
2018-12-06T16:13:55
2018-12-06T16:13:54
null
GB18030
Java
false
false
750
java
/** * Description: * <br/>网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> * <br/>Copyright (C), 2001-2016, Yeeku.H.Lee * <br/>This program is protected by copyright laws. * <br/>Program Name: * <br/>Date: * @author Yeeku.H.Lee kongyeeku@163.com * @version 1.0 */ class SelfException extends RuntimeException { SelfException(){} SelfException(String msg) { super(msg); } } public class PrintStackTraceTest { public static void main(String[] args) { firstMethod(); } public static void firstMethod() { secondMethod(); } public static void secondMethod() { thirdMethod(); } public static void thirdMethod() { throw new SelfException("自定义异常信息"); } }
[ "gongxf@craiditx.com" ]
gongxf@craiditx.com
9a21d6685df543aeea99d3a1e3fc4b5db43475fc
9fcdb04e131012975eeeddc5f4191ddc775f12be
/app/src/main/java/com/dtw/fellinghouse/View/SmsCodeLogin/SmsCodeLoginView.java
355288a98935c845cec2ae12dfd858ba7f404e52
[]
no_license
dtwdtw/FellingHouse
c1eaf598d03afcee74a9ae694788968aff2c4054
1baec5f3eb5bd3efba50819267ba67ad052132b3
refs/heads/master
2021-05-23T05:24:45.491950
2018-05-11T03:36:17
2018-05-11T03:36:17
95,191,792
0
0
null
null
null
null
UTF-8
Java
false
false
329
java
package com.dtw.fellinghouse.View.SmsCodeLogin; /** * Created by Administrator on 2017/6/28 0028. */ public interface SmsCodeLoginView { void showToast(String msg); void goBackWidthData(); void setCodeBtnText(String text); void setEnableCodeBtn(boolean enable); void setEnableRegistBtn(boolean enable); }
[ "785936508@qq.com" ]
785936508@qq.com