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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
36766ae460e10d60cfcf3ff344bbdb7235a4921b
|
1633a34dd48d21e1228fa8f09571df9fe4f1520a
|
/NetWorking/Remote Desktop Control System/src/Recieving.java
|
b1d678f35643343056c56e4bbb2d205325b77926
|
[] |
no_license
|
raja21068/Java-Toutiral-For-Begginers
|
a0df6b39664e92294ca4a545fe019d7def82e2f6
|
6a1bc50736a0f51b7b8891aacb53689247031a23
|
refs/heads/master
| 2021-05-07T05:16:16.412804
| 2017-11-20T18:09:46
| 2017-11-20T18:09:46
| 111,445,646
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,129
|
java
|
import java.io.DataInputStream;
import java.io.FileOutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import javax.swing.ImageIcon;
public class Recieving extends javax.swing.JFrame {
public Recieving() {
initComponents();
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
picScrollPane = new javax.swing.JScrollPane();
pictureLabel = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setMinimumSize(new java.awt.Dimension(500, 430));
getContentPane().setLayout(null);
picScrollPane.setViewportView(pictureLabel);
getContentPane().add(picScrollPane);
picScrollPane.setBounds(10, 17, 470, 340);
pack();
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
public static void main(String args[])throws Exception {
Recieving frame = new Recieving();
frame.setVisible(true);
ServerSocket server =new ServerSocket(9090);
Socket socket = server.accept();
DataInputStream in = new DataInputStream(socket.getInputStream());
int size = Integer.parseInt(in.readUTF());
int packetSize = Integer.parseInt(in.readUTF());
byte[] data = new byte[packetSize];
FileOutputStream out = new FileOutputStream("E:/screen.jpg");
for(int i=1;i<=size/packetSize; i++){
in.read(data, 0, data.length);
out.write(data, 0, data.length);
}
in.read(data, 0, size%packetSize);
out.write(data, 0, size%packetSize);
out.close();
frame.pictureLabel.removeAll();
frame.pictureLabel.setIcon(new ImageIcon("E:/screen.jpg"));
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JScrollPane picScrollPane;
private javax.swing.JLabel pictureLabel;
// End of variables declaration//GEN-END:variables
}
|
[
"rajakumarlohano@gmail.com"
] |
rajakumarlohano@gmail.com
|
9ca51c79de77cc60d311b327ec6147033ca50917
|
410d64ce3d2eb76176e63ab9f0f2ad5389956d85
|
/src/test/java/com/foodbliss/web/rest/UserJWTControllerIT.java
|
5f3950ab646da193bedfdba8da38aa9c924697ed
|
[] |
no_license
|
itachiunited/food-bliss-v3
|
b31db6b63a1453523d9a25f8ba81075d36106e87
|
cca1eaaee889fc4b62e2907748797aa8677ed7b0
|
refs/heads/master
| 2021-01-01T08:54:28.192129
| 2020-02-09T18:38:37
| 2020-02-09T18:38:37
| 239,206,320
| 0
| 0
| null | 2020-07-19T13:01:42
| 2020-02-08T21:23:22
|
Java
|
UTF-8
|
Java
| false
| false
| 4,657
|
java
|
package com.foodbliss.web.rest;
import com.foodbliss.FoodBlissV3App;
import com.foodbliss.domain.User;
import com.foodbliss.repository.UserRepository;
import com.foodbliss.security.jwt.TokenProvider;
import com.foodbliss.web.rest.errors.ExceptionTranslator;
import com.foodbliss.web.rest.vm.LoginVM;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.Matchers.emptyString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
/**
* Integration tests for the {@link UserJWTController} REST controller.
*/
@SpringBootTest(classes = FoodBlissV3App.class)
public class UserJWTControllerIT {
@Autowired
private TokenProvider tokenProvider;
@Autowired
private AuthenticationManagerBuilder authenticationManager;
@Autowired
private UserRepository userRepository;
@Autowired
private PasswordEncoder passwordEncoder;
@Autowired
private ExceptionTranslator exceptionTranslator;
private MockMvc mockMvc;
@BeforeEach
public void setup() {
UserJWTController userJWTController = new UserJWTController(tokenProvider, authenticationManager);
this.mockMvc = MockMvcBuilders.standaloneSetup(userJWTController)
.setControllerAdvice(exceptionTranslator)
.build();
}
@Test
public void testAuthorize() throws Exception {
User user = new User();
user.setLogin("user-jwt-controller");
user.setEmail("user-jwt-controller@example.com");
user.setActivated(true);
user.setPassword(passwordEncoder.encode("test"));
userRepository.save(user);
LoginVM login = new LoginVM();
login.setUsername("user-jwt-controller");
login.setPassword("test");
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id_token").isString())
.andExpect(jsonPath("$.id_token").isNotEmpty())
.andExpect(header().string("Authorization", not(nullValue())))
.andExpect(header().string("Authorization", not(is(emptyString()))));
}
@Test
public void testAuthorizeWithRememberMe() throws Exception {
User user = new User();
user.setLogin("user-jwt-controller-remember-me");
user.setEmail("user-jwt-controller-remember-me@example.com");
user.setActivated(true);
user.setPassword(passwordEncoder.encode("test"));
userRepository.save(user);
LoginVM login = new LoginVM();
login.setUsername("user-jwt-controller-remember-me");
login.setPassword("test");
login.setRememberMe(true);
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id_token").isString())
.andExpect(jsonPath("$.id_token").isNotEmpty())
.andExpect(header().string("Authorization", not(nullValue())))
.andExpect(header().string("Authorization", not(is(emptyString()))));
}
@Test
public void testAuthorizeFails() throws Exception {
LoginVM login = new LoginVM();
login.setUsername("wrong-user");
login.setPassword("wrong password");
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isUnauthorized())
.andExpect(jsonPath("$.id_token").doesNotExist())
.andExpect(header().doesNotExist("Authorization"));
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
69cdaa4b367d3f0afdfa508113bed2d47ffdb80f
|
7e6804c4e1deb99daedee389388bf196f07ad8cb
|
/sa2016-tools/src/main/java/com/beijunyi/sa2016/tools/utils/BitConverter.java
|
2d75bf3e2bd73fc490d9f6e58a7fb452ce9543fe
|
[] |
no_license
|
ljianxiong/sa2016
|
c905875562d5a453fc47d3791b1aa141a047e8de
|
1fdf40e3eeeed92b359c5e889c68f0c1ce2d4a91
|
refs/heads/master
| 2023-03-16T17:26:36.787383
| 2019-08-28T23:27:25
| 2019-08-28T23:27:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,280
|
java
|
package com.beijunyi.sa2016.tools.utils;
import javax.annotation.Nonnull;
public class BitConverter {
public static long uint32be(@Nonnull byte[] bs) {
return (long) (bs[0] & 0xFF) << 24 | (bs[1] & 0xFF) << 16 | (bs[2] & 0xFF) << 8 | bs[3] & 0xFF;
}
public static long uint32le(@Nonnull byte[] bs) {
return (long) (bs[3] & 0xFF) << 24 | (bs[2] & 0xFF) << 16 | (bs[1] & 0xFF) << 8 | bs[0] & 0xFF;
}
public static int uint16be(@Nonnull byte[] bs) {
return (bs[0] & 0xFF) << 8 | bs[1] & 0xFF;
}
public static int uint16le(@Nonnull byte[] bs) {
return (bs[1] & 0xFF) << 8 | bs[0] & 0xFF;
}
public static short uint8(byte b) {
return (short) (b & 0xFF);
}
public static int int32be(@Nonnull byte[] bs) {
return (bs[0] & 0xFF) << 24 | (bs[1] & 0xFF) << 16 | (bs[2] & 0xFF) << 8 | bs[3] & 0xFF;
}
public static int int32le(@Nonnull byte[] bs) {
return (bs[3] & 0xFF) << 24 | (bs[2] & 0xFF) << 16 | (bs[1] & 0xFF) << 8 | bs[0] & 0xFF;
}
public static short int16be(@Nonnull byte[] bs) {
return (short) ((bs[0] & 0xFF) << 8 | bs[1] & 0xFF);
}
public static short int16le(@Nonnull byte[] bs) {
return (short) ((bs[1] & 0xFF) << 8 | bs[0] & 0xFF);
}
public static byte int8(byte b) {
return b;
}
}
|
[
"beijunyi@gmail.com"
] |
beijunyi@gmail.com
|
592d1c984189aa99a0ad50c0c825f38232a438ac
|
c629f2968b64721a7671bc17035d1d82b3769403
|
/src/main/java/act/xio/undertow/ActBlockingExchange.java
|
5e74502c2bedbd65ad4ba0d410672a517c52a5f9
|
[
"Apache-2.0"
] |
permissive
|
zhoujian1210/actframework
|
65038ef7c18df5e1e420656c2c52884c86bff4c3
|
cace5472e6716bdbb827e6b18b54d67423faf54f
|
refs/heads/master
| 2021-05-03T04:28:51.365370
| 2018-01-30T10:15:48
| 2018-01-30T10:15:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,222
|
java
|
package act.xio.undertow;
/*-
* #%L
* ACT Framework
* %%
* Copyright (C) 2014 - 2017 ActFramework
* %%
* 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.
* #L%
*/
import act.ActResponse;
import act.app.ActionContext;
import io.undertow.io.*;
import io.undertow.server.BlockingHttpExchange;
import io.undertow.server.HttpServerExchange;
import io.undertow.servlet.core.BlockingWriterSenderImpl;
import io.undertow.util.AttachmentKey;
import org.osgl.http.H;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class ActBlockingExchange implements BlockingHttpExchange {
public static final AttachmentKey<ActionContext> KEY_APP_CTX = AttachmentKey.create(ActionContext.class);
private InputStream inputStream;
private OutputStream outputStream;
private final HttpServerExchange exchange;
public ActBlockingExchange(HttpServerExchange exchange, ActionContext context) {
this.exchange = exchange;
exchange.putAttachment(KEY_APP_CTX, context);
}
@Override
public InputStream getInputStream() {
if (inputStream == null) {
inputStream = new UndertowInputStream(exchange);
}
return inputStream;
}
@Override
public OutputStream getOutputStream() {
if (outputStream == null) {
outputStream = new UndertowOutputStream(exchange);
}
return outputStream;
}
@Override
public Sender getSender() {
H.Response response = ctx().resp();
if (response.writerCreated()) {
return new BlockingWriterSenderImpl(exchange, response.printWriter(), response.characterEncoding());
} else {
return new BlockingSenderImpl(exchange, response.outputStream());
}
}
@Override
public Receiver getReceiver() {
return new BlockingReceiverImpl(this.exchange, this.getInputStream());
}
@Override
public void close() throws IOException {
ActionContext ctx = ctx();
if (!exchange.isComplete()) {
try {
UndertowRequest req = (UndertowRequest) ctx.req();
req.closeAndDrainRequest();
} finally {
ActResponse resp = ctx.resp();
resp.closeStreamAndWriter();
}
} else {
try {
UndertowRequest req = (UndertowRequest) ctx.req();
req.freeResources();
} finally {
UndertowResponse resp = (UndertowResponse) ctx.resp();
resp.freeResources();
}
}
}
private ActionContext ctx() {
return exchange.getAttachment(KEY_APP_CTX);
}
}
|
[
"greenlaw110@gmail.com"
] |
greenlaw110@gmail.com
|
091565626dfdba4b31f692c407598135d0b837e2
|
5b6563a505f0aea15f3ba47b37bd977632a3007b
|
/data/data-transaction/jpa-transaction/src/test/java/cn/zxf/jpa_transaction/test/user/TestUserService.java
|
f5816c2fe5bba5523585c4c40a5526f44cd7a12b
|
[] |
no_license
|
zengxf/spring-demo
|
0c62ad20e4a743fccadf016042184acb64cb52a3
|
3393fbd37815cb612ce929821f8f3e4a78c5ea9f
|
refs/heads/master
| 2023-08-19T03:30:22.483806
| 2023-08-15T07:10:58
| 2023-08-15T07:10:58
| 180,314,311
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,708
|
java
|
package cn.zxf.jpa_transaction.test.user;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith( SpringRunner.class )
@SpringBootTest( webEnvironment = SpringBootTest.WebEnvironment.NONE )
public class TestUserService {
@Autowired
private UserService service;
@Test
public void test_createNonTransaction() {
service.createNonTransaction( "zxf-02" );
}
@Test
public void test_createByRuntimeException() {
try {
service.createByRuntimeException( "zxf-bb-1" );
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Test
public void test_createByException() {
try {
service.createByException( "zxf-bb-0021" );
} catch ( Exception e ) {
e.printStackTrace();
}
}
// 不能重复提交
@Test
public void test_createTransactionalRequired() {
service.createTransactionalRequired( "zxf-12", "err" );
}
// 正常
@Test
public void test_createTransactionalSupports() {
service.createTransactionalSupports( "zxf-22", "err" );
}
// 错误;改成 Required 则不能重复提交
@Test
public void test_createTransactionalMandatory() {
service.createTransactionalMandatory( "zxf-32", "err" );
}
// 外部正常,内部错误
@Test
public void test_createTransactionalRequiresNew() {
service.createTransactionalRequiresNew( "zxf-42", "err" );
}
// 内部正常,外部错误
@Test
public void test_createTransactionalRequiresNewError4Ok() {
service.createTransactionalRequiresNew( "zxf-42", "err", "ok" );
}
// 正常
@Test
public void test_createTransactionalNotSupported() {
service.createTransactionalNotSupported( "zxf-52", "err" );
}
// 正常
@Test
public void test_createTransactionalNever() {
service.createTransactionalNever( "zxf-62", "err" );
}
// 外部正常,内部错误-不支持
@Test
public void test_createTransactionalNested() {
service.createTransactionalNested( "zxf-72", "err" );
}
// 外部正常,内部错误-不支持
@Test
public void test_createTransactionalNestedOK() {
service.createTransactionalNested( "zxf-72", "ok" );
}
// 外部错误,内部错误-不支持
@Test
public void test_createTransactionalNestedError4Ok() {
service.createTransactionalNested( "zxf-72", "err", "ok" );
}
}
|
[
"fl_zxf@163.com"
] |
fl_zxf@163.com
|
811db2a37b31f8edc6aa2c19b3edf23c8ec8cfae
|
fd19b337fd7cf81f48eff5c4ae9ee6c4a891fbcb
|
/src/main/java/com/rex/chapter3/T3_2_6_JoinMoreTest/Run.java
|
a7db982c41f2561a938b4ed4841900a3d16c1b08
|
[] |
no_license
|
langkemaoxin/MultipleDemo
|
fd6b24042a68869ad393443717e3c7478279fdb2
|
4227fc790e9e03398e5f326dee1f51800b90f73c
|
refs/heads/master
| 2021-01-13T19:51:46.414126
| 2020-04-18T16:25:05
| 2020-04-18T16:25:05
| 242,476,916
| 0
| 0
| null | 2020-10-13T19:46:29
| 2020-02-23T07:45:47
|
Java
|
UTF-8
|
Java
| false
| false
| 2,422
|
java
|
package com.rex.chapter3.T3_2_6_JoinMoreTest;
/**
* @ClassName Run
* @Description TODO
* @Author GY.C
* @Date 2020/3/4 22:42
* @Version 1.0
*
*
* 第一种方式:
* 1) b.join(2000)方法抢到B锁,然后将B锁进行释放
* 2) ThreadA抢到锁,打印ThreadA Begin 并且Sleep(5000);
* 3) ThreadA打印 ThreadA End,并释放锁
* 4) 此时Join(2000) 和 ThreadB争抢锁,而join(2000)再次抢到锁,发现时间已过,释放锁后打印Main end;
* 5) ThreaB 抢到锁打印 ThreadB Begin
* 6) Threab 打印 ThreadB end
*
*
* 第二种方式:
* 1) b.join(2000)方法抢到B锁,然后将B锁进行释放
* 2) ThreadA抢到锁,打印ThreadA Begin 并且Sleep(5000);
* 3) ThreadA打印 ThreadA End,并释放锁
* 4) 此时Join(2000) 和 ThreadB争抢锁,ThreadB抢到了锁
* 5) ThreaB 抢到锁打印 ThreadB Begin
* 6) Threab 打印 ThreadB end
* 7) 打印Main end
*/
public class Run {
public static void main(String[] args) throws InterruptedException {
ThreadB threadB = new ThreadB();
ThreadA threadA = new ThreadA(threadB);
threadA.start();
threadB.start();
threadB.join(2000);
System.out.println("Main");
}
}
class RunFirst {
public static void main(String[] args) throws InterruptedException {
ThreadB threadB = new ThreadB();
ThreadA threadA = new ThreadA(threadB);
threadA.start();
threadB.start();
System.out.println("Main");
}
}
class ThreadA extends Thread {
private ThreadB threadB;
ThreadA(ThreadB threadB) {
this.threadB = threadB;
}
@Override
public void run() {
try {
synchronized (threadB) {
System.out.println("A run bgin timer=" + System.currentTimeMillis());
Thread.sleep(5000);
System.out.println("A run end timer=" + System.currentTimeMillis());
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
class ThreadB extends Thread {
@Override
synchronized public void run() {
try {
System.out.println("B run bgin timer=" + System.currentTimeMillis());
Thread.sleep(5000);
System.out.println("B run end timer=" + System.currentTimeMillis());
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
|
[
"2363613998@qq.com"
] |
2363613998@qq.com
|
ae60c9c1215ab33ab64a7a931e20d7d43cf2903e
|
c41d43113db4276ccd266192448fd9a03f977b7e
|
/1.JavaSyntax/src/com/javarush/task/task10/task1019/Solution.java
|
4f0c94bdc8044866282d822a5ff135a06fa7df9b
|
[
"MIT"
] |
permissive
|
wldzam/JavaRushTasks
|
b799eceaa8430fba21dfc9fd1ee7591c07d58bb0
|
eb0371e1b363955ec113671816fb36a5ce1f73a0
|
refs/heads/master
| 2020-04-08T17:08:12.477998
| 2018-04-04T04:11:08
| 2018-04-04T04:11:08
| 159,552,468
| 1
| 0
| null | 2018-11-28T19:18:00
| 2018-11-28T19:18:00
| null |
UTF-8
|
Java
| false
| false
| 874
|
java
|
package com.javarush.task.task10.task1019;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
/*
Функциональности маловато!
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
HashMap<String, Integer> map = new HashMap<>();
while (true) {
try {
int id = Integer.parseInt(reader.readLine());
String name = reader.readLine();
if (name.isEmpty()) break;
map.put(name, id);
} catch (NumberFormatException e) {
break;
}
}
for (Map.Entry<String, Integer> s : map.entrySet()) {
System.out.println(s.getValue() + " " + s.getKey());
}
}
}
|
[
"stasiksukora@mail.ru"
] |
stasiksukora@mail.ru
|
f0fd892bdd9dc196bf3fad3c48f6146450d1a748
|
6a1e0b0704359d2e9f61ebf9b689272f06156b41
|
/app/src/main/java/com/faendir/lightning_launcher/multitool/util/provider/DataSource.java
|
fcfedfa61c3e6e84601e25fc2ff0f5fa1515e1de
|
[] |
no_license
|
fossabot/Multitool
|
09ca636cbc0eec98950b70ddadb453b235eeb208
|
14c63b9479f165f48141ea290d7ba3fbb9c21026
|
refs/heads/master
| 2021-08-30T22:52:35.663341
| 2017-12-19T18:15:39
| 2017-12-19T18:15:39
| 114,797,186
| 0
| 0
| null | 2017-12-19T18:15:39
| 2017-12-19T18:15:38
| null |
UTF-8
|
Java
| false
| false
| 168
|
java
|
package com.faendir.lightning_launcher.multitool.util.provider;
/**
* @author F43nd1r
* @since 06.11.2017
*/
public interface DataSource {
String getPath();
}
|
[
"lukas.morawietz@gmail.com"
] |
lukas.morawietz@gmail.com
|
b26f5124a13f4ca9afe7589686870708857a0aee
|
8979fc82ea7b34410b935fbea0151977a0d46439
|
/src/explore/month_challenge/_2020_august/P12PascalTriangleII.java
|
727df1e82afe397ff9d313dbeb8e5244278bb7e6
|
[
"MIT"
] |
permissive
|
YC-S/LeetCode
|
6fa3f4e46c952b3c6bf5462a8ee0c1186ee792bd
|
452bb10e45de53217bca52f8c81b3034316ffc1b
|
refs/heads/master
| 2021-11-06T20:51:31.554936
| 2021-10-31T03:39:38
| 2021-10-31T03:39:38
| 235,529,949
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 683
|
java
|
/*
* Copyright (c) 2020. Yuanchen
*/
package explore.month_challenge._2020_august;
import java.util.ArrayList;
import java.util.List;
/**
* @author shiyuanchen
* @project LeetCode
* @since 2020/08/13
*/
public class P12PascalTriangleII {
public static List<Integer> getRow(int rowIndex) {
List<Integer> res = new ArrayList<>();
res.add(1);
for (int i = 1; i <= rowIndex; i++) {
for (int j = i - 1; j >= 1; j--) {
int tmp = res.get(j - 1) + res.get(j);
res.set(j, tmp);
}
res.add(1);
}
return res;
}
public static void main(String[] args) {
List<Integer> list = getRow(3);
System.out.println(list);
}
}
|
[
"yuanchenshi@gmail.com"
] |
yuanchenshi@gmail.com
|
26d059c8ed011d254a5aacddc29c2c588ef384ee
|
ab52bb58aab8104c26db2a6690ec1986ac37dd62
|
/main6/ling/com/globalsight/ling/lucene/analysis/cjk/CJKAnalyzer.java
|
3f75e89fc9beeede7f7963715e2d35b54dbbe101
|
[] |
no_license
|
tingley/globalsight
|
32ae49ac08c671d9166bd0d6cdaa349d9e6b4438
|
47d95929f4e9939ba8bbbcb5544de357fef9aa8c
|
refs/heads/master
| 2021-01-19T07:23:33.073276
| 2020-10-19T19:42:22
| 2020-10-19T19:42:22
| 14,053,692
| 7
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,533
|
java
|
/**
* Copyright 2009 Welocalize, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.globalsight.ling.lucene.analysis.cjk;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Lucene" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Lucene", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS 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 software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* $Id: CJKAnalyzer.java,v 1.2 2013/09/13 06:22:17 wayne Exp $
*/
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.core.StopFilter;
import org.apache.lucene.analysis.util.CharArraySet;
import com.globalsight.ling.tm2.lucene.LuceneUtil;
import java.io.Reader;
/**
* Filters CJKTokenizer with StopFilter.
*
* @author Che, Dong
*/
public class CJKAnalyzer
extends Analyzer
{
//~ Static fields/initializers ---------------------------------------------
/**
* An array containing some common English words that are not usually
* useful for searching. and some double-byte interpunctions.....
*/
private static String[] stopWords = {
"a", "and", "are", "as", "at", "be",
"but", "by", "for", "if", "in",
"into", "is", "it", "no", "not",
"of", "on", "or", "s", "such", "t",
"that", "the", "their", "then",
"there", "these", "they", "this",
"to", "was", "will", "with", "",
"www"
};
//~ Instance fields --------------------------------------------------------
/**
* stop word list
*/
private CharArraySet stopTable;
//~ Constructors -----------------------------------------------------------
/**
* Builds an analyzer which removes words in STOP_WORDS.
*/
public CJKAnalyzer()
{
stopTable = StopFilter.makeStopSet(LuceneUtil.VERSION, stopWords);
}
/**
* Builds an analyzer which removes words in the provided array.
*
* @param stopWords stop word array
*/
public CJKAnalyzer(String[] stopWords)
{
stopTable = StopFilter.makeStopSet(LuceneUtil.VERSION, stopWords);
}
//~ Methods ----------------------------------------------------------------
/**
* get token stream from input
*
* @param fieldName lucene field name
* @param reader input reader
*/
@Override
protected TokenStreamComponents createComponents(String fieldName,
Reader reader)
{
CJKTokenizer t = new CJKTokenizer(reader);
StopFilter ts = new StopFilter(LuceneUtil.VERSION, t, stopTable);
return new TokenStreamComponents(t, ts);
}
}
|
[
"kenny.jiang@welocalize.com"
] |
kenny.jiang@welocalize.com
|
046d857dc4be85b02e68e2024eac7d0b590c662e
|
7677e93f285c66c31d394e43562403df98a4f3a9
|
/app/src/main/java/com/example/gameplanedemo/game/Explosion.java
|
2e16d9beb55091c9a73ddceea7c1e584cd3b0f17
|
[] |
no_license
|
cuiwenju2017/GamePlaneDemo
|
a594452552841bea93ea91254638d79314cd898d
|
9fb830ab32bbde3069a605b1fc4eb06ebdcc93ae
|
refs/heads/master
| 2023-04-08T14:49:13.448632
| 2021-04-15T01:51:47
| 2021-04-15T01:51:47
| 211,484,117
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,565
|
java
|
package com.example.gameplanedemo.game;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
/**
* 爆炸效果类,位置不可变,但是可以显示动态的爆炸效果
*/
public class Explosion extends Sprite {
private int segment = 14;//爆炸效果由14个片段组成
private int level = 0;//最开始处于爆炸的第0片段
private int explodeFrequency = 2;//每个爆炸片段绘制2帧
public Explosion(Bitmap bitmap){
super(bitmap);
}
@Override
public float getWidth() {
Bitmap bitmap = getBitmap();
if(bitmap != null){
return bitmap.getWidth() / segment;
}
return 0;
}
@Override
public Rect getBitmapSrcRec() {
Rect rect = super.getBitmapSrcRec();
int left = (int)(level * getWidth());
rect.offsetTo(left, 0);
return rect;
}
@Override
protected void afterDraw(Canvas canvas, Paint paint, GameView gameView) {
if(!isDestroyed()){
if(getFrame() % explodeFrequency == 0){
//level自加1,用于绘制下个爆炸片段
level++;
if(level >= segment){
//当绘制完所有的爆炸片段后,销毁爆炸效果
destroy();
}
}
}
}
//得到绘制完整爆炸效果需要的帧数,即28帧
public int getExplodeDurationFrame(){
return segment * explodeFrequency;
}
}
|
[
"1755140651@qq.com"
] |
1755140651@qq.com
|
52c2e860b5f3fbd10917ad47b572588271952bde
|
84c3301dd799d1d0e7de58ed50f30719568760e6
|
/pu/qualityprice/src/private/nc/impl/pu/m24/action/PricestlSendAction.java
|
25ec86805113888afe1e413023181c2be77dd409
|
[] |
no_license
|
hljlgj/YonyouNC
|
264d1f38b76fb3c9937603dd48753a9b2666c3ee
|
fec9955513594a3095be76c4d7f98b0927d721b6
|
refs/heads/master
| 2020-06-12T08:25:44.710709
| 2018-07-04T09:11:33
| 2018-07-04T09:11:33
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,308
|
java
|
package nc.impl.pu.m24.action;
import nc.bs.pu.m24.plugin.PricestlPluginPoint;
import nc.bs.pub.compiler.AbstractCompiler2;
import nc.bs.scmpub.pf.PfParameterUtil;
import nc.impl.pu.m24.action.rule.SendAppoveVOValidateRule;
import nc.impl.pu.m24.action.rule.SendApproveFlowCheckRule;
import nc.impl.pu.m24.action.rule.SendApproveStatusChangeRule;
import nc.impl.pubapp.pattern.data.bill.BillUpdate;
import nc.impl.pubapp.pattern.rule.processer.AroundProcesser;
import nc.vo.pu.m24.entity.PricestlVO;
/**
* <p>
* <b>本类主要完成以下功能:</b>
* <ul>
* <li>价格结算单的送审对应的Action
* </ul>
* <p>
* <p>
*
* @version 6.0
* @since 6.0
* @author GGR
* @time 2010-1-13 上午11:14:26
*/
public class PricestlSendAction {
/**
* 方法功能描述:价格结算单的送审对应的Action
* <p>
* <b>参数说明</b>
*
* @param voArray
* @return <p>
* @since 6.0
* @author GGR
* @time 2010-1-13 上午11:14:57
*/
public PricestlVO[] sendapprove(PricestlVO[] vos, AbstractCompiler2 script) {
PfParameterUtil<PricestlVO> util =
new PfParameterUtil<PricestlVO>(script.getPfParameterVO(), vos);
PricestlVO[] originBills = util.getOrginBills();
PricestlVO[] clientBills = util.getClientFullInfoBill();
AroundProcesser<PricestlVO> processor =
new AroundProcesser<PricestlVO>(PricestlPluginPoint.SEND_APPROVE);
// 添加规则
this.addRule(processor);
// 执行持久化前规则
processor.before(clientBills);
// 数据持久化
PricestlVO[] returnVos =
new BillUpdate<PricestlVO>().update(clientBills, originBills);
// 执行持久化后规则
processor.after(returnVos);
return returnVos;
}
/**
* 方法功能描述:更新前规则。
* <p>
* <b>参数说明</b>
*
* @param processer
* <p>
* @since 6.0
* @author gaogr
* @time 2010-8-18 下午01:23:06
*/
private void addRule(AroundProcesser<PricestlVO> processer) {
// 添加持久化前规则
processer.addBeforeFinalRule(new SendApproveFlowCheckRule());
// 单据状态检查规则
processer.addBeforeFinalRule(new SendAppoveVOValidateRule());
// 单据状态修改
processer.addBeforeFinalRule(new SendApproveStatusChangeRule());
}
}
|
[
"944482059@qq.com"
] |
944482059@qq.com
|
741e53ae3d1380fb6e8b753519e6cc847c1eb5c0
|
e048cb9cd0a7d49bb284dcc3d9a0871713127c48
|
/leasing-identity-parent/leasing-identity-service/src/main/java/com/cloudkeeper/leasing/identity/repository/PrincipalOrganizationRepository.java
|
40b3df3f4e694b80d029d1a52600f48334208056
|
[] |
no_license
|
lzj1995822/GuSuCommunityApi
|
65b97a0c9f8bdeb608f887970f4d2e99d2306785
|
51348b26b9b0c0017dca807847695b3740aaf2e8
|
refs/heads/master
| 2020-04-23T19:18:18.348991
| 2019-04-28T02:56:21
| 2019-04-28T02:56:21
| 171,398,689
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,190
|
java
|
package com.cloudkeeper.leasing.identity.repository;
import com.cloudkeeper.leasing.identity.domain.PrincipalOrganization;
import com.cloudkeeper.leasing.base.repository.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import javax.annotation.Nonnull;
import java.util.List;
/**
* 用户组织 repository
* @author jerry
*/
@Repository
public interface PrincipalOrganizationRepository extends BaseRepository<PrincipalOrganization> {
/**
* 查询列表 根据用户id
* @param principalId 用户id
* @return 用户组织关系列表
*/
@Nonnull
List<PrincipalOrganization> findAllByPrincipalIdOrderByIsPartAsc(@Nonnull String principalId);
/**
* 删除用户与组织的关系
* @param principalId 用户id
*/
void deleteAllByPrincipalId(@Nonnull String principalId);
/**
* 查询用户组织关系(主岗)
* @param principalId 用户id
* @return 用户主岗
*/
@Query("from PrincipalOrganization where principalId = ?1 and isPart = 0")
PrincipalOrganization findByPrincipalIdAndIsPart(@Nonnull String principalId);
}
|
[
"243485908@qq.com"
] |
243485908@qq.com
|
a18c59f99fa536d5ef50e2f3067cf89d9b039d6c
|
a47efc2425d7c650c4153c198868ae85615c3787
|
/TechnologySolutionModel/org.emftrace.metamodel/src/org/emftrace/metamodel/EMFfitModel/TextElement.java
|
b45edb5821580388ff78b8136fd5da40e4dca2b2
|
[] |
no_license
|
cbiegel/TechnologySolutionModel
|
f3e859c8c38883e8b2b17414f8a185f1f25138cf
|
2acafc1055cbc3ad2815f5bc1732f5088e6668cb
|
refs/heads/master
| 2016-09-06T01:53:16.937715
| 2015-02-25T16:32:15
| 2015-02-25T16:32:15
| 31,322,183
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,465
|
java
|
/**
*/
package org.emftrace.metamodel.EMFfitModel;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Text Element</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.emftrace.metamodel.EMFfitModel.TextElement#getVisibleContent <em>Visible Content</em>}</li>
* </ul>
* </p>
*
* @see org.emftrace.metamodel.EMFfitModel.EMFfitModelPackage#getTextElement()
* @model abstract="true"
* @generated
*/
public interface TextElement extends FTICBase {
/**
* Returns the value of the '<em><b>Visible Content</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Visible Content</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Visible Content</em>' attribute.
* @see #setVisibleContent(String)
* @see org.emftrace.metamodel.EMFfitModel.EMFfitModelPackage#getTextElement_VisibleContent()
* @model
* @generated
*/
String getVisibleContent();
/**
* Sets the value of the '{@link org.emftrace.metamodel.EMFfitModel.TextElement#getVisibleContent <em>Visible Content</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Visible Content</em>' attribute.
* @see #getVisibleContent()
* @generated
*/
void setVisibleContent(String value);
} // TextElement
|
[
"1biegel@informatik.uni-hamburg.de"
] |
1biegel@informatik.uni-hamburg.de
|
20909331c5079e14ba50c237637a3eec7e1975e3
|
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
|
/src_fernflower/y/f/c/p.java
|
02ebcfab94030cbbe0e9349ac9af06143c8bab81
|
[] |
no_license
|
fjh658/bindiff
|
c98c9c24b0d904be852182ecbf4f81926ce67fb4
|
2a31859b4638404cdc915d7ed6be19937d762743
|
refs/heads/master
| 2021-01-20T06:43:12.134977
| 2016-06-29T17:09:03
| 2016-06-29T17:09:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,640
|
java
|
package y.f.c;
import java.util.Comparator;
import y.f.c.h;
class p implements Comparator {
private final h a;
p(h var1) {
this.a = var1;
}
public int compare(Object var1, Object var2) {
y.c.d var3 = (y.c.d)var1;
y.c.d var4 = (y.c.d)var2;
int var5 = y.g.e.a(this.a.a[var3.c().d()], this.a.a[var4.c().d()]);
if(var5 != 0) {
return var5;
} else {
int var6;
int var8 = this.a.e[var6 = var3.b()];
int var7;
int var9 = this.a.e[var7 = var4.b()];
int var10 = y.g.e.a(var8, var9);
if(var10 != 0) {
return var10;
} else {
int var11 = this.a.g[var6];
int var12 = this.a.g[var7];
if(var11 > 0) {
return var12 > 0?y.g.e.a(var11, var12):-1;
} else if(var12 > 0) {
return 1;
} else {
int var13 = var3.d().d();
int var14 = this.a.a[var13];
int var15 = var4.d().d();
int var16 = this.a.a[var15];
int var17 = y.g.e.a(var14, var16);
if(var17 != 0) {
return var17;
} else {
int var18 = y.g.e.a(this.a.f[var6], this.a.f[var7]);
if(var18 != 0) {
return var18;
} else {
int var19 = this.a.h[var6];
int var20 = this.a.h[var7];
return var19 > 0?(var20 > 0?y.g.e.a(var19, var20):-1):(var20 > 0?1:0);
}
}
}
}
}
}
}
|
[
"manouchehri@riseup.net"
] |
manouchehri@riseup.net
|
86350a8e76ffe6714a6422caa326412797e95a34
|
dff61b8483dc2bf5fe4a8dd9666a08ac88c6d23e
|
/translator/src/main/java/com/google/devtools/j2objc/gen/GeneratedType.java
|
f20b654016eef8b73af192a64ce55011fc99f480
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
navidRoohi/j2objc
|
c1568b24c9ae7902f18d57b0a68889129be5a637
|
b0140ac02846e4fffc806f7e6f1a1ae991ae5c99
|
refs/heads/master
| 2021-01-20T17:37:04.826730
| 2016-07-20T23:08:05
| 2016-07-20T23:08:05
| 63,820,403
| 2
| 0
| null | 2016-07-20T23:01:43
| 2016-07-20T23:01:42
| null |
UTF-8
|
Java
| false
| false
| 6,643
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.devtools.j2objc.gen;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.devtools.j2objc.Options;
import com.google.devtools.j2objc.ast.AbstractTypeDeclaration;
import com.google.devtools.j2objc.ast.CompilationUnit;
import com.google.devtools.j2objc.ast.TreeUtil;
import com.google.devtools.j2objc.types.HeaderImportCollector;
import com.google.devtools.j2objc.types.ImplementationImportCollector;
import com.google.devtools.j2objc.types.Import;
import com.google.devtools.j2objc.util.NameTable;
import org.eclipse.jdt.core.dom.ITypeBinding;
import java.util.Collections;
import java.util.List;
import java.util.Set;
/**
* Contains the generated source code and additional context for a single Java
* type. Must not hold references to any AST nodes or bindings because we need
* those to be cleaned up by the garbage collector.
*/
public class GeneratedType {
private final String typeName;
private final boolean isPrivate;
private final List<String> superTypes;
private final Set<Import> headerForwardDeclarations;
private final Set<Import> headerIncludes;
private final Set<Import> implementationForwardDeclarations;
private final Set<Import> implementationIncludes;
private final String publicDeclarationCode;
private final String privateDeclarationCode;
private final String implementationCode;
private GeneratedType(
String typeName,
boolean isPrivate,
List<String> superTypes,
Set<Import> headerForwardDeclarations,
Set<Import> headerIncludes,
Set<Import> implementationForwardDeclarations,
Set<Import> implementationIncludes,
String publicDeclarationCode,
String privateDeclarationCode,
String implementationCode) {
this.typeName = Preconditions.checkNotNull(typeName);
this.isPrivate = isPrivate;
this.superTypes = Preconditions.checkNotNull(superTypes);
this.headerForwardDeclarations = Preconditions.checkNotNull(headerForwardDeclarations);
this.headerIncludes = Preconditions.checkNotNull(headerIncludes);
this.implementationForwardDeclarations =
Preconditions.checkNotNull(implementationForwardDeclarations);
this.implementationIncludes = Preconditions.checkNotNull(implementationIncludes);
this.publicDeclarationCode = Preconditions.checkNotNull(publicDeclarationCode);
this.privateDeclarationCode = Preconditions.checkNotNull(privateDeclarationCode);
this.implementationCode = Preconditions.checkNotNull(implementationCode);
}
public static GeneratedType fromTypeDeclaration(AbstractTypeDeclaration typeNode) {
ITypeBinding typeBinding = typeNode.getTypeBinding();
CompilationUnit unit = TreeUtil.getCompilationUnit(typeNode);
NameTable nameTable = unit.getNameTable();
ImmutableList.Builder<String> superTypes = ImmutableList.builder();
ITypeBinding superclass = typeBinding.getSuperclass();
if (superclass != null) {
superTypes.add(nameTable.getFullName(superclass));
}
for (ITypeBinding superInterface : typeBinding.getInterfaces()) {
superTypes.add(nameTable.getFullName(superInterface));
}
HeaderImportCollector headerCollector =
new HeaderImportCollector(HeaderImportCollector.Filter.PUBLIC_ONLY);
headerCollector.collect(typeNode);
HeaderImportCollector privateDeclarationCollector =
new HeaderImportCollector(HeaderImportCollector.Filter.PRIVATE_ONLY);
privateDeclarationCollector.collect(typeNode);
ImplementationImportCollector importCollector = new ImplementationImportCollector();
importCollector.collect(typeNode);
SourceBuilder builder = new SourceBuilder(Options.emitLineDirectives());
TypeDeclarationGenerator.generate(builder, typeNode);
String publicDeclarationCode = builder.toString();
builder = new SourceBuilder(Options.emitLineDirectives());
TypePrivateDeclarationGenerator.generate(builder, typeNode);
String privateDeclarationCode = builder.toString();
builder = new SourceBuilder(Options.emitLineDirectives());
TypeImplementationGenerator.generate(builder, typeNode);
String implementationCode = builder.toString();
ImmutableSet.Builder<Import> implementationIncludes = ImmutableSet.builder();
implementationIncludes.addAll(privateDeclarationCollector.getSuperTypes());
implementationIncludes.addAll(importCollector.getImports());
return new GeneratedType(
nameTable.getFullName(typeBinding),
typeNode.hasPrivateDeclaration(),
superTypes.build(),
ImmutableSet.copyOf(headerCollector.getForwardDeclarations()),
ImmutableSet.copyOf(headerCollector.getSuperTypes()),
ImmutableSet.copyOf(privateDeclarationCollector.getForwardDeclarations()),
implementationIncludes.build(),
publicDeclarationCode,
privateDeclarationCode,
implementationCode);
}
/**
* The name of the ObjC type declared by this GeneratedType.
*/
public String getTypeName() {
return typeName;
}
public boolean isPrivate() {
return isPrivate;
}
/**
* The list of type names that must be declared prior to this type because it
* inherits from them.
*/
public List<String> getSuperTypes() {
return superTypes;
}
public Set<Import> getHeaderForwardDeclarations() {
return headerForwardDeclarations;
}
public Set<Import> getHeaderIncludes() {
return headerIncludes;
}
public Set<Import> getImplementationForwardDeclarations() {
return implementationForwardDeclarations;
}
public Set<Import> getImplementationIncludes() {
return implementationIncludes;
}
public String getPublicDeclarationCode() {
return publicDeclarationCode;
}
public String getPrivateDeclarationCode() {
return privateDeclarationCode;
}
public String getImplementationCode() {
return implementationCode;
}
@Override
public String toString() {
return typeName != null ? typeName : "<no-type>";
}
}
|
[
"tball@google.com"
] |
tball@google.com
|
45ffaa2588a1fb13fc6a839748ce96a571ef092d
|
f52d89e3adb2b7f5dc84337362e4f8930b3fe1c2
|
/com.fudanmed.platform.core.web/src/main/java/com/fudanmed/platform/core/web/client/organization/CreateOrUpdateOnsitePositionView.java
|
2c9f8c6f93dc253b1738d808872e9214c104f04b
|
[] |
no_license
|
rockguo2015/med
|
a4442d195e04f77c6c82c4b82b9942b6c5272892
|
b3db5a4943e190370a20cc4fac8faf38053ae6ae
|
refs/heads/master
| 2016-09-08T01:30:54.179514
| 2015-05-18T10:23:02
| 2015-05-18T10:23:02
| 34,060,096
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,756
|
java
|
package com.fudanmed.platform.core.web.client.organization;
import com.fudanmed.platform.core.domain.proxy.RCOnsitePositionProxy;
import com.fudanmed.platform.core.web.client.organization.CreateOrUpdateOnsitePositionPresenterView;
import com.fudanmed.platform.core.web.client.organization.OnsitePositionForm;
import com.fudanmed.platform.core.web.shared.organization.UIOnsitePosition;
import com.google.gwt.editor.client.HasEditorErrors;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
import com.sencha.gxt.widget.core.client.form.FieldLabel;
import com.uniquesoft.gwt.client.ClientUi;
import com.uniquesoft.gwt.client.common.async.IPostInitializeAction;
import com.uniquesoft.gwt.client.common.widgets.IHasSize;
import com.uniquesoft.gwt.client.common.widgets.IHasTitle;
import com.uniquesoft.gwt.client.common.widgets.Size;
import edu.fudan.langlab.gxt.client.component.form.Validations;
import edu.fudan.langlab.gxt.client.validation.ErrorNotifierViewer;
import edu.fudan.langlab.gxt.client.widget.IWidgetFactory;
import edu.fudan.langlab.security.client.Securities;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
public class CreateOrUpdateOnsitePositionView extends ErrorNotifierViewer implements CreateOrUpdateOnsitePositionPresenterView, IHasSize, IHasTitle {
@Inject
private IWidgetFactory widgets;
public void initialize(final IPostInitializeAction postInitialize) {
com.uniquesoft.gwt.client.common.async.InitializerManager.initialize(
com.google.common.collect.Lists.newArrayList(form),
new com.uniquesoft.gwt.client.common.async.IPostInitializeAction(){
public void initializeFinished(Void v) {
initialize();
postInitialize.initializeFinished(null);
}
});
}
@Inject
private Securities securities;
@Inject
private EventBus eventBus;
@Inject
private OnsitePositionForm form;
public void initialize() {
VerticalLayoutContainer _VLayout = this.widgets.VLayout();
final Procedure1<VerticalLayoutContainer> _function = new Procedure1<VerticalLayoutContainer>() {
public void apply(final VerticalLayoutContainer it) {
Widget _asWidget = CreateOrUpdateOnsitePositionView.this.form.asWidget();
int _minus = (-1);
VerticalLayoutData _VLayoutData = CreateOrUpdateOnsitePositionView.this.widgets.VLayoutData(1, _minus, 10);
it.add(_asWidget, _VLayoutData);
}
};
VerticalLayoutContainer _doubleArrow = ObjectExtensions.<VerticalLayoutContainer>operator_doubleArrow(_VLayout, _function);
ClientUi.operator_add(this, _doubleArrow);
}
public UIOnsitePosition getValue() {
UIOnsitePosition _value = this.form.getValue();
return _value;
}
public HasEditorErrors mapField(final String errorKey) {
HasEditorErrors _mapToErrorEditor = Validations.mapToErrorEditor(this.form, errorKey);
return _mapToErrorEditor;
}
public void clearErrors() {
Validations.clearErrors(this.form);
}
public void setValue(final UIOnsitePosition value) {
this.form.setValue(value);
FieldLabel _asWidget = this.form.inputNext.asWidget();
_asWidget.hide();
}
public Size getSize() {
Size _size = new Size(300, 220);
return _size;
}
public String getTitle() {
return "\u533A\u57DF\u4F4D\u7F6E\u7EF4\u62A4";
}
public void setParent(final RCOnsitePositionProxy parent) {
this.form.parent.setValue(parent);
}
}
|
[
"rock.guo@me.com"
] |
rock.guo@me.com
|
1752853ad584c04c79434d7696fd6e52b5cca73e
|
16a0b0c678328af7cfc341c09f1b96afcac551d1
|
/core/src/main/java/javabot/operations/ShunOperation.java
|
07cdf64c4cbcb748be475e9a06fdd706494d7017
|
[
"BSD-3-Clause"
] |
permissive
|
dbongo/javabot
|
7c5c8dbe4781d72e2a5334762075c2e638e2c422
|
356700073de9e391d22bf9f007b47289389821d1
|
refs/heads/master
| 2021-01-20T16:41:42.928198
| 2014-04-03T11:49:57
| 2014-04-03T11:49:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,877
|
java
|
package javabot.operations;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import com.antwerkz.maven.SPI;
import javabot.IrcEvent;
import javabot.Message;
import javabot.dao.ShunDao;
import org.joda.time.DateTime;
import org.joda.time.Duration;
/**
* Causes the bot to disregard bot triggers for a few minutes. Useful to de-fang abusive users without ejecting the bot
* from a channel entirely.
*/
@SPI(BotOperation.class)
public class ShunOperation extends BotOperation {
private static final long MILLISECOND = 1;
private static final long SECOND = 1000 * MILLISECOND;
private static final long MINUTE = 60 * SECOND;
private static final Duration SHUN_DURATION = Duration.standardMinutes(5);
@Inject
private ShunDao shunDao;
public List<Message> handleMessage(final IrcEvent event) {
final String message = event.getMessage();
final List<Message> responses = new ArrayList<Message>();
if (message.startsWith("shun ")) {
final String[] parts = message.substring(5).split(" ");
if (parts.length == 0) {
responses.add(new Message(event.getChannel(), event, "Usage: shun <user> [<seconds>]"));
} else {
responses.add(new Message(event.getChannel(), event, getShunnedMessage(parts)));
}
}
return responses;
}
private String getShunnedMessage(final String[] parts) {
final String victim = parts[0];
if (shunDao.isShunned(victim)) {
return String.format("%s is already shunned.", victim);
}
System.out.println("DateTime.now() = " + DateTime.now());
final DateTime until = parts.length == 1
? DateTime.now().plusMinutes(5)
: DateTime.now().plusSeconds(Integer.parseInt(parts[1]));
shunDao.addShun(victim, until);
return String.format("%s is shunned until %s.", victim, until.toString("yyyy/MM/dd HH:mm:ss"));
}
}
|
[
"jlee@antwerkz.com"
] |
jlee@antwerkz.com
|
de333878b8edf35a4354f24d7f9bfb66beb81af8
|
3c487dbe9590ae92042db864bbde65a2165599ff
|
/workspace/webStudy00_Assignment/src/main/java/kr/or/ddit/mvc/annotation/resolvers/RequestParam.java
|
c2ab0f66e669e0037fd2a6972630af3864b56387
|
[] |
no_license
|
maskan19/SPRING
|
9dad1f24db6b21f643651358b16a3948e9b0a31b
|
ea3a3fb1b1a086f3ada6feb86e75b1066dfa1f11
|
refs/heads/master
| 2023-04-22T01:48:17.324137
| 2021-05-18T11:56:30
| 2021-05-18T11:56:30
| 347,024,430
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 408
|
java
|
package kr.or.ddit.mvc.annotation.resolvers;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.Target;
@Target(PARAMETER)
@Retention(RUNTIME)
public @interface RequestParam {
public String value();
public boolean required() default true;
public String defaultValue() default "";
}
|
[
"maskan_19@naver.com"
] |
maskan_19@naver.com
|
bddd70008d53df3f7a16f0c4122bbd3d35aac418
|
159a57c2e385c0ada9dc01fbdfcdd8149717878b
|
/opa/src/com/opa/android/mode/activity/LoadingActivity.java
|
2134cd4a5bb0207beed72db7b95f6e8acf080eae
|
[] |
no_license
|
dongerqiang/Ab_OuPaiZhiNeng
|
e1a7b9e129e6685163acc7d9c0fbfa5ca841b6b1
|
9d4177353325ce0a2d5dd030a2ac0afa6d2c0176
|
refs/heads/master
| 2021-05-23T05:50:42.610182
| 2017-10-10T07:49:09
| 2017-10-10T07:49:09
| 94,975,194
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 702
|
java
|
package com.opa.android.mode.activity;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EActivity;
import com.opa.android.R;
import android.os.Handler;
@EActivity(R.layout.activity_loading_layout)
public class LoadingActivity extends BaseActivity {
@Override
@AfterViews
public void initViews() {
super.initViews();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
if(app.isLogin()){
com.opa.android.mode.activity.LoginActivity_.intent(LoadingActivity.this).start();
}else{
com.opa.android.MainActivity_.intent(LoadingActivity.this).start();
}
finish();
}
}, 1500);
}
}
|
[
"www.1371686510@qq.com"
] |
www.1371686510@qq.com
|
7d9b537e11ae9b281d2e2363596ff05eb7e053f2
|
39f57751ba84cfe689ad6a49d535666374d0150b
|
/drools-planner-examples/src/test/java/org/drools/planner/examples/nqueens/NQueensBenchmarkTest.java
|
1609c355b2142d8ae5b30e7d217e19a56df28c83
|
[
"Apache-2.0"
] |
permissive
|
cyberdrcarr/optaplanner
|
0a5eb8850e9dd6e62e729122c6415ec4b3d95e69
|
eb37d4a4261167086d87609242a614e8a7a76c38
|
refs/heads/master
| 2021-01-17T16:25:09.676955
| 2013-05-13T11:43:59
| 2013-05-13T11:43:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,371
|
java
|
/*
* Copyright 2012 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.drools.planner.examples.nqueens;
import java.io.File;
import org.drools.planner.config.EnvironmentMode;
import org.drools.planner.examples.common.app.PlannerBenchmarkTest;
import org.junit.Test;
public class NQueensBenchmarkTest extends PlannerBenchmarkTest {
@Override
protected String createBenchmarkConfigResource() {
return "/org/drools/planner/examples/nqueens/benchmark/nqueensBenchmarkConfig.xml";
}
// ************************************************************************
// Tests
// ************************************************************************
@Test(timeout = 600000)
public void benchmark64Queens() {
runBenchmarkTest(new File("data/nqueens/unsolved/unsolvedNQueens64.xml"));
}
}
|
[
"gds.geoffrey.de.smet@gmail.com"
] |
gds.geoffrey.de.smet@gmail.com
|
fa1fcfcf69763a38e4bd139cdec9bf384290c16d
|
1ed0e7930d6027aa893e1ecd4c5bba79484b7c95
|
/keiji/source/java/com/b/a/c/ac.java
|
8dd0113c4267696fcec87bb14d71c4482fbed526
|
[] |
no_license
|
AnKoushinist/hikaru-bottakuri-slot
|
36f1821e355a76865057a81221ce2c6f873f04e5
|
7ed60c6d53086243002785538076478c82616802
|
refs/heads/master
| 2021-01-20T05:47:00.966573
| 2017-08-26T06:58:25
| 2017-08-26T06:58:25
| 101,468,394
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 996
|
java
|
package com.b.a.c;
import a.a.a.a.c;
import java.io.File;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/* compiled from: SessionReport */
class ac implements z {
private final File a;
private final Map<String, String> b;
public ac(File file) {
this(file, Collections.emptyMap());
}
public ac(File file, Map<String, String> map) {
this.a = file;
this.b = new HashMap(map);
if (this.a.length() == 0) {
this.b.putAll(aa.a);
}
}
public File d() {
return this.a;
}
public String b() {
return d().getName();
}
public String c() {
String b = b();
return b.substring(0, b.lastIndexOf(46));
}
public Map<String, String> e() {
return Collections.unmodifiableMap(this.b);
}
public boolean a() {
c.h().a("CrashlyticsCore", "Removing report at " + this.a.getPath());
return this.a.delete();
}
}
|
[
"09f713c@sigaint.org"
] |
09f713c@sigaint.org
|
c07eb413f753edbd367b2599174f3529d8e00ba1
|
70daf318d027f371ada3abeaaa31dd47651640d7
|
/src/com/javahis/system/combo/TComboSYSDeptcat1.java
|
7d9b28f0065437a29ca5ab8b9558f1a4293d499d
|
[] |
no_license
|
wangqing123654/web
|
00613f6db653562e2e8edc14327649dc18b2aae6
|
bd447877400291d3f35715ca9c7c7b1e79653531
|
refs/heads/master
| 2023-04-07T15:23:34.705954
| 2020-11-02T10:10:57
| 2020-11-02T10:10:57
| 309,329,277
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,726
|
java
|
package com.javahis.system.combo;
import com.dongyang.ui.TComboBox;
import com.dongyang.config.TConfigParse.TObject;
import com.dongyang.ui.edit.TAttributeList.TAttribute;
import com.dongyang.ui.edit.TAttributeList;
/**
*
* <p>Title: 卫统科室下拉列表</p>
*
* <p>Description: 卫统科室下拉列表</p>
*
* <p>Copyright: Copyright (c) Liu dongyang 2008</p>
*
* <p>Company: JavaHis</p>
*
* @author wangl 2009.01.04
* @version 1.0
*/
public class TComboSYSDeptcat1 extends TComboBox{
/**
* 新建对象的初始值
* @param object TObject
*/
public void createInit(TObject object)
{
if(object == null)
return;
object.setValue("Width","81");
object.setValue("Height","23");
object.setValue("Text","TButton");
object.setValue("showID","Y");
object.setValue("showName","Y");
object.setValue("showText","N");
object.setValue("showValue","N");
object.setValue("showPy1","Y");
object.setValue("showPy2","Y");
object.setValue("Editable","Y");
object.setValue("Tip","卫统科室");
object.setValue("TableShowList","id,name");
object.setValue("ModuleParmString","GROUP_ID:SYS_DEPTCAT1");
object.setValue("ModuleParmTag","");
}
public String getModuleName()
{
return "sys\\SYSDictionaryModule.x";
}
public String getModuleMethodName()
{
return "getGroupList";
}
public String getParmMap()
{
return "id:ID;name:NAME;enname:ENNAME;Py1:PY1;py2:PY2";
}
/**
* 增加扩展属性
* @param data TAttributeList
*/
public void getEnlargeAttributes(TAttributeList data){
}
}
|
[
"1638364772@qq.com"
] |
1638364772@qq.com
|
083585980fe823fece088114eec7321a6286de94
|
831bd2b13e62678b4057d98c0083e96eab90c69d
|
/src/main/java/com/cloudmersive/client/model/DocxInsertImageResponse.java
|
ad985aa5f375b418809d35459da324af64737378
|
[
"Apache-2.0"
] |
permissive
|
Cloudmersive/Cloudmersive.APIClient.Java
|
af52d5db6484f2bbe6f1ea89952023307c436ccf
|
3e8a2705bb77c641fce1f7afe782a583c4956411
|
refs/heads/master
| 2023-06-16T04:56:47.149667
| 2023-06-03T22:52:39
| 2023-06-03T22:52:39
| 116,770,125
| 14
| 5
|
Apache-2.0
| 2022-05-20T20:51:05
| 2018-01-09T05:28:25
|
Java
|
UTF-8
|
Java
| false
| false
| 3,485
|
java
|
/*
* convertapi
* Convert API lets you effortlessly convert file formats and types.
*
* OpenAPI spec version: v1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.cloudmersive.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Result of running a set-footer command
*/
@ApiModel(description = "Result of running a set-footer command")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-06-03T15:49:38.314-07:00")
public class DocxInsertImageResponse {
@SerializedName("Successful")
private Boolean successful = null;
@SerializedName("EditedDocumentURL")
private String editedDocumentURL = null;
public DocxInsertImageResponse successful(Boolean successful) {
this.successful = successful;
return this;
}
/**
* True if successful, false otherwise
* @return successful
**/
@ApiModelProperty(value = "True if successful, false otherwise")
public Boolean isSuccessful() {
return successful;
}
public void setSuccessful(Boolean successful) {
this.successful = successful;
}
public DocxInsertImageResponse editedDocumentURL(String editedDocumentURL) {
this.editedDocumentURL = editedDocumentURL;
return this;
}
/**
* URL to the edited DOCX file; file is stored in an in-memory cache and will be deleted. Call Finish-Editing to get the result document contents.
* @return editedDocumentURL
**/
@ApiModelProperty(value = "URL to the edited DOCX file; file is stored in an in-memory cache and will be deleted. Call Finish-Editing to get the result document contents.")
public String getEditedDocumentURL() {
return editedDocumentURL;
}
public void setEditedDocumentURL(String editedDocumentURL) {
this.editedDocumentURL = editedDocumentURL;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DocxInsertImageResponse docxInsertImageResponse = (DocxInsertImageResponse) o;
return Objects.equals(this.successful, docxInsertImageResponse.successful) &&
Objects.equals(this.editedDocumentURL, docxInsertImageResponse.editedDocumentURL);
}
@Override
public int hashCode() {
return Objects.hash(successful, editedDocumentURL);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DocxInsertImageResponse {\n");
sb.append(" successful: ").append(toIndentedString(successful)).append("\n");
sb.append(" editedDocumentURL: ").append(toIndentedString(editedDocumentURL)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"35204726+Cloudmersive@users.noreply.github.com"
] |
35204726+Cloudmersive@users.noreply.github.com
|
8d0271c6519c958fc806753fe177bc3037387bdf
|
2475c0de059c5f7ef26a8b14d4f2d8748c829ba4
|
/src/main/java/ns/yang/nfvo/mano/types/rev170208/vca/relationships/VcaRelationshipsBuilder.java
|
4e194facf064b70a66c20c562491463a7a3972a4
|
[
"Apache-2.0"
] |
permissive
|
5GinFIRE/eu.5ginfire.nbi.osm4java
|
bcddbfbb7c32604011e04a3fefd4645ea6202ee2
|
2482514814828bf54d82ef1fe19e4b72a9e9096b
|
refs/heads/master
| 2021-08-27T18:20:16.562188
| 2019-06-16T11:02:18
| 2019-06-16T11:02:18
| 142,417,313
| 1
| 1
|
Apache-2.0
| 2021-08-02T17:10:20
| 2018-07-26T09:12:25
|
Java
|
UTF-8
|
Java
| false
| false
| 6,779
|
java
|
package ns.yang.nfvo.mano.types.rev170208.vca.relationships;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableMap;
import ns.yang.nfvo.mano.types.rev170208.$YangModuleInfoImpl;
import ns.yang.nfvo.mano.types.rev170208.vca.relationships.vca.relationships.Relation;
import java.lang.Class;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.binding.Augmentation;
import org.opendaylight.yangtools.yang.binding.AugmentationHolder;
import org.opendaylight.yangtools.yang.binding.CodeHelpers;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.common.QName;
/**
* Class that builds {@link VcaRelationships} instances.
*
* @see VcaRelationships
*
*/
public class VcaRelationshipsBuilder implements Builder<VcaRelationships> {
private List<Relation> _relation;
public static final QName QNAME = $YangModuleInfoImpl.qnameOf("vca-relationships");
Map<Class<? extends Augmentation<VcaRelationships>>, Augmentation<VcaRelationships>> augmentation = Collections.emptyMap();
public VcaRelationshipsBuilder() {
}
public VcaRelationshipsBuilder(VcaRelationships base) {
this._relation = base.getRelation();
if (base instanceof VcaRelationshipsImpl) {
VcaRelationshipsImpl impl = (VcaRelationshipsImpl) base;
if (!impl.augmentation.isEmpty()) {
this.augmentation = new HashMap<>(impl.augmentation);
}
} else if (base instanceof AugmentationHolder) {
@SuppressWarnings("unchecked")
AugmentationHolder<VcaRelationships> casted =(AugmentationHolder<VcaRelationships>) base;
if (!casted.augmentations().isEmpty()) {
this.augmentation = new HashMap<>(casted.augmentations());
}
}
}
public List<Relation> getRelation() {
return _relation;
}
@SuppressWarnings("unchecked")
public <E extends Augmentation<VcaRelationships>> E augmentation(Class<E> augmentationType) {
return (E) augmentation.get(CodeHelpers.nonNullValue(augmentationType, "augmentationType"));
}
public VcaRelationshipsBuilder setRelation(final List<Relation> values) {
this._relation = values;
return this;
}
public VcaRelationshipsBuilder addAugmentation(Class<? extends Augmentation<VcaRelationships>> augmentationType, Augmentation<VcaRelationships> augmentationValue) {
if (augmentationValue == null) {
return removeAugmentation(augmentationType);
}
if (!(this.augmentation instanceof HashMap)) {
this.augmentation = new HashMap<>();
}
this.augmentation.put(augmentationType, augmentationValue);
return this;
}
public VcaRelationshipsBuilder removeAugmentation(Class<? extends Augmentation<VcaRelationships>> augmentationType) {
if (this.augmentation instanceof HashMap) {
this.augmentation.remove(augmentationType);
}
return this;
}
@Override
public VcaRelationships build() {
return new VcaRelationshipsImpl(this);
}
private static final class VcaRelationshipsImpl implements VcaRelationships {
@Override
public Class<VcaRelationships> getImplementedInterface() {
return VcaRelationships.class;
}
private final List<Relation> _relation;
private Map<Class<? extends Augmentation<VcaRelationships>>, Augmentation<VcaRelationships>> augmentation = Collections.emptyMap();
private VcaRelationshipsImpl(VcaRelationshipsBuilder base) {
this._relation = base.getRelation();
this.augmentation = ImmutableMap.copyOf(base.augmentation);
}
@Override
public List<Relation> getRelation() {
return _relation;
}
@SuppressWarnings("unchecked")
@Override
public <E extends Augmentation<VcaRelationships>> E augmentation(Class<E> augmentationType) {
return (E) augmentation.get(CodeHelpers.nonNullValue(augmentationType, "augmentationType"));
}
private int hash = 0;
private volatile boolean hashValid = false;
@Override
public int hashCode() {
if (hashValid) {
return hash;
}
final int prime = 31;
int result = 1;
result = prime * result + Objects.hashCode(_relation);
result = prime * result + Objects.hashCode(augmentation);
hash = result;
hashValid = true;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DataObject)) {
return false;
}
if (!VcaRelationships.class.equals(((DataObject)obj).getImplementedInterface())) {
return false;
}
VcaRelationships other = (VcaRelationships)obj;
if (!Objects.equals(_relation, other.getRelation())) {
return false;
}
if (getClass() == obj.getClass()) {
// Simple case: we are comparing against self
VcaRelationshipsImpl otherImpl = (VcaRelationshipsImpl) obj;
if (!Objects.equals(augmentation, otherImpl.augmentation)) {
return false;
}
} else {
// Hard case: compare our augments with presence there...
for (Map.Entry<Class<? extends Augmentation<VcaRelationships>>, Augmentation<VcaRelationships>> e : augmentation.entrySet()) {
if (!e.getValue().equals(other.augmentation(e.getKey()))) {
return false;
}
}
// .. and give the other one the chance to do the same
if (!obj.equals(this)) {
return false;
}
}
return true;
}
@Override
public String toString() {
final MoreObjects.ToStringHelper helper = MoreObjects.toStringHelper("VcaRelationships");
CodeHelpers.appendValue(helper, "_relation", _relation);
CodeHelpers.appendValue(helper, "augmentation", augmentation.values());
return helper.toString();
}
}
}
|
[
"ioannischatzis@gmail.com"
] |
ioannischatzis@gmail.com
|
d48aed71085c9585a24da236df13e94863e0a5ef
|
907b0da421599a8b1de5b3f2d91999f5c06c1ef7
|
/UnionFind/src/UnionFind5.java
|
3586edb4d0c4309ddaf30f357b6e43cbc3d02e40
|
[] |
no_license
|
stephanie-lss/play-data-structures
|
a4391647f087611a7aadeb4f963524726b81eb19
|
3c51b14181664c14553cb2b06d48eef7d147dd9d
|
refs/heads/master
| 2020-12-03T03:16:38.059224
| 2020-09-11T09:09:48
| 2020-09-11T09:09:48
| 231,192,253
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,633
|
java
|
/**
* @author LiSheng
* @date 2020/1/6 10:57
* version:3.0 添加路径压缩
*/
public class UnionFind5 implements UnionFind {
//索引为当前节点的值,数组的值为当前节点指向的节点的值
private int[] parent;
//rank[i]表示以i为根的集合所表示的树的高度等级
private int[] rank;
public UnionFind5(int size) {
parent = new int[size];
rank = new int[size];
for (int i = 0; i < size; i++) {
parent[i] = i;
rank[i] = 1;
}
}
//查看元素p和元素q是否所属一个集合
//复杂度为O(h),h为树的高度
@Override
public boolean isConnected(int p, int q) {
return find(p) == find(q);
}
@Override
public void unionElements(int p, int q) {
int pRoot = find(p);
int qRoot = find(q);
if (pRoot == qRoot) {
return;
}
//将rank低的集合合并到rank高的集合上
if (rank[pRoot] < rank[qRoot]) {
parent[pRoot] = qRoot;
} else if (rank[qRoot] < rank[pRoot]) {
parent[qRoot] = pRoot;
} else {
parent[qRoot] = pRoot;
rank[pRoot]++;
}
}
@Override
public int getSize() {
return parent.length;
}
private int find(int p) {
if (p < 0 || p >= parent.length) {
throw new IllegalArgumentException("p is out of bound. ");
}
while (parent[p] != p) {
//路径压缩
parent[p] = parent[parent[p]];
p = parent[p];
}
return p;
}
}
|
[
"892958173@qq.com"
] |
892958173@qq.com
|
a9a2d61a5322d93ba8cf4bfb7708e5d3407c815d
|
9bc85981dac0d67947cce7e534417b26da7b6d44
|
/blog-service/src/main/java/com/example/blog/service/mapper/PostMapper.java
|
0ab87a3e22e7a3b95b4a3d33c7e77d23cb6cca37
|
[] |
no_license
|
guass/ChuyunBlog-Dubbo
|
d56863f2f07eaaccae7b1c4075eeed9840beaed4
|
87da1f89f133c943faadd01031d2bda698491834
|
refs/heads/master
| 2022-12-30T06:32:31.122521
| 2020-10-23T10:04:21
| 2020-10-23T10:04:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,522
|
java
|
package com.example.blog.service.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.blog.api.dto.PostQueryCondition;
import com.example.blog.api.entity.Post;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author liuyanzhao
*/
@Mapper
public interface PostMapper extends BaseMapper<Post> {
/**
* 获取所有文章阅读量总和
*
* @return Long
*/
Long getPostViewsSum();
/**
* 重置回复数量
*
* @return 数量
*/
Integer resetCommentSize(Long postId);
/**
* 根据用户Id删除
*
* @return 影响行数
*/
Integer deleteByUserId(Long userId);
/**
* 文章点赞量+1
*
* @param postId
* @return
*/
Integer incrPostLikes(Long postId);
/**
* 文章访问量+1
*
* @param postId
* @return
*/
Integer incrPostViews(Long postId);
/**
* 获得今日新增数量
*
* @return
*/
Integer getTodayCount();
/**
* 根据标签ID查询文章
*
* @param condition
* @param page
* @return
*/
List<Post> findPostByCondition(@Param("condition") PostQueryCondition condition, Page page);
/**
* 获取某个用户的文章列表
* @param userId
* @return
*/
List<Long> selectIdByUserId(Long userId);
}
|
[
"847064370@qq.com"
] |
847064370@qq.com
|
4214b0fa15b1b10c12d01e0bf09adc24c925ec46
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/32/32_cd711d7697ed5ce3a54be23fd5036414ec453c85/IntervalMergerWalker/32_cd711d7697ed5ce3a54be23fd5036414ec453c85_IntervalMergerWalker_s.java
|
30ef0b6bc1948f15eda33e74976c72bdd2af3f16
|
[] |
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,115
|
java
|
/*
* Copyright (c) 2009 The Broad Institute
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package org.broadinstitute.sting.gatk.walkers.indels;
import net.sf.samtools.SAMRecord;
import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
import org.broadinstitute.sting.gatk.filters.Platform454Filter;
import org.broadinstitute.sting.gatk.filters.ZeroMappingQualityReadFilter;
import org.broadinstitute.sting.gatk.walkers.*;
import org.broadinstitute.sting.utils.*;
import org.broadinstitute.sting.utils.cmdLine.Argument;
import java.util.*;
import java.io.*;
/**
* Merges intervals based on reads which overlap them.
*/
@WalkerName("IntervalMerger")
@Requires({DataSource.READS})
@ReadFilters({Platform454Filter.class, ZeroMappingQualityReadFilter.class})
public class IntervalMergerWalker extends ReadWalker<Integer,Integer> {
@Argument(fullName="intervalsToMerge", shortName="intervals", doc="Intervals to merge", required=true)
List<String> intervalsSource = null;
@Argument(fullName="allow454Reads", shortName="454", doc="process 454 reads", required=false)
boolean allow454 = false;
@Argument(fullName="maxIntervalSize", shortName="maxInterval", doc="max interval size", required=false)
int maxIntervalSize = 500;
private LinkedList<GenomeLoc> intervals;
private GenomeLoc firstInterval = null;
@Override
public void initialize() {
intervals = parseIntervals(intervalsSource);
firstInterval = intervals.removeFirst();
}
@Override
public Integer map(char[] ref, SAMRecord read) {
if ( firstInterval == null ||
(!allow454 && Utils.is454Read(read)) )
return 0;
GenomeLoc loc = GenomeLocParser.createGenomeLoc(read);
// emit all intervals which we've passed
while ( loc.isPast(firstInterval) ) {
if ( firstInterval.getStop() - firstInterval.getStart() < maxIntervalSize)
out.println(firstInterval);
if ( intervals.size() > 0 ) {
firstInterval = intervals.removeFirst();
} else {
firstInterval = null;
return 0;
}
}
// if we're not yet in the first interval, we're done
if ( !loc.overlapsP(firstInterval))
return 0;
// at this point, we're in the first interval.
// now we can merge any other intervals which we overlap
while ( intervals.size() > 0 && loc.overlapsP(intervals.getFirst()) )
firstInterval = GenomeLocParser.setStop(firstInterval,intervals.removeFirst().getStop());
return 1;
}
@Override
public Integer reduceInit() { return 0; }
@Override
public Integer reduce( Integer value, Integer accum ) {
return accum + value;
}
@Override
public void onTraversalDone( Integer value ) {
if ( firstInterval != null &&
firstInterval.getStop() - firstInterval.getStart() < maxIntervalSize)
out.println(firstInterval);
}
/**
* Load the intervals directly from the command-line or from file, as appropriate.
* Merge overlapping intervals.
* @param intervalsSource Source of intervals.
* @return a linked list of sorted, merged intervals.
*/
private LinkedList<GenomeLoc> parseIntervals(List<String> intervalsSource) {
// ignore zero-length intervals files.
for (int i = 0; i < intervalsSource.size(); i++)
{
File f = new File(intervalsSource.get(i));
long size = f.length();
if (size == 0) { intervalsSource.remove(i); }
}
List<GenomeLoc> parsedIntervals = GenomeAnalysisEngine.parseIntervalRegion(intervalsSource);
GenomeLocSortedSet intervalSortedSet = new GenomeLocSortedSet();
for ( GenomeLoc parsedInterval : parsedIntervals )
intervalSortedSet.addRegion(parsedInterval);
return new LinkedList<GenomeLoc>( intervalSortedSet );
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
fadd780a785a625709f8890c7c37b886d5f7c155
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/21/org/jfree/chart/util/ShapeUtilities_createTranslatedShape_332.java
|
20a68ed2c770beffbec61ad5b02f9df30bfab640
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,577
|
java
|
org jfree chart util
util method link shape object
shape util shapeutil
translat shape locat anchor point
rel rectangular bound shape align
coordin java2 java2d space
param shape shape code code permit
param anchor anchor code code permit
param locat locationx coordin java2 java2d space
param locat locationi coordin java2 java2d space
translat shape
shape creat translat shape createtranslatedshap shape shape
rectangl anchor rectangleanchor anchor
locat locationx
locat locationi
shape
illeg argument except illegalargumentexcept null 'shape' argument
anchor
illeg argument except illegalargumentexcept null 'anchor' argument
point2 point2d anchor point anchorpoint rectangl anchor rectangleanchor coordin shape bounds2 getbounds2d
anchor
affin transform affinetransform transform affin transform affinetransform translat instanc gettranslateinst
locat locationx anchor point anchorpoint getx locat locationi anchor point anchorpoint geti
transform creat transform shape createtransformedshap shape
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
0a2b194c42bf8d26c15c8e9c76a454f3b9110dce
|
7259eb60a3e2e1dda1f6972eb66e3b5743774810
|
/droidparts/src/org/droidparts/fragment/stock/Fragment.java
|
df6b33139372c861af59a067727fa5b1ba188985
|
[
"Apache-2.0"
] |
permissive
|
alexli0707/droidparts
|
718ac15336156c733c7c7aff65406689e1ab8d40
|
708969c7e2853f7ef1c14466db126bf162437682
|
refs/heads/master
| 2020-12-24T22:59:57.765778
| 2013-06-02T23:00:44
| 2013-06-02T23:00:44
| 10,518,262
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,378
|
java
|
/**
* Copyright 2013 Alex Yanchenko
*
* 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.droidparts.fragment.stock;
import org.droidparts.Injector;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class Fragment extends android.app.Fragment {
private boolean injected;
@Override
public final View onCreateView(LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
View view = onCreateView(savedInstanceState, inflater, container);
Injector.inject(view, this);
injected = true;
return view;
}
public View onCreateView(Bundle savedInstanceState,
LayoutInflater inflater, ViewGroup container) {
return super.onCreateView(inflater, container, savedInstanceState);
}
public final boolean isInjected() {
return injected;
}
}
|
[
"alex@yanchenko.com"
] |
alex@yanchenko.com
|
f7113b9498512b1c1763467f67628a147e1cd83b
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE129_Improper_Validation_of_Array_Index/s05/CWE129_Improper_Validation_of_Array_Index__random_array_read_no_check_81_base.java
|
06d5793a775cdd50286393d48da05487e676ade9
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 962
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE129_Improper_Validation_of_Array_Index__random_array_read_no_check_81_base.java
Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml
Template File: sources-sinks-81_base.tmpl.java
*/
/*
* @description
* CWE: 129 Improper Validation of Array Index
* BadSource: random Set data to a random value
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: array_read_no_check
* GoodSink: Read from array after verifying index
* BadSink : Read from array without any verification of index
* Flow Variant: 81 Data flow: data passed in a parameter to an abstract method
*
* */
package testcases.CWE129_Improper_Validation_of_Array_Index.s05;
import testcasesupport.*;
import javax.servlet.http.*;
public abstract class CWE129_Improper_Validation_of_Array_Index__random_array_read_no_check_81_base
{
public abstract void action(int data ) throws Throwable;
}
|
[
"you@example.com"
] |
you@example.com
|
e02bcc522382444014fafd7d965b2f5fce6d043f
|
7f50023909e4cf6b6986b7fb11c18913b0213ca7
|
/asjAuthlib/src/main/java/com/ald/asjauthlib/auth/model/YiTuResultModel.java
|
5024732937bef6afb5196ad27ff4baec7b2c2c06
|
[] |
no_license
|
hctwgl/asj
|
e113e35cd999bac16d7071d158a9f989b79b9ded
|
daeabd2f18016e4d0747afc502bd6d6b8fd8b46c
|
refs/heads/master
| 2021-10-09T04:30:38.079091
| 2018-12-21T07:59:22
| 2018-12-21T07:59:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,224
|
java
|
package com.ald.asjauthlib.auth.model;
import com.ald.asjauthlib.authframework.core.network.entity.BaseModel;
/**
* 版权:XXX公司 版权所有
* 作者:Jacky Yu
* 版本:1.0
* 创建日期:2017/2/22 15:22
* 描述:
* 修订历史:
*/
public class YiTuResultModel extends BaseModel {
private String name;
private String address;
private String citizen_id;
private String valid_date_begin;
private String valid_date_end;
private String gender;
private String nation;
private String birthday;
private String agency;
private int idcard_type;
public YiTuResultModel() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getCitizen_id() {
return citizen_id;
}
public void setCitizen_id(String citizen_id) {
this.citizen_id = citizen_id;
}
public String getValid_date_begin() {
return valid_date_begin;
}
public void setValid_date_begin(String valid_date_begin) {
this.valid_date_begin = valid_date_begin;
}
public String getValid_date_end() {
return valid_date_end;
}
public void setValid_date_end(String valid_date_end) {
this.valid_date_end = valid_date_end;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getNation() {
return nation;
}
public void setNation(String nation) {
this.nation = nation;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String getAgency() {
return agency;
}
public void setAgency(String agency) {
this.agency = agency;
}
public int getIdcard_type() {
return idcard_type;
}
public void setIdcard_type(int idcard_type) {
this.idcard_type = idcard_type;
}
}
|
[
"576412864@qq.com"
] |
576412864@qq.com
|
f26205f4491d7cf6328312e24d246884c6a57fe9
|
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
|
/schemaOrgGson/src/org/kyojo/schemaorg/m3n5/gson/healthLifesci/container/DietFeaturesDeserializer.java
|
e77d1a9ab1d64a4bcd0509f4344c2081da49388d
|
[
"Apache-2.0"
] |
permissive
|
nagaikenshin/schemaOrg
|
3dec1626781913930da5585884e3484e0b525aea
|
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
|
refs/heads/master
| 2021-06-25T04:52:49.995840
| 2019-05-12T06:22:37
| 2019-05-12T06:22:37
| 134,319,974
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,082
|
java
|
package org.kyojo.schemaorg.m3n5.gson.healthLifesci.container;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
import org.kyojo.gson.JsonDeserializationContext;
import org.kyojo.gson.JsonDeserializer;
import org.kyojo.gson.JsonElement;
import org.kyojo.gson.JsonParseException;
import org.kyojo.schemaorg.m3n5.healthLifesci.impl.DIET_FEATURES;
import org.kyojo.schemaorg.m3n5.healthLifesci.Container.DietFeatures;
import org.kyojo.schemaorg.m3n5.gson.DeserializerTemplate;
public class DietFeaturesDeserializer implements JsonDeserializer<DietFeatures> {
public static Map<String, Field> fldMap = new HashMap<>();
@Override
public DietFeatures deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
throws JsonParseException {
if(jsonElement.isJsonPrimitive()) {
return new DIET_FEATURES(jsonElement.getAsString());
}
return DeserializerTemplate.deserializeSub(jsonElement, type, context,
new DIET_FEATURES(), DietFeatures.class, DIET_FEATURES.class, fldMap);
}
}
|
[
"nagai@nagaikenshin.com"
] |
nagai@nagaikenshin.com
|
eff4e4d18eef50089b2b6391b69344dd4d8c66ca
|
c83ae1e7ef232938166f7b54e69f087949745e0d
|
/sources/androidx/media/AudioAttributesImplApi21.java
|
15aaa4a05ad5db7b8b316bd6848ee82214909733
|
[] |
no_license
|
FL0RlAN/android-tchap-1.0.35
|
7a149a08a88eaed31b0f0bfa133af704b61a7187
|
e405f61db55b3bfef25cf16103ba08fc2190fa34
|
refs/heads/master
| 2022-05-09T04:35:13.527984
| 2020-04-26T14:41:37
| 2020-04-26T14:41:37
| 259,030,577
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,377
|
java
|
package androidx.media;
import android.media.AudioAttributes;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.util.Log;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
class AudioAttributesImplApi21 implements AudioAttributesImpl {
private static final String TAG = "AudioAttributesCompat21";
static Method sAudioAttributesToLegacyStreamType;
AudioAttributes mAudioAttributes;
int mLegacyStreamType;
AudioAttributesImplApi21() {
this.mLegacyStreamType = -1;
}
AudioAttributesImplApi21(AudioAttributes audioAttributes) {
this(audioAttributes, -1);
}
AudioAttributesImplApi21(AudioAttributes audioAttributes, int i) {
this.mLegacyStreamType = -1;
this.mAudioAttributes = audioAttributes;
this.mLegacyStreamType = i;
}
static Method getAudioAttributesToLegacyStreamTypeMethod() {
try {
if (sAudioAttributesToLegacyStreamType == null) {
sAudioAttributesToLegacyStreamType = AudioAttributes.class.getMethod("toLegacyStreamType", new Class[]{AudioAttributes.class});
}
return sAudioAttributesToLegacyStreamType;
} catch (NoSuchMethodException unused) {
return null;
}
}
public Object getAudioAttributes() {
return this.mAudioAttributes;
}
public int getVolumeControlStream() {
if (VERSION.SDK_INT >= 26) {
return this.mAudioAttributes.getVolumeControlStream();
}
return AudioAttributesCompat.toVolumeStreamType(true, getFlags(), getUsage());
}
public int getLegacyStreamType() {
int i = this.mLegacyStreamType;
if (i != -1) {
return i;
}
Method audioAttributesToLegacyStreamTypeMethod = getAudioAttributesToLegacyStreamTypeMethod();
String str = TAG;
if (audioAttributesToLegacyStreamTypeMethod == null) {
StringBuilder sb = new StringBuilder();
sb.append("No AudioAttributes#toLegacyStreamType() on API: ");
sb.append(VERSION.SDK_INT);
Log.w(str, sb.toString());
return -1;
}
try {
return ((Integer) audioAttributesToLegacyStreamTypeMethod.invoke(null, new Object[]{this.mAudioAttributes})).intValue();
} catch (IllegalAccessException | InvocationTargetException e) {
StringBuilder sb2 = new StringBuilder();
sb2.append("getLegacyStreamType() failed on API: ");
sb2.append(VERSION.SDK_INT);
Log.w(str, sb2.toString(), e);
return -1;
}
}
public int getRawLegacyStreamType() {
return this.mLegacyStreamType;
}
public int getContentType() {
return this.mAudioAttributes.getContentType();
}
public int getUsage() {
return this.mAudioAttributes.getUsage();
}
public int getFlags() {
return this.mAudioAttributes.getFlags();
}
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putParcelable("androidx.media.audio_attrs.FRAMEWORKS", this.mAudioAttributes);
int i = this.mLegacyStreamType;
if (i != -1) {
bundle.putInt("androidx.media.audio_attrs.LEGACY_STREAM_TYPE", i);
}
return bundle;
}
public int hashCode() {
return this.mAudioAttributes.hashCode();
}
public boolean equals(Object obj) {
if (!(obj instanceof AudioAttributesImplApi21)) {
return false;
}
return this.mAudioAttributes.equals(((AudioAttributesImplApi21) obj).mAudioAttributes);
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("AudioAttributesCompat: audioattributes=");
sb.append(this.mAudioAttributes);
return sb.toString();
}
public static AudioAttributesImpl fromBundle(Bundle bundle) {
if (bundle == null) {
return null;
}
AudioAttributes audioAttributes = (AudioAttributes) bundle.getParcelable("androidx.media.audio_attrs.FRAMEWORKS");
if (audioAttributes == null) {
return null;
}
return new AudioAttributesImplApi21(audioAttributes, bundle.getInt("androidx.media.audio_attrs.LEGACY_STREAM_TYPE", -1));
}
}
|
[
"M0N5T3R159753@nym.hush.com"
] |
M0N5T3R159753@nym.hush.com
|
797908a7b7cd0c38c7b3562ec42cc91a1688e9b3
|
d6cf0a1e2de8ab10200f075b0a12f0972efe27c7
|
/is-order-api/src/main/java/com/imooc/security/order/PriceInfo.java
|
eb0aeb0c5878f0be743f2746ac68d64d13c0be5b
|
[] |
no_license
|
yichengjie/spring-cloud-study3
|
ef418e0c2330d57df1a49caf86eb72f3f8450c5c
|
0de1113848cf186a68c261375f1d6caec00a39cf
|
refs/heads/master
| 2023-07-26T02:41:59.134982
| 2020-07-15T07:11:33
| 2020-07-15T07:11:33
| 195,050,058
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 428
|
java
|
package com.imooc.security.order;
import lombok.Data;
import java.math.BigDecimal;
/**
* ClassName: PriceInfo
* Description: TODO(描述)
* Date: 2020/7/4 18:54
*
* @author yicj(626659321 @ qq.com)
* 修改记录
* @version 产品版本信息 yyyy-mm-dd 姓名(邮箱) 修改信息
*/
@Data
public class PriceInfo {
// id
private Long id ;
// 价格
private BigDecimal price ;
}
|
[
"626659321@qq.com"
] |
626659321@qq.com
|
e1978f69cbe3a9a59d84330160da9afb38cba16f
|
d98d525e986ba6d8f183312de3c0a76f0867975f
|
/twitter4j-core/src/internal-json/java/twitter4j/QuotedStatusPermalinkJSONImpl.java
|
29d9ab41958b6d922d813e9419734e22162bd773
|
[
"Apache-2.0"
] |
permissive
|
dk8996/twitter4j
|
66dbaed523baacda029994fbe938e47eb40c0075
|
4c714cacdd8bbbc8ce73188723a2eaebc3a16e35
|
refs/heads/master
| 2022-03-07T20:08:07.567762
| 2022-02-24T17:13:07
| 2022-02-24T17:13:07
| 47,640,668
| 7
| 7
|
Apache-2.0
| 2022-02-24T17:13:08
| 2015-12-08T18:19:42
|
Java
|
UTF-8
|
Java
| false
| false
| 3,489
|
java
|
/*
* Copyright 2007 Yusuke Yamamoto
*
* 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 twitter4j;
/**
* A data class representing permalink of the quoted status
*
* @author Hiroaki Takeuchi - takke30 at gmail.com
* @since Twitter4J 4.0.7
*/
/* package */ final class QuotedStatusPermalinkJSONImpl extends EntityIndex implements URLEntity {
private static final long serialVersionUID = -9029983811168784541L;
private String url;
private String expandedURL;
private String displayURL;
/* package */ QuotedStatusPermalinkJSONImpl(JSONObject json) throws TwitterException {
super();
init(json);
}
/* For serialization purposes only. */
/* package */ QuotedStatusPermalinkJSONImpl() {
}
private void init(JSONObject json) throws TwitterException {
try {
if (!json.isNull("url")) {
this.url = json.getString("url");
}
if (!json.isNull("expanded")) {
this.expandedURL = json.getString("expanded");
} else {
this.expandedURL = url;
}
if (!json.isNull("display")) {
this.displayURL = json.getString("display");
} else {
this.displayURL = url;
}
} catch (JSONException jsone) {
throw new TwitterException(jsone);
}
}
@Override
public String getText() {
return url;
}
@Override
public String getURL() {
return url;
}
@Override
public String getExpandedURL() {
return expandedURL;
}
@Override
public String getDisplayURL() {
return displayURL;
}
@Override
public int getStart() {
return super.getStart();
}
@Override
public int getEnd() {
return super.getEnd();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
QuotedStatusPermalinkJSONImpl that = (QuotedStatusPermalinkJSONImpl) o;
if (url != null ? !url.equals(that.url) : that.url != null) return false;
if (expandedURL != null ? !expandedURL.equals(that.expandedURL) : that.expandedURL != null) return false;
return displayURL != null ? displayURL.equals(that.displayURL) : that.displayURL == null;
}
@Override
public int hashCode() {
int result = url != null ? url.hashCode() : 0;
result = 31 * result + (expandedURL != null ? expandedURL.hashCode() : 0);
result = 31 * result + (displayURL != null ? displayURL.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "QuotedStatusPermalinkJSONImpl{" +
"url='" + url + '\'' +
", expandedURL='" + expandedURL + '\'' +
", displayURL='" + displayURL + '\'' +
'}';
}
}
|
[
"yusuke@mac.com"
] |
yusuke@mac.com
|
f5eedd69b8f8c1ff37d3c2b14481954f6adeb20f
|
d3ce0969af8305fa333ab823315929cf693b232d
|
/src/main/java/br/com/z5/jhiapp/config/LocaleConfiguration.java
|
a6429361cebe6a7676a87275ab57d7503583d6b3
|
[] |
no_license
|
Z5Tech/z5-JHI-app
|
ff63b42d2e2a5723a545c63cd874b7ad0ce732e9
|
f6a0044504787a302a09cc72e28023632f6098ca
|
refs/heads/main
| 2023-04-02T00:48:01.336054
| 2021-04-06T19:28:39
| 2021-04-06T19:28:39
| 355,306,948
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,028
|
java
|
package br.com.z5.jhiapp.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.*;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import tech.jhipster.config.locale.AngularCookieLocaleResolver;
@Configuration
public class LocaleConfiguration implements WebMvcConfigurer {
@Bean
public LocaleResolver localeResolver() {
AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver();
cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY");
return cookieLocaleResolver;
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("language");
registry.addInterceptor(localeChangeInterceptor);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
9eda97fad24035ab4a985030aa127d84c4490721
|
032a62a517747d6f042223eff9377efb4104f0d2
|
/MiniGameAPI/src/minigame/view/MenuItem.java
|
f7dfe5bb0cfc3d4f14721d7aa92181ba97286e40
|
[] |
no_license
|
SimonAtelier/MiniGameAPI
|
294aac79326436ab877b25ef3078c4852b4b2b21
|
681c79562a4586bb5d8c7e16b1084e8ca84ce34e
|
refs/heads/master
| 2023-04-15T02:51:10.075607
| 2021-04-30T15:32:05
| 2021-04-30T15:32:05
| 357,438,781
| 0
| 1
| null | 2021-04-13T11:25:02
| 2021-04-13T05:51:20
|
Java
|
UTF-8
|
Java
| false
| false
| 476
|
java
|
package minigame.view;
import java.util.List;
public interface MenuItem {
int getAmount();
void setAmount(int amount);
int getSlotIndex();
void setSlotIndex(int slotIndex);
String getName();
void setName(String name);
String getIcon();
void setIcon(String icon);
ActionHandler getActionHandler();
void setActionHandler(ActionHandler actionHandler);
void addLoreLine(String line);
List<String> getLore();
}
|
[
"simon_atelier@web.de"
] |
simon_atelier@web.de
|
9d85baae887baf09fd7bfc46e8bf25eec3207f1f
|
2b438c607ca0b2ee575eec4752cc7c5c7792f4cc
|
/payments-citypay-sberbank/src/test/java/bc/payment/citypay/resource/TempResourceTest.java
|
bb5d306e05fa1a319323fa0e88552d2e970bd82d
|
[] |
no_license
|
cherkavi/java-code-example
|
a94a4c5eebd6fb20274dc4852c13e7e8779a7570
|
9c640b7a64e64290df0b4a6820747a7c6b87ae6d
|
refs/heads/master
| 2023-02-08T09:03:37.056639
| 2023-02-06T15:18:21
| 2023-02-06T15:18:21
| 197,267,286
| 0
| 4
| null | 2022-12-15T23:57:37
| 2019-07-16T21:01:20
|
Java
|
UTF-8
|
Java
| false
| false
| 622
|
java
|
package bc.payment.citypay.resource;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import bc.utils.RestUtils;
public class TempResourceTest extends AbstractEmbeddedJetty{
@Before
public void init(){
super.init();
}
@After
public void destroy(){
super.destroy();
}
@Test
public void test(){
// given
String message="hello";
// when
String data=RestUtils.getString(getBaseUrl()+"temp/echo?message="+message);
// then
Assert.assertEquals(message, data);
}
private String getBaseUrl(){
return "http://localhost:"+DEFAULT_PORT+"/";
}
}
|
[
"technik7job@gmail.com"
] |
technik7job@gmail.com
|
e76242f4ea7bd44d6211adbda674aac6e5b85841
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/workspaceapp/src/main/java/com/huaweicloud/sdk/workspaceapp/v1/model/PcscBandwidthPercentageOptions.java
|
301ca1e9fe5f32b48f381d8e99185e92600a102a
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 2,308
|
java
|
package com.huaweicloud.sdk.workspaceapp.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* PcscBandwidthPercentageOptions
*/
public class PcscBandwidthPercentageOptions {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "pcsc_bandwidth_percentage_value")
private Integer pcscBandwidthPercentageValue;
public PcscBandwidthPercentageOptions withPcscBandwidthPercentageValue(Integer pcscBandwidthPercentageValue) {
this.pcscBandwidthPercentageValue = pcscBandwidthPercentageValue;
return this;
}
/**
* PCSC带宽百分比控制量(%)。取值范围为[0-100]。默认:5。
* minimum: 0
* maximum: 100
* @return pcscBandwidthPercentageValue
*/
public Integer getPcscBandwidthPercentageValue() {
return pcscBandwidthPercentageValue;
}
public void setPcscBandwidthPercentageValue(Integer pcscBandwidthPercentageValue) {
this.pcscBandwidthPercentageValue = pcscBandwidthPercentageValue;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
PcscBandwidthPercentageOptions that = (PcscBandwidthPercentageOptions) obj;
return Objects.equals(this.pcscBandwidthPercentageValue, that.pcscBandwidthPercentageValue);
}
@Override
public int hashCode() {
return Objects.hash(pcscBandwidthPercentageValue);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PcscBandwidthPercentageOptions {\n");
sb.append(" pcscBandwidthPercentageValue: ")
.append(toIndentedString(pcscBandwidthPercentageValue))
.append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
966790016357faeefab938c3a2af2763b1bebc29
|
29be9115918d0fd73606657bb1cb9074c928d2fa
|
/camel/jbpm-workitems-camel/src/main/java/org/jbpm/process/workitem/camel/response/ResponseMapper.java
|
33f28655772c04f6515ad85e63c92c07169de117
|
[
"Apache-2.0"
] |
permissive
|
jiripetrlik/fuse-bxms-integ
|
662b21321be296f78c719594b8f63c266a12b4fb
|
4b2f63e87c3fb1d67f4b85fb5415dc696092735b
|
refs/heads/master
| 2020-12-30T22:57:29.235327
| 2015-11-27T12:51:32
| 2015-11-27T13:38:56
| 38,488,307
| 0
| 1
| null | 2015-07-03T10:57:23
| 2015-07-03T10:57:22
| null |
UTF-8
|
Java
| false
| false
| 206
|
java
|
package org.jbpm.process.workitem.camel.response;
import java.util.Map;
import org.apache.camel.Exchange;
public interface ResponseMapper {
Map<String, Object> mapFromResponse(Exchange exchange);
}
|
[
"kris.verlaenen@gmail.com"
] |
kris.verlaenen@gmail.com
|
208916b39227396b8df8221fca9d7ce4bc0efbde
|
88d3adf0d054afabe2bc16dc27d9e73adf2e7c61
|
/vietspiderdb/src/main/java/org/vietspider/db/link/track/SourceTrackerStorage2.java
|
251e794faf94dcb176796f53764e34763bf0a94b
|
[
"Apache-2.0"
] |
permissive
|
nntoan/vietspider
|
5afc8d53653a1bb3fc2e20fb12a918ecf31fdcdc
|
79d563afea3abd93f7fdff5bcecb5bac2162d622
|
refs/heads/master
| 2021-01-10T06:23:20.588974
| 2020-05-06T09:44:32
| 2020-05-06T09:44:32
| 54,641,132
| 0
| 2
| null | 2020-05-06T07:52:29
| 2016-03-24T12:45:02
|
Java
|
UTF-8
|
Java
| false
| false
| 5,835
|
java
|
package org.vietspider.db.link.track;
import java.io.File;
import java.io.FileOutputStream;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import jdbm.PrimaryStoreMap;
import jdbm.RecordManager;
import jdbm.RecordManagerFactory;
import jdbm.SecondaryKeyExtractor;
import jdbm.SecondaryTreeMap;
import org.vietspider.common.Application;
import org.vietspider.common.io.LogService;
import org.vietspider.common.io.UtilFile;
//http://code.google.com/p/jdbm2/
public class SourceTrackerStorage2 {
private static final long serialVersionUID = 1L;
private final static int MAX_RECORD = 10;
private RecordManager recman;
private PrimaryStoreMap<Long, SourceTracker> main;
private long lastAccess;
private SecondaryTreeMap<Integer, Long, SourceTracker> idIndex;
private SecondaryTreeMap<String, Long, SourceTracker> channelIndex;
private int counter;
private String dateFolder;
public SourceTrackerStorage2(String dateFolder) throws Exception {
this.dateFolder = dateFolder;
File file = new File(UtilFile.getFolder("track/logs/sources/" + dateFolder + "/summary"), "data");
recman = RecordManagerFactory.createRecordManager(file.getAbsolutePath());
//class jdbm.helper.PrimaryStoreMapImpl
main = recman.storeMap("source_tracker");
// PrimaryTreeMap<Integer, byte[]> treeMap = recman.treeMap("tete");
idIndex = main.secondaryTreeMap("idIndex",
new SecondaryKeyExtractor<Integer, Long, SourceTracker>() {
@SuppressWarnings("unused")
public Integer extractSecondaryKey(Long key, SourceTracker value) {
return value.getId();
}
});
channelIndex = main.secondaryTreeMap("channelIndex",
new SecondaryKeyExtractor<String, Long, SourceTracker>() {
@SuppressWarnings("unused")
public String extractSecondaryKey(Long key, SourceTracker value) {
return value.getFullName();
}
});
}
public long size() { return main.size(); }
void add(LinkLog log) {
String fullname = log.getChannel();
int id = fullname.hashCode();
SourceTracker tracker = getById(id);
if(tracker != null) {
tracker.add(log);
} else {
tracker = new SourceTracker(log);
}
save(tracker);
}
private void save(SourceTracker log) {
lastAccess = System.currentTimeMillis();
if(log.getStorageId() != null) {
main.put(log.getStorageId(), log);
} else {
main.putValue(log);
}
counter++;
if(counter < MAX_RECORD) return;
counter = 0;
try {
recman.commit();
} catch (Exception e) {
LogService.getInstance().setMessage(e, e.toString());
}
}
public Collection<SourceTracker> get() {
lastAccess = System.currentTimeMillis();
return main.values();
}
public List<SourceTracker> get(String channel) {
lastAccess = System.currentTimeMillis();
List<SourceTracker> list = new ArrayList<SourceTracker>();
for(SourceTracker log : channelIndex.getPrimaryValues(channel)){
list.add(log);
}
return list;
}
public SourceTracker getById(int id) {
lastAccess = System.currentTimeMillis();
Iterable<Long> iterable = idIndex.get(id);
if(iterable == null) return null;
Iterator<Long> keyIterator = iterable.iterator();
if(keyIterator.hasNext()) {
Long key = keyIterator.next();
SourceTracker log = main.get(key);
log.setStorageId(key);
return log;
}
return null;
}
boolean isTimeout() {
if(System.currentTimeMillis() - lastAccess >= 15*60*1000l) return true;
return false;
}
public void export() {
File folder = UtilFile.getFolder("track/logs/sources/" + dateFolder);
File file = new File(folder, "summary.txt");
try {
if(file.exists()) {
if(System.currentTimeMillis() - file.lastModified() < 15*60*1000l) return;
file.delete();
}
file.createNewFile();
} catch (Exception e) {
LogService.getInstance().setThrowable(e);
}
FileOutputStream output = null;
FileChannel channel = null;
try {
output = new FileOutputStream(file, true);
channel = output.getChannel();
StringBuilder builder = new StringBuilder(100);
Collection<SourceTracker> list = main.values();
// System.out.println(" === > "+list.size());
for(SourceTracker tracker : list) {
builder.append(tracker.toString()).append('\n');
if(builder.length() < 1000) continue;
byte [] data = builder.toString().getBytes(Application.CHARSET);
builder.setLength(0);
ByteBuffer buff = ByteBuffer.allocateDirect(data.length);
buff.put(data);
buff.rewind();
if(channel.isOpen()) channel.write(buff);
buff.clear();
}
builder.append("\n\n");
byte [] data = builder.toString().getBytes(Application.CHARSET);
ByteBuffer buff = ByteBuffer.allocateDirect(data.length);
buff.put(data);
buff.rewind();
if(channel.isOpen()) channel.write(buff);
buff.clear();
} catch (Exception e) {
LogService.getInstance().setThrowable(e);
} finally {
try {
if(channel != null) channel.close();
} catch (Exception e) {
LogService.getInstance().setThrowable(e);
}
try {
if(output != null) output.close();
} catch (Exception e) {
LogService.getInstance().setThrowable(e);
}
}
}
public void close() {
try {
recman.commit();
} catch (Exception e) {
LogService.getInstance().setThrowable(e);
}
try {
recman.close();
} catch (Exception e) {
LogService.getInstance().setThrowable(e);
}
}
}
|
[
"nntoan@users.noreply.github.com"
] |
nntoan@users.noreply.github.com
|
c553b8ad81dd0df496c24f3341b6638cc59a5134
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/22/22_e34f39dcbf353d4bf117af51f2bff6ee31e934c8/SaikuConnector/22_e34f39dcbf353d4bf117af51f2bff6ee31e934c8_SaikuConnector_t.java
|
62c51504a2e6cecaa67e253ac8faa6032ab3c13b
|
[] |
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,210
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package pt.webdetails.cdb.connector;
import org.json.JSONException;
import org.json.JSONObject;
import pt.webdetails.cda.connections.Connection;
import pt.webdetails.cda.connections.mondrian.JndiConnection;
import pt.webdetails.cda.connections.mondrian.MondrianJndiConnectionInfo;
import pt.webdetails.cda.dataaccess.DataAccess;
import pt.webdetails.cda.dataaccess.MdxDataAccess;
import pt.webdetails.cpf.repository.RepositoryUtils;
/**
*
* @author pdpi
*/
public class SaikuConnector implements Connector {
private static final String path = "cdb/saiku";
@Override
public DataAccess exportCdaDataAccess(JSONObject query) {
String id, name, queryContent;
try {
id = query.getString("name");
JSONObject definition = new JSONObject(query.getString("definition"));
name = id;
queryContent = definition.getString("query");
DataAccess dataAccess = new MdxDataAccess(id, name, id, queryContent);
//dataAccess;
return dataAccess;
} catch (JSONException e) {
return null;
}
}
@Override
public Connection exportCdaConnection(JSONObject query) {
String jndi, catalog, cube, id;
try {
id = query.getString("name");
JSONObject definition = new JSONObject(query.getString("definition"));
jndi = definition.getString("jndi");
cube = definition.getString("cube");
catalog = definition.getString("catalog");
MondrianJndiConnectionInfo cinfo = new MondrianJndiConnectionInfo(jndi, catalog, cube);
Connection conn = new JndiConnection(id, cinfo);
return conn;
} catch (JSONException e) {
return null;
}
}
@Override
public void copyQuery(String oldGuid, String newGuid) {
String newFileName = newGuid + ".saiku",
oldFileName = oldGuid + ".saiku";
RepositoryUtils.copySolutionFile(path, oldFileName, path, newFileName);
}
@Override
public void deleteQuery(String guid) {
String fileName = guid + ".saiku";
RepositoryUtils.deleteSolutionFile(path, fileName);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7147663bb029b0770603c87fe7d0dc3bd66df100
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_ca37aacb9a8ae00cf78cf438c8960c9187f6b636/LocaleMessage/9_ca37aacb9a8ae00cf78cf438c8960c9187f6b636_LocaleMessage_s.java
|
a21b55f2b2d78ca387892fdd3f2a3cac80c25e4a
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,028
|
java
|
package com.turt2live.antishare.lang;
public enum LocaleMessage{
UPDATE_READY("update-ready"),
UPDATE_LINK("update-link"),
BUG_FILES_REMOVE("bug-files-removed"),
ENABLED("enabled"),
DISABLED("disabled"),
RELOADING("reloading"),
RELOADED("reloaded"),
NO_PERMISSION("no-permission"),
NOT_A_PLAYER("not-a-player"),
SYNTAX("syntax"),
NO_REGIONS("no-regions"),
EXTENDED_HELP("help"),
REGION_CREATED("region-created"),
REGION_SAVED("region-saved"),
REGION_REMOVED("region-removed"),
HAVE_TOOL("tool-have"),
GET_TOOL("tool-get"),
NO_CUBOID_TOOL("no-cuboid-tool"),
NOT_ENABLED("not-enabled"),
FINE_REWARD_TOGGLE("fine-reward-toggle"),
FINE_REWARD("fine-reward"),
NEED_INV_SPACE("inv-space"),
MIRROR_WELCOME("inv-welcome"),
MIRROR_WELCOME_ENDER("ender-welcome"),
MIRROR_EDIT("inv-edit"),
TOOL_GENERIC("tool.generic"),
TOOL_SET("tool.set"),
TOOL_CUBOID("tool.cuboid"),
CUBOID_REMOVED("cuboid.removed"),
CUBOID_MISSING("cuboid.missing"),
SN_ON("simplenotice.on"),
SN_OFF("simplenotice.off"),
SN_MISSING("simplenotice.missing"),
TOOL_ENABLE("tool.toggle-on"),
TOOL_DISABLE("tool.toggle-off"),
ERROR_INVENTORIES("error.inventories"),
ERROR_NO_PLAYER("error.no-player"),
ERROR_ASSUME("error.assume"),
ERROR_INV_MISSING("error.inv-missing"),
ERROR_UNKNOWN("error.unknown"),
ERROR_NO_CUBOID_TOOL("error.cuboid-tool"),
ERROR_NAME_IN_USE("error.name-used"),
ERROR_REGION_MISSING("error.no-region"),
ERROR_REGION_STAND_MISSING("error.no-stand-region"),
ERROR_NO_PAGE("error.page"),
ERROR_BAD_FILE("error.bad-file"),
ERROR_BAD_KEY("error.bad-key"),
ERROR_NO_VAULT("error.no-vault"),
ERROR_ONLY_CLEAR("error.cannot-set"),
ERROR_NO_MONEY_TAB("error.no-money-tab"),
ERROR_NO_MONEY_VAULT("error.no-money-vault"),
ERROR_WORLD_SPLIT("error.world-split"),
START_CHECK_CONFIG("startup.config"),
START_VERSION_STRING("startup.version-string"),
START_SIMPLENOTICE("startup.simplenotice"),
START_OFFLINE_1("startup.offline.line1"),
START_OFFLINE_2("startup.offline.line2"),
START_OFFLINE_3("startup.offline.line3"),
START_SETUP("startup.setup"),
START_START("startup.start"),
START_REGISTER("startup.register"),
START_SCHEDULE("startup.schedule"),
START_COMPAT_FOLDERS("startup.compat.folders"),
START_COMPAT_BLOCKS("startup.compat.blocks"),
START_COMPAT_WORLDS("startup.compat.worlds"),
START_COMPAT_PLAYERS("startup.compat.players"),
START_COMPAT_INVENTORIES("startup.compat.inventories"),
START_COMPAT_CLEANUP("startup.compat.cleanup"),
STOP_FLUSH("shutdown.flush"),
STOP_SAVE("shutdown.save"),
RELOAD_RELOAD("reload.reload"),
SERVICE_METRICS("service.metrics"),
SERVICE_SIMPLE_NOTICE("service.simplenotice"),
SERVICE_BLOCKS("service.blocks"),
SERVICE_INVENTORIES("service.inventories"),
SERVICE_SIGNS("service.signs"),
SERVICE_PERMISSIONS("service.permissions"),
SERVICE_ITEM_MAP("service.item-map"),
SERVICE_METRICS_TRACKERS("service.metrics-trackers"),
SERVICE_LISTENER("service.listener"),
SERVICE_ALERTS("service.alerts"),
SERVICE_MESSAGES("service.messages"),
SERVICE_UPDATE("service.update"),
SERVICE_COMMANDS("service.commands"),
SERVICE_REGION_INVENTORY_UPDATE("service.region-inventory-update"),
SERVICE_REGIONS("service.regions"),
SERVICE_FEATURES("service.features"),
SERVICE_CUBOID("service.cuboid"),
SERVICE_MONEY("service.money"),
SERVICE_HOOKS("service.hooks"),
SERVICE_WORLD_CONFIG("service.world-configs"),
DICT_DIRECTORY("dictionary.directory"),
DICT_CONFIG_FILES("dictionary.config-files"),
DICT_INVENTORY("dictionary.inventory"),
DICT_WORLD("dictionary.world"),
DICT_NUMBER("dictionary.number"),
DICT_IS_IN("dictionary.is-in"),
DICT_NO_ONE("dictionary.no-one"),
DICT_KEY("dictionary.key"),
DICT_VALUE("dictionary.value"),
DICT_REGIONS("dictionary.regions"),
DICT_GETTING("dictionary.getting"),
DICT_NOT_GETTING("dictionary.not-getting"),
DICT_NOT_SET("dictionary.not-set"),
DICT_SET_AS("dictionary.set-as"),
DICT_NATURAL("dictionary.natural"),
DICT_IS("dictionary.is"),
DICT_WAS("dictionary.was"),
DICT_THAT("dictionary.that"),
DICT_BLOCK("dictionary.block"),
DICT_REMOVED("dictionary.removed"),
STATUS_INVENTORIES("status.inventories"),
STATUS_CREATIVE_BLOCKS("status.creative-blocks"),
STATUS_SURVIVAL_BLOCKS("status.survival-blocks"),
STATUS_ADVENTURE_BLOCKS("status.adventure-blocks"),
STATUS_CREATIVE_ENTITIES("status.creative-entities"),
STATUS_SURVIVAL_ENTITIES("status.survival-entities"),
STATUS_ADVENTURE_ENTITIES("status.adventure-entities"),
STATUS_CUBOIDS("status.cuboids"),
STATUS_FINES("status.fines"),
STATUS_REWARDS("status.rewards"),
STATUS_REGIONS("status.regions"),
STATUS_SIGNS("status.signs"),
STATUS_LINKED_INVENTORIES("status.linked-inventories"),
STATUS_CLEAN("status.clean"),
STATUS_ARCHIVE("status.archive"),
STATUS_INV_CONVERT("status.inv-convert"),
STATUS_REGION_MIGRATE("status.region-migrate"),
STATUS_BLOCKS_CONVERTED("status.blocks-converted"),
STATUS_WORLD_MIGRATE("status.world-migrate"),
BLOCK_MAN_WAIT("blockman.wait"),
BLOCK_MAN_PERCENT("blockman.percent"),
TAB_NONE("tab.no-more"),
TAB_REGION("tab.region"),
TAB_REMOVE_REGION("tab.rmregion"),
TAB_EDIT_REGION("tab.editregion"),
TAB_LIST_REGION("tab.listregion"),
WARNING_REMOVE_WORLD("warning.remove-world"),
WARNING_REMOVE_WORLD2("warning.remove-world2"),
WARNING_MOVE_BLOCK("warning.move-block"),
FINES_REWARDS_FINE_FAILED("fines-and-rewards.fine.failed"),
FINES_REWARDS_FINE_SUCCESS("fines-and-rewards.fine.success"),
FINES_REWARDS_REWARD_FAILED("fines-and-rewards.reward.failed"),
FINES_REWARDS_REWARD_SUCCESS("fines-and-rewards.reward.success"),
FINES_REWARDS_BALANCE("fines-and-rewards.balance"),
PHRASE_CREATE("phrase.create-a"),
PHRASE_SPAWN("phrase.spawned-a"),
PHRASE_BREAK("phrase.break-a"),
PHRASE_BROKE("phrase.broke"),
PHRASE_PLACE("phrase.place-a"),
PHRASE_PLACED("phrase.placed"),
PHRASE_USE("phrase.use-a"),
PHRASE_USED("phrase.used"),
PHRASE_THROW("phrase.throw-a"),
PHRASE_THREW("phrase.threw"),
PHRASE_PICK("phrase.picked-a"),
PHRASE_PICKED("phrase.picked"),
PHRASE_DIED("phrase.died"),
PHRASE_COMMAND("phrase.command"),
PHRASE_COMMANDED("phrase.commanded"),
PHRASE_HIT_A("phrase.hit-a"),
PHRASE_HIT("phrase.hit"),
PHRASE_CRAFT("phrase.crafted-a"),
PHRASE_CRAFTED("phrase.crafted"),
PHRASE_INV_CHANGE("phrase.inv-change"),
PHRASE_CHANGE_GAMEMODE("phrase.change-gm"),
PHRASE_COOLDOWN("phrase.wait"),
PHRASE_REGION("phrase.not-in-region"),
PHRASE_CANNOT_CHANGE("phrase.no-gm-change"),
PHRASE_GM_BREAK("phrase.gm-break"),
PHRASE_GM_BROKE("phrase.gm-broke"),
PHRASE_ATTACH("phrase.attach-a"),
PHRASE_ATTACHED("phrase.attached"),
PHRASE_REGION_ENTER("phrase.region-enter"),
PHRASE_REGION_LEAVE("phrase.region-leave");
private String node;
private LocaleMessage(String node){
this.node = node;
}
public String getConfigurationNode(){
return node;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
25d30c22178b2f1ab97f4e0a42b072eb59d666b2
|
11fa8dcb980983e49877c52ed7e5713e0dca4aad
|
/trunk/src/net/sourceforge/model/admin/query/PriceQueryOrder.java
|
c278ec890b5ea855d7966c3e6653e54a74566a0a
|
[] |
no_license
|
Novthirteen/oa-system
|
0262a6538aa023ededa1254c26c42bc19a70357c
|
c698a0c09bbd6b902700e9ccab7018470c538e70
|
refs/heads/master
| 2021-01-15T16:29:18.465902
| 2009-03-20T12:41:16
| 2009-03-20T12:41:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,084
|
java
|
/* =====================================================================
*
* Copyright (c) Sourceforge INFORMATION TECHNOLOGY All rights reserved.
*
* =====================================================================
*/
package net.sourceforge.model.admin.query;
import org.apache.commons.lang.enums.Enum;
public class PriceQueryOrder extends Enum{
/*id*/
public static final PriceQueryOrder ID = new PriceQueryOrder("id");
/*property*/
public static final PriceQueryOrder ROOM = new PriceQueryOrder("room");
public static final PriceQueryOrder PRICE = new PriceQueryOrder("price");
public static final PriceQueryOrder DISCOUNT = new PriceQueryOrder("discount");
public static final PriceQueryOrder DESCRIPTION = new PriceQueryOrder("description");
public static final PriceQueryOrder ENABLED = new PriceQueryOrder("enabled");
protected PriceQueryOrder(String value) {
super(value);
}
public static PriceQueryOrder getEnum(String value) {
return (PriceQueryOrder) getEnum(PriceQueryOrder.class, value);
}
}
|
[
"novthirteen@1ac4a774-0534-11de-a6e9-d320b29efae0"
] |
novthirteen@1ac4a774-0534-11de-a6e9-d320b29efae0
|
a5c7ebfb3e4a49e59aeebb27e708c166fdf17bd1
|
32d3bf8f2e90a17afa51d617cd66494c65a622b4
|
/app/src/main/java/com/kcirqueit/agecalculator/model/RemainAge.java
|
f1f51d0ef8ebf1cb1131bc86903b644af3f05e56
|
[] |
no_license
|
bd-mahfuz/AgeCalculator
|
8515202b243aba71bd770f235da39493ca64cee3
|
ba3d5690c58dc56818cf1c065a0327b0e05c2b88
|
refs/heads/master
| 2020-05-22T22:34:55.249663
| 2019-05-14T05:18:44
| 2019-05-14T05:18:44
| 186,548,553
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 328
|
java
|
package com.kcirqueit.agecalculator.model;
public class RemainAge {
private int day;
private int month;
public RemainAge(int day, int month) {
this.day = day;
this.month = month;
}
public int getDay() {
return day;
}
public int getMonth() {
return month;
}
}
|
[
"bt23.mahfuz@gmail.com"
] |
bt23.mahfuz@gmail.com
|
1f4b785cdd465f29cc8930e4155013e2e703a2be
|
5e323dff9a1d9377f40ac1365790fdf506e8f92d
|
/src/main/java/com/lasanthasuresh/test/security/SpringSecurityAuditorAware.java
|
c439ec515988096a79ca1918dca69c8684b55051
|
[] |
no_license
|
lasanthasuresh/jhipsterSampleApplication
|
7fb8ab0dd0ae91bf1dcbe0ba8cca5e17ea629874
|
ca8ad1d29cd43c667662017598c2c0ca94034c0a
|
refs/heads/master
| 2021-04-29T17:15:05.706573
| 2018-02-15T18:26:35
| 2018-02-15T18:26:35
| 121,665,450
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 497
|
java
|
package com.lasanthasuresh.test.security;
import com.lasanthasuresh.test.config.Constants;
import org.springframework.data.domain.AuditorAware;
import org.springframework.stereotype.Component;
/**
* Implementation of AuditorAware based on Spring Security.
*/
@Component
public class SpringSecurityAuditorAware implements AuditorAware<String> {
@Override
public String getCurrentAuditor() {
return SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT);
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
032d8b1f35602ecb75777041151962ecc590eb7e
|
bd6fa9a23e8789422d5347d1ef14ccaea9287512
|
/src/main/java/ru/neustupov/restvotingwithspringbootandreact/model/AbstractNamedEntity.java
|
b03dd5165f4730007903b0e084cfeaf0ad76b537
|
[] |
no_license
|
neustupov/rest-voting-with-spring-boot-and-react
|
7e7019eb43f722923ff0b113677ee4b77fa22eef
|
7067ee60140e73dbea1f229b1db82433c339c9d2
|
refs/heads/master
| 2020-03-29T19:52:26.836358
| 2018-11-05T17:39:56
| 2018-11-05T17:39:56
| 150,281,855
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 549
|
java
|
package ru.neustupov.restvotingwithspringbootandreact.model;
import lombok.*;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@ToString
@MappedSuperclass
class AbstractNamedEntity extends AbstractEntity{
@NotNull
@Size(min = 2, max = 100)
private String name;
AbstractNamedEntity(){}
AbstractNamedEntity(Long id, String name){
super(id);
this.name=name;
}
}
|
[
"neustupov@yandex.ru"
] |
neustupov@yandex.ru
|
d2cd5eec89d4a42deda6ebd4144969722b3f3660
|
78165f88de689c9994136fe07dcfc4109ee764a3
|
/samples/s30animation/AnimationSample2.java
|
d59a707ec703fb246f3e6e2a2bbacb2ed7b23dc2
|
[
"MIT"
] |
permissive
|
AndresFRodriguezR/FXGL
|
b81df5c97064bb73dd6aea20fbd0e97c54139295
|
dee5cab05ba3dbd080de7ccf2b8eb528d311da2c
|
refs/heads/master
| 2021-06-09T05:49:29.907612
| 2016-11-27T10:59:49
| 2016-11-27T10:59:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,540
|
java
|
/*
* The MIT License (MIT)
*
* FXGL - JavaFX Game Library
*
* Copyright (c) 2015-2016 AlmasB (almaslvl@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package s30animation;
import com.almasb.ents.Entity;
import com.almasb.fxgl.app.ApplicationMode;
import com.almasb.fxgl.app.GameApplication;
import com.almasb.fxgl.entity.Entities;
import com.almasb.fxgl.input.UserAction;
import com.almasb.fxgl.settings.GameSettings;
import com.almasb.fxgl.texture.AnimatedTexture;
import javafx.scene.input.KeyCode;
import javafx.util.Duration;
/**
* Shows how to use sprite sheet animations.
* Shows how to properly dispose of textures.
*
* @author Almas Baimagambetov (AlmasB) (almaslvl@gmail.com)
*/
public class AnimationSample2 extends GameApplication {
@Override
protected void initSettings(GameSettings settings) {
settings.setWidth(800);
settings.setHeight(600);
settings.setTitle("AnimationSample2");
settings.setVersion("0.1");
settings.setFullScreen(false);
settings.setIntroEnabled(false);
settings.setMenuEnabled(false);
settings.setShowFPS(true);
settings.setApplicationMode(ApplicationMode.DEVELOPER);
}
@Override
protected void initInput() {
getInput().addAction(new UserAction("Clean") {
@Override
protected void onActionBegin() {
if (playerTexture != null) {
// when cleaning first remove the entity using the texture
getGameWorld().getEntities().forEach(Entity::removeFromWorld);
// dispose of the texture
playerTexture.dispose();
// nullify the reference to texture
playerTexture = null;
}
}
}, KeyCode.F);
}
private AnimatedTexture playerTexture;
@Override
protected void initAssets() {
playerTexture = getAssetLoader().loadTexture("player.png")
.toAnimatedTexture(3, Duration.seconds(0.33));
}
@Override
protected void initGame() {
Entities.builder()
.at(150, 150)
.viewFromNode(playerTexture)
.buildAndAttach(getGameWorld());
}
@Override
protected void initPhysics() {}
@Override
protected void initUI() {}
@Override
protected void onUpdate(double tpf) {}
public static void main(String[] args) {
launch(args);
}
}
|
[
"almaslvl@gmail.com"
] |
almaslvl@gmail.com
|
25dc32efdb0a1cc5b7717be8c9a8712455b14138
|
0ccbf91b11e5212b5179e9a1979362106f30fccd
|
/misc/instrumentation/parsers/release/src/org/gbt2/instrumentation/cobol85/syntaxtree/RelativeKeyClause.java
|
4c01a0e65302417227fdd48c96a0b54db6e08a88
|
[] |
no_license
|
fmselab/codecover2
|
e3161be22a1601a4aa00f2933fb7923074aea2ce
|
9ad4be4b7e54c49716b71b3e81937404ab5af9c6
|
refs/heads/master
| 2023-02-21T05:22:00.372690
| 2021-03-08T22:04:17
| 2021-03-08T22:04:17
| 133,975,747
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,943
|
java
|
///////////////////////////////////////////////////////////////////////////////
//
// $Id: RelativeKeyClause.java 1 2007-12-12 17:37:26Z t-scheller $
//
///////////////////////////////////////////////////////////////////////////////
//
// Generated by JTB 1.3.2
//
package org.gbt2.instrumentation.cobol85.syntaxtree;
/**
* Grammar production:
* <PRE>
* f0 -> <RELATIVE>
* f1 -> [ <KEY> ]
* f2 -> [ <IS> ]
* f3 -> QualifiedDataName()
* </PRE>
*/
public class RelativeKeyClause implements Node {
private Node parent;
public NodeToken f0;
public NodeOptional f1;
public NodeOptional f2;
public QualifiedDataName f3;
public RelativeKeyClause(NodeToken n0, NodeOptional n1, NodeOptional n2, QualifiedDataName n3) {
f0 = n0;
if ( f0 != null ) f0.setParent(this);
f1 = n1;
if ( f1 != null ) f1.setParent(this);
f2 = n2;
if ( f2 != null ) f2.setParent(this);
f3 = n3;
if ( f3 != null ) f3.setParent(this);
}
public RelativeKeyClause(NodeOptional n0, NodeOptional n1, QualifiedDataName n2) {
f0 = new NodeToken("relative");
if ( f0 != null ) f0.setParent(this);
f1 = n0;
if ( f1 != null ) f1.setParent(this);
f2 = n1;
if ( f2 != null ) f2.setParent(this);
f3 = n2;
if ( f3 != null ) f3.setParent(this);
}
public void accept(org.gbt2.instrumentation.cobol85.visitor.Visitor v) {
v.visit(this);
}
public <R,A> R accept(org.gbt2.instrumentation.cobol85.visitor.GJVisitor<R,A> v, A argu) {
return v.visit(this,argu);
}
public <R> R accept(org.gbt2.instrumentation.cobol85.visitor.GJNoArguVisitor<R> v) {
return v.visit(this);
}
public <A> void accept(org.gbt2.instrumentation.cobol85.visitor.GJVoidVisitor<A> v, A argu) {
v.visit(this,argu);
}
public void setParent(Node n) { parent = n; }
public Node getParent() { return parent; }
}
|
[
"angelo.gargantini@unibg.it"
] |
angelo.gargantini@unibg.it
|
677fd15aa49e7d86be622f71f5fe8642da8142ce
|
0e151996606e14ecac603ab8299d1b124c51c66f
|
/src/main/java/org/bian/dto/BQFunctionalRequirementsRequestOutputModel.java
|
03e52c81e8f0673eb735891ef260f3ad52abd442
|
[
"Apache-2.0"
] |
permissive
|
bianapis/sd-credit-risk-models-v3
|
ecd2ee21e7509e33b2fa84a776bbfecba0bb00bc
|
799ae82b0e9c438199c8a912f4551ca8fde7d8b4
|
refs/heads/master
| 2022-12-27T13:06:53.982795
| 2020-10-04T14:56:47
| 2020-10-04T14:56:47
| 301,147,730
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,314
|
java
|
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
/**
* BQFunctionalRequirementsRequestOutputModel
*/
public class BQFunctionalRequirementsRequestOutputModel {
private String functionalRequirementsPreconditions = null;
private String functionalRequirementsSpecificationSchedule = null;
private String functionalRequirementsVersionNumber = null;
private String businessService = null;
private String serviceType = null;
private String serviceDescription = null;
private String serviceInputsandOuputs = null;
private String serviceWorkProduct = null;
private String functionalRequirementsRequestActionTaskReference = null;
private Object functionalRequirementsRequestActionTaskRecord = null;
private String functionalRequirementsRequestRecordReference = null;
private Object requestResponseRecord = null;
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The required status/situation before the specification aspect can be defined
* @return functionalRequirementsPreconditions
**/
public String getFunctionalRequirementsPreconditions() {
return functionalRequirementsPreconditions;
}
public void setFunctionalRequirementsPreconditions(String functionalRequirementsPreconditions) {
this.functionalRequirementsPreconditions = functionalRequirementsPreconditions;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The schedule and timing of the definition and update/revisions of the specification aspect
* @return functionalRequirementsSpecificationSchedule
**/
public String getFunctionalRequirementsSpecificationSchedule() {
return functionalRequirementsSpecificationSchedule;
}
public void setFunctionalRequirementsSpecificationSchedule(String functionalRequirementsSpecificationSchedule) {
this.functionalRequirementsSpecificationSchedule = functionalRequirementsSpecificationSchedule;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The current version, and version history as appropriate for the specification aspect
* @return functionalRequirementsVersionNumber
**/
public String getFunctionalRequirementsVersionNumber() {
return functionalRequirementsVersionNumber;
}
public void setFunctionalRequirementsVersionNumber(String functionalRequirementsVersionNumber) {
this.functionalRequirementsVersionNumber = functionalRequirementsVersionNumber;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The Credit Risk Model Specification specific Business Service
* @return businessService
**/
public String getBusinessService() {
return businessService;
}
public void setBusinessService(String businessService) {
this.businessService = businessService;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Reference to the specific business service type
* @return serviceType
**/
public String getServiceType() {
return serviceType;
}
public void setServiceType(String serviceType) {
this.serviceType = serviceType;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Description of the performed business service
* @return serviceDescription
**/
public String getServiceDescription() {
return serviceDescription;
}
public void setServiceDescription(String serviceDescription) {
this.serviceDescription = serviceDescription;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Mandatory and optional inputs and output information for the business service
* @return serviceInputsandOuputs
**/
public String getServiceInputsandOuputs() {
return serviceInputsandOuputs;
}
public void setServiceInputsandOuputs(String serviceInputsandOuputs) {
this.serviceInputsandOuputs = serviceInputsandOuputs;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Documentation, meeting schedules, notes, reasearch. calculations and any other work products produced by the business service
* @return serviceWorkProduct
**/
public String getServiceWorkProduct() {
return serviceWorkProduct;
}
public void setServiceWorkProduct(String serviceWorkProduct) {
this.serviceWorkProduct = serviceWorkProduct;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to a Functional Requirements instance request service call
* @return functionalRequirementsRequestActionTaskReference
**/
public String getFunctionalRequirementsRequestActionTaskReference() {
return functionalRequirementsRequestActionTaskReference;
}
public void setFunctionalRequirementsRequestActionTaskReference(String functionalRequirementsRequestActionTaskReference) {
this.functionalRequirementsRequestActionTaskReference = functionalRequirementsRequestActionTaskReference;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: The request service call consolidated processing record
* @return functionalRequirementsRequestActionTaskRecord
**/
public Object getFunctionalRequirementsRequestActionTaskRecord() {
return functionalRequirementsRequestActionTaskRecord;
}
public void setFunctionalRequirementsRequestActionTaskRecord(Object functionalRequirementsRequestActionTaskRecord) {
this.functionalRequirementsRequestActionTaskRecord = functionalRequirementsRequestActionTaskRecord;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the Functional Requirements service request record
* @return functionalRequirementsRequestRecordReference
**/
public String getFunctionalRequirementsRequestRecordReference() {
return functionalRequirementsRequestRecordReference;
}
public void setFunctionalRequirementsRequestRecordReference(String functionalRequirementsRequestRecordReference) {
this.functionalRequirementsRequestRecordReference = functionalRequirementsRequestRecordReference;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: Details of the request action service response
* @return requestResponseRecord
**/
public Object getRequestResponseRecord() {
return requestResponseRecord;
}
public void setRequestResponseRecord(Object requestResponseRecord) {
this.requestResponseRecord = requestResponseRecord;
}
}
|
[
"spabandara@Virtusa.com"
] |
spabandara@Virtusa.com
|
80ad0aa73ad19834efbce49d2f5e9ffaee892c7a
|
37d866b01c0c3019e8a9d228e00894a9706ebc6f
|
/src/net/ruready/parser/service/entity/ArithmeticMatchingUtil.java
|
7121c80b856e6231e5dd43816c7eda9c3bd6307b
|
[] |
no_license
|
Shantanu28/ruparser
|
b8f0dca53fcd40041148ea3cffd775462d321b39
|
8cefb3d896e78620ee5a6c7a86a0e2b8e889bd6b
|
refs/heads/master
| 2021-03-27T11:07:21.702750
| 2016-02-03T05:29:07
| 2016-02-03T05:29:07
| 50,816,430
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,223
|
java
|
/*******************************************************************************
* Source File: ParametricEvaluationUtil.java
******************************************************************************/
package net.ruready.parser.service.entity;
import net.ruready.common.chain.RequestHandler;
import net.ruready.common.misc.Utility;
import net.ruready.parser.math.entity.MathTarget;
import net.ruready.parser.math.entity.SyntaxTreeNode;
import net.ruready.parser.rl.ParserNames;
import net.ruready.parser.service.exception.MathParserException;
import net.ruready.parser.service.exports.ParserRequest;
import net.ruready.parser.service.manager.ArithmeticMatchingProcessor;
import net.ruready.parser.service.manager.ArithmeticSetupProcessor;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Utilities related to arithmetic matching.
* <p>
* University of Utah, Salt Lake City, UT 84112-9359<br>
* U.S.A.<br>
* Day Phone: 1-801-587-5835, Fax: 1-801-585-5414<br>
* <br>
* Please contact these numbers immediately if you receive this file without permission
* from the authors. Thank you.<br> (c) 2006-07 Continuing
* Education , University of Utah<br>
* All copyrights reserved. U.S. Patent Pending DOCKET NO. 00846 25702.PROV
*
* @author Nava L. Livne <i><nlivne@aoce.utah.edu></i> Academic Outreach and
* Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-E
* University of Utah, Salt Lake City, UT 84112
* @author Oren E. Livne <i><olivne@aoce.utah.edu></i> AOCE, Room 2197-E,
* University of Utah
* @version Jul 9, 2007
*/
public class ArithmeticMatchingUtil implements Utility
{
// ========================= CONSTANTS =================================
/**
* A logger that helps identify this class' printouts.
*/
@SuppressWarnings("unused")
private static final Log logger = LogFactory.getLog(ArithmeticMatchingUtil.class);
// ========================= CONSTRUCTORS ==============================
/**
* <p>
* Hide constructor in utility class.
* </p>
*/
private ArithmeticMatchingUtil()
{
}
// ========================= CONSTRUCTORS ==============================
// ========================= PUBLIC STATIC METHODS =====================
/**
* Run the arithmetic setup phase on a request.
*
* @param request
*/
public static void runArithmeticSetup(ParserRequest request)
{
// Process request
RequestHandler tp = new ArithmeticSetupProcessor(null);
tp.run(request);
}
/**
* Test arithmetic matching on a single string. Assumes that the arithmetic
* setup is already done.
*
* @param request
* @param inputString
* input string
* @return was the string completely matched or not
*/
public static void testArithmeticMatching(ParserRequest request, String inputString)
{
// Prepare a new request
request.setInputString(inputString);
// Run arithmetic matching on request
request.setInputString(inputString);
RequestHandler tp = new ArithmeticMatchingProcessor(null);
tp.run(request);
}
/**
* Test arithmetic matching on a single string and output the syntax tree to
* the request. Assumes that the arithmetic setup is already done.
*
* @param request
* @param inputString
* input string
* @return was the string completely matched or not
*/
public static void testArithmeticMatchingSyntax(ParserRequest request,
String inputString)
{
// Prepare a new request
request.setInputString(inputString);
// Run arithmetic matching on request
request.setInputString(inputString);
RequestHandler tp = new ArithmeticMatchingProcessor(null);
tp.run(request);
// tp = new ArithmeticMatching2SingleTreeAdapter(null);
// tp.run(request);
}
/**
* Test the arithmetic setup and matching with the parser options of this
* instance.
*
* @param inputString
* input string
* @return was the string completely matched or not
*/
public static boolean isArithmeticallyMatched(ParserRequest request,
String inputString)
{
boolean completeMatch = false;
try {
ArithmeticMatchingUtil.testArithmeticMatching(request, inputString);
// Read results
Boolean temp = (Boolean) request
.getAttribute(ParserNames.REQUEST.ATTRIBUTE.ARITHMETIC.COMPLETE_MATCH);
if (temp != null) {
completeMatch = temp.booleanValue();
}
}
catch (MathParserException e) {
logger.debug(e);
}
return completeMatch;
}
/**
* Run arithmetic matching on a string and output its syntax tree (before
* any canonicalization).
*
* @param inputString
* input string
* @return syntax tree
*/
public static SyntaxTreeNode generateSyntaxTree(ParserRequest request,
String inputString)
{
try {
ArithmeticMatchingUtil.testArithmeticMatchingSyntax(request, inputString);
// Read results
MathTarget target = (MathTarget) request
.getAttribute(ParserNames.REQUEST.ATTRIBUTE.TARGET.MATH);
SyntaxTreeNode tree = target.getSyntax();
return tree;
}
catch (MathParserException e) {
logger.debug(e);
return null;
}
}
// ========================= PRIVATE STATIC METHODS ====================
}
|
[
"gurindersingh@xebia.com"
] |
gurindersingh@xebia.com
|
88ab12d85ddebdbeb426fd208f2bc90f27d59af0
|
7962105c7f578b44de525544aed20b663b5d20d0
|
/Alkitab/src/main/java/yuku/alkitab/base/ac/VersesDialogActivity.java
|
28c67070501e6a49b8849802d00dd93d563cbc54
|
[
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] |
permissive
|
psalm119/TheWordOfGod
|
e6fcef10bbc4b0d8855704df6b29750745c668d6
|
2583118f65d2fdad94d30f913267f571b0e1b782
|
refs/heads/develop
| 2020-08-23T00:52:03.487463
| 2020-01-29T05:27:28
| 2020-01-29T05:27:28
| 216,509,930
| 0
| 0
|
Apache-2.0
| 2020-01-29T05:27:29
| 2019-10-21T07:57:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,454
|
java
|
package yuku.alkitab.base.ac;
import android.os.Bundle;
import com.afollestad.materialdialogs.MaterialDialog;
import yuku.alkitab.base.ac.base.BaseActivity;
import yuku.alkitab.base.dialog.VersesDialog;
import yuku.alkitab.base.util.TargetDecoder;
import yuku.alkitab.util.IntArrayList;
import yuku.alkitabintegration.display.Launcher;
/**
* Transparent activity that shows verses dialog only.
*/
public class VersesDialogActivity extends BaseActivity {
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// now only supports target (decoded using TargetDecoder)
final String target = getIntent().getStringExtra("target");
if (target == null) {
finish();
return;
}
final IntArrayList ariRanges = TargetDecoder.decode(target);
if (ariRanges == null) {
new MaterialDialog.Builder(this)
.content("Could not understand target: " + target)
.positiveText("OK")
.show()
.setOnDismissListener(dialog -> finish());
return;
}
final VersesDialog versesDialog = VersesDialog.newInstance(ariRanges);
versesDialog.setListener(new VersesDialog.VersesDialogListener() {
@Override
public void onVerseSelected(final int ari) {
startActivity(Launcher.openAppAtBibleLocationWithVerseSelected(ari));
finish();
}
});
versesDialog.setOnDismissListener(dialog -> finish());
versesDialog.show(getSupportFragmentManager(), "VersesDialog");
}
}
|
[
"yukuku@gmail.com"
] |
yukuku@gmail.com
|
be76bfe5b3ba4f772e9aaa30d7cb9cbefe0c5e7d
|
923a5ab7796db4460a3d93d078438740717aa9c8
|
/src/main/java/com/java/study/ch17_containers/Tester.java
|
83a0878ea657e6d9212124d0f64d055a12f03506
|
[] |
no_license
|
maowenl/thinkInJavaMvn
|
fbc9d331ba2fdb7a448f9507961560b5fb5beba0
|
23bac57fe10a8545299710941af2982c154238f4
|
refs/heads/master
| 2021-03-31T01:54:46.773129
| 2018-04-28T09:26:48
| 2018-04-28T09:26:48
| 124,513,143
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,775
|
java
|
package com.java.study.ch17_containers;//: containers/Tester.java
// Applies Test objects to lists of different containers.
import java.util.*;
public class Tester<C> {
public static int fieldWidth = 8;
public static TestParam[] defaultParams= TestParam.array(
10, 5000, 100, 5000, 1000, 5000, 10000, 500);
// Override this to modify pre-test initialization:
protected C initialize(int size) { return container; }
protected C container;
private String headline = "";
private List<Test<C>> tests;
private static String stringField() {
return "%" + fieldWidth + "s";
}
private static String numberField() {
return "%" + fieldWidth + "d";
}
private static int sizeWidth = 5;
private static String sizeField = "%" + sizeWidth + "s";
private TestParam[] paramList = defaultParams;
public Tester(C container, List<Test<C>> tests) {
this.container = container;
this.tests = tests;
if(container != null)
headline = container.getClass().getSimpleName();
}
public Tester(C container, List<Test<C>> tests,
TestParam[] paramList) {
this(container, tests);
this.paramList = paramList;
}
public void setHeadline(String newHeadline) {
headline = newHeadline;
}
// Generic methods for convenience :
public static <C> void run(C cntnr, List<Test<C>> tests){
new Tester<C>(cntnr, tests).timedTest();
}
public static <C> void run(C cntnr,
List<Test<C>> tests, TestParam[] paramList) {
new Tester<C>(cntnr, tests, paramList).timedTest();
}
private void displayHeader() {
// Calculate width and pad with '-':
int width = fieldWidth * tests.size() + sizeWidth;
int dashLength = width - headline.length() - 1;
StringBuilder head = new StringBuilder(width);
for(int i = 0; i < dashLength/2; i++)
head.append('-');
head.append(' ');
head.append(headline);
head.append(' ');
for(int i = 0; i < dashLength/2; i++)
head.append('-');
System.out.println(head);
// Print column headers:
System.out.format(sizeField, "size");
for(Test test : tests)
System.out.format(stringField(), test.name);
System.out.println();
}
// Run the tests for this container:
public void timedTest() {
displayHeader();
for(TestParam param : paramList) {
System.out.format(sizeField, param.size);
for(Test<C> test : tests) {
C kontainer = initialize(param.size);
long start = System.nanoTime();
// Call the overriden method:
int reps = test.test(kontainer, param);
long duration = System.nanoTime() - start;
long timePerRep = duration / reps; // Nanoseconds
System.out.format(numberField(), timePerRep);
}
System.out.println();
}
}
} ///:~
|
[
"maowen.li@citrix.com"
] |
maowen.li@citrix.com
|
5b6da3d592a3ecea2ed6043ed923b77621ebb3c7
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MOCKITO-3b-9-1-SPEA2-WeightedSum:TestLen:CallDiversity/org/mockito/internal/handler/InvocationNotifierHandler_ESTest_scaffolding.java
|
3fea17960130f21a91541b62c28a51aee07fbf02
|
[] |
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
| 458
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 21:08:45 UTC 2020
*/
package org.mockito.internal.handler;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class InvocationNotifierHandler_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
97103d9b962074b12eae406042aca31c9ddea194
|
37ec90c45748fd2856ab2a185946ffb2398babe9
|
/propertydisposer-impl/src/test/java/ai/labs/property/impl/PropertyDisposerTest.java
|
320dc4c7cc89c144a88ebb352c8faab6adf7147f
|
[
"Apache-2.0"
] |
permissive
|
khhwang838/EDDI
|
9e81d4584b6f1669b9bf9f225f1d27816d4eae8e
|
2f234d2999e9f38051b0c273de72ca952398879f
|
refs/heads/master
| 2021-09-03T11:58:53.815682
| 2017-11-21T19:46:50
| 2017-11-21T19:46:50
| 111,615,362
| 0
| 0
| null | 2017-11-22T00:02:50
| 2017-11-22T00:02:50
| null |
UTF-8
|
Java
| false
| false
| 3,350
|
java
|
package ai.labs.property.impl;
import ai.labs.expressions.Expression;
import ai.labs.expressions.utilities.IExpressionProvider;
import ai.labs.expressions.value.Value;
import ai.labs.property.model.PropertyEntry;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static org.mockito.Mockito.*;
/**
* @author ginccc
*/
public class PropertyDisposerTest {
private IExpressionProvider expressionProvider;
@Before
public void setUp() throws Exception {
expressionProvider = mock(IExpressionProvider.class);
}
@Test
public void extractProperties() throws Exception {
//setup
String testStringExpressions = "property(someMeaning(someValue)),noProperty(someMeaning(someValue))";
when(expressionProvider.parseExpressions(eq(testStringExpressions))).thenAnswer(invocation ->
Arrays.asList(new Expression("property",
new Expression("someMeaning",
new Value("someValue"))),
new Expression("noProperty",
new Expression("someMeaning",
new Value("someValue")))
));
PropertyDisposer propertyDisposer = new PropertyDisposer(expressionProvider);
PropertyEntry expectedPropertyEntry = new PropertyEntry(Collections.singletonList("someMeaning"), "someValue");
//test
List<PropertyEntry> propertyEntries = propertyDisposer.extractProperties(testStringExpressions);
//assert
verify(expressionProvider, times(1)).parseExpressions(testStringExpressions);
Assert.assertEquals(Collections.singletonList(expectedPropertyEntry), propertyEntries);
}
@Test
public void extractMoreComplexProperties() throws Exception {
//setup
String testStringExpressions = "property(someMeaning(someSubMeaning(someValue)))," +
"property(someMeaning(someValue, someOtherValue))";
when(expressionProvider.parseExpressions(eq(testStringExpressions))).thenAnswer(invocation ->
Arrays.asList(new Expression("property",
new Expression("someMeaning",
new Expression("someSubMeaning",
new Value("someValue")))),
new Expression("property",
new Expression("someMeaning",
new Value("someValue"), new Value("someOtherValue")))
));
PropertyDisposer propertyDisposer = new PropertyDisposer(expressionProvider);
List<PropertyEntry> expectedPropertyEntries = Arrays.asList(
new PropertyEntry(Arrays.asList("someMeaning", "someSubMeaning"), "someValue"),
new PropertyEntry(Collections.singletonList("someMeaning"), "someValue"));
//test
List<PropertyEntry> propertyEntries = propertyDisposer.extractProperties(testStringExpressions);
//assert
verify(expressionProvider, times(1)).parseExpressions(testStringExpressions);
Assert.assertEquals(expectedPropertyEntries, propertyEntries);
}
}
|
[
"gregor@jarisch.net"
] |
gregor@jarisch.net
|
61573638d7d5a69d179cf03bf14bfeb7f797ace5
|
4be72dee04ebb3f70d6e342aeb01467e7e8b3129
|
/bin/ext-commerce/commercefacades/src/de/hybris/platform/commercefacades/address/AddressVerificationFacade.java
|
7392c74b4f3404b860af489b7430e0a061ddb6e0
|
[] |
no_license
|
lun130220/hybris
|
da00774767ba6246d04cdcbc49d87f0f4b0b1b26
|
03c074ea76779f96f2db7efcdaa0b0538d1ce917
|
refs/heads/master
| 2021-05-14T01:48:42.351698
| 2018-01-07T07:21:53
| 2018-01-07T07:21:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,386
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.commercefacades.address;
import de.hybris.platform.commercefacades.address.data.AddressVerificationResult;
import de.hybris.platform.commercefacades.user.data.AddressData;
/**
* Facade for interacting with the AddressVerificationService.
*/
public interface AddressVerificationFacade
{
/**
* Calls the configurable AddressVerificationService to verify the incoming address. If the address is invalid
* the service will provide a list of possible addresses for the customer to choose from.
*
* @param addressData the address data to be verified.
* @return a POJO containing the set of suggested addresses as well as any field errors.
*/
AddressVerificationResult verifyAddressData(AddressData addressData);
/**
* Checks the AddressVerificationService to see if the customer can ignore the suggestions that were provided.
*
* @return true if the customer can ignore suggestions, false if not.
*/
boolean isCustomerAllowedToIgnoreAddressSuggestions();
}
|
[
"lun130220@gamil.com"
] |
lun130220@gamil.com
|
4229d8f5cbbc9cdc290efdd777b737170d66f43c
|
8a6a85b79d53f20ac52c4e2ec7094dd0c786f448
|
/modules/siddhi-core/src/main/java/org/wso2/siddhi/core/util/ElementIdGenerator.java
|
9c622b0cf65ae918679920a4ba77b55d8bdbb2ce
|
[
"Apache-2.0"
] |
permissive
|
lamatola-os/siddhi
|
f529cdc294e0a6ac161e96a1576238702e45da3a
|
7a93be2bcd1fc7ab08538d729d64e935ff67db2f
|
refs/heads/master
| 2021-06-18T04:26:44.865456
| 2017-05-08T05:23:33
| 2017-05-08T05:23:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,102
|
java
|
/*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.siddhi.core.util;
import java.util.concurrent.atomic.AtomicLong;
public class ElementIdGenerator {
private String executionPlanName;
private AtomicLong id = new AtomicLong(0);
public ElementIdGenerator(String executionPlanName) {
this.executionPlanName = executionPlanName;
}
public String createNewId() {
return executionPlanName + "-" + id.incrementAndGet();
}
}
|
[
"suhothayan@gmail.com"
] |
suhothayan@gmail.com
|
a945b83c12f6a99d9cc35472f1f053f467898ccd
|
e5aaa853f19c81dc9e11cae051f2b96b1329bf87
|
/src/main/java/com/tom/lib/network/patches/NetworkManagerPatchedClient.java
|
01894d4a1723b3c9f1f67d1ad0548430105dc796
|
[
"MIT"
] |
permissive
|
tom5454/Toms-Lib
|
8600f8364b9e52882e32669fe72b744eafcc1557
|
3df4c376e06592bd02dee8d5475721818e8d9bf9
|
refs/heads/master
| 2020-04-01T10:58:54.609940
| 2019-01-06T13:17:58
| 2019-01-06T13:17:58
| 153,141,184
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,516
|
java
|
package com.tom.lib.network.patches;
import javax.annotation.Nullable;
import org.apache.commons.lang3.ArrayUtils;
import net.minecraft.network.EnumConnectionState;
import net.minecraft.network.EnumPacketDirection;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.util.text.ITextComponent;
import com.tom.lib.network.LibNetworkHandler;
import com.tom.lib.network.messages.MessagePacket;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.GenericFutureListener;
public class NetworkManagerPatchedClient extends NetworkManager {
private PatchedChannel patchedChannel;
private long id;
public NetworkManagerPatchedClient(long id) {
super(EnumPacketDirection.SERVERBOUND);
patchedChannel = new PatchedChannel(this, null);
this.id = id;
}
@Override
public void channelActive(ChannelHandlerContext p_channelActive_1_) throws Exception {
}
@Override
public void channelInactive(ChannelHandlerContext p_channelInactive_1_) throws Exception {
}
@Override
public void closeChannel(ITextComponent message) {
}
@Override
public boolean isChannelOpen() {
return true;
}
@Override
public void setConnectionState(EnumConnectionState newState) {
}
@Override
public void sendPacket(Packet<?> packetIn) {
LibNetworkHandler.sendToServer(new MessagePacket(packetIn, id));
}
@SuppressWarnings("unchecked")
@Override
public void sendPacket(Packet<?> packetIn, GenericFutureListener<? extends Future<? super Void>> listener, GenericFutureListener<? extends Future<? super Void>>... listeners) {
sendPacket(packetIn, ArrayUtils.add(listeners, 0, listener));
}
private void sendPacket(Packet<?> packetIn, @Nullable final GenericFutureListener <? extends Future <? super Void >> [] futureListeners) {
ChannelFuture channelfuture = LibNetworkHandler.sendToServerWF(new MessagePacket(packetIn, id));
if (futureListeners != null)
{
channelfuture.addListeners(futureListeners);
}
}
@Override
public void processReceivedPackets() {
}
@Override
public boolean isLocalChannel() {
return true;
}
@Override
public boolean hasNoChannel() {
return false;
}
@Override
public void disableAutoRead() {
}
@Override
public void setCompressionThreshold(int threshold) {
}
@Override
public void checkDisconnected() {
}
@Override
public Channel channel() {
return patchedChannel;
}
}
|
[
"tom5454a@gmail.com"
] |
tom5454a@gmail.com
|
0bce594064a57ca57865454a6565d4d8614d0799
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mobileqqi/classes.jar/ckl.java
|
031a6b151cb8666bd70bb5a720212c284423f61e
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,252
|
java
|
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import com.tencent.mobileqq.activity.EmosmDetailActivity;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.data.EmoticonPackage;
import com.tencent.mobileqq.emoticon.EmoticonPackageDownloadListener;
import com.tencent.qphone.base.util.QLog;
public class ckl
extends EmoticonPackageDownloadListener
{
public ckl(EmosmDetailActivity paramEmosmDetailActivity) {}
public void onJsonComplete(EmoticonPackage paramEmoticonPackage, int paramInt)
{
if ((Long.parseLong(paramEmoticonPackage.epId) == Long.parseLong(EmosmDetailActivity.a(this.a))) && (paramInt == 0))
{
if (QLog.isColorLevel()) {
QLog.i("Q.emoji.EmosmDetailActivity", 2, "json is complete,result ok: " + EmosmDetailActivity.a(this.a));
}
this.a.b.getPreferences().edit().putInt("emosm_json_last_download_timestamp", (int)(System.currentTimeMillis() / 1000L)).commit();
this.a.runOnUiThread(new ckm(this, paramEmoticonPackage));
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes2.jar
* Qualified Name: ckl
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
cda7aec9f0643c3e9487f68b8ae80965cacee36a
|
8e1c3506e5ef30a3d1816c7fbfda199bc4475cb0
|
/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/codesystems/ConsentProvisionTypeEnumFactory.java
|
e4b5393e461b0af95cb5a3060846fbd4e904aae9
|
[
"Apache-2.0"
] |
permissive
|
jasmdk/org.hl7.fhir.core
|
4fc585c9f86c995e717336b4190939a9e58e3adb
|
fea455fbe4539145de5bf734e1737777eb9715e3
|
refs/heads/master
| 2020-09-20T08:05:57.475986
| 2019-11-26T07:57:28
| 2019-11-26T07:57:28
| 224,413,181
| 0
| 0
|
Apache-2.0
| 2019-11-27T11:17:00
| 2019-11-27T11:16:59
| null |
UTF-8
|
Java
| false
| false
| 3,253
|
java
|
package org.hl7.fhir.r5.model.codesystems;
/*
* #%L
* org.hl7.fhir.r5
* %%
* Copyright (C) 2014 - 2019 Health Level 7
* %%
* 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.
* #L%
*/
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE 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.
*/
// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0
import org.hl7.fhir.r5.model.EnumFactory;
public class ConsentProvisionTypeEnumFactory implements EnumFactory<ConsentProvisionType> {
public ConsentProvisionType fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("deny".equals(codeString))
return ConsentProvisionType.DENY;
if ("permit".equals(codeString))
return ConsentProvisionType.PERMIT;
throw new IllegalArgumentException("Unknown ConsentProvisionType code '"+codeString+"'");
}
public String toCode(ConsentProvisionType code) {
if (code == ConsentProvisionType.DENY)
return "deny";
if (code == ConsentProvisionType.PERMIT)
return "permit";
return "?";
}
public String toSystem(ConsentProvisionType code) {
return code.getSystem();
}
}
|
[
"grahameg@gmail.com"
] |
grahameg@gmail.com
|
765da61a5c71adc3aa7dba34aa96b8a6a6ccf5eb
|
49eb53073f15a81e545e80249da10897ef062ac5
|
/src/main/java/com/wei/untils/string/StringEscapeEditor.java
|
44b6b1afdedf78b7fd9d868b0b16bcb34282b084
|
[
"MIT"
] |
permissive
|
xingxingtx/Commodity_Management
|
2582214db8a9d9a2deb844825cb0ffbaa67a41d9
|
c2d9f02a7f2f0b5e1dd78d41ca1db95ac02fdf7a
|
refs/heads/master
| 2020-04-08T18:01:23.934741
| 2018-12-13T00:47:29
| 2018-12-13T00:47:29
| 159,590,775
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 593
|
java
|
package com.wei.untils.string;
import org.springframework.web.util.HtmlUtils;
import java.beans.PropertyEditorSupport;
public class StringEscapeEditor extends PropertyEditorSupport {
public StringEscapeEditor() {}
@Override
public String getAsText() {
Object value = getValue();
return value != null ? value.toString() : "";
}
@Override
public void setAsText(String text) throws IllegalArgumentException {
if (text == null) {
setValue(null);
} else {
setValue(HtmlUtils.htmlEscape(text));
}
}
}
|
[
"982084398@qq.com"
] |
982084398@qq.com
|
47c269e846800a1349f228fb431cddfe2b26f2e4
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/results/june-2017/old_classification/traccar_avg2/org/traccar/protocol/AmplOsmAndProtocolDecoderTest.java
|
c090ff20c0b491704d7e9c8e2ad1a3c3d360ddb8
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 1,477
|
java
|
package org.traccar.protocol;
public class AmplOsmAndProtocolDecoderTest extends org.traccar.ProtocolTest {
@org.junit.Test
public void testDecode() throws java.lang.Exception {
org.traccar.protocol.OsmAndProtocolDecoder decoder = new org.traccar.protocol.OsmAndProtocolDecoder(new org.traccar.protocol.OsmAndProtocol());
verifyNothing(decoder, request("/?timestamp=1377177267&lat=60.0&lon=30.0"));
verifyPosition(decoder, request("/?id=902064&lat=42.06288&lon=-88.23412×tamp=2016-01-27T18%3A55%3A47Z&hdop=6.0&altitude=224.0&speed=0.0"));
verifyPosition(decoder, request("/?id=902064&lat=42.06288&lon=-88.23412×tamp=1442068686579&hdop=6.0&altitude=224.0&speed=0.0"));
verifyPosition(decoder, request("/?lat=49.60688&lon=6.15788×tamp=2014-06-04+09%3A10%3A11&altitude=384.7&speed=0.0&id=353861053849681"));
verifyPosition(decoder, request("/?id=123456×tamp=1377177267&lat=60.0&lon=30.0&speed=0.0&bearing=0.0&altitude=0&hdop=0.0"));
verifyPosition(decoder, request("/?id=123456×tamp=1377177267&lat=60.0&lon=30.0"));
verifyPosition(decoder, request("/?lat=60.0&lon=30.0&speed=0.0&heading=0.0&vacc=0&hacc=0&altitude=0&deviceid=123456"));
verifyPosition(decoder, request("/?id=861001000719969&lat=41.666667&lon=-0.883333&altitude=350.059479&speed=0.000000&batt=87"));
verifyPosition(decoder, request("/?id=123456×tamp=1377177267&location=60.0,30.0"));
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
2e3c71b24974939ccca85d912fe4ae85d38f7417
|
ac6fe0f82231b44f64451ac3e78513d9392061d8
|
/common/service/facade/src/main/java/com/xianglin/act/common/service/facade/constant/PopTipFrequencyEnum.java
|
c58d96c8ade240d31df5580b30ced08d6ba5aa12
|
[] |
no_license
|
heke183/act
|
015ef0d0dd57f53afefe41d88f810a9cb0e59b8e
|
2378cf1056b672a898a3c7c8fd1e540fd8ee0a42
|
refs/heads/master
| 2020-04-15T11:00:33.035873
| 2019-01-09T05:46:07
| 2019-01-09T05:46:07
| 164,609,667
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,012
|
java
|
package com.xianglin.act.common.service.facade.constant;
/**
* @author Yungyu
*/
public enum PopTipFrequencyEnum implements EnumReadable {
ONECE("每天", 0),
EVERY_DAY("一次", 1);
private String desc;
private int code;
PopTipFrequencyEnum() {
}
PopTipFrequencyEnum(String desc, int code) {
this.desc = desc;
this.code = code;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
@Override
public String getName() {
return desc;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public static PopTipFrequencyEnum vauleOfCode(int code) {
for (PopTipFrequencyEnum popTipTypeEnum : PopTipFrequencyEnum.values()) {
if (popTipTypeEnum.getCode() == code) {
return popTipTypeEnum;
}
}
return null;
}
}
|
[
"wangleitom@126.com"
] |
wangleitom@126.com
|
487dcac63f9e94b971c300ae001d74e363864da3
|
af8f2d1b600d794aea496f5f8005a20ed016960b
|
/office/trunk/src/java/net/zdsoft/office/salary/service/impl/OfficeSalarySortServiceImpl.java
|
2dd83b85704f0de9154feaa11dc5e06162adf601
|
[] |
no_license
|
thyjxcf/learn
|
46c033f8434c0b0b0809e2a6b1d5601910b36c0d
|
99b9e04aa9c0e7ee00571dffb8735283cf33b1c1
|
refs/heads/master
| 2021-01-06T20:43:53.071081
| 2017-09-15T10:11:53
| 2017-09-15T10:11:53
| 99,546,817
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,032
|
java
|
package net.zdsoft.office.salary.service.impl;
import java.util.*;
import net.zdsoft.office.salary.entity.OfficeSalarySort;
import net.zdsoft.office.salary.service.OfficeSalarySortService;
import net.zdsoft.office.salary.dao.OfficeSalarySortDao;
import net.zdsoft.keel.util.Pagination;
/**
* office_salary_sort
* @author
*
*/
public class OfficeSalarySortServiceImpl implements OfficeSalarySortService{
private OfficeSalarySortDao officeSalarySortDao;
@Override
public OfficeSalarySort save(OfficeSalarySort officeSalarySort){
return officeSalarySortDao.save(officeSalarySort);
}
@Override
public Integer delete(String[] ids){
return officeSalarySortDao.delete(ids);
}
@Override
public Integer update(OfficeSalarySort officeSalarySort){
return officeSalarySortDao.update(officeSalarySort);
}
@Override
public OfficeSalarySort getOfficeSalarySortById(String id){
return officeSalarySortDao.getOfficeSalarySortById(id);
}
@Override
public Map<String, OfficeSalarySort> getOfficeSalarySortMapByIds(String[] ids){
return officeSalarySortDao.getOfficeSalarySortMapByIds(ids);
}
@Override
public List<OfficeSalarySort> getOfficeSalarySortList(){
return officeSalarySortDao.getOfficeSalarySortList();
}
@Override
public List<OfficeSalarySort> getOfficeSalarySortPage(Pagination page){
return officeSalarySortDao.getOfficeSalarySortPage(page);
}
@Override
public List<OfficeSalarySort> getOfficeSalarySortByUnitIdList(String unitId){
return officeSalarySortDao.getOfficeSalarySortByUnitIdList(unitId);
}
@Override
public List<OfficeSalarySort> getOfficeSalarySortByUnitIdPage(String unitId, Pagination page){
return officeSalarySortDao.getOfficeSalarySortByUnitIdPage(unitId, page);
}
@Override
public OfficeSalarySort getOfficeSalarySortByImportId(String importId) {
return officeSalarySortDao.getOfficeSalarySortByImportId(importId);
}
public void setOfficeSalarySortDao(OfficeSalarySortDao officeSalarySortDao){
this.officeSalarySortDao = officeSalarySortDao;
}
}
|
[
"1129820421@qq.com"
] |
1129820421@qq.com
|
ff7b2ae2ae20731bf09a62140af00d8c0bfd82e5
|
4347a963d792ac9633d052fc9cddb24b62c7f9f4
|
/JavaClass/src/ch05/Account.java
|
040990f5054e54f6a9099b30ccac33ea3d7170f3
|
[] |
no_license
|
parkjaewon1/JavaClass
|
629ca103525ab4402b9876c7bfe79ccaf08d17de
|
54bf2c6428e803ca1e4847499352898682ace53d
|
refs/heads/master
| 2023-04-10T08:32:49.127689
| 2021-04-15T14:21:31
| 2021-04-15T14:21:31
| 350,326,556
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 702
|
java
|
package ch05;
public class Account {
String accountNo; // 계좌번호
String name; // 예금주
int balance; // 잔액
public Account(String acNo, String na, int bal) {
accountNo = acNo; name = na; balance = bal;
}
void deposit(int money) { // 예금
balance += money;
System.out.println(name+"입금 : " + money);
}
void withdraw(int money) { // 출금
if (balance >= money) {
balance -= money;
System.out.println(name+"출금 : " + money);
} else System.out.println("꺼져 ! 잔액이 없어 !!");
}
void disp() {
System.out.println("== 계좌번호 ==="+accountNo);
System.out.println("에금주 : "+name);
System.out.println("잔액 : "+balance);
}
}
|
[
"48577510+parkjaewon1@users.noreply.github.com"
] |
48577510+parkjaewon1@users.noreply.github.com
|
2b50b805393818ec6c4983d03ba62f254a50ae06
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_391/Testnull_39017.java
|
1b314786c6b5818da1a93f82da434dc883ee8351
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package org.gradle.test.performancenull_391;
import static org.junit.Assert.*;
public class Testnull_39017 {
private final Productionnull_39017 production = new Productionnull_39017("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
3158eb57f548215df562df1c20c905904d531648
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_aefc58106dee4e989f40b956c594d13f2b660ec8/Context/2_aefc58106dee4e989f40b956c594d13f2b660ec8_Context_s.java
|
98f6bb4764eafdc65e6384d35466c08e33174dfc
|
[] |
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
| 3,663
|
java
|
package com.bloatit.framework.webserver;
import java.util.Date;
import java.util.concurrent.atomic.AtomicLong;
import com.bloatit.framework.utils.i18n.Localizator;
/**
* <p>
* A class that stores <b>all</b> the information about the current request..
* The data are local to a thread.
* </p>
*/
public class Context {
private static final int MILLISECOND_DIV = 1000;
static class ContextData {
public Session session = null;
public Localizator localizator = null;
public WebHeader header = null;
}
static class UniqueThreadContext {
private static final ThreadLocal<ContextData> uniqueContextData = new ThreadLocal<ContextData>() {
@Override
protected ContextData initialValue() {
return new ContextData();
}
};
public static ContextData getContext() {
return uniqueContextData.get();
}
} // UniqueThreadContext
// Realy static
private static AtomicLong requestTime = new AtomicLong(getCurrentTime());
private Context() {
// desactivate CTOR.
}
public static Session getSession() {
return UniqueThreadContext.getContext().session;
}
/**
* @see Localizator#tr(String)
*/
public static String tr(final String str) {
return getLocalizator().tr(str);
}
/**
* @see Localizator#trc(String, String)
*/
public static String trc(final String context, final String str) {
return getLocalizator().trc(context, str);
}
/**
* @see Localizator#tr(String, Object...)
*/
public static String tr(final String str, final Object... parameters) {
return getLocalizator().tr(str, parameters);
}
/**
* @see Localizator#trn(String, String, long)
*/
public static String trn(final String singular, final String plural, final long amount) {
return getLocalizator().trn(singular, plural, amount);
}
/**
* @see Localizator#trn(String, String, long, Object...)
*/
public static String trn(final String singular, final String plural, final long amount, final Object... parameters) {
return getLocalizator().trn(singular, plural, amount, parameters);
}
/**
* Returns the localizator for the current context
*/
public static Localizator getLocalizator() {
return UniqueThreadContext.getContext().localizator;
}
public static WebHeader getHeader() {
return UniqueThreadContext.getContext().header;
}
public static long getResquestTime() {
return Context.requestTime.get();
}
static void reInitializeContext(final WebHeader header, final Session session) {
updateTime();
setHeader(header);
setSession(session);
setLocalizator(new Localizator(header.getLanguage(), header.getHttpHeader().getHttpAcceptLanguage()));
}
private static void updateTime() {
Context.requestTime.set(getCurrentTime());
}
private static long getCurrentTime() {
return new Date().getTime() / MILLISECOND_DIV;
}
private static void setHeader(final WebHeader header) {
UniqueThreadContext.getContext().header = header;
}
private static void setLocalizator(final Localizator localizator) {
UniqueThreadContext.getContext().localizator = localizator;
}
private static void setSession(final Session session) {
UniqueThreadContext.getContext().session = session;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
0ee62da2d58725a8a1e9441965ea62295e72f9dc
|
fa55027e10c36977b4a50946d663e15f8fe0faf7
|
/src/org/wshuai/leetcode/SumOfLeftLeaves.java
|
313b05793a2e5d794a35b9a08a7ffd03d6f57724
|
[] |
no_license
|
relentlesscoder/Leetcode
|
773a207c15ea72f6027eade8565377f11a856672
|
6b3ecd82d01739f6adb1caf86a770fcff0d6a54b
|
refs/heads/master
| 2021-07-05T13:35:37.312910
| 2020-06-21T12:48:54
| 2020-06-21T12:48:54
| 40,448,524
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 545
|
java
|
package org.wshuai.leetcode;
/**
* Created by Wei on 10/03/2016.
* #0404 https://leetcode.com/problems/sum-of-left-leaves/
*/
public class SumOfLeftLeaves {
// time O(n)
public int sumOfLeftLeaves(TreeNode root) {
if(root == null){
return 0;
}
return dfs(root.left, true) + dfs(root.right, false);
}
private int dfs(TreeNode root, boolean isLeft){
if(root == null){
return 0;
}
if(root.left == null && root.right == null && isLeft){
return root.val;
}
return dfs(root.left, true) + dfs(root.right, false);
}
}
|
[
"relentless.code@gmail.com"
] |
relentless.code@gmail.com
|
fba8702105985fbd5afe9c22dae466fcdd9e571c
|
2b7a42a8e75c6178b5da3b6ef4ae8d4d702c5f78
|
/DoubleBufferingDrawing/app/src/main/java/canvas/xplorer/com/doublebufferingdrawing/activities/views/SurfaceViewMultiTouchSensorCanvasDesigner.java
|
d58c1a0bcddd1db0f904435281aa433ad6526b56
|
[] |
no_license
|
chrislucas/android-xplorer-doubling-buffer-drawing
|
2b5dad2f455f36e55b577fc1cfc500e57cbd1325
|
dbe8980f1206522bb76343304e07dced912335ed
|
refs/heads/master
| 2020-03-23T01:48:17.322039
| 2018-10-17T15:56:12
| 2018-10-17T15:56:12
| 140,938,281
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 821
|
java
|
package canvas.xplorer.com.doublebufferingdrawing.activities.views;
import android.content.Context;
import android.os.Parcelable;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.SurfaceView;
public class SurfaceViewMultiTouchSensorCanvasDesigner extends SurfaceView {
public SurfaceViewMultiTouchSensorCanvasDesigner(Context context) {
super(context);
}
public SurfaceViewMultiTouchSensorCanvasDesigner(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
@Nullable
@Override
protected Parcelable onSaveInstanceState() {
return super.onSaveInstanceState();
}
@Override
protected void onRestoreInstanceState(Parcelable state) {
super.onRestoreInstanceState(state);
}
}
|
[
"christoffer.luccas@gmail.com"
] |
christoffer.luccas@gmail.com
|
0b16f2a6b121634591f999735982b3ea6fc0fc28
|
f4a30f2b65d03efc04c6ae937b31f26c36e53a81
|
/src/com/sun/corba/se/spi/activation/ORBPortInfoHelper.java
|
b68890ae810c7c903b60f92cf767898893f31811
|
[] |
no_license
|
weipeng001/jdk
|
b144cda94ba510f29cfc618483fd82a604db4bdf
|
2ee7f0f2fc421e7bbdc61f551ad364ee31cba74d
|
refs/heads/master
| 2023-02-17T21:51:21.513834
| 2021-01-18T03:30:20
| 2021-01-18T03:30:20
| 330,535,639
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,034
|
java
|
package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/ORBPortInfoHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-i586-cygwin/jdk8u112/7884/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Thursday, September 22, 2016 9:04:04 PM PDT
*/
abstract public class ORBPortInfoHelper
{
private static String _id = "IDL:activation/ORBPortInfo:1.0";
public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.spi.activation.ORBPortInfo that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static com.sun.corba.se.spi.activation.ORBPortInfo extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
private static boolean __active = false;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
synchronized (org.omg.CORBA.TypeCode.class)
{
if (__typeCode == null)
{
if (__active)
{
return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
}
__active = true;
org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2];
org.omg.CORBA.TypeCode _tcOf_members0 = null;
_tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
_tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.corba.se.spi.activation.ORBidHelper.id (), "ORBid", _tcOf_members0);
_members0[0] = new org.omg.CORBA.StructMember (
"orbId",
_tcOf_members0,
null);
_tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
_tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.corba.se.spi.activation.TCPPortHelper.id (), "TCPPort", _tcOf_members0);
_members0[1] = new org.omg.CORBA.StructMember (
"port",
_tcOf_members0,
null);
__typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (com.sun.corba.se.spi.activation.ORBPortInfoHelper.id (), "ORBPortInfo", _members0);
__active = false;
}
}
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static com.sun.corba.se.spi.activation.ORBPortInfo read (org.omg.CORBA.portable.InputStream istream)
{
com.sun.corba.se.spi.activation.ORBPortInfo value = new com.sun.corba.se.spi.activation.ORBPortInfo ();
value.orbId = istream.read_string ();
value.port = istream.read_long ();
return value;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.spi.activation.ORBPortInfo value)
{
ostream.write_string (value.orbId);
ostream.write_long (value.port);
}
}
|
[
"592743134@qq.com"
] |
592743134@qq.com
|
fb9822551610fcdace17921fdb93d754a585510a
|
124df74bce796598d224c4380c60c8e95756f761
|
/com.raytheon.uf.viz.radar.gl/src/com/raytheon/uf/viz/radar/gl/Activator.java
|
71ba51ca2a77099fe8df0a1b8aa88fe3bd4137dd
|
[] |
no_license
|
Mapoet/AWIPS-Test
|
19059bbd401573950995c8cc442ddd45588e6c9f
|
43c5a7cc360b3cbec2ae94cb58594fe247253621
|
refs/heads/master
| 2020-04-17T03:35:57.762513
| 2017-02-06T17:17:58
| 2017-02-06T17:17:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,000
|
java
|
package com.raytheon.uf.viz.radar.gl;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends Plugin {
// The plug-in ID
public static final String PLUGIN_ID = "com.raytheon.uf.viz.radar.gl";
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugin#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 Activator getDefault() {
return plugin;
}
}
|
[
"joshua.t.love@saic.com"
] |
joshua.t.love@saic.com
|
ddf8e08ffc2bc0fc35da36e447a495053d22b7a3
|
062ab1db4c39e994610e937d66acc45acd74982a
|
/com/vividsolutions/jts/algorithm/CGAlgorithms.java
|
1786d0aa6d38702d1e089dd138dbb99645a6e3af
|
[] |
no_license
|
Ravinther/Navigation
|
838804535c86e664258b83d958f39b1994e8311b
|
7dd6a07aea47aafe616b2f7e58a8012bef9899a1
|
refs/heads/master
| 2021-01-20T18:15:10.681957
| 2016-08-16T01:12:57
| 2016-08-16T01:12:57
| 65,776,099
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,395
|
java
|
package com.vividsolutions.jts.algorithm;
import com.vividsolutions.jts.geom.Coordinate;
public class CGAlgorithms {
public static int orientationIndex(Coordinate p1, Coordinate p2, Coordinate q) {
return CGAlgorithmsDD.orientationIndex(p1, p2, q);
}
public static boolean isPointInRing(Coordinate p, Coordinate[] ring) {
return locatePointInRing(p, ring) != 2;
}
public static int locatePointInRing(Coordinate p, Coordinate[] ring) {
return RayCrossingCounter.locatePointInRing(p, ring);
}
public static boolean isOnLine(Coordinate p, Coordinate[] pt) {
LineIntersector lineIntersector = new RobustLineIntersector();
for (int i = 1; i < pt.length; i++) {
lineIntersector.computeIntersection(p, pt[i - 1], pt[i]);
if (lineIntersector.hasIntersection()) {
return true;
}
}
return false;
}
public static boolean isCCW(Coordinate[] ring) {
int nPts = ring.length - 1;
if (nPts < 3) {
throw new IllegalArgumentException("Ring has fewer than 3 points, so orientation cannot be determined");
}
Coordinate hiPt = ring[0];
int hiIndex = 0;
for (int i = 1; i <= nPts; i++) {
Coordinate p = ring[i];
if (p.f1296y > hiPt.f1296y) {
hiPt = p;
hiIndex = i;
}
}
int iPrev = hiIndex;
do {
iPrev--;
if (iPrev < 0) {
iPrev = nPts;
}
if (!ring[iPrev].equals2D(hiPt)) {
break;
}
} while (iPrev != hiIndex);
int iNext = hiIndex;
do {
iNext = (iNext + 1) % nPts;
if (!ring[iNext].equals2D(hiPt)) {
break;
}
} while (iNext != hiIndex);
Coordinate prev = ring[iPrev];
Coordinate next = ring[iNext];
if (prev.equals2D(hiPt) || next.equals2D(hiPt) || prev.equals2D(next)) {
return false;
}
int disc = computeOrientation(prev, hiPt, next);
if (disc == 0) {
return prev.f1295x > next.f1295x;
}
return disc > 0;
}
public static int computeOrientation(Coordinate p1, Coordinate p2, Coordinate q) {
return orientationIndex(p1, p2, q);
}
}
|
[
"m.ravinther@yahoo.com"
] |
m.ravinther@yahoo.com
|
8a1f250567145c67af840202d11fd6909eada7d2
|
46af4338007dfdac5422616845f89aef43e3392f
|
/src/com/pharmeasy/model/impl/Pharmasict.java
|
e84beec0596bfeca6519b347f7841417ba66877a
|
[] |
no_license
|
gugdoshizzy/pharmeasy
|
e0d834a48a9151c6b5d6fa311170a7258d7cb22f
|
1981b6b1c1ac9f4e749e76757c45d0f63521dda6
|
refs/heads/master
| 2020-03-27T20:52:01.095365
| 2018-09-02T16:18:06
| 2018-09-02T16:18:06
| 147,098,929
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,495
|
java
|
package com.pharmeasy.model.impl;
import java.util.Date;
public class Pharmasict
extends Person {
private String degree;
private Date licenseExpiryDate;
private Pharmasict(PharmasictBuilder pharmasictBuilder) {
super(pharmasictBuilder);
this.degree = pharmasictBuilder.degree;
this.licenseExpiryDate = pharmasictBuilder.licenseExpiryDate;
}
public String getDegree() {
return degree;
}
public Date getLicenseExpiryDate() {
return licenseExpiryDate;
}
@Override
public String toString() {
return "Pharmasict [degree=" + degree + ", licenseExpiryDate=" + licenseExpiryDate
+ ", id=" + id + ", name=" + name + ", contactNo=" + contactNo + ", address=" + address + "]";
}
public static class PharmasictBuilder
extends PersonBuilder<PharmasictBuilder> {
private String degree;
private Date licenseExpiryDate;
public PharmasictBuilder() {
super();
}
public PharmasictBuilder(Pharmasict pharmasict) {
super(pharmasict);
this.degree = pharmasict.degree;
this.licenseExpiryDate = pharmasict.licenseExpiryDate;
}
public PharmasictBuilder addDegree(String degree) {
this.degree = degree;
return self();
}
public PharmasictBuilder addLicenseExpiryDate(Date date) {
this.licenseExpiryDate = date;
return self();
}
protected PharmasictBuilder self() {
return (PharmasictBuilder) this;
}
public Pharmasict build() {
Pharmasict pharmasict = new Pharmasict(this);
return pharmasict;
}
}
}
|
[
"="
] |
=
|
75a3d897d869d4e0c8f5e34b8596008e162d45dc
|
a456d6b9c6c889c310456129c0b0f7aa2960fb11
|
/java-basic/src/main/java/bitcamp/java100/ch14/ex3/Test1_3.java
|
1f9666880861940323f96df810068a7c6bb33f62
|
[] |
no_license
|
yunhyojin/bitcamp
|
af80234550fda09922151392248a439091b2d61c
|
b509fb94c0f03a73032fa12323c5444d2c59ea94
|
refs/heads/master
| 2021-08-24T00:36:12.198133
| 2017-12-07T08:42:23
| 2017-12-07T08:42:23
| 104,423,449
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 628
|
java
|
package bitcamp.java100.ch14.ex3;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
public class Test1_3 {
public static void main(String[] args) throws Exception {
Score s = new Score("홍길동", 800, 900, 1000);
DataOutputStream out = new DataOutputStream(new FileOutputStream("test3.dat"));
out.writeUTF(s.getName());
out.writeInt(s.getKor());
out.writeInt(s.getEng());
out.writeInt(s.getMath());
out.close();
System.out.println("출력을 완료했습니다.");
}
}
|
[
"xilm1004@naver.com"
] |
xilm1004@naver.com
|
4bc72c8a15cc8916ea261a2becdd85fb0729fe84
|
141e2c950f1585fbd185aa225d6e673309d4919d
|
/Day13/BankProjectJsp/src/com/hcl/bank/UpdateAccount.java
|
d8940506b93141ef420b3df7bce2c201eb54759d
|
[] |
no_license
|
priyas35/Mode1-Training
|
bf619f34c7758c0d9cbac39f68c521fae4e52395
|
ac9c50ecd95beaab957626d0dcdce7b4073552da
|
refs/heads/master
| 2022-12-31T20:10:30.751017
| 2019-09-27T06:52:23
| 2019-09-27T06:52:23
| 212,010,111
| 0
| 0
| null | 2022-12-15T23:31:07
| 2019-10-01T04:08:36
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 594
|
java
|
package com.hcl.bank;
public class UpdateAccount {
private int accountNo;
private String city;
private String state;
public int getAccountNo() {
return accountNo;
}
public void setAccountNo(int accountNo) {
this.accountNo = accountNo;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String updateAccount(){
return AccountBAL.updateAccountbal(accountNo, city, state);
}
}
|
[
"priyaharisubi@gmail.com"
] |
priyaharisubi@gmail.com
|
ae6a0ab81ea03e0b894c3279ac6cd9e654a242f7
|
02a087e8de0a7d0cfed9dba60e8cff5be4ae3be1
|
/Research_Bucket/Completed_Archived/ConcolicProcess/oracles/Bellon/bellon_benchmark/sourcecode/eclipse-jdtcore/src/internal/core/search/IndexSearchAdapter.java
|
4e3176a3598331cdcb218b1fa498c8b492281ec3
|
[] |
no_license
|
dan7800/Research
|
7baf8d5afda9824dc5a53f55c3e73f9734e61d46
|
f68ea72c599f74e88dd44d85503cc672474ec12a
|
refs/heads/master
| 2021-01-23T09:50:47.744309
| 2018-09-01T14:56:01
| 2018-09-01T14:56:01
| 32,521,867
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,853
|
java
|
package org.eclipse.jdt.internal.core.search;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jdt.core.*;
public class IndexSearchAdapter implements IIndexSearchRequestor {
/**
* @see IIndexSearchRequestor
*/
public void acceptClassDeclaration(String resourcePath, char[] simpleTypeName, char[][] enclosingTypeNames, char[] packageName) { }
/**
* @see IIndexSearchRequestor
*/
public void acceptConstructorDeclaration(String resourcePath, char[] typeName, int parameterCount) { }
/**
* @see IIndexSearchRequestor
*/
public void acceptConstructorReference(String resourcePath, char[] typeName, int parameterCount) { }
/**
* @see IIndexSearchRequestor
*/
public void acceptFieldDeclaration(String resourcePath, char[] fieldName) { }
/**
* @see IIndexSearchRequestor
*/
public void acceptFieldReference(String resourcePath, char[] fieldName) { }
/**
* @see IIndexSearchRequestor
*/
public void acceptInterfaceDeclaration(String resourcePath, char[] simpleTypeName, char[][] enclosingTypeNames, char[] packageName) { }
/**
* @see IIndexSearchRequestor
*/
public void acceptMethodDeclaration(String resourcePath, char[] methodName, int parameterCount) { }
/**
* @see IIndexSearchRequestor
*/
public void acceptMethodReference(String resourcePath, char[] methodName, int parameterCount) { }
/**
* @see IIndexSearchRequestor
*/
public void acceptPackageReference(String resourcePath, char[] packageName) { }
/**
* @see IIndexSearchRequestor
*/
public void acceptSuperTypeReference(String resourcePath, char[] qualification, char[] typeName, char[] enclosingTypeName, char classOrInterface, char[] superQualification, char[] superTypeName, char superClassOrInterface, int modifiers){ }
/**
* @see IIndexSearchRequestor
*/
public void acceptTypeReference(String resourcePath, char[] typeName) { } }
|
[
"dxkvse@rit.edu"
] |
dxkvse@rit.edu
|
997256a172bb53dd67506fafcff463e7ebbb0d42
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/src/irvine/oeis/a126/A126529.java
|
6d0799e938c219f478b0a8e9e13e49affd8b65f7
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 453
|
java
|
package irvine.oeis.a126;
// Generated by gen_pattern.pl - DO NOT EDIT here!
import irvine.oeis.GeneratingFunctionSequence;
/**
* A126529 Number of base <code>8 n-digit</code> numbers with adjacent digits differing by five or less.
* @author Georg Fischer
*/
public class A126529 extends GeneratingFunctionSequence {
/** Construct the sequence. */
public A126529() {
super(0, new long[] {1, 1, -1},
new long[] {1, -7, -3, 4});
}
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
e231c3ddf4d9949a8b6b1bc7fe95f704650fe702
|
1043b2969c33594bcf7aea02a4894c19ea505e6f
|
/commercetools-sdk-base/src/main/java/io/sphere/sdk/queries/PagedQueryResultDsl.java
|
f316ea3cf00cd69e9a6f413754c438417955f156
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
sphereio/jvm-sdk-deploy-tests
|
c4a1e81acf52c5995223d2b5ece79c06a02dc96c
|
20faca8566a9cd7ca1b4154bcc828d93b3882365
|
refs/heads/master
| 2021-08-15T04:42:48.815142
| 2017-11-17T10:36:24
| 2017-11-17T10:36:24
| 110,836,857
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 909
|
java
|
package io.sphere.sdk.queries;
import java.util.List;
public final class PagedQueryResultDsl<T> extends PagedQueryResultImpl<T> {
PagedQueryResultDsl(final Long offset, final Long total, final List<T> results, final Long count) {
super(offset, total, results, count);
}
/**
* Creates a copy of this item with the given offset.
* @param offset the offset of the new copy
* @return the copy
*/
public PagedQueryResultDsl<T> withOffset(final Long offset) {
return PagedQueryResult.of(offset, getTotal(), getResults());
}
/**
* Creates a copy of this with the given total items count.
* @param total the number of total items in the backend.
* @return a copy with total as new total.
*/
public PagedQueryResultDsl<T> withTotal(final Long total) {
return PagedQueryResult.of(getOffset(), total, getResults());
}
}
|
[
"michael.schleichardt@commercetools.de"
] |
michael.schleichardt@commercetools.de
|
e15fa46c6d1e67b73c74d84abd48b80bf1c2facd
|
ee758ae75cd9c1b759e8705d996738bf6d173a4a
|
/src/main/java/net/serveron/hane/athletics/util/ColorSearch.java
|
641f973b0bbcb4bea20b9dca593fb3a8ce95f5ad
|
[] |
no_license
|
tanetakumi/athletics
|
2e9b89dfd79ccf90d5941be487c8144ee196e089
|
5864da09771bebf0a98ee4641cc784690bce2eaa
|
refs/heads/main
| 2023-04-01T06:36:33.161456
| 2021-04-09T09:10:40
| 2021-04-09T09:10:40
| 355,409,155
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,615
|
java
|
package net.serveron.hane.athletics.util;
import net.kyori.adventure.text.format.TextColor;
public class ColorSearch {
public static final TextColor Black = TextColor.color(0,0,0);
public static final TextColor DarkBlue = TextColor.color(0,0,170);
public static final TextColor DarkGreen = TextColor.color(0,170,0);
public static final TextColor DarkAqua = TextColor.color(0,170,170);
public static final TextColor DarkRed = TextColor.color(170,0,0);
public static final TextColor DarkPurple = TextColor.color(170,0,170);
public static final TextColor Gold = TextColor.color(255,170,0);
public static final TextColor Gray = TextColor.color(170,170,170);
public static final TextColor DarkGray = TextColor.color(85,85,85);
public static final TextColor Blue = TextColor.color(85,85,255);
public static final TextColor Green = TextColor.color(85,255,85);
public static final TextColor Aqua = TextColor.color(85,255,255);
public static final TextColor Red = TextColor.color(255,85,85);
public static final TextColor LightPurple = TextColor.color(255,85,255);
public static final TextColor Yellow = TextColor.color(255,255,85);
public static final TextColor White = TextColor.color(255,255,255);
public static TextColor stringToColor(String text){
switch (text.toUpperCase()){
case "BLACK":
return TextColor.color(0,0,0);
case "DARKBLUE":
return TextColor.color(0,0,170);
case "DARKGREEN":
return TextColor.color(0,170,0);
case "DARKAQUA":
return TextColor.color(0,170,170);
case "DARKRED":
return TextColor.color(170,0,0);
case "DARKPURPLE":
return TextColor.color(170,0,170);
case "GOLD":
return TextColor.color(255,170,0);
case "GRAY":
return TextColor.color(170,170,170);
case "DARKGRAY":
return TextColor.color(85,85,85);
case "BLUE":
return TextColor.color(85,85,255);
case "GREEN":
return TextColor.color(85,255,85);
case "AQUA":
return TextColor.color(85,255,255);
case "RED":
return TextColor.color(255,85,85);
case "LIGHTPURPLE":
return TextColor.color(255,85,255);
case "YELLOW":
return TextColor.color(255,255,85);
default:
return TextColor.color(255,255,255);
}
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
a5030d4b2857719569ca99508aab4a4b473599b0
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_9e46949c3a7a106d07f56e2a5e5a348d12db0e94/DatabaseConnectionTest/12_9e46949c3a7a106d07f56e2a5e5a348d12db0e94_DatabaseConnectionTest_t.java
|
508a470b060403ed9dd55ec6a164cfcd7fee27cf
|
[] |
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,374
|
java
|
package org.narwhal.core;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.narwhal.bean.Person;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;
/**
* @author Miron Aseev
*/
@RunWith(JUnit4.class)
public class DatabaseConnectionTest {
private DatabaseConnection connection;
public DatabaseConnectionTest() throws SQLException, ClassNotFoundException {
String driver = "com.mysql.jdbc.Driver";
String url = "jdbc:mysql://localhost/bank";
String username = "lrngsql";
String password = "lrngsql";
DatabaseInformation information = new DatabaseInformation(driver, url, username, password);
connection = new DatabaseConnection(information);
}
@Test
public void transactionMethodsTest() throws SQLException {
int expectedRowAffected = 3;
int result = 0;
try {
connection.beginTransaction();
result += connection.executeUpdate("INSERT INTO Person (id, name) VALUES (?, ?)", null, "Test");
result += connection.executeUpdate("UPDATE Person SET name = ? WHERE name = ?", "TestTest", "Test");
result += connection.executeUpdate("DELETE FROM Person WHERE name = ?", "TestTest");
connection.commit();
} catch (SQLException ex){
ex.printStackTrace();
connection.rollback();
}
try {
Assert.assertEquals(expectedRowAffected, result);
} finally {
restoreDatabase();
}
}
@Test
public void createTest() throws InvocationTargetException, NoSuchMethodException, SQLException, IllegalAccessException {
Person person = new Person(null, "TestPerson");
int expectedRowAffected = 1;
int result = connection.create(person);
try {
Assert.assertEquals(expectedRowAffected, result);
} finally {
restoreDatabase();
}
}
@Test
public void readTest() throws InvocationTargetException, NoSuchMethodException,
InstantiationException, SQLException, IllegalAccessException {
Person person = connection.read(Person.class, 1);
try {
Assert.assertEquals("John", person.getName());
} finally {
restoreDatabase();
}
}
@Test
public void updateTest() throws SQLException, NoSuchMethodException,
IllegalAccessException, InvocationTargetException {
Person person = new Person(1, "John Doe");
int expectedRowAffected = 1;
int result = connection.update(person);
try {
connection.update(person);
Assert.assertEquals(expectedRowAffected, result);
} finally {
restoreDatabase();
}
}
@Test
public void deleteTest() throws SQLException, NoSuchMethodException,
IllegalAccessException, InvocationTargetException {
Person person = new Person(1, "John");
int expectedRowAffected = 1;
int result = connection.delete(person);
try {
Assert.assertEquals(expectedRowAffected, result);
} finally {
restoreDatabase();
}
}
@Test
public void executeUpdateTest() throws SQLException {
int doeId = 2;
int expectedRowAffected = 1;
int result = connection.executeUpdate("UPDATE Person SET name = ? WHERE id = ?", "FunnyName", doeId);
try {
Assert.assertEquals(expectedRowAffected, result);
} finally {
restoreDatabase();
}
}
@Test
public void executeQueryTest() throws SQLException, IllegalAccessException,
InstantiationException, NoSuchMethodException, InvocationTargetException {
String expectedName = "John";
int joeId = 1;
Person person = connection.executeQuery("SELECT * FROM Person WHERE id = ?", Person.class, joeId);
Assert.assertNotNull(person);
Assert.assertEquals(expectedName, person.getName());
}
@Test
public void executeQueryForCollectionTest() throws SQLException, ClassNotFoundException,
NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
List<Person> persons = connection.executeQueryForCollection("SELECT * FROM Person", Person.class);
int expectedSize = 2;
Assert.assertNotNull(persons);
Assert.assertEquals(expectedSize, persons.size());
Assert.assertEquals("John", persons.get(0).getName());
Assert.assertEquals("Doe", persons.get(1).getName());
}
private void restoreDatabase() throws SQLException {
try {
connection.beginTransaction();
connection.executeUpdate("DELETE FROM Person");
connection.executeUpdate("INSERT INTO Person (id, name) VALUES (?, ?)", 1, "John");
connection.executeUpdate("INSERT INTO Person (id, name) VALUES (?, ?)", 2, "Doe");
connection.commit();
} finally {
connection.rollback();
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
30fd52bed9a2fc4697be0b9303b8a29849532763
|
173a7e3c1d4b34193aaee905beceee6e34450e35
|
/kmzyc-user/kmzyc-user-web/src/main/java/com/pltfm/app/dao/ReserverTransactionInfoDAO.java
|
ddc7e5f231f1c190c64eefc21a9f836329ca2aca
|
[] |
no_license
|
jjmnbv/km_dev
|
d4fc9ee59476248941a2bc99a42d57fe13ca1614
|
f05f4a61326957decc2fc0b8e06e7b106efc96d4
|
refs/heads/master
| 2020-03-31T20:03:47.655507
| 2017-05-26T10:01:56
| 2017-05-26T10:01:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 908
|
java
|
package com.pltfm.app.dao;
import com.pltfm.app.vobject.ReserverTransactionInfo;
import java.math.BigDecimal;
import java.sql.SQLException;
public interface ReserverTransactionInfoDAO {
/**
* 删除
*
* @param transationId
* @return
* @throws SQLException
*/
int deleteByPrimaryKey(BigDecimal transationId) throws SQLException;
/**
* 添加
*
* @param record
* @throws SQLException
*/
void insert(ReserverTransactionInfo record) throws SQLException;
/**
* 查询
*
* @param transationId
* @return
* @throws SQLException
*/
ReserverTransactionInfo selectByPrimaryKey(BigDecimal transationId) throws SQLException;
/**
* 修改
*
* @param record
* @return
* @throws SQLException
*/
int updateByPrimaryKeySelective(ReserverTransactionInfo record) throws SQLException;
}
|
[
"luoxinyu@km.com"
] |
luoxinyu@km.com
|
bf9af807124976ada949e9b0a9b2fe827f1d60bf
|
f52981eb9dd91030872b2b99c694ca73fb2b46a8
|
/Source/Plugins/Core/com.equella.core/src/com/tle/core/oauth/migration/OAuthSecurityXmlMigration.java
|
f92b04a322b53bf33f325224bc0a1e0b9e088ab6
|
[
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LGPL-2.1-only",
"LicenseRef-scancode-jdom",
"GPL-1.0-or-later",
"ICU",
"CDDL-1.0",
"LGPL-3.0-only",
"LicenseRef-scancode-other-permissive",
"CPL-1.0",
"MIT",
"GPL-2.0-only",
"Apache-2.0",
"NetCDF",
"Apache-1.1",
"EPL-1.0",
"Classpath-exception-2.0",
"CDDL-1.1",
"LicenseRef-scancode-freemarker"
] |
permissive
|
phette23/Equella
|
baa41291b91d666bf169bf888ad7e9f0b0db9fdb
|
56c0d63cc1701a8a53434858a79d258605834e07
|
refs/heads/master
| 2020-04-19T20:55:13.609264
| 2019-01-29T03:27:40
| 2019-01-29T22:31:24
| 168,427,559
| 0
| 0
|
Apache-2.0
| 2019-01-30T22:49:08
| 2019-01-30T22:49:08
| null |
UTF-8
|
Java
| false
| false
| 2,022
|
java
|
/*
* Copyright 2017 Apereo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tle.core.oauth.migration;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
import com.tle.common.filesystem.handle.SubTemporaryFile;
import com.tle.common.filesystem.handle.TemporaryFileHandle;
import com.tle.common.oauth.beans.OAuthClient;
import com.tle.core.encryption.EncryptionService;
import com.tle.core.guice.Bind;
import com.tle.core.institution.convert.ConverterParams;
import com.tle.core.institution.convert.InstitutionInfo;
import com.tle.core.institution.convert.XmlMigrator;
import com.tle.core.oauth.service.OAuthService;
/**
* @author Aaron
*
*/
@Bind
@Singleton
public class OAuthSecurityXmlMigration extends XmlMigrator
{
@Inject
private EncryptionService encryptionService;
@Inject
private OAuthService oauthService;
@Override
public void execute(TemporaryFileHandle staging, InstitutionInfo instInfo, ConverterParams params) throws Exception
{
// OAuth Client secrets
final SubTemporaryFile oauthfolder = new SubTemporaryFile(staging, "oauthclient");
final List<String> oauthentries = xmlHelper.getXmlFileList(oauthfolder);
for( String entry : oauthentries )
{
OAuthClient client = (OAuthClient) xmlHelper.readXmlFile(oauthfolder, entry, oauthService.getXStream());
String encpwd = encryptionService.encrypt(client.getClientSecret());
client.setClientSecret(encpwd);
xmlHelper.writeXmlFile(oauthfolder, entry, client);
}
}
}
|
[
"doolse@gmail.com"
] |
doolse@gmail.com
|
e0193adc182900bb15ae335105b4650f1a4aca10
|
4c74e8a70fd4c420234ad27d959f0303cdc747db
|
/src/lab4/Order.java
|
5024ca8f860b7175fe3ef2aa9de1e71192e51b8e
|
[] |
no_license
|
Jesse14/MPP-Labs-Group2
|
a8ea75d84ce433ec54a075be9bc6c933bcce5a95
|
899bebb0d846fa298feeb6aa5db58d18b8a25b95
|
refs/heads/master
| 2020-04-08T19:48:58.407499
| 2018-12-02T22:56:05
| 2018-12-02T22:56:05
| 159,672,238
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 240
|
java
|
package lab4;
import java.util.Date;
public class Order {
Commissioned comm;
int orderNo;
Date orderDate;
double orderAmount;
Order(){
comm=new Commissioned();
}
public double getOrderAmount() {
return orderAmount;
}
}
|
[
"vorleak.chy@gmail.com"
] |
vorleak.chy@gmail.com
|
04e3651d4470944534e25ad95daa6fe80918b32e
|
5f7ee726c47a136eece1ae88df4f1016cc5a856b
|
/spring-context/src/main/java/org/springframework/validation/BindException.java
|
45fddb8ae1b4ae81cd3e51d67c12945f5d7ecdc0
|
[] |
no_license
|
yangxin1994/read-spring-source
|
015abce836cca573a2ee42a02a409cfeb07ffd4d
|
16abbdc5f2d27e7af39d3d5a813795131240941f
|
refs/heads/master
| 2023-02-16T09:54:51.067550
| 2021-01-07T07:28:12
| 2021-01-07T07:28:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,385
|
java
|
/*
* Copyright 2002-2012 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.validation;
import java.beans.PropertyEditor;
import java.util.List;
import java.util.Map;
import org.springframework.beans.PropertyEditorRegistry;
import org.springframework.util.Assert;
/**
* Thrown when binding errors are considered fatal. Implements the
* {@link BindingResult} interface (and its super-interface {@link Errors})
* to allow for the direct analysis of binding errors.
*
* <p>As of Spring 2.0, this is a special-purpose class. Normally,
* application code will work with the {@link BindingResult} interface,
* or with a {@link DataBinder} that in turn exposes a BindingResult via
* {@link DataBinder#getBindingResult()}.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @author Rob Harrop
* @see BindingResult
* @see DataBinder#getBindingResult()
* @see DataBinder#close()
*/
@SuppressWarnings("serial")
public class BindException extends Exception implements BindingResult {
private final BindingResult bindingResult;
/**
* Create a new BindException instance for a BindingResult.
* @param bindingResult the BindingResult instance to wrap
*/
public BindException(BindingResult bindingResult) {
Assert.notNull(bindingResult, "BindingResult must not be null");
this.bindingResult = bindingResult;
}
/**
* Create a new BindException instance for a target bean.
* @param target target bean to bind onto
* @param objectName the name of the target object
* @see BeanPropertyBindingResult
*/
public BindException(Object target, String objectName) {
Assert.notNull(target, "Target object must not be null");
this.bindingResult = new BeanPropertyBindingResult(target, objectName);
}
/**
* Return the BindingResult that this BindException wraps.
* Will typically be a BeanPropertyBindingResult.
* @see BeanPropertyBindingResult
*/
public final BindingResult getBindingResult() {
return this.bindingResult;
}
@Override
public String getObjectName() {
return this.bindingResult.getObjectName();
}
@Override
public void setNestedPath(String nestedPath) {
this.bindingResult.setNestedPath(nestedPath);
}
@Override
public String getNestedPath() {
return this.bindingResult.getNestedPath();
}
@Override
public void pushNestedPath(String subPath) {
this.bindingResult.pushNestedPath(subPath);
}
@Override
public void popNestedPath() throws IllegalStateException {
this.bindingResult.popNestedPath();
}
@Override
public void reject(String errorCode) {
this.bindingResult.reject(errorCode);
}
@Override
public void reject(String errorCode, String defaultMessage) {
this.bindingResult.reject(errorCode, defaultMessage);
}
@Override
public void reject(String errorCode, Object[] errorArgs, String defaultMessage) {
this.bindingResult.reject(errorCode, errorArgs, defaultMessage);
}
@Override
public void rejectValue(String field, String errorCode) {
this.bindingResult.rejectValue(field, errorCode);
}
@Override
public void rejectValue(String field, String errorCode, String defaultMessage) {
this.bindingResult.rejectValue(field, errorCode, defaultMessage);
}
@Override
public void rejectValue(String field, String errorCode, Object[] errorArgs, String defaultMessage) {
this.bindingResult.rejectValue(field, errorCode, errorArgs, defaultMessage);
}
@Override
public void addAllErrors(Errors errors) {
this.bindingResult.addAllErrors(errors);
}
@Override
public boolean hasErrors() {
return this.bindingResult.hasErrors();
}
@Override
public int getErrorCount() {
return this.bindingResult.getErrorCount();
}
@Override
public List<ObjectError> getAllErrors() {
return this.bindingResult.getAllErrors();
}
@Override
public boolean hasGlobalErrors() {
return this.bindingResult.hasGlobalErrors();
}
@Override
public int getGlobalErrorCount() {
return this.bindingResult.getGlobalErrorCount();
}
@Override
public List<ObjectError> getGlobalErrors() {
return this.bindingResult.getGlobalErrors();
}
@Override
public ObjectError getGlobalError() {
return this.bindingResult.getGlobalError();
}
@Override
public boolean hasFieldErrors() {
return this.bindingResult.hasFieldErrors();
}
@Override
public int getFieldErrorCount() {
return this.bindingResult.getFieldErrorCount();
}
@Override
public List<FieldError> getFieldErrors() {
return this.bindingResult.getFieldErrors();
}
@Override
public FieldError getFieldError() {
return this.bindingResult.getFieldError();
}
@Override
public boolean hasFieldErrors(String field) {
return this.bindingResult.hasFieldErrors(field);
}
@Override
public int getFieldErrorCount(String field) {
return this.bindingResult.getFieldErrorCount(field);
}
@Override
public List<FieldError> getFieldErrors(String field) {
return this.bindingResult.getFieldErrors(field);
}
@Override
public FieldError getFieldError(String field) {
return this.bindingResult.getFieldError(field);
}
@Override
public Object getFieldValue(String field) {
return this.bindingResult.getFieldValue(field);
}
@Override
public Class<?> getFieldType(String field) {
return this.bindingResult.getFieldType(field);
}
@Override
public Object getTarget() {
return this.bindingResult.getTarget();
}
@Override
public Map<String, Object> getModel() {
return this.bindingResult.getModel();
}
@Override
public Object getRawFieldValue(String field) {
return this.bindingResult.getRawFieldValue(field);
}
@Override
@SuppressWarnings("rawtypes")
public PropertyEditor findEditor(String field, Class valueType) {
return this.bindingResult.findEditor(field, valueType);
}
@Override
public PropertyEditorRegistry getPropertyEditorRegistry() {
return this.bindingResult.getPropertyEditorRegistry();
}
@Override
public void addError(ObjectError error) {
this.bindingResult.addError(error);
}
@Override
public String[] resolveMessageCodes(String errorCode) {
return this.bindingResult.resolveMessageCodes(errorCode);
}
@Override
public String[] resolveMessageCodes(String errorCode, String field) {
return this.bindingResult.resolveMessageCodes(errorCode, field);
}
@Override
public void recordSuppressedField(String field) {
this.bindingResult.recordSuppressedField(field);
}
@Override
public String[] getSuppressedFields() {
return this.bindingResult.getSuppressedFields();
}
/**
* Returns diagnostic information about the errors held in this object.
*/
@Override
public String getMessage() {
return this.bindingResult.toString();
}
@Override
public boolean equals(Object other) {
return (this == other || this.bindingResult.equals(other));
}
@Override
public int hashCode() {
return this.bindingResult.hashCode();
}
}
|
[
"“dinghaifeng@enmonster.com”"
] |
“dinghaifeng@enmonster.com”
|
ee69812a9d7767bbe6e92f77c7807cd15e2513d0
|
43eb759f66530923dfe1c6e191ec4f350c097bd9
|
/projects/checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/internal/testmodules/TestFileSetCheck.java
|
fbe335afdcdcece3b65c54951dbd93f9806ac149
|
[
"MIT",
"Apache-2.0",
"LGPL-2.1-only"
] |
permissive
|
hayasam/lightweight-effectiveness
|
fe4bd04f8816c6554e35c8c9fc8489c11fc8ce0b
|
f6ef4c98b8f572a86e42252686995b771e655f80
|
refs/heads/master
| 2023-08-17T01:51:46.351933
| 2020-09-03T07:38:35
| 2020-09-03T07:38:35
| 298,672,257
| 0
| 0
|
MIT
| 2023-09-08T15:33:03
| 2020-09-25T20:23:43
| null |
UTF-8
|
Java
| false
| false
| 1,823
|
java
|
////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2018 the original author or authors.
//
// 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.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.internal.testmodules;
import java.io.File;
import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
import com.puppycrawl.tools.checkstyle.api.FileText;
/**
* TestFileSetCheck.
* @noinspection ClassOnlyUsedInOnePackage
*/
public class TestFileSetCheck extends AbstractFileSetCheck {
private boolean called;
@Override
protected void processFiltered(File file, FileText fileText) {
called = true;
}
/**
* Checks if {@link #processFiltered(File, FileText)} was called.
* @return {@code true} if it was called.
*/
public boolean wasCalled() {
return called;
}
/**
* Resets the check for testing.
*/
public void resetCheck() {
called = false;
}
}
|
[
"granogiovanni90@gmail.com"
] |
granogiovanni90@gmail.com
|
6b91c6b601902f2584e02fcd1daabf73f94ac3b7
|
6500848c3661afda83a024f9792bc6e2e8e8a14e
|
/gp_JADX/io/reactivex/internal/p564g/C7852t.java
|
232654a899eccdc70abb16141bf19d303dca3fe3
|
[] |
no_license
|
enaawy/gproject
|
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
|
91cb88559c60ac741d4418658d0416f26722e789
|
refs/heads/master
| 2021-09-03T03:49:37.813805
| 2018-01-05T09:35:06
| 2018-01-05T09:35:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,066
|
java
|
package io.reactivex.internal.p564g;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicLong;
public final class C7852t extends AtomicLong implements ThreadFactory {
public final String f40446a;
public final int f40447b;
public final boolean f40448c;
public C7852t(String str) {
this(str, 5, false);
}
public C7852t(String str, int i) {
this(str, i, false);
}
public C7852t(String str, int i, boolean z) {
this.f40446a = str;
this.f40447b = i;
this.f40448c = z;
}
public final Thread newThread(Runnable runnable) {
String stringBuilder = new StringBuilder(this.f40446a).append('-').append(incrementAndGet()).toString();
Thread c7853u = this.f40448c ? new C7853u(runnable, stringBuilder) : new Thread(runnable, stringBuilder);
c7853u.setPriority(this.f40447b);
c7853u.setDaemon(true);
return c7853u;
}
public final String toString() {
return "RxThreadFactory[" + this.f40446a + "]";
}
}
|
[
"genius.ron@gmail.com"
] |
genius.ron@gmail.com
|
a67d44156d383521c6c53b45df75ec582ddfd4dc
|
e1d84d910a5dbdca5c8c5c826dabec7e283465f7
|
/cms-ui/src/main/java/com/yunkuo/common/security/rememberme/RememberMeAuthenticationException.java
|
ee5b406fec14e5362c2373ccb0eb308b93561507
|
[] |
no_license
|
kevonz/saas-cms
|
60096ea61e23b69eea71a012dc1deda2862b01a1
|
06016bdd6cb0bae464afc99a739d32e6697b8f03
|
refs/heads/master
| 2021-01-18T11:11:23.200656
| 2013-03-14T15:17:46
| 2013-03-14T15:17:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 355
|
java
|
package com.yunkuo.common.security.rememberme;
import com.yunkuo.common.security.AuthenticationException;
@SuppressWarnings("serial")
public class RememberMeAuthenticationException extends AuthenticationException {
public RememberMeAuthenticationException() {
}
public RememberMeAuthenticationException(String msg) {
super(msg);
}
}
|
[
"kevonz@live.com"
] |
kevonz@live.com
|
d0b0ce7e8b799f03ceb2d406e6a141ba42fb0284
|
553f95db4cd5617be869aa4de7a6b1fc72900f65
|
/datastruct-tree/src/main/java/com/xdata/tree/avltree/AVLTreeNode.java
|
358dcfec5bc2e1ac560140903575a1f5c878373f
|
[] |
no_license
|
boyalearn/datastruct
|
82a27e1a10993ff6229cdad83e3ef0a761478e4d
|
2094323682100d0846ea42d9ba21113ebf54a9f6
|
refs/heads/master
| 2021-06-01T17:09:25.183104
| 2021-05-28T03:24:27
| 2021-05-28T03:24:27
| 153,544,790
| 3
| 0
| null | 2020-10-25T07:52:16
| 2018-10-18T01:20:25
|
Java
|
UTF-8
|
Java
| false
| false
| 294
|
java
|
package com.xdata.tree.avltree;
public class AVLTreeNode<K,V> {
public int bf=0;
public K key;
public V value;
public AVLTreeNode<K,V> left;
public AVLTreeNode<K,V> right;
public AVLTreeNode<K,V> parent;
public AVLTreeNode(K key,V value){
this.key=key;
this.value=value;
}
}
|
[
"2114517411@qq.com"
] |
2114517411@qq.com
|
d50a98b9648fe402ff2e59f1167b4748aa3e2882
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project90/src/test/java/org/gradle/test/performance90_5/Test90_432.java
|
0f5c410276fe8465ca545193f4f76db46a0a8b0e
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance90_5;
import static org.junit.Assert.*;
public class Test90_432 {
private final Production90_432 production = new Production90_432("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
a7213242c36b6daeabce0b13aa64c61639d49971
|
20eecd90795707596ff1aac8a31d52dcdfc8280f
|
/src/datastructure/practices/list/stream/test/EmployeeTest.java
|
08b3620474a0a64b1991350796f0f6b9fdfcde6b
|
[] |
no_license
|
techamitprajapati/amit-java-data-structure
|
83ecf6c46d39bf4d5ca49c419bee250f15fa9a2b
|
6484253abbfd140b3149c7c778aabf43ec07e5b2
|
refs/heads/master
| 2023-07-16T18:26:38.612887
| 2021-08-28T11:56:11
| 2021-08-28T11:56:11
| 400,519,662
| 0
| 0
| null | 2021-08-28T11:56:12
| 2021-08-27T13:34:02
|
Java
|
UTF-8
|
Java
| false
| false
| 774
|
java
|
package datastructure.practices.list.stream.test;
import java.util.List;
import datastructure.practices.list.stream.beans.Employee;
import datastructure.practices.list.stream.utility.StudentStream;
public class EmployeeTest {
public static void main(String[] args) {
StudentStream stream = new StudentStream();
stream.addEmployeeList();
List<Employee> list = stream.getEmployeeList();
// stream.showEmployeeList(list);
// stream.showEmployeeListWithLambda(list);
// stream.showEmployeeListEmpIdWithLambda(list);
// stream.showEmployeeListEmpSalaryWithlambda(list);
// List<Employee> elist = stream.showEmployeeListEmpNameByAscOrderWithlambda(list);
List<Employee> elist = stream.showEmployeeListEmpNamrByDscOrder(list);
System.out.println(elist);
}
}
|
[
"you@example.com"
] |
you@example.com
|
f12daa9a00201dc59b80baa3c51a696379a44811
|
b7d92544f98aa0f9311c0ae5a423f85f159ed171
|
/src/main/java/org/voovan/tools/threadpool/ThreadPoolTask.java
|
37c05c27fbc22b018f871d56436979f4cb4286b9
|
[
"Apache-2.0"
] |
permissive
|
iyuohz/Voovan
|
9a9f28e82e08ee1abcf6ffc16fc362270b2b1b5e
|
aff6d593c4dc7b71e225a890f4bc2a231621ce3b
|
refs/heads/master
| 2021-01-21T09:42:41.901560
| 2015-10-28T05:37:41
| 2015-10-28T05:37:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,883
|
java
|
package org.voovan.tools.threadpool;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ThreadPoolExecutor;
import org.voovan.tools.TPerformance;
import org.voovan.tools.log.Logger;
/**
* 线程池监控类
*
* @author helyho
*
* Voovan Framework.
* WebSite: https://github.com/helyho/Voovan
* Licence: Apache v2 License
*/
public class ThreadPoolTask extends TimerTask {
private Timer timer;
private ThreadPoolExecutor threadPoolInstance;
private int cpuCoreCount;
public ThreadPoolTask(ThreadPoolExecutor threadPoolInstance, Timer timer) {
cpuCoreCount = Runtime.getRuntime().availableProcessors();
this.timer = timer;
this.threadPoolInstance = threadPoolInstance;
}
@Override
public void run() {
if (threadPoolInstance.isShutdown()) {
this.cancel();
timer.cancel();
}
// String threadPoolInfo = "PoolInfo:" + threadPoolInstance.getActiveCount() + "/" + threadPoolInstance.getCorePoolSize() + "/"
// + threadPoolInstance.getLargestPoolSize() + " TaskCount: " + threadPoolInstance.getCompletedTaskCount() + "/"
// + threadPoolInstance.getTaskCount() + " QueueSize:" + threadPoolInstance.getQueue().size() + " PerCoreLoadAvg:"
// + TPerformance.cpuPerCoreLoadAvg();
// if (threadPoolInstance.getActiveCount() != 0) {
// Logger.simple(TDateTime.now() + " ShutDown:" + threadPoolInstance.isShutdown() + " " + threadPoolInfo);
// }
int poolSize = threadPoolInstance.getPoolSize();
// 动态调整线程数,线程数要小于CPU核心数*100,且系统CPU负载值要小于1
if (threadPoolInstance.getQueue().size() > 0 && poolSize < cpuCoreCount * 50 && TPerformance.cpuPerCoreLoadAvg() < 1) {
threadPoolInstance.setCorePoolSize(threadPoolInstance.getPoolSize() + cpuCoreCount * 2);
Logger.simple("PoolSizeChange: " + poolSize + "->" + threadPoolInstance.getCorePoolSize());
}
}
}
|
[
"helyho@gmail.com"
] |
helyho@gmail.com
|
2aca116f4f2829d7dc538e877920eeae2b3c9984
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/7/7_38bf0e4edfc746be171958887bbe33b5dca92f3b/BiomeGenOutback/7_38bf0e4edfc746be171958887bbe33b5dca92f3b_BiomeGenOutback_t.java
|
70fd0d7d7785ff725bf0738304dc492315840b3c
|
[] |
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
| 1,999
|
java
|
package biomesoplenty.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.Blocks;
import biomesoplenty.worldgen.WorldGenOutbackShrub;
import biomesoplenty.worldgen.tree.WorldGenOutbackTree;
public class BiomeGenOutback extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenOutback(int par1)
{
super(par1);
spawnableCreatureList.clear();
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
topBlock = (byte)Blocks.hardSand.get().blockID;
fillerBlock = (byte)Blocks.hardSand.get().blockID;
customBiomeDecorator.treesPerChunk = 3;
customBiomeDecorator.flowersPerChunk = -999;
customBiomeDecorator.outbackPerChunk = 10;
customBiomeDecorator.deadBushPerChunk = 7;
customBiomeDecorator.tinyCactiPerChunk = 2;
customBiomeDecorator.cactiPerChunk = 4;
customBiomeDecorator.bushesPerChunk = 5;
customBiomeDecorator.generatePumpkins = false;
}
@Override
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 12 + par2Random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
if (var10 == Block.stone.blockID)
{
par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 2, 2);
}
}
}
/**
* Gets a WorldGen appropriate for this biome.
*/
@Override
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return par1Random.nextInt(3) == 0 ? new WorldGenOutbackShrub(0,0) : new WorldGenOutbackTree();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
49abefd814761d810fba03beee5269631817ef9e
|
8235b25f7ba6b58b9a59be061f31a48a97e747a5
|
/src/test/java/com/pouani/pos/security/jwt/JWTFilterTest.java
|
dfb3e96c378ca987d22ff76177e854359caab400
|
[] |
no_license
|
eserranogz/pouani-pos
|
6634f108823f79b14d9f9f9e68c68705f9b8f7e1
|
2616ffbd07fca010199dda052722dc82f4ba2594
|
refs/heads/main
| 2023-04-11T20:55:25.776944
| 2021-04-30T13:40:12
| 2021-04-30T13:40:12
| 327,051,727
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,569
|
java
|
package com.pouani.pos.security.jwt;
import static org.assertj.core.api.Assertions.assertThat;
import com.pouani.pos.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.http.HttpStatus;
import org.springframework.mock.web.MockFilterChain;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.test.util.ReflectionTestUtils;
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);
SecurityContextHolder.getContext().setAuthentication(null);
}
@Test
void testJWTFilter() throws Exception {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
"test-user",
"test-password",
Collections.singletonList(new SimpleGrantedAuthority(AuthoritiesConstants.USER))
);
String jwt = tokenProvider.createToken(authentication, false);
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Bearer " + jwt);
request.setRequestURI("/api/test");
MockHttpServletResponse response = new MockHttpServletResponse();
MockFilterChain filterChain = new MockFilterChain();
jwtFilter.doFilter(request, response, filterChain);
assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value());
assertThat(SecurityContextHolder.getContext().getAuthentication().getName()).isEqualTo("test-user");
assertThat(SecurityContextHolder.getContext().getAuthentication().getCredentials()).hasToString(jwt);
}
@Test
void testJWTFilterInvalidToken() throws Exception {
String jwt = "wrong_jwt";
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Bearer " + jwt);
request.setRequestURI("/api/test");
MockHttpServletResponse response = new MockHttpServletResponse();
MockFilterChain filterChain = new MockFilterChain();
jwtFilter.doFilter(request, response, filterChain);
assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value());
assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull();
}
@Test
void testJWTFilterMissingAuthorization() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
request.setRequestURI("/api/test");
MockHttpServletResponse response = new MockHttpServletResponse();
MockFilterChain filterChain = new MockFilterChain();
jwtFilter.doFilter(request, response, filterChain);
assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value());
assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull();
}
@Test
void testJWTFilterMissingToken() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Bearer ");
request.setRequestURI("/api/test");
MockHttpServletResponse response = new MockHttpServletResponse();
MockFilterChain filterChain = new MockFilterChain();
jwtFilter.doFilter(request, response, filterChain);
assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value());
assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull();
}
@Test
void testJWTFilterWrongScheme() throws Exception {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
"test-user",
"test-password",
Collections.singletonList(new SimpleGrantedAuthority(AuthoritiesConstants.USER))
);
String jwt = tokenProvider.createToken(authentication, false);
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Basic " + jwt);
request.setRequestURI("/api/test");
MockHttpServletResponse response = new MockHttpServletResponse();
MockFilterChain filterChain = new MockFilterChain();
jwtFilter.doFilter(request, response, filterChain);
assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value());
assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
f4d5238860fe7776b83efcaaba025e3c3f008caa
|
3af9afaef943e4a87f3eb142bd7f5a7eaa49728c
|
/src/main/java/com/unmsm/fisi/repository/PagoPedidoRepository.java
|
54448cc7ffd97aae40dfb4f914e70daf2c8980be
|
[] |
no_license
|
Carlos-21/QualityEggsSpring
|
3629893685a52ef5fe849d419725c268a8e29bad
|
56bb74ae772851568c92f659e00d325cdbba34ae
|
refs/heads/master
| 2023-08-10T13:28:29.834969
| 2020-08-01T18:00:06
| 2020-08-01T18:00:06
| 187,538,893
| 0
| 0
| null | 2023-07-22T06:09:04
| 2019-05-19T23:34:01
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 355
|
java
|
package com.unmsm.fisi.repository;
import java.io.Serializable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.unmsm.fisi.entity.RegPago;
@Repository("pagoPedidoRepositorio")
public interface PagoPedidoRepository extends JpaRepository<RegPago, Serializable>{
}
|
[
"carlos.llontop3@unmsm.edu.pe"
] |
carlos.llontop3@unmsm.edu.pe
|
dc346a8a079669e0af760b861ad0d9236c5ec2c8
|
d915f12ac9b0dd2375cc5a4e375af05a216020b3
|
/Source/com/drew/metadata/mp4/Mp4BoxHandler.java
|
26d7a8c65e2248caab0cd376a9f2c1cbb6b8f498
|
[
"Apache-2.0"
] |
permissive
|
eleduc/metadata-extractor
|
b19a1d7ecfb9bedd6f53032bd9b1c9619d70e1b9
|
f866af53f8b23797054db52c277326a665b3d6fa
|
refs/heads/master
| 2020-07-01T08:43:59.229911
| 2019-07-24T00:35:05
| 2019-07-24T00:35:05
| 201,112,759
| 0
| 0
|
Apache-2.0
| 2019-08-07T19:13:15
| 2019-08-07T19:13:14
| null |
UTF-8
|
Java
| false
| false
| 4,264
|
java
|
/*
* Copyright 2002-2019 Drew Noakes and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* More information about this project is available at:
*
* https://drewnoakes.com/code/exif/
* https://github.com/drewnoakes/metadata-extractor
*/
package com.drew.metadata.mp4;
import com.drew.imaging.mp4.Mp4Handler;
import com.drew.lang.SequentialByteArrayReader;
import com.drew.lang.SequentialReader;
import com.drew.lang.annotations.NotNull;
import com.drew.lang.annotations.Nullable;
import com.drew.metadata.Metadata;
import com.drew.metadata.mp4.boxes.*;
import java.io.IOException;
/**
* @author Payton Garland
*/
public class Mp4BoxHandler extends Mp4Handler<Mp4Directory>
{
private Mp4HandlerFactory handlerFactory = new Mp4HandlerFactory(this);
public Mp4BoxHandler(Metadata metadata)
{
super(metadata);
}
@NotNull
@Override
protected Mp4Directory getDirectory()
{
return new Mp4Directory();
}
@Override
public boolean shouldAcceptBox(@NotNull Box box)
{
return box.type.equals(Mp4BoxTypes.BOX_FILE_TYPE)
|| box.type.equals(Mp4BoxTypes.BOX_MOVIE_HEADER)
|| box.type.equals(Mp4BoxTypes.BOX_HANDLER)
|| box.type.equals(Mp4BoxTypes.BOX_MEDIA_HEADER)
|| box.type.equals(Mp4BoxTypes.BOX_TRACK_HEADER);
}
@Override
public boolean shouldAcceptContainer(@NotNull Box box)
{
return box.type.equals(Mp4ContainerTypes.BOX_TRACK)
|| box.type.equals(Mp4ContainerTypes.BOX_METADATA)
|| box.type.equals(Mp4ContainerTypes.BOX_MOVIE)
|| box.type.equals(Mp4ContainerTypes.BOX_MEDIA);
}
@Override
public Mp4Handler processBox(@NotNull Box box, @Nullable byte[] payload) throws IOException
{
if (payload != null) {
SequentialReader reader = new SequentialByteArrayReader(payload);
if (box.type.equals(Mp4BoxTypes.BOX_MOVIE_HEADER)) {
processMovieHeader(reader, box);
} else if (box.type.equals(Mp4BoxTypes.BOX_FILE_TYPE)) {
processFileType(reader, box);
} else if (box.type.equals(Mp4BoxTypes.BOX_HANDLER)) {
HandlerBox handlerBox = new HandlerBox(reader, box);
return handlerFactory.getHandler(handlerBox, metadata);
} else if (box.type.equals(Mp4BoxTypes.BOX_MEDIA_HEADER)) {
processMediaHeader(reader, box);
} else if (box.type.equals(Mp4BoxTypes.BOX_TRACK_HEADER)) {
processTrackHeader(reader, box);
}
} else {
if (box.type.equals(Mp4ContainerTypes.BOX_COMPRESSED_MOVIE)) {
directory.addError("Compressed MP4 movies not supported");
}
}
return this;
}
private void processFileType(@NotNull SequentialReader reader, @NotNull Box box) throws IOException
{
FileTypeBox fileTypeBox = new FileTypeBox(reader, box);
fileTypeBox.addMetadata(directory);
}
private void processMovieHeader(@NotNull SequentialReader reader, @NotNull Box box) throws IOException
{
MovieHeaderBox movieHeaderBox = new MovieHeaderBox(reader, box);
movieHeaderBox.addMetadata(directory);
}
private void processMediaHeader(@NotNull SequentialReader reader, @NotNull Box box) throws IOException
{
MediaHeaderBox mediaHeaderBox = new MediaHeaderBox(reader, box);
}
private void processTrackHeader(@NotNull SequentialReader reader, @NotNull Box box) throws IOException
{
TrackHeaderBox trackHeaderBox = new TrackHeaderBox(reader, box);
trackHeaderBox.addMetadata(directory);
}
}
|
[
"git@drewnoakes.com"
] |
git@drewnoakes.com
|
04c17e5fca1800f59649a31dda0ffaf071235cdf
|
542709976e006d38f73bba37aef93a3e7c2e4025
|
/common/src/main/java/com/ch/android/common/base/interal/lifecycle/ActivityLifecycleForRxLifecycle.java
|
8e9ba1535896712b22f6f27c650d3cfd9284a069
|
[
"Apache-2.0"
] |
permissive
|
chenhongs/HrzMavenComponent
|
f9d10b61f4589a53fc2877cbefb84d58cc81ccf8
|
a87d1cc0a441209b6d14d1ab22e768f95dbf6b9d
|
refs/heads/master
| 2020-04-05T15:18:12.941661
| 2018-11-23T09:30:11
| 2018-11-23T09:30:11
| 156,961,698
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,645
|
java
|
/*
* Copyright 2017 JessYan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ch.android.common.base.interal.lifecycle;
import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.trello.rxlifecycle2.RxLifecycle;
import com.trello.rxlifecycle2.android.ActivityEvent;
import javax.inject.Inject;
import javax.inject.Singleton;
import dagger.Lazy;
import io.reactivex.subjects.Subject;
/**
* ================================================
* 配合 {@link ActivityLifecycleable} 使用,使 {@link Activity} 具有 {@link RxLifecycle} 的特性
* ================================================
*/
@Singleton
public class ActivityLifecycleForRxLifecycle implements Application.ActivityLifecycleCallbacks {
@Inject
Lazy<FragmentLifecycleForRxLifecycle> mFragmentLifecycle;
@Inject
public ActivityLifecycleForRxLifecycle() {
}
/**
* 通过桥梁对象 {@code BehaviorSubject<ActivityEvent> mLifecycleSubject}
* 在每个 Activity 的生命周期中发出对应的生命周期事件
*/
@Override
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
if (activity instanceof ActivityLifecycleable) {
obtainSubject(activity).onNext(ActivityEvent.CREATE);
if (activity instanceof FragmentActivity) {
((FragmentActivity) activity).getSupportFragmentManager().registerFragmentLifecycleCallbacks(mFragmentLifecycle.get(), true);
}
}
}
@Override
public void onActivityStarted(Activity activity) {
if (activity instanceof ActivityLifecycleable) {
obtainSubject(activity).onNext(ActivityEvent.START);
}
}
@Override
public void onActivityResumed(Activity activity) {
if (activity instanceof ActivityLifecycleable) {
obtainSubject(activity).onNext(ActivityEvent.RESUME);
}
}
@Override
public void onActivityPaused(Activity activity) {
if (activity instanceof ActivityLifecycleable) {
obtainSubject(activity).onNext(ActivityEvent.PAUSE);
}
}
@Override
public void onActivityStopped(Activity activity) {
if (activity instanceof ActivityLifecycleable) {
obtainSubject(activity).onNext(ActivityEvent.STOP);
}
}
@Override
public void onActivitySaveInstanceState(Activity activity, Bundle outState) {
}
@Override
public void onActivityDestroyed(Activity activity) {
if (activity instanceof ActivityLifecycleable) {
obtainSubject(activity).onNext(ActivityEvent.DESTROY);
}
}
/**
* 从 @link BaseActivity} 中获得桥梁对象 {@code BehaviorSubject<ActivityEvent> mLifecycleSubject}
*
* @see <a href="https://mcxiaoke.gitbooks.io/rxdocs/content/Subject.html">BehaviorSubject 官方中文文档</a>
*/
private Subject<ActivityEvent> obtainSubject(Activity activity) {
return ((ActivityLifecycleable) activity).provideLifecycleSubject();
}
}
|
[
"15168264355@163.com"
] |
15168264355@163.com
|
10bc53dddffecb463e0420799fb1f641f4896f7a
|
94475242b2383228febb1c0fd6db672ab92e846f
|
/app/src/main/java/com/yadong/takeout/common/utils/ImageLoader.java
|
42eacec65f77f6d4a61499c98c04c8c390c69c05
|
[] |
no_license
|
zhangsifan66/TakeOut-1
|
e7a048b3bc8e3892bde8a3622951e9c92c2cbbef
|
4f8bd06289943a58674911342b314e48612e165e
|
refs/heads/master
| 2020-03-08T03:26:12.089347
| 2017-07-31T06:12:33
| 2017-07-31T06:12:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,640
|
java
|
package com.yadong.takeout.common.utils;
import android.content.Context;
import android.graphics.BitmapFactory;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.target.Target;
import java.io.File;
import java.util.concurrent.ExecutionException;
/**
* 图片加载帮助类
* 不加 dontAnimate(),有的机型会出现图片变形的情况,先记下找到更好的方法再处理
*/
public final class ImageLoader {
private ImageLoader() {
throw new RuntimeException("ImageLoader cannot be initialized!");
}
public static void loadFit(Context context, String url, ImageView view, int defaultResId) {
if (NetUtil.isWifiConnected(context) || NetUtil.isNetworkAvailable(context)) {
view.setScaleType(ImageView.ScaleType.FIT_XY);
Glide.with(context).load(url).fitCenter().dontAnimate().placeholder(defaultResId).into(view);
} else {
view.setImageResource(defaultResId);
}
}
public static void loadCenterCrop(Context context, String url, ImageView view, int defaultResId) {
if (NetUtil.isWifiConnected(context) || NetUtil.isNetworkAvailable(context)) {
Glide.with(context).load(url).centerCrop().dontAnimate().placeholder(defaultResId).into(view);
} else {
view.setImageResource(defaultResId);
}
}
public static void loadCenterCrop(Context context, String url, ImageView view) {
if (NetUtil.isWifiConnected(context) || NetUtil.isNetworkAvailable(context)) {
Glide.with(context).load(url).centerCrop().dontAnimate().into(view);
}
}
public static void loadFitCenter(Context context, String url, ImageView view, int defaultResId) {
if (NetUtil.isWifiConnected(context)) {
Glide.with(context).load(url).fitCenter().dontAnimate().placeholder(defaultResId).into(view);
} else {
view.setImageResource(defaultResId);
}
}
/**
* 带监听处理
*/
public static void loadFitCenter(Context context, String url, ImageView view, RequestListener listener) {
Glide.with(context).load(url).fitCenter().dontAnimate().listener(listener).into(view);
}
public static void loadCenterCrop(Context context, String url, ImageView view, RequestListener listener) {
Glide.with(context).load(url).centerCrop().dontAnimate().listener(listener).into(view);
}
/**
* 设置图片大小处理
*/
public static void loadFitOverride(Context context, String url, ImageView view, int defaultResId,
int width, int height) {
if (NetUtil.isWifiConnected(context)) {
Glide.with(context).load(url).fitCenter().dontAnimate().override(width, height)
.placeholder(defaultResId).into(view);
} else {
view.setImageResource(defaultResId);
}
}
/**
* 计算图片分辨率
*/
public static String calePhotoSize(Context context, String url) throws ExecutionException, InterruptedException {
File file = Glide.with(context).load(url)
.downloadOnly(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL).get();
// First decode with inJustDecodeBounds=true to check dimensions
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(file.getAbsolutePath(), options);
return options.outWidth + "*" + options.outHeight;
}
}
|
[
"hydznsqk@163.com"
] |
hydznsqk@163.com
|
4f7bbf04454b551d2cfaf370295b681559ea2443
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_336e603a61b89a1aac0225925081b96e0a6a38f7/MathUtils/2_336e603a61b89a1aac0225925081b96e0a6a38f7_MathUtils_s.java
|
54c10b41fd12d56959d2212931eed1c973f100ea
|
[] |
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,438
|
java
|
/*
* Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package com.badlogic.gdx.utils;
/**
* Utility and fast math functions.
*
* Thanks to:<br>
* Riven on JavaGaming.org for sin/cos/atan2/floor/ceil.<br>
* Roquen on JavaGaming.org for random numbers.<br>
*/
public class MathUtils {
static public final float PI = 3.1415927f;
static private final int SIN_BITS = 13; // Adjust for accuracy.
static private final int SIN_MASK = ~(-1 << SIN_BITS);
static private final int SIN_COUNT = SIN_MASK + 1;
static private final float radFull = PI * 2;
static private final float degFull = 360;
static private final float radToIndex = SIN_COUNT / radFull;
static private final float degToIndex = SIN_COUNT / degFull;
static public final float radiansToDegrees = 180f / PI;
static public final float degreesToRadians = PI / 180;
static public final float[] sin = new float[SIN_COUNT];
static public final float[] cos = new float[SIN_COUNT];
static {
for (int i = 0; i < SIN_COUNT; i++) {
float a = (i + 0.5f) / SIN_COUNT * radFull;
sin[i] = (float)Math.sin(a);
cos[i] = (float)Math.cos(a);
}
}
static public final float sin (float rad) {
return sin[(int)(rad * radToIndex) & SIN_MASK];
}
static public final float cos (float rad) {
return cos[(int)(rad * radToIndex) & SIN_MASK];
}
static public final float sinDeg (float deg) {
return sin[(int)(deg * degToIndex) & SIN_MASK];
}
static public final float cosDeg (float deg) {
return cos[(int)(deg * degToIndex) & SIN_MASK];
}
// ---
static private final int ATAN2_BITS = 7; // Adjust for accuracy.
static private final int ATAN2_BITS2 = ATAN2_BITS << 1;
static private final int ATAN2_MASK = ~(-1 << ATAN2_BITS2);
static private final int ATAN2_COUNT = ATAN2_MASK + 1;
static private final int ATAN2_DIM = (int)Math.sqrt(ATAN2_COUNT);
static private final float INV_ATAN2_DIM_MINUS_1 = 1.0f / (ATAN2_DIM - 1);
static private final float[] atan2 = new float[ATAN2_COUNT];
static {
for (int i = 0; i < ATAN2_DIM; i++) {
for (int j = 0; j < ATAN2_DIM; j++) {
float x0 = (float)i / ATAN2_DIM;
float y0 = (float)j / ATAN2_DIM;
atan2[j * ATAN2_DIM + i] = (float)Math.atan2(y0, x0);
}
}
}
static public final float atan2 (float y, float x) {
float add, mul;
if (x < 0) {
if (y < 0) {
y = -y;
mul = 1;
} else
mul = -1;
x = -x;
add = -3.141592653f;
} else {
if (y < 0) {
y = -y;
mul = -1;
} else
mul = 1;
add = 0;
}
float invDiv = 1 / ((x < y ? y : x) * INV_ATAN2_DIM_MINUS_1);
int xi = (int)(x * invDiv);
int yi = (int)(y * invDiv);
return (atan2[yi * ATAN2_DIM + xi] + add) * mul;
}
// ---
static private int randomSeed = (int)System.currentTimeMillis();
/**
* Returns a random number between 0 (inclusive) and the specified value (inclusive).
* @param range Must be >= 0.
*/
static public final int random (int range) {
int seed = randomSeed * 1103515245 + 12345;
randomSeed = seed;
return (seed >>> 15) * (range + 1) >>> 17;
}
static public final int random (int start, int end) {
int seed = randomSeed * 1103515245 + 12345;
randomSeed = seed;
return ((seed >>> 15) * (end - start + 1) >>> 17) + start;
}
static public final boolean randomBoolean () {
int seed = randomSeed * 1103515245 + 12345;
randomSeed = seed;
return seed > 0;
}
static public final float random () {
int seed = randomSeed * 1103515245 + 12345;
randomSeed = seed;
return (seed >>> 8) * 1f / (1 << 24);
}
static public final float random (float range) {
int seed = randomSeed * 1103515245 + 12345;
randomSeed = seed;
return (seed >>> 8) * 1f / (1 << 24) * range;
}
static public final float random (float start, float end) {
int seed = randomSeed * 1103515245 + 12345;
randomSeed = seed;
return start + (seed >>> 8) * 1f / (1 << 24) * (end - start);
}
// ---
static public int nextPowerOfTwo (int value) {
return 1 << 32 - Integer.numberOfLeadingZeros(value - 1);
}
static public boolean isPowerOfTwo (int value) {
return value != 0 && (value & value - 1) == 0;
}
// ---
static private final int BIG_ENOUGH_INT = 16 * 1024;
static private final double BIG_ENOUGH_FLOOR = BIG_ENOUGH_INT;
static private final double BIG_ENOUGH_CEIL = BIG_ENOUGH_INT + 0.5;
static public int floor (float x) {
return (int)(x + BIG_ENOUGH_FLOOR) - BIG_ENOUGH_INT;
}
static public int ceil (float x) {
return (int)(x + BIG_ENOUGH_CEIL) - BIG_ENOUGH_INT;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
c55d141a754e1b1591697273d11b980e7d7ecccb
|
ef6e41914df4c7864f6100642c791a8b73c10d7f
|
/cloud-hystrixdashboard-9001/src/main/java/com/ccb/springcloud/HystrixDashBoard9001.java
|
f7a38c583f2b283f479ae7b3cf0b779fd3df7c75
|
[] |
no_license
|
2568808909/SpringCloudDemo
|
465ac2788e38f3001a4921d817783d6ff8cf11c4
|
8723544222b891307876bf40e1d57ef611c12196
|
refs/heads/master
| 2022-07-18T18:46:12.168200
| 2020-04-06T13:46:41
| 2020-04-06T13:46:41
| 246,804,742
| 0
| 0
| null | 2022-06-21T02:58:35
| 2020-03-12T10:20:59
|
Java
|
UTF-8
|
Java
| false
| false
| 499
|
java
|
package com.ccb.springcloud;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
@SpringBootApplication
@EnableHystrixDashboard
public class HystrixDashBoard9001 {
public static void main(String[] args) {
SpringApplication.run(HystrixDashBoard9001.class, args);
}
}
|
[
"2568808909@qq.com"
] |
2568808909@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.