blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 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
sequencelengths 1
1
| author_id
stringlengths 1
79
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2755cdd0a8984663909a1f6894490c4af3f7473d | 1dd03ae1cdd0f80d5b07114e0cba3faee331b425 | /WebViewDemo/library/src/main/java/com/changxiao/library/config/IWebPageView.java | f327dc041e5e99df1e372e9acc0a88f0b3dc3b88 | [] | no_license | xiaoqianchang/AndroidStudioProjects | 94392371a7d53c7866132842d47753c048ba2d2b | f5b256df3404f56ad53e80c818c551114555950e | refs/heads/master | 2020-08-10T00:51:53.251036 | 2019-10-10T15:16:00 | 2019-10-10T15:16:00 | 214,214,308 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 694 | java | package com.changxiao.library.config;
import android.view.View;
/**
* Created by jingbin on 2016/11/17.
*/
public interface IWebPageView {
// 隐藏进度条
void hindProgressBar();
// 显示webview
void showWebView();
// 隐藏webview
void hindWebView();
// 进度条先加载到90%,然后再加载到100%
void startProgress();
/**
* 进度条变化时调用
*/
void progressChanged(int newProgress);
/**
* 添加js监听
*/
void addImageClickListener();
/**
* 播放网络视频全屏调用
*/
void fullViewAddView(View view);
void showVideoFullView();
void hindVideoFullView();
}
| [
"qianchang.xiao@gmail.com"
] | qianchang.xiao@gmail.com |
151d5c65d0c47b330c4d7be45851f973bde4f050 | f1129ecf5057d5b928c55d05803ff14665ad9dd7 | /changgou-service/changgou-service-order/src/main/java/org/changgou/order/service/OrderService.java | 29d40f88d11018bac2e3bc3cacb030191d9fd42f | [] | no_license | BoWen98/changgou_shop | 0afe154f25fc40655dda6b4ef981eb0568b16d57 | a504fdb81c8d0dc1e36c6fed13fa55b2ba45cbc5 | refs/heads/master | 2022-07-05T18:21:35.531510 | 2019-12-12T10:24:54 | 2019-12-12T10:24:54 | 227,579,305 | 0 | 0 | null | 2022-06-17T02:43:16 | 2019-12-12T10:24:21 | JavaScript | UTF-8 | Java | false | false | 1,614 | java | package org.changgou.order.service;
import com.github.pagehelper.PageInfo;
import org.changgou.order.pojo.Order;
import java.util.Date;
import java.util.List;
/****
* @Author:shenkunlin
* @Description:Order业务层接口
* @Date 2019/6/14 0:16
*****/
public interface OrderService {
/**
* 根据失败的支付结果更新订单状态
* @param id 订单Id
*/
void deleteOrder(String id);
/**
* 根据成功的支付结果更新订单状态
* @param id 订单Id
* @param transactionId 微信方生成的交易流水号
*/
void updateOrder(String id, String transactionId, Date payTime);
/***
* Order多条件分页查询
* @param order
* @param page
* @param size
* @return
*/
PageInfo<Order> findPage(Order order, int page, int size);
/***
* Order分页查询
* @param page
* @param size
* @return
*/
PageInfo<Order> findPage(int page, int size);
/***
* Order多条件搜索方法
* @param order
* @return
*/
List<Order> findList(Order order);
/***
* 删除Order
* @param id
*/
void delete(String id);
/***
* 修改Order数据
* @param order
*/
void update(Order order);
/***
* 新增Order
* @param order 返回订单信息供前端和支付微服务使用
*/
Order add(Order order);
/**
* 根据ID查询Order
* @param id
* @return
*/
Order findById(String id);
/***
* 查询所有Order
* @return
*/
List<Order> findAll();
}
| [
"376512291@qq.com"
] | 376512291@qq.com |
3ab8df40e5146310f19df82e8f6659c57119ab46 | 22361430ab12e5a7c1eba4664293fc4a39051d9b | /QMRServer/jbsrc/scripts/player/PlayerWasHitScript.java | fcd9732052146362cc9dbc4a2723364c4719ee77 | [] | no_license | liuziangexit/QMR | ab93a66623e670a7f276683d94188d1b627db853 | 91ea3bd35ee3a1ebf994fb3fd6ffdbaa6fbf4d22 | refs/heads/master | 2020-03-30T00:22:31.028514 | 2017-12-20T05:41:17 | 2017-12-20T05:41:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 722 | java | package scripts.player;
import com.game.fight.structs.Fighter;
import com.game.manager.ManagerPool;
import com.game.player.script.IPlayerWasHitScript;
import com.game.player.structs.Player;
import com.game.script.structs.ScriptEnum;
public class PlayerWasHitScript implements IPlayerWasHitScript {
@Override
public int getId() {
return ScriptEnum.PLAYERWASHIT;
}
@Override
public void wasHit(Fighter fighter, Player player) {
if (ManagerPool.guildFlagManager.getFlagwarstatus() == 1) {
if (ManagerPool.guildFlagManager.getTerritorymap().containsKey(player.getMapModelId())) {
ManagerPool.guildFlagManager.addGuildFlagBuff(fighter,player);
}
}
}
}
| [
"ctl70000@163.com"
] | ctl70000@163.com |
59f574bc820f3973bdd9dd3dc1d9bd8dd6469a1f | 567caa81bd0b1d9d9b0d34a924d147b7b60a66e0 | /spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java | 7f6b3e65954cead5d59086c73b052c121f03de40 | [
"Apache-2.0"
] | permissive | MrSorrow/spring-boot | fb06c692f35dfb88ee6a8f3fa540e0ebef21de8f | ceed0e80af969c778b5c25c64e5124105988aab9 | refs/heads/master | 2023-01-10T07:09:07.443658 | 2019-10-14T07:39:17 | 2019-10-14T07:39:17 | 182,507,696 | 1 | 0 | Apache-2.0 | 2022-12-27T14:44:13 | 2019-04-21T08:16:26 | Java | UTF-8 | Java | false | false | 5,028 | java | /*
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.ldap;
import org.junit.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.ldap.core.LdapTemplate;
import org.springframework.ldap.core.support.LdapContextSource;
import org.springframework.ldap.pool2.factory.PoolConfig;
import org.springframework.ldap.pool2.factory.PooledContextSource;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link LdapAutoConfiguration}.
*
* @author Eddú Meléndez
* @author Stephane Nicoll
* @author Vedran Pavic
*/
public class LdapAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(LdapAutoConfiguration.class));
@Test
public void contextSourceWithDefaultUrl() {
this.contextRunner.run((context) -> {
LdapContextSource contextSource = context.getBean(LdapContextSource.class);
String[] urls = getUrls(contextSource);
assertThat(urls).containsExactly("ldap://localhost:389");
assertThat(contextSource.isAnonymousReadOnly()).isFalse();
});
}
@Test
public void contextSourceWithSingleUrl() {
this.contextRunner.withPropertyValues("spring.ldap.urls:ldap://localhost:123")
.run((context) -> {
LdapContextSource contextSource = context
.getBean(LdapContextSource.class);
String[] urls = getUrls(contextSource);
assertThat(urls).containsExactly("ldap://localhost:123");
});
}
@Test
public void contextSourceWithSeveralUrls() {
this.contextRunner
.withPropertyValues(
"spring.ldap.urls:ldap://localhost:123,ldap://mycompany:123")
.run((context) -> {
LdapContextSource contextSource = context
.getBean(LdapContextSource.class);
LdapProperties ldapProperties = context.getBean(LdapProperties.class);
String[] urls = getUrls(contextSource);
assertThat(urls).containsExactly("ldap://localhost:123",
"ldap://mycompany:123");
assertThat(ldapProperties.getUrls()).hasSize(2);
});
}
@Test
public void contextSourceWithExtraCustomization() {
this.contextRunner.withPropertyValues("spring.ldap.urls:ldap://localhost:123",
"spring.ldap.username:root", "spring.ldap.password:secret",
"spring.ldap.anonymous-read-only:true",
"spring.ldap.base:cn=SpringDevelopers",
"spring.ldap.baseEnvironment.java.naming.security.authentication:DIGEST-MD5")
.run((context) -> {
LdapContextSource contextSource = context
.getBean(LdapContextSource.class);
assertThat(contextSource.getUserDn()).isEqualTo("root");
assertThat(contextSource.getPassword()).isEqualTo("secret");
assertThat(contextSource.isAnonymousReadOnly()).isTrue();
assertThat(contextSource.getBaseLdapPathAsString())
.isEqualTo("cn=SpringDevelopers");
LdapProperties ldapProperties = context.getBean(LdapProperties.class);
assertThat(ldapProperties.getBaseEnvironment()).containsEntry(
"java.naming.security.authentication", "DIGEST-MD5");
});
}
@Test
public void templateExists() {
this.contextRunner.withPropertyValues("spring.ldap.urls:ldap://localhost:389")
.run((context) -> assertThat(context).hasSingleBean(LdapTemplate.class));
}
@Test
public void contextSourceWithUserProvidedPooledContextSource() {
this.contextRunner.withUserConfiguration(PooledContextSourceConfig.class)
.run((context) -> {
LdapContextSource contextSource = context
.getBean(LdapContextSource.class);
String[] urls = getUrls(contextSource);
assertThat(urls).containsExactly("ldap://localhost:389");
assertThat(contextSource.isAnonymousReadOnly()).isFalse();
});
}
private String[] getUrls(LdapContextSource contextSource) {
return contextSource.getUrls();
}
@Configuration
static class PooledContextSourceConfig {
@Bean
@Primary
public PooledContextSource pooledContextSource(
LdapContextSource ldapContextSource) {
PooledContextSource pooledContextSource = new PooledContextSource(
new PoolConfig());
pooledContextSource.setContextSource(ldapContextSource);
return pooledContextSource;
}
}
}
| [
"Kingdompin@163.com"
] | Kingdompin@163.com |
f1d47e29187274467d5d87418f090814330700c6 | b543f9419a6a5214842aa413fb818302d635b9f9 | /spring-boot-04-web-restful-crud/src/main/java/org/com/cay/spring/boot/filter/MyFilter.java | 3e5825f115a458ae11e10679bdb91f3d00ead667 | [] | no_license | caychen/spring-boot-study-2 | 3575acec55fe61b8c299d10e364c2aed51e75209 | 3296adfa7b1f1839f5772856880701fabfef5790 | refs/heads/master | 2020-03-28T02:55:00.713984 | 2018-09-06T02:47:06 | 2018-09-06T02:47:06 | 147,606,429 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 542 | java | package org.com.cay.spring.boot.filter;
import javax.servlet.*;
import java.io.IOException;
/**
* Created by Cay on 2018/5/9.
*/
public class MyFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
System.out.println("MyFilter process...");
//放行
chain.doFilter(request, response);
}
@Override
public void destroy() {
}
}
| [
"412425870@qq.com"
] | 412425870@qq.com |
9e5f06744ba7b819f62bdb2a744fb18e80c936f2 | 80350e29cb52873d9f6cb12cd6c31a4aeeee8956 | /src/visão/PainelSelecionaCliente.java | 6c215de8f58bea84137ac0876ede3d4e57ada41b | [] | no_license | MateusValasques/EngSoft | 1b8bbaf6501a5f631dfc611f2278b01f3f0016e6 | 8d22a13fe43dbdb8f5ee76ca5ee516d269ed0303 | refs/heads/master | 2020-05-01T11:13:48.999065 | 2019-09-10T19:32:47 | 2019-09-10T19:32:47 | 176,532,692 | 0 | 0 | null | 2019-03-19T15:10:00 | 2019-03-19T14:42:26 | Java | ISO-8859-1 | Java | false | false | 3,131 | java | package visão;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JFormattedTextField;
import javax.swing.JComboBox;
import java.awt.List;
import javax.swing.JButton;
import java.awt.Button;
import java.awt.Color;
import javax.swing.JSeparator;
import javax.swing.JToggleButton;
public class PainelSelecionaCliente extends JFrame {
private JPanel contentPane;
private JLabel lblBuscaCliente;
private JFormattedTextField formattedTextField;
private JComboBox cbxTipoPesquisa;
private List list;
private JButton btnPesquisar;
private Button btnConfirmar;
private Button btnCancelar;
private JSeparator separator;
public PainelSelecionaCliente() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 573, 300);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
contentPane.setBackground(new Color(153, 255, 204));
setContentPane(contentPane);
contentPane.setLayout(null);
contentPane.add(getLblBuscaCliente());
contentPane.add(getFormattedTextField());
contentPane.add(getCbxTipoPesquisa());
contentPane.add(getList());
contentPane.add(getBtnPesquisar());
contentPane.add(getBtnConfirmar());
contentPane.add(getBtnCancelar());
contentPane.add(getSeparator());
}
public JLabel getLblBuscaCliente() {
if (lblBuscaCliente == null) {
lblBuscaCliente = new JLabel("Busca Cliente");
lblBuscaCliente.setFont(new Font("Tahoma", Font.ITALIC, 24));
lblBuscaCliente.setBounds(0, 0, 223, 29);
}
return lblBuscaCliente;
}
public JFormattedTextField getFormattedTextField() {
if (formattedTextField == null) {
formattedTextField = new JFormattedTextField();
formattedTextField.setColumns(10);
formattedTextField.setBounds(115, 47, 310, 20);
}
return formattedTextField;
}
public JComboBox getCbxTipoPesquisa() {
if (cbxTipoPesquisa == null) {
cbxTipoPesquisa = new JComboBox();
cbxTipoPesquisa.addItem("-Selecione-");
cbxTipoPesquisa.addItem("CPF");
cbxTipoPesquisa.addItem("CNPJ");
cbxTipoPesquisa.addItem("NOME");
cbxTipoPesquisa.setBounds(10, 46, 98, 22);
}
return cbxTipoPesquisa;
}
public List getList() {
if (list == null) {
list = new List();
list.setBounds(10, 77, 537, 134);
}
return list;
}
public JButton getBtnPesquisar() {
if (btnPesquisar == null) {
btnPesquisar = new JButton("Pesquisar");
btnPesquisar.setBounds(435, 46, 112, 23);
}
return btnPesquisar;
}
public Button getBtnConfirmar() {
if (btnConfirmar == null) {
btnConfirmar = new Button("Confirmar");
btnConfirmar.setBounds(368, 229, 70, 22);
}
return btnConfirmar;
}
public Button getBtnCancelar() {
if (btnCancelar == null) {
btnCancelar = new Button("Cancelar");
btnCancelar.setBounds(477, 229, 70, 22);
}
return btnCancelar;
}
public JSeparator getSeparator() {
if (separator == null) {
separator = new JSeparator();
separator.setBounds(0, 27, 146, 2);
}
return separator;
}
}
| [
"you@example.com"
] | you@example.com |
3884c8aa1ce8d7acd0b9557e33c16eae7d428539 | 47fa77e1936ef72b53885a0ed3de3fa960db65ec | /data_structure/BST practise/src/com/pp/demo/Main (2020_11_23 15_04_39 UTC).java | 0290a8b0739efa21b47b5dc8ab5b18eaf13dfcfa | [] | no_license | Himanshu-abc/Eclipse_workspaces_2018 | afded2cf43831494df02861ee4e515c7e24f00f8 | 87d744ad74b5908cb51d2dea044056ee8f8a5e55 | refs/heads/master | 2023-07-03T20:48:55.594079 | 2021-08-14T16:52:17 | 2021-08-14T16:52:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 180 | java | package com.pp.demo;
public class Main {
public static void main(String[] args) {
BST bst=new BST();
bst.insert(5);
bst.insert(3);
bst.insert(4);
bst.search(4);
}
}
| [
"himanshupatidar663@gmail.com"
] | himanshupatidar663@gmail.com |
4c60d8735ddaf514b4f2a2d4c0a15924f36b5f08 | ba998ec44d59df248d6c7e93d1d73b803f160af2 | /app/src/main/java/com/nglinx/pulse/adapter/DeviceCatalogAdapter.java | d00a4ced4736fc59d59768bc543374972a262fed | [] | no_license | yrprasad/Famlinx | 2f5888abf2a03072200d2786497c4e6f7e7eee77 | 103b4cb2ff1f2df5b895e4bda4b51f01249841b5 | refs/heads/master | 2020-03-13T14:19:30.237143 | 2019-02-14T13:29:16 | 2019-02-14T13:29:16 | 131,156,151 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,625 | java | package com.nglinx.pulse.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import com.nglinx.pulse.R;
import com.nglinx.pulse.activity.DeviceCatelogActivity;
import com.nglinx.pulse.activity.NotificationActivity;
import com.nglinx.pulse.models.ChildUserModel;
import com.nglinx.pulse.models.DeviceModel;
import com.nglinx.pulse.models.DeviceStatus;
import com.nglinx.pulse.models.NotificationModel;
import java.util.ArrayList;
public class DeviceCatalogAdapter extends ArrayAdapter<DeviceModel> {
Context context;
ArrayList<ChildUserModel> childProfiles;
public DeviceCatalogAdapter(Context context, ArrayList<DeviceModel> devices, ArrayList<ChildUserModel> childProfiles) {
super(context, 0, devices);
this.context = context;
this.childProfiles = childProfiles;
}
@Override
public View getView(final int position, View convertView, final ViewGroup parent) {
// Get the data item for this position
DeviceModel deviceModel = null;
// Check if an existing view is being reused, otherwise inflate the view
if (convertView == null) {
convertView = LayoutInflater.from(getContext()).inflate(R.layout.activity_device_catalog_row, parent, false);
deviceModel = getItem(position);
convertView.setTag(deviceModel);
} else
deviceModel = getItem(position);
// Lookup view for data population
// TextView device_modified_date = (TextView) convertView.findViewById(R.id.device_modified_date);
TextView tv_device_udid = (TextView) convertView.findViewById(R.id.tv_device_udid);
TextView tv_date_modified = (TextView) convertView.findViewById(R.id.tv_date_modified);
TextView tv_status_state = (TextView) convertView.findViewById(R.id.tv_status_state);
// Populate the data into the template view using the data object
// device_modified_date.setText(deviceModel.getModifiedDate());
tv_device_udid.setText(deviceModel.getUdid());
tv_date_modified.setText(deviceModel.getModifiedDate());
String statusState = "";
if (deviceModel.isActivated())
statusState = statusState.concat("Active");
else
statusState = statusState.concat("InActive");
final ChildUserModel userAttached = getAttachedProfileForDevice(deviceModel.getUdid());
if (null == userAttached)
statusState = statusState.concat(", " + "Not Attached.");
else
statusState = statusState.concat("Attached to " + userAttached.getUsername());
tv_status_state.setText(statusState);
final ImageView img_activate_device = (ImageView) convertView.findViewById(R.id.img_activate_device);
img_activate_device.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((DeviceCatelogActivity) context).onItemClick(img_activate_device, position, 0);
}
});
// Return the completed view to render on screen
return convertView;
}
private ChildUserModel getAttachedProfileForDevice(final String udid) {
for (ChildUserModel user :
childProfiles) {
if ((null != user.getUdid()) && (user.getUdid().equalsIgnoreCase(udid)))
return user;
}
return null;
}
} | [
"raghavendra.pra.yelisetty@hpe.com"
] | raghavendra.pra.yelisetty@hpe.com |
459492994bf2eb8a62b8bf5dd8b4d98fd7395dfc | 322ad0d0aebeb3b67f82104b63207d6ac8c89c3d | /app/src/main/java/buy/win/com/winbuy/view/fragment/AttentionFragment.java | e8c1fbe0d6ae50f36661e25cee1a1678acd6c2e9 | [] | no_license | WUKIMDA/WinBuy | 468aad81df2927b9fca22f8251a80ee11467e644 | 67f7bdaacf0b0b33bdbeba7a0d37eb9eab8a6312 | refs/heads/master | 2020-08-29T00:49:52.730188 | 2017-06-21T00:52:43 | 2017-06-21T00:52:43 | 94,383,971 | 7 | 0 | null | null | null | null | UTF-8 | Java | false | false | 824 | java | package buy.win.com.winbuy.view.fragment;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import butterknife.ButterKnife;
import buy.win.com.winbuy.R;
/**
* Created by 林特烦 on 2017/6/16.
*/
public class AttentionFragment extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
View rootView = View.inflate(getActivity(), R.layout.fragment_more_attention, null);
ButterKnife.bind(this, rootView);
return rootView;
}
@Override
public void onDestroyView() {
super.onDestroyView();
ButterKnife.unbind(this);
}
}
| [
"584393321@qq.com"
] | 584393321@qq.com |
db6884fac6a851884414eed4bcc1c4026ed1ea98 | 8b290fb5bb213c8fe83031f8d90ab4a59ab77d42 | /sale/alpssalefulfilmentprocess/src/com/bp/alps/fulfilmentprocess/actions/returns/PrintPackingLabelAction.java | 1556d19ea17bc34f94a5f8ec22fe933f295fd5f3 | [] | no_license | SSJLYY/SR2 | f5a05df0b6f8333890e5b91a95f99e6c260b447a | e69bc5295c9a7e995462e2eec989d06983e2b938 | refs/heads/master | 2020-03-30T06:04:40.417452 | 2018-10-24T03:14:50 | 2018-10-24T03:14:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,031 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2017 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 com.bp.alps.fulfilmentprocess.actions.returns;
import de.hybris.platform.processengine.action.AbstractProceduralAction;
import de.hybris.platform.returns.model.ReturnProcessModel;
import org.apache.log4j.Logger;
/**
* Mock implementation for printing packing label for the ReturnRequest
*/
public class PrintPackingLabelAction extends AbstractProceduralAction<ReturnProcessModel>
{
private static final Logger LOG = Logger.getLogger(PrintPackingLabelAction.class);
@Override
public void executeAction(final ReturnProcessModel process)
{
LOG.info("Process: " + process.getCode() + " in step " + getClass().getSimpleName());
}
}
| [
"18621616775@163.com"
] | 18621616775@163.com |
c82eecec63d9a140a6dd98ce84d48a81a37aacf9 | c4623aa95fb8cdd0ee1bc68962711c33af44604e | /src/com/google/android/gms/internal/jd$a.java | 8a92452803cb1b2b38e18066a582a70f3ed472bf | [] | no_license | reverseengineeringer/com.yelp.android | 48f7f2c830a3a1714112649a6a0a3110f7bdc2b1 | b0ac8d4f6cd5fc5543f0d8de399b6d7b3a2184c8 | refs/heads/master | 2021-01-19T02:07:25.997811 | 2016-07-19T16:37:24 | 2016-07-19T16:37:24 | 38,555,675 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 973 | java | package com.google.android.gms.internal;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.ConstantState;
final class jd$a
extends Drawable
{
private static final a a = new a();
private static final a b = new a(null);
public void draw(Canvas paramCanvas) {}
public Drawable.ConstantState getConstantState()
{
return b;
}
public int getOpacity()
{
return -2;
}
public void setAlpha(int paramInt) {}
public void setColorFilter(ColorFilter paramColorFilter) {}
private static final class a
extends Drawable.ConstantState
{
public int getChangingConfigurations()
{
return 0;
}
public Drawable newDrawable()
{
return jd.a.a();
}
}
}
/* Location:
* Qualified Name: com.google.android.gms.internal.jd.a
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
b6a5f3c23b2bd8483af3c2c0514dfd5c603745b6 | 6a7f6b5a22fa435a77a62b891c0178e5673da92a | /app/src/main/java/li/lingfeng/ltsystem/tweaks/entertainment/BilibiliDisableTeenModeHint.java | 3b1cf6b4d95b992c810de97695f3900d3738d7e1 | [] | no_license | bluesky139/LTweaksSystem | 7327f041559570effa39c8e66729448112e8b0fd | 662118fadfa9f795d7d9948d0778c66a0b0b2325 | refs/heads/master | 2022-10-05T11:57:41.172178 | 2022-10-04T04:11:22 | 2022-10-04T04:11:22 | 162,210,562 | 25 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,081 | java | package li.lingfeng.ltsystem.tweaks.entertainment;
import android.content.Intent;
import li.lingfeng.ltsystem.ILTweaks;
import li.lingfeng.ltsystem.R;
import li.lingfeng.ltsystem.lib.MethodsLoad;
import li.lingfeng.ltsystem.prefs.PackageNames;
import li.lingfeng.ltsystem.tweaks.TweakBase;
import li.lingfeng.ltsystem.utils.Logger;
@MethodsLoad(packages = PackageNames.BILIBILI, prefs = R.string.key_bilibili_disable_teen_mode_hint)
public class BilibiliDisableTeenModeHint extends TweakBase {
private static final String TEEN_MODE_DIALOG_ACTIVITY = "com.bilibili.teenagersmode.ui.TeenagersModeDialogActivity";
@Override
public void android_app_Activity__startActivityForResult__Intent_int_Bundle(ILTweaks.MethodParam param) {
param.before(() -> {
Intent intent = (Intent) param.args[0];
if (intent.getComponent() != null && intent.getComponent().getClassName().equals(TEEN_MODE_DIALOG_ACTIVITY)) {
Logger.v("Disable teen mode dialog hint.");
param.setResult(null);
}
});
}
}
| [
"bluesky139@gmail.com"
] | bluesky139@gmail.com |
bf9024551a00915f55809d31ed8f638f55cf45a9 | 2f2e02b6f0ce5b52ce7a68a2267460f61008ec3c | /src/chap2/Reservation.java | 4a6a1a1fae98aa413620dcea92b9eb8bfee08491 | [] | no_license | sjaqjwor/Object | 6000f2e505c381c43799ab2da149a30b0b25c250 | 66b8912e372f5084ed3d56301b9417cb96036faf | refs/heads/master | 2020-06-27T04:51:15.586765 | 2019-08-05T10:22:26 | 2019-08-05T10:22:26 | 199,848,639 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 396 | java | package chap2;
public class Reservation {
private Customer customer;
private Screening screening;
private Money fee;
private int audienceCount;
public Reservation(Customer customer, Screening screening, Money fee, int audienceCount) {
this.customer=customer;
this.screening=screening;
this.fee=fee;
this.audienceCount=audienceCount;
}
}
| [
"lsklsk45@naver.com"
] | lsklsk45@naver.com |
0460ec6174f83f06edc77b0663e8ee4351170c48 | a4178e5042f43f94344789794d1926c8bdba51c0 | /iwxxm2Converter/src/schemabindings/schemabindings21/org/isotc211/_2005/gco/MemberNameType.java | f68358c9a5e2581a4889fc45a303839ddeebadd5 | [
"Apache-2.0"
] | permissive | moryakovdv/iwxxmConverter | c6fb73bc49765c4aeb7ee0153cca04e3e3846ab0 | 5c2b57e57c3038a9968b026c55e381eef0f34dad | refs/heads/master | 2023-07-20T06:58:00.317736 | 2023-07-05T10:10:10 | 2023-07-05T10:10:10 | 128,777,786 | 11 | 7 | Apache-2.0 | 2023-07-05T10:03:12 | 2018-04-09T13:38:59 | Java | UTF-8 | Java | false | false | 3,157 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.02.27 at 12:41:52 PM MSK
//
package schemabindings21.org.isotc211._2005.gco;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* A MemberName is a LocalName that references either an attribute slot in a record or recordType or an attribute, operation, or association role in an object instance or type description in some form of schema. The stored value "aName" is the returned value for the "aName()" operation.
*
* <p>Java class for MemberName_Type complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="MemberName_Type">
* <complexContent>
* <extension base="{http://www.isotc211.org/2005/gco}AbstractObject_Type">
* <sequence>
* <element name="aName" type="{http://www.isotc211.org/2005/gco}CharacterString_PropertyType"/>
* <element name="attributeType" type="{http://www.isotc211.org/2005/gco}TypeName_PropertyType"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MemberName_Type", propOrder = {
"aName",
"attributeType"
})
public class MemberNameType
extends AbstractObjectType
{
@XmlElement(required = true)
protected CharacterStringPropertyType aName;
@XmlElement(required = true)
protected TypeNamePropertyType attributeType;
/**
* Gets the value of the aName property.
*
* @return
* possible object is
* {@link CharacterStringPropertyType }
*
*/
public CharacterStringPropertyType getAName() {
return aName;
}
/**
* Sets the value of the aName property.
*
* @param value
* allowed object is
* {@link CharacterStringPropertyType }
*
*/
public void setAName(CharacterStringPropertyType value) {
this.aName = value;
}
public boolean isSetAName() {
return (this.aName!= null);
}
/**
* Gets the value of the attributeType property.
*
* @return
* possible object is
* {@link TypeNamePropertyType }
*
*/
public TypeNamePropertyType getAttributeType() {
return attributeType;
}
/**
* Sets the value of the attributeType property.
*
* @param value
* allowed object is
* {@link TypeNamePropertyType }
*
*/
public void setAttributeType(TypeNamePropertyType value) {
this.attributeType = value;
}
public boolean isSetAttributeType() {
return (this.attributeType!= null);
}
}
| [
"moryakovdv@gmail.com"
] | moryakovdv@gmail.com |
15307e44679c86d9359e946ea41e6f4b2df91b8d | 1ebd71e2179be8a2baec90ff3f326a3f19b03a54 | /hybris/bin/platform/ext/core/testsrc/de/hybris/platform/core/threadregistry/DefaultSuspendResultUnitTest.java | e7c9bed27b1e773144ab7b06e1fc2c3bc3aede9c | [] | no_license | shaikshakeeb785/hybrisNew | c753ac45c6ae264373e8224842dfc2c40a397eb9 | 228100b58d788d6f3203333058fd4e358621aba1 | refs/heads/master | 2023-08-15T06:31:59.469432 | 2021-09-03T09:02:04 | 2021-09-03T09:02:04 | 402,680,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,180 | java | /*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.core.threadregistry;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.core.suspend.SuspendResult;
import de.hybris.platform.core.suspend.SystemStatus;
import org.junit.Test;
@UnitTest
public class DefaultSuspendResultUnitTest
{
@Test
public void shouldReturnNullResumeTokenWhenSystemIsSuspended()
{
final SuspendResult result = DefaultSuspendResult.systemIsSuspendedOrWaiting(SystemStatus.SUSPENDED);
assertThat(result).isNotNull();
assertThat(result.getCurrentStatus()).isSameAs(SystemStatus.SUSPENDED);
assertThat(result.getResumeToken()).isNull();
}
@Test
public void shouldReturnNullResumeTokenWhenSystemIsWaiting()
{
final SuspendResult result = DefaultSuspendResult.systemIsSuspendedOrWaiting(SystemStatus.WAITING_FOR_SUSPEND);
assertThat(result).isNotNull();
assertThat(result.getCurrentStatus()).isSameAs(SystemStatus.WAITING_FOR_SUSPEND);
assertThat(result.getResumeToken()).isNull();
}
@Test
public void shouldReturnNullResumeTokenWhenSystemIsWaitingForUpdate()
{
final SuspendResult result = DefaultSuspendResult.systemIsSuspendedOrWaiting(SystemStatus.WAITING_FOR_UPDATE);
assertThat(result).isNotNull();
assertThat(result.getCurrentStatus()).isSameAs(SystemStatus.WAITING_FOR_UPDATE);
assertThat(result.getResumeToken()).isNull();
}
@Test
public void shouldThrowIllegalArgumentExceptionWhenSystemIsRunningAndTokenIsNotGiven()
{
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> DefaultSuspendResult.systemIsSuspendedOrWaiting(SystemStatus.RUNNING));
}
@Test
public void shouldReturnResumeTokenWhenSystemHasBeenSuspended()
{
final SuspendResult result = DefaultSuspendResult.systemHasBeenRequestedToSuspend(SystemStatus.RUNNING, "TEST");
assertThat(result).isNotNull();
assertThat(result.getCurrentStatus()).isSameAs(SystemStatus.RUNNING);
assertThat(result.getResumeToken()).isEqualTo("TEST");
}
}
| [
"sauravkr82711@gmail.com"
] | sauravkr82711@gmail.com |
51618c6f196a5cc1b320e6fc91c3d69f2c94bf63 | 25baed098f88fc0fa22d051ccc8027aa1834a52b | /src/main/java/com/ljh/service/UndrugDetailService.java | 8db0bbbdbf2d3f9defdf22b2d60fb6cca77e4751 | [] | no_license | woai555/ljh | a5015444082f2f39d58fb3e38260a6d61a89af9f | 17cf8f4415c9ae7d9fedae46cd9e9d0d3ce536f9 | refs/heads/master | 2022-07-11T06:52:07.620091 | 2022-01-05T06:51:27 | 2022-01-05T06:51:27 | 132,585,637 | 0 | 0 | null | 2022-06-17T03:29:19 | 2018-05-08T09:25:32 | Java | UTF-8 | Java | false | false | 288 | java | package com.ljh.service;
import com.ljh.bean.UndrugDetail;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 非药品明细表 服务类
* </p>
*
* @author ljh
* @since 2020-10-26
*/
public interface UndrugDetailService extends IService<UndrugDetail> {
}
| [
"37681193+woai555@users.noreply.github.com"
] | 37681193+woai555@users.noreply.github.com |
23d4ffe3e9b804871557f5d6b6636068686a8e8d | e1b97d667b3d23b0a31e500818621973683c9c7b | /DIT012/Labs/week2/week2/src/samples/slides/MoveOneLeft.java | ae48d27a0503353feb6ba43a14b6dd6de0366258 | [] | no_license | ketric/DIT012 | 05e00f78b53db20a4a3345e40c5f562a53e226b5 | a87414ffe0a01b476406e8590b139ebc11b050ec | refs/heads/master | 2020-03-19T00:22:44.831267 | 2018-05-30T17:31:25 | 2018-05-30T17:31:25 | 135,476,530 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 553 | java | package samples.slides;
import java.util.Arrays;
import static java.lang.System.out;
/**
* Move all elements one index to left
*/
public class MoveOneLeft {
public static void main(String[] args) {
new MoveOneLeft().program();
}
void program() {
int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9}; // Declare and initialize
int first = arr[0];
for (int i = 1; i < arr.length; i++) {
arr[i-1] = arr[i];
}
arr[arr.length-1] = first;
out.println(Arrays.toString(arr));
}
}
| [
"kennyle1996@hotmail.com"
] | kennyle1996@hotmail.com |
23b9d5ceb310ab8073d548d31ceb0ff513cf44d5 | f5ed8774d8fd5f24b887b19bcbf85540421efe24 | /app0604/src/app0604/tree/xml/Pet.java | 455674005d79190ac9a51c6de23a30cc21281a69 | [] | no_license | zino1187/korea202102_javaworkspace | 84b9e553817cc62e6a6ac7e1f60111ae939b7946 | ad42b6a473b400de6b4b4d28f40753d5484955d7 | refs/heads/master | 2023-06-01T04:34:37.608211 | 2021-06-07T23:55:49 | 2021-06-07T23:55:49 | 362,066,936 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 464 | java | package app0604.tree.xml;
//한마리의 반려동물을 담을 VO 정의
public class Pet {
private String type;
private String name;
private int age;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
| [
"zino1187@gmail.com"
] | zino1187@gmail.com |
eb2c45b855d51b0413c2a303fd27cd292ef6498a | 1003b35c41d70085919a02392d7a55bdc90a6346 | /src/main/java/com/system/started/socketio/SocketEventListener.java | 34acd7ab916063da77ef3aa7f6a72679eeec085a | [] | no_license | IOExceptioner/Server-Management-System | 8cf7ff4e91c4b752cd226d1087878a111873864a | 2d6ee3bf3bb544d1228eee32891a4075e20a4220 | refs/heads/master | 2023-03-15T10:46:23.977367 | 2019-04-02T02:49:38 | 2019-04-02T02:49:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,512 | java | package com.system.started.socketio;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import com.corundumstudio.socketio.AckRequest;
import com.corundumstudio.socketio.SocketIOClient;
import com.corundumstudio.socketio.SocketIOServer;
import com.corundumstudio.socketio.listener.DataListener;
import com.vlandc.oss.common.JsonHelper;
public class SocketEventListener implements ISocketIOListener, DataListener<String> {
@Autowired
private SocketIOClientManager socketIOClientManager;
private SocketIOServer server;
public void setServer(SocketIOServer server) {
this.server = server;
}
public void initListener() {
server.addEventListener("socketioEvent", String.class, this);
}
public void onData(SocketIOClient client, String messageJson, AckRequest ackSender) throws Exception {
HashMap<String, Object> messageMap = JsonHelper.fromJson(HashMap.class, messageJson);
String loginId = (String) messageMap.get("loginId");
socketIOClientManager.addConnection(loginId, client);
String eventType = (String) messageMap.get("type");
if (eventType.equals("REGISTER_NOTIFICATION")) {
String notificationType = (String) messageMap.get("notificationType");
socketIOClientManager.registerNotification(notificationType, client);
} else if (eventType.equals("UNREGISTER_NOTIFICATION")) {
String notificationType = (String) messageMap.get("notificationType");
socketIOClientManager.unRegisterNotification(notificationType, client);
}
}
} | [
"thelovelybugfly@foxmail.com"
] | thelovelybugfly@foxmail.com |
15fe026a962d6997846613a8c0a4db18ad391ad1 | f5c58550743d4e9acfec5598fc65ae957082c4cc | /app/src/main/java/com/youli/huangpuwenjuantest2017_11_15/MainActivity.java | 5a8424f01a5e3ce908d57bd1bd2506bfc4484e41 | [] | no_license | 2381447237/wenJuan | 0f213baa5ff28b420bdd381a54866416de5ab295 | 4717cf4edfe67ae59560744baa7089b2c22a233d | refs/heads/master | 2021-08-18T23:50:18.885770 | 2017-11-24T07:54:10 | 2017-11-24T07:54:10 | 111,502,501 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,706 | java | package com.youli.huangpuwenjuantest2017_11_15;
import android.app.Activity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.youli.huangpuwenjuantest2017_11_15.adapter.QuestionListAdapter;
import com.youli.huangpuwenjuantest2017_11_15.bean.NaireListInfo;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
public class MainActivity extends Activity {
private ListView lv;
private QuestionListAdapter adapter;
private List<NaireListInfo> data=new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lv= (ListView) findViewById(R.id.question_lv);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent=new Intent(MainActivity.this,NaireDetailActivity.class);
intent.putExtra("wenjuan",data.get(position));
startActivity(intent);
}
});
getLocalData();
}
private void getLocalData(){
try {
InputStream is=getAssets().open("myjson2.txt");
final String text=readTextFromSDcard(is);
runOnUiThread(new Runnable() {
@Override
public void run() {
Gson gson=new Gson();
data=gson.fromJson(text,new TypeToken<LinkedList<NaireListInfo>>(){}.getType());
adapter=new QuestionListAdapter(MainActivity.this,data);
lv.setAdapter(adapter);
}
});
} catch (IOException e) {
e.printStackTrace();
}
}
private String readTextFromSDcard(InputStream is) throws IOException {
InputStreamReader reader=new InputStreamReader(is,"GBK");
BufferedReader bufferedReader=new BufferedReader(reader);
StringBuffer buffer=new StringBuffer("");
String str;
while ((str=bufferedReader.readLine())!=null){
buffer.append(str);
buffer.append("\n");
}
return buffer.toString();
}
}
| [
"2381447237@qq.com"
] | 2381447237@qq.com |
a29a6f8001bc772898694714788629de92e40f6b | 900cc3d78a80407260c663c1c22fd6756fcfe9cf | /src/org/aerogear/android/datamanager/Store.java | d41e8cbf42fbc59307dedb0765d815881726a778 | [] | no_license | qmx/aerogear-android | 5431956e3e39b74f8d4b65d8abc4e968175d9fa6 | d03c06e992a6dd54c11d40a8fa5a277738bf2545 | refs/heads/master | 2020-12-29T03:07:21.727249 | 2012-10-31T19:21:24 | 2012-10-31T20:10:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,935 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2012, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.aerogear.android.datamanager;
import org.aerogear.android.impl.datamanager.StoreType;
import java.io.Serializable;
import java.util.Collection;
/**
* Represents an abstraction layer for a storage system.
*/
public interface Store<T> {
/**
* Returns the type of the underlying 'store implementation'
*
* @return StoreType
*/
public StoreType getType();
/**
* Reads all the data from the underlying storage system.
*
* @return List of T
*/
public Collection<T> readAll();
/**
* Reads a specific object/record from the underlying storage system.
*
* @param id id from the desired object
* @return T
*/
public T read(Serializable id);
/**
* Saves the given object in the underlying storage system.
*
* @param item Object to save
*/
public void save(T item);
/**
* Resets the entire storage system.
*/
public void reset();
/**
* Removes a specific object/record from the underlying storage system.
*
* @param id Id of item to remote
*/
public void remove(Serializable id);
}
| [
"bruno@abstractj.org"
] | bruno@abstractj.org |
613ee0f961202a1c114224bfdd9e1a11807dd63a | ccdddb0d677b10619f0ba4b26ce6cfe2729e586a | /app/models/Submitter.java | 19a55ce60fc5f75e0b3c14d9d9bc7e93f6f8cce1 | [
"Apache-2.0"
] | permissive | nmldiegues/palm | f16fb126f79fe46619e14fac7078101f09f5f2d6 | 8f5c3f0ef7b293c32b97b8b9d87e241d4fdea834 | refs/heads/master | 2021-01-01T18:17:24.186720 | 2015-09-09T15:56:08 | 2015-09-09T15:56:08 | 1,984,239 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 224 | java | package models;
import javax.persistence.Entity;
@Entity
public class Submitter extends Role {
@Override
public String toString() {
return "Submitter";
}
@Override
public boolean isAdmin() {
return false;
}
}
| [
"nmld@ist.utl.pt"
] | nmld@ist.utl.pt |
ce2034eb1ec2a406a5aca23ae4d34ee81299ffe2 | 826bdb859556bbd1f8bc5b9840155e89b5c48b06 | /diagram-ta/src/main/java/org/openflexo/technologyadapter/diagram/metamodel/DiagramPaletteObject.java | 894d4d9f3b57d5c3e4402a37cc20dd0758d1c7e6 | [] | no_license | openflexo-team/openflexo-diagram | ea74203a2c8a43f057886881b1bf6920207be2e9 | 6c258ad508020e655d571aa9889aa907f5d6cfd3 | refs/heads/2.0.0 | 2023-05-25T14:38:34.971027 | 2020-07-01T13:54:10 | 2020-07-01T13:54:10 | 184,215,808 | 0 | 0 | null | 2021-01-14T20:43:27 | 2019-04-30T07:43:45 | Java | UTF-8 | Java | false | false | 3,569 | java | /**
*
* Copyright (c) 2014, Openflexo
*
* This file is part of Flexodiagram, a component of the software infrastructure
* developed at Openflexo.
*
*
* Openflexo is dual-licensed under the European Union Public License (EUPL, either
* version 1.1 of the License, or any later version ), which is available at
* https://joinup.ec.europa.eu/software/page/eupl/licence-eupl
* and the GNU General Public License (GPL, either version 3 of the License, or any
* later version), which is available at http://www.gnu.org/licenses/gpl.html .
*
* You can redistribute it and/or modify under the terms of either of these licenses
*
* If you choose to redistribute it and/or modify under the terms of the GNU GPL, you
* must include the following additional permission.
*
* Additional permission under GNU GPL version 3 section 7
*
* If you modify this Program, or any covered work, by linking or
* combining it with software containing parts covered by the terms
* of EPL 1.0, the licensors of this Program grant you additional permission
* to convey the resulting work. *
*
* 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 http://www.openflexo.org/license.html for details.
*
*
* Please contact Openflexo (openflexo-contacts@openflexo.org)
* or visit www.openflexo.org if you need additional information.
*
*/
package org.openflexo.technologyadapter.diagram.metamodel;
import java.util.logging.Logger;
import org.openflexo.foundation.technologyadapter.TechnologyObject;
import org.openflexo.pamela.annotations.Getter;
import org.openflexo.pamela.annotations.ImplementationClass;
import org.openflexo.pamela.annotations.ModelEntity;
import org.openflexo.pamela.annotations.Setter;
import org.openflexo.pamela.annotations.XMLAttribute;
import org.openflexo.technologyadapter.diagram.DiagramTechnologyAdapter;
@ModelEntity(isAbstract = true)
@ImplementationClass(DiagramPaletteObject.DiagramPaletteObjectImpl.class)
public interface DiagramPaletteObject extends TechnologyObject<DiagramTechnologyAdapter> {
public static final String NAME = "name";
public abstract DiagramPalette getPalette();
public abstract DiagramSpecification getDiagramSpecification();
public DiagramPaletteFactory getFactory();
/**
* Return name of this diagram element
*
* @return
*/
@Getter(value = NAME)
@XMLAttribute
public String getName();
/**
* Sets name of this diagram element
*
* @param aName
*/
@Setter(value = NAME)
public void setName(String aName);
public static abstract class DiagramPaletteObjectImpl extends FlexoObjectImpl implements DiagramPaletteObject {
private static final Logger logger = Logger.getLogger(DiagramPaletteObjectImpl.class.getPackage().getName());
@Override
public abstract DiagramPalette getPalette();
@Override
public abstract DiagramSpecification getDiagramSpecification();
@Override
public final DiagramPaletteFactory getFactory() {
return getPalette().getResource().getFactory();
}
@Override
public DiagramTechnologyAdapter getTechnologyAdapter() {
if (getPalette() != null) {
if (getPalette().getResource() != null) {
return getPalette().getResource().getTechnologyAdapter();
}
}
else {
logger.warning("INVESTIGATE : cannot get TA for a PaletteObject with null Palette! : " + this.getName());
}
return null;
}
}
}
| [
"sylvain@openflexo.org"
] | sylvain@openflexo.org |
cfe4fc242ce8535cc4bfd75ad14f60fa912d1240 | 365267d7941f76c97fac8af31a788d8c0fb2d384 | /src/main/java/net/minecraft/network/play/server/S1CPacketEntityMetadata.java | e27bc5d0a8953d8ac738c20b1c197bcd3326cebc | [
"MIT"
] | permissive | potomy/client | 26d8c31657485f216639efd13b2fdda67570d9b5 | c01d23eb05ed83abb4fee00f9bf603b6bc3e2e27 | refs/heads/master | 2021-06-21T16:02:26.920860 | 2017-08-02T02:03:49 | 2017-08-02T02:03:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,852 | java | package net.minecraft.network.play.server;
import net.minecraft.entity.DataWatcher;
import net.minecraft.network.INetHandler;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.INetHandlerPlayClient;
import java.io.IOException;
import java.util.List;
public class S1CPacketEntityMetadata extends Packet
{
private int field_149379_a;
private List field_149378_b;
public S1CPacketEntityMetadata() {}
public S1CPacketEntityMetadata(int p_i45217_1_, DataWatcher p_i45217_2_, boolean p_i45217_3_)
{
this.field_149379_a = p_i45217_1_;
if (p_i45217_3_)
{
this.field_149378_b = p_i45217_2_.getAllWatched();
}
else
{
this.field_149378_b = p_i45217_2_.getChanged();
}
}
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer p_148837_1_) throws IOException
{
this.field_149379_a = p_148837_1_.readInt();
this.field_149378_b = DataWatcher.readWatchedListFromPacketBuffer(p_148837_1_);
}
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer p_148840_1_) throws IOException
{
p_148840_1_.writeInt(this.field_149379_a);
DataWatcher.writeWatchedListToPacketBuffer(this.field_149378_b, p_148840_1_);
}
public void processPacket(INetHandlerPlayClient p_148833_1_)
{
p_148833_1_.handleEntityMetadata(this);
}
public List func_149376_c()
{
return this.field_149378_b;
}
public int func_149375_d()
{
return this.field_149379_a;
}
public void processPacket(INetHandler p_148833_1_)
{
this.processPacket((INetHandlerPlayClient)p_148833_1_);
}
}
| [
"dav.nico@orange.fr"
] | dav.nico@orange.fr |
4ca768876ef996dd259b5a5be84e30fa980c8684 | a00326c0e2fc8944112589cd2ad638b278f058b9 | /src/main/java/000/132/775/CWE197_Numeric_Truncation_Error__int_Environment_to_byte_22b.java | 2fdc2dcbff442c8d2b63fc7ea09b261f3fc87729 | [] | 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 | 3,315 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE197_Numeric_Truncation_Error__int_Environment_to_byte_22b.java
Label Definition File: CWE197_Numeric_Truncation_Error__int.label.xml
Template File: sources-sink-22b.tmpl.java
*/
/*
* @description
* CWE: 197 Numeric Truncation Error
* BadSource: Environment Read data from an environment variable
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: to_byte
* BadSink : Convert data to a byte
* Flow Variant: 22 Control flow: Flow controlled by value of a public static variable. Sink functions are in a separate file from sources.
*
* */
import java.util.logging.Level;
public class CWE197_Numeric_Truncation_Error__int_Environment_to_byte_22b
{
public int badSource() throws Throwable
{
int data;
if (CWE197_Numeric_Truncation_Error__int_Environment_to_byte_22a.badPublicStatic)
{
data = Integer.MIN_VALUE; /* Initialize data */
/* get environment variable ADD */
/* POTENTIAL FLAW: Read data from an environment variable */
{
String stringNumber = System.getenv("ADD");
if (stringNumber != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat);
}
}
}
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
return data;
}
/* goodG2B1() - use goodsource and badsink by setting the static variable to false instead of true */
public int goodG2B1Source() throws Throwable
{
int data;
if (CWE197_Numeric_Truncation_Error__int_Environment_to_byte_22a.goodG2B1PublicStatic)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
else
{
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
}
return data;
}
/* goodG2B2() - use goodsource and badsink by reversing the blocks in the if in the sink function */
public int goodG2B2Source() throws Throwable
{
int data;
if (CWE197_Numeric_Truncation_Error__int_Environment_to_byte_22a.goodG2B2PublicStatic)
{
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
return data;
}
}
| [
"anhtluet12@gmail.com"
] | anhtluet12@gmail.com |
100400a458560285c10c5a527311fda313d3c5d6 | 0ffe3496de135d09acf06481719ba3fee2c73ab5 | /app/src/main/java/com/txd/hzj/wjlp/bean/commodity/GroupRankBean.java | 393fdcfcd171a8c06ee673296ee3ac575d981428 | [] | no_license | sengeiou/wujie_android | 45268d83592b5ae5e959eb82de2924eebee56db9 | 20f726d364685e9a8b6b01c3ce1b0ef1e97ab12b | refs/heads/master | 2021-10-24T22:15:17.091035 | 2019-03-25T09:20:53 | 2019-03-25T09:20:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,700 | java | package com.txd.hzj.wjlp.bean.commodity;
import java.io.Serializable;
import java.util.List;
/**
* 创建者:zhangyunfei
* 创建时间:2018/12/25 9:44
* 功能描述:
*/
public class GroupRankBean implements Serializable{
/**
* user_info : {"rank":"1","user_id":"100","user_name":"cold","head_pic":"http://img.wujiemall.com/Public/Pc/img/default.png","user_count":"0"}
* rank_list : [{"rank":"1","user_id":"100","user_name":"cold","head_pic":"http://img.wujiemall.com/Public/Pc/img/default.png","user_count":"0"},{"rank":"2","user_id":"22","user_name":"Cyf","head_pic":"http://img.wujiemall.com/Public/Pc/img/default.png","user_count":"0"}]
*/
private UserInfoBean user_info;
private List<RankBean> rank_list;
public UserInfoBean getUser_info() {
return user_info;
}
public void setUser_info(UserInfoBean user_info) {
this.user_info = user_info;
}
public List<RankBean> getRank_list() {
return rank_list;
}
public void setRank_list(List<RankBean> rank_list) {
this.rank_list = rank_list;
}
public class UserInfoBean implements Serializable{
/**
* rank : 1
* user_id : 100
* user_name : cold
* head_pic : http://img.wujiemall.com/Public/Pc/img/default.png
* user_count : 0
*/
private String rank;
private String user_id;
private String user_name;
private String head_pic;
private String user_count;
public String getRank() {
return rank;
}
public void setRank(String rank) {
this.rank = rank;
}
public String getUser_id() {
return user_id;
}
public void setUser_id(String user_id) {
this.user_id = user_id;
}
public String getUser_name() {
return user_name;
}
public void setUser_name(String user_name) {
this.user_name = user_name;
}
public String getHead_pic() {
return head_pic;
}
public void setHead_pic(String head_pic) {
this.head_pic = head_pic;
}
public String getUser_count() {
return user_count;
}
public void setUser_count(String user_count) {
this.user_count = user_count;
}
}
public class RankBean implements Serializable{
/**
* rank : 1
* user_id : 100
* user_name : cold
* head_pic : http://img.wujiemall.com/Public/Pc/img/default.png
* user_count : 0
*/
private String rank;
private String user_id;
private String user_name;
private String head_pic;
private String user_count;
public String getRank() {
return rank;
}
public void setRank(String rank) {
this.rank = rank;
}
public String getUser_id() {
return user_id;
}
public void setUser_id(String user_id) {
this.user_id = user_id;
}
public String getUser_name() {
return user_name;
}
public void setUser_name(String user_name) {
this.user_name = user_name;
}
public String getHead_pic() {
return head_pic;
}
public void setHead_pic(String head_pic) {
this.head_pic = head_pic;
}
public String getUser_count() {
return user_count;
}
public void setUser_count(String user_count) {
this.user_count = user_count;
}
}
}
| [
"32457127@qq.com"
] | 32457127@qq.com |
f5832c1995fd7813936ef5d40a2e5fbfba5937d0 | 87873856a23cd5ebdcd227ef39386fb33f5d6b13 | /java-best-of/src/main/java/io/jsd/training/designpattern/combining/ducks/bird/DecoyDuck.java | 9a5ac0cff1d80a765e79df41c131c71061a510c8 | [] | no_license | jsdumas/java-training | da204384223c3e7871ccbb8f4a73996ae55536f3 | 8df1da57ea7a5dd596fea9b70c6cd663534d9d18 | refs/heads/master | 2022-06-28T16:08:47.529631 | 2019-06-06T07:49:30 | 2019-06-06T07:49:30 | 113,677,424 | 0 | 0 | null | 2022-06-20T23:48:24 | 2017-12-09T14:55:56 | Java | UTF-8 | Java | false | false | 185 | java | package io.jsd.training.designpattern.combining.ducks.bird;
public class DecoyDuck implements Quackable {
@Override
public void quack() {
System.out.println("<< Silence >>");
}
}
| [
"jsdumas@free.fr"
] | jsdumas@free.fr |
1f8eaaa5b5902af35c42e8cb9a4061c69b1f3f23 | c2d782fc19a27ce8b6c2f5a924d6f3c66f85e013 | /Theory_Questions/Theory_questions/FavoriteSortingAlgo.java | 5119d674a6e18ab6941699c7c9aac29b5ab40ffd | [] | no_license | ravicode/github | 5fe94e553e2a6c953bde484ee4458a35602820bc | 9e97a9655212456bd1149229a8d6b0a38c4f3f3a | refs/heads/master | 2021-01-01T04:40:16.943559 | 2016-04-23T20:20:01 | 2016-04-23T20:20:01 | 56,939,062 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 536 | java | package Theory_questions;
/*
my favorite sorting algorithm. My favorite is insertion sort but I told him merge sort because
I knew a lot about merge sort so I wanted to drive the interview towards merge sort and as
expected he asked many questions on merge sort and I gave him all the answers.
He asked me to build a tree from given preorder and postorder traversal of tree, I said it
is impossible to build from only these 2 traversals , you have to give me inorder to build
a unique tree.
*/
public class FavoriteSortingAlgo {
}
| [
"ravi.ters@gmail.com"
] | ravi.ters@gmail.com |
b9c2fe2815cfd87e8fda4c0d28a35bc8a8f7cea2 | 542f352614185ea134355b61a8ee11d5e7d713af | /dlfc-zfgj-V1.5.0/dlfc-zfgj-core/src/main/java/com/dlfc/zfgj/service/SysOperateLogService.java | ae87375cc16faa9faa4839ff46673f44e689e32a | [] | no_license | iversonwuwei/zfgj-spring-boot-1.0.0 | 1798d3af99bd8a658e206f12627deef04d016ec9 | 2a28568290edd17ac557b878e095e824d8b5d1ed | refs/heads/master | 2021-01-25T09:31:51.563362 | 2017-06-09T10:08:33 | 2017-06-09T10:10:08 | 93,845,536 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,149 | java |
/**
* @name: OperateLogService.java
*
* @Copyright: (c) 2015 DLFC. All rights reserved.
*
* @description:
*
* @version: 1.0
* @date : 2015年9月21日
* @author: Sun.Zhi
*
* @Modification History:<br>
* Date Author Version Discription
* 2015年9月21日 Sun.Zhi 1.0 <修改原因描述>
*/
package com.dlfc.zfgj.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dlfc.zfgj.entity.SysOperateLog;
import com.dlfc.zfgj.mapper.SysOperateLogMapper;
/**
* @name: OperateLogService
* @description: 操作日志Service
* @version 1.0
* @author Sun.Zhi
*/
@Service("sysOperateLogService")
public class SysOperateLogService {
/**操作日志mapper*/
@Autowired
private SysOperateLogMapper sysOperateLogMapper;
/**
* 新插入log
*
* @param log log对象
*/
public void save(SysOperateLog log) {
sysOperateLogMapper.insert(log);
}
/**
* 更新log
*
* @param record log对象
*/
public void update(SysOperateLog record) {
sysOperateLogMapper.updateByPrimaryKeySelective(record);
}
}
| [
"wuwei@housecenter.cn"
] | wuwei@housecenter.cn |
569b5108afb8621b871cd0bfb55ec303c317102c | df4539abf5d521be6fddd25734ccd7d7ac461428 | /01-JavaSE/day12-内部类&API/案例/学员练习代码/myMath/src/com/itheima/MathDemo.java | 2467562428fd4bba03aa9cd910ea09075c91c49e | [] | no_license | muzierixao/Learning-Java | c9bf6d1d020fd5b6e55d99c50172c465ea06fec0 | 893d9a730d6429626d1df5613fa7f81aca5bdd84 | refs/heads/master | 2023-04-18T06:48:46.280665 | 2020-12-27T05:32:02 | 2020-12-27T05:32:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 922 | java | package com.itheima;
/*
Math类的常用方法
*/
public class MathDemo {
public static void main(String[] args) {
//public static int abs(int a):返回参数的绝对值
//public static double ceil(double a):返回大于或等于参数的最小double值,等于一个整数
//public static double floor(double a):返回小于或等于参数的最大double值,等于一个整数
//public static int round(float a):按照四舍五入返回最接近参数的int
//public static int max(int a,int b):返回两个int值中的较大值
//public static int min(int a,int b):返回两个int值中的较小值(自学)
//public static double pow(double a,double b):返回a的b次幂的值
//public static double random():返回值为double的正值,[0.0,1.0)
}
}
| [
"157514367@qq.com"
] | 157514367@qq.com |
d184d2e41897f8fdff91797c283ffb6399e0655a | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/plugin/multitalk/ui/widget/s.java | 966acbf06aa18ead0203c0c4216de0bdb58cc3c3 | [] | 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,626 | java | package com.tencent.mm.plugin.multitalk.ui.widget;
import android.content.Context;
import androidx.recyclerview.widget.RecyclerView.a;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.pluginsdk.e.b;
import java.util.ArrayList;
import java.util.Iterator;
import kotlin.Metadata;
@Metadata(d1={""}, d2={"Lcom/tencent/mm/plugin/multitalk/ui/widget/SmallAvatarLayoutAdapter;", "Landroidx/recyclerview/widget/RecyclerView$Adapter;", "Lcom/tencent/mm/plugin/multitalk/ui/widget/SmallAvatarLayoutHolder;", "context", "Landroid/content/Context;", "(Landroid/content/Context;)V", "avatarItems", "Ljava/util/ArrayList;", "", "Lkotlin/collections/ArrayList;", "getContext", "()Landroid/content/Context;", "setContext", "addMember", "", "userName", "index", "", "checkIsExists", "", "getItemCount", "getMarginWidth", "onBindViewHolder", "holder", "position", "onCreateViewHolder", "parent", "Landroid/view/ViewGroup;", "plugin-multitalk_release"}, k=1, mv={1, 5, 1}, xi=48)
public final class s
extends RecyclerView.a<t>
{
public ArrayList<String> LwT;
private Context context;
public s(Context paramContext)
{
AppMethodBeat.i(178991);
this.context = paramContext;
this.LwT = new ArrayList();
AppMethodBeat.o(178991);
}
public final boolean aNI(String paramString)
{
AppMethodBeat.i(178987);
kotlin.g.b.s.u(paramString, "userName");
Iterator localIterator = ((Iterable)this.LwT).iterator();
Object localObject;
do
{
if (!localIterator.hasNext()) {
break;
}
localObject = localIterator.next();
} while (!kotlin.g.b.s.p((String)localObject, paramString));
for (paramString = localObject; paramString != null; paramString = null)
{
AppMethodBeat.o(178987);
return true;
}
AppMethodBeat.o(178987);
return false;
}
public final int getItemCount()
{
AppMethodBeat.i(178989);
int i = (int)Math.ceil(this.LwT.size() / e.b.XNz);
AppMethodBeat.o(178989);
return i;
}
public final void gi(String paramString, int paramInt)
{
AppMethodBeat.i(178986);
kotlin.g.b.s.u(paramString, "userName");
if (this.LwT.size() <= paramInt)
{
this.LwT.add(paramString);
AppMethodBeat.o(178986);
return;
}
this.LwT.set(paramInt, paramString);
AppMethodBeat.o(178986);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes3.jar
* Qualified Name: com.tencent.mm.plugin.multitalk.ui.widget.s
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
aef23e7cde9432c631ca871604925bf12de422e5 | ea42eff9b9bf83b1e32b9021dc2472a9b8d8d55f | /jorchestra-core/src/main/java/br/com/jorchestra/controller/JOrchestraWebSocketTemplate.java | fc4fc7f1c353b69f5178eab83339f4caaa2dd464 | [] | no_license | JimSP/jorchestra | f13eff1c46d33efc87630e7ce498228570517857 | c001ae398b042ac5ed66ef1dc0b7aeaccf316b9f | refs/heads/master | 2021-05-14T18:21:55.650759 | 2018-04-21T03:59:06 | 2018-04-21T03:59:06 | 116,070,223 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,861 | java | package br.com.jorchestra.controller;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler;
import com.hazelcast.core.ITopic;
import br.com.jorchestra.canonical.JOrchestraHandle;
import br.com.jorchestra.canonical.JOrchestraStateCall;
import br.com.jorchestra.configuration.JOrchestraConfigurationProperties;
public abstract class JOrchestraWebSocketTemplate extends TextWebSocketHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(JOrchestraWebSocketTemplate.class);
protected final JOrchestraHandle jOrchestraHandle;
protected final Map<String, WebSocketSession> webSocketSessionMap = Collections.synchronizedMap(new HashMap<>());
protected final Map<String, List<String>> jOrchestraSessionMap = Collections.synchronizedMap(new HashMap<>());
protected final ITopic<JOrchestraStateCall> jOrchestraStateCallTopic;
protected final JOrchestraConfigurationProperties jOrchestraConfigurationProperties;
protected JOrchestraWebSocketTemplate(final JOrchestraHandle jOrchestraHandle,
final ITopic<JOrchestraStateCall> jOrchestraStateCallTopic,
final JOrchestraConfigurationProperties jOrchestraConfigurationProperties) {
super();
this.jOrchestraHandle = jOrchestraHandle;
this.jOrchestraStateCallTopic = jOrchestraStateCallTopic;
this.jOrchestraConfigurationProperties = jOrchestraConfigurationProperties;
}
@Override
public boolean supportsPartialMessages() {
return true;
}
@Override
public void afterConnectionEstablished(final WebSocketSession webSocketSession) throws Exception {
final JOrchestraStateCall jOrchestraStateCall = JOrchestraStateCall.createJOrchestraStateCall_OPEN(
jOrchestraConfigurationProperties.getClusterName(), jOrchestraConfigurationProperties.getName(),
webSocketSession.getUri().getPath(), webSocketSession.getId());
LOGGER.debug("m=afterConnectionEstablished, jOrchestraStateCall=" + jOrchestraStateCall);
webSocketSessionMap.put(webSocketSession.getId(), webSocketSession);
jOrchestraSessionMap.put(webSocketSession.getId(), Collections.synchronizedList(new ArrayList<>()));
jOrchestraStateCallTopic.publish(jOrchestraStateCall);
}
@Override
public void handleTextMessage(final WebSocketSession webSocketSession, final TextMessage textMessage)
throws Exception {
final String payload = textMessage.getPayload();
final JOrchestraStateCall jOrchestraStateCallWaiting = JOrchestraStateCall.createJOrchestraStateCall_WAITING(
jOrchestraConfigurationProperties.getClusterName(), jOrchestraConfigurationProperties.getName(),
webSocketSession.getUri().getPath(), webSocketSession.getId(), payload);
LOGGER.debug("m=handleTextMessage, jOrchestraStateCall=" + jOrchestraStateCallWaiting + ", payload="
+ textMessage.getPayload());
jOrchestraSessionMap.get(webSocketSession.getId()).add(jOrchestraStateCallWaiting.getId());
jOrchestraStateCallTopic.publish(jOrchestraStateCallWaiting);
onMessage(webSocketSession, textMessage, jOrchestraStateCallWaiting);
}
@Override
public void afterConnectionClosed(final WebSocketSession webSocketSession, final CloseStatus closeStatus)
throws Exception {
final JOrchestraStateCall jOrchestraStateCallClose = JOrchestraStateCall.createJOrchestraStateCall_CLOSE(
jOrchestraConfigurationProperties.getClusterName(), jOrchestraConfigurationProperties.getName(),
webSocketSession.getUri().getPath(), webSocketSession.getId());
LOGGER.debug("m=afterConnectionClosed, jOrchestraStateCall=" + jOrchestraStateCallClose + ", closeStatus="
+ closeStatus);
jOrchestraSessionMap.get(webSocketSession.getId()).clear();
jOrchestraSessionMap.remove(webSocketSession.getId());
webSocketSessionMap.remove(webSocketSession.getId());
jOrchestraStateCallTopic.publish(jOrchestraStateCallClose);
}
@Override
public void handleTransportError(final WebSocketSession webSocketSession, final Throwable e) throws Exception {
final JOrchestraStateCall jOrchestraStateCall = JOrchestraStateCall.createJOrchestraStateCall_ERROR(
webSocketSession.getId(), jOrchestraConfigurationProperties.getClusterName(),
jOrchestraConfigurationProperties.getName(), webSocketSession.getUri().getPath());
LOGGER.error("m=handleTransportError, jOrchestraStateCall=" + jOrchestraStateCall, e);
jOrchestraStateCallTopic.publish(jOrchestraStateCall);
}
protected void onMessage(final WebSocketSession webSocketSession, final TextMessage textMessage,
final JOrchestraStateCall jOrchestraStateCallWaiting) throws Exception {
}
}
| [
"alexandre.msl@gmail.com"
] | alexandre.msl@gmail.com |
3f1533136789e6d1bc77a12ef5c6929e60c5e0ee | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_1/src/b/i/d/c/Calc_1_1_18326.java | 9ad048981f7ab7b0c35f77884cca639170b9db7d | [] | 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.i.d.c;
public class Calc_1_1_18326 {
/** @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 |
1283623fb72764c20e4535e449a171f5df1d120f | fc4701591408d5f1b059931c052fcab1b0a3c855 | /3.JavaMultithreading/src/com/javarush/task/task22/task2207/Solution.java | a4c09c942c6ce534a56038563fda18bfbf357163 | [] | no_license | VictorLeonidovich/JavaRushCourses_professionalLevel | 483779d9d8f40c1f32023deb146cceda676494d2 | b2685930ffac81499129a935dbcfb0ecf37321ce | refs/heads/master | 2021-08-19T08:16:02.643180 | 2017-11-25T12:05:57 | 2017-11-25T12:05:57 | 84,752,119 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,108 | java | package com.javarush.task.task22.task2207;
import java.io.*;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
/*
Обращенные слова
В методе main с консоли считать имя файла, который содержит слова, разделенные пробелами.
Найти в тексте все пары слов, которые являются обращением друг друга. Добавить их в result.
Использовать StringBuilder.
Пример содержимого файла
рот тор торт о
о тот тот тот
Вывод:
рот тор
о о
тот тот
Требования:
1. Метод main должен считывать имя файла с клавиатуры.
2. В методе main должен быть использован StringBuilder
3. Список result должен быть заполнен корректными парами согласно условию задачи.
4. В классе Solution должен содержаться вложенный класс Pair.
5. В классе Pair должен быть объявлен конструктор без параметров (или конструктор по умолчанию).
*/
public class Solution {
public static List<Pair> result = new LinkedList<>();
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
BufferedReader reader1 = new BufferedReader(new FileReader(reader.readLine()));
//Scanner scanner = new Scanner(new File(reader.readLine()));
String line;
StringBuilder stringBuilder = new StringBuilder();
while((line = reader1.readLine()) != null){
stringBuilder.append(line).append(" ");
}
reader1.close();
reader.close();
//System.out.println(stringBuilder.toString());
String[] splittedLine = stringBuilder.toString().trim().split(" ");
for (int i = 0; i < splittedLine.length - 1; i++) {
for (int j = i + 1; j < splittedLine.length; j++) {
String splittedLineReverse = new StringBuilder(splittedLine[j]).reverse().toString();
//System.out.println(splittedLine[i] + " -- " + splittedLineReverse);
if (splittedLine[i].equals(splittedLineReverse)) {
Pair pair = new Pair();
pair.first = splittedLine[i];
pair.second = splittedLine[j];
int count = 0;
for (Pair rez : result){
if (pair.equals(rez)){count = 1;}
}
if (count == 0){result.add(pair);}
//System.out.println("add: " + pair);
}
}
}
for (Pair rez : result){
System.out.println(rez.first + " " + rez.second);
}
}
public static class Pair {
String first;
String second;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Pair pair = (Pair) o;
if (first != null ? !first.equals(pair.first) : pair.first != null) return false;
return second != null ? second.equals(pair.second) : pair.second == null;
}
@Override
public int hashCode() {
int result = first != null ? first.hashCode() : 0;
result = 31 * result + (second != null ? second.hashCode() : 0);
return result;
}
@Override
public String toString() {
return first == null && second == null ? "" :
first == null && second != null ? second :
second == null && first != null ? first :
first.compareTo(second) < 0 ? first + " " + second : second + " " + first;
}
}
}
| [
"k-v-l@tut.by"
] | k-v-l@tut.by |
35861acf1e11a61dcd9460eeb57bfe4d94b0e8f7 | e24c6c940689c19fdcc2e39dd80a5061e0b0b326 | /org.eclipse.emf.refactor.metrics.uml24.compositional/src/org/eclipse/emf/refactor/metrics/uml24/umlcl/NAI.java | 4d40a109d2aa7566ae1935c4941ed78e61a79c77 | [] | no_license | ambrusthomas/MeDeR.refactor.examples | 63cf443045be9907d237d543db3df93e93175752 | 66a35d6f9b2924f7c1172c0fff857badd0e41b8e | refs/heads/master | 2021-01-22T19:09:18.404936 | 2017-03-29T16:24:23 | 2017-03-29T16:24:23 | 85,169,831 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,215 | java | package org.eclipse.emf.refactor.metrics.uml24.umlcl;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.refactor.metrics.core.Metric;
import org.eclipse.emf.refactor.metrics.interfaces.IMetricCalculator;
import org.eclipse.emf.refactor.metrics.interfaces.IOperation;
import org.eclipse.emf.refactor.metrics.operations.Operations;
public class NAI implements IMetricCalculator {
private List<EObject> context;
private String metricID1 = "org.eclipse.emf.refactor.metrics.uml24.npubac";
private String metricID2 = "org.eclipse.emf.refactor.metrics.uml24.nproac";
IOperation operation = Operations.getOperation("Sum");
@Override
public void setContext(List<EObject> context) {
this.context = context;
}
@Override
public double calculate() {
Metric metric1 = Metric.getMetricInstanceFromId(metricID1);
Metric metric2 = Metric.getMetricInstanceFromId(metricID2);
IMetricCalculator calc1 = metric1.getCalculateClass();
IMetricCalculator calc2 = metric2.getCalculateClass();
calc1.setContext(this.context);
calc2.setContext(this.context);
return operation.calculate(calc1.calculate(),calc2.calculate());
}
}
| [
"tarendt"
] | tarendt |
2e450639e68f1d32e11a4f848c46a20b266b0873 | f2a0945afad3f4b8e014c54a8b00435e9d944e0a | /src/main/java/tfar/reciperandomizer/mixin/RecipeManagerMixin.java | d9d8ef42b644b40232e92dacf262228ec3934d41 | [
"Unlicense"
] | permissive | Tfarcenim/RecipeRandomizers | a1e086f9530830573abde99b137a923707a2452c | 3026bd157ee1e556a88511e8d4a14c8b380b6682 | refs/heads/master | 2021-06-30T23:35:32.878533 | 2021-06-11T21:39:40 | 2021-06-11T21:39:40 | 241,726,630 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,057 | java | package tfar.reciperandomizer.mixin;
import com.google.gson.JsonObject;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.IRecipeType;
import net.minecraft.item.crafting.RecipeManager;
import net.minecraft.profiler.IProfiler;
import net.minecraft.resources.IResourceManager;
import net.minecraft.util.ResourceLocation;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import tfar.reciperandomizer.MixinHooks;
import java.util.Map;
@Mixin(RecipeManager.class)
public class RecipeManagerMixin {
@Shadow private Map<IRecipeType<?>, Map<ResourceLocation, IRecipe<?>>> recipes;
@Inject(method = "apply",at = @At("RETURN"))
public void scrambleRecipes(Map<ResourceLocation, JsonObject> splashList, IResourceManager resourceManagerIn, IProfiler profilerIn, CallbackInfo ci){
recipes = MixinHooks.scramble(recipes);
}
}
| [
"44327798+Gimpler@users.noreply.github.com"
] | 44327798+Gimpler@users.noreply.github.com |
4e89e02d3b05ca1b78dfa9da15581337a5246537 | 3a59bd4f3c7841a60444bb5af6c859dd2fe7b355 | /sources/com/google/android/gms/internal/ads/zzbvm.java | 6a2a80100e2dbb7a03fc3e73cfbf266b04c70a00 | [] | no_license | sengeiou/KnowAndGo-android-thunkable | 65ac6882af9b52aac4f5a4999e095eaae4da3c7f | 39e809d0bbbe9a743253bed99b8209679ad449c9 | refs/heads/master | 2023-01-01T02:20:01.680570 | 2020-10-22T04:35:27 | 2020-10-22T04:35:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 251 | java | package com.google.android.gms.internal.ads;
final /* synthetic */ class zzbvm implements zzbtu {
static final zzbtu zzfka = new zzbvm();
private zzbvm() {
}
public final void zzr(Object obj) {
((zzahy) obj).zzrr();
}
}
| [
"joshuahj.tsao@gmail.com"
] | joshuahj.tsao@gmail.com |
af3ab39b5fc8853080e8032c3202db0da4132fc5 | 9562a756ee1602ed13e43b2f471002ea0a6d6955 | /pdf-kit/src/test/java/pdf/kit/QAOption.java | f93f9d42d116cd93d02261bc50cdccf7c142cbda | [] | no_license | iezhuhx/unit | fefc800dafa287b93a4d49b179237ae272f0e1d2 | f3ae4bc3db6e754aa0777297c06e2aea4ac44666 | refs/heads/master | 2022-07-05T04:19:07.844193 | 2019-11-29T02:19:31 | 2019-11-29T02:19:31 | 161,440,080 | 0 | 0 | null | 2022-06-30T20:21:14 | 2018-12-12T06:00:31 | HTML | UTF-8 | Java | false | false | 519 | java | package pdf.kit;
import pdf.kit.util.RandomUtils;
public class QAOption {
String idx;// A B C D
String desc;// 选项描述
public String getIdx() {
return idx;
}
public void setIdx(String idx) {
this.idx = idx;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public QAOption getOption() throws Exception{
QAOption opt = new QAOption();
opt.setDesc(RandomUtils.createWord());
//opt.setIdx(RandomUtils.getNum(1, 4));
return opt;
}
}
| [
"zzuchenyb@sina.com"
] | zzuchenyb@sina.com |
3946717eb2e2eaf361ccc1c09b3cc6b2b84368c3 | 3f1135c7d8c6527686af82720e32569879700397 | /src/java/growthcraft/bees/common/block/BlockBeeBoxJurassicraft.java | 61c87037219dd8100137df9c20b410383ccd3b8e | [
"MIT"
] | permissive | Um-Mitternacht/George-Washington-Carver-1.7 | 74b1f01f2c31b20368ec941f4691bd1fbd3fc535 | 3ec0329c82770361245b455a95bbb4730ff1d8fb | refs/heads/1.10.2 | 2020-05-30T11:27:33.605639 | 2017-02-26T00:33:55 | 2017-02-26T00:33:55 | 63,481,645 | 1 | 3 | null | 2017-02-17T17:57:03 | 2016-07-16T12:19:32 | Java | UTF-8 | Java | false | false | 2,508 | java | /*
* The MIT License (MIT)
*
* Copyright (c) 2016 IceDragon200
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package growthcraft.bees.common.block;
import growthcraft.core.integration.jc.EnumJCWoodType;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
public class BlockBeeBoxJurassicraft extends BlockBeeBox {
public BlockBeeBoxJurassicraft() {
super();
setHardness(2f);
setUnlocalizedName("grc.BeeBox.Jurassicraft");
}
@Override
public String getMetaname(int meta) {
if (meta >= 0 && meta < EnumJCWoodType.VALUES.length) {
return EnumJCWoodType.VALUES[meta].name;
}
return super.getMetaname(meta);
}
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings({"rawtypes", "unchecked"})
public void getSubBlocks(Item block, CreativeTabs tab, List list) {
for (int i = 0; i < EnumJCWoodType.VALUES.length; ++i) {
list.add(new ItemStack(block, 1, i));
}
}
//@Override
//@SideOnly(Side.CLIENT)
//
//{
// this.icons = new IIcon[4 * EnumBopWoodType.VALUES.length];
// for (EnumBopWoodType type : EnumBopWoodType.VALUES)
// {
// registerBeeBoxIcons(reg, String.format("/biomesoplenty/%s/", type.name), type.meta);
// }
//}
}
| [
"eyespot7b@aol.com"
] | eyespot7b@aol.com |
bc34313c8ea1de045dc3ce336085b40266100738 | 8a3371bdc4f4eadcc35f38e5fe84b6e7e4b5c02a | /src/main/java/com/reforgedsrc/app/vue2demo/boot/data/entity/User.java | 0bc75bc5aa9b3ae9b6ce92c074e392c3dc234012 | [] | no_license | skymarlio82/vue2-app-boot | 34c0504ad2c54da4c0acc8dea2cf98b9000d5884 | c6b96c1aac07d55e5fc5f3ef0a5a04bc78b61cdf | refs/heads/master | 2020-09-06T15:28:42.437927 | 2020-08-28T09:45:39 | 2020-08-28T09:45:39 | 204,591,719 | 1 | 0 | null | 2019-10-29T18:47:32 | 2019-08-27T01:17:36 | Java | UTF-8 | Java | false | false | 449 | java |
package com.reforgedsrc.app.vue2demo.boot.data.entity;
import java.util.Date;
import java.util.List;
import lombok.Data;
@Data
public class User {
private Long id = 0L;
private String username = null;
private String password = null;
private Boolean enabled = false;
private Date lastPasswordResetDate = null;
private List<Authority> authorities = null;
private String menu = null;
public User() {
}
} | [
"jitao.liu82@gmail.com"
] | jitao.liu82@gmail.com |
e9252ca261e6ba35f0aef5541bf882b8a80dbedb | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a016/A016820Test.java | 8501f9aecb6af2e4a0c40f79ef934cfd20cf9f79 | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package irvine.oeis.a016;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A016820Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
efe67fba4efa1e4c27640ceb6e6305264a089f7c | a05e1a01a49a59129cdd71c1fe843c910a35ed8c | /aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/transform/ListIdentitiesResultJsonUnmarshaller.java | 806711da28039646d37d9d66056ef4ca1544d3bc | [
"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 | 3,241 | 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.cognitoidentity.model.transform;
import java.util.Map;
import java.util.Map.Entry;
import com.amazonaws.services.cognitoidentity.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* List Identities Result JSON Unmarshaller
*/
public class ListIdentitiesResultJsonUnmarshaller implements Unmarshaller<ListIdentitiesResult, JsonUnmarshallerContext> {
public ListIdentitiesResult unmarshall(JsonUnmarshallerContext context) throws Exception {
ListIdentitiesResult listIdentitiesResult = new ListIdentitiesResult();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.getCurrentToken();
if (token == null) token = context.nextToken();
if (token == VALUE_NULL) return null;
while (true) {
if (token == null) break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("IdentityPoolId", targetDepth)) {
context.nextToken();
listIdentitiesResult.setIdentityPoolId(StringJsonUnmarshaller.getInstance().unmarshall(context));
}
if (context.testExpression("Identities", targetDepth)) {
context.nextToken();
listIdentitiesResult.setIdentities(new ListUnmarshaller<IdentityDescription>(IdentityDescriptionJsonUnmarshaller.getInstance()).unmarshall(context));
}
if (context.testExpression("NextToken", targetDepth)) {
context.nextToken();
listIdentitiesResult.setNextToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth) break;
}
}
token = context.nextToken();
}
return listIdentitiesResult;
}
private static ListIdentitiesResultJsonUnmarshaller instance;
public static ListIdentitiesResultJsonUnmarshaller getInstance() {
if (instance == null) instance = new ListIdentitiesResultJsonUnmarshaller();
return instance;
}
}
| [
"aws@amazon.com"
] | aws@amazon.com |
f3bf209f1ccb6184d675f00f117478557faba21c | b439339c951bcb35f314c05295cf7850ad2a753b | /dlfc-contract-datacenter/src/main/java/com/dlfc/contract/mapper/ConHouseUserLogMapper.java | 8d339e571affdc7a477f2f7a333f3a9ec95ac276 | [] | no_license | iversonwuwei/zfgj-wechat-datacenter | 1096f0aee5e55c34cb231fbe5e9c8bd6c5a545bf | a2e325043bf6f80ffd5fe11d5172b7759831aad5 | refs/heads/master | 2021-01-25T09:31:47.912861 | 2017-06-09T05:28:22 | 2017-06-09T05:28:22 | 93,844,847 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 243 | java | package com.dlfc.contract.mapper;
import com.dlfc.contract.entity.ConHouseUserLog;
import com.dlfc.contract.entity.ConHouseUserLogExample;
public interface ConHouseUserLogMapper extends DataMapper<ConHouseUserLog, ConHouseUserLogExample> {
} | [
"123456789"
] | 123456789 |
899ed69b222aff61911cb600d7f598c1b527024b | fa32414cd8cb03a7dc3ef7d85242ee7914a2f45f | /app/src/main/java/com/google/android/gms/tagmanager/zzk.java | 2bd7528eb68d905a5d7bf685f063aa951658214d | [] | no_license | SeniorZhai/Mob | 75c594488c4ce815a1f432eb4deacb8e6f697afe | cac498f0b95d7ec6b8da1275b49728578b64ef01 | refs/heads/master | 2016-08-12T12:49:57.527237 | 2016-03-10T06:57:09 | 2016-03-10T06:57:09 | 53,562,752 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,291 | java | package com.google.android.gms.tagmanager;
import com.helpshift.res.values.HSConsts;
import io.fabric.sdk.android.services.settings.SettingsJsonConstants;
class zzk {
public static byte[] zzee(String str) {
int length = str.length();
if (length % 2 != 0) {
throw new IllegalArgumentException("purported base16 string has odd number of characters");
}
byte[] bArr = new byte[(length / 2)];
for (int i = 0; i < length; i += 2) {
int digit = Character.digit(str.charAt(i), 16);
int digit2 = Character.digit(str.charAt(i + 1), 16);
if (digit == -1 || digit2 == -1) {
throw new IllegalArgumentException("purported base16 string has illegal char");
}
bArr[i / 2] = (byte) ((digit << 4) + digit2);
}
return bArr;
}
public static String zzi(byte[] bArr) {
StringBuilder stringBuilder = new StringBuilder();
for (byte b : bArr) {
if ((b & 240) == 0) {
stringBuilder.append(HSConsts.STATUS_NEW);
}
stringBuilder.append(Integer.toHexString(b & SettingsJsonConstants.SETTINGS_IDENTIFIER_MASK_DEFAULT));
}
return stringBuilder.toString().toUpperCase();
}
}
| [
"370985116@qq.com"
] | 370985116@qq.com |
05efb2844fb054ca1868647d23a36dd4a0602573 | bfce795e0247940f7aba55b3f4a2676444c87da3 | /guido-agent-oss/src/main/java/oss/guido/ch/qos/logback/core/property/FileExistsPropertyDefiner.java | 357857342dcd239d575c4b92770cad8316b30683 | [] | no_license | ManuelPivotal/guido | 3de7c08046075a99a7f115df2f5cd4ff63fc1392 | 094af774f2881bc798653143c5d19941493b53c9 | refs/heads/master | 2021-01-12T17:51:33.572529 | 2016-11-25T16:37:39 | 2016-11-25T16:37:39 | 71,653,381 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,730 | java | /**
* Logback: the reliable, generic, fast and flexible logging framework.
* Copyright (C) 1999-2015, QOS.ch. All rights reserved.
*
* This program and the accompanying materials are dual-licensed under
* either the terms of the Eclipse Public License v1.0 as published by
* the Eclipse Foundation
*
* or (per the licensee's choosing)
*
* under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation.
*/
package oss.guido.ch.qos.logback.core.property;
import java.io.File;
import oss.guido.ch.qos.logback.core.PropertyDefinerBase;
import oss.guido.ch.qos.logback.core.util.OptionHelper;
/**
* In conjunction with {@link oss.guido.ch.qos.logback.core.joran.action.PropertyAction} sets
* the named variable to "true" if the file specified by {@link #setPath(String) path}
* property exists, to "false" otherwise.
*
* @see #getPropertyValue()
*
* @author Ceki Gücü
*/
public class FileExistsPropertyDefiner extends PropertyDefinerBase {
String path;
public String getPath() {
return path;
}
/**
* The path for the file to search for.
*
* @param path
*/
public void setPath(String path) {
this.path = path;
}
/**
* Returns "true" if the file specified by {@link #setPath(String) path} property exists.
* Returns "false" otherwise.
*
* @return "true"|"false" depending on the existence of file
*/
public String getPropertyValue() {
if (OptionHelper.isEmpty(path)) {
addError("The \"path\" property must be set.");
return null;
}
File file = new File(path);
return booleanAsStr(file.exists());
}
}
| [
"mmeyer@pivotal.io"
] | mmeyer@pivotal.io |
ebbe8b4b70d221e28e03e420472c2a102de0b882 | eaea3fa01f88ab8781681e8b123be97f3e1631f6 | /src/main/java/taskman/TaskManApp.java | 3258f6a763ed043cd0c21b99ec62095648268546 | [] | no_license | shekhargulati/taskman | 378513322a3c13d4de3237fd005c600154bc92d2 | 3af2f71b4996618e8a5b4c322b251baea95061c5 | refs/heads/master | 2021-01-13T08:50:40.523489 | 2016-10-06T16:12:31 | 2016-10-06T16:12:31 | 70,170,559 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 297 | java | package taskman;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class TaskManApp {
public static void main(String[] args) {
SpringApplication.run(TaskManApp.class, args);
}
}
| [
"shekhargulati84@gmail.com"
] | shekhargulati84@gmail.com |
dddc51c3f4c9fd6381c867a9320e0330f139c08f | 49e5d267c2306f9dc88836800cd87f6bfd7461a6 | /univocity-trader-core/src/main/java/com/univocity/trader/utils/IncomingCandles.java | 60d017f1ec389f08d1e6fb3f6bd7bf7506d72a7b | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | drkarl/univocity-trader | a6e6d9ec9fa56dad70fa2628e2b0bc48ad5198c4 | 26ccc0bd0b7024222ffa0ead2ea17c97a9c2c550 | refs/heads/master | 2023-03-13T12:24:30.944578 | 2021-03-10T00:03:16 | 2021-03-10T00:03:16 | 340,787,115 | 0 | 0 | Apache-2.0 | 2021-03-09T23:42:56 | 2021-02-21T00:52:25 | Java | UTF-8 | Java | false | false | 3,741 | java | package com.univocity.trader.utils;
import org.slf4j.*;
import java.util.*;
import java.util.concurrent.*;
/**
* A simple enumeration that receives candles from the exchange, which might come as a stream, and adds them to an
* internal queue. The consumer of the enumeration will block if the queue becomes empty and the exchange is still
* producing candles. The last call to {@link #nextElement()} might produce a {@code null} if the consumer
* was blocked waiting for more candles, and the exchange finished adding candles to this internal queue.
*
* The {@link #iterator()} of this class ensures no {@code null} is produced so this can be used in for loops.
*
* If the consumer of candles returned by the exchange needs to stop processing them for some reason,
* call {@link #stopConsuming()}.
*
* By default, after 30 seconds with an empty queue and without receiving anything since,
* {@link #stopConsuming()} will be invoked automatically and abort the process. The {@link com.univocity.trader.Exchange}
* implementation can check if {@link #consumerStopped()} produces {@code true} to close any open resources instead
* of running indefinitely.
*
* @author uniVocity Software Pty Ltd - <a href="mailto:dev@univocity.com">dev@univocity.com</a>
*/
public class IncomingCandles<T> implements Enumeration<T>, Iterable<T> {
private static final Logger log = LoggerFactory.getLogger(IncomingCandles.class);
private final Queue<T> input = new ConcurrentLinkedQueue<>();
private final Object lock = new Object();
private boolean noMoreCandles = false;
private boolean consuming = true;
private final long timeout;
public IncomingCandles() {
this(30_000);
}
public IncomingCandles(long timeout) {
this.timeout = timeout;
}
public void stopProducing() {
noMoreCandles = true;
notifyNotEmpty();
}
public final void stopConsuming() {
consuming = false;
notifyNotEmpty();
}
public final boolean consumerStopped() {
return !consuming;
}
public void add(T candle) {
if (consuming) {
input.offer(candle);
notifyNotEmpty();
} else {
log.warn("Consumer stopped. Rejected incoming candle {}", candle);
}
}
@Override
public final boolean hasMoreElements() {
return consuming && (!noMoreCandles || !input.isEmpty());
}
@Override
public final T nextElement() {
T out = input.poll();
while (out == null && consuming && !noMoreCandles) {
waitWhileEmpty();
out = input.poll();
}
return out;
}
private void notifyNotEmpty() {
synchronized (lock) {
lock.notifyAll();
}
}
private void waitWhileEmpty() {
long waitStart = System.currentTimeMillis();
while (consuming && input.isEmpty() && !noMoreCandles) {
synchronized (lock) {
try {
lock.wait(500);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
if (input.isEmpty() && System.currentTimeMillis() - waitStart >= timeout) {
log.warn("Timeout waiting for candles to be returned from the exchange");
stopConsuming();
}
}
}
@Override
public final Iterator<T> iterator() {
return new Iterator<>() {
T next;
@Override
public final boolean hasNext() {
if (next == null) {
next = nextElement();
}
return next != null;
}
@Override
public final T next() {
if (next == null) {
throw new IllegalStateException("Can't invoke next() without checking if there are more elements with hasNext()");
}
T out = next;
next = null;
return out;
}
};
}
public static <C> IncomingCandles<C> fromCollection(Collection<C> candles) {
IncomingCandles out = new IncomingCandles();
out.input.addAll(candles);
out.stopProducing();
return (IncomingCandles<C>) out;
}
}
| [
"jbax@univocity.com"
] | jbax@univocity.com |
ba646afb1864d8afb71b0bc276685214fcc54f4c | da181f89e0b26ffb3fc5f9670a3a5f8f1ccf0884 | /CoreGestionTextilLevel/src/ar/com/textillevel/entidades/documentos/factura/itemfactura/ItemFacturaRecargo.java | 9102d5a67eba2415da16f024f6a7f0f178ea6f65 | [] | no_license | nacho270/GTL | a1b14b5c95f14ee758e6b458de28eae3890c60e1 | 7909ed10fb14e24b1536e433546399afb9891467 | refs/heads/master | 2021-01-23T15:04:13.971161 | 2020-09-18T00:58:24 | 2020-09-18T00:58:24 | 34,962,369 | 2 | 1 | null | 2016-08-22T22:12:57 | 2015-05-02T20:31:49 | Java | UTF-8 | Java | false | false | 532 | java | package ar.com.textillevel.entidades.documentos.factura.itemfactura;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Transient;
import ar.com.textillevel.entidades.enums.ETipoItemFactura;
@Entity
@DiscriminatorValue(value="ITR")
public class ItemFacturaRecargo extends ItemFactura{
private static final long serialVersionUID = -9213799408568357101L;
@Override
@Transient
public ETipoItemFactura getTipo() {
return ETipoItemFactura.RECARGO;
}
}
| [
"ignaciocicero@gmail.com@9de48aec-ec99-11dd-b2d9-215335d0b316"
] | ignaciocicero@gmail.com@9de48aec-ec99-11dd-b2d9-215335d0b316 |
d0ad896c20400c9c5bbb4ea236b2bb1650bd6592 | 8824eca5f1219697c13af33be464e58db236dac7 | /workspace/2021_02_14/src/ラムダ式黒本9_23/Main.java | c7739280c18eb8166a16b5b3bb9b5650891e4dc8 | [] | no_license | KudoYumi/test | 774d019e6c38c28627823be7f3d5e404199f6315 | 3cb03a25ad5f591b5f832618468259922a5e4d5e | refs/heads/main | 2023-04-02T04:41:42.467743 | 2021-03-29T15:08:21 | 2021-03-29T15:08:21 | 319,495,604 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 486 | java | package ラムダ式黒本9_23;
public class Main {
static String val = "A";
String name;
public static void main(String[] args) {
Function f2 = val -> System.out.println(val);
System.out.println(val);
Function f = (String val) -> System.out.println(val);
f.test(val);
System.out.println(val);
// new Main().call();
}
public void call() {
Function f2 = val -> System.out.println(val);
f2.test(name);
}
/* つまりローカル変数の名kで
*
*/
}
| [
"lady30romance1986@gmail.com"
] | lady30romance1986@gmail.com |
1b857c65c4075a69b380bae2d74b9c2d37781e9f | 30472cec0dbe044d52b029530051ab404701687f | /src/main/java/com/nawforce/platform/ConnectApi/ActionLinkGroupDefinition.java | 86df38198faebdcf61b7d7c2c1cd7ea4e1be74cc | [
"BSD-3-Clause"
] | permissive | madmax983/ApexLink | f8e9dcf8f697ed4e34ddcac353c13bec707f3670 | 30c989ce2c0098097bfaf586b87b733853913155 | refs/heads/master | 2020-05-07T16:03:15.046972 | 2019-04-08T21:08:06 | 2019-04-08T21:08:06 | 180,655,963 | 1 | 0 | null | 2019-04-10T20:08:30 | 2019-04-10T20:08:30 | null | UTF-8 | Java | false | false | 2,517 | java | /*
[The "BSD licence"]
Copyright (c) 2019 Kevin Jones
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.nawforce.platform.ConnectApi;
import com.nawforce.platform.System.Boolean;
import com.nawforce.platform.System.Double;
import com.nawforce.platform.System.Integer;
import com.nawforce.platform.System.String;
import com.nawforce.platform.System.*;
@SuppressWarnings("unused")
public class ActionLinkGroupDefinition {
public List<ActionLinkDefinition> actionLinks;
public PlatformActionGroupCategory category;
public Datetime createdDate;
public ActionLinkExecutionsAllowed executionsAllowed;
public Datetime expirationDate;
public String id;
public Datetime modifiedDate;
public String templateId;
public String url;
public ActionLinkGroupDefinition() {throw new java.lang.UnsupportedOperationException();}
public Boolean equals$(Object obj) {throw new java.lang.UnsupportedOperationException();}
public Double getBuildVersion() {throw new java.lang.UnsupportedOperationException();}
public Integer hashCode$() {throw new java.lang.UnsupportedOperationException();}
public String toString$() {throw new java.lang.UnsupportedOperationException();}
}
| [
"nawforce@gmail.com"
] | nawforce@gmail.com |
049d98abf5aaac1c55d145c38e4c508b72718cf6 | 21817427bd42bee333e4b43adb406b648cb96e70 | /S13-kotlin/CL02-ConvertirJavaKotlin/app/src/androidTest/java/com/androidavanzado/myapplication/ExampleInstrumentedTest.java | 7c26f6ace951901d94d85f041f2d78487fe42305 | [] | no_license | juansebastian2426/androidapp | 59f8698e4906ad41478fee2613d7e9ad0798d019 | 79bb5b8797fef61631972cf3b822ae5e1e5f43e1 | refs/heads/master | 2021-05-18T13:37:15.369731 | 2020-03-23T12:29:53 | 2020-03-23T12:29:53 | 251,265,643 | 1 | 0 | null | 2020-03-30T09:57:56 | 2020-03-30T09:57:55 | null | UTF-8 | Java | false | false | 750 | java | package com.androidavanzado.myapplication;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.androidavanzado.myapplication", appContext.getPackageName());
}
}
| [
"camposmiguel@gmail.com"
] | camposmiguel@gmail.com |
8b14d36c89781b1d8504964362e34a90e99217bb | e81b1d1742a811d48f1b2bb0a3fa6c6bbdbde820 | /dynatrace/src/main/java/de/tsystems/mms/apm/performancesignature/dynatrace/PerfSigStartRecording.java | 55bfd266879516bcd14f07f66cdce9600639b7e6 | [
"Apache-2.0"
] | permissive | kleopatra999/performance-signature-dynatrace-plugin | 08a35282c8e4bf26b8e2bbf04fbfc73ce244269d | 94cf5b442f41e0ede3b756d06a9f05133645e459 | refs/heads/master | 2021-01-14T12:40:44.366322 | 2016-09-02T07:56:48 | 2016-09-02T07:56:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,943 | java | /*
* Copyright (c) 2014 T-Systems Multimedia Solutions GmbH
*
* 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 de.tsystems.mms.apm.performancesignature.dynatrace;
import de.tsystems.mms.apm.performancesignature.dynatrace.configuration.CredProfilePair;
import de.tsystems.mms.apm.performancesignature.dynatrace.configuration.DynatraceServerConfiguration;
import de.tsystems.mms.apm.performancesignature.dynatrace.configuration.GenericTestCase;
import de.tsystems.mms.apm.performancesignature.dynatrace.rest.CommandExecutionException;
import de.tsystems.mms.apm.performancesignature.dynatrace.rest.DTServerConnection;
import de.tsystems.mms.apm.performancesignature.dynatrace.rest.RESTErrorException;
import de.tsystems.mms.apm.performancesignature.dynatrace.rest.model.BaseConfiguration;
import de.tsystems.mms.apm.performancesignature.dynatrace.rest.model.SystemProfile;
import de.tsystems.mms.apm.performancesignature.util.PerfSigUtils;
import hudson.AbortException;
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.model.AbstractProject;
import hudson.model.Failure;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Builder;
import hudson.util.FormValidation;
import hudson.util.ListBoxModel;
import jenkins.model.Jenkins;
import jenkins.tasks.SimpleBuildStep;
import org.apache.commons.lang.StringUtils;
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.QueryParameter;
import javax.annotation.Nonnull;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Date;
public class PerfSigStartRecording extends Builder implements SimpleBuildStep {
private final String dynatraceProfile, testCase;
private String recordingOption;
private boolean lockSession;
@DataBoundConstructor
public PerfSigStartRecording(final String dynatraceProfile, final String testCase) {
this.dynatraceProfile = dynatraceProfile;
this.testCase = StringUtils.deleteWhitespace(testCase);
}
@Override
public void perform(@Nonnull final Run<?, ?> run, @Nonnull final FilePath workspace, @Nonnull final Launcher launcher, @Nonnull final TaskListener listener)
throws InterruptedException, IOException {
final PrintStream logger = listener.getLogger();
DynatraceServerConfiguration serverConfiguration = PerfSigUtils.getServerConfiguration(dynatraceProfile);
if (serverConfiguration == null)
throw new AbortException("failed to lookup Dynatrace server configuration");
CredProfilePair pair = serverConfiguration.getCredProfilePair(dynatraceProfile);
if (pair == null)
throw new AbortException("failed to lookup Dynatrace server profile");
logger.println("starting session recording ...");
final DTServerConnection connection = new DTServerConnection(serverConfiguration, pair);
if (!connection.validateConnection()) {
throw new RESTErrorException(Messages.PerfSigRecorder_DTConnectionError());
}
final String testCase = run.getEnvironment(listener).expand(this.testCase);
String sessionName = pair.getProfile() + "_" + run.getParent().getName() + "_Build-" + run.getNumber() + "_" + testCase;
sessionName = sessionName.replace("/", "_");
for (BaseConfiguration profile : connection.getSystemProfiles()) {
SystemProfile systemProfile = (SystemProfile) profile;
if (pair.getProfile().equals(systemProfile.getId()) && systemProfile.isRecording()) {
logger.println("another session is still recording, trying to stop recording");
PerfSigStopRecording stopRecording = new PerfSigStopRecording(dynatraceProfile);
stopRecording.perform(run, workspace, launcher, listener);
break;
}
}
String result = null;
Date timeframeStart = null;
try {
result = connection.startRecording(sessionName, "This session is triggered by Jenkins", getRecordingOption(), lockSession, false);
} catch (CommandExecutionException e) {
if (e.getMessage().contains("continuous")) {
timeframeStart = new Date();
} else throw e;
}
if ((result != null && result.contains(sessionName)) || timeframeStart != null) {
logger.println(String.format(Messages.PerfSigStartRecording_StartedSessionRecording(), pair.getProfile(), sessionName));
} else {
throw new RESTErrorException(String.format(Messages.PerfSigStartRecording_SessionRecordingError(), pair.getProfile()));
}
logger.println("registering new TestRun");
String testRunId = connection.registerTestRun(run.getNumber());
if (testRunId != null) {
logger.println(String.format(Messages.PerfSigStartRecording_StartedTestRun(), pair.getProfile(), testRunId));
logger.println("Dynatrace: registered test run " + testRunId + "" +
" (available as environment variables " + PerfSigEnvContributor.TESTRUN_ID_KEY +
" and " + PerfSigEnvContributor.SESSIONCOUNT + ")");
} else {
logger.println("warning: could not register TestRun");
}
run.addAction(new PerfSigEnvInvisAction(result, timeframeStart, testCase, testRunId));
}
public String getTestCase() {
return testCase;
}
public String getRecordingOption() {
return recordingOption == null ? DescriptorImpl.defaultRecordingOption : recordingOption;
}
@DataBoundSetter
public void setRecordingOption(final String recordingOption) {
this.recordingOption = recordingOption;
}
public boolean isLockSession() {
return lockSession;
}
@DataBoundSetter
public void setLockSession(final boolean lockSession) {
this.lockSession = lockSession;
}
public String getDynatraceProfile() {
return dynatraceProfile;
}
@Symbol("startSession")
@Extension
public static final class DescriptorImpl extends BuildStepDescriptor<Builder> {
public static final boolean defaultLockSession = false;
public static final String defaultRecordingOption = "all";
public ListBoxModel doFillRecordingOptionItems() {
return new ListBoxModel(new ListBoxModel.Option("all"), new ListBoxModel.Option("violations"), new ListBoxModel.Option("timeseries"));
}
public FormValidation doCheckTestCase(@QueryParameter final String testCase) {
try {
Jenkins.checkGoodName(testCase);
GenericTestCase.DescriptorImpl.addTestCases(testCase);
return FormValidation.ok();
} catch (Failure e) {
return FormValidation.error(e.getMessage());
}
}
public ListBoxModel doFillDynatraceProfileItems() {
return PerfSigUtils.listToListBoxModel(PerfSigUtils.getDTConfigurations());
}
public boolean isApplicable(final Class<? extends AbstractProject> aClass) {
return true;
}
public String getDisplayName() {
return Messages.PerfSigStartRecording_DisplayName();
}
}
}
| [
"Raphael.Pionke@t-systems.com"
] | Raphael.Pionke@t-systems.com |
86a6eb67598b2af4de6fe4d24393464b5de95195 | 48862d97ed9e6982b3a2f92d3133a2a9d6e7acf1 | /DHK/src/main/java/com/kym/ui/activity/fee_kf/DemoChatActivity.java | 2d6e10cba0da2c35fec0cda02831a0194ec65138 | [] | no_license | Yamy-2020/dhk_newJDY | 19cd76390a3425517610ced060ed6d0ddbbe9ce5 | 2fe9fac8af2f03ca85f74fc1b9fef4e55248ea86 | refs/heads/master | 2022-12-24T19:59:44.756894 | 2020-08-26T14:27:32 | 2020-08-26T14:27:32 | 296,294,134 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,529 | java | package com.kym.ui.activity.fee_kf;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import com.paradigm.botkit.BotKitClient;
import com.paradigm.botlib.BotLibClient;
import com.kym.ui.R;
/**
* Created by wuyifan on 2018/2/1.
*/
public class DemoChatActivity extends com.kym.ui.activity.fee_kf.ChatActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_chat, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menuSetting:
// Intent intent = new Intent();
// intent.setClass(this, SettingActivity.class);
// startActivity(intent);
// return true;
case R.id.menuClear:
BotKitClient.getInstance().removeAllMessages();
this.reloadMessageList();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
@Override
public void onConnectionStateChanged(int state) {
super.onConnectionStateChanged(state);
if (state == BotLibClient.ConnectionConnectedRobot) {
BotKitClient botClient = BotKitClient.getInstance();
HistoryDataManager.getInstance().addHistory(this, botClient.getAccessKey(), "ddd");
}
}
}
| [
"hanyuge@vivancloud.com"
] | hanyuge@vivancloud.com |
e47194f579355464d3f891f94b9b8425a9d793f5 | 097df92ce1bfc8a354680725c7d10f0d109b5b7d | /com/amazonaws/services/sqs/buffered/QueueBufferFuture.java | 4fb44061cd714ef2920f635e345162da8463a494 | [] | no_license | cozos/emrfs-hadoop | 7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f | ba5dfa631029cb5baac2f2972d2fdaca18dac422 | refs/heads/master | 2022-10-14T15:03:51.500050 | 2022-10-06T05:38:49 | 2022-10-06T05:38:49 | 233,979,996 | 2 | 2 | null | 2022-10-06T05:41:46 | 2020-01-15T02:24:16 | Java | UTF-8 | Java | false | false | 3,070 | java | package com.amazonaws.services.sqs.buffered;
import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.AmazonWebServiceRequest;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
class QueueBufferFuture<Req extends AmazonWebServiceRequest, Res>
implements Future<Res>
{
private Res result = null;
private Exception e = null;
private boolean done = false;
private final QueueBufferCallback<Req, Res> callback;
private QueueBuffer issuingBuffer = null;
public QueueBufferFuture()
{
this(null);
}
public QueueBufferFuture(QueueBufferCallback<Req, Res> cb)
{
callback = cb;
}
public synchronized void setSuccess(Res paramResult)
{
if (done) {
return;
}
result = paramResult;
done = true;
notifyAll();
if (callback != null) {
QueueBuffer.executor.submit(new Callable()
{
public Void call()
throws Exception
{
callback.onSuccess(result);
return null;
}
});
}
}
public synchronized void setFailure(Exception paramE)
{
if (done) {
return;
}
e = paramE;
done = true;
notifyAll();
if (callback != null) {
QueueBuffer.executor.submit(new Callable()
{
public Void call()
throws Exception
{
callback.onError(e);
return null;
}
});
}
}
public boolean cancel(boolean arg0)
{
return false;
}
public synchronized void setBuffer(QueueBuffer paramBuffer)
{
issuingBuffer = paramBuffer;
}
public Res get()
throws InterruptedException, ExecutionException
{
for (;;)
{
try
{
return (Res)get(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
}
catch (TimeoutException localTimeoutException) {}
}
}
public synchronized Res get(long timeout, TimeUnit tu)
throws InterruptedException, ExecutionException, TimeoutException
{
long waitStartMs = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);
long timeoutMs = TimeUnit.MILLISECONDS.convert(timeout, tu);
long timeToWaitMs = timeoutMs;
while (!done)
{
if (timeToWaitMs <= 0L) {
throw new TimeoutException("Timed out waiting for results after " + timeout + " " + tu);
}
wait(timeToWaitMs);
long nowMs = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);
timeToWaitMs = timeoutMs - (nowMs - waitStartMs);
}
if (e != null) {
throw new ExecutionException(e);
}
return (Res)result;
}
public boolean isCancelled()
{
return false;
}
public synchronized boolean isDone()
{
return done;
}
}
/* Location:
* Qualified Name: com.amazonaws.services.sqs.buffered.QueueBufferFuture
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"Arwin.tio@adroll.com"
] | Arwin.tio@adroll.com |
2db889d09e44a4aee4e397fccdfbadce774e28e9 | e342854bf6f5b9b79a2aee63c0162b0a37eb82a7 | /dc3-center/dc3-data/src/main/java/com/pnoker/center/data/service/impl/PointValueServiceImpl.java | 7fd32fe6d688c19e57effaec7b2f8f3108469d5d | [
"Apache-2.0"
] | permissive | wuyahui/iot-dc3 | 173d91c3d4e7500d5d9560dd7e517f428e2e22da | a0d573cfb483d0af65564f61a3f98754b2868b2e | refs/heads/master | 2021-02-16T01:02:46.252376 | 2020-03-02T13:38:31 | 2020-03-02T13:38:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,439 | java | package com.pnoker.center.data.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pnoker.center.data.service.PointValueService;
import com.pnoker.center.data.service.pool.ThreadPool;
import com.pnoker.common.bean.Pages;
import com.pnoker.common.bean.driver.PointValue;
import com.pnoker.common.bean.driver.PointValueDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.CriteriaDefinition;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Optional;
/**
* @author pnoker
*/
@Slf4j
@Service
public class PointValueServiceImpl implements PointValueService {
@Resource
private ThreadPool threadPool;
@Resource
private MongoTemplate mongoTemplate;
@Override
public void add(PointValue pointValue) {
threadPool.executor.execute(() -> {
long createTime = System.currentTimeMillis();
long interval = createTime - pointValue.getOriginTime();
mongoTemplate.insert(pointValue.setCreateTime(createTime).setInterval(interval));
});
}
@Override
public Page<PointValue> list(PointValueDto pointValueDto) {
Criteria criteria = new Criteria();
Optional.ofNullable(pointValueDto).ifPresent(dto -> {
if (null != dto.getDeviceId()) {
criteria.and("deviceId").is(dto.getDeviceId());
}
if (null != dto.getPointId()) {
criteria.and("pointId").is(dto.getPointId());
}
if (dto.getPage().getStartTime() > 0 && dto.getPage().getEndTime() > 0 && dto.getPage().getStartTime() <= dto.getPage().getEndTime()) {
criteria.and("originTime").gte(dto.getPage().getStartTime()).lte(dto.getPage().getEndTime());
}
});
Page<PointValue> page = query(criteria, pointValueDto.getPage());
return page;
}
/**
* 分页&排序&查询
*
* @param criteriaDefinition
* @param pages
* @return
*/
private Page<PointValue> query(CriteriaDefinition criteriaDefinition, Pages pages) {
Query query = queryBySort(criteriaDefinition);
long count = mongoTemplate.count(query, PointValue.class);
List<PointValue> pointValues = mongoTemplate.find(queryByPage(query, pages), PointValue.class);
Page<PointValue> page = (new Page<PointValue>()).setCurrent(pages.getCurrent()).setSize(pages.getSize()).setTotal(count);
page.setRecords(pointValues);
return page;
}
/**
* 排序
*
* @param criteriaDefinition
* @return
*/
private Query queryBySort(CriteriaDefinition criteriaDefinition) {
Query query = new Query(criteriaDefinition);
query.with(Sort.by(Sort.Direction.DESC, "originTime"));
return query;
}
/**
* 分页
*
* @param query
* @param pages
* @return
*/
private Query queryByPage(Query query, Pages pages) {
int size = (int) pages.getSize();
long page = pages.getCurrent();
query.limit(size).skip(size * (page - 1));
return query;
}
}
| [
"pnokers@icloud.com"
] | pnokers@icloud.com |
2f13f7407960fe7429bf0e0f3e6d468017a08538 | c176a6013af49e8f5632d4b4e14b9080cea7aae4 | /perun-web-gui/src/main/java/cz/metacentrum/perun/webgui/json/comparators/GeneralComparator.java | 8e715efe94cfea8dbb49874581f932f04184b188 | [
"Apache-2.0"
] | permissive | katarinaHrab/perun | 16306682b176d8c1d7d9630a56256359d0ca1f7e | 6e4b16063835b79776333dc20f3c481bf29cb4da | refs/heads/master | 2020-12-26T11:14:51.305569 | 2014-01-16T14:14:44 | 2014-01-16T14:14:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,045 | java | package cz.metacentrum.perun.webgui.json.comparators;
import com.google.gwt.core.client.JavaScriptObject;
import cz.metacentrum.perun.webgui.model.GeneralObject;
import java.util.Comparator;
/**
* Comparator for any Perun object - it makes a GeneralObject from them.
*
* @author Vaclav Mach <374430@mail.muni.cz>
* @version $Id$
*/
public class GeneralComparator<T extends JavaScriptObject> implements Comparator<T>{
static public enum Column {
ID, NAME, STATUS, DESCRIPTION;
}
private Column attr;
/**
* Creates a new Comparator with specified attribute to sort by
* @param attr
*/
public GeneralComparator(Column attr){
this.attr = attr;
}
/**
* Compares the two objects
*
* @param obj1 First object
* @param obj2 Second object
*/
public int compare(T obj1, T obj2) {
GeneralObject o1 = obj1.cast();
GeneralObject o2 = obj2.cast();
switch(this.attr)
{
case ID:
return this.compareById(o1, o2);
case NAME:
return this.compareByName(o1, o2);
case DESCRIPTION:
return this.compareByDescription(o1, o2);
case STATUS:
return this.compareByStatus(o1, o2);
}
return 0;
}
/**
* Compares GeneralObjects by ID.
* @param o1
* @param o2
* @return
*/
private int compareById(GeneralObject o1, GeneralObject o2)
{
return o1.getId() - o2.getId();
}
/**
* Compares GeneralObjects by the name
* @param o1
* @param o2
* @return
*/
private int compareByName(GeneralObject o1, GeneralObject o2)
{
return o1.getName().compareToIgnoreCase(o2.getName());
}
/**
* Compares GeneralObjects by the description
* @param o1
* @param o2
* @return
*/
private int compareByDescription(GeneralObject o1, GeneralObject o2)
{
return o1.getDescription().compareToIgnoreCase(o2.getDescription());
}
/**
* Compares GeneralObjects by the status
* @param o1
* @param o2
* @return
*/
private int compareByStatus(GeneralObject o1, GeneralObject o2)
{
return o1.getStatus().compareToIgnoreCase(o2.getStatus());
}
}
| [
"256627@mail.muni.cz"
] | 256627@mail.muni.cz |
3d1085176751008a55c119552290955f5a2d1c55 | b9b5c6d60fdd46beefcaffa062758ab28d627c4f | /app/src/test/java/com/loopeer/codereader/ExampleUnitTest.java | 9d5e8ab8bbf1ea7c87edc17e2f8a6845584c166e | [
"Apache-2.0"
] | permissive | cwkcyd/code-reader | 01f1c27c4171c299a51a251a139b2cb2496fd125 | 8628100325229191bba678c76a0a953dc28f6e9b | refs/heads/master | 2021-01-20T23:09:18.796046 | 2017-08-29T02:54:31 | 2017-08-29T02:54:31 | 101,841,188 | 1 | 0 | null | 2017-08-30T05:26:03 | 2017-08-30T05:26:02 | null | UTF-8 | Java | false | false | 315 | java | package com.loopeer.codereader;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"yytodou123@gmail.com"
] | yytodou123@gmail.com |
6a9f0cde0bea2d97a606fd7183064c4e2228511a | 2d212ec3d9739d629f701f95d9bdfb0f5da1602f | /1.utils/core/src/main/java/com/octopus/utils/cls/javassist/compiler/ast/NewExpr.java | 8906f8ae2b7b76f386f745b6778adc7ed7512f04 | [
"Apache-2.0"
] | permissive | pacoolin/octopus | a42bdfb551df2b567760c4cf2e3a23dcb70942ec | 5439561133af00de089d6d30b3527542a434057f | refs/heads/master | 2023-05-11T08:26:02.210724 | 2021-05-05T02:14:02 | 2021-05-05T02:14:02 | 281,041,828 | 0 | 0 | Apache-2.0 | 2020-07-20T07:10:12 | 2020-07-20T07:10:11 | null | UTF-8 | Java | false | false | 3,147 | java | /*
* Javassist, a Java-bytecode translator toolkit.
* Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. Alternatively, the contents of this file may be used under
* the terms of the GNU Lesser General Public License Version 2.1 or later,
* or the Apache License Version 2.0.
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*/
package com.octopus.utils.cls.javassist.compiler.ast;
import com.octopus.utils.cls.javassist.compiler.CompileError;
import com.octopus.utils.cls.javassist.compiler.TokenId;
/**
* New Expression.
*/
public class NewExpr extends com.octopus.utils.cls.javassist.compiler.ast.ASTList implements TokenId {
protected boolean newArray;
protected int arrayType;
public NewExpr(com.octopus.utils.cls.javassist.compiler.ast.ASTList className, com.octopus.utils.cls.javassist.compiler.ast.ASTList args) {
super(className, new com.octopus.utils.cls.javassist.compiler.ast.ASTList(args));
newArray = false;
arrayType = CLASS;
}
public NewExpr(int type, com.octopus.utils.cls.javassist.compiler.ast.ASTList arraySize, com.octopus.utils.cls.javassist.compiler.ast.ArrayInit init) {
super(null, new com.octopus.utils.cls.javassist.compiler.ast.ASTList(arraySize));
newArray = true;
arrayType = type;
if (init != null)
append(this, init);
}
public static NewExpr makeObjectArray(com.octopus.utils.cls.javassist.compiler.ast.ASTList className,
com.octopus.utils.cls.javassist.compiler.ast.ASTList arraySize, com.octopus.utils.cls.javassist.compiler.ast.ArrayInit init) {
NewExpr e = new NewExpr(className, arraySize);
e.newArray = true;
if (init != null)
append(e, init);
return e;
}
public boolean isArray() { return newArray; }
/* TokenId.CLASS, TokenId.INT, ...
*/
public int getArrayType() { return arrayType; }
public com.octopus.utils.cls.javassist.compiler.ast.ASTList getClassName() { return (com.octopus.utils.cls.javassist.compiler.ast.ASTList)getLeft(); }
public com.octopus.utils.cls.javassist.compiler.ast.ASTList getArguments() { return (com.octopus.utils.cls.javassist.compiler.ast.ASTList)getRight().getLeft(); }
public com.octopus.utils.cls.javassist.compiler.ast.ASTList getArraySize() { return getArguments(); }
public com.octopus.utils.cls.javassist.compiler.ast.ArrayInit getInitializer() {
ASTree t = getRight().getRight();
if (t == null)
return null;
else
return (ArrayInit)t.getLeft();
}
public void accept(Visitor v) throws CompileError { v.atNewExpr(this); }
protected String getTag() {
return newArray ? "new[]" : "new";
}
}
| [
"kodw38@126.com"
] | kodw38@126.com |
2e701a8060102b2173d82e8081838e1908ecba6e | 6552244c7ef44150ea74cef7ec801d5a9f7171e9 | /app/src/main/java/com/google/android/gms/wearable/internal/zzad.java | 8a8b2094e01a7f5aa831181a4ce42d724d08e778 | [] | no_license | amithbm/cbskeep | c9469156efd307fb474d817760a0b426af8f7c5c | a800f00ab617cba49d1a1bea1f0282c0cde525e7 | refs/heads/master | 2016-09-06T12:42:33.824977 | 2015-08-24T15:33:50 | 2015-08-24T15:33:50 | 41,311,235 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,494 | java | package com.google.android.gms.wearable.internal;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.zza;
import com.google.android.gms.common.internal.safeparcel.zza.zza;
import com.google.android.gms.common.internal.safeparcel.zzb;
public class zzad
implements Parcelable.Creator<DeleteDataItemsResponse>
{
static void zza(DeleteDataItemsResponse paramDeleteDataItemsResponse, Parcel paramParcel, int paramInt)
{
paramInt = zzb.zzcR(paramParcel);
zzb.zzc(paramParcel, 1, versionCode);
zzb.zzc(paramParcel, 2, statusCode);
zzb.zzc(paramParcel, 3, zzbHV);
zzb.zzJ(paramParcel, paramInt);
}
public DeleteDataItemsResponse zznq(Parcel paramParcel)
{
int k = 0;
int m = zza.zzcQ(paramParcel);
int j = 0;
int i = 0;
while (paramParcel.dataPosition() < m)
{
int n = zza.zzcP(paramParcel);
switch (zza.zzeS(n))
{
default:
zza.zzb(paramParcel, n);
break;
case 1:
i = zza.zzg(paramParcel, n);
break;
case 2:
j = zza.zzg(paramParcel, n);
break;
case 3:
k = zza.zzg(paramParcel, n);
}
}
if (paramParcel.dataPosition() != m)
throw new zza.zza("Overread allowed size end=" + m, paramParcel);
return new DeleteDataItemsResponse(i, j, k);
}
public DeleteDataItemsResponse[] zzrv(int paramInt)
{
return new DeleteDataItemsResponse[paramInt];
}
} | [
"amithbm@gmail.com"
] | amithbm@gmail.com |
d87f622c80d7589b597de7c00c1691f64c380c88 | 89dc1b23d21aa1952c0dfb415be5fed144cbbd84 | /FrameWork_Util/src/framework/ressource/xalan/xpath/functions/FuncLast.java | f2427cf58dc9f88418f1dd20ee7717fe4d5e38b1 | [] | no_license | M6C/framework-util | c1bdf33f08e2ae0a3964424d7ff8737e34434253 | e91c725f67a81ccae84a8410f2795abb990a1c99 | refs/heads/master | 2021-01-10T17:00:31.444538 | 2017-02-07T13:33:51 | 2017-02-07T13:33:51 | 52,559,096 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,740 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: FuncLast.java
package framework.ressource.xalan.xpath.functions;
import java.util.Vector;
import javax.xml.transform.TransformerException;
import org.apache.xml.dtm.DTMIterator;
import framework.ressource.xalan.xpath.XPathContext;
import framework.ressource.xalan.xpath.axes.SubContextList;
import framework.ressource.xalan.xpath.compiler.Compiler;
import framework.ressource.xalan.xpath.objects.XNumber;
import framework.ressource.xalan.xpath.objects.XObject;
// Referenced classes of package framework.ressource.xalan.xpath.functions:
// Function
public class FuncLast extends Function
{
public FuncLast()
{
}
public void postCompileStep(Compiler compiler)
{
m_isTopLevel = compiler.getLocationPathDepth() == -1;
}
public int getCountOfContextNodeList(XPathContext xctxt)
throws TransformerException
{
SubContextList iter = m_isTopLevel ? null : xctxt.getSubContextList();
if(null != iter)
return iter.getLastPos(xctxt);
DTMIterator cnl = xctxt.getContextNodeList();
int count;
if(null != cnl)
count = cnl.getLength();
else
count = 0;
return count;
}
public XObject execute(XPathContext xctxt)
throws TransformerException
{
XNumber xnum = new XNumber(getCountOfContextNodeList(xctxt));
return xnum;
}
public void fixupVariables(Vector vector, int i)
{
}
static final long serialVersionUID = 0x7fc19d9b2acad86fL;
private boolean m_isTopLevel;
}
| [
"david.roca@free.fr"
] | david.roca@free.fr |
fb96fec0043f873c3f36d4b110f9dbfa18d24e4d | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/appbrand/widget/f/d.java | 489d54f1c7fc0a7b91bbd1f754ff5ff6bfda2433 | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,239 | java | package com.tencent.mm.plugin.appbrand.widget.f;
import a.l;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.lang.ref.WeakReference;
@l(dWo={1, 1, 13}, dWp={""}, dWq={"Lcom/tencent/mm/plugin/appbrand/widget/prompt/AutoDismissRunner;", "Ljava/lang/Runnable;", "toast", "Lcom/tencent/mm/plugin/appbrand/widget/prompt/AppBrandPopupToast;", "(Lcom/tencent/mm/plugin/appbrand/widget/prompt/AppBrandPopupToast;)V", "ref", "Ljava/lang/ref/WeakReference;", "run", "", "plugin-appbrand-integration_release"})
final class d
implements Runnable
{
private final WeakReference<c> iuM;
public d(c paramc)
{
AppMethodBeat.i(135267);
this.iuM = new WeakReference(paramc);
AppMethodBeat.o(135267);
}
public final void run()
{
AppMethodBeat.i(135266);
c localc = (c)this.iuM.get();
if (localc != null)
{
localc.dismiss();
AppMethodBeat.o(135266);
}
while (true)
{
return;
AppMethodBeat.o(135266);
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes4-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.appbrand.widget.f.d
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
2943c2c7d08dba7fcf51c98ddace5305eee05acb | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_a5043b8f87c4d7113b374520bce8f74275c836e6/XSModelGroupImpl/2_a5043b8f87c4d7113b374520bce8f74275c836e6_XSModelGroupImpl_t.java | 480a59fa6fadc0894f6cbcb47acfbd4d95a84bc1 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 7,279 | java | /*
* Copyright 2002,2003-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.xerces.impl.xs;
import org.apache.xerces.xs.*;
import org.apache.xerces.impl.xs.util.XSObjectListImpl;
/**
* Store schema model group declaration.
*
* @author Sandy Gao, IBM
*
* @version $Id$
*/
public class XSModelGroupImpl implements XSModelGroup {
// types of model groups
// REVISIT: can't use same constants as those for particles, because
// there are place where the constants are used together. For example,
// to check whether the content is an element or a sequence.
public static final short MODELGROUP_CHOICE = 101;
public static final short MODELGROUP_SEQUENCE = 102;
public static final short MODELGROUP_ALL = 103;
// compositor of the model group
public short fCompositor;
// particles
public XSParticleDecl[] fParticles = null;
public int fParticleCount = 0;
// this particle's optional annotation
public XSAnnotationImpl fAnnotation;
// whether this model group contains nothing
public boolean isEmpty() {
for (int i = 0; i < fParticleCount; i++) {
if (!fParticles[i].isEmpty())
return false;
}
return true;
}
/**
* 3.8.6 Effective Total Range (all and sequence) and
* Effective Total Range (choice)
* The following methods are used to return min/max range for a particle.
* They are not exactly the same as it's described in the spec, but all the
* values from the spec are retrievable by these methods.
*/
public int minEffectiveTotalRange() {
if (fCompositor == MODELGROUP_CHOICE)
return minEffectiveTotalRangeChoice();
else
return minEffectiveTotalRangeAllSeq();
}
// return the sum of all min values of the particles
private int minEffectiveTotalRangeAllSeq() {
int total = 0;
for (int i = 0; i < fParticleCount; i++)
total += fParticles[i].minEffectiveTotalRange();
return total;
}
// return the min of all min values of the particles
private int minEffectiveTotalRangeChoice() {
int min = 0, one;
if (fParticleCount > 0)
min = fParticles[0].minEffectiveTotalRange();
for (int i = 1; i < fParticleCount; i++) {
one = fParticles[i].minEffectiveTotalRange();
if (one < min)
min = one;
}
return min;
}
public int maxEffectiveTotalRange() {
if (fCompositor == MODELGROUP_CHOICE)
return maxEffectiveTotalRangeChoice();
else
return maxEffectiveTotalRangeAllSeq();
}
// if one of the max value of the particles is unbounded, return unbounded;
// otherwise return the sum of all max values
private int maxEffectiveTotalRangeAllSeq() {
int total = 0, one;
for (int i = 0; i < fParticleCount; i++) {
one = fParticles[i].maxEffectiveTotalRange();
if (one == SchemaSymbols.OCCURRENCE_UNBOUNDED)
return SchemaSymbols.OCCURRENCE_UNBOUNDED;
total += one;
}
return total;
}
// if one of the max value of the particles is unbounded, return unbounded;
// otherwise return the max of all max values
private int maxEffectiveTotalRangeChoice() {
int max = 0, one;
if (fParticleCount > 0) {
max = fParticles[0].maxEffectiveTotalRange();
if (max == SchemaSymbols.OCCURRENCE_UNBOUNDED)
return SchemaSymbols.OCCURRENCE_UNBOUNDED;
}
for (int i = 1; i < fParticleCount; i++) {
one = fParticles[i].maxEffectiveTotalRange();
if (one == SchemaSymbols.OCCURRENCE_UNBOUNDED)
return SchemaSymbols.OCCURRENCE_UNBOUNDED;
if (one > max)
max = one;
}
return max;
}
/**
* get the string description of this particle
*/
private String fDescription = null;
public String toString() {
if (fDescription == null) {
StringBuffer buffer = new StringBuffer();
if (fCompositor == MODELGROUP_ALL)
buffer.append("all(");
else
buffer.append('(');
if (fParticleCount > 0)
buffer.append(fParticles[0].toString());
for (int i = 1; i < fParticleCount; i++) {
if (fCompositor == MODELGROUP_CHOICE)
buffer.append('|');
else
buffer.append(',');
buffer.append(fParticles[i].toString());
}
buffer.append(')');
fDescription = buffer.toString();
}
return fDescription;
}
public void reset(){
fCompositor = MODELGROUP_SEQUENCE;
fParticles = null;
fParticleCount = 0;
fDescription = null;
fAnnotation = null;
}
/**
* Get the type of the object, i.e ELEMENT_DECLARATION.
*/
public short getType() {
return XSConstants.MODEL_GROUP;
}
/**
* The <code>name</code> of this <code>XSObject</code> depending on the
* <code>XSObject</code> type.
*/
public String getName() {
return null;
}
/**
* The namespace URI of this node, or <code>null</code> if it is
* unspecified. defines how a namespace URI is attached to schema
* components.
*/
public String getNamespace() {
return null;
}
/**
* {compositor} One of all, choice or sequence. The valid constants values
* are: ALL, CHOICE, SEQUENCE.
*/
public short getCompositor() {
if (fCompositor == MODELGROUP_CHOICE)
return XSModelGroup.COMPOSITOR_CHOICE;
else if (fCompositor == MODELGROUP_SEQUENCE)
return XSModelGroup.COMPOSITOR_SEQUENCE;
else
return XSModelGroup.COMPOSITOR_ALL;
}
/**
* {particles} A list of particles
*/
public XSObjectList getParticles() {
return new XSObjectListImpl(fParticles, fParticleCount);
}
/**
* Optional. Annotation.
*/
public XSAnnotation getAnnotation() {
return fAnnotation;
}
/**
* @see org.apache.xerces.xs.XSObject#getNamespaceItem()
*/
public XSNamespaceItem getNamespaceItem() {
return null;
}
} // class XSModelGroupImpl
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
eceeebc3402bcfb9d592f74947ed34660154f24c | 21c2f55b571a4a43da0bb56396fce4202bce3306 | /src/generated/java/Murmur/Callback_Server_getState.java | 2728382b7876058bbbb35f2427a95f5fbd1b7ae9 | [] | no_license | Tiim/telegram_mumble_bot | 33c4729158db89aadf98dfbcc4bf6a14c9141ee3 | fb4d373595fbdafd7eda2668ab703a70157fa6b7 | refs/heads/master | 2021-01-10T19:50:51.597343 | 2016-01-04T06:48:43 | 2016-01-04T06:48:43 | 39,690,708 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,249 | java | // **********************************************************************
//
// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.4.2
//
// <auto-generated>
//
// Generated from file `Callback_Server_getState.java'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package Murmur;
/**
* Get state of a single connected user.
**/
public abstract class Callback_Server_getState extends Ice.TwowayCallback
{
public abstract void response(User __ret);
public abstract void exception(Ice.UserException __ex);
public final void __completed(Ice.AsyncResult __result)
{
ServerPrx __proxy = (ServerPrx)__result.getProxy();
User __ret = null;
try
{
__ret = __proxy.end_getState(__result);
}
catch(Ice.UserException __ex)
{
exception(__ex);
return;
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret);
}
}
| [
"tim.bachmann@cad.ch"
] | tim.bachmann@cad.ch |
290bcdc44e0cdcaa7b0c41ff147459172d2e9437 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/neo4j/2018/4/NetworkRadius.java | ff408c0d1126216699cb046bd3c2bde1a0ceff1b | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Java | false | false | 3,381 | java | /*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j 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 org.neo4j.graphalgo.impl.centrality;
import java.util.Comparator;
import java.util.Set;
import org.neo4j.graphalgo.impl.shortestpath.SingleSourceShortestPath;
import org.neo4j.graphdb.Node;
/**
* This can be used to calculate the radius of a network, which is defined as
* the smallest eccentricity of all the nodes in the network.
* @complexity Identical to {@link NetworkDiameter}.
* @author Patrik Larsson
*/
public class NetworkRadius<ShortestPathCostType> extends
ShortestPathBasedCentrality<ShortestPathCostType,ShortestPathCostType>
{
Comparator<ShortestPathCostType> distanceComparator;
// Underlying eccentricity computation
protected Eccentricity<ShortestPathCostType> eccentricity;
protected ShortestPathCostType radius;
/**
* Default constructor.
* @param singleSourceShortestPath
* Underlying singleSourceShortestPath.
* @param zeroValue
* Default value.
* @param nodeSet
* A set containing the nodes for which centrality values should
* be computed.
* @param distanceComparator
* Object being able to compare eccentricity values (path
* distances), in order to sort out the smallest.
*/
public NetworkRadius(
SingleSourceShortestPath<ShortestPathCostType> singleSourceShortestPath,
ShortestPathCostType zeroValue, Set<Node> nodeSet,
Comparator<ShortestPathCostType> distanceComparator )
{
super( singleSourceShortestPath, null, zeroValue, nodeSet );
this.distanceComparator = distanceComparator;
eccentricity = new Eccentricity<>( singleSourceShortestPath, zeroValue, nodeSet, distanceComparator );
}
@Override
public void processShortestPaths( Node node,
SingleSourceShortestPath<ShortestPathCostType> singleSourceShortestPath )
{
eccentricity.processShortestPaths( node, singleSourceShortestPath );
ShortestPathCostType centrality = eccentricity.getCentrality( node );
if ( radius == null
|| distanceComparator.compare( centrality, radius ) < 0 )
{
radius = centrality;
}
}
@Override
public ShortestPathCostType getCentrality( Node node )
{
// This might be a bit ugly, but good for warnings
if ( node != null )
{
throw new RuntimeException(
"Getting network radius with a specific node as argument, which means nonsense." );
}
calculate();
return radius;
}
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
b66c9ade9d8757f02d26e113925618bbb5514a6b | 0adcb787c2d7b3bbf81f066526b49653f9c8db40 | /src/main/java/com/alipay/api/request/AlipayDataIotdataBusinessPointQueryRequest.java | 6dd838fc27e11174ade2230a6214918e9f1a1bb7 | [
"Apache-2.0"
] | permissive | yikey/alipay-sdk-java-all | 1cdca570c1184778c6f3cad16fe0bcb6e02d2484 | 91d84898512c5a4b29c707b0d8d0cd972610b79b | refs/heads/master | 2020-05-22T13:40:11.064476 | 2019-04-11T14:11:02 | 2019-04-11T14:11:02 | 186,365,665 | 1 | 0 | null | 2019-05-13T07:16:09 | 2019-05-13T07:16:08 | null | UTF-8 | Java | false | false | 3,179 | java | package com.alipay.api.request;
import com.alipay.api.domain.AlipayDataIotdataBusinessPointQueryModel;
import java.util.Map;
import com.alipay.api.AlipayRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.AlipayDataIotdataBusinessPointQueryResponse;
import com.alipay.api.AlipayObject;
/**
* ALIPAY API: alipay.data.iotdata.business.point.query request
*
* @author auto create
* @since 1.0, 2019-02-25 09:30:01
*/
public class AlipayDataIotdataBusinessPointQueryRequest implements AlipayRequest<AlipayDataIotdataBusinessPointQueryResponse> {
private AlipayHashMap udfParams; // add user-defined text parameters
private String apiVersion="1.0";
/**
* 业务点位查询
*/
private String bizContent;
public void setBizContent(String bizContent) {
this.bizContent = bizContent;
}
public String getBizContent() {
return this.bizContent;
}
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
private boolean needEncrypt=false;
private AlipayObject bizModel=null;
public String getNotifyUrl() {
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public void setTerminalType(String terminalType){
this.terminalType=terminalType;
}
public String getTerminalType(){
return this.terminalType;
}
public void setTerminalInfo(String terminalInfo){
this.terminalInfo=terminalInfo;
}
public String getTerminalInfo(){
return this.terminalInfo;
}
public void setProdCode(String prodCode) {
this.prodCode=prodCode;
}
public String getProdCode() {
return this.prodCode;
}
public String getApiMethodName() {
return "alipay.data.iotdata.business.point.query";
}
public Map<String, String> getTextParams() {
AlipayHashMap txtParams = new AlipayHashMap();
txtParams.put("biz_content", this.bizContent);
if(udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new AlipayHashMap();
}
this.udfParams.put(key, value);
}
public Class<AlipayDataIotdataBusinessPointQueryResponse> getResponseClass() {
return AlipayDataIotdataBusinessPointQueryResponse.class;
}
public boolean isNeedEncrypt() {
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
this.needEncrypt=needEncrypt;
}
public AlipayObject getBizModel() {
return this.bizModel;
}
public void setBizModel(AlipayObject bizModel) {
this.bizModel=bizModel;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
00f1da296a00207935b1140d153f0ed3865d7e07 | 5e8f8c8b9c0d17efce9ba29728add130da3f0cd2 | /src/test/java/org/assertj/core/internal/files/Files_assertHasDigest_AlgorithmString_Test.java | 75735715e17dd91716583be4fd695d9c8caf0b03 | [
"Apache-2.0"
] | permissive | eddumelendez/assertj-core | 06de99fb647563ca0908ceab012a08beeda9729a | 38b6e47c0114dc0e11d3753421e17db57f6b42b0 | refs/heads/master | 2020-05-25T01:45:57.248642 | 2019-05-19T21:29:36 | 2019-05-19T21:29:36 | 187,563,364 | 0 | 0 | NOASSERTION | 2019-05-20T03:43:08 | 2019-05-20T03:43:08 | null | UTF-8 | Java | false | false | 6,476 | 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.
*
* Copyright 2012-2019 the original author or authors.
*/
package org.assertj.core.internal.files;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatNullPointerException;
import static org.assertj.core.api.Assertions.catchThrowable;
import static org.assertj.core.error.ShouldBeFile.shouldBeFile;
import static org.assertj.core.error.ShouldBeReadable.shouldBeReadable;
import static org.assertj.core.error.ShouldExist.shouldExist;
import static org.assertj.core.error.ShouldHaveDigest.shouldHaveDigest;
import static org.assertj.core.test.TestData.someInfo;
import static org.assertj.core.util.FailureMessages.actualIsNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.verify;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import org.assertj.core.api.AssertionInfo;
import org.assertj.core.internal.DigestDiff;
import org.assertj.core.internal.Digests;
import org.assertj.core.internal.Files;
import org.assertj.core.internal.FilesBaseTest;
import org.junit.jupiter.api.Test;
/**
* Tests for <code>{@link Files#assertHasDigest(AssertionInfo, File, MessageDigest, String)}</code>
*
* @author Valeriy Vyrva
*/
public class Files_assertHasDigest_AlgorithmString_Test extends FilesBaseTest {
private final String algorithm = "MD5";
private final String expected = "";
private final String real = "3AC1AFA2A89B7E4F1866502877BF1DC5";
@Test
public void should_fail_if_actual_is_null() {
AssertionInfo info = someInfo();
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> files.assertHasDigest(info, null, algorithm, expected))
.withMessage(actualIsNull());
}
@Test
public void should_fail_with_should_exist_error_if_actual_does_not_exist() {
// GIVEN
given(actual.exists()).willReturn(false);
// WHEN
catchThrowable(() -> files.assertHasDigest(INFO, actual, algorithm, expected));
// THEN
verify(failures).failure(INFO, shouldExist(actual));
}
@Test
public void should_fail_if_actual_exists_but_is_not_file() {
// GIVEN
given(actual.exists()).willReturn(true);
given(actual.isFile()).willReturn(false);
// WHEN
catchThrowable(() -> files.assertHasDigest(INFO, actual, algorithm, expected));
// THEN
verify(failures).failure(INFO, shouldBeFile(actual));
}
@Test
public void should_fail_if_actual_exists_but_is_not_readable() {
// GIVEN
given(actual.exists()).willReturn(true);
given(actual.isFile()).willReturn(true);
given(actual.canRead()).willReturn(false);
// WHEN
catchThrowable(() -> files.assertHasDigest(INFO, actual, algorithm, expected));
// THEN
verify(failures).failure(INFO, shouldBeReadable(actual));
}
@Test
public void should_throw_error_if_digest_is_null() {
assertThatNullPointerException().isThrownBy(() -> files.assertHasDigest(INFO, null, (MessageDigest) null, expected))
.withMessage("The message digest algorithm should not be null");
}
@Test
public void should_throw_error_if_expected_is_null() {
assertThatNullPointerException().isThrownBy(() -> files.assertHasDigest(INFO, null, algorithm, (byte[]) null))
.withMessage("The binary representation of digest to compare to should not be null");
}
@Test
public void should_throw_error_wrapping_catched_IOException() throws IOException {
// GIVEN
IOException cause = new IOException();
given(actual.exists()).willReturn(true);
given(actual.isFile()).willReturn(true);
given(actual.canRead()).willReturn(true);
given(nioFilesWrapper.newInputStream(any())).willThrow(cause);
// WHEN
Throwable error = catchThrowable(() -> files.assertHasDigest(INFO, actual, algorithm, expected));
// THEN
assertThat(error).isInstanceOf(UncheckedIOException.class)
.hasCause(cause);
}
@Test
public void should_throw_error_wrapping_catched_NoSuchAlgorithmException() {
// GIVEN
String unknownDigestAlgorithm = "UnknownDigestAlgorithm";
// WHEN
Throwable error = catchThrowable(() -> files.assertHasDigest(INFO, actual, unknownDigestAlgorithm, expected));
// THEN
assertThat(error).isInstanceOf(IllegalStateException.class)
.hasMessage("Unable to find digest implementation for: <UnknownDigestAlgorithm>");
}
@Test
public void should_fail_if_actual_does_not_have_expected_digest() throws IOException, NoSuchAlgorithmException {
// GIVEN
InputStream stream = getClass().getResourceAsStream("/red.png");
given(actual.exists()).willReturn(true);
given(actual.isFile()).willReturn(true);
given(actual.canRead()).willReturn(true);
given(nioFilesWrapper.newInputStream(any())).willReturn(stream);
// WHEN
catchThrowable(() -> files.assertHasDigest(INFO, actual, algorithm, expected));
// THEN
verify(failures).failure(INFO, shouldHaveDigest(actual, new DigestDiff(real, "", MessageDigest.getInstance(algorithm))));
failIfStreamIsOpen(stream);
}
@Test
public void should_pass_if_actual_has_expected_digest() throws IOException {
// GIVEN
InputStream stream = getClass().getResourceAsStream("/red.png");
given(actual.exists()).willReturn(true);
given(actual.isFile()).willReturn(true);
given(actual.canRead()).willReturn(true);
given(nioFilesWrapper.newInputStream(any())).willReturn(stream);
// WHEN
files.assertHasDigest(INFO, actual, algorithm, Digests.fromHex(real));
// THEN
failIfStreamIsOpen(stream);
}
}
| [
"joel.costigliola@gmail.com"
] | joel.costigliola@gmail.com |
bf7e5c8044ebcde028a621df43c44a2b1dc085c5 | 4aa90348abcb2119011728dc067afd501f275374 | /app/src/main/java/org/xwalk/core/XWalkGeolocationPermissionsCallbackHandler.java | f10243a32affb76cb2dc749e8747fa9fbcfcefc3 | [] | no_license | jambestwick/HackWechat | 0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6 | 6a34899c8bfd50d19e5a5ec36a58218598172a6b | refs/heads/master | 2022-01-27T12:48:43.446804 | 2021-12-29T10:36:30 | 2021-12-29T10:36:30 | 249,366,791 | 0 | 0 | null | 2020-03-23T07:48:32 | 2020-03-23T07:48:32 | null | UTF-8 | Java | false | false | 1,527 | java | package org.xwalk.core;
import java.util.ArrayList;
public class XWalkGeolocationPermissionsCallbackHandler implements XWalkGeolocationPermissionsCallback {
private Object bridge;
private ArrayList<Object> constructorParams;
private ArrayList<Object> constructorTypes;
private XWalkCoreWrapper coreWrapper;
private ReflectMethod invokeStringbooleanbooleanMethod = new ReflectMethod(null, "invoke", new Class[0]);
private ReflectMethod postWrapperMethod;
protected Object getBridge() {
return this.bridge;
}
public XWalkGeolocationPermissionsCallbackHandler(Object obj) {
this.bridge = obj;
reflectionInit();
}
public void invoke(String str, boolean z, boolean z2) {
try {
this.invokeStringbooleanbooleanMethod.invoke(new Object[]{str, Boolean.valueOf(z), Boolean.valueOf(z2)});
} catch (RuntimeException e) {
if (this.coreWrapper == null) {
throw new RuntimeException("Crosswalk's APIs are not ready yet");
}
XWalkCoreWrapper.handleRuntimeError(e);
}
}
void reflectionInit() {
XWalkCoreWrapper.initEmbeddedMode();
this.coreWrapper = XWalkCoreWrapper.getInstance();
if (this.coreWrapper == null) {
XWalkCoreWrapper.reserveReflectObject(this);
return;
}
this.invokeStringbooleanbooleanMethod.init(this.bridge, null, "invokeSuper", new Class[]{String.class, Boolean.TYPE, Boolean.TYPE});
}
}
| [
"malin.myemail@163.com"
] | malin.myemail@163.com |
9ab1c750e06bcdc56f85243d3b0ca18153be0c96 | cec1602d23034a8f6372c019e5770773f893a5f0 | /sources/uk/co/senab/photoview/gestures/EclairGestureDetector.java | 3e5da0b4c156b6b4168c3a1b471215b030e568ef | [] | no_license | sengeiou/zeroner_app | 77fc7daa04c652a5cacaa0cb161edd338bfe2b52 | e95ae1d7cfbab5ca1606ec9913416dadf7d29250 | refs/heads/master | 2022-03-31T06:55:26.896963 | 2020-01-24T09:20:37 | 2020-01-24T09:20:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,150 | java | package uk.co.senab.photoview.gestures;
import android.annotation.TargetApi;
import android.content.Context;
import android.view.MotionEvent;
import uk.co.senab.photoview.Compat;
@TargetApi(5)
public class EclairGestureDetector extends CupcakeGestureDetector {
private static final int INVALID_POINTER_ID = -1;
private int mActivePointerId = -1;
private int mActivePointerIndex = 0;
public EclairGestureDetector(Context context) {
super(context);
}
/* access modifiers changed from: 0000 */
public float getActiveX(MotionEvent ev) {
try {
return ev.getX(this.mActivePointerIndex);
} catch (Exception e) {
return ev.getX();
}
}
/* access modifiers changed from: 0000 */
public float getActiveY(MotionEvent ev) {
try {
return ev.getY(this.mActivePointerIndex);
} catch (Exception e) {
return ev.getY();
}
}
public boolean onTouchEvent(MotionEvent ev) {
int newPointerIndex;
int i = 0;
switch (ev.getAction() & 255) {
case 0:
this.mActivePointerId = ev.getPointerId(0);
break;
case 1:
case 3:
this.mActivePointerId = -1;
break;
case 6:
int pointerIndex = Compat.getPointerIndex(ev.getAction());
if (ev.getPointerId(pointerIndex) == this.mActivePointerId) {
if (pointerIndex == 0) {
newPointerIndex = 1;
} else {
newPointerIndex = 0;
}
this.mActivePointerId = ev.getPointerId(newPointerIndex);
this.mLastTouchX = ev.getX(newPointerIndex);
this.mLastTouchY = ev.getY(newPointerIndex);
break;
}
break;
}
if (this.mActivePointerId != -1) {
i = this.mActivePointerId;
}
this.mActivePointerIndex = ev.findPointerIndex(i);
return super.onTouchEvent(ev);
}
}
| [
"johan@sellstrom.me"
] | johan@sellstrom.me |
fcda39d77065faa3571d7348d21d508254b3970d | 7f53ff59587c1feea58fb71f7eff5608a5846798 | /temp/ffout/client/net/minecraft/src/SorterStatsBlock.java | bcb38f30ce474801426b903d0fe56c9088a8a275 | [] | no_license | Orazur66/Minecraft-Client | 45c918d488f2f9fca7d2df3b1a27733813d957a5 | 70a0b63a6a347fd87a7dbe28c7de588f87df97d3 | refs/heads/master | 2021-01-15T17:08:18.072298 | 2012-02-14T21:29:14 | 2012-02-14T21:29:14 | 3,423,624 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,211 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package net.minecraft.src;
import java.util.Comparator;
// Referenced classes of package net.minecraft.src:
// StatCrafting, GuiSlotStatsBlock, StatList, GuiStats,
// StatFileWriter
class SorterStatsBlock
implements Comparator
{
final GuiStats field_27299_a; /* synthetic field */
final GuiSlotStatsBlock field_27298_b; /* synthetic field */
SorterStatsBlock(GuiSlotStatsBlock guislotstatsblock, GuiStats guistats)
{
field_27298_b = guislotstatsblock;
field_27299_a = guistats;
super();
}
public int func_27297_a(StatCrafting statcrafting, StatCrafting statcrafting1)
{
int i = statcrafting.func_25072_b();
int j = statcrafting1.func_25072_b();
StatBase statbase = null;
StatBase statbase1 = null;
if(field_27298_b.field_27271_e == 2)
{
statbase = StatList.field_25159_y[i];
statbase1 = StatList.field_25159_y[j];
} else
if(field_27298_b.field_27271_e == 0)
{
statbase = StatList.field_25158_z[i];
statbase1 = StatList.field_25158_z[j];
} else
if(field_27298_b.field_27271_e == 1)
{
statbase = StatList.field_25172_A[i];
statbase1 = StatList.field_25172_A[j];
}
if(statbase != null || statbase1 != null)
{
if(statbase == null)
{
return 1;
}
if(statbase1 == null)
{
return -1;
}
int k = GuiStats.func_27142_c(field_27298_b.field_27274_a).func_27184_a(statbase);
int l = GuiStats.func_27142_c(field_27298_b.field_27274_a).func_27184_a(statbase1);
if(k != l)
{
return (k - l) * field_27298_b.field_27270_f;
}
}
return i - j;
}
public int compare(Object obj, Object obj1)
{
return func_27297_a((StatCrafting)obj, (StatCrafting)obj1);
}
}
| [
"Ninja_Buta@hotmail.fr"
] | Ninja_Buta@hotmail.fr |
c20dc983a02940c2e18ab66d6d4f44981de3d1ad | 1f529e3ea6e6204c14fc118ef47e37235d50bab7 | /example/joda-time/mutants/CDL_12/org/joda/time/field/FieldUtils.java | 8a08e6e4437e76c75428d600abed41855857cec1 | [] | no_license | leofernandesmo/safira-impact-analysis | 9405730b581feff4a3ae5c2b31d5a320cb6e489c | daa577d267ed54822658f22dfc51291a69d5c450 | refs/heads/master | 2020-04-24T12:00:32.976812 | 2019-03-12T19:50:35 | 2019-03-12T19:50:35 | 171,943,672 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,466 | java | // This is a mutant program.
// Author : ysma
package org.joda.time.field;
import java.math.BigDecimal;
import java.math.RoundingMode;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.IllegalFieldValueException;
public class FieldUtils
{
private FieldUtils()
{
super();
}
public static int safeNegate( int value )
{
if (value == Integer.MIN_VALUE) {
throw new java.lang.ArithmeticException( "Integer.MIN_VALUE cannot be negated" );
}
return -value;
}
public static int safeAdd( int val1, int val2 )
{
int sum = val1 + val2;
if ((val1 ^ sum) < 0 && (val1 ^ val2) >= 0) {
throw new java.lang.ArithmeticException( "The calculation caused an overflow: " + val1 + " + " + val2 );
}
return sum;
}
public static long safeAdd( long val1, long val2 )
{
long sum = val1 + val2;
if ((val1 ^ sum) < 0 && (val1 ^ val2) >= 0) {
throw new java.lang.ArithmeticException( "The calculation caused an overflow: " + val1 + " + " + val2 );
}
return sum;
}
public static long safeSubtract( long val1, long val2 )
{
long diff = val1 - val2;
if ((val1 ^ diff) < 0 && (val1 ^ val2) < 0) {
throw new java.lang.ArithmeticException( "The calculation caused an overflow: " + val1 + val2 );
}
return diff;
}
public static int safeMultiply( int val1, int val2 )
{
long total = (long) val1 * (long) val2;
if (total < Integer.MIN_VALUE || total > Integer.MAX_VALUE) {
throw new java.lang.ArithmeticException( "Multiplication overflows an int: " + val1 + " * " + val2 );
}
return (int) total;
}
public static long safeMultiply( long val1, int val2 )
{
switch (val2) {
case -1 :
if (val1 == Long.MIN_VALUE) {
throw new java.lang.ArithmeticException( "Multiplication overflows a long: " + val1 + " * " + val2 );
}
return -val1;
case 0 :
return 0L;
case 1 :
return val1;
}
long total = val1 * val2;
if (total / val2 != val1) {
throw new java.lang.ArithmeticException( "Multiplication overflows a long: " + val1 + " * " + val2 );
}
return total;
}
public static long safeMultiply( long val1, long val2 )
{
if (val2 == 1) {
return val1;
}
if (val1 == 1) {
return val2;
}
if (val1 == 0 || val2 == 0) {
return 0;
}
long total = val1 * val2;
if (total / val2 != val1 || val1 == Long.MIN_VALUE && val2 == -1 || val2 == Long.MIN_VALUE && val1 == -1) {
throw new java.lang.ArithmeticException( "Multiplication overflows a long: " + val1 + " * " + val2 );
}
return total;
}
public static long safeDivide( long dividend, long divisor )
{
if (dividend == Long.MIN_VALUE && divisor == -1L) {
throw new java.lang.ArithmeticException( "Multiplication overflows a long: " + dividend + " / " + divisor );
}
return dividend / divisor;
}
public static long safeDivide( long dividend, long divisor, java.math.RoundingMode roundingMode )
{
if (dividend == Long.MIN_VALUE && divisor == -1L) {
throw new java.lang.ArithmeticException( "Multiplication overflows a long: " + dividend + " / " + divisor );
}
java.math.BigDecimal dividendBigDecimal = new java.math.BigDecimal( dividend );
java.math.BigDecimal divisorBigDecimal = new java.math.BigDecimal( divisor );
return dividendBigDecimal.divide( divisorBigDecimal, roundingMode ).longValue();
}
public static int safeToInt( long value )
{
if (Integer.MIN_VALUE <= value && value <= Integer.MAX_VALUE) {
return (int) value;
}
throw new java.lang.ArithmeticException( "Value cannot fit in an int: " + value );
}
public static int safeMultiplyToInt( long val1, long val2 )
{
long val = FieldUtils.safeMultiply( val1, val2 );
return FieldUtils.safeToInt( val );
}
public static void verifyValueBounds( org.joda.time.DateTimeField field, int value, int lowerBound, int upperBound )
{
if (value < lowerBound || value > upperBound) {
throw new org.joda.time.IllegalFieldValueException( field.getType(), Integer.valueOf( value ), Integer.valueOf( lowerBound ), Integer.valueOf( upperBound ) );
}
}
public static void verifyValueBounds( org.joda.time.DateTimeFieldType fieldType, int value, int lowerBound, int upperBound )
{
if (value < lowerBound || value > upperBound) {
throw new org.joda.time.IllegalFieldValueException( fieldType, Integer.valueOf( value ), Integer.valueOf( lowerBound ), Integer.valueOf( upperBound ) );
}
}
public static void verifyValueBounds( java.lang.String fieldName, int value, int lowerBound, int upperBound )
{
if (value < lowerBound || value > upperBound) {
throw new org.joda.time.IllegalFieldValueException( fieldName, Integer.valueOf( value ), Integer.valueOf( lowerBound ), Integer.valueOf( upperBound ) );
}
}
public static int getWrappedValue( int currentValue, int wrapValue, int minValue, int maxValue )
{
return getWrappedValue( currentValue + wrapValue, minValue, maxValue );
}
public static int getWrappedValue( int value, int minValue, int maxValue )
{
if (minValue >= maxValue) {
throw new java.lang.IllegalArgumentException( "MIN > MAX" );
}
int wrapRange = maxValue - minValue + 1;
value -= minValue;
if (value >= 0) {
return value % wrapRange + minValue;
}
int remByRange = -value % wrapRange;
if (remByRange == 0) {
return 0 + minValue;
}
return wrapRange - remByRange + minValue;
}
public static boolean equals( java.lang.Object object1, java.lang.Object object2 )
{
if (object1 == object2) {
return true;
}
if (object1 == null || object2 == null) {
return false;
}
return object1.equals( object2 );
}
}
| [
"leofernandesmo@gmail.com"
] | leofernandesmo@gmail.com |
816d2d8f652b577fb1baf19d56dbaf5a52b2b96d | 3fa1e45f37d4b5598bf27dd53c3afa66ba35ca7d | /src/main/java/com/livinglogic/ul4/ArgumentTypeMismatchException.java | 5c604c2a02088dccda958027b3f32f7dc557114b | [] | no_license | LivingLogic/LivingLogic.Java.ul4 | 6d60db3c6b1e8c3476fb92ec9387d74fd9446239 | 105c29f7e5680e68c8a5d6a4ea15886c3e276387 | refs/heads/master | 2023-05-01T09:41:44.617885 | 2023-04-13T11:27:09 | 2023-04-13T11:27:09 | 16,170,182 | 1 | 1 | null | 2020-12-04T17:46:48 | 2014-01-23T11:08:02 | Java | UTF-8 | Java | false | false | 507 | java | /*
** Copyright 2009-2023 by LivingLogic AG, Bayreuth/Germany
** All Rights Reserved
** See LICENSE for the license
*/
package com.livinglogic.ul4;
/**
Thrown by implementions of {@link Function} or {@link BoundMethod} when the
function/method cannot handle the combination of argument types.
**/
public class ArgumentTypeMismatchException extends UnsupportedOperationException
{
public ArgumentTypeMismatchException(String template, Object... args)
{
super(Utils.formatMessage(template, args));
}
}
| [
"walter@livinglogic.de"
] | walter@livinglogic.de |
7fedd174ea51432a2005dede4a2a1e64798c247b | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/mapstruct/testing/856/JodaLocalTimeToStringConversion.java | 4b9078ee6e3676e298c525bd0899c870b0deec37 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 554 | java | /*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.internal.conversion;
/**
* Conversion between {@code LocalTime} and {@code String}.
*
* @author Timo Eckhardt
*/
public class JodaLocalTimeToStringConversion extends AbstractJodaTypeToStringConversion {
@Override
protected String formatStyle() {
return "-L";
}
@Override
protected String parseMethod() {
return "parseLocalTime";
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
7d03c4e9313ffa2530bf0373d4b9c80d40afaf79 | f766baf255197dd4c1561ae6858a67ad23dcda68 | /app/src/main/java/com/tencent/mm/pluginsdk/location/b.java | 3bdfdf736cda8fcde053deae54aee9caf0421a35 | [] | no_license | jianghan200/wxsrc6.6.7 | d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849 | eb6c56587cfca596f8c7095b0854cbbc78254178 | refs/heads/master | 2020-03-19T23:40:49.532494 | 2018-06-12T06:00:50 | 2018-06-12T06:00:50 | 137,015,278 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 859 | java | package com.tencent.mm.pluginsdk.location;
public final class b
{
public int bSz;
public float dRS;
public float dRT;
public long qyC;
public int scene;
public b(long paramLong, float paramFloat1, float paramFloat2, int paramInt1, int paramInt2)
{
this.dRS = paramFloat1;
this.dRT = paramFloat2;
this.bSz = paramInt1;
this.scene = paramInt2;
this.qyC = paramLong;
}
public final String toString()
{
return String.format("%d-%d-%d", new Object[] { Integer.valueOf((int)(this.dRS * 1000000.0F)), Integer.valueOf((int)(this.dRT * 1000000.0F)), Integer.valueOf(this.bSz) });
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes2-dex2jar.jar!/com/tencent/mm/pluginsdk/location/b.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"526687570@qq.com"
] | 526687570@qq.com |
ae104247f16f2bf4d948e286c252370f28630f08 | 83f27e9b04c7c7772f8a64238d3b86d22e8b0eef | /chrome/android/java/src/org/chromium/chrome/browser/flags/LegacyFeatureUtilities.java | 152bb17d8f6689ac751f43b80f5ddf0b61757a13 | [
"BSD-3-Clause"
] | permissive | fxb20170613/chromium | 122a0dd9efa36ebd238a53a45dd799fcbff36b1c | 501061ccbb7b9fab6dad77babecf12e4ae9f7890 | refs/heads/master | 2023-03-02T08:47:05.969248 | 2020-02-03T16:18:55 | 2020-02-03T16:18:55 | 238,015,164 | 1 | 0 | BSD-3-Clause | 2020-02-03T16:54:31 | 2020-02-03T16:54:30 | null | UTF-8 | Java | false | false | 553 | java | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.flags;
/**
* Temporary class, identical to {@link FeatureUtilities}, for migration.
*
* This class will be referenced temporarily while FeatureUtilities is renamed.
*
* TODO(crbug.com/1012975): Remove this class after downstream references FeatureUtilities by the
* new name.
*/
public class LegacyFeatureUtilities extends FeatureUtilities {}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
5bb13f454064438e1cf068dc0dd3a056e856ea09 | 72f1b77bf6dd6387f22609a1736b7ad1e86a6664 | /Java2Graph_CaseStudy/src/javaMM/impl/PrimitiveTypeByteImpl.java | c5b627d3d7b8680d9632a2d2322ce8dfeee16043 | [] | no_license | lolybc88/LinTra | 34072a5ffa8f8461857dd1203b490c2e8941de41 | ec48a495bceabc2fae9a9212c9b87a79d0a3b642 | refs/heads/master | 2020-04-12T03:07:23.100977 | 2016-09-23T18:58:59 | 2016-09-23T18:58:59 | 31,598,037 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 733 | java | /**
*/
package javaMM.impl;
import javaMM.JavaMMPackage;
import javaMM.PrimitiveTypeByte;
import org.eclipse.emf.ecore.EClass;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Primitive Type Byte</b></em>'.
* <!-- end-user-doc -->
* <p>
* </p>
*
* @generated
*/
public class PrimitiveTypeByteImpl extends PrimitiveTypeImpl implements PrimitiveTypeByte {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PrimitiveTypeByteImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return JavaMMPackage.Literals.PRIMITIVE_TYPE_BYTE;
}
} //PrimitiveTypeByteImpl
| [
"loli@lcc.uma.es"
] | loli@lcc.uma.es |
20be47f14da5f9f3e864f660bc425af9966a02e8 | 38c4451ab626dcdc101a11b18e248d33fd8a52e0 | /identifiers/apache-log4j-1.2.17/src/main/java/org/apache/log4j/helpers/PatternConverter.java | 56730e44f1ec26b42207eb2be90f899450b1932d | [] | no_license | habeascorpus/habeascorpus-data | 47da7c08d0f357938c502bae030d5fb8f44f5e01 | 536d55729f3110aee058ad009bcba3e063b39450 | refs/heads/master | 2020-06-04T10:17:20.102451 | 2013-02-19T15:19:21 | 2013-02-19T15:19:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,022 | java | org PACKAGE_IDENTIFIER false
apache PACKAGE_IDENTIFIER false
log4j PACKAGE_IDENTIFIER false
helpers PACKAGE_IDENTIFIER false
org PACKAGE_IDENTIFIER false
apache PACKAGE_IDENTIFIER false
log4j PACKAGE_IDENTIFIER false
spi PACKAGE_IDENTIFIER false
LoggingEvent TYPE_IDENTIFIER false
PatternConverter TYPE_IDENTIFIER true
PatternConverter TYPE_IDENTIFIER false
next VARIABLE_IDENTIFIER true
min VARIABLE_IDENTIFIER true
max VARIABLE_IDENTIFIER true
leftAlign VARIABLE_IDENTIFIER true
PatternConverter METHOD_IDENTIFIER false
PatternConverter METHOD_IDENTIFIER false
FormattingInfo TYPE_IDENTIFIER false
fi VARIABLE_IDENTIFIER true
min VARIABLE_IDENTIFIER false
fi VARIABLE_IDENTIFIER false
min VARIABLE_IDENTIFIER false
max VARIABLE_IDENTIFIER false
fi VARIABLE_IDENTIFIER false
max VARIABLE_IDENTIFIER false
leftAlign VARIABLE_IDENTIFIER false
fi VARIABLE_IDENTIFIER false
leftAlign VARIABLE_IDENTIFIER false
String TYPE_IDENTIFIER false
convert METHOD_IDENTIFIER true
LoggingEvent TYPE_IDENTIFIER false
event VARIABLE_IDENTIFIER true
format METHOD_IDENTIFIER true
StringBuffer TYPE_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER true
LoggingEvent TYPE_IDENTIFIER false
e VARIABLE_IDENTIFIER true
String TYPE_IDENTIFIER false
s VARIABLE_IDENTIFIER true
convert METHOD_IDENTIFIER false
e VARIABLE_IDENTIFIER false
s VARIABLE_IDENTIFIER false
min VARIABLE_IDENTIFIER false
spacePad METHOD_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER false
min VARIABLE_IDENTIFIER false
len VARIABLE_IDENTIFIER true
s VARIABLE_IDENTIFIER false
length METHOD_IDENTIFIER false
len VARIABLE_IDENTIFIER false
max VARIABLE_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER false
append METHOD_IDENTIFIER false
s VARIABLE_IDENTIFIER false
substring METHOD_IDENTIFIER false
len VARIABLE_IDENTIFIER false
max VARIABLE_IDENTIFIER false
len VARIABLE_IDENTIFIER false
min VARIABLE_IDENTIFIER false
leftAlign VARIABLE_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER false
append METHOD_IDENTIFIER false
s VARIABLE_IDENTIFIER false
spacePad METHOD_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER false
min VARIABLE_IDENTIFIER false
len VARIABLE_IDENTIFIER false
spacePad METHOD_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER false
min VARIABLE_IDENTIFIER false
len VARIABLE_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER false
append METHOD_IDENTIFIER false
s VARIABLE_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER false
append METHOD_IDENTIFIER false
s VARIABLE_IDENTIFIER false
String TYPE_IDENTIFIER false
SPACES VARIABLE_IDENTIFIER true
spacePad METHOD_IDENTIFIER true
StringBuffer TYPE_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER true
length VARIABLE_IDENTIFIER true
length VARIABLE_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER false
append METHOD_IDENTIFIER false
SPACES VARIABLE_IDENTIFIER false
length VARIABLE_IDENTIFIER false
i VARIABLE_IDENTIFIER true
i VARIABLE_IDENTIFIER false
i VARIABLE_IDENTIFIER false
length VARIABLE_IDENTIFIER false
i VARIABLE_IDENTIFIER false
sbuf VARIABLE_IDENTIFIER false
append METHOD_IDENTIFIER false
SPACES VARIABLE_IDENTIFIER false
i VARIABLE_IDENTIFIER false
| [
"pschulam@gmail.com"
] | pschulam@gmail.com |
7137e8c52011d2f7758d18dc6e8737125956c2c9 | 4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849 | /aliyun-java-sdk-vs/src/main/java/com/aliyuncs/vs/transform/v20181212/DescribeVsUpPeakPublishStreamDataResponseUnmarshaller.java | b8cdb739163bbed60ef62e5974e681584cbec1bc | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-java-sdk | a263fa08e261f12d45586d1b3ad8a6609bba0e91 | e19239808ad2298d32dda77db29a6d809e4f7add | refs/heads/master | 2023-09-03T12:28:09.765286 | 2023-09-01T09:03:00 | 2023-09-01T09:03:00 | 39,555,898 | 1,542 | 1,317 | NOASSERTION | 2023-09-14T07:27:05 | 2015-07-23T08:41:13 | Java | UTF-8 | Java | false | false | 2,805 | 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.vs.transform.v20181212;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.vs.model.v20181212.DescribeVsUpPeakPublishStreamDataResponse;
import com.aliyuncs.vs.model.v20181212.DescribeVsUpPeakPublishStreamDataResponse.DescribeVsUpPeakPublishStreamData;
import com.aliyuncs.transform.UnmarshallerContext;
public class DescribeVsUpPeakPublishStreamDataResponseUnmarshaller {
public static DescribeVsUpPeakPublishStreamDataResponse unmarshall(DescribeVsUpPeakPublishStreamDataResponse describeVsUpPeakPublishStreamDataResponse, UnmarshallerContext _ctx) {
describeVsUpPeakPublishStreamDataResponse.setRequestId(_ctx.stringValue("DescribeVsUpPeakPublishStreamDataResponse.RequestId"));
List<DescribeVsUpPeakPublishStreamData> describeVsUpPeakPublishStreamDatas = new ArrayList<DescribeVsUpPeakPublishStreamData>();
for (int i = 0; i < _ctx.lengthValue("DescribeVsUpPeakPublishStreamDataResponse.DescribeVsUpPeakPublishStreamDatas.Length"); i++) {
DescribeVsUpPeakPublishStreamData describeVsUpPeakPublishStreamData = new DescribeVsUpPeakPublishStreamData();
describeVsUpPeakPublishStreamData.setQueryTime(_ctx.stringValue("DescribeVsUpPeakPublishStreamDataResponse.DescribeVsUpPeakPublishStreamDatas["+ i +"].QueryTime"));
describeVsUpPeakPublishStreamData.setBandWidth(_ctx.stringValue("DescribeVsUpPeakPublishStreamDataResponse.DescribeVsUpPeakPublishStreamDatas["+ i +"].BandWidth"));
describeVsUpPeakPublishStreamData.setStatName(_ctx.stringValue("DescribeVsUpPeakPublishStreamDataResponse.DescribeVsUpPeakPublishStreamDatas["+ i +"].StatName"));
describeVsUpPeakPublishStreamData.setPeakTime(_ctx.stringValue("DescribeVsUpPeakPublishStreamDataResponse.DescribeVsUpPeakPublishStreamDatas["+ i +"].PeakTime"));
describeVsUpPeakPublishStreamData.setPublishStreamNum(_ctx.integerValue("DescribeVsUpPeakPublishStreamDataResponse.DescribeVsUpPeakPublishStreamDatas["+ i +"].PublishStreamNum"));
describeVsUpPeakPublishStreamDatas.add(describeVsUpPeakPublishStreamData);
}
describeVsUpPeakPublishStreamDataResponse.setDescribeVsUpPeakPublishStreamDatas(describeVsUpPeakPublishStreamDatas);
return describeVsUpPeakPublishStreamDataResponse;
}
} | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
e84b7dffac1ba6463fb18391999af3a46cdeb5a9 | 5a8e2488f78bbcc644991a417e683d890d38aa2b | /ltgamesdkcore/src/main/java/com/gnetop/ltgame/core/model/LoginResult.java | 79fb99a733d9a3740bb0260695124e019be61b11 | [] | no_license | muyishuangfeng/LTGameSDKAndroidJcenter | 66719ad85ccd563ea1e7f717739b8c21f935a870 | 9099791b7398332f132b9c2fad3be4be4617acb5 | refs/heads/master | 2022-08-16T21:03:55.970292 | 2020-05-25T04:24:35 | 2020-05-25T04:24:35 | 266,007,047 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,430 | java | package com.gnetop.ltgame.core.model;
import com.gnetop.ltgame.core.base.BaseEntry;
import com.gnetop.ltgame.core.exception.LTGameError;
import com.gnetop.ltgame.core.exception.LTResultCode;
/**
* 登录结果
*/
public class LoginResult extends Result {
//结果
private BaseEntry<ResultModel> resultModel;
private BaseEntry baseEntry;
//错误信息
public LTGameError error;
//错误信息
private String msg;
//状态
public int state;
// 扫码登录二维码文件路径
public String wxCodePath;
// 授权码,如果 onlyAuthCode 为 true, 将会返回它
public String wxAuthCode;
private LoginResult() {
}
private LoginResult(int state) {
super(state);
this.state = state;
}
private LoginResult(LTGameError error) {
super(error);
this.error = error;
}
public LoginResult(int state, BaseEntry<ResultModel> resultModel) {
super(state, resultModel);
this.state = state;
this.resultModel = resultModel;
}
public LoginResult(BaseEntry resultModel) {
super(resultModel);
this.baseEntry = resultModel;
}
public static LoginResult successBaseEntryOf(int code, BaseEntry baseEntry) {
LoginResult result = new LoginResult(code);
result.baseEntry = baseEntry;
return result;
}
public static LoginResult successOf(BaseEntry<ResultModel> resultModel) {
LoginResult result = new LoginResult(LTResultCode.STATE_LOGIN_SUCCESS_CODE);
result.resultModel = resultModel;
return result;
}
public static LoginResult successOf(int code, BaseEntry<ResultModel> resultModel) {
LoginResult result = new LoginResult(code);
result.resultModel = resultModel;
return result;
}
public static LoginResult successOf(LTGameError error) {
LoginResult result = new LoginResult();
result.error = error;
return result;
}
public static LoginResult failOf(LTGameError error) {
LoginResult result = new LoginResult(error);
result.error = error;
return result;
}
public static LoginResult failOf(int code, LTGameError error) {
LoginResult result = new LoginResult(error);
error.setCode(code);
result.error = error;
return result;
}
public static LoginResult failOf(int code, String msg) {
LoginResult result = new LoginResult(code);
result.state = code;
result.msg = msg;
return result;
}
public static LoginResult failOf(int code) {
LoginResult result = new LoginResult(code);
result.state = code;
return result;
}
public static LoginResult loginOut(LTGameError error) {
LoginResult result = new LoginResult();
result.error = error;
return result;
}
public static LoginResult cancelOf() {
return new LoginResult(LTResultCode.STATE_CANCEL_CODE);
}
public static LoginResult completeOf() {
return new LoginResult(LTResultCode.STATE_COMPLETE_CODE);
}
public static LoginResult stateOf(int state) {
return new LoginResult(state);
}
public BaseEntry<ResultModel> getResultModel() {
return resultModel;
}
public BaseEntry getBaseEntry() {
return baseEntry;
}
public LTGameError getError() {
return error;
}
public LoginResult(int state, int target) {
super(state, target);
}
public static LoginResult stateOf(BaseEntry baseEntry) {
LoginResult result = new LoginResult(STATE_SUCCESS);
result.baseEntry = baseEntry;
return result;
}
public static LoginResult successOf(int target) {
return new LoginResult(STATE_SUCCESS, target);
}
public static LoginResult failOf(int target, BaseEntry<ResultModel> error) {
LoginResult result = new LoginResult(STATE_FAIL, target);
result.resultModel = error;
return result;
}
public static LoginResult cancelOf(int target) {
return new LoginResult(STATE_CANCEL, target);
}
public static LoginResult completeOf(int target) {
return new LoginResult(STATE_COMPLETE, target);
}
public static LoginResult stateOf(int state, int target) {
return new LoginResult(state, target);
}
}
| [
"yangkemuyi@sina.com"
] | yangkemuyi@sina.com |
a36297336039d2ddc53e18cd2322ba427d7c94f6 | 7586df8a4d512b2e37d99d11bd2837e35f490e42 | /plc-gw/src/main/java/com/tiza/gw/support/config/GwConfig.java | be03521f6407cf6773bed80363e305f53666bff1 | [] | no_license | diyiliu/sa-cloud | bc2f834ba42dc6ba34ea8a070746343ebe097ca9 | aee2ae0af8c82a23725db6d6d6b2fce98dbd0469 | refs/heads/master | 2020-05-16T01:53:29.716192 | 2019-06-11T01:38:11 | 2019-06-11T01:38:11 | 182,613,222 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,979 | java | package com.tiza.gw.support.config;
import com.diyiliu.plugin.cache.ICache;
import com.diyiliu.plugin.cache.ram.RamCacheProvider;
import com.diyiliu.plugin.util.SpringUtil;
import com.tiza.air.cluster.KafkaUtil;
import com.tiza.gw.netty.server.DtuServer;
import com.tiza.gw.support.listener.RedisMsgListener;
import kafka.javaapi.producer.Producer;
import kafka.producer.ProducerConfig;
import kafka.serializer.StringEncoder;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.annotation.Order;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertiesPropertySource;
import org.springframework.core.io.ClassPathResource;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;
import java.util.Properties;
/**
* Description: GwConfig
* Author: DIYILIU
* Update: 2019-04-18 10:54
*/
@Configuration
@ComponentScan("com.tiza.gw")
@PropertySource("classpath:config.properties")
public class GwConfig {
public final static String NETTY_DEVICE_ID = "DTU-ID";
@Resource
private Environment environment;
@Order(1)
@Bean(initMethod = "init")
public DtuServer dtuServer() throws Exception {
String profile = environment.getProperty("env");
loadProperties("conf" + File.separator + profile + ".properties");
int port = environment.getProperty("dtu-port", Integer.class);
DtuServer dtuServer = new DtuServer();
dtuServer.setPort(port);
return dtuServer;
}
@Bean(initMethod = "init")
public RedisMsgListener redisMsgListener() {
JedisPoolConfig config = new JedisPoolConfig();
config.setMaxTotal(30);
config.setMaxIdle(3);
config.setMaxWaitMillis(5000);
String host = environment.getProperty("redis.host");
int port = environment.getProperty("redis.port", Integer.class);
String password = environment.getProperty("redis.password");
int database = environment.getProperty("redis.database", Integer.class);
JedisPool pool = new JedisPool(config, host, port, 2000, StringUtils.isEmpty(password) ? null : password, database);
String subChannel = environment.getProperty("redis.channel");
RedisMsgListener listener = new RedisMsgListener();
listener.setJedisPool(pool);
listener.setSubChannel(subChannel);
return listener;
}
@Bean(initMethod = "init")
public KafkaUtil kafkaUtil() {
String brokerList = environment.getProperty("kafka.broker-list");
String topic = environment.getProperty("kafka.raw-topic");
Properties props = new Properties();
props.put("metadata.broker.list", brokerList);
// 消息传递到broker时的序列化方式
props.put("serializer.class", StringEncoder.class.getName());
// acks = 0:表示producer无需等待server端的应答消息
// acks = 1:表示接收该消息记录的分区leader将消息记录写入到本地log文件,就返回Acknowledgement,告知producer本次发送已完成,而无需等待其他follower分区的确认。
// acks = all:表示消息记录只有得到分区leader以及其他分区副本同步结点队列(ISR)中的分区follower的确认之后,才能回复acknowlegement,告知producer本次发送已完成。
// acks = -1:等同于acks = all。
props.put("request.required.acks", "1");
// sync:同步(来一条数据提交一条不缓存), 默认 async:异步
props.put("producer.type", "sync");
// 重试次数
props.put("message.send.max.retries", "3");
Producer<String, String> producer = new Producer(new ProducerConfig(props));
return new KafkaUtil(producer, topic);
}
/**
* 加载配置文件
*
* @param path
* @throws IOException
*/
public void loadProperties(String path) throws IOException {
Properties properties = new Properties();
properties.load(new ClassPathResource(path).getInputStream());
ConfigurableEnvironment confEnv = (ConfigurableEnvironment) environment;
confEnv.getPropertySources().addFirst(new PropertiesPropertySource("activeProperties", properties));
}
/**
* spring 工具类
*
* @return
*/
@Bean
public SpringUtil springUtil() {
return new SpringUtil();
}
/**
* 设备在线缓存
*
* @return
*/
@Bean
public ICache onlineCacheProvider() {
return new RamCacheProvider();
}
}
| [
"572772828@qq.com"
] | 572772828@qq.com |
e7f4a2aeb2316754c5fafc4c9c48a9a26dfe04ee | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project66/src/test/java/org/gradle/test/performance66_5/Test66_415.java | 978d14153c3f86d83fceb2a7226eddc5eb8c79cc | [] | 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 | 292 | java | package org.gradle.test.performance66_5;
import static org.junit.Assert.*;
public class Test66_415 {
private final Production66_415 production = new Production66_415("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
3dbb5fe56b13d0d6229e4503601f3f434f2ea933 | 71dc08ecd65afd5096645619eee08c09fc80f50d | /src/main/java/defpackage/vs.java | 9eb543cd3bb611485daddd422c880fbdeb17972b | [] | no_license | lanshifu/FFmpegDemo | d5a4a738feadcb15d8728ee92f9eb00f00c77413 | fdbafde0bb8150503ae68c42ae98361c030bf046 | refs/heads/master | 2020-06-25T12:24:12.590952 | 2019-09-08T07:35:16 | 2019-09-08T07:35:16 | 199,304,834 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 189 | java | package defpackage;
import java.io.IOException;
/* compiled from: FileRollOverManager */
/* renamed from: vs */
public interface vs {
boolean c() throws IOException;
void d();
}
| [
"lanxiaobin@jiaxincloud.com"
] | lanxiaobin@jiaxincloud.com |
5a711d68cd09c1bb38cb1108825fb5c624f675d8 | 71f1dfcf87183403c7cf06aca4859282c0267ff3 | /src/main/java/com/github/kunai/source/DataSourceNotFoundException.java | 60b579041ebc56570b1709fb9b285c2cb87d15b6 | [
"Apache-2.0"
] | permissive | tamada/kunai | fdbc0c0db46e26ab733a44e4f4852018f8847fc5 | f0a3004554b8e5d5a41de41603ac293c8e7e9c22 | refs/heads/master | 2021-01-10T02:50:57.804044 | 2016-04-15T07:46:20 | 2016-04-15T07:46:20 | 52,846,793 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 548 | java | package com.github.kunai.source;
/**
* Exception class for missing data source.
* For example, if file of given path is not found,
* a object of this class is thrown.
*
* @author Haruaki Tamada
*/
public class DataSourceNotFoundException extends SourceException {
private static final long serialVersionUID = -1158799029760367012L;
public DataSourceNotFoundException(String message) {
super(message);
}
public DataSourceNotFoundException(Throwable throwable) {
super(throwable);
}
}
| [
"tamada@users.noreply.github.com"
] | tamada@users.noreply.github.com |
80619191060f4562971a6a66ed3739b6b4c60a03 | c36bef5fb68c3a45162630fdd1842c4caf10743a | /Brazier/src/main/java/com/github/kelemen/brazier/actions/UndoableAction.java | 6278a911d2dc2a19cca1b890b5a571a34aed37b8 | [] | no_license | kelemen/Brazier | 6448f15f8a556169b781fd7d4f95255cb76bac3d | ff94172a0b747a92b1145db009b5863e7f61b2c7 | refs/heads/master | 2020-04-09T09:22:38.696985 | 2015-08-31T14:09:03 | 2015-08-31T14:09:03 | 40,509,330 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 197 | java | package com.github.kelemen.brazier.actions;
public interface UndoableAction {
public static final UndoableAction DO_NOTHING = () -> UndoAction.DO_NOTHING;
public UndoAction doAction();
}
| [
"attila.kelemen85@gmail.com"
] | attila.kelemen85@gmail.com |
212b5d000c6454e50027cb55f677116266a07842 | 078248872fef2b34a78c7f854b21c06f7d4346fa | /src/main/java/io/github/ghacupha/fassets/service/mapper/package-info.java | 7b30d526508e1b9adf7664560257038fc31f6bdd | [] | no_license | ghacupha/fassets | 21ab074ee3b315866f5d8813613b3af7dcdc0b2a | e5333523e0f726d1744f0782657ba38f91c8a5de | refs/heads/master | 2021-05-09T14:16:38.081487 | 2019-03-04T10:39:16 | 2019-03-04T10:39:16 | 119,056,645 | 0 | 0 | null | 2018-04-15T10:05:26 | 2018-01-26T13:48:15 | Java | UTF-8 | Java | false | false | 134 | java | /**
* MapStruct mappers for mapping domain objects and Data Transfer Objects.
*/
package io.github.ghacupha.fassets.service.mapper;
| [
"mailnjeru@gmail.com"
] | mailnjeru@gmail.com |
1972f915c2a1a0faa14c7df5bcf53023585d1e88 | 675ba64fe6dd37a9f525d1a79b7b70195dd4500b | /src-masterdata/com/sany/masterdata/hr/sync/SyncJobInfo.java | 956cc860735f4c7b9986b5eb2634c5ac780885ba | [] | no_license | liveqmock/bboss-cms | 28b6c350325884061998a55933cde31250f9a836 | cdb8ea5eb10a29fea914d742ba829905cc001e42 | refs/heads/master | 2021-01-22T00:32:29.721587 | 2013-05-29T15:50:03 | 2013-05-29T15:50:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,430 | java | /*
* @(#)SyncJobInfo.java
*
* Copyright @ 2001-2012 SANY Group Co.,Ltd.
* All right reserved.
*
* 这个软件是属于三一集团有限公司机密的和私有信息,不得泄露。
* 并且只能由三一集团有限公司内部员工在得到许可的情况下才允许使用。
* This software is the confidential and proprietary information
* of SANY Group Co, Ltd. 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
* SANY Group Co, Ltd.
*/
package com.sany.masterdata.hr.sync;
import java.util.Calendar;
import java.util.Date;
import javax.transaction.RollbackException;
import org.apache.log4j.Logger;
import com.frameworkset.common.poolman.PreparedDBUtil;
import com.frameworkset.orm.transaction.TransactionManager;
import com.sany.masterdata.hr.dao.TdSmJobDao;
import com.sany.masterdata.hr.dao.TdSmOrgJobDao;
import com.sany.masterdata.hr.entity.TdSmJob;
import com.sany.masterdata.hr.entity.TdSmOrgJob;
import com.sany.masterdata.hr.entity.jobinfo.ArrayOfJobInfo;
import com.sany.masterdata.hr.entity.jobinfo.JobInfo;
import com.sany.masterdata.hr.webservices.client.JobInfoClient;
/**
* 同步岗位数据
* @author caix3
* @since 2012-3-22 下午4:50:11
*/
public class SyncJobInfo {
private Logger logger = Logger.getLogger(SyncJobInfo.class);
/**
* 同步所有岗位数据
*/
public void syncAllData() {
syncExpandDataByDate(null, null);
}
/**
* 同步26小时内增量数据
*/
public void syncExpandData() {
Calendar calendar = Calendar.getInstance();
Date enDate = calendar.getTime();
calendar.set(Calendar.HOUR, calendar.get(Calendar.HOUR) - 26);
Date stDate = calendar.getTime();
syncExpandDataByDate(stDate, enDate);
}
/**
* 获取指定时间段内增量数据
*/
public void syncExpandDataByDate(Date stDate, Date enDate) {
JobInfoClient client = new JobInfoClient();
TdSmOrgJobDao tdSmOrgJobDao = new TdSmOrgJobDao();
TdSmJobDao tdSmJobDao = new TdSmJobDao();
// 分页获取用户数据
int index = 0;
int pageSize = client.getPageSize();
for (int i = 0; i == index; i += pageSize) {
try {
TransactionManager tm = new TransactionManager();
tm.begin(TransactionManager.RW_TRANSACTION);
ArrayOfJobInfo jobInfoList = client.getData(stDate, enDate, i, i + pageSize);
index += jobInfoList.getJobInfo().size();
// 插入数据库
for (JobInfo temp : jobInfoList.getJobInfo()) {
tdSmJobDao.saveOrUpdate(getTdSmJob(temp));
tdSmOrgJobDao.saveOrUpdate(getTdSmOrgJob(temp));
}
tm.commit();
} catch (Throwable e) {
logger.error(e);
}
}
}
/**
* 初始化同步操作,速度较快,全量插入,不判重
*/
public void initialData() {
JobInfoClient client = new JobInfoClient();
// 分页获取用户数据
int index = 0;
int pageSize = client.getPageSize();
for (int i = 0; i == index; i += pageSize) {
try {
// 回写数据库
TransactionManager tm = new TransactionManager();
PreparedDBUtil pre1 = new PreparedDBUtil();
PreparedDBUtil pre2 = new PreparedDBUtil();
ArrayOfJobInfo jobInfoList = client.getData(null, null, i, i + pageSize);
index += jobInfoList.getJobInfo().size();
try {
tm.begin(TransactionManager.RW_TRANSACTION);
pre1.setBatchOptimize(true);
pre2.setBatchOptimize(true);
pre1.preparedInsert("insert into td_sm_job (job_id, job_name, job_desc) values (?, ?, ?)");
pre2.preparedInsert("insert into td_sm_orgjob (job_id, org_id, job_sn) values (?, ?, ?)");
for (JobInfo temp : jobInfoList.getJobInfo()) {
// 插入岗位表
pre1.setString(1, temp.getJobId().getValue());
pre1.setString(2, temp.getJobName().getValue());
pre1.setString(3, temp.getRemarks().getValue());
pre1.addPreparedBatch();
// 插入岗位机构表
pre2.setString(1, temp.getJobId().getValue());
pre2.setString(2, temp.getOrgId().getValue());
pre2.setString(3, temp.getJobId().getValue());
pre2.addPreparedBatch();
}
pre1.executePreparedBatch();
pre2.executePreparedBatch();
tm.commit();
} catch (Throwable e) {
try {
tm.rollback();
} catch (RollbackException e1) {
logger.error("transaction manager roll back error", e1);
}
logger.error("initialData error", e);
}
} catch (Throwable e) {
logger.error(e);
}
}
}
/**
* getTdSmJob
* @param temp
* @return TdSmJob
*/
private TdSmJob getTdSmJob(JobInfo temp) {
TdSmJob tdSmJob = new TdSmJob();
tdSmJob.setJobId(temp.getJobId().getValue());
tdSmJob.setJobName(temp.getJobName().getValue());
tdSmJob.setJobDesc(temp.getRemarks().getValue());
return tdSmJob;
}
/**
* getTdSmOrgJob
* @param temp
* @return TdSmOrgJob
*/
private TdSmOrgJob getTdSmOrgJob(JobInfo temp) {
TdSmOrgJob tdSmOrgJob = new TdSmOrgJob();
tdSmOrgJob.setJobId(temp.getJobId().getValue());
tdSmOrgJob.setOrgId(temp.getOrgId().getValue());
return tdSmOrgJob;
}
public static void main(String[] args) {
SyncJobInfo test = new SyncJobInfo();
test.initialData();
}
}
| [
"yin-bp@163.com"
] | yin-bp@163.com |
d572a59e3665462441a4746e240b2d8f872b5c40 | 4e121bfe9778e3accb5c076ca0e57ae939b6b60e | /geoportal/src/com/esri/gpt/framework/xml/BaseSaxHandler.java | bb0aa54dc75d4ba777460efee50d8049a46a49bd | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unicode",
"LGPL-2.0-or-later",
"CDDL-1.0",
"ICU",
"CC-BY-SA-3.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"JSON",
"NAIST-2003",
"CPL-1.0"
] | permissive | Esri/geoportal-server | 79a126cb1808325426ad2ae66466e84459cf4794 | 29a1c66ebfbcd8f44247fa73b96fed50f52aada1 | refs/heads/master | 2023-08-22T17:20:42.269458 | 2023-06-15T18:50:36 | 2023-06-15T18:50:36 | 5,485,573 | 191 | 89 | Apache-2.0 | 2023-04-16T22:49:39 | 2012-08-20T19:15:11 | C# | UTF-8 | Java | false | false | 7,712 | java | /* See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* Esri Inc. licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.esri.gpt.framework.xml;
import com.esri.gpt.framework.util.Val;
import java.io.IOException;
import java.util.ArrayList;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
/**
* Handles core SAX events during the parsing of an XML document.
*/
public class BaseSaxHandler extends DefaultHandler {
// class variables =============================================================
// instance variables ==========================================================
private StringBuffer _characters = new StringBuffer();
private ArrayList<String> _localNameStack = new ArrayList<String>();
private String _localPath = "";
// constructors ================================================================
/** Default constructor. */
public BaseSaxHandler() {
super();
}
// properties ==================================================================
// methods =====================================================================
/**
* Sets text node characters for a SAX element.
* <br/>This is a core method for a SAX DefaultHandler.
* @param ch the array of characters
* @param start the starting position within the array
* @param length the number of characters to read from the array
* @throws SAXException if the exception occurs
*/
@Override
public final void characters(char ch[], int start, int length)
throws SAXException {
if ((ch != null) && (length > 0)) {
_characters.append(ch,start,length);
}
}
/**
* Ends the SAX document.
* <br/>This is a core method for a SAX DefaultHandler.
* @throws SAXException if a SAXException occurs
*/
@Override
public void endDocument() throws SAXException {
resetCharacters();
resetLocalNameStack();
}
/**
* Ends a SAX element.
* <br/>This is a core method for a SAX DefaultHandler.
* <br/>An onEndSaxElement event is triggered.
* @param uri the uri namespace for the element
* @param localName the local name for the element
* @param qName the qualified name for the element
* @throws SAXException if a SAXException occurs
*/
@Override
public final void endElement(String uri, String localName, String qName)
throws SAXException {
try {
onEndSaxElement(uri,localName,qName,_localPath,_characters.toString());
} finally {
resetCharacters();
popLocalName();
}
}
/**
* Triggered when an element is ended during the
* parsing of an XML document.
* <br/>There is no default implementation.
* @param uri the uri namespace for the element
* @param localName the local name for the element
* @param qName the qualified name for the element
* @param localPath the local path for the element
* @param textNodeValue the text node value for the element
* @throws SAXException if a SAXException occurs
*/
protected void onEndSaxElement(String uri,
String localName,
String qName,
String localPath,
String textNodeValue)
throws SAXException {
// no default implementation
//System.err.println("onEnd: "+localPath+" = "+textNodeValue);
}
/**
* Triggered when an element is started during the
* parsing of an XML document.
* <br/>There is no default implementation.
* @param uri the uri namespace for the element
* @param localName the local name for the element
* @param qName the qualified name for the element
* @param localPath the local path for the element
* @param attributes the attributes for the element
* @throws SAXException if a SAXException occurs
*/
protected void onStartSaxElement(String uri,
String localName,
String qName,
String localPath,
Attributes attributes)
throws SAXException {
// no default implementation
//System.err.println("onStart: "+localPath);
}
/**
* Starts a SAX parser on an XML string.
* @param xml the XML string to parse
* @param namespaceAware flag indication if the parser should be namespace aware
* @throws ParserConfigurationException if the exception occurs
* @throws SAXException if the exception occurs
* @throws IOException if the exception occurs
*/
public void parse(String xml, boolean namespaceAware)
throws ParserConfigurationException, SAXException, IOException {
SaxUtil.parse(this,xml,namespaceAware);
}
/**
* Pops a local element name from the stack and resets the local path
* <br/>The name is removed from the stack.
*/
private void popLocalName() {
int nSize = _localNameStack.size();
if (nSize > 0) {
_localNameStack.remove(nSize - 1);
}
resetLocalPath();
}
/**
* Pushes a local element name onto the stack and resets the local path.
* @param uri the uri namespace for the element
* @param localName the local name for the element
* @param qName the qualified name for the element
*/
private void pushLocalName(String uri, String localName, String qName) {
String sName = Val.chkStr(qName);
if (sName.length() == 0) {
sName = Val.chkStr(localName);
if (sName.length() == 0) {
sName = "unknownElementName";
}
}
_localNameStack.add(sName);
resetLocalPath();
}
/**
* Resets the text node characters for the current SAX element.
*/
private void resetCharacters() {
_characters = new StringBuffer();
}
/**
* Resets the local element name stack.
*/
private void resetLocalNameStack() {
_localNameStack = new ArrayList<String>();
resetLocalPath();
}
/**
* Resets the local path for the active element.
* <br/>The local path is derived from the local name stack.
*/
private void resetLocalPath() {
StringBuffer sbPath = new StringBuffer();
int n = _localNameStack.size();
for (int i=0;i<n;i++) {
if (i > 0) {
sbPath.append("/");
}
String sName = (String)_localNameStack.get(i);
sbPath.append(sName);
}
_localPath = sbPath.toString();
}
/**
* Starts the SAX document.
* <br/>This is a core method for a SAX DefaultHandler.
* @throws SAXException if a SAXException occurs
*/
@Override
public void startDocument() throws SAXException {
resetCharacters();
resetLocalNameStack();
}
/**
* Starts a SAX element.
* <br/>This is a core method for a SAX DefaultHandler.
* <br/>An onStartSaxElement event is triggered.
* @param uri the uri namespace for the element
* @param localName the local name for the element
* @param qName the qualified name for the element
* @param attributes the attributes for the element
* @throws SAXException if a SAXException occurs
*/
@Override
public final void startElement(String uri,
String localName,
String qName,
Attributes attributes)
throws SAXException {
resetCharacters();
pushLocalName(uri,localName,qName);
onStartSaxElement(uri,localName,qName,_localPath,attributes);
}
}
| [
"mhogeweg@esri.com"
] | mhogeweg@esri.com |
dcad19f72f5c1e1ad2e5d40db49e705aedaaaf9a | fa2d84d1fd00ee5ffd0cb85808dce6f0d909d204 | /bigdata/src/main/java/com/zqh/crunch/CrunchUtil.java | a8f0ab08721ce4418822964758aa1aac3bf6b8fd | [] | no_license | hbwzhsh/tutorials | 8ad70095fa9c4a5d3f2ca27a98afe404a1e0101c | 02d0f97da44e71f3fd47def8010611796efce3e8 | refs/heads/master | 2021-01-18T00:58:05.822652 | 2015-05-29T08:28:26 | 2015-05-29T08:28:26 | 36,609,864 | 1 | 0 | null | 2015-05-31T15:42:17 | 2015-05-31T15:42:17 | null | UTF-8 | Java | false | false | 701 | java | package com.zqh.crunch;
import org.apache.crunch.Pipeline;
import org.apache.crunch.impl.mem.MemPipeline;
import org.apache.crunch.impl.mr.MRPipeline;
import org.apache.crunch.impl.spark.SparkPipeline;
import org.apache.hadoop.conf.Configuration;
import org.apache.spark.api.java.JavaSparkContext;
/**
* Created by hadoop on 15-1-14.
*/
public class CrunchUtil {
public Pipeline getMRPipeline(Configuration conf){
return new MRPipeline(CrunchUtil.class, conf);
}
public Pipeline getMemPipeline(){
return MemPipeline.getInstance();
}
public Pipeline getSparkPipeline(JavaSparkContext sparkContext){
return new SparkPipeline(sparkContext, "");
}
}
| [
"zqhxuyuan@gmail.com"
] | zqhxuyuan@gmail.com |
d1858486b38451b7a7185763225830b47790b7f7 | fe9aaffc4f4be3af5911faa4c00378cda90a2f55 | /src/main/java/org/taxireferral/api/ModelRoles/Deprecated/Admin.java | e940c4cc5886fde5aaffe839727190d2a40aa64d | [
"MIT"
] | permissive | intelij/Taxi-Referral-Service-API | 13cb8aa374a2bccddeae34f56666e83147618e9d | e0b555ca959b810080e88fb746f3fa7a227e24e6 | refs/heads/master | 2021-09-08T17:23:09.615285 | 2018-03-11T09:14:32 | 2018-03-11T09:14:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 207 | java | package org.taxireferral.api.ModelRoles.Deprecated;
import org.taxireferral.api.ModelRoles.User;
import java.sql.Timestamp;
/**
* Created by sumeet on 29/5/16.
*/
public class Admin extends User {
}
| [
"sumeet.0587@gmail.com"
] | sumeet.0587@gmail.com |
a5e0dbfb0258a400127fe762f42fe56d656558ce | 35fc8a2408ab4fd12183e6b6d28d8b71ac1cff44 | /src/com/boredream/meowmoment/util/StringUtils.java | a62aed979da196501c4d5f559e5476a6d4fdbe87 | [] | no_license | boredream/MeowMoment | fec72138ad95380bd3edce9de120a9c7c31dbee9 | 7ab48cbce8c02b2c3aba40ae1931101459b7f8a7 | refs/heads/master | 2020-06-02T18:57:34.538532 | 2015-07-28T09:43:50 | 2015-07-28T09:43:50 | 17,890,241 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,524 | java | package com.boredream.meowmoment.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class StringUtils {
public static final String DATE_FORMAT = "yyyy-MM-dd";
public static final String TIME_FORMAT = "HH:mm:ss";
public static final String DATE_FORMAT_WITHOUT_YEAR = "MM-dd";
public static final String TIME_FORMAT_WITHOUT_SECOND = "HH:mm";
public static String formatTime(Date date) {
SimpleDateFormat srcDateFormat = new SimpleDateFormat(DATE_FORMAT + " "
+ TIME_FORMAT, Locale.CHINA);
return srcDateFormat.format(date);
}
/**
* 日期转换规则:今年以内的显示"时:分",昨天的显示字符"昨天",再之前的显示"年/月/日"
*
* @param srcString
* @return
* @throws ParseException
*/
public static String parseDateString(String srcString)
throws ParseException {
String newString = null;
SimpleDateFormat srcDateFormat = new SimpleDateFormat(DATE_FORMAT + " "
+ TIME_FORMAT, Locale.CHINA);
Date date = srcDateFormat.parse(srcString);
int yesterday = isYesterday(date, new Date());
SimpleDateFormat newDateFormat;
switch (yesterday) {
case -1:
newDateFormat = new SimpleDateFormat(TIME_FORMAT_WITHOUT_SECOND, Locale.CHINA);
newString = newDateFormat.format(date);
break;
case 0:
newString = "昨天";
break;
default:
newDateFormat = new SimpleDateFormat(DATE_FORMAT_WITHOUT_YEAR, Locale.CHINA);
newString = newDateFormat.format(date);
break;
}
return newString;
}
/**
* @param oldTime
* 较小的时间
* @param newTime
* 较大的时间 (如果为空 默认当前时间 ,表示和当前时间相比)
* @return -1 :同一天. 0:昨天 . 1 :至少是前天.
* @throws ParseException
* 转换异常
*/
private static int isYesterday(Date oldTime, Date newTime)
throws ParseException {
if (newTime == null) {
newTime = new Date();
}
// 将下面的 理解成 yyyy-MM-dd 00:00:00 更好理解点
SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT, Locale.CHINA);
String todayStr = format.format(newTime);
Date today = format.parse(todayStr);
// 昨天 86400000=24*60*60*1000 一天
if ((today.getTime() - oldTime.getTime()) > 0
&& (today.getTime() - oldTime.getTime()) <= 86400000) {
return 0;
}
else if ((today.getTime() - oldTime.getTime()) <= 0) { // 至少是今天
return -1;
}
else { // 至少是前天
return 1;
}
}
}
| [
"48262906@qq.com"
] | 48262906@qq.com |
1ee9e09adb94c5b7eb82d710232454f5663b1ef6 | 10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94 | /callmgrd/src/main/java/c/v/c/b/Q.java | 68bda84da3463befddfa4d99155941cca9903e9c | [] | no_license | EchoAGI/Flexispy.re | a2f5fec409db083ee3fe0d664dc2cca7f9a4f234 | ba65a5b8b033b92c5867759f2727c5141b7e92fc | refs/heads/master | 2023-04-26T02:52:18.732433 | 2018-07-16T07:46:56 | 2018-07-16T07:46:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 548 | java | package c.v.c.b;
public class Q
{
public native char getCh(String paramString);
public native void jbooleanVal(boolean paramBoolean);
public native void nun();
public native boolean stringH(String paramString1, String paramString2);
public native int vocalize(String paramString);
public native int xpath(String paramString);
}
/* Location: /Volumes/D1/codebase/android/POC/assets/product/callmgr/classes-enjarify.jar!/c/v/c/b/Q.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/ | [
"52388483@qq.com"
] | 52388483@qq.com |
62b4937dc145708f29f3223a69b4e9aebab04d77 | ae5fb8e762559c13d09c0724f95f8e0dbbe6a58d | /metier/esco-web/src/main/java/org/esco/grouperui/web/plugins/AbstractTabsControllerAware.java | 11c12502f4140cee4806cefb86d260f3ba67e898 | [
"Apache-2.0"
] | permissive | GIP-RECIA/esco-grouper-ui | 1b840844aa18ea6a752399b4ba8441fd08766aa1 | d48ad3cb0a71d5811bbd49f9e6911ee778af1c78 | refs/heads/master | 2021-01-10T17:30:30.880810 | 2014-09-02T08:11:55 | 2014-09-02T08:11:55 | 8,556,656 | 0 | 1 | null | 2014-09-02T08:11:55 | 2013-03-04T14:01:17 | Java | UTF-8 | Java | false | false | 5,720 | java | /**
* Copyright (C) 2009 GIP RECIA http://www.recia.fr
* @Author (C) 2009 GIP RECIA <contact@recia.fr>
* @Contributor (C) 2009 SOPRA http://www.sopragroup.com/
* @Contributor (C) 2011 Pierre Legay <pierre.legay@recia.fr>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.esco.grouperui.web.plugins;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import org.esco.grouperui.web.controllers.AbstractContextAwareController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
/**
* @author dMoulron
*/
public abstract class AbstractTabsControllerAware extends AbstractContextAwareController implements
ITabsControllerAware, ApplicationContextAware {
/**
* The serial uid.
*/
private static final long serialVersionUID = 676330312169407184L;
/** list of controller for summary. */
protected List < ITabController > tabControllers;
/** spring application context. */
private ApplicationContext applicationContext;
/**
* {@inheritDoc}
*/
@Override
public void afterPropertiesSetInternal() {
super.afterPropertiesSetInternal();
// find all bean according to this group bean.
List < String > tabsControllers = TabsControllerAggregator.getChild(this.getTabsControllerId());
for (String idController : tabsControllers) {
ITabController tabController = (ITabController) this.applicationContext.getBean(idController);
tabController.setParentController(this);
if (this.tabControllers == null) {
this.tabControllers = new ArrayList < ITabController >();
}
this.tabControllers.add(tabController);
}
}
/**
* @return the spring bean id of group controller.
*/
public abstract String getTabsControllerId();
/**
* setter for property groupControllers.
*
* @param theGroupControllers
* the groupControllers to set
*/
public void setGroupControllers(final List < ITabController > theGroupControllers) {
this.tabControllers = theGroupControllers;
Iterator < ITabController > itGroupController = theGroupControllers.iterator();
while (itGroupController.hasNext()) {
ITabController iGroupController = itGroupController.next();
iGroupController.setParentController(this);
}
}
/**
* @return list of all tabs for this group controller.
*/
public List < TabInfo > getTabs() {
List < TabInfo > tabInfos = new ArrayList < TabInfo >();
for (ITabController controller : this.tabControllers) {
TabInfo tabInfo = controller.calculateTabInfo();
tabInfos.add(tabInfo);
}
this.desactivate(TypeEntryPlugin.RESUME);
this.desactivate(TypeEntryPlugin.TAB);
Collections.sort(tabInfos, new Comparator < TabInfo >() {
public int compare(final TabInfo theO1, final TabInfo theO2) {
int posO1 = -100;
int posO2 = -100;
try {
posO1 = Integer.parseInt(theO1.getOrder());
} catch (NumberFormatException e) {
}
try {
posO2 = Integer.parseInt(theO2.getOrder());
} catch (NumberFormatException e) {
}
return posO1 - posO2;
}
});
return tabInfos;
}
/**
* scan all sub controller for desactivate tab needed.
*
* @param theTypeEntryPlugin
* the type of descativation.
*/
private void desactivate(final TypeEntryPlugin theTypeEntryPlugin) {
for (ITabController controller : this.tabControllers) {
for (ITabController controller2 : this.tabControllers) {
AbstractControllerAware groupController2 = (AbstractControllerAware) controller2;
if (TypeEntryPlugin.RESUME.equals(theTypeEntryPlugin)
&& controller.getTabInfo().getIsResume()) {
groupController2.desactivateIt(controller.getTabInfo().getDesactivate(),
theTypeEntryPlugin);
} else
if (TypeEntryPlugin.TAB.equals(theTypeEntryPlugin)
&& controller.getTabInfo().getisPresent()) {
groupController2.desactivateIt(controller.getTabInfo().getDesactivate(),
theTypeEntryPlugin);
}
}
}
}
/**
* setter for property applicationContext.
*
* @param theApplicationContext
* the applicationContext to set
*/
public void setApplicationContext(final ApplicationContext theApplicationContext) {
this.applicationContext = theApplicationContext;
}
}
| [
"julien.gribonvald@gmail.com"
] | julien.gribonvald@gmail.com |
f3079eb80ce71b855bac4769fbdbb230e1dedbd6 | 32f38cd53372ba374c6dab6cc27af78f0a1b0190 | /app/src/main/java/com/alipay/mobile/nebulacore/tabbar/H5SessionTabObserver.java | 2fb725f66e775d7735216e13ac4849dd5f0859c4 | [] | no_license | shuixi2013/AmapCode | 9ea7aefb42e0413f348f238f0721c93245f4eac6 | 1a3a8d4dddfcc5439df8df570000cca12b15186a | refs/heads/master | 2023-06-06T23:08:57.391040 | 2019-08-29T04:36:02 | 2019-08-29T04:36:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 659 | java | package com.alipay.mobile.nebulacore.tabbar;
public class H5SessionTabObserver {
private volatile H5SessionTabListener a;
private volatile String b;
public interface H5SessionTabListener {
void onDataParsed(String str);
}
public synchronized H5SessionTabListener setData(String data) {
try {
this.b = data;
}
return this.a;
}
public synchronized String getData(H5SessionTabListener h5SessionTabListener) {
try {
this.a = h5SessionTabListener;
}
return this.b;
}
public void clear() {
this.a = null;
this.b = null;
}
}
| [
"hubert.yang@nf-3.com"
] | hubert.yang@nf-3.com |
1e68c5f2af624a0704e781402e7618b93b1cf585 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a227/A227162Test.java | 23dd6f1ab8bd1dad629bc4c3ba6b017894ba916d | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package irvine.oeis.a227;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A227162Test extends AbstractSequenceTest {
}
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
87c315fca3d3a7c1d3081eaf106a2aba8b430f4d | b80eea6e56730144566e67ded030e364fbf9f042 | /core/src/test/java/cn/leancloud/AVPushTest.java | 388db9d2a2eae6dfe7ac4f3ddd47f600fc32bd79 | [
"Apache-2.0"
] | permissive | yin-haoran/java-unified-sdk | 1c64f43ee3c151cb2b1372f73ca45629f68c722e | 34542bb4bf61e47ce3ea5f2df845c14a668217c6 | refs/heads/master | 2023-04-10T05:05:08.714448 | 2021-04-22T01:28:28 | 2021-04-22T01:28:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,747 | java | package cn.leancloud;
import cn.leancloud.json.JSONObject;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
import junit.framework.TestCase;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
public class AVPushTest extends TestCase {
private boolean testSucceed;
public AVPushTest(String name) {
super(name);
Configure.initializeRuntime();
}
public void testSimplePush() throws Exception {
AVPush push = new AVPush();
push.setMessage("test from unittest");
push.send();
}
public void testIOSEnvironment() throws Exception {
AVPush push = new AVPush();
Map<String, Object> pushData = new HashMap<>();
pushData.put("alert", "wmq2");
pushData.put("body", "LeanCloud 发送测试2");
push.setPushToIOS(true);
push.setPushToAndroid(false);
push.setData(pushData);
push.setFlowControl( 200);
push.setChannel("03fc00e69bea4da98a5fbadb2432a53f");
push.setiOSEnvironment(AVPush.iOSEnvironmentDev);
final CountDownLatch latch = new CountDownLatch(1);
testSucceed = false;
push.sendInBackground().subscribe(new Observer<JSONObject>() {
@Override
public void onSubscribe(Disposable disposable) {
}
@Override
public void onNext(JSONObject jsonObject) {
System.out.println("send succeed. " + jsonObject);
testSucceed = true;
latch.countDown();
}
@Override
public void onError(Throwable throwable) {
latch.countDown();
}
@Override
public void onComplete() {
}
});
latch.await();
assertTrue(testSucceed);
}
public void testPushFlowControl() throws Exception {
AVPush push = new AVPush();
Map<String, Object> pushData = new HashMap<>();
pushData.put("alert", "push message to android device directly");
push.setPushToAndroid(true);
push.setData(pushData);
push.setFlowControl( 200);
assertEquals(push.getFlowControl(), 1000);
final CountDownLatch latch = new CountDownLatch(1);
testSucceed = false;
push.sendInBackground().subscribe(new Observer<JSONObject>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(JSONObject jsonObject) {
System.out.println("推送成功" + jsonObject);
testSucceed = true;
latch.countDown();
}
@Override
public void onError(Throwable e) {
e.printStackTrace();
System.out.println("推送失败,错误信息:" + e.getMessage());
latch.countDown();
}
@Override
public void onComplete() {
}
});
latch.await();
assertTrue(testSucceed);
}
public void testPushTargetWithData() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
testSucceed = false;
AVPush push = new AVPush();
Map<String, Object> pushData = new HashMap<>();
pushData.put("alert", "push message to android device directly");
push.setPushToAndroid(true);
push.setData(pushData);
push.sendInBackground().subscribe(new Observer<JSONObject>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(JSONObject jsonObject) {
System.out.println("推送成功" + jsonObject);
testSucceed = true;
latch.countDown();
}
@Override
public void onError(Throwable e) {
e.printStackTrace();
System.out.println("推送失败,错误信息:" + e.getMessage());
latch.countDown();
}
@Override
public void onComplete() {
}
});
latch.await();
assertTrue(testSucceed);
}
}
| [
"jwfing@gmail.com"
] | jwfing@gmail.com |
abb30e19a302c4f316db7106359edef0b3fdbd4d | 73267be654cd1fd76cf2cb9ea3a75630d9f58a41 | /services/vod/src/main/java/com/huaweicloud/sdk/vod/v1/model/DeleteWatermarkTemplateResponse.java | e73590b36ced665c96d78a6d04c705d7ee202dae | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-java-v3 | 51b32a451fac321a0affe2176663fed8a9cd8042 | 2f8543d0d037b35c2664298ba39a89cc9d8ed9a3 | refs/heads/master | 2023-08-29T06:50:15.642693 | 2023-08-24T08:34:48 | 2023-08-24T08:34:48 | 262,207,545 | 91 | 57 | NOASSERTION | 2023-09-08T12:24:55 | 2020-05-08T02:27:00 | Java | UTF-8 | Java | false | false | 760 | java | package com.huaweicloud.sdk.vod.v1.model;
import com.huaweicloud.sdk.core.SdkResponse;
import java.util.Objects;
/**
* Response Object
*/
public class DeleteWatermarkTemplateResponse extends SdkResponse {
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteWatermarkTemplateResponse {\n");
sb.append("}");
return sb.toString();
}
}
| [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
521dcb551b8a8f34be43bb5a1d305390871cb5b4 | d2bc21009ad00aeb444d0581790f11d4cf3f82a2 | /src/test/java/net/thucydides/jbehave/steps/SomeThucydidesSteps.java | 83cb48fa4e1ba22e188e2a73054527b49e439c5c | [] | no_license | thucydides-webtests/thucydides-jbehave | 5d2a8371c230f22333b42f53ab199c197ec6f8ac | a2e8856e80b3488b4f2e3fa0af05cda5c88e92eb | refs/heads/master | 2022-12-22T17:23:53.912346 | 2014-10-25T21:56:12 | 2014-10-25T21:56:12 | 4,713,832 | 1 | 7 | null | 2022-12-16T00:47:38 | 2012-06-19T13:17:45 | Java | UTF-8 | Java | false | false | 515 | java | package net.thucydides.jbehave.steps;
import net.thucydides.core.annotations.Pending;
import net.thucydides.core.annotations.Step;
public class SomeThucydidesSteps {
@Step
public void step1() {
System.out.println("STEP 1");
}
@Step
public void step2() {
System.out.println("STEP 2");}
@Step
public void step3() {
System.out.println("STEP 3");
}
@Pending
@Step
public void pendingStep() {
System.out.println("PENDING STEP");
}
}
| [
"john.smart@wakaleo.com"
] | john.smart@wakaleo.com |
7c203cc8fa4ec1436d5651487003ce7c5d8887d7 | faf51c37b26479539ce34b5a7f0122ae35e7b5b4 | /src/main/java/svenhjol/charm/decoration/container/CrateSlot.java | 4261703878dd84581bd875561361e8799f48e3bb | [
"MIT"
] | permissive | Blueberryy/Charm | 3a52a921984c47ecfa1626da6312bc14ca68168a | 2134115584cd324eefa1cd259bf76e4af488470e | refs/heads/master | 2021-01-01T11:58:28.192100 | 2020-02-28T13:50:27 | 2020-02-28T13:50:27 | 239,267,933 | 0 | 0 | null | 2020-02-09T08:02:11 | 2020-02-09T08:02:11 | null | UTF-8 | Java | false | false | 508 | java | package svenhjol.charm.decoration.container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import svenhjol.charm.decoration.module.Crates;
public class CrateSlot extends Slot
{
public CrateSlot(IInventory inventory, int slotIndex, int x, int y)
{
super(inventory, slotIndex, x, y);
}
@Override
public boolean isItemValid(ItemStack stack)
{
return Crates.canInsertItem(stack);
}
}
| [
"sven.hjol@protonmail.com"
] | sven.hjol@protonmail.com |
b01271020e87e88f7459e53d84d83076e66e79d9 | 6455923403eeb1a0d880c3d82b1306a41b356c98 | /src/main/java/com/test/automation/selenium/testScripts/Recurring/TC_Customer_AddCustomer_Check_Token.java | aa558b95e138071741d81835ccee89681b79d11c | [] | no_license | aritraautomation/UIAutomation | 8db586c9d27d4e673f0594f11f5f867dc8d8a306 | 94e070354f2fdc53a0136440e70f167dc19d011c | refs/heads/master | 2023-02-02T23:27:22.052461 | 2020-12-24T14:42:16 | 2020-12-24T14:42:16 | 324,151,173 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,439 | java | package com.test.automation.selenium.testScripts.Recurring;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import com.test.automation.selenium.businesscomponents.*;
import com.test.automation.selenium.framework.Browser;
import com.test.automation.selenium.framework.logResult;
public class TC_Customer_AddCustomer_Check_Token {
Browser browser;
logResult logresult;
public WebDriver driver;
String txtBillingPlan = null;
String txtTokenNumber = null;
String txtCustomerNo = null;
String txtCustomerName = null;
String txtPhoneNo = null;
public void ExecuteTest(String browserType, String strProgramDetails, String strTestEnvDetails, logResult result) throws Exception
{
this.logresult = result;
browser=new Browser(this.logresult);
this.driver = browser.Open(browserType,BCEnvironment.appURL);
Login login = Login.getInstance();
TokenManager token = new TokenManager();
Recurring rd = new Recurring();
Logout logout = new Logout();
String credentials = login.run(6, browser, logresult);
Thread.sleep(4000);
token.requestCheckToken(4, browser, logresult);
Thread.sleep(1000);
token.requestCheckToken(6, browser, logresult);
Thread.sleep(1000);
token.requestCheckToken(8, browser, logresult);
Thread.sleep(1000);
try{
driver=browser.driver;
txtTokenNumber = driver.findElement(By.id("requestTokenCopyInput")).getAttribute("value");
browser.excel.storeCellData("Recurring_CustomerAdd", txtTokenNumber, 29, 27);
Thread.sleep(1000);
}
catch(Exception e){
logresult.logTest("Test Execution", "Status", "INFO", "Exception occurred!!!", e.getMessage(), "");
}
token.requestCheckToken(32, browser, logresult);
Thread.sleep(1000);
rd.addBillingPlan(4, browser, logresult);
Thread.sleep(1000);
rd.addCustomer(4, browser, logresult);
Thread.sleep(1000);
rd.addCustomer(30, browser, logresult);
Thread.sleep(1000);
try{
driver=browser.driver;
driver.findElement(By.xpath("//div[@id='billingPlan-0']/ul/li[2]/a")).click();
Thread.sleep(1000);
}
catch(Exception e){
logresult.logTest("Test Execution", "Status", "INFO", "Exception occurred!!!", e.getMessage(), "");
}
rd.addCustomer(8, browser, logresult);
Thread.sleep(1000);
try{
driver=browser.driver;
txtCustomerNo = driver.findElement(By.id("customerNumber")).getAttribute("value");
browser.excel.storeCellData("Recurring_CustomerAdd", "text::"+txtCustomerNo, 12, 67);
txtCustomerName = driver.findElement(By.id("customerName")).getAttribute("value");
browser.excel.storeCellData("Recurring_CustomerAdd", "text::"+txtCustomerName, 12, 68);
txtPhoneNo = driver.findElement(By.id("phoneNumber")).getAttribute("value");
browser.excel.storeCellData("Recurring_CustomerAdd", "text::"+txtPhoneNo, 12, 69);
Thread.sleep(1000);
}
catch(Exception e){
logresult.logTest("Test Execution", "Status", "INFO", "Exception occurred!!!", e.getMessage(), "");
}
rd.addCustomer(10, browser, logresult);
Thread.sleep(1000);
rd.addCustomer(12, browser, logresult);
Thread.sleep(1000);
logout.run(4, browser, logresult);
Thread.sleep(1000);
logout.run(6, browser, logresult);
Thread.sleep(1000);
logout.run(8, browser, logresult);CredentialManager.getInstance().releaseCredentials(credentials);
Thread.sleep(1000);
browser.Close();
}
}
| [
"aritras@rssoftware.co.in"
] | aritras@rssoftware.co.in |
cd08623122f94519287f492b9b07126ab81cf84e | cd76e7fd5a16e44dc9cc73308bd2de6a1f63e803 | /src/by/epam/like_it/service/validator/Validator.java | eaa1cf90ef8c751a051adbdd87d07f945add0edf | [] | no_license | Redchush/LIKE_IT | 5345f4193a7aae595955ee861042fd7560773e28 | 5c977875478e0bc64c80710412006de20db7dc6f | refs/heads/master | 2021-01-17T16:17:28.612482 | 2016-10-13T08:25:38 | 2016-10-13T08:25:38 | 70,783,902 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 852 | java | package by.epam.like_it.service.validator;
import by.epam.like_it.exception.service.validation.info.ValidationInfoException;
import by.epam.like_it.model.bean.util_interface.Entity;
import by.epam.like_it.service.validator.util.ValidationNavigator;
/**
* Provides interface to validate input parameters
* @param <T> - param of entity to be validated
*/
public interface Validator<T> {
ValidationNavigator NAVIGATOR = ValidationNavigator.getInstance();
/**
* Validates the values in the fields of the object entity. Throw an ValidationInfoException with the InvalidInfo
* object in case of failing validation
* @param entity object type T which is need vo validate.
*
*/
void isValidForCreate(T entity) throws ValidationInfoException;
void isValidForUpdate(T entity) throws ValidationInfoException;
}
| [
"redchush@gmail.com"
] | redchush@gmail.com |
ef1b740cc238b2443dda5d542765cc0438831abb | 6ccb70181b91915c718e20acac14fcc82abb9135 | /com.tojoy.order.service/com.tojoy.order.util/src/main/java/com/tojoy/vhall/api/WebinarAPI.java | 8c6c3e88f70baa470b61a89e45eff2467ca5ba65 | [] | no_license | sengeiou/jtwarehouse | 70592aee6408878269f8b07ebb29308c488aacc7 | ca272915eb222e93d331de00418550dad2a5cc46 | refs/heads/master | 2021-09-01T23:18:22.496819 | 2017-12-29T04:50:01 | 2017-12-29T04:50:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,177 | java | package com.tojoy.vhall.api;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import com.alibaba.fastjson.JSON;
import com.tojoy.vhall.resp.WebinarChatResp;
import com.tojoy.vhall.resp.WebinarFetchResp;
import com.tojoy.vhall.resp.WebinarListResp;
import com.tojoy.vhall.resp.WebinarStateResp;
import com.tojoy.vhall.resp.WebinarTrackResp;
import com.tojoy.vhall.resp.WebinarWholeAuthUrlResp;
/**
* 微活动(也称会议)API
* @author liangwj
* @version 1.0
*/
public class WebinarAPI extends BaseAPI {
private static final String LIST_URL = "http://e.vhall.com/api/vhallapi/v2/webinar/list";
private static final String FETCH_URL = "http://e.vhall.com/api/vhallapi/v2/webinar/fetch";
private static final String STATE_URL = "http://e.vhall.com/api/vhallapi/v2/webinar/state";
private static final String TRACK_URL = "http://e.vhall.com/api/vhallapi/v2/report/track";
private static final String CHAT_URL = "http://e.vhall.com/api/vhallapi/v2/chat/history";
private static final String WHOLE_AUTH_URL = "http://e.vhall.com/api/vhallapi/v2/webinar/whole-auth-url";
/**
* 获取活动列表
* @return
*/
public final static WebinarListResp listWebinar(Integer page, Integer rows){
Map<String, String> params = new HashMap<String, String>();
Integer start = (page-1)*rows;
params.put("limit", rows.toString());
params.put("pos", start.toString());
return new WebinarListResp(doPostVhall(LIST_URL, params));
}
/**
* 获取活动信息
* @param webinar_id 活动ID
* @return
*/
public final static WebinarFetchResp fetchWebinar(String webinar_id){
Map<String, String> params = new HashMap<String, String>();
params.put("webinar_id", webinar_id);
params.put("fields", "id,alias_name,user_id,subject,introduction,img_url,category,is_open,layout,verify,password"
+ ",type,is_single_video,is_iframe,auto_record,is_chat,buffer,t_start,end_time,host,live_start_time");
Map<String, ?> result = doPostVhall(FETCH_URL, params);
return new WebinarFetchResp(result);
}
/**
* 获取活动状态
* @param webinar_id 活动ID
* @return
*/
public final static WebinarStateResp stateWebinar(String webinar_id){
Map<String, String> params = new HashMap<String, String>();
params.put("webinar_id", webinar_id);
Map<String, ?> result = doPostVhall(STATE_URL, params);
return new WebinarStateResp(result);
}
/**
* 获取活动观众观看记录
* @param webinar_id 活动ID
* @param type 类型 1为直播,2为回放,默认为直播
* @return
*/
public final static WebinarTrackResp trackWebinar(String webinar_id, int type){
Map<String, String> params = new HashMap<String, String>();
params.put("webinar_id", webinar_id);
params.put("type", String.valueOf(type==2?2:1));
//params.put("pos", "1");
//params.put("limit", "1000");
Map<String, ?> result = doPostVhall(TRACK_URL, params);
return new WebinarTrackResp(result);
}
/**
* 获取活动历史聊天记录
* @param webinar_id 活动ID
* @param startTime 形如2016-11-30 10:16:43,只获取在该时间后的
* @param endTime 形如2016-11-30 10:16:43,只获取在该时间前的
* @param pos 分页开始 数字
* @param limit 返回条数 数字
* @return
*/
public final static WebinarChatResp chatWebinar(String webinar_id, String startTime, String endTime, int pos, int limit){
Map<String, String> params = new HashMap<String, String>();
params.put("webinar_id", webinar_id);
if(StringUtils.isNotBlank(startTime)){
params.put("start_time", startTime);
}
if(StringUtils.isNotBlank(endTime)){
params.put("end_time", endTime);
}
params.put("pos", String.valueOf(pos<=0?1:pos));
params.put("limit", String.valueOf(limit<=0||limit>200?200:limit));
Map<String, ?> result = doPostVhall(CHAT_URL, params);
return new WebinarChatResp(result);
}
/**
* 全局配置第三方K值验证URL,针对所有的活动配置生效,如果针对单个活动再做配置,以单个活动配置为最终配置
* @param exist_3rd_auth默认为0不开启,1为开启,是否开启第三方K值验证查看说明
* @param auth_url http://domain,<256个字符,第三方K值验证接口URL(exist_3rd_auth为1必填)
* @param failure_url http://domain,<256个字符,第三方K值验证失败跳转URL(可选)
* @param cover_child 是否覆盖子账号,1为覆盖,0为不覆盖,默认为0
* @return
*/
public final static WebinarWholeAuthUrlResp wholeAuthUrlWebinar (int exist_3rd_auth,String auth_url,String failure_url,int cover_child){
Map<String, String> params = new HashMap<String, String>();
params.put("exist_3rd_auth", String.valueOf(exist_3rd_auth));
params.put("auth_url", auth_url==null?"":auth_url);
params.put("failure_url", failure_url==null?"":failure_url);
params.put("cover_child", String.valueOf(cover_child));
Map<String, ?> result = doPostVhall(WHOLE_AUTH_URL, params);
return new WebinarWholeAuthUrlResp(result);
}
/**
* 获取上传视频列表
* @return
*/
public final static WebinarListResp listUploadWebinar(Integer page,Integer rows){
Map<String, String> params = new HashMap<String, String>();
Integer start = (page-1)*rows;
params.put("limit", rows.toString());
params.put("pos", start.toString());
params.put("status", "4");
return new WebinarListResp(doPostVhall(LIST_URL, params));
}
public static void main(String[] args){
String webinar_id = "710282432";
// WebinarFetchResp p1 = fetchWebinar(webinar_id);
// WebinarStateResp p2 = stateWebinar(webinar_id);
// WebinarTrackResp p3 = trackWebinar(webinar_id,1);
// WebinarChatResp p4 = chatWebinar(webinar_id,null,null,0,1000);
WebinarWholeAuthUrlResp p5 = wholeAuthUrlWebinar(1,"http://www.51adven.com/wxfront/m/vhall/validk.jhtml","",1);
// System.out.println(JSON.toJSON(p1));
// System.out.println(JSON.toJSON(p2));
// System.out.println(JSON.toJSON(p3));
// System.out.println(JSON.toJSON(p4));
System.out.println(JSON.toJSON(p5));
}
}
| [
"fglovezzr@163.com"
] | fglovezzr@163.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.