blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6607cf92b08ddf0f1b983333e129f67353236943
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava18/Foo263.java
|
f0a80da62a99ace8ab21efec77b177dbd365b947
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 348
|
java
|
package applicationModulepackageJava18;
public class Foo263 {
public void foo0() {
new applicationModulepackageJava18.Foo262().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
0e52c748bb6f84948c974a182dead7c4115cb084
|
38d766eccf89a3503ce7b6769e32b088f50939b9
|
/backoffice/src/main/java/com/angkorteam/framework/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.java
|
ee4f10bf850ca618b57e59e5730e22fa819e4eda
|
[
"Apache-2.0"
] |
permissive
|
PkayJava/ECommerce
|
e4bd6aade8f1121b0fce2e7b959594789b782d7b
|
a04f50130efb96be7a25fd936ba638ce0cfe50cd
|
refs/heads/master
| 2021-01-18T13:11:34.017001
| 2017-03-12T08:15:44
| 2017-03-12T08:16:08
| 80,732,080
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 622
|
java
|
package com.angkorteam.framework.wicket.extensions.markup.html.repeater.data.table.filter;
import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable;
import org.apache.wicket.extensions.markup.html.repeater.data.table.filter.FilterForm;
/**
* @author Socheat KHAUV
*/
public class FilterToolbar extends org.apache.wicket.extensions.markup.html.repeater.data.table.filter.FilterToolbar {
/**
*
*/
private static final long serialVersionUID = 7585327710822016088L;
public <T, S, F> FilterToolbar(DataTable<T, S> table, FilterForm<F> form) {
super(table, form);
}
}
|
[
"pkayjava@gmail.com"
] |
pkayjava@gmail.com
|
1f25144578feae61b005c8f82f6d58a0a81c73a5
|
e78524f7bde2dc64056a7173982fc49146cb06ee
|
/workspace/app_v2/bshare_src/com/bshare/ui/ShareListDialog.java
|
afbe342499f74d181c0f6ad289a90d299814da57
|
[] |
no_license
|
ben-kenobi/android_lagacy
|
90b417538a94c1643ef8b70998c478ec508eb217
|
ecaf31f82a8245f9c0a3702870cfa84ac747b6e1
|
refs/heads/master
| 2020-12-24T08:08:36.967953
| 2017-06-06T16:12:21
| 2017-06-06T16:12:21
| 73,343,156
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,622
|
java
|
package com.bshare.ui;
import java.util.ArrayList;
import java.util.List;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.Display;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.widget.FrameLayout;
import android.widget.ListView;
import android.widget.Toast;
import com.bshare.core.BSShareItem;
import com.bshare.core.BShareShareListAdapter;
import com.bshare.core.BShareWindowHandler;
import com.bshare.core.Config;
import com.bshare.core.Constants;
import com.bshare.core.PlatformType;
import com.bshare.platform.GeneralPlatform;
import com.bshare.platform.Platform;
import com.bshare.platform.PlatformFactory;
import com.bshare.utils.BSUtils;
/**
*
* @author chris.xue
*
*/
public class ShareListDialog extends Dialog implements android.view.View.OnClickListener {
public ShareListDialog(Context context, BSShareItem shareItem) {
super(context, BSUtils.getResourseIdByName(context, "style", "bshare_dialog"));
this.shareItem = shareItem;
}
public ShareListDialog(Context context, BSShareItem shareItem, BShareWindowHandler windowHandler) {
this(context, shareItem);
registerWindowHandler(windowHandler);
}
public void registerWindowHandler(BShareWindowHandler windowHandler) {
if (windowHandler != null) {
windowHandlers.add(windowHandler);
}
}
public void unregisterWindowHandler(BShareWindowHandler windowHandler) {
if (windowHandler != null) {
windowHandlers.remove(windowHandler);
}
}
protected BSShareItem shareItem;
private List<BShareWindowHandler> windowHandlers = new ArrayList<BShareWindowHandler>();
protected View btnMore;
protected ListView lvPlatform;
protected List<PlatformType> platformList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setCanceledOnTouchOutside(true);
requestWindowFeature(Window.FEATURE_NO_TITLE);
View content = LayoutInflater.from(getContext()).inflate(
BSUtils.getResourseIdByName(getContext(), "layout", "bshare_share_list"), null);
setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
if (windowHandlers.isEmpty()) {
for (BShareWindowHandler h : windowHandlers) {
if (h != null) {
h.onWindowClose(this);
}
}
windowHandlers.clear();
}
}
});
Display display = getWindow().getWindowManager().getDefaultDisplay();
float scale = getContext().getResources().getDisplayMetrics().density;
float[] dimensions = display.getWidth() < display.getHeight() ? Constants.DIMENSIONS_PORTRAIT
: Constants.DIMENSIONS_LANDSCAPE;
addContentView(content, new FrameLayout.LayoutParams((int) (dimensions[0] * scale + 0.5f),
(int) (dimensions[1] * scale + 0.5f)));
// setContentView(content);
platformList = new ArrayList<PlatformType>(Config.instance().getShareList());
btnMore = findViewById(BSUtils.getResourseIdByName(getContext(), "id", "bs_share_button_more"));
lvPlatform = (ListView) findViewById(BSUtils.getResourseIdByName(getContext(), "id",
"bs_share_button_list_view"));
BShareShareListAdapter adapter = new BShareShareListAdapter(getContext(), platformList, this);
lvPlatform.setAdapter(adapter);
if (btnMore != null) {
if (Config.instance().isShouldDisplayMore()) {
btnMore.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Dialog moreList = Config.instance().getDialogBuilder()
.buildMoreListDialog(getContext(), shareItem, null);
moreList.show();
if (isShowing()) {
dismiss();
}
}
});
} else {
btnMore.setVisibility(View.GONE);
}
}
}
public void share(PlatformType platformType) {
final Platform platform = PlatformFactory.getPlatform(getContext(), platformType);
platform.setShareItem(shareItem);
if (!BSUtils.isOnline(getContext())) {
Toast.makeText(getContext(),
BSUtils.getResourseIdByName(getContext(), "string", "bshare_error_msg_offline"), Toast.LENGTH_SHORT)
.show();
} else {
if ((platform instanceof GeneralPlatform) == true) {
platform.share();
} else {
platform.setAccessTokenAndSecret(getContext());
if (platform.validation(true)) {
AsyncTask<Object, Object, Object> task = new AsyncTask<Object, Object, Object>() {
@Override
protected Object doInBackground(Object... params) {
platform.share();
return null;
}
};
task.execute();
}
}
}
if (Config.instance().isAutoCloseShareList() && isShowing()) {
dismiss();
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (isShowing()) {
dismiss();
}
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public void onClick(View item) {
PlatformType p = (PlatformType) item.getTag();
if (p != null) {
final Platform platform = PlatformFactory.getPlatform(getContext(), p);
platform.setShareItem(shareItem);
if (!BSUtils.isOnline(getContext())) {
Toast.makeText(getContext(),
BSUtils.getResourseIdByName(getContext(), "string", "bshare_error_msg_offline"),
Toast.LENGTH_SHORT).show();
} else {
if ((platform instanceof GeneralPlatform) == true) {
platform.share();
} else {
platform.setAccessTokenAndSecret(getContext());
if (platform.validation(true)) {
AsyncTask<Object, Object, Object> task = new AsyncTask<Object, Object, Object>() {
@Override
protected Object doInBackground(Object... params) {
platform.share();
return null;
}
};
task.execute();
}
}
}
if (Config.instance().isAutoCloseShareList() && isShowing()) {
dismiss();
}
}
}
}
|
[
"whatelsecani@gmail.com"
] |
whatelsecani@gmail.com
|
252151e7be840d15a704e510d60600cb4bf8d332
|
d573b8c79f7be22043de9579039700d2989cdc39
|
/de.fxdiagram.lib/xtend-gen/de/fxdiagram/lib/simple/OpenDiagramCommand.java
|
abb94f3d008decf3817814090237426ac18dde43
|
[] |
no_license
|
nagyistge/FXDiagram
|
1200c917663a0eb58868c75e74f1b44fb71b95d3
|
f8386bfb6343ba4d009d2111b9e1e56ab45bd581
|
refs/heads/master
| 2021-01-25T08:12:39.447472
| 2017-05-10T17:34:25
| 2017-05-10T17:34:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,257
|
java
|
package de.fxdiagram.lib.simple;
import de.fxdiagram.core.command.AnimationCommand;
import de.fxdiagram.core.command.CommandContext;
import de.fxdiagram.lib.simple.OpenableDiagramNode;
import javafx.animation.Animation;
import javafx.util.Duration;
@SuppressWarnings("all")
public class OpenDiagramCommand implements AnimationCommand {
private OpenableDiagramNode host;
public OpenDiagramCommand(final OpenableDiagramNode host) {
this.host = host;
}
@Override
public Animation getExecuteAnimation(final CommandContext context) {
Duration _defaultExecuteDuration = context.getDefaultExecuteDuration();
return this.host.openDiagram(_defaultExecuteDuration);
}
@Override
public Animation getUndoAnimation(final CommandContext context) {
Duration _defaultUndoDuration = context.getDefaultUndoDuration();
return this.host.closeDiagram(_defaultUndoDuration);
}
@Override
public Animation getRedoAnimation(final CommandContext context) {
Duration _defaultUndoDuration = context.getDefaultUndoDuration();
return this.host.openDiagram(_defaultUndoDuration);
}
@Override
public boolean clearRedoStackOnExecute() {
return true;
}
@Override
public void skipViewportRestore() {
}
}
|
[
"jan.koehnlein@itemis.de"
] |
jan.koehnlein@itemis.de
|
4305fd85d1bbb6f2c0f730c037386ac0744b3481
|
bbfa28d1aacf2048b3e7b489d9ed74039fbd563b
|
/src/main/java/com/sharehoo/util/ServletUtils.java
|
c53f6d21fbccf5436b2f004b095a04f48fa95011
|
[] |
no_license
|
miki-hmt/sharehoo
|
bbf606b5c1979c4cf950f0c92fa24bd3040593d6
|
5c1684a8e45cca6522f702616ebd518fc3be5579
|
refs/heads/master
| 2023-04-27T06:54:50.768962
| 2022-07-03T14:09:31
| 2022-07-03T14:09:31
| 218,234,356
| 6
| 0
| null | 2023-04-14T17:32:49
| 2019-10-29T08:05:29
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,992
|
java
|
package com.sharehoo.util;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import com.sharehoo.util.text.Convert;
/**
* 客户端工具类
*
* @author ruoyi
*/
public class ServletUtils {
/**
* 获取String参数
*/
public static String getParameter(String name) {
return getRequest().getParameter(name);
}
/**
* 获取String参数
*/
public static String getParameter(String name, String defaultValue) {
return Convert.toStr(getRequest().getParameter(name), defaultValue);
}
/**
* 获取Integer参数
*/
public static Integer getParameterToInt(String name) {
return Convert.toInt(getRequest().getParameter(name));
}
/**
* 获取Integer参数
*/
public static Integer getParameterToInt(String name, Integer defaultValue) {
return Convert.toInt(getRequest().getParameter(name), defaultValue);
}
/**
* 获取request
*/
public static HttpServletRequest getRequest() {
return getRequestAttributes().getRequest();
}
/**
* 获取response
*/
public static HttpServletResponse getResponse() {
return getRequestAttributes().getResponse();
}
/**
* 获取session
*/
public static HttpSession getSession() {
return getRequest().getSession();
}
public static ServletRequestAttributes getRequestAttributes() {
RequestAttributes attributes = RequestContextHolder.getRequestAttributes();
return (ServletRequestAttributes) attributes;
}
/**
* 将字符串渲染到客户端
*
* @param response 渲染对象
* @param string 待渲染的字符串
* @return null
*/
public static String renderString(HttpServletResponse response, String string) {
try {
response.setContentType("application/json");
response.setCharacterEncoding("utf-8");
response.getWriter().print(string);
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
/**
* 是否是Ajax异步请求
*
* @param request
*/
public static boolean isAjaxRequest(HttpServletRequest request) {
String accept = request.getHeader("accept");
if (accept != null && accept.indexOf("application/json") != -1) {
return true;
}
String xRequestedWith = request.getHeader("X-Requested-With");
if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1) {
return true;
}
String uri = request.getRequestURI();
if (StringUtils.inStringIgnoreCase(uri, ".json", ".xml")) {
return true;
}
String ajax = request.getParameter("__ajax");
if (StringUtils.inStringIgnoreCase(ajax, "json", "xml")) {
return true;
}
return false;
}
}
|
[
"1329289117@qq.com"
] |
1329289117@qq.com
|
41fbc8299e6d3caadfa53b23c7a6b8238ad19f14
|
951a2cebfb3b742a0b9da0dee787f4610505292c
|
/toq/Misc/JavaSrc/com/intel/bluetooth/NotImplementedError.java
|
bf82c20837151575585fba16b0ed1e8b2aa43a02
|
[] |
no_license
|
marciallus/mytoqmanager
|
eca30683508878b712e9c1c6642f39f34c2e257b
|
65fe1d54e8593900262d5b263d75feb646c015e6
|
refs/heads/master
| 2020-05-17T01:03:44.121469
| 2014-12-10T07:22:14
| 2014-12-10T07:22:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 440
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) fieldsfirst noctor space
package com.intel.bluetooth;
public class NotImplementedError extends Error
{
public static final boolean enabled = true;
private static final long serialVersionUID = 1L;
public NotImplementedError()
{
super("Not Implemented");
}
}
|
[
"marc.lanouiller@gmail.com"
] |
marc.lanouiller@gmail.com
|
8e2a48860662be3d6d94bf3d9b07234790b984cd
|
9fce01d889bf907b87b618c97c4b83cd3a69155d
|
/zh/kiralynok_szitabalazs/QueensPart2/src/hu/elte/progtech/queens/view/QueensFrame.java
|
13a543589020d9dcc876054ed2f6e35c7324b8f3
|
[] |
no_license
|
8emi95/elte-ik-pt1
|
c235dea0f11f90f96487f232ff9122497c86d4a6
|
45c24fe8436c29054b7a8ffecb2f55dbd3cb3f42
|
refs/heads/master
| 2020-04-29T09:16:14.310592
| 2019-03-16T19:48:50
| 2019-03-16T19:48:50
| 176,018,106
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,636
|
java
|
package hu.elte.progtech.queens.view;
import static java.awt.Color.GRAY;
import static java.awt.Color.WHITE;
import static javax.swing.JOptionPane.YES_NO_OPTION;
import static javax.swing.JOptionPane.YES_OPTION;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import hu.elte.progtech.queens.model.QueensEngine;
public class QueensFrame extends JFrame {
private static final long serialVersionUID = 2265228622194396011L;
private static final String NEWGAME_TITLE = "You won";
private static final String NEWGAME_QUESTION = "You won!\nWant to play again?";
private static final String QUEEN = "Q";
private static final String EMPTY = "";
private QueensEngine engine;
public QueensFrame(QueensEngine engine) {
super("Queens");
this.engine = engine;
}
public void showFrame() {
setDefaultCloseOperation(EXIT_ON_CLOSE);
setLayout(new GridLayout(engine.getSize(), engine.getSize()));
addFields();
setVisible(true);
pack();
}
private void addFields() {
for (int i = 0; i < engine.getSize(); ++i) {
for (int j = 0; j < engine.getSize(); ++j) {
addField(i, j);
}
}
}
private void addField(int i, int j) {
JButton field = new JButton();
field.setPreferredSize(new Dimension(65, 65));
field.setFont(field.getFont().deriveFont(20.0f));
field.setBackground(getFieldBackground(i, j));
field.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (engine.put(i, j)) {
updateFields();
checkEndGame();
}
}
});
getContentPane().add(field);
}
private Color getFieldBackground(int row, int column) {
return row % 2 == column % 2 ? WHITE : GRAY;
}
private void updateFields() {
for (int i = 0; i < engine.getSize(); ++i) {
for (int j = 0; j < engine.getSize(); ++j) {
updateField(i, j);
}
}
}
private void updateField(int row, int column) {
Component component = getContentPane().getComponent(row * engine.getSize() + column);
JButton field = (JButton) component;
field.setText(getFieldLabel(row, column));
}
private String getFieldLabel(int row, int column) {
return engine.isQueen(row, column) ? QUEEN : EMPTY;
}
private void checkEndGame() {
if (engine.isWon()) {
int answer = JOptionPane.showConfirmDialog(this, NEWGAME_QUESTION, NEWGAME_TITLE, YES_NO_OPTION);
if (answer == YES_OPTION) {
engine.startNewGame();
updateFields();
}
}
}
}
|
[
"8emi95@inf.elte.hu"
] |
8emi95@inf.elte.hu
|
875553bb88bd63e374df4619e4a50fe108e57820
|
ff2683777d02413e973ee6af2d71ac1a1cac92d3
|
/src/main/java/com/alipay/api/response/KoubeiCateringPosCooklistQueryResponse.java
|
1be0c3f32d37b80bd1e7affde92d6b3904b6ede9
|
[
"Apache-2.0"
] |
permissive
|
weizai118/alipay-sdk-java-all
|
c30407fec93e0b2e780b4870b3a71e9d7c55ed86
|
ec977bf06276e8b16c4b41e4c970caeaf21e100b
|
refs/heads/master
| 2020-05-31T21:01:16.495008
| 2019-05-28T13:14:39
| 2019-05-28T13:14:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 875
|
java
|
package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.PosDishCookModel;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.catering.pos.cooklist.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiCateringPosCooklistQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 4867356487447856898L;
/**
* 菜谱列表
*/
@ApiListField("cook_models")
@ApiField("pos_dish_cook_model")
private List<PosDishCookModel> cookModels;
public void setCookModels(List<PosDishCookModel> cookModels) {
this.cookModels = cookModels;
}
public List<PosDishCookModel> getCookModels( ) {
return this.cookModels;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
7a9086fff5fa3cbdb13c42ce1f5da31b049e4bf8
|
ea8266f779a3b59cb97e35c83773142aab64bbff
|
/app/src/main/java/com/dreamforone/jipgo/MyFirebaseMessagingService.java
|
6fe5451b23d739045e080176c0611907ba7e6a2a
|
[] |
no_license
|
ItForYou/Jipgo
|
e2b01e3c141bfc852b9f41ac3566799f1b15b6d7
|
52300c42f6f6fe6e21e2dcabb57c2868b844261e
|
refs/heads/master
| 2020-09-22T16:19:12.646796
| 2019-12-02T02:48:40
| 2019-12-02T02:48:40
| 225,271,034
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,200
|
java
|
/**
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.dreamforone.jipgo;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import util.Common;
public class MyFirebaseMessagingService extends FirebaseMessagingService {
private static final String TAG = "MyFirebaseMsgService";
public static int identity=0;
/**
* Called when message is received.
*
* @param remoteMessage Object representing the message received from Firebase Cloud Messaging.
*/
// [START receive_message]
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
// TODO(developer): Handle FCM messages here.
// If the application is in the foreground handle both data and notification messages here.
// Also if you intend on generating your own notifications as a result of a received FCM
// message, here is where that should be initiated. See sendNotification method below.
sendNotification(remoteMessage);
}
// [END receive_message]
/**
* Create and show a simple notification containing the received FCM message.
*
*
*/
private void sendNotification(RemoteMessage remote) {
String messageBody=remote.getData().get("message");
String subject=remote.getData().get("subject");
String goUrl=remote.getData().get("goUrl");
String channelId = "JipGo";
Intent intent = new Intent(this, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("goUrl",goUrl);
Log.d("remote",remote.toString());
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,
PendingIntent.FLAG_ONE_SHOT);
Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
Bitmap BigPictureStyle= BitmapFactory.decodeResource(getResources(),R.mipmap.ic_launcher);
/**/
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this, channelId)
.setSmallIcon(R.mipmap.ic_launcher)
.setContentTitle(subject)
.setContentText(messageBody)
.setAutoCancel(true)
.setContentIntent(pendingIntent)
.setDefaults(Notification.DEFAULT_ALL)
.setSound(defaultSoundUri)
.setVibrate(new long[]{0, 500, 0, 500})
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setStyle(new NotificationCompat.BigTextStyle().bigText(messageBody));
/*android.support.v7.app.NotificationCompat.Builder notificationBuilder2 = (android.support.v7.app.NotificationCompat.Builder) new android.support.v7.app.NotificationCompat.Builder(this)
.setSmallIcon(R.mipmap.ic_launcher)
.setContentTitle(subject)
.setContentText(messageBody)
.setAutoCancel(true);*/
NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel channel = new NotificationChannel(channelId,
"Channel human readable title",
NotificationManager.IMPORTANCE_DEFAULT);
notificationManager.createNotificationChannel(channel);
}
if(Common.getPref(getApplicationContext(),"push",false)==true){
notificationManager.notify(identity /* ID of notification */, notificationBuilder.build());
}
identity++;
// notificationManager.notify(1 /* ID of notification */, notificationBuilder2.build());
/*
Intent popupIntent= new Intent(this,PopupActivity.class);
popupIntent.addFlags(popupIntent.FLAG_ACTIVITY_NEW_TASK);
popupIntent.putExtra("subject",subject);
popupIntent.putExtra("message",messageBody);
startActivity(popupIntent);*/
}
}
|
[
"kimnamhyong@naver.com"
] |
kimnamhyong@naver.com
|
0e9439f011c56ebe352ed4207ca02c6baf7b53e8
|
50954e28cda402c5ec6d198711bffe3c50b0f7c7
|
/JavaSE/src/main/resources/src/com/sun/corba/se/spi/activation/_RepositoryImplBase.java
|
a24b23cc7fa738cf178eda6a65ac15f7ccdf8aa7
|
[] |
no_license
|
bulusky/Note
|
f7b4a76a4ea5d1f10a122152afacd23a4aed4fd6
|
73c60b2fccac89d48a7566a265217e601c8fcb79
|
refs/heads/master
| 2023-01-03T10:03:29.615608
| 2020-10-24T09:38:45
| 2020-10-24T09:38:45
| 303,957,641
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,672
|
java
|
package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/_RepositoryImplBase.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/jenkins/workspace/8-2-build-windows-amd64-cygwin/jdk8u251/737/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Thursday, March 12, 2020 6:33:10 AM UTC
*/
public abstract class _RepositoryImplBase extends org.omg.CORBA.portable.ObjectImpl
implements com.sun.corba.se.spi.activation.Repository, org.omg.CORBA.portable.InvokeHandler
{
// Constructors
public _RepositoryImplBase ()
{
}
private static java.util.Hashtable _methods = new java.util.Hashtable ();
static
{
_methods.put ("registerServer", new java.lang.Integer (0));
_methods.put ("unregisterServer", new java.lang.Integer (1));
_methods.put ("getServer", new java.lang.Integer (2));
_methods.put ("isInstalled", new java.lang.Integer (3));
_methods.put ("install", new java.lang.Integer (4));
_methods.put ("uninstall", new java.lang.Integer (5));
_methods.put ("listRegisteredServers", new java.lang.Integer (6));
_methods.put ("getApplicationNames", new java.lang.Integer (7));
_methods.put ("getServerID", new java.lang.Integer (8));
}
public org.omg.CORBA.portable.OutputStream _invoke (String $method,
org.omg.CORBA.portable.InputStream in,
org.omg.CORBA.portable.ResponseHandler $rh)
{
org.omg.CORBA.portable.OutputStream out = null;
java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
if (__method == null)
throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
switch (__method.intValue ())
{
// always uninstalled.
case 0: // activation/Repository/registerServer
{
try {
com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef serverDef = com.sun.corba.se.spi.activation.RepositoryPackage.ServerDefHelper.read (in);
int $result = (int)0;
$result = this.registerServer (serverDef);
out = $rh.createReply();
out.write_long ($result);
} catch (com.sun.corba.se.spi.activation.ServerAlreadyRegistered $ex) {
out = $rh.createExceptionReply ();
com.sun.corba.se.spi.activation.ServerAlreadyRegisteredHelper.write (out, $ex);
} catch (com.sun.corba.se.spi.activation.BadServerDefinition $ex) {
out = $rh.createExceptionReply ();
com.sun.corba.se.spi.activation.BadServerDefinitionHelper.write (out, $ex);
}
break;
}
// unregister server definition
case 1: // activation/Repository/unregisterServer
{
try {
int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in);
this.unregisterServer (serverId);
out = $rh.createReply();
} catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
out = $rh.createExceptionReply ();
com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex);
}
break;
}
// get server definition
case 2: // activation/Repository/getServer
{
try {
int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in);
com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef $result = null;
$result = this.getServer (serverId);
out = $rh.createReply();
com.sun.corba.se.spi.activation.RepositoryPackage.ServerDefHelper.write (out, $result);
} catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
out = $rh.createExceptionReply ();
com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex);
}
break;
}
// Return whether the server has been installed
case 3: // activation/Repository/isInstalled
{
try {
int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in);
boolean $result = false;
$result = this.isInstalled (serverId);
out = $rh.createReply();
out.write_boolean ($result);
} catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
out = $rh.createExceptionReply ();
com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex);
}
break;
}
// if the server is currently marked as installed.
case 4: // activation/Repository/install
{
try {
int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in);
this.install (serverId);
out = $rh.createReply();
} catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
out = $rh.createExceptionReply ();
com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex);
} catch (com.sun.corba.se.spi.activation.ServerAlreadyInstalled $ex) {
out = $rh.createExceptionReply ();
com.sun.corba.se.spi.activation.ServerAlreadyInstalledHelper.write (out, $ex);
}
break;
}
// if the server is currently marked as uninstalled.
case 5: // activation/Repository/uninstall
{
try {
int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in);
this.uninstall (serverId);
out = $rh.createReply();
} catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
out = $rh.createExceptionReply ();
com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex);
} catch (com.sun.corba.se.spi.activation.ServerAlreadyUninstalled $ex) {
out = $rh.createExceptionReply ();
com.sun.corba.se.spi.activation.ServerAlreadyUninstalledHelper.write (out, $ex);
}
break;
}
// list registered servers
case 6: // activation/Repository/listRegisteredServers
{
int $result[] = null;
$result = this.listRegisteredServers ();
out = $rh.createReply();
com.sun.corba.se.spi.activation.ServerIdsHelper.write (out, $result);
break;
}
// servers.
case 7: // activation/Repository/getApplicationNames
{
String $result[] = null;
$result = this.getApplicationNames ();
out = $rh.createReply();
com.sun.corba.se.spi.activation.RepositoryPackage.StringSeqHelper.write (out, $result);
break;
}
// Find the ServerID associated with the given application name.
case 8: // activation/Repository/getServerID
{
try {
String applicationName = in.read_string ();
int $result = (int)0;
$result = this.getServerID (applicationName);
out = $rh.createReply();
out.write_long ($result);
} catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
out = $rh.createExceptionReply ();
com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex);
}
break;
}
default:
throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
}
return out;
} // _invoke
// Type-specific CORBA::Object operations
private static String[] __ids = {
"IDL:activation/Repository:1.0"};
public String[] _ids ()
{
return (String[])__ids.clone ();
}
} // class _RepositoryImplBase
|
[
"814192772@qq.com"
] |
814192772@qq.com
|
a8a2764aa2b70c2d40c5fbb3ae77078f53a35762
|
48731c9be89080e3a2a7ee3ba6cdcda1e5748933
|
/TestingEJBModule/src/test/java/com/sunkuet02/testejb/testutils/Utils.java
|
d59a0271ef0dd677bbafe5771294f1362cf441c2
|
[] |
no_license
|
sunkuet02/java-library-test
|
fe2c0d8c7f04a1fc6edb70d0b9f04bbb8aa90e7a
|
2de83836c705d3c38289d01a4854a67491703884
|
refs/heads/master
| 2020-12-19T05:15:43.019207
| 2017-08-06T10:15:19
| 2017-08-06T10:15:19
| 60,323,611
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 680
|
java
|
package com.sunkuet02.testejb.testutils;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
/**
* Created by sun on 5/8/17.
*/
public class Utils {
public static Properties getDbProperties() {
Properties properties = new Properties();
properties.put("javax.persistence.jdbc.driver", "org.hsqldb.jdbcDriver");
properties.put("javax.persistence.jdbc.user","sa");
properties.put("javax.persistence.jdbc.password" ,"");
properties.put("javax.persistence.jdbc.url" ,"jdbc:hsqldb:mem:testdb");
properties.put("hibernate.dialect" ,"org.hibernate.dialect.HSQLDialect");
return properties;
}
}
|
[
"sunkuet02@gmail.com"
] |
sunkuet02@gmail.com
|
dc133aca4d3cbf420bdddb63bf4aabdad7dd84fb
|
63f142347bbd63a41c0c69a646f10747ea9edede
|
/src/main/java/com/crfeb/tbmpt/project/model/vo/ProjectSectionVo.java
|
3c4974e3049fafd24074cbbd3543eb90c701163c
|
[] |
no_license
|
guoxuhui/Tbmpt_Web
|
c842e500797bc843968a7f683fadeda4047a2031
|
131380902383dc51e6a29a53ddd0f78c74400233
|
refs/heads/master
| 2021-07-10T05:53:02.856913
| 2017-10-10T11:08:21
| 2017-10-10T11:08:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,425
|
java
|
package com.crfeb.tbmpt.project.model.vo;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotations.IdType;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
/**
*
* 项目区间信息表
*
*/
public class ProjectSectionVo implements Serializable {
@TableField(exist = false)
private static final long serialVersionUID = 1L;
/** UUID */
@TableId(type = IdType.UUID)
private String id;
/** 区间名称 */
@TableField(value = "SECTION_NAME")
private String sectionName;
/** 区间简称 */
private String abbreviation;
/** 地层情况 */
private String dcqk;
/** 备注 */
private String remark;
/** 项目信息ID */
@TableField(value = "PRO_ID")
private String proId;
/** 项目名称 */
private String proName;
/** 录入时间 */
private String entertime;
/** 录入人 */
private String enterperson;
/** 删除标识 */
private int deleteflag;
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getSectionName() {
return this.sectionName;
}
public void setSectionName(String sectionName) {
this.sectionName = sectionName;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getProId() {
return this.proId;
}
public void setProId(String proId) {
this.proId = proId;
}
public String getProName() {
return proName;
}
public void setProName(String proName) {
this.proName = proName;
}
public String getEntertime() {
return this.entertime;
}
public void setEntertime(String entertime) {
this.entertime = entertime;
}
public String getEnterperson() {
return this.enterperson;
}
public void setEnterperson(String enterperson) {
this.enterperson = enterperson;
}
public int getDeleteflag() {
return this.deleteflag;
}
public void setDeleteflag(int deleteflag) {
this.deleteflag = deleteflag;
}
public String getAbbreviation() {
return abbreviation;
}
public void setAbbreviation(String abbreviation) {
this.abbreviation = abbreviation;
}
public String getDcqk() {
return dcqk;
}
public void setDcqk(String dcqk) {
this.dcqk = dcqk;
}
}
|
[
"wpisen@163.com"
] |
wpisen@163.com
|
357412986fef1e42fdee42f9721cb557b4657da1
|
9a857d1407cf27764f402399adb9fc81c3511b6c
|
/src/20141123/game-dao/src/main/java/com/lodogame/game/dao/impl/mysql/UserHeroSkillTrainDaoMysqlImpl.java
|
d1d1c4d9977cb5d4eca4e756c82db9a2e1b48808
|
[] |
no_license
|
zihanbobo/smsg-server
|
fcfec6fc6b55441d7ab64bb8b769d072752592c0
|
abfebf8b1fff83332090b922e390b892483da6ed
|
refs/heads/master
| 2021-06-01T00:01:43.208825
| 2016-05-10T10:10:01
| 2016-05-10T10:10:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,734
|
java
|
package com.lodogame.game.dao.impl.mysql;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.lodogame.common.jdbc.Jdbc;
import com.lodogame.common.jdbc.SqlParameter;
import com.lodogame.game.dao.UserHeroSkillTrainDao;
import com.lodogame.model.UserHeroSkillTrain;
public class UserHeroSkillTrainDaoMysqlImpl implements UserHeroSkillTrainDao {
private String table = "user_hero_skill_train";
@Autowired
private Jdbc jdbc;
@Override
public List<UserHeroSkillTrain> getList(String userId, String userHeroId) {
String sql = "SELECT * FROM " + table + " WHERE user_id = ? AND user_hero_id = ? ORDER BY skill_group_id DESC ";
SqlParameter parameter = new SqlParameter();
parameter.setString(userId);
parameter.setString(userHeroId);
return this.jdbc.getList(sql, UserHeroSkillTrain.class, parameter);
}
@Override
public boolean delete(String userId, String userHeroId) {
String sql = "DELETE FROM " + table + " WHERE user_id = ? AND user_hero_id = ? ";
SqlParameter parameter = new SqlParameter();
parameter.setString(userId);
parameter.setString(userHeroId);
return this.jdbc.update(sql, parameter) > 0;
}
@Override
public boolean delete(String userId, String userHeroId, int skillGroupId) {
String sql = "DELETE FROM " + table + " WHERE user_id = ? AND user_hero_id = ? AND skill_group_id = ? ";
SqlParameter parameter = new SqlParameter();
parameter.setString(userId);
parameter.setString(userHeroId);
parameter.setInt(skillGroupId);
return this.jdbc.update(sql, parameter) > 0;
}
@Override
public boolean add(List<UserHeroSkillTrain> userHeroSkillTrainList) {
this.jdbc.insert(userHeroSkillTrainList);
return true;
}
}
|
[
"dogdog7788@qq.com"
] |
dogdog7788@qq.com
|
3c7102d3d3d3d033eece933c72cdc88a1e49416d
|
08552623f87a66c5684ba0ece0ae039f6d05d8dd
|
/app/src/main/java/com/juyijia/mm/beauty/DefaultBeautyViewHolder.java
|
cf3bf78298edaccad91a67cb16f0ccc6dd042d2c
|
[] |
no_license
|
ls895977/cityAdvertising_YuanBan
|
8d528dff55432460c24861d06c7ac47664a88b24
|
c6df5537562cac05154b20db4a35c07a7e692638
|
refs/heads/master
| 2022-07-15T02:31:28.572576
| 2020-05-17T06:31:55
| 2020-05-17T06:31:55
| 263,084,475
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,708
|
java
|
package com.juyijia.mm.beauty;
import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import com.juyijia.beauty.bean.FilterBean;
import com.juyijia.beauty.custom.TextSeekBar;
import com.juyijia.mm.R;
import com.juyijia.mm.interfaces.OnItemClickListener;
import com.juyijia.mm.views.AbsViewHolder;
/**
* Created by cxf on 2018/6/22.
* 默认美颜
*/
public class DefaultBeautyViewHolder extends AbsViewHolder implements View.OnClickListener, BeautyViewHolder {
private SparseArray<View> mSparseArray;
private int mCurKey;
private FilterAdapter mFilterAdapter;
private DefaultEffectListener mEffectListener;
private VisibleListener mVisibleListener;
private boolean mShowed;
public DefaultBeautyViewHolder(Context context, ViewGroup parentView) {
super(context, parentView);
}
@Override
protected int getLayoutId() {
return R.layout.view_beauty_default;
}
@Override
public void init() {
findViewById(R.id.btn_beauty).setOnClickListener(this);
findViewById(R.id.btn_filter).setOnClickListener(this);
findViewById(R.id.btn_hide).setOnClickListener(this);
mSparseArray = new SparseArray<>();
mSparseArray.put(R.id.btn_beauty, findViewById(R.id.group_beauty));
mSparseArray.put(R.id.btn_filter, findViewById(R.id.group_filter));
mCurKey = R.id.btn_beauty;
TextSeekBar.OnSeekChangeListener onSeekChangeListener = new TextSeekBar.OnSeekChangeListener() {
@Override
public void onProgressChanged(View view, int progress) {
if (mEffectListener != null) {
switch (view.getId()) {
case R.id.seek_meibai:
mEffectListener.onMeiBaiChanged(progress);
break;
case R.id.seek_mopi:
mEffectListener.onMoPiChanged(progress);
break;
case R.id.seek_hongrun:
mEffectListener.onHongRunChanged(progress);
break;
}
}
}
};
TextSeekBar seekMeiBai = ((TextSeekBar) findViewById(R.id.seek_meibai));
TextSeekBar seekMoPi = ((TextSeekBar) findViewById(R.id.seek_mopi));
TextSeekBar seekHongRun = ((TextSeekBar) findViewById(R.id.seek_hongrun));
seekMeiBai.setOnSeekChangeListener(onSeekChangeListener);
seekMoPi.setOnSeekChangeListener(onSeekChangeListener);
seekHongRun.setOnSeekChangeListener(onSeekChangeListener);
//滤镜
RecyclerView filterRecyclerView = (RecyclerView) findViewById(R.id.filter_recyclerView);
filterRecyclerView.setHasFixedSize(true);
filterRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
mFilterAdapter = new FilterAdapter(mContext);
mFilterAdapter.setOnItemClickListener(new OnItemClickListener<FilterBean>() {
@Override
public void onItemClick(FilterBean bean, int position) {
if (mEffectListener != null) {
mEffectListener.onFilterChanged(bean);
}
}
});
filterRecyclerView.setAdapter(mFilterAdapter);
}
@Override
public void setEffectListener(EffectListener effectListener) {
if (effectListener != null && effectListener instanceof DefaultEffectListener) {
mEffectListener = (DefaultEffectListener) effectListener;
}
}
@Override
public void show() {
if (mVisibleListener != null) {
mVisibleListener.onVisibleChanged(true);
}
if (mParentView != null && mContentView != null) {
ViewParent parent = mContentView.getParent();
if (parent != null) {
((ViewGroup) parent).removeView(mContentView);
}
mParentView.addView(mContentView);
}
mShowed = true;
}
@Override
public void hide() {
removeFromParent();
if (mVisibleListener != null) {
mVisibleListener.onVisibleChanged(false);
}
mShowed = false;
}
@Override
public void onClick(View v) {
int id = v.getId();
switch (id) {
case R.id.btn_beauty:
case R.id.btn_filter:
toggle(id);
break;
case R.id.btn_hide:
hide();
break;
}
}
private void toggle(int key) {
if (mCurKey == key) {
return;
}
mCurKey = key;
for (int i = 0, size = mSparseArray.size(); i < size; i++) {
View v = mSparseArray.valueAt(i);
if (mSparseArray.keyAt(i) == key) {
if (v.getVisibility() != View.VISIBLE) {
v.setVisibility(View.VISIBLE);
}
} else {
if (v.getVisibility() == View.VISIBLE) {
v.setVisibility(View.INVISIBLE);
}
}
}
}
@Override
public boolean isShowed() {
return mShowed;
}
@Override
public void release() {
mVisibleListener = null;
mEffectListener = null;
}
@Override
public void setVisibleListener(VisibleListener visibleListener) {
mVisibleListener = visibleListener;
}
}
|
[
"895977304@qq.com"
] |
895977304@qq.com
|
b98a2b064040aeaf4988381cd79cdb559a19b56f
|
5765c87fd41493dff2fde2a68f9dccc04c1ad2bd
|
/Variant Programs/5-2/18/ScottyPerformancesLog.java
|
e4a6c11cc75d34767ca5d5ba4e59b7f68764e11a
|
[
"MIT"
] |
permissive
|
hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism
|
42e4c2061c3f8da0dfce760e168bb9715063645f
|
a42ced1d5a92963207e3565860cac0946312e1b3
|
refs/heads/master
| 2020-08-09T08:10:08.888384
| 2019-11-25T01:14:23
| 2019-11-25T01:14:23
| 214,041,532
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,466
|
java
|
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.Random;
import java.util.logging.Logger;
public class ScottyPerformancesLog extends javax.servlet.http.HttpServlet {
private Posterior[] investRaft;
private java.lang.String ranked;
private int rearAmount;
private int buns;
private java.lang.String operatorSecurity;
private java.lang.String mobile;
private java.lang.String destination;
private java.lang.String post;
private static java.util.logging.Logger consignor =
java.util.logging.Logger.getLogger("bensTheatre");
public void doGet(HttpServletRequest appeal, HttpServletResponse reply)
throws ServletException, IOException {
java.io.PrintWriter prohibited = reply.getWriter();
ranked = appeal.getParameter("row");
buns = java.lang.Integer.parseInt(appeal.getParameter("seat"));
rearAmount = java.lang.Integer.parseInt(appeal.getParameter("seatnumber"));
investRaft = tellReadme();
java.lang.String venueFront = letRegistrationTab();
prohibited.println(venueFront);
}
public void doPost(HttpServletRequest wishes, HttpServletResponse responsive)
throws ServletException, IOException {
ranked = wishes.getParameter("row");
buns = java.lang.Integer.parseInt(wishes.getParameter("seat"));
rearAmount = java.lang.Integer.parseInt(wishes.getParameter("seatnumber"));
operatorSecurity = wishes.getParameter("userid");
destination = wishes.getParameter("address");
post = wishes.getParameter("email");
mobile = wishes.getParameter("phone");
investRaft = tellReadme();
int made = 0;
for (Posterior ora : investRaft) {
if (ora.goExploiterQuod() != null && ora.goExploiterQuod().equals(operatorSecurity)) {
made++;
}
}
if (made > 2) {
responsive.sendRedirect("benstheatre?message=limitexceeded");
} else {
investRaft[rearAmount].orderedPatientNerfling(operatorSecurity);
investRaft[rearAmount].markAdress(destination);
investRaft[rearAmount].dictatedEmailed(post);
investRaft[rearAmount].markMobile(mobile);
investRaft[rearAmount].arrangedSentence(IainAmphitheatre.catchRifeWhen());
investRaft[rearAmount].settledVisible(false);
helpData(investRaft);
responsive.sendRedirect("benstheatre?message=success");
}
}
public java.lang.String letRegistrationTab() {
java.lang.String standards = firewallEncode();
java.lang.String metadata = "";
metadata +=
"<!DOCTYPE html>\n"
+ "<html lang=\"en\">\n"
+ " <head>\n"
+ " <meta charset=utf-8>\n"
+ " <title>Seat Booking</title>\n"
+ " <!--[if IE]>\n"
+ " <script src=\"http://html5shiv.googlecode.com/svn/trunk/html5.js\">\n"
+ " </script>\n"
+ " <![endif]-->\n"
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"css/style.css\">\n"
+ " </head>\n"
+ " <body class=\"booking\">\n"
+ " <header>\n"
+ " <a href=\"benstheatre\">HOME</a>\n"
+ " <h1>Seat Booking</h1>\n"
+ " </header>\n"
+ " <article>\n"
+ " <h2>Your Selection</h2>\n"
+ " <div class=\"selected\">\n"
+ " <p class=\"heading\">Selected Seat:</p>";
metadata += "<p class=\"option\">" + ranked + buns + "</p>";
metadata +=
"</div>\n"
+ " <div class=\"security\">\n"
+ " <p class=\"heading\">Security Code:</p>";
metadata += "<p class=\"option\" data-code=\"" + standards + "\">" + standards + "</p>";
metadata +=
"</div>\n"
+ "\n"
+ " <form method=\"post\" action=\"./booking\">\n"
+ " <input type=\"hidden\" name=\"seat\" value=\""
+ buns
+ "\" />\n"
+ " <input type=\"hidden\" name=\"row\" value=\""
+ ranked
+ "\" />\n"
+ " <input type=\"hidden\" name=\"seatnumber\" value=\""
+ rearAmount
+ "\" />\n"
+ " <input type=\"text\" name=\"userid\" placeholder=\"UserID*\" />\n"
+ " <input type=\"text\" name=\"phone\" placeholder=\"Phone\" />\n"
+ " <input type=\"text\" name=\"address\" placeholder=\"Address\" />\n"
+ " <input type=\"text\" name=\"email\" placeholder=\"Email*\" />\n"
+ " <input type=\"text\" name=\"security\" placeholder=\"Security Code*\" />\n"
+ " <button type=\"reset\" value=\"Clear\" class=\"form-clear\">Clear</button>\n"
+ " <button type=\"submit\" value=\"Submit\" class=\"form-submit\">Submit</button>\n"
+ " </form>\n"
+ " </article>\n"
+ " <footer>\n"
+ " <div class=\"author\">\n"
+ " <p>© Ben Sutter 2016</p>\n"
+ " <p>c3063467</p>\n"
+ " </div>\n"
+ " </footer>\n"
+ " <script src=\"js/jquery.min.js\"></script>\n"
+ " <script src=\"js/script.js\"></script>\n"
+ " </body>\t\n"
+ "</html>";
return metadata;
}
public java.lang.String firewallEncode() {
java.lang.String cards[] = {
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S",
"T", "U", "V", "W", "X", "Y", "Z"
};
java.lang.String rates[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
java.util.Random coincidental = new java.util.Random();
java.lang.String momenta, cc, betas, fgf, r6, u;
momenta = cards[coincidental.nextInt(cards.length)];
cc = rates[coincidental.nextInt(rates.length)];
betas = cards[coincidental.nextInt(cards.length)];
fgf = rates[coincidental.nextInt(rates.length)];
r6 = cards[coincidental.nextInt(cards.length)];
u = rates[coincidental.nextInt(rates.length)];
return momenta + cc + betas + fgf + r6 + u;
}
public Posterior[] tellReadme() {
try {
Posterior[] votes;
java.io.FileInputStream nsiPapers =
new java.io.FileInputStream(getServletContext().getRealPath("/WEB-INF/bookingData.ser"));
java.io.ObjectInputStream proponents = new java.io.ObjectInputStream(nsiPapers);
votes = (Posterior[]) proponents.readObject();
proponents.close();
nsiPapers.close();
return votes;
} catch (java.io.IOException i) {
consignor.info(i.toString());
return null;
} catch (java.lang.ClassNotFoundException cesium) {
consignor.info(cesium.toString());
cesium.printStackTrace();
return null;
}
}
public void helpData(Posterior[] member) {
try {
java.io.FileOutputStream prohibitedPapers =
new java.io.FileOutputStream(getServletContext().getRealPath("/WEB-INF/bookingData.ser"));
java.io.ObjectOutputStream back = new java.io.ObjectOutputStream(prohibitedPapers);
back.writeObject(member);
back.close();
prohibitedPapers.close();
} catch (java.io.IOException officio) {
officio.printStackTrace();
}
}
}
|
[
"hayden.cheers@me.com"
] |
hayden.cheers@me.com
|
77cf5d5b74eba9caeaf6e888d15c1b06be082364
|
7626c8fc8742859f369834eaab3a6120dd2c5f6f
|
/src/main/java/org/rcsb/cif/model/generated/ChemicalConnAtom.java
|
78e38d19a45ac6abe6f8ead45a265137357e0a87
|
[
"MIT"
] |
permissive
|
BobHanson/ciftools-SwingJS
|
58c02723827c7c2b6e7716b7cd9c870076ce0f54
|
e5266a8bfe6e6d5feeab85dc97b0f67e6b0e2594
|
refs/heads/master
| 2020-09-12T10:28:07.592153
| 2019-11-29T21:18:43
| 2019-11-29T21:18:43
| 222,393,459
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,547
|
java
|
package org.rcsb.cif.model.generated;
import org.rcsb.cif.model.*;
import javax.annotation.Generated;
import java.util.Map;
/**
* Data items in the CHEMICAL_CONN_ATOM category would not, in
* general, be used in a macromolecular CIF. See instead the
* ENTITY data items.
*
* Data items in the CHEMICAL_CONN_ATOM and CHEMICAL_CONN_BOND
* categories record details about the two-dimensional (2D)
* chemical structure of the molecular species. They allow
* a 2D chemical diagram to be reconstructed for use in a
* publication or in a database search for structural and
* substructural relationships.
*
* The CHEMICAL_CONN_ATOM data items provide information about the
* chemical properties of the atoms in the structure. In cases
* where crystallographic and molecular symmetry elements coincide,
* they must also contain symmetry-generated atoms, so that the
* CHEMICAL_CONN_ATOM and CHEMICAL_CONN_BOND data items will always
* describe a complete chemical entity.
*/
@Generated("org.rcsb.cif.generator.SchemaGenerator")
public class ChemicalConnAtom extends BaseCategory {
public ChemicalConnAtom(String name, Map<String, Column> columns) {
super(name, columns);
}
public ChemicalConnAtom(String name, int rowCount, Object[] encodedColumns) {
super(name, rowCount, encodedColumns);
}
public ChemicalConnAtom(String name) {
super(name);
}
/**
* The net integer charge assigned to this atom. This is the
* formal charge assignment normally found in chemical diagrams.
* @return IntColumn
*/
public IntColumn getCharge() {
return (IntColumn) (isText ? textFields.computeIfAbsent("charge", IntColumn::new) :
getBinaryColumn("charge"));
}
/**
* The 2D Cartesian x coordinate of the position of this atom in a
* recognizable chemical diagram. The coordinate origin is at the
* lower left corner, the x axis is horizontal and the y axis
* is vertical. The coordinates must lie in the range 0.0 to 1.0.
* These coordinates can be obtained from projections of a suitable
* uncluttered view of the molecular structure.
* @return FloatColumn
*/
public FloatColumn getDisplayX() {
return (FloatColumn) (isText ? textFields.computeIfAbsent("display_x", FloatColumn::new) :
getBinaryColumn("display_x"));
}
/**
* The 2D Cartesian y coordinate of the position of this atom in a
* recognizable chemical diagram. The coordinate origin is at the
* lower left corner, the x axis is horizontal and the y axis
* is vertical. The coordinates must lie in the range 0.0 to 1.0.
* These coordinates can be obtained from projections of a suitable
* uncluttered view of the molecular structure.
* @return FloatColumn
*/
public FloatColumn getDisplayY() {
return (FloatColumn) (isText ? textFields.computeIfAbsent("display_y", FloatColumn::new) :
getBinaryColumn("display_y"));
}
/**
* The number of connected atoms excluding terminal hydrogen atoms.
* @return IntColumn
*/
public IntColumn getNCA() {
return (IntColumn) (isText ? textFields.computeIfAbsent("NCA", IntColumn::new) :
getBinaryColumn("NCA"));
}
/**
* The total number of hydrogen atoms attached to this atom,
* regardless of whether they are included in the refinement or
* the ATOM_SITE list. This number is the same as
* _atom_site.attached_hydrogens only if none of the hydrogen
* atoms appear in the ATOM_SITE list.
* @return IntColumn
*/
public IntColumn getNH() {
return (IntColumn) (isText ? textFields.computeIfAbsent("NH", IntColumn::new) :
getBinaryColumn("NH"));
}
/**
* The chemical sequence number to be associated with this atom.
* Within an ATOM_SITE list, this number must match one of
* the _atom_site.chemical_conn_number values.
* @return IntColumn
*/
public IntColumn getNumber() {
return (IntColumn) (isText ? textFields.computeIfAbsent("number", IntColumn::new) :
getBinaryColumn("number"));
}
/**
* This data item is a pointer to _atom_type.symbol in the
* ATOM_TYPE category.
* @return StrColumn
*/
public StrColumn getTypeSymbol() {
return (StrColumn) (isText ? textFields.computeIfAbsent("type_symbol", StrColumn::new) :
getBinaryColumn("type_symbol"));
}
}
|
[
"bittrich@hs-mittweida.de"
] |
bittrich@hs-mittweida.de
|
26c70a69b6c260b4dda7be995492a2e831d18a1e
|
f727d763d0cec7d8ffa738ce59ef461add3f7c64
|
/src/main/java/in/dragonbra/javasteam/steam/handlers/steamuser/AnonymousLogOnDetails.java
|
0d495b5367ecf4abd497241e881d151ac0276ccd
|
[
"MIT"
] |
permissive
|
dpruckler/JavaSteam
|
f7e59aa350ef362ec6529bd48ef776114279f080
|
b47a7d3e467df0bb069e404139b5377aa415ee5a
|
refs/heads/master
| 2022-12-10T17:39:14.730588
| 2022-12-02T16:25:40
| 2022-12-02T16:25:40
| 221,637,767
| 0
| 0
|
MIT
| 2019-11-14T07:31:58
| 2019-11-14T07:31:57
| null |
UTF-8
|
Java
| false
| false
| 993
|
java
|
package in.dragonbra.javasteam.steam.handlers.steamuser;
import in.dragonbra.javasteam.enums.EOSType;
import in.dragonbra.javasteam.util.Utils;
/**
* Represents the details required to log into Steam3 as an anonymous user.
*/
public class AnonymousLogOnDetails {
private int cellID;
private EOSType clientOSType;
private String clientLanguage;
public AnonymousLogOnDetails() {
clientOSType = Utils.getOSType();
clientLanguage = "english";
}
public int getCellID() {
return cellID;
}
public void setCellID(int cellID) {
this.cellID = cellID;
}
public EOSType getClientOSType() {
return clientOSType;
}
public void setClientOSType(EOSType clientOSType) {
this.clientOSType = clientOSType;
}
public String getClientLanguage() {
return clientLanguage;
}
public void setClientLanguage(String clientLanguage) {
this.clientLanguage = clientLanguage;
}
}
|
[
"lngtrn94@gmail.com"
] |
lngtrn94@gmail.com
|
e2eec6ef3c9a05c2504370d60b164e89c25579db
|
a7995a853290193abbac8790572017cdeb227fe2
|
/src/Array/NO289GameofLife/Solution.java
|
ab3f45738e91c149c15dbbffad7e65db4c225b67
|
[] |
no_license
|
JJFly-JOJO/LeetCode
|
c42775973f025f5d8c82ca1f0921f0de117ca6de
|
0c172a87ca4e0f23e68f388186c77f9e51370660
|
refs/heads/master
| 2023-07-09T20:47:22.363062
| 2021-08-11T16:57:06
| 2021-08-11T16:57:06
| 328,843,633
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,763
|
java
|
package Array.NO289GameofLife;
/**
* @author zzj
* @version 1.0
* @date 2020/10/13 16:29
* 输入:
* [
* [0,1,0],
* [0,0,1],
* [1,1,1],
* [0,0,0]
* ]
* 输出:
* [
* [0,0,0],
* [1,0,1],
* [0,1,1],
* [0,1,0]
* ]
*/
public class Solution {
public void gameOfLife(int[][] board) {
int row = board.length;
int col = board[0].length;
//3表示1->0 4表示0->1
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
int liveCeils = getAroundCeils(i, j, board, row, col);
if (board[i][j] == 1) {
if (liveCeils < 2 || liveCeils > 3) {
board[i][j] = 3;
}
} else {
if (liveCeils == 3) {
board[i][j] = 4;
}
}
}
}
update(board, row, col);
}
private void update(int[][] board, int row, int col) {
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
if (board[i][j] == 3) {
board[i][j] = 0;
} else if (board[i][j] == 4) {
board[i][j] = 1;
}
}
}
}
private int getAroundCeils(int i, int j, int[][] board, int row, int col) {
int count = 0;
//左上 上 右上 左中 右中 左下 下 右下
//int[][] position=new int[][]{{i-1,j-1},{}}
if (i - 1 >= 0 && j - 1 >= 0) {
if (board[i - 1][j - 1] == 1 || board[i - 1][j - 1] == 3) {
count++;
}
}
if (i - 1 >= 0) {
if (board[i - 1][j] == 1 || board[i - 1][j] == 3) {
count++;
}
}
if (i - 1 >= 0 && j + 1 < col) {
if (board[i - 1][j + 1] == 1 || board[i - 1][j + 1] == 3) {
count++;
}
}
if (j - 1 >= 0) {
if (board[i][j - 1] == 1 || board[i][j - 1] == 3) {
count++;
}
}
if (j + 1 < col) {
if (board[i][j + 1] == 1 || board[i][j + 1] == 3) {
count++;
}
}
if (i + 1 < row && j - 1 >= 0) {
if (board[i + 1][j - 1] == 1 || board[i + 1][j - 1] == 3) {
count++;
}
}
if (i + 1 < row) {
if (board[i + 1][j] == 1 || board[i + 1][j] == 3) {
count++;
}
}
if (i + 1 < row && j + 1 < col) {
if (board[i + 1][j + 1] == 1 || board[i + 1][j + 1] == 3) {
count++;
}
}
return count;
}
}
|
[
"13419232991@163.com"
] |
13419232991@163.com
|
6dd842b56a646392a69d73a3ce1396bd9c49c2e4
|
fc1bf26252525f1dca780f0c26cea165c3b3f531
|
/com/planet_ink/coffee_mud/Abilities/Druid/Chant_TremorSense.java
|
b773c85927b6ab025eca9a66d35d6631f98731e1
|
[
"Apache-2.0"
] |
permissive
|
mikael2/CoffeeMud
|
8ade6ff60022dbe01f55172ba3f86be0de752124
|
a70112b6c67e712df398c940b2ce00b589596de0
|
refs/heads/master
| 2020-03-07T14:13:04.765442
| 2018-03-28T03:59:22
| 2018-03-28T03:59:22
| 127,521,360
| 1
| 0
| null | 2018-03-31T10:11:54
| 2018-03-31T10:11:53
| null |
UTF-8
|
Java
| false
| false
| 6,471
|
java
|
package com.planet_ink.coffee_mud.Abilities.Druid;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.TrackingLibrary;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2004-2018 Bo Zimmerman
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.
*/
public class Chant_TremorSense extends Chant
{
@Override
public String ID()
{
return "Chant_TremorSense";
}
private final static String localizedName = CMLib.lang().L("Tremor Sense");
@Override
public String name()
{
return localizedName;
}
private final static String localizedStaticDisplay = CMLib.lang().L("(Tremor Sense)");
@Override
public String displayText()
{
return localizedStaticDisplay;
}
@Override
public int classificationCode()
{
return Ability.ACODE_CHANT | Ability.DOMAIN_DEEPMAGIC;
}
@Override
public int abstractQuality()
{
return Ability.QUALITY_OK_SELF;
}
@Override
protected int canAffectCode()
{
return CAN_MOBS | CAN_ROOMS;
}
protected Vector<Room> rooms = new Vector<Room>();
@Override
public CMObject copyOf()
{
final Chant_TremorSense obj=(Chant_TremorSense)super.copyOf();
obj.rooms=new Vector<Room>();
obj.rooms.addAll(rooms);
return obj;
}
@Override
public void unInvoke()
{
// undo the affects of this spell
if(!(affected instanceof MOB))
{
super.unInvoke();
return;
}
final MOB mob=(MOB)affected;
super.unInvoke();
if(canBeUninvoked())
{
if((mob.location()!=null)&&(!mob.amDead()))
mob.location().show(mob,null,CMMsg.MSG_OK_VISUAL,L("<S-YOUPOSS> tremor sense fades."));
}
for(int r=0;r<rooms.size();r++)
{
final Room R=rooms.elementAt(r);
final Ability A=R.fetchEffect(ID());
if((A!=null)&&(A.invoker()==mob))
A.unInvoke();
}
}
@Override
public void executeMsg(final Environmental myHost, final CMMsg msg)
{
super.executeMsg(myHost,msg);
if(affected==null)
return;
if(affected instanceof MOB)
{
if(msg.amISource((MOB)affected)
&&((msg.sourceMinor()==CMMsg.TYP_STAND)
||(msg.sourceMinor()==CMMsg.TYP_LEAVE)))
unInvoke();
}
else
if(affected instanceof Room)
{
if((msg.target()==affected)
&&(msg.targetMinor()==CMMsg.TYP_ENTER)
&&(!CMLib.flags().isInFlight(msg.source()))
&&(invoker!=null)
&&(invoker.location()!=null))
{
if(invoker.location()==affected)
invoker.tell(L("You feel footsteps around you."));
else
{
final int dir=CMLib.tracking().radiatesFromDir((Room)affected,rooms);
if(dir>=0)
invoker.tell(L("You feel footsteps @x1",CMLib.directions().getInDirectionName(dir)));
}
}
else
if((msg.tool() instanceof Ability)
&&((msg.tool().ID().equals("Prayer_Tremor"))
||(msg.tool().ID().endsWith("_Earthquake"))))
{
if(invoker.location()==affected)
invoker.tell(L("You feel a ferocious rumble."));
else
{
final int dir=CMLib.tracking().radiatesFromDir((Room)affected,rooms);
if(dir>=0)
invoker.tell(L("You feel a ferocious rumble @x1",CMLib.directions().getInDirectionName(dir)));
}
}
}
}
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
MOB target=mob;
if((auto)&&(givenTarget!=null)&&(givenTarget instanceof MOB))
target=(MOB)givenTarget;
if(target.fetchEffect(this.ID())!=null)
{
mob.tell(target,null,null,L("<S-NAME> <S-IS-ARE> already sensing tremors."));
return false;
}
if((!CMLib.flags().isSitting(mob))||(mob.riding()!=null))
{
mob.tell(L("You must be sitting on the ground for this chant to work."));
return false;
}
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
final boolean success=proficiencyCheck(mob,0,auto);
if(success)
{
final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto),L("@x1<T-NAME> gain(s) a sense of the earth!^?",L(auto?"":"^S<S-NAME> chant(s) to <S-HIM-HERSELF>. ")));
if(mob.location().okMessage(mob,msg))
{
mob.location().send(mob,msg);
rooms=new Vector<Room>();
TrackingLibrary.TrackingFlags flags;
flags = CMLib.tracking().newFlags()
.plus(TrackingLibrary.TrackingFlag.NOEMPTYGRIDS)
.plus(TrackingLibrary.TrackingFlag.NOAIR)
.plus(TrackingLibrary.TrackingFlag.NOWATER);
int range=5 +(super.getXMAXRANGELevel(mob)/2);
CMLib.tracking().getRadiantRooms(mob.location(),rooms,flags,null,range,null);
for(int r=0;r<rooms.size();r++)
{
final Room R=rooms.elementAt(r);
if((R!=mob.location())
&&(R.domainType()!=Room.DOMAIN_INDOORS_AIR)
&&(!CMLib.flags().isWateryRoom(R))
&&(R.domainType()!=Room.DOMAIN_OUTDOORS_AIR)
&&(R.domainType()!=Room.DOMAIN_OUTDOORS_UNDERWATER)
&&(R.domainType()!=Room.DOMAIN_OUTDOORS_WATERSURFACE))
beneficialAffect(mob,R,asLevel,0);
}
beneficialAffect(mob,target,asLevel,0);
}
}
else
return beneficialWordsFizzle(mob,target,L("<S-NAME> chant(s), but nothing happens."));
// return whether it worked
return success;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
c5b42ccece879c83b2f6dd544f328ee270c3d06f
|
a04cbcde2edf0ab722bc977d399aa8b0e1f2282e
|
/src/com/honda/displayaudio/system/traffic/RdsGroup.java
|
8ebd8511118dc58a223bed1304185f31e9b3c704
|
[
"LicenseRef-scancode-unicode",
"Apache-2.0"
] |
permissive
|
xmutzlq/trunk
|
669f887d95ed2795af8ae93307dd46a19a32dbcd
|
0fa686e9fd0fed9e9213ee41be4eab5ff0f9bc59
|
refs/heads/master
| 2021-01-21T02:41:59.367187
| 2015-01-20T05:03:18
| 2015-01-20T05:03:18
| 29,511,844
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,761
|
java
|
package com.honda.displayaudio.system.traffic;
import android.os.Parcel;
import android.os.Parcelable;
public class RdsGroup implements Parcelable
{
private int mBlockA; // Block A of the group
private int mBlockB; // Block B of the group
private int mBlockC; // Block C of the group
private int mBlockD; // Block D of the group
private int mCorrectedErrorCount; // Number of corrected errors in this group
private int mUncorrectedErrorCount; // Number of uncorrected errors in this group
public static final Parcelable.Creator<RdsGroup> CREATOR = new Parcelable.Creator<RdsGroup>()
{
@Override
public RdsGroup createFromParcel(Parcel source)
{
return new RdsGroup(source);
}
@Override
public RdsGroup[] newArray(int size)
{
return new RdsGroup[size];
}
};
public int getmBlockA()
{
return mBlockA;
}
public void setmBlockA(int mBlockA)
{
this.mBlockA = mBlockA;
}
public int getmBlockB()
{
return mBlockB;
}
public void setmBlockB(int mBlockB)
{
this.mBlockB = mBlockB;
}
public int getmBlockC()
{
return mBlockC;
}
public void setmBlockC(int mBlockC)
{
this.mBlockC = mBlockC;
}
public int getmBlockD()
{
return mBlockD;
}
public void setmBlockD(int mBlockD)
{
this.mBlockD = mBlockD;
}
public int getmCorrectedErrorCount()
{
return mCorrectedErrorCount;
}
public void setmCorrectedErrorCount(int mCorrectedErrorCount)
{
this.mCorrectedErrorCount = mCorrectedErrorCount;
}
public int getmUncorrectedErrorCount()
{
return mUncorrectedErrorCount;
}
public void setmUncorrectedErrorCount(int mUncorrectedErrorCount)
{
this.mUncorrectedErrorCount = mUncorrectedErrorCount;
}
private RdsGroup(Parcel source)
{
readFromParcel(source);
}
/****************************************************************************
* readFromParcel(Parcel source) *
****************************************************************************/
public void readFromParcel(Parcel source)
{
mBlockA = source.readInt();
mBlockB = source.readInt();
mBlockC = source.readInt();
mBlockD = source.readInt();
mCorrectedErrorCount = source.readInt();
mUncorrectedErrorCount = source.readInt();
}
@Override
public int describeContents() {
return 0;
}
/****************************************************************************
* writeToParcel(Parcel dest, int flags) *
****************************************************************************/
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mBlockA);
dest.writeInt(mBlockB);
dest.writeInt(mBlockC);
dest.writeInt(mBlockD);
dest.writeInt(mCorrectedErrorCount);
dest.writeInt(mUncorrectedErrorCount);
}
}
|
[
"380233376@qq.com"
] |
380233376@qq.com
|
2f02e285c04bc1a5534f3579ebb0db4c1f654867
|
be2a927db5b3970223153ca91dfe79f4393071fa
|
/java/src/main/java/com/ceph/rados/impl/RadosAsyncImpl.java
|
ff59062bf355452c88e9b69a6409c5d0a1743e45
|
[
"Apache-2.0"
] |
permissive
|
tristantarrant/rados-jni
|
b3f6f20c7ce9203692907cace561dce6313c85d7
|
5797d9409ff994f758de97eb8d466cb1f567dc97
|
refs/heads/master
| 2022-10-30T02:44:43.542347
| 2020-06-08T12:47:59
| 2020-06-10T08:42:18
| 269,344,754
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,982
|
java
|
package com.ceph.rados.impl;
import java.nio.ByteBuffer;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
import com.ceph.rados.ASyncWriteOp;
import com.ceph.rados.RadosAsync;
public class RadosAsyncImpl implements RadosAsync {
private final IOCtxImpl ioCtx;
public RadosAsyncImpl(IOCtxImpl ioCtx) {
this.ioCtx = ioCtx;
}
@Override
public CompletionStage<Void> write(String oid, ByteBuffer buf) {
assert buf.isDirect();
CompletableFuture<Void> complete = new CompletableFuture<>();
Native.INSTANCE.aio_write(ioCtx.address, oid, buf, buf.position(), 0, buf.limit() - buf.position(), complete, null);
return complete;
}
@Override
public CompletionStage<Void> append(String oid, ByteBuffer buf) {
assert buf.isDirect();
CompletableFuture<Void> complete = new CompletableFuture<>();
Native.INSTANCE.aio_append(ioCtx.address, oid, buf, buf.position(), buf.limit() - buf.position(), complete, null);
return complete;
}
@Override
public CompletionStage<Void> remove(String oid) {
CompletableFuture<Void> complete = new CompletableFuture<>();
Native.INSTANCE.aio_remove(ioCtx.address, oid, complete, null);
return complete;
}
@Override
public CompletionStage<Void> read(String oid, ByteBuffer buf) {
assert buf.isDirect();
return null;
}
@Override
public CompletionStage<Void> flush() {
return null;
}
@Override
public CompletionStage<Void> setXattr(String oid, String name, ByteBuffer buf) {
return null;
}
@Override
public CompletionStage<Void> getXattr(String oid, String name, ByteBuffer buf) {
return null;
}
@Override
public CompletionStage<Void> rmXattr(String oid, String name) {
return null;
}
@Override
public ASyncWriteOp writeOp() {
return null;
}
}
|
[
"ttarrant@redhat.com"
] |
ttarrant@redhat.com
|
688e6c147e4ed6754222a24490e4732e868509eb
|
9cfa20f826fc1e0042ebd4f11563f7abf5e3ec4d
|
/rackspace/src/test/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectInfoFromHeadersTest.java
|
461ef57f47e637916dc14ba9c87520147309f384
|
[] |
no_license
|
rimuhosting/jclouds
|
e56e9c7dd83c1c2bd41d78f47faede73e3033823
|
f488c9f8c3072599fe4c6f015ea724d663dc5998
|
refs/heads/master
| 2022-07-30T11:47:18.202365
| 2009-11-25T00:55:02
| 2009-11-25T00:55:02
| 376,723
| 0
| 0
| null | 2022-07-06T19:59:46
| 2009-11-18T02:38:34
|
Java
|
UTF-8
|
Java
| false
| false
| 3,064
|
java
|
/**
*
* Copyright (C) 2009 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*/
package org.jclouds.rackspace.cloudfiles.functions;
import static org.easymock.EasyMock.expect;
import static org.easymock.classextension.EasyMock.createMock;
import static org.easymock.classextension.EasyMock.replay;
import static org.testng.Assert.assertNotNull;
import java.net.URI;
import org.jclouds.blobstore.reference.BlobStoreConstants;
import org.jclouds.http.HttpResponse;
import org.jclouds.http.functions.config.ParserModule;
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
import org.jclouds.rest.internal.GeneratedHttpRequest;
import org.testng.annotations.Test;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.util.Jsr330;
/**
* Tests behavior of {@code ParseContainerListFromJsonResponse}
*
* @author Adrian Cole
*/
@Test(groups = "unit", testName = "cloudfiles.ParseObjectInfoFromHeadersTest")
public class ParseObjectInfoFromHeadersTest {
Injector i = Guice.createInjector(new ParserModule(), new AbstractModule() {
@Override
protected void configure() {
bindConstant().annotatedWith(
Jsr330.named(BlobStoreConstants.PROPERTY_USER_METADATA_PREFIX)).to("sdf");
}
});
public void testEtagCaseIssue() {
ParseObjectInfoFromHeaders parser = i.getInstance(ParseObjectInfoFromHeaders.class);
GeneratedHttpRequest<?> request = createMock(GeneratedHttpRequest.class);
expect(request.getEndpoint()).andReturn(URI.create("http://localhost/test")).atLeastOnce();
replay(request);
parser.setContext(request);
HttpResponse response = new HttpResponse();
response.getHeaders().put("Content-Type", "text/plain");
response.getHeaders().put("Last-Modified", "Fri, 12 Jun 2007 13:40:18 GMT");
response.getHeaders().put("Content-Length", "0");
response.getHeaders().put("Etag", "feb1");
MutableObjectInfoWithMetadata md = parser.apply(response);
assertNotNull(md.getHash());
}
}
|
[
"adrian.f.cole@3d8758e0-26b5-11de-8745-db77d3ebf521"
] |
adrian.f.cole@3d8758e0-26b5-11de-8745-db77d3ebf521
|
134a11259546dc94a455d30e23ecd0cfdc665b4e
|
befa5b4b28cd3d6ff94de7093bba4b6d568754f5
|
/modules/ads_lib/src/main/java/com/google/api/ads/adwords/lib/utils/v201605/AwqlReportRequest.java
|
d62c3d6a5976c8f00a7afb58ebc51973d5cea6ce
|
[
"Apache-2.0"
] |
permissive
|
jfrost001/googleads-java-lib
|
ffcf0a759da0ee141bfa29ed0777cd3d5366c53c
|
62f0e40b2ee06668ff05ebf99871692d15f71524
|
refs/heads/master
| 2021-01-20T02:54:19.087207
| 2017-02-14T19:17:29
| 2017-02-14T19:17:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,525
|
java
|
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.api.ads.adwords.lib.utils.v201605;
import com.google.api.ads.adwords.lib.jaxb.v201605.DownloadFormat;
import com.google.api.ads.adwords.lib.utils.ReportRequest;
import com.google.common.base.Preconditions;
/**
* ReportRequest for AWQL reports.
*/
class AwqlReportRequest implements ReportRequest {
private final String awqlQuery;
private final DownloadFormat downloadFormat;
public AwqlReportRequest(String awqlQuery, DownloadFormat downloadFormat) {
this.awqlQuery = Preconditions.checkNotNull(awqlQuery, "Null AWQL query");
this.downloadFormat = Preconditions.checkNotNull(downloadFormat, "Null download format");
}
@Override
public String getReportRequestString() {
return awqlQuery;
}
@Override
public DownloadFormat getDownloadFormat() {
return downloadFormat;
}
@Override
public RequestType getRequestType() {
return RequestType.AWQL;
}
}
|
[
"jradcliff@users.noreply.github.com"
] |
jradcliff@users.noreply.github.com
|
8a7d1aa053a067a4afea27c64f30f83b14e82e81
|
40665051fadf3fb75e5a8f655362126c1a2a3af6
|
/geosolutions-it-MapStoreMobile/f8a0bf666f21ea2146000f7e455869330d035193/55/SpatialiteStore.java
|
eaa4b442979a84777f3c7e12ec5b50d87d0f30d5
|
[] |
no_license
|
fermadeiral/StyleErrors
|
6f44379207e8490ba618365c54bdfef554fc4fde
|
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
|
refs/heads/master
| 2020-07-15T12:55:10.564494
| 2019-10-24T02:30:45
| 2019-10-24T02:30:45
| 205,546,543
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,141
|
java
|
/*
* GeoSolutions - MapstoreMobile - GeoSpatial Framework on Android based devices
* Copyright (C) 2014 GeoSolutions (www.geo-solutions.it)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package it.geosolutions.android.map.model.stores;
import java.util.ArrayList;
import android.app.Activity;
import android.content.Intent;
import it.geosolutions.android.map.DataListActivity;
import it.geosolutions.android.map.MapsActivity;
import it.geosolutions.android.map.model.Layer;
import it.geosolutions.android.map.spatialite.activities.SpatialiteLayerListActivity;
/**
* @author Lorenzo Natali (lorenzo.natali@geo-solutions.it)
*
*/
public class SpatialiteStore extends BaseLayerStore{
/* (non-Javadoc)
* @see it.geosolutions.android.map.model.stores.LayerStore#getLayers()
*/
@Override
public ArrayList<Layer> getLayers() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see it.geosolutions.android.map.model.stores.LayerStore#openDetails(android.app.Activity)
*/
@Override
public void openDetails(Activity ac) {
Intent datalistIntent = new Intent(ac, SpatialiteLayerListActivity.class);
datalistIntent.putExtra(SpatialiteLayerListActivity.PARAMS.LAYERSTORE_NAME, getName());
ac.startActivityForResult(datalistIntent, MapsActivity.DATAPROPERTIES_REQUEST_CODE);
}
/* (non-Javadoc)
* @see it.geosolutions.android.map.model.stores.LayerStore#openEdit(android.app.Activity)
*/
@Override
public void openEdit(Activity ac) {
// TODO Auto-generated method stub
}
}
|
[
"fer.madeiral@gmail.com"
] |
fer.madeiral@gmail.com
|
9286544f2826cf55a44e00b7136a4d9806a2659c
|
6c54ea57ff47b9aad414627b972268623134d1f4
|
/TSS.Java/src/tss/tpm/StirRandomResponse.java
|
069fc728390bde904e633cfd35815de8ff0b1098
|
[
"MIT"
] |
permissive
|
raghuncstate/TSS.MSR
|
c7f062fccbd1c05ac2433e7badb1942c5a996cd3
|
50b9c36d09d5cae89a965f2fc65c58ad29fe1732
|
refs/heads/master
| 2021-05-15T10:36:59.454709
| 2018-05-14T06:32:22
| 2018-05-14T06:32:22
| 108,195,473
| 0
| 0
|
MIT
| 2018-04-30T17:04:44
| 2017-10-24T23:34:50
|
C++
|
UTF-8
|
Java
| false
| false
| 1,608
|
java
|
package tss.tpm;
import tss.*;
// -----------This is an auto-generated file: do not edit
//>>>
/**
* This command is used to add "additional information" to the RNG state.
*/
public class StirRandomResponse extends TpmStructure
{
/**
* This command is used to add "additional information" to the RNG state.
*/
public StirRandomResponse()
{
}
@Override
public void toTpm(OutByteBuf buf)
{
}
@Override
public void initFromTpm(InByteBuf buf)
{
}
@Override
public byte[] toTpm()
{
OutByteBuf buf = new OutByteBuf();
toTpm(buf);
return buf.getBuf();
}
public static StirRandomResponse fromTpm (byte[] x)
{
StirRandomResponse ret = new StirRandomResponse();
InByteBuf buf = new InByteBuf(x);
ret.initFromTpm(buf);
if (buf.bytesRemaining()!=0)
throw new AssertionError("bytes remaining in buffer after object was de-serialized");
return ret;
}
public static StirRandomResponse fromTpm (InByteBuf buf)
{
StirRandomResponse ret = new StirRandomResponse();
ret.initFromTpm(buf);
return ret;
}
@Override
public String toString()
{
TpmStructurePrinter _p = new TpmStructurePrinter("TPM2_StirRandom_RESPONSE");
toStringInternal(_p, 1);
_p.endStruct();
return _p.toString();
}
@Override
public void toStringInternal(TpmStructurePrinter _p, int d)
{
};
};
//<<<
|
[
"Andrey.Marochko@microsoft.com"
] |
Andrey.Marochko@microsoft.com
|
1c8a9c78ed2bcfb21a527076801c1ee0fa21cb93
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project46/src/main/java/org/gradle/test/performance46_1/Production46_33.java
|
a8be3ccf7685d56336b559b44183012158564b7a
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 302
|
java
|
package org.gradle.test.performance46_1;
public class Production46_33 extends org.gradle.test.performance14_1.Production14_33 {
private final String property;
public Production46_33() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
5a625c22dd3547ffa95be5f71495f4ec2952c3e4
|
5fddb9a3f85f50cdefe3bf29ca06b33ad44bcd62
|
/src/main/java/com/syncleus/aethermud/game/Abilities/Spells/Spell_ResistAcid.java
|
649b76bcbfbe39f12d5b768d1fc7ffe628f2eb03
|
[
"Apache-2.0"
] |
permissive
|
freemo/AetherMUD-coffee
|
da315ae8046d06069a058fb38723750a02f72853
|
dbc091b3e1108aa6aff3640da4707ace4c6771e5
|
refs/heads/master
| 2021-01-19T22:34:29.830622
| 2017-08-26T14:01:24
| 2017-08-26T14:06:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,479
|
java
|
/**
* Copyright 2017 Syncleus, Inc.
* with portions copyright 2004-2017 Bo Zimmerman
*
* 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.syncleus.aethermud.game.Abilities.Spells;
import com.syncleus.aethermud.game.Abilities.interfaces.Ability;
import com.syncleus.aethermud.game.Common.interfaces.CMMsg;
import com.syncleus.aethermud.game.Common.interfaces.CharStats;
import com.syncleus.aethermud.game.MOBS.interfaces.MOB;
import com.syncleus.aethermud.game.core.CMClass;
import com.syncleus.aethermud.game.core.CMLib;
import com.syncleus.aethermud.game.core.interfaces.Physical;
import java.util.List;
public class Spell_ResistAcid extends Spell {
private final static String localizedName = CMLib.lang().L("Resist Acid");
private final static String localizedStaticDisplay = CMLib.lang().L("(Resist Acid)");
@Override
public String ID() {
return "Spell_ResistAcid";
}
@Override
public String name() {
return localizedName;
}
@Override
public String displayText() {
return localizedStaticDisplay;
}
@Override
public int abstractQuality() {
return Ability.QUALITY_BENEFICIAL_OTHERS;
}
@Override
protected int canAffectCode() {
return CAN_MOBS;
}
@Override
public int classificationCode() {
return Ability.ACODE_SPELL | Ability.DOMAIN_ABJURATION;
}
@Override
public void unInvoke() {
// undo the affects of this spell
if (!(affected instanceof MOB))
return;
final MOB mob = (MOB) affected;
if (canBeUninvoked())
mob.tell(L("Your oily protection dries up."));
super.unInvoke();
}
@Override
public void affectCharStats(MOB affectedMOB, CharStats affectedStats) {
super.affectCharStats(affectedMOB, affectedStats);
affectedStats.setStat(CharStats.STAT_SAVE_ACID, affectedStats.getStat(CharStats.STAT_SAVE_ACID) + 100);
}
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) {
final MOB target = getTarget(mob, commands, givenTarget);
if (target == null)
return false;
if (!super.invoke(mob, commands, givenTarget, auto, asLevel))
return false;
final boolean success = proficiencyCheck(mob, 0, auto);
if (success) {
final CMMsg msg = CMClass.getMsg(mob, target, this, verbalCastCode(mob, target, auto), auto ? L("<T-NAME> feel(s) oilily protected.") : L("^S<S-NAME> invoke(s) a oily field of protection around <T-NAMESELF>.^?"));
if (mob.location().okMessage(mob, msg)) {
mob.location().send(mob, msg);
beneficialAffect(mob, target, asLevel, 0);
}
} else
beneficialWordsFizzle(mob, target, L("<S-NAME> attempt(s) to invoke acid protection, but fail(s)."));
return success;
}
}
|
[
"jeffrey.freeman@syncleus.com"
] |
jeffrey.freeman@syncleus.com
|
2d26bc9283fd71f6d13b095ca5855f8200d2d3a5
|
3a47d7d1d6968daea4f2154de479ac18b17ad7db
|
/com.sg.vim/src/com/sg/vim/service/vidc/UploadDeleteEntResponse.java
|
f2a828e92364294b829917f521678bc1b14fe178
|
[] |
no_license
|
sgewuhan/vim
|
ef64fce49f9ab481521a21901157c81910e57e5e
|
d7d193f5be3b357bace4e0f7b703281ade15ae7f
|
refs/heads/master
| 2021-01-19T03:12:56.079503
| 2013-06-26T00:51:24
| 2013-06-26T00:51:24
| 9,443,167
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,767
|
java
|
package com.sg.vim.service.vidc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import com.sg.vim.service.OperateResult;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="UploadDelete_EntResult" type="{http://www.vidc.info/certificate/operation/}OperateResult" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "uploadDeleteEntResult" })
@XmlRootElement(name = "UploadDelete_EntResponse")
public class UploadDeleteEntResponse {
@XmlElement(name = "UploadDelete_EntResult")
protected OperateResult uploadDeleteEntResult;
/**
* Gets the value of the uploadDeleteEntResult property.
*
* @return possible object is {@link OperateResult }
*
*/
public OperateResult getUploadDeleteEntResult() {
return uploadDeleteEntResult;
}
/**
* Sets the value of the uploadDeleteEntResult property.
*
* @param value
* allowed object is {@link OperateResult }
*
*/
public void setUploadDeleteEntResult(OperateResult value) {
this.uploadDeleteEntResult = value;
}
}
|
[
"ghuazh@gmail.com"
] |
ghuazh@gmail.com
|
9023936006d1c95e4f35052a4e9f0caa0a478b52
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/protocal/protobuf/czs.java
|
19ea2c8b4fb30e9c8713f8bf76bc8737179adb99
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 2,613
|
java
|
package com.tencent.mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.LinkedList;
public final class czs
extends com.tencent.mm.bx.a
{
public LinkedList<czr> aaFi;
public int cZV;
public czs()
{
AppMethodBeat.i(122508);
this.aaFi = new LinkedList();
this.cZV = -1;
AppMethodBeat.o(122508);
}
public final int op(int paramInt, Object... paramVarArgs)
{
AppMethodBeat.i(122509);
if (paramInt == 0)
{
paramVarArgs = (i.a.a.c.a)paramVarArgs[0];
paramVarArgs.e(1, 8, this.aaFi);
paramVarArgs.bS(2, this.cZV);
AppMethodBeat.o(122509);
return 0;
}
int i;
if (paramInt == 1)
{
paramInt = i.a.a.a.c(1, 8, this.aaFi);
i = i.a.a.b.b.a.cJ(2, this.cZV);
AppMethodBeat.o(122509);
return paramInt + 0 + i;
}
if (paramInt == 2)
{
paramVarArgs = (byte[])paramVarArgs[0];
this.aaFi.clear();
paramVarArgs = new i.a.a.a.a(paramVarArgs, unknownTagHandler);
for (paramInt = com.tencent.mm.bx.a.getNextFieldNumber(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bx.a.getNextFieldNumber(paramVarArgs)) {
if (!super.populateBuilderWithField(paramVarArgs, this, paramInt)) {
paramVarArgs.kFT();
}
}
AppMethodBeat.o(122509);
return 0;
}
if (paramInt == 3)
{
Object localObject = (i.a.a.a.a)paramVarArgs[0];
czs localczs = (czs)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
switch (paramInt)
{
default:
AppMethodBeat.o(122509);
return -1;
case 1:
paramVarArgs = ((i.a.a.a.a)localObject).aMP(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject = (byte[])paramVarArgs.get(paramInt);
czr localczr = new czr();
if ((localObject != null) && (localObject.length > 0)) {
localczr.parseFrom((byte[])localObject);
}
localczs.aaFi.add(localczr);
paramInt += 1;
}
AppMethodBeat.o(122509);
return 0;
}
localczs.cZV = ((i.a.a.a.a)localObject).ajGk.aar();
AppMethodBeat.o(122509);
return 0;
}
AppMethodBeat.o(122509);
return -1;
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes5.jar
* Qualified Name: com.tencent.mm.protocal.protobuf.czs
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
ecd645fd1aee0fd9c97ac033a5fdd922c39cdac5
|
ee1c15e432f64bcc57eb912b07dd3b4fcc06dbed
|
/app/src/main/java/com/zzh/uidemo/choose/bean/Area.java
|
edebf6c8251239089f2553581ce3f27b67797a82
|
[] |
no_license
|
zzh0123/UIDemo
|
f63cd322ce0ce767f354b0818d022a86af5ea6a5
|
ee42ab1b4208d4071829ea995860f1970a89f5fe
|
refs/heads/master
| 2023-03-21T01:17:19.742135
| 2021-03-25T07:05:41
| 2021-03-25T07:05:41
| 321,374,369
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 493
|
java
|
package com.zzh.uidemo.choose.bean;
import java.io.Serializable;
/**
* @author: zzh
* data : 2020/6/29
* description:区县
*/
public class Area implements Serializable {
private String code;
private String name;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"18311004536@163.com"
] |
18311004536@163.com
|
9b349540831c6527bd86e52191b74d80ea6cb4bd
|
eff914f677578b2f283263e8ae788d60761b49aa
|
/src/main/java/com/example/officeoa/service/NoticeService.java
|
f188d9bf82f1cb8a26e5f50f4ac73fd10a44db12
|
[] |
no_license
|
lixinye99/office_oa
|
c9eabc10bd3dd4ff011565204c0718f6f71ed806
|
8703f469f40f58fc6b96065534a8f553fd5c7050
|
refs/heads/master
| 2023-04-10T14:00:52.294031
| 2021-03-25T04:54:38
| 2021-03-25T04:54:38
| 351,297,494
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 779
|
java
|
package com.example.officeoa.service;
import com.example.officeoa.model.NoticeInfo;
import java.util.List;
/**
* @Author: LiXinYe
* @Description:
* @Date: Create in 10:21 2021/3/22
*/
public interface NoticeService {
/**
* 插入一条新的通知信息
* @param noticeInfo
* @return
*/
Boolean insertNoticeInfo(NoticeInfo noticeInfo);
/**
* 查询所有的通知消息
* @return
*/
List<NoticeInfo> queryAllNoticeInfo();
/**
* 根据nid列表删除公告
* @param noticeNidList
* @return
*/
Boolean deleteNoticeInfoByNidList(Integer[] noticeNidList);
/**
* 更新公告信息
* @param noticeInfo
* @return
*/
Boolean updateNoticeInfo(NoticeInfo noticeInfo);
}
|
[
"you@example.com"
] |
you@example.com
|
b7b299041319c9b9623a3837ae6496329100e07a
|
2e03ec95d2b8d0312f336e5b23e19b85a6714b15
|
/app/src/main/java/com/example/zhangyipeng/anwerdemo/bean/QuestionEntry.java
|
dab5607d3aec8d14bcc3bb17b8236238a6110447
|
[
"Apache-2.0"
] |
permissive
|
yufeilong92/AnswerEffect-master
|
cb6bb7154bdea163639ec5b24a3776be245c569f
|
79aa04e8977422f5bef2d43569419471db848147
|
refs/heads/master
| 2020-03-30T07:38:40.913669
| 2018-09-30T10:12:13
| 2018-09-30T10:12:13
| 150,955,357
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,557
|
java
|
package com.example.zhangyipeng.anwerdemo.bean;
import java.util.List;
/**
* Created by zhangyipeng on 16/7/27.
*/
public class QuestionEntry {
/**
* explain : “违反道路交通安全法”,违反法律法规即为违法行为。官方已无违章/违规的说法。
* question : 驾驶机动车在道路上违反道路交通安全法的行为,属于什么行为?
* questionid : 1
* mediatype : 0
* mediacontent :
* optiontype : 1
* answer : 2
* chapterid : 1
* answer_arr : ["2"]
* answers : ["违章行为","违法行为","过失行为","违规行为"]
*/
private String explain;
private String question;
private String questionid;
private String mediatype;
private String mediacontent;
private String optiontype;
private String answer;
private String chapterid;
private List<String> answer_arr;
private List<String> answers;
public String getExplain() {
return explain;
}
public void setExplain(String explain) {
this.explain = explain;
}
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question;
}
public String getQuestionid() {
return questionid;
}
public void setQuestionid(String questionid) {
this.questionid = questionid;
}
public String getMediatype() {
return mediatype;
}
public void setMediatype(String mediatype) {
this.mediatype = mediatype;
}
public String getMediacontent() {
return mediacontent;
}
public void setMediacontent(String mediacontent) {
this.mediacontent = mediacontent;
}
public String getOptiontype() {
return optiontype;
}
public void setOptiontype(String optiontype) {
this.optiontype = optiontype;
}
public String getAnswer() {
return answer;
}
public void setAnswer(String answer) {
this.answer = answer;
}
public String getChapterid() {
return chapterid;
}
public void setChapterid(String chapterid) {
this.chapterid = chapterid;
}
public List<String> getAnswer_arr() {
return answer_arr;
}
public void setAnswer_arr(List<String> answer_arr) {
this.answer_arr = answer_arr;
}
public List<String> getAnswers() {
return answers;
}
public void setAnswers(List<String> answers) {
this.answers = answers;
}
}
|
[
"931697478@qq.com"
] |
931697478@qq.com
|
7d956d0b9759b6874c3884df12c38afb97336894
|
b327a374de29f80d9b2b3841db73f3a6a30e5f0d
|
/out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/main_files/dot/junit/opcodes/return_wide/Main_testVFE1.java
|
31234bbe0db38b49a92ade87f086397df00647a1
|
[] |
no_license
|
nikoltu/aosp
|
6409c386ed6d94c15d985dd5be2c522fefea6267
|
f99d40c9d13bda30231fb1ac03258b6b6267c496
|
refs/heads/master
| 2021-01-22T09:26:24.152070
| 2011-09-27T15:10:30
| 2011-09-27T15:10:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 518
|
java
|
//autogenerated by util.build.BuildDalvikSuite, do not change
package dot.junit.opcodes.return_wide;
import dot.junit.opcodes.return_wide.d.*;
import dot.junit.*;
public class Main_testVFE1 extends DxAbstractMain {
public static void main(String[] args) throws Exception {
try {
Class.forName("dot.junit.opcodes.return_wide.d.T_return_wide_5");
fail("expected a verification exception");
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
}
}
|
[
"fred.faust@gmail.com"
] |
fred.faust@gmail.com
|
e8092cf9d36e993a03fe4f842119fc44661675d7
|
e3c912687a56e48fc7c6db2e95b644183f40b8f0
|
/src/main/java/iurii/job/interview/yandex/bencode/utils/CharacterInputStreamIterator.java
|
394ebba55f55b1927ec43e967f3b866d908b7dca
|
[
"MIT"
] |
permissive
|
dataronio/algorithms-1
|
00e11b0483eef96ab1b39bd39e00ab412d8e1e2c
|
ab3e08bd16203b077f4a600e31794d6d73303d68
|
refs/heads/master
| 2022-02-06T19:43:57.936282
| 2021-09-18T22:47:01
| 2021-09-18T22:47:01
| 158,045,329
| 0
| 0
|
MIT
| 2020-03-09T22:06:21
| 2018-11-18T03:07:59
|
Java
|
UTF-8
|
Java
| false
| false
| 1,008
|
java
|
package iurii.job.interview.yandex.bencode.utils;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
/**
* Iterator for symbols that encapsulates input stream and works with files
* Created by iurii.dziuban on 02/06/2017.
*/
public class CharacterInputStreamIterator implements Iterator<Character> {
private final InputStream is;
private Integer current;
public CharacterInputStreamIterator(InputStream is) {
this.is = is;
}
@Override
public boolean hasNext() {
if (current == null) {
try {
current = is.read();
} catch (IOException e) {
throw new IllegalStateException();
}
}
return current != -1;
}
@Override
public Character next() {
Integer cur = current;
current = null;
return (char)(int) cur;
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
}
|
[
"ydzyuban@gmail.com"
] |
ydzyuban@gmail.com
|
9e63ec7f9a4ec39f7b2021741f6681e344810c98
|
8523563143e69b9ca0326acafdaa646f1b57bb94
|
/tags/plantuml-7931/src/net/sourceforge/plantuml/graph/EntityImageDefault.java
|
5e148670614167c14fe9d5b4d0ae714644a73ca8
|
[] |
no_license
|
svn2github/plantuml
|
d372e8c5f4b1c5d990b190e2989cd8e5a86ed8fc
|
241b60a9081a25079bf73f12c08c476e16993384
|
refs/heads/master
| 2023-09-03T13:20:47.638892
| 2012-11-20T22:08:10
| 2012-11-20T22:08:10
| 10,839,094
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,000
|
java
|
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2012, Arnaud Roques
*
* Project Info: http://plantuml.sourceforge.net
*
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* Original Author: Arnaud Roques
*
* Revision $Revision: 7947 $
*
*/
package net.sourceforge.plantuml.graph;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.SpriteContainerEmpty;
import net.sourceforge.plantuml.cucadiagram.IEntity;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignement;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.StringBounderUtils;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
class EntityImageDefault extends AbstractEntityImage {
final private TextBlock textBlock;
public EntityImageDefault(IEntity entity) {
super(entity);
this.textBlock = TextBlockUtils.create(entity.getDisplay2(), new FontConfiguration(getFont14(),
HtmlColorUtils.BLACK), HorizontalAlignement.CENTER, new SpriteContainerEmpty());
}
@Override
public Dimension2D getDimension(StringBounder stringBounder) {
final Dimension2D dim = textBlock.calculateDimension(stringBounder);
return new Dimension2DDouble(dim.getWidth(), dim.getHeight());
}
@Override
public void draw(ColorMapper colorMapper, Graphics2D g2d) {
final Dimension2D dim = textBlock.calculateDimension(StringBounderUtils.asStringBounder(g2d));
final int width = (int) dim.getWidth();
final int height = (int) dim.getHeight();
g2d.setColor(Color.BLACK);
g2d.drawRect(0, 0, width, height);
// textBlock.drawTOBEREMOVED(colorMapper, g2d, 0, 0);
}
}
|
[
"arnaud_roques@28b6c6c1-be0e-40f3-8fed-77912e9d39c1"
] |
arnaud_roques@28b6c6c1-be0e-40f3-8fed-77912e9d39c1
|
b448e9404947bfd4518976ef95a4cd6dba4ffb9d
|
c6d93152ab18b0e282960b8ff224a52c88efb747
|
/huntkey/code/biz-class/src/main/java/com/huntkey/rx/edm/service/EnteEnteEnteSetbService.java
|
9b549c1c5810146c45fa69da9ba8632af4cebab2
|
[] |
no_license
|
BAT6188/company-database
|
adfe5d8b87b66cd51efd0355e131de164b69d3f9
|
40d0342345cadc51ca2555840e32339ca0c83f51
|
refs/heads/master
| 2023-05-23T22:18:22.702550
| 2018-12-25T00:58:15
| 2018-12-25T00:58:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 480
|
java
|
package com.huntkey.rx.edm.service;
import java.io.Serializable;
import java.util.*;
import com.huntkey.rx.base.BaseService;
import org.springframework.stereotype.Service;
import com.huntkey.rx.base.PropertyBaseEntity;
import com.huntkey.rx.commons.utils.rest.Result;
import com.huntkey.rx.sceo.method.register.plugin.entity.ParamsVo;
import com.huntkey.rx.sceo.method.register.plugin.util.ExecUtil;
/**
*
* 实体
*
*/
@Service
public class EnteEnteEnteSetbService {
}
|
[
"729235023@qq.com"
] |
729235023@qq.com
|
ac4302ef830d524a085b57256825fbeebb576ad6
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/133/678/CWE197_Numeric_Truncation_Error__short_PropertiesFile_73b.java
|
39b24af0f7ea998d257f8a6169fff9e7fe657fa0
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,375
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE197_Numeric_Truncation_Error__short_PropertiesFile_73b.java
Label Definition File: CWE197_Numeric_Truncation_Error__short.label.xml
Template File: sources-sink-73b.tmpl.java
*/
/*
* @description
* CWE: 197 Numeric Truncation Error
* BadSource: PropertiesFile Read data from a .properties file (in property named data)
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: to_byte
* BadSink : Convert data to a byte
* Flow Variant: 73 Data flow: data passed in a LinkedList from one method to another in different source files in the same package
*
* */
import java.util.LinkedList;
public class CWE197_Numeric_Truncation_Error__short_PropertiesFile_73b
{
public void badSink(LinkedList<Short> dataLinkedList ) throws Throwable
{
short data = dataLinkedList.remove(2);
{
/* POTENTIAL FLAW: Convert data to a byte, possibly causing a truncation error */
IO.writeLine((byte)data);
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(LinkedList<Short> dataLinkedList ) throws Throwable
{
short data = dataLinkedList.remove(2);
{
/* POTENTIAL FLAW: Convert data to a byte, possibly causing a truncation error */
IO.writeLine((byte)data);
}
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
605bdbf2a7e68dc9b982f1af2feea869ec59db8d
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14227-19-25-SPEA2-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/XWiki_ESTest.java
|
79e5d10a460218c22fb73df3fd8b2a2fdd9c29ee
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 530
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Jan 19 01:23:37 UTC 2020
*/
package com.xpn.xwiki;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class XWiki_ESTest extends XWiki_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
809e30d82e9067349768c7b0e9cd2d452d9adeaa
|
446a56b68c88df8057e85f424dbac90896f05602
|
/support/cas-server-support-radius/src/test/java/org/apereo/cas/adaptors/radius/web/flow/RadiusAccessChallengedMultifactorAuthenticationTriggerTests.java
|
178274676562dde4b67cad8ebba0b91e30da04ac
|
[
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
apereo/cas
|
c29deb0224c52997cbfcae0073a4eb65ebf41205
|
5dc06b010aa7fd1b854aa1ae683d1ab284c09367
|
refs/heads/master
| 2023-09-01T06:46:11.062065
| 2023-09-01T01:17:22
| 2023-09-01T01:17:22
| 2,352,744
| 9,879
| 3,935
|
Apache-2.0
| 2023-09-14T14:06:17
| 2011-09-09T01:36:42
|
Java
|
UTF-8
|
Java
| false
| false
| 6,257
|
java
|
package org.apereo.cas.adaptors.radius.web.flow;
import org.apereo.cas.authentication.AuthenticationException;
import org.apereo.cas.authentication.CoreAuthenticationTestUtils;
import org.apereo.cas.authentication.MultifactorAuthenticationTrigger;
import org.apereo.cas.authentication.mfa.TestMultifactorAuthenticationProvider;
import org.apereo.cas.config.CasCookieConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationPrincipalConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationServiceSelectionStrategyConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationSupportConfiguration;
import org.apereo.cas.config.CasCoreConfiguration;
import org.apereo.cas.config.CasCoreHttpConfiguration;
import org.apereo.cas.config.CasCoreLogoutConfiguration;
import org.apereo.cas.config.CasCoreMultifactorAuthenticationConfiguration;
import org.apereo.cas.config.CasCoreNotificationsConfiguration;
import org.apereo.cas.config.CasCoreServicesConfiguration;
import org.apereo.cas.config.CasCoreTicketCatalogConfiguration;
import org.apereo.cas.config.CasCoreTicketIdGeneratorsConfiguration;
import org.apereo.cas.config.CasCoreTicketsConfiguration;
import org.apereo.cas.config.CasCoreTicketsSerializationConfiguration;
import org.apereo.cas.config.CasCoreUtilConfiguration;
import org.apereo.cas.config.CasCoreWebConfiguration;
import org.apereo.cas.config.CasCoreWebflowConfiguration;
import org.apereo.cas.config.CasMultifactorAuthenticationWebflowConfiguration;
import org.apereo.cas.config.CasPersonDirectoryTestConfiguration;
import org.apereo.cas.config.CasWebApplicationServiceFactoryConfiguration;
import org.apereo.cas.config.CasWebflowContextConfiguration;
import org.apereo.cas.config.RadiusConfiguration;
import org.apereo.cas.util.CollectionUtils;
import lombok.val;
import net.jradius.dictionary.Attr_ReplyMessage;
import net.jradius.dictionary.Attr_State;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.autoconfigure.RefreshAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import static org.junit.jupiter.api.Assertions.*;
/**
* This is {@link RadiusAccessChallengedMultifactorAuthenticationTriggerTests}.
*
* @author Misagh Moayyed
* @since 6.2.0
*/
@SpringBootTest(classes = {
RadiusConfiguration.class,
RefreshAutoConfiguration.class,
WebMvcAutoConfiguration.class,
CasCoreAuthenticationPrincipalConfiguration.class,
CasCoreAuthenticationSupportConfiguration.class,
CasPersonDirectoryTestConfiguration.class,
CasCoreMultifactorAuthenticationConfiguration.class,
CasMultifactorAuthenticationWebflowConfiguration.class,
CasCoreAuthenticationServiceSelectionStrategyConfiguration.class,
CasCoreWebConfiguration.class,
CasCoreAuthenticationConfiguration.class,
CasCoreWebflowConfiguration.class,
CasWebflowContextConfiguration.class,
CasWebApplicationServiceFactoryConfiguration.class,
CasCoreTicketIdGeneratorsConfiguration.class,
CasCoreNotificationsConfiguration.class,
CasCoreServicesConfiguration.class,
CasCoreTicketsConfiguration.class,
CasCoreTicketCatalogConfiguration.class,
CasCoreTicketsSerializationConfiguration.class,
CasCoreLogoutConfiguration.class,
CasCookieConfiguration.class,
CasCoreHttpConfiguration.class,
CasCoreUtilConfiguration.class,
CasCoreConfiguration.class
}, properties = {
"cas.authn.radius.server.protocol=PAP",
"cas.authn.radius.client.shared-secret=testing123",
"cas.authn.radius.client.inet-address=localhost",
"cas.authn.mfa.radius.id=mfa-dummy"
})
@Tag("Radius")
class RadiusAccessChallengedMultifactorAuthenticationTriggerTests {
@Autowired
@Qualifier("radiusAccessChallengedMultifactorAuthenticationTrigger")
private MultifactorAuthenticationTrigger multifactorAuthenticationTrigger;
@Autowired
private ConfigurableApplicationContext applicationContext;
@Test
void verifyTriggerInactive() {
assertTrue(multifactorAuthenticationTrigger.isActivated(CoreAuthenticationTestUtils.getAuthentication(),
CoreAuthenticationTestUtils.getRegisteredService(), new MockHttpServletRequest(),
new MockHttpServletResponse(),
CoreAuthenticationTestUtils.getService()).isEmpty());
assertTrue(multifactorAuthenticationTrigger.isActivated(null,
CoreAuthenticationTestUtils.getRegisteredService(), new MockHttpServletRequest(),
new MockHttpServletResponse(),
CoreAuthenticationTestUtils.getService()).isEmpty());
}
@Test
void verifyTriggerActive() {
val authn = CoreAuthenticationTestUtils.getAuthentication(CoreAuthenticationTestUtils.getPrincipal(
CollectionUtils.wrap(Attr_ReplyMessage.NAME, "reply-message", Attr_State.NAME, "whatever")
));
assertThrows(AuthenticationException.class, () -> multifactorAuthenticationTrigger.isActivated(authn,
CoreAuthenticationTestUtils.getRegisteredService(), new MockHttpServletRequest(),
new MockHttpServletResponse(),
CoreAuthenticationTestUtils.getService()));
TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
val authnMfa = CoreAuthenticationTestUtils.getAuthentication(CoreAuthenticationTestUtils.getPrincipal(
CollectionUtils.wrap(Attr_ReplyMessage.NAME, "reply-message", Attr_State.NAME, "whatever")
));
assertTrue(multifactorAuthenticationTrigger.isActivated(authnMfa,
CoreAuthenticationTestUtils.getRegisteredService(), new MockHttpServletRequest(),
new MockHttpServletResponse(),
CoreAuthenticationTestUtils.getService()).isPresent());
}
}
|
[
"mm1844@gmail.com"
] |
mm1844@gmail.com
|
935eb055eff1446805a8731447d00bc4d568c8d6
|
f3698795f174340106c66885bb57ac72134c58c8
|
/metacube/idatrix-metacube-web/src/main/java/com/ys/idatrix/metacube/metamanage/mapper/SnapshotTableColumnMapper.java
|
dbb8c7e3a65853a981d5cb13ef13e5909f3ce6dd
|
[] |
no_license
|
ahandful/CloudETL
|
6e5c195953a944cdc62702b100bd7bcd629b4aee
|
bb4be62e8117082cd656741ecae33e4262ad3fb5
|
refs/heads/master
| 2020-09-13T01:33:43.749781
| 2019-04-18T02:12:08
| 2019-04-18T02:13:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 994
|
java
|
package com.ys.idatrix.metacube.metamanage.mapper;
import com.ys.idatrix.metacube.metamanage.domain.SnapshotTableColumn;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SnapshotTableColumnMapper {
int deleteByPrimaryKey(Long id);
int insert(SnapshotTableColumn record);
int insertSelective(SnapshotTableColumn record);
SnapshotTableColumn selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(SnapshotTableColumn record);
int updateByPrimaryKey(SnapshotTableColumn record);
void batchInsert(List<SnapshotTableColumn> snapshotColList);
// 根据 tableId 和版本号查询某个版本中表所属的字段信息
List<SnapshotTableColumn> selectListByTableIdAndVersion(@Param("tableId") Long tableId, @Param("version") Integer version);
// 根据字段id和版本确定一条数据
SnapshotTableColumn findByColumnIdAndVersion(@Param("columnId") Long columnId, @Param("version") Integer version);
}
|
[
"xionghan@gdbigdata.com"
] |
xionghan@gdbigdata.com
|
cfcc6ae43def73f41c5980accdffefcc74cf90ee
|
3c36bd839e06a868102766402e2e3810e55304de
|
/DIGICCY-Front/src/main/java/com/inesv/digiccy/common/Code.java
|
29e7499e645b4975c3f2d8963d85ef3bc727781b
|
[] |
no_license
|
utike/guirenwang
|
7759d30af1d202f8e356f9e65b6a40b3f5ec533f
|
0bb9628175c2654db1a472bd8ca276c688a1ea3b
|
refs/heads/master
| 2021-01-23T23:56:31.965236
| 2017-10-21T06:55:27
| 2017-10-21T06:55:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 648
|
java
|
/**
*
*/
package com.inesv.digiccy.common;
/**
* @author houzhijia
* @2014-9-10
* @上午11:36:15
*/
public enum Code {
success("0","ok"),
error("-1", "system error"),
token_invalid("1","token invalid");
/**
* @param code
* @param msg
*/
private Code ( String code ,String msg ) {
this.code = code;
this.msg = msg;
}
private String code;
private String msg;
public String getCode(){
return code;
}
public void setCode(String code){
this.code = code;
}
public String getMsg(){
return msg;
}
public void setMsg(String msg){
this.msg = msg;
}
}
|
[
"18819230126@139.com"
] |
18819230126@139.com
|
b66505a4afba25cb63304e9a560577600ef0bc7d
|
d46fea0bc8a01149fe679bd66727323ea59d10bb
|
/drools-grid/drools-grid-impl/src/test/java/org/drools/grid/time/impl/ScheduledJobJpaTest.java
|
61ddd20564f1ee01acad2eda2f172e5d6be0244a
|
[
"Apache-2.0"
] |
permissive
|
mariofusco/droolsjbpm-integration
|
f924abf3b7c17fe8c744530398c15c2cb5e2ee40
|
ad16d393739ad51a5a63ed8dc28733e4d590832a
|
refs/heads/master
| 2022-08-20T16:48:14.008199
| 2011-08-09T09:28:05
| 2011-08-09T09:28:05
| 2,220,322
| 0
| 1
|
Apache-2.0
| 2022-03-25T09:24:48
| 2011-08-17T07:03:31
|
Java
|
UTF-8
|
Java
| false
| false
| 3,178
|
java
|
package org.drools.grid.time.impl;
import java.io.Serializable;
import org.drools.grid.timer.impl.UuidJobHandle;
import org.drools.grid.timer.impl.ScheduledJob;
import java.util.Date;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.drools.time.Job;
import org.drools.time.JobContext;
import org.drools.time.JobHandle;
import org.drools.time.Trigger;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
public class ScheduledJobJpaTest {
@Test
public void test1() {
EntityManagerFactory emf = Persistence.createEntityManagerFactory( "org.drools.grid" );
UuidJobHandle handle = new UuidJobHandle();
ScheduledJob sj1 = new ScheduledJob( handle,
new MockJob(),
new MockJobContext( "xxx" ),
new MockTrigger( new Date( 1000 ) ) );
ScheduledJob sj2 = new ScheduledJob( handle,
new MockJob(),
new MockJobContext( "xxx" ),
new MockTrigger( new Date( 1000 ) ) );
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
em.persist( sj1 );
em.getTransaction().commit();
em.close();
em = emf.createEntityManager();
sj1 = em.find( ScheduledJob.class,
sj1.getId() );
assertEquals( sj2.getId(),
sj1.getId() );
assertEquals( sj2.getJob().getClass(),
sj1.getJob().getClass() );
assertEquals( "xxx",
((MockJobContext) sj1.getJobContext()).getText() );
assertEquals( new Date( 1000 ),
((MockTrigger) sj1.getTrigger()).hasNextFireTime() );
assertEquals( new Date( 1000 ),
((MockTrigger) sj1.getTrigger()).nextFireTime() );
}
public static class MockJob
implements
Job,
Serializable {
public void execute(JobContext ctx) {
}
}
public static class MockJobContext
implements
JobContext,
Serializable {
private String text;
public MockJobContext() {
}
public MockJobContext(String text) {
this.text = text;
}
public JobHandle getJobHandle() {
return null;
}
public void setJobHandle(JobHandle jobHandle) {
}
public String getText() {
return this.text;
}
}
public static class MockTrigger
implements
Trigger,
Serializable {
private Date date;
public MockTrigger() {
}
public MockTrigger(Date date) {
this.date = date;
}
public Date hasNextFireTime() {
return this.date;
}
public Date nextFireTime() {
return this.date;
}
}
}
|
[
"gds.geoffrey.de.smet@gmail.com"
] |
gds.geoffrey.de.smet@gmail.com
|
6843ab69cb916e199d1c6b170c69f0299498e79a
|
ff79e46531d5ad204abd019472087b0ee67d6bd5
|
/components/mail/test-src/och/comp/mail/MailServiceTest.java
|
426a403f651eff0ffb693012158435b097766867
|
[
"Apache-2.0"
] |
permissive
|
Frankie-666/live-chat-engine
|
24f927f152bf1ef46b54e3d55ad5cf764c37c646
|
3125d34844bb82a34489d05f1dc5e9c4aaa885a0
|
refs/heads/master
| 2020-12-25T16:36:00.156135
| 2015-08-16T09:16:57
| 2015-08-16T09:16:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,669
|
java
|
/*
* Copyright 2015 Evgeny Dolganov (evgenij.dolganov@gmail.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package och.comp.mail;
import static och.api.model.PropKey.*;
import java.util.ArrayList;
import och.comp.mail.common.SendTask;
import och.service.props.Props;
import och.service.props.WriteProps;
import och.service.props.impl.MapProps;
import org.junit.Before;
import org.junit.Test;
import test.BaseTest;
import test.TestException;
public class MailServiceTest extends BaseTest {
MapProps props = new MapProps();
@Before
public void init(){
props.putVal(mail_storeToDisc, false);
}
@Test
public void test_send_once() throws Exception {
boolean[] succeed = {true};
MailService mailService = new MailService(new Sender() {
@Override
public void send(SendTask task, Props config) throws Exception {
if( ! succeed[0]) throw new TestException();
}
}, props);
//ok
mailService.sendOnce(new SendReq().to("ddd@dd.dd").subject("test").text("test"));
//fail
try {
succeed[0] = false;
mailService.sendOnce(new SendReq().to("ddd@dd.dd").subject("test").text("test"));
fail_exception_expected();
}catch(TestException e){
//ok
}
}
@Test
public void test_send_fail() throws Exception{
class Result {
boolean done;
String text;
Throwable t;
int tryCount;
ArrayList<Long> times = new ArrayList<>();
void addTime(){
times.add(System.currentTimeMillis());
}
}
final Result result = new Result();
result.addTime();
final Object monitor = new Object();
WriteProps props = new MapProps();
int errorWaitDelta = 100;
props.putVal(mail_errorWaitDelta, ""+errorWaitDelta);
props.putVal(mail_storeToDisc, false);
MailService mailService = new MailService(new Sender() {
@Override
public void send(SendTask task, Props props) throws Exception {
result.tryCount++;
result.addTime();
throw new TestException();
}
}, props);
String msg = "test";
mailService.sendAsync(new SendReq("test@test.ru", "subject", msg), new SendCallback() {
@Override
public void onSuccess() {
synchronized (monitor) {
result.done = true;
monitor.notifyAll();
}
}
@Override
public void onFailed(Throwable t) {
synchronized (monitor) {
result.done = true;
result.t = t;
monitor.notifyAll();
}
}
});
synchronized (monitor) {
if( ! result.done) monitor.wait();
mailService.shutdown();
assertTrue(result.t instanceof TestException);
assertEquals(3, result.tryCount);
assertNull(result.text);
//check wait time
ArrayList<Long> times = result.times;
assertEquals(4, times.size());
for (int i = 1; i < times.size(); i++) {
long timeDelta = times.get(i) - times.get(i-1);
System.out.println(timeDelta);
long expectedWait = (i-1)*errorWaitDelta;
long marginOfError = 100;
assertTrue("timeDelta="+timeDelta+", expectedWait="+expectedWait,
timeDelta >= expectedWait-marginOfError
&& timeDelta <= expectedWait+marginOfError);
}
}
}
@Test
public void test_send_success() throws Exception{
class Result {
boolean done;
String text;
Throwable t;
}
final Result result = new Result();
final Object monitor = new Object();
MailService mailService = new MailService(new Sender() {
@Override
public void send(SendTask task, Props config) throws Exception {
result.text = task.msg.text;
}
}, props);
String msg = "test";
mailService.sendAsync(new SendReq("test@test.ru", "subject", msg), new SendCallback() {
@Override
public void onSuccess() {
synchronized (monitor) {
result.done = true;
monitor.notifyAll();
}
}
@Override
public void onFailed(Throwable t) {
synchronized (monitor) {
result.done = true;
result.t = t;
monitor.notifyAll();
}
}
});
synchronized (monitor) {
if( ! result.done) monitor.wait();
mailService.shutdown();
assertEquals(msg, result.text);
assertNull(result.t);
}
}
}
|
[
"evgenij.dolganov@gmail.com"
] |
evgenij.dolganov@gmail.com
|
638a83dfe70fb21cdb7c4c871b71f9724cb623c5
|
a128f19f6c10fc775cd14daf740a5b4e99bcd2fb
|
/middleheaven-security/src/main/java/org/middleheaven/aas/PasswordCallback.java
|
0ed2975f12f54fcf28754b67ab3607f0a6a427c1
|
[] |
no_license
|
HalasNet/middleheaven
|
c8bfa6199cb9b320b9cfd17b1f8e4961e3d35e6e
|
15e3e91c338e359a96ad01dffe9d94e069070e9c
|
refs/heads/master
| 2021-06-20T23:25:09.978612
| 2017-08-12T21:35:56
| 2017-08-12T21:37:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 980
|
java
|
package org.middleheaven.aas;
import org.middleheaven.collections.CollectionUtils;
/**
* The password {@link Callback}.
*/
public class PasswordCallback implements Callback {
private static final long serialVersionUID = 1769695239559899080L;
private String prompt;
private char[] password;
/**
*
* Constructor.
* @param prompt the password prompt. This string will somewhat utilized to interrogate the subject for a password.
*/
public PasswordCallback(String prompt){
this.prompt = prompt;
}
/**
*
* @return the password as a char array.
*/
public char[] getPassword() {
return CollectionUtils.duplicateArray(password);
}
public void setPassword(char[] password) {
this.password = CollectionUtils.duplicateArray(password);
}
public String getPrompt() {
return prompt;
}
@Override
public boolean isBlank() {
return password==null || password.length==0;
}
}
|
[
"sergiotaborda@yahoo.com.br"
] |
sergiotaborda@yahoo.com.br
|
43f4e99ef3703b32713edd6ae93fae810868f003
|
d93832d1d11fd3f6c79518193bc724e384d38976
|
/app/src/main/java/com/abings/mementomodel/MainActivity.java
|
da3e7903f660608d9741c3a5d0192a03d67b078b
|
[] |
no_license
|
Soon-gz/MementoModel
|
fca6807f9f55863c76cc330e75ed83b133473e5d
|
2f82243d7dfcbec71b654a5e3c7ff4de8af9baf0
|
refs/heads/master
| 2023-02-21T13:35:41.421852
| 2016-09-13T05:05:41
| 2016-09-13T05:05:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,221
|
java
|
package com.abings.mementomodel;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import com.abings.mementomodel.Builder.Director;
import com.abings.mementomodel.Builder.Player;
import com.abings.mementomodel.Builder.ZhanShiPlayer;
import com.abings.mementomodel.MementoModel.Caretaker;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//创建角色,魔族战士
Player player = Director.cratePlayer(new ZhanShiPlayer());
//到了保存记录节点
Caretaker caretaker = new Caretaker();
//打boss之前保存状态
caretaker.setMemento(player.createMemento());
//打Boss之前的状态
Log.i("Tag", player.toString());
//单挑BOSS失败了
player.fightWithBoss();
//单挑之后的状态
Log.i("Tag", player.toString());
//读取记录,满血复活
player.setMemento(caretaker.getMemento());
//读取记录之后的状态
Log.i("Tag", player.toString());
}
}
|
[
"sw201202@126.com"
] |
sw201202@126.com
|
9e87f9e8802323345d4eacde9cdcf2dbde445e4b
|
d526638dfdee240a61faa85955ae96e5c7e75175
|
/config-model/src/main/java/com/yahoo/vespa/model/filedistribution/FileDistributor.java
|
8860f5c2249b45ea64b19930edcc2c6b9c5fb98b
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
AndrewDi/vespa
|
dc9214ddff68b0a53701f24b18d2ef46c8139812
|
a751eee7ef908ba6c42633fe4332ed736fa841cc
|
refs/heads/master
| 2021-07-14T16:51:55.298012
| 2017-10-19T09:40:47
| 2017-10-19T09:40:47
| 105,101,697
| 1
| 0
| null | 2017-10-19T09:40:48
| 2017-09-28T04:17:57
|
Java
|
UTF-8
|
Java
| false
| false
| 4,197
|
java
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.filedistribution;
import com.yahoo.config.FileReference;
import com.yahoo.config.model.api.FileDistribution;
import com.yahoo.config.application.api.FileRegistry;
import com.yahoo.vespa.model.Host;
import java.util.*;
import java.util.stream.Collectors;
import static java.util.Arrays.asList;
/**
* Responsible for directing distribution of files to hosts.
*
* @author tonytv
*/
public class FileDistributor {
private final FileRegistry fileRegistry;
/** A map from files to the hosts to which that file should be distributed */
private final Map<FileReference, Set<Host>> filesToHosts = new LinkedHashMap<>();
/**
* Adds the given file to the associated application packages' registry of file and marks the file
* for distribution to the given hosts.
* <b>Note: This class receives ownership of the given collection.</b>
*
* @return the reference to the file, created by the application package
*/
public FileReference sendFileToHosts(String relativePath, Collection<Host> hosts) {
FileReference reference = fileRegistry.addFile(relativePath);
addToFilesToDistribute(reference, hosts);
return reference;
}
/** Same as sendFileToHost(relativePath,Collections.singletonList(host) */
public FileReference sendFileToHost(String relativePath, Host host) {
return sendFileToHosts(relativePath, Arrays.asList(host));
}
private void addToFilesToDistribute(FileReference reference, Collection<Host> hosts) {
Set<Host> oldHosts = getHosts(reference);
oldHosts.addAll(hosts);
}
private Set<Host> getHosts(FileReference reference) {
Set<Host> hosts = filesToHosts.get(reference);
if (hosts == null) {
hosts = new HashSet<>();
filesToHosts.put(reference, hosts);
}
return hosts;
}
public FileDistributor(FileRegistry fileRegistry) {
this.fileRegistry = fileRegistry;
}
/** Returns the files which has been marked for distribution to the given host */
public Set<FileReference> filesToSendToHost(Host host) {
Set<FileReference> files = new HashSet<>();
for (Map.Entry<FileReference,Set<Host>> e : filesToHosts.entrySet()) {
if (e.getValue().contains(host)) {
files.add(e.getKey());
}
}
return files;
}
public Set<Host> getTargetHosts() {
Set<Host> hosts = new HashSet<>();
for (Set<Host> hostSubset: filesToHosts.values())
hosts.addAll(hostSubset);
return hosts;
}
public Set<String> getTargetHostnames() {
return getTargetHosts().stream().map(Host::getHostName).collect(Collectors.toSet());
}
/** Returns the host which is the source of the files */
public String fileSourceHost() {
return fileRegistry.fileSourceHost();
}
public Set<FileReference> allFilesToSend() {
return filesToHosts.keySet();
}
// should only be called during deploy
public void sendDeployedFiles(FileDistribution dbHandler) {
String fileSourceHost = fileSourceHost();
for (Host host : getTargetHosts()) {
if ( ! host.getHostName().equals(fileSourceHost)) {
dbHandler.sendDeployedFiles(host.getHostName(), filesToSendToHost(host));
}
}
dbHandler.sendDeployedFiles(fileSourceHost, allFilesToSend());
dbHandler.removeDeploymentsThatHaveDifferentApplicationId(getTargetHostnames());
}
// should only be called during deploy, and only once, since it leads to file distributor
// rescanning all files, which is very expensive ATM (April 2016)
public void reloadDeployFileDistributor(FileDistribution dbHandler) {
dbHandler.reloadDeployFileDistributor();
}
private Set<String> union(Set<String> hosts, String... additionalHosts) {
Set<String> result = new HashSet<>(hosts);
result.addAll(asList(additionalHosts));
return result;
}
}
|
[
"bratseth@yahoo-inc.com"
] |
bratseth@yahoo-inc.com
|
e238e022bcd6070bd2e5e2ba5958b3b3054c5daa
|
b2016b74acf02c0117128b505baac48338d825c9
|
/sophia.mmorpg/src/main/java/sophia/mmorpg/player/itemBag/ItemBagSlot.java
|
f2e652c27dcea4c78edf732310fbb9c357be4478
|
[] |
no_license
|
atom-chen/server
|
979830e60778a3fba1740ea3afb2e38937e84cea
|
c44e12a3efe5435d55590c9c0fd9e26cec58ed65
|
refs/heads/master
| 2020-06-17T02:54:13.348191
| 2017-10-13T18:40:21
| 2017-10-13T18:40:21
| 195,772,502
| 0
| 1
| null | 2019-07-08T08:46:37
| 2019-07-08T08:46:37
| null |
UTF-8
|
Java
| false
| false
| 4,510
|
java
|
/**
* Copyright 2013-2015 Sophia
*
* 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 sophia.mmorpg.player.itemBag;
import sophia.mmorpg.item.Item;
public final class ItemBagSlot implements Comparable<ItemBagSlot>{
private short index = -1;
private Item item = null;
public ItemBagSlot() {
}
public ItemBagSlot(short index) {
this.index = index;
}
public ItemBagSlot(short index, Item item) {
this.index = index;
this.item = item;
}
public synchronized final void clearItem() {
item = null;
}
public synchronized final boolean isEmpty() {
return item == null;
}
public synchronized final boolean hasItem() {
return item != null;
}
public synchronized final boolean isFull() {
if (item.canStack()) {
if (item.getNumber() == item.getMaxStackNumber())
{
return true;
} else {
return false;
}
} else {
return true;
}
}
public synchronized int getCrtStackNumber() {
return item.getNumber();
}
public synchronized int getFreeStackNumber() {
int freeNumber = item.getMaxStackNumber() - item.getNumber();
if (freeNumber < 0) {
freeNumber = 0;
item.setNumber(item.getMaxStackNumber());
}
return freeNumber;
}
public synchronized void addItemNumber(int delta) {
int number = item.getNumber();
number += delta;
if (number > item.getMaxStackNumber()) {
number = item.getMaxStackNumber();
}
item.setNumber(number);
}
public synchronized void subItemNumber(int subtrahend) {
int number = item.getNumber();
number -= subtrahend;
if (number <= 0) {
item = null;
} else {
item.setNumber(number);
}
}
public synchronized final short getIndex() {
return index;
}
public synchronized final void setIndex(short index) {
this.index = index;
}
public synchronized final Item getItem() {
return item;
}
public synchronized final void setItem(Item item) {
this.item = item;
}
@Override
public int compareTo(ItemBagSlot other) {
boolean thisIsEmpty = this.isEmpty();
boolean otherIsEmpty = other.isEmpty();
if (thisIsEmpty && otherIsEmpty) {
return this.getIndex() > other.getIndex() ? 1 : -1;
}
if (thisIsEmpty && (!otherIsEmpty)) {
return 1;
}
if ((!thisIsEmpty) && otherIsEmpty) {
return -1;
}
Item thisItem = this.getItem();
Item otherItem = other.getItem();
if (!thisItem.equalItemRef(otherItem)) {
return thisItem.getItemRef().compareTo(otherItem.getItemRef());
}
if (thisItem.binded() != otherItem.binded()) {
return thisItem.binded() ? -1 : 1;
}
if(this.getIndex() > other.getIndex())
return 1;
else
return -1;
// if (thisItem.isNonPropertyItem()) {
// int thisItemNumber = thisItem.getNumber();
// int otherItemNumber = otherItem.getNumber();
// if (thisItemNumber < otherItemNumber) {
// return 1;
// } else if (thisItemNumber > otherItemNumber) {
// return -1;
// } else {
// return 0;
// }
// }
//
// return 0;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + index;
result = prime * result + ((item == null) ? 0 : item.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ItemBagSlot other = (ItemBagSlot) obj;
if (index != other.index)
return false;
if (item == null) {
if (other.item != null)
return false;
} else if (!item.equals(other.item))
return false;
return true;
}
public synchronized int mergeEqualItemFrom(ItemBagSlot from) {
int ret = 0;
int crtStackNumberOfFrom = from.getCrtStackNumber();
int freeStackNumberOfThis = getFreeStackNumber();
if (crtStackNumberOfFrom >= freeStackNumberOfThis) {
ret = freeStackNumberOfThis;
} else {
ret = crtStackNumberOfFrom;
}
this.addItemNumber(ret);
from.subItemNumber(ret);
return ret;
}
}
|
[
"hi@luanhailiang.cn"
] |
hi@luanhailiang.cn
|
da3ea4a4b18672acfcec34796a91706c190aa6e2
|
0bd2a3185a7883a41edefc39bec80e0a94355451
|
/app/src/main/java/com/waen/waen/Main/Adapter/Inbox_Parent_Admin.java
|
a589466e0c0e373053a0869fdaa7b3f242b9484a
|
[] |
no_license
|
AhmedMansour9/Waen2
|
5b744513026c33ce7ec2c0327ec1727f85bb5b7a
|
901c6259f32b82e7ec8e7a1d026a572c6342d642
|
refs/heads/master
| 2020-04-17T23:03:12.291581
| 2019-06-25T12:30:47
| 2019-06-25T12:30:47
| 167,019,201
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,142
|
java
|
package com.waen.waen.Main.Adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.waen.waen.R;
import com.waen.waen.SuperVisor.Model.Inbox_details;
import java.util.ArrayList;
import java.util.List;
public class Inbox_Parent_Admin extends RecyclerView.Adapter<Inbox_Parent_Admin.MyViewHolder>{
public static List<Inbox_details> filteredList=new ArrayList<>();
View itemView;
Context con;
public class MyViewHolder extends RecyclerView.ViewHolder {
private TextView T_Title,T_LastMessage,T_Time;
public MyViewHolder(View view) {
super(view);
T_Time=view.findViewById(R.id.T_Time);
T_LastMessage=view.findViewById(R.id.T_LastMessage);
T_Title=view.findViewById(R.id.T_Title);
}
}
public Inbox_Parent_Admin(List<Inbox_details> list, Context context){
this.filteredList=list;
this.con=context;
}
// public void setClickListener(Details_Service itemClickListener) {
// this.details_service = itemClickListener;
// }
@Override
public Inbox_Parent_Admin.MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.row_chat_admin, parent, false);
return new Inbox_Parent_Admin.MyViewHolder(itemView);
}
@Override
public void onBindViewHolder(final Inbox_Parent_Admin.MyViewHolder holder, final int position) {
holder.T_Time.setText(filteredList.get(position).getDate());
holder.T_LastMessage.setText(filteredList.get(position).getBody());
holder.T_Title.setText(filteredList.get(position).getTitle());
}
@Override
public int getItemCount() {
return filteredList.size() ;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public int getItemViewType(int position) {
return position;
}
}
|
[
"37387373+AhmedMansour9@users.noreply.github.com"
] |
37387373+AhmedMansour9@users.noreply.github.com
|
41afd11e02f1acdd94fdfc4a814825242f7fd7ca
|
a2df6764e9f4350e0d9184efadb6c92c40d40212
|
/aliyun-java-sdk-ons/src/main/java/com/aliyuncs/ons/model/v20190214/OnsConsumerGetConnectionResponse.java
|
4d9b49311fcd3adc452156c0007281b07a318e6a
|
[
"Apache-2.0"
] |
permissive
|
warriorsZXX/aliyun-openapi-java-sdk
|
567840c4bdd438d43be6bd21edde86585cd6274a
|
f8fd2b81a5f2cd46b1e31974ff6a7afed111a245
|
refs/heads/master
| 2022-12-06T15:45:20.418475
| 2020-08-20T08:37:31
| 2020-08-26T06:17:49
| 290,450,773
| 1
| 0
|
NOASSERTION
| 2020-08-26T09:15:48
| 2020-08-26T09:15:47
| null |
UTF-8
|
Java
| false
| false
| 2,671
|
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.ons.model.v20190214;
import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.ons.transform.v20190214.OnsConsumerGetConnectionResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class OnsConsumerGetConnectionResponse extends AcsResponse {
private String requestId;
private String helpUrl;
private Data data;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getHelpUrl() {
return this.helpUrl;
}
public void setHelpUrl(String helpUrl) {
this.helpUrl = helpUrl;
}
public Data getData() {
return this.data;
}
public void setData(Data data) {
this.data = data;
}
public static class Data {
private List<ConnectionDo> connectionList;
public List<ConnectionDo> getConnectionList() {
return this.connectionList;
}
public void setConnectionList(List<ConnectionDo> connectionList) {
this.connectionList = connectionList;
}
public static class ConnectionDo {
private String clientId;
private String clientAddr;
private String language;
private String version;
public String getClientId() {
return this.clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getClientAddr() {
return this.clientAddr;
}
public void setClientAddr(String clientAddr) {
this.clientAddr = clientAddr;
}
public String getLanguage() {
return this.language;
}
public void setLanguage(String language) {
this.language = language;
}
public String getVersion() {
return this.version;
}
public void setVersion(String version) {
this.version = version;
}
}
}
@Override
public OnsConsumerGetConnectionResponse getInstance(UnmarshallerContext context) {
return OnsConsumerGetConnectionResponseUnmarshaller.unmarshall(this, context);
}
}
|
[
"haowei.yao@alibaba-inc.com"
] |
haowei.yao@alibaba-inc.com
|
c64441739f3804b220741d4bf6e1e62a8ccde00c
|
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
|
/schemaOrgDomaConv/src/org/kyojo/schemaOrg/m3n3/doma/core/itemAvailability/PreSaleConverter.java
|
b1d2aba6196b9bbcc346fa69bf0362617c82f4c9
|
[
"Apache-2.0"
] |
permissive
|
nagaikenshin/schemaOrg
|
3dec1626781913930da5585884e3484e0b525aea
|
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
|
refs/heads/master
| 2021-06-25T04:52:49.995840
| 2019-05-12T06:22:37
| 2019-05-12T06:22:37
| 134,319,974
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 572
|
java
|
package org.kyojo.schemaorg.m3n3.doma.core.itemAvailability;
import org.seasar.doma.ExternalDomain;
import org.seasar.doma.jdbc.domain.DomainConverter;
import org.kyojo.schemaorg.m3n3.core.itemAvailability.PRE_SALE;
import org.kyojo.schemaorg.m3n3.core.ItemAvailability.PreSale;
@ExternalDomain
public class PreSaleConverter implements DomainConverter<PreSale, String> {
@Override
public String fromDomainToValue(PreSale domain) {
return domain.getNativeValue();
}
@Override
public PreSale fromValueToDomain(String value) {
return new PRE_SALE(value);
}
}
|
[
"nagai@nagaikenshin.com"
] |
nagai@nagaikenshin.com
|
4692c9d983b01712c318a8429d9bfff91f106a04
|
9cdf4a803b5851915b53edaeead2546f788bddc6
|
/machinelearning/5.0.x/drools-clips/src/main/java/org/drools/clips/Function.java
|
3f3820456d94ec276849ccac94b128638624f006
|
[
"Apache-2.0"
] |
permissive
|
kiegroup/droolsjbpm-contributed-experiments
|
8051a70cfa39f18bc3baa12ca819a44cc7146700
|
6f032d28323beedae711a91f70960bf06ee351e5
|
refs/heads/master
| 2023-06-01T06:11:42.641550
| 2020-07-15T15:09:02
| 2020-07-15T15:09:02
| 1,184,582
| 1
| 13
| null | 2021-06-24T08:45:52
| 2010-12-20T15:42:26
|
Java
|
UTF-8
|
Java
| false
| false
| 178
|
java
|
package org.drools.clips;
public interface Function {
public abstract String getName();
public abstract void dump(LispForm lispForm, Appendable appendable);
}
|
[
"gizil.oguz@gmail.com"
] |
gizil.oguz@gmail.com
|
316d89f5a0e6ff35714a1d3c861cec41d9ff70ce
|
e48088f3614e88f90b8f7d18ca80cbe58ee4f26f
|
/admin-manage-core/src/main/java/com/duobei/core/operation/app/dao/mapper/AppMapper.java
|
39575494c07eaf1fd509e3cad353202db8a2d819
|
[] |
no_license
|
huangzfa/admin-manage
|
e5cbd1be8e131ca22d3201dd96d443c3dae75b20
|
e1fd3587b0f9de0c228ba8571e688681190dd23a
|
refs/heads/master
| 2022-02-25T21:39:31.876497
| 2019-09-05T13:13:29
| 2019-09-05T13:13:29
| 206,566,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,911
|
java
|
package com.duobei.core.operation.app.dao.mapper;
import com.duobei.core.operation.app.domain.App;
import com.duobei.core.operation.app.domain.AppExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AppMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
long countByExample(AppExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
int deleteByExample(AppExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
int insert(App record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
int insertSelective(App record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
List<App> selectByExample(AppExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
App selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
int updateByExampleSelective(@Param("record") App record, @Param("example") AppExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
int updateByExample(@Param("record") App record, @Param("example") AppExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
int updateByPrimaryKeySelective(App record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table yy_app
*
* @mbg.generated Thu Apr 04 20:57:27 CST 2019
*/
int updateByPrimaryKey(App record);
}
|
[
"1593582614@qq.com"
] |
1593582614@qq.com
|
e4db16da87895e9fbb2bb903a9222e29d3f6a9ca
|
3735a07d455d7b40613c3c4160aa8b1cb1b3472a
|
/platform/platform-api/src/com/intellij/openapi/keymap/NationalKeyboardSupport.java
|
3767d19d7c102febba2591e6f690efb05d74ec47
|
[
"Apache-2.0"
] |
permissive
|
caofanCPU/intellij-community
|
ede9417fc4ccb4b5efefb099906e4abe6871f3b4
|
5ad3e2bdf3c83d86e7c4396f5671929768d76999
|
refs/heads/master
| 2023-02-27T21:38:33.416107
| 2021-02-05T06:37:40
| 2021-02-05T06:37:40
| 321,209,485
| 1
| 0
|
Apache-2.0
| 2021-02-05T06:37:41
| 2020-12-14T02:22:32
| null |
UTF-8
|
Java
| false
| false
| 3,625
|
java
|
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.keymap;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.awt.*;
import java.awt.im.InputContext;
import java.util.Locale;
@State(name = "KeyboardSettings", storages = @Storage("keyboard.xml"))
public final class NationalKeyboardSupport implements PersistentStateComponent<NationalKeyboardSupport.OptionSet> {
private static final String[] MAC_SUPPORTED_LOCALES = {"de", "fr", "it", "no", "sk"};
private static final String[] WIN_SUPPORTED_LOCALES = {"be", "ru", "uk", "bg", "sr"};
public static final String VMOption = getVMOption();
public static boolean isSupportedKeyboardLayout(@NotNull Component component) {
if (SystemInfo.isLinux) {
return true;
}
String[] supportedNonEnglishLanguages;
if (SystemInfo.isMac) {
supportedNonEnglishLanguages = MAC_SUPPORTED_LOCALES;
}
else if (SystemInfo.isWindows) {
supportedNonEnglishLanguages = WIN_SUPPORTED_LOCALES;
}
else {
return false;
}
String keyboardLayoutLanguage = getLanguageForComponent(component);
for (String language : supportedNonEnglishLanguages) {
if (language.equals(keyboardLayoutLanguage)) {
return true;
}
}
return false;
}
public static @NotNull String getVMOption() {
if (SystemInfo.isMac || SystemInfo.isLinux) {
return "com.sun.awt.use.national.layouts";
}
return "com.sun.awt.useLatinNonAlphaNumKeycodes";
}
public static @NotNull String getKeymapBundleKey() {
if (SystemInfo.isMac || SystemInfo.isLinux) {
return "use.national.layouts.for.shortcuts";
}
return "use.us.non.alpha.num.keys";
}
@Nullable
public static String getLanguageForComponent(@NotNull Component component) {
final Locale locale = getLocaleForComponent(component);
return locale == null ? null : locale.getLanguage();
}
@Nullable
protected static Locale getLocaleForComponent(@NotNull Component component) {
final InputContext context = component.getInputContext();
return context == null ? null : context.getLocale();
}
public static final class OptionSet {
public boolean enabled = "true".equals(System.getProperty(VMOption));
}
private OptionSet myOptions = new OptionSet();
public static NationalKeyboardSupport getInstance() {
if (ApplicationManager.getApplication().isDisposed()) {
return new NationalKeyboardSupport();
}
else {
return ApplicationManager.getApplication().getService(NationalKeyboardSupport.class);
}
}
@Nullable
@Override
public OptionSet getState() {
return myOptions;
}
@Override
public void loadState(@NotNull OptionSet state) {
state.enabled
= state.enabled || "true".equals(System.getProperty(VMOption));
myOptions = state;
}
@Override
public void noStateLoaded() {
// on MacOS national keymap support is turned on by default
if (SystemInfo.isMac) {
myOptions.enabled = "true".equals(System.getProperty(VMOption, "true"));
}
}
public boolean getEnabled() {
return myOptions.enabled;
}
public void setEnabled(boolean enabled) {
myOptions.enabled = enabled;
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
f08ef804e6f0d87e5343f81fa8a38e4664873a35
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/p280ss/android/ugc/aweme/sharer/p1544a/C38307i.java
|
4e3468a5dac7dc61a854b1345ddbad4d37977bbc
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,799
|
java
|
package com.p280ss.android.ugc.aweme.sharer.p1544a;
import android.content.Context;
import com.p280ss.android.ugc.aweme.sharer.C38352d;
import com.p280ss.android.ugc.aweme.sharer.C38354f;
import com.p280ss.android.ugc.aweme.sharer.C38358i;
import com.p280ss.android.ugc.aweme.sharer.p1545b.C38347c;
import com.zhiliaoapp.musically.df_live_zego_link.R;
import kotlin.jvm.internal.C7571f;
import kotlin.jvm.internal.C7573i;
/* renamed from: com.ss.android.ugc.aweme.sharer.a.i */
public final class C38307i extends C38352d {
/* renamed from: a */
public static final C38308a f99522a = new C38308a(null);
/* renamed from: com.ss.android.ugc.aweme.sharer.a.i$a */
public static final class C38308a {
private C38308a() {
}
public /* synthetic */ C38308a(C7571f fVar) {
this();
}
}
/* renamed from: a */
public final int mo95736a() {
return R.drawable.atd;
}
/* renamed from: a */
public final boolean mo95745a(C38358i iVar, Context context) {
C7573i.m23587b(iVar, C38347c.f99553h);
C7573i.m23587b(context, "context");
return false;
}
/* renamed from: b */
public final String mo95739b() {
return "instagram";
}
/* renamed from: c */
public final String mo95740c() {
return "Instagram";
}
/* renamed from: d */
public final String mo95935d() {
return "com.instagram.android";
}
/* renamed from: e */
public final int mo95742e() {
return R.drawable.b02;
}
/* renamed from: a */
public final boolean mo95737a(Context context, C38354f fVar) {
C7573i.m23587b(context, "context");
C7573i.m23587b(fVar, C38347c.f99553h);
return super.mo95737a(context, fVar);
}
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
b30d608b6f915ffc082f02a340f438216d1cd02a
|
5e38292af670960132795cc0323248acc3ed83eb
|
/rito-admin/src/main/java/com/stylefeng/guns/core/listener/ScheduleJobInitListener.java
|
3e74c5d87bf379d1084932fa2cdbb3d667890126
|
[
"Apache-2.0"
] |
permissive
|
527088995/dian
|
2144590a61177c6be43afce4f3b9667bde74c69c
|
5238b1c46290a3ab8281a2eb83590d27d8e020b1
|
refs/heads/master
| 2022-11-06T17:09:33.968961
| 2020-07-31T02:30:02
| 2020-07-31T02:30:02
| 193,050,897
| 20
| 7
|
NOASSERTION
| 2022-10-05T19:33:24
| 2019-06-21T07:19:51
|
Java
|
UTF-8
|
Java
| false
| false
| 767
|
java
|
package com.stylefeng.guns.core.listener;
import com.stylefeng.guns.core.task.JobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
/**
* @Description:task监听器负责初始化task
* @Auther: wj
* @Date: 2019/6/14 10:34
*/
@Component
@Order(value = 1)
public class ScheduleJobInitListener implements CommandLineRunner {
@Autowired
JobService scheduleJobService;
@Override
public void run(String... arg0) throws Exception {
try {
scheduleJobService.initSchedule();
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"527088995@qq.com"
] |
527088995@qq.com
|
be7ce3a157e06d42a430a29c423289d40c4dc72c
|
6252c165657baa6aa605337ebc38dd44b3f694e2
|
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-800-Files/boiler-To-Generate-800-Files/syncregions-800Files/BoilerActuator3497.java
|
fa172c1ef3b81becbedcba9360bf2800109533d0
|
[] |
no_license
|
soha500/EglSync
|
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
|
55101bc781349bb14fefc178bf3486e2b778aed6
|
refs/heads/master
| 2021-06-23T02:55:13.464889
| 2020-12-11T19:10:01
| 2020-12-11T19:10:01
| 139,832,721
| 0
| 1
| null | 2019-05-31T11:34:02
| 2018-07-05T10:20:00
|
Java
|
UTF-8
|
Java
| false
| false
| 263
|
java
|
package syncregions;
public class BoilerActuator3497 {
public execute(int temperatureDifference3497, boolean boilerStatus3497) {
//sync _bfpnGUbFEeqXnfGWlV3497, behaviour
Half Change - return temperature - targetTemperature;
//endSync
}
}
|
[
"sultanalmutairi@172.20.10.2"
] |
sultanalmutairi@172.20.10.2
|
3d9a9729d4d2a1858c44c81a7581450111e00a0f
|
3b1112e6d5d57bad698b9ce255d9bbd25606ae04
|
/src/test/java/_160_IntersectionOfTwoLinkedLists/Solution.java
|
5b6febd5b2720a86347de1fbf6a95dc979bc7180
|
[] |
no_license
|
jchanghong/leetcode-java-Test
|
dbd9cd52e834ea528cbe5b8d734ec1249f466013
|
f84c80f1b609ad2cf3323fb32261b7435d46cbaa
|
refs/heads/master
| 2021-06-23T10:51:31.964246
| 2017-08-15T07:42:14
| 2017-08-15T07:42:18
| 100,351,439
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,120
|
java
|
/**
* Time : O(m + n) ; Space: O(1)
* @tag : Linked List
* @by : Steven Cooks
* @date: Aug 10, 2015
***************************************************************************
* Description:
*
* Write a program to find the node at which the intersection of two singly linked
* lists begins.
*
* For example, the following two linked lists:
* A: a1 → a2
* ↘
* c1 → c2 → c3
* ↗
* B: b1 → b2 → b3
* begin to intersect at node c1.
*
* Notes:
* If the two linked lists have no intersection at all, return null.
* The linked lists must retain their original structure after the function
* returns.
* You may assume there are no cycles anywhere in the entire linked structure.
* Your code should preferably run in O(n) time and use only O(1) memory.
*
***************************************************************************
* {@link https://leetcode.com/problems/intersection-of-two-linked-lists/ }
*/
package _160_IntersectionOfTwoLinkedLists;
import com.leetcode.ListNode;
/** see test {@link _160_IntersectionOfTwoLinkedLists.SolutionTest } */
public class Solution {
/**
* Assuming longer list's length is <em>m</em>, shorter list's length is <em>n</em>,
* and the distance between intersecting position and list end is <em>l</em>
* (m + n - l)
* |
* |==========!==|+++!++|
* => two pointers will meet at position (m + n - l)
* |+++!++|==========!==|
* |
* (m + n - l)
*/
public ListNode getIntersectionNode(ListNode headA, ListNode headB) {
ListNode nodeA = headA;
ListNode nodeB = headB;
// loop until nodes meet or both nodes come to list end (i.e. null)
while (nodeA != nodeB) {
// after listA is finished, scan from head of listB
nodeA = nodeA != null ? nodeA.next : headB;
nodeB = nodeB != null ? nodeB.next : headA;
}
return nodeA;
}
}
|
[
"3200601@qq.com"
] |
3200601@qq.com
|
1e1cbb965ef38ba1fda020c5be718d50fcd5496a
|
a2ada2abf51f45e2a5a25927f9f98fccfbe4d988
|
/usergenerator/src/main/java/it/giacomobergami/usergenerator/utils/CSVUtil.java
|
74605c4cce0fd9f0c81270dccbbd6a99d5e54278
|
[] |
no_license
|
gyankos/graphjoin
|
1df918fd8b52cc2e1828ed584b4fc8abcace6c6e
|
80a7ac84a92343aadac73579dab4b014ba601e9a
|
refs/heads/master
| 2022-12-01T14:15:40.392942
| 2022-10-11T22:30:22
| 2022-10-11T22:30:22
| 162,083,816
| 0
| 1
| null | 2022-11-23T22:27:07
| 2018-12-17T06:18:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,597
|
java
|
package it.giacomobergami.usergenerator.utils;
import java.lang.reflect.Field;
import java.util.List;
import java.util.logging.Logger;
public class CSVUtil {
private static final Logger LOGGER = Logger.getLogger(CSVUtil.class .getName());
private final static char DEFAULT_SEPARATOR = ' ';
public static String toCSV(List<?> objectList, char separator, boolean displayHeader) {
StringBuilder result =new StringBuilder();
if (objectList.size() == 0) {
return result.toString();
}
if(displayHeader){
result.append(getHeaders(objectList.get(0),separator));
result.append("\n");
}
for (Object obj : objectList) {
result.append(addObjectRow(obj, separator)).append("\n");
}
return result.toString();
}
public static String getHeaders(Object obj,char separator) {
StringBuilder resultHeader = new StringBuilder();
boolean firstField = true;
Field fields[] = obj.getClass().getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
String value;
try {
value = field.getName();
if(firstField){
resultHeader.append(value);
firstField = false;
}
else{
resultHeader.append(separator).append(value);
}
field.setAccessible(false);
} catch (IllegalArgumentException e) {
LOGGER.severe(e.toString());
}
}
return resultHeader.toString();
}
public static String addObjectRow(Object obj, char separator) {
StringBuilder csvRow =new StringBuilder();
Field fields[] = obj.getClass().getDeclaredFields();
boolean firstField = true;
for (Field field : fields) {
field.setAccessible(true);
Object value;
try {
value = field.get(obj);
if(value == null)
value = "";
if(firstField){
csvRow.append(value);
firstField = false;
}
else{
csvRow.append(separator).append(value);
}
field.setAccessible(false);
} catch (IllegalArgumentException | IllegalAccessException e) {
LOGGER.severe(e.toString());
}
}
return csvRow.toString();
}
}
|
[
"bergamigiacomo@gmail.com"
] |
bergamigiacomo@gmail.com
|
1e6efa54bb20879130d4fd6ac3fed245d632ad57
|
6ce88a15d15fc2d0404243ca8415c84c8a868905
|
/bitcamp-java-basic/src/step11/ex06/C.java
|
20f3698c95aa7d6ef79745c4bf15d84c1f7d4120
|
[] |
no_license
|
SangKyeongLee/bitcamp
|
9f6992ce2f3e4425f19b0af19ce434c4864e610b
|
a26991752920f280f6404565db2b13a0c34ca3d9
|
refs/heads/master
| 2021-01-24T10:28:54.595759
| 2018-08-10T07:25:57
| 2018-08-10T07:25:57
| 123,054,474
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 777
|
java
|
package step11.ex06;
public class C extends B {
int v3;
C() {
// 수퍼 클래스의 어떤 생성자를 호출할지 지정하지 않으면 컴파일러는
// 다음과 같이 수퍼 클래스의 기본 생성자를 호출하라는 명령을 붙인다.
//super(); // 즉 개발자가 붙이지 않으면 자동으로 붙인다.
System.out.println("C() 생성자!");
// 만약 개발자가 수퍼 클래스의 생성자를 호출하는 명령을 작성할 때
// 그 전에 다른 코드가 있다면 컴파일러는 오류를 발생시킨다.
//super(); // 따라서 수퍼 클래스 생성자를 호출하는 명령은 반드시 첫 문장으로 와야 한다.
}
}
|
[
"sangkyeong.lee93@gmail.com"
] |
sangkyeong.lee93@gmail.com
|
5c8e8ecd9a73cf1cf309d0e0e441492eb8569334
|
194caa3ffec4854b41d73eebde8eebace03a858a
|
/07.Model2MVCShop(URI,pattern)/src/main/java/com/model2/mvc/service/purchase/PurchaseService.java
|
21574d7866249786f8d4f2672ed7add82d71448e
|
[] |
no_license
|
youree1226/07refact
|
b72d2eabbfa91d165b35d7fe83029aa076918996
|
210d18cb197b759a4c43ec7cd2fe7b6eea619090
|
refs/heads/master
| 2020-05-18T11:52:00.209055
| 2019-05-02T01:12:26
| 2019-05-02T01:12:26
| 184,391,577
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 762
|
java
|
package com.model2.mvc.service.purchase;
import java.util.Map;
import com.model2.mvc.common.Search;
import com.model2.mvc.service.domain.Purchase;
public interface PurchaseService {
public void addPurchase(Purchase purchase) throws Exception;
public Purchase getPurchase(int tranNo) throws Exception;
public Purchase getPurchase2(int ProdNo) throws Exception;
public Map<String,Object> getPurchaseList(Search search,String buyerId) throws Exception;
public Map<String,Object> getSaleList(Search search) throws Exception;
public void updatePurchase(Purchase purchase) throws Exception;
public void updateTranCode(Purchase purchase) throws Exception;
public void cancelPurchase(int tranNo) throws Exception;
}
|
[
"USER@USER-PC"
] |
USER@USER-PC
|
b79f7ba30112fba581356f172b3be0d7035b3d6c
|
0609f8042394cdbeed3c28640fd1497a37b70da8
|
/app/src/main/java/com/fanyafeng/recreation/view/photoview/gestures/FroyoGestureDetector.java
|
aed7898a40d92275631b6a5a87b10b7a5eb24481
|
[] |
no_license
|
mrscolove/Recreation
|
70d3654b2b883f43e5a5cb730cb3b4321f54b927
|
23c8fa3d3dd4b3ab397968375dbce9ffc6365777
|
refs/heads/master
| 2021-06-14T22:16:40.867664
| 2017-03-29T09:57:33
| 2017-03-29T09:57:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,317
|
java
|
/*******************************************************************************
* Copyright 2011, 2012 Chris Banes.
*
* 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.fanyafeng.recreation.view.photoview.gestures;
import android.annotation.TargetApi;
import android.content.Context;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
@TargetApi(8)
public class FroyoGestureDetector extends EclairGestureDetector {
protected final ScaleGestureDetector mDetector;
public FroyoGestureDetector(Context context) {
super(context);
ScaleGestureDetector.OnScaleGestureListener mScaleListener = new ScaleGestureDetector.OnScaleGestureListener() {
@Override
public boolean onScale(ScaleGestureDetector detector) {
float scaleFactor = detector.getScaleFactor();
if (Float.isNaN(scaleFactor) || Float.isInfinite(scaleFactor))
return false;
mListener.onScale(scaleFactor,
detector.getFocusX(), detector.getFocusY());
return true;
}
@Override
public boolean onScaleBegin(ScaleGestureDetector detector) {
return true;
}
@Override
public void onScaleEnd(ScaleGestureDetector detector) {
// NO-OP
}
};
mDetector = new ScaleGestureDetector(context, mScaleListener);
}
@Override
public boolean isScaling() {
return mDetector.isInProgress();
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
mDetector.onTouchEvent(ev);
return super.onTouchEvent(ev);
}
}
|
[
"fanyafeng@365rili.com"
] |
fanyafeng@365rili.com
|
c9578ee1759464c01da3c7ec95d23ed49e7da319
|
920b8d88fe46763b208ceac71ede8782cf962d8f
|
/logging/src/test/java/org/slf4j/impl/StaticMarkerBinder.java
|
eea32dbc0cc38f04729f601f7c673d5fe67d4f41
|
[] |
no_license
|
licshire/gatein-common
|
50e7ee2d143e598069a1bbd686a2b91f6533e912
|
240055cc424542d1af925a059f9df6045263ecbc
|
refs/heads/master
| 2021-01-18T00:41:05.578219
| 2014-03-17T19:42:28
| 2014-03-17T19:42:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,506
|
java
|
/*
* Copyright (C) 2009 eXo Platform SAS.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.slf4j.impl;
import org.slf4j.IMarkerFactory;
import org.slf4j.helpers.BasicMarkerFactory;
import org.slf4j.spi.MarkerFactoryBinder;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
public class StaticMarkerBinder implements MarkerFactoryBinder
{
public static final StaticMarkerBinder SINGLETON = new StaticMarkerBinder();
final IMarkerFactory markerFactory = new BasicMarkerFactory();
private StaticMarkerBinder() {
}
public IMarkerFactory getMarkerFactory() {
return markerFactory;
}
public String getMarkerFactoryClassStr() {
return BasicMarkerFactory.class.getName();
}
}
|
[
"julien@julienviet.com"
] |
julien@julienviet.com
|
4f2a7d44b4bfa2a442926fdadc2a3a4bdc395308
|
9d0517091fe2313c40bcc88a7c82218030d2075c
|
/apis/chef/src/main/java/org/jclouds/chef/strategy/ListNodesInEnvironment.java
|
efeffe69a5c41cc6aabff0af11429c0495f9e85b
|
[
"Apache-2.0"
] |
permissive
|
nucoupons/Mobile_Applications
|
5c63c8d97f48e1051049c5c3b183bbbaae1fa6e6
|
62239dd0f17066c12a86d10d26bef350e6e9bd43
|
refs/heads/master
| 2020-12-04T11:49:53.121041
| 2020-01-04T12:00:04
| 2020-01-04T12:00:04
| 231,754,011
| 0
| 0
|
Apache-2.0
| 2020-01-04T12:02:30
| 2020-01-04T11:46:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,276
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.chef.strategy;
import com.google.inject.ImplementedBy;
import org.jclouds.chef.domain.Node;
import org.jclouds.chef.strategy.internal.ListNodesInEnvironmentImpl;
import java.util.concurrent.ExecutorService;
@ImplementedBy(ListNodesInEnvironmentImpl.class)
public interface ListNodesInEnvironment {
Iterable<? extends Node> execute(String environmentName);
Iterable<? extends Node> execute(ExecutorService executor, String environmentName);
}
|
[
"Administrator@fdp"
] |
Administrator@fdp
|
8f5f9b4b67a99048ac84db1f4d5f9ad7fb90a450
|
0f1138e69d3c7fda9879f2b0f809624763eaca5d
|
/src/main/java/com/yaic/app/syn/service/SynPolicyService.java
|
91eec4834f644454d0d25351dbab79afcf9e8383
|
[] |
no_license
|
Jxyxl259/order_provider
|
23e880de8efb017423c665ce3ec4d899241095a4
|
f1a884a13d3aca6f01104309f030f5438f7e8b2b
|
refs/heads/master
| 2020-03-29T08:21:26.216815
| 2018-09-21T03:46:08
| 2018-09-21T03:46:08
| 149,706,291
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 930
|
java
|
/*
* Created By lujicong (2017-03-20 14:44:31)
* Homepage https://github.com/lujicong
* Since 2013 - 2017
*/
package com.yaic.app.syn.service;
import java.util.List;
import com.yaic.fa.service.IBaseService;
import com.yaic.fa.mybatis.pagehelper.PageInfo;
import com.yaic.app.syn.dto.domain.SynPolicyDto;
public interface SynPolicyService extends IBaseService<SynPolicyDto> {
public PageInfo<SynPolicyDto> findPageInfo(int page, int rows, SynPolicyDto synPolicyDto, String orderBy);
public int deleteSynPolicyData(SynPolicyDto synPolicyDto);
public String taskSynPolicyDeal();
public String taskSynPolicyDealDesc();
public int taskSynPolicyDealProcess(List<SynPolicyDto> synPolicyList);
public String taskSynPolicyProcessDeal();
public int synPolicyProcessDeal(List<SynPolicyDto> synPolicyList);
public int querySynPolicyCount(SynPolicyDto synPolicyDto);
}
|
[
"jxy_259_job@163.com"
] |
jxy_259_job@163.com
|
e4487151f3e53697f7e94939f851bc48c1c5d047
|
4da9097315831c8639a8491e881ec97fdf74c603
|
/src/StockIT-v1-release_source_from_JADX/sources/com/facebook/imagepipeline/producers/LocalFetchProducer.java
|
1e9d3ed1ab8af128bb638ad0ae16b6e3d4ffe2d2
|
[
"Apache-2.0"
] |
permissive
|
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
|
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
|
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
|
refs/heads/main
| 2023-08-11T06:17:05.659651
| 2021-10-01T08:48:06
| 2021-10-01T08:48:06
| 410,595,708
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,230
|
java
|
package com.facebook.imagepipeline.producers;
import com.facebook.common.internal.Closeables;
import com.facebook.common.memory.PooledByteBuffer;
import com.facebook.common.memory.PooledByteBufferFactory;
import com.facebook.common.references.CloseableReference;
import com.facebook.imagepipeline.image.EncodedImage;
import com.facebook.imagepipeline.request.ImageRequest;
import com.google.android.gms.common.internal.ImagesContract;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.Executor;
import javax.annotation.Nullable;
public abstract class LocalFetchProducer implements Producer<EncodedImage> {
private final Executor mExecutor;
private final PooledByteBufferFactory mPooledByteBufferFactory;
/* access modifiers changed from: protected */
public abstract EncodedImage getEncodedImage(ImageRequest imageRequest) throws IOException;
/* access modifiers changed from: protected */
public abstract String getProducerName();
protected LocalFetchProducer(Executor executor, PooledByteBufferFactory pooledByteBufferFactory) {
this.mExecutor = executor;
this.mPooledByteBufferFactory = pooledByteBufferFactory;
}
public void produceResults(Consumer<EncodedImage> consumer, ProducerContext producerContext) {
final ProducerListener2 producerListener = producerContext.getProducerListener();
final ImageRequest imageRequest = producerContext.getImageRequest();
final ProducerContext producerContext2 = producerContext;
final C10011 r0 = new StatefulProducerRunnable<EncodedImage>(consumer, producerListener, producerContext, getProducerName()) {
/* access modifiers changed from: protected */
@Nullable
public EncodedImage getResult() throws Exception {
EncodedImage encodedImage = LocalFetchProducer.this.getEncodedImage(imageRequest);
if (encodedImage == null) {
producerListener.onUltimateProducerReached(producerContext2, LocalFetchProducer.this.getProducerName(), false);
producerContext2.setExtra(1, ImagesContract.LOCAL);
return null;
}
encodedImage.parseMetaData();
producerListener.onUltimateProducerReached(producerContext2, LocalFetchProducer.this.getProducerName(), true);
producerContext2.setExtra(1, ImagesContract.LOCAL);
return encodedImage;
}
/* access modifiers changed from: protected */
public void disposeResult(EncodedImage encodedImage) {
EncodedImage.closeSafely(encodedImage);
}
};
producerContext.addCallbacks(new BaseProducerContextCallbacks() {
public void onCancellationRequested() {
r0.cancel();
}
});
this.mExecutor.execute(r0);
}
/* access modifiers changed from: protected */
public EncodedImage getByteBufferBackedEncodedImage(InputStream inputStream, int i) throws IOException {
CloseableReference closeableReference;
if (i <= 0) {
try {
closeableReference = CloseableReference.m128of(this.mPooledByteBufferFactory.newByteBuffer(inputStream));
} catch (Throwable th) {
Closeables.closeQuietly(inputStream);
CloseableReference.closeSafely((CloseableReference<?>) null);
throw th;
}
} else {
closeableReference = CloseableReference.m128of(this.mPooledByteBufferFactory.newByteBuffer(inputStream, i));
}
CloseableReference closeableReference2 = closeableReference;
EncodedImage encodedImage = new EncodedImage((CloseableReference<PooledByteBuffer>) closeableReference2);
Closeables.closeQuietly(inputStream);
CloseableReference.closeSafely((CloseableReference<?>) closeableReference2);
return encodedImage;
}
/* access modifiers changed from: protected */
public EncodedImage getEncodedImage(InputStream inputStream, int i) throws IOException {
return getByteBufferBackedEncodedImage(inputStream, i);
}
}
|
[
"57108396+atul-vyshnav@users.noreply.github.com"
] |
57108396+atul-vyshnav@users.noreply.github.com
|
3a98bf1b18c6e48f1c32bb4e4cdb07e5814a2240
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/JetBrains--intellij-community/fcb46f1421fcafe5c0d1d87549254fac99d355c9/after/RandomDoubleForRandomIntegerInspection.java
|
1d6323e75513c4c6dd9c1a2bb94947280da6b1e2
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,943
|
java
|
/*
* Copyright 2003-2006 Dave Griffith, Bas Leijdekkers
*
* 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.siyeh.ig.performance;
import com.intellij.codeInsight.daemon.GroupNames;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.tree.IElementType;
import com.intellij.util.IncorrectOperationException;
import com.siyeh.ig.BaseInspectionVisitor;
import com.siyeh.ig.ExpressionInspection;
import com.siyeh.ig.InspectionGadgetsFix;
import com.siyeh.InspectionGadgetsBundle;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.NonNls;
public class RandomDoubleForRandomIntegerInspection
extends ExpressionInspection {
public String getID() {
return "UsingRandomNextDoubleForRandomInteger";
}
public String getGroupDisplayName() {
return GroupNames.PERFORMANCE_GROUP_NAME;
}
@NotNull
protected String buildErrorString(Object... infos) {
return InspectionGadgetsBundle.message(
"random.double.for.random.integer.problem.descriptor");
}
public InspectionGadgetsFix buildFix(PsiElement location) {
return new RandomDoubleForRandomIntegerFix();
}
private static class RandomDoubleForRandomIntegerFix
extends InspectionGadgetsFix {
public String getName() {
return InspectionGadgetsBundle.message(
"random.double.for.random.integer.replace.quickfix");
}
public void doFix(Project project, ProblemDescriptor descriptor)
throws IncorrectOperationException {
final PsiIdentifier name =
(PsiIdentifier)descriptor.getPsiElement();
final PsiReferenceExpression expression =
(PsiReferenceExpression)name.getParent();
if (expression == null) {
return;
}
final PsiExpression call = (PsiExpression)expression.getParent();
final PsiExpression qualifier = expression.getQualifierExpression();
if (qualifier == null) {
return;
}
final String qualifierText = qualifier.getText();
final PsiBinaryExpression multiplication =
(PsiBinaryExpression)getContainingExpression(call);
final PsiExpression cast = getContainingExpression(multiplication);
assert multiplication != null;
final PsiExpression multiplierExpression;
final PsiExpression lOperand = multiplication.getLOperand();
if (lOperand.equals(call)) {
multiplierExpression = multiplication.getROperand();
} else {
multiplierExpression = lOperand;
}
assert multiplierExpression != null;
final String multiplierText = multiplierExpression.getText();
@NonNls final String nextInt = ".nextInt((int) ";
replaceExpression(cast, qualifierText + nextInt + multiplierText +
')');
}
}
public BaseInspectionVisitor buildVisitor() {
return new StringEqualsEmptyStringVisitor();
}
private static class StringEqualsEmptyStringVisitor
extends BaseInspectionVisitor {
public void visitMethodCallExpression(
@NotNull PsiMethodCallExpression call) {
super.visitMethodCallExpression(call);
final PsiReferenceExpression methodExpression =
call.getMethodExpression();
final String methodName = methodExpression.getReferenceName();
@NonNls final String nextDouble = "nextDouble";
if (!nextDouble.equals(methodName)) {
return;
}
final PsiMethod method = call.resolveMethod();
if (method == null) {
return;
}
final PsiClass containingClass = method.getContainingClass();
if (containingClass == null) {
return;
}
final String className = containingClass.getQualifiedName();
if (!"java.util.Random".equals(className)) {
return;
}
final PsiExpression possibleMultiplierExpression =
getContainingExpression(call);
if (!isMultiplier(possibleMultiplierExpression)) {
return;
}
final PsiExpression possibleIntCastExpression =
getContainingExpression(possibleMultiplierExpression);
if (!isIntCast(possibleIntCastExpression)) {
return;
}
registerMethodCallError(call);
}
private static boolean isMultiplier(PsiExpression expression) {
if (expression == null) {
return false;
}
if (!(expression instanceof PsiBinaryExpression)) {
return false;
}
final PsiBinaryExpression binaryExpression =
(PsiBinaryExpression)expression;
final PsiJavaToken sign = binaryExpression.getOperationSign();
final IElementType tokenType = sign.getTokenType();
return JavaTokenType.ASTERISK.equals(tokenType);
}
private static boolean isIntCast(PsiExpression expression) {
if (expression == null) {
return false;
}
if (!(expression instanceof PsiTypeCastExpression)) {
return false;
}
final PsiTypeCastExpression castExpression =
(PsiTypeCastExpression)expression;
final PsiType type = castExpression.getType();
return PsiType.INT.equals(type);
}
}
@Nullable
static PsiExpression getContainingExpression(PsiExpression exp) {
PsiElement ancestor = exp.getParent();
while (true) {
if (ancestor == null) {
return null;
}
if (!(ancestor instanceof PsiExpression)) {
return null;
}
if (!(ancestor instanceof PsiParenthesizedExpression)) {
return (PsiExpression)ancestor;
}
ancestor = ancestor.getParent();
}
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
1227fdf4c0996d239f0e644c9550b9c69cd71af7
|
31f609157ae46137cf96ce49e217ce7ae0008b1e
|
/bin/ext-commerce/commerceservices/testsrc/de/hybris/platform/commerceservices/order/hook/impl/DefaultCommerceCartMetadataUpdateValidationHookTest.java
|
9c655a47d117f90ab06b09a66c223838b237b54b
|
[] |
no_license
|
natakolesnikova/hybrisCustomization
|
91d56e964f96373781f91f4e2e7ca417297e1aad
|
b6f18503d406b65924c21eb6a414eb70d16d878c
|
refs/heads/master
| 2020-05-23T07:16:39.311703
| 2019-05-15T15:08:38
| 2019-05-15T15:08:38
| 186,672,599
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,578
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.commerceservices.order.hook.impl;
import static org.mockito.BDDMockito.given;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.commerceservices.service.data.CommerceCartMetadataParameter;
import java.util.Optional;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
@UnitTest
@RunWith(MockitoJUnitRunner.class)
public class DefaultCommerceCartMetadataUpdateValidationHookTest
{
private final DefaultCommerceCartMetadataUpdateValidationHook defaultCommerceCartMetadataUpdateValidationHook = new DefaultCommerceCartMetadataUpdateValidationHook();
@Mock
private CommerceCartMetadataParameter metadataParameter;
private static final String LONG_TEXT = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor "
+ "incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris "
+ "nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum "
+ "dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia "
+ "deserunt mollit anim id est laborum.";
@Test(expected = IllegalArgumentException.class)
public void shouldValidateNameLength()
{
given(metadataParameter.getName()).willReturn(Optional.of(LONG_TEXT));
given(metadataParameter.getDescription()).willReturn(Optional.of("myQuoteDescription"));
defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter);
}
@Test(expected = IllegalArgumentException.class)
public void shouldValidateDescriptionLength()
{
given(metadataParameter.getName()).willReturn(Optional.of("myQuoteName"));
given(metadataParameter.getDescription()).willReturn(Optional.of(LONG_TEXT));
defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter);
}
@Test
public void shouldValidateIfNameDescriptionEmpty()
{
given(metadataParameter.getName()).willReturn(Optional.empty());
given(metadataParameter.getDescription()).willReturn(Optional.empty());
defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter);
}
@Test
public void shouldValidateName()
{
given(metadataParameter.getName()).willReturn(Optional.of("myQuoteName"));
given(metadataParameter.getDescription()).willReturn(Optional.empty());
defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter);
}
@Test
public void shouldValidateDescription()
{
given(metadataParameter.getName()).willReturn(Optional.empty());
given(metadataParameter.getDescription()).willReturn(Optional.of("myQuoteDescription"));
defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter);
}
@Test
public void shouldValidateNameAndDescription()
{
given(metadataParameter.getName()).willReturn(Optional.of("myQuoteName"));
given(metadataParameter.getDescription()).willReturn(Optional.of("myQuoteDescription"));
defaultCommerceCartMetadataUpdateValidationHook.beforeMetadataUpdate(metadataParameter);
}
}
|
[
"nataliia@spadoom.com"
] |
nataliia@spadoom.com
|
8ead8314c3b1217b7d285ae92f904bd8aacb3827
|
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
|
/Method_Scraping/xml_scraping/NicadOutputFile_t1_flink_new2/Nicad_t1_flink_new25960.java
|
0194cb25303d72a971f9d11a3c373f4bbbb8d391
|
[] |
no_license
|
ryosuke-ku/TestCodeSeacherPlus
|
cfd03a2858b67a05ecf17194213b7c02c5f2caff
|
d002a52251f5461598c7af73925b85a05cea85c6
|
refs/heads/master
| 2020-05-24T01:25:27.000821
| 2019-08-17T06:23:42
| 2019-08-17T06:23:42
| 187,005,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 458
|
java
|
// clone pairs:24550:90%
// 37016:flink/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/taskmanager/TaskManagersInfo.java
public class Nicad_t1_flink_new25960
{
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TaskManagersInfo that = (TaskManagersInfo) o;
return Objects.equals(taskManagerInfos, that.taskManagerInfos);
}
}
|
[
"naist1020@gmail.com"
] |
naist1020@gmail.com
|
8fbf1b612c7d74e7c668d6b05b64fc1d978310ec
|
52c36ce3a9d25073bdbe002757f08a267abb91c6
|
/src/main/java/com/alipay/api/domain/KoubeiMarketingDataCustomreportQueryModel.java
|
d973402a714aa4bdf80d409f1a94c065dc9fb3ab
|
[
"Apache-2.0"
] |
permissive
|
itc7/alipay-sdk-java-all
|
d2f2f2403f3c9c7122baa9e438ebd2932935afec
|
c220e02cbcdda5180b76d9da129147e5b38dcf17
|
refs/heads/master
| 2022-08-28T08:03:08.497774
| 2020-05-27T10:16:10
| 2020-05-27T10:16:10
| 267,271,062
| 0
| 0
|
Apache-2.0
| 2020-05-27T09:02:04
| 2020-05-27T09:02:04
| null |
UTF-8
|
Java
| false
| false
| 1,280
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 自定义数据报表数据查询接口
*
* @author auto create
* @since 1.0, 2018-07-26 14:03:45
*/
public class KoubeiMarketingDataCustomreportQueryModel extends AlipayObject {
private static final long serialVersionUID = 3299651797185891565L;
/**
* 规则KEY
*/
@ApiField("condition_key")
private String conditionKey;
/**
* 额外增加的查询过滤条件
*/
@ApiListField("filter_tags")
@ApiField("filter_tag")
private List<FilterTag> filterTags;
/**
* 一次拉多少条
*/
@ApiField("max_count")
private String maxCount;
public String getConditionKey() {
return this.conditionKey;
}
public void setConditionKey(String conditionKey) {
this.conditionKey = conditionKey;
}
public List<FilterTag> getFilterTags() {
return this.filterTags;
}
public void setFilterTags(List<FilterTag> filterTags) {
this.filterTags = filterTags;
}
public String getMaxCount() {
return this.maxCount;
}
public void setMaxCount(String maxCount) {
this.maxCount = maxCount;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
86713804b647eed1d8f9170a05cc69c39f45105a
|
9554309f7b3f33ca912b54370f03cf0c3710d105
|
/app/src/main/java/com/lshl/ui/me/adapter/MeMenuItemAdapter.java
|
3cf29d748862d31be04a2cbe88cd57475901b682
|
[] |
no_license
|
lvqingfeng/Lshl
|
ab490ffe492deba94f9522b71b829b8998b669eb
|
15ae1cdfd2155a6a04a20edf58107e5d9265d647
|
refs/heads/master
| 2021-07-09T21:42:34.913186
| 2017-10-10T09:34:01
| 2017-10-10T09:34:01
| 106,397,119
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,863
|
java
|
package com.lshl.ui.me.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.lshl.R;
import com.lshl.base.BindingViewHolder;
import com.lshl.bean.MenuItemBean;
import com.lshl.databinding.MyMenuTypeOneBinding;
import com.lshl.databinding.MyMenuTypeTwoBinding;
import com.lshl.databinding.SpaceItemBinding;
import java.util.ArrayList;
import java.util.List;
/**
* 作者:吕振鹏
* 创建时间:10月22日
* 时间:10:35
* 版本:v1.0.0
* 类描述:
* 修改时间:
*/
public class MeMenuItemAdapter extends RecyclerView.Adapter<BindingViewHolder> {
/****
*砍掉的功能图标 R.drawable.ic_vector_project,R.drawable.ic_vector_recruit,R.drawable.ic_vector_dscs,R.drawable.ic_vector_me_recruit,
* 对应的背景色R.drawable.bg_round_yellow, R.drawable.bg_round_green,R.drawable.bg_round_blue,, R.drawable.bg_round_green
* */
private int[] mMenuIcon = {R.drawable.ic_vector_me_community, R.drawable.ic_vector_me_vip,
R.drawable.ic_vector_me_settring, R.drawable.ic_vector_my_profile,
R.drawable.ic_vector_my_wealth, R.drawable.ic_vector_my_coc,
R.drawable.ic_vector_look_help,
R.drawable.ic_vector_reputation, R.drawable.ic_vector_goods, R.drawable.ic_vector_talk};
private int[] mMenuBg = {R.drawable.bg_round_green, R.drawable.bg_round_yellow
, R.drawable.bg_round_deep_blue
, R.drawable.bg_round_cuilv
, R.drawable.bg_round_deep_blue
, R.drawable.bg_round_orange
, R.drawable.bg_round_blue};
private static final int TYPE_ONE = 1;
private static final int TYPE_TWO = 2;
private static final int TYPE_SPACE = 3;
private List<MenuItemBean> mListData;
private Context mContext;
private LayoutInflater mInflater;
private int mHintItemPosition = -1;
public MeMenuItemAdapter(Context context) {
mInflater = LayoutInflater.from(context);
mContext = context;
mListData = new ArrayList<>();
initData();
}
public void hintItem(int position) {
mHintItemPosition = position;
notifyDataSetChanged();
}
private void initData() {
String[] menuStr = mContext.getResources().getStringArray(R.array.me_menu);
for (int i = 0; i < menuStr.length; i++) {
MenuItemBean bean = new MenuItemBean();
bean.setMenuName(menuStr[i]);
bean.setMenuRes(mMenuIcon[i]);
if (i >= 3 && mMenuBg.length > i - 3)
bean.setMenuBg(mMenuBg[i - 3]);
mListData.add(bean);
}
}
@Override
public int getItemViewType(int position) {
if (position < 3) {
return TYPE_ONE;
} else if (position == 3 || position == 7) {
return TYPE_SPACE;
}
return TYPE_TWO;
}
@Override
public BindingViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
switch (viewType) {
case TYPE_ONE:
View rootOne = mInflater.inflate(R.layout.item_layout_me_menu_type_one, parent, false);
return new ViewHolderTypeOne(rootOne);
case TYPE_TWO:
View rootTwo = mInflater.inflate(R.layout.item_layout_me_menu_type_two, parent, false);
return new ViewHolderTypeTwo(rootTwo);
case TYPE_SPACE:
View rootView = mInflater.inflate(R.layout.item_layout_space, parent, false);
return new ViewHoldeSpace(rootView);
}
return null;
}
@Override
public void onBindViewHolder(BindingViewHolder holder, int position) {
int viewType = getItemViewType(position);
switch (viewType) {
case TYPE_ONE:
MyMenuTypeOneBinding oneBinding = ((ViewHolderTypeOne) holder).getBinding();
MenuItemBean itemOneBean = mListData.get(position);
oneBinding.ivItemIcon.setImageResource(itemOneBean.getMenuRes());
oneBinding.tvItemName.setText(itemOneBean.getMenuName());
break;
case TYPE_TWO:
if (position != mHintItemPosition) {
MyMenuTypeTwoBinding twoBinding = ((ViewHolderTypeTwo) holder).getBinding();
MenuItemBean itemTwoBean = null;
if (position > 3 && position < 7) {
itemTwoBean = mListData.get(position - 1);
} else if (position > 7) {
itemTwoBean = mListData.get(position - 2);
}
twoBinding.ivItemIcon.setImageResource(itemTwoBean.getMenuRes());
twoBinding.tvItemName.setText(itemTwoBean.getMenuName());
twoBinding.ivItemIcon.setBackgroundResource(itemTwoBean.getMenuBg());
}
break;
}
}
@Override
public int getItemCount() {
if (mHintItemPosition != -1)
return mListData == null ? 0 : mListData.size() + 2 - 1;
else
return mListData == null ? 0 : mListData.size() + 2;
}
private class ViewHolderTypeOne extends BindingViewHolder<MyMenuTypeOneBinding> {
ViewHolderTypeOne(View itemView) {
super(MyMenuTypeOneBinding.bind(itemView));
}
}
private class ViewHolderTypeTwo extends BindingViewHolder<MyMenuTypeTwoBinding> {
ViewHolderTypeTwo(View itemView) {
super(MyMenuTypeTwoBinding.bind(itemView));
}
}
private class ViewHoldeSpace extends BindingViewHolder<SpaceItemBinding> {
public ViewHoldeSpace(View view) {
super(SpaceItemBinding.bind(view));
}
}
}
|
[
"imperial_nice@sina.com"
] |
imperial_nice@sina.com
|
ef6d90b62a07d439e15638a40f8c6ba8214e7e9e
|
5a155f8741c46f168b0ce1eac90f6d1d673fdf07
|
/java/javase-basic/sockProjectet/src/ip/test.java
|
a837e2e664f35a647068e489f5091ef9925e74ed
|
[] |
no_license
|
gitjinyubao/MyProject
|
10b308948597ef726af858260b8622814ddd5b25
|
ed71b23f82ff272f6c90f0513f0e94a9accd0849
|
refs/heads/master
| 2021-09-04T01:28:08.560749
| 2018-01-14T02:40:15
| 2018-01-14T02:40:15
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 476
|
java
|
package ip;
import java.net.InetAddress;
import java.net.UnknownHostException;
/*
* 网络编程三要素:
* A:IP地址
* B:端口号
* C:协议
* IP地址:
* 网络中计算机的唯一标识
*/
public class test {
public static void main(String[] args) throws UnknownHostException {
InetAddress id = InetAddress.getByName("DESKTOP-BJE3HIU");
System.out.println(id.getHostAddress() + ":" +id.getHostName());
}
}
|
[
"2045279403@qq.com"
] |
2045279403@qq.com
|
755a0b96317910bb1e4bcef955ddd93dfd061ed2
|
bec77cdb3616c2ba77d3e74fe5781715a5c2a876
|
/src/main/java/org/reaktivity/reaktive/httpserver/internal/HttpServerProviderImpl.java
|
855310bcc2c03921984c63cf91948a3da5579a64
|
[
"Apache-2.0"
] |
permissive
|
reaktivity/reaktive-httpserver.java
|
d425eff82b0e382d438f71a5572a1a4897ab8153
|
b885ba4b4b0bfbdb9532c95fafca14d841813951
|
refs/heads/develop
| 2022-05-07T12:12:03.462829
| 2020-10-16T04:52:55
| 2020-10-16T04:52:55
| 80,589,141
| 1
| 1
|
NOASSERTION
| 2022-03-10T16:06:24
| 2017-02-01T04:22:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,811
|
java
|
/**
* Copyright 2016-2017 The Reaktivity Project
*
* The Reaktivity Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package org.reaktivity.reaktive.httpserver.internal;
import java.io.IOException;
import java.net.InetSocketAddress;
import org.reaktivity.nukleus.Configuration;
import com.sun.net.httpserver.HttpServer;
import com.sun.net.httpserver.HttpsServer;
import com.sun.net.httpserver.spi.HttpServerProvider;
@SuppressWarnings("restriction")
public final class HttpServerProviderImpl extends HttpServerProvider
{
public static final ThreadLocal<Configuration> CONFIGURATION = new ThreadLocal<Configuration>()
{
protected Configuration initialValue()
{
return new Configuration();
}
};
@Override
public HttpServer createHttpServer(
InetSocketAddress addr,
int backlog) throws IOException
{
HttpServer server = new HttpServerImpl(CONFIGURATION.get());
if (addr != null)
{
server.bind(addr, backlog);
}
return server;
}
@Override
public HttpsServer createHttpsServer(
InetSocketAddress addr,
int backlog) throws IOException
{
throw new UnsupportedOperationException("not yet implemented");
}
}
|
[
"john.fallows@kaazing.com"
] |
john.fallows@kaazing.com
|
b698cd9543cef1e7ac12a2e12aa38fdef681de71
|
a9de22590675be8ee38163127a2c24a20c248a0b
|
/src/com/iremote/infraredcode/tv/codequery/Minded.java
|
319dd798e4b43c09cdbe87664de5e918fc841d72
|
[] |
no_license
|
jessicaallen777/iremote2
|
0943622300286f8d16e9bb4dca349613ffc23bb1
|
b27aa81785fc8bf5467a1ffcacd49a04e41f6966
|
refs/heads/master
| 2023-03-16T03:20:00.746888
| 2019-12-12T04:02:30
| 2019-12-12T04:02:30
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 3,864
|
java
|
package com.iremote.infraredcode.tv.codequery;
import com.iremote.infraredcode.tv.codequery.CodeQueryBase;
public class Minded extends CodeQueryBase {
@Override
public String getProductor() {
return "Minded";
}
@Override
public String[] getQueryCodeLiberay() {
return querycode;
}
private static String[] querycode = new String[]
{
//电视 豁达(Minded) 1
"00a052003480cf80d33a313a303a313b303b303b303b303a313b313a303b80983a80973a80983c80973a80973a80973a80973a80973a80973a80963a80973b2f3a89e280d680d33b303a2f3a313a303a303a303b2f3a313a303a313b80983a80973a80963a80973a80973a809800",
//电视 豁达(Minded) 2
"00a052003480cb80d33a2f3a313a303a2f3a303a313b303b2f3a313c303a80973a80973b80983b80983a80973a80973b80983a80983a80973a80983b80973a2f3b89e280d680d23a303a303a303a303a303a303a2f3a313b2f3a313a80983a80963a80973a80973a80973a809700",
//电视 豁达(Minded) 3
"00a051003480ce80d23b303a80973a80973a2f3a80983c303b303b80973a2f3a80973a2f3a313b80973a303b303a80973a303a80983b80973b303b80973a303a80963a80973b882580d680d23a303a80973b80983a313b80983a303a303a80973a313a80983a313b313a80973a00",
//电视 豁达(Minded) 4
"00a052003480ca80d23b80973a303a303a80973b313b80983a303b303a303a2f3b303a80973b303b80983a80983a303a80973a303a80983b80973a80973a80973b80973a303b882580d680d23b80973b313b303b80973a2f3b80973b313a303a2f3a303a303a80973b303a809700",
//电视 豁达(Minded) 5
"00e04b003382138102261d271d271d271d271e261d271d271d278101261d265a275b275b261d261e261e281d288607821a8101261d271d271d271e261e261d271d271d278101261e265a265a275b281d261d261e281d280000000000000000000000000000000000000000000000",
//电视 豁达(Minded) 6
"00e049003481128114281e2820281e281e281f281f291f2863291e291e291e291f291e2820281e286428632865281f291f2863281e291e291e281f291e28652864281f296429632964288b4181208114296329000000000000000000000000000000000000000000000000000000",
//电视 豁达(Minded) 7
"00e0430034106b186b166b162d172c172c166a162c176b166b162c176b172d172c162c172c17868a166a176b176c182c172c162c166c182c176a166a172c176b172b162c172c172c1600000000000000000000000000000000000000000000000000000000000000000000000000",
//电视 豁达(Minded) 8
"00e04700338234811028202820282028202865281f286628202866286528662965291f2965281f286529662866286528202865292028202820281f2820282028662820286528662865298995823c8086280000000000000000000000000000000000000000000000000000000000",
//电视 豁达(Minded) 9
"00a052003780d280ca3a2f3a2f3b303a2f3a2f392e3a2f3a2e3a303a2f3a80963980963a80963b80963a80963a80973b80963a80963b80953a80963a80963b2f3b8bf580d980ca3a2f3a2e3a303a2f3a2f3b2f3a2f3a2f3a2e3a2f3980963a80973a80963980963a80963a809600",
//电视 豁达(Minded) 10
"00a052003480c980d23b313a80973b303b80973a303a303a303a80973b303a80973a303b303b80973a303a80973b303a80973a80983a80963a303b80973a313b80983a80973a882580d780d23a303b80973a2f3b80973a2f3a303b2f3a80983c303a80973b303a303a80973b2f00",
//电视 豁达(Minded) 11
"00a052003480cf80d23b2f3a313b2f3a313b313a303b303b303a313c303a80973a80973a80983a80983c80973a80973a80973b80973a80983a80973a80963a313a89e180d680d23a2f3a303a303a2f3a303a2f3a303b2f3a313a303a80973a80983a80973a80973b80973b809700",
//电视 豁达(Minded) 12
"00a051003380cf80d23a313b80973a80973a303a80973b313b303a80983a303b80973a2f3a303a80963a313b2f3a80983b313a80973a80973a303a80973b303b80973a80983a882480d780d23b303a80973a80973a303980973b303a313b80973b303b80963a303a303a80973b00",
//电视 豁达(Minded) 13
"00a051003480cf80d33b2f3a80983a80983a303a80963a303a2f3a80973b2f3a80983b313a303b80973a303a2f3a80973a303a80983b80973a303b80973a303a80963a80973a882580d680d33b2f3a80983b80983a303b80963a3039303a80973a2f3a80983b303a313b80973a00",
//电视 豁达(Minded) 14
"00a052003480cf80d23a80973a303a2f3a80973a2f3a80983b303b2f3b303a303b313a80973a303a80983a80983a303a80973a303a80963a80973b80973a80973a80973b313b882680d680d23b80973a303a313a80973b303b80983a303a303a303a2f3a303a80973a303b809700",
};
}
|
[
"stevenbluesky@163.com"
] |
stevenbluesky@163.com
|
0343951f1cc31cf57e86850f40e98c7da65c4183
|
696ce7d6d916dd36912d5660e4921af7d793d80c
|
/Succorfish/Installer/app/src/main/java/com/succorfish/installer/Vo/VoLastInstallation.java
|
ff35809653bd08d27cf2c89b5a44683a72f177c1
|
[] |
no_license
|
VinayTShetty/GeoFence_Project_End
|
c669ff89cc355e1772353317c8d6e7bac9ac3361
|
7e178f207c9183bcd42ec24e339bf414a6df9e71
|
refs/heads/main
| 2023-06-04T13:54:32.836943
| 2021-06-26T02:27:59
| 2021-06-26T02:27:59
| 380,394,802
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,701
|
java
|
package com.succorfish.installer.Vo;
import java.io.Serializable;
public class VoLastInstallation implements Serializable {
String deviceId = "";
String filtered = "";
String generated = "";
String received = "";
String source = "";
String provider = "";
String lng = "";
String lat = "";
String altitude = "";
String speed = "";
String course = "";
String hdop = "";
String vdop = "";
String pdop = "";
String lowPowerFlag = "";
String notDuplicated = "";
String satelliteFlag = "";
String correlationId = "";
String gpsSatNo = "";
String generatedDate = "";
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getFiltered() {
return filtered;
}
public void setFiltered(String filtered) {
this.filtered = filtered;
}
public String getGenerated() {
return generated;
}
public void setGenerated(String generated) {
this.generated = generated;
}
public String getReceived() {
return received;
}
public void setReceived(String received) {
this.received = received;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getProvider() {
return provider;
}
public void setProvider(String provider) {
this.provider = provider;
}
public String getLng() {
return lng;
}
public void setLng(String lng) {
this.lng = lng;
}
public String getLat() {
return lat;
}
public void setLat(String lat) {
this.lat = lat;
}
public String getAltitude() {
return altitude;
}
public void setAltitude(String altitude) {
this.altitude = altitude;
}
public String getSpeed() {
return speed;
}
public void setSpeed(String speed) {
this.speed = speed;
}
public String getCourse() {
return course;
}
public void setCourse(String course) {
this.course = course;
}
public String getHdop() {
return hdop;
}
public void setHdop(String hdop) {
this.hdop = hdop;
}
public String getVdop() {
return vdop;
}
public void setVdop(String vdop) {
this.vdop = vdop;
}
public String getPdop() {
return pdop;
}
public void setPdop(String pdop) {
this.pdop = pdop;
}
public String getLowPowerFlag() {
return lowPowerFlag;
}
public void setLowPowerFlag(String lowPowerFlag) {
this.lowPowerFlag = lowPowerFlag;
}
public String getNotDuplicated() {
return notDuplicated;
}
public void setNotDuplicated(String notDuplicated) {
this.notDuplicated = notDuplicated;
}
public String getSatelliteFlag() {
return satelliteFlag;
}
public void setSatelliteFlag(String satelliteFlag) {
this.satelliteFlag = satelliteFlag;
}
public String getCorrelationId() {
return correlationId;
}
public void setCorrelationId(String correlationId) {
this.correlationId = correlationId;
}
public String getGpsSatNo() {
return gpsSatNo;
}
public void setGpsSatNo(String gpsSatNo) {
this.gpsSatNo = gpsSatNo;
}
public String getGeneratedDate() {
return generatedDate;
}
public void setGeneratedDate(String generatedDate) {
this.generatedDate = generatedDate;
}
}
|
[
"vinay@succorfish.com"
] |
vinay@succorfish.com
|
44654ed273fda33bf911527c6117bc2dac77ad07
|
56456387c8a2ff1062f34780b471712cc2a49b71
|
/org/apache/http/conn/params/ConnPerRouteBean.java
|
62896256e23970b8768d79c85e34a9a54cd931a8
|
[] |
no_license
|
nendraharyo/presensimahasiswa-sourcecode
|
55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50
|
890fc86782e9b2b4748bdb9f3db946bfb830b252
|
refs/heads/master
| 2020-05-21T11:21:55.143420
| 2019-05-10T19:03:56
| 2019-05-10T19:03:56
| 186,022,425
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,243
|
java
|
package org.apache.http.conn.params;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.util.Args;
public final class ConnPerRouteBean
implements ConnPerRoute
{
public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE = 2;
private volatile int defaultMax;
private final ConcurrentHashMap maxPerHostMap;
public ConnPerRouteBean()
{
this(2);
}
public ConnPerRouteBean(int paramInt)
{
ConcurrentHashMap localConcurrentHashMap = new java/util/concurrent/ConcurrentHashMap;
localConcurrentHashMap.<init>();
this.maxPerHostMap = localConcurrentHashMap;
setDefaultMaxPerRoute(paramInt);
}
public int getDefaultMax()
{
return this.defaultMax;
}
public int getDefaultMaxPerRoute()
{
return this.defaultMax;
}
public int getMaxForRoute(HttpRoute paramHttpRoute)
{
Args.notNull(paramHttpRoute, "HTTP route");
Integer localInteger = (Integer)this.maxPerHostMap.get(paramHttpRoute);
if (localInteger != null) {}
for (int i = localInteger.intValue();; i = this.defaultMax) {
return i;
}
}
public void setDefaultMaxPerRoute(int paramInt)
{
Args.positive(paramInt, "Defautl max per route");
this.defaultMax = paramInt;
}
public void setMaxForRoute(HttpRoute paramHttpRoute, int paramInt)
{
Args.notNull(paramHttpRoute, "HTTP route");
Args.positive(paramInt, "Max per route");
ConcurrentHashMap localConcurrentHashMap = this.maxPerHostMap;
Integer localInteger = Integer.valueOf(paramInt);
localConcurrentHashMap.put(paramHttpRoute, localInteger);
}
public void setMaxForRoutes(Map paramMap)
{
if (paramMap == null) {}
for (;;)
{
return;
this.maxPerHostMap.clear();
ConcurrentHashMap localConcurrentHashMap = this.maxPerHostMap;
localConcurrentHashMap.putAll(paramMap);
}
}
public String toString()
{
return this.maxPerHostMap.toString();
}
}
/* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\org\apache\http\conn\params\ConnPerRouteBean.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"haryo.nendra@gmail.com"
] |
haryo.nendra@gmail.com
|
3ce36b5888127c69a2fd2e92c84f34d22ed02bb1
|
4cd7523bc164f64c51af9e7d384a8a70c6806f9e
|
/src/com/jucaipen/service/NewServer.java
|
1e9add454751575372540c618ea80fc0ff03a6ec
|
[] |
no_license
|
loveq2016/jcp_server2017
|
5de95a71afc80edeb7380d5bb725be5a4f6e87b6
|
a180bf634a63bc84eb356a57364c08e2ba9d72ac
|
refs/heads/master
| 2021-01-25T09:33:04.404479
| 2017-06-09T09:11:22
| 2017-06-09T09:11:22
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,929
|
java
|
package com.jucaipen.service;
import java.util.List;
import com.jucaipen.dao.NewsDao;
import com.jucaipen.daoimp.NewsImp;
import com.jucaipen.model.News;
/**
* @author ylf
*
* 新闻服务类
*
*/
public class NewServer {
private static List<News> news;
/**
* @param pager
* @return 根据页数查询指定页的新闻信息
*/
public static List<News> queryNews(int pager) {
NewsDao dao = new NewsImp();
news = dao.findAll(pager);
return news;
}
/**
* @param bigId
* @param pager
* @return 根据一级分类查询新闻信息
*/
public static List<News> queryNewsByBigId(int bigId, int pager) {
NewsDao dao = new NewsImp();
return dao.findNewsBybigId(bigId, pager);
}
/**
* @param id
* @return 根据id 查询新闻详细内容
*/
public static News findNewsById(int id) {
NewsDao dao = new NewsImp();
return dao.findNews(id);
}
/**
* @param id
* @return 获取相关新闻
*/
public static List<News> findRelatedNewsById(int id) {
NewsDao dao = new NewsImp();
return dao.findRelatedNewsById(id);
}
/**
* @param count
* @return 获取最近的count条新闻
*/
public static List<News> findLastNews(int count) {
NewsDao dao = new NewsImp();
return dao.findLastNewsByNewsNum(count);
}
/**
* @param hits
* @param id
* @return 修改点击数
*/
public static int upDateHits(int xnHits,int hits,int id){
NewsDao dao=new NewsImp();
return dao.upDateHits(xnHits,hits, id);
}
/**
* @param comments
* @param id
* @return 修改评论数
*/
public static int upDateComments(int comments,int id){
NewsDao dao=new NewsImp();
return dao.upDateComments(comments, id);
}
/**
* @param classId
* @param page
* @return 根据分类查询新闻
*/
public static List<News> findNewsByClassId(int classId,int page){
NewsDao dao=new NewsImp();
return dao.findNewsBybigId(classId, page);
}
}
|
[
"185601452@qq.com"
] |
185601452@qq.com
|
db5286081f067f01ad81b607da43179588f77b1e
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_1/src/b/b/a/i/Calc_1_1_11082.java
|
5831159d61c9dcea9fbf523ea8d22cb4d2b6b906
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package b.b.a.i;
public class Calc_1_1_11082 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
3ab83ed0f87858255d662ee1c56ba86b96d25445
|
76707a749c77d687d347207d4e5bd1f00f298e5a
|
/acme-api-greeting/src/main/java/com/acme/greeting/api/dummy/DummyGreeting.java
|
f895662f4e376595a63969306f77513a72887863
|
[
"MIT"
] |
permissive
|
vjmadrid/enmilocalfunciona-archunit
|
6d77374fb03141e7188d3f1f11c5e114ded9577e
|
ad39e405db71c27e52c788c2756cbab13c91a6e3
|
refs/heads/master
| 2023-03-02T02:29:40.837842
| 2021-02-11T18:46:40
| 2021-02-11T18:46:40
| 319,269,273
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,183
|
java
|
package com.acme.greeting.api.dummy;
import java.util.ArrayList;
import java.util.List;
import com.acme.greeting.api.dummy.constant.GreetingDummyConstant;
import com.acme.greeting.api.entity.Greeting;
import com.acme.greeting.api.factory.GreetingDataFactory;
public class DummyGreeting {
private DummyGreeting() {
throw new IllegalStateException("DummyGreeting");
}
public static Greeting createDefault() {
return GreetingDataFactory.create(GreetingDummyConstant.TEST_GREETING_1_ID,GreetingDummyConstant.TEST_GREETING_1_CONTENT);
}
public static List<Greeting> createDefaultList() {
final List<Greeting> list = new ArrayList<>();
list.add(GreetingDataFactory.create(GreetingDummyConstant.TEST_GREETING_1_ID,GreetingDummyConstant.TEST_GREETING_1_CONTENT));
return list;
}
public static List<Greeting> createList() {
final List<Greeting> list = createDefaultList();
list.add(GreetingDataFactory.create(GreetingDummyConstant.TEST_GREETING_2_ID,GreetingDummyConstant.TEST_GREETING_2_CONTENT));
list.add(GreetingDataFactory.create(GreetingDummyConstant.TEST_GREETING_3_ID,GreetingDummyConstant.TEST_GREETING_3_CONTENT));
return list;
}
}
|
[
"vjmadrid@atsistemas.com"
] |
vjmadrid@atsistemas.com
|
783515ec1ac3609b5c72b31181b057e7ea13c733
|
5c901d064a30f3be4c3a25a29ee293689e024033
|
/Java/TP/Workspace/x/x-workspace/jad/src/B/B/C/A.java
|
df998f56aa1753e3c9c43c10af68e72b6ccc6da8
|
[] |
no_license
|
BRICOMATA9/Teaching
|
13ea3486dce38d7f547a766f8d99da8123977473
|
d2e5ea4ffed566f2d0e68138f45a18289acf0d24
|
refs/heads/master
| 2022-03-01T01:29:14.844873
| 2019-11-02T11:08:48
| 2019-11-02T11:08:48
| 177,467,808
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 779
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3)
package B.B.C;
import B.D.D.b;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
public abstract class A extends b
{
public A()
{
}
public String D()
{
return "http://www.yworks.com/xml/graphml";
}
public String C()
{
return "y";
}
String B(Node node, String s)
{
NamedNodeMap namednodemap = node.getAttributes();
if(namednodemap == null)
return null;
Node node1 = namednodemap.getNamedItem(s);
if(node1 == null)
return null;
else
return node1.getNodeValue();
}
}
|
[
"githubfortyuds@gmail.com"
] |
githubfortyuds@gmail.com
|
73524081b73e835a3600350c871feaec393e6397
|
a05e1a01a49a59129cdd71c1fe843c910a35ed8c
|
/aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/model/DelegationSetAlreadyCreatedException.java
|
18af2c410453c080b917e0f9ec8a37c12a33bccf
|
[
"Apache-2.0",
"JSON"
] |
permissive
|
lenadkn/java-sdk-test-2
|
cd36997e44cd3926831218b2da7c71deda8c2b26
|
28375541f8a4ae27417419772190a8de2b68fc32
|
refs/heads/master
| 2021-01-20T20:36:53.719764
| 2014-12-19T00:38:57
| 2014-12-19T00:38:57
| 65,262,893
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,243
|
java
|
/*
* Copyright 2010-2014 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.route53.model;
import com.amazonaws.AmazonServiceException;
/**
* <p>
* A delegation set with the same owner and caller reference combination
* has already been created.
* </p>
*/
public class DelegationSetAlreadyCreatedException extends AmazonServiceException {
private static final long serialVersionUID = 1L;
/**
* Constructs a new DelegationSetAlreadyCreatedException with the specified error
* message.
*
* @param message Describes the error encountered.
*/
public DelegationSetAlreadyCreatedException(String message) {
super(message);
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
3bb5a667b96981c4eb7f2b81fb65d1fc2b3f243d
|
ca7db97caf3e30ac299785d3139383a3de070c3c
|
/src/ella/RobotData.java
|
c55b95ea9090802ae0b14f048b27507349347ce4
|
[] |
no_license
|
gopenshaw/battlecode-2016
|
ef35370def3eb87d881c05e78469efa0c45cb44b
|
f8e692ede157dadf549c4183c2d4627b70b10fae
|
refs/heads/master
| 2021-01-09T07:01:29.586323
| 2016-02-01T20:41:53
| 2016-02-01T20:41:53
| 49,037,792
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 503
|
java
|
package ella;
import battlecode.common.MapLocation;
import battlecode.common.RobotType;
public class RobotData {
int health;
int id;
MapLocation location;
RobotType type;
public RobotData(int id, MapLocation location, int health, RobotType type) {
this.health = health;
this.location = location;
this.type = type;
this.id = id;
}
@Override
public String toString() {
return location + " " + health + " " + type + "; ";
}
}
|
[
"garrett.j.openshaw@gmail.com"
] |
garrett.j.openshaw@gmail.com
|
c6cc74281f061e76686b46d5b6f4bc33fba4fd40
|
1cc037b19a154941fd1fdc7d9d1c02702794b975
|
/hybris/bin/custom/spar/sparstorefront/web/src/com/spar/hcl/storefront/checkout/steps/validation/impl/DefaultMultiStepCheckoutStepValidator.java
|
3eb17b659da5f4651fdec6fa022fefbf77a47380
|
[] |
no_license
|
demo-solution/solution
|
b557dea73d613ec8bb722e2d9a63a338f0b9cf8d
|
e342fd77084703d43122a17d7184803ea72ae5c2
|
refs/heads/master
| 2022-07-16T05:41:35.541144
| 2020-05-19T14:51:59
| 2020-05-19T14:51:59
| 259,383,771
| 0
| 0
| null | 2020-05-19T14:54:38
| 2020-04-27T16:07:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,516
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package com.spar.hcl.storefront.checkout.steps.validation.impl;
import de.hybris.platform.acceleratorstorefrontcommons.checkout.steps.validation.ValidationResults;
import de.hybris.platform.commercefacades.order.data.CartData;
import de.hybris.platform.acceleratorstorefrontcommons.checkout.steps.validation.AbstractCheckoutStepValidator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
public class DefaultMultiStepCheckoutStepValidator extends AbstractCheckoutStepValidator
{
private static final Logger LOG = LoggerFactory.getLogger(DefaultMultiStepCheckoutStepValidator.class);
@Override
public ValidationResults validateOnEnter(final RedirectAttributes redirectAttributes)
{
final CartData cartData = getCheckoutFacade().getCheckoutCart();
if (cartData.getEntries() != null && !cartData.getEntries().isEmpty())
{
return (getCheckoutFacade().hasShippingItems()) ? ValidationResults.SUCCESS
: ValidationResults.REDIRECT_TO_PICKUP_LOCATION;
}
LOG.info("Missing, empty or unsupported cart");
return ValidationResults.FAILED;
}
}
|
[
"ruchi_g@hcl.com"
] |
ruchi_g@hcl.com
|
26d99402b4ffb54adf58d06aad26e1add5cf22a2
|
af8862d3831f4133f8e81d1b8931e1d44af073bb
|
/ranch-classify/src/test/java/org/lpw/ranch/classify/TestSupport.java
|
b35e0c51926cb73a713216678b7c72f8b15fbbe0
|
[
"Apache-2.0"
] |
permissive
|
Su-Git/ranch
|
1b7776680111b81730bbff0df0485735c32bfc55
|
696cab2d5831aaab25cb0e47396b0c7b2a5d9720
|
refs/heads/master
| 2021-01-13T12:26:37.979603
| 2017-02-04T08:44:12
| 2017-02-04T08:44:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,622
|
java
|
package org.lpw.ranch.classify;
import net.sf.json.JSONObject;
import org.junit.Assert;
import org.lpw.ranch.recycle.Recycle;
import org.lpw.tephra.cache.Cache;
import org.lpw.tephra.crypto.Sign;
import org.lpw.tephra.dao.orm.lite.LiteOrm;
import org.lpw.tephra.test.SchedulerAspect;
import org.lpw.tephra.test.TephraTestSupport;
import org.lpw.tephra.test.MockHelper;
import org.lpw.tephra.util.Converter;
import org.lpw.tephra.util.Generator;
import org.lpw.tephra.util.Message;
import javax.inject.Inject;
/**
* @author lpw
*/
public class TestSupport extends TephraTestSupport {
@Inject
Message message;
@Inject
Generator generator;
@Inject
Converter converter;
@Inject
Cache cache;
@Inject
LiteOrm liteOrm;
@Inject
Sign sign;
@Inject
MockHelper mockHelper;
@Inject
SchedulerAspect schedulerAspect;
@Inject
ClassifyService classifyService;
void equalsCodeName(JSONObject object, String code, String name) {
Assert.assertEquals(code, object.getString("code"));
Assert.assertEquals(name, object.getString("name"));
}
ClassifyModel create(int code, boolean recycle) {
return create(code, "label " + code, recycle);
}
ClassifyModel create(int code, String label, boolean recycle) {
ClassifyModel classify = new ClassifyModel();
classify.setCode("code " + code);
classify.setName("name " + code);
classify.setLabel(label);
classify.setRecycle((recycle ? Recycle.Yes : Recycle.No).getValue());
liteOrm.save(classify);
return classify;
}
}
|
[
"heisedebaise@hotmail.com"
] |
heisedebaise@hotmail.com
|
3f3b9becb82fefcdf9b4a4c25421f95d00b4e142
|
b2c2690ef6d544129337fbc50d6276710e918694
|
/app/src/main/java/ontime/app/model/usermain/OrderFinished.java
|
aa21fc8f9494bc9543bb87fafa7efbd048142b8d
|
[] |
no_license
|
sumitkumarc/MyHotel
|
d889a2ff59e4e84ba4a9ee999571a93cf96a1184
|
08285735ac189917940d5ca2d896656b830a5eb5
|
refs/heads/main
| 2023-03-21T03:23:32.516120
| 2021-03-12T15:45:10
| 2021-03-12T15:45:10
| 347,116,182
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,791
|
java
|
package ontime.app.model.usermain;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class OrderFinished {
@SerializedName("id")
@Expose
private Integer id;
@SerializedName("order_number")
@Expose
private String orderNumber;
@SerializedName("user_id")
@Expose
private Integer userId;
@SerializedName("restaurant_id")
@Expose
private Integer restaurantId;
@SerializedName("total_quantity")
@Expose
private String totalQuantity;
@SerializedName("total_price")
@Expose
private String totalPrice;
@SerializedName("payment_type")
@Expose
private String paymentType;
@SerializedName("delivery_type")
@Expose
private String deliveryType;
@SerializedName("app_commission")
@Expose
private String appCommission;
@SerializedName("site_commission_tax")
@Expose
private String siteCommissionTax;
@SerializedName("total_tax")
@Expose
private String totalTax;
@SerializedName("grand_total")
@Expose
private String grandTotal;
@SerializedName("payment_status")
@Expose
private String paymentStatus;
@SerializedName("order_status")
@Expose
private Integer orderStatus;
@SerializedName("delivery_status")
@Expose
private Integer deliveryStatus;
@SerializedName("delivery_time")
@Expose
private String deliveryTime;
@SerializedName("delivered_time")
@Expose
private String deliveredTime;
public String getDeliveredTime() {
return deliveredTime;
}
public void setDeliveredTime(String deliveredTime) {
this.deliveredTime = deliveredTime;
}
@SerializedName("countdown_time")
@Expose
private String countdownTime;
@SerializedName("created_at")
@Expose
private String createdAt;
@SerializedName("review")
@Expose
private UserReview review;
public UserReview getReview() {
return review;
}
public void setReview(UserReview review) {
this.review = review;
}
@SerializedName("order_detail")
@Expose
private List<UserCartItemDetail> orderDetail = null;
@SerializedName("restaurant")
@Expose
private Restaurant restaurant;
public Restaurant getRestaurant() {
return restaurant;
}
public void setRestaurant(Restaurant restaurant) {
this.restaurant = restaurant;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getRestaurantId() {
return restaurantId;
}
public void setRestaurantId(Integer restaurantId) {
this.restaurantId = restaurantId;
}
public String getTotalQuantity() {
return totalQuantity;
}
public void setTotalQuantity(String totalQuantity) {
this.totalQuantity = totalQuantity;
}
public String getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(String totalPrice) {
this.totalPrice = totalPrice;
}
public String getPaymentType() {
return paymentType;
}
public void setPaymentType(String paymentType) {
this.paymentType = paymentType;
}
public String getDeliveryType() {
return deliveryType;
}
public void setDeliveryType(String deliveryType) {
this.deliveryType = deliveryType;
}
public String getAppCommission() {
return appCommission;
}
public void setAppCommission(String appCommission) {
this.appCommission = appCommission;
}
public String getSiteCommissionTax() {
return siteCommissionTax;
}
public void setSiteCommissionTax(String siteCommissionTax) {
this.siteCommissionTax = siteCommissionTax;
}
public String getTotalTax() {
return totalTax;
}
public void setTotalTax(String totalTax) {
this.totalTax = totalTax;
}
public String getGrandTotal() {
return grandTotal;
}
public void setGrandTotal(String grandTotal) {
this.grandTotal = grandTotal;
}
public String getPaymentStatus() {
return paymentStatus;
}
public void setPaymentStatus(String paymentStatus) {
this.paymentStatus = paymentStatus;
}
public Integer getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(Integer orderStatus) {
this.orderStatus = orderStatus;
}
public Integer getDeliveryStatus() {
return deliveryStatus;
}
public void setDeliveryStatus(Integer deliveryStatus) {
this.deliveryStatus = deliveryStatus;
}
public String getDeliveryTime() {
return deliveryTime;
}
public void setDeliveryTime(String deliveryTime) {
this.deliveryTime = deliveryTime;
}
public String getCountdownTime() {
return countdownTime;
}
public void setCountdownTime(String countdownTime) {
this.countdownTime = countdownTime;
}
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public List<UserCartItemDetail> getOrderDetail() {
return orderDetail;
}
public void setOrderDetail(List<UserCartItemDetail> orderDetail) {
this.orderDetail = orderDetail;
}
}
|
[
"psumit88666@gmail.com"
] |
psumit88666@gmail.com
|
d9190e0280b2d2b478dff67ea0e6e61132edeb73
|
a3d41b62bd018896c8c0fd84aa9f620943346bf4
|
/zbpub/src/main/java/com/zbxn/pub/frame/common/TranslucentHelper.java
|
d843f3130051b600637e04e59a1d4d422722fbf5
|
[] |
no_license
|
zhuanao/android_ZBXMOBILE
|
f4d73645affddbdd32672e740c36d8e3fbdc5fb8
|
8a0c758d77ac2cd3ce9dc3684e300beaa43950af
|
refs/heads/master
| 2020-03-22T08:47:05.934380
| 2017-07-10T10:51:54
| 2017-07-10T10:51:54
| 139,790,670
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,769
|
java
|
/**
* @since 2015-12-11
*/
package com.zbxn.pub.frame.common;
import android.app.Activity;
import com.zbxn.pub.R;
import utils.SystemBarTintManager;
/**
* 沉浸式状态栏
*
* @author GISirFive
* @since 2015-12-11 下午3:55:45
*/
public class TranslucentHelper {
private Activity mActivity;
private ITranslucent mTranslucentControl;
/** */
public TranslucentHelper(ITranslucent control) {
if (control == null)
return;
if (!(control instanceof Activity))
return;
this.mTranslucentControl = control;
this.mActivity = (Activity) control;
translucent();
}
/**
* 设置沉浸式状态栏
*
* @author GISirFive
*/
public void translucent() {
SystemBarTintManager.setTranslucentStatus(mActivity, true);
SystemBarTintManager tintManager = new SystemBarTintManager(mActivity);
// 上方状态栏
tintManager.setStatusBarTintEnabled(true);
int colorRes = mTranslucentControl.getTranslucentColorResource();
if (colorRes == 0)
colorRes = R.color.app_theme;
// 设置沉浸的颜色
tintManager.setStatusBarTintResource(colorRes);
}
/**
* 沉浸式状态栏
*
* @author GISirFive
* @since 2015-12-11 下午4:35:57
*/
public interface ITranslucent {
/**
* 是否使用沉浸式状态栏</br>
*
* @return false-不使用沉浸式状态栏
* @author GISirFive
*/
boolean translucent();
/**
* 获取/设置 沉浸式状态栏的背景色
*
* @return
* @author GISirFive
*/
int getTranslucentColorResource();
}
}
|
[
"18410133533@163.com"
] |
18410133533@163.com
|
2f89e752846f76affb1f5b808412960dd4d4b014
|
69abec40741e6c80a49c925699dfc081d4a3d242
|
/IncompleteAutomataBasedModelChecking/CHIAReplacementChecker/src/test/java/it/polimi/replacementchecker/buchiaccepting/ReplacementChecker14Test.java
|
28256f656cf68cf32c5dbd1bec0b5fbbec0e140a
|
[] |
no_license
|
chdd/IncompleteAutomataBasedModelChecking
|
eb17b00c858477dda1bffafa1fb103ee88489c69
|
313d305ffe0c834edfaed024c314787030e9d33f
|
refs/heads/master
| 2020-12-07T06:29:10.853555
| 2015-12-17T13:48:27
| 2015-12-17T13:48:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,598
|
java
|
package it.polimi.replacementchecker.buchiaccepting;
import static org.junit.Assert.assertTrue;
import it.polimi.automata.BA;
import it.polimi.automata.IBA;
import it.polimi.automata.io.in.ClaimReader;
import it.polimi.automata.io.in.ModelReader;
import it.polimi.automata.io.out.ElementToStringTransformer;
import it.polimi.checker.Checker;
import it.polimi.checker.SatisfactionValue;
import it.polimi.checker.intersection.acceptingpolicies.AcceptingPolicy;
import it.polimi.checker.intersection.acceptingpolicies.AcceptingPolicy.AcceptingType;
import it.polimi.constraintcomputation.ConstraintGenerator;
import it.polimi.constraints.Constraint;
import it.polimi.constraints.components.Replacement;
import it.polimi.constraints.components.SubProperty;
import it.polimi.constraints.io.in.constraint.ConstraintReader;
import it.polimi.constraints.io.in.replacement.ReplacementReader;
import it.polimi.constraints.io.out.constraint.ConstraintToElementTransformer;
import it.polimi.replacementchecker.ReplacementChecker;
import java.io.File;
import javax.xml.parsers.ParserConfigurationException;
import org.junit.Before;
import org.junit.Test;
public class ReplacementChecker14Test {
private static final String path = "it.polimi.replacementchecker/";
private Constraint constraint;
private Replacement replacement;
private IBA refinement;
private BA claim;
private IBA model;
private AcceptingType acceptingPolicy;
@Before
public void setUp() throws Exception{
this.replacement = new ReplacementReader(new File(getClass().getClassLoader()
.getResource(path + "buchiaccepting/test14/replacement.xml").getFile())).perform();
this.constraint=new ConstraintReader(new File(getClass().getClassLoader()
.getResource(path + "buchiaccepting/test14/constraint.xml").getFile())).perform();
this.refinement=new ModelReader(new File(getClass().getClassLoader()
.getResource(path + "buchiaccepting/test14/refinement.xml").getFile())).perform();
this.claim=new ClaimReader(new File(getClass().getClassLoader()
.getResource(path + "buchiaccepting/test14/claim.xml").getFile())).perform();
this.model=new ModelReader(new File(getClass().getClassLoader()
.getResource(path + "buchiaccepting/test14/model.xml").getFile())).perform();
this.acceptingPolicy=AcceptingType.BA;
}
@Test
public void test() throws ParserConfigurationException, Exception {
Checker checker=new Checker(model, claim,
AcceptingPolicy.getAcceptingPolicy(this.acceptingPolicy, model, claim));
checker.perform();
System.out.println(checker.getUpperIntersectionBA());
ConstraintGenerator cg = new ConstraintGenerator(checker);
Constraint constraint = cg.perform();
System.out.println(new ElementToStringTransformer()
.transform(new ConstraintToElementTransformer()
.transform(constraint)));
checker=new Checker(refinement, claim,
AcceptingPolicy.getAcceptingPolicy(this.acceptingPolicy, refinement, claim));
SatisfactionValue ret=checker.perform();
assertTrue(ret==SatisfactionValue.SATISFIED);
SubProperty subproperty=this.constraint.getSubProperty(this.replacement.getModelState());
ReplacementChecker replacementChecker=new ReplacementChecker( replacement, subproperty,
AcceptingPolicy.getAcceptingPolicy(this.acceptingPolicy, replacement.getAutomaton(), subproperty.getAutomaton()));
SatisfactionValue retValue=replacementChecker.perform();
System.out.println(retValue);
System.out.println(replacementChecker.getLowerIntersectionBA());
assertTrue(retValue==SatisfactionValue.SATISFIED);
}
}
|
[
"cla.menghi@gmail.com"
] |
cla.menghi@gmail.com
|
f31d26e174da160b71b08149d361830e3b90874b
|
b104b5110806613749153a0d81d90f5520f6fc20
|
/simple-spring/src/main/java/com/github/simple/core/annotation/SimpleConfig.java
|
a45eecc6dafcb9765cc30fca14494a3025282c94
|
[] |
no_license
|
RuoBingCoder/spring-boot-source-project-study-sample
|
d27e2aa3112fd3d1dd33eb30c88b6f4e6836ff29
|
dc59c0bb953f6cdc9002db81d4b7e6715c3ce0cc
|
refs/heads/master
| 2023-04-05T15:07:48.849394
| 2021-04-08T14:32:29
| 2021-04-08T14:32:29
| 298,938,563
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 312
|
java
|
package com.github.simple.core.annotation;
import java.lang.annotation.*;
/**
* @author: JianLei
* @date: 2020/12/11 9:45 下午
* @description: SimpleAutowired
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface SimpleConfig {
String name() default "";
}
|
[
"1664004642@qq.com"
] |
1664004642@qq.com
|
678c4135d91252a5a5768b41209defb36461d389
|
8a05bcb0be8aa539682f9bcd3d9a21388ec709ec
|
/bead/java_16171_bead1/biblio/Entry.java
|
273634564b894a05dddb75a6110a74d44df7376a
|
[] |
no_license
|
8emi95/elte-ik-java
|
9d97569bf8c8ecac499d1c97d924a46079fc7d5c
|
7e2f83bd91f120dcd1df4cf8bbc44fe7438c6eca
|
refs/heads/master
| 2020-07-25T09:10:53.906527
| 2019-03-16T19:34:08
| 2019-03-16T19:34:08
| 176,016,326
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,787
|
java
|
package biblio;
import person.Author;
public class Entry {
private static int counter = 0;
private int id;
private Author author;
private String title;
private int year;
private String publisher;
private Entry(Author author, String title, int year, String publisher) {
this.id = counter;
++counter;
this.author = author;
this.title = title;
this.year = year;
this.publisher = publisher;
}
public static Entry make(Author author, String title, int year, String publisher) {
if (1500 <= year && year <= 2016 && author != null && !title.isEmpty()) {
Entry e = new Entry(author, title, year, publisher);
return e;
}
else {
return null;
}
}
public int getId() { return id; }
public static void resetId() { counter = 0; }
public static int count() { return counter; }
public Author getAuthor() { return author; }
public String getTitle() { return title; }
public int getYear() { return year; }
public String getPublisher() { return publisher; }
public static final int FORMAT_RAW = 0;
public static final int FORMAT_AUTHOR_YEAR = 1;
public static final int FORMAT_AUTHOR_YEAR_COMPACT = 2;
public String show(int format) {
String label = "";
if (format == FORMAT_RAW) {
label = "[" + id + "]";
}
else if (format == FORMAT_AUTHOR_YEAR) {
label = "[" + author.getLastName() + year + "]";
}
else if (format == FORMAT_AUTHOR_YEAR_COMPACT) {
label = "[" + author.getLastName().substring(0, 2) + Integer.toString(year).substring(2) + "]";
}
else {
throw new IllegalArgumentException("Wrong format.");
}
if (!publisher.isEmpty()) {
return (label + " " + author.show() + ". " + title + ", " + publisher + ", " + year);
}
else {
return (label + " " + author.show() + ". " + title + ", " + year);
}
}
}
|
[
"8emi95@inf.elte.hu"
] |
8emi95@inf.elte.hu
|
3d6d3afdff1ec729c952dd7207c23fdb0df44c59
|
75c4712ae3f946db0c9196ee8307748231487e4b
|
/src/main/java/com/alipay/api/response/ZhimaDataStateDataSyncResponse.java
|
c80d5c15c2ede3643bb91f515aa4080f843a6ce9
|
[
"Apache-2.0"
] |
permissive
|
yuanbaoMarvin/alipay-sdk-java-all
|
70a72a969f464d79c79d09af8b6b01fa177ac1be
|
25f3003d820dbd0b73739d8e32a6093468d9ed92
|
refs/heads/master
| 2023-06-03T16:54:25.138471
| 2021-06-25T14:48:21
| 2021-06-25T14:48:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 687
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: zhima.data.state.data.sync response.
*
* @author auto create
* @since 1.0, 2021-05-17 10:40:01
*/
public class ZhimaDataStateDataSyncResponse extends AlipayResponse {
private static final long serialVersionUID = 1571172338697878273L;
/**
* 同步结果成功或失败,具体错误码在错误信息中
*/
@ApiField("biz_result")
private String bizResult;
public void setBizResult(String bizResult) {
this.bizResult = bizResult;
}
public String getBizResult( ) {
return this.bizResult;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
0945cbae2e09cf9927e642d8821a3c5ad37b300f
|
aa9d5ff23a74402dc42197f15ceebf3bb89607e6
|
/posterita/posterita/src/main/org/posterita/core/businesslogic/ImportManager.java
|
abb1d3d79d3c82f58a752e6b56fec584b597adb4
|
[] |
no_license
|
vcappugi/ADESVENCA
|
ca4f2ef25a9bce7e633185936adc9154b9ea1829
|
92f9fa4556ee99b6961e4a8a66801bfa18d78086
|
refs/heads/master
| 2020-03-21T20:30:01.448421
| 2018-06-28T22:16:00
| 2018-06-28T22:16:00
| 139,011,077
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,513
|
java
|
/**
* Product: Posterita Web-Based POS and Adempiere Plugin
* Copyright (C) 2007 Posterita Ltd
* This file is part of POSterita
*
* POSterita is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
**/
/**
@author ashley
*/
package org.posterita.core.businesslogic;
import java.io.File;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Properties;
import org.compiere.impexp.ImpFormat;
import org.compiere.process.ImportAccount;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.util.Trx;
import org.posterita.businesslogic.ProcessManager;
import org.posterita.core.FileManager;
import org.posterita.exceptions.OperationException;
public class ImportManager
{
public static int importFile(Properties ctx, File impFile, String importFormat, String trxName) throws OperationException
{
if(impFile == null)
throw new OperationException("File to import cannot be null");
if(!impFile.exists() || impFile.isDirectory())
throw new OperationException("File does not exist or it is a directory, file: " + impFile);
if(importFormat == null || importFormat.trim().length() == 0)
throw new OperationException("Import format cannot be null");
ImpFormat impFormat = ImpFormat.load(importFormat);
if(impFormat == null)
throw new OperationException("Could not load import format: " + importFormat);
ArrayList<String> fileLinesList = FileManager.readLines(impFile);
Iterator<String> fileLinesIter = fileLinesList.iterator();
int importedLines = 0;
while(fileLinesIter.hasNext())
{
String line = fileLinesIter.next();
if(impFormat.updateDB(ctx, line, trxName))
importedLines++;
}
return importedLines;
}
public static void importAccounting(Properties ctx, int clientId, int elementId, boolean updateDefaultAccounts, boolean createNewCombination, boolean deleteOldImported, String trxName) throws OperationException
{
ImportAccount impAccount = new ImportAccount();
int accountImportProcessId = ProcessManager.getProcessId(ImportAccount.class);
String updDefAccts = (updateDefaultAccounts) ? "Y" : "N";
String crNewCombinations = (createNewCombination) ? "Y" : "N";
String delOldImp = (deleteOldImported) ? "Y" : "N";
ProcessInfo processInfo = new ProcessInfo("Import accounts", accountImportProcessId);
ProcessInfoParameter clientParam = new ProcessInfoParameter("AD_Client_ID", new BigDecimal(clientId), new BigDecimal(clientId), "Client", "Client");
ProcessInfoParameter elementParam = new ProcessInfoParameter("C_Element_ID", new BigDecimal(elementId), new BigDecimal(elementId), "Element", "Element");
ProcessInfoParameter updDefAcctsParam = new ProcessInfoParameter("UpdateDefaultAccounts", updDefAccts, updDefAccts, "Update Default Accounts", "Update Default Accounts");
ProcessInfoParameter createNewCombinationParam = new ProcessInfoParameter("CreateNewCombination", crNewCombinations, crNewCombinations, "Create New Combination", "Create New Combination");
ProcessInfoParameter deleteOldParam = new ProcessInfoParameter("DeleteOldImported", delOldImp, delOldImp, "Delete Old Imported", "Delete Old Imported");
ProcessInfoParameter parameters[] = new ProcessInfoParameter[5];
parameters[0] = clientParam;
parameters[1] = elementParam;
parameters[2] = updDefAcctsParam;
parameters[3] = createNewCombinationParam;
parameters[4] = deleteOldParam;
processInfo.setParameter(parameters);
Trx trx = null;
if(trxName != null)
trx = Trx.get(trxName, false);
if(!impAccount.startProcess(ctx, processInfo, trx))
throw new OperationException("Could not run import accounting process");
}
}
|
[
"vcappugi@gmail.com"
] |
vcappugi@gmail.com
|
91d3a37d870af9e1689fee309af02221e1836ae7
|
c0d16cb66653de974e9966760d0238d20ed3814d
|
/app/src/main/java/com/example/tokenretro/Api/ApiClient.java
|
7351d2c5084c07c45216c127c639e1548af0a792
|
[] |
no_license
|
charlo2433/Token_Retrofit
|
1c55cf081a3c1771675fd4375572c4061291c947
|
3c2242bbb6c41f4d7f8d436fe47932021e0f652c
|
refs/heads/master
| 2020-08-24T18:58:16.080228
| 2019-10-22T18:52:01
| 2019-10-22T18:52:01
| 216,886,491
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,531
|
java
|
package com.example.tokenretro.Api;
import android.util.Log;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import okhttp3.ConnectionPool;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class ApiClient {
private static Retrofit retrofit;
private static final String BASE_URL = "http://coffeemateweb.herokuapp.com/";
public static Retrofit getRetrofitInstance() {
if (retrofit == null) {
retrofit = new retrofit2.Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.client(getUnsafeOkHttpClient())
.build();
}
return retrofit;
}
private static OkHttpClient getUnsafeOkHttpClient() {
HttpLoggingInterceptor logging = new HttpLoggingInterceptor(message -> Log.d("HTTP", "log: " + message));
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
Interceptor interceptor = chain -> {
final Request request = chain.request().newBuilder()
.build();
return chain.proceed(request);
};
try {
// Create a trust manager that does not validate certificate chains
final TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
@Override
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {
}
@Override
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {
}
@Override
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return new java.security.cert.X509Certificate[]{};
}
}
};
// Install the all-trusting trust manager
final SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
// Create an ssl socket factory with our all-trusting manager
final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
ConnectionPool pool = new ConnectionPool(500, 600, TimeUnit.SECONDS);
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.sslSocketFactory(sslSocketFactory);
builder.hostnameVerifier((hostname, session) -> true);
builder.addInterceptor(interceptor);
builder.addInterceptor(logging);
builder.connectionPool(pool);
builder.readTimeout(600, TimeUnit.SECONDS);
builder.connectTimeout(600, TimeUnit.SECONDS);
return builder.build();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
|
[
"you@example.com"
] |
you@example.com
|
7ebb1ae4e6ff65e0330329f7acdc60d981f48062
|
a1ed06756d8519a5165202ee9d5ae9c489f9abeb
|
/src/main/java/com/xml2j/Xml2jModule.java
|
fb15d756034d76a6814a37810d52b157d80e4fad
|
[
"MIT"
] |
permissive
|
Kriengkrai/xml2j-gen
|
ba4476af5bc9a814691a73d4c01d70adf9f344f9
|
ecd6824a64b3e69252ae12708ae82c67b5a52dfd
|
refs/heads/master
| 2020-04-28T20:56:33.182821
| 2018-04-29T10:10:59
| 2018-04-29T10:10:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,015
|
java
|
package com.xml2j;
/********************************************************************************
Copyright 2016, 2017 Lolke B. Dijkstra
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.
Project root: https://sourceforge.net/projects/xml2j/
********************************************************************************/
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
public class Xml2jModule {
public String name = null;
public String description = null;
public String input_path = null;
public String output_path = null;
int currInterface = -1;
List<Xml2jInterface> intl = new ArrayList<Xml2jInterface>();
public List<Xml2jInterface> interfaces() {
return intl;
}
public void add(final Xml2jInterface iface) {
currInterface++;
intl.add(iface);
}
public void print(final PrintStream s) {
s.println("\nxml2j-module" + "\n\tname: " + name + "\n\tinput-path: " + input_path + "\n\toutput-path: " + output_path);
for (Xml2jInterface i : intl) {
i.print(s);
}
}
}
|
[
"lolkedijkstra@gmail.com"
] |
lolkedijkstra@gmail.com
|
545e88bda64323bfa8e24b6ed929bdee8ed68b03
|
359cb9487ff89cedcc3c1d2328fa2dab6a5392e9
|
/03. Exams/01. Exam/src/main/java/myexam/service/ProductService.java
|
f822312b835bf6e2564cfee1e5d5691b62bd2c5a
|
[] |
no_license
|
AndreyKost/Spring-Fundamentals
|
6ed8789a5c4fa5d7c004f7dab06f61d2a636cf90
|
4e4cadf518000785a16ffb28e10fb4f4c1cdb097
|
refs/heads/master
| 2022-12-19T06:07:16.367229
| 2020-09-26T08:26:48
| 2020-09-26T08:26:48
| 298,768,892
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 558
|
java
|
package myexam.service;
import myexam.model.entity.CategoryName;
import myexam.model.service.ProductServiceModel;
import myexam.model.view.ProductViewModel;
import java.math.BigDecimal;
import java.util.List;
public interface ProductService {
List<ProductViewModel> findAllProducts();
BigDecimal findAllProductsPriceCount();
void addItem(ProductServiceModel productServiceModel);
ProductViewModel findById(String id);
void delete(String id);
List<ProductViewModel> getProducts(CategoryName category);
void buyAll();
}
|
[
"anddy8@gmail.com"
] |
anddy8@gmail.com
|
fe7ac17055f807669c4529e880da037eaf89b2e3
|
a770e95028afb71f3b161d43648c347642819740
|
/sources/org/telegram/ui/PasscodeActivity$$ExternalSyntheticLambda1.java
|
9edc0b001ec0cd4c219b170c05ac0d6a935e969f
|
[] |
no_license
|
Edicksonjga/TGDecompiledBeta
|
d7aa48a2b39bbaefd4752299620ff7b72b515c83
|
d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b
|
refs/heads/master
| 2023-08-25T04:12:15.592281
| 2021-10-28T20:24:07
| 2021-10-28T20:24:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 467
|
java
|
package org.telegram.ui;
import android.view.View;
public final /* synthetic */ class PasscodeActivity$$ExternalSyntheticLambda1 implements View.OnClickListener {
public final /* synthetic */ PasscodeActivity f$0;
public /* synthetic */ PasscodeActivity$$ExternalSyntheticLambda1(PasscodeActivity passcodeActivity) {
this.f$0 = passcodeActivity;
}
public final void onClick(View view) {
this.f$0.lambda$createView$1(view);
}
}
|
[
"fabian_pastor@msn.com"
] |
fabian_pastor@msn.com
|
f8dd370b8552dc4b1a8b55be6e03da95099f7284
|
44eef90e43fd3ad94f6c820fe502876301bc5d02
|
/mybatis/src/test/java/org/apache/ibatis/submitted/order_prefix_removed/Person.java
|
4b392aa0550223d06fe8833060dcf46684a691fa
|
[] |
no_license
|
chenhonghaovip/spring-framework-master
|
faafc370433113a25093e22c9927e8886f8a7463
|
5d56503bacf032d40e00b3075df1650dbb5a743f
|
refs/heads/master
| 2023-08-18T15:21:40.161286
| 2023-08-11T07:22:57
| 2023-08-11T07:22:57
| 251,283,524
| 0
| 1
| null | 2022-12-10T06:04:11
| 2020-03-30T11:24:10
|
Java
|
UTF-8
|
Java
| false
| false
| 1,202
|
java
|
/**
* Copyright 2009-2015 the original author or authors.
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.apache.ibatis.submitted.order_prefix_removed;
import java.io.Serializable;
public class Person implements Serializable {
private Integer id;
private String firstName;
private String lastName;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}
|
[
"zhihei.chh@alibaba-inc.com"
] |
zhihei.chh@alibaba-inc.com
|
3a509d12625b51e27746577b1ed2d125543272b7
|
dea04aa4c94afd38796e395b3707d7e98b05b609
|
/Participant results/P17/Interaction-3/ArrayIntList_ES_0_AlreadyValued_Test.java
|
9fe23c663b6c4d15358752e0e4198718bd38e544
|
[] |
no_license
|
PdedP/InterEvo-TR
|
aaa44ef0a4606061ba4263239bafdf0134bb11a1
|
77878f3e74ee5de510e37f211e907547674ee602
|
refs/heads/master
| 2023-04-11T11:51:37.222629
| 2023-01-09T17:37:02
| 2023-01-09T17:37:02
| 486,658,497
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 980
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Jan 25 10:35:38 GMT 2022
*/
package com.org.apache.commons.collections.primitives;
import org.junit.Test;
import static org.junit.Assert.*;
import com.org.apache.commons.collections.primitives.ArrayIntList;
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 ArrayIntList_ES_0_AlreadyValued_Test extends ArrayIntList_ES_0_AlreadyValued_Test_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
ArrayIntList arrayIntList0 = new ArrayIntList();
arrayIntList0.add(0, 0);
arrayIntList0.add(0);
assertEquals(2, arrayIntList0.size());
arrayIntList0.clear();
assertEquals(0, arrayIntList0.size());
}
}
|
[
"pedro@uca.es"
] |
pedro@uca.es
|
9ee33fb81ffeb297f026f16d8c3e767b45f63f13
|
5252a00843c6082d739d7a00142525fff0a2f3e7
|
/zoeeasy-cloud-platform/zoeeasy-cloud-modules/zoeeasy-cloud-order/zoeeasy-cloud-order-server/src/main/java/com/zoeeasy/cloud/order/service/impl/MessageSendOrderServiceImpl.java
|
e5d3212a10ced39e0c14a46f739c984d52ae0319
|
[] |
no_license
|
P79N6A/parking
|
be8dc0ae6394096ec49faa89521d723425a5c965
|
6e3ea14312edc7487f725f2df315de989eaabb10
|
refs/heads/master
| 2020-05-07T22:07:03.790311
| 2019-04-12T03:06:26
| 2019-04-12T03:06:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,187
|
java
|
package com.zoeeasy.cloud.order.service.impl;
import com.scapegoat.infrastructure.common.utils.StringUtils;
import com.scapegoat.infrastructure.core.dto.result.ResultDto;
import com.scapegoat.infrastructure.message.RocketMessage;
import com.zoeeasy.cloud.core.cst.MessageQueueDefinitions;
import com.zoeeasy.cloud.message.MessageSendService;
import com.zoeeasy.cloud.message.payload.OrderConfirmCallbackPayload;
import com.zoeeasy.cloud.order.message.MessageSendOrderService;
import com.zoeeasy.cloud.order.message.dot.request.OrderConfirmCallbackRequestDto;
import lombok.extern.log4j.Log4j;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author AkeemSuper
* @date 2018/12/23 0023
*/
@Service("messageSendOrderService")
@Log4j
public class MessageSendOrderServiceImpl implements MessageSendOrderService {
@Autowired
private ModelMapper modelMapper;
@Autowired
private MessageSendService messageSendService;
/**
* 发送三方账单支付回调消息
*
* @param requestDto
*/
@Override
public ResultDto sendOrderConfirmCallbackMessage(OrderConfirmCallbackRequestDto requestDto) {
ResultDto resultDto = new ResultDto();
try {
if (requestDto != null) {
RocketMessage<OrderConfirmCallbackPayload> message = new RocketMessage<>();
message.setDestination(MessageQueueDefinitions.Topic.ORDER_CALL_BACK);
message.setSender(MessageQueueDefinitions.Sender.ORDER);
message.setMessageId(StringUtils.getUUID());
OrderConfirmCallbackPayload payLoad = modelMapper.map(resultDto, OrderConfirmCallbackPayload.class);
message.setPayload(payLoad);
messageSendService.sendAndSaveSync(message);
resultDto.success();
return resultDto;
}
resultDto.failed();
} catch (Exception e) {
log.error("发送三方账单支付回调消息失败" + e.getMessage());
resultDto.failed();
}
return resultDto;
}
}
|
[
"xuqinghuo@126.com"
] |
xuqinghuo@126.com
|
6f9afa2c202f179d1d4dfafe74ed71a08d395eb2
|
ecb449c5c6c40d31911c452d3b351f18a7c436de
|
/www.csie.ntu.edu.tw/~sylee/courses/dataStructures/code/misc/UsingAVector.java
|
701b8a71a346d7b9a628fddeac4b4477171c421f
|
[] |
no_license
|
2892931976/Algorithms-in-Go
|
166319cd97dc6521a06076f456d6eb14281868db
|
cbdb38d86282a42f9e0eb43e15f9362584524ffd
|
refs/heads/master
| 2023-01-20T18:06:28.345390
| 2020-05-03T07:55:49
| 2020-05-03T07:55:49
| 203,523,554
| 1
| 1
| null | 2022-12-30T01:26:35
| 2019-08-21T06:44:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,232
|
java
|
/** using a Vector */
package misc;
import java.util.*;
import wrappers.*;
public class UsingAVector
{
public static void main(String [] args)
{
// define a vector with initial capacity 1
Vector v = new Vector(1);
System.out.println("The initial capacity is "
+ v.capacity());
System.out.println("The initial size is "
+ v.size());
// add some elements
v.addElement(new MyInteger(1));
v.addElement(new MyInteger(2));
v.insertElementAt(new MyInteger(3), 2);
v.insertElementAt(new MyInteger(4), 3);
v.insertElementAt(new MyInteger(5), 4);
System.out.println("The new capacity is "
+ v.capacity());
System.out.println("The new size is "
+ v.size());
System.out.println("The vector is " + v);
// check out the iterator
Enumeration e = v.elements();
while (e.hasMoreElements())
System.out.print(e.nextElement() + " ");
System.out.println();
// make a clone
Vector w = (Vector) v.clone();
// empty v
v.removeAllElements();
// output w
System.out.println("The vector is " + w);
}
}
|
[
"2892931976@qq.com"
] |
2892931976@qq.com
|
f91ab786f17e0ebe6007acdb4a77f34bfcf2a061
|
5e34c548f8bbf67f0eb1325b6c41d0f96dd02003
|
/dataset/smallest_dedc2a7c_000/mutations/106/smallest_dedc2a7c_000.java
|
a4a56c92a9fb163524b67a9d3d2b881fbe37fe1e
|
[] |
no_license
|
mou23/ComFix
|
380cd09d9d7e8ec9b15fd826709bfd0e78f02abc
|
ba9de0b6d5ea816eae070a9549912798031b137f
|
refs/heads/master
| 2021-07-09T15:13:06.224031
| 2020-03-10T18:22:56
| 2020-03-10T18:22:56
| 196,382,660
| 1
| 1
| null | 2020-10-13T20:15:55
| 2019-07-11T11:37:17
|
Java
|
UTF-8
|
Java
| false
| false
| 2,269
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class smallest_dedc2a7c_000 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
smallest_dedc2a7c_000 mainClass = new smallest_dedc2a7c_000 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
FloatObj a = new FloatObj (), b = new FloatObj (), c =
new FloatObj (), d = new FloatObj ();
output +=
(String.format ("Please enter 4 numbers separated by spaces > "));
a.value = scanner.nextFloat ();
b.value = scanner.nextFloat ();
c.value = scanner.nextFloat ();
d.value = scanner.nextFloat ();
if ((a.value < b.value) && (a.value < c.value) && (a.value < d.value)) {
output += (String.format ("%.0f is the smallest\n", a.value));
} else if ((b.value < a.value) && (a.value) < (c.value)
&& (b.value < d.value)) {
output += (String.format ("%.0f is the smallest\n", b.value));
} else if ((c.value < a.value) && (c.value < b.value)
&& (c.value < d.value)) {
output += (String.format ("%.0f is the smallest\n", c.value));
} else {
output += (String.format ("%.0f is the smallest\n", d.value));
}
if (true)
return;;
}
}
|
[
"bsse0731@iit.du.ac.bd"
] |
bsse0731@iit.du.ac.bd
|
e06207b9a66c9fe95fb39ac2a46fe95a59fa96a6
|
1977757fa8a337e3346795cfb1ceca9ae95b97fb
|
/src/day44/HouseBuilder.java
|
b74d401880170f0c1d72c1bf7451bea89d874ff5
|
[] |
no_license
|
Tarana82/MyFirstProject
|
fcb3e81c3659e9f846a71c7856fcf4ba914e15ad
|
6fe9bb5f1d90812f6c2e5ef68ba275435a7cabce
|
refs/heads/master
| 2021-02-11T16:22:21.801471
| 2020-03-03T03:33:39
| 2020-03-03T03:33:39
| 244,509,280
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 505
|
java
|
package day44;
public class HouseBuilder {
public static void main(String[] args) {
CyberHouse.showNeighbourhoodName();
CyberHouse c1 = new CyberHouse("Vintage", 101);
c1.showAllInfo();
CyberHouse c2 = new CyberHouse("Classic", 102);
c2.showAllInfo();
//System.out.println(CyberHouse.neighbourhoodName );
// How do I get max value of Short
System.out.println(Short.MAX_VALUE);
System.out.println(Byte.MAX_VALUE);
}
}
|
[
"tahmadova1982@gmail.com"
] |
tahmadova1982@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.