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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1eb7c6547d449087127f385fa298bfcbcceea0b7
|
4d6f449339b36b8d4c25d8772212bf6cd339f087
|
/netreflected/src/Framework/System.ComponentModel.Composition,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089/system/componentmodel/composition/primitives/ComposablePartDefinition.java
|
ce3c1b2b5a478969b5acf78f9423cdf19f3da17d
|
[
"MIT"
] |
permissive
|
lvyitian/JCOReflector
|
299a64550394db3e663567efc6e1996754f6946e
|
7e420dca504090b817c2fe208e4649804df1c3e1
|
refs/heads/master
| 2022-12-07T21:13:06.208025
| 2020-08-28T09:49:29
| 2020-08-28T09:49:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,787
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 MASES s.r.l.
*
* 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.
*/
/**************************************************************************************
* <auto-generated>
* This code was generated from a template using JCOReflector
*
* Manual changes to this file may cause unexpected behavior in your application.
* Manual changes to this file will be overwritten if the code is regenerated.
* </auto-generated>
*************************************************************************************/
package system.componentmodel.composition.primitives;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;
// Import section
import system.componentmodel.composition.primitives.ComposablePart;
/**
* The base .NET class managing System.ComponentModel.Composition.Primitives.ComposablePartDefinition, System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. Extends {@link NetObject}.
* <p>
*
* See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.Composition.Primitives.ComposablePartDefinition" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.ComponentModel.Composition.Primitives.ComposablePartDefinition</a>
*/
public class ComposablePartDefinition extends NetObject {
/**
* Fully assembly qualified name: System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
*/
public static final String assemblyFullName = "System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
/**
* Assembly name: System.ComponentModel.Composition
*/
public static final String assemblyShortName = "System.ComponentModel.Composition";
/**
* Qualified class name: System.ComponentModel.Composition.Primitives.ComposablePartDefinition
*/
public static final String className = "System.ComponentModel.Composition.Primitives.ComposablePartDefinition";
static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName);
/**
* The type managed from JCOBridge. See {@link JCType}
*/
public static JCType classType = createType();
static JCEnum enumInstance = null;
JCObject classInstance = null;
static JCType createType() {
try {
return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName));
} catch (JCException e) {
return null;
}
}
void addReference(String ref) throws Throwable {
try {
bridge.AddReference(ref);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ComposablePartDefinition(Object instance) throws Throwable {
super(instance);
if (instance instanceof JCObject) {
classInstance = (JCObject) instance;
} else
throw new Exception("Cannot manage object, it is not a JCObject");
}
public String getJCOAssemblyName() {
return assemblyFullName;
}
public String getJCOClassName() {
return className;
}
public String getJCOObjectName() {
return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
}
public Object getJCOInstance() {
return classInstance;
}
public void setJCOInstance(JCObject instance) {
classInstance = instance;
super.setJCOInstance(classInstance);
}
public JCType getJCOType() {
return classType;
}
/**
* Try to cast the {@link IJCOBridgeReflected} instance into {@link ComposablePartDefinition}, a cast assert is made to check if types are compatible.
*/
public static ComposablePartDefinition cast(IJCOBridgeReflected from) throws Throwable {
NetType.AssertCast(classType, from);
return new ComposablePartDefinition(from.getJCOInstance());
}
// Constructors section
public ComposablePartDefinition() throws Throwable {
}
// Methods section
public ComposablePart CreatePart() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objCreatePart = (JCObject)classInstance.Invoke("CreatePart");
return new ComposablePart(objCreatePart);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Properties section
// Instance Events section
}
|
[
"[email protected]"
] | |
6704aa76cc50867568cfab41d56683311298328a
|
31f4cab278d83a755f1e434f35273223b049d172
|
/bugs/accumulo/5594b2e0/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormatTest.java
|
8bc2b4567fdfaf29955c75289a402f2924b39b2e
|
[
"BSD-3-Clause",
"Apache-2.0",
"MIT"
] |
permissive
|
JenniferJohnson89/bugs_dot_jar_dissection
|
2a017f5f77772ddb2b9a5e45423ae084fa1bd7a0
|
7012cccce9a3fdbfc97a0ca507420c24650f6bcf
|
refs/heads/main
| 2022-12-28T16:38:18.039203
| 2020-10-20T09:45:47
| 2020-10-20T09:45:47
| 305,639,612
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,267
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.accumulo.core.client.mapreduce;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.RecordReader;
import org.apache.hadoop.mapreduce.RecordWriter;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.hadoop.mapreduce.TaskAttemptID;
import org.junit.Test;
/**
*
*/
public class AccumuloOutputFormatTest {
static class TestMapper extends Mapper<Key,Value,Text,Mutation> {
Key key = null;
int count = 0;
@Override
protected void map(Key k, Value v, Context context) throws IOException, InterruptedException {
if (key != null)
assertEquals(key.getRow().toString(), new String(v.get()));
assertEquals(k.getRow(), new Text(String.format("%09x", count + 1)));
assertEquals(new String(v.get()), String.format("%09x", count));
key = new Key(k);
count++;
}
@Override
protected void cleanup(Context context) throws IOException, InterruptedException {
super.cleanup(context);
Mutation m = new Mutation("total");
m.put("", "", Integer.toString(count));
try {
context.write(new Text(), m);
} catch (NullPointerException e) {}
}
}
@Test
public void testMR() throws Exception {
MockInstance mockInstance = new MockInstance("testmrinstance");
Connector c = mockInstance.getConnector("root", new byte[] {});
c.tableOperations().create("testtable1");
c.tableOperations().create("testtable2");
BatchWriter bw = c.createBatchWriter("testtable1", 10000L, 1000L, 4);
for (int i = 0; i < 100; i++) {
Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
bw.addMutation(m);
}
bw.close();
Job job = new Job();
job.setInputFormatClass(AccumuloInputFormat.class);
job.setMapperClass(TestMapper.class);
job.setOutputFormatClass(AccumuloOutputFormat.class);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(Mutation.class);
job.setNumReduceTasks(0);
Configuration conf = job.getConfiguration();
AccumuloInputFormat.setInputInfo(conf, "root", "".getBytes(), "testtable1", new Authorizations());
AccumuloInputFormat.setMockInstance(conf, "testmrinstance");
AccumuloOutputFormat.setOutputInfo(conf, "root", "".getBytes(), false, "testtable2");
AccumuloOutputFormat.setMockInstance(conf, "testmrinstance");
AccumuloInputFormat input = new AccumuloInputFormat();
List<InputSplit> splits = input.getSplits(job);
assertEquals(splits.size(), 1);
AccumuloOutputFormat output = new AccumuloOutputFormat();
TestMapper mapper = (TestMapper) job.getMapperClass().newInstance();
for (InputSplit split : splits) {
TaskAttemptID id = new TaskAttemptID();
TaskAttemptContext tac = new TaskAttemptContext(job.getConfiguration(), id);
RecordReader<Key,Value> reader = input.createRecordReader(split, tac);
RecordWriter<Text,Mutation> writer = output.getRecordWriter(tac);
Mapper<Key,Value,Text,Mutation>.Context context = mapper.new Context(job.getConfiguration(), id, reader, writer, null, null, split);
reader.initialize(split, context);
mapper.run(context);
writer.close(context);
}
Scanner scanner = c.createScanner("testtable2", new Authorizations());
Iterator<Entry<Key,Value>> iter = scanner.iterator();
assertTrue(iter.hasNext());
Entry<Key,Value> entry = iter.next();
assertEquals(Integer.parseInt(new String(entry.getValue().get())), 100);
assertFalse(iter.hasNext());
}
}
|
[
"[email protected]"
] | |
913de78b49a70a3d02c241dacf40fc47aa2faa40
|
b00f1244cb13975c664b79c6bae69061a2a07b45
|
/WS-KingdeeOnlyCode - 副本/app/src/main/java/com/fangzuo/assist/Dao/PDMain.java
|
8971f450c7796c8f4e67355fd6cab07a5d5abed3
|
[] |
no_license
|
huohehuo/KingdeePDA-OnlyCode-GZ-WS
|
ff61676747f2ea455ebd062fab51bd1609367046
|
4ebde5e96e0ccdcdef30172ac439619a82509fe4
|
refs/heads/master
| 2020-09-05T03:18:47.412409
| 2020-05-07T09:29:10
| 2020-05-07T09:29:10
| 219,965,547
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,704
|
java
|
package com.fangzuo.assist.Dao;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;
/**
* Created by NB on 2017/8/18.
*/
@Entity
public class PDMain {
@Id(autoincrement = true)
public Long id;
public String FID;
public String FProcessId;
public String FRemark;
public String FDate;
public String FUserName;
public String getFUserName() {
return this.FUserName;
}
public void setFUserName(String FUserName) {
this.FUserName = FUserName;
}
public String getFDate() {
return this.FDate;
}
public void setFDate(String FDate) {
this.FDate = FDate;
}
public String getFRemark() {
return this.FRemark;
}
public void setFRemark(String FRemark) {
this.FRemark = FRemark;
}
public String getFProcessId() {
return this.FProcessId;
}
public void setFProcessId(String FProcessId) {
this.FProcessId = FProcessId;
}
public String getFID() {
return this.FID;
}
public void setFID(String FID) {
this.FID = FID;
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
@Generated(hash = 563415013)
public PDMain(Long id, String FID, String FProcessId, String FRemark,
String FDate, String FUserName) {
this.id = id;
this.FID = FID;
this.FProcessId = FProcessId;
this.FRemark = FRemark;
this.FDate = FDate;
this.FUserName = FUserName;
}
@Generated(hash = 172423400)
public PDMain() {
}
}
|
[
"[email protected]"
] | |
97e40bfd837e5b88164f113421ae56bee3ecdf0f
|
f70163dcde66044f6ea3c48fccc4fd1cb622c504
|
/code/src/sneer/foundation/lang/CacheMap.java
|
95b4a8a5c39a3b1cd5b934a28bcb8e3bf59afdbf
|
[] |
no_license
|
andreronquetti/sneer
|
1f8b3f50909f918b0facdf8393ee04bdb6e7914d
|
22a9ecdc7225ebb84d296928c93b556e72381978
|
refs/heads/master
| 2021-05-26T16:32:31.707480
| 2010-12-03T23:43:23
| 2010-12-03T23:43:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,003
|
java
|
package sneer.foundation.lang;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class CacheMap<K, V> extends ConcurrentHashMap<K, V> {
static public <K, V> CacheMap<K, V> newInstance() {
return new CacheMap<K, V>();
}
private CacheMap() {}
Map<K, Thread> _resolversByKey = new HashMap<K, Thread>();
public <X extends Throwable> V get(K key, final ProducerX<V, X> producerToUseIfAbsent) throws X {
return get(key, new FunctorX<K, V, X>() { @Override public V evaluate(K ignored) throws X {
return producerToUseIfAbsent.produce();
}});
}
public <X extends Throwable> V get(K key, FunctorX<K, V, X> functorToUseIfAbsent) throws X {
return get(key, functorToUseIfAbsent, true);
}
/** Returns null instead of blocking if another thread is running the functor to resolve this same key. */
public <X extends Throwable> V getWithoutBlocking(K key, FunctorX<K, V, X> functorToUseIfAbsent) throws X {
return get(key, functorToUseIfAbsent, false);
}
private <X extends Throwable> V get(K key, FunctorX<K, V, X> functorToUseIfAbsent, boolean blocking) throws X {
boolean thisThreadMustResolve = false;
synchronized (_resolversByKey) {
V found = get(key);
if (found != null) return found;
thisThreadMustResolve = volunteerToResolve(key);
}
if (thisThreadMustResolve) {
V resolved = functorToUseIfAbsent.evaluate(key); //Fix: throw the exception in the other threads waiting too.
synchronized (_resolversByKey) {
put(key, resolved);
_resolversByKey.remove(key);
_resolversByKey.notifyAll();
};
return resolved;
}
if (!blocking) return null;
synchronized (_resolversByKey) {
while (_resolversByKey.containsKey(key))
waitWithoutInterruptions(key);
}
return get(key);
}
private boolean volunteerToResolve(K key) {
Thread resolver = _resolversByKey.get(key);
if (resolver == null) {
_resolversByKey.put(key, Thread.currentThread());
return true;
}
if (resolver == Thread.currentThread())
throw new IllegalStateException("The resolution (loading) of " + key + " is being triggered recursively.");
return false;
}
private void waitWithoutInterruptions(K key) {
try {
_resolversByKey.wait();
} catch (InterruptedException e) {
String stack = stackGiven(_resolversByKey.get(key));
throw new IllegalStateException("This thread was interrupted while waiting for another thread to resolve: " + key + "\n>>>>>>Start of other thread's stack:\n" + stack + "\n<<<<<<End of other thread's stack");
}
}
private String stackGiven(Thread thread) {
String result = "";
for (StackTraceElement element : thread.getStackTrace())
result += "\n\tat " + element.getClassName() + "."
+ element.getMethodName() + "(" + element.getFileName()
+ ":" + element.getLineNumber() + ")";
return result;
}
}
|
[
"[email protected]"
] | |
14dbbee1d3b34199c8a1dd2074199f83fad941ee
|
9d32980f5989cd4c55cea498af5d6a413e08b7a2
|
/A92s_10_0_0/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java
|
29bdad34ae2d9d200bac9cb220cb9d4c798321e4
|
[] |
no_license
|
liuhaosource/OppoFramework
|
e7cc3bcd16958f809eec624b9921043cde30c831
|
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
|
refs/heads/master
| 2023-06-03T23:06:17.572407
| 2020-11-30T08:40:07
| 2020-11-30T08:40:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,204
|
java
|
package org.apache.http.impl.conn.tsccm;
import java.lang.ref.ReferenceQueue;
import org.apache.http.conn.ClientConnectionOperator;
import org.apache.http.conn.OperatedClientConnection;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.impl.conn.AbstractPoolEntry;
@Deprecated
public class BasicPoolEntry extends AbstractPoolEntry {
private final BasicPoolEntryRef reference;
public BasicPoolEntry(ClientConnectionOperator op, HttpRoute route, ReferenceQueue<Object> queue) {
super(op, route);
if (route != null) {
this.reference = new BasicPoolEntryRef(this, queue);
return;
}
throw new IllegalArgumentException("HTTP route may not be null");
}
/* access modifiers changed from: protected */
public final OperatedClientConnection getConnection() {
return ((AbstractPoolEntry) this).connection;
}
/* access modifiers changed from: protected */
public final HttpRoute getPlannedRoute() {
return ((AbstractPoolEntry) this).route;
}
/* access modifiers changed from: protected */
public final BasicPoolEntryRef getWeakRef() {
return this.reference;
}
}
|
[
"[email protected]"
] | |
1c3811e274046276b818a15f4c97f4dbcce09f11
|
25a8800d24add506f14980a86eb6c9e5014f92b9
|
/RetrofitDemo/src/retrofit2/GsonRequestBodyConverter.java
|
1d3d6e75ae978d65aba7d0025d9bb85020b00cbc
|
[] |
no_license
|
xunleji/BGARefreshLayout
|
6acbf435ca70ca3612fe6b1fd7b59d599392d695
|
a7254df15b2eca836bdbe6768081873cfab1b582
|
refs/heads/master
| 2021-01-10T01:20:50.303850
| 2016-03-17T06:16:46
| 2016-03-17T06:16:46
| 54,093,391
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,864
|
java
|
/*
* Copyright (C) 2015 Square, 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 retrofit2;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonWriter;
import com.squareup.okhttp.MediaType;
import com.squareup.okhttp.RequestBody;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.charset.Charset;
import okio.Buffer;
final class GsonRequestBodyConverter<T> implements Converter<T, RequestBody> {
private static final MediaType MEDIA_TYPE = MediaType.parse("application/json; charset=UTF-8");
private static final Charset UTF_8 = Charset.forName("UTF-8");
private final Gson gson;
private final TypeAdapter<T> adapter;
GsonRequestBodyConverter(Gson gson, TypeAdapter<T> adapter) {
this.gson = gson;
this.adapter = adapter;
}
@Override public RequestBody convert(T value) throws IOException {
Buffer buffer = new Buffer();
Writer writer = new OutputStreamWriter(buffer.outputStream(), UTF_8);
JsonWriter jsonWriter = gson.newJsonWriter(writer);
try {
adapter.write(jsonWriter, value);
jsonWriter.flush();
} catch (IOException e) {
throw new AssertionError(e); // Writing to Buffer does no I/O.
}
return RequestBody.create(MEDIA_TYPE, buffer.readByteString());
}
}
|
[
"[email protected]"
] | |
6301a11fe2481e6164005917d36181929ff99f07
|
96726e8528eaf3d93d58fb3f0267de8dba7799f9
|
/src/argouml-app/src/org/argouml/ui/ActionExportXMI.java
|
a52ad02a0eaf65458fe811e406fc9c8253ab05b2
|
[
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive"
] |
permissive
|
marcusvnac/argouml-spl
|
c84d556a98e1a04f01fba3a921db6cb62e519085
|
bcae37308b13b7ee62da0867a77d21a0141a0f18
|
refs/heads/master
| 2021-01-12T20:55:55.500881
| 2015-06-11T19:41:28
| 2015-06-11T19:41:28
| 37,139,993
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,112
|
java
|
// $Id: ActionExportXMI.java 41 2010-04-03 20:04:12Z marcusvnac $
// Copyright (c) 1996-2007 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph appear in all copies. This software program and
// documentation are copyrighted by The Regents of the University of
// California. The software program and documentation are supplied "AS
// IS", without any accompanying services from The Regents. The Regents
// does not warrant that the operation of the program will be
// uninterrupted or error-free. The end-user understands that the program
// was developed for research purposes and is advised not to rely
// exclusively on the program for any reason. IN NO EVENT SHALL THE
// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
package org.argouml.ui;
import java.awt.event.ActionEvent;
import java.io.File;
import javax.swing.AbstractAction;
import javax.swing.JFileChooser;
import org.argouml.configuration.Configuration;
import org.argouml.i18n.Translator;
import org.argouml.persistence.PersistenceManager;
import org.argouml.persistence.ProjectFileView;
import org.argouml.util.ArgoFrame;
/**
* Exports the xmi of a project to a file choosen by the user.
* @author [email protected]
* Jun 7, 2003
*/
public final class ActionExportXMI extends AbstractAction {
/**
* The constructor.
*/
public ActionExportXMI() {
super(Translator.localize("action.export-project-as-xmi"));
}
/*
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
public void actionPerformed(ActionEvent e) {
PersistenceManager pm = PersistenceManager.getInstance();
// show a chooser dialog for the file name, only xmi is allowed
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle(Translator.localize(
"action.export-project-as-xmi"));
chooser.setFileView(ProjectFileView.getInstance());
chooser.setApproveButtonText(Translator.localize(
"filechooser.export"));
chooser.setAcceptAllFileFilterUsed(true);
pm.setXmiFileChooserFilter(chooser);
String fn =
Configuration.getString(
PersistenceManager.KEY_PROJECT_NAME_PATH);
if (fn.length() > 0) {
fn = PersistenceManager.getInstance().getBaseName(fn);
chooser.setSelectedFile(new File(fn));
}
int result = chooser.showSaveDialog(ArgoFrame.getInstance());
if (result == JFileChooser.APPROVE_OPTION) {
File theFile = chooser.getSelectedFile();
if (theFile != null) {
String name = theFile.getName();
Configuration.setString(
PersistenceManager.KEY_PROJECT_NAME_PATH,
PersistenceManager.getInstance().getBaseName(
theFile.getPath()));
name = pm.fixXmiExtension(name);
theFile = new File(theFile.getParent(), name);
ProjectBrowser.getInstance().trySaveWithProgressMonitor(
false, theFile);
}
}
}
/**
* The UID.
*/
private static final long serialVersionUID = -3445739054369264482L;
}
|
[
"[email protected]"
] | |
ce537cf466c0214503efde4f9e1287355455a595
|
03485bb4f4577f81cb20b76c98bbf863067ec30f
|
/src/com/company/NetSDK/SDK_CONFIG_CONTROLER.java
|
7cf15732003c8ead856de0f6de0f57d305d184ab
|
[] |
no_license
|
radtek/ssiot
|
f3e03cfe4032bd41e82d63c37412dbd0fde08df4
|
a328e246572b4aa527cfdeda85a4c38a023d7b86
|
refs/heads/master
| 2020-10-01T03:06:32.797388
| 2016-03-25T09:34:14
| 2016-03-25T09:34:14
| 227,441,239
| 1
| 1
| null | 2019-12-11T19:13:24
| 2019-12-11T19:13:23
| null |
GB18030
|
Java
| false
| false
| 1,049
|
java
|
package com.company.NetSDK;
import java.io.Serializable;
public class SDK_CONFIG_CONTROLER implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* \if ENGLISH_LANG
* Com attribution
* \else
* 串口属性
* \endif
*/
public SDK_COMM_PROP struComm = new SDK_COMM_PROP();
/**
* \if ENGLISH_LANG
* Controlled light group,light number start from 1,such as[1,3,8,0?-0]present control light number 1,3,8 light
* \else
* 受控灯数组(灯序号从1开始计数,比如[1,3,8,0…0]表示控制序号为1,3,8的灯
* \endif
*/
public byte bLightGroup[] = new byte[FinalVar.SDK_MAX_LIGHT_NUM];
/**
* \if ENGLISH_LANG
* Controller address
* \else
* 控制器地址
* \endif
*/
public byte bDeviceAddr;
/**
* \if ENGLISH_LANG
* Com Type 0:485 COM, 1:232 COM
* \else
* 串口类型 0:485串口, 1:232串口
* \endif
*/
public byte bComPortType;
}
|
[
"[email protected]"
] | |
3bd4ff83d9b565d86ed61623eb2bb96c1e67f470
|
9ee734247827006ed2ef201de7999b6e7dca6390
|
/ibm.jdk8/src/javax/xml/ws/handler/HandlerResolver.java
|
48cf89f23457e66a803035b1e3d8055dc5491e50
|
[
"MIT"
] |
permissive
|
flyzsd/java-code-snippets
|
33341764176f9ea4d023eaa75d36fb8be9786b97
|
1202b941ec4686d157fbc8643b65d247c6cd2b27
|
refs/heads/master
| 2021-01-13T07:48:23.217223
| 2017-06-23T04:45:12
| 2017-06-23T04:45:12
| 95,096,070
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,637
|
java
|
/*===========================================================================
* Licensed Materials - Property of IBM
* "Restricted Materials of IBM"
*
* IBM SDK, Java(tm) Technology Edition, v8
* (C) Copyright IBM Corp. 2005, 2010. All Rights Reserved
*
* US Government Users Restricted Rights - Use, duplication or disclosure
* restricted by GSA ADP Schedule Contract with IBM Corp.
*===========================================================================
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javax.xml.ws.handler;
/**
* <code>HandlerResolver</code> is an interface implemented
* by an application to get control over the handler chain
* set on proxy/dispatch objects at the time of their creation.
* <p>
* A <code>HandlerResolver</code> may be set on a <code>Service</code>
* using the <code>setHandlerResolver</code> method.
* <p>
* When the runtime invokes a <code>HandlerResolver</code>, it will
* pass it a <code>PortInfo</code> object containing information
* about the port that the proxy/dispatch object will be accessing.
*
* @see javax.xml.ws.Service#setHandlerResolver
*
* @since JAX-WS 2.0
**/
public interface HandlerResolver {
/**
* Gets the handler chain for the specified port.
*
* @param portInfo Contains information about the port being accessed.
* @return java.util.List<Handler> chain
**/
public java.util.List<Handler> getHandlerChain(PortInfo portInfo);
}
|
[
"[email protected]"
] | |
577a2d7714d087757e8dffbc4ad7594d2b3e74c5
|
f765c281ddd0db12c7cfe2bebda0652736bc33fc
|
/wudianzong/app/src/androidTest/java/com/sdwfvc/android/wudianzong/ExampleInstrumentedTest.java
|
094d46a498525391fe75dfdefbb40360f44ce4bc
|
[] |
no_license
|
Me-to/Android1
|
dca4eb637195498259fc73902e0afb5eccaafd0d
|
596d56907daf30f349acf9c2fc17aa77cd52ad7b
|
refs/heads/master
| 2022-04-10T15:35:32.479348
| 2020-03-29T18:03:39
| 2020-03-29T18:03:39
| 251,090,987
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 774
|
java
|
package com.sdwfvc.android.wudianzong;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.sdwfvc.android.wudianzong", appContext.getPackageName());
}
}
|
[
"[email protected]"
] | |
2d2f4bedaaf4829f43ef59fc33675925386daaa0
|
fba8af31d5d36d8a6cf0c341faed98b6cd5ec0cb
|
/src/main/java/com/alipay/api/response/KoubeiCraftsmanDataWorkBatchqueryResponse.java
|
c44a6d77db60c5440a006735a8925faa3bf6aa5a
|
[
"Apache-2.0"
] |
permissive
|
planesweep/alipay-sdk-java-all
|
b60ea1437e3377582bd08c61f942018891ce7762
|
637edbcc5ed137c2b55064521f24b675c3080e37
|
refs/heads/master
| 2020-12-12T09:23:19.133661
| 2020-01-09T11:04:31
| 2020-01-09T11:04:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,863
|
java
|
package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.CraftsmanWorkOpenModel;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.craftsman.data.work.batchquery response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiCraftsmanDataWorkBatchqueryResponse extends AlipayResponse {
private static final long serialVersionUID = 2856596661133558585L;
/**
* 当前页码
*/
@ApiField("current_page_no")
private Long currentPageNo;
/**
* 每页记录数
*/
@ApiField("page_size")
private Long pageSize;
/**
* 总页码数目
*/
@ApiField("total_page_no")
private Long totalPageNo;
/**
* 总共手艺人作品数目
*/
@ApiField("total_works")
private Long totalWorks;
/**
* 作品信息列表
*/
@ApiListField("works")
@ApiField("craftsman_work_open_model")
private List<CraftsmanWorkOpenModel> works;
public void setCurrentPageNo(Long currentPageNo) {
this.currentPageNo = currentPageNo;
}
public Long getCurrentPageNo( ) {
return this.currentPageNo;
}
public void setPageSize(Long pageSize) {
this.pageSize = pageSize;
}
public Long getPageSize( ) {
return this.pageSize;
}
public void setTotalPageNo(Long totalPageNo) {
this.totalPageNo = totalPageNo;
}
public Long getTotalPageNo( ) {
return this.totalPageNo;
}
public void setTotalWorks(Long totalWorks) {
this.totalWorks = totalWorks;
}
public Long getTotalWorks( ) {
return this.totalWorks;
}
public void setWorks(List<CraftsmanWorkOpenModel> works) {
this.works = works;
}
public List<CraftsmanWorkOpenModel> getWorks( ) {
return this.works;
}
}
|
[
"[email protected]"
] | |
55d382bd0e5e154c24acacc1ce6e3406e6db8a0f
|
af280e5d529695c86e05dc22e10d4aa85ef8af45
|
/app/src/main/java/com/bfurns/activity/AddDoctorActivity.java
|
6e95e1442306cee7aa7e319d14d4f270cd504d9c
|
[] |
no_license
|
Dummyurl/DoctorApp-
|
9ef88e153f96efb55573bad55b1106c2874ec3ae
|
bb21ddc3e7be935499a76688b0c7b7697560dc4a
|
refs/heads/master
| 2020-04-10T01:04:41.785249
| 2018-03-12T09:45:10
| 2018-03-12T09:45:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,124
|
java
|
package com.bfurns.activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.bfurns.R;
import com.bfurns.utility.GetData;
import com.bfurns.utility.MyPreferences;
import com.bfurns.utility.MyUtility;
import com.bfurns.utility.URLListner;
import com.bfurns.utility.Utility;
import com.bfurns.utility.Validations;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Mahesh on 21/08/16.
*/
public class AddDoctorActivity extends AppCompatActivity implements View.OnClickListener {
private Toolbar toolbar;
EditText name,email,contact;
String ename,eemail,econtact;
Button button;
RelativeLayout relativeLayout;
String clinic_id,user_id;
private static final String TAG = AddDoctorActivity.class.getSimpleName();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.doctor_create_profile);
Intent intent = getIntent();
clinic_id = intent.getStringExtra(MyPreferences.CLINIC_ID);
user_id = intent.getStringExtra(MyPreferences.USER_ID);
setUpViews();
}
private void setUpViews() {
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setTitle("Create Doctor Profile");
button=(Button) findViewById(R.id.create);
name=(EditText) findViewById(R.id.name);
email=(EditText) findViewById(R.id.edt_email);
contact=(EditText) findViewById(R.id.contact);
relativeLayout=(RelativeLayout) findViewById(R.id.rl_loginActivity);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
validateDoctor();
}
});
}
private void validateDoctor() {
MyUtility.hideKeyboard(contact,AddDoctorActivity.this);
eemail = email.getText().toString().trim();
econtact = contact.getText().toString().trim();
ename = name.getText().toString().trim();
if (ename.equalsIgnoreCase("")) {
MyUtility.showSnack(relativeLayout, Validations.ENTER_NAME);
}
if (eemail.equalsIgnoreCase("")) {
MyUtility.showSnack(relativeLayout, Validations.ENTER_EMAIL);
} else if (!eemail.matches(MyUtility.emailPattern) ) {
MyUtility.showSnack(relativeLayout, Validations.ENTER_VALID_EMAIL);
} else if (econtact.equalsIgnoreCase("") ) {
MyUtility.showSnack(relativeLayout, Validations.ENTER_MOBILE);
}
else if (econtact.length() < 10) {
MyUtility.showSnack(relativeLayout, Validations.ENTER_VALID_Mobile);
} else if (econtact.length() > 10) {
MyUtility.showSnack(relativeLayout, Validations.ENTER_VALID_Mobile);
}
else {
if(MyUtility.isConnected(this)){
CallApi();
}else{
MyUtility.showSnack(relativeLayout,MyUtility.INTERNET_ERROR);
}
}
}
private void CallApi() {
Utility.showProgressDialog(this, "Please wait..");
Utility.progressDialog.show();
List<NameValuePair> params = new ArrayList<>();
params.add(new BasicNameValuePair("doct_name", ename));
params.add(new BasicNameValuePair("doct_phone", econtact));
params.add(new BasicNameValuePair("doct_email", eemail));
params.add(new BasicNameValuePair("bus_id", clinic_id));
GetData getData = new GetData(params);
getData.setResultListner(new GetData.ResultListner() {
int success = 0;
private String id, clinic_id, username,doctor_id, phone, email1, image, mobileVerify, emailVerify, otp, socialType, socialId;
@Override
public void success(JSONObject jsonObject) {
if (Utility.progressDialog.isShowing()) {
Utility.progressDialog.dismiss();
}
try {
success = jsonObject.getInt("responce");
Log.e(TAG, "Status:" + success);
if (success == 1) {
JSONArray arr = jsonObject.getJSONArray("doctor");
for (int i = 0; i < arr.length(); i++) {
JSONObject json = arr.getJSONObject(i);
id = json.getString("doct_id");
username = json.getString("doct_name");
email1 = json.getString("doct_email");
clinic_id = json.getString("bus_id");
}
SharedPreferences sharedPreferences = getSharedPreferences(MyPreferences.My_PREFRENCES, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString(MyPreferences.USER_ID, id);
editor.putString(MyPreferences.CLINIC_ID, clinic_id);
editor.putString(MyPreferences.DOCTOR_ID, doctor_id);
editor.putString(MyPreferences.USER_EMAIL, email1);
editor.putString(MyPreferences.USER_PHONE, phone);
editor.putString(MyPreferences.USER_IMAGE, image);
editor.commit();
if (!MyPreferences.CLINIC_ID.isEmpty()) {
finish();
Utility.showSnackbar(relativeLayout, getString(R.string.success));
// clearFields();//.....call clear field...
Intent intent = new Intent(AddDoctorActivity.this, StepTwoActivity.class);
intent.putExtra(MyPreferences.USER_ID, user_id);
intent.putExtra(MyPreferences.CLINIC_ID, clinic_id);
intent.putExtra(MyPreferences.DOCTOR_ID, doctor_id);
startActivity(intent);
} else {
Utility.showSnackbar(relativeLayout, "Failed to store this session");
}
}
if (success != 1) {
Utility.showSnackbar(relativeLayout, getString(R.string.please_enter_valid_details));
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void fail() {
if (Utility.progressDialog.isShowing()) {
Utility.progressDialog.dismiss();
}
if (success != 1) {
Utility.showSnackbar(relativeLayout, getString(R.string.failed));
}
}
});
getData.execute(URLListner.BASEURL + URLListner.add_doctor);
}
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.add:
finish();
break;
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()){
case android.R.id.home:
onBackPressed();
break;
}
return super.onOptionsItemSelected(item);
}
}
|
[
"[email protected]"
] | |
411014ed21c3791a138a5af6a8dca3ee5290806d
|
d71e879b3517cf4fccde29f7bf82cff69856cfcd
|
/ExtractedJars/Health_com.huawei.health/javafiles/com/google/android/gms/internal/zzabs.java
|
6d5174e3a5328bbc7230f0cf57fa582fc3eedb17
|
[
"MIT"
] |
permissive
|
Andreas237/AndroidPolicyAutomation
|
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
|
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
|
refs/heads/master
| 2020-04-10T02:14:08.789751
| 2019-05-16T19:29:11
| 2019-05-16T19:29:11
| 160,739,088
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 332
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.google.android.gms.internal;
import com.google.android.gms.common.api.Status;
public interface zzabs
{
public abstract Exception zzA(Status status);
}
|
[
"[email protected]"
] | |
d6c6b3961f7e8989150e7d2e71b1cf906aeea422
|
82dfbecde34009d33db1c02d5815d1d67d0b446d
|
/_test/src/main/java/webapp/demo6_aop/TestController.java
|
b1e7e023250bd2fa4d7371e64a1deb63848f41a2
|
[
"Apache-2.0"
] |
permissive
|
sun3Lu/solon
|
4afa62d4b94cf735be1f77655d0d92761ac28e89
|
0bae2564c45d3546e6f61aa7a6749a42c35f79c2
|
refs/heads/master
| 2022-11-30T03:59:52.174826
| 2020-08-06T03:45:24
| 2020-08-06T03:45:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,206
|
java
|
package webapp.demo6_aop;
import org.noear.solon.XApp;
import org.noear.solon.annotation.XController;
import org.noear.solon.annotation.XMapping;
import org.noear.solon.annotation.XInject;
import org.noear.solon.core.XContext;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
@XController
public class TestController {
@XInject("rs1") //会从bean库注入
public Rockapi rockapi11;
@XInject("rs1")
public Rockapi rockapi12;
@XInject("rs3")
public Rockapi rockapi13;
@XInject //会自动生成
public Rockservice2 rockapi2;
public String test_aaa = XApp.cfg().get("demo6.test.aaa");
public int test_bbb = XApp.cfg().getInt("demo6.test.bbb",0);
public Properties prop = XApp.cfg().getProp("mytbae.bcf");
@XMapping("/demo6/aop")
public Object test() throws Exception {
Map<String, Object> map = new HashMap<>();
map.put("rockapi11", rockapi11.test());
map.put("rockapi12", rockapi12.test());
map.put("rockapi2", rockapi2.test());
return map;
}
@XMapping("/demo6/aop3")
public Object test3() throws Exception {
return rockapi13.test();
}
}
|
[
"[email protected]"
] | |
2e8c18c5bae518c0da61e503f39b394eb1e3d139
|
7834a5c9b3c4dd0a2d5e7274eb9acce43c0a56d5
|
/components/pdp/src/an/xacml/engine/PDPStatus.java
|
f2e0fe56bb45a4b3bb505a13f46f79edfe42d980
|
[] |
no_license
|
chuxuantinh/en-xacml
|
b72315449a94d902ed1bd2eef40d76b3bb76f0cd
|
56aca8c8fe2515f3b206c1caa2acca1b57301323
|
refs/heads/main
| 2023-04-13T14:54:34.628720
| 2021-04-30T12:26:36
| 2021-04-30T12:26:36
| 363,133,483
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 721
|
java
|
package an.xacml.engine;
import an.control.AbstractStatus;
public class PDPStatus extends AbstractStatus {
public static final String KEY_RUN_STATUS = "Status";
public static final String KEY_WORKERTHREADS_TOTAL = "TotalThreads";
public static final String KEY_WORKERTHREADS_IDLES = "IdleThreads";
// TODO other keys
public static final String STATUS_RUN_NOTRUN = "NotRun";
public static final String STATUS_RUN_RUNING = "Running";
public static final String STATUS_RUN_INITIALIZED = "Initialized";
public static final String STATUS_RUN_RELOADPOLICY = "ReloadingPolicies";
// TODO other status
public PDPStatus() {
status.put(KEY_RUN_STATUS, STATUS_RUN_NOTRUN);
}
}
|
[
"[email protected]"
] | |
b6b68cf13df3939a30478de9e67ac094a25255c8
|
66b96cbf26682eb51e6893a45d773481c5118b67
|
/ros-20190910/java/src/main/java/com/aliyun/ros20190910/models/ListStackGroupOperationsResponse.java
|
b97ada3c4825c0e405cfaf98c9b90b6eb814f581
|
[
"Apache-2.0"
] |
permissive
|
atptro/alibabacloud-sdk
|
4c104535fe77b94a4d5536028874f492d86aa794
|
65d4a000e4f4059b58ca1bc3d032853aedef4f3f
|
refs/heads/master
| 2022-10-17T21:45:07.475716
| 2020-06-18T07:37:05
| 2020-06-18T07:37:05
| 273,171,083
| 0
| 0
|
NOASSERTION
| 2020-06-18T07:29:22
| 2020-06-18T07:29:21
| null |
UTF-8
|
Java
| false
| false
| 2,249
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ros20190910.models;
import com.aliyun.tea.*;
public class ListStackGroupOperationsResponse extends TeaModel {
@NameInMap("RequestId")
@Validation(required = true)
public String requestId;
@NameInMap("PageNumber")
@Validation(required = true)
public Integer pageNumber;
@NameInMap("PageSize")
@Validation(required = true)
public Integer pageSize;
@NameInMap("TotalCount")
@Validation(required = true)
public Integer totalCount;
@NameInMap("StackGroupOperations")
@Validation(required = true)
public java.util.List<ListStackGroupOperationsResponseStackGroupOperations> stackGroupOperations;
public static ListStackGroupOperationsResponse build(java.util.Map<String, ?> map) throws Exception {
ListStackGroupOperationsResponse self = new ListStackGroupOperationsResponse();
return TeaModel.build(map, self);
}
public static class ListStackGroupOperationsResponseStackGroupOperations extends TeaModel {
@NameInMap("StackGroupName")
@Validation(required = true)
public String stackGroupName;
@NameInMap("StackGroupId")
@Validation(required = true)
public String stackGroupId;
@NameInMap("OperationId")
@Validation(required = true)
public String operationId;
@NameInMap("OperationDescription")
@Validation(required = true)
public String operationDescription;
@NameInMap("CreateTime")
@Validation(required = true)
public String createTime;
@NameInMap("EndTime")
@Validation(required = true)
public String endTime;
@NameInMap("Action")
@Validation(required = true)
public String action;
@NameInMap("Status")
@Validation(required = true)
public String status;
public static ListStackGroupOperationsResponseStackGroupOperations build(java.util.Map<String, ?> map) throws Exception {
ListStackGroupOperationsResponseStackGroupOperations self = new ListStackGroupOperationsResponseStackGroupOperations();
return TeaModel.build(map, self);
}
}
}
|
[
"[email protected]"
] | |
e2cf0afe4561b25005e58b2319035de4a6bc2bb9
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Mockito-20/org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker/BBC-F0-opt-50/tests/21/org/mockito/internal/creation/bytebuddy/ByteBuddyMockMaker_ESTest.java
|
cd70e51fa6a03fc5dcc0e6098aa0c85017c1be28
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 5,273
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Oct 23 23:12:33 GMT 2021
*/
package org.mockito.internal.creation.bytebuddy;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.mockito.internal.creation.MockSettingsImpl;
import org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker;
import org.mockito.internal.creation.bytebuddy.ClassInstantiator;
import org.mockito.internal.creation.settings.CreationSettings;
import org.mockito.invocation.MockHandler;
import org.mockito.mock.MockCreationSettings;
import org.mockito.mock.SerializableMode;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class ByteBuddyMockMaker_ESTest extends ByteBuddyMockMaker_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
ByteBuddyMockMaker byteBuddyMockMaker0 = new ByteBuddyMockMaker();
MockSettingsImpl<Object> mockSettingsImpl0 = new MockSettingsImpl<Object>();
Class<Object> class0 = Object.class;
CreationSettings<Object> creationSettings0 = mockSettingsImpl0.setTypeToMock(class0);
// Undeclared exception!
try {
byteBuddyMockMaker0.createMock((MockCreationSettings<Object>) creationSettings0, (MockHandler) null);
fail("Expecting exception: RuntimeException");
} catch(RuntimeException e) {
}
}
@Test(timeout = 4000)
public void test1() throws Throwable {
ByteBuddyMockMaker byteBuddyMockMaker0 = new ByteBuddyMockMaker();
ClassInstantiator.UsingObjenesis classInstantiator_UsingObjenesis0 = new ClassInstantiator.UsingObjenesis(true);
MockSettingsImpl<Integer> mockSettingsImpl0 = new MockSettingsImpl<Integer>();
// Undeclared exception!
try {
byteBuddyMockMaker0.resetMock(classInstantiator_UsingObjenesis0, (MockHandler) null, mockSettingsImpl0);
fail("Expecting exception: ClassCastException");
} catch(ClassCastException e) {
//
// org.mockito.internal.creation.bytebuddy.ClassInstantiator$UsingObjenesis cannot be cast to org.mockito.internal.creation.bytebuddy.MockMethodInterceptor$MockAccess
//
verifyException("org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker", e);
}
}
@Test(timeout = 4000)
public void test2() throws Throwable {
ByteBuddyMockMaker byteBuddyMockMaker0 = new ByteBuddyMockMaker();
// Undeclared exception!
try {
byteBuddyMockMaker0.createMock((MockCreationSettings<ClassInstantiator.UsingObjenesis>) null, (MockHandler) null);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker", e);
}
}
@Test(timeout = 4000)
public void test3() throws Throwable {
ByteBuddyMockMaker byteBuddyMockMaker0 = new ByteBuddyMockMaker();
MockSettingsImpl<Object> mockSettingsImpl0 = new MockSettingsImpl<Object>();
MockHandler mockHandler0 = byteBuddyMockMaker0.getHandler(mockSettingsImpl0);
assertNull(mockHandler0);
}
@Test(timeout = 4000)
public void test4() throws Throwable {
ByteBuddyMockMaker byteBuddyMockMaker0 = new ByteBuddyMockMaker();
MockSettingsImpl<Object> mockSettingsImpl0 = new MockSettingsImpl<Object>();
SerializableMode serializableMode0 = SerializableMode.ACROSS_CLASSLOADERS;
mockSettingsImpl0.serializable(serializableMode0);
// Undeclared exception!
try {
byteBuddyMockMaker0.createMock((MockCreationSettings<Object>) mockSettingsImpl0, (MockHandler) null);
fail("Expecting exception: RuntimeException");
} catch(RuntimeException e) {
}
}
@Test(timeout = 4000)
public void test5() throws Throwable {
ByteBuddyMockMaker byteBuddyMockMaker0 = new ByteBuddyMockMaker();
MockSettingsImpl<Object> mockSettingsImpl0 = new MockSettingsImpl<Object>();
// Undeclared exception!
try {
byteBuddyMockMaker0.createMock((MockCreationSettings<Object>) mockSettingsImpl0, (MockHandler) null);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("org.mockito.internal.creation.bytebuddy.CachingMockBytecodeGenerator", e);
}
}
@Test(timeout = 4000)
public void test6() throws Throwable {
ByteBuddyMockMaker byteBuddyMockMaker0 = new ByteBuddyMockMaker();
MockSettingsImpl<Integer> mockSettingsImpl0 = new MockSettingsImpl<Integer>();
// Undeclared exception!
try {
byteBuddyMockMaker0.resetMock((Object) null, (MockHandler) null, mockSettingsImpl0);
fail("Expecting exception: RuntimeException");
} catch(RuntimeException e) {
}
}
}
|
[
"[email protected]"
] | |
96396d1ff98d1ecc8baeb5e9c00c45a5b11a83b0
|
ee1244b10de45679f053293e366f192af307be74
|
/sources/com/google/android/gms/internal/config/zzbf.java
|
8e4464e7cfb25e1a75b242c02a268d01024b3382
|
[] |
no_license
|
scarletstuff/Turbogram
|
a086e50b3f4d7036526075199616682a0d7c9c45
|
21b8862573953add9260f1eb586f0985d2c71e8e
|
refs/heads/master
| 2021-09-23T14:34:23.323880
| 2018-09-24T17:48:43
| 2018-09-24T17:48:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,845
|
java
|
package com.google.android.gms.internal.config;
import java.nio.charset.Charset;
import java.util.Arrays;
public final class zzbf {
private static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
protected static final Charset UTF_8 = Charset.forName("UTF-8");
public static final Object zzcp = new Object();
public static boolean equals(Object[] objArr, Object[] objArr2) {
boolean length = objArr == null ? false : objArr.length;
int length2 = objArr2 == null ? 0 : objArr2.length;
int i = 0;
boolean z = false;
while (true) {
if (z >= length || objArr[z] != null) {
int i2 = i;
while (i2 < length2 && objArr2[i2] == null) {
i2++;
}
boolean z2 = z >= length;
boolean z3 = i2 >= length2;
if (z2 && z3) {
return true;
}
if (z2 != z3 || !objArr[z].equals(objArr2[i2])) {
return false;
}
i = i2 + 1;
z++;
} else {
z++;
}
}
}
public static int hashCode(Object[] objArr) {
int length = objArr == null ? 0 : objArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
Object obj = objArr[i];
i++;
i2 = obj != null ? obj.hashCode() + (i2 * 31) : i2;
}
return i2;
}
public static int zza(byte[][] bArr) {
int length = bArr == null ? 0 : bArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
byte[] bArr2 = bArr[i];
i++;
i2 = bArr2 != null ? Arrays.hashCode(bArr2) + (i2 * 31) : i2;
}
return i2;
}
public static void zza(zzbb zzbb, zzbb zzbb2) {
if (zzbb.zzch != null) {
zzbb2.zzch = (zzbd) zzbb.zzch.clone();
}
}
public static boolean zza(byte[][] bArr, byte[][] bArr2) {
boolean length = bArr == null ? false : bArr.length;
int length2 = bArr2 == null ? 0 : bArr2.length;
int i = 0;
boolean z = false;
while (true) {
if (z >= length || bArr[z] != null) {
int i2 = i;
while (i2 < length2 && bArr2[i2] == null) {
i2++;
}
boolean z2 = z >= length;
boolean z3 = i2 >= length2;
if (z2 && z3) {
return true;
}
if (z2 != z3 || !Arrays.equals(bArr[z], bArr2[i2])) {
return false;
}
i = i2 + 1;
z++;
} else {
z++;
}
}
}
}
|
[
"[email protected]"
] | |
6de0ceabb095c58e3474d41c2e94ee32f41e36ae
|
22d93e73b4b829b6b8b64b09ea8ef7c676a6806a
|
/4.JavaCollections/src/com/javarush/task/task36/task3610/MyMultiMap.java
|
9748f32b308b4145b938f37a94e72f0c94b1198c
|
[] |
no_license
|
Sekator778/JavaRushTasks
|
99b2844deaf42626704d23c8a83f75bd1a3661cb
|
82f1801395fd53dc7ffacd1d902115475c4e8601
|
refs/heads/master
| 2022-12-05T06:33:42.385482
| 2020-12-20T17:51:00
| 2020-12-20T17:51:00
| 243,021,523
| 2
| 0
| null | 2022-11-16T01:33:26
| 2020-02-25T14:35:20
|
Roff
|
UTF-8
|
Java
| false
| false
| 2,583
|
java
|
package com.javarush.task.task36.task3610;
import java.io.Serializable;
import java.util.*;
public class MyMultiMap<K, V> extends HashMap<K, V> implements Cloneable, Serializable {
static final long serialVersionUID = 123456789L;
private HashMap<K, List<V>> map;
private int repeatCount;
public MyMultiMap(int repeatCount) {
this.repeatCount = repeatCount;
map = new HashMap<>();
}
@Override
public int size() {
return values().size();
}
@Override
public V put(K key, V value) {
List<V> list = map.get(key);
V current;
if (list != null) {
current = list.get(list.size() - 1);
} else {
list = new ArrayList<>();
list.add(value);
map.put(key, list);
return null;
}
if (map.containsKey(key) && map.get(key).size() < repeatCount) {
list.add(value);
return current;
} else if (map.containsKey(key) && map.get(key).size() == repeatCount) {
list.remove(0);
list.add(value);
return current;
}
return null;
//напишите тут ваш код
}
@Override
public V remove(Object key) {
if (map.get(key) != null) {
List<V> list = map.get(key);
V temp = list.remove(0);
if (list.isEmpty()) {
map.remove(key);
}
return temp;
} else {
return null;
}
}
@Override
public Set<K> keySet() {
return map.keySet();
}
@Override
public Collection<V> values() {
Collection<V> vs = new ArrayList<>();
map.forEach((key, value) -> vs.addAll(value));
return vs; //напишите тут ваш код
}
@Override
public boolean containsKey(Object key) {
return map.containsKey(key);//напишите тут ваш код
}
@Override
public boolean containsValue(Object value) {
return values().contains(value);//напишите тут ваш код
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("{");
for (Map.Entry<K, List<V>> entry : map.entrySet()) {
sb.append(entry.getKey());
sb.append("=");
for (V v : entry.getValue()) {
sb.append(v);
sb.append(", ");
}
}
String substring = sb.substring(0, sb.length() - 2);
return substring + "}";
}
}
|
[
"[email protected]"
] | |
e94438e93655892ecf9d9fc2bde14b5db9ce5c58
|
d320db6e9e0fcd023ad702136242c2a542ec2018
|
/swak-test/src/test/java/com/swak/country/OecdCountryTest.java
|
ee7b3d3be9e4f19962fe8ecc9b0446cd57739262
|
[
"Apache-2.0"
] |
permissive
|
youbooks/swak
|
f7e249932c7dc3d3154ed40313c392645c2ee64d
|
d8d6ca32d80783667d9c27e0d2d56c9fd05ea918
|
refs/heads/master
| 2023-02-13T03:10:14.061240
| 2021-01-11T03:51:58
| 2021-01-11T03:51:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,256
|
java
|
package com.swak.country;
import java.io.IOException;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.collect.Sets;
import com.swak.entity.ColumnMapper;
import com.swak.entity.DataType;
import com.swak.entity.Result;
import com.swak.excel.ExcelUtils;
import com.swak.excel.impl.DefaultExcelMapper;
import com.swak.utils.ChineseUtils;
import com.swak.utils.JsonMapper;
import com.swak.utils.Lists;
import com.swak.utils.Maps;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* 协定国家
*
* @author lifeng
* @date 2020年9月1日 下午3:36:50
*/
public class OecdCountryTest {
public static List<Country> countrys() throws IOException {
Result result = ExcelUtils.read(new StringExcelMapper(), CountryTest.class.getResourceAsStream("协定国家.xls"));
List<Imp> imps = result.getObj();
Set<String> names = Sets.newHashSet();
for (Imp imp : imps) {
if (ChineseUtils.isChinese(imp.name)) {
names.add(imp.name);
}
}
List<Country> oecds = Lists.newArrayList();
for (String name : names) {
Country country = new Country();
country.address = name;
oecds.add(country);
}
// Oecd 协定国家
List<Country> countrys = CountryTest.countrys();
for (Country oecd : oecds) {
Country found = null;
for (Country country : countrys) {
if (oecd.address.equals(country.address)) {
found = country;
break;
}
if (oecd.address.equals("②捷克斯洛伐克(适用于斯洛伐克)") && country.address.equals("斯洛伐克")) {
found = country;
break;
}
if (oecd.address.equals("①德国") && country.address.equals("德国")) {
found = country;
break;
}
if (oecd.address.equals("巴新") && country.address.equals("巴布亚新几内亚")) {
found = country;
break;
}
if (oecd.address.equals("③南斯拉夫 (适用于波斯尼亚和黑塞哥维那) YUGOSLAVIA(BOSNIA AND HERZEGOVINA)")
&& country.address.equals("南斯拉夫")) {
found = country;
break;
}
if (oecd.address.equals("菲律宾THE PHILIPPINES") && country.address.equals("菲律宾")) {
found = country;
break;
}
if (oecd.address.equals("蒙古") && country.address.equals("蒙古国")) {
found = country;
break;
}
if (oecd.address.equals("卡塔尔国") && country.address.equals("卡塔尔")) {
found = country;
break;
}
if (oecd.address.equals("吉尔吉斯") && country.address.equals("吉尔吉斯斯坦")) {
found = country;
break;
}
if (oecd.address.equals("刚果(布)") && country.address.equals("刚果共和国")) {
found = country;
break;
}
if (oecd.address.equals("孟加拉国") && country.address.equals("孟加拉")) {
found = country;
break;
}
}
if (found != null) {
oecd.address = found.address;
oecd.code = found.code;
oecd.py = found.py;
continue;
}
System.out.println(oecd);
}
Lists.sort(oecds, new Comparator<Country>() {
@Override
public int compare(Country o1, Country o2) {
return o1.code.compareTo(o2.code);
}
});
return oecds;
}
public static void main(String[] args) throws IOException {
// 所有的国家
List<Country> countrys = countrys();
Map<String, Classify> classifys = Maps.newOrderMap();
for (Country country : countrys) {
Classify classify = classifys.computeIfAbsent(country.py, (key) -> {
return new Classify(key);
});
classify.items.add(country);
}
List<Classify> types = Lists.newArrayList(classifys.values());
Lists.sort(types, new Comparator<Classify>() {
@Override
public int compare(Classify o1, Classify o2) {
return o1.name.compareTo(o2.name);
}
});
System.out.println(JsonMapper.toJson(types));
}
}
class StringExcelMapper extends DefaultExcelMapper<Imp> {
@Override
protected List<ColumnMapper> getRowMapper() {
List<ColumnMapper> columns = Lists.newArrayList();
columns.add(ColumnMapper.build("国家", "B", DataType.STRING, "name"));
return columns;
}
@Override
public int getStartRow() {
return 1;
}
}
@ToString
@Getter
@Setter
class Imp {
String name;
}
|
[
"[email protected]"
] | |
0e763fb54ba6f4529cf1cfa069a94af2958f4779
|
d6bf86106b256bb8adec39955f261bffd4f87e86
|
/src/main/java/com/weixin/user/dao/UserDao.java
|
8e6ea16ac3b6460d2927eb868bbf986173bfbecd
|
[] |
no_license
|
gaohe1227/weixindemo
|
06ab19d206ba5af01c45b2044cf7d2970e13a451
|
ef83d57d9e513683994c5272cb44fc448143779d
|
refs/heads/master
| 2021-01-20T20:03:37.784249
| 2016-06-09T09:47:02
| 2016-06-09T09:47:02
| 60,400,087
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 217
|
java
|
package com.weixin.user.dao;
import com.weixin.base.dao.BaseDao;
import com.weixin.base.dao.MyBatisRepository;
import com.weixin.user.model.User;
@MyBatisRepository
public interface UserDao extends BaseDao<User>{
}
|
[
"[email protected]"
] | |
cb925f5cb34eb0bda4c3afc7071cd08553e67d65
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE80_XSS/CWE80_XSS__CWE182_getQueryString_Servlet_53a.java
|
affab5d874a4404afa4ac9bf276264da937909a9
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 2,877
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE80_XSS__CWE182_getQueryString_Servlet_53a.java
Label Definition File: CWE80_XSS__CWE182.label.xml
Template File: sources-sink-53a.tmpl.java
*/
/*
* @description
* CWE: 80 Cross Site Scripting (XSS)
* BadSource: getQueryString_Servlet Parse id param out of the URL query string (without using getParameter())
* GoodSource: A hardcoded string
* Sinks:
* BadSink : Display of data in web page after using replaceAll() to remove script tags, which will still allow XSS (CWE 182: Collapse of Data into Unsafe Value)
* Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package
*
* */
package testcases.CWE80_XSS;
import testcasesupport.*;
import javax.servlet.http.*;
import javax.servlet.http.*;
import java.util.StringTokenizer;
public class CWE80_XSS__CWE182_getQueryString_Servlet_53a extends AbstractTestCaseServlet
{
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
data = ""; /* initialize data in case id is not in query string */
/* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParameter()) */
{
StringTokenizer st = new StringTokenizer(request.getQueryString(), "&");
while (st.hasMoreTokens())
{
String token = st.nextToken(); /* a token will be like "id=foo" */
if(token.startsWith("id=")) /* check if we have the "id" parameter" */
{
data = token.substring(3); /* set data to "foo" */
break; /* exit while loop */
}
}
}
(new CWE80_XSS__CWE182_getQueryString_Servlet_53b()).bad_sink(data , request, response);
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
/* FIX: Use a hardcoded string */
data = "foo";
(new CWE80_XSS__CWE182_getQueryString_Servlet_53b()).goodG2B_sink(data , request, response);
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"[email protected]"
] | |
49a3f3136a13ae8340384b10097d4bfcaec6855b
|
78c696de905e3f1a699b106c6f23893bd0e96fa3
|
/src/org/eclipse/ant/internal/ui/dtd/schema/Schema.java
|
74c4ae8c07d2dcbf9f54a9d72c9bda4d2ba19766
|
[] |
no_license
|
jiangyu2015/eclipse-4.5.2-source
|
71d1e0b45e744ce0038e5ba17b6c3c12fd3634c5
|
e4a90a19989564e28d73ff64a4a2ffc2cbfeaf9e
|
refs/heads/master
| 2021-01-10T09:07:58.554745
| 2016-03-03T13:18:11
| 2016-03-03T13:18:11
| 52,862,391
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,201
|
java
|
/*******************************************************************************
* Copyright (c) 2002, 2013 Object Factory Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Object Factory Inc. - Initial implementation
*******************************************************************************/
package org.eclipse.ant.internal.ui.dtd.schema;
import java.util.HashMap;
import org.eclipse.ant.internal.ui.dtd.IElement;
import org.eclipse.ant.internal.ui.dtd.ISchema;
/**
* This is a very simple schema suitable for DTDs. Once constructed, a schema is immutable and could be used by multiple threads. However, since in
* general the schema will reflect the internal DTD subset, re-use for multiple documents is problematic.
*
* @author Bob Foster
*/
public class Schema implements ISchema {
private HashMap<String, IElement> fElementMap = new HashMap<String, IElement>();
private Exception fErrorException;
/**
* @see org.eclipse.ant.internal.ui.dtd.ISchema#getElement(java.lang.String)
*/
@Override
public IElement getElement(String qname) {
return fElementMap.get(qname);
}
/**
* @see org.eclipse.ant.internal.ui.dtd.ISchema#getElements()
*/
@Override
public IElement[] getElements() {
return fElementMap.entrySet().toArray(new IElement[fElementMap.entrySet().size()]);
}
/**
* Add a visible element to the schema.
*
* @param element
* Element to add.
*/
public void addElement(IElement element) {
fElementMap.put(element.getName(), element);
}
/**
* Sets the exception thrown by then parser when the schema was built. Note that the exception does not necessarily mean the schema is incomplete.
*
* @param e
* the Exception
*/
public void setErrorException(Exception e) {
fErrorException = e;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ant.internal.ui.dtd.ISchema#getErrorException()
*/
@Override
public Exception getErrorException() {
return fErrorException;
}
}
|
[
"[email protected]"
] | |
bcacfa2624141bcf353847a2dd4ed0b493dd9b97
|
0b82313fcb6c0adf71da7c88fb148424d9307446
|
/web-console/src/main/java/com/ztgm/base/service/impl/SvrFileInfoServiceImpl.java
|
603eeb6afc9d38898e277296081b1a6bf7399028
|
[
"Apache-2.0"
] |
permissive
|
kxjl168/jmqtt
|
9777e9800e23d3552f5e4bcd84e2a26c1c2f71a3
|
e03a24e16d6262c9bd0c4b781bb968bbd48c27e9
|
refs/heads/master
| 2020-09-24T16:55:28.962202
| 2020-02-14T05:31:13
| 2020-02-14T05:31:13
| 225,802,304
| 0
| 0
|
Apache-2.0
| 2019-12-04T07:08:07
| 2019-12-04T07:08:06
| null |
UTF-8
|
Java
| false
| false
| 975
|
java
|
package com.ztgm.base.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ztgm.base.dao.SvrFileInfoMapper;
import com.ztgm.base.pojo.SvrFileInfo;
import com.ztgm.base.service.SvrFileInfoService;
import com.ztgm.base.util.DateUtil;
import com.ztgm.base.util.UUIDUtil;
@Service
public class SvrFileInfoServiceImpl implements SvrFileInfoService {
@Autowired
private SvrFileInfoMapper fileDao;
@Override
public int SaveFileInfo(SvrFileInfo info) {
info.setId(UUIDUtil.getUUID());
info.setSave_date(DateUtil.getNowStr(""));
return fileDao.SaveFileInfo(info);
}
@Override
public int DeleteFileInfo(SvrFileInfo info) {
return fileDao.DeleteFileInfo(info);
}
@Override
public int addFileDonwLoadNums(SvrFileInfo info) {
return fileDao.addFileDonwLoadNums(info);
}
@Override
public SvrFileInfo getFileInfo(SvrFileInfo info) {
return fileDao.getFileInfo(info);
}
}
|
[
"[email protected]"
] | |
5820a1ceb340dd19ba1e19b6c2b8103f93b7de70
|
a11ba1b53c0e1e978b5f4f55a38b4ff5b13d5e36
|
/engine/src/test/java/org/apache/hop/trans/steps/StepMockUtil.java
|
4cb0f3048d285f496ebe4caf034c556b0682bd37
|
[
"Apache-2.0"
] |
permissive
|
lipengyu/hop
|
157747f4da6d909a935b4510e01644935333fef9
|
8afe35f0705f44d78b5c33c1ba3699f657f8b9dc
|
refs/heads/master
| 2020-09-12T06:31:58.176011
| 2019-11-11T21:17:59
| 2019-11-11T21:17:59
| 222,341,727
| 1
| 0
|
Apache-2.0
| 2019-11-18T01:50:19
| 2019-11-18T01:50:18
| null |
UTF-8
|
Java
| false
| false
| 3,400
|
java
|
/*! ******************************************************************************
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.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 org.apache.hop.trans.steps;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.when;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import org.apache.hop.core.logging.LoggingObjectInterface;
import org.apache.hop.trans.Trans;
import org.apache.hop.trans.TransMeta;
import org.apache.hop.trans.step.BaseStep;
import org.apache.hop.trans.step.StepDataInterface;
import org.apache.hop.trans.step.StepMeta;
import org.apache.hop.trans.step.StepMetaInterface;
import org.apache.hop.trans.steps.mock.StepMockHelper;
/**
* <p>
* Util class to handle StepMock creation in generic way.
* </p>
* <p>
* Usage example:
* <pre>
* Mapping step = StepMockUtil.getStep( Mapping.class, MappingMeta.class, "junit" );
* </pre>
*
*
* </p>
*
*/
public class StepMockUtil {
public static <T extends StepMetaInterface, V extends BaseStep> StepMockHelper<T, StepDataInterface> getStepMockHelper( Class<T> meta, String name ) {
StepMockHelper<T, StepDataInterface> stepMockHelper = new StepMockHelper<T, StepDataInterface>( name, meta, StepDataInterface.class );
when( stepMockHelper.logChannelInterfaceFactory.create( any(), any( LoggingObjectInterface.class ) ) ).thenReturn( stepMockHelper.logChannelInterface );
when( stepMockHelper.logChannelInterfaceFactory.create( any() ) ).thenReturn( stepMockHelper.logChannelInterface );
when( stepMockHelper.trans.isRunning() ).thenReturn( true );
return stepMockHelper;
}
public static <T extends BaseStep, K extends StepMetaInterface, V extends StepDataInterface> T getStep( Class<T> klass, StepMockHelper<K, V> mock )
throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Constructor<T> kons = klass.getConstructor( StepMeta.class, StepDataInterface.class, int.class, TransMeta.class, Trans.class );
T step = kons.newInstance( mock.stepMeta, mock.stepDataInterface, 0, mock.transMeta, mock.trans );
return step;
}
public static <T extends BaseStep, K extends StepMetaInterface> T getStep( Class<T> stepClass, Class<K> stepMetaClass, String stepName )
throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
return StepMockUtil.getStep( stepClass, StepMockUtil.getStepMockHelper( stepMetaClass, stepName ) );
}
}
|
[
"[email protected]"
] | |
9545c173a13e91cacadd0d509e99b493788b5b03
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/dso/tags/4.0.2/dso-common/src/test/java/com/tc/object/locks/LockIdSerializerTest.java
|
4008129dfe1df0bc4c7c975b36601bb44c67d992
|
[] |
no_license
|
sirinath/Terracotta
|
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
|
00a7662b9cf530dfdb43f2dd821fa559e998c892
|
refs/heads/master
| 2021-01-23T05:41:52.414211
| 2015-07-02T15:21:54
| 2015-07-02T15:21:54
| 38,613,711
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,417
|
java
|
/*
* All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
*/
package com.tc.object.locks;
import com.tc.io.TCByteBufferInput;
import com.tc.io.TCByteBufferInputStream;
import com.tc.io.TCByteBufferOutput;
import com.tc.io.TCByteBufferOutputStream;
import com.tc.object.LiteralValues;
import com.tc.object.ObjectID;
import com.tc.object.bytecode.Manageable;
import com.tc.object.bytecode.Manager;
import com.tc.object.loaders.ClassProvider;
import com.tc.util.Assert;
import java.io.IOException;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import junit.framework.TestCase;
public class LockIdSerializerTest extends TestCase {
public void testDsoLockID() {
DsoLockID lock = new DsoLockID(new ObjectID(42L));
Assert.assertEquals(lock, passThrough(lock));
}
public void testVolatileLockID() {
DsoVolatileLockID lock = new DsoVolatileLockID(new ObjectID(42L), "theMeaning");
Assert.assertEquals(lock, passThrough(lock));
}
public void testStringLockID() {
StringLockID lock = new StringLockID("FortyTwo");
Assert.assertEquals(lock, passThrough(lock));
}
public void testLongLockID() {
LongLockID lock = new LongLockID(42L);
Assert.assertEquals(lock, passThrough(lock));
}
public void testLiteralLockID() {
literalLockTest(Integer.valueOf(42));
literalLockTest(Long.valueOf(42));
literalLockTest(Character.valueOf((char) 42));
literalLockTest(Float.valueOf(42f));
literalLockTest(Double.valueOf(42d));
literalLockTest(Byte.valueOf((byte) 42));
literalLockTest(Boolean.valueOf(true));
literalLockTest(Short.valueOf((short) 42));
literalLockTest(MyEnum.A);
try {
literalLockTest("bad string!");
throw new IllegalStateException();
} catch (AssertionError e) {
// expected
}
try {
literalLockTest(Object.class);
throw new IllegalStateException();
} catch (AssertionError e) {
// expected
}
try {
literalLockTest(new ObjectID(42));
throw new IllegalStateException();
} catch (AssertionError e) {
// expected
}
}
public void literalLockTest(Object literal) {
DsoLiteralLockID lock = new DsoLiteralLockID(manager, literal);
Assert.assertEquals(lock, passThrough(lock));
}
public void unclusteredLockTest(Object literal) {
try {
new DsoLiteralLockID(manager, literal);
Assert.fail("Expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
// expected
}
}
private LockID passThrough(LockID in) {
try {
TCByteBufferOutput tcOut = new TCByteBufferOutputStream();
try {
LockIDSerializer serializer = new LockIDSerializer(in);
serializer.serializeTo(tcOut);
} finally {
tcOut.close();
}
TCByteBufferInput tcIn = new TCByteBufferInputStream(tcOut.toArray());
try {
LockIDSerializer serializer = new LockIDSerializer();
serializer.deserializeFrom(tcIn);
return serializer.getLockID();
} finally {
tcIn.close();
}
} catch (IOException e) {
throw new AssertionError(e);
}
}
static enum MyEnum {
A, B, C
}
static Manager manager = (Manager) Proxy.newProxyInstance(LockIDSerializer.class.getClassLoader(),
new Class[] { Manager.class }, new DumbClassProvider());
static class DumbClassProvider implements ClassProvider, InvocationHandler {
static ClassLoader CLASS_LOADER = LockIDSerializer.class.getClassLoader();
@Override
public Class getClassFor(String className) {
throw new AssertionError();
}
/*
* Copied from ManagerImpl
*/
public boolean isLiteralAutolock(final Object o) {
if (o instanceof Manageable) { return false; }
return (!(o instanceof Class)) && (!(o instanceof ObjectID)) && LiteralValues.isLiteralInstance(o);
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if ("getClassProvider".equals(method.getName())) {
return this;
} else if ("isLiteralAutolock".equals(method.getName())) {
return isLiteralAutolock(args[0]);
} else {
throw new AssertionError("Cannot handle " + method);
}
}
}
}
|
[
"cruise@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
cruise@7fc7bbf3-cf45-46d4-be06-341739edd864
|
be07ff2c377799083eb71169ba5dd83ad810a592
|
5795f87fea8517bbd3d19bd9bbcb973414796bd1
|
/src/main/java/com/beamofsoul/bip/entity/query/QBaseAbstractRelationalEntity.java
|
5176b634367262d77816f2c3743fe58be43a372c
|
[
"Apache-2.0"
] |
permissive
|
suhuo66/BusinessInfrastructurePlatformGroupVersion
|
dacdac12588a6bc88f1e791cc6ed55ea25177df7
|
46ea11f9f096fe583bab965a535effe7c75dab09
|
refs/heads/master
| 2020-03-18T11:13:33.668667
| 2018-05-24T03:51:12
| 2018-05-24T03:51:12
| 134,658,115
| 0
| 0
| null | 2018-05-24T03:49:23
| 2018-05-24T03:49:22
| null |
UTF-8
|
Java
| false
| false
| 1,494
|
java
|
package com.beamofsoul.bip.entity.query;
import static com.querydsl.core.types.PathMetadataFactory.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.PathMetadata;
import javax.annotation.Generated;
import com.beamofsoul.bip.entity.BaseAbstractRelationalEntity;
import com.querydsl.core.types.Path;
/**
* QBaseAbstractRelationalEntity is a Querydsl query type for BaseAbstractRelationalEntity
*/
@Generated("com.querydsl.codegen.SupertypeSerializer")
public class QBaseAbstractRelationalEntity extends EntityPathBase<BaseAbstractRelationalEntity> {
private static final long serialVersionUID = -1933339813L;
public static final QBaseAbstractRelationalEntity baseAbstractRelationalEntity = new QBaseAbstractRelationalEntity("baseAbstractRelationalEntity");
public final QBaseAbstractEntity _super = new QBaseAbstractEntity(this);
//inherited
public final DateTimePath<java.util.Date> createDate = _super.createDate;
//inherited
public final DateTimePath<java.util.Date> modifyDate = _super.modifyDate;
public QBaseAbstractRelationalEntity(String variable) {
super(BaseAbstractRelationalEntity.class, forVariable(variable));
}
public QBaseAbstractRelationalEntity(Path<? extends BaseAbstractRelationalEntity> path) {
super(path.getType(), path.getMetadata());
}
public QBaseAbstractRelationalEntity(PathMetadata metadata) {
super(BaseAbstractRelationalEntity.class, metadata);
}
}
|
[
"[email protected]"
] | |
91963afe348b83181f0f353201cf9694a8581bff
|
e6039fdb4c1e71726085c874781a243755f5b8f4
|
/22-Spring-Cloud-Eureka-Client/src/main/java/com/consulting/mgt/springboot/practica22/eurekaclient/helper/EurekaClientHelper.java
|
94e8f40a007611eabda52e69f32662b4e88ef6ed
|
[] |
no_license
|
tlacuache987/microserviceMgtGrupo1
|
0037b9c8dbe5108de03df0fa04058e47861ea79c
|
a0c1495c73d59c349706995495cac4c3a81c8184
|
refs/heads/master
| 2020-05-29T13:00:59.091079
| 2019-07-31T23:26:43
| 2019-07-31T23:26:43
| 189,145,212
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 798
|
java
|
package com.consulting.mgt.springboot.practica22.eurekaclient.helper;
import java.net.URI;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.EurekaClient;
import lombok.SneakyThrows;
@Component
public class EurekaClientHelper {
// Inyecta EurekaClient eurekaClient;
@Autowired
private EurekaClient eurekaClient;
@SneakyThrows
public URI getServiceURI(String appName) {
// Implementa
return new URI(eurekaClient
.getNextServerFromEureka(appName, false)
.getHomePageUrl());
}
public List<InstanceInfo> getInstances(String appName) {
// Implementa
return eurekaClient.getInstancesByVipAddress(appName, false);
}
}
|
[
"[email protected]"
] | |
f6b405f85f100d0c0890a978883ca6206a0dcf56
|
b9bb53905f7817bd6a530a3c1785a9c33393fa6d
|
/src/main/java/com/bingo/code/example/design/composite/rewrite/Component.java
|
402e79e6f4f0e3c0e4a47dcaa582a48521b62f79
|
[] |
no_license
|
namjagbrawa/code-example
|
34827b24e9badc2f6b828951238736e5459dfab8
|
a48ca7a981ebb1ac21e07091f586b757a51447c1
|
refs/heads/master
| 2021-01-22T13:30:11.262039
| 2019-03-16T15:56:38
| 2019-03-16T15:56:38
| 100,659,751
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,699
|
java
|
package com.bingo.code.example.design.composite.rewrite;
/**
* ������������
*/
public abstract class Component {
/**
* ���������������
*/
public abstract void printStruct(String preStr);
/**
* ����϶����м����������
* @param child ��������϶����е��������
*/
public void addChild(Component child) {
// ȱʡ��ʵ�֣��׳����⣬��ΪҶ�Ӷ���û��������ܣ����������û��ʵ���������
throw new UnsupportedOperationException("����֧���������");
}
/**
* ����϶������Ƴ�ij���������
* @param child ���Ƴ����������
*/
public void removeChild(Component child) {
// ȱʡ��ʵ�֣��׳����⣬��ΪҶ�Ӷ���û��������ܣ����������û��ʵ���������
throw new UnsupportedOperationException("����֧���������");
}
/**
* ����ij��������Ӧ���������
* @param index ��Ҫ��ȡ����������������������0��ʼ
* @return ������Ӧ���������
*/
public Component getChildren(int index) {
// ȱʡ��ʵ�֣��׳����⣬��ΪҶ�Ӷ���û��������ܣ����������û��ʵ���������
throw new UnsupportedOperationException("����֧���������");
}
}
|
[
"[email protected]"
] | |
56dc789e42062367223735cc91a59f1efb312c52
|
f1d8e49c37dd701e564a82f5b90b00042eb96e17
|
/java/com/levigo/jadice/format/jpeg2000/internal/image/GridRegionAdapter.java
|
03692bf9b680e4f78b56f353bea346b43d9162b2
|
[
"Apache-2.0"
] |
permissive
|
levigo/jpeg2000-imageio-plugin
|
ae9e3be86dd514785df34b117b24af6cba328d06
|
9a10fbca29a54553fbfdd8a6baa27c07002fd3dd
|
refs/heads/master
| 2023-08-30T20:46:10.800733
| 2019-12-05T13:34:55
| 2019-12-05T13:34:55
| 226,107,413
| 0
| 0
|
Apache-2.0
| 2022-05-20T21:17:27
| 2019-12-05T13:22:18
|
Java
|
UTF-8
|
Java
| false
| false
| 687
|
java
|
package com.levigo.jadice.format.jpeg2000.internal.image;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
public class GridRegionAdapter extends TypeAdapter<GridRegion> {
private static final RegionAdapter REGION_ADAPTER = new RegionAdapter();
@Override
public void write(JsonWriter out, GridRegion value) throws IOException {
REGION_ADAPTER.write(out, value.absolute());
}
@Override
public GridRegion read(JsonReader in) throws IOException {
final Region region = REGION_ADAPTER.read(in);
return new DefaultGridRegion(region);
}
}
|
[
"[email protected]"
] | |
29344518c4af16af1bb953c53d83509e2277f5a4
|
ab2a601f3703b5555c364ed4157040036568936b
|
/core/src/com/perl5/lang/perl/extensions/packageprocessor/impl/PerlDancer2DSL.java
|
06302b1995bd9e53710df64f8112be21ad118380
|
[
"Apache-2.0"
] |
permissive
|
ikenox/Perl5-IDEA
|
72aa2d8b622004654d6f0e9a078e5a08b617181c
|
f37df01dde8558a44beadcbc2066e8debe33ce64
|
refs/heads/master
| 2022-01-17T12:57:19.096014
| 2019-04-21T18:58:42
| 2019-04-21T18:58:42
| 148,667,285
| 0
| 0
|
NOASSERTION
| 2018-12-11T14:11:27
| 2018-09-13T16:35:53
|
Java
|
UTF-8
|
Java
| false
| false
| 2,083
|
java
|
/*
* Copyright 2015-2017 Alexandr Evstigneev
*
* 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.perl5.lang.perl.extensions.packageprocessor.impl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Created by hurricup on 02.06.2016.
*/
public interface PerlDancer2DSL {
List<String> DSL_KEYWORDS = new ArrayList<>(Arrays.asList(
"any",
"app",
"body_parameters",
"captures",
"config",
"content",
"content_type",
"context",
"cookie",
"cookies",
"dance",
"dancer_app",
"dancer_major_version",
"dancer_version",
"debug",
"del",
"delayed",
"dirname",
"done",
"dsl",
"engine",
"error",
"false",
"flush",
"forward",
"from_dumper",
"from_json",
"from_yaml",
"get",
"halt",
"header",
"headers",
"hook",
"import",
"info",
"log",
"mime",
"options",
"param",
"params",
"pass",
"patch",
"path",
"post",
"prefix",
"psgi_app",
"push_header",
"push_response_header",
"put",
"query_parameters",
"redirect",
"request",
"request_header",
"response",
"response_header",
"response_headers",
"route_parameters",
"runner",
"send_as",
"send_error",
"send_file",
"session",
"set",
"setting",
"splat",
"start",
"status",
"template",
"to_app",
"to_dumper",
"to_json",
"to_yaml",
"true",
"upload",
"uri_for",
"var",
"vars",
"warning"
));
}
|
[
"[email protected]"
] | |
c3d11339efaf0bebfd75c3b104c5efd1cf46de3c
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes6.dex_source_from_JADX/com/facebook/video/player/plugins/VideoControlPlugin.java
|
d835dc360621aa4ef3762150ee8cca9913fc398d
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,504
|
java
|
package com.facebook.video.player.plugins;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import com.facebook.content.event.FbEvent;
import com.facebook.inject.FbInjector;
import com.facebook.loom.logger.LogEntry.EntryType;
import com.facebook.loom.logger.Logger;
import com.facebook.tools.dextr.runtime.LogUtils;
import com.facebook.video.abtest.Video360PlayerConfig;
import com.facebook.video.analytics.VideoAnalytics.EventTriggerType;
import com.facebook.video.player.RichVideoPlayerParams;
import com.facebook.video.player.events.RVPChromeBehaviorChangeEvent;
import com.facebook.video.player.events.RVPPlayIconStateEvent;
import com.facebook.video.player.events.RVPPlayIconStateEvent.State;
import com.facebook.video.player.events.RVPPlayerStateChangedEvent;
import com.facebook.video.player.events.RVPRequestPausingEvent;
import com.facebook.video.player.events.RVPRequestPlayingEvent;
import com.facebook.video.player.events.RichVideoPlayerEventSubscriber;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import javax.inject.Inject;
/* compiled from: commerce_view_product_store_front */
public class VideoControlPlugin extends RichVideoPlayerPlugin {
@VisibleForTesting
final ImageButton f19415a;
@VisibleForTesting
final ImageButton f19416b;
@Inject
public Video360PlayerConfig f19417c;
/* compiled from: commerce_view_product_store_front */
class C14481 implements OnClickListener {
final /* synthetic */ VideoControlPlugin f19411a;
C14481(VideoControlPlugin videoControlPlugin) {
this.f19411a = videoControlPlugin;
}
public void onClick(View view) {
int a = Logger.a(2, EntryType.UI_INPUT_START, -1865108126);
if (this.f19411a.g == null) {
Logger.a(2, EntryType.UI_INPUT_END, 1135615834, a);
return;
}
this.f19411a.f19415a.setVisibility(8);
this.f19411a.g.a(new RVPRequestPlayingEvent(EventTriggerType.BY_USER));
this.f19411a.g.a(new RVPChromeBehaviorChangeEvent(ChromeBehavior.AUTO));
LogUtils.a(-1268596649, a);
}
}
/* compiled from: commerce_view_product_store_front */
class C14492 implements OnClickListener {
final /* synthetic */ VideoControlPlugin f19412a;
C14492(VideoControlPlugin videoControlPlugin) {
this.f19412a = videoControlPlugin;
}
public void onClick(View view) {
int a = Logger.a(2, EntryType.UI_INPUT_START, -1011043250);
if (this.f19412a.g == null) {
Logger.a(2, EntryType.UI_INPUT_END, -1165021966, a);
return;
}
this.f19412a.f19416b.setVisibility(8);
this.f19412a.g.a(new RVPRequestPausingEvent(EventTriggerType.BY_USER));
LogUtils.a(-809654932, a);
}
}
/* compiled from: commerce_view_product_store_front */
class PlayerStateChangedEventSubscriber extends RichVideoPlayerEventSubscriber<RVPPlayerStateChangedEvent> {
final /* synthetic */ VideoControlPlugin f19413a;
public PlayerStateChangedEventSubscriber(VideoControlPlugin videoControlPlugin) {
this.f19413a = videoControlPlugin;
}
public final void m28187b(FbEvent fbEvent) {
if (this.f19413a.h != null) {
VideoControlPlugin.m28194d(this.f19413a);
}
}
public final Class<RVPPlayerStateChangedEvent> m28186a() {
return RVPPlayerStateChangedEvent.class;
}
}
/* compiled from: commerce_view_product_store_front */
class RVPPlayIconStateEventSubscriber extends RichVideoPlayerEventSubscriber<RVPPlayIconStateEvent> {
final /* synthetic */ VideoControlPlugin f19414a;
public RVPPlayIconStateEventSubscriber(VideoControlPlugin videoControlPlugin) {
this.f19414a = videoControlPlugin;
}
public final void m28189b(FbEvent fbEvent) {
if (((RVPPlayIconStateEvent) fbEvent).a == State.HIDE) {
this.f19414a.f19415a.setVisibility(8);
this.f19414a.f19416b.setVisibility(8);
}
}
public final Class<RVPPlayIconStateEvent> m28188a() {
return RVPPlayIconStateEvent.class;
}
}
private static <T extends View> void m28192a(Class<T> cls, T t) {
m28193a((Object) t, t.getContext());
}
private static void m28193a(Object obj, Context context) {
((VideoControlPlugin) obj).f19417c = Video360PlayerConfig.b(FbInjector.get(context));
}
public VideoControlPlugin(Context context) {
this(context, null);
}
public VideoControlPlugin(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public VideoControlPlugin(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
setContentView(2130907661);
m28192a(VideoControlPlugin.class, (View) this);
this.f.add(new PlayerStateChangedEventSubscriber(this));
this.f.add(new RVPPlayIconStateEventSubscriber(this));
this.f19415a = (ImageButton) a(2131568305);
this.f19416b = (ImageButton) a(2131568306);
this.f19415a.setOnClickListener(new C14481(this));
this.f19416b.setOnClickListener(new C14492(this));
}
private void m28190a(Video360PlayerConfig video360PlayerConfig) {
this.f19417c = video360PlayerConfig;
}
protected final void m28195a(RichVideoPlayerParams richVideoPlayerParams, boolean z) {
m28194d(this);
}
public static void m28194d(VideoControlPlugin videoControlPlugin) {
Preconditions.checkNotNull(videoControlPlugin.h);
PlaybackController.State state = videoControlPlugin.h.l;
if (state == PlaybackController.State.PLAYING) {
videoControlPlugin.f19416b.setVisibility(0);
videoControlPlugin.f19415a.setVisibility(8);
} else if (state == PlaybackController.State.ATTEMPT_TO_PLAY) {
videoControlPlugin.f19416b.setVisibility(8);
videoControlPlugin.f19415a.setVisibility(8);
} else {
videoControlPlugin.f19416b.setVisibility(8);
videoControlPlugin.f19415a.setVisibility(0);
}
}
}
|
[
"[email protected]"
] | |
7aca10288782529a6531ae4763ecad1d4b422442
|
6847722d0479548b4069fba18c00358e3ad14676
|
/WCCI/src/it/unimi/dsi/fastutil/doubles/Double2ObjectFunction.java
|
a54d9acd7cacedeb76911521cec94f9253a35edf
|
[] |
no_license
|
sfbaqai/racingcar
|
90de325ac107f86f7ae862b77e3d132adf721814
|
3b72cfb5b8b49c6683358469cdd52ec073c9b156
|
refs/heads/master
| 2021-01-10T04:15:03.318224
| 2011-10-12T10:07:07
| 2011-10-12T10:07:07
| 48,247,283
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,579
|
java
|
/* Generic definitions */
/* Assertions (useful to generate conditional code) */
/* Current type and class (and size, if applicable) */
/* Value methods */
/* Interfaces (keys) */
/* Interfaces (values) */
/* Abstract implementations (keys) */
/* Abstract implementations (values) */
/* Static containers (keys) */
/* Static containers (values) */
/* Implementations */
/* Synchronized wrappers */
/* Unmodifiable wrappers */
/* Other wrappers */
/* Methods (keys) */
/* Methods (values) */
/* Methods (keys/values) */
/* Methods that have special names depending on keys (but the special names depend on values) */
/* Equality */
/* Object/Reference-only definitions (keys) */
/* Primitive-type-only definitions (keys) */
/* Object/Reference-only definitions (values) */
/*
* fastutil: Fast & compact type-specific collections for Java
*
* Copyright (C) 2002-2008 Sebastiano Vigna
*
* 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 it.unimi.dsi.fastutil.doubles;
import it.unimi.dsi.fastutil.Function;
/** A type-specific {@link Function}; provides some additional methods that use polymorphism to avoid (un)boxing.
*
* <P>Type-specific versions of <code>get()</code>, <code>put()</code> and
* <code>remove()</code> cannot rely on <code>null</code> to denote absence of
* a key. Rather, they return a {@linkplain #defaultReturnValue() default
* return value}, which is set to 0 cast to the return type (<code>false</code>
* for booleans) at creation, but can be changed using the
* <code>defaultReturnValue()</code> method.
*
* <P>For uniformity reasons, even maps returning objects implement the default
* return value (of course, in this case the default return value is
* initialized to <code>null</code>).
*
* <P><strong>Warning:</strong> to fall in line as much as possible with the
* {@linkplain java.util.Map standard map interface}, it is strongly suggested
* that standard versions of <code>get()</code>, <code>put()</code> and
* <code>remove()</code> for maps with primitive-type values <em>return
* <code>null</code> to denote missing keys</em> rather than wrap the default
* return value in an object (of course, for maps with object keys and values
* this is not possible, as there is no type-specific version).
*
* @see Function
*/
public interface Double2ObjectFunction <V> extends Function<Double, V> {
/** Adds a pair to the map.
*
* @param key the key.
* @param value the value.
* @return the old value, or the {@linkplain #defaultReturnValue() default return value} if no value was present for the given key.
* @see Function#put(Object,Object)
*/
V put( double key, V value );
/** Returns the value to which the given key is mapped.
*
* @param key the key.
* @return the corresponding value, or the {@linkplain #defaultReturnValue() default return value} if no value was present for the given key.
* @see Function#get(Object)
*/
V get( double key );
/** Removes the mapping with the given key.
* @param key
* @return the old value, or the {@linkplain #defaultReturnValue() default return value} if no value was present for the given key.
* @see Function#remove(Object)
*/
V remove( double key );
/**
* @see Function#containsKey(Object)
*/
boolean containsKey( double key );
/** Sets the default return value.
*
* This value must be returned by type-specific versions of
* <code>get()</code>, <code>put()</code> and <code>remove()</code> to
* denote that the map does not contain the specified key. It must be
* 0/<code>false</code>/<code>null</code> by default.
*
* @param rv the new default return value.
* @see #defaultReturnValue()
*/
void defaultReturnValue( V rv );
/** Gets the default return value.
*
* @return the current default return value.
*/
V defaultReturnValue();
}
|
[
"ducthangho@dc7059a3-8d4d-0410-a780-f9787e1663d2"
] |
ducthangho@dc7059a3-8d4d-0410-a780-f9787e1663d2
|
15bf68c052abfb0c5792ed142bc5956c1575f57c
|
a18d32695523092bfc3957be0eb628d7483b7101
|
/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/functions/LayoutFunctions.java
|
432aeaa4094e0a9cb22458bc14dddf4320230d0c
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
vbatts/binnavi
|
9c37ac74dbe3d9d676ade04a6c181b1b1626cc3e
|
a2a3fa4ebe4c7953f648072afb26a34408256bbf
|
refs/heads/master
| 2021-01-15T22:53:07.507135
| 2015-08-20T14:00:52
| 2015-08-20T14:10:03
| 41,112,676
| 2
| 0
| null | 2015-08-20T18:35:42
| 2015-08-20T18:35:42
| null |
UTF-8
|
Java
| false
| false
| 6,073
|
java
|
/*
Copyright 2015 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.functions;
import com.google.common.base.Preconditions;
import com.google.security.zynamics.zylib.gui.SwingInvoker;
import com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.AbstractZyGraph;
import com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.settings.ILayoutSettings;
import y.layout.BufferedLayouter;
import y.layout.CanonicMultiStageLayouter;
import y.layout.GraphLayout;
import y.layout.IntersectionCalculator;
import y.layout.LabelLayoutTranslator;
import y.layout.LayoutOrientation;
import y.layout.LayoutTool;
import y.layout.PortCalculator;
import y.layout.PortConstraint;
import y.layout.PortConstraintKeys;
import y.layout.circular.CircularLayouter;
import y.util.DataProviders;
import y.view.DefaultGraph2DRenderer;
import y.view.Graph2D;
import y.view.LayoutMorpher;
import y.view.NodeRealizerIntersectionCalculator;
public class LayoutFunctions {
public final static int PREFERRED_ANIMATION_TIME_CONSTANT_FACTOR_MS = 100;
/**
* Layouts the graph using the last set layouter that was passed to setLayouter.
*/
public static GraphLayout doLayout(final AbstractZyGraph<?, ?> graph,
final CanonicMultiStageLayouter layouter) {
Preconditions.checkNotNull(layouter,
"Internal Error: Can not layout the graph without initializing the layouter first");
GraphLayout graphLayout = null;
final ILayoutSettings layoutSettings = graph.getSettings().getLayoutSettings();
if (layoutSettings.getCurrentLayouter().getLayoutOrientation()
== LayoutOrientation.TOP_TO_BOTTOM) {
graph.getGraph().addDataProvider(PortConstraintKeys.SOURCE_PORT_CONSTRAINT_KEY,
DataProviders.createConstantDataProvider(PortConstraint.create(PortConstraint.SOUTH)));
graph.getGraph().addDataProvider(PortConstraintKeys.TARGET_PORT_CONSTRAINT_KEY,
DataProviders.createConstantDataProvider(PortConstraint.create(PortConstraint.NORTH)));
}
if (layoutSettings.getCurrentLayouter().getLayoutOrientation()
== LayoutOrientation.LEFT_TO_RIGHT) {
graph.getGraph().addDataProvider(PortConstraintKeys.SOURCE_PORT_CONSTRAINT_KEY,
DataProviders.createConstantDataProvider(PortConstraint.create(PortConstraint.EAST)));
graph.getGraph().addDataProvider(PortConstraintKeys.TARGET_PORT_CONSTRAINT_KEY,
DataProviders.createConstantDataProvider(PortConstraint.create(PortConstraint.WEST)));
}
layouter.setLabelLayouter(new LabelLayoutTranslator());
layouter.setLabelLayouterEnabled(true);
if ((graph.getNodes().size() < layoutSettings.getAnimateLayoutNodeThreshold())
&& (graph.getEdges().size() < layoutSettings.getAnimateLayoutEdgeThreshold())) {
if (graph.getSettings().getLayoutSettings().getAnimateLayout()) {
((DefaultGraph2DRenderer) graph.getView().getGraph2DRenderer()).setDrawEdgesFirst(true);
graphLayout = new BufferedLayouter(layouter).calcLayout(graph.getGraph());
final LayoutMorpher layoutMorpher = new LayoutMorpher();
layoutMorpher.setSmoothViewTransform(true);
layoutMorpher.setPreferredDuration(PREFERRED_ANIMATION_TIME_CONSTANT_FACTOR_MS
* graph.getSettings().getDisplaySettings().getAnimationSpeed());
final GraphLayout morpherLayout = graphLayout;
new SwingInvoker() {
@Override
protected void operation() {
layoutMorpher.execute(graph.getView(), morpherLayout);
}
}.invokeLater();
recalculatePorts(layouter, graph.getGraph());
} else {
graphLayout = new BufferedLayouter(layouter).calcLayout(graph.getGraph());
LayoutTool.applyGraphLayout(graph.getGraph(), graphLayout);
recalculatePorts(layouter, graph.getGraph());
}
} else {
graphLayout = new BufferedLayouter(layouter).calcLayout(graph.getGraph());
LayoutTool.applyGraphLayout(graph.getGraph(), graphLayout);
final LayoutMorpher layoutMorpher = new LayoutMorpher();
layoutMorpher.setPreferredDuration(PREFERRED_ANIMATION_TIME_CONSTANT_FACTOR_MS
* graph.getSettings().getDisplaySettings().getAnimationSpeed());
layoutMorpher.execute(graph.getView(), graphLayout);
}
return graphLayout;
}
public static void recalculatePorts(final CanonicMultiStageLayouter layouter,
final Graph2D graph) {
// Effect: Ensures that ports are drawn onto node borders, and not onto the node center. (Only
// Circular layout!)
// Justification: Circular layout uses as the standard port the center of the node, this will be
// corrected by
// calling the following function.
// Exclusion: Port of nodes with non rectangle shapes, have to be additionally recalculated.
if (layouter instanceof CircularLayouter) {
// Port correction
LayoutTool.clipEdgesOnBB(graph);
// Recalculate ports (necessary for circular proximity nodes)
final PortCalculator pc = new PortCalculator();
final NodeRealizerIntersectionCalculator nrics =
new NodeRealizerIntersectionCalculator(graph, true);
graph.addDataProvider(IntersectionCalculator.SOURCE_INTERSECTION_CALCULATOR_DPKEY, nrics);
final NodeRealizerIntersectionCalculator nrict =
new NodeRealizerIntersectionCalculator(graph, false);
graph.addDataProvider(IntersectionCalculator.TARGET_INTERSECTION_CALCULATOR_DPKEY, nrict);
pc.doLayout(graph);
}
}
}
|
[
"[email protected]"
] | |
1bc580e77abcd282046f34c6950bc36f628eecd6
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/23/23_07a237254da270e1c0e644d7fae5bd6d70b0838e/ST_Expand/23_07a237254da270e1c0e644d7fae5bd6d70b0838e_ST_Expand_s.java
|
1b533c42069c33a52bbcf45765a402b7f0d318ee
|
[] |
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,428
|
java
|
/**
* h2spatial is a library that brings spatial support to the H2 Java database.
*
* h2spatial is distributed under GPL 3 license. It is produced by the "Atelier
* SIG" team of the IRSTV Institute <http://www.irstv.fr/> CNRS FR 2488.
*
* Copyright (C) 2007-2012 IRSTV (FR CNRS 2488)
*
* h2patial is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* h2spatial is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* h2spatial. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, please consult: <http://www.orbisgis.org/>
* or contact directly: info_at_ orbisgis.org
*/
package org.h2gis.h2spatialext.function.spatial.create;
import com.vividsolutions.jts.geom.Envelope;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import org.h2gis.h2spatialapi.DeterministicScalarFunction;
/**
* Expands a geometry's envelope by the given delta X and delta Y.
*
* @author Erwan Bocher
*/
public class ST_Expand extends DeterministicScalarFunction {
private static GeometryFactory gf = new GeometryFactory();
public ST_Expand() {
addProperty(PROP_REMARKS, "Expands a geometry's envelope by the given delta X and delta Y.\n Both"
+ " positive and negative distances are supported.");
}
@Override
public String getJavaStaticMethod() {
return "expand";
}
/**
* Expands a geometry's envelope by the given delta X and delta Y. Both
* positive and negative distances are supported.
*
* @param deltaX the distance to expand the envelope along the the X axis
* @param deltaY the distance to expand the envelope along the the Y axis
*/
public static Geometry expand(Geometry geometry, double detlatX, double deltaY) {
Envelope expand = geometry.getEnvelopeInternal();
expand.expandBy(detlatX, deltaY);
return gf.toGeometry(expand);
}
}
|
[
"[email protected]"
] | |
74842b92f534616f940aca1b0a2f68fe1b41ded7
|
e84201a3a093bb7a883fec8510798eaf3bc0a96c
|
/test/com/facebook/buck/core/rules/analysis/impl/RuleAnalysisContextImplTest.java
|
6666d202c1e660d0ec94b730b08ec8e009b42375
|
[
"Apache-2.0"
] |
permissive
|
ResearchMore/buck
|
d249b6b575dae1a489a5bd4da3c57d82dfc85c35
|
bb4d36afb55ca205c4b91747c7ded5b7f8ece839
|
refs/heads/master
| 2020-06-18T04:35:50.191730
| 2019-07-09T22:54:04
| 2019-07-10T01:20:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,446
|
java
|
/*
* Copyright 2018-present Facebook, 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.facebook.buck.core.rules.analysis.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import com.facebook.buck.core.artifact.Artifact;
import com.facebook.buck.core.artifact.BuildArtifact;
import com.facebook.buck.core.model.BuildTarget;
import com.facebook.buck.core.model.BuildTargetFactory;
import com.facebook.buck.core.rules.actions.ActionCreationException;
import com.facebook.buck.core.rules.actions.ActionWrapperData;
import com.facebook.buck.core.rules.actions.FakeAction;
import com.facebook.buck.core.rules.actions.ImmutableActionExecutionSuccess;
import com.facebook.buck.core.rules.analysis.ImmutableRuleAnalysisKey;
import com.facebook.buck.core.rules.analysis.RuleAnalysisKey;
import com.facebook.buck.core.rules.analysis.action.ActionAnalysisData;
import com.facebook.buck.core.rules.analysis.action.ActionAnalysisData.ID;
import com.facebook.buck.core.rules.analysis.action.ActionAnalysisDataKey;
import com.facebook.buck.core.rules.providers.ProviderInfoCollection;
import com.facebook.buck.core.rules.providers.impl.ProviderInfoCollectionImpl;
import com.facebook.buck.event.BuckEventBus;
import com.facebook.buck.event.BuckEventBusForTests;
import com.facebook.buck.io.filesystem.ProjectFilesystem;
import com.facebook.buck.io.filesystem.impl.FakeProjectFilesystem;
import com.google.common.base.VerifyException;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import java.nio.file.Paths;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
import org.hamcrest.Matchers;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
public class RuleAnalysisContextImplTest {
@Rule public ExpectedException expectedException = ExpectedException.none();
private final ProjectFilesystem fakeFilesystem = new FakeProjectFilesystem();
private final BuckEventBus eventBus = BuckEventBusForTests.newInstance();
@Test
public void getDepsReturnCorrectDeps() {
BuildTarget target = BuildTargetFactory.newInstance("//my:foo");
ImmutableMap<RuleAnalysisKey, ProviderInfoCollection> deps = ImmutableMap.of();
assertSame(deps, new RuleAnalysisContextImpl(target, deps, fakeFilesystem, eventBus).deps());
deps =
ImmutableMap.of(
ImmutableRuleAnalysisKey.of(BuildTargetFactory.newInstance("//my:foo")),
ProviderInfoCollectionImpl.builder().build());
assertSame(deps, new RuleAnalysisContextImpl(target, deps, fakeFilesystem, eventBus).deps());
}
@Test
public void registerActionRegistersToGivenActionRegistry() {
BuildTarget buildTarget = BuildTargetFactory.newInstance("//my:foo");
RuleAnalysisContextImpl context =
new RuleAnalysisContextImpl(buildTarget, ImmutableMap.of(), fakeFilesystem, eventBus);
ActionAnalysisData actionAnalysisData1 =
new ActionAnalysisData() {
private final ActionAnalysisDataKey key = getNewKey(buildTarget, new ID() {});
@Override
public ActionAnalysisDataKey getKey() {
return key;
}
};
context.registerAction(actionAnalysisData1);
assertSame(
actionAnalysisData1,
context.getRegisteredActionData().get(actionAnalysisData1.getKey().getID()));
ActionAnalysisData actionAnalysisData2 =
new ActionAnalysisData() {
private final ActionAnalysisDataKey key = getNewKey(buildTarget, new ID() {});
@Override
public ActionAnalysisDataKey getKey() {
return key;
}
};
context.registerAction(actionAnalysisData2);
assertSame(
actionAnalysisData2,
context.getRegisteredActionData().get(actionAnalysisData2.getKey().getID()));
assertSame(
actionAnalysisData1,
context.getRegisteredActionData().get(actionAnalysisData1.getKey().getID()));
}
@Test
public void registerConflictingActionsThrows() {
expectedException.expect(VerifyException.class);
BuildTarget buildTarget = BuildTargetFactory.newInstance("//my:target");
RuleAnalysisContextImpl context =
new RuleAnalysisContextImpl(buildTarget, ImmutableMap.of(), fakeFilesystem, eventBus);
ActionAnalysisDataKey key =
new ActionAnalysisDataKey() {
private final ID id = new ID() {};
@Override
public BuildTarget getBuildTarget() {
return buildTarget;
}
@Override
public ID getID() {
return id;
}
};
ActionAnalysisData actionAnalysisData1 = () -> key;
context.registerAction(actionAnalysisData1);
ActionAnalysisData actionAnalysisData2 = () -> key;
context.registerAction(actionAnalysisData2);
}
@Test
public void createActionViaFactoryInContext() throws ActionCreationException {
BuildTarget target = BuildTargetFactory.newInstance("//my:foo");
RuleAnalysisContextImpl context =
new RuleAnalysisContextImpl(target, ImmutableMap.of(), fakeFilesystem, eventBus);
ImmutableSet<Artifact> inputs = ImmutableSet.of();
ImmutableSet<Artifact> outputs =
ImmutableSet.of(context.actionRegistry().declareArtifact(Paths.get("output")));
FakeAction.FakeActionExecuteLambda actionFunction =
(inputs1, outputs1, ctx) ->
ImmutableActionExecutionSuccess.of(Optional.empty(), Optional.empty());
new FakeAction(context.actionRegistry(), inputs, outputs, actionFunction);
BuildArtifact artifact =
Objects.requireNonNull(Iterables.getOnlyElement(outputs).asBound().asBuildArtifact());
assertThat(context.getRegisteredActionData().entrySet(), Matchers.hasSize(1));
@Nullable
ActionAnalysisData actionAnalysisData =
context.getRegisteredActionData().get(artifact.getActionDataKey().getID());
assertNotNull(actionAnalysisData);
assertThat(actionAnalysisData, Matchers.instanceOf(ActionWrapperData.class));
ActionWrapperData actionWrapperData = (ActionWrapperData) actionAnalysisData;
assertSame(target, actionWrapperData.getAction().getOwner());
assertSame(inputs, actionWrapperData.getAction().getInputs());
assertEquals(outputs, actionWrapperData.getAction().getOutputs());
assertSame(actionFunction, ((FakeAction) actionWrapperData.getAction()).getExecuteFunction());
}
private static ActionAnalysisDataKey getNewKey(BuildTarget target, ActionAnalysisData.ID id) {
return new ActionAnalysisDataKey() {
@Override
public BuildTarget getBuildTarget() {
return target;
}
@Override
public ID getID() {
return id;
}
};
}
}
|
[
"[email protected]"
] | |
9d4278b30cf9177f7f1e801584aadafae334d88d
|
0252a04e5a388e1f12229b2541589bf655084828
|
/src/leetCode/problems/_223_Rectangle_Area/Solution.java
|
82b8d092eb2d6862b901ff795d3ce7dfed6fcb06
|
[] |
no_license
|
alanHarper123/LeetCode
|
bd60e4e0a2ba278f648b504bfdd928ca22403506
|
312b86a6f1e7adccb7a1f100b664cd9272a85473
|
refs/heads/master
| 2021-06-25T15:31:38.069169
| 2021-01-19T12:56:43
| 2021-01-19T12:56:43
| 193,816,741
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 438
|
java
|
package leetCode.problems._223_Rectangle_Area;
class Solution {
public int computeArea(int A, int B, int C,int D,
int E, int F, int G, int H) {
int sumA = (C-A)*(D-B)+(G-E)*(H-F);
if(A>=G||B>=H||C<=E||D<=F)
return sumA;
else {
int deltaW = Math.min(C, G)-Math.max(A, E);
int deltaH = Math.min(D, H)-Math.max(B, F);
return sumA-deltaH*deltaW;
}
}
}
|
[
"[email protected]"
] | |
add978ae255fa78c46f69d66fa75f93b0d650cf1
|
6e41c4cc086b1be2108c95225bf79e626abb0659
|
/util/testunit/TestObjectCleanup.java
|
ed1fa581b75175bca6b416f6965eba1abd973742
|
[] |
no_license
|
robin2017/java_concurrency_in_practice
|
dfb8847351cbc754122c9798362be636141a03f7
|
46c8ea6ebd3227c9baf2adb62990f1b190db0b07
|
refs/heads/master
| 2021-01-20T14:17:05.651791
| 2017-07-22T02:40:01
| 2017-07-22T02:40:01
| 90,585,283
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 248
|
java
|
//: net/mindview/atunit/TestObjectCleanup.java
// The @Unit @TestObjectCleanup tag.
package util.testunit;
import java.lang.annotation.*;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface TestObjectCleanup {} ///:~
|
[
"[email protected]"
] | |
c697c9cda285bd7a0fd45fdd885bbb0b29baee04
|
65cdcbb5fc9b1220888ea2e21416e496ce072f17
|
/mvvm2/src/main/java/com/arialyy/frame/view/UPMarqueeView.java
|
5e0e8c4d3b3826db0911f8e176a309d4d825b133
|
[
"Apache-2.0"
] |
permissive
|
Finderchangchang/QPanDianProject
|
ff6a6f30165555a6d058e0bee95709bfe03ea94c
|
3d19ab7b9a5668890271763ebd416ba25030793c
|
refs/heads/master
| 2020-03-19T12:10:25.730381
| 2018-06-24T06:32:04
| 2018-06-24T06:32:04
| 136,309,934
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,502
|
java
|
package com.arialyy.frame.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ViewFlipper;
import com.lyy.frame.R;
import java.util.List;
/**
* 仿淘宝首页的 淘宝头条滚动的自定义View
*
* Created by mengwei on 2016/7/20.
*/
public class UPMarqueeView extends ViewFlipper {
private Context mContext;
private boolean isSetAnimDuration = false;
private int interval = 2000;
/**
* 动画时间
*/
private int animDuration = 500;
public UPMarqueeView(Context context, AttributeSet attrs) {
super(context, attrs);
init(context, attrs, 0);
}
private void init(Context context, AttributeSet attrs, int defStyleAttr) {
this.mContext = context;
setFlipInterval(interval);
Animation animIn = AnimationUtils.loadAnimation(mContext, R.anim.anim_marquee_in);
if (isSetAnimDuration) animIn.setDuration(animDuration);
setInAnimation(animIn);
Animation animOut = AnimationUtils.loadAnimation(mContext, R.anim.anim_marquee_out);
if (isSetAnimDuration) animOut.setDuration(animDuration);
setOutAnimation(animOut);
}
/**
* 设置循环滚动的View数组
*
* @param views
*/
public void setViews(final List<View> views) {
if (views == null || views.size() == 0) return;
removeAllViews();
for ( int i = 0; i < views.size(); i++) {
final int position=i;
//设置监听回调
views.get(i).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (onItemClickListener != null) {
onItemClickListener.onItemClick(position, views.get(position));
}
}
});
addView(views.get(i));
}
startFlipping();
}
/**
* 点击
*/
private OnItemClickListener onItemClickListener;
/**
* 设置监听接口
* @param onItemClickListener
*/
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
this.onItemClickListener = onItemClickListener;
}
/**
* item_view的接口
*/
public interface OnItemClickListener {
void onItemClick(int position, View view);
}
}
|
[
"[email protected]"
] | |
bb506a298da59c81d426622d07b7598f231f406d
|
c35ece4cf94dfbb21b00564109db1360858b6a05
|
/XTCM/src/main/java/com/lilosoft/xtcm/base/AbsBaseActivityGroup.java
|
48d7c1dfd62c0056b7c94440b36f9d64b947a0ce
|
[] |
no_license
|
haikuowuya/MobileSafe
|
a45fbbf976e0eff96056f9cb332f72d04ca7eb4a
|
f37d274b78db2d0f2f3a6dbf9688307cbff68b68
|
refs/heads/master
| 2021-01-18T12:10:56.928137
| 2015-05-03T15:26:27
| 2015-05-03T15:26:27
| 40,104,214
| 1
| 0
| null | 2015-08-03T03:59:20
| 2015-08-03T03:59:20
| null |
UTF-8
|
Java
| false
| false
| 1,094
|
java
|
package com.lilosoft.xtcm.base;
import android.app.ActivityGroup;
import android.content.Context;
import android.os.Bundle;
import android.view.WindowManager;
import com.lilosoft.xtcm.R;
/**
*
* @category 外部框架底层实现方法
* @author William Liu
*
*/
@SuppressWarnings("deprecation")
public abstract class AbsBaseActivityGroup extends ActivityGroup {
protected static Context mContext;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.activity_frame);
initFrameValues();
installViews();
registerEvents();
}
/**
* @category 初始化框架
*/
protected void initFrameValues() {
mContext = this;
}
/**
* @category 初始化视图
*/
protected abstract void installViews();
/**
* @category 事件注册
*/
protected abstract void registerEvents();
}
|
[
"[email protected]"
] | |
85d7b0032543169b58170496cfd9f4304c8ea053
|
ad2563d56f4581bf5ac73890360fafb0fc900d66
|
/iwsn-portal/src/main/java/de/uniluebeck/itm/tr/iwsn/portal/api/rest/v1/providers/RuntimeExceptionMapper.java
|
5109766b8052a59f9fb316f014e6f515947f3922
|
[
"BSD-3-Clause"
] |
permissive
|
newtonmwai/testbed-runtime
|
b1c73a07c3791ac1593354e48aad728291a0b9c7
|
0f3fd9ccaa93410bd9ba3b007fd25d801bcdd035
|
refs/heads/master
| 2021-05-28T20:56:48.592750
| 2015-04-21T13:42:24
| 2015-04-21T13:42:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 529
|
java
|
package de.uniluebeck.itm.tr.iwsn.portal.api.rest.v1.providers;
import com.google.common.base.Throwables;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
@Provider
public class RuntimeExceptionMapper implements ExceptionMapper<RuntimeException> {
@Override
public Response toResponse(final RuntimeException exception) {
return Response
.serverError()
.entity(exception.getMessage() + "\n" + Throwables.getStackTraceAsString(exception))
.build();
}
}
|
[
"[email protected]"
] | |
a76e25390e9091d12c673e9ce7491b1089aa6396
|
e42afd54dcc0add3d2b8823ee98a18c50023a396
|
/java-securitycenter/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/CreateNotificationConfigSnippets.java
|
b24a10a05485577bfdf88caacba22ce0d878f936
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
degloba/google-cloud-java
|
eea41ebb64f4128583533bc1547e264e730750e2
|
b1850f15cd562c659c6e8aaee1d1e65d4cd4147e
|
refs/heads/master
| 2022-07-07T17:29:12.510736
| 2022-07-04T09:19:33
| 2022-07-04T09:19:33
| 180,201,746
| 0
| 0
|
Apache-2.0
| 2022-07-04T09:17:23
| 2019-04-08T17:42:24
|
Java
|
UTF-8
|
Java
| false
| false
| 2,810
|
java
|
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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.cloud.examples.securitycenter.snippets;
// [START securitycenter_create_notification_config]
import com.google.cloud.securitycenter.v1.CreateNotificationConfigRequest;
import com.google.cloud.securitycenter.v1.NotificationConfig;
import com.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig;
import com.google.cloud.securitycenter.v1.SecurityCenterClient;
import java.io.IOException;
// [END securitycenter_create_notification_config]
/** Create NotificationConfig Snippet. */
final class CreateNotificationConfigSnippets {
private CreateNotificationConfigSnippets() {}
// [START securitycenter_create_notification_config]
public static NotificationConfig createNotificationConfig(
String organizationId, String notificationConfigId, String projectId, String topicName)
throws IOException {
// String organizationId = "{your-org-id}";
// String notificationConfigId = {"your-unique-id"};
// String projectId = "{your-project}"";
// String topicName = "{your-topic}";
String orgName = String.format("organizations/%s", organizationId);
// Ensure this ServiceAccount has the "pubsub.topics.setIamPolicy" permission on the topic.
String pubsubTopic = String.format("projects/%s/topics/%s", projectId, topicName);
try (SecurityCenterClient client = SecurityCenterClient.create()) {
CreateNotificationConfigRequest request =
CreateNotificationConfigRequest.newBuilder()
.setParent(orgName)
.setConfigId(notificationConfigId)
.setNotificationConfig(
NotificationConfig.newBuilder()
.setDescription("Java notification config")
.setPubsubTopic(pubsubTopic)
.setStreamingConfig(
StreamingConfig.newBuilder().setFilter("state = \"ACTIVE\"").build())
.build())
.build();
NotificationConfig response = client.createNotificationConfig(request);
System.out.println(String.format("Notification config was created: %s", response));
return response;
}
}
// [END securitycenter_create_notification_config]
}
|
[
"[email protected]"
] | |
862890f8d996d698c9c407c662b8b56416850941
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE197_Numeric_Truncation_Error/s02/CWE197_Numeric_Truncation_Error__short_console_readLine_66b.java
|
854722cfb6b6fdc04029976f4253a380475ebdfe
|
[] |
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
| 1,356
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE197_Numeric_Truncation_Error__short_console_readLine_66b.java
Label Definition File: CWE197_Numeric_Truncation_Error__short.label.xml
Template File: sources-sink-66b.tmpl.java
*/
/*
* @description
* CWE: 197 Numeric Truncation Error
* BadSource: console_readLine Read data from the console using readLine
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: to_byte
* BadSink : Convert data to a byte
* Flow Variant: 66 Data flow: data passed in an array from one method to another in different source files in the same package
*
* */
package testcases.CWE197_Numeric_Truncation_Error.s02;
import testcasesupport.*;
public class CWE197_Numeric_Truncation_Error__short_console_readLine_66b
{
public void badSink(short dataArray[] ) throws Throwable
{
short data = dataArray[2];
{
/* POTENTIAL FLAW: Convert data to a byte, possibly causing a truncation error */
IO.writeLine((byte)data);
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(short dataArray[] ) throws Throwable
{
short data = dataArray[2];
{
/* POTENTIAL FLAW: Convert data to a byte, possibly causing a truncation error */
IO.writeLine((byte)data);
}
}
}
|
[
"[email protected]"
] | |
7dd3bb2e6f4c836b8b27eb7224b0af0d9b185cb6
|
acc114985ececc8b7b9d6f4eb389b13e4ffc03ee
|
/src/main/java/gigaherz/enderthing/blocks/EnderKeyChestRenderer.java
|
20ad79dfeb27e2f3fabb50a1d7fe184be6c41947
|
[
"BSD-3-Clause"
] |
permissive
|
enimaloc/Enderthing
|
936e1b6203104318921c0dcdb4cf941712a0a011
|
d7956171e36a52c0a0131d1219e44c31d03fbbbb
|
refs/heads/master
| 2022-11-11T00:44:52.888633
| 2020-06-26T04:14:25
| 2020-06-26T04:14:25
| 275,058,571
| 0
| 0
| null | 2020-06-26T02:37:04
| 2020-06-26T02:37:03
| null |
UTF-8
|
Java
| false
| false
| 3,598
|
java
|
package gigaherz.enderthing.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import gigaherz.enderthing.KeyUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.model.ItemCameraTransforms;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.tileentity.ChestTileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.item.ItemStack;
import net.minecraft.state.properties.ChestType;
import static net.minecraft.client.renderer.Atlases.ENDER_CHEST_MATERIAL;
public class EnderKeyChestRenderer extends ChestTileEntityRenderer<EnderKeyChestTileEntity>
{
public static EnderKeyChestRenderer INSTANCE = null;
public EnderKeyChestRenderer(TileEntityRendererDispatcher dispatcher)
{
super(dispatcher);
INSTANCE = this;
}
public void renderFromItem(ItemStack stack, EnderKeyChestTileEntity te, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn)
{
ItemStack lock = KeyUtils.getLock(KeyUtils.getKey(stack), KeyUtils.isPrivate(stack), KeyUtils.getBound(stack));
renderInternal(te, 0, matrixStackIn, bufferIn, combinedLightIn, combinedOverlayIn, 0, lock);
}
@Override
public void render(EnderKeyChestTileEntity te, float partialTicks,
MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn,
int combinedLightIn, int combinedOverlayIn)
{
int rotation = 0;
if (te.hasWorld())
{
switch (te.getBlockState().get(EnderKeyChestBlock.FACING))
{
case NORTH:
rotation = 180;
break;
case SOUTH:
rotation = 0;
break;
case WEST:
rotation = 90;
break;
case EAST:
rotation = -90;
break;
}
}
ItemStack lock = KeyUtils.getLock(te.getKey(), te.isPrivate(), te.getPlayerBound());
renderInternal(te, partialTicks, matrixStackIn, bufferIn, combinedLightIn, combinedOverlayIn, rotation, lock);
}
public void renderInternal(EnderKeyChestTileEntity te, float partialTicks,
MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn,
int combinedLightIn, int combinedOverlayIn,
int rotation, ItemStack lock)
{
matrixStackIn.push();
super.render(te, partialTicks, matrixStackIn, bufferIn, combinedLightIn, combinedOverlayIn);
matrixStackIn.pop();
matrixStackIn.push();
{
matrixStackIn.translate(0.5, 0.5, 0.5);
matrixStackIn.rotate(Vector3f.YP.rotationDegrees(180-rotation));
matrixStackIn.translate(-0.5, -0.5, -0.5);
matrixStackIn.translate(0.5, 0.35, 0.6/16.0);
float scale = 6/8.0f;
matrixStackIn.scale(scale, scale, scale);
Minecraft.getInstance().getItemRenderer().renderItem(lock, ItemCameraTransforms.TransformType.FIXED, combinedLightIn, combinedOverlayIn, matrixStackIn, bufferIn);
}
matrixStackIn.pop();
}
@Override
protected Material getMaterial(EnderKeyChestTileEntity tileEntity, ChestType chestType)
{
return ENDER_CHEST_MATERIAL;
}
}
|
[
"[email protected]"
] | |
80d86e66e5441a3413f5fd55456d0077121b93ca
|
fd3e4cc20a58c2a46892b3a38b96d5e2303266d8
|
/src/main/java/com/amap/api/services/geocoder/RegeocodeResult.java
|
faf8d6bee039a194bc55909ec2c21ce3f6aa36dd
|
[] |
no_license
|
makewheels/AnalyzeBusDex
|
42ef50f575779b66bd659c096c57f94dca809050
|
3cb818d981c7bc32c3cbd8c046aa78cd38b20e8a
|
refs/heads/master
| 2021-10-22T07:16:40.087139
| 2019-03-09T03:11:05
| 2019-03-09T03:11:05
| 173,123,231
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 809
|
java
|
package com.amap.api.services.geocoder;
public class RegeocodeResult {
/* renamed from: a */
private RegeocodeQuery f3017a;
/* renamed from: b */
private RegeocodeAddress f3018b;
public RegeocodeResult(RegeocodeQuery regeocodeQuery, RegeocodeAddress regeocodeAddress) {
this.f3017a = regeocodeQuery;
this.f3018b = regeocodeAddress;
}
public RegeocodeQuery getRegeocodeQuery() {
return this.f3017a;
}
public void setRegeocodeQuery(RegeocodeQuery regeocodeQuery) {
this.f3017a = regeocodeQuery;
}
public RegeocodeAddress getRegeocodeAddress() {
return this.f3018b;
}
public void setRegeocodeAddress(RegeocodeAddress regeocodeAddress) {
this.f3018b = regeocodeAddress;
}
}
|
[
"[email protected]"
] | |
663f75b5733475142ed40b35fd5c6096fbc0ffff
|
87901d9fd3279eb58211befa5357553d123cfe0c
|
/bin/ext-platform-optional/platformwebservices/web/gensrc/de/hybris/platform/btg/dto/BTGUrlParameterOperandsDTO.java
|
36cd8494429688a47f1424bec6d29b1aa98eabe6
|
[] |
no_license
|
prafullnagane/learning
|
4d120b801222cbb0d7cc1cc329193575b1194537
|
02b46a0396cca808f4b29cd53088d2df31f43ea0
|
refs/heads/master
| 2020-03-27T23:04:17.390207
| 2014-02-27T06:19:49
| 2014-02-27T06:19:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,205
|
java
|
/*
* ----------------------------------------------------------------
* --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! ---
* --- Generated at Dec 13, 2013 6:34:48 PM ---
* ----------------------------------------------------------------
*
* [y] hybris Platform
*
* Copyright (c) 2000-2011 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.btg.dto;
import de.hybris.platform.btg.dto.BTGUrlParameterOperandDTO;
import de.hybris.platform.webservices.dto.AbstractCollectionDTO;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* Generated collection dto class for type BTGUrlParameterOperand first defined at extension btg
*/
@SuppressWarnings("all")
@XmlRootElement(name = "btgurlparameteroperands")
public class BTGUrlParameterOperandsDTO extends AbstractCollectionDTO
{
/** <i>Generated variable</i> - List of <code>BTGUrlParameterOperandDTO*/
private List<BTGUrlParameterOperandDTO> btgurlparameteroperandsList;
/**
* <i>Generated constructor</i> - for generic creation.
*/
public BTGUrlParameterOperandsDTO()
{
super();
}
/**
* <i>Generated constructor</i> - for generic creation.
*/
public BTGUrlParameterOperandsDTO(final List<BTGUrlParameterOperandDTO> btgurlparameteroperandsList)
{
super();
this.btgurlparameteroperandsList=btgurlparameteroperandsList;
}
/**
* @return the btgurlparameteroperands
*/
@XmlElement(name = "btgurlparameteroperand")
public List<BTGUrlParameterOperandDTO> getBTGUrlParameterOperands()
{
return btgurlparameteroperandsList;
}
/**
* @param btgurlparameteroperandsList
* the btgurlparameteroperandsList to set
*/
public void setBTGUrlParameterOperands(final List<BTGUrlParameterOperandDTO> btgurlparameteroperandsList)
{
this.btgurlparameteroperandsList=btgurlparameteroperandsList;
}
}
|
[
"admin1@neev31.(none)"
] |
admin1@neev31.(none)
|
b8911c481f04886ff6f84224fd9a4a0d1f761c7e
|
1caba6f70a8e2d00f80084513e072bef13cd3aa6
|
/calendar/src/main/java/com/necer/view/WeekView.java
|
d29ff138ce8a0232ebde576cb758e068aa44871a
|
[] |
no_license
|
xia7410/NCalendar
|
392f5c6c2d1b7f97fdf25077d6b52c4392928c27
|
81e9d2b8ff0d7826609998b6b4f0c8be81049e03
|
refs/heads/master
| 2020-04-07T01:51:10.407096
| 2018-11-16T10:36:55
| 2018-11-16T10:36:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,096
|
java
|
package com.necer.view;
import android.content.Context;
import com.necer.entity.NDate;
import com.necer.listener.OnClickWeekViewListener;
import com.necer.utils.Attrs;
import com.necer.utils.Util;
import org.joda.time.LocalDate;
import java.util.List;
/**
* Created by necer on 2018/9/11.
* qq群:127278900
*/
public class WeekView extends BaseCalendarView {
private OnClickWeekViewListener mOnClickWeekViewListener;
public WeekView(Context context, Attrs attrs, LocalDate localDate, OnClickWeekViewListener onClickWeekViewListener) {
super(context, attrs, localDate);
this.mOnClickWeekViewListener = onClickWeekViewListener;
}
@Override
protected List<NDate> getNCalendar(LocalDate localDate, int type) {
return Util.getWeekCalendar(localDate,type);
}
@Override
protected void onClick(LocalDate clickData, LocalDate initialDate) {
mOnClickWeekViewListener.onClickCurrentWeek(clickData);
}
@Override
protected boolean isEqualsMonthOrWeek(LocalDate date, LocalDate initialDate) {
return true;
}
}
|
[
"[email protected]"
] | |
59905210ade81316e5487b688ea32ac8577c41f9
|
471a1d9598d792c18392ca1485bbb3b29d1165c5
|
/jadx-MFP/src/main/java/io/requery/query/OrderBy.java
|
0a645ca302593af2a08596302940a657b136fd3c
|
[] |
no_license
|
reed07/MyPreferencePal
|
84db3a93c114868dd3691217cc175a8675e5544f
|
365b42fcc5670844187ae61b8cbc02c542aa348e
|
refs/heads/master
| 2020-03-10T23:10:43.112303
| 2019-07-08T00:39:32
| 2019-07-08T00:39:32
| 129,635,379
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 152
|
java
|
package io.requery.query;
public interface OrderBy<Q> {
<V> Q orderBy(Expression<V> expression);
Q orderBy(Expression<?>... expressionArr);
}
|
[
"[email protected]"
] | |
72e2afee27e65c86a1f40c068b2316bbdd35d098
|
392e624ea2d6886bf8e37167ebbda0387e7e4a9a
|
/uxcrm-devtools/src/main/java/com/github/yuri0x7c1/uxcrm/devtools/service/ui/view/ServiceDetailView.java
|
2742d2f039a1138d492f22ba0dcf7dea7fa695e4
|
[
"Apache-2.0"
] |
permissive
|
yuri0x7c1/uxcrm
|
11eee75f3a9cffaea4e97dedc8bc46d8d92bee58
|
1a0bf4649bee0a3a62e486a9d6de26f1d25d540f
|
refs/heads/master
| 2018-10-30T07:29:54.123270
| 2018-08-26T18:25:35
| 2018-08-26T18:25:35
| 104,251,350
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,948
|
java
|
package com.github.yuri0x7c1.uxcrm.devtools.service.ui.view;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import org.apache.ofbiz.service.ModelParam;
import org.apache.ofbiz.service.ModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.vaadin.spring.i18n.I18N;
import org.vaadin.viritin.button.MButton;
import com.github.yuri0x7c1.uxcrm.devtools.config.DevtoolsConfiguration.ModelOfbiz;
import com.github.yuri0x7c1.uxcrm.devtools.service.util.ServiceUtil;
import com.github.yuri0x7c1.uxcrm.common.navigation.util.NavigationUtil;
import com.github.yuri0x7c1.uxcrm.common.ui.view.CommonView;
import com.vaadin.icons.VaadinIcons;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.spring.annotation.SpringView;
import com.vaadin.spring.annotation.UIScope;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Grid;
import com.vaadin.ui.themes.ValoTheme;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@UIScope
@SpringView(name = ServiceDetailView.NAME)
public class ServiceDetailView extends CommonView implements View {
private static final long serialVersionUID = 719002900696360148L;
public static final String NAME = "service-detail";
@Autowired
private I18N i18n;
@Autowired
private ModelOfbiz ofbizInstance;
@Autowired
private ServiceUtil serviceUtil;
private Grid<ModelParam> parametersGrid;
@PostConstruct
public void init() {
// back button
addHeaderComponent(
new MButton(VaadinIcons.ARROW_BACKWARD, i18n.get("Back"), (ClickListener) event -> NavigationUtil.back())
.withStyleName(ValoTheme.BUTTON_PRIMARY)
);
// field grid
parametersGrid = new Grid<>();
parametersGrid.setWidth("100%");
parametersGrid.setCaption(i18n.get("Parameters"));
parametersGrid.addColumn(ModelParam::getName).setCaption(i18n.get("Parameter.name"));
parametersGrid.addColumn(ModelParam::isOptional).setCaption(i18n.get("Parameter.optional"));
parametersGrid.addColumn(ModelParam::getType).setCaption(i18n.get("Parameter.type"));
parametersGrid.addColumn(ModelParam::getMode).setCaption(i18n.get("Parameter.mode"));
parametersGrid.addColumn(ModelParam::getEntityName).setCaption(i18n.get("Parameter.entityName"));
addComponent(parametersGrid);
}
@Override
public void enter(ViewChangeEvent event) {
// validate params
if (event.getParameters() == null || event.getParameters().isEmpty()) {
log.error("Parameters is empty");
NavigationUtil.back();
}
String serviceName = event.getParameters();
ModelService service = ofbizInstance.getServices().get(serviceName);
// TODO: move to separate method
List<ModelParam> serviceParams = new ArrayList<>();
for (String paramName : service.getAllParamNames()) {
serviceParams.add(service.getParam(paramName));
}
parametersGrid.setItems(serviceParams);
setHeaderText(serviceName);
}
}
|
[
"[email protected]"
] | |
d5e5cb033d885929525694ff0456dda7d868f55a
|
c2fb6846d5b932928854cfd194d95c79c723f04c
|
/java_backup/my java/codmw3/file.java
|
5c53d913011076f653570fd9dd6a16a3da6715fa
|
[
"MIT"
] |
permissive
|
Jimut123/code-backup
|
ef90ccec9fb6483bb6dae0aa6a1f1cc2b8802d59
|
8d4c16b9e960d352a7775786ea60290b29b30143
|
refs/heads/master
| 2022-12-07T04:10:59.604922
| 2021-04-28T10:22:19
| 2021-04-28T10:22:19
| 156,666,404
| 9
| 5
|
MIT
| 2022-12-02T20:27:22
| 2018-11-08T07:22:48
|
Jupyter Notebook
|
UTF-8
|
Java
| false
| false
| 652
|
java
|
import java.util.*;
import java.io.*;
public class file
{
void main()throws IOException
{
Scanner sc=new Scanner(System.in);
int a,b;
FileOutputStream fs=new FileOutputStream("data.txt");
System.out.println("Enter limit");
a=sc.nextInt();
for(b=0;b<a;b++)
{
System.out.println("Enter data");
fs.write(sc.nextInt());
}
fs.close();
FileInputStream fs1=new FileInputStream("data.txt");
int k;
for(b=0;b<a;b++)
{
System.out.println(k=(int)fs1.read());
}
}
}
|
[
"[email protected]"
] | |
9f056f5757007379ada28b1dae25a843b1c7ef7a
|
e8244d2d87bc9e61f8aafeae0103a20cda2c6f37
|
/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Med.java
|
4ce73bef7e5dae34f9ea07564257be3e4b164fa1
|
[
"Apache-2.0"
] |
permissive
|
wangqilei/onos
|
28b61b2ecadee4883ba336e1208b7f4ae24c0742
|
00e156e151e82bc688f1060433381865a07e8fe2
|
refs/heads/master
| 2021-01-14T10:16:43.813413
| 2015-11-27T07:30:46
| 2015-11-27T08:11:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,326
|
java
|
/*
* Copyright 2015 Open Networking Laboratory
*
* 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.onosproject.bgpio.types;
import java.util.Objects;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.bgpio.exceptions.BgpParseException;
import org.onosproject.bgpio.util.Constants;
import org.onosproject.bgpio.util.Validation;
import com.google.common.base.MoreObjects;
/**
* Provides Implementation of Med BGP Path Attribute.
*/
public class Med implements BgpValueType {
public static final byte MED_TYPE = 4;
public static final byte MED_MAX_LEN = 4;
private int med;
/**
* Constructor to initialize med.
*
* @param med MULTI_EXIT_DISC value
*/
public Med(int med) {
this.med = med;
}
/**
* Returns Med value.
*
* @return Med value
*/
public int med() {
return this.med;
}
/**
* Reads the channel buffer and returns object of Med.
*
* @param cb ChannelBuffer
* @return object of Med
* @throws BgpParseException while parsing Med path attribute
*/
public static Med read(ChannelBuffer cb) throws BgpParseException {
int med;
ChannelBuffer tempCb = cb.copy();
Validation parseFlags = Validation.parseAttributeHeader(cb);
if ((parseFlags.getLength() > MED_MAX_LEN) || cb.readableBytes() < parseFlags.getLength()) {
Validation.validateLen(BgpErrorType.UPDATE_MESSAGE_ERROR, BgpErrorType.ATTRIBUTE_LENGTH_ERROR,
parseFlags.getLength());
}
int len = parseFlags.isShort() ? parseFlags.getLength() + Constants.TYPE_AND_LEN_AS_SHORT : parseFlags
.getLength() + Constants.TYPE_AND_LEN_AS_BYTE;
ChannelBuffer data = tempCb.readBytes(len);
if (!parseFlags.getFirstBit() && parseFlags.getSecondBit() && parseFlags.getThirdBit()) {
throw new BgpParseException(BgpErrorType.UPDATE_MESSAGE_ERROR, BgpErrorType.ATTRIBUTE_FLAGS_ERROR, data);
}
med = cb.readInt();
return new Med(med);
}
@Override
public short getType() {
return MED_TYPE;
}
@Override
public int hashCode() {
return Objects.hash(med);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof Med) {
Med other = (Med) obj;
return Objects.equals(med, other.med);
}
return false;
}
@Override
public String toString() {
return MoreObjects.toStringHelper(getClass())
.add("med", med)
.toString();
}
@Override
public int write(ChannelBuffer cb) {
//Not to implement as of now
return 0;
}
}
|
[
"[email protected]"
] | |
e3aaec36275a69780a28269df8e0111813e33472
|
e7d0f8d0a4bf30073ffc306a50714b790a2ac55e
|
/src/main/java/com/example/demo/demo/thread/ThreadDemo3.java
|
e69f70199ae37722575b78907912752564300451
|
[] |
no_license
|
lovepli/demo
|
c05730ad22b5848d3654d7a4a3a1aa1e0fcc7aca
|
3a847d2aed6da0162a754855e80fc6bd4d10343c
|
refs/heads/master
| 2022-12-23T22:55:24.700716
| 2019-12-02T11:40:31
| 2019-12-02T11:40:31
| 224,959,745
| 0
| 0
| null | 2020-10-13T17:51:28
| 2019-11-30T04:34:27
|
Java
|
UTF-8
|
Java
| false
| false
| 1,843
|
java
|
package com.example.demo.demo.thread;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author: lipan
* @date: 2019-06-10
* @description: 练习:
* join练习 小明设计了一个多线程程序,希望创建3个线程,每个线程先打印
* Hello, xxx!
* 然后等待1秒,再打印: Goodbye, xxx!
*
* 这里我没有成功!!!!ß
*/
class HellThread extends Thread{
private String name;
public HellThread(String name) {
this.name = name;
}
@Override
public void run() {
System.out.println("Hello, " + name + "!");
}
public String getname() {
return name;
}
}
public class ThreadDemo3 {
public static void main(String[] args) throws Exception {
List<Thread> threads = new ArrayList<>();
for (String name : Arrays.asList("Bob", "Alice", "Tom")) {
threads.add(new HellThread(name));
}
System.out.println("start");
for (Thread t : threads) {
t.start();
t.join();
Thread.sleep(2000);
}
try {
Thread.sleep(1000);
System.out.println("(等待约1秒)");
} catch (InterruptedException e) {
e.printStackTrace();
}
// for (int i = 0; i < threads.size(); i++) {
// String s=threads.get(i).getName();
// System.out.println(s);
// }
System.out.println("Goodbye, " +"Bob"+ "!");
System.out.println("Goodbye, " +"Alice"+ "!");
System.out.println("Goodbye, " +"Tom"+ "!");
System.out.println("end");
}
// 小明期望的输出是:
// START
// Hello, Bob!
// Hello, Alice!
// Hello, Tom!
// (等待约1秒)
// Goodbye, Bob!
// Goodbye, Alice!
// Goodbye, Tom!
// END
}
|
[
"[email protected]"
] | |
e060bbfe84b73d4f397e2761ba131706de1c8e29
|
642bb69b1aca6cd5d206572ddc3f118f64be995a
|
/src/com/haxademic/demo/system/Demo_JavaFXAppLaunch.java
|
a3bfb40b0ba813727aa34e53cacddcecef8f1a1a
|
[
"MIT"
] |
permissive
|
chrisfromwork/haxademic
|
25cdfd37a26ec897cf309ed96de4db8f68eeb991
|
125fbe694a084abf9b29efa9e321bc00ba627dfc
|
refs/heads/master
| 2020-06-26T17:04:05.716929
| 2019-07-27T22:21:04
| 2019-07-27T22:21:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 934
|
java
|
package com.haxademic.demo.system;
import com.haxademic.core.app.PAppletHax;
import com.haxademic.core.app.config.AppSettings;
import com.haxademic.core.draw.context.PG;
public class Demo_JavaFXAppLaunch
extends PAppletHax {
public static void main(String args[]) { PAppletHax.main(Thread.currentThread().getStackTrace()[1].getClassName()); }
protected void overridePropsFile() {
int FRAMES = 360;
p.appConfig.setProperty(AppSettings.LOOP_FRAMES, FRAMES);
}
// public void setupFirstFrame() {
// new Thread() {
// @Override
// public void run() {
// javafx.application.Application.launch(Demo_WebViewTestApp.class);
// }
// }.start();
// }
public void drawApp() {
p.background(0);
PG.setCenterScreen(p);
// if(Demo_WebViewTestApp.instance != null) {
// p.background(0,255,0);
// // WebViewApplicationTest.instance.printSomething();
// }
}
}
|
[
"[email protected]"
] | |
c2df770ca425e5877167a6d7e3e5d01e686a8051
|
261bb9f006737976aee730654f5052a7fc2ad5fd
|
/tkSystem/src/main/java/com/tkSystem/dao/mapper/TkApplyMapper.java
|
93c9371e99c4d43886bf9e6812c4938d3dd52282
|
[] |
no_license
|
1emanresu/tkSystem
|
00d8aad9ec3e8965c5874e053b3814c9700a5ca0
|
35dc100d3da9eef13eaffc30118faefa0200f357
|
refs/heads/master
| 2020-03-11T01:52:41.046662
| 2018-09-14T12:52:54
| 2018-09-14T12:52:54
| 129,704,058
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 380
|
java
|
package com.tkSystem.dao.mapper;
import com.tkSystem.dao.entity.TkApply;
public interface TkApplyMapper {
int deleteByPrimaryKey(String tkApplyId);
int insert(TkApply record);
int insertSelective(TkApply record);
TkApply selectByPrimaryKey(String tkApplyId);
int updateByPrimaryKeySelective(TkApply record);
int updateByPrimaryKey(TkApply record);
}
|
[
"[email protected]"
] | |
f7f3ed1143491c108b1a1c643b38004b61f8ba54
|
56345887f87495c458a80373002159dbbbd7717f
|
/example/src/main/java/com/alibaba/otter/canal/example/db/MysqlLoadLauncher.java
|
b99361060bf849926c633a7a1fb30da9a73fd8d6
|
[
"Apache-2.0"
] |
permissive
|
cainiao22/canal-bigdata
|
724199c61632e98b43797d4fd276abcba7e426fb
|
a88362535faeda5f846a8f147d341f8d22ffd2e4
|
refs/heads/master
| 2022-12-26T16:59:50.256698
| 2018-12-05T07:27:17
| 2018-12-05T07:27:17
| 214,317,447
| 1
| 0
|
Apache-2.0
| 2022-12-14T20:35:10
| 2019-10-11T01:30:07
|
Java
|
UTF-8
|
Java
| false
| false
| 1,289
|
java
|
package com.alibaba.otter.canal.example.db;
import com.alibaba.otter.canal.example.db.mysql.MysqlClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MysqlLoadLauncher {
private static final Logger logger = LoggerFactory.getLogger(MysqlLoadLauncher.class);
public static void main(String[] args) {
try {
logger.info("## start the canal mysql client.");
final MysqlClient client = ServiceLocator.getMysqlClient();
logger.info("## the canal consumer is running now ......");
client.start();
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
try {
logger.info("## stop the canal consumer");
client.stop();
} catch (Throwable e) {
logger.warn("##something goes wrong when stopping canal consumer:\n{}", e);
} finally {
logger.info("## canal consumer is down.");
}
}
});
} catch (Throwable e) {
logger.error("## Something goes wrong when starting up the canal consumer:\n{}", e);
System.exit(0);
}
}
}
|
[
"[email protected]"
] | |
d53b2105d7a5ac5b8f5ad2dd55fd961786bdb5dd
|
f8d00e97ba6045087f885e2675e73f5fa24e8601
|
/core/src/samples/java/org/easymock/samples/BasicClassMockTest.java
|
12cf3f8c1ab0a6b71c21ed6d2b2167a686e9d361
|
[
"Apache-2.0"
] |
permissive
|
shadow000902/easymock
|
c2ae9f3bb3d959177c8619f543384c956ca46af0
|
5d2644988f13b9a254ebfd6193cb50626150a7e0
|
refs/heads/master
| 2021-01-13T11:00:28.890587
| 2016-12-21T04:46:20
| 2016-12-21T04:46:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,356
|
java
|
/**
* Copyright 2001-2016 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.easymock.samples;
import org.easymock.EasyMockSupport;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* Example of how to use {@code org.easymock.EasyMock} to mock a class
*
* @author Henri Tremblay
*/
public class BasicClassMockTest extends EasyMockSupport {
/**
* Our nice class that is allowed to print
*/
public static class Document {
private final Printer printer;
private String content;
public Document(Printer printer) {
this.printer = printer;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public void print() {
printer.print(content);
}
}
/**
* The 3rd party class to mock.
*/
public static abstract class Printer {
public abstract void print(String toPrint);
}
private Printer printer;
private Document document;
@Before
public void setUp() {
printer = mock(Printer.class);
document = new Document(printer);
}
@After
public void tearDown() {
printer = null;
document = null;
}
@Test
public void testPrintContent() {
printer.print("Hello world");
replayAll();
document.setContent("Hello world");
document.print();
verifyAll(); // make sure Printer.print was called
}
@Test
public void testPrintEmptyContent() {
printer.print("");
replayAll();
document.setContent("");
document.print();
verifyAll(); // make sure Printer.print was called
}
}
|
[
"[email protected]"
] | |
d46ac41e5fa9ba0329ff91fb45ddf576ab1ecd6a
|
4abd603f82fdfa5f5503c212605f35979b77c406
|
/html/Programs/hw6-2-diff/r04631013-375-3/Diff.java
|
fc3f2bcf5c5de5d0ddb6d571bc972507c54155e0
|
[] |
no_license
|
dn070017/1042-PDSA
|
b23070f51946c8ac708d3ab9f447ab8185bd2a34
|
5e7d7b1b2c9d751a93de9725316aa3b8f59652e6
|
refs/heads/master
| 2020-03-20T12:13:43.229042
| 2018-06-15T01:00:48
| 2018-06-15T01:00:48
| 137,424,305
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,124
|
java
|
import java.util.Arrays;
public class Player implements Comparable<Player> {
private Card[] cards = new Card[5];
private String name;
// DO NOT MODIFY THIS
public Player(String name) {
this.name = name;
}
// DO NOT MODIFY THIS
public String getName() {
return this.name;
}
// DO NOT MODIFY THIS
public void setCards(Card[] cards) {
this.cards = cards;
}
// TODO
public int compareTo(Player that) {
.
//winner should be in the last
Arrays.sort(this.cards);
Arrays.sort(that.cards);
int flower_a[] = new int[2];
flower_a[0] = 0;
flower_a[1] = 0;
for (int k = 0; k < 2; k++) {
int my[] = new int[5];
Card[] see = new Card[5];
switch (k) {
case 0:
see = this.cards;
break;
case 1:
see = that.cards;
}
for (int i = 0; i < 5; i++) {
if (""J"".equals(see[i].getFace())) {
my[i] = 11;
} else if (""Q"".equals(see[i].getFace())) {
my[i] = 12;
} else if (""K"".equals(see[i].getFace())) {
my[i] = 13;
} else if (""A"".equals(see[i].getFace())) {
my[i] = 14;
} else {
my[i] = Integer.parseInt(see[i].getFace());
}
// System.out.printf(""%d\n "", my[i]);
}
int my_2[] = new int[5];
my_2[0] = my[4];
for (int i = 0; i < 4; i++) {
my_2[i + 1] = my[i];
}
int save_0 = 0;
int save_1 = 0;
// culmulate how many 1 and 0
for (int i = 0; i < 5; i++) {
int temp = my_2[i] - my[i];
if (temp == 0) {
save_0 = save_0 + 1;
} else if (temp == -1) {
save_1 = save_1 + 1;
}
}
// System.out.printf(""%d\n "", save_0);
// System.out.printf(""%d\n "", save_1);
if (save_0 == 3) {
flower_a[k] = 6;
} else if (see[0].getSuit() == see[1].getSuit()) {
if (see[1].getSuit() == see[2].getSuit()) {
if (see[2].getSuit() == see[3].getSuit()) {
if (see[3].getSuit() == see[4].getSuit()) {
flower_a[k] = 5;
}
}
}
} else if (save_1 == 4) {
flower_a[k] = 4;
} else if (save_1 == 3) {
if (""A"".equals(see[4].getFace())) {
flower_a[k] = 4;
}
} else if (save_0 == 2) {
if (see[0] == see[1] && see[1] == see[2]) {
flower_a[k] = 2;
} else if (see[2] == see[3] && see[3] == see[4]) {
flower_a[k] = 2;
} else if (see[1] == see[2] && see[2] == see[3]) {
flower_a[k] = 2;
} else {
flower_a[k] = 3;
}
} else {
flower_a[k] = 1;
}
// System.out.printf(""%d\n "", flower_a[k]);
}
int roo = 0;
if (flower_a[0] > flower_a[1]) {
return 1;
} else if (flower_a[0] < flower_a[1]) {
return -1;
} else {
if (flower_a[0] == 6) {
if (this.cards[0] == this.cards[1] && this.cards[1] == this.cards[2]) {
roo = this.cards[0].compareTo(that.cards[0]);
} else {
roo = this.cards[4].compareTo(that.cards[4]);
}
// return roo;
}
// //////////////////////
if (flower_a[0] == 5) {
if (flower_a[1] == 5) {
roo = 0;
}
}
//////////////////////////////
if (flower_a[0] == 4) {
roo = Card.SUIT_ORDER.compare(this.cards[4], that.cards[4]);
// return roo;
}
///////////////////////////////////////////////////
if (flower_a[0] == 3) {
roo = Card.SUIT_ORDER.compare(this.cards[3], that.cards[3]);
// return roo;
}
////////////////////////////////////////////////
if (flower_a[0] == 2) {
roo = Card.SUIT_ORDER.compare(this.cards[4], that.cards[4]);
// return roo;
}
/////////////////////////////////////
if (flower_a[0] == 1) {
roo = Card.SUIT_ORDER.compare(this.cards[4], that.cards[4]);
// return roo;
}
}
return roo;
}
}
|
[
"[email protected]"
] | |
557bdfadf3130d05a1d39d520de3e8893b4882cd
|
95c49f466673952b465e19a5ee3ae6eff76bee00
|
/src/main/java/com/airbnb/lottie/p134f/GammaEvaluator.java
|
d35413e884c81e5c053128ccc5791072076994ae
|
[] |
no_license
|
Phantoms007/zhihuAPK
|
58889c399ae56b16a9160a5f48b807e02c87797e
|
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
|
refs/heads/main
| 2023-01-24T01:34:18.716323
| 2020-11-25T17:14:55
| 2020-11-25T17:14:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,352
|
java
|
package com.airbnb.lottie.p134f;
/* renamed from: com.airbnb.lottie.f.b */
/* compiled from: GammaEvaluator */
public class GammaEvaluator {
/* renamed from: a */
private static float m5634a(float f) {
return f <= 0.0031308f ? f * 12.92f : (float) ((Math.pow((double) f, 0.4166666567325592d) * 1.0549999475479126d) - 0.054999999701976776d);
}
/* renamed from: b */
private static float m5636b(float f) {
return f <= 0.04045f ? f / 12.92f : (float) Math.pow((double) ((f + 0.055f) / 1.055f), 2.4000000953674316d);
}
/* renamed from: a */
public static int m5635a(float f, int i, int i2) {
float f2 = ((float) ((i >> 24) & 255)) / 255.0f;
float b = m5636b(((float) ((i >> 16) & 255)) / 255.0f);
float b2 = m5636b(((float) ((i >> 8) & 255)) / 255.0f);
float b3 = m5636b(((float) (i & 255)) / 255.0f);
float b4 = m5636b(((float) ((i2 >> 16) & 255)) / 255.0f);
float b5 = m5636b(((float) ((i2 >> 8) & 255)) / 255.0f);
float b6 = b3 + (f * (m5636b(((float) (i2 & 255)) / 255.0f) - b3));
return (Math.round(m5634a(b + ((b4 - b) * f)) * 255.0f) << 16) | (Math.round((f2 + (((((float) ((i2 >> 24) & 255)) / 255.0f) - f2) * f)) * 255.0f) << 24) | (Math.round(m5634a(b2 + ((b5 - b2) * f)) * 255.0f) << 8) | Math.round(m5634a(b6) * 255.0f);
}
}
|
[
"[email protected]"
] | |
f934bb78afb34bbf56870bb8d18308b03dc1012b
|
068dcc21015b89fc6bf33527203a3a4ad8a62882
|
/oauth2/src/main/java/com/lambdaschool/oauth2/services/UseremailServiceImpl.java
|
bde2c25ceca3fe93b8291c57f980f0cd76f5b747
|
[
"MIT"
] |
permissive
|
jeffreywhitaker/java-oauth2
|
1911da0064874812f0b9b7a5cd97428bbe3fc35b
|
a0f09dd2802c4b483a36b5e65d5e325c38adbf0e
|
refs/heads/master
| 2020-08-10T01:44:38.706679
| 2019-10-09T01:11:25
| 2019-10-09T01:11:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,882
|
java
|
package com.lambdaschool.oauth2.services;
import com.lambdaschool.oauth2.models.Useremail;
import com.lambdaschool.oauth2.repository.UseremailRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;
import javax.persistence.EntityNotFoundException;
import java.util.ArrayList;
import java.util.List;
@Service(value = "useremailService")
public class UseremailServiceImpl implements UseremailService
{
@Autowired
private UseremailRepository useremailrepos;
@Override
public List<Useremail> findAll()
{
List<Useremail> list = new ArrayList<>();
useremailrepos.findAll()
.iterator()
.forEachRemaining(list::add);
return list;
}
@Override
public Useremail findUseremailById(long id)
{
return useremailrepos.findById(id)
.orElseThrow(() -> new EntityNotFoundException("Useremail with id " + id + " Not Found!"));
}
@Override
public List<Useremail> findByUserName(String username,
boolean isAdmin)
{
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
if (username.equalsIgnoreCase(authentication.getName()) || isAdmin)
{
return useremailrepos.findAllByUser_Username(username);
} else
{
throw new EntityNotFoundException(authentication.getName() + " not authorized to make change");
}
}
@Override
public void delete(long id,
boolean isAdmin)
{
if (useremailrepos.findById(id)
.isPresent())
{
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
if (useremailrepos.findById(id)
.get()
.getUser()
.getUsername()
.equalsIgnoreCase(authentication.getName()) || isAdmin)
{
useremailrepos.deleteById(id);
} else
{
throw new EntityNotFoundException(authentication.getName() + " not authorized to make change");
}
} else
{
throw new EntityNotFoundException("Useremail with id " + id + " Not Found!");
}
}
@Override
public Useremail update(long useremailid,
String emailaddress,
boolean isAdmin)
{
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
if (useremailrepos.findById(useremailid)
.isPresent())
{
if (useremailrepos.findById(useremailid)
.get()
.getUser()
.getUsername()
.equalsIgnoreCase(authentication.getName()) || isAdmin)
{
Useremail useremail = findUseremailById(useremailid);
useremail.setUseremail(emailaddress);
return useremailrepos.save(useremail);
} else
{
throw new EntityNotFoundException(authentication.getName() + " not authorized to make change");
}
} else
{
throw new EntityNotFoundException("Useremail with id " + useremailid + " Not Found!");
}
}
}
|
[
"[email protected]"
] | |
596868dd3b4b3055ed3f27ddc5c3599b39624e5b
|
eb2c22492d4740a3eb455f2a898f6b3bc8235809
|
/jnnsBank/kyc-service/src/main/java/com/ideatech/ams/kyc/service/SuperviseServiceImpl.java
|
193bbe40545f33aa74544bad36da179fda0a5248
|
[] |
no_license
|
deepexpert-gaohz/sa-d
|
72a2d0cbfe95252d2a62f6247e7732c883049459
|
2d14275071b3d562447d24bd44d3a53f5a96fb71
|
refs/heads/master
| 2023-03-10T08:39:15.544657
| 2021-02-24T02:17:58
| 2021-02-24T02:17:58
| 341,395,351
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,145
|
java
|
package com.ideatech.ams.kyc.service;
import com.ideatech.ams.kyc.dao.SuperviseDao;
import com.ideatech.ams.kyc.dto.SuperviseDto;
import com.ideatech.ams.kyc.entity.Supervise;
import com.ideatech.common.util.BeanCopierUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.util.List;
@Service
@Transactional
public class SuperviseServiceImpl implements SuperviseService {
@Autowired
private SuperviseDao superviseDao;
@Override
public void insertBatch(Long saicInfoId, List<SuperviseDto> superviseList) {
Supervise supervise = null;
int size = superviseList.size();
if(size == 0){
return;
}
//设置主键
for (SuperviseDto superviseDto: superviseList) {
supervise = new Supervise();
BeanCopierUtils.copyProperties(superviseDto, supervise);
// supervise.setId(Calendar.getInstance().getTimeInMillis());
supervise.setSaicinfoId(saicInfoId);
superviseDao.save(supervise);
}
}
}
|
[
"[email protected]"
] | |
69bf1a46664e71b7873f7a815d06f7748cc49207
|
2158950cb11bbcf1f111dc069fb37efe8afe7ea1
|
/squidb/src/com/yahoo/squidb/sql/Update.java
|
5264ce0da3b6d0a650be35f4b1e1cbaba28b1a52
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
taimur97/squidb
|
9712d049a2eba1c31028634ed32e75c096e27499
|
cd74ea6b095c7cf1dd12021e4b36b35a96359ac6
|
refs/heads/master
| 2020-12-02T22:36:20.610594
| 2015-04-23T17:30:57
| 2015-04-23T17:30:57
| 34,612,625
| 1
| 0
| null | 2015-04-26T13:29:31
| 2015-04-26T13:29:30
| null |
UTF-8
|
Java
| false
| false
| 6,191
|
java
|
/*
* Copyright 2015, Yahoo Inc.
* Copyrights licensed under the Apache 2.0 License.
* See the accompanying LICENSE file for terms.
*/
package com.yahoo.squidb.sql;
import android.content.ContentValues;
import com.yahoo.squidb.data.AbstractModel;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
/**
* Builder class for a SQLite UPDATE statement
*/
public class Update extends TableStatement {
private final SqlTable<?> table;
private ConflictAlgorithm conflictAlgorithm = ConflictAlgorithm.NONE;
private final Map<String, Object> valuesToUpdate = new HashMap<String, Object>();
private final List<Criterion> criterions = new ArrayList<Criterion>();
protected Update(SqlTable<?> table) {
this.table = table;
}
/**
* Construct a new Update statement on the specified {@link Table}
*/
public static Update table(Table table) {
return new Update(table);
}
/**
* Construct a new Update statement on the specified {@link View}. Note that updates on a View are only permissible
* when an INSTEAD OF Trigger is constructed on that View.
*/
public static Update table(View view) {
return new Update(view);
}
@Override
public SqlTable<?> getTable() {
return table;
}
/**
* Set the {@link ConflictAlgorithm} this statement should use if a constraint violation occurs
*
* @param conflictAlgorithm the conflictAlgorithm to use
* @return this Update object, to allow chaining method calls
*/
public Update onConflict(ConflictAlgorithm conflictAlgorithm) {
this.conflictAlgorithm = conflictAlgorithm;
invalidateCompileCache();
return this;
}
/**
* Adds a WHERE clause to this statement. Calling this method multiple times will combine all the criterions with
* AND.
*
* @param criterion A criterion to use in the where clause
* @return this Delete object, to allow chaining method calls
*/
public Update where(Criterion criterion) {
this.criterions.add(criterion);
invalidateCompileCache();
return this;
}
/**
* Update the specified column to the value provided
*
* @param column the column to set
* @param value the new value for the column
* @return this Update object, to allow chaining method calls
*/
public Update set(Property<?> column, Object value) {
if (column == null) {
throw new IllegalArgumentException("column must not be null");
}
valuesToUpdate.put(column.getExpression(), value);
invalidateCompileCache();
return this;
}
/**
* Update the specified columns to the values provided
*
* @param columns the columns to set
* @param values the new values for the columns
* @return this Update object, to allow chaining method calls
*/
public Update set(Property<?>[] columns, Object[] values) {
if (columns.length != values.length) {
throw new IllegalArgumentException("You must provide the same number of columns and values");
}
for (int i = 0; i < columns.length; i++) {
set(columns[i], values[i]);
}
invalidateCompileCache();
return this;
}
/**
* Update the specified columns to the values provided
*
* @param columns the columns to set
* @param values the new values for the columns
* @return this Update object, to allow chaining method calls
*/
public Update set(List<Property<?>> columns, List<Object> values) {
final int size = columns.size();
if (size != values.size()) {
throw new IllegalArgumentException("You must provide the same number of columns and values");
}
for (int i = 0; i < size; i++) {
set(columns.get(i), values.get(i));
}
invalidateCompileCache();
return this;
}
/**
* Set the columns and values to update based on the specified model object
*
* @return this Update object, to allow chaining method calls
*/
public Update fromTemplate(AbstractModel template) {
if (!template.isModified()) {
throw new IllegalArgumentException("Template has no values set to use for update");
}
ContentValues setValues = template.getSetValues();
for (Entry<String, Object> entry : setValues.valueSet()) {
valuesToUpdate.put(entry.getKey(), entry.getValue());
}
invalidateCompileCache();
return this;
}
@Override
protected void appendCompiledStringWithArguments(StringBuilder sql, List<Object> updateArgsBuilder) {
assertValues();
sql.append("UPDATE ");
visitConflictAlgorithm(sql);
sql.append(table.getExpression()).append(" SET ");
visitValues(sql, updateArgsBuilder);
visitWhere(sql, updateArgsBuilder);
}
private void assertValues() {
if (valuesToUpdate.isEmpty()) {
throw new IllegalStateException("No columns specified for update");
}
}
private void visitConflictAlgorithm(StringBuilder sql) {
if (ConflictAlgorithm.NONE != conflictAlgorithm) {
sql.append("OR ").append(conflictAlgorithm).append(" ");
}
}
protected void visitValues(StringBuilder sql, List<Object> updateArgsBuilder) {
boolean appendComma = false;
for (String column : valuesToUpdate.keySet()) {
if (appendComma) {
sql.append(",");
}
appendComma = true;
sql.append(column).append(" = ");
Object value = valuesToUpdate.get(column);
SqlUtils.addToSqlString(sql, updateArgsBuilder, value);
}
}
private void visitWhere(StringBuilder sql, List<Object> updateArgsBuilder) {
if (criterions.isEmpty()) {
return;
}
sql.append(" WHERE ");
SqlUtils.appendConcatenatedCompilables(criterions, sql, updateArgsBuilder, " AND ");
}
}
|
[
"[email protected]"
] | |
0d981a7edf79ae3d05a3f5af68bf616c1305c944
|
e9f77cc80015bc81cea0ee4418e179b2112d808c
|
/main/plugins/kafka/src/main/java/de/tweerlei/dbgrazer/plugins/kafka/types/MessageHeadersQueryType.java
|
a24a5ecdcfd7fea24340bcdd7c0c3541082379b5
|
[
"Apache-2.0"
] |
permissive
|
tweerlei/dbgrazer
|
2d3754596a51e293ed0a232d7b0128bf523789c2
|
2cec20e9730c14e6e6c18c274765647a369f7175
|
refs/heads/master
| 2023-08-08T22:28:11.633335
| 2023-07-26T13:05:30
| 2023-07-26T13:05:30
| 144,776,073
| 4
| 1
|
Apache-2.0
| 2023-03-27T14:00:05
| 2018-08-14T21:58:01
|
Java
|
UTF-8
|
Java
| false
| false
| 1,199
|
java
|
/*
* Copyright 2018 tweerlei Wruck + Buchmeier GbR - http://www.tweerlei.de/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.tweerlei.dbgrazer.plugins.kafka.types;
import de.tweerlei.dbgrazer.plugins.kafka.impl.KafkaLinkType;
import de.tweerlei.dbgrazer.query.model.impl.AbstractRowQueryType;
/**
* HEAD webservice request
*
* @author Robert Wruck
*/
//@Service
//@Order(501)
public class MessageHeadersQueryType extends AbstractRowQueryType
{
private static final String NAME = "KAFKA_HEADERS";
/**
* Constructor
* @param linkType LinkType
*/
// @Autowired
public MessageHeadersQueryType(KafkaLinkType linkType)
{
super(NAME, linkType, null);
}
}
|
[
"[email protected]"
] | |
482b1108dabc08aaba4f500b6ef2fe0a55650f3f
|
6b229059893f2106e19c77b5d7d66d0357ac31a2
|
/old/junit_test_by_spring/src/main/java/com/test/domain/es/Repository.java
|
e0793d5841d318778c0557a0980a8ffea6ead410
|
[] |
no_license
|
zacscoding/spring-example
|
33ce7ce26bb72e91cdca8c4c02fea5108eb4ed4b
|
d538cbfad328b0c12913560133fef9d71c20b43d
|
refs/heads/master
| 2018-12-10T06:44:22.668988
| 2018-09-13T14:02:11
| 2018-09-13T14:02:11
| 115,132,696
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 798
|
java
|
package com.test.domain.es;
import java.util.List;
import com.google.gson.Gson;
public class Repository {
private String ip;
private List<String> prepared;
private List<String[]> values;
private List<String> labels;
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public List<String> getPrepared() {
return prepared;
}
public void setPrepared(List<String> prepared) {
this.prepared = prepared;
}
public List<String[]> getValues() {
return values;
}
public void setValues(List<String[]> values) {
this.values = values;
}
public List<String> getLabels() {
return labels;
}
public void setLabels(List<String> labels) {
this.labels = labels;
}
@Override
public String toString() {
return new Gson().toJson(this);
}
}
|
[
"[email protected]"
] | |
bad59f61fb8719ae2ffb99aa1117e5f6f7340669
|
e82c1473b49df5114f0332c14781d677f88f363f
|
/MED-CLOUD/med-service/src/main/java/nta/med/service/ihis/handler/ocsa/OCS0118U00GrdOCS0118Handler.java
|
d2ad1f4e7563ddd63c2bad44de259c19c7073802
|
[] |
no_license
|
zhiji6/mih
|
fa1d2279388976c901dc90762bc0b5c30a2325fc
|
2714d15853162a492db7ea8b953d5b863c3a8000
|
refs/heads/master
| 2023-08-16T18:35:19.836018
| 2017-12-28T09:33:19
| 2017-12-28T09:33:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,375
|
java
|
package nta.med.service.ihis.handler.ocsa;
import java.util.List;
import javax.annotation.Resource;
import nta.med.core.utils.BeanUtils;
import nta.med.data.dao.medi.ocs.Ocs0103Repository;
import nta.med.data.model.ihis.ocsa.OCS0118U00GrdOCS0118Info;
import nta.med.core.infrastructure.socket.handler.ScreenHandler;
import nta.med.service.ihis.proto.OcsaModelProto;
import nta.med.service.ihis.proto.OcsaServiceProto;
import nta.med.service.ihis.proto.OcsaServiceProto.OCS0118U00GrdOCS0118Request;
import nta.med.service.ihis.proto.OcsaServiceProto.OCS0118U00GrdOCS0118Response;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.vertx.java.core.Vertx;
@Service
@Scope("prototype")
public class OCS0118U00GrdOCS0118Handler extends ScreenHandler<OcsaServiceProto.OCS0118U00GrdOCS0118Request,OcsaServiceProto.OCS0118U00GrdOCS0118Response> {
@Resource
private Ocs0103Repository ocs0103Repository;
@Override
@Transactional(readOnly = true)
public OCS0118U00GrdOCS0118Response handle(Vertx vertx, String clientId,
String sessionId, long contextId,
OCS0118U00GrdOCS0118Request request) throws Exception {
OcsaServiceProto.OCS0118U00GrdOCS0118Response.Builder response = OcsaServiceProto.OCS0118U00GrdOCS0118Response.newBuilder();
List<OCS0118U00GrdOCS0118Info> list = ocs0103Repository.getOCS0118U00GrdOCS0118Info(getHospitalCode(vertx, sessionId), request.getHangmogNameInx());
if(!CollectionUtils.isEmpty(list)){
for(OCS0118U00GrdOCS0118Info item : list){
OcsaModelProto.OCS0118U00GrdOCS0118Info.Builder info = OcsaModelProto.OCS0118U00GrdOCS0118Info.newBuilder();
BeanUtils.copyProperties(item, info, getLanguage(vertx, sessionId));
response.addGrdOCS0118Info(info);
}
}
return response.build();
}
}
|
[
"[email protected]"
] | |
76d4dffeb7730c66eeeddf67d9e496f2a95420ba
|
ba3d47e78f52f83625b1b9319497c7c9546907e1
|
/app/src/main/java/com/yzx/chat/broadcast/NetworkStateReceive.java
|
02dd38a6f881c83c16a7475866cbde562f5c58cd
|
[] |
no_license
|
VN0/ChatProject
|
ec7ad7a179757fcaa8ac978fd431988398a27ecc
|
475ec6d81c5f851620c0b9573c5866f4f4434c15
|
refs/heads/master
| 2020-04-28T00:49:32.004506
| 2019-02-27T11:32:36
| 2019-02-27T11:32:36
| 174,830,471
| 1
| 0
| null | 2019-03-10T13:54:26
| 2019-03-10T13:54:26
| null |
UTF-8
|
Java
| false
| false
| 3,471
|
java
|
package com.yzx.chat.broadcast;
import android.app.Application;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import java.util.LinkedList;
import java.util.List;
/**
* Created by YZX on 2017年10月23日.
* 每一个不曾起舞的日子,都是对生命的辜负.
*/
public class NetworkStateReceive extends BroadcastReceiver {
private static final String RECEIVE_INTENT_TYPE = ConnectivityManager.CONNECTIVITY_ACTION;
private static int sCurrentNetworkType = -1;
private static boolean sIsNetworkAvailable;
private static List<NetworkChangeListener> sListenerList = new LinkedList<>();
public static void init(Application context) {
IntentFilter filter = new IntentFilter(RECEIVE_INTENT_TYPE);
NetworkStateReceive receive = new NetworkStateReceive();
context.registerReceiver(receive, filter);
}
public static synchronized void registerNetworkChangeListener(NetworkChangeListener listener) {
if(listener==null){
throw new RuntimeException("NetworkChangeListener can't be null");
}
if (!sListenerList.contains(listener)) {
sListenerList.add(listener);
}
}
public static synchronized void unregisterNetworkChangeListener(NetworkChangeListener listener) {
if(listener==null){
throw new RuntimeException("NetworkChangeListener can't be null");
}
sListenerList.remove(listener);
}
private NetworkStateReceive() {
}
@Override
public void onReceive(Context context, Intent intent) {
if (RECEIVE_INTENT_TYPE.equals(intent.getAction())) {
ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
if (manager == null) {
return;
}
NetworkInfo activeNetwork = manager.getActiveNetworkInfo();
synchronized (NetworkStateReceive.class) {
if (activeNetwork != null && activeNetwork.isConnected()) {
int type = activeNetwork.getType();
if (type != sCurrentNetworkType || !sIsNetworkAvailable) {
for (NetworkChangeListener l : sListenerList) {
if (type != sCurrentNetworkType) {
l.onNetworkTypeChange(type);
}
if (!sIsNetworkAvailable) {
l.onConnectionStateChange(true);
}
}
}
sCurrentNetworkType = type;
sIsNetworkAvailable = true;
} else {
if (sIsNetworkAvailable) {
for (NetworkChangeListener l : sListenerList) {
l.onConnectionStateChange(false);
}
}
sIsNetworkAvailable = false;
}
}
}
}
public interface NetworkChangeListener {
void onNetworkTypeChange(int type);
void onConnectionStateChange(boolean isNetworkAvailable);
}
}
|
[
"[email protected]"
] | |
8b150553a7c7d8d17faf3dd5fef221cfe25b449b
|
1fddbc1211d5e4ae5846dec7ee26e7f5f51f8e18
|
/Adlib/src/com/mobilead/adlib/ads/SubAdlibAdViewAdmob.java
|
14b9dec6c8c69b06feb9934188d059e8075afba1
|
[] |
no_license
|
wikibook/mobileappad
|
fc5ab90ce010ef480d93ffc25432fdf1d6e1776a
|
6a98f74ee4e9a28f1f127960d12fb36b40cdc6af
|
refs/heads/master
| 2016-09-06T13:12:33.252530
| 2013-10-25T07:59:30
| 2013-10-25T07:59:30
| 13,854,820
| 1
| 1
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,509
|
java
|
/*
* adlibr - Library for mobile AD mediation.
* http://adlibr.com
* Copyright (c) 2012 Mocoplex, Inc. All rights reserved.
* Licensed under the BSD open source license.
*/
/*
* confirmed compatible with admob SDK 6.0.1
*/
package com.mobilead.adlib.ads;
import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.Gravity;
import com.google.ads.Ad;
import com.google.ads.AdRequest.ErrorCode;
import com.mocoplex.adlib.SubAdlibAdViewCore;
public class SubAdlibAdViewAdmob extends SubAdlibAdViewCore {
protected com.google.ads.AdView ad;
protected boolean bGotAd = false;
public SubAdlibAdViewAdmob(Context context) {
this(context,null);
}
public SubAdlibAdViewAdmob(Context context, AttributeSet attrs) {
super(context, attrs);
// 여기에 ADMOB ID 를 입력하세요.
String admobID = "a15016769c3992a";
ad = new com.google.ads.AdView((Activity) this.getContext(), com.google.ads.AdSize.BANNER, admobID);
// 광고 뷰의 위치 속성을 제어할 수 있습니다.
this.setGravity(Gravity.CENTER);
ad.setAdListener( new com.google.ads.AdListener() {
@Override
public void onDismissScreen(Ad arg0) {
}
@Override
public void onFailedToReceiveAd(Ad arg0, ErrorCode arg1) {
if(!bGotAd)
failed();
}
@Override
public void onLeaveApplication(Ad arg0) {
}
@Override
public void onPresentScreen(Ad arg0) {
}
@Override
public void onReceiveAd(Ad arg0) {
bGotAd = true;
// 광고를 받아왔으면 이를 알려 화면에 표시합니다.
gotAd();
}
});
this.addView(ad);
}
// 스케줄러에의해 자동으로 호출됩니다.
// 실제로 광고를 보여주기 위하여 요청합니다.
public void query()
{
ad.loadAd(request);
if(bGotAd)
gotAd();
}
private com.google.ads.AdRequest request = new com.google.ads.AdRequest();
public void onDestroy()
{
if(ad != null)
{
ad.destroy();
ad = null;
}
super.onDestroy();
}
public void clearAdView()
{
if(ad != null)
{
ad.stopLoading();
}
super.clearAdView();
}
public void onResume()
{
if(ad != null)
ad.loadAd(request);
super.onResume();
}
public void onPause()
{
if(ad != null)
ad.stopLoading();
super.onPause();
}
}
|
[
"[email protected]"
] | |
2538ae52c4428d6687338da9d1a74fd369462528
|
3fa209ae326ab46f6e5b9a5b96418430c045eea4
|
/core/src/main/java/io/undertow/predicate/Predicates.java
|
714853ae63c652d7cadf689e85ce963beb31edb5
|
[
"Apache-2.0"
] |
permissive
|
hongjiang/undertow
|
f74f9ac827ff42fa5692789fb2a2b60c8222133f
|
7d8aa461aedccfad5d07bf7fd398afe96127430f
|
refs/heads/master
| 2020-12-07T13:36:52.152666
| 2013-10-22T14:51:04
| 2013-10-22T14:51:04
| 13,830,431
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,606
|
java
|
package io.undertow.predicate;
import io.undertow.attribute.ExchangeAttribute;
import io.undertow.attribute.ExchangeAttributes;
/**
* @author Stuart Douglas
*/
public class Predicates {
/**
* Creates a predicate that returns true if an only if the given predicates all
* return true.
*/
public static Predicate and(final Predicate... predicates) {
return new AndPredicate(predicates);
}
/**
* Creates a predicate that returns true if any of the given predicates
* return true.
*/
public static Predicate or(final Predicate... predicates) {
return new OrPredicate(predicates);
}
/**
* Creates a predicate that returns true if the given predicate returns
* false
*/
public static Predicate not(final Predicate predicate) {
return new NotPredicate(predicate);
}
/**
* creates a predicate that returns true if the given path matches exactly
*/
public static Predicate path(final String path) {
return new PathMatchPredicate(path);
}
/**
* creates a predicate that returns true if any of the given paths match exactly
*/
public static Predicate paths(final String... paths) {
final PathMatchPredicate[] predicates = new PathMatchPredicate[paths.length];
for (int i = 0; i < paths.length; ++i) {
predicates[i] = new PathMatchPredicate(paths[i]);
}
return or(predicates);
}
/**
* creates a predicate that returns true if the request path ends with the provided suffix
*/
public static Predicate suffix(final String path) {
return new PathSuffixPredicate(path);
}
/**
* creates a predicate that returns true if the request path ends with any of the provided suffixs
*/
public static Predicate suffixs(final String... paths) {
final PathSuffixPredicate[] predicates = new PathSuffixPredicate[paths.length];
for (int i = 0; i < paths.length; ++i) {
predicates[i] = new PathSuffixPredicate(paths[i]);
}
return or(predicates);
}
/**
* creates a predicate that returns true if the given relative path starts with the provided prefix
*/
public static Predicate prefix(final String path) {
return new PathPrefixPredicate(path);
}
/**
* creates a predicate that returns true if the relative request path matches any of the provided prefixes
*/
public static Predicate prefixs(final String... paths) {
final PathPrefixPredicate[] predicates = new PathPrefixPredicate[paths.length];
for (int i = 0; i < paths.length; ++i) {
predicates[i] = new PathPrefixPredicate(paths[i]);
}
return or(predicates);
}
/**
* Predicate that returns true if the Content-Size of a request is above a
* given value.
*
* @author Stuart Douglas
*/
public static Predicate maxContentSize(final long size) {
return new MaxContentSizePredicate(size);
}
/**
* Predicate that returns true if the Content-Size of a request is below a
* given value.
*/
public static Predicate minContentSize(final long size) {
return new MinContentSizePredicate(size);
}
/**
* predicate that always returns true
*/
public static Predicate truePredicate() {
return TruePredicate.instance();
}
/**
* predicate that always returns false
*/
public static Predicate falsePredicate() {
return FalsePredicate.instance();
}
/**
* Return a predicate that will return true if the given attribute is not null and not empty
*
* @param attribute The attribute to check
*/
public static Predicate exists(final ExchangeAttribute attribute) {
return new ExistsPredicate(attribute);
}
/**
* Returns true if the given attribute is present and contains one of the provided value
* @param attribute The exchange attribute
* @param values The values to check for
*/
public static Predicate contains(final ExchangeAttribute attribute, final String ... values) {
return new ContainsPredicate(attribute, values);
}
/**
* Creates a predicate that matches the given attribute against a regex. A full match is not required
* @param attribute The attribute
* @param pattern The pattern
*/
public static Predicate regex(final ExchangeAttribute attribute, final String pattern) {
return new RegularExpressionPredicate(pattern, attribute);
}
/**
* Creates a predicate that matches the given attribute against a regex.
* @param requireFullMatch If a full match is required
* @param attribute The attribute
* @param pattern The pattern
*/
public static Predicate regex(final ExchangeAttribute attribute, final String pattern, boolean requireFullMatch) {
return new RegularExpressionPredicate(pattern, attribute, requireFullMatch);
}
/**
* Creates a predicate that matches the given attribute against a regex.
* @param requireFullMatch If a full match is required
* @param attribute The attribute
* @param pattern The pattern
*/
public static Predicate regex(final String attribute, final String pattern, final ClassLoader classLoader, final boolean requireFullMatch) {
return new RegularExpressionPredicate(pattern, ExchangeAttributes.parser(classLoader).parse(attribute), requireFullMatch);
}
private Predicates() {
}
}
|
[
"[email protected]"
] | |
cf3ffb05a21781291c8f31162d4a7c18e75059a0
|
e89dc01c95b8b45404f971517c2789fd21657749
|
/src/main/java/com/alipay/api/domain/AntMerchantExpandFrontcategorySecurityModifyModel.java
|
c5107ac5215365ec90bd832ff8cc7c75161c6183
|
[
"Apache-2.0"
] |
permissive
|
guoweiecust/alipay-sdk-java-all
|
3370466eec70c5422c8916c62a99b1e8f37a3f46
|
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
|
refs/heads/master
| 2023-05-05T07:06:47.823723
| 2021-05-25T15:26:21
| 2021-05-25T15:26:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,628
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 前台类目更新
*
* @author auto create
* @since 1.0, 2021-01-15 11:35:37
*/
public class AntMerchantExpandFrontcategorySecurityModifyModel extends AlipayObject {
private static final long serialVersionUID = 6134622146626457465L;
/**
* 前台类目描述
*/
@ApiField("description")
private String description;
/**
* 前台类目ID
*/
@ApiField("front_category_id")
private String frontCategoryId;
/**
* 素材列表(会和前台类目已存在素材做差异化比较后做增删改操作)
*/
@ApiListField("material_list")
@ApiField("material_modify_info")
private List<MaterialModifyInfo> materialList;
/**
* 前台类目名称
*/
@ApiField("name")
private String name;
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public String getFrontCategoryId() {
return this.frontCategoryId;
}
public void setFrontCategoryId(String frontCategoryId) {
this.frontCategoryId = frontCategoryId;
}
public List<MaterialModifyInfo> getMaterialList() {
return this.materialList;
}
public void setMaterialList(List<MaterialModifyInfo> materialList) {
this.materialList = materialList;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"[email protected]"
] | |
a83d9f770e53234adff457709e3e5bdb3bbce509
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/mvvmlist/a/d.java
|
a6362acba0930b9f5b3d53b78b4d4bc936f18614
|
[] |
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,149
|
java
|
package com.tencent.mm.plugin.mvvmlist.a;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.ArrayList;
import kotlin.Metadata;
@Metadata(d1={""}, d2={"Lcom/tencent/mm/plugin/mvvmlist/datasource/DataResponse;", "T", "", "request", "Lcom/tencent/mm/plugin/mvvmlist/datasource/DataRequest;", "(Lcom/tencent/mm/plugin/mvvmlist/datasource/DataRequest;)V", "continueFlag", "", "getContinueFlag", "()Z", "setContinueFlag", "(Z)V", "dataList", "Ljava/util/ArrayList;", "Lkotlin/collections/ArrayList;", "getDataList", "()Ljava/util/ArrayList;", "getRequest", "()Lcom/tencent/mm/plugin/mvvmlist/datasource/DataRequest;", "plugin-mvvmlist_release"}, k=1, mv={1, 5, 1}, xi=48)
public final class d<T>
{
public boolean ABD;
private final c<T> DHT;
public final ArrayList<T> pUj;
public d(c<T> paramc)
{
AppMethodBeat.i(278742);
this.DHT = paramc;
this.pUj = new ArrayList();
AppMethodBeat.o(278742);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes3.jar
* Qualified Name: com.tencent.mm.plugin.mvvmlist.a.d
* JD-Core Version: 0.7.0.1
*/
|
[
"[email protected]"
] | |
92293ba10df5224ae53b47d1ee17eacd1f231edb
|
72c02268078a70973d3f92aee657623b6c2e0c6f
|
/micro-service-server-reactive/src/main/java/edu/ustc/server/domain/User.java
|
43bb478e7f3a77b8f0c06da12eefeb69b4517b5a
|
[
"MIT"
] |
permissive
|
colddew/micro-service
|
f4a18c43366bf74b0d5dfffb4f71c6b51ecd36a9
|
a1fe10037196f1d42f0e75722357cb3c6449e46c
|
refs/heads/master
| 2023-05-27T05:04:31.564412
| 2021-09-13T16:07:09
| 2021-09-13T16:07:09
| 40,712,527
| 27
| 11
|
MIT
| 2023-05-09T18:07:28
| 2015-08-14T11:51:12
|
Java
|
UTF-8
|
Java
| false
| false
| 398
|
java
|
package edu.ustc.server.domain;
/**
* Created by colddew on 2019/5/7.
*/
public class User {
private Integer id;
private String name;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"[email protected]"
] | |
42b3aceabe609730dc1a87c954dd93db71246635
|
3e24cc42539db6cfaa51586c55854e0bf14a4a65
|
/src/org/jonix/codelist/PriceCodeTypes.java
|
6a94cd0ce58620387745d5e8ddb98fddfec712bf
|
[] |
no_license
|
MiladRamsys/jonix
|
08dc77edff0f0addc49a5d20f45534c818b3a0e2
|
fc493bb2e354686488ad63c2c051e73039c468a7
|
refs/heads/master
| 2021-01-10T21:23:41.811111
| 2013-04-04T14:39:26
| 2013-04-04T14:39:26
| 32,104,199
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 859
|
java
|
package org.jonix.codelist;
/**
* Enum that corresponds to Onix's CodeList 179
*
* @author Zach Melamed
*
*/
public enum PriceCodeTypes
{
/**
* A publisher or retailer’s proprietary code list which identifies particular codes with particular price points, price tiers or bands.
*/
Proprietary("01"),
/**
* Price Code scheme for Finnish Pocket Books (Pokkareiden hintaryhmä). Price codes expressed as letters A–J in <PriceCode>.
*/
Finnish_Pocket_Book_price_code("02");
public final String code;
private PriceCodeTypes(String code)
{
this.code = code;
}
private static PriceCodeTypes[] values = PriceCodeTypes.values();
public static PriceCodeTypes fromCode(String code)
{
if (code != null && !code.isEmpty())
for (PriceCodeTypes item : values)
if (item.code.equals(code))
return item;
return null;
}
}
|
[
"[email protected]@d7478ce8-731c-9f3f-b499-ac6574b89192"
] |
[email protected]@d7478ce8-731c-9f3f-b499-ac6574b89192
|
54e69ae95a9a7d60b98838859f0b7e5721bd1c83
|
627dafa165ee4420680b4144c849e141596ae0b0
|
/wecardio/wecardio/src/main/java/com/borsam/plugin/file/FilePlugin.java
|
f2128a364c4c5e4f492d02db8b581f46d3968c0c
|
[] |
no_license
|
tan-tian/wecardio
|
97339383a00ecd090dd952ea3c4c3f32dac8a6f2
|
5e291d19bce2d4cebd43040e4195a26d18d947c3
|
refs/heads/master
| 2020-04-03T01:01:57.429064
| 2018-10-25T15:26:50
| 2018-10-25T15:26:50
| 154,917,227
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,878
|
java
|
package com.borsam.plugin.file;
import com.borsam.plugin.StoragePlugin;
import com.borsam.pojo.file.FileInfo;
import com.hiteam.common.util.ConfigUtils;
import org.apache.commons.io.FileUtils;
import org.springframework.stereotype.Component;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* Plugin - 本地存储
* Created by tantian on 2015/6/30.
*/
@Component("filePlugin")
public class FilePlugin extends StoragePlugin {
@Override
public boolean getIsEnabled() {
return Boolean.valueOf(ConfigUtils.config.getProperty("isFilePluginEnable"));
}
@Override
public void upload(String path, File file, String contentType) {
File destFile = new File(ConfigUtils.config.getProperty("uploadPath"), path);
try {
FileUtils.moveFile(file, destFile);
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public String getUrl(String path) {
return path;
}
@Override
public List<FileInfo> browser(String path) {
List<FileInfo> fileInfos = new ArrayList<FileInfo>();
File directory = new File(ConfigUtils.config.getProperty("uploadPath"), path);
if (directory.exists() && directory.isDirectory()) {
for (File file : directory.listFiles()) {
FileInfo fileInfo = new FileInfo();
fileInfo.setName(file.getName());
fileInfo.setUrl(ConfigUtils.config.getProperty("siteUrl") + "/file?path=" + path + file.getName());
fileInfo.setIsDirectory(file.isDirectory());
fileInfo.setSize(file.length());
fileInfo.setLastModified(new Date(file.lastModified()));
fileInfos.add(fileInfo);
}
}
return fileInfos;
}
}
|
[
"[email protected]"
] | |
3898aa020387daad70603b245b023f5f576b8cf5
|
a697c984c33afa66ef7a9a5c61f03de59ce63f36
|
/security-app/src/main/java/lab/zlren/security/app/SpringSocialConfigurerPostProcessor.java
|
b5ae7ddeb708b5958a5e59825cc3129fc124c030
|
[] |
no_license
|
zlren/SpringSecurity
|
a4b5b3cd384bc11a9b165b531ec17cbb70207d73
|
f2c5e0b506f2c99979ba3ff1a2cb3508fe561d37
|
refs/heads/master
| 2021-07-21T12:21:20.056112
| 2017-10-30T14:42:35
| 2017-10-30T14:42:35
| 106,522,942
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,295
|
java
|
package lab.zlren.security.app;
import lab.zlren.security.core.social.qq.MySpringSocialConfigurer;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;
/**
* 在app环境下,社交账号首次登录以后不要跳转到注册页面
* 在Spring容器里面在所有的bean初始化之前和之后调用
*
* @author zlren
* @date 17/10/25
*/
@Component
public class SpringSocialConfigurerPostProcessor implements BeanPostProcessor {
@Override
public Object postProcessBeforeInitialization(Object o, String s) throws BeansException {
return o;
}
/**
* 修改配置
*
* @param bean
* @param beanName
* @return
* @throws BeansException
*/
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (StringUtils.equals("mySpringSocialConfig", beanName)) {
MySpringSocialConfigurer mySpringSocialConfigurer = (MySpringSocialConfigurer) bean;
mySpringSocialConfigurer.signupUrl("/social/signup");
return mySpringSocialConfigurer;
}
return bean;
}
}
|
[
"[email protected]"
] | |
be665eaf82328edc7b7a12034112c24d9b0faa94
|
c31b65267327c64f2ef79d015908c8224dd566df
|
/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/adaptors/iterators/DelegatedVariantDBIterator.java
|
a593a1c2a8c869e7a316f0163da067ddae355c50
|
[
"Apache-2.0"
] |
permissive
|
sconeill/opencga
|
5676a4a415ff6fd4383a2ad8800264d26598a662
|
dad91554c874e14023d7038644d1257d8d5c04f4
|
refs/heads/master
| 2020-06-26T12:43:00.547022
| 2019-04-04T14:49:23
| 2019-04-04T14:49:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,265
|
java
|
package org.opencb.opencga.storage.core.variant.adaptors.iterators;
import org.opencb.biodata.models.variant.Variant;
import org.opencb.commons.datastore.core.QueryResult;
import org.opencb.opencga.core.results.VariantQueryResult;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
/**
* Created by jacobo on 28/03/19.
*/
public class DelegatedVariantDBIterator extends VariantDBIterator {
private final VariantDBIterator delegated;
public DelegatedVariantDBIterator(VariantDBIterator delegated) {
this.delegated = delegated;
}
@Override
public VariantDBIterator addCloseable(AutoCloseable closeable) {
return delegated.addCloseable(closeable);
}
@Override
public long getTimeConverting() {
return delegated.getTimeConverting();
}
@Override
public long getTimeFetching() {
return delegated.getTimeFetching();
}
@Override
public int getCount() {
return delegated.getCount();
}
@Override
public boolean hasNext() {
return delegated.hasNext();
}
@Override
public Variant next() {
return delegated.next();
}
@Override
public void forEachRemaining(Consumer<? super Variant> action) {
delegated.forEachRemaining(action);
}
@Override
public QueryResult<Variant> toQueryResult() {
return delegated.toQueryResult();
}
@Override
public VariantQueryResult<Variant> toQueryResult(Map<String, List<String>> samples) {
return delegated.toQueryResult(samples);
}
@Override
protected <R, E extends Exception> R convert(TimeFunction<R, E> converter) throws E {
return delegated.convert(converter);
}
@Override
protected <R, E extends Exception> R fetch(TimeFunction<R, E> fetcher) throws E {
return delegated.fetch(fetcher);
}
@Override
public void close() throws Exception {
delegated.close();
}
@Override
public int hashCode() {
return delegated.hashCode();
}
@Override
public boolean equals(Object obj) {
return delegated.equals(obj);
}
@Override
public String toString() {
return delegated.toString();
}
}
|
[
"[email protected]"
] | |
74e6a47673ce08f6c272a66f52eb602228611466
|
464f36e710b08f67dcf833139c3c233b7eeb7837
|
/libCompiler/src/test/java/com/duy/pascal/lexer/NumberTest.java
|
2c6e8fc9e0bc6d4e30e39e8cad4cca45e4102bb0
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
Traider09/pascalnide
|
887fe92b58281dbfedd623ac72b6252657998baa
|
fbd0407392de7bbc7856b37f619b24c5d22bfe24
|
refs/heads/master
| 2020-12-02T16:41:46.153868
| 2017-06-29T07:42:46
| 2017-06-29T07:42:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 884
|
java
|
/*
* Copyright (c) 2017 Tran Le Duy
*
* 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.duy.pascal.lexer;
/**
* Created by Duy on 12-Jun-17.
*/
public class NumberTest extends BaseLexerTest {
@Override
public String getDirTest() {
return "test_lexer";
}
public void test() {
assertTrue(parse("parse_number.pas"));
}
}
|
[
"[email protected]"
] | |
cd3728dc88a3f65e7105979ec3be5686d73fbc43
|
9edae0eb8b4e8dc522aea0c0964943541581f4a2
|
/core/src/lando/systems/prototype/accessors/Vector2Accessor.java
|
9c235da50e5fc9d3c22d34554a6c446b7918d50f
|
[] |
no_license
|
bploeckelman/FlingerPrototype
|
51ad725c9d0a80f6701107b63a8e14494fef8106
|
6c1f0b9eb8037f9cff4ced44a3e46b5c3de2f47a
|
refs/heads/master
| 2020-06-05T23:20:14.983582
| 2015-01-18T00:12:08
| 2015-01-18T00:12:08
| 29,379,045
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,200
|
java
|
package lando.systems.prototype.accessors;
import aurelienribon.tweenengine.TweenAccessor;
import com.badlogic.gdx.math.Vector2;
/**
* Brian Ploeckelman created on 7/21/2014.
*/
public class Vector2Accessor implements TweenAccessor<Vector2> {
public static final int X = 1;
public static final int Y = 2;
public static final int XY = 3;
@Override
public int getValues(Vector2 target, int tweenType, float[] returnValues) {
switch (tweenType) {
case X: returnValues[0] = target.x; return 1;
case Y: returnValues[0] = target.y; return 1;
case XY:
returnValues[0] = target.x;
returnValues[1] = target.y;
return 2;
default: assert false; return -1;
}
}
@Override
public void setValues(Vector2 target, int tweenType, float[] newValues) {
switch (tweenType) {
case X: target.x = newValues[0]; break;
case Y: target.y = newValues[0]; break;
case XY:
target.x = newValues[0];
target.y = newValues[1];
break;
default: assert false;
}
}
}
|
[
"[email protected]"
] | |
12a830609c32a44ec06da2ed66817747aa52d08f
|
f4fd782488b9cf6d99d4375d5718aead62b63c69
|
/com/planet_ink/coffee_mud/Abilities/Properties/Prop_LanguageSpeaker.java
|
73d8e77eb0a9a3292578e583f4add029c5a1718c
|
[
"Apache-2.0"
] |
permissive
|
sfunk1x/CoffeeMud
|
89a8ca1267ecb0c2ca48280e3b3930ee1484c93e
|
0ac2a21c16dfe3e1637627cb6373d34615afe109
|
refs/heads/master
| 2021-01-18T11:20:53.213200
| 2015-09-17T19:16:30
| 2015-09-17T19:16:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,781
|
java
|
package com.planet_ink.coffee_mud.Abilities.Properties;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.MaskingLibrary;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2010-2015 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class Prop_LanguageSpeaker extends Property
{
@Override public String ID() { return "Prop_LanguageSpeaker"; }
@Override public String name(){ return "Forces language speaking";}
@Override protected int canAffectCode(){return Ability.CAN_ROOMS|Ability.CAN_AREAS|Ability.CAN_MOBS|Ability.CAN_ITEMS;}
protected boolean doPlayers=false;
protected boolean noMobs=false;
protected boolean homeOnly=false;
protected MaskingLibrary.CompiledZapperMask mobMask = null;
protected Language lang = null;
protected String langStr = "";
private final Room homeRoom = null;
private final Area homeArea = null;
private CMClass.CMObjectType affectedType = CMClass.CMObjectType.AREA;
@Override
public void setMiscText(String txt)
{
doPlayers=CMParms.getParmBool(txt,"PLAYERS",false);
noMobs=CMParms.getParmBool(txt,"NOMOBS",false);
homeOnly=CMParms.getParmBool(txt,"HOMEONLY",false);
langStr=CMParms.getParmStr(txt,"LANGUAGE","").trim();
final int x=txt.indexOf(';');
mobMask=null;
if((x>=0)&&(txt.substring(x+1).trim().length()>0))
mobMask=CMLib.masking().getPreCompiledMask(txt.substring(x+1).trim());
lang=null;
super.setMiscText(txt);
}
@Override
public void setAffectedOne(Physical P)
{
affectedType = CMClass.getType(P);
super.setAffectedOne(P);
}
public Language getLanguage()
{
if((lang == null)&&(langStr.trim().length()>0))
{
lang=(Language)CMClass.getAbility(langStr.trim());
langStr="";
}
return lang;
}
@Override
public String accountForYourself()
{
return "Forces speaking the language: "+((lang!=null)?lang.name():"?");
}
public void startSpeaking(MOB mob)
{
final Room mobHomeRoom=mob.getStartRoom();
final Area mobHomeArea=((mobHomeRoom==null)?null:mobHomeRoom.getArea());
if(((lang!=null)||(langStr.length()>0))
&&(doPlayers || mob.isMonster())
&&((!noMobs) || (!mob.isMonster()))
&&((!homeOnly) || (homeRoom==null) || (mobHomeRoom == homeRoom))
&&((!homeOnly) || (homeArea==null) || (mobHomeArea == homeArea))
&&(mob.fetchEffect(langStr)==null)
&&((mobMask==null) || CMLib.masking().maskCheck(mobMask,mob,true)))
{
if(lang == null)
lang = getLanguage();
if(lang == null)
{
lang=(Language)CMClass.getAbility("Common");
Log.errOut("Prop_LanguageSpeaker","Unknown language "+langStr);
}
if(lang != null)
{
switch(affectedType)
{
case AREA:
lang=(Language)lang.copyOf();
break;
case LOCALE:
lang=(Language)lang.copyOf();
break;
case MOB:
break;
case EXIT:
lang=(Language)lang.copyOf();
break;
default: // item
break;
}
mob.addNonUninvokableEffect(lang);
lang.setSavable(false);
lang.invoke(mob,mob,false,0);
}
}
}
@Override
public void executeMsg(final Environmental myHost, final CMMsg msg)
{
if(affected!=null)
switch(affectedType)
{
case AREA:
{
if(msg.targetMinor()==CMMsg.TYP_ENTER)
startSpeaking(msg.source());
else
if(msg.sourceMinor()==CMMsg.TYP_LIFE)
startSpeaking(msg.source());
break;
}
case LOCALE:
{
if((msg.target() == affected)
&&(msg.targetMinor()==CMMsg.TYP_ENTER))
startSpeaking(msg.source());
else
if(msg.sourceMinor()==CMMsg.TYP_LIFE)
startSpeaking(msg.source());
break;
}
case MOB:
{
if(lang==null)
startSpeaking((MOB)affected);
break;
}
case EXIT:
{
if((msg.targetMinor()==CMMsg.TYP_ENTER)
&&(msg.tool()==affected))
startSpeaking(msg.source());
break;
}
default: // item
{
if((msg.target() == affected)
&&(msg.targetMinor()==CMMsg.TYP_GET)
&&((lang==null)||(lang.affecting()!=msg.source())))
{
if((lang!=null)&&(lang.affecting()!=null))
lang.affecting().delEffect(lang);
startSpeaking(msg.source());
}
else
if((msg.target() == affected)
&&(msg.targetMinor()==CMMsg.TYP_DROP)
&&(lang!=null)
&&(lang.affecting()!=null))
{
lang.affecting().delEffect(lang);
lang.setAffectedOne(null);
}
break;
}
}
super.executeMsg(myHost,msg);
}
}
|
[
"[email protected]"
] | |
ea4253133f46cf215787f8891fdd38b915188030
|
0e06e096a9f95ab094b8078ea2cd310759af008b
|
/sources/rx/observers/Observers.java
|
6444963cd8878fe16829fe2e07dad33059cb7769
|
[] |
no_license
|
Manifold0/adcom_decompile
|
4bc2907a057c73703cf141dc0749ed4c014ebe55
|
fce3d59b59480abe91f90ba05b0df4eaadd849f7
|
refs/heads/master
| 2020-05-21T02:01:59.787840
| 2019-05-10T00:36:27
| 2019-05-10T00:36:27
| 185,856,424
| 1
| 2
| null | 2019-05-10T00:36:28
| 2019-05-09T19:04:28
|
Java
|
UTF-8
|
Java
| false
| false
| 2,943
|
java
|
package rx.observers;
import rx.Observer;
import rx.exceptions.OnErrorNotImplementedException;
import rx.functions.Action0;
import rx.functions.Action1;
public final class Observers {
private static final Observer<Object> EMPTY = new C33261();
/* renamed from: rx.observers.Observers$1 */
static class C33261 implements Observer<Object> {
C33261() {
}
public final void onCompleted() {
}
public final void onError(Throwable e) {
throw new OnErrorNotImplementedException(e);
}
public final void onNext(Object args) {
}
}
private Observers() {
throw new IllegalStateException("No instances!");
}
public static <T> Observer<T> empty() {
return EMPTY;
}
public static <T> Observer<T> create(final Action1<? super T> onNext) {
if (onNext != null) {
return new Observer<T>() {
public final void onCompleted() {
}
public final void onError(Throwable e) {
throw new OnErrorNotImplementedException(e);
}
public final void onNext(T args) {
onNext.call(args);
}
};
}
throw new IllegalArgumentException("onNext can not be null");
}
public static <T> Observer<T> create(final Action1<? super T> onNext, final Action1<Throwable> onError) {
if (onNext == null) {
throw new IllegalArgumentException("onNext can not be null");
} else if (onError != null) {
return new Observer<T>() {
public final void onCompleted() {
}
public final void onError(Throwable e) {
onError.call(e);
}
public final void onNext(T args) {
onNext.call(args);
}
};
} else {
throw new IllegalArgumentException("onError can not be null");
}
}
public static <T> Observer<T> create(final Action1<? super T> onNext, final Action1<Throwable> onError, final Action0 onComplete) {
if (onNext == null) {
throw new IllegalArgumentException("onNext can not be null");
} else if (onError == null) {
throw new IllegalArgumentException("onError can not be null");
} else if (onComplete != null) {
return new Observer<T>() {
public final void onCompleted() {
onComplete.call();
}
public final void onError(Throwable e) {
onError.call(e);
}
public final void onNext(T args) {
onNext.call(args);
}
};
} else {
throw new IllegalArgumentException("onComplete can not be null");
}
}
}
|
[
"[email protected]"
] | |
952cfc9b301f132dd5db19f231868fd1ce402f86
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/webview/e/e.java
|
02e153f07b7878b9e5bf2c13e07b8d38fe2aaf41
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,928
|
java
|
package com.tencent.mm.plugin.webview.e;
import android.content.Context;
import android.content.SharedPreferences.Editor;
import android.net.Uri;
import android.text.TextUtils;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.List;
import java.util.regex.Pattern;
public final class e {
public static void h(String str, Context context) {
AppMethodBeat.i(10146);
Editor edit = context.getSharedPreferences("webview_url_prefs", 4).edit();
edit.putString("url", str);
edit.apply();
AppMethodBeat.o(10146);
}
public static boolean agF(String str) {
AppMethodBeat.i(10147);
if (TextUtils.isEmpty(str)) {
AppMethodBeat.o(10147);
return false;
}
try {
List pathSegments = Uri.parse(str).getPathSegments();
if (pathSegments == null || pathSegments.size() <= 0) {
AppMethodBeat.o(10147);
return false;
}
String str2 = (String) pathSegments.get(pathSegments.size() - 1);
if (str2 != null && str2.toLowerCase().trim().endsWith(".apk")) {
AppMethodBeat.o(10147);
return true;
}
AppMethodBeat.o(10147);
return false;
} catch (Exception e) {
}
}
public static boolean agG(String str) {
AppMethodBeat.i(10148);
if (Pattern.compile("^(http|https)://mp.weixin.qq.com/(s|mp/author|mp/appmsg/show)", 2).matcher(str).find()) {
AppMethodBeat.o(10148);
return true;
} else if (Pattern.compile("^(http|https)://(sh.|hk.|sz.)?open.weixin.qq.com/connect/(confirm|oauth2/(authorize|explorer_authorize))", 2).matcher(str).find()) {
AppMethodBeat.o(10148);
return true;
} else {
AppMethodBeat.o(10148);
return false;
}
}
}
|
[
"[email protected]"
] | |
635814ba82bdc7881b70ce34cce05a9dee6a08b2
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-481-3-2-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/transformation/macro/MacroTransformation_ESTest_scaffolding.java
|
ca8b82caa7d900a2dfe1af57ac4d1638c02399dc
|
[] |
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
| 473
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Apr 02 09:27:59 UTC 2020
*/
package org.xwiki.rendering.internal.transformation.macro;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class MacroTransformation_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"[email protected]"
] | |
ba26146161181b3975981a3028b02f011121f73e
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project54/src/test/java/org/gradle/test/performance54_3/Test54_230.java
|
f1eeafc1eb25944a58d45e52d57ae55bbc0b4397
|
[] |
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.performance54_3;
import static org.junit.Assert.*;
public class Test54_230 {
private final Production54_230 production = new Production54_230("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"[email protected]"
] | |
73644e2524b172b52188ba0886a787a7b6e52c45
|
b71673707e418dcbf869d0e53ef76f7ec7651ce1
|
/entity-view/testsuite/src/test/java/com/blazebit/persistence/view/testsuite/builder/EntityViewBuilderTest.java
|
fc53c85e928ebce03272c615709035e6cee1f341
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
Mobe91/blaze-persistence
|
bf92028028b241eb6a0a5f13dec323566f5ec9f8
|
8a4c867f07d6d31404d35e4db672b481fc8a2d59
|
refs/heads/master
| 2023-08-17T05:42:02.526696
| 2020-11-28T20:13:04
| 2020-11-28T20:13:04
| 83,560,399
| 0
| 0
|
NOASSERTION
| 2020-02-05T21:56:44
| 2017-03-01T13:59:01
|
Java
|
UTF-8
|
Java
| false
| false
| 3,938
|
java
|
/*
* Copyright 2014 - 2020 Blazebit.
*
* 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.blazebit.persistence.view.testsuite.builder;
import com.blazebit.persistence.view.EntityViewBuilder;
import com.blazebit.persistence.view.EntityViewManager;
import com.blazebit.persistence.view.EntityViews;
import com.blazebit.persistence.view.spi.EntityViewConfiguration;
import com.blazebit.persistence.view.testsuite.AbstractEntityViewTest;
import com.blazebit.persistence.view.testsuite.builder.model.DocumentBuilderView;
import com.blazebit.persistence.view.testsuite.builder.model.PersonView;
import org.junit.Assert;
import org.junit.Test;
import java.util.Collections;
/**
*
* @author Christian Beikov
* @since 1.5.0
*/
public class EntityViewBuilderTest extends AbstractEntityViewTest {
@Test
public void testBuilder() {
Object global = new Object();
EntityViewConfiguration cfg = EntityViews.createDefaultConfiguration();
cfg.setOptionalParameter("test", global);
EntityViewManager evm = build(cfg, DocumentBuilderView.class, PersonView.class);
EntityViewBuilder<DocumentBuilderView> builder = evm.createBuilder(DocumentBuilderView.class);
DocumentBuilderView view = builder.with("id", 10L)
.with("name", "Test")
.withSingularBuilder("owner")
.with("id", 100L)
.with("name", "Owner")
.build()
.withMapBuilder("contacts", 1)
.with("id", 100L)
.with("name", "Owner")
.build()
.withListBuilder("people", 1)
.with("id", 100L)
.with("name", "Owner")
.build()
.withCollectionBuilder("peopleListBag")
.with("id", 100L)
.with("name", "Owner")
.build()
.withCollectionBuilder("partners")
.with("id", 100L)
.with("name", "Owner")
.build()
.withElement("strings", "Test")
.build();
assertView(view);
Assert.assertEquals(global, view.getTest());
Object overridden = new Object();
DocumentBuilderView view2 = evm.createBuilder(view, Collections.singletonMap("test", overridden))
.withListBuilder("people", 0)
.with("id", 100L)
.with("name", "Owner")
.build()
.build();
assertView(view2);
Assert.assertEquals(overridden, view2.getTest());
Assert.assertNull(view.getPeople().get(0));
assertOwner(view2.getPeople().get(0));
DocumentBuilderView view3 = evm.createBuilder(view).with(0, "Test").build();
Assert.assertEquals("Test", view3.getTest());
}
private void assertView(DocumentBuilderView view) {
Assert.assertEquals(10L, view.getId().longValue());
Assert.assertEquals("Test", view.getName());
assertOwner(view.getOwner());
assertOwner(view.getContacts().get(1));
assertOwner(view.getPeople().get(1));
assertOwner(view.getPeopleListBag().get(0));
assertOwner(view.getPartners().iterator().next());
Assert.assertEquals("Test", view.getStrings().iterator().next());
}
private void assertOwner(PersonView p) {
Assert.assertEquals(100L, p.getId().longValue());
Assert.assertEquals("Owner", p.getName());
}
}
|
[
"[email protected]"
] | |
e998a8de8b336b30b760ab518d8ea38698897406
|
ab9672fd9dc9e8e27489b8a9f808ebf692764e52
|
/rule/src/main/java/com/networknt/light/rule/file/UplFileRule.java
|
f382c790b8e7435cb2bd4e48f598a902a7767f06
|
[
"Apache-2.0"
] |
permissive
|
Arsalaan-Hameed/light
|
b22e2ef65881897600c9bc5ae82b16c1670b0c3f
|
bf40443e38a94206169c14d8e3db195d8ecc0a03
|
refs/heads/master
| 2021-01-07T05:17:24.806135
| 2018-09-10T13:02:34
| 2018-09-10T13:02:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 596
|
java
|
package com.networknt.light.rule.file;
import com.networknt.light.rule.Rule;
import com.networknt.light.util.ServiceLocator;
import io.undertow.server.HttpServerExchange;
import io.undertow.util.Headers;
import io.undertow.util.HttpString;
import java.io.File;
import java.util.Map;
import java.util.concurrent.ConcurrentMap;
/**
* Created by steve on 2/26/2016.
*
* AccessLevel: R [fileAdmin, admin, owner]
*
*/
public class UplFileRule extends AbstractFileRule implements Rule {
public boolean execute (Object ...objects) throws Exception {
return uplFile(objects);
}
}
|
[
"[email protected]"
] | |
787f40b31a0becade94e578ba4f12e4c1c3b3179
|
6402338098947f597731fc56058d77bf4e9229ec
|
/src/com/ery/hadoop/hq/ws/Constant.java
|
624e5b1fbe4c79e4467efc4bd2fb2153d24e30cb
|
[] |
no_license
|
hans511002/mrddx-web
|
57f582e4863899df9869ba9887b7c468edceb7cc
|
4a907fa0e0db13e7358a5b149a6b4c1058ac124c
|
refs/heads/master
| 2021-01-18T16:51:20.332247
| 2017-07-18T06:39:07
| 2017-07-18T06:39:07
| 86,774,312
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,250
|
java
|
package com.ery.hadoop.hq.ws;
import java.util.HashMap;
import java.util.Map;
public class Constant {
public static enum ERROR {
error_user(1000, "用户信息认证失败!"), error_type(1001, "参数类型错误(应该为map)!"), error_ruleId_type(1002, "查询规则id类型错误!"), error_param(1003,
"simpleMap参数错误,为空或者参数数量为0!"), error_noruleCode(1004, "请求数据中没有编码[ruleCode]!"), error_ruleCode(1005, "请求数据中规则编码[ruleCode]错误!"), error_noqryrule(
1006, "不存在请求的查询规则!"), error_noauthority(1007, "此用户对规则无访问权限!"), error_decoderule(1008, "规则解析失败!"), error_paramvalid(1009,
"参数有效性错误!"), error_noqryruleCode(1010, "请求数据中没有编码[QUERY_RULE_ID]!"), ERROR_HB_TABLE_NAME(1010, "表名称不正确!"), ERROR_DATA_SOURCE_ID(
1011, "数据源不正确!"), ERROR_QUERY_RETURN_COUNT(1012, "取值范围不正确!"), ERROR_QUERY_RULE_ERROR(1013, "规则不存在或者规则加载无效!"), ERROR_MODIFY_HB_TABLE_DATA(1020, "修改数据不能为空!"), ERROR_MODIFY_HB_TABLE_DATA_TYPE(
1021, "修改数据josn格式不正确!"), ERROR_MODIFY_HB_TABLE_DATA_FIAL(1022, "修改数据失败!"), ERROR_MODIFY_HB_TABLE_DATA_OTHER(1023,
"修改数据,其他错误!"), ERROR_ADD_HB_TABLE_DATA(1030, "新增数据不能为空!"), ERROR_ADD_HB_TABLE_DATA_TYPE(1031, "新增数据josn格式不正确!"), ERROR_ADD_HB_TABLE_DATA_FIAL(
1032, "新增数据失败!"), ERROR_ADD_HB_TABLE_DATA_OTHER(1033, "新增数据,其他错误!"), error_other(10000, "其他错误!"),error_tablename(10000, "表名错误"),
;
public int code;
public String msg;
ERROR(int code, String msg) {
this.code = code;
this.msg = msg;
}
public String toString() {
return "[" + code + "]" + msg;
}
};
// 对表参数名称
public static final String HT_NAME = "HT_NAME";
public static final String SOURCE_ID = "SOURCE_ID";
public static final String START_KEY = "START_KEY";
public static final String END_KEY = "END_KEY";
public static final String COUNT = "COUNT";
// 修改数据参数
public static final String ITEM_DATA = "ITEM_DATA";
public static final String VALUES = "VALUES";
public static final String STATUS = "STATUS";
public static final String CODE = "CODE";
// 响应参数名称
public static String RESULT_NAME = "result";
public static String VALUES_NAME = "values";
public static String ENFIELD_NAME = "enField";
public static String CHFIELD_NAME = "chField";
public static String ROWKEY_NAME = "ROWID";
public static String CURRENTCOUNT_NAME = "currentCount";
public static String RESPONSE_CODE = "code";
public static String RESPONSE_STATUS = "status";
public static final int QUERY_RETURN_DEFAULT_COUNT = 50; //
// // 查询
// public static final String ERROR_HB_TABLE_NAME = "1010";// 表名称不正确
// public static final String ERROR_DATA_SOURCE_ID = "1011";// 表名称不正确
// public static final String ERROR_QUERY_RETURN_COUNT = "1012";// 取值范围不正确
//
// // 修改
// public static final String ERROR_MODIFY_HB_TABLE_DATA = "1020";// 修改数据不能为空
// public static final String ERROR_MODIFY_HB_TABLE_DATA_TYPE = "1021";// 修改数据josn格式不正确
// public static final String ERROR_MODIFY_HB_TABLE_DATA_FIAL = "1022";// 修改数据失败
// public static final String ERROR_MODIFY_HB_TABLE_DATA_OTHER = "1023";// 修改数据,其他错误
//
// // 新增
// public static final String ERROR_ADD_HB_TABLE_DATA = "1030";// 新增数据不能为空
// public static final String ERROR_ADD_HB_TABLE_DATA_TYPE = "1031";// 新增数据josn格式不正确
// public static final String ERROR_ADD_HB_TABLE_DATA_FIAL = "1032";// 新增数据失败
// public static final String ERROR_ADD_HB_TABLE_DATA_OTHER = "1033";// 新增数据,其他错误
// // public static final String error_user = "1000";// 用户信息认证失败!
// public static final String error_type = "1001";// 参数类型错误(应该为map)
// public static final String error_ruleId_type = "1002";// 查询规则id类型错误
// public static final String error_param = "1003";// simpleMap参数错误,为空或者参数数量为0
// public static final String error_noruleCode = "1004";// 请求数据中没有编码[ruleCode]
// public static final String error_ruleCode = "1005";// 请求数据中规则编码[ruleCode]错误
// public static final String error_noauthority = "1006";// "此用户对规则无访问权限!"
// public static final String error_decoderule = "1007";// 规则解析失败
// public static final String error_paramvalid = "1008";// 参数有效性错误
// public static final String error_other = "10000";// 其他错误
public static Map<String, Object> getRequetErrorMsg(ERROR code) {
Map<String, Object> mapValue = new HashMap<String, Object>();
Map<String, Object> value = new HashMap<String, Object>();
value.put("code", code.code);
value.put("msg", code.msg);
value.put("status", "false");
mapValue.put("result", value);
return mapValue;
}
}
|
[
"[email protected]"
] | |
0d7650556664026aefdabc81f91c735239a8f764
|
fd5c245aa1aea7f3688f26f8521bbe444bf6dc4f
|
/src/com/Lbins/Mlt/library/internal/EmptyViewMethodAccessor.java
|
07a0153289542362eb6271bf9cf6c392286e997e
|
[] |
no_license
|
eryiyi/MltApp
|
525d60a4cf948df58016e74cf47dd16d9e7d128e
|
78242754f20356da82ba6a8f646cb521b7a4805c
|
refs/heads/master
| 2020-05-29T14:41:29.588736
| 2016-08-10T14:34:11
| 2016-08-10T14:34:11
| 64,711,041
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,427
|
java
|
/**
* ****************************************************************************
* Copyright 2011, 2012 Chris Banes.
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* *****************************************************************************
*/
package com.Lbins.Mlt.library.internal;
import android.view.View;
/**
* Interface that allows PullToRefreshBase to hijack the call to
* AdapterView.setEmptyView()
*
* @author chris
*/
public interface EmptyViewMethodAccessor {
/**
* Calls upto AdapterView.setEmptyView()
*
* @param emptyView - to set as Empty View
*/
public void setEmptyViewInternal(View emptyView);
/**
* Should call PullToRefreshBase.setEmptyView() which will then
* automatically call through to setEmptyViewInternal()
*
* @param emptyView - to set as Empty View
*/
public void setEmptyView(View emptyView);
}
|
[
"[email protected]"
] | |
9f8986b67c405f6f35c13f88cd2a503734cd9512
|
b7b41a2df3430f63b17e7089015f795696e918c3
|
/MicroBlog/src/com/microblog/dao/BackuppwdDao.java
|
3bc16c97cddea2d46a0fd4601ad4a5123f188412
|
[] |
no_license
|
yfm049/oldcode
|
87c3839529d2bc7d634a6fafce62e22ecdfcc4c5
|
eac280f716e798aee6b6a284c8a887fe38b3bdc0
|
refs/heads/master
| 2020-12-24T08:30:30.625579
| 2016-08-26T09:21:22
| 2016-08-26T09:21:22
| 33,308,446
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 348
|
java
|
package com.microblog.dao;
import com.microblog.dbutil.DBConn;
public class BackuppwdDao {
public void updatepwd(String newpwd3 ,String account ){
String updateSql="update user set u_pwd=? where u_account = ?";
DBConn dbconn=new DBConn();
dbconn.execOther(updateSql, new Object[]{newpwd3,account });
dbconn.closeConn();
}
}
|
[
"[email protected]"
] | |
fdd1911846dd32674914e5d47c63b0cafbb48de8
|
1f644b07da3e3f2645a4e9da221a2b1dbd093395
|
/src/lintcode/Test752.java
|
91e4761f7e8d397cd3e09184159aac5241e769c1
|
[] |
no_license
|
Xchuanshuo/AlgorithmsDemo
|
16da4a2ed16b6a3967e3e382fbf4b5d8191e5599
|
b85ecdccb61b297bc4390c977a49f94f17993ff3
|
refs/heads/master
| 2021-09-18T13:37:15.633888
| 2021-09-05T09:11:53
| 2021-09-05T09:11:53
| 144,484,561
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,227
|
java
|
package lintcode;
/**
* @author Legend
* @data by on 18-9-7.
* @description rogue-knight-sven
* idea:
* dp dp[i][j]表示有i个星球 并且金币为j时 斯温可通过传送门到达目的地的方法数
* 由于到达星球i 只能由不超过limit距离的星球来传送 所以对于每个星球i 有0..i-limit(k)
* 这些位置的星球都能 传送到星球i 而每种传送方式都需要cost[i]金币的花费 所以传送还有一个
* 前提条件就是当前金币要足够 想清楚这些的话 就可以得出状态转移方程
* dp[i][j] += dp[k][j-cost[i]] 其中j-cost[i]>=0 还有注意初始化的情况
* 就是当星球为0时需要传送的目的地就是本身 不需要传送 所以只有一种传送方式
*/
public class Test752 {
public long getNumberOfWays(int n, int m, int limit, int[] cost) {
long[][] dp = new long[n+1][m+1];
for (int j=0;j<=m;j++) dp[0][j] = 1;
for (int i=1;i<=n;i++) {
for (int j=0;j<=m;j++) {
for (int k=Math.max(0, i-limit);k<i;k++) {
dp[i][j] += j-cost[i]>=0?dp[k][j-cost[i]]:0;
}
}
}
return dp[n][m];
}
}
|
[
"[email protected]"
] | |
e9e0ab57a3a14d99b22759f00d06fe1d6078a408
|
6286216613d73af15e77a73f5c7b7aea1bda6f84
|
/TileEntities/TileEntityGasDuct.java
|
7f76795a0188c906c926435a463ee27e46e3e089
|
[] |
no_license
|
Dabblecraft2DevTeam/ReactorCraft
|
f6301180a56329bb5a0dffc848c58e80f39d0f39
|
6b31af5ee01564f312738d6c371bd38f6aebce19
|
refs/heads/master
| 2020-06-12T21:04:51.364719
| 2016-10-11T02:26:17
| 2016-10-11T02:26:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,887
|
java
|
/*******************************************************************************
* @author Reika Kalseki
*
* Copyright 2016
*
* All rights reserved.
* Distribution of the software in any form is only allowed with
* explicit, prior permission from the owner.
******************************************************************************/
package Reika.ReactorCraft.TileEntities;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import Reika.ReactorCraft.Base.TileEntityReactorPiping;
import Reika.ReactorCraft.Registry.ReactorTiles;
public class TileEntityGasDuct extends TileEntityReactorPiping {
@Override
public int getIndex() {
return ReactorTiles.GASPIPE.ordinal();
}
@Override
public IIcon getBlockIcon() {
return Blocks.hardened_clay.getIcon(1, 0);
}
public boolean isConnectedToNonSelf(ForgeDirection dir) {
if (!this.isConnectionValidForSide(dir))
return false;
if (dir.offsetX == 0 && MinecraftForgeClient.getRenderPass() != 1)
dir = dir.getOpposite();
int dx = xCoord+dir.offsetX;
int dy = yCoord+dir.offsetY;
int dz = zCoord+dir.offsetZ;
World world = worldObj;
Block id = world.getBlock(dx, dy, dz);
int meta = world.getBlockMetadata(dx, dy, dz);
return id != this.getMachine().getBlock() || meta != this.getMachine().getBlockMetadata();
}
@Override
public boolean isValidFluid(Fluid f) {
return f.isGaseous();
}
@Override
protected void onIntake(TileEntity te) {
}
@Override
public Block getPipeBlockType() {
return Blocks.hardened_clay;
}
@Override
public IIcon getGlassIcon() {
return Blocks.glass.getIcon(0, 0);
}
}
|
[
"[email protected]"
] | |
7f4ef538794e710175b7af34b82316e127b80b58
|
1a1c297118b653f98eef9d8f449f3831d03adefc
|
/src/main/java/com/izeye/playground/support/unit/domain/Unit.java
|
fc60b576da6e273c84923847bc82b023c2d12a59
|
[] |
no_license
|
izeye/playground
|
c2f97d66ad12f74a3060c1c6f4b6487bc23efdab
|
12d199446876020f34344756ad6bb94cac8e6dd6
|
refs/heads/master
| 2020-06-04T19:44:35.218383
| 2013-12-07T16:04:18
| 2013-12-07T16:04:18
| 11,101,662
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 226
|
java
|
package com.izeye.playground.support.unit.domain;
import java.math.BigDecimal;
public interface Unit<T extends Unit<?>> {
String getName();
String getKey();
BigDecimal convert(BigDecimal sourceValue, T sourceUnit);
}
|
[
"[email protected]"
] | |
a92d363ccbce56702231e4c09e51cb0179ce76bb
|
1286b5c1e30c049e3bccff44c6bcd3356e562a7d
|
/src/main/java/com/bms/rms/model/po/TMenuCustom.java
|
c9c2ee3db479312fe3ac0f6867031571ab9ead8c
|
[] |
no_license
|
Togal/zh_rms
|
a0cd5cc26eec39fc4cb8e3a4a41e1ea33cc4ae03
|
52006522785fb43039460662bb4d01004b1b09c3
|
refs/heads/master
| 2021-01-13T07:57:43.066306
| 2016-11-09T16:04:05
| 2016-11-09T16:04:05
| 68,834,305
| 1
| 0
| null | 2016-11-09T16:04:06
| 2016-09-21T16:04:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,062
|
java
|
package com.bms.rms.model.po;
import java.util.List;
import com.bms.data.type.conversion.date.DateDataTypeConversion;
import com.bms.data.type.conversion.date.vo.DATEFORMAT;
/**
*
* Title:TMenuCustom
* Description:菜单扩展类
* @author zwb
* @date 2016年9月29日 下午2:12:32
*
*/
public class TMenuCustom extends TMenu {
private List<TMenuCustom> slaveChildrenMenus;//从菜单的子菜单
private TPrivilege privilege;//权限
/**
* 获取添加时间戳转日期结果
* @param date
* @return
*/
public String getAddTimeToDate(){
return DateDataTypeConversion.timeMillisToDate(getAddtime(), true, DATEFORMAT.YYYY_MM_DD_HH_MM);
}
public List<TMenuCustom> getSlaveChildrenMenus() {
return slaveChildrenMenus;
}
public void setSlaveChildrenMenus(List<TMenuCustom> slaveChildrenMenus) {
this.slaveChildrenMenus = slaveChildrenMenus;
}
public TPrivilege getPrivilege() {
return privilege;
}
public void setPrivilege(TPrivilege privilege) {
this.privilege = privilege;
}
}
|
[
"[email protected]"
] | |
369a62e27a5bf0027da5eff15027bf9918c6def1
|
28dd8b0cda4b054aa45ebbe06578bd49c5c11240
|
/src/test/java/com/haulmont/tickman/screen/ticket/EstimateMatcherTest.java
|
86ff9de5120fcc9bceb68e938ffa04a6cbf3c782
|
[] |
no_license
|
knstvk/tickman
|
6af67f287806a9afc88f8f25481ffef6e7c68a82
|
01892862fcfae108ac178ce34277a9f32bf5deb5
|
refs/heads/master
| 2023-03-25T00:45:57.346080
| 2021-03-21T13:43:28
| 2021-03-21T13:43:28
| 267,277,207
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,120
|
java
|
package com.haulmont.tickman.screen.ticket;
import com.haulmont.tickman.entity.Ticket;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class EstimateMatcherTest {
@Test
void matches() {
Ticket ticket = new Ticket();
ticket.setEstimate(null);
assertTrue(EstimateMatcher.matches(ticket, "0"));
assertTrue(EstimateMatcher.matches(ticket, "5, 0"));
assertTrue(EstimateMatcher.matches(ticket, "0, 5"));
assertFalse(EstimateMatcher.matches(ticket, "5"));
ticket.setEstimate(5);
assertTrue(EstimateMatcher.matches(ticket, "5"));
assertTrue(EstimateMatcher.matches(ticket, "5,8"));
assertTrue(EstimateMatcher.matches(ticket, "8,5"));
assertTrue(EstimateMatcher.matches(ticket, ">=5"));
assertTrue(EstimateMatcher.matches(ticket, ">3"));
assertTrue(EstimateMatcher.matches(ticket, "<=5"));
assertTrue(EstimateMatcher.matches(ticket, "<8"));
assertFalse(EstimateMatcher.matches(ticket, "3"));
assertFalse(EstimateMatcher.matches(ticket, "a"));
}
}
|
[
"[email protected]"
] | |
3eedb06928c1b79264313d3013e6bf79225c0fe2
|
3581ea333137a694eeec2e07da2b3c7b556ac32c
|
/testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/client/resource/ClientResponseRedirectIntf.java
|
9029fe4785c0fd7c63d8447e1a8d5fe36f249d5e
|
[
"Apache-2.0"
] |
permissive
|
fabiocarvalho777/Resteasy
|
d8b39366c50d49d197d5938b97c73b1a5cb581b5
|
94dae2cf6866705fe409048fde78ef2316c93121
|
refs/heads/master
| 2020-12-02T16:28:18.396872
| 2017-07-07T18:36:57
| 2017-07-07T18:36:57
| 96,557,475
| 1
| 0
| null | 2017-07-07T16:41:04
| 2017-07-07T16:41:04
| null |
UTF-8
|
Java
| false
| false
| 230
|
java
|
package org.jboss.resteasy.test.client.resource;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
@Path("/redirect")
public interface ClientResponseRedirectIntf {
@GET
Response get();
}
|
[
"[email protected]"
] | |
45e5ca328a87610b9d16e411effa23cd8af604a1
|
0606cf494e12067367580095addd4ebf6281a53a
|
/app/src/main/java/com/ace/member/main/third_party/samrithisak_loan/loan/LoanComponent.java
|
a97ed5299c369c9af113b6a63e73493ebc83f132
|
[] |
no_license
|
kothsada/ace_member_android
|
d870d4a32e4e1cb669ee95f33fd0df0f4c60629c
|
f256216f8e5c49d2b00db0a39eecab6ed68a3257
|
refs/heads/master
| 2022-04-18T16:20:07.548800
| 2020-04-18T16:07:05
| 2020-04-18T16:07:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 210
|
java
|
package com.ace.member.main.third_party.samrithisak_loan.loan;
import dagger.Component;
@Component(modules = LoanPresenterModule.class)
public interface LoanComponent {
void inject(LoanActivity activity);
}
|
[
"[email protected]"
] | |
648948edbd336ecbb8a2ef5629678fd7184f259d
|
a4178e5042f43f94344789794d1926c8bdba51c0
|
/iwxxm3Converter/src/schemabindings/schemabindings31/aero/aixm/schema/_5_1/CodeTimeEventCombinationType.java
|
6e183cfa7919acf1589123929ddd46af50585c30
|
[
"Apache-2.0"
] |
permissive
|
moryakovdv/iwxxmConverter
|
c6fb73bc49765c4aeb7ee0153cca04e3e3846ab0
|
5c2b57e57c3038a9968b026c55e381eef0f34dad
|
refs/heads/master
| 2023-07-20T06:58:00.317736
| 2023-07-05T10:10:10
| 2023-07-05T10:10:10
| 128,777,786
| 11
| 7
|
Apache-2.0
| 2023-07-05T10:03:12
| 2018-04-09T13:38:59
|
Java
|
UTF-8
|
Java
| false
| false
| 2,639
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.05.06 at 11:11:25 PM MSK
//
package schemabindings31.aero.aixm.schema._5_1;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for CodeTimeEventCombinationType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CodeTimeEventCombinationType">
* <simpleContent>
* <extension base="<http://www.aixm.aero/schema/5.1.1>CodeTimeEventCombinationBaseType">
* <attribute name="nilReason" type="{http://www.opengis.net/gml/3.2}NilReasonEnumeration" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CodeTimeEventCombinationType", propOrder = {
"value"
})
public class CodeTimeEventCombinationType {
@XmlValue
protected String value;
@XmlAttribute(name = "nilReason")
protected String nilReason;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
public boolean isSetValue() {
return (this.value!= null);
}
/**
* Gets the value of the nilReason property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNilReason() {
return nilReason;
}
/**
* Sets the value of the nilReason property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNilReason(String value) {
this.nilReason = value;
}
public boolean isSetNilReason() {
return (this.nilReason!= null);
}
}
|
[
"[email protected]"
] | |
6c86360e2a6415d22bb0f8a10740fa5bec700161
|
7f714da6d3dbf6aed386e02c8b27956b9aa9b7c9
|
/src/main/java/org/emamotor/morecat/admin/common/filter/LoginPageFilter.java
|
c0adfa3b791affa21d1aaeb8089aa86eddb1d28f
|
[] |
no_license
|
jarnaiz/morecat_old
|
c62ece711438e7ff0d5de0a12e643538ac899947
|
e9a10fa17aa657714a81ede2d097ddc8bb8d4c07
|
refs/heads/master
| 2021-01-11T02:39:29.442908
| 2014-11-05T11:23:25
| 2014-11-05T11:23:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,300
|
java
|
package org.emamotor.morecat.admin.common.filter;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* To prevent user from going back to Login page if the user already logged in
*
* @author tanabe
*/
@WebFilter(urlPatterns = "/mc-admin/login.xhtml")
public class LoginPageFilter implements Filter {
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) servletRequest;
HttpServletResponse response = (HttpServletResponse) servletResponse;
if (request.getUserPrincipal() != null) {
response.sendRedirect(request.getContextPath() + "/mc-admin/overview/view.xhtml");
} else {
filterChain.doFilter(servletRequest, servletResponse);
}
}
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void destroy() {
}
}
|
[
"[email protected]"
] | |
b1d6ed2ac09e0c98fd48853397372c6d8dcb30a1
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava14/Foo43Test.java
|
2dbab2716160fd1f668edb4c65809f7562c9e631
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 475
|
java
|
package applicationModulepackageJava14;
import org.junit.Test;
public class Foo43Test {
@Test
public void testFoo0() {
new Foo43().foo0();
}
@Test
public void testFoo1() {
new Foo43().foo1();
}
@Test
public void testFoo2() {
new Foo43().foo2();
}
@Test
public void testFoo3() {
new Foo43().foo3();
}
@Test
public void testFoo4() {
new Foo43().foo4();
}
@Test
public void testFoo5() {
new Foo43().foo5();
}
}
|
[
"[email protected]"
] | |
02419f66adf1315483a63c259dde1d764bba6b82
|
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
|
/sources/com/airbnb/android/cohosting/epoxycontrollers/CohostingInvitationErrorEpoxyController_EpoxyHelper.java
|
69facf239079cc73493a2cf30220bb84bdce4cc2
|
[] |
no_license
|
jasonnth/AirCode
|
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
|
d37db1baa493fca56f390c4205faf5c9bbe36604
|
refs/heads/master
| 2020-07-03T08:35:24.902940
| 2019-08-12T03:34:56
| 2019-08-12T03:34:56
| 201,842,970
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 771
|
java
|
package com.airbnb.android.cohosting.epoxycontrollers;
import com.airbnb.android.core.viewcomponents.models.HeroMarqueeEpoxyModel_;
import com.airbnb.epoxy.ControllerHelper;
public class CohostingInvitationErrorEpoxyController_EpoxyHelper extends ControllerHelper<CohostingInvitationErrorEpoxyController> {
private final CohostingInvitationErrorEpoxyController controller;
public CohostingInvitationErrorEpoxyController_EpoxyHelper(CohostingInvitationErrorEpoxyController controller2) {
this.controller = controller2;
}
public void resetAutoModels() {
this.controller.marquee = new HeroMarqueeEpoxyModel_();
this.controller.marquee.m4690id(-1);
setControllerToStageTo(this.controller.marquee, this.controller);
}
}
|
[
"[email protected]"
] | |
9aa6fa3cfbc09a1618ed7f7ce16109bfbfdba5fb
|
2c6e2ba03eb71ca45fe690ff6e4586f6e2fa0f17
|
/material/apks/banco/sources/ar/com/santander/rio/mbanking/services/soap/beans/body/RefInternaDeudaBean.java
|
ecafc5e4b7f3e3caa029d8aeea9431af0a489cbe
|
[] |
no_license
|
lcrcastor/curso-mobile-2019
|
3088a196139b3e980ed6e09797a0bbf5efb6440b
|
7585fccb6437a17c841772c1d9fb0701d6c68042
|
refs/heads/master
| 2023-04-06T21:46:32.333236
| 2020-10-30T19:47:54
| 2020-10-30T19:47:54
| 308,680,747
| 0
| 1
| null | 2023-03-26T06:57:57
| 2020-10-30T16:08:31
|
Java
|
UTF-8
|
Java
| false
| false
| 1,243
|
java
|
package ar.com.santander.rio.mbanking.services.soap.beans.body;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import com.google.gson.annotations.SerializedName;
public class RefInternaDeudaBean implements Parcelable {
public static final Creator<RefInternaDeudaBean> CREATOR = new Creator<RefInternaDeudaBean>() {
public RefInternaDeudaBean createFromParcel(Parcel parcel) {
return new RefInternaDeudaBean(parcel);
}
public RefInternaDeudaBean[] newArray(int i) {
return new RefInternaDeudaBean[i];
}
};
@SerializedName("leyenda")
public String leyenda;
@SerializedName("valor")
public String valor;
public int describeContents() {
return 0;
}
public RefInternaDeudaBean() {
}
public RefInternaDeudaBean(String str, String str2) {
this.leyenda = str;
this.valor = str2;
}
protected RefInternaDeudaBean(Parcel parcel) {
this.leyenda = parcel.readString();
this.valor = parcel.readString();
}
public void writeToParcel(Parcel parcel, int i) {
parcel.writeString(this.leyenda);
parcel.writeString(this.valor);
}
}
|
[
"[email protected]"
] | |
25c43cf269c5fbca4472117ed452699132a681e2
|
59a1c9a75f6d82a8872499bee3f4c0e62e4cbb99
|
/src/com/javarush/test/level12/lesson12/home04/Solution.java
|
7888e7eb349dd3b9bc135e7e8ba1c585ec28235b
|
[] |
no_license
|
Mistes/MyRep
|
9dbfcfc391510be739dca19ced3eafcc52a43444
|
1700a6f1c04f31a40a9dc1312f7a9125f61e7119
|
refs/heads/master
| 2020-04-06T04:12:20.857417
| 2016-10-11T08:01:16
| 2016-10-11T08:01:16
| 57,094,487
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,270
|
java
|
package com.javarush.test.level12.lesson12.home04;
/* Что это? «Кот», «Тигр», «Лев», «Бык», «хз»
Напиши метод, который определяет, какой объект передали в него.
Программа должна выводить на экран одну из надписей:
«Кот», «Тигр», «Лев», «Бык», «хз».
*/
public class Solution
{
public static void main(String[] args)
{
System.out.println(getObjectType(new Cat()));
System.out.println(getObjectType(new Tiger()));
System.out.println(getObjectType(new Lion()));
System.out.println(getObjectType(new Bull()));
System.out.println(getObjectType(new Pig()));
}
public static String getObjectType(Object o)
{
if (o instanceof Cat){return "Кот";}
else if (o instanceof Tiger){return "Тигр";}
if (o instanceof Lion){return "Лев";}
if (o instanceof Bull){return "Бык";}
else
return "хз";
}
public static class Cat
{
}
public static class Tiger
{
}
public static class Lion
{
}
public static class Bull
{
}
public static class Pig
{
}
}
|
[
"[email protected]"
] | |
562429fabe85a57a4ccc9e9aa81bef516a9ea885
|
f7ef6b0a32bde8351cf6235ea1f226a7fa4505a4
|
/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceBinding.java
|
27e6521bd801917bbfdb5d0b945bc995bb5cac9c
|
[
"GPL-1.0-or-later",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
zcswl7961/dubbox
|
c0d5ba01c46f4a82f77e187cbf4eb58c1dc2b6d8
|
ed7d9238b92c49bc55ad4cb1b55b9ef5c85f239a
|
refs/heads/master
| 2022-12-04T19:12:36.737239
| 2019-11-13T10:32:15
| 2019-11-13T10:32:15
| 189,978,538
| 3
| 0
|
Apache-2.0
| 2022-11-15T23:52:08
| 2019-06-03T09:49:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,007
|
java
|
/**
* Copyright 1999-2014 dangdang.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.alibaba.dubbo.demo.extension;
import javax.ws.rs.container.DynamicFeature;
import javax.ws.rs.container.ResourceInfo;
import javax.ws.rs.core.FeatureContext;
/**
* @author lishen
*/
public class DynamicTraceBinding implements DynamicFeature {
public void configure(ResourceInfo resourceInfo, FeatureContext context) {
context.register(DynamicTraceInterceptor.class);
}
}
|
[
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.