blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6cdbd816725705f75253910165222351f17b3b26
|
154a885ad39ece031e5224f99b2f8a3082fcb000
|
/Day_0114/src/Exam_06.java
|
ea4023749f1faf449a5d539ff8c62074397dec7e
|
[] |
no_license
|
moonhwan123/moonhwan
|
1b1e2fbc5589ac24d0806029465cdc232f5b9b29
|
84aa4dd9ca1a2f373d91ccbabce154f05c45c3c6
|
refs/heads/master
| 2021-07-05T04:46:46.814625
| 2021-04-01T09:21:19
| 2021-04-01T09:21:19
| 228,724,072
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 641
|
java
|
/*
[생성자]
1. 생성자 오버 로딩
2. 생성자 호출 : this() , this
*/
class EE{
int x;
int y;
EE(){
this(100);
System.out.println("default 생성자 호출");
// this(100,200); -> 첫줄에 딱 한번 호출 가능함
}
EE(int x){
this(x,200);
this.x = x;
System.out.println("매개 변수 1개 생성자 호출");
}
EE(int x, int y){
this.x = x;
this.y = y;
System.out.println("매개 변수 2개 생성자 호출");
}
}
public class Exam_06 {
public static void main(String[] args) {
EE e1 = new EE();
System.out.println("x = "+e1.x);
System.out.println("y = "+e1.y);
}
}
|
[
"58998949+moonhwan123@users.noreply.github.com"
] |
58998949+moonhwan123@users.noreply.github.com
|
358efa61a79fe22e161a22f2390a0c9fa9687384
|
beffc6542dc4bf85946ceca7cca4a31ac230d376
|
/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/quartz/AutowireCapableBeanJobFactory.java
|
74dffa928dc3961d372455f688b27a346198782a
|
[
"Apache-2.0"
] |
permissive
|
ZhouKaiDongGitHub/spring-boot-2.0.x
|
4395970b183eff7321748d4ad0155784aa94eaa6
|
3f443764747c4ee01085bed6381292fa44744a49
|
refs/heads/master
| 2023-01-07T07:27:51.067468
| 2020-09-13T07:13:04
| 2020-09-13T07:13:04
| 215,676,265
| 1
| 0
|
Apache-2.0
| 2022-12-27T14:52:46
| 2019-10-17T01:24:02
|
Java
|
UTF-8
|
Java
| false
| false
| 1,598
|
java
|
/*
* Copyright 2012-2019 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.quartz;
import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.scheduling.quartz.SpringBeanJobFactory;
import org.springframework.util.Assert;
/**
* Subclass of {@link SpringBeanJobFactory} that supports auto-wiring job beans.
*
* @author Vedran Pavic
*/
class AutowireCapableBeanJobFactory extends SpringBeanJobFactory {
private final AutowireCapableBeanFactory beanFactory;
AutowireCapableBeanJobFactory(AutowireCapableBeanFactory beanFactory) {
Assert.notNull(beanFactory, "Bean factory must not be null");
this.beanFactory = beanFactory;
}
@Override
protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception {
Object jobInstance = super.createJobInstance(bundle);
this.beanFactory.autowireBean(jobInstance);
this.beanFactory.initializeBean(jobInstance, null);
return jobInstance;
}
}
|
[
"Kaidong.Zhou@eisgroup.com"
] |
Kaidong.Zhou@eisgroup.com
|
e689e5e9751a1d8eaf322fe6ea9449f9cabe9115
|
0721305fd9b1c643a7687b6382dccc56a82a2dad
|
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/app/zenly/locator/p017a0/p024p/p029h/C1606b.java
|
e36fdf734196a4055328a1d926a02adeb801d383
|
[] |
no_license
|
a2en/Zenly_re
|
09c635ad886c8285f70a8292ae4f74167a4ad620
|
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
|
refs/heads/master
| 2020-12-13T17:07:11.442473
| 2020-01-17T04:32:44
| 2020-01-17T04:32:44
| 234,470,083
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 776
|
java
|
package app.zenly.locator.p017a0.p024p.p029h;
import app.zenly.locator.p017a0.p024p.C1561c;
import com.snap.p327ui.recycling.p328d.C11722a;
import kotlin.jvm.internal.C12932j;
/* renamed from: app.zenly.locator.a0.p.h.b */
public final class C1606b extends C11722a {
/* renamed from: f */
private final String f5579f;
public C1606b(long j, String str) {
C12932j.m33818b(str, "text");
super(C1561c.FOOTER, j);
this.f5579f = str;
}
/* renamed from: a */
public boolean mo7088a(C11722a aVar) {
C12932j.m33818b(aVar, "model");
return C12932j.m33817a((Object) this.f5579f, (Object) ((C1606b) aVar).f5579f);
}
/* renamed from: f */
public final String mo7174f() {
return this.f5579f;
}
}
|
[
"developer@appzoc.com"
] |
developer@appzoc.com
|
15ca54033a012538a2402ef0a8086a312da1adc6
|
90eb7a131e5b3dc79e2d1e1baeed171684ef6a22
|
/sources/p005b/p096l/p097a/p151d/p152a/p153a/C3449b.java
|
9bcce411722726d95fb088a1ad5df94460c31524
|
[] |
no_license
|
shalviraj/greenlens
|
1c6608dca75ec204e85fba3171995628d2ee8961
|
fe9f9b5a3ef4a18f91e12d3925e09745c51bf081
|
refs/heads/main
| 2023-04-20T13:50:14.619773
| 2021-04-26T15:45:11
| 2021-04-26T15:45:11
| 361,799,768
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 665
|
java
|
package p005b.p096l.p097a.p151d.p152a.p153a;
import android.app.Activity;
import androidx.annotation.NonNull;
import p005b.p096l.p097a.p151d.p152a.p157d.C3571b;
import p005b.p096l.p097a.p151d.p152a.p163i.C3651r;
/* renamed from: b.l.a.d.a.a.b */
public interface C3449b {
@NonNull
/* renamed from: a */
C3651r<Void> mo14727a();
@NonNull
/* renamed from: b */
C3651r<C3448a> mo14728b();
/* renamed from: c */
void mo14729c(@NonNull C3571b bVar);
/* renamed from: d */
boolean mo14730d(@NonNull C3448a aVar, int i, @NonNull Activity activity, int i2);
/* renamed from: e */
void mo14731e(@NonNull C3571b bVar);
}
|
[
"73280944+shalviraj@users.noreply.github.com"
] |
73280944+shalviraj@users.noreply.github.com
|
421f226db13957b23bd8c5838950fd003aff40c1
|
e977c424543422f49a25695665eb85bfc0700784
|
/benchmark/icse15/919170/buggy-version/incubator/cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInitiateVerbHandler.java
|
8c7d57e57491dc82fd64ea1fbe39fdc0bac185b1
|
[] |
no_license
|
amir9979/pattern-detector-experiment
|
17fcb8934cef379fb96002450d11fac62e002dd3
|
db67691e536e1550245e76d7d1c8dced181df496
|
refs/heads/master
| 2022-02-18T10:24:32.235975
| 2019-09-13T15:42:55
| 2019-09-13T15:42:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,032
|
java
|
package org.apache.cassandra.streaming;
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
import java.io.*;
import java.net.InetAddress;
import java.util.*;
import org.apache.log4j.Logger;
import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.db.ColumnFamilyStore;
import org.apache.cassandra.db.Table;
import org.apache.cassandra.io.SSTable;
import org.apache.cassandra.net.IVerbHandler;
import org.apache.cassandra.net.Message;
import org.apache.cassandra.net.MessagingService;
import org.apache.cassandra.streaming.StreamInitiateMessage;
import org.apache.cassandra.streaming.StreamInManager;
import org.apache.cassandra.service.StorageService;
import org.apache.cassandra.utils.FBUtilities;
public class StreamInitiateVerbHandler implements IVerbHandler
{
private static Logger logger = Logger.getLogger(StreamInitiateVerbHandler.class);
/*
* Here we handle the StreamInitiateMessage. Here we get the
* array of StreamContexts. We get file names for the column
* families associated with the files and replace them with the
* file names as obtained from the column family store on the
* receiving end.
*/
public void doVerb(Message message)
{
byte[] body = message.getMessageBody();
ByteArrayInputStream bufIn = new ByteArrayInputStream(body);
if (logger.isDebugEnabled())
logger.debug(String.format("StreamInitiateVerbeHandler.doVerb %s %s %s", message.getVerb(), message.getMessageId(), message.getMessageType()));
try
{
StreamInitiateMessage biMsg = StreamInitiateMessage.serializer().deserialize(new DataInputStream(bufIn));
PendingFile[] pendingFiles = biMsg.getStreamContext();
if (pendingFiles.length == 0)
{
if (logger.isDebugEnabled())
logger.debug("no data needed from " + message.getFrom());
if (StorageService.instance.isBootstrapMode())
StorageService.instance.removeBootstrapSource(message.getFrom(), new String(message.getHeader(StreamOut.TABLE_NAME)));
return;
}
/*
* For each of the remote files in the incoming message
* generate a local pendingFile and store it in the StreamInManager.
*/
for (Map.Entry<PendingFile, PendingFile> pendingFile : getContextMapping(pendingFiles).entrySet())
{
PendingFile remoteFile = pendingFile.getKey();
PendingFile localFile = pendingFile.getValue();
CompletedFileStatus streamStatus = new CompletedFileStatus(remoteFile.getFilename(),
remoteFile.getExpectedBytes());
if (logger.isDebugEnabled())
logger.debug("Preparing to receive stream from " + message.getFrom() + ": " + remoteFile + " -> " + localFile);
addStreamContext(message.getFrom(), localFile, streamStatus);
}
StreamInManager.registerStreamCompletionHandler(message.getFrom(), new StreamCompletionHandler());
if (logger.isDebugEnabled())
logger.debug("Sending a stream initiate done message ...");
Message doneMessage = new Message(FBUtilities.getLocalAddress(), "", StorageService.Verb.STREAM_INITIATE_DONE, new byte[0] );
MessagingService.instance.sendOneWay(doneMessage, message.getFrom());
}
catch (IOException ex)
{
throw new IOError(ex);
}
}
/**
* Translates remote files to local files by creating a local sstable
* per remote sstable.
*/
public LinkedHashMap<PendingFile, PendingFile> getContextMapping(PendingFile[] remoteFiles) throws IOException
{
/* Create a local sstable for each remote sstable */
LinkedHashMap<PendingFile, PendingFile> mapping = new LinkedHashMap<PendingFile, PendingFile>();
Map<SSTable.Descriptor, SSTable.Descriptor> sstables = new HashMap<SSTable.Descriptor, SSTable.Descriptor>();
for (PendingFile remote : remoteFiles)
{
SSTable.Descriptor remotedesc = remote.getDescriptor();
SSTable.Descriptor localdesc = sstables.get(remotedesc);
if (localdesc == null)
{
// new local sstable
Table table = Table.open(remotedesc.ksname);
ColumnFamilyStore cfStore = table.getColumnFamilyStore(remotedesc.cfname);
localdesc = SSTable.Descriptor.fromFilename(cfStore.getFlushPath());
sstables.put(remotedesc, localdesc);
}
// add a local file for this component
mapping.put(remote, new PendingFile(localdesc, remote.getComponent(), remote.getExpectedBytes()));
}
return mapping;
}
private void addStreamContext(InetAddress host, PendingFile pendingFile, CompletedFileStatus streamStatus)
{
if (logger.isDebugEnabled())
logger.debug("Adding stream context " + pendingFile + " for " + host + " ...");
StreamInManager.addStreamContext(host, pendingFile, streamStatus);
}
}
|
[
"durieuxthomas@hotmail.com"
] |
durieuxthomas@hotmail.com
|
243f309e588b0e5008fe6a7d6ccbfcfe98425f12
|
a749cd5ff8dc00cd12896e93e9282ffc8db4776e
|
/ps-cashloan-manage-center/src/main/java/com/adpanshi/cashloan/manage/controller/ManageOperateDataController.java
|
37c024b4713a1ff4dd5559ba9d52b1f8f2b22d6f
|
[] |
no_license
|
chocoai/ps-cashloan-manage
|
1c2e65e73f80eb3000a66f0efc36d2187a6a1b2a
|
47e2f3a1d2dd2b27ac6a4f936c7c18a2d3c7e856
|
refs/heads/master
| 2020-04-26T03:01:51.432711
| 2018-09-29T08:06:17
| 2018-09-29T08:06:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,616
|
java
|
package com.adpanshi.cashloan.manage.controller;
import com.adpanshi.cashloan.manage.cl.pojo.OverdueAnalisisModel;
import com.adpanshi.cashloan.manage.cl.pojo.RepayAnalisisModel;
import com.adpanshi.cashloan.manage.cl.service.OperateDataService;
import com.adpanshi.cashloan.manage.core.common.context.Constant;
import com.adpanshi.cashloan.manage.core.common.util.RdPage;
import com.adpanshi.cashloan.manage.pojo.ResultModel;
import com.github.pagehelper.Page;
import org.springframework.context.annotation.Scope;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
/**
* 运营数据Controller
*
* @version 1.1.0
* @date 2017年3月21日下午2:59:46
* @update_date 2017/12/22
* @updator huangqin
*/
@Controller
@Scope("prototype")
@RequestMapping("/manage/operateData/")
public class ManageOperateDataController extends ManageBaseController {
@Resource
private OperateDataService operateDataService;
/**
* 每日还款统计
*
* @param searchParams
* @param current
* @param pageSize
* @return ResponseEntity<ResultModel>
* @throws Exception
*/
@RequestMapping(value = "dayRepay.htm", method = {RequestMethod.POST})
public ResponseEntity<ResultModel> dayRepay(@RequestParam(value = "searchParams") String searchParams,
@RequestParam(value = "current") Integer current,
@RequestParam(value = "pageSize") Integer pageSize) throws Exception {
this.logger.info("------运营数据-每日还款统计-查询------");
Map<String, Object> params = parseToMap(searchParams, true);
Page<RepayAnalisisModel> page = operateDataService.dayRepayAnalisis(params, current, pageSize);
Map<String, Object> result = new HashMap<>();
result.put(Constant.RESPONSE_DATA, page);
result.put(Constant.RESPONSE_DATA_PAGE, new RdPage(page));
return new ResponseEntity<>(ResultModel.ok(result), HttpStatus.OK);
}
/**
* 每月还款统计
*
* @param searchParams
* @param current
* @param pageSize
* @return ResponseEntity<ResultModel>
* @throws Exception
*/
@RequestMapping(value = "monthRepay.htm", method = {RequestMethod.POST})
public ResponseEntity<ResultModel> monthRepay(@RequestParam(value = "searchParams", required = false) String searchParams,
@RequestParam(value = "current") Integer current,
@RequestParam(value = "pageSize") Integer pageSize) throws Exception {
this.logger.info("------运营数据-每月还款统计-查询------");
Map<String, Object> params = parseToMap(searchParams, true);
Page<RepayAnalisisModel> page = operateDataService.monthRepayAnalisis(params, current, pageSize);
Map<String, Object> result = new HashMap<>();
result.put(Constant.RESPONSE_DATA, page);
result.put(Constant.RESPONSE_DATA_PAGE, new RdPage(page));
return new ResponseEntity<>(ResultModel.ok(result), HttpStatus.OK);
}
/**
* 每月逾期分析
*
* @param searchParams
* @param current
* @param pageSize
* @return ResponseEntity<ResultModel>
* @throws Exception
*/
@RequestMapping(value = "monthOverdue.htm", method = {RequestMethod.POST})
public ResponseEntity<ResultModel> overdue(@RequestParam(value = "searchParams", required = false) String searchParams,
@RequestParam(value = "current") Integer current,
@RequestParam(value = "pageSize") Integer pageSize) throws Exception {
this.logger.info("------运营数据-每月逾期分析-查询------");
Map<String, Object> params = parseToMap(searchParams, true);
Page<OverdueAnalisisModel> page = operateDataService.overdueAnalisis(params, current, pageSize);
Map<String, Object> result = new HashMap<>();
result.put(Constant.RESPONSE_DATA, page);
result.put(Constant.RESPONSE_DATA_PAGE, new RdPage(page));
return new ResponseEntity<>(ResultModel.ok(result), HttpStatus.OK);
}
}
|
[
"zhoushanwen8502@adpanshi.com"
] |
zhoushanwen8502@adpanshi.com
|
ef6729c666ae0499da09deb4f4f47653511d21b7
|
207546688353f61854d85ec3e66f75d1b6f2dbda
|
/app/src/main/java/com/bagevent/new_home/new_interface/new_view/CheckAccessTokenView.java
|
d9d629989788b5b61da2d70dcdcb851e9f50da83
|
[] |
no_license
|
sun-liqun/bagevents
|
03cf096adc5a636c47f44721ce3895d910002b34
|
2d1830bec29fc2a5d5effb0a85081d3a3bfc8191
|
refs/heads/master
| 2021-01-14T05:52:42.543999
| 2020-03-02T10:05:59
| 2020-03-02T10:06:24
| 242,617,856
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 329
|
java
|
package com.bagevent.new_home.new_interface.new_view;
import com.bagevent.new_home.data.CheckAccessTokenData;
/**
* Created by zwj on 2017/1/3.
*/
public interface CheckAccessTokenView {
String accessToken();
String openId();
void accessTokenEnable(CheckAccessTokenData response);
void accessTokenUnable();
}
|
[
"linqun.sun@eventslack.com"
] |
linqun.sun@eventslack.com
|
8969b98c80adfd34970ac2e9992370db1fdb38c6
|
b0296d820c0400440232152485a0b3dff3e943be
|
/PDIPAppServices/ReportGen/src/com/gridnode/pdip/app/reportgen/value/DailyReportScheduleParam.java
|
38f519bbb525f83f979fdd417ae94c034c0848be
|
[] |
no_license
|
andytanoko/4.2.x_integration
|
74536c8933a98373b0118eeac66678b72b00aa8e
|
984842d92abaa797a19bd0f002ec45c9c37da288
|
refs/heads/master
| 2021-01-10T13:46:58.824451
| 2015-09-23T10:41:25
| 2015-09-23T10:41:25
| 46,325,977
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 843
|
java
|
/**
* This software is the proprietary information of GridNode Pte Ltd.
* Use is subjected to license terms.
*
* Copyright 2001-2002 (C) GridNode Pte Ltd. All Rights Reserved.
*
* File: DailyReportScheduleParam.java
*
****************************************************************************
* Date Author Changes
****************************************************************************
* Nov 19 2002 H.Sushil Created
*/
package com.gridnode.pdip.app.reportgen.value;
import java.util.Date;
import java.io.Serializable;
/**
* Class which serves as datastructure for Daily Report Generation.
*
* @author H.Sushil
*
* @version 1.0
* @since 1.0
*/
public class DailyReportScheduleParam extends ReportParam implements Serializable
{
public DailyReportScheduleParam()
{
}
}
|
[
"muhamadnazir@gmail.com"
] |
muhamadnazir@gmail.com
|
09180bfec33a91f8b38fe027a2827240457494ac
|
cf3e886c19c527d5388b168cb47b0c502c716b21
|
/src/test/java/org/gnieh/logback/SystemdJournalAppenderTest.java
|
c1f1f5223bdf437c3361f0095118247cbef4f8a6
|
[
"Apache-2.0"
] |
permissive
|
takaomag/logback-journal
|
4256d82f25b7e77ce045b47d138a4fbd0d43c5cc
|
32aa783ada2ff05e23882d1be25d9844540e4306
|
refs/heads/master
| 2021-10-09T05:48:37.765127
| 2017-04-04T05:57:31
| 2017-04-04T05:57:31
| 124,610,783
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,268
|
java
|
package org.gnieh.logback;
import org.junit.After;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
public class SystemdJournalAppenderTest {
private static final Logger logger = LoggerFactory.getLogger(SystemdJournalAppenderTest.class);
private static final Logger logWithSource = LoggerFactory.getLogger("log-with-source");
@After
public void clearMdc() {
MDC.clear();
}
@Test
public void testLogSimple() throws Exception {
MDC.put(SystemdJournal.MESSAGE_ID, "15bbd5156ff24b6ea41468b102598b04");
logger.info("toto");
}
@Test
public void testLogException() throws Exception {
MDC.put(SystemdJournal.MESSAGE_ID, "722fa2bde8344f88975c8d6abcd884c8");
try {
throw new Exception("Glups");
} catch (Exception e) {
logger.error("some error occurred", e);
}
}
@Test
public void testWithStringPlaceholder() throws Exception {
MDC.put(SystemdJournal.MESSAGE_ID, "we get away with %s, since it uses the null terminator arg");
logger.info("fine");
MDC.put(SystemdJournal.MESSAGE_ID, "we get away with %i as well, and it converts to 0");
logger.info("fine");
}
@Test
public void testLogWithTwoStringPlaceholder() throws Exception {
// It will crash unless % is escaped (% -> %%)
MDC.put(SystemdJournal.MESSAGE_ID, "this %s %s crashes since there's no 2nd subsequent arg");
logger.info("boom");
MDC.put(SystemdJournal.MESSAGE_ID, "this %1$ causes the JVM to abort");
logger.info("boom");
}
@Test
public void testWithCustomMdc() throws Exception {
MDC.put("some-key", "some value");
logger.info("some message");
MDC.put("special_key%s==", "value with special characters: %s %s %1$");
logger.info("some other message");
}
@Test
public void testLogWithSource() throws Exception {
logWithSource.info("some message");
}
@Test
public void testLogWithSourceAndException() throws Exception {
Exception exception = new RuntimeException("some exception");
logWithSource.error("some exception", exception);
}
}
|
[
"mail@bwaldvogel.de"
] |
mail@bwaldvogel.de
|
7a5824e2f89cc7f90bb287651117be9dc83b2555
|
bb66019e56bcd5b891798eb0981a54481486dc46
|
/NetBeansProjects/TradeTerminalM1/src/tradeterminal/conf/AppAccessSettings.java
|
2e53de4695c8e5102a07696647c926e00d3f0fde
|
[] |
no_license
|
povloid/projects_2008_2011
|
e85ea72b46d641f5a821ccd2c7ba224c87cccc77
|
9aceb06fd937d4796bf240cef6728151865cec4a
|
refs/heads/master
| 2020-12-04T03:25:35.921039
| 2014-11-02T08:43:01
| 2014-11-02T08:43:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,588
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tradeterminal.conf;
import java.util.HashMap;
import java.util.Map;
/**
*
* @author povlo
*/
public class AppAccessSettings {
private static Map<String, AppAccess> accessMap = new HashMap<String, AppAccess>();
public static final String USER_MANAGER = "USER_MANAGER";
public static final String REPORT_VIEWER = "REPORT_VIEWER";
public static final String MAKE_Z_REPORT = "MAKE_Z_REPORT";
public static final String SHOW_CASS = "SHOW_CASS";
public static final String INCOMMING_PRODUCT = "INCOMMING_PRODUCT";
public static final String OUTCOMMING_PRODUCT = "OUTCOMMING_PRODUCT";
public static final String SELLING_PRODUCT = "SELLING_PRODUCT";
public static final String RETURN_PRODUCT = "RETURN_PRODUCT";
public static final String ADD_MONEY = "ADD_MONEY";
public static final String REMOV_MONEY = "REMOV_MONEY";
public static final String ADD_MONEY_TO_CUSTOMER_BALANCE = "ADD_MONEY_TO_CUSTOMER_BALANCE";
public static final String REMOV_MONEY_FROM_CUSTOMER_BALANCE = "REMOV_MONEY_FROM_CUSTOMER_BALANCE";
// Справочники
public static final String RB_VIEW = "RB_VIEW";
public static final String RB_EDIT = "RB_EDIT";
public static void init() {
System.out.println("Start init application access settings.");
addAppAccessToAccessMap(new AppAccess(USER_MANAGER, "Управление пользователями"));
addAppAccessToAccessMap(new AppAccess(REPORT_VIEWER, "Просмотр отчетов"));
addAppAccessToAccessMap(new AppAccess(MAKE_Z_REPORT, "Z-отчет. Снятие кассы"));
addAppAccessToAccessMap(new AppAccess(SHOW_CASS, "Просмотр кассы"));
addAppAccessToAccessMap(new AppAccess(INCOMMING_PRODUCT, "Приход товара"));
addAppAccessToAccessMap(new AppAccess(OUTCOMMING_PRODUCT, "Списание товара"));
addAppAccessToAccessMap(new AppAccess(SELLING_PRODUCT, "Продажа товара"));
addAppAccessToAccessMap(new AppAccess(RETURN_PRODUCT, "Возврат товара"));
addAppAccessToAccessMap(new AppAccess(ADD_MONEY, "Внос денег в кассу"));
addAppAccessToAccessMap(new AppAccess(REMOV_MONEY, "Изъятие денег из кассы"));
addAppAccessToAccessMap(new AppAccess(ADD_MONEY_TO_CUSTOMER_BALANCE, "Внос денег на баланс клиента"));
addAppAccessToAccessMap(new AppAccess(REMOV_MONEY_FROM_CUSTOMER_BALANCE, "Снятие денег с баланса клиента"));
addAppAccessToAccessMap(new AppAccess(RB_VIEW, "Просмотр справочников"));
addAppAccessToAccessMap(new AppAccess(RB_EDIT, "Редактирование справочников"));
// Испытания
//accessMap.get(USER_MANAGER).setAccess(348, true);
System.out.println("Провнерка доступа");
System.out.println(accessMap.get(USER_MANAGER).isCurrentUserHasAccess());
}
private static void addAppAccessToAccessMap(AppAccess aa) {
accessMap.put(aa.getKod(), aa);
}
public static Map<String, AppAccess> getAccessMap() {
return accessMap;
}
public static boolean isCurrentUserHasAccessWithMessage(String s) {
if (User.isAdmin) {
return true;
}
return AppAccessSettings.getAccessMap().get(s).isCurrentUserHasAccessWithMessage();
}
}
|
[
"t34box@gmail.com"
] |
t34box@gmail.com
|
5948e5ce2a08dd1f33947da13e0c7b7e94ef3e4b
|
c6c1a124eb1ff2fc561213d43d093f84d1ab2c43
|
/games/crazy/share/share/src/main/java/org/jboss/netty/channel/ReceiveBufferSizePredictorFactory.java
|
ec04dceb970c37cbc44c7c2a2d646963655ec4c6
|
[] |
no_license
|
fantasylincen/javaplus
|
69201dba21af0973dfb224c53b749a3c0440317e
|
36fc370b03afe952a96776927452b6d430b55efd
|
refs/heads/master
| 2016-09-06T01:55:33.244591
| 2015-08-15T12:15:51
| 2015-08-15T12:15:51
| 15,601,930
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,025
|
java
|
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package org.jboss.netty.channel;
/**
* Creates a new {@link ReceiveBufferSizePredictor}.
*
* @apiviz.has org.jboss.netty.channel.ReceiveBufferSizePredictor oneway - -
* creates
*/
public interface ReceiveBufferSizePredictorFactory {
/**
* Returns a newly created {@link ReceiveBufferSizePredictor}.
*/
ReceiveBufferSizePredictor getPredictor() throws Exception;
}
|
[
"12-2"
] |
12-2
|
a3bd1b491d1084256f8e1d378ee50e47676c11ed
|
a3d049b6c0ebdf7c22d5be0de57c47d3cfe2bccb
|
/docroot/WEB-INF/service/org/opencps/servicemgt/DuplicateFileNoException.java
|
8a7c288448c605a6e02a4e664527c9fc35a49500
|
[] |
no_license
|
HieuNT1990/tutorial
|
b21bbfd04f906a2ef96ad52aa752dca769fdcd15
|
4edada7993ff6cde126435268470e9b564cbb54d
|
refs/heads/master
| 2021-01-20T20:24:30.375662
| 2016-07-26T07:37:52
| 2016-07-26T07:37:52
| 63,405,491
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,054
|
java
|
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package org.opencps.servicemgt;
import com.liferay.portal.kernel.exception.PortalException;
/**
* @author khoavd
*/
public class DuplicateFileNoException extends PortalException {
public DuplicateFileNoException() {
super();
}
public DuplicateFileNoException(String msg) {
super(msg);
}
public DuplicateFileNoException(String msg, Throwable cause) {
super(msg, cause);
}
public DuplicateFileNoException(Throwable cause) {
super(cause);
}
}
|
[
"hieunt000@gmail.com"
] |
hieunt000@gmail.com
|
32016775361ba8e7e00ce772c22a2688bfcf8d55
|
8c52b23579e32ce024dfb527b83a56491e3ac6b6
|
/framework/GTP/Trunk/gtp-domain/src/main/java/com/gome/test/gtp/dao/CaseFailReasonCategoryDao.java
|
f0c1f4a06d7dff4dbd23dc81f6583fe2ddc8a7ca
|
[] |
no_license
|
wang-shun/framwork
|
aef336476b9044a1f0acdce0bf7e03482f421da9
|
663908b8f00a9652a61e04418d909ab21d0fcaa1
|
refs/heads/master
| 2020-03-29T13:46:37.314793
| 2018-08-21T02:08:45
| 2018-08-21T02:08:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 286
|
java
|
package com.gome.test.gtp.dao;
import com.gome.test.gtp.dao.base.BaseDao;
import com.gome.test.gtp.model.CaseFailReasonCategory;
import org.springframework.stereotype.Repository;
@Repository
public class CaseFailReasonCategoryDao extends BaseDao<CaseFailReasonCategory>{
}
|
[
"greatmrliang@126.COM"
] |
greatmrliang@126.COM
|
a7b9098309203120a0821f31571ef19ca58c7bf7
|
1f3f826cf519d98b67a4e436e5280d05f949ca2a
|
/src/com/optimize/chapter4/producerConsumer/Producer.java
|
a4ff9aa03e43ccd1b12cd4a96147080899da0d10
|
[] |
no_license
|
hyperaeon/CrazyAndOptimize
|
ae7b0d089fbb65df1add6ffbbc1b22706a76047d
|
aafcc9ab8d2a49c3e9e6d7280424ba159713f66d
|
refs/heads/master
| 2022-12-20T19:40:41.791672
| 2021-06-12T03:32:48
| 2021-06-12T03:32:48
| 35,353,861
| 3
| 2
| null | 2022-12-16T02:54:30
| 2015-05-10T02:27:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,170
|
java
|
package com.optimize.chapter4.producerConsumer;
import java.util.Random;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
public class Producer implements Runnable {
private volatile boolean isRunning = true;
private BlockingQueue<PCData> queue;
private static AtomicInteger count = new AtomicInteger();
private static final int SLEEPTIME = 1000;
public Producer(BlockingQueue<PCData> queue) {
this.queue = queue;
}
@Override
public void run() {
PCData data = null;
Random r = new Random();
System.out.println("start producer id:" + Thread.currentThread().getId());
try {
while (isRunning) {
Thread.sleep(r.nextInt(SLEEPTIME));
data = new PCData(count.incrementAndGet());
System.out.println(data + " is put int queue");
if (!queue.offer(data, 2, TimeUnit.SECONDS)) {
System.err.println("failed to put data: " + data);
}
}
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
}
public void stop() {
isRunning = false;
}
}
|
[
"flyloeswing@163.com"
] |
flyloeswing@163.com
|
cf0bdde5558c7be75bfe8bcba1498588bc6d0583
|
45ae550416c4891e59c99b9372185ebd78ff1998
|
/src/eObjectOriented2/No6_7/TestTeachableProgrammer.java
|
f48d4f332a94d00292beb1e9ebf33ecd56e084ae
|
[] |
no_license
|
HenryXi/javaCrazy
|
5cf79da2aa990bfe940f6245ac8b957a09a00f6c
|
007712f9c912e0ef9078a9c442140aff7a3184bb
|
refs/heads/master
| 2016-09-06T08:10:26.941483
| 2016-01-07T10:37:10
| 2016-01-07T10:37:10
| 39,567,352
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 627
|
java
|
package eObjectOriented2.No6_7;
/**
* Description:
* <br/>Copyright (C), 2005-2008, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 1.0
*/
public class TestTeachableProgrammer
{
public static void main(String[] args)
{
TeachableProgrammer tp = new TeachableProgrammer("李刚");
//直接调用TeachableProgrammer类从Programmer类继承到的work方法
tp.work();
//表面上调用的是Closure的work方法,实际上是回调TeachableProgrammer的teach方法
tp.getCallbackReference().work();
}
}
|
[
"xxy668@foxmail.com"
] |
xxy668@foxmail.com
|
f45a868623aadf64bd81de23af92cc386f8aee1f
|
32f38cd53372ba374c6dab6cc27af78f0a1b0190
|
/app/src/main/java/com/j256/ormlite/field/DatabaseField.java
|
c27972a9a1455f50c03ef427aba8a5228800ab8d
|
[] |
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
| 1,908
|
java
|
package com.j256.ormlite.field;
import com.j256.ormlite.field.types.VoidType;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface DatabaseField {
public static final int DEFAULT_MAX_FOREIGN_AUTO_REFRESH_LEVEL = 2;
public static final String DEFAULT_STRING = "__ormlite__ no default value string was specified";
public static final int NO_MAX_FOREIGN_AUTO_REFRESH_LEVEL_SPECIFIED = -1;
boolean allowGeneratedIdInsert() default false;
boolean canBeNull() default true;
String columnDefinition() default "";
String columnName() default "";
DataType dataType() default DataType.UNKNOWN;
String defaultValue() default "__ormlite__ no default value string was specified";
boolean encryption() default false;
boolean foreign() default false;
boolean foreignAutoCreate() default false;
boolean foreignAutoRefresh() default false;
String foreignColumnName() default "";
String format() default "";
boolean generatedId() default false;
String generatedIdSequence() default "";
boolean id() default false;
boolean index() default false;
String indexName() default "";
int maxForeignAutoRefreshLevel() default -1;
boolean persisted() default true;
Class<? extends DataPersister> persisterClass() default VoidType.class;
boolean readOnly() default false;
boolean throwIfNull() default false;
boolean unique() default false;
boolean uniqueCombo() default false;
boolean uniqueIndex() default false;
String uniqueIndexName() default "";
String unknownEnumName() default "";
boolean useGetSet() default false;
boolean version() default false;
int width() default 0;
}
|
[
"hubert.yang@nf-3.com"
] |
hubert.yang@nf-3.com
|
e3d40a147a8fc1a997b2aca2f7a6a27701b74430
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_42317.java
|
2716bec13ed8c5b785d1768df1d476b5cadd1319
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,149
|
java
|
@Override public void updateUiElements(){
super.updateUiElements();
toolbar.setBackgroundColor(getPrimaryColor());
setStatusBarColor();
setNavBarColor();
setRecentApp(getString(org.horaapps.leafpic.R.string.donate));
themeSeekBar(bar);
themeButton(btnDonateIap);
themeButton(btnDonatePP);
((TextView)findViewById(org.horaapps.leafpic.R.id.team_name)).setTextColor(getAccentColor());
((TextView)findViewById(org.horaapps.leafpic.R.id.donate_googleplay_item_title)).setTextColor(getAccentColor());
((TextView)findViewById(org.horaapps.leafpic.R.id.donate_paypal_item_title)).setTextColor(getAccentColor());
((TextView)findViewById(org.horaapps.leafpic.R.id.donate_bitcoin_item_title)).setTextColor(getAccentColor());
findViewById(org.horaapps.leafpic.R.id.donate_background).setBackgroundColor(getBackgroundColor());
int color=getCardBackgroundColor();
((CardView)findViewById(org.horaapps.leafpic.R.id.donate_googleplay_card)).setCardBackgroundColor(color);
((CardView)findViewById(org.horaapps.leafpic.R.id.donate_paypal_card)).setCardBackgroundColor(color);
((CardView)findViewById(org.horaapps.leafpic.R.id.donate_bitcoin_card)).setCardBackgroundColor(color);
((CardView)findViewById(org.horaapps.leafpic.R.id.donate_header_card)).setCardBackgroundColor(color);
color=getIconColor();
((ThemedIcon)findViewById(org.horaapps.leafpic.R.id.donate_googleplay_icon_title)).setColor(color);
((ThemedIcon)findViewById(org.horaapps.leafpic.R.id.donate_paypal_icon_title)).setColor(color);
((ThemedIcon)findViewById(org.horaapps.leafpic.R.id.donate_bitcoin_icon_title)).setColor(color);
((ThemedIcon)findViewById(org.horaapps.leafpic.R.id.donate_header_icon)).setColor(color);
color=getTextColor();
((TextView)findViewById(org.horaapps.leafpic.R.id.donate_googleplay_item)).setTextColor(color);
((TextView)findViewById(org.horaapps.leafpic.R.id.donate_paypal_item)).setTextColor(color);
((TextView)findViewById(org.horaapps.leafpic.R.id.donate_bitcoin_item)).setTextColor(color);
((TextView)findViewById(org.horaapps.leafpic.R.id.donate_header_item)).setTextColor(color);
setScrollViewColor(scr);
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
91c616dda052cd70666fb0cacc9a6f8abb06c9cf
|
0229e354fa7062abf48f543916fef53107b5bf96
|
/src/main/java/com/csinfotechbd/rms/setting/centereasRow/CentereasRowController.java
|
f66035e504e9da1542199e7e696307a58a87958b
|
[] |
no_license
|
EmonHossain/bocmanage
|
f1422438fbe87ed4781d3b0287854941e3b3ef0e
|
686516e19ce484bafc8a14b0583fd6bfef04e761
|
refs/heads/master
| 2020-03-17T09:19:17.391619
| 2018-05-21T10:02:06
| 2018-05-21T10:02:06
| 133,469,746
| 0
| 1
| null | 2018-05-21T10:02:07
| 2018-05-15T06:31:54
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,150
|
java
|
package com.csinfotechbd.rms.setting.centereasRow;
import com.csinfotechbd.rms.setting.country.CountryEntity;
import com.csinfotechbd.rms.setting.country.CountryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpSession;
import java.security.Principal;
import java.util.List;
@Controller
@RequestMapping("/rms/setting/center-row")
public class CentereasRowController {
@Autowired
private CentereasRowService centereasRowService;
@ResponseBody
@GetMapping(value = "/list", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<CentereasRowEntity>> list(Principal principal, HttpSession session) {
return new ResponseEntity<>(centereasRowService.getAll(), HttpStatus.OK);
}
}
|
[
"imranmadbar@gmail.com"
] |
imranmadbar@gmail.com
|
68461c8db04ae19c1141936b6377897c510064ec
|
6240a87133481874e293b36a93fdb64ca1f2106c
|
/taobao/src/com/taobao/api/request/SubusersGetRequest.java
|
0dfd8a49e85249b7cfaf32d6ed238389617aaf6a
|
[] |
no_license
|
mrzeng/comments-monitor
|
596ba8822d70f8debb630f40b548f62d0ad48bd4
|
1451ec9c14829c7dc29a2297a6f3d6c4e490dc13
|
refs/heads/master
| 2021-01-15T08:58:05.997787
| 2013-07-17T16:29:23
| 2013-07-17T16:29:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,802
|
java
|
package com.taobao.api.request;
import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;
import com.taobao.api.TaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.response.SubusersGetResponse;
import com.taobao.api.ApiRuleException;
/**
* TOP API: taobao.subusers.get request
*
* @author auto create
* @since 1.0, 2013-06-13 12:33:20
*/
public class SubusersGetRequest implements TaobaoRequest<SubusersGetResponse> {
private TaobaoHashMap udfParams; // add user-defined text parameters
private Long timestamp;
/**
* 主账号用户名
*/
private String userNick;
public void setUserNick(String userNick) {
this.userNick = userNick;
}
public String getUserNick() {
return this.userNick;
}
private Map<String,String> headerMap=new TaobaoHashMap();
public Long getTimestamp() {
return this.timestamp;
}
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
public String getApiMethodName() {
return "taobao.subusers.get";
}
public Map<String, String> getTextParams() {
TaobaoHashMap txtParams = new TaobaoHashMap();
txtParams.put("user_nick", this.userNick);
if(this.udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new TaobaoHashMap();
}
this.udfParams.put(key, value);
}
public Class<SubusersGetResponse> getResponseClass() {
return SubusersGetResponse.class;
}
public void check() throws ApiRuleException {
RequestCheckUtils.checkNotEmpty(userNick,"userNick");
}
public Map<String,String> getHeaderMap() {
return headerMap;
}
}
|
[
"qujian@gionee.com"
] |
qujian@gionee.com
|
282eed12d5fa349350a1b7f5e78715bf8a179363
|
e75be673baeeddee986ece49ef6e1c718a8e7a5d
|
/submissions/blizzard/Corpus/ecf/895.java
|
9410b4546c0977197869424c71ace4ea787506ef
|
[
"MIT"
] |
permissive
|
zhendong2050/fse18
|
edbea132be9122b57e272a20c20fae2bb949e63e
|
f0f016140489961c9e3c2e837577f698c2d4cf44
|
refs/heads/master
| 2020-12-21T11:31:53.800358
| 2018-07-23T10:10:57
| 2018-07-23T10:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,205
|
java
|
/*******************************************************************************
* Copyright (c) 2005, 2006 Erkki Lindpere and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Erkki Lindpere - initial API and implementation
*******************************************************************************/
package org.eclipse.ecf.internal.provider.phpbb;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Map;
import org.eclipse.ecf.bulletinboard.IBBObject;
import org.eclipse.ecf.bulletinboard.IMember;
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.identity.IDCreateException;
import org.eclipse.ecf.core.identity.Namespace;
import org.eclipse.ecf.internal.bulletinboard.commons.IBBObjectFactory;
import org.eclipse.ecf.internal.provider.phpbb.identity.PHPBBNamespace;
import org.eclipse.ecf.internal.provider.phpbb.identity.ThreadID;
public class ThreadFactory implements IBBObjectFactory {
public ID createBBObjectId(Namespace namespace, String stringValue) throws IDCreateException {
try {
return new ThreadID((PHPBBNamespace) namespace, new URI(stringValue));
} catch (URISyntaxException e) {
throw new IDCreateException(e);
}
}
public ID createBBObjectId(Namespace namespace, URL baseURL, String longValue) throws IDCreateException {
try {
return new ThreadID((PHPBBNamespace) namespace, baseURL, Long.parseLong(longValue));
} catch (URISyntaxException e) {
throw new IDCreateException(e);
}
}
public IBBObject createBBObject(ID id, String name, Map<String, Object> parameters) {
Thread t = new Thread((ThreadID) id, name);
if (parameters != null) {
if (parameters.containsKey("author")) {
t.setAuthor((IMember) parameters.get("author"));
}
}
return t;
}
}
|
[
"tim.menzies@gmail.com"
] |
tim.menzies@gmail.com
|
9e04dc3a2c6a66fcde08b284dbe10e16df1877b4
|
dc17a43f25cfd1d3ecf0ffebf709b2721c80031d
|
/IDE/device/com.lembed.lite.studio.device.help/src/com/lembed/lite/studio/device/help/HelpPlugIn.java
|
46c4d7b699bcf90c688646e743f067e9b9cd3094
|
[] |
no_license
|
skykying/bundle
|
e7b25a8d56668a5cb1cd70932d14958927960e50
|
0b3b590760baa953677eb99e07d7e1a37af5434c
|
refs/heads/master
| 2023-01-07T20:03:42.318642
| 2020-11-08T06:36:39
| 2020-11-08T06:36:39
| 306,216,461
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,378
|
java
|
package com.lembed.lite.studio.device.help;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class HelpPlugIn extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.arm.cmsis.help"; //$NON-NLS-1$
// The shared instance
private static HelpPlugIn plugin;
/**
* The constructor
*/
public HelpPlugIn() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static HelpPlugIn getDefault() {
return plugin;
}
/**
* Returns an image descriptor for the image file at the given
* plug-in relative path
*
* @param path the path
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
}
|
[
"root@lembed.com"
] |
root@lembed.com
|
1da2360a5de78958c84ea229ae9b18b15e5f0bfc
|
3c73008e21c90d1de8d8fa5508460418e69474e1
|
/src/main/java/io/r2dbc/postgresql/message/backend/AuthenticationMD5Password.java
|
52908836ce8fb87932cc5cd25dc1cece370a2d01
|
[
"Apache-2.0"
] |
permissive
|
rdegnan/r2dbc-postgresql
|
3b41fcba19e077a21634b30713d160763477f113
|
068b6d59b31f5ad0940e836af9de25cc3b6d2fc3
|
refs/heads/master
| 2020-04-06T20:37:32.803816
| 2019-01-07T21:04:12
| 2019-01-07T21:04:12
| 157,777,709
| 0
| 0
| null | 2018-11-15T21:56:08
| 2018-11-15T21:56:08
| null |
UTF-8
|
Java
| false
| false
| 2,286
|
java
|
/*
* Copyright 2017-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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.r2dbc.postgresql.message.backend;
import io.netty.buffer.ByteBuf;
import io.r2dbc.postgresql.util.Assert;
import java.nio.ByteBuffer;
import java.util.Objects;
/**
* The AuthenticationMD5Password message.
*/
public final class AuthenticationMD5Password implements AuthenticationMessage {
private final ByteBuffer salt;
/**
* Creates a new message.
*
* @param salt the salt to use when encrypting the password
* @throws IllegalArgumentException if {@code salt} is {@code null}
*/
public AuthenticationMD5Password(ByteBuf salt) {
Assert.requireNonNull(salt, "salt must not be null");
this.salt = salt.nioBuffer();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AuthenticationMD5Password that = (AuthenticationMD5Password) o;
return Objects.equals(this.salt, that.salt);
}
/**
* Returns the salt to use when encrypting the password.
*
* @return the salt to use when encrypting the password
*/
public ByteBuffer getSalt() {
return this.salt;
}
@Override
public int hashCode() {
return Objects.hash(this.salt);
}
@Override
public String toString() {
return "AuthenticationMD5Password{" +
"salt=" + this.salt +
'}';
}
static AuthenticationMD5Password decode(ByteBuf in) {
Assert.requireNonNull(in, "in must not be null");
return new AuthenticationMD5Password(in.readSlice(4));
}
}
|
[
"bhale@pivotal.io"
] |
bhale@pivotal.io
|
ae044d19ce5c86e2470a52f27737fa658b58a547
|
066c3640aa155279b0b259f12f8fd926b8e9e72a
|
/emms_GXDD/.svn/pristine/42/42ff6b166017d49b64df22056877101d315564c3.svn-base
|
c28846efcc2eee6b6bb7cdb38c510b3843c11a9b
|
[] |
no_license
|
zjt0428/emms_GXDD
|
3eebe850533357e7e43858120cfa58a55d797f7c
|
9dd7af521efa613c9bba3ce8f7e1c706d8b94a50
|
refs/heads/master
| 2020-09-13T18:09:00.499402
| 2019-11-20T07:56:23
| 2019-11-20T07:56:23
| 222,864,042
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,220
|
/**
*====================================================
* 文件名称: MaterialsRepair.java
* 修订记录:
* No 日期 作者(操作:具体内容)
* 1. 2015年4月1日 chenxy(创建:创建文件)
*====================================================
* 类描述:(说明未实现或其它不应生成javadoc的内容)
*/
package com.knight.emms.model;
import java.util.HashSet;
import java.util.Set;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.Since;
import com.google.gson.reflect.TypeToken;
import com.knight.core.table.CodeFieldDeclare;
import com.knight.core.table.PersistantDeclare;
import com.knight.core.util.DateUtil;
import com.knight.core.util.GsonUtil;
import com.knight.emms.constant.Constant;
import com.knight.emms.core.ApplyforState;
import com.knight.emms.core.model.SerialNumberStrategy;
import lombok.Data;
import lombok.ToString;
/**
* @ClassName: MaterialsRepair
* @Description: TODO(这里用一句话描述这个类的作用)
* @author chenxy
* @date 2015年4月1日 下午5:41:01
*/
@Data
@ToString(callSuper = false, doNotUseGetters = true)
@PersistantDeclare
@SerialNumberStrategy(name = "repairSerial", strategy = "WX-{yyyyMMdd}", maxseq = 999)
public class MaterialsRepair extends ApplyforState implements Cloneable {
private static final long serialVersionUID = 1L;
@Expose
private Long materialsRepairId;
@Expose
@CodeFieldDeclare(codeId = "APPLYFOR_STATE", valueField = "applyforStateName")
private String applyforState;
@Expose
private String applyforStateName;
@Expose
private Long userId;
/**填报人*/
@Expose
private String userName;
/**维修编号*/
@Expose
private String repairSerial;
@Expose
private String repairPersonnel;
/*维修班组ID*/
@Expose
private Long teamId;
/* 维修班组*/
@Expose
private String teamName;
/**维修主题*/
@Expose
private String repairTheme;
/**维修日期*/
@Expose
private String repairDate;
/**维修仓库*/
@Expose
private Long storeId;
/**维修仓库*/
@Expose
private String storeName;
/**维修仓库*/
@Expose
private String storeAddress;
/**维修费用*/
@Expose
private String repairCost;
/**维修情况*/
@Expose
private String repairSituation;
/**附属单号*/
@Expose
private String affiliatedSerial;
@Expose
private String remark;
private String delFlag = Constant.ENABLED;
public Long getApplyforId() {
return this.materialsRepairId;
}
@Override
public Long getUserId() {
// TODO Auto-generated method stub
return null;
}
@Override
public void setModelSerial(String serial) {
this.repairSerial=serial;
}
public String getModelSerial() {
return this.repairSerial;
}
@Expose(deserialize = false, serialize = false)
@Since(value = 2.0)
private Set<BeforeMaterialsRepair> beforeMaterialsRepairSet = new HashSet<BeforeMaterialsRepair>(0);
private String beforeMaterialsRepairs = "";
@Expose(deserialize = false, serialize = false)
@Since(value = 2.0)
private Set<AfterMaterialsRepair> afterMaterialsRepairSet = new HashSet<AfterMaterialsRepair>(0);
private String afterMaterialsRepairs = "";
public void setSubMaterialsRepair() {
Set<BeforeMaterialsRepair> beforeMaterialsRepairSet = GsonUtil.fromJson(this.getBeforeMaterialsRepairs(), new TypeToken<Set<BeforeMaterialsRepair>>() {}, DateUtil.LINK_DISPLAY_DATE);
if (beforeMaterialsRepairSet != null) {
for (BeforeMaterialsRepair p : beforeMaterialsRepairSet) {
p.setMaterialsRepairId(this.getMaterialsRepairId());
}
}
this.setBeforeMaterialsRepairSet(beforeMaterialsRepairSet);
Set<AfterMaterialsRepair> afterMaterialsRepairSet = GsonUtil.fromJson(this.getAfterMaterialsRepairs(), new TypeToken<Set<AfterMaterialsRepair>>() {}, DateUtil.LINK_DISPLAY_DATE);
if (afterMaterialsRepairSet != null) {
for (AfterMaterialsRepair p : afterMaterialsRepairSet) {
p.setMaterialsRepairId(this.getMaterialsRepairId());
}
}
this.setAfterMaterialsRepairSet(afterMaterialsRepairSet);
}
public MaterialsRepair clone() {
try {
return (MaterialsRepair) super.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return null;
}
}
|
[
"3555673863@qq.com"
] |
3555673863@qq.com
|
|
f2f196991f2fef1e8358ce84dd952e6b08083212
|
565d6d61c8003d5a4aee122034817d44e55b00ff
|
/spring-osgi-master/core/src/main/java/org/springframework/osgi/service/importer/support/DisposableBeanRunnableAdapter.java
|
00812df8b04cec8c7188f0b15fbce45c9e637a8a
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
vinayv1208/Egiants_tasks
|
c56b3e8d38c75a594d3d094845e42b1bab983542
|
894e6cc0f95757e87218105c31926bd3cb1a74ab
|
refs/heads/master
| 2023-01-09T21:10:09.690459
| 2019-09-22T13:11:39
| 2019-09-22T13:11:39
| 204,596,002
| 1
| 0
| null | 2022-12-31T02:49:54
| 2019-08-27T01:45:56
|
Java
|
UTF-8
|
Java
| false
| false
| 1,322
|
java
|
/*
* Copyright 2006-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.osgi.service.importer.support;
import org.springframework.beans.factory.DisposableBean;
/**
* Simple adapter around a Spring disposable bean.
*
* @author Costin Leau
*
*/
class DisposableBeanRunnableAdapter implements Runnable {
private final DisposableBean bean;
/**
* Constructs a new <code>DisposableBeanRunnableAdapter</code> instance.
*
* @param bean
*/
public DisposableBeanRunnableAdapter(DisposableBean bean) {
this.bean = bean;
}
public void run() {
try {
bean.destroy();
}
catch (Exception ex) {
if (ex instanceof RuntimeException)
throw (RuntimeException) ex;
else
throw new RuntimeException(ex);
}
}
}
|
[
"vinayv.2208@gmail.com"
] |
vinayv.2208@gmail.com
|
de57c6d9e90f1aae24c0ca2ad5bf09831ac88014
|
3814d5882b6521fadb7a018a5fe1f57244012bf4
|
/app/models/uk/org/siri/siri/ParticipantRefStructure.java
|
5599b45a300ddb34c93479f9647d29c618ee484c
|
[] |
no_license
|
sergmor/busteller
|
d41692cf2bd6e1c30e985401ac7290c6adb91440
|
b3f9802a1fd217f920c8bcf1ad72bdae4c1ab5b4
|
refs/heads/master
| 2021-01-01T16:31:19.876063
| 2014-04-30T23:43:15
| 2014-04-30T23:43:15
| 18,954,897
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,874
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// 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: 2010.11.14 at 03:28:36 PM PST
//
package models.uk.org.siri.siri;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* Reference to Unique identifier of participant.
*
* <p>Java class for ParticipantRefStructure complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ParticipantRefStructure">
* <simpleContent>
* <extension base="<http://www.siri.org.uk/siri>ParticipantCodeType">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ParticipantRefStructure", propOrder = {
"value"
})
public class ParticipantRefStructure {
@XmlValue
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String value;
/**
* Type for Unique identifier of participant.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}
|
[
"sdm2162@columbia.edu"
] |
sdm2162@columbia.edu
|
5851bc2049c0e1a223bd25be5c5d2012ca1a7e45
|
184e3072888ba3374ad0ae2bfd2203224b0f8d1b
|
/fixture/scripts/src/main/java/org/isisaddons/module/publishmq/fixture/scripts/teardown/PublishMqDemoObjectsTearDownFixture.java
|
d893554206797a4c09aedb8822f3f26d09dfeb2a
|
[
"Apache-2.0"
] |
permissive
|
bibryam/isis-module-publishmq
|
d6542bb5aaf45456a77a37a7de99922ad28472cb
|
bb44c79b96694cd1fa734ce4d932f18e4e4187c4
|
refs/heads/master
| 2021-01-24T21:20:05.577711
| 2015-07-05T10:26:42
| 2015-07-05T10:26:42
| 38,568,085
| 1
| 0
| null | 2015-07-05T12:23:13
| 2015-07-05T12:23:12
|
Java
|
UTF-8
|
Java
| false
| false
| 1,131
|
java
|
/*
* Copyright 2015 Dan Haywood
*
* 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.isisaddons.module.publishmq.fixture.scripts.teardown;
import org.apache.isis.applib.fixturescripts.FixtureScript;
import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
public class PublishMqDemoObjectsTearDownFixture extends FixtureScript {
@Override
protected void execute(final ExecutionContext executionContext) {
isisJdoSupport.executeUpdate("delete from publishmq.\"PublishMqDemoObject\"");
}
@javax.inject.Inject
private IsisJdoSupport isisJdoSupport;
}
|
[
"dan@haywood-associates.co.uk"
] |
dan@haywood-associates.co.uk
|
dab00d60d16e83776f1daf7c2d3bc002c33a489f
|
88ae8695987ada722184307301e221e1ba3cc2fa
|
/third_party/ukey2/src/src/main/java/com/google/security/cryptauth/lib/securegcm/KeyEncoding.java
|
67e4acea88af6d99f0629d7a041c9cc8028f1ceb
|
[
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-generic-cla",
"LGPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later"
] |
permissive
|
iridium-browser/iridium-browser
|
71d9c5ff76e014e6900b825f67389ab0ccd01329
|
5ee297f53dc7f8e70183031cff62f37b0f19d25f
|
refs/heads/master
| 2023-08-03T16:44:16.844552
| 2023-07-20T15:17:00
| 2023-07-23T16:09:30
| 220,016,632
| 341
| 40
|
BSD-3-Clause
| 2021-08-13T13:54:45
| 2019-11-06T14:32:31
| null |
UTF-8
|
Java
| false
| false
| 5,991
|
java
|
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// 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 com.google.security.cryptauth.lib.securegcm;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.security.cryptauth.lib.securemessage.PublicKeyProtoUtil;
import com.google.security.cryptauth.lib.securemessage.SecureMessageProto.GenericPublicKey;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.interfaces.ECPrivateKey;
import java.security.interfaces.ECPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import javax.crypto.SecretKey;
import javax.crypto.interfaces.DHPrivateKey;
import javax.crypto.spec.SecretKeySpec;
/**
* Utility class for encoding and parsing keys used by SecureGcm.
*/
public class KeyEncoding {
private KeyEncoding() {} // Do not instantiate
private static boolean simulateLegacyCryptoRequired = false;
/**
* The JCA algorithm name to use when encoding/decoding symmetric keys.
*/
static final String SYMMETRIC_KEY_ENCODING_ALG = "AES";
public static byte[] encodeMasterKey(SecretKey masterKey) {
return masterKey.getEncoded();
}
public static SecretKey parseMasterKey(byte[] encodedMasterKey) {
return new SecretKeySpec(encodedMasterKey, SYMMETRIC_KEY_ENCODING_ALG);
}
public static byte[] encodeUserPublicKey(PublicKey pk) {
return encodePublicKey(pk);
}
public static byte[] encodeUserPrivateKey(PrivateKey sk) {
return sk.getEncoded();
}
public static byte[] encodeDeviceSyncGroupPublicKey(PublicKey pk) {
return PublicKeyProtoUtil.encodePaddedEcPublicKey(pk).toByteArray();
}
public static PrivateKey parseUserPrivateKey(byte[] encodedPrivateKey, boolean isLegacy)
throws InvalidKeySpecException {
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encodedPrivateKey);
if (isLegacy) {
return getRsaKeyFactory().generatePrivate(keySpec);
}
return getEcKeyFactory().generatePrivate(keySpec);
}
public static PublicKey parseUserPublicKey(byte[] keyBytes) throws InvalidKeySpecException {
return parsePublicKey(keyBytes);
}
public static PublicKey parseDeviceSyncGroupPublicKey(byte[] keyBytes)
throws InvalidKeySpecException {
return parsePublicKey(keyBytes);
}
public static byte[] encodeKeyAgreementPublicKey(PublicKey pk) {
return encodePublicKey(pk);
}
public static PublicKey parseKeyAgreementPublicKey(byte[] keyBytes)
throws InvalidKeySpecException {
return parsePublicKey(keyBytes);
}
public static byte[] encodeKeyAgreementPrivateKey(PrivateKey sk) {
if (isLegacyPrivateKey(sk)) {
return PublicKeyProtoUtil.encodeDh2048PrivateKey((DHPrivateKey) sk);
}
return sk.getEncoded();
}
public static PrivateKey parseKeyAgreementPrivateKey(byte[] keyBytes, boolean isLegacy)
throws InvalidKeySpecException {
if (isLegacy) {
return PublicKeyProtoUtil.parseDh2048PrivateKey(keyBytes);
}
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(keyBytes);
return getEcKeyFactory().generatePrivate(keySpec);
}
public static byte[] encodeSigningPublicKey(PublicKey pk) {
return encodePublicKey(pk);
}
public static PublicKey parseSigningPublicKey(byte[] keyBytes) throws InvalidKeySpecException {
return parsePublicKey(keyBytes);
}
public static byte[] encodeSigningPrivateKey(PrivateKey sk) {
return sk.getEncoded();
}
public static PrivateKey parseSigningPrivateKey(byte[] keyBytes) throws InvalidKeySpecException {
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(keyBytes);
return getEcKeyFactory().generatePrivate(keySpec);
}
public static boolean isLegacyPublicKey(PublicKey pk) {
if (pk instanceof ECPublicKey) {
return false;
}
return true;
}
public static boolean isLegacyPrivateKey(PrivateKey sk) {
if (sk instanceof ECPrivateKey) {
return false;
}
return true;
}
public static boolean isLegacyCryptoRequired() {
return PublicKeyProtoUtil.isLegacyCryptoRequired() || simulateLegacyCryptoRequired;
}
/**
* When testing, use this to force {@link #isLegacyCryptoRequired()} to return {@code true}
*/
// @VisibleForTesting
public static void setSimulateLegacyCrypto(boolean forceLegacy) {
simulateLegacyCryptoRequired = forceLegacy;
}
private static byte[] encodePublicKey(PublicKey pk) {
return PublicKeyProtoUtil.encodePublicKey(pk).toByteArray();
}
private static PublicKey parsePublicKey(byte[] keyBytes) throws InvalidKeySpecException {
try {
return PublicKeyProtoUtil.parsePublicKey(GenericPublicKey.parseFrom(keyBytes));
} catch (InvalidProtocolBufferException e) {
throw new InvalidKeySpecException("Unable to parse GenericPublicKey", e);
} catch (IllegalArgumentException e) {
throw new InvalidKeySpecException("Unable to parse GenericPublicKey", e);
}
}
static KeyFactory getEcKeyFactory() {
try {
return KeyFactory.getInstance("EC");
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e); // No ECDH provider available
}
}
static KeyFactory getRsaKeyFactory() {
try {
return KeyFactory.getInstance("RSA");
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e); // No RSA provider available
}
}
}
|
[
"jengelh@inai.de"
] |
jengelh@inai.de
|
fe10e43f39869214824e4f38b9699f8be26565ec
|
6fae4c30b22bf986a148d209a24fb2f80fdb6723
|
/ranch-resource/src/main/java/org/lpw/ranch/resource/ResourceDaoImpl.java
|
1b59a19d4fcaea9d8c7c1e52e89d15d81b5005d7
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
arvin-xiao/ranch
|
e79b39b5a2d1329c7979f55dcb1aeee36103c2cb
|
147e080990f50cf3abe345dfccdaa30d6fc8e8d4
|
refs/heads/master
| 2023-05-02T10:58:35.029963
| 2020-03-15T05:45:06
| 2020-03-15T05:45:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,703
|
java
|
package org.lpw.ranch.resource;
import org.lpw.ranch.util.DaoHelper;
import org.lpw.ranch.util.DaoOperation;
import org.lpw.tephra.dao.orm.PageList;
import org.lpw.tephra.dao.orm.lite.LiteOrm;
import org.lpw.tephra.dao.orm.lite.LiteQuery;
import org.springframework.stereotype.Repository;
import javax.inject.Inject;
import java.util.ArrayList;
import java.util.List;
/**
* @author lpw
*/
@Repository(ResourceModel.NAME + ".dao")
class ResourceDaoImpl implements ResourceDao {
@Inject
private LiteOrm liteOrm;
@Inject
private DaoHelper daoHelper;
@Override
public PageList<ResourceModel> query(String type, String name, String label, int state, String user, int pageSize, int pageNum) {
StringBuilder where = new StringBuilder();
List<Object> args = new ArrayList<>();
daoHelper.where(where, args, "c_type", DaoOperation.Equals, type);
daoHelper.where(where, args, "c_name", DaoOperation.Equals, name);
daoHelper.where(where, args, "c_state", DaoOperation.Equals, state);
daoHelper.where(where, args, "c_user", DaoOperation.Equals, user);
daoHelper.like(null, where, args, "c_label", label);
return liteOrm.query(new LiteQuery(ResourceModel.class).where(where.toString()).order("c_sort,c_time desc")
.size(pageSize).page(pageNum), args.toArray());
}
@Override
public ResourceModel findById(String id) {
return liteOrm.findById(ResourceModel.class, id);
}
@Override
public void save(ResourceModel resource) {
liteOrm.save(resource);
}
@Override
public void delete(String id) {
liteOrm.deleteById(ResourceModel.class, id);
}
}
|
[
"heisedebaise@hotmail.com"
] |
heisedebaise@hotmail.com
|
6f751d00651466256b114cf3787d0c192314839b
|
06989f2e4495fab7711c056eba47c2f0498c5931
|
/src/com/jacamars/dsp/rtb/exchanges/Mobclix.java
|
bf8223089517a76d91fae35fad22613a04a15f18
|
[
"Apache-2.0"
] |
permissive
|
UITTD/bidder
|
40a313b5c48c6a0552b300514f0ea63f269192ca
|
919017e571e025274acc974078bb043b8e8219c1
|
refs/heads/master
| 2020-09-09T16:30:40.971860
| 2019-11-14T12:21:58
| 2019-11-14T12:21:58
| 221,168,281
| 0
| 0
|
Apache-2.0
| 2019-11-12T08:32:42
| 2019-11-12T08:32:42
| null |
UTF-8
|
Java
| false
| false
| 1,440
|
java
|
package com.jacamars.dsp.rtb.exchanges;
import java.io.IOException;
import java.io.InputStream;
import com.jacamars.dsp.rtb.pojo.BidRequest;
/**
* A Bid request for Mobclix. Exchanges can introduce their own JSON into the bid request, so all the
* special parsing is done in a class that extends the BidRequest. All standard bid requests are handled
* in the BidRequest super class. The exchange only handles those values specific to the exchange.
* <p>
* The interrogate() method of the base class is used to retrieve the object values from the class.
* @author Ben M. Faul
*
*/
public class Mobclix extends BidRequest {
/**
* Constructs Mobclix bid request from a file containoing JSON
* @param in. String - the File name containing the data.
* @throws JsonProcessingException on parse errors.
* @throws Exception on file reading errors
*/
public Mobclix(String in) throws Exception {
super(in);
}
/**
* Constructs Mobclix bid request from JSON stream in jetty.
* @param in. InputStream - the JSON data coming from HTTP.
* @throws JsonProcessingException on parse errors.
* @throws Exception on stream reading errors.
*/
public Mobclix(InputStream in) throws Exception {
super(in);
// TODO Auto-generated constructor stub
}
/**
* Process special mobclix stuff, sets the exchange name.
*/
@Override
public boolean parseSpecial() {
setExchange( "mobclix" );
return true;
}
}
|
[
"ben.faul@gmail.com"
] |
ben.faul@gmail.com
|
5731ed3debf175b234d8d17035e3ccb18795cc69
|
e1d698946eeb997d63507d157bda6c0cac7097fb
|
/hibernate/hibernate-many2many/src/test/java/org/frank/hibernate/many2many/models/Many2ManyTest.java
|
f91806a19eb25c78e24474deeaac2544388244f7
|
[] |
no_license
|
fengandzhy/hibernate-demos
|
576e478f49d27a50a23fb08b8888b748c15c271e
|
5c8cee8855e4ba5697c11bc93efdeebddd083d1f
|
refs/heads/master
| 2023-01-20T06:53:09.223922
| 2023-01-18T09:15:27
| 2023-01-18T09:15:27
| 195,709,392
| 1
| 0
| null | 2023-01-18T09:15:28
| 2019-07-08T00:14:02
|
Java
|
UTF-8
|
Java
| false
| false
| 1,027
|
java
|
package org.frank.hibernate.many2many.models;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.boot.MetadataSources;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
import org.junit.After;
import org.junit.Before;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class Many2ManyTest {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
private SessionFactory sessionFactory = null;
protected Session session = null;
@Before
public void init() {
Configuration configuration = new Configuration().configure();
ServiceRegistry serviceRegistry = configuration.getStandardServiceRegistryBuilder().build();
sessionFactory = new MetadataSources(serviceRegistry).buildMetadata().buildSessionFactory();
session = sessionFactory.openSession();
}
@After
public void destroy() {
session.close();
sessionFactory.close();
}
}
|
[
"fengandzhy@gmail.com"
] |
fengandzhy@gmail.com
|
bcdf5c91023b55038f481f14d82a0489525f0a73
|
50750fbff439ace4a514c18ab825b9e13a24b0aa
|
/pegasus-spyware-decompiled/sample3/recompiled_java/sources/android/support/v4/graphics/drawable/DrawableCompatLollipop.java
|
b308f4a9f3feff90cf72be5c6f7b568ae72c118e
|
[
"MIT"
] |
permissive
|
GypsyBud/pegasus_spyware
|
3066ae7d217a7d4b23110326f75bf6cf63737105
|
b40f5e4bdf5bd01c21e8ef90ebe755b29c2daa68
|
refs/heads/master
| 2023-06-24T05:44:01.354811
| 2021-07-31T18:59:26
| 2021-07-31T18:59:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,845
|
java
|
package android.support.v4.graphics.drawable;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.ColorFilter;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.DrawableContainer;
import android.graphics.drawable.InsetDrawable;
import android.util.AttributeSet;
import java.io.IOException;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
class DrawableCompatLollipop {
DrawableCompatLollipop() {
}
public static void setHotspot(Drawable drawable, float x, float y) {
drawable.setHotspot(x, y);
}
public static void setHotspotBounds(Drawable drawable, int left, int top, int right, int bottom) {
drawable.setHotspotBounds(left, top, right, bottom);
}
public static void setTint(Drawable drawable, int tint) {
drawable.setTint(tint);
}
public static void setTintList(Drawable drawable, ColorStateList tint) {
drawable.setTintList(tint);
}
public static void setTintMode(Drawable drawable, PorterDuff.Mode tintMode) {
drawable.setTintMode(tintMode);
}
public static Drawable wrapForTinting(Drawable drawable) {
if (!(drawable instanceof TintAwareDrawable)) {
return new DrawableWrapperLollipop(drawable);
}
return drawable;
}
public static void applyTheme(Drawable drawable, Resources.Theme t) {
drawable.applyTheme(t);
}
public static boolean canApplyTheme(Drawable drawable) {
return drawable.canApplyTheme();
}
public static ColorFilter getColorFilter(Drawable drawable) {
return drawable.getColorFilter();
}
public static void clearColorFilter(Drawable drawable) {
DrawableContainer.DrawableContainerState state;
drawable.clearColorFilter();
if (drawable instanceof InsetDrawable) {
clearColorFilter(((InsetDrawable) drawable).getDrawable());
} else if (drawable instanceof DrawableWrapper) {
clearColorFilter(((DrawableWrapper) drawable).getWrappedDrawable());
} else if ((drawable instanceof DrawableContainer) && (state = (DrawableContainer.DrawableContainerState) ((DrawableContainer) drawable).getConstantState()) != null) {
int count = state.getChildCount();
for (int i = 0; i < count; i++) {
Drawable child = state.getChild(i);
if (child != null) {
clearColorFilter(child);
}
}
}
}
public static void inflate(Drawable drawable, Resources res, XmlPullParser parser, AttributeSet attrs, Resources.Theme t) throws IOException, XmlPullParserException {
drawable.inflate(res, parser, attrs, t);
}
}
|
[
"jonathanvill00@gmail.com"
] |
jonathanvill00@gmail.com
|
95b1b8efcfc69fdc0b8484dbedf22ce4186d7e48
|
95a8c2994c14cc756a72dac2fdde680d7923e1e0
|
/stado/src/org/postgresql/stado/parser/core/syntaxtree/Func_PgCurrentDate.java
|
f0442a68381b643fa9c9b44b29dd643bbb316e54
|
[] |
no_license
|
AlvinPeng/stado_study
|
8f46da97462ad633f5cf0eb3ea2cdec44b08a2c5
|
91f4ba7806158340e076ef219ebad1bb740e2189
|
refs/heads/master
| 2021-01-23T03:59:04.762167
| 2019-01-21T02:29:39
| 2019-01-21T02:29:39
| 11,657,757
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 785
|
java
|
/* Generated by JTB 1.4.4 */
package org.postgresql.stado.parser.core.syntaxtree;
import org.postgresql.stado.parser.core.visitor.*;
public class Func_PgCurrentDate implements INode {
public NodeToken f0;
private static final long serialVersionUID = 144L;
public Func_PgCurrentDate(final NodeToken n0) {
f0 = n0;
}
public Func_PgCurrentDate() {
f0 = new NodeToken("CURRENT_DATE");
}
public <R, A> R accept(final IRetArguVisitor<R, A> vis, final A argu) {
return vis.visit(this, argu);
}
public <R> R accept(final IRetVisitor<R> vis) {
return vis.visit(this);
}
public <A> void accept(final IVoidArguVisitor<A> vis, final A argu) {
vis.visit(this, argu);
}
public void accept(final IVoidVisitor vis) {
vis.visit(this);
}
}
|
[
"pengalvin@yahoo.com"
] |
pengalvin@yahoo.com
|
cfd4369dadf1b036db3ab80abb8b50dd4578d059
|
4179218de206fd6df0d841a065a6158c164eded9
|
/android/src/appewtc/masterung/coinsdropbsru/android/AndroidLauncher.java
|
7964ab0882e41b9f55cb400e6a24982bed216be7
|
[] |
no_license
|
masterUNG/CoinsDropBSRU
|
227552aa8257492fd1fff4f2f8b69341dc9b8369
|
1501991f39fb2f99d68b5dadb6dd236e48a37279
|
refs/heads/master
| 2021-04-12T04:12:53.169988
| 2015-05-04T07:18:12
| 2015-05-04T07:18:12
| 34,975,430
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 551
|
java
|
package appewtc.masterung.coinsdropbsru.android;
import android.os.Bundle;
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import appewtc.masterung.coinsdropbsru.MyGdxGame;
public class AndroidLauncher extends AndroidApplication {
@Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
initialize(new MyGdxGame(), config);
}
}
|
[
"phrombutr@gmail.com"
] |
phrombutr@gmail.com
|
321299a59a6087388fc5d13e758decb1f1128140
|
c16b8990ec3c297ac36aecabb662a6ce124dd940
|
/base/src/org/openXpertya/print/fiscal/hasar/HasarPrinterPL8F.java
|
17dadae77cd10e9276db1cff378413b738a16daa
|
[] |
no_license
|
Lucas128/libertya
|
6decae77481ba0756a9a14998824f163001f4b7c
|
d2e8877a0342af5796c74809edabf726b9ff50dc
|
refs/heads/master
| 2021-01-10T16:52:41.332435
| 2015-05-26T19:34:39
| 2015-05-26T19:34:39
| 36,461,214
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,519
|
java
|
package org.openXpertya.print.fiscal.hasar;
import java.math.BigDecimal;
import org.openXpertya.print.fiscal.FiscalPacket;
import org.openXpertya.print.fiscal.comm.FiscalComm;
public class HasarPrinterPL8F extends HasarFiscalPrinter {
public HasarPrinterPL8F() {
super();
}
/**
* @param fiscalComm
*/
public HasarPrinterPL8F(FiscalComm fiscalComm) {
super(fiscalComm);
}
public String formatAmount(BigDecimal amount) {
amount = amount.setScale(4, BigDecimal.ROUND_HALF_UP);
return amount.toString();
}
public String formatQuantity(BigDecimal quantity) {
return quantity.toString();
}
@Override
public FiscalPacket cmdSetGeneralConfiguration(boolean printConfigReport, boolean loadDefaultData, BigDecimal finalConsumerLimit, BigDecimal ticketInvoiceLimit, BigDecimal ivaNonInscript, Integer copies, Boolean printChange, Boolean printLabels, String ticketCutType, Boolean printFramework, Boolean reprintDocuments, String balanceText, Boolean paperSound, String paperSize) {
return super.cmdSetGeneralConfiguration(printConfigReport, loadDefaultData,
finalConsumerLimit, BigDecimal.ZERO, ivaNonInscript, copies,
false, false, null, printFramework,
reprintDocuments, balanceText, paperSound, null);
}
@Override
public FiscalPacket cmdPrintFiscalText(String text, Integer display) {
// El parámetro display no tiene utilidad en este modelo.
// Siempre se asigna a 0.
return super.cmdPrintFiscalText(text, 0);
}
@Override
public FiscalPacket cmdPrintLineItem(String description, BigDecimal quantity, BigDecimal price, BigDecimal ivaPercent, boolean substract, BigDecimal internalTaxes, boolean basePrice, Integer display) {
// El parámetro display no tiene utilidad en este modelo.
// Siempre se asigna a 0.
return super.cmdPrintLineItem(description, quantity, price, ivaPercent,
substract, internalTaxes, basePrice, 0);
}
@Override
public FiscalPacket cmdLastItemDiscount(String description, BigDecimal amount, boolean substract, boolean baseAmount, Integer display) {
// El parámetro display no tiene utilidad en este modelo.
// Siempre se asigna a 0.
return super.cmdLastItemDiscount(description, amount, substract, baseAmount, 0);
}
@Override
public FiscalPacket cmdSubtotal(boolean print, Integer display) {
// El parámetro display no tiene utilidad en este modelo.
// Siempre se asigna a 0.
return super.cmdSubtotal(print, 0);
}
@Override
public FiscalPacket cmdTotalTender(String description, BigDecimal amount, boolean cancel, Integer display) {
// El parámetro display no tiene utilidad en este modelo.
// Siempre se asigna a 0.
return super.cmdTotalTender(description, amount, cancel, 0);
}
@Override
public FiscalPacket cmdCloseFiscalReceipt(Integer copies) {
// Por defecto se anula el parámetro de copias aunque en
// la versión 2.01 de este modelo se permite el parámetro
// Se debería validar la versión del controlador para decidir
// si permitirlo o no.
FiscalPacket cmd = createFiscalPacket(CMD_CLOSE_FISCAL_RECEIPT);
return cmd;
}
@Override
public FiscalPacket cmdCloseDNFH(Integer copies) {
// Por defecto se anula el parámetro de copias aunque en
// la versión 2.01 de este modelo se permite el parámetro
// Se debería validar la versión del controlador para decidir
// si permitirlo o no.
FiscalPacket cmd = createFiscalPacket(CMD_CLOSE_DNFH);
return cmd;
}
@Override
protected String getCAINumber(FiscalPacket response) {
// Validar la versión del modelo.
// El número del CAI solo es retornado en la versión 2.01
// de este modelo.
try {
return response.getString(5);
} catch(Exception e) {
return null;
}
}
@Override
protected FiscalPacket cmdReturnRecharge(String description,
BigDecimal amount, BigDecimal ivaPercent, boolean subtract,
BigDecimal internalTaxes, boolean baseAmount, Integer display,
String operation, int descMaxLength) {
// El parámetro display no tiene utilidad en este modelo.
// Siempre se asigna a 0.
return super.cmdReturnRecharge(description, amount, ivaPercent, subtract,
internalTaxes, baseAmount, 0, operation, descMaxLength);
}
@Override
public FiscalPacket cmdGeneralDiscount(String description,
BigDecimal amount, boolean substract, boolean baseAmount,
Integer display) {
// El parámetro display no tiene utilidad en este modelo.
// Siempre se asigna a 0.
return super.cmdGeneralDiscount(description, amount, substract, baseAmount,
0);
}
}
|
[
"dev.disytel@gmail.com"
] |
dev.disytel@gmail.com
|
3c9c14631e6d1699fc4fe0b6cc23a10f09b046ac
|
47dc2c31a3287d59e38fb91043dc8908b7e4e487
|
/src/main/java/org/smart4j/chapter2/service/CustomerService.java
|
9da0844a5879b75c642c3c4437dcaef9d0cb9c87
|
[] |
no_license
|
Monvict/web-learn
|
278887af4f4ae5bde549f0129ea6e09fc7b04ae3
|
2a0f5eba9f96b5eb2a652c6675f2e5ff6e09ac81
|
refs/heads/master
| 2021-01-21T19:40:05.999883
| 2017-05-24T10:26:21
| 2017-05-24T10:26:21
| 92,149,448
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,415
|
java
|
package org.smart4j.chapter2.service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.smart4j.chapter2.helper.DataBaseHelper;
import org.smart4j.chapter2.model.Customer;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Created by Administrator on 2017/5/23.
*/
public class CustomerService {
public static final String QUERY_LIST = "select * from customer";
private static final Logger LOGGER = LoggerFactory.getLogger(CustomerService.class);
/**
* 获取客户列表
* @return
*/
public List<Customer> getCustomerList () throws SQLException {
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs = null;
List<Customer> customerList = new ArrayList<Customer>();
try {
conn = DataBaseHelper.getConn();
ps = conn.prepareCall(QUERY_LIST);
rs = ps.executeQuery();
while (rs.next()) {
Customer customer = new Customer();
customer.setId(rs.getLong("c_id"));
customer.setName(rs.getString("name"));
customer.setContact(rs.getString("contact"));
customer.setEmail(rs.getString("email"));
customer.setTelePhone("telephone");
customerList.add(customer);
}
} finally {
DataBaseHelper.close(conn, ps, rs);
}
return customerList;
}
/**
* 获取客户列表
* @param keyword
* @return
*/
public List<Customer> getCustomerList (String keyword) {
//TODO
return null;
}
/**
* 获取单个用户
* @param id
* @return
*/
public Customer getCustomer (long id) {
//TODO
return null;
}
/**
* 创建单个用户
* @param fieldMap
* @return
*/
public boolean createCustomer (Map<String, Object> fieldMap) {
//TODO
return false;
}
/**
* 更新用户的信息
* @param id
* @param fieldMap
* @return
*/
public boolean updateCustomer (long id, Map<String, Object> fieldMap) {
//TODO
return false;
}
/**
* 删除单个用户
* @param id
* @return
*/
public boolean delteCustomer (long id) {
//TODO
return false;
}
}
|
[
"aa"
] |
aa
|
6e55c3dd07df5df0f5c9dbc26a98eaaf8acf2d18
|
c501583b9b998984eb52229b9d3c38cd8f93d86e
|
/src/main/java/com/tencentcloudapi/cvm/v20170312/models/Tag.java
|
df01f22f1ac1d1eae071d9379b7460cb1608b12f
|
[
"Apache-2.0"
] |
permissive
|
CoolLittle/tencentcloud-sdk-java
|
20cf19d0648edda1a92d90e55b023a7c9774ffd4
|
9ed1f3da70a1e01df441ec23ca56973dc8c7f634
|
refs/heads/master
| 2020-03-25T20:36:42.081853
| 2018-08-06T03:11:32
| 2018-08-06T03:11:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,259
|
java
|
package com.tencentcloudapi.cvm.v20170312.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class Tag extends AbstractModel{
/**
* 标签键
*/
@SerializedName("Key")
@Expose
private String Key;
/**
* 标签值
*/
@SerializedName("Value")
@Expose
private String Value;
/**
* 获取标签键
* @return Key 标签键
*/
public String getKey() {
return this.Key;
}
/**
* 设置标签键
* @param Key 标签键
*/
public void setKey(String Key) {
this.Key = Key;
}
/**
* 获取标签值
* @return Value 标签值
*/
public String getValue() {
return this.Value;
}
/**
* 设置标签值
* @param Value 标签值
*/
public void setValue(String Value) {
this.Value = Value;
}
/**
* 内部实现,用户禁止调用
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "Key", this.Key);
this.setParamSimple(map, prefix + "Value", this.Value);
}
}
|
[
"coolli@tencent.com"
] |
coolli@tencent.com
|
93dc073d77aa2a93c402b6596d6dfbd2e3b4d745
|
3cee619f9d555e75625bfff889ae5c1394fd057a
|
/app/src/main/java/org/tensorflow/lite/examples/imagesegmentation/p000a/p013b/p020e/p021a/C0194c.java
|
a5353ba571c5f72a0d5c240c50431660f8b4f73a
|
[] |
no_license
|
randauto/imageerrortest
|
6fe12d92279e315e32409e292c61b5dc418f8c2b
|
06969c68b9d82ed1c366d8b425c87c61db933f15
|
refs/heads/master
| 2022-04-21T18:21:56.836502
| 2020-04-23T16:18:49
| 2020-04-23T16:18:49
| 258,261,084
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 735
|
java
|
package p000a.p013b.p020e.p021a;
import p000a.p013b.p020e.p023c.C0211a;
/* renamed from: a.b.e.a.c */
/* compiled from: EmptyDisposable */
public enum C0194c implements C0211a<Object> {
INSTANCE,
NEVER;
/* renamed from: a */
public int mo388a(int i) {
return i & 2;
}
/* renamed from: a */
public void mo349a() {
}
/* renamed from: b */
public Object mo390b() {
return null;
}
/* renamed from: c */
public boolean mo391c() {
return true;
}
/* renamed from: d */
public void mo392d() {
}
/* renamed from: a */
public boolean mo389a(Object obj) {
throw new UnsupportedOperationException("Should not be called!");
}
}
|
[
"tuanlq@funtap.vn"
] |
tuanlq@funtap.vn
|
babd786813cb1dbe52012a689d3eff899be0cc3b
|
2328022c0fdb34596a98092b4b5aa38550f23b53
|
/modules/scripts/MiscGetTime.java
|
1929408f1297cbe9add46f3174a27c523d7dc108
|
[] |
no_license
|
cybergarage/CyberToolbox4Java3D
|
2d90f09af90a49aac783a0da819a4bb570013935
|
936b7c7274b6f1a12c4b806aff1f2c797c842e25
|
refs/heads/master
| 2023-03-23T18:54:45.209327
| 2014-12-03T16:36:33
| 2014-12-03T16:36:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 712
|
java
|
/*----------------------------------------------------------------
*
* CyberToolBox for Java
*
* Copyright (C) Satoshi Konno 1998-1999
*
* File: MiscGetTime.java
*
----------------------------------------------------------------*/
import java.util.*;
public class MiscGetTime extends Module {
Calendar calendar = new GregorianCalendar();
public void initialize() {
}
public void shutdown() {
}
public void processData(ModuleNode inNode[], ModuleNode exeNode) {
calendar.setTime(new Date());
sendOutNodeValue(0, calendar.get(Calendar.HOUR_OF_DAY));
sendOutNodeValue(1, calendar.get(Calendar.MINUTE));
sendOutNodeValue(2, calendar.get(Calendar.SECOND));
}
}
|
[
"skonno@cybergarage.org"
] |
skonno@cybergarage.org
|
5e8712edf52743e45cd07b8e448018b360af5e9f
|
d57fc3d03a9fba5c45507f0d30e00fca7a09d55f
|
/app/src/main/java/com/lsjr/zizisteward/activity/PaySuccessActivity.java
|
c11b03ec44ee89ac86b3fd369a840bf8c9262842
|
[] |
no_license
|
gyymz1993/V6.1
|
8bc1cd4d9c10890331a4366b06c9384c7ba9068c
|
ecb13d853b4adc69f915ec24ff3cd501f99ee80e
|
refs/heads/master
| 2020-03-28T21:41:16.584853
| 2017-06-20T11:58:41
| 2017-06-20T11:58:41
| 94,621,793
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,117
|
java
|
package com.lsjr.zizisteward.activity;
import java.util.HashMap;
import java.util.List;
import com.lsjr.zizisteward.R;
import com.lsjr.zizisteward.basic.App;
import com.lsjr.zizisteward.basic.BaseActivity;
import com.lsjr.zizisteward.http.HttpClientGet;
import com.lsjr.zizisteward.utils.EncryptUtils;
import com.lsjr.zizisteward.utils.GsonUtil;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class PaySuccessActivity extends BaseActivity implements OnClickListener {
private TextView mBack;
private Intent mIntent;
private RelativeLayout mIv_back;
private TextView mTv_look_order;
private String mGnum;
private TextView mTv_name;
private TextView mTv_phone;
private TextView mTv_address;
private TextView mTv_price;
@Override
public int getContainerView() {
return R.layout.activity_pay_success;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
App.getInstance().addActivity(this);
setmTitle("支付成功");
mGnum = getIntent().getStringExtra("gnum");
mBack = (TextView) findViewById(R.id.back);// 返回首页
mIv_back = (RelativeLayout) findViewById(R.id.iv_back);
mTv_look_order = (TextView) findViewById(R.id.tv_look_order);
mTv_name = (TextView) findViewById(R.id.tv_name);
mTv_phone = (TextView) findViewById(R.id.tv_phone);
mTv_address = (TextView) findViewById(R.id.tv_address);
mTv_price = (TextView) findViewById(R.id.tv_price);
initLayout();
}
private void initLayout() {
mBack.setOnClickListener(this);
mTv_look_order.setOnClickListener(this);
mIv_back.setOnClickListener(this);
HashMap<String, String> map = new HashMap<>();
map.put("OPT", "40");
map.put("user_id", EncryptUtils.addSign(Integer.parseInt(App.getUserInfo().getId()), "u"));
map.put("gnum", mGnum);
new HttpClientGet(PaySuccessActivity.this, null, map, false, new HttpClientGet.CallBacks<String>() {
@Override
public void onSuccess(String result) {
System.out.println("支付成功详情" + result);
SuccessBean bean = GsonUtil.getInstance().fromJson(result, SuccessBean.class);
mTv_name.setText("姓名: " + bean.getContentData().getDelivery().get(0).getCname());
mTv_phone.setText("电话: " + bean.getContentData().getDelivery().get(0).getCphone());
mTv_address.setText("地址: " + bean.getContentData().getDelivery().get(0).getCaddr());
mTv_price.setText("¥" + bean.getContentData().getOrder_price());
}
});
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
Intent intent = new Intent(this, SixthNewActivity.class);
startActivity(intent);
finish();
}
return super.onKeyDown(keyCode, event);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.back:
mIntent = new Intent(PaySuccessActivity.this, SixthNewActivity.class);
startActivity(mIntent);
finish();
break;
case R.id.iv_back:
mIntent = new Intent(PaySuccessActivity.this, SixthNewActivity.class);
startActivity(mIntent);
finish();
break;
case R.id.tv_look_order:
mIntent = new Intent(PaySuccessActivity.this, WaitSendGoodsOrderDetailActivity.class);
mIntent.putExtra("indentNo", mGnum);
startActivity(mIntent);
finish();
break;
}
}
public class SuccessBean {
public SuccessInfo contentData;
public String error;
public String msg;
public SuccessInfo getContentData() {
return contentData;
}
public void setContentData(SuccessInfo contentData) {
this.contentData = contentData;
}
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
public class SuccessInfo {
public String assess_order;
public String bask_order;
public List<SuccessDetail> delivery;
public String gid;
public String gnum;
public String gsname;
public String order_price;
public String order_time;
public String pay_state;
// private String pay_time Object
public String transflow;
public String getAssess_order() {
return assess_order;
}
public void setAssess_order(String assess_order) {
this.assess_order = assess_order;
}
public String getBask_order() {
return bask_order;
}
public void setBask_order(String bask_order) {
this.bask_order = bask_order;
}
public List<SuccessDetail> getDelivery() {
return delivery;
}
public void setDelivery(List<SuccessDetail> delivery) {
this.delivery = delivery;
}
public String getGid() {
return gid;
}
public void setGid(String gid) {
this.gid = gid;
}
public String getGnum() {
return gnum;
}
public void setGnum(String gnum) {
this.gnum = gnum;
}
public String getGsname() {
return gsname;
}
public void setGsname(String gsname) {
this.gsname = gsname;
}
public String getOrder_price() {
return order_price;
}
public void setOrder_price(String order_price) {
this.order_price = order_price;
}
public String getOrder_time() {
return order_time;
}
public void setOrder_time(String order_time) {
this.order_time = order_time;
}
public String getPay_state() {
return pay_state;
}
public void setPay_state(String pay_state) {
this.pay_state = pay_state;
}
public String getTransflow() {
return transflow;
}
public void setTransflow(String transflow) {
this.transflow = transflow;
}
}
public class SuccessDetail {
public String aid;
public String caddr;
public String clocation;
public String cname;
public String cphone;
public String dcolor;
public String dnumber;
public String dsimg;
public String dsize;
public String dsname;
public String entityId;
public String gmid;
public String id;
public String kid;
public String persistent;
public String service_price;
public String getAid() {
return aid;
}
public void setAid(String aid) {
this.aid = aid;
}
public String getCaddr() {
return caddr;
}
public void setCaddr(String caddr) {
this.caddr = caddr;
}
public String getClocation() {
return clocation;
}
public void setClocation(String clocation) {
this.clocation = clocation;
}
public String getCname() {
return cname;
}
public void setCname(String cname) {
this.cname = cname;
}
public String getCphone() {
return cphone;
}
public void setCphone(String cphone) {
this.cphone = cphone;
}
public String getDcolor() {
return dcolor;
}
public void setDcolor(String dcolor) {
this.dcolor = dcolor;
}
public String getDnumber() {
return dnumber;
}
public void setDnumber(String dnumber) {
this.dnumber = dnumber;
}
public String getDsimg() {
return dsimg;
}
public void setDsimg(String dsimg) {
this.dsimg = dsimg;
}
public String getDsize() {
return dsize;
}
public void setDsize(String dsize) {
this.dsize = dsize;
}
public String getDsname() {
return dsname;
}
public void setDsname(String dsname) {
this.dsname = dsname;
}
public String getEntityId() {
return entityId;
}
public void setEntityId(String entityId) {
this.entityId = entityId;
}
public String getGmid() {
return gmid;
}
public void setGmid(String gmid) {
this.gmid = gmid;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getKid() {
return kid;
}
public void setKid(String kid) {
this.kid = kid;
}
public String getPersistent() {
return persistent;
}
public void setPersistent(String persistent) {
this.persistent = persistent;
}
public String getService_price() {
return service_price;
}
public void setService_price(String service_price) {
this.service_price = service_price;
}
}
}
|
[
"gyymz1993@126.com"
] |
gyymz1993@126.com
|
65d1477d52701b8a0f06d4cfbb6d588a7c9566f2
|
4364f8e72fe2a3e04bd7c9257234a6f55474f968
|
/AMS_电子对账/code/server/source/com.yss.uco.elecreco/src/main/java/com/yss/uco/elecreco/er/special/zb/dao/ErSpecialZbTableName.java
|
4f5950351efabecfa16072bf89718c0924bc23b5
|
[] |
no_license
|
l871993962/liminglei
|
f511ac1cc0c53a8811eaee6a7038f72f6a7ee4cc
|
acbd64ce548e97a729b964418fb6edd0c9e78302
|
refs/heads/master
| 2023-08-03T03:39:25.813790
| 2021-09-27T01:44:51
| 2021-09-27T01:44:51
| 409,838,699
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package com.yss.uco.elecreco.er.special.zb.dao;
public enum ErSpecialZbTableName {
table("T_D_ER_SPECIAL_ZB"),
recycle("R_D_ER_SPECIAL_ZB_R");
private String value;
private ErSpecialZbTableName(String value) {
this.value = value;
}
public String toString() {
return this.value.toString();
}
}
|
[
"l871993962@gmail.com"
] |
l871993962@gmail.com
|
88fe0475aba2a3f898bb4bba1297512461acd6bc
|
d1edf57af95a9fb433cf1b92fa6ea72bb231ec4a
|
/easyFramework/prj/src/main/java/sshdemo/core/mq/MQSender.java
|
2613eb5e16ca9633c0b17c6433ce93f88da16e5c
|
[
"MIT"
] |
permissive
|
atealxt/work-workspaces
|
9e6a31945e548a30944d0a6f33f582a943bb84c0
|
f3a59de7ecb3b3278473209224307d440003fc42
|
refs/heads/master
| 2022-12-20T23:59:37.712712
| 2021-12-20T01:17:33
| 2021-12-20T01:17:33
| 25,240,234
| 0
| 2
|
MIT
| 2022-12-15T23:36:54
| 2014-10-15T05:31:42
|
Java
|
UTF-8
|
Java
| false
| false
| 1,286
|
java
|
package sshdemo.core.mq;
import java.io.Serializable;
public interface MQSender {
void setPersistent(final boolean persistent);
/** 发送出去的消息的存活时间。默认为0,即永不超时 */
void setTimeToLive(long millisecond);
void sendMessage2Queue(final String dest, final String msg) throws MQException;
void sendMessage2Queue(final String dest, final String msg, int priority) throws MQException;
void sendMessage2Queue(final String dest, final Serializable obj) throws MQException;
void sendMessage2Queue(final String dest, final Serializable obj, int priority) throws MQException;
void sendMessage2Topic(final String dest, final String msg) throws MQException;
/** 发送Topic设优先级的话,有可能把前面的message冲掉,容易造成丢数据 */
@Deprecated
void sendMessage2Topic(final String dest, final String msg, int priority) throws MQException;
void sendMessage2Topic(final String dest, final Serializable obj) throws MQException;
/** 发送Topic设优先级的话,有可能把前面的message冲掉,容易造成丢数据 */
@Deprecated
void sendMessage2Topic(final String dest, final Serializable obj, int priority) throws MQException;
//TODO 支持异步发送
}
|
[
"atealxt@gmail.com"
] |
atealxt@gmail.com
|
9485d3320d4d7194cc480a2172f1937a9eadd29d
|
a2054e8dbec716aec5af2e0269128c19be9551c1
|
/Character_Main/test/net/sf/anathema/hero/initialization/DummyHeroModel.java
|
e1c3dfe5e42d9803541e2bb752fc0ae943fee252
|
[] |
no_license
|
oxford-fumble/anathema
|
a2cf9e1429fa875718460e6017119c4588f12ffe
|
2ba9b506297e1e7a413dee7bfdbcd6af80a6d9ec
|
refs/heads/master
| 2021-01-18T05:08:33.046966
| 2013-06-28T14:50:45
| 2013-06-28T14:50:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 694
|
java
|
package net.sf.anathema.hero.initialization;
import net.sf.anathema.hero.change.ChangeAnnouncer;
import net.sf.anathema.hero.model.Hero;
import net.sf.anathema.hero.model.HeroModel;
import net.sf.anathema.hero.model.InitializationContext;
import net.sf.anathema.lib.util.Identifier;
public class DummyHeroModel implements HeroModel {
private Identifier id;
public DummyHeroModel(Identifier id) {
this.id = id;
}
@Override
public Identifier getId() {
return id;
}
@Override
public void initialize(InitializationContext context, Hero hero) {
//nothing to do
}
@Override
public void initializeListening(ChangeAnnouncer announcer) {
//nothing to do
}
}
|
[
"ursreupke@gmail.com"
] |
ursreupke@gmail.com
|
f3ed548a8de1e1d85d209f40f87dc73a912fe15e
|
bf7b4c21300a8ccebb380e0e0a031982466ccd83
|
/middlewareConcepts2014-master/Assignment3/lib/jacorb-3.4/demo/corbaloc/src/demo/corbaloc/Server.java
|
d1ab638a553d06ca3d1140ea8183d0808d5ff566
|
[] |
no_license
|
Puriakshat/Tuberlin
|
3fe36b970aabad30ed95e8a07c2f875e4912a3db
|
28dcf7f7edfe7320c740c306b1c0593a6c1b3115
|
refs/heads/master
| 2021-01-19T07:30:16.857479
| 2014-11-06T18:49:16
| 2014-11-06T18:49:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,070
|
java
|
package demo.corbaloc;
import java.util.Properties;
import java.io.*;
import org.jacorb.orb.util.*;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Policy;
import org.omg.PortableServer.IdAssignmentPolicyValue;
import org.omg.PortableServer.LifespanPolicyValue;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.POAHelper;
import org.omg.PortableServer.Servant;
import org.omg.PortableServer.ImplicitActivationPolicyValue;
public class Server
{
public static void main(String[] args)
{
try
{
Properties props = new Properties();
props.setProperty("jacorb.implname", "HelloServer");
props.setProperty("OAPort", "6969");
String helloID = "HelloServerID";
//init ORB
ORB orb = ORB.init(args, props);
//init POA
POA rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
//init new POA
Policy[] policies = new Policy[2];
policies[0] = rootPOA.create_lifespan_policy(LifespanPolicyValue.PERSISTENT);
policies[1] = rootPOA.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID);
POA helloPOAPersistent = rootPOA.create_POA
("HelloPOAP", rootPOA.the_POAManager(), policies);
// Setup a second POA with a transient policy therebye producing a different corbaloc.
policies = new Policy[3];
policies[0] = rootPOA.create_lifespan_policy(LifespanPolicyValue.TRANSIENT);
policies[1] = rootPOA.create_id_assignment_policy (IdAssignmentPolicyValue.SYSTEM_ID);
policies[2] = rootPOA.create_implicit_activation_policy (ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION);
POA helloPOATransient = rootPOA.create_POA
("HelloPOAT", rootPOA.the_POAManager(), policies);
helloPOAPersistent.the_POAManager().activate();
helloPOATransient.the_POAManager().activate();
// create a GoodDay object
GoodDayImpl goodDayImpl = new GoodDayImpl("SomewhereP");
helloPOAPersistent.activate_object_with_id(helloID.getBytes(), goodDayImpl);
// Manually create a persistent based corbaloc.
String corbalocStr = "corbaloc::localhost:"
+ props.getProperty("OAPort") + "/"
+ props.getProperty("jacorb.implname") + "/"
+ helloPOAPersistent.the_name() + "/" + helloID;
System.out.println("Server 1 can be reached with:");
System.out.println(" " + corbalocStr + "\n");
org.omg.CORBA.Object objP = orb.string_to_object(corbalocStr);
System.out.println("Server 1 ior: " + orb.object_to_string (objP));
PrintWriter ps = new PrintWriter(new FileOutputStream(new File( args[0] ) + "persistent"));
ps.println( orb.object_to_string( objP ) );
ps.close();
// Setup second server
org.omg.CORBA.Object objT = helloPOATransient.servant_to_reference(new GoodDayImpl("SomewhereT"));
// Use the PrintIOR utility function to extract a transient corbaloc string.
corbalocStr = PrintIOR.printCorbalocIOR (orb, orb.object_to_string(objT));
System.out.println("Server 2 can be reached with:");
System.out.println(" " + corbalocStr + "\n");
ps = new PrintWriter(new FileOutputStream(new File( args[0] ) + "transient"));
ps.println( corbalocStr );
ps.close();
// Add an object key mapping to second server
System.out.println("Adding object mapping for server 1 ior:" + orb.object_to_string (objP));
((org.jacorb.orb.ORB)orb).addObjectKey ("VeryShortKey", orb.object_to_string (objP));
// wait for requests
if (args.length == 2)
{
File killFile = new File(args[1]);
while(!killFile.exists())
{
Thread.sleep(1000);
}
orb.shutdown(true);
}
else
{
orb.run();
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
|
[
"puri.akshat@gmail.com"
] |
puri.akshat@gmail.com
|
fecd23197183ce49afddca9767213d38e88d211c
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/ltl-20190510/src/main/java/com/aliyun/ltl20190510/models/AttachDataRequest.java
|
434d79a83ee423d97cd958cf449deee8bbd6ed04
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,595
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ltl20190510.models;
import com.aliyun.tea.*;
public class AttachDataRequest extends TeaModel {
@NameInMap("ApiVersion")
public String apiVersion;
@NameInMap("BusinessId")
public String businessId;
@NameInMap("Key")
public String key;
@NameInMap("ProductKey")
public String productKey;
@NameInMap("Value")
public String value;
public static AttachDataRequest build(java.util.Map<String, ?> map) throws Exception {
AttachDataRequest self = new AttachDataRequest();
return TeaModel.build(map, self);
}
public AttachDataRequest setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
return this;
}
public String getApiVersion() {
return this.apiVersion;
}
public AttachDataRequest setBusinessId(String businessId) {
this.businessId = businessId;
return this;
}
public String getBusinessId() {
return this.businessId;
}
public AttachDataRequest setKey(String key) {
this.key = key;
return this;
}
public String getKey() {
return this.key;
}
public AttachDataRequest setProductKey(String productKey) {
this.productKey = productKey;
return this;
}
public String getProductKey() {
return this.productKey;
}
public AttachDataRequest setValue(String value) {
this.value = value;
return this;
}
public String getValue() {
return this.value;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
aada24833339ceb3607acd60ca2ed24b05d744b4
|
ca06942faac83cc404181d48eabebdfe8c708be2
|
/WebUtilServices/src/main/java/com/fw/webutil/service/email/EmailService.java
|
372c38afc71f433f732ab70469db1c6ad0e50cf2
|
[] |
no_license
|
akranthikiran/webutils
|
fe912c5a25695e6cbdf0256ed8d37ae8a87094e3
|
4d91e12c639f3d084dfb3f0ae47ad217eb9e3802
|
refs/heads/master
| 2021-01-25T05:22:53.821100
| 2015-08-21T08:50:38
| 2015-08-21T08:50:38
| 39,637,867
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,395
|
java
|
package com.fw.webutil.service.email;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import javax.annotation.PostConstruct;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import com.fw.ccg.xml.XMLBeanParser;
/**
* Service to send mails
*
* @author akiran
*/
public class EmailService
{
private EmailServiceConfiguration configuration;
private Properties configProperties;
private Map<String, EmailTemplate> templateMap = new HashMap<>();
public void setConfiguration(EmailServiceConfiguration configuration)
{
this.configuration = configuration;
}
@PostConstruct
private void init()
{
// make sure configuration is provided and it is valid
if(configuration == null)
{
throw new IllegalStateException("No configuration is provided");
}
configuration.validate();
// get java mail properties from configuration
configProperties = configuration.toProperties();
// load email templates, if any
EmailTemplateFile templateFile = new EmailTemplateFile();
for(String resource : configuration.getTemplateResources())
{
XMLBeanParser.parse(EmailService.class.getResourceAsStream(resource), templateFile);
}
this.templateMap = templateFile.getTemplates();
}
/**
* Create new java mail session with the configuration provided to the
* service
*
* @return
*/
private Session newSession()
{
Session mailSession = null;
//if authentication needs to be done provide user name and password
if(configuration.isUseAuthentication())
{
mailSession = Session.getInstance(configProperties, new Authenticator()
{
protected PasswordAuthentication getPasswordAuthentication()
{
return new PasswordAuthentication(configuration.getUserName(), configuration.getPassword());
}
});
}
else
{
mailSession = Session.getInstance(configProperties);
}
return mailSession;
}
/**
* Converts provided list of email string to InternetAddress objects
*
* @param ids
* @return
* @throws AddressException
*/
private InternetAddress[] convertToInternetAddress(String ids[]) throws AddressException
{
InternetAddress[] res = new InternetAddress[ids.length];
for(int i = 0; i < ids.length; i++)
{
res[i] = new InternetAddress(ids[i]);
}
return res;
}
/**
* Checks if provided string array is null or empty
*
* @param str
* @return
*/
private boolean isEmpty(String str[])
{
return(str == null || str.length == 0);
}
/**
* Builds the fully composed mail message that can be sent
*
* @param recipientsToList
* @param recipientsCcList
* @param recipientsBccList
* @param fromMailId
* @param subject
* @param messageBody
* @return
* @throws AddressException
* @throws MessagingException
*/
private Message buildMessage(String recipientsToList[], String recipientsCcList[], String recipientsBccList[], String fromMailId,
String subject, String messageBody) throws AddressException, MessagingException
{
if(isEmpty(recipientsToList) && isEmpty(recipientsCcList) && isEmpty(recipientsBccList))
{
throw new IllegalArgumentException("No recipient is specified in any list");
}
// Create mail message
Session mailSession = newSession();
// build the mail message
Message message = new MimeMessage(mailSession);
message.setFrom(new InternetAddress(fromMailId));
//set recipients mail lists
if(!isEmpty(recipientsToList))
{
message.setRecipients(Message.RecipientType.TO, convertToInternetAddress(recipientsToList));
}
if(!isEmpty(recipientsCcList))
{
message.setRecipients(Message.RecipientType.CC, convertToInternetAddress(recipientsCcList));
}
if(!isEmpty(recipientsBccList))
{
message.setRecipients(Message.RecipientType.BCC, convertToInternetAddress(recipientsBccList));
}
//set the subject and body
message.setSubject(subject);
message.setText(messageBody);
return message;
}
/**
* Service method to send mails. This method uses the specified template to compute the subject and the body
*
* @param recipientsToList
* @param recipientsCcList
* @param recipientsBccList
* @param fromMailId
* @param templateName Template name to compute the subject and body
* @param context Context map to be used while processing template subject and body
*/
public void sendEmail(String recipientsToList[], String recipientsCcList[], String recipientsBccList[], String fromMailId,
String templateName, Map<String, ?> context)
{
EmailTemplate template = this.templateMap.get(templateName);
if(template == null)
{
throw new IllegalArgumentException("Invalid email template name specified: " + templateName);
}
// compute subject and body from template
String subject = template.getSubjectFromTemplate(context);
String body = template.getBodyFromTemplate(context);
try
{
// Build mail message object
Message message = buildMessage(recipientsToList, recipientsCcList, recipientsBccList, fromMailId,
subject, body);
// send the message
Transport.send(message);
}catch(Exception ex)
{
throw new IllegalStateException("An error occurred while sending email", ex);
}
}
/**
* Service method to send mails. This method accepts the subject and body for the mail to be sent.
*
* @param recipientsToList
* @param recipientsCcList
* @param recipientsBccList
* @param fromMailId
* @param subject
* @param body
*/
public void sendEmail(String recipientsToList[], String recipientsCcList[], String recipientsBccList[], String fromMailId,
String subject, String body)
{
try
{
// Build mail message object
Message message = buildMessage(recipientsToList, recipientsCcList, recipientsBccList, fromMailId,
subject, body);
// send the message
Transport.send(message);
}catch(Exception ex)
{
throw new IllegalStateException("An error occurred while sending email", ex);
}
}
}
|
[
"akranthikiran@gmail.com"
] |
akranthikiran@gmail.com
|
adeec21a3802f043b60121da01c97de11d9a7933
|
b5f04fcf9e924a8387d8a9477b04881e84200844
|
/platform/src/com/tao/common/util/DesUtil.java
|
2f2b93d857ae15685656266aa6b52558cf325cea
|
[] |
no_license
|
wangtaogx/platform
|
740091243ef256e81f16ffe0bfda111adf2995f8
|
b68347862c623272d71248fded4163a26318d730
|
refs/heads/master
| 2021-01-10T01:37:51.201718
| 2016-01-19T12:40:24
| 2016-01-19T12:40:24
| 49,879,614
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,158
|
java
|
package com.tao.common.util;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.Key;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.CipherOutputStream;
import javax.crypto.KeyGenerator;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
public class DesUtil {
private Key key ;
public DesUtil() {
}
public DesUtil(String str) {
setKey(str); // 生成密匙
}
public Key getKey() {
return key ;
}
public void setKey(Key key) {
this . key = key;
}
/**
* 根据参数生成 KEY
*/
public void setKey(String strKey) {
try {
KeyGenerator _generator = KeyGenerator.getInstance ( "DES" );
_generator.init( new SecureRandom(strKey.getBytes()));
this . key = _generator.generateKey();
_generator = null ;
} catch (Exception e) {
throw new RuntimeException(
"Error initializing SqlMap class. Cause: " + e);
}
}
/**
* 加密 String 明文输入 ,String 密文输出
*/
public String encryptStr(String strMing) {
byte [] byteMi = null ;
byte [] byteMing = null ;
String strMi = "" ;
BASE64Encoder base64en = new BASE64Encoder();
try {
byteMing = strMing.getBytes( "UTF8" );
byteMi = this .encryptByte(byteMing);
strMi = base64en.encode(byteMi);
} catch (Exception e) {
throw new RuntimeException(
"Error initializing SqlMap class. Cause: " + e);
} finally {
base64en = null ;
byteMing = null ;
byteMi = null ;
}
return strMi;
}
/**
* 解密 以 String 密文输入 ,String 明文输出
*
* @param strMi
* @return
*/
public String decryptStr(String strMi) {
BASE64Decoder base64De = new BASE64Decoder();
byte [] byteMing = null ;
byte [] byteMi = null ;
String strMing = "" ;
try {
byteMi = base64De.decodeBuffer(strMi);
byteMing = this .decryptByte(byteMi);
strMing = new String(byteMing, "UTF8" );
} catch (Exception e) {
throw new RuntimeException(
"Error initializing SqlMap class. Cause: " + e);
} finally {
base64De = null ;
byteMing = null ;
byteMi = null ;
}
return strMing;
}
/**
* 加密以 byte[] 明文输入 ,byte[] 密文输出
*
* @param byteS
* @return
*/
private byte [] encryptByte( byte [] byteS) {
byte [] byteFina = null ;
Cipher cipher;
try {
cipher = Cipher.getInstance ( "DES" );
cipher.init(Cipher. ENCRYPT_MODE , key );
byteFina = cipher.doFinal(byteS);
} catch (Exception e) {
throw new RuntimeException(
"Error initializing SqlMap class. Cause: " + e);
} finally {
cipher = null ;
}
return byteFina;
}
/**
* 解密以 byte[] 密文输入 , 以 byte[] 明文输出
*
* @param byteD
* @return
*/
private byte [] decryptByte( byte [] byteD) {
Cipher cipher;
byte [] byteFina = null ;
try {
cipher = Cipher.getInstance ( "DES" );
cipher.init(Cipher. DECRYPT_MODE , key );
byteFina = cipher.doFinal(byteD);
} catch (Exception e) {
throw new RuntimeException(
"Error initializing SqlMap class. Cause: " + e);
} finally {
cipher = null ;
}
return byteFina;
}
/**
* 文件 file 进行加密并保存目标文件 destFile 中
*
* @param file
* 要加密的文件 如 c:/test/srcFile.txt
* @param destFile
* 加密后存放的文件名 如 c:/ 加密后文件 .txt
*/
public void encryptFile(String file, String destFile) throws Exception {
Cipher cipher = Cipher.getInstance ( "DES" );
// cipher.init(Cipher.ENCRYPT_MODE, getKey());
cipher.init(Cipher. ENCRYPT_MODE , this . key );
InputStream is = new FileInputStream(file);
OutputStream out = new FileOutputStream(destFile);
CipherInputStream cis = new CipherInputStream(is, cipher);
byte [] buffer = new byte [1024];
int r;
while ((r = cis.read(buffer)) > 0) {
out.write(buffer, 0, r);
}
cis.close();
is.close();
out.close();
}
/**
* 文件采用 DES 算法解密文件
*
* @param file
* 已加密的文件 如 c:/ 加密后文件 .txt *
* @param destFile
* 解密后存放的文件名 如 c:/ test/ 解密后文件 .txt
*/
public void decryptFile(String file, String dest) throws Exception {
Cipher cipher = Cipher.getInstance ( "DES" );
cipher.init(Cipher. DECRYPT_MODE , this . key );
InputStream is = new FileInputStream(file);
OutputStream out = new FileOutputStream(dest);
CipherOutputStream cos = new CipherOutputStream(out, cipher);
byte [] buffer = new byte [1024];
int r;
while ((r = is.read(buffer)) >= 0) {
cos.write(buffer, 0, r);
}
cos.close();
out.close();
is.close();
}
public static void main(String args[]){
String text = "wangtao";
DesUtil des = new DesUtil("abcdefghijjk");
String result = des.encryptStr(text);
System.out.println(result);
result = des.decryptStr(result);
System.out.println(result);
}
}
|
[
"584692417@qq.com"
] |
584692417@qq.com
|
a9b3aee28ed27e362ef2a7f274bb5d98400577f5
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/plugin/appbrand/page/p$25.java
|
518818dc6b1881d0ea3d6bcda2eba4acfbb4a7b5
|
[] |
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
| 344
|
java
|
package com.tencent.mm.plugin.appbrand.page;
class p$25 implements Runnable {
final /* synthetic */ p jEg;
final /* synthetic */ boolean jEp;
p$25(p pVar, boolean z) {
this.jEg = pVar;
this.jEp = z;
}
public final void run() {
this.jEg.jDT.dd(this.jEp);
this.jEg.jDT.cC(this.jEp);
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
3fdf4baf2edb04ce1e7b201e1e02c2e358e07adb
|
979e1fb047c78c2c21d0da39db8eb1be75575033
|
/mysql-protocol/src/main/java/com/yuqi/protocol/pkg/response/QuitPackage.java
|
b2bb563c3ce03b3ee9903c3ecb74ad53d85a742b
|
[] |
no_license
|
yuqi1129/schema
|
fae466f7a4e8030bb9614b9f0e6ee7bcfeab35d5
|
7ad18532dee304fb8fffd04273e77a38a471d6bd
|
refs/heads/master
| 2023-07-22T13:58:03.480447
| 2022-08-29T07:11:52
| 2022-08-29T07:14:11
| 239,989,609
| 92
| 38
| null | 2023-07-05T20:49:46
| 2020-02-12T10:50:49
|
Java
|
UTF-8
|
Java
| false
| false
| 359
|
java
|
package com.yuqi.protocol.pkg.response;
import com.yuqi.protocol.pkg.AbstractReaderAndWriter;
import io.netty.buffer.ByteBuf;
/**
* @author yuqi
* @mail yuqi4733@gmail.com
* @description your description
* @time 10/7/20 19:22
**/
public class QuitPackage extends AbstractReaderAndWriter {
@Override
public void read(ByteBuf byteBuf) {
}
}
|
[
"yuqi4733@gmail.com"
] |
yuqi4733@gmail.com
|
fa2fe2d2314422d611a89383af89d13e2586da50
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/23/23_962620a800b50167387c98695d067dca886fba0a/ConfigureProblemSeverityMarkerResolution/23_962620a800b50167387c98695d067dca886fba0a_ConfigureProblemSeverityMarkerResolution_t.java
|
8a808f9313ec1e60a7165cae7b44247ae748a6fc
|
[] |
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
| 2,736
|
java
|
/*******************************************************************************
* Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.common.ui.marker;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IMarkerResolution2;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.progress.UIJob;
import org.jboss.tools.common.ui.CommonUIMessages;
import org.jboss.tools.common.ui.CommonUIPlugin;
/**
* @author Daniel Azarov
*/
public class ConfigureProblemSeverityMarkerResolution implements
IMarkerResolution2 {
private String preferencePageId;
private String preferenceKey;
public ConfigureProblemSeverityMarkerResolution(String preferencePageId, String preferenceKey){
this.preferencePageId = preferencePageId;
this.preferenceKey = preferenceKey;
}
public String getLabel() {
return CommonUIMessages.CONFIGURE_PROBLEM_SEVERITY;
}
public void run(IMarker marker) {
UIJob job = new UIJob(""){ //$NON-NLS-1$
public IStatus runInUIThread(IProgressMonitor monitor) {
PreferencesUtil.createPreferenceDialogOn(DebugUIPlugin.getShell(),
ConfigureProblemSeverityMarkerResolution.this.preferencePageId,
new String[]{ConfigureProblemSeverityMarkerResolution.this.preferencePageId},
ConfigureProblemSeverityMarkerResolution.this.preferenceKey).open();
return Status.OK_STATUS;
}
};
job.setSystem(true);
job.setPriority(Job.INTERACTIVE);
job.schedule();
}
public String getDescription() {
return CommonUIMessages.CONFIGURE_PROBLEM_SEVERITY;
}
public Image getImage() {
String key = "DESC_ELCL_CONFIGURE_PROBLEM_SEVERITIES";
ImageRegistry registry = CommonUIPlugin.getDefault().getImageRegistry();
Image image = registry.get(key);
if(image == null) {
image = JavaPluginImages.DESC_ELCL_CONFIGURE_PROBLEM_SEVERITIES.createImage();
registry.put(key, image);
}
return image;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
509a8c508ee84d78244d974fd1b4b53529085e85
|
ac5afca1ac2105490451bbe3602f3108ce495795
|
/10-java/10-java-security/src/main/java/com/myimooc/java/security/mac/DemoMac.java
|
a229ab498b4435b9e0caafffced765e74b4ccb64
|
[] |
no_license
|
hongleixia/study-imooc
|
098b026092df3414a7bfa07b4baaa85ea7e79a93
|
c7cbaeaaba7cf99611c12bdae7ac8a5c11b1613b
|
refs/heads/master
| 2021-05-09T01:16:47.704913
| 2020-04-02T01:32:52
| 2020-04-02T01:32:52
| 119,794,327
| 1
| 0
| null | 2020-04-02T01:38:42
| 2018-02-01T06:36:43
|
Java
|
UTF-8
|
Java
| false
| false
| 2,307
|
java
|
package com.myimooc.java.security.mac;
import org.apache.commons.codec.binary.Hex;
import org.bouncycastle.crypto.digests.MD5Digest;
import org.bouncycastle.crypto.macs.HMac;
import org.bouncycastle.crypto.params.KeyParameter;
import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import java.security.NoSuchAlgorithmException;
/**
* <br>
* 标题: MAC消息摘要加密演示<br>
* 描述: MAC消息摘要加密演示<br>
* 时间: 2017/04/11<br>
*
* @author zc
*/
public class DemoMac {
/** 待加密字符串 */
private static String src="imooc security mac";
public static void main(String[] args){
jdkHmacDM5();
bcHmacMD5();
}
/** jdk实现hmac MD5摘要算法 */
public static void jdkHmacDM5(){
try {
// 初始化 KeyGenerator
KeyGenerator keyGenerator = KeyGenerator.getInstance("HmacMD5");
// 产生密钥
SecretKey secretKey = keyGenerator.generateKey();
// 获得密钥
byte[] key1 = secretKey.getEncoded();
// 自定义密钥
byte[] key = Hex.decodeHex(new char[]{'a','a','a','a','a','a','a','a','a','a'});
// 还原密钥
SecretKey restoreSecretKey = new SecretKeySpec(key,"HmacMD5");
// 实例化 MAC
Mac mac = Mac.getInstance(restoreSecretKey.getAlgorithm());
// 初始化 MAC
mac.init(restoreSecretKey);
// 执行摘要
byte[] hmacMD5Bytes = mac.doFinal(src.getBytes());
System.out.println("jdk hmacMD5:"+ Hex.encodeHexString(hmacMD5Bytes));
} catch (Exception e) {
e.printStackTrace();
}
}
/** bouncycastle.crypto实现hmacMD5加密 */
public static void bcHmacMD5(){
HMac hmac = new HMac(new MD5Digest());
hmac.init(new KeyParameter(org.bouncycastle.util.encoders.Hex.decode("aaaaaaaaaa")));
hmac.update(src.getBytes(),0,src.getBytes().length);
// 执行摘要
byte[] hmacMD5Bytes = new byte[hmac.getMacSize()];
hmac.doFinal(hmacMD5Bytes,0);
System.out.println("bc hmacMD5:"+ org.bouncycastle.util.encoders.Hex.toHexString(hmacMD5Bytes));
}
}
|
[
"zccoder@aliyun.com"
] |
zccoder@aliyun.com
|
6947afd785a01b48ad16db1ada2ab2d16e724b41
|
adddfae434c0280a3aa959b0bf0eb9b309eebbea
|
/sl-mall/slmall-module/slmall-mmall/src/main/java/com/cycloneboy/springcloud/slmall/module/mmall/service/IProductService.java
|
3fd52f6783f9bdc87babfe6f47cb99c4cf6dfe97
|
[] |
no_license
|
CycloneBoy/springcloud-learn
|
957ec212d05e1aa281354f10d25ec23fa26132da
|
821815806c36d2936c8ba40631bd685938e416ef
|
refs/heads/master
| 2022-06-28T02:51:16.648319
| 2020-01-22T07:45:52
| 2020-01-22T07:45:52
| 224,870,793
| 1
| 0
| null | 2022-06-17T02:44:05
| 2019-11-29T14:37:07
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,161
|
java
|
package com.cycloneboy.springcloud.slmall.module.mmall.service;
import com.cycloneboy.springcloud.slmall.common.base.BaseXCloudService;
import com.cycloneboy.springcloud.slmall.common.model.PageInfo;
import com.cycloneboy.springcloud.slmall.module.mmall.common.ServerResponse;
import com.cycloneboy.springcloud.slmall.module.mmall.entity.Product;
import com.cycloneboy.springcloud.slmall.module.mmall.vo.ProductDetailVo;
/**
* Created by geely
*/
public interface IProductService extends BaseXCloudService<Product, Integer> {
ServerResponse saveOrUpdateProduct(Product product);
ServerResponse<String> setSaleStatus(Integer productId, Integer status);
ServerResponse<ProductDetailVo> manageProductDetail(Integer productId);
ServerResponse<PageInfo> getProductList(int pageNum, int pageSize);
ServerResponse<PageInfo> searchProduct(String productName, Integer productId, int pageNum,
int pageSize);
ServerResponse<ProductDetailVo> getProductDetail(Integer productId);
ServerResponse<PageInfo> getProductByKeywordCategory(String keyword, Integer categoryId,
int pageNum, int pageSize, String orderBy);
}
|
[
"xuanfeng1992@gmail.com"
] |
xuanfeng1992@gmail.com
|
f905fd8da78368e621f02a32d3c88b5e9b28c6f5
|
0f458c246865fa1234e93771173d5a831a47229c
|
/power-annotations/tck/src/main/java/com/github/t1/annotations/tck/CombinedAnnotationClasses.java
|
35659fbdb7e3ffe5d689d864e6564163ef51bc54
|
[
"Apache-2.0"
] |
permissive
|
gunnarmorling/smallrye-graphql
|
b612665ffdc8237eb17542eb04e9eb37bbbf88f1
|
076db58d2dcc73d99391a73301b6769db6c89342
|
refs/heads/main
| 2023-09-02T19:15:40.388394
| 2021-11-12T06:40:58
| 2021-11-12T06:40:58
| 427,678,756
| 0
| 0
|
Apache-2.0
| 2021-11-13T13:53:40
| 2021-11-13T13:53:40
| null |
UTF-8
|
Java
| false
| false
| 869
|
java
|
package com.github.t1.annotations.tck;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import com.github.t1.annotations.Stereotype;
public class CombinedAnnotationClasses {
@Stereotype
@SomeAnnotation("from-stereotype")
@Retention(RUNTIME)
public @interface SomeStereotype {
}
@SomeStereotype
public interface SomeStereotypedInterface {
@SuppressWarnings("unused")
void foo();
}
@SomeStereotype
public static class SomeStereotypedClass {
@SuppressWarnings("unused")
public void foo() {
}
}
@SomeAnnotation("from-sub-interface")
public interface SomeInheritingInterface extends SomeInheritedInterface {
}
public interface SomeInheritedInterface {
@SuppressWarnings("unused")
void foo();
}
}
|
[
"snackbox@sinntr.eu"
] |
snackbox@sinntr.eu
|
9976c1de012f4142809d916d6d9ee23d18642592
|
5ecc9cf7bef5fa9d53a51a1950dae4a39d913b10
|
/designPatterns/src/main/java/com/ju/designpatterns/mediator/Subject.java
|
1c4b7901ed9d7839fb931076823f691483a59127
|
[
"Apache-2.0"
] |
permissive
|
ThornJuice/MySamples
|
0094958bf0e0235feaaa96fcaf8a3ecee45c6d06
|
fbc4f6e1905165ec0348f2856a4dc04c1010bb8e
|
refs/heads/master
| 2021-06-17T05:58:24.186532
| 2021-06-09T04:11:23
| 2021-06-09T04:11:23
| 203,276,048
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 189
|
java
|
package com.ju.designpatterns.mediator;
public abstract class Subject {
protected Mediator mediator;
public Subject(Mediator mediator) {
this.mediator = mediator;
}
}
|
[
"1292571922@qq.com"
] |
1292571922@qq.com
|
765ce2fdc90fbf1cffa1a4bfc3e038adb3b462f3
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/third-party/other/external-module-1068/src/java/external_module_1068/a/Foo0.java
|
053a6be8a83bb80e328000cda3c300a0e1469eef
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,241
|
java
|
package external_module_1068.a;
import java.awt.datatransfer.*;
import java.beans.beancontext.*;
import java.io.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.awt.datatransfer.DataFlavor
* @see java.beans.beancontext.BeanContext
* @see java.io.File
*/
@SuppressWarnings("all")
public abstract class Foo0<G> implements external_module_1068.a.IFoo0<G> {
java.rmi.Remote f0 = null;
java.nio.file.FileStore f1 = null;
java.sql.Array f2 = null;
public G element;
public static Foo0 instance;
public static Foo0 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return null;
}
public String getName() {
return element.toString();
}
public void setName(String string) {
return;
}
public G get() {
return element;
}
public void set(Object element) {
this.element = (G)element;
}
public G call() throws Exception {
return (G)getInstance().call();
}
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
45d29528ab814f3c38175c80fce8f4b2d7ea73ee
|
0fd4f55b08bf6cee6a505f2346926a1e4c9bde24
|
/Java Design Patterns - A Programmer's Approach/Structural Design Patterns/Facade/Set of Interfaces/OracleHelper.java
|
5c972e4756de3e1c103a8d1c6b8230488a5f70ff
|
[] |
no_license
|
david2999999/Advanced-Java
|
1d7089a050fa1b8e1b574aa4855b10363b1ad383
|
78f17038c75be8c5d3456d92ac81841fb502bf56
|
refs/heads/master
| 2021-07-19T19:03:06.061598
| 2020-04-08T19:37:40
| 2020-04-08T19:37:40
| 128,837,674
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 520
|
java
|
package com.journaldev.design.facade;
import java.sql.Connection;
public class OracleHelper {
public static Connection getOracleDBConnection(){
//get MySql DB connection using connection parameters
return null;
}
public void generateOraclePDFReport(String tableName, Connection con){
//get data from table and generate pdf report
}
public void generateOracleHTMLReport(String tableName, Connection con){
//get data from table and generate pdf report
}
}
|
[
"djiang86@binghamton.edu"
] |
djiang86@binghamton.edu
|
00618660ea6b258142839a6e6519da6bd65bd112
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-58b-3-14-NSGA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/optimization/fitting/CurveFitter$TheoreticalValuesFunction_ESTest_scaffolding.java
|
b2672f4c54aaa6506bf187b9cc10a4632050fb64
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 486
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Apr 02 04:25:06 UTC 2020
*/
package org.apache.commons.math.optimization.fitting;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class CurveFitter$TheoreticalValuesFunction_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
7ab2d985173f169a8c7acce09922262c0e981588
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_cfb9f06d16b5d85d8932354ba5d444a603ceff2d/PreviewLabel/1_cfb9f06d16b5d85d8932354ba5d444a603ceff2d_PreviewLabel_t.java
|
b88246954e32125e0703436c96684efda8377148
|
[] |
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
| 5,744
|
java
|
/*
* This file is part of muCommander, http://www.mucommander.com
* Copyright (C) 2002-2007 Maxence Bernard
*
* muCommander 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.
*
* muCommander 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 com.mucommander.ui.chooser;
import com.mucommander.text.Translator;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.border.LineBorder;
import java.awt.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
/**
* PreviewLabel is a component used to preview a color selection that will eventually be used on a label.
* This component is used by {@link ColorChooser} to preview the current color selection.
*
* @author Nicolas Rinaudo, Maxence Bernard
*/
public class PreviewLabel extends JLabel implements PropertyChangeListener, Cloneable {
/** Color painted on top of the label. */
private Color overlayColor;
/** Label's border, if necessary. */
private Border border;
/** Controls whether the overlay should be painted over or under the text. */
private boolean overlayUnderText;
public final static String FOREGROUND_COLOR_PROPERTY_NAME = "PreviewLabel.ForegroundColor";
public final static String BACKGROUND_COLOR_PROPERTY_NAME = "PreviewLabel.BackgroundColor";
public final static String OVERLAY_COLOR_PROPERTY_NAME = "PreviewLabel.OverlayColor";
public final static String BORDER_COLOR_PROPERTY_NAME = "PreviewLabel.BorderColor";
/**
* Creates a new preview label.
*/
public PreviewLabel() {
super(" ");
addPropertyChangeListener(this);
}
/**
* Sets the label's overlay color.
*/
public void setOverlay(Color color) {
putClientProperty(OVERLAY_COLOR_PROPERTY_NAME, color);
}
public void setTextPainted(boolean b) {
if(b)
setText(Translator.get("sample_text"));
else
setText(" ");
}
public void setOverlayUnderText(boolean b) {
overlayUnderText = b;
repaint();
}
public void setBorderColor(Color color) {
putClientProperty(BORDER_COLOR_PROPERTY_NAME, color);
}
private void paintText(Graphics g) {
FontMetrics metrics;
g.setColor(getForeground());
g.setFont(getFont());
metrics = getFontMetrics(getFont());
g.drawString(getText(), (getWidth() - metrics.stringWidth(getText())) / 2, (getHeight() - metrics.getHeight()) / 2 + metrics.getAscent());
}
////////////////////////
// Overridden methods //
////////////////////////
public void setForeground(Color color) {
putClientProperty(FOREGROUND_COLOR_PROPERTY_NAME, color);
}
public void setBackground(Color color) {
putClientProperty(BACKGROUND_COLOR_PROPERTY_NAME, color);
}
public Object clone() {
PreviewLabel previewLabel = new PreviewLabel();
previewLabel.setText(getText());
previewLabel.setForeground(getForeground());
previewLabel.setBackground(getBackground());
previewLabel.setOverlayUnderText(overlayUnderText);
previewLabel.setFont(getFont());
previewLabel.putClientProperty(OVERLAY_COLOR_PROPERTY_NAME, getClientProperty(OVERLAY_COLOR_PROPERTY_NAME));
previewLabel.putClientProperty(BORDER_COLOR_PROPERTY_NAME, getClientProperty(BORDER_COLOR_PROPERTY_NAME));
return previewLabel;
}
/**
* Paints the preview label.
*/
public void paint(Graphics g) {
int width = getWidth();
int height = getHeight();
g.setColor(getBackground());
g.fillRect(0, 0, width, height);
if(!overlayUnderText)
paintText(g);
if(overlayColor != null) {
g.setColor(overlayColor);
g.fillRect(0, 0, width/2, height);
}
if(overlayUnderText)
paintText(g);
if(border != null)
border.paintBorder(this, g, 0, 0, width, height);
}
public Dimension getPreferredSize() {
Dimension dimension = super.getPreferredSize();
dimension.setSize(dimension.getWidth()+8, dimension.getHeight()+6);
return dimension;
}
///////////////////////////////////////////
// PropertyChangeListener implementation //
///////////////////////////////////////////
public void propertyChange(PropertyChangeEvent event) {
String name = event.getPropertyName();
Object value = event.getNewValue();
if(FOREGROUND_COLOR_PROPERTY_NAME.equals(name)) {
super.setForeground((Color)value);
}
else if(BACKGROUND_COLOR_PROPERTY_NAME.equals(name)) {
super.setBackground((Color)value);
}
else if(OVERLAY_COLOR_PROPERTY_NAME.equals(name)) {
overlayColor = (Color)value;
repaint();
}
else if(BORDER_COLOR_PROPERTY_NAME.equals(name)) {
border = new LineBorder((Color)value, 1);
repaint();
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
4bec4c2802a64eb621cf11d6e3adfa14061f3d9d
|
ec8f81e3d04ad3454e13bce17f1a100f2daa752e
|
/src/main/java/demo/spring/boot/demospringboot/jpa/constant/StorageEnum.java
|
0636251bc435f616382be9fca36c22ccaac2ddc2
|
[] |
no_license
|
SunnyLay/film
|
6f520795363dd8ce22230dde674206e902ea5eec
|
aac69e2dcf42758067e733c76a62132dce2f3e61
|
refs/heads/master
| 2020-03-10T06:20:38.828506
| 2018-04-12T07:14:08
| 2018-04-12T07:14:08
| 129,237,675
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 516
|
java
|
package demo.spring.boot.demospringboot.jpa.constant;
/**
* 2018/4/8 Created by chao
*/
public enum StorageEnum {
SEARCH_HISTORY("search_history"), FIND_RECORD("find_record");
private String category;
StorageEnum(String category) {
this.category = category;
}
public String getCategory() {
return category;
}
@Override
public String toString() {
return "StorageEnum{" +
"category='" + category + '\'' +
'}';
}
}
|
[
"m18888106873@163.com"
] |
m18888106873@163.com
|
3188b6cb9f73574138813fd29c1fca6228ff2ac4
|
89e7bc905c5527041f786e5af05eb87c3cc81f95
|
/yulin-digital-library/library-cas/src/test/java/com/yulin/library/PasswordTest.java
|
746f35532d3c4ad3117722be7bf381ac5bdf187f
|
[] |
no_license
|
SANDUO421/sd-shiro
|
a8f0ce721025aa8f0f04dbbe6ab160d7677b4575
|
278405761e53861e00f134b2853e36fad14c25a2
|
refs/heads/master
| 2022-10-19T22:03:03.840128
| 2020-04-17T01:48:40
| 2020-04-17T01:48:40
| 251,183,782
| 0
| 0
| null | 2022-10-12T20:43:38
| 2020-03-30T02:42:10
|
Java
|
UTF-8
|
Java
| false
| false
| 606
|
java
|
package com.yulin.library;
import cn.hutool.core.codec.Base64;
import org.junit.Test;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
public class PasswordTest {
@Test
public void passwordTest(){
PasswordEncoder passwordEncoder=new BCryptPasswordEncoder();
String encode = passwordEncoder.encode("1234");
System.out.println(encode);
}
@Test
public void base64Test(){
String encode = Base64.encode("test:test");
System.out.println(encode);
}
}
|
[
"sanduo10086@foxmail.com"
] |
sanduo10086@foxmail.com
|
3be9722ec21df3304590f7007cd511175277ef34
|
c9796a20cf56aa01ecbc2ff3985703b17bfb51fe
|
/leetcode/UniqueBinarySearchTreesII/20210213.Solution.java
|
3993ce3adbdfb507aa7d9dcb35db86530b7d1fe2
|
[] |
no_license
|
iamslash/learntocode
|
a62329710d36b21f8025961c0ad9b333c10e973a
|
63faf361cd4eefe0f6f1e50c49ea22577a75ea74
|
refs/heads/master
| 2023-08-31T08:20:08.608771
| 2023-08-31T00:05:06
| 2023-08-31T00:05:06
| 52,074,001
| 7
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,051
|
java
|
// Copyright (C) 2020 by iamslash
import java.util.*;
public class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode() {}
TreeNode(int val) { this.val = val; }
TreeNode(int val, TreeNode left, TreeNode right) {
this.val = val;
this.left = left;
this.right = right;
}
}
// 0ms 100.00% 39.4MB 8.97%
// DFS
// O(N) O(lgN)
class Solution {
private List<TreeNode> dfs(int fr, int to) {
List<TreeNode> ans = new ArrayList<>();
if (fr == to) {
ans.add(new TreeNode(fr));
} else if (fr > to) {
ans.add(null);
} else {
for (int i = fr; i <= to; ++i) {
List<TreeNode> l = dfs(fr, i-1);
List<TreeNode> r = dfs(i+1, to);
for (int j = 0; j < l.size(); ++j) {
for (int k = 0; k < r.size(); ++k) {
TreeNode t = new TreeNode(i);
t.left = l.get(j);
t.right = r.get(k);
ans.add(t);
}
}
}
}
return ans;
}
public List<TreeNode> generateTrees(int n) {
if (n == 0)
return new ArrayList<>();
return dfs(1, n);
}
}
|
[
"iamslash@gmail.com"
] |
iamslash@gmail.com
|
5956bb1bbbf25d96da63dca8afd5920e8ca5ca7d
|
70e207ac63da49eddd761a6e3a901e693f4ec480
|
/net.certware.state.gui.diagram/src/stateAnalysis/diagram/providers/assistants/StateAnalysisModelingAssistantProviderOfDeviceCommandEditPart.java
|
a8de4ce0d8855c48d18a8df56d454a02e9a6e88d
|
[
"Apache-2.0"
] |
permissive
|
arindam7development/CertWare
|
43be650539963b1efef4ce4cad164f23185d094b
|
cbbfdb6012229444d3c0d7e64c08ac2a15081518
|
refs/heads/master
| 2020-05-29T11:38:08.794116
| 2016-03-29T13:56:37
| 2016-03-29T13:56:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 249
|
java
|
/*
*
*/
package stateAnalysis.diagram.providers.assistants;
/**
* @generated
*/
public class StateAnalysisModelingAssistantProviderOfDeviceCommandEditPart
extends
stateAnalysis.diagram.providers.StateAnalysisModelingAssistantProvider {
}
|
[
"mrb@certware.net"
] |
mrb@certware.net
|
c1cfa37941553345ec24da29c4d143e7af88e344
|
704507754a9e7f300dfab163e97cd976b677661b
|
/src/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityRuntimeException.java
|
8f8edc782c3a5b5f95b848b42270218426b2264e
|
[] |
no_license
|
ossaw/jdk
|
60e7ca5e9f64541d07933af25c332e806e914d2a
|
b9d61d6ade341b4340afb535b499c09a8be0cfc8
|
refs/heads/master
| 2020-03-27T02:23:14.010857
| 2019-08-07T06:32:34
| 2019-08-07T06:32:34
| 145,785,700
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,665
|
java
|
/*
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.sun.org.apache.xml.internal.security.exceptions;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.text.MessageFormat;
import com.sun.org.apache.xml.internal.security.utils.Constants;
import com.sun.org.apache.xml.internal.security.utils.I18n;
/**
* The mother of all runtime Exceptions in this bundle. It allows exceptions to
* have their messages translated to the different locales.
* The <code>xmlsecurity_en.properties</code> file contains this line:
*
* <pre>
* xml.WrongElement = Can't create a {0} from a {1} element
* </pre>
*
* Usage in the Java source is:
*
* <pre>
* {
* Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" };
*
* throw new XMLSecurityException("xml.WrongElement", exArgs);
* }
* </pre>
*
* Additionally, if another Exception has been caught, we can supply it, too>
*
* <pre>
* try {
* ...
* } catch (Exception oldEx) {
* Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" };
*
* throw new XMLSecurityException("xml.WrongElement", exArgs, oldEx);
* }
* </pre>
*
* @author Christian Geuer-Pollmann
*/
public class XMLSecurityRuntimeException extends RuntimeException {
private static final long serialVersionUID = 1L;
/** Field msgID */
protected String msgID;
/**
* Constructor XMLSecurityRuntimeException
*/
public XMLSecurityRuntimeException() {
super("Missing message string");
this.msgID = null;
}
/**
* Constructor XMLSecurityRuntimeException
*
* @param msgID
*/
public XMLSecurityRuntimeException(String msgID) {
super(I18n.getExceptionMessage(msgID));
this.msgID = msgID;
}
/**
* Constructor XMLSecurityRuntimeException
*
* @param msgID
* @param exArgs
*/
public XMLSecurityRuntimeException(String msgID, Object exArgs[]) {
super(MessageFormat.format(I18n.getExceptionMessage(msgID), exArgs));
this.msgID = msgID;
}
/**
* Constructor XMLSecurityRuntimeException
*
* @param originalException
*/
public XMLSecurityRuntimeException(Exception originalException) {
super("Missing message ID to locate message string in resource bundle \""
+ Constants.exceptionMessagesResourceBundleBase + "\". Original Exception was a "
+ originalException.getClass().getName() + " and message " + originalException.getMessage(),
originalException);
}
/**
* Constructor XMLSecurityRuntimeException
*
* @param msgID
* @param originalException
*/
public XMLSecurityRuntimeException(String msgID, Exception originalException) {
super(I18n.getExceptionMessage(msgID, originalException), originalException);
this.msgID = msgID;
}
/**
* Constructor XMLSecurityRuntimeException
*
* @param msgID
* @param exArgs
* @param originalException
*/
public XMLSecurityRuntimeException(String msgID, Object exArgs[], Exception originalException) {
super(MessageFormat.format(I18n.getExceptionMessage(msgID), exArgs));
this.msgID = msgID;
}
/**
* Method getMsgID
*
* @return the messageId
*/
public String getMsgID() {
if (msgID == null) {
return "Missing message ID";
}
return msgID;
}
/** @inheritDoc */
public String toString() {
String s = this.getClass().getName();
String message = super.getLocalizedMessage();
if (message != null) {
message = s + ": " + message;
} else {
message = s;
}
if (this.getCause() != null) {
message = message + "\nOriginal Exception was " + this.getCause().toString();
}
return message;
}
/**
* Method printStackTrace
*/
public void printStackTrace() {
synchronized (System.err) {
super.printStackTrace(System.err);
}
}
/**
* Method printStackTrace
*
* @param printwriter
*/
public void printStackTrace(PrintWriter printwriter) {
super.printStackTrace(printwriter);
}
/**
* Method printStackTrace
*
* @param printstream
*/
public void printStackTrace(PrintStream printstream) {
super.printStackTrace(printstream);
}
/**
* Method getOriginalException
*
* @return the original exception
*/
public Exception getOriginalException() {
if (this.getCause() instanceof Exception) {
return (Exception) this.getCause();
}
return null;
}
}
|
[
"jianghao7625@gmail.com"
] |
jianghao7625@gmail.com
|
4457b3ee5f7c1ab0208a06e189217784b85dc630
|
dfa945d8bfa2d4e2b8006a2cfffdf4ec7217cee7
|
/eitaa-src/messenger/exoplayer/metadata/id3/ApicFrame.java
|
91e51eec4d5bff7fe4d09f162fe20e816305aece
|
[] |
no_license
|
ondfly/cmp_eitaa_telegram
|
fd0b258fec8318bd5380baba4708882014c70dc1
|
79a1473e04f5fe57fe05570117dfda9a3e8c755d
|
refs/heads/master
| 2020-03-14T13:03:57.239807
| 2018-04-30T17:18:47
| 2018-05-01T17:16:21
| 131,624,694
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 739
|
java
|
package ir.eitaa.messenger.exoplayer.metadata.id3;
public final class ApicFrame
extends Id3Frame
{
public static final String ID = "APIC";
public final String description;
public final String mimeType;
public final byte[] pictureData;
public final int pictureType;
public ApicFrame(String paramString1, String paramString2, int paramInt, byte[] paramArrayOfByte)
{
super("APIC");
this.mimeType = paramString1;
this.description = paramString2;
this.pictureType = paramInt;
this.pictureData = paramArrayOfByte;
}
}
/* Location: /dex2jar/eitaa-dex2jar.jar!/ir/eitaa/messenger/exoplayer/metadata/id3/ApicFrame.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"ondfly@b00mrang"
] |
ondfly@b00mrang
|
432e516bcb6307bce0d65aa947b99525b3076cb0
|
2077c64342e1170c797f8e58e8a0a1a04a92694c
|
/JADEOntologies/ontology/CBR/impl/DefaultIsRootTaxon.java
|
b89233b3532376fd2443c3ce20b20f3414bbcfd0
|
[] |
no_license
|
prodriguezsv/SMDBCIE-RSC
|
0a34dc2e8d80119333ab5ba256c3f0659e3a0549
|
55702c77968f039b125f70ab2cd789a86490e91b
|
refs/heads/master
| 2020-05-30T18:45:34.045628
| 2009-11-12T15:19:49
| 2009-11-12T15:19:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,315
|
java
|
package ontology.CBR.impl;
import java.io.Serializable;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
import ontology.CBR.*;
/**
* Protege name: IsRootTaxon
* @author ontology bean generator
* @version 2009/10/17, 19:00:46
*/
public class DefaultIsRootTaxon implements IsRootTaxon, Serializable {
// bean stuff
protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
public void addPropertyChangeListener(PropertyChangeListener pcl) {
pcs.addPropertyChangeListener(pcl);
}
public void removePropertyChangeListener(PropertyChangeListener pcl) {
pcs.removePropertyChangeListener(pcl);
}
private static final long serialVersionUID = 1907932705116471396L;
private String _internalInstanceName = null;
public DefaultIsRootTaxon() {
this._internalInstanceName = "";
}
public DefaultIsRootTaxon(String instance_name) {
this._internalInstanceName = instance_name;
}
public String toString() {
return _internalInstanceName;
}
/**
* Protege name: taxon
*/
private Taxon taxon;
public void setTaxon(Taxon value) {
pcs.firePropertyChange("taxon", (this.taxon==null?new Taxon():this.taxon), value);
this.taxon=value;
}
public Taxon getTaxon() {
return this.taxon;
}
}
|
[
"prodriguezsv@msn.com"
] |
prodriguezsv@msn.com
|
28031fe6735e7f22d7d67ca328e1eea1f7d1a283
|
1584faa7facf9b2fa2e0fb6d8ecb672a6457a782
|
/week-02/exercises/object-exercises/src/Exercise04.java
|
ca85216bd96df7c9cfa59fefbe5fe67ba64f7055
|
[] |
no_license
|
JacobRosenbaum/dev10-classwork
|
4c652f1a187df78b9a138b13688b7964766b9f49
|
b1444ce74f590462536cb10c04e3e6c87cc2bd1f
|
refs/heads/main
| 2023-03-04T04:58:59.065185
| 2021-02-19T18:25:16
| 2021-02-19T18:25:16
| 319,703,778
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,145
|
java
|
import java.util.Scanner;
public class Exercise04 {
public static void main(String[] args) {
Scanner console = new Scanner(System.in);
String end = "";
// 1. Add an empty constructor to Musician.
// 2. Uncomment the code below and make sure it runs.
do {
System.out.println("\nMusician name time!! To end, type \"end\"\n");
Musician m = new Musician();
System.out.print("Musician name: ");
m.setName(console.nextLine());
System.out.print("Musician rating: ");
int rating = Integer.parseInt(console.nextLine());
m.setRating(rating);
System.out.printf("%s: %s%n", m.getName(), m.getRating());
System.out.print("End or continue?: ");
String input = console.nextLine();
if (input.equals("end")) {
end = "end";
}
// 3. Add a loop. The exercise should ask the user for musicians and print
// them out until the user types "end".
} while (!end.equalsIgnoreCase("end"));
}
}
|
[
"jacobrosenbaum95@gmail.com"
] |
jacobrosenbaum95@gmail.com
|
902c9cc696a9968163f7954fb99149b7be158e2d
|
00ee55a6598cdbac087ccfd26cc36a578dbb485e
|
/rest/src/main/java/pl/edu/icm/unity/rest/jwt/authn/JWTVerificator.java
|
b73c745f705f695350a5c1dc3b442a4cbd20ac5f
|
[] |
no_license
|
ngohuusang/unity
|
c01672c9f94be235162a85def395a0c7f7ab6ecd
|
bbb56b56d5c6e980955c0c14de098f86b273fbc7
|
refs/heads/master
| 2021-05-12T13:24:38.096590
| 2017-11-02T18:11:43
| 2017-11-02T18:11:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,691
|
java
|
/*
* Copyright (c) 2014 ICM Uniwersytet Warszawski All rights reserved.
* See LICENCE.txt file for licensing information.
*/
package pl.edu.icm.unity.rest.jwt.authn;
import java.io.CharArrayWriter;
import java.io.IOException;
import java.io.StringReader;
import java.text.ParseException;
import java.util.List;
import java.util.Properties;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.nimbusds.jose.JOSEException;
import com.nimbusds.jwt.JWTClaimsSet;
import eu.emi.security.authn.x509.X509Credential;
import eu.unicore.util.configuration.ConfigurationException;
import pl.edu.icm.unity.engine.api.PKIManagement;
import pl.edu.icm.unity.engine.api.authn.AbstractCredentialVerificatorFactory;
import pl.edu.icm.unity.engine.api.authn.AbstractVerificator;
import pl.edu.icm.unity.engine.api.authn.AuthenticatedEntity;
import pl.edu.icm.unity.engine.api.authn.AuthenticationException;
import pl.edu.icm.unity.engine.api.authn.AuthenticationResult;
import pl.edu.icm.unity.engine.api.authn.AuthenticationResult.Status;
import pl.edu.icm.unity.engine.api.authn.EntityWithCredential;
import pl.edu.icm.unity.engine.api.authn.InvocationContext;
import pl.edu.icm.unity.engine.api.utils.PrototypeComponent;
import pl.edu.icm.unity.exceptions.EngineException;
import pl.edu.icm.unity.exceptions.InternalException;
import pl.edu.icm.unity.rest.jwt.JWTAuthenticationProperties;
import pl.edu.icm.unity.rest.jwt.JWTUtils;
import pl.edu.icm.unity.stdext.identity.PersistentIdentity;
/**
* Simple JWT verificator. Token must be not expired, properly signed, belong to a current realm and issued by
* the local system.
*
* @author K. Benedyczak
*/
@PrototypeComponent
public class JWTVerificator extends AbstractVerificator implements JWTExchange
{
public static final String NAME = "jwt";
public static final String DESC = "Verifies JWT";
private static final String[] IDENTITY_TYPES = {PersistentIdentity.ID};
private PKIManagement pkiManagement;
private JWTAuthenticationProperties config;
@Autowired
public JWTVerificator(PKIManagement pkiManagement)
{
super(NAME, DESC, JWTExchange.ID);
this.pkiManagement = pkiManagement;
}
@Override
public String getSerializedConfiguration() throws InternalException
{
CharArrayWriter writer = new CharArrayWriter();
try
{
config.getProperties().store(writer, "");
} catch (IOException e)
{
throw new IllegalStateException("Can not serialize JWT verificator's configuration", e);
}
return writer.toString();
}
@Override
public void setSerializedConfiguration(String json) throws InternalException
{
Properties properties = new Properties();
try
{
properties.load(new StringReader(json));
config = new JWTAuthenticationProperties(properties);
} catch (Exception e)
{
throw new ConfigurationException("Can't initialize the the "
+ "JWT verificator's configuration", e);
}
}
@Override
public AuthenticationResult checkJWT(String token) throws EngineException
{
String credential = config.getValue(JWTAuthenticationProperties.SIGNING_CREDENTIAL);
X509Credential signingCred = pkiManagement.getCredential(credential);
try
{
JWTClaimsSet claims = JWTUtils.parseAndValidate(token, signingCred);
String realm = InvocationContext.safeGetRealm();
List<String> audiences = claims.getAudience();
if (audiences.size() != 1)
{
throw new AuthenticationException("Invalid audiences specification: "
+ "must have exactly one audience");
}
String audience = audiences.get(0);
int hash = audience.lastIndexOf('#');
if (hash < 0)
{
throw new AuthenticationException("Invalid audience specification: "
+ "no realm specification");
}
String tokenRealm = audience.substring(hash+1);
if (!tokenRealm.equals(realm))
{
throw new AuthenticationException("Token's realm '" + tokenRealm +
"' is different from the endpoint's realm: " + realm);
}
EntityWithCredential resolved = identityResolver.resolveIdentity(claims.getSubject(),
IDENTITY_TYPES, null);
AuthenticatedEntity ae = new AuthenticatedEntity(resolved.getEntityId(),
claims.getSubject(), false);
return new AuthenticationResult(Status.success, ae);
} catch (ParseException | JOSEException e)
{
throw new AuthenticationException("Token is invalid", e);
}
}
@Component
public static class Factory extends AbstractCredentialVerificatorFactory
{
@Autowired
public Factory(ObjectFactory<JWTVerificator> factory) throws EngineException
{
super(NAME, DESC, factory);
}
}
}
|
[
"golbi@unity-idm.eu"
] |
golbi@unity-idm.eu
|
238c943a93a3d870f834013a8ae2b4cd7045ee34
|
8e3f7ac78fd5ef8b0cdc66568d6c7c5b3460de7d
|
/src/test/java/bd/ac/buet/security/jwt/JWTFilterTest.java
|
fe0eba596a43eeba30223bfd9713770aa268967a
|
[] |
no_license
|
monjurmorshed793/topic-modeling
|
95c8e35a1aac04ee984ca37aaf73576f7a5610c4
|
9dfdf1566e94bcf6d7dfe1f16c193d48de393d04
|
refs/heads/main
| 2023-07-16T06:48:13.108027
| 2021-08-30T20:14:45
| 2021-08-30T20:14:45
| 399,573,880
| 0
| 0
| null | 2021-08-30T07:05:14
| 2021-08-24T18:55:51
|
Java
|
UTF-8
|
Java
| false
| false
| 6,184
|
java
|
package bd.ac.buet.security.jwt;
import static org.assertj.core.api.Assertions.assertThat;
import bd.ac.buet.security.AuthoritiesConstants;
import io.jsonwebtoken.io.Decoders;
import io.jsonwebtoken.security.Keys;
import java.util.Collections;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.mock.http.server.reactive.MockServerHttpRequest;
import org.springframework.mock.web.server.MockServerWebExchange;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.ReactiveSecurityContextHolder;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.test.util.ReflectionTestUtils;
import reactor.core.publisher.Mono;
import tech.jhipster.config.JHipsterProperties;
class JWTFilterTest {
private TokenProvider tokenProvider;
private JWTFilter jwtFilter;
@BeforeEach
public void setup() {
JHipsterProperties jHipsterProperties = new JHipsterProperties();
String base64Secret = "fd54a45s65fds737b9aafcb3412e07ed99b267f33413274720ddbb7f6c5e64e9f14075f2d7ed041592f0b7657baf8";
jHipsterProperties.getSecurity().getAuthentication().getJwt().setBase64Secret(base64Secret);
tokenProvider = new TokenProvider(jHipsterProperties);
ReflectionTestUtils.setField(tokenProvider, "key", Keys.hmacShaKeyFor(Decoders.BASE64.decode(base64Secret)));
ReflectionTestUtils.setField(tokenProvider, "tokenValidityInMilliseconds", 60000);
jwtFilter = new JWTFilter(tokenProvider);
}
@Test
void testJWTFilter() {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
"test-user",
"test-password",
Collections.singletonList(new SimpleGrantedAuthority(AuthoritiesConstants.USER))
);
String jwt = tokenProvider.createToken(authentication, false);
MockServerHttpRequest.BaseBuilder request = MockServerHttpRequest
.get("/api/test")
.header(JWTFilter.AUTHORIZATION_HEADER, "Bearer " + jwt);
MockServerWebExchange exchange = MockServerWebExchange.from(request);
jwtFilter
.filter(
exchange,
it ->
Mono
.subscriberContext()
.flatMap(c -> ReactiveSecurityContextHolder.getContext())
.map(SecurityContext::getAuthentication)
.doOnSuccess(auth -> assertThat(auth.getName()).isEqualTo("test-user"))
.doOnSuccess(auth -> assertThat(auth.getCredentials().toString()).hasToString(jwt))
.then()
)
.block();
}
@Test
void testJWTFilterInvalidToken() {
String jwt = "wrong_jwt";
MockServerHttpRequest.BaseBuilder request = MockServerHttpRequest
.get("/api/test")
.header(JWTFilter.AUTHORIZATION_HEADER, "Bearer " + jwt);
MockServerWebExchange exchange = MockServerWebExchange.from(request);
jwtFilter
.filter(
exchange,
it ->
Mono
.subscriberContext()
.flatMap(c -> ReactiveSecurityContextHolder.getContext())
.map(SecurityContext::getAuthentication)
.doOnSuccess(auth -> assertThat(auth).isNull())
.then()
)
.block();
}
@Test
void testJWTFilterMissingAuthorization() {
MockServerHttpRequest.BaseBuilder request = MockServerHttpRequest.get("/api/test");
MockServerWebExchange exchange = MockServerWebExchange.from(request);
jwtFilter
.filter(
exchange,
it ->
Mono
.subscriberContext()
.flatMap(c -> ReactiveSecurityContextHolder.getContext())
.map(SecurityContext::getAuthentication)
.doOnSuccess(auth -> assertThat(auth).isNull())
.then()
)
.block();
}
@Test
void testJWTFilterMissingToken() {
MockServerHttpRequest.BaseBuilder request = MockServerHttpRequest
.get("/api/test")
.header(JWTFilter.AUTHORIZATION_HEADER, "Bearer ");
MockServerWebExchange exchange = MockServerWebExchange.from(request);
jwtFilter
.filter(
exchange,
it ->
Mono
.subscriberContext()
.flatMap(c -> ReactiveSecurityContextHolder.getContext())
.map(SecurityContext::getAuthentication)
.doOnSuccess(auth -> assertThat(auth).isNull())
.then()
)
.block();
}
@Test
void testJWTFilterWrongScheme() {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
"test-user",
"test-password",
Collections.singletonList(new SimpleGrantedAuthority(AuthoritiesConstants.USER))
);
String jwt = tokenProvider.createToken(authentication, false);
MockServerHttpRequest.BaseBuilder request = MockServerHttpRequest
.get("/api/test")
.header(JWTFilter.AUTHORIZATION_HEADER, "Basic " + jwt);
MockServerWebExchange exchange = MockServerWebExchange.from(request);
jwtFilter
.filter(
exchange,
it ->
Mono
.subscriberContext()
.flatMap(c -> ReactiveSecurityContextHolder.getContext())
.map(SecurityContext::getAuthentication)
.doOnSuccess(auth -> assertThat(auth).isNull())
.then()
)
.block();
}
}
|
[
"monjurmorshed793@gmail.com"
] |
monjurmorshed793@gmail.com
|
c2ddb72a44027c7e91e389a9e13c4b669c8a6aec
|
15b260ccada93e20bb696ae19b14ec62e78ed023
|
/v2/src/main/java/com/alipay/api/domain/VoucherUseGuideInfo.java
|
58a6ed7e6fb9ab15d349cb28f7487447e0f8ad89
|
[
"Apache-2.0"
] |
permissive
|
alipay/alipay-sdk-java-all
|
df461d00ead2be06d834c37ab1befa110736b5ab
|
8cd1750da98ce62dbc931ed437f6101684fbb66a
|
refs/heads/master
| 2023-08-27T03:59:06.566567
| 2023-08-22T14:54:57
| 2023-08-22T14:54:57
| 132,569,986
| 470
| 207
|
Apache-2.0
| 2022-12-25T07:37:40
| 2018-05-08T07:19:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,077
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 券核销引导
*
* @author auto create
* @since 1.0, 2023-07-21 11:25:47
*/
public class VoucherUseGuideInfo extends AlipayObject {
private static final long serialVersionUID = 2113182129499443157L;
/**
* 小程序核销引导
*/
@ApiField("mini_app_use_guide_info")
private VoucherMiniAppUseGuideInfo miniAppUseGuideInfo;
/**
* 使用引导模式
*/
@ApiListField("use_guide_mode")
@ApiField("string")
private List<String> useGuideMode;
public VoucherMiniAppUseGuideInfo getMiniAppUseGuideInfo() {
return this.miniAppUseGuideInfo;
}
public void setMiniAppUseGuideInfo(VoucherMiniAppUseGuideInfo miniAppUseGuideInfo) {
this.miniAppUseGuideInfo = miniAppUseGuideInfo;
}
public List<String> getUseGuideMode() {
return this.useGuideMode;
}
public void setUseGuideMode(List<String> useGuideMode) {
this.useGuideMode = useGuideMode;
}
}
|
[
"auto-publish"
] |
auto-publish
|
60c3550e6a6e2aba9c58b649622440df4c3aef15
|
0df6393399252e94bf7dc1090e584b06052cdd89
|
/src/main/java/com/zhazhapan/efo/service/impl/CategoryServiceImpl.java
|
4c3ce4e8fca0c68f61d0ee92d07f95114f875c78
|
[
"MIT"
] |
permissive
|
lixiaochun/efo
|
f8bbfdead2b6e07bc70e5701a438e2f7fba803d2
|
07137a9768908601e4eae6e97267d727fe7e01cb
|
refs/heads/master
| 2020-03-15T15:51:31.538065
| 2018-03-15T15:23:21
| 2018-03-15T15:23:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,662
|
java
|
package com.zhazhapan.efo.service.impl;
import com.zhazhapan.efo.dao.CategoryDAO;
import com.zhazhapan.efo.entity.Category;
import com.zhazhapan.efo.modules.constant.DefaultValues;
import com.zhazhapan.efo.service.ICategoryService;
import com.zhazhapan.util.Checker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author pantao
* @since 2018/1/30
*/
@Service
public class CategoryServiceImpl implements ICategoryService {
private final CategoryDAO categoryDAO;
@Autowired
public CategoryServiceImpl(CategoryDAO categoryDAO) {this.categoryDAO = categoryDAO;}
@Override
public boolean insert(String name) {
return Checker.isNotNull(name) && categoryDAO.insertCategory(name);
}
@Override
public boolean remove(int id) {
return !isUncategorized(id) && categoryDAO.removeCategoryById(id);
}
@Override
public boolean update(int id, String name) {
return Checker.isNotEmpty(name) && !isUncategorized(id) && categoryDAO.updateNameById(id, name);
}
private boolean isUncategorized(int id) {
return DefaultValues.UNCATEGORIZED.equals(getById(id).getName());
}
@Override
public Category getById(int id) {
return categoryDAO.getCategoryById(id);
}
@Override
public List<Category> getAll() {
return categoryDAO.getAllCategory();
}
@Override
public int getIdByName(String name) {
try {
return categoryDAO.getIdByName(name);
} catch (Exception e) {
return Integer.MAX_VALUE;
}
}
}
|
[
"tao@zhazhapan.com"
] |
tao@zhazhapan.com
|
24e5fa4f5f0c179f74a6709fb6625a6cac97e831
|
fb079e82c42cea89a3faea928d4caf0df4954b05
|
/Физкультура/ВДНХ/VelnessBMSTU_v1.2b_apkpure.com_source_from_JADX/com/google/android/gms/internal/zzegb.java
|
f8f0dc64b1a81be143dac6c23fb7bfbb042845a8
|
[] |
no_license
|
Belousov-EA/university
|
33c80c701871379b6ef9aa3da8f731ccf698d242
|
6ec7303ca964081c52f259051833a045f0c91a39
|
refs/heads/master
| 2022-01-21T17:46:30.732221
| 2022-01-10T20:27:15
| 2022-01-10T20:27:15
| 123,337,018
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 335
|
java
|
package com.google.android.gms.internal;
import java.lang.Thread.UncaughtExceptionHandler;
public interface zzegb {
public static final zzegb zzmwp = new zzegc();
void zza(Thread thread, String str);
void zza(Thread thread, UncaughtExceptionHandler uncaughtExceptionHandler);
void zza(Thread thread, boolean z);
}
|
[
"Belousov.EA98@gmail.com"
] |
Belousov.EA98@gmail.com
|
f4e5e206ca2ea2abf8364cb956013cf18d3d8c06
|
fba8af31d5d36d8a6cf0c341faed98b6cd5ec0cb
|
/src/main/java/com/alipay/api/domain/AntMerchantExpandScodeEledeUnsignModel.java
|
9f192e845a40ea830f69a05abbce2fbbecd3d932
|
[
"Apache-2.0"
] |
permissive
|
planesweep/alipay-sdk-java-all
|
b60ea1437e3377582bd08c61f942018891ce7762
|
637edbcc5ed137c2b55064521f24b675c3080e37
|
refs/heads/master
| 2020-12-12T09:23:19.133661
| 2020-01-09T11:04:31
| 2020-01-09T11:04:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 843
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 饿了么餐饮批量去标接口
*
* @author auto create
* @since 1.0, 2019-11-14 17:28:30
*/
public class AntMerchantExpandScodeEledeUnsignModel extends AlipayObject {
private static final long serialVersionUID = 3452667943775298986L;
/**
* 去标请求
*/
@ApiListField("remove_tag_request")
@ApiField("remove_tag_request")
private List<RemoveTagRequest> removeTagRequest;
public List<RemoveTagRequest> getRemoveTagRequest() {
return this.removeTagRequest;
}
public void setRemoveTagRequest(List<RemoveTagRequest> removeTagRequest) {
this.removeTagRequest = removeTagRequest;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
e6b8cf0d222ba828ee8151cb89f6e6c0e038b25e
|
dc2e852ec689a65f53a785ae9c8098fe1339ed01
|
/src/main/java/catalog/Catalog.java
|
d18e3f4bbe74da457de3a3b1e196026bcb3079a3
|
[] |
no_license
|
manikola/prep_for_exam
|
a46e3c3e440f9a8de5e856e09ccd0c7bafe5ac3c
|
43c8d51f5201a6102ad75350b4fa21d33cb2c04e
|
refs/heads/master
| 2023-04-08T02:29:59.619694
| 2021-04-28T06:45:24
| 2021-04-28T06:45:24
| 362,028,467
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,629
|
java
|
package catalog;
import java.util.ArrayList;
import java.util.List;
public class Catalog {
List<CatalogItem> catalogItems = new ArrayList<>();
public void addItem(CatalogItem item) {
catalogItems.add(item);
}
public void deleteItemByRegistrationNumber(String regNr) {
for (int i = 0; i < catalogItems.size(); i++) {
if (catalogItems.get(i).getRegistrationNumber().equals(regNr)) {
catalogItems.remove(catalogItems.get(i));
}
}
}
public List<CatalogItem> getAudioLibraryItems() {
List<CatalogItem> audioItems = new ArrayList<>();
for (CatalogItem item : catalogItems) {
if (item.hasAudioFeature()) {
audioItems.add(item);
}
}
return audioItems;
}
public List<CatalogItem> getPrintedLibraryItems() {
List<CatalogItem> printedItems = new ArrayList<>();
for (CatalogItem item : catalogItems) {
if (item.hasPrintedFeature()) {
printedItems.add(item);
}
}
return printedItems;
}
public double averagePageNumberOver(int numberOfPages) {
if (numberOfPages <= 0) {
throw new IllegalArgumentException("Page number must be positive");
}
List<Integer> numberOfPagesList = new ArrayList<>();
for (CatalogItem item : getPrintedLibraryItems()) {
if (item.numberOfPagesAtOneItem() > numberOfPages) {
numberOfPagesList.add(item.numberOfPagesAtOneItem());
}
}
if (Validators.isEmpty(numberOfPagesList)) {
throw new IllegalArgumentException("No page");
}
int sum = 0;
for (Integer i : numberOfPagesList) {
sum += i;
}
return (sum / numberOfPagesList.size()) * 1.0;
}
public int getAllPageNumber() {
int sum = 0;
for (CatalogItem item : catalogItems) {
sum += item.numberOfPagesAtOneItem();
}
return sum;
}
public int getFullLength() {
int sum = 0;
for (CatalogItem item : catalogItems) {
sum += item.fullLengthAtOneItem();
}
return sum;
}
public List<CatalogItem> findByCriteria(SearchCriteria searchCriteria) {
List<CatalogItem> results = new ArrayList<>();
for (CatalogItem item : catalogItems) {
if (searchCriteria.hasTitle()) {
for (String str : item.getTitles()) {
if (searchCriteria.getTitle().equals(str)) {
results.add(item);
}
}
} else if (!searchCriteria.hasTitle() && searchCriteria.hasContributor()) {
for (String string : item.getContributors()) {
if (searchCriteria.getContributor().equals(string)) {
results.add(item);
}
}
}
}
return results;
}
}
//Catalog osztály: A katalógus tartalmazza a katalógus elemek listáját és ebben az osztályban lehet különböző lekérdezéseket végrehajtani. Le lehet kérdezni:
//
//Az audio illetve nyomtatott jellemzőkkel rendelkező elemeket (getAudioLibraryItems(), getPrintedLibraryItems())
//Az összoldalszámot a nyomtatottaknál (getAllPageNumber())
//Az összhosszt az audio típusúaknál (getFullLength())
//Az átlag oldalszámot egy bizonyos oldalszám felett (averagePageNumberOver())
//Keresni lehet egy SearchCriteria alapján (lásd lejjebb) (findByCriteria())
|
[
"66733574+manikola@users.noreply.github.com"
] |
66733574+manikola@users.noreply.github.com
|
055ef01818e2530452255b5f7027b8ec243c3f43
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/gstraube_cythara/app/src/main/java/be/tarsos/dsp/wavelet/lift/HaarWavelet.java
|
08b52f700b1571b9ada0d7a4b7c18dcacaab794c
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
|
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
|
0564143d92f8024ff5fa6b659c2baebf827582b1
|
refs/heads/master
| 2020-07-13T13:53:40.297493
| 2019-01-11T11:51:18
| 2019-01-11T11:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,963
|
java
|
// isComment
package be.tarsos.dsp.wavelet.lift;
/**
* isComment
*/
public class isClassOrIsInterface extends LiftingSchemeBaseWavelet {
/**
* isComment
*/
protected void isMethod(float[] isParameter, int isParameter, int isParameter) {
int isVariable = isNameExpr >> isIntegerConstant;
for (int isVariable = isIntegerConstant; isNameExpr < isNameExpr; isNameExpr++) {
float isVariable = isNameExpr[isNameExpr];
int isVariable = isNameExpr + isNameExpr;
if (isNameExpr == isNameExpr) {
isNameExpr[isNameExpr] = isNameExpr[isNameExpr] - isNameExpr;
} else if (isNameExpr == isNameExpr) {
isNameExpr[isNameExpr] = isNameExpr[isNameExpr] + isNameExpr;
} else {
isNameExpr.isFieldAccessExpr.isMethod("isStringConstant");
}
}
}
public void isMethod(float[] isParameter) {
final int isVariable = isNameExpr.isFieldAccessExpr;
isMethod(isNameExpr, isNameExpr);
isMethod(isNameExpr, isNameExpr, isNameExpr);
isMethod(isNameExpr, isNameExpr, isNameExpr);
}
// isComment
/**
* isComment
*/
protected void isMethod(float[] isParameter, int isParameter, int isParameter) {
int isVariable = isNameExpr >> isIntegerConstant;
for (int isVariable = isIntegerConstant; isNameExpr < isNameExpr; isNameExpr++) {
int isVariable = isNameExpr + isNameExpr;
float isVariable = isNameExpr[isNameExpr] / isDoubleConstant;
if (isNameExpr == isNameExpr) {
isNameExpr[isNameExpr] = isNameExpr[isNameExpr] + isNameExpr;
} else if (isNameExpr == isNameExpr) {
isNameExpr[isNameExpr] = isNameExpr[isNameExpr] - isNameExpr;
} else {
isNameExpr.isFieldAccessExpr.isMethod("isStringConstant");
}
}
}
}
// isComment
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
6ed268adf6f9ffbec41edcd9df57323d7aca4734
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/70/405.java
|
bec497b826e47300a619d6570e2f1af09457483f
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,230
|
java
|
package <missing>;
public class GlobalMembers
{
public static void Main()
{
int n;
double[] x = {0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
double[] y = {0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
double[] r = {0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
double cx = 0.0;
double tx = 0.0;
double cy = 0.0;
double ty = 0.0;
double maxr = 0.0;
double maxd = 0.0;
int i;
int j;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
for (i = 0;i < n;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
x[i] = Double.parseDouble(tempVar2);
}
String tempVar3 = ConsoleInput.scanfRead(" ");
if (tempVar3 != null)
{
y[i] = Double.parseDouble(tempVar3);
}
}
for (i = 0;i < n;i++)
{
tx += x[i];
ty += y[i];
}
cx = tx / n;
cy = ty / n;
for (i = 0;i < n;i++)
{
r[i] = Math.sqrt((x[i] - cx) * (x[i] - cx) + (y[i] - cy) * (y[i] - cy));
}
for (i = 0;i < n;i++)
{
if (r[i] > maxr)
{
maxr = r[i];
}
}
for (i = 0;i < n;i++)
{
if (r[i] < (maxr / 2))
{
r[i] = 0;
}
}
for (i = 0;i < n;i++)
{
for (j = i;j < n;j++)
{
if (Math.sqrt((x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j])) > maxd)
{
maxd = Math.sqrt((x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]));
}
}
}
System.out.printf("%.4f\n",maxd);
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
c5f71d1e6eec0aab81e869a4e794e970048415e7
|
c11332b77fa26820a93a5e767a3f74615365e11d
|
/src/main/java/Model/gradebookInterface.java
|
f3dd28453defa54434f796a4da0f51b617918c5e
|
[] |
no_license
|
dpposnett/Java-Canvas-LMS-API
|
8e52ef47c94c22ae5e5b7c159c22c58d05e8628f
|
37e7362b840e78f0473e4f4d2d46c581c96fe3ec
|
refs/heads/master
| 2023-08-13T04:43:18.783601
| 2021-10-09T10:57:52
| 2021-10-09T10:57:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,671
|
java
|
package Model;
import Controller.gradebookController.Day;
import Controller.gradebookController.Grader;
import Controller.gradebookController.SubmissionHistory;
import Controller.gradebookController.SubmissionVersion;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;
import java.util.List;
import java.util.Map;
public interface gradebookInterface {
@GET("https://udel.instructure.com/api/v1/courses/{courseId}/gradebook_history/days")
Call<List<Day>> daysInCourseGradebook(@Path("courseId") String courseId, @Header("Authorization") String auth);
@GET("https://udel.instructure.com/api/v1/courses/{courseId}/gradebook_history/{gradebookDate}")
Call<List<Grader>> detailsForGivenDate(@Path("courseId") String courseId, @Path("gradebookDate") String gradebookDate, @Header("Authorization") String auth, @QueryMap Map<String,Object> queries);
@GET("https://udel.instructure.com/api/v1/courses/{courseId}/gradebook_history/{gradebookDate}/graders/{graderId}/assingments/{assignmentId}/submissions")
Call<List<SubmissionHistory>> listSubmissions(@Path("courseId") String courseid, @Path("gradebookDate") String gradebookDate, @Path("graderId") String graderId, @Path("assignmentId") String assignmentId, @Header("Authorization") String auth, @QueryMap Map<String,Object> queries);
@GET("https://udel.instructure.com/api/v1/courses/{courseId}/gradebook_history/feed")
Call<List<SubmissionVersion>> listUncollatedSubmissionVersions(@Path("courseId") String courseId, @Header("Authorization") String auth, @QueryMap Map<String,Object> queries);
}
|
[
"cthacker@udel.edu"
] |
cthacker@udel.edu
|
78b43dac3f3ab5e21fbb62d5504e2b470b681b11
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_3ca908807783bf3c1c159b7a7433b026c503eb7d/ReplaceWithStringFormatFix/2_3ca908807783bf3c1c159b7a7433b026c503eb7d_ReplaceWithStringFormatFix_t.java
|
ef0b42336943c42868460eec063b60c437aa040f
|
[] |
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
| 5,201
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Contributor(s):
*
* The Original Software is NetBeans. The Initial Developer of the Original
* Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
* Microsystems, Inc. All Rights Reserved.
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*/
package de.markiewb.netbeans.plugins.hints.replaceplus;
import de.markiewb.netbeans.plugins.hints.common.StringUtils;
import de.markiewb.netbeans.plugins.hints.replaceplus.BuildArgumentsVisitor.Result;
import java.util.HashMap;
import java.util.Map;
import org.netbeans.api.java.source.TreePathHandle;
import org.openide.loaders.DataObject;
import org.openide.util.MapFormat;
import org.openide.util.NbBundle;
/**
* Fix which converts patterns like
* <pre>"Contains "+4+ "entries"</pre> into
* <pre>String.format("Contains %s entries",4)</pre>.<br/>
* Based on http://hg.netbeans.org/main/contrib/file/tip/editor.hints.i18n/src/org/netbeans/modules/editor/hints/i18n
* from Jan Lahoda.
*
* @author Jan Lahoda
*/
public class ReplaceWithStringFormatFix extends AbstractReplaceWithFix {
public static ReplaceWithStringFormatFix create(DataObject od, TreePathHandle handle, BuildArgumentsVisitor.Result data) {
if (ReplaceWithStringFormatFix.supports(data)) {
return new ReplaceWithStringFormatFix(od, handle, data);
}
return null;
}
private ReplaceWithStringFormatFix(DataObject od, TreePathHandle handle, BuildArgumentsVisitor.Result data) {
super(handle, od, data);
}
private static boolean supports(BuildArgumentsVisitor.Result data) {
if (data.hasOnlyNonLiterals()) {
//?? ignore zero-length string literals and
//ignore "plus" expressions without a literal
return false;
}
return true;
}
@NbBundle.Messages({"LBL_ReplaceWithStringFormatFix=Replace '+' with 'String.format()'"})
@Override
public String getText() {
return Bundle.LBL_ReplaceWithStringFormatFix();
}
private String createFormat(BuildArgumentsVisitor.Result data) {
//
StringBuilder formatBuilder = new StringBuilder();
for (BuildArgumentsVisitor.TokenPair pair : data.get()) {
if (pair.isIsArgument()) {
formatBuilder.append("%s");
} else {
formatBuilder.append(StringUtils.escapeLF(pair.getText()));
}
}
String format = formatBuilder.toString();
return format;
}
private String createArguments(Result data1) {
if (data1.getArguments().
isEmpty()) {
return "";
}
return new StringBuilder().append(", ").
append(StringUtils.join(data1.getArguments(), ", ")).
toString();
}
@Override
protected String getNewExpression() {
Map<String, String> table = new HashMap<String, String>();
table.put("format", createFormat(getData())); // NOI18N
table.put("arguments", createArguments(getData())); // NOI18N
String _formatTemplate = "java.lang.String.format(\"{format}\"{arguments})";
final String text = new MapFormat(table).format(_formatTemplate);
return text;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
0a31d9589833e462173d848d5b68fe45e9be071b
|
25e2d4e9ffdfa97bb42dcfb8549c38376625aa24
|
/src/main/java/com/lulan/shincolle/ai/EntityAIShipSit.java
|
8c614febd779abe05c16ab48b670cdcc4241f4c4
|
[] |
no_license
|
TartaricAcid/ShinColle
|
7633dcdd983b6482b74c578840ca4663aa99779c
|
0542ad0d7df99ef0548640b2fded1c43ab820585
|
refs/heads/mc-1.10.2
| 2021-07-18T15:23:42.842748
| 2017-10-26T13:20:20
| 2017-10-26T13:20:20
| 108,408,720
| 0
| 0
| null | 2017-10-26T12:30:15
| 2017-10-26T12:30:14
| null |
UTF-8
|
Java
| false
| false
| 1,101
|
java
|
package com.lulan.shincolle.ai;
import com.lulan.shincolle.entity.BasicEntityShip;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.ai.EntityAIBase;
/**SIT AI FOR SHIP
* 可以在液體中坐下
*/
public class EntityAIShipSit extends EntityAIBase
{
private BasicEntityShip host;
private EntityLivingBase owner;
public EntityAIShipSit(BasicEntityShip entity)
{
this.host = entity;
this.setMutexBits(7);
}
@Override
public boolean shouldExecute()
{
// LogHelper.info("DEBUG : exec sitting "+(this.owner == null));
return this.host.isSitting();
}
@Override
public void startExecuting()
{
this.host.setSitting(true);
this.host.setJumping(false);
}
@Override
public void updateTask()
{
// LogHelper.info("DEBUG : exec sitting");
this.host.getNavigator().clearPathEntity();
this.host.setAttackTarget(null);
this.host.setEntityTarget(null);
}
@Override
public void resetTask()
{
this.host.setSitting(false);
}
}
|
[
"zec_tails@yahoo.com.tw"
] |
zec_tails@yahoo.com.tw
|
22ac48871bd43067325e0448d00f48a72dcfceaa
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE23_Relative_Path_Traversal/CWE23_Relative_Path_Traversal__getCookies_Servlet_51b.java
|
a53a4c699b50aec2bbfcb0320e7c88ebf78f9139
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 5,535
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE23_Relative_Path_Traversal__getCookies_Servlet_51b.java
Label Definition File: CWE23_Relative_Path_Traversal.label.xml
Template File: sources-sink-51b.tmpl.java
*/
/*
* @description
* CWE: 23 Relative Path Traversal
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* GoodSource: A hardcoded string
* BadSink: readFile no validation
* Flow Variant: 51 Data flow: data passed as an argument from one function to another in different classes in the same package
*
* */
package testcases.CWE23_Relative_Path_Traversal;
import testcasesupport.*;
import java.io.*;
import javax.servlet.http.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE23_Relative_Path_Traversal__getCookies_Servlet_51b
{
public void bad_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String root = "C:\\uploads\\";
if (data != null)
{
/* POTENTIAL FLAW: no validation of concatenated value */
File fIn = new File(root + data);
FileInputStream fisSink = null;
InputStreamReader isreadSink = null;
BufferedReader buffreadSink = null;
if( fIn.exists() && fIn.isFile() )
{
try
{
fisSink = new FileInputStream(fIn);
isreadSink = new InputStreamReader(fisSink, "UTF-8");
buffreadSink = new BufferedReader(isreadSink);
IO.writeLine(buffreadSink.readLine());
}
catch ( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally
{
/* Close stream reading objects */
try
{
if( buffreadSink != null )
{
buffreadSink.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", ioe);
}
try
{
if( isreadSink != null )
{
isreadSink.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", ioe);
}
try
{
if( fisSink != null )
{
fisSink.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String root = "C:\\uploads\\";
if (data != null)
{
/* POTENTIAL FLAW: no validation of concatenated value */
File fIn = new File(root + data);
FileInputStream fisSink = null;
InputStreamReader isreadSink = null;
BufferedReader buffreadSink = null;
if( fIn.exists() && fIn.isFile() )
{
try
{
fisSink = new FileInputStream(fIn);
isreadSink = new InputStreamReader(fisSink, "UTF-8");
buffreadSink = new BufferedReader(isreadSink);
IO.writeLine(buffreadSink.readLine());
}
catch ( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally
{
/* Close stream reading objects */
try
{
if( buffreadSink != null )
{
buffreadSink.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", ioe);
}
try
{
if( isreadSink != null )
{
isreadSink.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", ioe);
}
try
{
if( fisSink != null )
{
fisSink.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
}
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
68d2b07b6eee69ff22b6d037d2437854ae708878
|
59e4596f07b00a69feabb1fb119619aa58964dd4
|
/StsTool.v.1.3.3/eu.aniketos.wp1.ststool.analysis.dlv/src/eu/aniketos/wp1/ststool/analysis/dlv/wrapper/DlvInputProgram.java
|
4a3c7bf70d92701ad5d25fe29e61205f412a244b
|
[] |
no_license
|
AniketosEU/Socio-technical-Security-Requirements
|
895bac6785af1a40cb55afa9cb3dd73f83f8011f
|
7ce04c023af6c3e77fa4741734da7edac103c875
|
refs/heads/master
| 2018-12-31T17:08:39.594985
| 2014-02-21T14:36:14
| 2014-02-21T14:36:14
| 15,801,803
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,047
|
java
|
/*
* DlvInputProgram.java
*
* This file is part of the STS-Tool project.
* Copyright (c) 2011-2012 "University of Trento - DISI" All rights reserved.
*
* Is strictly forbidden to remove this copyright notice from this source code.
*
* Disclaimer of Warranty:
* STS-Tool (this software) is provided "as-is" and without warranty of any kind,
* express, implied or otherwise, including without limitation, any warranty of
* merchantability or fitness for a particular purpose.
* In no event shall the copyright holder or contributors 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.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License version 3
* as published by the Free Software Foundation with the addition of the
* following permission added to Section 15 as permitted in Section 7(a):
* FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
* "University of Trento - DISI","University of Trento - DISI" DISCLAIMS THE
* WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with this program; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA, 02110-1301 USA, or download the license from the following URL:
* http://www.sts-tool.eu/License.php
*
* For more information, please contact STS-Tool group at this
* address: ststool@disi.unitn.it
*
*/
package eu.aniketos.wp1.ststool.analysis.dlv.wrapper;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
public class DlvInputProgram {
private List<String> programInput = new ArrayList<String>();
public void addFile(File f){
try {
addInputStream(new FileInputStream(f));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
public void addInputStream(InputStream is){
loadInputStream(is);
}
public void addLine(String line){
if (line != null) {
line = line.trim();
if (line.length() > 0 && !line.startsWith("%") && !line.startsWith("\n")) {
int x = line.indexOf("%");
if (x > 0) {
programInput.add(line.substring(0, x - 1));
} else {
programInput.add(line);
}
}
}
//programInput.add(line);
}
public void addMultipleLine(List<String> lines){
for (String line : lines) {
addLine(line);
}
}
private void loadInputStream(InputStream is){
try {
BufferedReader in = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = in.readLine()) != null) {
addLine(line);
}
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public void clear(){
programInput.clear();
}
public boolean isEmpty(){
return programInput.size() == 0;
}
public String getInputProgram(){
if (!isEmpty()) {
List<String> ls = new LinkedList<String>(programInput);
Collections.shuffle(ls);
StringBuilder sb = new StringBuilder();
for (String s : ls) {
sb.append(s + "\n");
}
return sb.toString();
}
return "";
}
public List<String> getInputProgramList(){
return programInput;
}
}
|
[
"mattia@MacBookPro.local"
] |
mattia@MacBookPro.local
|
1df8334decfc09d78159eb47d66d088f79bca3ed
|
d315c83c3a2ff6aa62ea3b1711a6286582ea35da
|
/src/main/java/org/semanticwb/model/TemplateGroup.java
|
7facc6dc959d8c724f7c4eb5543a3eff310c38e1
|
[] |
no_license
|
SemanticWebBuilder/SWBModel
|
367226830d96d4371a60452b30b6ae36d02cada7
|
8657f03737945af3e401a1fa58342c837061dbdb
|
refs/heads/master
| 2020-06-16T06:03:39.738026
| 2017-11-10T23:38:43
| 2017-11-10T23:38:43
| 75,239,564
| 0
| 1
| null | 2017-10-04T18:53:48
| 2016-12-01T00:27:38
|
Java
|
UTF-8
|
Java
| false
| false
| 2,161
|
java
|
/*
* SemanticWebBuilder es una plataforma para el desarrollo de portales y aplicaciones de integración,
* colaboración y conocimiento, que gracias al uso de tecnología semántica puede generar contextos de
* información alrededor de algún tema de interés o bien integrar información y aplicaciones de diferentes
* fuentes, donde a la información se le asigna un significado, de forma que pueda ser interpretada y
* procesada por personas y/o sistemas, es una creación original del Fondo de Información y Documentación
* para la Industria INFOTEC, cuyo registro se encuentra actualmente en trámite.
*
* INFOTEC pone a su disposición la herramienta SemanticWebBuilder a través de su licenciamiento abierto al público (‘open source’),
* en virtud del cual, usted podrá usarlo en las mismas condiciones con que INFOTEC lo ha diseñado y puesto a su disposición;
* aprender de él; distribuirlo a terceros; acceder a su código fuente y modificarlo, y combinarlo o enlazarlo con otro software,
* todo ello de conformidad con los términos y condiciones de la LICENCIA ABIERTA AL PÚBLICO que otorga INFOTEC para la utilización
* del SemanticWebBuilder 4.0.
*
* INFOTEC no otorga garantía sobre SemanticWebBuilder, de ninguna especie y naturaleza, ni implícita ni explícita,
* siendo usted completamente responsable de la utilización que le dé y asumiendo la totalidad de los riesgos que puedan derivar
* de la misma.
*
* Si usted tiene cualquier duda o comentario sobre SemanticWebBuilder, INFOTEC pone a su disposición la siguiente
* dirección electrónica:
* http://www.semanticwebbuilder.org
*/
package org.semanticwb.model;
//~--- non-JDK imports --------------------------------------------------------
import org.semanticwb.model.base.*;
import org.semanticwb.platform.SemanticObject;
// TODO: Auto-generated Javadoc
/**
* The Class TemplateGroup.
*/
public class TemplateGroup extends TemplateGroupBase {
/**
* Instantiates a new template group.
*
* @param base the base
*/
public TemplateGroup(SemanticObject base) {
super(base);
}
}
|
[
"softjei@gmail.com"
] |
softjei@gmail.com
|
aee057a9f50e627b3648c6d4e763bf0e2e20d4fd
|
7ebc513fe01c6dfdb85b2dafbc6a2b1ec48bc20b
|
/src/java/c/b/b/a/e/d/ab.java
|
7a747354058dc35ba9a3c5cb36170d26511d23c3
|
[] |
no_license
|
arnoldnekemiah/chessapp
|
b6c9b7a5aceb8912d699abf654f9ebc08a61f8d2
|
f3f0b141742f55c84c7ab98966256897c6bb07f4
|
refs/heads/main
| 2023-04-05T00:25:54.395071
| 2021-04-13T06:12:39
| 2021-04-13T06:12:39
| 357,438,812
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 598
|
java
|
/*
* Decompiled with CFR 0.0.
*
* Could not load the following classes:
* c.b.b.a.e.d.bb
* java.lang.Object
*/
package c.b.b.a.e.d;
import a.c.a.a;
import c.b.b.a.e.d.a4;
import c.b.b.a.e.d.bb;
import c.b.b.a.e.d.cb;
import c.b.b.a.e.d.x3;
public final class ab
implements x3<bb> {
public static final ab b = new ab();
public final x3<bb> a;
public ab() {
a4<cb> a42 = new a4<cb>(new cb());
this.a = a.a(a42);
}
public static boolean c() {
b.b().a();
return true;
}
public final bb b() {
return this.a.a();
}
}
|
[
"42886828+arnoldnekemiah@users.noreply.github.com"
] |
42886828+arnoldnekemiah@users.noreply.github.com
|
ec5b662ad39af5cfa9fcec3bf7fce6606834f729
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/flink/2016/8/TaskAsyncCallTest.java
|
fc1a5df631563a47031e2aa43dcbb02dd70f67e9
|
[] |
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
| 7,981
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.runtime.taskmanager;
import org.apache.flink.api.common.ExecutionConfig;
import org.apache.flink.api.common.JobID;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.core.testutils.OneShotLatch;
import org.apache.flink.runtime.metrics.groups.TaskMetricGroup;
import org.apache.flink.runtime.blob.BlobKey;
import org.apache.flink.runtime.broadcast.BroadcastVariableManager;
import org.apache.flink.runtime.deployment.InputGateDeploymentDescriptor;
import org.apache.flink.runtime.deployment.ResultPartitionDeploymentDescriptor;
import org.apache.flink.runtime.deployment.TaskDeploymentDescriptor;
import org.apache.flink.runtime.execution.ExecutionState;
import org.apache.flink.runtime.execution.librarycache.LibraryCacheManager;
import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
import org.apache.flink.runtime.filecache.FileCache;
import org.apache.flink.runtime.instance.ActorGateway;
import org.apache.flink.runtime.instance.DummyActorGateway;
import org.apache.flink.runtime.io.disk.iomanager.IOManager;
import org.apache.flink.runtime.io.network.NetworkEnvironment;
import org.apache.flink.runtime.io.network.partition.ResultPartitionConsumableNotifier;
import org.apache.flink.runtime.io.network.partition.ResultPartitionManager;
import org.apache.flink.runtime.jobgraph.JobVertexID;
import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
import org.apache.flink.runtime.jobgraph.tasks.StatefulTask;
import org.apache.flink.runtime.memory.MemoryManager;
import org.apache.flink.runtime.query.TaskKvStateRegistry;
import org.apache.flink.runtime.state.StateHandle;
import org.apache.flink.util.SerializedValue;
import org.junit.Before;
import org.junit.Test;
import scala.concurrent.duration.FiniteDuration;
import java.io.Serializable;
import java.net.URL;
import java.util.Collections;
import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class TaskAsyncCallTest {
private static final int NUM_CALLS = 1000;
private static OneShotLatch awaitLatch;
private static OneShotLatch triggerLatch;
@Before
public void createQueuesAndActors() {
awaitLatch = new OneShotLatch();
triggerLatch = new OneShotLatch();
}
// ------------------------------------------------------------------------
// Tests
// ------------------------------------------------------------------------
@Test
public void testCheckpointCallsInOrder() {
try {
Task task = createTask();
task.startTaskThread();
awaitLatch.await();
for (int i = 1; i <= NUM_CALLS; i++) {
task.triggerCheckpointBarrier(i, 156865867234L);
}
triggerLatch.await();
assertFalse(task.isCanceledOrFailed());
ExecutionState currentState = task.getExecutionState();
if (currentState != ExecutionState.RUNNING && currentState != ExecutionState.FINISHED) {
fail("Task should be RUNNING or FINISHED, but is " + currentState);
}
task.cancelExecution();
task.getExecutingThread().join();
}
catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
@Test
public void testMixedAsyncCallsInOrder() {
try {
Task task = createTask();
task.startTaskThread();
awaitLatch.await();
for (int i = 1; i <= NUM_CALLS; i++) {
task.triggerCheckpointBarrier(i, 156865867234L);
task.notifyCheckpointComplete(i);
}
triggerLatch.await();
assertFalse(task.isCanceledOrFailed());
ExecutionState currentState = task.getExecutionState();
if (currentState != ExecutionState.RUNNING && currentState != ExecutionState.FINISHED) {
fail("Task should be RUNNING or FINISHED, but is " + currentState);
}
task.cancelExecution();
task.getExecutingThread().join();
}
catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
private static Task createTask() throws Exception {
LibraryCacheManager libCache = mock(LibraryCacheManager.class);
when(libCache.getClassLoader(any(JobID.class))).thenReturn(ClassLoader.getSystemClassLoader());
ResultPartitionManager partitionManager = mock(ResultPartitionManager.class);
ResultPartitionConsumableNotifier consumableNotifier = mock(ResultPartitionConsumableNotifier.class);
NetworkEnvironment networkEnvironment = mock(NetworkEnvironment.class);
when(networkEnvironment.getPartitionManager()).thenReturn(partitionManager);
when(networkEnvironment.getPartitionConsumableNotifier()).thenReturn(consumableNotifier);
when(networkEnvironment.getDefaultIOMode()).thenReturn(IOManager.IOMode.SYNC);
when(networkEnvironment.createKvStateTaskRegistry(any(JobID.class), any(JobVertexID.class)))
.thenReturn(mock(TaskKvStateRegistry.class));
TaskDeploymentDescriptor tdd = new TaskDeploymentDescriptor(
new JobID(), "Job Name", new JobVertexID(), new ExecutionAttemptID(),
new SerializedValue<>(new ExecutionConfig()),
"Test Task", 0, 1, 0,
new Configuration(), new Configuration(),
CheckpointsInOrderInvokable.class.getName(),
Collections.<ResultPartitionDeploymentDescriptor>emptyList(),
Collections.<InputGateDeploymentDescriptor>emptyList(),
Collections.<BlobKey>emptyList(),
Collections.<URL>emptyList(),
0);
ActorGateway taskManagerGateway = DummyActorGateway.INSTANCE;
return new Task(tdd,
mock(MemoryManager.class),
mock(IOManager.class),
networkEnvironment,
mock(BroadcastVariableManager.class),
taskManagerGateway,
DummyActorGateway.INSTANCE,
new FiniteDuration(60, TimeUnit.SECONDS),
libCache,
mock(FileCache.class),
new TaskManagerRuntimeInfo("localhost", new Configuration(), System.getProperty("java.io.tmpdir")),
mock(TaskMetricGroup.class));
}
public static class CheckpointsInOrderInvokable extends AbstractInvokable implements StatefulTask<StateHandle<Serializable>> {
private volatile long lastCheckpointId = 0;
private volatile Exception error;
@Override
public void invoke() throws Exception {
awaitLatch.trigger();
// wait forever (until canceled)
synchronized (this) {
while (error == null && lastCheckpointId < NUM_CALLS) {
wait();
}
}
triggerLatch.trigger();
if (error != null) {
throw error;
}
}
@Override
public void setInitialState(StateHandle<Serializable> stateHandle) throws Exception {}
@Override
public boolean triggerCheckpoint(long checkpointId, long timestamp) {
lastCheckpointId++;
if (checkpointId == lastCheckpointId) {
if (lastCheckpointId == NUM_CALLS) {
triggerLatch.trigger();
}
}
else if (this.error == null) {
this.error = new Exception("calls out of order");
synchronized (this) {
notifyAll();
}
}
return true;
}
@Override
public void notifyCheckpointComplete(long checkpointId) {
if (checkpointId != lastCheckpointId && this.error == null) {
this.error = new Exception("calls out of order");
synchronized (this) {
notifyAll();
}
}
}
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
f3b1ec7abb01428e2e46e248630296ec6b807ac7
|
bf390e6589e240c6ccc325355cfd0c21fbe9d884
|
/2.JavaCore/src/com/javarush/task/task19/task1907/Solution.java
|
46290fd39d21e23704d8542e5493eeba81334c30
|
[] |
no_license
|
vladmeh/jrt
|
84878788fbb1f10aa55d320d205f886d1df9e417
|
0272ded03ac8eced7bf901bdfcc503a4eb6da12a
|
refs/heads/master
| 2020-04-05T11:20:15.441176
| 2019-05-22T22:24:56
| 2019-05-22T22:24:56
| 81,300,849
| 4
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,808
|
java
|
package com.javarush.task.task19.task1907;
/*
Считаем слово
Считать с консоли имя файла.
Файл содержит слова, разделенные знаками препинания.
Вывести в консоль количество слов «world«, которые встречаются в файле.
Закрыть потоки.
Требования:
1. Программа должна считывать имя файла с консоли (используй BufferedReader).
2. BufferedReader для считывания данных с консоли должен быть закрыт.
3. Программа должна считывать содержимое файла (используй FileReader c конструктором String).
4. Поток чтения из файла (FileReader) должен быть закрыт.
5. Программа должна выводить в консоль количество слов "world", которые встречаются в файле.
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String fileName = reader.readLine();
reader.close();
BufferedReader fileReader = new BufferedReader(new FileReader(fileName));
int counter = 0;
while (fileReader.ready()){
String line = fileReader.readLine().replaceAll("[^a-zA-Z]", ",");
String[] aLine = line.split(",");
for (int i = 0; i < aLine.length; i++) {
if (aLine[i].equals("world")) counter++;
}
}
fileReader.close();
System.out.println(counter);
}
}
|
[
"vladmeh@gmail.com"
] |
vladmeh@gmail.com
|
4ed7ae762f7ff8e98d7c1dab9c8617934dbb2b0c
|
6ffae9d9fc04edb1c1d8fe39d2e6f0c01e39e443
|
/EIUM/src/main/java/com/myspring/eium/hm/hm_p0029/controller/HM_P0029Controller.java
|
57bba8b230c1705d3859658eea2fb7ea5e4136e2
|
[] |
no_license
|
rexypark/Spring
|
8b5c3e1bb49164762e3f71d5112b35e19c5bb734
|
dd2a19b280742c1d0e718acb1a75ed7265c0c2c1
|
refs/heads/master
| 2022-12-23T09:59:21.396716
| 2020-02-27T10:13:35
| 2020-02-27T10:13:35
| 239,946,239
| 0
| 0
| null | 2022-12-16T09:43:37
| 2020-02-12T06:52:19
|
Java
|
UTF-8
|
Java
| false
| false
| 2,565
|
java
|
package com.myspring.eium.hm.hm_p0029.controller;
import java.io.IOException;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.http.ResponseEntity;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.myspring.eium.hm.hm_p0029.vo.HM_P0029VO;
public interface HM_P0029Controller {
//첫 모델엔뷰
public ModelAndView searchInit(HttpServletRequest request, HttpServletResponse response) throws Exception;
public ModelAndView searchInit_TN(HttpServletRequest request, HttpServletResponse response) throws Exception;
public ModelAndView searchInit_BN(HttpServletRequest request, HttpServletResponse response) throws Exception;
public ModelAndView searchInit_LI(HttpServletRequest request, HttpServletResponse response) throws Exception;
public ModelAndView searchInit_LA(HttpServletRequest request, HttpServletResponse response) throws Exception;
//사업장 팝업 모델엔뷰
public ModelAndView search_Site(HttpServletRequest request, HttpServletResponse response) throws Exception;
public Map searchList_site(HttpServletRequest request, HttpServletResponse response) throws Exception;
//부서 팝업 모델엔뷰
public ModelAndView search_Dept(HttpServletRequest request, HttpServletResponse response) throws Exception;
//table명으로 popup창 띄우기
public ModelAndView findPopup(HttpServletRequest request, HttpServletResponse response) throws Exception;
//popup 창 띄우기 위한 맵 리스트
public Map searchList2(HttpServletRequest request, HttpServletResponse response) throws Exception;
//조건에 따른 교육 조회
public Map searchList_TN(HttpServletRequest request, HttpServletResponse response) throws Exception;
//조건에 따른 출장 조회
public Map searchList_BN(HttpServletRequest request, HttpServletResponse response) throws Exception;
//조건에 따른 자격/면허 조회
public Map searchList_LI(HttpServletRequest request, HttpServletResponse response) throws Exception;
//조건에 따른 어학시험 조회
public Map searchList_LA(HttpServletRequest request, HttpServletResponse response) throws Exception;
}
|
[
"hotboa3091@naver.com"
] |
hotboa3091@naver.com
|
355c5444d87a307c91607f2464eda52300587137
|
692a7b9325014682d72bd41ad0af2921a86cf12e
|
/iWiFi/src/com/umeng/socialize/net/p.java
|
5ff4093046f6357681e4c399f29f1f460bc1a21a
|
[] |
no_license
|
syanle/WiFi
|
f76fbd9086236f8a005762c1c65001951affefb6
|
d58fb3d9ae4143cbe92f6f893248e7ad788d3856
|
refs/heads/master
| 2021-01-20T18:39:13.181843
| 2015-10-29T12:38:57
| 2015-10-29T12:38:57
| 45,156,955
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,304
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.umeng.socialize.net;
import android.content.Context;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.bean.SocializeEntity;
import com.umeng.socialize.common.SocializeUtils;
import com.umeng.socialize.net.a.b;
import java.util.Map;
// Referenced classes of package com.umeng.socialize.net:
// q
public class p extends b
{
private static final String a = "/share/friends/";
private static final int j = 14;
private SocializeEntity k;
private String l;
private SHARE_MEDIA m;
public p(Context context, SocializeEntity socializeentity, SHARE_MEDIA share_media, String s)
{
super(context, "", com/umeng/socialize/net/q, socializeentity, 14, com.umeng.socialize.net.a.b.b.a);
e = context;
k = socializeentity;
l = s;
m = share_media;
}
protected String a()
{
return (new StringBuilder("/share/friends/")).append(SocializeUtils.getAppkey(e)).append("/").append(l).append("/").toString();
}
protected Map a(Map map)
{
map.put("to", m.toString());
return map;
}
}
|
[
"arehigh@gmail.com"
] |
arehigh@gmail.com
|
18f2be01f2e3e4b8688e21fec954c0bc9494af6a
|
eb4535a0f330623f8bc53c196e1e45a47bd94296
|
/core/src/main/java/io/github/vocabhunter/analysis/core/FileTool.java
|
1d33b6cfc9fdb3a9c2d10c3830377044ce64776f
|
[
"Apache-2.0"
] |
permissive
|
VocabHunter/VocabHunter
|
bae41c43018de92a28c4bc48a9fb68bc090695a4
|
66e624d7712a595981a860ab0f956c9948f14bd0
|
refs/heads/master
| 2023-06-25T23:54:18.689578
| 2023-06-17T16:20:50
| 2023-06-17T16:20:50
| 44,987,877
| 285
| 65
|
Apache-2.0
| 2022-09-25T02:38:31
| 2015-10-26T18:10:40
|
Java
|
UTF-8
|
Java
| false
| false
| 1,933
|
java
|
/*
* Open Source Software published under the Apache Licence, Version 2.0.
*/
package io.github.vocabhunter.analysis.core;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
public final class FileTool {
private static final ObjectMapper MAPPER = new ObjectMapper();
private static final List<String> MINIMAL_JSON = List.of("{}");
private FileTool() {
// Prevent instantiation - all methods are static
}
public static void ensureDirectoryExists(final Path file, final String errorTemplate) {
Path parent = file.getParent();
try {
if (parent != null) {
Files.createDirectories(parent);
}
} catch (final IOException e) {
throw buildError(parent, errorTemplate, e);
}
}
public static void writeMinimalJson(final Path file, final String errorTemplate) {
try {
Files.write(file, MINIMAL_JSON);
} catch (final IOException e) {
throw buildError(file, errorTemplate, e);
}
}
public static void writeAsJson(final Path file, final Object v, final String errorTemplate) {
try {
MAPPER.writeValue(file.toFile(), v);
} catch (final IOException e) {
throw buildError(file, errorTemplate, e);
}
}
public static <T> T readFromJson(final Class<T> beanClass, final Path file, final String errorTemplate) {
try {
return MAPPER.readValue(file.toFile(), beanClass);
} catch (final IOException e) {
throw buildError(file, errorTemplate, e);
}
}
private static VocabHunterException buildError(final Path file, final String errorTemplate, final Throwable e) {
return new VocabHunterException(String.format(errorTemplate, file), e);
}
}
|
[
"AdamCarroll@users.noreply.github.com"
] |
AdamCarroll@users.noreply.github.com
|
4fd686ce7b0681092fc04f628a2e260bd3a486e5
|
6ad215d36c1a1e2e14ec5dc2023cf43227134ab9
|
/src/day44_Recap/PersonObjects.java
|
5d79cfc732df6318d5fcc80cb1feab7b3dd84494
|
[] |
no_license
|
KseniiaMazanko/JavaProgramming_B23
|
839f3504b808bb0510c70f1ac041c0650d566b1d
|
ef3862ba8a40bae90545d1cfe3564ebc822ea4e5
|
refs/heads/master
| 2023-08-16T04:31:36.981801
| 2021-09-30T22:59:19
| 2021-09-30T22:59:19
| 387,605,760
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 483
|
java
|
package day44_Recap;
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import java.time.LocalDate;
public class PersonObjects {
public static void main(String[] args) {
Person person1 = new Person("John", 'M', LocalDate.of(1990, 10,8), "USA", "English");
System.out.println(person1);
person1.setName("Shay");
person1.setGender('F');
System.out.println(person1.getName());
System.out.println(person1);
}
}
|
[
"ksmazanko@gmail.com"
] |
ksmazanko@gmail.com
|
eaf73a287e69103ed1728163cb871c6b46ed4063
|
beda0d105423790292bf7690b8909f4e33e88be1
|
/src/lec15search/PermDfs.java
|
48b5c4adfd968b8f12a0856c4ae731c97f5d7067
|
[] |
no_license
|
wuxianyi/Algorithm_16IS12
|
b820f7489cf36f50c11cd80e455a90cf081da8a8
|
2667cf2995f7664cf6c00587c430e339d19021c7
|
refs/heads/master
| 2020-08-02T21:19:56.010026
| 2019-04-25T15:19:24
| 2019-04-25T15:19:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 632
|
java
|
package lec15search;
import java.util.Arrays;
//深度优先搜索遍历全排列空间
public class PermDfs {
static int n = 5;
static int[] a = new int[n];
static boolean[] vis = new boolean[n];
static void dfs(int k) {
if (k == n) {
System.out.println(Arrays.toString(a));
return;
}
for (int i = 0; i < n; i++) {
if (!vis[i]) {
a[k] = i + 1;
vis[i] = true;
dfs(k + 1);
vis[i] = false;
}
}
}
public static void main(String[] args) {
dfs(0);
}
}
|
[
"zj@webturing.com"
] |
zj@webturing.com
|
38b8ba0825f32711ad44ee8aa3387511854d4baf
|
7e6acb0d23e368a3ca0b813458cf47b7eaf7c10f
|
/Network/src/http/exam01/httpPostClient.java
|
ce805e7283bdd1683a506efc7281e51dbf2e2ab6
|
[] |
no_license
|
KoByungWook/PrivateRepository
|
12493c8bfe8869f7adfe67a6b1f46fd4e1f75bd3
|
2d1d6fbdf1f75941eb206da87631e57b89d09d34
|
refs/heads/master
| 2021-01-20T00:52:01.068782
| 2017-08-09T05:32:14
| 2017-08-09T05:32:14
| 89,203,318
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,948
|
java
|
package http.exam01;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;
public class httpPostClient {
public static void main(String[] args) throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault(); //4.5버전에서 httpClient 만드는 방법
try {
HttpPost httpPost = new HttpPost("http://192.168.3.138:8080/IoTWebProgramming/http/exam01");
List<NameValuePair> params = new ArrayList<>();
params.add(new BasicNameValuePair("thermistor",String.valueOf(25)));
params.add(new BasicNameValuePair("photoresistor",String.valueOf(200)));
HttpEntity reqEntity = new UrlEncodedFormEntity(params, Charset.forName("UTF-8"));
httpPost.setEntity(reqEntity);
CloseableHttpResponse response = httpClient.execute(httpPost); //Get방식으로 보내는 방법, Post 방식은 get을 post로만 바꿔주면됌 // 동기방식
try {
HttpEntity resEntity = response.getEntity();
if (resEntity != null) {
InputStream is = resEntity.getContent();
try {
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String json = "";
while(true) {
String data = br.readLine(); //버퍼를 사용해야 사용할 수 있다.
if(data == null) break;
json += data;
}
JSONObject jsonObject = new JSONObject(json); //얻어온 문자열을 파싱
Double thermistor = jsonObject.getDouble("thermistor");
Double photoresistor = jsonObject.getDouble("photoresistor");
System.out.println("thermistor: " + thermistor);
System.out.println("photoresistor: " + photoresistor);
} catch (Exception e) {
e.printStackTrace();
} finally {
is.close();
}
}
} finally {
response.close();
}
} catch (Exception e) {
e.printStackTrace();
} finally {
httpClient.close();
}
}
}
|
[
"rhquddnr0219@gmail.com"
] |
rhquddnr0219@gmail.com
|
0d04ece6374d52d03373fc5f9a332142d69462c4
|
afe5f6de236088018792f15d848a7974d1fbf43b
|
/src/main/java/me/study/algorithm/hackerrank/hashmaps/counttriplets/Solution.java
|
3b92c8a9391f091b07c88b4882758f4556224d73
|
[] |
no_license
|
jsyang-dev/study-algorithm
|
f3cdb0467ed92d018353692e361801293133fcda
|
777810a2005ef5b12c1ac62ab243d2ff34856f57
|
refs/heads/master
| 2022-04-30T23:09:47.733748
| 2022-03-19T05:49:17
| 2022-03-19T05:49:17
| 231,118,535
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,643
|
java
|
package me.study.algorithm.hackerrank.hashmaps.counttriplets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
class Solution {
public long solution(List<Long> arr, long r) {
long result = 0;
Map<Long, List<Integer>> map = new HashMap<>();
if (r == 1) {
return (long) arr.size() * (long) (arr.size() - 1) * (long) (arr.size() - 2) / 6L;
}
for (int i = 0; i < arr.size(); i++) {
Long value = arr.get(i);
if (value == 1 || value % r == 0) {
List<Integer> valueIndexes = map.get(value);
if (valueIndexes == null) {
valueIndexes = new ArrayList<>();
}
valueIndexes.add(i);
map.put(value, valueIndexes);
}
}
for (Map.Entry<Long, List<Integer>> entry : map.entrySet()) {
List<Integer> value1 = entry.getValue();
List<Integer> value2 = map.get(entry.getKey() * r);
List<Integer> value3 = map.get(entry.getKey() * r * r);
if (value2 != null && value3 != null) {
for (int i = 0; i < value1.size(); i++) {
for (int j = 0; j < value2.size(); j++) {
for (int k = 0; k < value3.size(); k++) {
if (value1.get(i) < value2.get(j) && value2.get(j) < value3.get(k)) {
result++;
}
}
}
}
}
}
return result;
}
}
|
[
"mycat83@gmail.com"
] |
mycat83@gmail.com
|
a5047deb7701067efeb4a6cf4df8c08bffe04626
|
7ab26d4bc788b5d437cb69992ea94b56a4899b6c
|
/jPSICS/src/org/catacomb/numeric/difnet/NetState.java
|
89f114a4afe78508f1c4a567e0053109bd9715bc
|
[] |
no_license
|
MattNolanLab/PSICS
|
d8e777d9a18e332231de244c23431b34c655cfa5
|
68b4f17e9aef2e6c7ca3c23da2a175eeaeb7251f
|
refs/heads/master
| 2021-05-27T02:01:24.747112
| 2014-05-13T16:19:21
| 2014-05-13T16:19:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 905
|
java
|
package org.catacomb.numeric.difnet;
/** any network on which a diffusion eqution can be solved.
* including isolated branched neurons, cell-bath-pipette systems,
* or gap junction networks.
*
* The diffusion calculation is perfrormed by a NetDiffuser operating on a
* DiffusiveNet, and calling the get.. and set.. methods in its nodes
* and links.
*/
public interface NetState {
/** gets the nodes in the network which take part in the diffusion
* process.
*/
StateNode[] getNodes();
/** gets the links in hte netowork which take part in the diffusion
* calculation.
*/
StateLink[] getLinks();
StateNode getNode(int inode);
double getValueAt(int i);
boolean useIntrinsics();
boolean forceFullMatrix();
void setError();
void setOK();
boolean isError();
double getTime();
void setTime(double t);
}
|
[
"robert@textensor.com"
] |
robert@textensor.com
|
db899c3738b76c6d696d1bf22451502cf82c182f
|
46786b383a16fff9c5d57b6b197b905e56a40dba
|
/xcloud/xcloud-common/xcloud-common-msg/src/main/java/org/waddys/xcloud/msg/serviceImpl/utils/MessageSendWorker.java
|
5f2422c4fa82d69066f3100b566d342c23422157
|
[] |
no_license
|
yiguotang/x-cloud
|
feeb9c6288e01a45fca82648153238ed85d4069e
|
2b255249961efb99d48a0557f7d74ce3586918fe
|
refs/heads/master
| 2020-04-05T06:18:30.750373
| 2016-08-03T06:48:35
| 2016-08-03T06:48:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 704
|
java
|
/**
* Created on 2016年4月13日
*/
package org.waddys.xcloud.msg.serviceImpl.utils;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sun.mail.handlers.message_rfc822;
/**
* 功能名: 请填写功能名
* 功能描述: 请简要描述功能的要点
* Copyright: Copyright (c) 2016
* 公司: 曙光云计算技术有限公司
*
* @author yangkun
* @version 2.0.0 sp1
*/
@Service
public class MessageSendWorker {
@Autowired
MessageSend message;
//自动启动发送线程
@PostConstruct
public void startThread(){
new Thread(message).start();
}
}
|
[
"waddy87@gmail.com"
] |
waddy87@gmail.com
|
b0801e5b5bf3c7c9f3df79f94ac2d58d4b5a9483
|
9d6fdd64114db7d91f460453b78f0c07f3f16448
|
/code/PersonPosition/src/com/yf/util/ConvertString.java
|
cf60ec9d7e544e0e2d743846b1984671e1a9a71f
|
[] |
no_license
|
l1152695512/pifii
|
d9664ec168827cfb2621d5ae297a9e5ef78771eb
|
c3f9cd8e1a3670ba1800fe11b07f6cbd42a35def
|
refs/heads/master
| 2020-12-24T15:58:14.602754
| 2015-07-07T10:33:30
| 2015-07-07T10:33:30
| 34,566,906
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,121
|
java
|
package com.yf.util;
/**
*
* Description: <br/>
* Copyright(C),2010-2013,James.zhou <br/>
* This program is protected by copyright laws. <br/>
* Program Name:json字符串数据替换和截取 <br/>
* Date:2010-8-4
*
* @author James.zhou james8172@foxmail.com
* @version 1.0
*/
public class ConvertString {
// public static void main(String[] args) {
// String
// auth="modId:1;funId:1,2,3;modId:1,2;funId:1,2,5,6;modId:1,2,5;funId:1,5,6;";
// String auth2="modId:27;funId:2,3;";
// ConvertString convertString=new ConvertString();
// Debug.println(convertString.cutString("modId","funId",";",auth,
// "1"));
// Debug.println(convertString.invertString("modId","funId", ";", auth,
// "1,2,5","1,2,3,4,5"));
// Debug.println(convertString.hasString(auth,"modId:1wqe"));
// Debug.println(convertString.invertString("modId","funId", ";",
// auth2, "27","1,2,3,4,5"));
// }
/**
*
* @param Str1
* //原始字符串
* @param Str2
* //包含的字符串
* @return
*/
public static boolean hasString(String Str1, String Str2) {
int from = Str1.indexOf(Str2);
if (from == -1) {
return false;
} else
return true;
}
/**
* @param Str1
* 字符字段1
* @param Str2
* 字符字段2
* @param Str3
* 截取符标识
* @param Str4
* 原始的字符串
* @param Str5
* 需要截取的字符串值
*
*/
public static String cutString(String Str1, String Str2, String Str3,
String Str4, String Str5) {
int num = 0;
int num2 = 0;
int num3 = 0;
String str_temp;
String str_temp2;
String str_temp3;
String trueTre = Str1 + ":" + Str5;
num = Str4.indexOf(trueTre);
Debug.println(num);
Debug.println(Str4);
if (num == -1)
return "";
str_temp = Str4.substring(num, Str4.length());
num2 = str_temp.indexOf(Str3) + 1;
str_temp2 = str_temp.substring(num2, str_temp.length());
Debug.println("2" + str_temp2);
num3 = str_temp2.indexOf(Str3) + 1;
str_temp3 = str_temp2.substring(0, num3);
Debug.println(str_temp3);
String str_temp4 = str_temp3.substring(Str2.length() + 1, str_temp3
.length() - 1);
return str_temp4;
}
/**
*
* @param Str1
* 字符字段1
* @param Str2
* 字符字段2
* @param Str3
* 截取符标识
* @param Str4
* 原始的字符串
* @param Str4
* 需要截取的字符串值
* @param Str4
* 需要替换的字符串值
* @return
*/
// Debug.println(authTest.conventStringV("modId", ";", auth,
// "1","1,2,3,4,5"));
public static String invertString(String Str1, String Str2, String Str3,
String Str4, String Str5, String Str6) {
int num = 0;
int num2 = 0;
int num3 = 0;
String str_temp;
String str_temp2;
String str_temp3;
String trueTre = Str1 + ":" + Str5;
num = Str4.indexOf(trueTre);
Debug.println(trueTre);
String str_temp0 = Str4.substring(0, num);
str_temp = Str4.substring(num, Str4.length());
num2 = str_temp.indexOf(Str3) + 1;
str_temp2 = str_temp.substring(num2, str_temp.length());
num3 = str_temp2.indexOf(Str3) + 1;
Debug.println(str_temp2);
num3 = str_temp2.indexOf(Str3) + 1;
str_temp3 = str_temp2.substring(num3, str_temp2.length());
Debug.println(str_temp3);
StringBuffer buf = new StringBuffer();
buf.append(str_temp0);
buf.append(trueTre);
buf.append(Str3);
buf.append(Str2);
buf.append(":");
buf.append(Str6);
buf.append(Str3);
buf.append(str_temp3);
return buf.toString();
}
/**
* 将字符串转换为数字型数组
*
* @param s
* 原始字符串
* @param tag
* 标识符
* @return Integer数组
*/
public static Integer[] stringToIntegers(String s, String tag) {
String[] ss = s.split(tag);
Integer[] ints = new Integer[ss.length];
for (int i = 0; i < ss.length; i++) {
ints[i] = Integer.parseInt(ss[i]);
}
return ints;
}
}
|
[
"1152695512@qq.com"
] |
1152695512@qq.com
|
c8fad4e8a4fe4aa58bf5f5d1290fe5d80f0cf6fc
|
6e7a516aee7328b10eb64a2ade1688985fa1a0b6
|
/com.io7m.jtensors.core/src/main/java/com/io7m/jtensors/core/parameterized/matrices/PMatrixReadable3x3FType.java
|
ed3da2220f98c16e1f1db8e4fe5c45839839a4e9
|
[
"ISC"
] |
permissive
|
herike/jtensors
|
aebd3f1ff9bacd70e8b70018aed24082f6fd2a9c
|
c8d8fd96a287f1323178e59ca1a6c6772de8fd01
|
refs/heads/master
| 2021-06-19T07:55:13.102564
| 2017-06-27T21:22:15
| 2017-06-27T21:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,302
|
java
|
/*
* Copyright © 2017 <code@io7m.com> http://io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package com.io7m.jtensors.core.parameterized.matrices;
import com.io7m.jtensors.core.unparameterized.matrices.MatrixReadable3x3FType;
/**
* The type of 3x3 {@code float}-typed matrices.
*
* @param <A> A phantom type parameter (possibly representing a source
* coordinate system)
* @param <B> A phantom type parameter (possibly representing a target
* coordinate system)
*/
public interface PMatrixReadable3x3FType<A, B> extends MatrixReadable3x3FType
{
// No extra methods
}
|
[
"code@io7m.com"
] |
code@io7m.com
|
206ea023b1a2035f9e18df4d81b99030964f5d2f
|
c2869cabc9cce1ba3fdd99f9f0bb5ca2716676dd
|
/app/src/main/java/com/example/gofp/udemy/sol/structural/bridge/classes/Car.java
|
7ffaea4eb1dabedd6bff4da053a373f3e20ed583
|
[] |
no_license
|
v777779/gof_design_patterns
|
ecf2fbc04fa57bc295ae951b338e0644d6ecde63
|
2e67eaec4753450456ebace52287892829c4cde7
|
refs/heads/master
| 2022-11-13T14:52:48.812791
| 2020-06-29T11:56:34
| 2020-06-29T11:56:34
| 273,941,047
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 283
|
java
|
package com.example.gofp.udemy.sol.structural.bridge.classes;
public class Car extends Vehicle {
public Car(Model model) {
super(model);
}
@Override
public void drive() {
model.drive("drive car");
}
}
|
[
"vadim.v.voronov@gmail.com"
] |
vadim.v.voronov@gmail.com
|
8102c4a0d6b8ac2c3323e76aea9aa30af7f56de9
|
5f2623cd1536f1966210d119bcc2e0a41cbd6fc6
|
/src/main/java/com/papi/ohadasysnorm/config/LoggingConfiguration.java
|
c68f6fc4074bdfd3e8fd1e0977ac089580d72550
|
[] |
no_license
|
Mattisso/jhipster-Ohada-AccSys
|
7b090adb0e729ae76b1226bd06ae3e31a3c158f0
|
45833d8afc2cedd9f21db6487223f8612f409585
|
refs/heads/master
| 2022-08-03T15:23:18.895359
| 2020-02-17T01:48:31
| 2020-02-17T01:48:31
| 239,386,924
| 0
| 0
| null | 2022-07-07T16:27:14
| 2020-02-09T22:54:16
|
Java
|
UTF-8
|
Java
| false
| false
| 2,040
|
java
|
package com.papi.ohadasysnorm.config;
import ch.qos.logback.classic.LoggerContext;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.github.jhipster.config.JHipsterProperties;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import java.util.HashMap;
import java.util.Map;
import static io.github.jhipster.config.logging.LoggingUtils.*;
/*
* Configures the console and Logstash log appenders from the app properties
*/
@Configuration
public class LoggingConfiguration {
public LoggingConfiguration(@Value("${spring.application.name}") String appName,
@Value("${server.port}") String serverPort,
JHipsterProperties jHipsterProperties,
ObjectMapper mapper) throws JsonProcessingException {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
Map<String, String> map = new HashMap<>();
map.put("app_name", appName);
map.put("app_port", serverPort);
String customFields = mapper.writeValueAsString(map);
JHipsterProperties.Logging loggingProperties = jHipsterProperties.getLogging();
JHipsterProperties.Logging.Logstash logstashProperties = loggingProperties.getLogstash();
if (loggingProperties.isUseJsonFormat()) {
addJsonConsoleAppender(context, customFields);
}
if (logstashProperties.isEnabled()) {
addLogstashTcpSocketAppender(context, customFields, logstashProperties);
}
if (loggingProperties.isUseJsonFormat() || logstashProperties.isEnabled()) {
addContextListener(context, customFields, loggingProperties);
}
if (jHipsterProperties.getMetrics().getLogs().isEnabled()) {
setMetricsMarkerLogbackFilter(context, loggingProperties.isUseJsonFormat());
}
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
52747cff140cfe1071616735041f2ff4cb172c84
|
a8a7cc6bae2a202941e504aea4356e2a959e5e95
|
/jenkow-activiti/modules/activiti-engine/src/main/java/org/activiti/engine/impl/cmd/CreateMembershipCmd.java
|
2a74938ed7e5ba5454d01ef6076e214e6f4c3d98
|
[
"Apache-2.0"
] |
permissive
|
jenkinsci/jenkow-plugin
|
aed5d5db786ad260c16cebecf5c6bbbcbf498be5
|
228748890476b2f17f80b618c8d474a4acf2af8b
|
refs/heads/master
| 2023-08-19T23:43:15.544100
| 2013-05-14T00:49:56
| 2013-05-14T00:49:56
| 4,395,961
| 2
| 4
| null | 2022-12-20T22:37:41
| 2012-05-21T16:58:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,454
|
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 org.activiti.engine.impl.cmd;
import java.io.Serializable;
import org.activiti.engine.ActivitiException;
import org.activiti.engine.impl.interceptor.Command;
import org.activiti.engine.impl.interceptor.CommandContext;
/**
* @author Tom Baeyens
*/
public class CreateMembershipCmd implements Command<Object>, Serializable {
private static final long serialVersionUID = 1L;
String userId;
String groupId;
public CreateMembershipCmd(String userId, String groupId) {
this.userId = userId;
this.groupId = groupId;
}
public Object execute(CommandContext commandContext) {
if(userId == null) {
throw new ActivitiException("userId is null");
}
if(groupId == null) {
throw new ActivitiException("groupId is null");
}
commandContext
.getMembershipManager()
.createMembership(userId, groupId);
return null;
}
}
|
[
"m2spring@springdot.org"
] |
m2spring@springdot.org
|
5e06e3e6c07205cfaeab2bec34c5e4b49f0d0a98
|
05e5bee54209901d233f4bfa425eb6702970d6ab
|
/net/minecraft/server/v1_7_R4/CommandPardon.java
|
8d3ceacbc39d427bc7661f48d18765798ce98617
|
[] |
no_license
|
TheShermanTanker/PaperSpigot-1.7.10
|
23f51ff301e7eb05ef6a3d6999dd2c62175c270f
|
ea9d33bcd075e00db27b7f26450f9dc8e6d18262
|
refs/heads/master
| 2022-12-24T10:32:09.048106
| 2020-09-25T15:43:22
| 2020-09-25T15:43:22
| 298,614,646
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,392
|
java
|
/* */ package net.minecraft.server.v1_7_R4;
/* */
/* */ import java.util.List;
/* */ import net.minecraft.util.com.mojang.authlib.GameProfile;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class CommandPardon
/* */ extends CommandAbstract
/* */ {
/* */ public String getCommand() {
/* 15 */ return "pardon";
/* */ }
/* */
/* */
/* */ public int a() {
/* 20 */ return 3;
/* */ }
/* */
/* */
/* */
/* */ public String c(ICommandListener paramICommandListener) {
/* 26 */ return "commands.unban.usage";
/* */ }
/* */
/* */
/* */ public boolean canUse(ICommandListener paramICommandListener) {
/* 31 */ return (MinecraftServer.getServer().getPlayerList().getProfileBans().isEnabled() && super.canUse(paramICommandListener));
/* */ }
/* */
/* */
/* */ public void execute(ICommandListener paramICommandListener, String[] paramArrayOfString) {
/* 36 */ if (paramArrayOfString.length == 1 && paramArrayOfString[0].length() > 0) {
/* 37 */ MinecraftServer minecraftServer = MinecraftServer.getServer();
/* 38 */ GameProfile gameProfile = minecraftServer.getPlayerList().getProfileBans().a(paramArrayOfString[0]);
/* 39 */ if (gameProfile == null) {
/* 40 */ throw new CommandException("commands.unban.failed", new Object[] { paramArrayOfString[0] });
/* */ }
/* */
/* 43 */ minecraftServer.getPlayerList().getProfileBans().remove(gameProfile);
/* 44 */ a(paramICommandListener, this, "commands.unban.success", new Object[] { paramArrayOfString[0] });
/* */
/* */ return;
/* */ }
/* 48 */ throw new ExceptionUsage("commands.unban.usage", new Object[0]);
/* */ }
/* */
/* */
/* */ public List tabComplete(ICommandListener paramICommandListener, String[] paramArrayOfString) {
/* 53 */ if (paramArrayOfString.length == 1) {
/* 54 */ return a(paramArrayOfString, MinecraftServer.getServer().getPlayerList().getProfileBans().getEntries());
/* */ }
/* */
/* 57 */ return null;
/* */ }
/* */ }
/* Location: D:\Paper-1.7.10\PaperSpigot-1.7.10-R0.1-SNAPSHOT-latest.jar!\net\minecraft\server\v1_7_R4\CommandPardon.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"tanksherman27@gmail.com"
] |
tanksherman27@gmail.com
|
20dc7f3c6ba65055a4023324e6a2e681333971dd
|
482a0fe6424b42de7f2768f7b64c4fd36dd24054
|
/apps/gmail/gmail_uncompressed/app/src/com/google/android/gms/appdatasearch/H.java
|
3fed240235ed3151d9fcf66d22bac67fea639723
|
[] |
no_license
|
dan7800/SoftwareTestingGradProjectTeamB
|
b96d10c6b42e2e554e51fc1d7fd7a7189afe79d6
|
0ad2d46d692c77bdc75f8a82162749e2e652c7ab
|
refs/heads/master
| 2021-01-22T09:27:25.378594
| 2015-05-15T23:59:13
| 2015-05-15T23:59:13
| 30,304,655
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,238
|
java
|
package com.google.android.gms.appdatasearch;
import java.util.*;
public final class h
{
private String bvP;
private boolean bvQ;
private int bvR;
private boolean bvS;
private String bvT;
private final List<Feature> bvU;
private BitSet bvV;
private String bvW;
private final String mName;
public h(final String mName) {
this.mName = mName;
this.bvR = 1;
this.bvU = new ArrayList<Feature>();
}
public final h Jo() {
this.bvQ = true;
return this;
}
public final RegisterSectionInfo Jp() {
int n = 0;
final BitSet bvV = this.bvV;
int[] array = null;
if (bvV != null) {
array = new int[this.bvV.cardinality()];
int n2;
for (int i = this.bvV.nextSetBit(0); i >= 0; i = this.bvV.nextSetBit(i + 1), n = n2) {
n2 = n + 1;
array[n] = i;
}
}
return new RegisterSectionInfo(this.mName, this.bvP, this.bvQ, this.bvR, this.bvS, this.bvT, this.bvU.toArray(new Feature[this.bvU.size()]), array, this.bvW);
}
public final h fF(final String bvP) {
this.bvP = bvP;
return this;
}
}
|
[
"mjthornton0112@gmail.com"
] |
mjthornton0112@gmail.com
|
3c91039f19da3b0646d58eb05da1e020b3ba2e0f
|
03744fea71630eaa999997a0b3ebf99b7968e990
|
/src/main/java/com/hnu/mes/exception/MesException.java
|
a505dd501c3283eaf7a2170cf8ac3524004e24c1
|
[] |
no_license
|
zhouweixin/mes
|
9012e0c7373a1235aaea128f96ea93971be3f255
|
63afb2925cf5b2b92c3e97c34f6eeb42b0152d7a
|
refs/heads/master
| 2020-03-19T23:47:18.205625
| 2018-08-22T11:36:55
| 2018-08-22T11:36:55
| 137,018,742
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 467
|
java
|
package com.hnu.mes.exception;
/**
* MesException mes异常
*
* @author zhouweixin
*
*/
public class MesException extends RuntimeException {
private static final long serialVersionUID = 1L;
private Integer code;
public MesException(EnumException exceptionsEnum) {
super(exceptionsEnum.getMessage());
this.code = exceptionsEnum.getCode();
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
}
|
[
"1216840597@qq.com"
] |
1216840597@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.