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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e789d65d9875e6f65cdc66008c7e65f276ee8a01
|
23d114389ed0e3d0b9f1dec7e61c8a745e744e5b
|
/jwr/src/com/wr4/domain/FileItem.java
|
78486b9f118f022ff4c0b536dd1a1fe6dae5aef8
|
[] |
no_license
|
shanghaif/jwr
|
3c6c7b01e7a1ab56129055735aba6e8ac9811138
|
355db3d25e15a17606842221fa67bdd1471b21cc
|
refs/heads/master
| 2023-03-16T01:36:24.243834
| 2019-05-26T10:00:51
| 2019-05-26T10:00:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 958
|
java
|
package com.wr4.domain;
public class FileItem
{
private String fileId;
private String fileName;
private String contentType;
private String locationPath;
private int contentLength;
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getContentType() {
return contentType;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
public String getLocationPath() {
return locationPath;
}
public void setLocationPath(String locationPath) {
this.locationPath = locationPath;
}
public int getContentLength() {
return contentLength;
}
public void setContentLength(int contentLength) {
this.contentLength = contentLength;
}
//getter和setter略
}
|
[
"864867103@qq.com"
] |
864867103@qq.com
|
46e1449acfa1275c13869f2a8ad22f3d31ce05de
|
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
|
/app/src/main/java/com/xiaomi/push/C4302bv.java
|
83f5713997dc746cce021adcc3f36b386b3da965
|
[] |
no_license
|
rcoolboy/guilvN
|
3817397da465c34fcee82c0ca8c39f7292bcc7e1
|
c779a8e2e5fd458d62503dc1344aa2185101f0f0
|
refs/heads/master
| 2023-05-31T10:04:41.992499
| 2021-07-07T09:58:05
| 2021-07-07T09:58:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 304
|
java
|
package com.xiaomi.push;
/* renamed from: com.xiaomi.push.bv */
public class C4302bv {
/* renamed from: a */
public static int f11463a = 200;
/* renamed from: a */
public static long f11464a = 52428800;
/* renamed from: a */
public static String f11465a = "MessageInfo.db";
}
|
[
"593746220@qq.com"
] |
593746220@qq.com
|
c6fe34f8891e6f12fe775a6216759ab274cdb294
|
6da766e38fcdbb67df9509ffda91916410a51c52
|
/ncs-project/ncs-dao/src/main/java/com/ibm/ncs/model/example/TDevpolMapDaoExample.java
|
9c59ff9f2d42db5426caa9c0b0da383f1d76de59
|
[] |
no_license
|
kakaluote-a/transformer-project
|
351d98647a3441246beaf3b0d279361707580b06
|
98006a3e4d04b101741f9d9ece5f09cc1ce2aea7
|
refs/heads/master
| 2021-08-27T15:30:48.693840
| 2014-05-06T00:26:50
| 2014-05-06T00:26:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,242
|
java
|
package com.ibm.ncs.model.example;
import java.math.*;
import java.util.Date;
import java.util.List;
import com.ibm.ncs.model.dao.TDevpolMapDao;
import com.ibm.ncs.model.dto.TDevpolMap;
import com.ibm.ncs.model.exceptions.TDevpolMapDaoException;
import com.ibm.ncs.model.factory.DaoFactory;
public class TDevpolMapDaoExample
{
/**
* Method 'main'
*
* @param arg
* @throws Exception
*/
public static void main(String[] arg) throws Exception
{
// Uncomment one of the lines below to test the generated code
// findAll();
// findWhereDevidEquals(0);
// findWhereMpidEquals(0);
// findWherePpidEquals(0);
}
/**
* Method 'findAll'
*
* @throws Exception
*/
public static void findAll() throws Exception
{
TDevpolMapDao dao = DaoFactory.createTDevpolMapDao();
List<TDevpolMap> _result = dao.findAll();
for (TDevpolMap dto : _result) {
display(dto);
}
}
/**
* Method 'findWhereDevidEquals'
*
* @param devid
* @throws Exception
*/
public static void findWhereDevidEquals(long devid) throws Exception
{
TDevpolMapDao dao = DaoFactory.createTDevpolMapDao();
List<TDevpolMap> _result = dao.findWhereDevidEquals(devid);
for (TDevpolMap dto : _result) {
display(dto);
}
}
/**
* Method 'findWhereMpidEquals'
*
* @param mpid
* @throws Exception
*/
public static void findWhereMpidEquals(long mpid) throws Exception
{
TDevpolMapDao dao = DaoFactory.createTDevpolMapDao();
List<TDevpolMap> _result = dao.findWhereMpidEquals(mpid);
for (TDevpolMap dto : _result) {
display(dto);
}
}
/**
* Method 'findWherePpidEquals'
*
* @param ppid
* @throws Exception
*/
public static void findWherePpidEquals(long ppid) throws Exception
{
TDevpolMapDao dao = DaoFactory.createTDevpolMapDao();
List<TDevpolMap> _result = dao.findWherePpidEquals(ppid);
for (TDevpolMap dto : _result) {
display(dto);
}
}
/**
* Method 'display'
*
* @param dto
*/
public static void display(TDevpolMap dto)
{
StringBuffer buf = new StringBuffer();
buf.append( dto.getDevid() );
buf.append( ", " );
buf.append( dto.getMpid() );
buf.append( ", " );
buf.append( dto.getPpid() );
System.out.println( buf.toString() );
}
}
|
[
"machozhao@gmail.com"
] |
machozhao@gmail.com
|
8a9e14c9e2d9e0e3b6dad3d0f1dad7ded74f13a5
|
1de0bd7e9bf278009bcccb892864b893883ed0cb
|
/.history/MinimumStringWindow_20190308152434.java
|
3b48564b1c06382bce36345cf2d564f9eb45b907
|
[] |
no_license
|
zhejianusc/leetcode_vs_code
|
b90a6539ff3d610302df06284d9ef2c4b27c6cca
|
485565448adc98f90cc1135c7cd12cfdd3fde31c
|
refs/heads/master
| 2020-04-24T00:44:20.160179
| 2020-03-24T04:40:32
| 2020-03-24T04:40:32
| 171,574,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,217
|
java
|
public class MinimumStringWindow {
public String miniWindow(String s1, String s2) {
int[] charS2Mapping = new int[256];
int[] charS1Mapping = new int[256];
int size = s2.length();
for(int i = 0; i < s2.length(); i++)
{
char cur = s2.charAt(i);
charS2Mapping[cur]++;
}
int start = 0;
String result = "";
for(int i = 0; i < s1.length(); i++) {
char cur = s1.charAt(i);
if(charS2Mapping[cur] == 0) continue;
charS2Mapping[cur]++;
if(charS2Mapping[cur] <= charS1Mapping[cur]) {
size--;
}
if(size == 0) {
while(charS2Mapping[s1.charAt(start)] == 0 || charS1Mapping[s1.charAt(start) - 'a'] > charS2Mapping[s1.charAt(start)]) {
charS1Mapping[s1.charAt(start)]--;
start++;
}
if(result.equals("") || result.length() > i - start + 1) {
result = s1.substring(start, i + 1);
}
}
}
return result;
}
public static void main(String[] args) {
System.out.println("hello");
}
}
|
[
"jianzher@sina.com"
] |
jianzher@sina.com
|
cc5879258b5253a99d3328c590c30f5d6934bdac
|
d75b4852e7e43304e6d9dbd888572d74391b194b
|
/micrometer-core/src/main/java/io/micronaut/configuration/metrics/binder/web/ClientRequestMetricRegistryFilter.java
|
ea643dbafb21290827bb4ee9c19af08910e0c895
|
[
"Apache-2.0"
] |
permissive
|
dekstroza/micronaut-micrometer
|
197a6efc038af8a00fd22e881965a56a5852802d
|
2d7705046908f166683a40a665a35ffbb71f7d15
|
refs/heads/master
| 2020-05-07T16:07:47.704123
| 2019-04-18T21:48:33
| 2019-04-18T21:48:33
| 180,669,564
| 0
| 0
|
Apache-2.0
| 2019-04-10T21:56:00
| 2019-04-10T21:55:59
| null |
UTF-8
|
Java
| false
| false
| 2,620
|
java
|
/*
* Copyright 2017-2019 original authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.micronaut.configuration.metrics.binder.web;
import io.micrometer.core.instrument.MeterRegistry;
import io.micronaut.configuration.metrics.annotation.RequiresMetrics;
import io.micronaut.context.annotation.Requires;
import io.micronaut.core.util.StringUtils;
import io.micronaut.http.HttpAttributes;
import io.micronaut.http.HttpResponse;
import io.micronaut.http.MutableHttpRequest;
import io.micronaut.http.annotation.Filter;
import io.micronaut.http.filter.ClientFilterChain;
import io.micronaut.http.filter.HttpClientFilter;
import org.reactivestreams.Publisher;
import java.util.Optional;
/**
* A {@link HttpClientFilter} that produces metrics under the key {@code http.client.requests}.
*
* @author graemerocher
* @since 1.0
*/
@Filter("${micronaut.metrics.http.client.path:/**}")
@RequiresMetrics
@Requires(property = WebMetricsPublisher.ENABLED, value = StringUtils.TRUE, defaultValue = StringUtils.TRUE)
public class ClientRequestMetricRegistryFilter implements HttpClientFilter {
private final MeterRegistry meterRegistry;
/**
* Default constructor.
*
* @param meterRegistry The metrics registry
*/
public ClientRequestMetricRegistryFilter(MeterRegistry meterRegistry) {
this.meterRegistry = meterRegistry;
}
@Override
public Publisher<? extends HttpResponse<?>> doFilter(MutableHttpRequest<?> request, ClientFilterChain chain) {
long start = System.nanoTime();
Publisher<? extends HttpResponse<?>> responsePublisher = chain.proceed(request);
return new WebMetricsPublisher<>(
responsePublisher,
meterRegistry,
resolvePath(request),
start,
request.getMethod().toString(),
false
);
}
private String resolvePath(MutableHttpRequest<?> request) {
Optional<String> route = request.getAttribute(HttpAttributes.URI_TEMPLATE, String.class);
return route.orElseGet(request::getPath);
}
}
|
[
"graeme.rocher@gmail.com"
] |
graeme.rocher@gmail.com
|
4343883f385f1d08fb6ddb6eaa6cd88d5f2625f4
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/neo4j--neo4j/c6d4ada176b085ba3f6d19a1ba41cad8b7423889/before/LuceneCommandApplierTest.java
|
39931fe694b20c5569880971590a556cb88a6d41
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,290
|
java
|
/*
* Copyright (c) 2002-2015 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.index.impl.lucene.legacy;
import org.junit.Rule;
import org.junit.Test;
import java.io.File;
import java.util.Map;
import org.neo4j.graphdb.Node;
import org.neo4j.kernel.configuration.Settings;
import org.neo4j.helpers.collection.MapUtil;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.index.IndexCommand.AddNodeCommand;
import org.neo4j.kernel.impl.index.IndexConfigStore;
import org.neo4j.kernel.impl.index.IndexDefineCommand;
import org.neo4j.kernel.lifecycle.LifeRule;
import org.neo4j.test.EphemeralFileSystemRule;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.neo4j.helpers.collection.MapUtil.stringMap;
import static org.neo4j.index.impl.lucene.legacy.LuceneIndexImplementation.EXACT_CONFIG;
public class LuceneCommandApplierTest
{
@Rule
public final EphemeralFileSystemRule fs = new EphemeralFileSystemRule();
@Rule
public final LifeRule life = new LifeRule( true );
private final File dir = new File( "dir" );
@Test
public void shouldHandleMultipleIdSpaces() throws Exception
{
// GIVEN
fs.get().mkdirs( dir );
String indexName = "name", key = "key";
IndexConfigStore configStore = new IndexConfigStore( dir, fs.get() );
configStore.set( Node.class, indexName, EXACT_CONFIG );
LuceneDataSource dataSource = life.add( spy( new LuceneDataSource( dir, new Config( stringMap(
LuceneDataSource.Configuration.ephemeral.name(), Settings.TRUE ) ),
configStore, fs.get() ) ) );
try ( LuceneCommandApplier applier = new LuceneCommandApplier( dataSource, false ) )
{
// WHEN issuing a command where the index name is mapped to a certain id
IndexDefineCommand definitions = definitions(
MapUtil.<String,Integer>genericMap( indexName, 0 ),
MapUtil.<String,Integer>genericMap( key, 0 ) );
applier.visitIndexDefineCommand( definitions );
applier.visitIndexAddNodeCommand( addNodeToIndex( definitions, indexName, 0L ) );
// and then later issuing a command for that same index, but in another transaction where
// the local index name id is a different one
definitions = definitions(
MapUtil.<String,Integer>genericMap( indexName, 1 ),
MapUtil.<String,Integer>genericMap( key, 0 ) );
applier.visitIndexDefineCommand( definitions );
applier.visitIndexAddNodeCommand( addNodeToIndex( definitions, indexName, 1L ) );
applier.apply();
}
// THEN both those updates should have been directed to the same index
verify( dataSource, times( 1 ) ).getIndexSearcher( any( IndexIdentifier.class ) );
}
private static AddNodeCommand addNodeToIndex( IndexDefineCommand definitions, String indexName, long nodeId )
{
AddNodeCommand command = new AddNodeCommand();
command.init( definitions.getOrAssignIndexNameId( indexName ), nodeId, (byte) 0, "some value" );
return command;
}
private static IndexDefineCommand definitions( Map<String,Integer> names, Map<String,Integer> keys )
{
IndexDefineCommand definitions = new IndexDefineCommand();
definitions.init( names, keys );
return definitions;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
0ec3730c40956afcfebc74e19c1fcc19b48fec0a
|
a23b277bd41edbf569437bdfedad22c2d7733dbe
|
/topcoder/RGBStreet.java
|
ce565a4a8da71df5614eca75b8025cc8680139de
|
[] |
no_license
|
alexandrofernando/java
|
155ed38df33ae8dae641d327be3c6c355b28082a
|
a783407eaba29a88123152dd5b2febe10eb7bf1d
|
refs/heads/master
| 2021-01-17T06:49:57.241130
| 2019-07-19T11:34:44
| 2019-07-19T11:34:44
| 52,783,678
| 1
| 0
| null | 2017-07-03T21:46:00
| 2016-02-29T10:38:28
|
Java
|
UTF-8
|
Java
| false
| false
| 560
|
java
|
public class RGBStreet {
public int estimateCost(String[] houses) {
int costs[] = new int[3];
for (String house : houses) {
String fields[] = house.split(" ");
int current[] = new int[3];
for (int i = 0; i < current.length; i++) {
current[i] = Integer.parseInt(fields[i]);
}
int nextCosts[] = new int[3];
for (int i = 0; i < nextCosts.length; i++) {
nextCosts[i] = current[i]
+ Math.min(costs[(i + 1) % 3], costs[(i + 2) % 3]);
}
costs = nextCosts;
}
return Math.min(Math.min(costs[0], costs[1]), costs[2]);
}
}
|
[
"alexandrofernando@gmail.com"
] |
alexandrofernando@gmail.com
|
11709cc80392558e2729caa232bc074df44d7a5e
|
e05a290f18b0ae8089709f4fbe92f3f49042daee
|
/registration-processor/registration-processor-core/src/main/java/io/mosip/registration/processor/core/packet/dto/demographicinfo/DemographicInfoJson.java
|
835af4136fc607a168e48dbb2745b5899a62b8ff
|
[] |
no_license
|
Aswin-MN/personal
|
25e6d6bf306e61a236d0ea886d33ea621bb7dc56
|
d096fa6ab16e13a66a82be0325cf4d117d3669f3
|
refs/heads/master
| 2021-10-11T16:24:08.604019
| 2019-01-28T12:52:41
| 2019-01-28T12:52:41
| 166,238,628
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 451
|
java
|
package io.mosip.registration.processor.core.packet.dto.demographicinfo;
import lombok.Data;
/**
* Instantiates a new demographic info json.
*/
@Data
public class DemographicInfoJson {
/** The reg id. */
private String regId;
/** The pre reg id. */
private String preRegId;
/** The status code. */
private String statusCode;
/** The lang code. */
private String langCode;
/** The demographic details. */
private byte[] demographicDetails;
}
|
[
"info@mosip.io"
] |
info@mosip.io
|
6583a2f96a25bdc2426ee924051cb242ad7fc429
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a011/A011517Test.java
|
d175333c42f70d8e14e03cec2acd471345e8e813
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a011;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A011517Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
58ac47f63b5b012cf82b4b167988bea0cf4c5e2a
|
8d8da85d74a14ec0de14b863558cde5cc567d5c9
|
/src/demo/grid/LasrNameEditingSupport.java
|
a9e0b3923e287e9f47e8795d8edb9397f739b6af
|
[] |
no_license
|
pascalleclercq/demoRCP
|
c9cc29024c1c22eebc1c7b3860f6a38602a6364f
|
bb4a8b161e50be3407a2c43ccb6fa70149dfe05c
|
refs/heads/master
| 2020-04-05T22:52:27.883520
| 2013-06-04T21:03:29
| 2013-06-04T21:03:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 932
|
java
|
package demo.grid;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnViewer;
import org.eclipse.jface.viewers.EditingSupport;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.swt.widgets.Composite;
import demo.pojo.Personne;
public class LasrNameEditingSupport extends EditingSupport {
private final TableViewer viewer;
public LasrNameEditingSupport(TableViewer viewer) {
super(viewer);
this.viewer=viewer;
}
@Override
protected CellEditor getCellEditor(Object element) {
return new TextCellEditor(viewer.getTable());
}
@Override
protected boolean canEdit(Object element) {
return true;
}
@Override
protected Object getValue(Object element) {
return ((Personne) element).getNom();
}
@Override
protected void setValue(Object element, Object value) {
((Personne) element).setNom((String)value);
}
}
|
[
"pascal.leclercq@gmail.com"
] |
pascal.leclercq@gmail.com
|
4e515642c48b9ad94146932b0ebeb60815f95966
|
ca0e9689023cc9998c7f24b9e0532261fd976e0e
|
/src/com/tencent/mm/ui/base/MMGridView.java
|
1a6d5c5487851ddb10924a5f9b0d905f0324e851
|
[] |
no_license
|
honeyflyfish/com.tencent.mm
|
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
|
ce6e605ff98164359a7073ab9a62a3f3101b8c34
|
refs/heads/master
| 2020-03-28T15:42:52.284117
| 2016-07-19T16:33:30
| 2016-07-19T16:33:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 795
|
java
|
package com.tencent.mm.ui.base;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View.MeasureSpec;
import android.widget.GridView;
public class MMGridView
extends GridView
{
public MMGridView(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
}
public MMGridView(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
}
protected void onMeasure(int paramInt1, int paramInt2)
{
super.onMeasure(paramInt1, View.MeasureSpec.makeMeasureSpec(536870911, Integer.MIN_VALUE));
}
}
/* Location:
* Qualified Name: com.tencent.mm.ui.base.MMGridView
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
d9954ca6e0ba52e46ba2e1952f52da9d40dbc625
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module501/src/main/java/module501packageJava0/Foo9.java
|
808b62051cdf451df40af3281453e6cdab99bfd4
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 290
|
java
|
package module501packageJava0;
import java.lang.Integer;
public class Foo9 {
Integer int0;
public void foo0() {
new module501packageJava0.Foo8().foo3();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
256028aba5a9f2f127c19c401b7d13b2a7e7cb32
|
d9e78246af5911628bd85fe705f8b9ea28a12408
|
/src/main/java/com/note/designpattern/bjsxt/memento/CareTaker.java
|
ada18680cba717bfab2c274bf4753a59f0e8ef75
|
[] |
no_license
|
thinkal01/note02
|
c2775d9c72f8f65a2bf771d5ec8606a4628e1bca
|
33583112b1f52a3f49d61931a4f2f3189690dd61
|
refs/heads/master
| 2022-12-22T11:01:51.290414
| 2020-03-16T11:25:06
| 2020-03-16T11:25:06
| 164,791,160
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 377
|
java
|
package com.note.designpattern.bjsxt.memento;
/**
* 负责人类
* 负责管理备忘录对象
*/
public class CareTaker {
private EmpMemento memento;
// private List<EmpMemento> list = new ArrayList<>();
public EmpMemento getMemento() {
return memento;
}
public void setMemento(EmpMemento memento) {
this.memento = memento;
}
}
|
[
"875535828@qq.com"
] |
875535828@qq.com
|
162d59e235e649dede5fb5045274e3d77b228f9b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_01f3e33f629d01352378ce16508963a6b7c19591/ProfAddCourseMenu/2_01f3e33f629d01352378ce16508963a6b7c19591_ProfAddCourseMenu_s.java
|
a2dc4542eabe89fcdcfb470c19341089eb8ab5a6
|
[] |
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
| 909
|
java
|
/**
*
*/
package menu;
import java.util.Scanner;
/**
* @author Allison
*
*/
public class ProfAddCourseMenu{
private String promptText = "Please enter new course information in this order: <id> <coursename> <startdate> <enddate> <your_prof_id> \n All dates should be in the format mm/dd/yyyy";
public boolean run(){
String answer = promptUser(promptText);
Scanner scan = new Scanner(answer);
String cid = scan.next();
String cname = scan.next();
String start = scan.next();
String end = scan.next();
String profid = scan.next();
// TODO do stuff with the input to prepare it for INSERT:
//must convert start & end into oracle TIMESTAMP format
return false;
}
public String promptUser(String prompt) {
System.out.print(prompt);
Scanner scan = new Scanner(System.in);
return scan.nextLine();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
1d93a12f51b8e2d0ce7b566749f6b633ba81e569
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/87/org/apache/commons/math/linear/SparseFieldVector_getField_312.java
|
906ed70f40e91fdf687d7fd78a3b8b9f540dba2e
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 968
|
java
|
org apach common math linear
link field vector fieldvector link open int field hash map openinttofieldhashmap back store
param type field element
version revis date sat apr
spars field vector sparsefieldvector field element fieldel field vector fieldvector serializ
inherit doc inheritdoc
field field getfield
field
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
8c0e7810d607e0c8b9ce0aba03c5e14ec801234d
|
51b90e6a68baee33e7c653d79b1c3e26ad71878c
|
/helianto-document/src/main/java/org/helianto/document/internal/AbstractSerializer.java
|
8c816bbca4177234cd85765c60d9929415ac5330
|
[
"Apache-2.0"
] |
permissive
|
eldevanjr/helianto
|
38a231abfe6fa8bc146e49b49959dc04f894a589
|
61c13ffeaa0d63bd243d9a4c00e01255f65baa40
|
refs/heads/master
| 2021-01-11T19:20:45.193650
| 2017-01-26T19:55:49
| 2017-01-26T19:55:49
| 79,360,379
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,129
|
java
|
/* Copyright 2005 I Serv Consultoria Empresarial Ltda.
*
* 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.helianto.document.internal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.OneToMany;
import org.helianto.core.domain.Entity;
import org.helianto.core.internal.AbstractFolder;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* Base class to wrap a number pattern to be used to generate a sequence of documents.
*
* @author Mauricio Fernandes de Castro
*/
@javax.persistence.MappedSuperclass
public abstract class AbstractSerializer<D>
extends AbstractFolder {
private static final long serialVersionUID = 1L;
@Column(length=20)
private String patternPrefix = "F";
private Integer numberOfDigits = 3;
private char contentType = ' ';
@JsonIgnore
@OneToMany(mappedBy="series")
private Set<D> documents = new HashSet<D>();
/**
* Key constructor.
*
* @param entity
* @param folderCode
*/
public AbstractSerializer(Entity entity, String folderCode) {
super(entity, folderCode);
}
/**
* Form constructor.
*
* @param id
* @param folderCode
* @param folderName
* @param folderDecorationUrl
* @param patternPrefix
* @param numberOfDigits
* @param contentType
*/
protected AbstractSerializer(int id
, String folderCode
, String folderName
, String folderDecorationUrl
, String patternPrefix
, Integer numberOfDigits
, char contentType
) {
super(id, folderCode, folderName, folderDecorationUrl);
this.patternPrefix = patternPrefix;
this.numberOfDigits = numberOfDigits;
this.contentType = contentType;
}
/**
* Pattern to generate new docCode.
*/
public String getNumberPattern() {
return new StringBuilder("'")
.append(getPatternPrefix())
.append("'")
.append("00000000000".substring(0, getNumberOfDigits()))
.toString();
}
/**
* Pattern prefix.
*/
public String getPatternPrefix() {
return patternPrefix;
}
public void setPatternPrefix(String patternPrefix) {
this.patternPrefix = patternPrefix;
}
/**
* Number of digits.
*/
public Integer getNumberOfDigits() {
return numberOfDigits;
}
public void setNumberOfDigits(Integer numberOfDigits) {
this.numberOfDigits = numberOfDigits;
}
/**
* Content type.
*/
public char getContentType() {
return contentType;
}
public void setContentType(char contentType) {
this.contentType = contentType;
}
/**
* Document set.
*/
public Set<D> getDocuments() {
return documents;
}
public void setDocuments(Set<D> documents) {
this.documents = documents;
}
/**
* Merger.
*
* @param command
*/
@SuppressWarnings("rawtypes")
protected void merge(AbstractSerializer command) {
super.merge(command);
setPatternPrefix(command.getPatternPrefix());
setNumberOfDigits(command.getNumberOfDigits());
setContentType(command.getContentType());
}
/**
* toString
* @return String
*/
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
buffer.append("folderCode").append("='").append(getFolderCode()).append("' ");
buffer.append("numberPattern").append("='").append(getNumberPattern()).append("' ");
buffer.append("]");
return buffer.toString();
}
}
|
[
"eldevanjr@iservport.com"
] |
eldevanjr@iservport.com
|
66f6e386305a50f389fce6f73c48366e2fd1da98
|
c6202e70946a8513f7afbb3b146a49afc7f6ef7c
|
/app/src/main/java/com/yueyue/updatedemo/index/IndexPresenter.java
|
d3068beb01cb17992c3b8777c07bc91c7bf5eb9d
|
[
"Apache-2.0"
] |
permissive
|
simplebam/UpdateDemo
|
edde90d0cd68f337bc77a5060576b7e1e18ae8de
|
8263540aa7d76f8ce7a04edb275e7e5a711493b3
|
refs/heads/master
| 2021-05-08T22:02:45.503801
| 2018-04-17T01:49:03
| 2018-04-17T01:49:03
| 119,661,390
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,113
|
java
|
package com.yueyue.updatedemo.index;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.IBinder;
import com.yueyue.updatedemo.utils.DownloadService;
import com.yueyue.updatedemo.utils.SpUtils;
import java.io.File;
/**
* Created by snail
* on 2017/12/6.
* Todo
*/
public class IndexPresenter implements IndexContract.Presenter {
private IndexContract.View view;
private ServiceConnection conn;
public IndexPresenter(IndexContract.View view) {
this.view = view;
}
/**
* 请求网络
* 获取网络版本号
* 获取成功后与本地版本号比对
* 符合更新条件就控制view弹窗
*/
@Override
public void checkUpdate(String local) {
//假设获取得到最新版本
//一般还要和忽略的版本做比对。。这里就不累赘了
String version = "2.0";
String ignore = SpUtils.getInstance().getString("ignore");
if (!ignore.equals(version) && !ignore.equals(local)) {
view.showUpdate(version);
}
}
/**
* 设置忽略版本
*/
@Override
public void setIgnore(String version) {
SpUtils.getInstance().putString("ignore",version);
}
/**
* 模拟网络下载
*/
@Override
public void downApk(Context context) {
final String url = "https://dianfenqi.cn/data/ffmpeg/upload/images/android/20171206/dianfenqi.apk";
if (conn == null)
conn = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
DownloadService.DownloadBinder binder = (DownloadService.DownloadBinder) service;
DownloadService myService = binder.getService();
myService.downApk(url, new DownloadService.DownloadCallback() {
@Override
public void onPrepare() {
}
@Override
public void onProgress(int progress) {
view.showProgress(progress);
}
@Override
public void onComplete(File file) {
view.showComplete(file);
}
@Override
public void onFail(String msg) {
view.showFail(msg);
}
});
}
@Override
public void onServiceDisconnected(ComponentName name) {
//意味中断,较小发生,酌情处理
}
};
Intent intent = new Intent(context,DownloadService.class);
context.bindService(intent, conn, Service.BIND_AUTO_CREATE);
}
@Override
public void unbind(Context context) {
context.unbindService(conn);
}
}
|
[
"3421448373@qq.com"
] |
3421448373@qq.com
|
342775cc23511a2592bfd8613fb3efa66532aaa4
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/51/76.java
|
1db2c308c5c80e974066ff89da8060f9f79aec01
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,152
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int n;
int[] c = new int[500];
int max = 0;
int z;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
String a = new String(new char[500]);
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
a = tempVar2.charAt(0);
}
for (int i = 0;i <= a.length() - n;i++)
{
c[i] = 1;
for (int j = i + 1;j <= a.length() - n;j++)
{
z = 1;
for (int k = 0;k < n;k++)
{
if (a.charAt(i + k) != a.charAt(j + k))
{
z = 0;
}
}
if (z == 1)
{
c[i]++;
}
}
if (c[i] > max)
{
max = c[i];
}
}
if (max == 1)
{
System.out.print("NO");
}
else
{
System.out.printf("%d\n",max);
for (int i = 0;i <= a.length() - n;i++)
{
if (c[i] == max)
{
for (int k = 0;k < n - 1;k++)
{
System.out.printf("%c",a.charAt(i + k));
}
System.out.printf("%c\n",a.charAt(i + n - 1));
}
}
}
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
b99168c89f007f41621d883698924e3dde67a9dd
|
449c51c96ff3960d02911270d026970df82134bb
|
/lottery/src/main/java/cn/zcgames/lottery/home/view/iview/IPayActivity.java
|
12291a7513ff60bc726acb462ad1b134205cd9b9
|
[] |
no_license
|
ps51/LotteryDemo
|
171adf9f41596a8a11457c591524d1f077c98958
|
6578da22b4227a903938c4f47629b6e94e0cf097
|
refs/heads/master
| 2020-04-14T22:05:39.277894
| 2018-12-26T07:14:18
| 2018-12-26T07:14:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 347
|
java
|
package cn.zcgames.lottery.home.view.iview;
import cn.zcgames.lottery.base.IBaseView;
/**
* 支付View接口
* Berfy修改 2018.8.27
*/
public interface IPayActivity<T> extends IBaseView {
void onBuyResult(boolean isOk, Object obj);
void requestResultOk(T object);
void requestResultFailed(boolean isNeedLogin, String msg);
}
|
[
"446296114@qq.com"
] |
446296114@qq.com
|
7b3d77a7b1afc0ffb9f7eef68bef522fed649403
|
8678444323d32eb1f8b01b1484b4ec42c5f8902d
|
/intellij/src/main/java/net/minecraft/block/BlockCactus.java
|
4e3bc15f815237425d826d32e6a5e1e9b6e97f64
|
[] |
no_license
|
Sub2Tastic/MCP
|
65bf7d1c1d43030c7d8e22e43db09bda16ca2f79
|
eea55cac7399c6c60d1789e9529606b04f7384fe
|
refs/heads/master
| 2022-11-11T12:19:17.486438
| 2020-07-02T17:57:13
| 2020-07-02T17:57:13
| 276,683,273
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,027
|
java
|
package net.minecraft.block;
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockCactus extends Block
{
public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 15);
protected static final AxisAlignedBB field_185593_b = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.9375D, 0.9375D);
protected static final AxisAlignedBB field_185594_c = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 1.0D, 0.9375D);
protected BlockCactus()
{
super(Material.CACTUS);
this.setDefaultState(this.stateContainer.getBaseState().func_177226_a(AGE, Integer.valueOf(0)));
this.func_149675_a(true);
this.func_149647_a(CreativeTabs.DECORATIONS);
}
public void func_180650_b(World p_180650_1_, BlockPos p_180650_2_, IBlockState p_180650_3_, Random p_180650_4_)
{
BlockPos blockpos = p_180650_2_.up();
if (p_180650_1_.isAirBlock(blockpos))
{
int i;
for (i = 1; p_180650_1_.getBlockState(p_180650_2_.down(i)).getBlock() == this; ++i)
{
;
}
if (i < 3)
{
int j = ((Integer)p_180650_3_.get(AGE)).intValue();
if (j == 15)
{
p_180650_1_.setBlockState(blockpos, this.getDefaultState());
IBlockState iblockstate = p_180650_3_.func_177226_a(AGE, Integer.valueOf(0));
p_180650_1_.setBlockState(p_180650_2_, iblockstate, 4);
iblockstate.func_189546_a(p_180650_1_, blockpos, this, p_180650_2_);
}
else
{
p_180650_1_.setBlockState(p_180650_2_, p_180650_3_.func_177226_a(AGE, Integer.valueOf(j + 1)), 4);
}
}
}
}
public AxisAlignedBB func_180646_a(IBlockState p_180646_1_, IBlockAccess p_180646_2_, BlockPos p_180646_3_)
{
return field_185593_b;
}
public AxisAlignedBB func_180640_a(IBlockState p_180640_1_, World p_180640_2_, BlockPos p_180640_3_)
{
return field_185594_c.offset(p_180640_3_);
}
public boolean func_149686_d(IBlockState p_149686_1_)
{
return false;
}
public boolean func_149662_c(IBlockState p_149662_1_)
{
return false;
}
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
{
return super.func_176196_c(p_176196_1_, p_176196_2_) ? this.func_176586_d(p_176196_1_, p_176196_2_) : false;
}
public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_)
{
if (!this.func_176586_d(p_189540_2_, p_189540_3_))
{
p_189540_2_.destroyBlock(p_189540_3_, true);
}
}
public boolean func_176586_d(World p_176586_1_, BlockPos p_176586_2_)
{
for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL)
{
Material material = p_176586_1_.getBlockState(p_176586_2_.offset(enumfacing)).getMaterial();
if (material.isSolid() || material == Material.LAVA)
{
return false;
}
}
Block block = p_176586_1_.getBlockState(p_176586_2_.down()).getBlock();
return block == Blocks.CACTUS || block == Blocks.SAND && !p_176586_1_.getBlockState(p_176586_2_.up()).getMaterial().isLiquid();
}
public void func_180634_a(World p_180634_1_, BlockPos p_180634_2_, IBlockState p_180634_3_, Entity p_180634_4_)
{
p_180634_4_.attackEntityFrom(DamageSource.CACTUS, 1.0F);
}
public BlockRenderLayer func_180664_k()
{
return BlockRenderLayer.CUTOUT;
}
public IBlockState func_176203_a(int p_176203_1_)
{
return this.getDefaultState().func_177226_a(AGE, Integer.valueOf(p_176203_1_));
}
public int func_176201_c(IBlockState p_176201_1_)
{
return ((Integer)p_176201_1_.get(AGE)).intValue();
}
protected BlockStateContainer func_180661_e()
{
return new BlockStateContainer(this, new IProperty[] {AGE});
}
public BlockFaceShape func_193383_a(IBlockAccess p_193383_1_, IBlockState p_193383_2_, BlockPos p_193383_3_, EnumFacing p_193383_4_)
{
return BlockFaceShape.UNDEFINED;
}
}
|
[
"theelectriczlime@gmail.com"
] |
theelectriczlime@gmail.com
|
d436d7562d1632aa192debd1fa72b5d9640a607f
|
41ae950b46036a9ebe6a221fcc0a23601bfbf190
|
/LeetCode/src/contest/contest131/Problem1023.java
|
e1f8d78f873584c86ec3eae5dfe28218b574e5b0
|
[] |
no_license
|
yuruiyin/AlgorithmLearn
|
f7a88a499d050fa9c5d666514a74de0f0a56d001
|
4224b664e6d05f233512f77088f6d1437a87cd97
|
refs/heads/master
| 2023-07-08T09:19:41.101604
| 2023-07-03T01:48:08
| 2023-07-03T01:48:08
| 143,147,502
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,177
|
java
|
package contest.contest131;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Problem1023 {
private void calcCount(Map<Character, Integer> countMap, String str) {
char[] patternArr = str.toCharArray();
for (char c : patternArr) {
if (countMap.containsKey(c)) {
countMap.put(c, countMap.get(c) + 1);
} else {
countMap.put(c, 1);
}
}
}
private boolean isUpperCase(char c) {
return c >= 'A' && c <= 'Z';
}
private boolean isUpperCaseMatch(Map<Character, Integer> tmpCountMap, Map<Character, Integer> countMap) {
for (Character c : tmpCountMap.keySet()) {
if (isUpperCase(c) && (!countMap.containsKey(c) || !tmpCountMap.get(c).equals(countMap.get(c)))) {
return false;
}
}
return true;
}
private int findFirstBiggerByBinarySearch(List<Integer> indexList, int target) {
int low = 0;
int high = indexList.size() - 1;
while (low <= high) {
int mid = (low + high) >>> 1;
int midVal = indexList.get(mid);
if (target <= midVal) {
if (mid == 0 || indexList.get(mid-1) < target) {
return midVal;
}
high = mid - 1;
} else {
low = mid + 1;
}
}
return -1;
}
private boolean isSubSequence(String query, String pattern) {
Map<Character, List<Integer>> indexListMap = new HashMap<>();
for (int i = 0; i < query.length(); i++) {
char c = query.charAt(i);
if (indexListMap.containsKey(c)) {
indexListMap.get(c).add(i);
} else {
List<Integer> list = new ArrayList<>();
list.add(i);
indexListMap.put(c, list);
}
}
int from = 0;
for (int i = 0; i < pattern.length(); i++) {
char c = pattern.charAt(i);
List<Integer> indexList = indexListMap.get(c);
if (indexList == null || indexList.isEmpty()) {
return false;
}
int index = findFirstBiggerByBinarySearch(indexList, from);
if (index == -1) {
return false;
}
from = index + 1;
}
return true;
}
public List<Boolean> camelMatch(String[] queries, String pattern) {
Map<Character, Integer> countMap = new HashMap<>();
calcCount(countMap, pattern);
List<Boolean> ansList = new ArrayList<>();
for (String query : queries) {
Map<Character, Integer> tmpCountMap = new HashMap<>();
calcCount(tmpCountMap, query);
ansList.add(isUpperCaseMatch(tmpCountMap, countMap) && isSubSequence(query, pattern));
}
return ansList;
}
public static void main(String[] args) {
new Problem1023().camelMatch(new String[]{"FooBar","FooBarTest","FootBall","FrameBuffer","ForceFeedBack"}, "FB");
}
}
|
[
"yuruiyin@cyou-inc.com"
] |
yuruiyin@cyou-inc.com
|
e6ff480e6f565c9832146b407117193760a3eecc
|
a03ddb4111faca852088ea25738bc8b3657e7b5c
|
/TestTransit/src/jp/co/yahoo/yconnect/YConnectImplicit.java
|
9ba66d847872e8980fc48fb20bf738a1482cf798
|
[] |
no_license
|
randhika/TestMM
|
5f0de3aee77b45ca00f59cac227450e79abc801f
|
4278b34cfe421bcfb8c4e218981069a7d7505628
|
refs/heads/master
| 2020-12-26T20:48:28.446555
| 2014-09-29T14:37:51
| 2014-09-29T14:37:51
| 24,874,176
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,792
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package jp.co.yahoo.yconnect;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import jp.co.yahoo.yconnect.core.api.ApiClientException;
import jp.co.yahoo.yconnect.core.http.YHttpClient;
import jp.co.yahoo.yconnect.core.oauth2.AuthorizationException;
import jp.co.yahoo.yconnect.core.oauth2.AuthorizationRequestClient;
import jp.co.yahoo.yconnect.core.oauth2.BearerToken;
import jp.co.yahoo.yconnect.core.oauth2.ImplicitCallbackUriParser;
import jp.co.yahoo.yconnect.core.oidc.CheckIdClient;
import jp.co.yahoo.yconnect.core.oidc.CheckIdException;
import jp.co.yahoo.yconnect.core.oidc.IdTokenObject;
import jp.co.yahoo.yconnect.core.oidc.IdTokenVerification;
import jp.co.yahoo.yconnect.core.oidc.UserInfoClient;
import jp.co.yahoo.yconnect.core.oidc.UserInfoObject;
import jp.co.yahoo.yconnect.core.util.StringUtil;
public class YConnectImplicit
{
private static final String AUTHORIZATION_ENDPOINT_URL = "https://auth.login.yahoo.co.jp/yconnect/v1/authorization";
private static final String CHECK_ID_ENDPOINT_URL = "https://auth.login.yahoo.co.jp/yconnect/v1/checktoken";
private static final String ISSUER = "https://auth.login.yahoo.co.jp";
private static final String USERINFO_ENDPOINT_URL = "https://userinfo.yahooapis.jp/yconnect/v1/attribute";
private static YConnectImplicit instance;
private BearerToken accessToken;
private String display;
private String idToken;
private IdTokenObject idTokenObject;
private String nonce;
private String prompt;
private AuthorizationRequestClient requestClient;
private ImplicitCallbackUriParser responsePaser;
private String responseType;
private String scope;
private UserInfoObject userInfoObject;
protected YConnectImplicit()
{
responseType = "token id_token";
display = "touch";
prompt = "login";
scope = null;
nonce = null;
}
public static void disableSSLCheck()
{
YHttpClient.disableSSLCheck();
}
public static void enableSSLCheck()
{
YHttpClient.enableSSLCheck();
}
public static YConnectImplicit getInstance()
{
if (instance == null)
{
instance = new YConnectImplicit();
}
return instance;
}
public Uri generateAuthorizationUri()
{
requestClient.setResponseType(responseType);
requestClient.setParameter("display", display);
requestClient.setParameter("prompt", prompt);
if (scope != null)
{
requestClient.setParameter("scope", scope);
}
if (nonce != null)
{
requestClient.setParameter("nonce", nonce);
}
return requestClient.generateAuthorizationUri();
}
public String getAccessToken()
{
return accessToken.getAccessToken();
}
public long getAccessTokenExpiration()
{
return accessToken.getExpiration();
}
public String getIdToken()
{
return idToken;
}
public IdTokenObject getIdTokenObject()
{
return idTokenObject;
}
public UserInfoObject getUserInfoObject()
{
return userInfoObject;
}
public void init(String s, String s1, String s2)
{
requestClient = new AuthorizationRequestClient("https://auth.login.yahoo.co.jp/yconnect/v1/authorization", s);
requestClient.setRedirectUri(s1);
requestClient.setState(s2);
}
public void init(String s, String s1, String s2, String s3, String as[], String as1[], String s4)
{
requestClient = new AuthorizationRequestClient("https://auth.login.yahoo.co.jp/yconnect/v1/authorization", s);
requestClient.setRedirectUri(s1);
requestClient.setState(s2);
display = s3;
prompt = StringUtil.implode(as);
scope = StringUtil.implode(as1);
nonce = s4;
}
public void parseAuthorizationResponse(Uri uri, String s, String s1)
throws AuthorizationException
{
responsePaser = new ImplicitCallbackUriParser(uri, s);
accessToken = responsePaser.getAccessToken(s1);
idToken = responsePaser.getIdToken();
}
public void requestAuthorization(Activity activity)
{
activity.startActivity(new Intent("android.intent.action.VIEW", generateAuthorizationUri()));
activity.finish();
}
public boolean requestCheckToken(String s, String s1, String s2)
throws CheckIdException, Exception
{
CheckIdClient checkidclient = new CheckIdClient("https://auth.login.yahoo.co.jp/yconnect/v1/checktoken", s);
checkidclient.fetch();
idTokenObject = checkidclient.getIdTokenObject();
long l = checkidclient.getResposeTime();
return IdTokenVerification.check("https://auth.login.yahoo.co.jp", s1, s2, idTokenObject, l);
}
public void requestUserInfo(String s)
throws ApiClientException, Exception
{
UserInfoClient userinfoclient = new UserInfoClient(s);
userinfoclient.fetchResouce("https://userinfo.yahooapis.jp/yconnect/v1/attribute", "GET");
userInfoObject = userinfoclient.getUserInfoObject();
}
public void setDisplay(String s)
{
display = s;
}
public void setNonce(String s)
{
nonce = s;
}
public void setPrompt(String as[])
{
prompt = StringUtil.implode(as);
}
public void setResponseType(String s)
{
responseType = s;
}
public void setScope(String as[])
{
scope = StringUtil.implode(as);
}
}
|
[
"metromancn@gmail.com"
] |
metromancn@gmail.com
|
6857c74cd67cb08ccfa6bf54012ba92107e2015a
|
350a535e3e0fd67af9ad130d1342a8f5deb759df
|
/src/main/java/com/ileng/core/security/shiro/session/CacheSessionDAO.java
|
9fba5197f416a35f5963375871e590d9083ea664
|
[] |
no_license
|
xjLeng/forum
|
a6088173ea98009ba9f698b52b7ec631b2b0c550
|
fd9fea3a28b5ee401788f45eb3f4061902b4bea9
|
refs/heads/master
| 2020-06-26T07:11:48.161650
| 2017-08-27T08:40:21
| 2017-08-27T08:40:21
| 96,981,373
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,276
|
java
|
package com.ileng.core.security.shiro.session;
import java.io.Serializable;
import java.util.Collection;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import org.apache.shiro.session.Session;
import org.apache.shiro.session.UnknownSessionException;
import org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.subject.support.DefaultSubjectContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.Sets;
import com.ileng.core.utils.DateUtils;
import com.ileng.core.utils.JeewebPropertiesUtil;
import com.ileng.core.utils.ServletUtils;
import com.ileng.core.utils.StringUtils;
/**
* 自定义WEB会话管理类
*
* @author 冷雪剑
* @version 2017-02-23
*/
public class CacheSessionDAO extends EnterpriseCacheSessionDAO implements SessionDAO {
private Logger logger = LoggerFactory.getLogger(getClass());
public CacheSessionDAO() {
super();
}
@Override
protected void doUpdate(Session session) {
if (session == null || session.getId() == null) {
return;
}
HttpServletRequest request = ServletUtils.getRequest();
if (request != null) {
String uri = request.getServletPath();
// 如果是静态文件,则不更新SESSION
if (ServletUtils.isStaticFile(uri)) {
return;
}
// 如果是视图文件,则不更新SESSION
if (StringUtils.startsWith(uri, JeewebPropertiesUtil.getConfig("web.view.prefix"))
&& StringUtils.endsWith(uri, JeewebPropertiesUtil.getConfig("web.view.suffix"))) {
return;
}
// 手动控制不更新SESSION
String updateSession = request.getParameter("updateSession");
if (Boolean.FALSE.equals(Boolean.parseBoolean(updateSession))) {
return;
}
}
super.doUpdate(session);
logger.debug("update {} {}", session.getId(), request != null ? request.getRequestURI() : "");
}
@Override
protected void doDelete(Session session) {
if (session == null || session.getId() == null) {
return;
}
super.doDelete(session);
logger.debug("delete {} ", session.getId());
}
@Override
protected Serializable doCreate(Session session) {
HttpServletRequest request = ServletUtils.getRequest();
if (request != null) {
String uri = request.getServletPath();
// 如果是静态文件,则不创建SESSION
if (ServletUtils.isStaticFile(uri)) {
return null;
}
}
super.doCreate(session);
logger.debug("doCreate {} {}", session, request != null ? request.getRequestURI() : "");
return session.getId();
}
@Override
protected Session doReadSession(Serializable sessionId) {
return super.doReadSession(sessionId);
}
@Override
public Session readSession(Serializable sessionId) throws UnknownSessionException {
try {
Session s = null;
HttpServletRequest request = ServletUtils.getRequest();
if (request != null) {
String uri = request.getServletPath();
// 如果是静态文件,则不获取SESSION
if (ServletUtils.isStaticFile(uri)) {
return null;
}
s = (Session) request.getAttribute("session_" + sessionId);
}
if (s != null) {
return s;
}
Session session = super.readSession(sessionId);
logger.debug("readSession {} {}", sessionId, request != null ? request.getRequestURI() : "");
if (request != null && session != null) {
request.setAttribute("session_" + sessionId, session);
}
return session;
} catch (UnknownSessionException e) {
return null;
}
}
/**
* 获取活动会话
*
* @param includeLeave
* 是否包括离线(最后访问时间大于3分钟为离线会话)
* @return
*/
@Override
public Collection<Session> getActiveSessions(boolean includeLeave) {
return getActiveSessions(includeLeave, null, null);
}
/**
* 获取活动会话
*
* @param includeLeave
* 是否包括离线(最后访问时间大于3分钟为离线会话)
* @param principal
* 根据登录者对象获取活动会话
* @param filterSession
* 不为空,则过滤掉(不包含)这个会话。
* @return
*/
@Override
public Collection<Session> getActiveSessions(boolean includeLeave, Object principal, Session filterSession) {
// 如果包括离线,并无登录者条件。
if (includeLeave && principal == null) {
return getActiveSessions();
}
Set<Session> sessions = Sets.newHashSet();
for (Session session : getActiveSessions()) {
boolean isActiveSession = false;
// 不包括离线并符合最后访问时间小于等于3分钟条件。
if (includeLeave || DateUtils.pastMinutes(session.getLastAccessTime()) <= 3) {
isActiveSession = true;
}
// 符合登陆者条件。
if (principal != null) {
PrincipalCollection pc = (PrincipalCollection) session
.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
if (principal.toString().equals(pc != null ? pc.getPrimaryPrincipal().toString() : StringUtils.EMPTY)) {
isActiveSession = true;
}
}
// 过滤掉的SESSION
if (filterSession != null && filterSession.getId().equals(session.getId())) {
isActiveSession = false;
}
if (isActiveSession) {
sessions.add(session);
}
}
return sessions;
}
}
|
[
"18085137706@163.com"
] |
18085137706@163.com
|
97647969f78c1aac02871f367a88cfb187050664
|
04be005e3330c72f0cc2862364e67c3ba138f85b
|
/app/src/main/java/net/anchong/app/entity/request/model/SpportingGoodsRequest.java
|
fe9ff7272c13ce5cb49dd9939c9105352b4b35b8
|
[] |
no_license
|
hongqinghe/Project_Anchong
|
d7e7f5b79d4842023335e7f14821528001c676e5
|
0813d66402065d2e1c4a47db5b9cbc7c3fbb1fc1
|
refs/heads/master
| 2021-05-07T19:35:17.186741
| 2017-10-30T15:25:14
| 2017-10-30T15:25:14
| 108,870,005
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 594
|
java
|
package net.anchong.app.entity.request.model;
import java.io.Serializable;
/**
* 配套商品请求
* Created by baishixin on 16/7/21.
*/
public class SpportingGoodsRequest extends ParamModel implements Serializable {
/**
* goods_id : 商品品ID
*/
private String goods_id;
public SpportingGoodsRequest() {
}
public SpportingGoodsRequest(String goods_id) {
this.goods_id = goods_id;
}
public String getGoods_id() {
return goods_id;
}
public void setGoods_id(String goods_id) {
this.goods_id = goods_id;
}
}
|
[
"gongtong@2dfire.com"
] |
gongtong@2dfire.com
|
7204f210b40e4188b439505acc52107864ac542f
|
4b2c2e3aaa4c43d187ed83c777290979d155e518
|
/mongodb/src/test/java/de/taimos/dvalin/mongo/LinkedObject.java
|
152db4d26978bbc81b8ab532ed3381841f032d1f
|
[
"Apache-2.0"
] |
permissive
|
gspandy/dvalin
|
1833c5d1429363a589077a278ac7fa6ac361016d
|
75df8c01c2bab505a62f6cec6f0b79a1e14bb85b
|
refs/heads/master
| 2023-08-09T17:41:23.296888
| 2017-07-13T15:43:00
| 2017-07-13T15:43:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,310
|
java
|
/**
*
*/
package de.taimos.dvalin.mongo;
/*
* #%L
* MongoDB support for dvalin
* %%
* Copyright (C) 2015 Taimos GmbH
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import de.taimos.dvalin.mongo.links.AReferenceableEntity;
/**
* Copyright 2015 Taimos GmbH<br>
* <br>
*
* @author thoeger
*/
public class LinkedObject extends AReferenceableEntity<LinkedObject> {
private static final long serialVersionUID = 1L;
private String name;
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
@Override
protected String getLabel() {
return this.name;
}
@Override
public String toString() {
return "LinkedObject [name=" + this.name + "]";
}
}
|
[
"thorsten.hoeger@hoegernet.com"
] |
thorsten.hoeger@hoegernet.com
|
648f6303babd469fd6b269b462b3f78724364648
|
c6aa94983f3c8f82954463af3972ae06b30396a7
|
/microservice_apollo/apollo-client/src/main/java/com/ctrip/framework/apollo/model/ConfigChange.java
|
a89d30d4a30debc0d020a20ca7b32b92e3eb7da2
|
[
"Apache-2.0"
] |
permissive
|
dobulekill/jun_springcloud
|
f01358caacb1b04f57908dccc6432d0a5e17745e
|
33248f65301741ed97a24b978a5c22d5d6c052fb
|
refs/heads/master
| 2023-01-24T13:24:59.282130
| 2020-11-25T17:30:47
| 2020-11-25T17:30:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,988
|
java
|
package com.ctrip.framework.apollo.model;
import com.ctrip.framework.apollo.enums.PropertyChangeType;
/**
* Holds the information for a config change.
* @author Wujun
*/
public class ConfigChange {
private final String namespace;
private final String propertyName;
private String oldValue;
private String newValue;
private PropertyChangeType changeType;
/**
* Constructor.
* @param namespace the namespace of the key
* @param propertyName the key whose value is changed
* @param oldValue the value before change
* @param newValue the value after change
* @param changeType the change type
*/
public ConfigChange(String namespace, String propertyName, String oldValue, String newValue,
PropertyChangeType changeType) {
this.namespace = namespace;
this.propertyName = propertyName;
this.oldValue = oldValue;
this.newValue = newValue;
this.changeType = changeType;
}
public String getPropertyName() {
return propertyName;
}
public String getOldValue() {
return oldValue;
}
public String getNewValue() {
return newValue;
}
public PropertyChangeType getChangeType() {
return changeType;
}
public void setOldValue(String oldValue) {
this.oldValue = oldValue;
}
public void setNewValue(String newValue) {
this.newValue = newValue;
}
public void setChangeType(PropertyChangeType changeType) {
this.changeType = changeType;
}
public String getNamespace() {
return namespace;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("ConfigChange{");
sb.append("namespace='").append(namespace).append('\'');
sb.append(", propertyName='").append(propertyName).append('\'');
sb.append(", oldValue='").append(oldValue).append('\'');
sb.append(", newValue='").append(newValue).append('\'');
sb.append(", changeType=").append(changeType);
sb.append('}');
return sb.toString();
}
}
|
[
"wujun728@hotmail.com"
] |
wujun728@hotmail.com
|
afa9208b04b62ca530074abdd6d2118e6ada261e
|
2de257be8dc9ffc70dd28988e7a9f1b64519b360
|
/tags/rds-0.14.1/src/datascript/ast/Scope.java
|
3f972b6b6959548a13951eec27ae8fb589f4d53c
|
[] |
no_license
|
MichalLeonBorsuk/datascript-svn
|
f141e5573a1728b006a13a0852a5ebb0495177f8
|
8a89530c50cdfde43696eb7309767d45979e2f40
|
refs/heads/master
| 2020-04-13T03:11:45.133544
| 2010-04-06T13:04:03
| 2010-04-06T13:04:03
| 162,924,533
| 0
| 1
| null | 2018-12-23T21:18:53
| 2018-12-23T21:18:52
| null |
UTF-8
|
Java
| false
| false
| 7,800
|
java
|
/* BSD License
*
* Copyright (c) 2006, Harald Wellmann, Harman/Becker Automotive Systems
* All rights reserved.
*
* This software is derived from previous work
* Copyright (c) 2003, Godmar Back.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of Harman/Becker Automotive Systems or
* Godmar Back nor the names of their contributors may be used to
* endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package datascript.ast;
import java.util.HashMap;
import java.util.List;
import java.util.Vector;
import antlr.collections.AST;
import datascript.antlr.util.TokenAST;
import datascript.antlr.util.ToolContext;
/**
* This class implements the Context interface and thus provides a lexical
* scope for symbols. In addition, it stores link actions to be resolved within
* this scope after parsing all translation units.
*/
public class Scope implements Context, LinkAction
{
/**
* Symbol table containing local symbols defined within the current scope.
* Each symbol is mapped to an Object.
*/
private HashMap<String, Object> symbolTable = new HashMap<String, Object>();
/**
* Scope containing the current one. null for the package scope.
*/
private Scope parentScope;
/**
* If this scope is defined by a compound or enumeration type, owner
* is the corresponding type.
*/
private TypeInterface owner;
/**
* Current field of the compound containing an expression to be evaluated.
* To be used in cases where the result depends on the field, and not on
* the compound type alone.
*
* (Currently only used for the array$index operator.)
*/
private Field currentField;
/**
* List of link actions to be executed within this scope.
* All children of this scope post a link action for themselved on creation.
* Thus when linking this scope, all subscopes will be linked automatically.
*/
private List<LinkAction> linkActions = new Vector<LinkAction>();
/**
* Constructs scope without parent.
*/
public Scope()
{
this(null);
}
/**
* Constructs scope with given parent and posts a link action for this scope
* with the parent.
* @param parentScope parent of current scope
*/
public Scope(Scope parentScope)
{
this.parentScope = parentScope;
if (parentScope != null)
{
parentScope.postLinkAction(this);
}
}
public TypeInterface getOwner()
{
return owner;
}
/**
* Sets owner of current scope. The owner is a compound or enumeration type.
*
* @param owner type defining this scope
*/
public void setOwner(TypeInterface owner)
{
this.owner = owner;
}
public Field getCurrentField()
{
return currentField;
}
public void setCurrentField(Field f)
{
currentField = f;
}
/**
* get this symbol from this or a parent scope
*/
public Object getSymbol(String name)
{
Object obj = symbolTable.get(name);
if (obj == null && parentScope != null)
return parentScope.getSymbol(name);
return obj;
}
public TypeInterface getType(String name)
{
Object obj = getSymbol(name);
if (obj == null)
{
if (parentScope != null)
{
obj = parentScope.getType(name);
}
}
return (obj instanceof TypeInterface) ? (TypeInterface)obj : null;
}
/**
* Get the owner in whose scope this symbol is defined.
*/
public CompoundType getDefiningType(String name)
{
Object obj = symbolTable.get(name);
if (obj == null)
{
if (parentScope == null)
{
return null;
}
else
{
return ((Scope)parentScope).getDefiningType(name);
}
}
else
{
return (CompoundType) owner;
}
}
/**
* Get this symbol from this scope, without recursion to parent scope.
* @param name symbol to be looked up
*/
public Object getSymbolFromThis(String name)
{
Object obj = symbolTable.get(name);
return obj;
}
/**
* Adds an entry to the symbol table of this scope. Logs an error if a
* a symbol with the given name is already defined in the current scope.
* @param node syntax tree node containing the symbol (getText())
* @param obj corresponding object
*/
public void setSymbol(AST node, Object obj)
{
Object o = symbolTable.put(node.getText(), obj);
if (o != null)
ToolContext.logError((TokenAST)node, "'" + node.getText()
+ "' is already defined in this scope");
}
/**
* Same as setSymbol. Only for package scopes, types receive a special
* handling.
* @param node syntax tree node containing the symbol (getText())
* @param obj corresponding object
*/
public void setTypeSymbol(AST node, Object type)
{
setSymbol(node, type);
getPackage().setTypeSymbol(node, type);
}
public Context getParentScope()
{
return parentScope;
}
public void postLinkAction(LinkAction act)
{
linkActions.add(act);
}
public void link(Context ctxt)
{
for (LinkAction l : linkActions)
{
l.link(this);
}
}
/**
* Returns the package containing this scope.
* @return enclosing package, or null.
*/
public Package getPackage()
{
if (parentScope == null)
return null;
return parentScope.getPackage();
}
/**
* Looks up a type with a given name in the current package and in imported
* packages. If no such type exists, another lookup will be performed within
* the current package for any objects which are not types.
*
* @param name symbol to be looked up
* @return a type from the current or any imported package, or any object
* from the current package.
*/
public Object getTypeOrSymbol(String name)
{
Object obj = getType(name);
if (obj == null)
{
obj = getSymbol(name);
}
return obj;
}
}
|
[
"hwellmann@7eccfe4a-4f19-0410-86c7-be9599f3b344"
] |
hwellmann@7eccfe4a-4f19-0410-86c7-be9599f3b344
|
456e0827f8bf5a53dea82c8d3fd97fbfab2a9452
|
40722945c289208a6aabfab60468df34432ad3e3
|
/mods/tinker/tconstruct/items/blocks/StainedGlassClearItem.java
|
2a134e4826fe29cc97f072ac87a410a0b50ce971
|
[
"CC-BY-3.0",
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] |
permissive
|
izstas/TinkersConstruct
|
c0c032a4384cbc78f4002f0dba19674e81dcecd6
|
899219fd8a60ba0a36eaacda7ed8772117d5133f
|
refs/heads/master
| 2020-04-07T07:28:34.852107
| 2013-08-18T00:57:09
| 2013-08-18T00:57:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,032
|
java
|
package mods.tinker.tconstruct.items.blocks;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
public class StainedGlassClearItem extends ItemBlock
{
public static final String blockType[] = { "white", "orange", "magenta", "lightblue", "yellow", "lime", "pink", "gray", "lightgray", "cyan", "purple", "blue", "brown", "green", "red", "black" };
public StainedGlassClearItem(int id)
{
super(id);
setMaxDamage(0);
setHasSubtypes(true);
}
public int getMetadata (int meta)
{
return meta;
}
public String getUnlocalizedName (ItemStack itemstack)
{
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
return (new StringBuilder()).append("block.stainedglass.").append(blockType[pos]).toString();
}
}
|
[
"merdiwendiyo@gmail.com"
] |
merdiwendiyo@gmail.com
|
c59d3d668b9bf04f195e1018dc798a25062561b1
|
0214aadd5265a9a280c73e7e5a0950104e9c5ecb
|
/template-maven/power/app/ums-common-dal/src/main/java/net/zoneland/ums/common/dal/bo/AppMsgInfoBO.java
|
98d011756b5cbd4d38e954ab882581c543112b84
|
[] |
no_license
|
foodoon-guda/guda
|
d78d7375895cc7e0edfa2496d3f2df986cceaf30
|
df7fd7eaa50b0d610b050d588455aeb120b85aed
|
refs/heads/master
| 2016-09-05T12:25:23.620070
| 2014-07-28T05:14:00
| 2014-07-28T05:14:00
| 21,302,564
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,067
|
java
|
/**
* zoneland.net Inc.
* Copyright (c) 2002-2012 All Rights Reserved.
*/
package net.zoneland.ums.common.dal.bo;
import java.util.Date;
import net.zoneland.ums.common.dal.dataobject.UmsAppInfo;
import net.zoneland.ums.common.dal.dataobject.UmsAppSub;
import net.zoneland.ums.common.dal.dataobject.UmsUserInfo;
/**
*
* @author XuFan
* @version $Id: AppMsgInfoBO.java, v 0.1 Aug 22, 2012 9:21:27 AM XuFan Exp $
*/
public class AppMsgInfoBO extends BasePojo {
/** */
private static final long serialVersionUID = 4221550929607193343L;
private String id;
private String userId;
private String phone;
private String status;
private String appId;
private String subApp;
private Date gmtCreated;
private String recvId;
private String sendId;
private UmsAppInfo app;
private UmsAppSub sub;
private UmsUserInfo user;
private String appName;
private String gatewaytype;
private String msgdestName; //发送人员
private String msgsrcName; //接收人员
private String content;
private String orgNo; // 组织号,营销系统产生
private String flowNo; // 流程号,营销系统产生
private String createUser; // 生成人员,营销系统产生
private String bizName; // 业务系统,营销系统产生
private String bizType; // 业务类型,营销系统产生
/**
* Getter method for property <tt>orgNo</tt>.
*
* @return property value of orgNo
*/
public String getOrgNo() {
return orgNo;
}
/**
* Setter method for property <tt>orgNo</tt>.
*
* @param orgNo value to be assigned to property orgNo
*/
public void setOrgNo(String orgNo) {
this.orgNo = orgNo;
}
/**
* Getter method for property <tt>flowNo</tt>.
*
* @return property value of flowNo
*/
public String getFlowNo() {
return flowNo;
}
/**
* Setter method for property <tt>flowNo</tt>.
*
* @param flowNo value to be assigned to property flowNo
*/
public void setFlowNo(String flowNo) {
this.flowNo = flowNo;
}
/**
* Getter method for property <tt>createUser</tt>.
*
* @return property value of createUser
*/
public String getCreateUser() {
return createUser;
}
/**
* Setter method for property <tt>createUser</tt>.
*
* @param createUser value to be assigned to property createUser
*/
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
/**
* Getter method for property <tt>bizName</tt>.
*
* @return property value of bizName
*/
public String getBizName() {
return bizName;
}
/**
* Setter method for property <tt>bizName</tt>.
*
* @param bizName value to be assigned to property bizName
*/
public void setBizName(String bizName) {
this.bizName = bizName;
}
/**
* Getter method for property <tt>bizType</tt>.
*
* @return property value of bizType
*/
public String getBizType() {
return bizType;
}
/**
* Setter method for property <tt>bizType</tt>.
*
* @param bizType value to be assigned to property bizType
*/
public void setBizType(String bizType) {
this.bizType = bizType;
}
/**
* Getter method for property <tt>serialversionuid</tt>.
*
* @return property value of serialVersionUID
*/
public static long getSerialversionuid() {
return serialVersionUID;
}
public String getMsgdestName() {
return msgdestName;
}
public void setMsgdestName(String msgdestName) {
this.msgdestName = msgdestName;
}
public String getMsgsrcName() {
return msgsrcName;
}
public void setMsgsrcName(String msgsrcName) {
this.msgsrcName = msgsrcName;
}
public String getGatewaytype() {
return gatewaytype;
}
public void setGatewaytype(String gatewaytype) {
this.gatewaytype = gatewaytype;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getRecvId() {
return recvId;
}
public void setRecvId(String recvId) {
this.recvId = recvId;
}
public String getSendId() {
return sendId;
}
public void setSendId(String sendId) {
this.sendId = sendId;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getSubApp() {
return subApp;
}
public void setSubApp(String subApp) {
this.subApp = subApp;
}
public Date getGmtCreated() {
return gmtCreated;
}
public void setGmtCreated(Date gmtCreated) {
this.gmtCreated = gmtCreated;
}
public UmsAppInfo getApp() {
return app;
}
public void setApp(UmsAppInfo app) {
this.app = app;
}
public UmsAppSub getSub() {
return sub;
}
public void setSub(UmsAppSub sub) {
this.sub = sub;
}
public UmsUserInfo getUser() {
return user;
}
public void setUser(UmsUserInfo user) {
this.user = user;
}
/**
* Getter method for property <tt>appName</tt>.
*
* @return property value of appName
*/
public String getAppName() {
return appName;
}
/**
* Setter method for property <tt>appName</tt>.
*
* @param appName value to be assigned to property appName
*/
public void setAppName(String appName) {
this.appName = appName;
}
/**
* Getter method for property <tt>content</tt>.
*
* @return property value of content
*/
public String getContent() {
return content;
}
/**
* Setter method for property <tt>content</tt>.
*
* @param content value to be assigned to property content
*/
public void setContent(String content) {
this.content = content;
}
}
|
[
"foodoon@qq.com"
] |
foodoon@qq.com
|
425eb67d5b84e40ef538ed91a407bf2c55a973f8
|
4b0cdc84fe1330eb1ad602669c2735ce995139d3
|
/webfx-stack-orm-domainmodel-service/src/main/java/module-info.java
|
c68bad7e1e2d6436b853a1337621b6743345ae60
|
[
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] |
permissive
|
webfx-project/webfx-stack
|
8f991a1552336dcad4a05883429ebe2c38aca2d1
|
0deeffe2509dcc6b24b776cbf2635f8605643f6c
|
refs/heads/main
| 2023-08-17T00:13:43.321212
| 2023-08-14T16:33:40
| 2023-08-14T16:33:40
| 513,490,539
| 0
| 2
|
Apache-2.0
| 2023-08-31T10:13:59
| 2022-07-13T11:15:37
|
Java
|
UTF-8
|
Java
| false
| false
| 636
|
java
|
// File managed by WebFX (DO NOT EDIT MANUALLY)
module webfx.stack.orm.domainmodel.service {
// Direct dependencies modules
requires java.base;
requires webfx.extras.label;
requires webfx.extras.type;
requires webfx.platform.async;
requires webfx.platform.console;
requires webfx.platform.util;
requires webfx.stack.db.query;
requires webfx.stack.orm.domainmodel;
// Exported packages
exports dev.webfx.stack.orm.domainmodel.service;
exports dev.webfx.stack.orm.domainmodel.service.spi;
// Used services
uses dev.webfx.stack.orm.domainmodel.service.spi.DomainModelProvider;
}
|
[
"dev.salmonb@gmail.com"
] |
dev.salmonb@gmail.com
|
bc095ee1a1c02e17a79cc8d48f0f0d99cda6ede9
|
b4fd07a18a9b13852d60b6e51fa67b7c8a000d6f
|
/senpure-io/senpure-io-server/src/main/java/com/senpure/io/server/protocol/message/SCBreakUserGatewayMessage.java
|
bfe6b66378a0ef57169bdeac7f0501fab3c13956
|
[] |
no_license
|
senpure/senpure-2022
|
0ec97738d4506f101f59f8ca192291b51594dec4
|
c0c820a4262e74d8648eb93f2a3c5f2a325c801e
|
refs/heads/master
| 2023-05-07T13:44:12.082251
| 2021-04-30T05:12:00
| 2021-04-30T05:12:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,689
|
java
|
package com.senpure.io.server.protocol.message;
import com.senpure.io.protocol.CompressMessage;
import io.netty.buffer.ByteBuf;
/**
* 断开用户与网关
*
* @author senpure
* @time 2020-11-20 17:37:42
*/
public class SCBreakUserGatewayMessage extends CompressMessage {
public static final int MESSAGE_ID = 110;
public void copy(SCBreakUserGatewayMessage source) {
}
/**
* 写入字节缓存
*/
@Override
public void write(ByteBuf buf) {
serializedSize();
}
/**
* 读取字节缓存
*/
@Override
public void read(ByteBuf buf, int maxIndex) {
while (true) {
int tag = readTag(buf, maxIndex);
switch (tag) {
case 0://end
return;
default://skip
skip(buf, tag);
break;
}
}
}
private int serializedSize = -1;
@Override
public int serializedSize() {
int size = serializedSize;
if (size != -1) {
return size;
}
size = 0;
serializedSize = size ;
return size ;
}
@Override
public int messageId() {
return 110;
}
@Override
public String toString() {
return "SCBreakUserGatewayMessage[110]{"
+ "}";
}
@Override
public String toString(String indent) {
indent = indent == null ? "" : indent;
StringBuilder sb = new StringBuilder();
sb.append("SCBreakUserGatewayMessage").append("[110]").append("{");
sb.append("\n");
sb.append(indent).append("}");
return sb.toString();
}
}
|
[
"senpure@senpure.com"
] |
senpure@senpure.com
|
783255b72dce62c5fa06c1178d4ca3b31ad4f0d4
|
d654590ad9962cf5a039ed9da7ae892edb01bd2e
|
/reverse-kubernetes-model/generated/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/api/model/StorageOSPersistentVolumeSource.java
|
533f4e6c54fc7b43fff32d001b9e9b2de0e2a85b
|
[] |
no_license
|
Arnaud-Nauwynck/test-snippets
|
d3a314f61bddaeb6e6a5ed3fafd1932c72637f1d
|
a088bc1252bc677fbc70ee630da15b0a625d4a46
|
refs/heads/master
| 2023-07-19T15:04:38.067591
| 2023-07-09T14:55:50
| 2023-07-09T14:55:50
| 6,697,535
| 9
| 19
| null | 2023-03-02T00:25:17
| 2012-11-15T00:52:21
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 348
|
java
|
package io.fabric8.kubernetes.api.model;
import javax.annotation.Generated;
@Generated("jsonschema2pojo")
public class StorageOSPersistentVolumeSource implements KubernetesResource
{
public String fsType;
public boolean readOnly;
public ObjectReference secretRef;
public String volumeName;
public String volumeNamespace;
}
|
[
"arnaud.nauwynck@gmail.com"
] |
arnaud.nauwynck@gmail.com
|
3a98bdb3b34599723fe7ebb775b696d9d85173b1
|
8410644e1fc643f913820ecb40a335ef4e179b92
|
/lion-registry/lion-registry-api/src/test/java/com/lion/registry/api/AppTest.java
|
df4dbfd72f3394624c9472cfe95ab5b51d25fc92
|
[] |
no_license
|
zogwei/lion
|
c1044382710450f52b74d9572b8cc7ab83e7c89e
|
3d8bf532b13a8b48e0076fa5d208195b28ba6d88
|
refs/heads/master
| 2020-04-12T03:55:35.615082
| 2017-12-23T09:08:40
| 2017-12-23T09:08:40
| 64,929,861
| 0
| 0
| null | 2017-05-25T01:41:35
| 2016-08-04T11:40:28
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 649
|
java
|
package com.lion.registry.api;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}
|
[
"zogwei@gmail.com"
] |
zogwei@gmail.com
|
032e6704dc2377b298dc4fa44970349a09fc220f
|
e682fa3667adce9277ecdedb40d4d01a785b3912
|
/internal/fischer/mangf/A267383.java
|
cafd918c9b8af1454dbf1afda4cb2641ac3ea5a5
|
[
"Apache-2.0"
] |
permissive
|
gfis/joeis-lite
|
859158cb8fc3608febf39ba71ab5e72360b32cb4
|
7185a0b62d54735dc3d43d8fb5be677734f99101
|
refs/heads/master
| 2023-08-31T00:23:51.216295
| 2023-08-29T21:11:31
| 2023-08-29T21:11:31
| 179,938,034
| 4
| 1
|
Apache-2.0
| 2022-06-25T22:47:19
| 2019-04-07T08:35:01
|
Roff
|
UTF-8
|
Java
| false
| false
| 1,993
|
java
|
package irvine.oeis.a267;
import irvine.math.MemoryFunctionInt2;
import irvine.math.z.Integers;
import irvine.math.z.Stirling;
import irvine.math.z.Z;
import irvine.oeis.triangle.UpperLeftTriangle;
/**
* A267383 Number A(n,k) of acyclic orientations of the Turán graph T(n,k); square array A(n,k), n>=0, k>=1, read by antidiagonals.
* @author Georg Fischer
*/
public class A267383 extends UpperLeftTriangle {
/** Construct the sequence. */
public A267383() {
super(0, 1, -1);
hasRAM(true);
}
/* Maple:
A:= proc(n, k) option remember; local b, l, q; q:=-1;
l:= [floor(n/k)$(k-irem(n,k)), ceil(n/k)$irem(n,k)];
b:= proc(n, j) option remember; `if`(j=1, (q-n)^l[1]*
mul(q-i, i=0..n-1), add(b(n+m, j-1)*
Stirling2(l[j], m), m=0..l[j]))
end; forget(b);
abs(b(0, k))
end:
seq(seq(A(n, 1+d-n), n=0..d), d=0..14);
*/
private final MemoryFunctionInt2<Z> mA = new MemoryFunctionInt2<Z>() {
@Override
protected Z compute(final int n, final int k) {
int q = -1;
int[] l = new int[k + 1];
l[0] = 0; // not used
final int floorNk = k > 0 ? n / k : 0; // for safety, k==0 is not used
final int ceilNk = k > 0 ? (n + k - 1) / k : 0;
final int irem = k > 0 ? n % k : 0;
for (int i = 1; i <= k; ++i) {
l[i] = (i <= k - irem) ? floorNk : ceilNk;
}
final MemoryFunctionInt2<Z> mB = new MemoryFunctionInt2<Z>() {
@Override
protected Z compute(final int n, final int j) {
if (j == 1) {
return Z.valueOf(q - n).pow(l[1]).multiply(Integers.SINGLETON.product(0, n-1, i -> Z.valueOf(q - i)));
}
return Integers.SINGLETON.sum(0, l[j], m -> get(n + m, j - 1).multiply(Stirling.secondKind(l[j], m)));
}
};
return mB.get(0, k).abs();
}
};
@Override
public Z matrixElement(final int n, final int k) {
return mA.get(n, k);
}
}
|
[
"dr.Georg.Fischer@gmail.com"
] |
dr.Georg.Fischer@gmail.com
|
e6b6b4fa1f48de987a6240d32b79361f772ac67f
|
6752dfd6b8c4ae6c6ea0776b5fc5a90fa4b15eac
|
/2.JavaCore/src/com/javarush/task/task20/task2023/Solution.java
|
47d5d497b9940a6d73cd04621fbe48e19912b6c9
|
[] |
no_license
|
mabutamail/JavaRushTasks
|
499937939e6a661b69bb33302f018d68a8ffcb7c
|
fff69a9b924de8fdcfeb88ec19222695f7539251
|
refs/heads/master
| 2020-05-03T13:17:41.593832
| 2020-02-11T19:21:41
| 2020-02-11T19:21:41
| 173,681,846
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,177
|
java
|
package com.javarush.task.task20.task2023;
/*
Делаем правильный вывод
Расставить обращение к методам суперкласса и модификаторы доступа так,
чтобы вывод на экран был следующим:
C class, method2
A class, method2
A class, method1
B class, method1
1. Из одного метода можно вызвать только один метод суперкласса.
2. Из одного метода можно вызвать только один метод класса.
3. Можно менять модификаторы доступа к методам.
Требования:
1. Вывод на экран должен соответствовать условию задачи.
2. Метод method1 должен быть объявлен с модификатором доступа private в классе A.
3. Метод method1 в классе B должен содержать вызов super.method2().
4. Метод method2 в классе С должен содержать вызов super.method1().
5. Метод method2 в классе A должен содержать вызов method1().
*/
public class Solution {
public static void main(String[] s) {
A a = new C();
a.method2();
}
public static class A {
private void method1() {
System.out.println("A class, method1");//5
}
public void method2() {
System.out.println("A class, method2");//3
method1();//4
}
}
public static class B extends A {
public void method1() {
super.method2();//2
System.out.println("B class, method1");//6
}
public void method2() { //не используется
System.out.println("B class, method2");
}
}
private static class C extends B {
public void method1() {
System.out.println("C class, method1");
}
public void method2() {
System.out.println("C class, method2");//0
//super.method1();//1
}
}
}
|
[
"mabutamail@gmail.com"
] |
mabutamail@gmail.com
|
a78931e0fcfeb834ab181fc1e0887857f7449d98
|
ebebad707ff2d3b15b28c1a5085eedb8fbaa208e
|
/test-projects/AlgebraProgram/src/main/Main.java
|
224afac634d4ff69c91712116d6d22127e041428
|
[
"Apache-2.0"
] |
permissive
|
Gabriel-Baril/random-java-projects
|
c7cc8eeb78d1ae9571c9b22a9d4f273877b4dd5d
|
cd1b942b3f4b2620b561335ad4515129c2415b2f
|
refs/heads/master
| 2023-08-25T11:56:02.440797
| 2021-10-13T05:44:29
| 2021-10-13T05:44:29
| 416,587,617
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,945
|
java
|
package main;
import java.util.ArrayList;
import algebra.Expression;
import algebra.connector.Addition;
import algebra.connector.Connector;
import algebra.connector.Division;
import algebra.connector.Multiplication;
import algebra.term.LogTerm;
import algebra.term.ParenthesisTerm;
import algebra.term.PolynomialTerm;
import algebra.term.RootTerm;
import algebra.term.Term;
import database.LayerData;
import function.PolynomialFunction;
import main.window.Window;
import utilities.Interval;
public class Main
{
public static Window window;
public static void main(String args[])
{
window = new Window();
LayerData ld = new LayerData();
System.out.println(ld.getData().get(1).getAccessCondition());
Interval interval = new Interval(-10,20,true,true);
//System.out.println(interval.toString());
double[] t1 = {1,13,-9,6,6,7,-2,3};
double[] t2 = {1,-3,5,8,-8,10,33};
double[] func = {1,-4,-27,34,56};
PolynomialFunction function = new PolynomialFunction(func);
function.analyse();
ArrayList<Term> t = new ArrayList<Term>();
ArrayList<Term> st = new ArrayList<Term>();
ArrayList<Term> lt = new ArrayList<Term>();
ArrayList<Connector> cnt_1 = new ArrayList<Connector>();
cnt_1.add(new Multiplication());
cnt_1.add(new Addition());
ArrayList<Connector> cnt_2 = new ArrayList<Connector>();
cnt_2.add(new Addition());
st.add(new PolynomialTerm(4,2));
st.add(new PolynomialTerm(2,1));
st.add(new PolynomialTerm(8,0));
RootTerm sqrtData = new RootTerm(st,cnt_1,1,3);
lt.add(sqrtData);
lt.add(new PolynomialTerm(8,4));
t.add(sqrtData);
t.add(new PolynomialTerm(5,3));
t.add(new LogTerm(lt,cnt_2,2));
t.add(new ParenthesisTerm(st,cnt_1,2));
ArrayList<Connector> cnt = new ArrayList<Connector>();
cnt.add(new Division());
cnt.add(new Multiplication());
cnt.add(new Addition());
Expression expression = new Expression(t,cnt);
expression.print();
}
}
|
[
"gabriel-baril2010@hotmail.com"
] |
gabriel-baril2010@hotmail.com
|
f0095877fb09f91825b6830bf50107549c1b1537
|
acef3734b40f00c3db23455883d2610dfbb41f7e
|
/spring-aop/src/main/java/org/springframework/aop/support/ControlFlowPointcut.java
|
2979c23cb3cf53282bdc15ca4fdae68de430726b
|
[
"Apache-2.0"
] |
permissive
|
soaryang/spring
|
50ff0e1b138307aee999c183938150e32aa87a83
|
dba1b0d3498c07f9bad6a1e856120c4f009c4edc
|
refs/heads/master
| 2023-01-07T18:42:41.622736
| 2020-10-14T17:07:40
| 2020-10-14T17:07:40
| 295,474,567
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,782
|
java
|
/*
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.support;
import org.springframework.aop.ClassFilter;
import org.springframework.aop.MethodMatcher;
import org.springframework.aop.Pointcut;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import java.io.Serializable;
import java.lang.reflect.Method;
/**
* Pointcut and method matcher for use in simple <b>cflow</b>-style pointcut.
* Note that evaluating such pointcuts is 10-15 times slower than evaluating
* normal pointcuts, but they are useful in some cases.
*
* @author Rod Johnson
* @author Rob Harrop
* @author Juergen Hoeller
*/
@SuppressWarnings("serial")
public class ControlFlowPointcut implements Pointcut, ClassFilter, MethodMatcher, Serializable {
private Class<?> clazz;
@Nullable
private String methodName;
private volatile int evaluations;
/**
* Construct a new pointcut that matches all control flows below that class.
*
* @param clazz the clazz
*/
public ControlFlowPointcut(Class<?> clazz) {
this(clazz, null);
}
/**
* Construct a new pointcut that matches all calls below the given method
* in the given class. If no method name is given, matches all control flows
* below the given class.
*
* @param clazz the clazz
* @param methodName the name of the method (may be {@code null})
*/
public ControlFlowPointcut(Class<?> clazz, @Nullable String methodName) {
Assert.notNull(clazz, "Class must not be null");
this.clazz = clazz;
this.methodName = methodName;
}
/**
* Subclasses can override this for greater filtering (and performance).
*/
@Override
public boolean matches(Class<?> clazz) {
return true;
}
/**
* Subclasses can override this if it's possible to filter out
* some candidate classes.
*/
@Override
public boolean matches(Method method, @Nullable Class<?> targetClass) {
return true;
}
@Override
public boolean isRuntime() {
return true;
}
@Override
public boolean matches(Method method, @Nullable Class<?> targetClass, Object... args) {
this.evaluations++;
for (StackTraceElement element : new Throwable().getStackTrace()) {
if (element.getClassName().equals(this.clazz.getName()) &&
(this.methodName == null || element.getMethodName().equals(this.methodName))) {
return true;
}
}
return false;
}
/**
* It's useful to know how many times we've fired, for optimization.
*/
public int getEvaluations() {
return this.evaluations;
}
@Override
public ClassFilter getClassFilter() {
return this;
}
@Override
public MethodMatcher getMethodMatcher() {
return this;
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof ControlFlowPointcut)) {
return false;
}
ControlFlowPointcut that = (ControlFlowPointcut) other;
return (this.clazz.equals(that.clazz)) && ObjectUtils.nullSafeEquals(this.methodName, that.methodName);
}
@Override
public int hashCode() {
int code = this.clazz.hashCode();
if (this.methodName != null) {
code = 37 * code + this.methodName.hashCode();
}
return code;
}
}
|
[
"asdasd"
] |
asdasd
|
e89988c59dbae2aaa70db7bfb9d73cdffebaf0c2
|
bc2a5c62da9f4dde43c78849b91ed70e6f15f41b
|
/smartpillownew/src/main/java/com/example/smartpillownew/utils/Utils.java
|
be33f9ad649f102618b8c22c3e25edc14793454c
|
[] |
no_license
|
songdairong/SmartPillow
|
8c7ebaa81ba3712a01a81544a90298df9e7bf359
|
88d25f653de2d5439d0c864b8c1286b32cf7def7
|
refs/heads/master
| 2023-01-05T13:24:24.568515
| 2020-10-30T03:13:08
| 2020-10-30T03:13:08
| 308,507,373
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 920
|
java
|
package com.example.smartpillownew.utils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Created by a450J on 2018/8/22.
*/
public class Utils {
/**判断是否为正确的手机号
* @param mobiles
* @return
*/
public static boolean isMobileNO(String mobiles) {
Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$");
Matcher m = p.matcher(mobiles);
return m.matches();
}
/**返回整数部分数据
* @param data
* @return
*/
public static int RetInteger(String data){
String[] datas = data.split("\\.");
return Integer.valueOf(datas[0]);
}
/**返回0~a偶数的数目
* @param a
* @return
*/
public static int EvenNumber(int a){
a++;
if (a%2==0){
return a/2;
}else {
return (a+1)/2;
}
}
}
|
[
"tony@gmail.com"
] |
tony@gmail.com
|
02d0fe7aee4c5a2dbce2ed94c6f74ddbeed22231
|
4b954dbad1d42681157eee475d6cd1fa57628e1d
|
/module2/src/demo/review_ep_kieu_du_lieu/Person.java
|
1452401fc855491261b0a2217382f4f1c35f682a
|
[] |
no_license
|
hongson2410/C1020G1-PhamHongSon
|
c5466a068154f7cfcfb6a2c0c2f47bd90ff9f7ab
|
ae10660a5de6d9c3018a64f238dd34897f6ad2c2
|
refs/heads/main
| 2023-04-11T10:55:26.730907
| 2021-04-18T10:20:00
| 2021-04-18T10:20:00
| 307,275,086
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 878
|
java
|
package demo.review_ep_kieu_du_lieu;
public class Person{
private String name;
private int age;
public Person() {
}
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public String getName() {
return name;
}
void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return "Person{" +
"name='" + name + '\'' +
", age=" + age +
'}';
}
public void showInfo(){
System.out.println("Person: " + this.getName());
}
public static void main(String[] args) {
Person person = new Person();
System.out.println(person.toString());
}
}
|
[
"phamhongson2410@gmail.com"
] |
phamhongson2410@gmail.com
|
831c938b4518a71d830b1875280e6b0c3dfbbe79
|
6cfab0fcbfdf8b36d6ea01003867163b17579f4a
|
/base/JH-Publish/src/main/java/com/jh/briefing/entity/TemplateReporter.java
|
e5f01590435215602114fd3e09a0f4440ce9c196
|
[] |
no_license
|
Fairy008/JiaHeDC
|
ac5ed60ae3db608d8656957ce0b0364c2253e51b
|
bf31ffe8f452f33d2554dd587770467cecd994ee
|
refs/heads/master
| 2020-12-27T13:42:30.153810
| 2020-02-02T10:28:31
| 2020-02-02T10:28:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,615
|
java
|
package com.jh.briefing.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 简报管理
*/
public class TemplateReporter {
private Long reporterId;//简报编号
private Long regionId; //区域编号
private Integer cropsId;//作物编号
private String reporterName;//简报名称
private String reporterContent;//简报内容
private String reporterMobileContent;//简报手机版内容
private String flag;//获取简报类型 1:预览,2:编辑
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;//创建时间
private String creator;//创建者
private Integer audisState;//审核状态
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate reportDataTimeStart;//数据开始时间
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate reportDataTimeEnd;//数据结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime modifyTime;//更新时间
private String modifier;//更新人
private Integer templateId;//模板编号
private String reportChartPc;//PC端简报路径
private String reportChartMobile;//手机端简报路径
private Integer type;//1pc端 2mobile
public Long getReporterId() {
return reporterId;
}
public void setReporterId(Long reporterId) {
this.reporterId = reporterId;
}
public String getReporterName() {
return reporterName;
}
public void setReporterName(String reporterName) {
this.reporterName = reporterName == null ? null : reporterName.trim();
}
public String getReporterContent() {
return reporterContent;
}
public void setReporterContent(String reporterContent) {
this.reporterContent = reporterContent == null ? null : reporterContent.trim();
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator == null ? null : creator.trim();
}
public Integer getAudisState() {
return audisState;
}
public void setAudisState(Integer audisState) {
this.audisState = audisState;
}
public Long getRegionId() {
return regionId;
}
public void setRegionId(Long regionId) {
this.regionId = regionId;
}
public Integer getCropsId() {
return cropsId;
}
public void setCropsId(Integer cropsId) {
this.cropsId = cropsId;
}
public LocalDate getReportDataTimeStart() {
return reportDataTimeStart;
}
public void setReportDataTimeStart(LocalDate reportDataTimeStart) {
this.reportDataTimeStart = reportDataTimeStart;
}
public LocalDate getReportDataTimeEnd() {
return reportDataTimeEnd;
}
public void setReportDataTimeEnd(LocalDate reportDataTimeEnd) {
this.reportDataTimeEnd = reportDataTimeEnd;
}
public String getModifier() {
return modifier;
}
public void setModifier(String modifier) {
this.modifier = modifier == null ? null : modifier.trim();
}
public Integer getTemplateId() {
return templateId;
}
public void setTemplateId(Integer templateId) {
this.templateId = templateId;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public LocalDateTime getModifyTime() {
return modifyTime;
}
public void setModifyTime(LocalDateTime modifyTime) {
this.modifyTime = modifyTime;
}
public String getReporterMobileContent() {
return reporterMobileContent;
}
public void setReporterMobileContent(String reporterMobileContent) {
this.reporterMobileContent = reporterMobileContent;
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public String getReportChartPc() {
return reportChartPc;
}
public void setReportChartPc(String reportChartPc) {
this.reportChartPc = reportChartPc;
}
public String getReportChartMobile() {
return reportChartMobile;
}
public void setReportChartMobile(String reportChartMobile) {
this.reportChartMobile = reportChartMobile;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
|
[
"fanglei613@hotmail.com"
] |
fanglei613@hotmail.com
|
bde289b15edb2a9bd045998b71a01b4cc0fbec83
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Gson-17/com.google.gson.DefaultDateTypeAdapter/BBC-F0-opt-100/tests/15/com/google/gson/DefaultDateTypeAdapter_ESTest_scaffolding.java
|
734f24f34a24c378d6a1dd1a9d8f8ff6839a2da1
|
[
"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
| 7,592
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Oct 20 23:06:12 GMT 2021
*/
package com.google.gson;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class DefaultDateTypeAdapter_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "com.google.gson.DefaultDateTypeAdapter";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DefaultDateTypeAdapter_ESTest_scaffolding.class.getClassLoader() ,
"com.google.gson.JsonParseException",
"com.google.gson.stream.JsonReader$1",
"com.google.gson.JsonObject",
"com.google.gson.internal.bind.JsonTreeReader$1",
"com.google.gson.TypeAdapter$1",
"com.google.gson.internal.$Gson$Preconditions",
"com.google.gson.JsonSyntaxException",
"com.google.gson.TypeAdapter",
"com.google.gson.internal.bind.JsonTreeWriter",
"com.google.gson.stream.JsonReader",
"com.google.gson.internal.bind.util.ISO8601Utils",
"com.google.gson.JsonElement",
"com.google.gson.stream.MalformedJsonException",
"com.google.gson.stream.JsonToken",
"com.google.gson.JsonArray",
"com.google.gson.internal.bind.JsonTreeReader",
"com.google.gson.internal.bind.JsonTreeWriter$1",
"com.google.gson.internal.JsonReaderInternalAccess",
"com.google.gson.JsonNull",
"com.google.gson.JsonIOException",
"com.google.gson.DefaultDateTypeAdapter",
"com.google.gson.JsonPrimitive",
"com.google.gson.stream.JsonWriter",
"com.google.gson.internal.LazilyParsedNumber"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DefaultDateTypeAdapter_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"com.google.gson.TypeAdapter",
"com.google.gson.DefaultDateTypeAdapter",
"com.google.gson.stream.JsonToken",
"com.google.gson.internal.bind.util.ISO8601Utils",
"com.google.gson.internal.JsonReaderInternalAccess",
"com.google.gson.stream.JsonReader$1",
"com.google.gson.stream.JsonReader",
"com.google.gson.stream.JsonWriter",
"com.google.gson.JsonElement",
"com.google.gson.JsonObject",
"com.google.gson.internal.LinkedTreeMap$1",
"com.google.gson.internal.LinkedTreeMap",
"com.google.gson.internal.LinkedTreeMap$Node",
"com.google.gson.TypeAdapter$1",
"com.google.gson.stream.MalformedJsonException",
"com.google.gson.internal.bind.JsonTreeWriter$1",
"com.google.gson.JsonPrimitive",
"com.google.gson.internal.$Gson$Preconditions",
"com.google.gson.internal.bind.JsonTreeWriter",
"com.google.gson.JsonNull",
"com.google.gson.JsonArray",
"com.google.gson.internal.bind.JsonTreeReader$1",
"com.google.gson.internal.bind.JsonTreeReader",
"com.google.gson.JsonParseException",
"com.google.gson.JsonSyntaxException",
"com.google.gson.internal.LinkedTreeMap$EntrySet",
"com.google.gson.internal.LinkedTreeMap$LinkedTreeMapIterator",
"com.google.gson.internal.LinkedTreeMap$EntrySet$1",
"com.google.gson.internal.LazilyParsedNumber",
"com.google.gson.internal.Streams",
"com.google.gson.internal.bind.TypeAdapters$6",
"com.google.gson.internal.bind.TypeAdapters$32",
"com.google.gson.internal.bind.TypeAdapters$5",
"com.google.gson.internal.bind.TypeAdapters$7",
"com.google.gson.internal.bind.TypeAdapters$8",
"com.google.gson.internal.bind.TypeAdapters$33",
"com.google.gson.internal.bind.TypeAdapters$9",
"com.google.gson.internal.bind.TypeAdapters$10",
"com.google.gson.internal.bind.TypeAdapters$11",
"com.google.gson.internal.bind.TypeAdapters$1",
"com.google.gson.internal.bind.TypeAdapters$2",
"com.google.gson.internal.bind.TypeAdapters$3",
"com.google.gson.internal.bind.TypeAdapters$12",
"com.google.gson.internal.bind.TypeAdapters$13",
"com.google.gson.internal.bind.TypeAdapters$14",
"com.google.gson.internal.bind.TypeAdapters$15",
"com.google.gson.internal.bind.TypeAdapters$16",
"com.google.gson.internal.bind.TypeAdapters$17",
"com.google.gson.internal.bind.TypeAdapters$18",
"com.google.gson.internal.bind.TypeAdapters$19",
"com.google.gson.internal.bind.TypeAdapters$20",
"com.google.gson.internal.bind.TypeAdapters$21",
"com.google.gson.internal.bind.TypeAdapters$22",
"com.google.gson.internal.bind.TypeAdapters$23",
"com.google.gson.internal.bind.TypeAdapters$24",
"com.google.gson.internal.bind.TypeAdapters$35",
"com.google.gson.internal.bind.TypeAdapters$25",
"com.google.gson.internal.bind.TypeAdapters$4",
"com.google.gson.internal.bind.TypeAdapters$26",
"com.google.gson.internal.bind.TypeAdapters$27",
"com.google.gson.internal.bind.TypeAdapters$34",
"com.google.gson.internal.bind.TypeAdapters$28",
"com.google.gson.internal.bind.TypeAdapters$29",
"com.google.gson.internal.bind.TypeAdapters$30",
"com.google.gson.internal.bind.TypeAdapters"
);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
c756527afb58388cdf9c03630d309f8df67c600a
|
40e1bb5656e2f7b34e7fca5ddfe993d700f237cf
|
/crawler/src/com/xdtech/platform/crawler/protocol/httpclient/DummyX509TrustManager.java
|
58005ed1e2cf97099a65876f1cbc8b227b3edc0e
|
[] |
no_license
|
psychic0111/cloudcrawler
|
7d794ef5be7338091d1f8a96a15131f058a6805c
|
3c2470c19284b2b15f5519755a08daddb24e5ce8
|
refs/heads/master
| 2016-08-04T19:05:55.275350
| 2013-09-06T06:46:44
| 2013-09-06T06:46:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,815
|
java
|
package com.xdtech.platform.crawler.protocol.httpclient;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
public class DummyX509TrustManager implements X509TrustManager {
private X509TrustManager standardTrustManager = null;
/**
* Constructor for DummyX509TrustManager.
*/
public DummyX509TrustManager(KeyStore keystore) throws NoSuchAlgorithmException, KeyStoreException {
super();
TrustManagerFactory factory = TrustManagerFactory.getInstance("SunX509");
factory.init(keystore);
TrustManager[] trustmanagers = factory.getTrustManagers();
if (trustmanagers.length == 0) {
throw new NoSuchAlgorithmException("SunX509 trust manager not supported");
}
this.standardTrustManager = (X509TrustManager) trustmanagers[0];
}
/**
* @see javax.net.ssl.X509TrustManager#isClientTrusted(X509Certificate[])
*/
public boolean isClientTrusted(X509Certificate[] certificates) {
return true;
}
/**
* @see javax.net.ssl.X509TrustManager#isServerTrusted(X509Certificate[])
*/
public boolean isServerTrusted(X509Certificate[] certificates) {
return true;
}
/**
* @see javax.net.ssl.X509TrustManager#getAcceptedIssuers()
*/
public X509Certificate[] getAcceptedIssuers() {
return this.standardTrustManager.getAcceptedIssuers();
}
public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
}
public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
}
}
|
[
"52960184@qq.com"
] |
52960184@qq.com
|
0d541745d7cd3ed05a1d0f113c8b34fe68e05801
|
dab54f96a253ce054a64fbf28b6831087ef5a9e3
|
/agorava-facebook-cdi/src/main/java/org/agorava/facebook/jackson/SwfPostMixin.java
|
48c4e3b80511bb5afea309a90e6f2f756bab1276
|
[
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
banur2/agorava-facebook
|
465edf3516aeb26f7c55935b4037e8cd6abefb63
|
397e9f3cf868fca236afc3302d2d126fbce85e7f
|
refs/heads/master
| 2021-01-17T21:15:22.891027
| 2013-08-13T15:46:49
| 2013-08-13T15:46:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,373
|
java
|
/*
* Copyright 2013 Agorava
*
* 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.agorava.facebook.jackson;
import org.agorava.facebook.model.Reference;
import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
import java.util.Date;
/**
* Annotated mixin to add Jackson annotations to FlashPost.
*
* @author Craig Walls
*/
@JsonIgnoreProperties(ignoreUnknown = true)
abstract class SwfPostMixin extends PostMixin {
@JsonCreator
SwfPostMixin(@JsonProperty("id") String id, @JsonProperty("from") Reference from,
@JsonProperty("created_time") Date createdTime, @JsonProperty("updated_time") Date updatedTime) {
super(id, from, createdTime, updatedTime);
}
@JsonProperty("source")
String source;
}
|
[
"antoine@sabot-durand.net"
] |
antoine@sabot-durand.net
|
ce4fc015e0f3fc73b64289065b3ae34bf95eafd7
|
866cc70a0f6ffc4446c9d378d2e01aee58919198
|
/src/main/java/mayday/pathway/keggview/pathways/AnnotationManager.java
|
3561aff878abc157a43acf3c1dc3782f629d640a
|
[] |
no_license
|
Integrative-Transcriptomics/Mayday-pathway
|
eb4a6ca4ee057f4a0280e487428f77dee5d5f9de
|
a64b6df0eb5c942daa8ed11a1b29f32d30eefe18
|
refs/heads/master
| 2023-01-12T00:46:38.341409
| 2016-08-01T09:07:07
| 2016-08-01T09:07:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,437
|
java
|
package mayday.pathway.keggview.pathways;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import mayday.core.Probe;
import mayday.core.meta.MIGroup;
import mayday.core.meta.MIGroupSelection;
import mayday.core.meta.MIType;
import mayday.core.meta.types.StringMIO;
import mayday.pathway.keggview.kegg.KEGGObject;
import mayday.pathway.keggview.kegg.KEGGParser;
import mayday.pathway.keggview.kegg.compounds.Compound;
import mayday.pathway.keggview.kegg.compounds.CompoundsParser;
import mayday.pathway.keggview.kegg.ko.KOEntry;
import mayday.pathway.keggview.kegg.ko.KOParser;
import mayday.pathway.keggview.kegg.reaction.Reaction;
public class AnnotationManager
{
private Map<String,KEGGObject> genes;
private Map<String,KEGGObject> compounds;
private Map<String,KEGGObject> reactions;
private Map<String,KEGGObject> nameEntryMap;
public AnnotationManager()
{
nameEntryMap=new HashMap<String, KEGGObject>();
}
/**
* Reads the annotation data from the given directory for the given taxon.
* @param directory
* @param taxon
* @throws IOException
*/
public void init(String directory, String taxon) throws IOException
{
if(taxon==null) return;
if(compounds==null || genes==null)
{
KEGGParser koParser=new KEGGParser(new KOParser(taxon.toUpperCase()));
genes=koParser.parseData(directory+"/ko");
KEGGParser comParser=new KEGGParser(new CompoundsParser());
compounds=comParser.parseData(directory+"/compound");
// KEGGParser reaParser=new KEGGParser(new ReactionParser());
// reactions=reaParser.parseData(directory+"/reaction");
for(String s:genes.keySet())
{
KOEntry e=(KOEntry)genes.get(s);
for(String n:e.getGenes())
{
nameEntryMap.put(n, e);
}
}
}
}
public void clear()
{
compounds.clear();
genes.clear();
compounds=null;
genes=null;
}
public Map<String, KEGGObject> getNameEntryMap()
{
return nameEntryMap;
}
/**
* @return the genes
*/
public Map<String, KEGGObject> getGenes() {
return genes;
}
/**
* @return the compounds
*/
public Map<String, KEGGObject> getCompounds() {
return compounds;
}
public Compound getCompound(String query)
{
return (Compound)compounds.get(query);
}
public static Map<String, Probe> createMapping(MIGroupSelection<MIType> selection, Iterable<Probe> probes)
{
if(selection==null) return null;
Map<String, Probe> probeMapping=new HashMap<String, Probe>();
for(MIGroup m:selection)
{
for(Probe p:probes)
{
if(m.getMIO(p)==null) continue;
String s=((StringMIO)m.getMIO(p)).getValue();
if(s!=null)
{
probeMapping.put(s.toLowerCase(), p);
}
}
}
return probeMapping;
}
public static Map<String, Probe> createMappingByMIO(MIGroup m, Iterable<Probe> probes)
{
Map<String, Probe> probeMapping=new HashMap<String, Probe>();
for(Probe p:probes)
{
if(m.getMIO(p)==null) continue;
String s=((StringMIO)m.getMIO(p)).getValue();
if(s!=null)
{
probeMapping.put(s.toLowerCase(), p);
}
}
return probeMapping;
}
public static Map<String, Probe> createMappingByName(Iterable<Probe> probes)
{
Map<String, Probe> probeMapping=new HashMap<String, Probe>();
for(Probe p:probes)
{
probeMapping.put(p.getName(), p);
}
return probeMapping;
}
public static Map<String, String> createMappingByName(Iterable<String> names, boolean useString)
{
Map<String, String> probeMapping=new HashMap<String, String>();
for(String s:names)
{
probeMapping.put(s, s);
}
return probeMapping;
}
public static Map<String, Probe> createMappingByDisplayName(Iterable<Probe> probes)
{
Map<String, Probe> probeMapping=new HashMap<String, Probe>();
for(Probe p:probes)
{
probeMapping.put(p.getDisplayName(), p);
}
return probeMapping;
}
/**
* @return the reactions
*/
public Map<String, KEGGObject> getReactions() {
return reactions;
}
/**
* @param reactions the reactions to set
*/
public void setReactions(Map<String, KEGGObject> reactions) {
this.reactions = reactions;
}
public Reaction reactionForEntry(String id)
{
return (Reaction)reactions.get(id);
}
public KOEntry geneForEntry(String id)
{
return (KOEntry)genes.get(id);
}
public KOEntry geneForName(String id)
{
return (KOEntry)nameEntryMap.get(id);
}
public Compound compoundForEntry(String id)
{
return (Compound)compounds.get(id);
}
}
|
[
"adrian.geissler@student.uni-tuebingen.de"
] |
adrian.geissler@student.uni-tuebingen.de
|
55622cdd3b5011a8dac32c363d5c1c3de1d0d0d9
|
604e715c03b75cd33d3795b1fb652b501a84c6d1
|
/Mobile App/HeartRateMonitor/sources/gnu/kawa/slib/XML.java
|
a00dbf8244dc0e37e3de92022c4e1766b3c39f46
|
[] |
no_license
|
aish21/CE3002-Sensors-Lab
|
902ad691acd208e30e47a40c799bfcb5731bfc86
|
eb0c9cf0f3d3a9b5d63336057ff95c0a00ec3507
|
refs/heads/main
| 2023-08-18T19:25:04.338391
| 2021-10-11T08:21:57
| 2021-10-11T08:21:57
| 415,335,117
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,913
|
java
|
package gnu.kawa.slib;
import androidx.fragment.app.FragmentTransaction;
import gnu.expr.ModuleBody;
import gnu.expr.ModuleInfo;
import gnu.expr.ModuleMethod;
import gnu.kawa.xml.Document;
import gnu.kawa.xml.KAttr;
import gnu.kawa.xml.KComment;
import gnu.kawa.xml.KDocument;
import gnu.kawa.xml.KElement;
import gnu.kawa.xml.KProcessingInstruction;
import gnu.kawa.xml.OutputAsXML;
import gnu.lists.Consumer;
import gnu.mapping.CallContext;
import gnu.mapping.SimpleSymbol;
import gnu.mapping.Symbol;
import gnu.mapping.WrongType;
/* compiled from: XML.scm */
public class XML extends ModuleBody {
public static final XML $instance = new XML();
static final SimpleSymbol Lit0 = ((SimpleSymbol) new SimpleSymbol("parse-xml-from-url").readResolve());
static final SimpleSymbol Lit1 = ((SimpleSymbol) new SimpleSymbol("element-name").readResolve());
static final SimpleSymbol Lit2 = ((SimpleSymbol) new SimpleSymbol("attribute-name").readResolve());
public static OutputAsXML as$Mnxml;
public static final ModuleMethod attribute$Mnname;
public static final Class comment = KComment.class;
public static final ModuleMethod element$Mnname;
public static final ModuleMethod parse$Mnxml$Mnfrom$Mnurl;
public static final Class processing$Mninstruction = KProcessingInstruction.class;
static {
XML xml = $instance;
parse$Mnxml$Mnfrom$Mnurl = new ModuleMethod(xml, 1, Lit0, FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
element$Mnname = new ModuleMethod(xml, 2, Lit1, FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
attribute$Mnname = new ModuleMethod(xml, 3, Lit2, FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
$instance.run();
}
public XML() {
ModuleInfo.register(this);
}
public final void run(CallContext $ctx) {
Consumer consumer = $ctx.consumer;
as$Mnxml = new OutputAsXML();
}
public static KDocument parseXmlFromUrl(Object url) {
return Document.parse(url);
}
public int match1(ModuleMethod moduleMethod, Object obj, CallContext callContext) {
switch (moduleMethod.selector) {
case 1:
callContext.value1 = obj;
callContext.proc = moduleMethod;
callContext.f226pc = 1;
return 0;
case 2:
if (!(obj instanceof KElement)) {
return -786431;
}
callContext.value1 = obj;
callContext.proc = moduleMethod;
callContext.f226pc = 1;
return 0;
case 3:
if (!(obj instanceof KAttr)) {
return -786431;
}
callContext.value1 = obj;
callContext.proc = moduleMethod;
callContext.f226pc = 1;
return 0;
default:
return super.match1(moduleMethod, obj, callContext);
}
}
public static Symbol elementName(KElement element) {
return element.getNodeSymbol();
}
public static Symbol attributeName(KAttr attr) {
return attr.getNodeSymbol();
}
public Object apply1(ModuleMethod moduleMethod, Object obj) {
switch (moduleMethod.selector) {
case 1:
return parseXmlFromUrl(obj);
case 2:
try {
return elementName((KElement) obj);
} catch (ClassCastException e) {
throw new WrongType(e, "element-name", 1, obj);
}
case 3:
try {
return attributeName((KAttr) obj);
} catch (ClassCastException e2) {
throw new WrongType(e2, "attribute-name", 1, obj);
}
default:
return super.apply1(moduleMethod, obj);
}
}
}
|
[
"aish.akshu@gmail.com"
] |
aish.akshu@gmail.com
|
a01bf93357f631cfb5836006124df998a7fc0209
|
8c9b743f156307cfb8781f95d2039f3697305b78
|
/src/com/gargoylesoftware/htmlunit/javascript/host/html/FormChild.java
|
0af365a49fa6231285c6f462478e1b94e2dca39a
|
[] |
no_license
|
jiafenggit/HtmlUnitTao
|
f8fbd9065b03b6cd0f3a4ce1db6b4fbfd4941000
|
ede3e10603d16f022b60798ea340c392f57495f7
|
refs/heads/master
| 2021-04-28T23:46:58.642674
| 2016-03-15T08:08:02
| 2016-03-15T08:08:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,507
|
java
|
/*
* Copyright (c) 2002-2015 Gargoyle Software 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.gargoylesoftware.htmlunit.javascript.host.html;
import com.gargoylesoftware.htmlunit.html.HtmlForm;
import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass;
import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter;
/**
* Base class for elements which have a parent form.
*
* @version $Revision: 10304 $
* @author Daniel Gredler
*/
@JsxClass(isJSObject = false, isDefinedInStandardsMode = false)
public class FormChild extends HTMLElement {
/**
* Returns the value of the JavaScript <tt>form</tt> attribute.
*
* @return the value of the JavaScript <tt>form</tt> attribute
*/
@JsxGetter
public HTMLFormElement getForm() {
final HtmlForm form = getDomNodeOrDie().getEnclosingForm();
if (form == null) {
return null;
}
return (HTMLFormElement) getScriptableFor(form);
}
}
|
[
"jeruen@gmail.com"
] |
jeruen@gmail.com
|
e21fc6e311f4545973adf1c183a6d57d89a5d460
|
b74bc2324c6b6917d24e1389f1cf95936731643f
|
/base/src/main/java/com/wuyizhiye/base/wechat/WeChatArticle.java
|
18b903bdadb6f9300f3af935a1d99a7eb7423c5e
|
[] |
no_license
|
919126624/Feiying-
|
ebeb8fcfbded932058347856e2a3f38731821e5e
|
d3b14ff819cc894dcbe80e980792c08c0eb7167b
|
refs/heads/master
| 2021-01-13T00:40:59.447803
| 2016-03-24T03:41:30
| 2016-03-24T03:41:30
| 54,537,727
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 626
|
java
|
package com.wuyizhiye.base.wechat;
public class WeChatArticle {
private String Title;
private String Description;
private String PicUrl;
private String Url;
public String getTitle() {
return Title;
}
public void setTitle(String title) {
Title = title;
}
public String getDescription() {
return Description;
}
public void setDescription(String description) {
Description = description;
}
public String getPicUrl() {
return PicUrl;
}
public void setPicUrl(String picUrl) {
PicUrl = picUrl;
}
public String getUrl() {
return Url;
}
public void setUrl(String url) {
this.Url = url;
}
}
|
[
"919126624@qq.com"
] |
919126624@qq.com
|
06d158cf9d8b5beb36b65e4701d2e998a64faa15
|
89bedf3e111cdfd7b80f39b2eca3791a0dda276f
|
/activity_argouml01/org/argouml/uml/ui/foundation/core/UMLClassifierAssociationEndListModel.java
|
2879ec4084b7e8ede306a6f17b9c76ac48e1847f
|
[
"LicenseRef-scancode-other-permissive",
"BSD-3-Clause"
] |
permissive
|
TheProjecter/plea-spl
|
b80b622fcf4dee6a73ae72db4fc7f4826bef0549
|
c28b308160c6ef8e68440d90a7710bff270f22c3
|
refs/heads/master
| 2020-05-28T14:14:30.727459
| 2014-10-03T18:43:35
| 2014-10-03T18:43:35
| 42,946,066
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,661
|
java
|
// $Id: UMLClassifierAssociationEndListModel.java 10734 2006-06-11 15:43:58Z mvw $
// Copyright (c) 1996-2006 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.uml.ui.foundation.core;
import org.argouml.model.Model;
import org.argouml.uml.ui.UMLModelElementListModel2;
/**
*
* @author jaap.branderhorst@xs4all.nl
* @since Jan 26, 2003
*/
public class UMLClassifierAssociationEndListModel
extends UMLModelElementListModel2 {
/**
* Constructor for UMLClassifierAssociationEndListModel.
*/
public UMLClassifierAssociationEndListModel() {
super("associationEnd");
}
/**
* @see org.argouml.uml.ui.UMLModelElementListModel2#buildModelList()
*/
protected void buildModelList() {
if (getTarget() != null) {
setAllElements(Model.getFacade().getAssociationEnds(getTarget()));
}
}
/**
* @see org.argouml.uml.ui.UMLModelElementListModel2#isValidElement(Object)
*/
protected boolean isValidElement(Object/*MBase*/ element) {
return Model.getFacade().getAssociationEnds(getTarget())
.contains(element);
}
}
|
[
"demost@gmail.com"
] |
demost@gmail.com
|
97197a194aa2525732f1b721b3590cd0564010de
|
415c9522965a0581b2d54daf75042270552ae0fa
|
/sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/jdbc/unsupported/AbstractUnsupportedOperationStatement.java
|
71fc64cc15d554fbd61f65b157bfea78ecf785c8
|
[
"Apache-2.0"
] |
permissive
|
syukyuu/sharding-jdbc
|
e095e1f3c30544a1aa5b74395d4e957ee68d9a08
|
8a1df213da46b9e3f77ffe43fbf5bef199dfb573
|
refs/heads/master
| 2021-01-23T14:42:06.483894
| 2016-05-06T13:20:56
| 2016-05-06T13:20:56
| 58,268,271
| 1
| 0
| null | 2016-05-07T13:58:05
| 2016-05-07T13:58:05
| null |
UTF-8
|
Java
| false
| false
| 3,316
|
java
|
/*
* Copyright 1999-2015 dangdang.com.
* <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
*
* 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.
* </p>
*/
package com.dangdang.ddframe.rdb.sharding.jdbc.unsupported;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.Statement;
import com.dangdang.ddframe.rdb.sharding.jdbc.adapter.WrapperAdapter;
/**
* 声明不支持操作的静态语句对象.
*
* @author gaohongtao
*/
public abstract class AbstractUnsupportedOperationStatement extends WrapperAdapter implements Statement {
@Override
public final int getMaxFieldSize() throws SQLException {
throw new SQLFeatureNotSupportedException("getMaxFieldSize");
}
@Override
public final void setMaxFieldSize(final int max) throws SQLException {
throw new SQLFeatureNotSupportedException("setMaxFieldSize");
}
@Override
public final int getMaxRows() throws SQLException {
throw new SQLFeatureNotSupportedException("getMaxRows");
}
@Override
public final void setMaxRows(final int max) throws SQLException {
throw new SQLFeatureNotSupportedException("setMaxRows");
}
@Override
public final int getQueryTimeout() throws SQLException {
throw new SQLFeatureNotSupportedException("getQueryTimeout");
}
@Override
public final void setQueryTimeout(final int seconds) throws SQLException {
throw new SQLFeatureNotSupportedException("setQueryTimeout");
}
@Override
public final int getFetchDirection() throws SQLException {
throw new SQLFeatureNotSupportedException("getFetchDirection");
}
@Override
public final void setFetchDirection(final int direction) throws SQLException {
throw new SQLFeatureNotSupportedException("setFetchDirection");
}
@Override
public final ResultSet getGeneratedKeys() throws SQLException {
throw new SQLFeatureNotSupportedException("getGeneratedKeys");
}
@Override
public final void addBatch(final String sql) throws SQLException {
throw new SQLFeatureNotSupportedException("addBatch sql");
}
@Override
public void clearBatch() throws SQLException {
throw new SQLFeatureNotSupportedException("clearBatch");
}
@Override
public int[] executeBatch() throws SQLException {
throw new SQLFeatureNotSupportedException("executeBatch");
}
@Override
public final void closeOnCompletion() throws SQLException {
throw new SQLFeatureNotSupportedException("closeOnCompletion");
}
@Override
public final boolean isCloseOnCompletion() throws SQLException {
throw new SQLFeatureNotSupportedException("isCloseOnCompletion");
}
}
|
[
"terrymanu@163.com"
] |
terrymanu@163.com
|
8d11457054eb7a44cb9ae1b14a687294f263ed18
|
4d28c317453f3b8a63c73916f624722705f18059
|
/src/main/java/com/rgk/base/TopMenu.java
|
9afe4720655fb5c4cab904e08f3758cff089c2a6
|
[] |
no_license
|
RohitKathe/pageobjectbasics
|
0e0b451ef2015d8346f8df3c87fcb42dc8c201a4
|
53bde42641baac46a465a6b60a10b776408f513e
|
refs/heads/master
| 2020-04-15T14:42:28.192885
| 2019-01-09T03:42:52
| 2019-01-09T03:42:52
| 164,763,915
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 551
|
java
|
package com.rgk.base;
import org.openqa.selenium.WebDriver;
import com.rgk.pages.crm.accounts.AccountsPage;
public class TopMenu {
/*
* HomePage has a TopMenu Accounts page HASA TopMenu Encapsulation takes
* place
*
*/
WebDriver driver;
public TopMenu(WebDriver driver) {
this.driver = driver;
}
public void goToHome() {
}
public void goToLeads() {
}
public AccountsPage goToAccounts() {
Page.click("accountsTab_CSS");
return new AccountsPage();
}
public void goToContacts() {
}
public void signOut() {
}
}
|
[
"john@sample.com"
] |
john@sample.com
|
2457911c6afaff55abffaf84c87ce5010b1ac4c6
|
8b31844bc6f5788c7b59c5b0bcc0ba079a3afa0b
|
/jOOQ/src/main/java/org/jooq/conf/BackslashEscaping.java
|
6f2469efbd0dfdb4e53a48d2ede475a6228c8579
|
[
"Apache-2.0"
] |
permissive
|
bitbrain/jOOQ
|
5a1801f8bd9f79434362299c25f4ce82b755fa0e
|
75c87a485268682582337d6c01fa37d46f68aa74
|
refs/heads/master
| 2020-12-30T14:34:12.051852
| 2017-05-12T23:19:09
| 2017-05-12T23:19:09
| 91,068,299
| 0
| 0
| null | 2017-05-12T08:18:50
| 2017-05-12T08:18:50
| null |
UTF-8
|
Java
| false
| false
| 856
|
java
|
package org.jooq.conf;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java-Klasse für BackslashEscaping.
*
* <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
* <p>
* <pre>
* <simpleType name="BackslashEscaping">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="DEFAULT"/>
* <enumeration value="ON"/>
* <enumeration value="OFF"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "BackslashEscaping")
@XmlEnum
public enum BackslashEscaping {
DEFAULT,
ON,
OFF;
public String value() {
return name();
}
public static BackslashEscaping fromValue(String v) {
return valueOf(v);
}
}
|
[
"lukas.eder@gmail.com"
] |
lukas.eder@gmail.com
|
d14ca51484e1c5efe017db63f050ad09e9b411be
|
df79dbcfc869b9d2180a44e34aa1e5ef208d1655
|
/springboot/Ms-Actuator/src/main/java/com/parag/main/ServletInitializer.java
|
9962c26aeefb3ee17ead097cb1d7c9fd06db5e51
|
[] |
no_license
|
paragkhedkar07/TotalProjects
|
a170e3d5455a046b62709986f3f00a95b49fee70
|
7791da688c121d2422a4f4e52e91256c9b7606e5
|
refs/heads/master
| 2023-03-14T23:47:43.492749
| 2021-03-27T14:59:08
| 2021-03-27T14:59:08
| 352,097,373
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 408
|
java
|
package com.parag.main;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(MsActuatorApplication.class);
}
}
|
[
"paragkhedkar07@gmail.com"
] |
paragkhedkar07@gmail.com
|
d623ca158863ee75445c28dadee5b7a9eadf600d
|
5b2c309c903625b14991568c442eb3a889762c71
|
/classes/com/e/a/a/g.java
|
36f3f7383b0fe38681094731b7e17db5a7e5e9a4
|
[] |
no_license
|
iidioter/xueqiu
|
c71eb4bcc53480770b9abe20c180da693b2d7946
|
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
|
refs/heads/master
| 2020-12-14T23:55:07.246659
| 2016-10-08T08:56:27
| 2016-10-08T08:56:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 919
|
java
|
package com.e.a.a;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.Iterator;
import java.util.List;
final class g
extends a
{
private final List<b> d;
public g(String paramString1, Charset paramCharset, String paramString2, List<b> paramList)
{
super(paramString1, paramCharset, paramString2);
this.d = paramList;
}
public final List<b> a()
{
return this.d;
}
protected final void a(b paramb, OutputStream paramOutputStream)
{
paramb = paramb.a.iterator();
while (paramb.hasNext())
{
i locali = (i)paramb.next();
a.a(locali.a, paramOutputStream);
a.a(a.a, paramOutputStream);
a.a(locali.b, paramOutputStream);
a.a(a.b, paramOutputStream);
}
}
}
/* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\com\e\a\a\g.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
a171eaf6b580f98bafa893dd84d7043fe5f3f1b8
|
071ff2e7cc2e098568c703153b6cc15cdbb05c14
|
/core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/RegisteredServicesEventListener.java
|
fe65c04c890d1402bc14931c03d7a1e680069466
|
[
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
restmad/cas
|
7a569e39df70e6766e1112b2a884e636587fc604
|
ef86873eb27e12acd1ed37399e4ee1aae941e9bf
|
refs/heads/master
| 2020-04-15T09:53:25.124088
| 2019-04-15T15:10:46
| 2019-04-15T15:10:46
| 164,570,430
| 0
| 0
|
Apache-2.0
| 2019-04-15T15:10:47
| 2019-01-08T05:36:40
|
Java
|
UTF-8
|
Java
| false
| false
| 2,380
|
java
|
package org.apereo.cas.services;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.support.events.service.CasRegisteredServiceExpiredEvent;
import org.apereo.cas.support.events.service.CasRegisteredServicesRefreshEvent;
import org.apereo.cas.util.io.CommunicationsManager;
import lombok.RequiredArgsConstructor;
import lombok.val;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.event.EventListener;
/**
* This is {@link RegisteredServicesEventListener}.
*
* @author Misagh Moayyed
* @since 5.1.0
*/
@RequiredArgsConstructor
public class RegisteredServicesEventListener {
private final ServicesManager servicesManager;
private final CasConfigurationProperties casProperties;
private final CommunicationsManager communicationsManager;
/**
* Handle services manager refresh event.
*
* @param event the event
*/
@EventListener
public void handleRefreshEvent(final CasRegisteredServicesRefreshEvent event) {
servicesManager.load();
}
/**
* Handle registered service expired event.
*
* @param event the event
*/
@EventListener
public void handleRegisteredServiceExpiredEvent(final CasRegisteredServiceExpiredEvent event) {
val registeredService = event.getRegisteredService();
val contacts = registeredService.getContacts();
val mail = casProperties.getServiceRegistry().getMail();
val sms = casProperties.getServiceRegistry().getSms();
val serviceName = StringUtils.defaultIfBlank(registeredService.getName(), registeredService.getServiceId());
if (communicationsManager.isMailSenderDefined()) {
val message = String.format(mail.getText(), serviceName);
contacts
.stream()
.filter(c -> StringUtils.isNotBlank(c.getEmail()))
.forEach(c -> communicationsManager.email(mail, c.getEmail(), message));
}
if (communicationsManager.isSmsSenderDefined()) {
val message = String.format(sms.getText(), serviceName);
contacts
.stream()
.filter(c -> StringUtils.isNotBlank(c.getPhone()))
.forEach(c -> communicationsManager.sms(sms.getFrom(), c.getPhone(), message));
}
servicesManager.load();
}
}
|
[
"mmoayyed@unicon.net"
] |
mmoayyed@unicon.net
|
d5ffa78e867dec0027587b4d4549b43de38f1444
|
958b13739d7da564749737cb848200da5bd476eb
|
/src/main/java/com/alipay/api/response/AlipayAppTokenGetResponse.java
|
6fb8c753921a572f4e9a20cf0c033ea3914038ab
|
[
"Apache-2.0"
] |
permissive
|
anywhere/alipay-sdk-java-all
|
0a181c934ca84654d6d2f25f199bf4215c167bd2
|
649e6ff0633ebfca93a071ff575bacad4311cdd4
|
refs/heads/master
| 2023-02-13T02:09:28.859092
| 2021-01-14T03:17:27
| 2021-01-14T03:17:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 936
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.app.token.get response.
*
* @author auto create
* @since 1.0, 2019-03-26 17:00:00
*/
public class AlipayAppTokenGetResponse extends AlipayResponse {
private static final long serialVersionUID = 6239439998563845965L;
/**
* 应用访问令牌
*/
@ApiField("app_access_token")
private String appAccessToken;
/**
* 应用访问凭证有效时间,单位:秒
*/
@ApiField("expires_in")
private Long expiresIn;
public void setAppAccessToken(String appAccessToken) {
this.appAccessToken = appAccessToken;
}
public String getAppAccessToken( ) {
return this.appAccessToken;
}
public void setExpiresIn(Long expiresIn) {
this.expiresIn = expiresIn;
}
public Long getExpiresIn( ) {
return this.expiresIn;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
e26224c07aca5f9f0366f3f9e6fa0e2c2a945836
|
eb49b52c81e7e6b8d4a4e2b33fdee0e7a0eff262
|
/app/src/main/java/com/elementary/tasks/core/dialogs/BaseDialog.java
|
81bc49348ec4055a5b494ba5b55d3d43ddd5d794
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
naz013/Reminder
|
3606b9f355ab448dde7228898eee7688ffbf9337
|
2d48963c29ddb6321202dbb8b7842d573f90b6a2
|
refs/heads/master
| 2021-01-23T05:09:50.383169
| 2018-07-09T17:28:07
| 2018-07-09T17:28:12
| 102,461,289
| 3
| 3
|
Apache-2.0
| 2018-06-17T07:14:46
| 2017-09-05T09:21:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,185
|
java
|
package com.elementary.tasks.core.dialogs;
import android.app.Activity;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.elementary.tasks.core.utils.ThemeUtil;
/**
* Copyright 2017 Nazar Suhovich
* <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.
*/
public abstract class BaseDialog extends Activity {
private ThemeUtil themeUtil;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
themeUtil = ThemeUtil.getInstance(this);
setTheme(themeUtil.getDialogStyle());
}
public ThemeUtil getThemeUtil() {
return themeUtil;
}
}
|
[
"n.suhovich@gmail.com"
] |
n.suhovich@gmail.com
|
29fe43bb43054bcbd334f8ea6e540e80a15ce4a7
|
2471d32668ba06526d608602ad8c1d4260293a86
|
/app/src/main/java/com/example/myportofolio/MainActivity.java
|
890f90c64314bc23133a56c77a5b2aea94581b07
|
[] |
no_license
|
basriumar12/MyPortofolio
|
a498f0acf04f5ac55f62af62d3d428e645ace0bc
|
5d54d355c53b2cac50067cd27c5f028ccf9809b2
|
refs/heads/master
| 2021-03-31T09:27:53.861664
| 2020-03-17T23:50:20
| 2020-03-17T23:50:20
| 248,096,968
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,591
|
java
|
package com.example.myportofolio;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
import java.util.ArrayList;
public class MainActivity extends AppCompatActivity {
//buat variabel
private String title = "Mode List";
private RecyclerView rvPortofolio;
private ArrayList<ModelPortofolio> list = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//iniisialisasi variabel
rvPortofolio = findViewById(R.id.rv_main);
rvPortofolio.setHasFixedSize(true);
list.addAll(PortofolioData.getListData());
showRecyclerList();
}
//inisialisasi recylerview dan menampilkan dalam bentuk list
private void showRecyclerList() {
rvPortofolio.setLayoutManager(new LinearLayoutManager(this));
AdapterPortofolio listHeroAdapter = new AdapterPortofolio(list);
rvPortofolio.setAdapter(listHeroAdapter);
//list item ketika di klik
listHeroAdapter.setOnItemClickCallback(new AdapterPortofolio.OnItemClickCallback() {
@Override
public void onItemClicked(ModelPortofolio data) {
showSelectedPorotofolio(data);
}
});
}
//menampilkan grid
private void showRecyclerGrid() {
rvPortofolio.setLayoutManager(new GridLayoutManager(this,2));
AdapterPortofolio listHeroAdapter = new AdapterPortofolio(list);
rvPortofolio.setAdapter(listHeroAdapter);
listHeroAdapter.setOnItemClickCallback(new AdapterPortofolio.OnItemClickCallback() {
@Override
public void onItemClicked(ModelPortofolio data) {
showSelectedPorotofolio(data);
}
});
}
// method item ketika klik dan mengirim datanya ke detailactivity
private void showSelectedPorotofolio(ModelPortofolio data) {
Toast.makeText(this, "Kamu memilih " + data.getName(), Toast.LENGTH_SHORT).show();
//buat objek intent
Intent kirimData = new Intent(this, DetailActivity.class);
//kirim value
kirimData.putExtra("NAME", data.getName());
kirimData.putExtra("DETAIL", data.getDetail());
kirimData.putExtra("IMAGE", data.getPhoto());
startActivity(kirimData);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
setMode(item.getItemId());
return super.onOptionsItemSelected(item);
}
//aktifkan mode di item menu
public void setMode(int selectedMode) {
switch (selectedMode) {
case R.id.action_list:
title = "Mode List";
showRecyclerList();
break;
case R.id.action_grid:
title = "Mode Grid";
showRecyclerGrid();
break;
}
setActionBarTitle(title);
}
private void setActionBarTitle(String title) {
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle(title);
}
}
}
|
[
"basriumar12@gmail.com"
] |
basriumar12@gmail.com
|
1f79e6e94b80dcad3bc9f7c91ea57606086c7432
|
d4fb527864fee6caa489a6cecbfd868a70746a03
|
/First_Edition/src/chapter_5/item_21/package-info.java
|
d8d8a50224b1bd1f516ef7401c860bb836105d9e
|
[] |
no_license
|
ildar66/java-book-Effective_Java
|
a9642ecc15afd12750acbd95ed58020e7994da37
|
250eb584ebc8b3c185513891cafbe362193cf04b
|
refs/heads/master
| 2020-06-13T02:51:53.439000
| 2017-02-07T07:22:48
| 2017-02-07T07:22:48
| 75,460,803
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 908
|
java
|
/**
* Item 21: Replace enum constructs with classes.
*
* In summary, the advantages of typesafe enums over int enums are great, and none of the
* disadvantages seem compelling unless an enumerated type is to be used primarily as a set
* element or in a severely resource constrained environment. Thus the typesafe enum pattern
* should be what comes to mind when circumstances call for an enumerated type. APIs
* that use typesafe enums are far more programmer friendly than those that use int enums.
* The only reason that typesafe enums are not used more heavily in the Java platform APIs is
* that the typesafe enum pattern was unknown when many of those APIs were written. Finally,
* it's worth reiterating that the need for enumerated types of any sort should be relatively rare,
* as a major use of these types has been made obsolete by subclassing (Item 20).
*/
package chapter_5.item_21;
|
[
"ildar66@inbox.ru"
] |
ildar66@inbox.ru
|
5ec978a7aeaa58caec62bab5fd8ee66852ca9192
|
86fc030462b34185e0b1e956b70ece610ad6c77a
|
/src/main/java/com/alipay/api/domain/AlipayDaoweiSpModifyModel.java
|
7087dc28b6638f94bb86070db5e0593e14b085e3
|
[] |
no_license
|
xiang2shen/magic-box-alipay
|
53cba5c93eb1094f069777c402662330b458e868
|
58573e0f61334748cbb9e580c51bd15b4003f8c8
|
refs/heads/master
| 2021-05-08T21:50:15.993077
| 2018-11-12T07:49:35
| 2018-11-12T07:49:35
| 119,653,252
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,756
|
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, 2017-03-10 16:06:09
*/
public class AlipayDaoweiSpModifyModel extends AlipayObject {
private static final long serialVersionUID = 7381383833856558819L;
/**
* 服务者的可用时间表。其中Duration和Unit配合使用,例如duration=30,unit=MIN表示将一天分为以30分钟一小段的时间片段。Unit:目前支持MIN(分钟)。Date:YYYY-MM-DD格式。Bitmap:根据定义的间隔长度跟单位,将date的时间切分,例如将2016-11-29整天按30分钟为一段切分为48段: 111111111111111111111111111111111110000011111111 , 其中0表示不可用,1表示可用,如果工作日全天可用则每个分段都为1
*/
@ApiField("calendar_schedule")
private CalendarScheduleInfo calendarSchedule;
/**
* 服务者的身份证号码
*/
@ApiField("cert_no")
private String certNo;
/**
* 服务者的证件类型(目前只支持身份证号:IDENTITY_CARD)
*/
@ApiField("cert_type")
private String certType;
/**
* 服务者的描述,会进行安全审核,请勿传包含敏感信息的昵称,如果审核传含有敏感信息,需修改后重新同步服务者的描述信息
*/
@ApiField("desc")
private String desc;
/**
* 服务者服务列表信息:包括服务者可提供的类目服务和证书信息等,其中license_id是商家服务者证照的唯一标识,用于确定商家的某个服务者的某个证照,仅支持数字、字母和下划线
*/
@ApiListField("license_list")
@ApiField("license_info")
private List<LicenseInfo> licenseList;
/**
* 服务者的支付宝登录账号
*/
@ApiField("logon_id")
private String logonId;
/**
* 服务者的手机号
*/
@ApiField("mobile")
private String mobile;
/**
* 第三方服务者的姓名
*/
@ApiField("name")
private String name;
/**
* 服务者昵称,会进行安全审核,请勿传包含敏感信息的昵称,如果审核传含有敏感信息,需修改后重新同步服务者信息
*/
@ApiField("nick_name")
private String nickName;
/**
* 商家服务者id,由商家维护的该商家下某个服务者的唯一标识,仅支持数字、字母和下划线的组合
*/
@ApiField("out_sp_id")
private String outSpId;
/**
* 服务者的头像url,只支持https,图片大小限制60K以下。请勿发布涉及黄赌毒以及其他违反国家法律法规的图片,如果有安全问题,将会通知商家修改后重新同步服务者头像
*/
@ApiField("photo_url")
private String photoUrl;
/**
* 服务状态,支持以下状态:
ON(上架)
OFF(下架)
DELETE(删除)
*/
@ApiField("status")
private String status;
public CalendarScheduleInfo getCalendarSchedule() {
return this.calendarSchedule;
}
public void setCalendarSchedule(CalendarScheduleInfo calendarSchedule) {
this.calendarSchedule = calendarSchedule;
}
public String getCertNo() {
return this.certNo;
}
public void setCertNo(String certNo) {
this.certNo = certNo;
}
public String getCertType() {
return this.certType;
}
public void setCertType(String certType) {
this.certType = certType;
}
public String getDesc() {
return this.desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public List<LicenseInfo> getLicenseList() {
return this.licenseList;
}
public void setLicenseList(List<LicenseInfo> licenseList) {
this.licenseList = licenseList;
}
public String getLogonId() {
return this.logonId;
}
public void setLogonId(String logonId) {
this.logonId = logonId;
}
public String getMobile() {
return this.mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getNickName() {
return this.nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getOutSpId() {
return this.outSpId;
}
public void setOutSpId(String outSpId) {
this.outSpId = outSpId;
}
public String getPhotoUrl() {
return this.photoUrl;
}
public void setPhotoUrl(String photoUrl) {
this.photoUrl = photoUrl;
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
}
|
[
"xiangshuo@10.17.6.161"
] |
xiangshuo@10.17.6.161
|
32e33559f67467f23f61ea5a1bc6f93a11292ec0
|
5c704d928f2ca708d6bc1d45ec4c5b400325d362
|
/cuslib/src/main/java/com/zhengsr/cuslib/support/ZSupporActivity.java
|
13d23b18c26a6eaad90fcff9e003855043f3d01e
|
[
"Apache-2.0"
] |
permissive
|
LillteZheng/CommonLib
|
cea15b6849d8552b802962f10e5f4d186e01a734
|
b0529f50b3e7aa4956d2b697ffbe4705a54b504b
|
refs/heads/master
| 2020-04-03T20:36:09.342306
| 2018-11-29T12:33:44
| 2018-11-29T12:33:44
| 155,550,839
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,751
|
java
|
package com.zhengsr.cuslib.support;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import com.zhengsr.cuslib.support.callback.IZBackInterface;
/**
* Created by zhengshaorui
* Time on 2018/10/13
*/
public class ZSupporActivity extends AppCompatActivity implements IZBackInterface {
private static final String TAG = "ZSupporActivity";
private SupporFragment mSupporFragment;
private ZBaseSupporFragment mZSupporFragment;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mSupporFragment = SupporFragment.getInstance()
.addFragmentManager(getSupportFragmentManager());
}
@Override
public void onBackPress(ZBaseSupporFragment fragment) {
mZSupporFragment = fragment;
}
@Override
public void onBackPressed() {
if (mZSupporFragment != null && mZSupporFragment.onPressBack()){
return;
}
super.onBackPressed();
}
//***************************************
// support fragment 的方法
//***************************************
/**
* fragment 是否已经在fragmentmanager中
* @param aClass
* @return
*/
protected boolean findFragment(Class<?> aClass){
return mSupporFragment.findFragment(aClass);
}
/**
* 加载根fragment
* @param contentId
* @param fragment
*/
protected void loadRootFragment(int contentId,Fragment fragment){
mSupporFragment.loadRootFragment(contentId,fragment);
};
/**
* 显示当前fragment,隐藏其他fragment,不加回退栈
* @param showfragment
*/
protected void showAndHideOtherFragment(Fragment showfragment){
mSupporFragment.showAndHideOtherFragment(showfragment,false);
}
/**
* 显示当前fragment,隐藏其他fragment
* @param showfragment
*/
protected void showAndHideOtherFragment(Fragment showfragment, boolean addBackpop){
mSupporFragment.showAndHideOtherFragment(showfragment,addBackpop);
}
protected void showOrHideFragment(Fragment showFragment, Fragment hideFragment){
mSupporFragment.showOrHideFragment(showFragment,hideFragment,false);
}
protected void showOrHideFragment(Fragment showFragment, Fragment hideFragment, boolean addBackStatck){
mSupporFragment.showOrHideFragment(showFragment,hideFragment,addBackStatck);
}
/**
* 替换fragment
* @param fragment
*/
protected void replaceFragment(Fragment fragment){
mSupporFragment.replaceFragment(fragment);
}
}
|
[
"845731923@qq.com"
] |
845731923@qq.com
|
8c3306a6c1e7f0bb20827d71d754a771781b5d28
|
5a2f372ab62f151e9c1cb29d16bd97dd2c97a1ee
|
/java/com/intel/daal/algorithms/em_gmm/init/InitResult.java
|
758755716bccbbf12e54f52ce0e849beba4e2867
|
[
"Intel",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause",
"MIT",
"Zlib",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
bazelhpc/oneDAL
|
30dd0d4d80a79a670f4ca684aad811707d859828
|
9fe1f6ec732875782edbe0b5b394d14ca292a5fc
|
refs/heads/master
| 2023-04-08T13:01:18.897716
| 2021-01-11T09:39:25
| 2021-01-11T09:39:25
| 328,962,926
| 1
| 0
|
Apache-2.0
| 2023-04-03T23:04:48
| 2021-01-12T11:18:48
| null |
UTF-8
|
Java
| false
| false
| 5,079
|
java
|
/* file: InitResult.java */
/*******************************************************************************
* Copyright 2014-2020 Intel Corporation
*
* 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.
*******************************************************************************/
/**
* @ingroup em_gmm_init
* @{
*/
package com.intel.daal.algorithms.em_gmm.init;
import com.intel.daal.utils.*;
import com.intel.daal.data_management.data.DataCollection;
import com.intel.daal.data_management.data.Factory;
import com.intel.daal.data_management.data.NumericTable;
import com.intel.daal.services.DaalContext;
/**
* <a name="DAAL-CLASS-ALGORITHMS__EM_GMM__INIT__INITRESULT"></a>
* @brief Provides methods to access final results obtained with the compute() method of InitBatch
* for the computation of initial values for the EM for GMM algorithm
*/
public final class InitResult extends com.intel.daal.algorithms.Result {
/** @private */
static {
LibUtils.loadLibrary();
}
/**
* Constructs the result of the initial values computation for the EM for GMM algorithm
* @param context Context to manage the result of the initial values computation for the EM for GMM algorithm
*/
public InitResult(DaalContext context) {
super(context);
this.cObject = cNewResult();
}
public InitResult(DaalContext context, long cObject) {
super(context, cObject);
}
/**
* Returns the initial values for the EM for GMM algorithm
* @param id %Result identifier
* @return %Result that corresponds to the given identifier
*/
public NumericTable get(InitResultId id) {
if (id != InitResultId.weights && id != InitResultId.means) {
throw new IllegalArgumentException("id unsupported");
}
return (NumericTable)Factory.instance().createObject(getContext(), cGetResultTable(cObject, id.getValue()));
}
/**
* Returns the collection of initialized covariances for the EM for GMM algorithm
* @param id %Result identifier
* @return %Result that corresponds to the given identifier
*/
public DataCollection get(InitResultCovariancesId id) {
if (id != InitResultCovariancesId.covariances) {
throw new IllegalArgumentException("id unsupported");
}
return new DataCollection(getContext(), cGetCovariancesDataCollection(cObject, id.getValue()));
}
/**
* Returns the covariance with a given index from the collection of initialized covariances
* @param id Identifier of the collection of covariances
* @param index Index of the covariance to be returned
* @return Pointer to the covariance table
*/
public NumericTable get(InitResultCovariancesId id, int index) {
if (id != InitResultCovariancesId.covariances) {
throw new IllegalArgumentException("index arguments for this id unsupported");
}
return (NumericTable)Factory.instance().createObject(getContext(), cGetResultCovarianceTable(cObject, id.getValue(), index));
}
/**
* Sets initial values for the EM for GMM algorithm
* @param id %Result identifier
* @param value Numeric table for the result
*/
public void set(InitResultId id, NumericTable value) {
int idValue = id.getValue();
if (id != InitResultId.weights && id != InitResultId.means) {
throw new IllegalArgumentException("id unsupported");
}
cSetResultTable(cObject, idValue, value.getCObject());
}
/**
* Sets the collection of covariances for initialization of the EM for GMM algorithm
* @param id Identifier of the collection of covariances
* @param value Collection of covariances
*/
public void set(InitResultCovariancesId id, DataCollection value) {
int idValue = id.getValue();
if (id != InitResultCovariancesId.covariances) {
throw new IllegalArgumentException("id unsupported");
}
cSetCovarianceCollection(cObject, idValue, value.getCObject());
}
private native long cNewResult();
private native long cGetResultTable(long cResult, int id);
private native long cGetCovariancesDataCollection(long cResult, int id);
private native long cGetResultCovarianceTable(long cResult, int id, int index);
private native void cSetResultTable(long cResult, int id, long cNumericTable);
private native void cSetCovarianceCollection(long cResult, int id, long cDataCollection);
}
/** @} */
|
[
"nikolay.a.petrov@intel.com"
] |
nikolay.a.petrov@intel.com
|
17204cbf4570f6eab7ea239f1eab7c469016ca5a
|
a90f8343ca16224a1b05015094418cc9f228d4e7
|
/ydc-common/src/main/java/com/ydc/commom/constant/DictionaryConstant.java
|
cd70f65f07404985c5cfc2900de02a370dabea93
|
[] |
no_license
|
oyjy2018/template
|
0b381ecc50de254ecab37f34e2d1de058683ab8b
|
3e9a07b9fff01b43a91b943152a3b9af9ff48e06
|
refs/heads/master
| 2022-12-06T11:02:16.875133
| 2019-06-05T16:12:35
| 2019-06-05T16:12:35
| 190,425,044
| 1
| 0
| null | 2022-11-16T10:56:08
| 2019-06-05T15:55:35
|
Java
|
UTF-8
|
Java
| false
| false
| 8,866
|
java
|
package com.ydc.commom.constant;
/**
* 数据字典常量配置
*
* @author gongjin
* @create 2018-09-04 11:35
**/
public class DictionaryConstant {
/**
* 积分获取
*/
public static final String DICT_CODE_JFHQ_CONFIG = "jfhq";
/**
* 积分消耗
*/
public static final String DICT_CODE_JFXH_CONFIG = "jfxh";
/**
* 阿里云短信平台账户
*/
public static final String DICT_CODE_ALYDX_CONFIG = "alydx";
/**
* 短信服务配置
*/
public static final String DICT_CODE_DXFW = "dxfw";
/**
* 阿里云短信平台账号
*/
public static final String DICT_CODE_ALYDX = "alydx";
/**
* 供应商
*/
public static final String DICT_CODE_GYS_CONFIG = "gys";
/**
* 商品主分类
*/
public static final String DICT_CODE_C_MAIN_CONFIG = "c-main";
/**
* 商品子分类
*/
public static final String DICT_CODE_C_SON_CONFIG = "c-son";
/**
* 车启用状态
*/
public static final String DICT_CODE_USE_STATUS_CONFIG = "use_status";
/**
* 车运营状态
*/
public static final String DICT_CODE_OPERATION_STATUS_CONFIG = "operation_status";
/**
* 车来源
*/
public static final String DICT_CODE_SOURCE_CONFIG = "source";
/**
* 出车类型
*/
public static final String DICT_CODE_TURN_OUT_TYPE_CONFIG = "turn_out_type";
/**
* 颜色
*/
public static final String DICT_CODE_COLOR_CONFIG = "color";
/**
* 车源类型
*/
public static final String DICT_CODE_CAR_SOURCE_CONFIG = "car_source";
/**
* 供车商家
*/
public static final String DICT_CODE_MERCHANT_CONFIG = "merchant";
/**
* 车型
*/
public static final String DICT_CODE_CAR_TYPE_CONFIG = "car_type";
/**
* 变速箱
*/
public static final String DICT_CODE_GEARBOX_CONFIG = "gearbox";
/**
* 发动机
*/
public static final String DICT_CODE_ENGINE_CONFIG = "engine";
/**
* 排放标准
*/
public static final String DICT_CODE_EMISSIONS_STANDARD_CONFIG = "emissions_standard";
/**
* 燃料类型
*/
public static final String DICT_CODE_FUEL_TYPE_CONFIG = "fuel_type";
/**
* 汽油标号
*/
public static final String DICT_CODE_GASOLINE_TAB_CONFIG = "gasoline_tab";
/**
* 座位数
*/
public static final String DICT_CODE_SEATINGS_CONFIG = "seatings";
/**
* 厂商类型
*/
public static final String DICT_CODE_MANUFACTURER_TYPE_CONFIG = "manufacturer_type";
/**
* 国别类型
*/
public static final String DICT_CODE_COUNTRY_CONFIG = "country";
/**
* 驱动类型
*/
public static final String DICT_CODE_DRIVE_CONFIG = "drive";
/**
* 车等级
*/
public static final String DICT_CODE_CAR_LEVEL_CONFIG = "car_level";
/**
* 车辆品牌和车系
*/
public static final String DICT_CODE_CAR_BRAND_CONFIG = "car_brand";
/**
* 发送上限
*/
public static final String DICT_CODE_FSSX_CH = "dict_code_fssx_ch";
/**
* 验证码失效时间
*/
public static final String DICT_CODE_YZMSXSJ_CH = "dict_code_yzmsxsj_ch";
/**
* 是否开启短信发送功能
*/
public static final String DICT_CODE_FSGN = "dict_code_fsgn";
/**
* 一点好车是否开启短信发送功能
*/
public static final String YDHC_DICT_CODE_FSGN = "ydhc_dict_code_fsgn";
/**
* 体验账号(不发送短信,不校验短信)
*/
public static final String TEST_ACCOUNT = "test_account";
/**
* 阿里云短信平台账号
*/
public static final String DICT_KEY_YDKJ = "dict_key_ydkj";
/**
* 快递物流
*/
public static final String DICT_CODE_KDWL_CONFIG = "kdwl";
/**
* 座位材质
*/
public static final String DICT_CODE_SEAT_TEXTURE_CONFIG = "seat_texture";
/**
* 音响
*/
public static final String DICT_CODE_GASBAG_CONFIG = "gasbag";
/**
* 气囊
*/
public static final String DICT_CODE_SOUND_BOX_CONFIG = "sound_box";
/*************************************************** MQ 配置 start *********************************************************************/
/**
* MQ配置
*/
public static final String DICT_PARENT_DICT_CODE_MQDELAYTIMELEVEL = "mqDelayTimeLevel";
/**
* 自动确认收货
*/
public static final String DICT_CODE_KEY_ZDQRSH = "zdqrsh";
/**
* 自动关闭订单
*/
public static final String DICT_CODE_KEY_ZDGBDD = "zdgbdd";
/*************************************************** MQ 配置 end *********************************************************************/
/**
* 发送短信方式
*/
public static final String PARENT_DICT_CODE_FSDXFS = "fsdxfs";
/**
* 发送短信方式
*/
public static final String DICT_CODE_FSDXFS = "dict_code_fsdxfs";
/***************************************************门店范围 start *********************************************************************/
/**
* 门店范围父类
*/
public static final String PARENT_DICT_CODE_MDFW_CFG = "mdfw_cfg";
/**
* 门店范围
*/
public static final String PARENT_DICT_CODE_MDFW = "mdfw";
/***************************************************门店范围 end *********************************************************************/
/**
* 取消订单配置
*/
public static final String PARENT_DICT_CODE_QXDD = "qxdd";
/**
* 支付方式配置
*/
public static final String PARENT_DICT_CODE_PAYWAY = "payway";
/**
* 事故起因
*/
public static final String ACCIDENT_CAUSE = "accident_cause";
/**
* 事故具体分类
*/
public static final String ACCIDENT_TYPE = "accident_type";
/**
* 事故责任
*/
public static final String ACCIDENT_DUTY = "accident_duty";
/**
* 事故类别
*/
public static final String ACCIDENT_CATEGORY = "accident_category";
/**
* 事故等级
*/
public static final String ACCIDENT_CLASSIFICATION = "accident_classification";
/**
* 驾驶人类型
*/
public static final String DRIVER_TYPE = "driver_type";
/**
* 服务类型
*/
public static final String SERVICE_TYPE = "service_type";
/**
* 服务配置
*/
public static final String SERVICE_CONFIG = "service_config";
/**
* 功能类型
*/
public static final String FUNCTION_TYPE = "function_type";
/**
* 首页配置
*/
public static final String DICT_CODE_HOME_MODULE = "home_module";
/**
* 车圈配置
* @author: hejiangping
* @date: 2018/12/28
*/
public static final String DICT_CODE_CGJ_CARZONE = "cgj_carzone_cfg";
/**
* 首页配置,1:服务模块;2产品模块
*/
public static final int HOME_MODULE_1 = 1;
public static final int HOME_MODULE_2 = 2;
/**
* 车管家图片类型,1:首页配置;2:服务配置;3:车圈配置;4:广告配置
*/
public static final int CGJ_IMG_TYPE_1 = 1;
public static final int CGJ_IMG_TYPE_2 = 2;
public static final int CGJ_IMG_TYPE_3 = 3;
public static final int CGJ_IMG_TYPE_4 = 4;
/**
* 广告功能模块
*/
public static final String DICT_CODE_CGJ_ADVERT_MODULE = "cgj_advert_module";
/**
* 广告功能模块,1:指引页;2:首页;3:服务;4:车圈
*/
public static final String CGJ_ADVERT_MODULE_1 = "1";
public static final String CGJ_ADVERT_MODULE_2 = "2";
public static final String CGJ_ADVERT_MODULE_3 = "3";
public static final String CGJ_ADVERT_MODULE_4 = "4";
/**
* 客户端,1:APP;2:H5;3:小程序
*/
public static final String DICT_CODE_CGJ_CLIENT = "cgj_client";
public static final String CGJ_CLIENT_1 = "1";
public static final String CGJ_CLIENT_2 = "2";
public static final String CGJ_CLIENT_3 = "3";
/**
* 一点车APP客户端平台
*/
public static final String CGJ_APP_IOS = "ios";
public static final String CGJ_APP_ANDROID = "android";
/**
* 券
*/
public static final String PARENT_CODE_ROLL = "roll";
/**
* 券的有效天数
*/
public static final String ROLL_VALID_DAYS = "roll_commodity_valid_days";
/**
* 券的有效期
*/
public static final String ROLL_VALID_TIME = "roll_commodity_valid_time";
/**
* 授权金额
*/
public static final String AUTHORIZATION_AMOUNT = "authorization_amount";
}
|
[
"983014204@qq.com"
] |
983014204@qq.com
|
fae40cb0b4cf53c439d1cc006433b9f20538fe8b
|
7559646e01a0ac7a96c64694991545a4b5585af3
|
/Inheritance - Exercise/animals/Cat.java
|
24c3757638bf3267a05f7c0deb3141621d035a95
|
[
"MIT"
] |
permissive
|
aquaruiz/Java-OOP
|
5a6a78e4be9c794e3bf588fcbc14e50b8652b285
|
d1321343397ef16ff5bc98f38a202644f5eb50fc
|
refs/heads/master
| 2020-04-25T12:09:52.879498
| 2019-04-01T17:58:57
| 2019-04-01T17:58:57
| 172,769,199
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 205
|
java
|
package animals;
public class Cat extends Animal{
public Cat(String name, int age, String gender) {
super(name, age, gender);
}
@Override
public String produceSound() {
return "MiauMiau";
}
}
|
[
"gpetiaa@gmail.com"
] |
gpetiaa@gmail.com
|
9ca78db459e1f7a2e1a065de0e68e22c3cd451f2
|
aaa9751e4ed70a7b3b41fa2025900dd01205518a
|
/org.eclipse.rcpl.libs/src2/org/purl/dc/terms/LCC.java
|
9ab8e686fbf119c4e5737231d9d7ecb2643159a7
|
[] |
no_license
|
rassisi/rcpl
|
596f0c0aeb4b4ae838f001ad801f9a9c42e31759
|
93b4620bb94a45d0f42666b0bf6ffecae2c0d063
|
refs/heads/master
| 2022-09-20T19:57:54.802738
| 2020-05-10T20:54:01
| 2020-05-10T20:54:01
| 141,136,917
| 0
| 0
| null | 2022-09-01T23:00:59
| 2018-07-16T12:40:18
|
Java
|
UTF-8
|
Java
| false
| false
| 7,255
|
java
|
/*
* XML Type: LCC
* Namespace: http://purl.org/dc/terms/
* Java type: org.purl.dc.terms.LCC
*
* Automatically generated - do not modify.
*/
package org.purl.dc.terms;
/**
* An XML LCC(@http://purl.org/dc/terms/).
*
* This is an atomic type that is a restriction of org.purl.dc.terms.LCC.
*/
public interface LCC extends org.purl.dc.elements.x11.SimpleLiteral
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(LCC.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s0B482D0B338CC9641C1543C3510577FE").resolveHandle("lcc7733type");
/**
* A factory class with static methods for creating instances
* of this type.
*/
public static final class Factory
{
public static org.purl.dc.terms.LCC newInstance() {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
public static org.purl.dc.terms.LCC newInstance(org.apache.xmlbeans.XmlOptions options) {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
/** @param xmlAsString the string value to parse */
public static org.purl.dc.terms.LCC parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
public static org.purl.dc.terms.LCC parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
/** @param file the file from which to load an xml document */
public static org.purl.dc.terms.LCC parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
public static org.purl.dc.terms.LCC parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
public static org.purl.dc.terms.LCC parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
public static org.purl.dc.terms.LCC parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
public static org.purl.dc.terms.LCC parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
public static org.purl.dc.terms.LCC parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
public static org.purl.dc.terms.LCC parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
public static org.purl.dc.terms.LCC parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
public static org.purl.dc.terms.LCC parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
public static org.purl.dc.terms.LCC parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
public static org.purl.dc.terms.LCC parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
public static org.purl.dc.terms.LCC parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.purl.dc.terms.LCC parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.purl.dc.terms.LCC parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (org.purl.dc.terms.LCC) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
private Factory() { } // No instance of this class allowed
}
}
|
[
"Ramin@DESKTOP-69V2J7P.fritz.box"
] |
Ramin@DESKTOP-69V2J7P.fritz.box
|
05732831d90671626ff9d86039decfd886b2dba5
|
18e42a09d7f5dacc1bbeeae4c22284c60cc88b1f
|
/xstream/src/java/com/thoughtworks/xstream/core/util/ThreadSafeSimpleDateFormat.java
|
981b16850f49200905fb037295e8d35d6d82ddd1
|
[
"BSD-3-Clause"
] |
permissive
|
x-stream/xstream
|
ab7f586f1d682902bbf96f3be2b953df98ff32c3
|
289ae780001c31d7d5d75e0d58608c13f44549a2
|
refs/heads/master
| 2023-08-30T19:33:58.497180
| 2023-04-22T16:03:39
| 2023-04-22T16:03:39
| 32,219,624
| 818
| 270
|
NOASSERTION
| 2023-05-02T23:36:09
| 2015-03-14T15:57:12
|
Java
|
UTF-8
|
Java
| false
| false
| 3,139
|
java
|
/*
* Copyright (C) 2004, 2005 Joe Walnes.
* Copyright (C) 2006, 2007, 2009, 2011, 2012, 2014, 2022 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*
* Created on 06. May 2004 by Joe Walnes
*/
package com.thoughtworks.xstream.core.util;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
/**
* Wrapper around java.text.SimpleDateFormat that can be called by multiple threads concurrently.
* <p>
* SimpleDateFormat has a high overhead in creating and is not thread safe. To make best use of resources, the
* ThreadSafeSimpleDateFormat provides a dynamically sizing pool of instances, each of which will only be called by a
* single thread at a time.
* </p>
* <p>
* The pool has a maximum capacity, to limit overhead. If all instances in the pool are in use and another is required,
* it shall block until one becomes available.
* </p>
*
* @author Joe Walnes
* @author Jörg Schaible
*/
public class ThreadSafeSimpleDateFormat {
private final String formatString;
private final Pool<DateFormat> pool;
private final TimeZone timeZone;
public ThreadSafeSimpleDateFormat(
final String format, final TimeZone timeZone, final int initialPoolSize, final int maxPoolSize,
final boolean lenient) {
this(format, timeZone, Locale.ENGLISH, initialPoolSize, maxPoolSize, lenient);
}
public ThreadSafeSimpleDateFormat(
final String format, final TimeZone timeZone, final Locale locale, final int initialPoolSize,
final int maxPoolSize, final boolean lenient) {
formatString = format;
this.timeZone = timeZone;
pool = new Pool<>(initialPoolSize, maxPoolSize, new Pool.Factory<DateFormat>() {
@Override
public SimpleDateFormat newInstance() {
final SimpleDateFormat dateFormat = new SimpleDateFormat(formatString, locale);
dateFormat.setLenient(lenient);
return dateFormat;
}
});
}
public String format(final Date date) {
final DateFormat format = fetchFromPool();
try {
return format.format(date);
} finally {
pool.putInPool(format);
}
}
public Date parse(final String date) throws ParseException {
final DateFormat format = fetchFromPool();
try {
return format.parse(date);
} finally {
pool.putInPool(format);
}
}
private DateFormat fetchFromPool() {
final DateFormat format = pool.fetchFromPool();
final TimeZone tz = timeZone != null ? timeZone : TimeZone.getDefault();
if (!tz.equals(format.getTimeZone())) {
format.setTimeZone(tz);
}
return format;
}
@Override
public String toString() {
return formatString;
}
}
|
[
"joerg.schaible@gmx.de"
] |
joerg.schaible@gmx.de
|
8d5c3d803c4297067ee2743f6f526fa48c1c851f
|
7d7421b373131067bb36283ea0be640463222724
|
/uk.ac.gda.oe/src/gda/oe/dofs/SingleAxisAngularFixedSpeedDOF.java
|
a5f94cf9ec0099dac98bc58fe0cee4220da7a02a
|
[] |
no_license
|
openGDA/gda-legacy
|
65a72bd040fd4f0dcaad04174dc756a010b5bec4
|
0e3a2a5c8e87ee84e488fc1edcc8783e6d2a68c7
|
refs/heads/master
| 2021-04-29T13:41:57.067078
| 2017-09-20T15:56:55
| 2017-10-13T16:15:43
| 11,450,210
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,041
|
java
|
/*-
* Copyright © 2009 Diamond Light Source Ltd., Science and Technology
* Facilities Council Daresbury Laboratory
*
* This file is part of GDA.
*
* GDA is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License version 3 as published by the Free
* Software Foundation.
*
* GDA 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 GDA. If not, see <http://www.gnu.org/licenses/>.
*/
package gda.oe.dofs;
/**
* SingleAxisAngularFixedSpeedDOF Class
*/
public class SingleAxisAngularFixedSpeedDOF extends SingleAxisAngularDOF {
/**
* Determine if speedLevel can be set
*
* @return true if the speed level is settable else false
*/
@Override
public boolean isSpeedLevelSettable() {
return false;
}
}
|
[
"dag-group@diamond.ac.uk"
] |
dag-group@diamond.ac.uk
|
efa04e33cee7de5b410dfcda0476103634a41f39
|
985c21b0edcb062bda7812f7531ace31fc0da6d5
|
/main/ip/src/boofcv/core/image/border/FactoryImageBorder.java
|
94de60295295b3b1235201b419b17181edcd86a2
|
[
"Apache-2.0"
] |
permissive
|
siarheidevel/BoofCV
|
2408c39e035d2046d74cf3bd6bf993a0eee2d501
|
07d4f9dee7f5e1704a547da43bab2c502e3bb5d3
|
refs/heads/master
| 2021-01-15T22:29:56.944693
| 2012-11-07T01:18:39
| 2012-11-07T01:18:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,832
|
java
|
/*
* Copyright (c) 2011-2012, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* 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 boofcv.core.image.border;
import boofcv.struct.image.*;
/**
* Contains functions that create classes which handle pixels outside the image border differently.
*
* @author Peter Abeles
*/
@SuppressWarnings({"unchecked"})
public class FactoryImageBorder {
public static <T extends ImageSingleBand> ImageBorder<T> general( T image , BorderType borderType ) {
ImageBorder<T> ret = general((Class)image.getClass(),borderType);
ret.setImage(image);
return ret;
}
/**
* Given an image type return the appropriate {@link ImageBorder} class type.
*
* @param imageType Type of image which is being processed.
* @return The ImageBorder for processing the image type.
*/
public static Class<ImageBorder> lookupBorderClassType( Class<ImageSingleBand> imageType ) {
if( (Class)imageType == ImageFloat32.class )
return (Class)ImageBorder1D_F32.class;
if( (Class)imageType == ImageFloat64.class )
return (Class)ImageBorder1D_F64.class;
else if( ImageInteger.class.isAssignableFrom(imageType) )
return (Class)ImageBorder1D_I32.class;
else if( (Class)imageType == ImageSInt64.class )
return (Class)ImageBorder1D_I64.class;
else
throw new IllegalArgumentException("Unknown image type");
}
/**
* Creates an instance of the requested algorithms for handling borders pixels. For
* borders that return the same pixel value always use {@link #value(Class, double)} instead.
*
* @param imageType Type of image being processed.
* @param borderType Which border algorithm should it use.
* @return The requested {@link ImageBorder).
*/
public static <T extends ImageSingleBand> ImageBorder<T>
general( Class<T> imageType , BorderType borderType )
{
Class<?> borderClass;
switch(borderType) {
case SKIP:
borderClass = BorderIndex1D_Exception.class;
break;
case NORMALIZED:
throw new IllegalArgumentException("Normalized can't be supported by this border interface");
case REFLECT:
borderClass = BorderIndex1D_Reflect.class;
break;
case EXTENDED:
borderClass = BorderIndex1D_Extend.class;
break;
case WRAP:
borderClass = BorderIndex1D_Wrap.class;
break;
default:
throw new IllegalArgumentException("Border type not supported: "+borderType);
}
if( imageType == ImageFloat32.class )
return (ImageBorder<T>)new ImageBorder1D_F32(borderClass);
if( imageType == ImageFloat64.class )
return (ImageBorder<T>)new ImageBorder1D_F64(borderClass);
else if( ImageInteger.class.isAssignableFrom(imageType) )
return (ImageBorder<T>)new ImageBorder1D_I32((Class)borderClass);
else if( imageType == ImageSInt64.class )
return (ImageBorder<T>)new ImageBorder1D_I64(borderClass);
else
throw new IllegalArgumentException("Unknown image type: "+imageType.getSimpleName());
}
/**
* Creates an {@link ImageBorder} that returns the specified value always.
*
* @see ImageBorderValue
*
* @param image The image the border is being created for.
* @param value The value which will be returned.
* @return An {@link ImageBorder}
*/
public static <T extends ImageSingleBand> ImageBorder<T> value( T image , double value ) {
Class borderType = lookupBorderClassType((Class)image.getClass());
ImageBorder border = value(borderType,value);
border.setImage(image);
return border;
}
/**
* Creates an {@link ImageBorder} that returns the specified value always.
*
* @see ImageBorderValue
*
* @param imageType The image type the border is being created for.
* @param value The value which will be returned.
* @return An {@link ImageBorder}
*/
public static <T extends ImageSingleBand> ImageBorder<T> value( Class<T> imageType , double value ) {
if( imageType == ImageFloat32.class ) {
return (ImageBorder<T>)new ImageBorderValue.Value_F32((float)value);
} else if( imageType == ImageFloat64.class ) {
return (ImageBorder<T>)new ImageBorderValue.Value_F64(value);
} else if( ImageInteger.class.isAssignableFrom(imageType) ) {
return (ImageBorder<T>)new ImageBorderValue.Value_I((int)value);
} else {
throw new IllegalArgumentException("Unknown image type");
}
}
}
|
[
"peter.abeles@gmail.com"
] |
peter.abeles@gmail.com
|
392f49590a58a5516570116084692f389fe7e444
|
c53797052bd953a7efa9a84a4e876eecedbd6913
|
/java-advance-effective-java/src/main/java/name/fw/effectivejava/examples/chapter05/item28/Function.java
|
a73e55e34bc744bae8a95e5a456d2c4b2e9baec1
|
[] |
no_license
|
katlog/TestJava
|
30519bdb172f3d907ccec1a6a6ef220c901f931f
|
4e6ed17f1d67418ae2b9bb351b85f0b3ee8f89a9
|
refs/heads/master
| 2022-12-26T16:58:06.675341
| 2022-02-13T18:43:57
| 2022-02-13T18:43:57
| 158,736,284
| 3
| 1
| null | 2022-12-14T20:30:04
| 2018-11-22T18:13:38
|
Java
|
UTF-8
|
Java
| false
| false
| 151
|
java
|
// Generic Function interface - Page 122
package name.fw.effectivejava.examples.chapter05.item28;
interface Function<T> {
T apply(T arg1, T arg2);
}
|
[
"1375049265@qq.com"
] |
1375049265@qq.com
|
dd07d117a4c46ba8d805c948976582479e46a726
|
7fbe7bc87871f91033130e32126fb5a801f4033a
|
/Lesson06HomeworkTask05/src/training/FolderWatcher.java
|
a1fabb4bee4fe151ec2b1786ecc42d5d26fe9bcc
|
[] |
no_license
|
OlegAnaniev/JavaOOPHomework
|
4f681845edafc30978934a4f8d4b27ba77cee467
|
7e92464feba001def1d55c9e67d6ed738601a06f
|
refs/heads/master
| 2020-06-14T01:35:04.534133
| 2019-08-13T22:47:39
| 2019-08-13T22:47:39
| 194,852,631
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,183
|
java
|
package training;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* Class monitoring changes within a given folder
*
* @version 0.1 20.07.2019
* @author Oleg
*/
public class FolderWatcher implements Runnable {
private final static String ADDED_MESSAGE = "New %s added: %s - %s";
private final static String REMOVED_MESSAGE = "Deleted %s: %s - %s";
private final static String FILE = "file";
private final static String FOLDER = "folder";
private final static String DATE_FORMAT = "dd/MM/y hh:mm:ss";
private File folder;
private boolean withSubfolders;
private SimpleDateFormat dateFormat;
private List<File> list;
private List<File> newList;
private Date lastCheckTime;
/**
* Default constructor
*/
public FolderWatcher() {
super();
}
/**
* Constructor accepting folder
*
* @param folder <code>File</code>
*/
public FolderWatcher(File folder) {
super();
this.folder = folder;
this.dateFormat = new SimpleDateFormat(DATE_FORMAT);
}
/**
* Constructor accepting folder path
*
* @param path <code>String</code>
*/
public FolderWatcher(String path) {
this(new File(path));
}
/**
* Constructor accepting folder and subfolders parameter
*
* @param folder <code>File</code>
* @param withSubfolders <code>boolean</code>
*/
public FolderWatcher(File folder, boolean withSubfolders) {
this(folder);
this.withSubfolders = withSubfolders;
}
/**
* Constructor accepting folder path and subfolders parameter
*
* @param path <code>String</code>
* @param withSubfolders <code>boolean</code>
*/
public FolderWatcher(String path, boolean withSubfolders) {
this(new File(path), withSubfolders);
}
/**
* Gets monitored folder
*
* @return <code>File</code>
*/
public File getFolder() {
return folder;
}
/**
* Sets monitored folder
*
* @param folder <code>File</code>
*/
public void setFolder(File folder) {
this.folder = folder;
}
/**
* Get subfolders parameter
*
* @return <code>boolean</code>
*/
public boolean isWithSubfolders() {
return withSubfolders;
}
/**
* Sets subfolders parameter
*
* @param withSubfolders <code>boolean</code>
*/
public void setWithSubfolders(boolean withSubfolders) {
this.withSubfolders = withSubfolders;
}
/**
* Monitors folder
*/
@Override
public void run() {
if (list == null) {
list = new ArrayList<File>();
getFolderContents(folder, list);
return;
}
lastCheckTime = new Date();
newList = new ArrayList<File>();
getFolderContents(folder, newList);
for (File newFile : newList) {
checkAdded(newFile);
}
for (File file : list) {
checkRemoved(file);
}
list = newList;
}
/**
* Gets contents of a given folder and puts it into a given list
*
* @param folder <code>File</code>
* @param list <code>List<File></code>
*/
private void getFolderContents(File folder, List<File> list) {
File[] files = folder.listFiles();
for (File file : files) {
list.add(file);
if (withSubfolders && file.isDirectory()) {
getFolderContents(file, list);
}
}
}
/**
* Checks if a file/folder was added
*
* @param newFile <code>File</code>
*/
private void checkAdded(File newFile) {
for (File file : list) {
if (newFile.equals(file)) {
return;
}
}
System.out.println(String.format(ADDED_MESSAGE,
newFile.isDirectory() ? FOLDER : FILE,
newFile.getPath(),
dateFormat.format(lastCheckTime)
));
}
/**
* Checks if a file/folder was removed
*
* @param file <code>File</code>
*/
private void checkRemoved(File file) {
for (File newFile : newList) {
if (file.equals(newFile)) {
return;
}
}
System.out.println(String.format(REMOVED_MESSAGE,
file.isDirectory() ? FOLDER : FILE,
file.getPath(),
dateFormat.format(lastCheckTime)
));
}
}
|
[
"test@test.com"
] |
test@test.com
|
fdaace4fc8996604dde62eddefedd46e31244ba2
|
49b57339d939ea3f498249d3aacca1dec543163b
|
/jadx-snap-new/sources/com/google/common/collect/ReverseOrdering.java
|
723d7982dfd0fb38e9e19223b698019f7264b949
|
[] |
no_license
|
8secz-johndpope/snapchat-re
|
1655036c41518c3a2aaa0c2543dc49f4acb93eaf
|
04f5c5bb627d21f620088525fffcf5c99abd7ce5
|
refs/heads/master
| 2020-08-24T09:14:38.209745
| 2019-06-14T05:13:44
| 2019-06-14T05:13:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,167
|
java
|
package com.google.common.collect;
import com.google.common.base.Preconditions;
import java.io.Serializable;
final class ReverseOrdering<T> extends Ordering<T> implements Serializable {
final Ordering<? super T> forwardOrder;
ReverseOrdering(Ordering<? super T> ordering) {
this.forwardOrder = (Ordering) Preconditions.checkNotNull(ordering);
}
public final int compare(T t, T t2) {
return this.forwardOrder.compare(t2, t);
}
public final boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ReverseOrdering)) {
return false;
}
return this.forwardOrder.equals(((ReverseOrdering) obj).forwardOrder);
}
public final int hashCode() {
return -this.forwardOrder.hashCode();
}
public final <S extends T> Ordering<S> reverse() {
return this.forwardOrder;
}
public final String toString() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(this.forwardOrder);
stringBuilder.append(".reverse()");
return stringBuilder.toString();
}
}
|
[
"blevy@protonmail.com"
] |
blevy@protonmail.com
|
a8171c99c22cb9a122f25ffa992f8d09c1b0cb62
|
ea8013860ed0b905c64f449c8bce9e0c34a23f7b
|
/SystemUIGoogle/sources/com/android/wm/shell/onehanded/OneHandedController$OneHandedImpl$$ExternalSyntheticLambda1.java
|
4bffc59753ae5097988d6cb7fbe55a6e7ab1e374
|
[] |
no_license
|
TheScarastic/redfin_b5
|
5efe0dc0d40b09a1a102dfb98bcde09bac4956db
|
6d85efe92477576c4901cce62e1202e31c30cbd2
|
refs/heads/master
| 2023-08-13T22:05:30.321241
| 2021-09-28T12:33:20
| 2021-09-28T12:33:20
| 411,210,644
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 697
|
java
|
package com.android.wm.shell.onehanded;
import com.android.wm.shell.onehanded.OneHandedController;
/* loaded from: classes2.dex */
public final /* synthetic */ class OneHandedController$OneHandedImpl$$ExternalSyntheticLambda1 implements Runnable {
public final /* synthetic */ OneHandedController.OneHandedImpl f$0;
public final /* synthetic */ int f$1;
public /* synthetic */ OneHandedController$OneHandedImpl$$ExternalSyntheticLambda1(OneHandedController.OneHandedImpl oneHandedImpl, int i) {
this.f$0 = oneHandedImpl;
this.f$1 = i;
}
@Override // java.lang.Runnable
public final void run() {
this.f$0.lambda$stopOneHanded$2(this.f$1);
}
}
|
[
"warabhishek@gmail.com"
] |
warabhishek@gmail.com
|
d43717a2d98b45cce643d8f1fdb23a2b5490d346
|
2d2013c46190f7f9927d3a923b8413a91e91fbbb
|
/sources/kotlinx/coroutines/JobCancellationException.java
|
362447c089607b72b2c84d421c622f71b504b39d
|
[] |
no_license
|
ghuntley/Aarogya-Setu_v1.1.1.apk
|
af5b054feddc901ca62b9233bb4aac576f8c4249
|
ca931e596a31ab7298f3c7dc1ca3eaa327f84473
|
refs/heads/master
| 2022-05-26T15:50:36.276158
| 2020-05-02T12:06:54
| 2020-05-02T12:06:54
| 260,674,190
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,377
|
java
|
package kotlinx.coroutines;
import f.a.p0;
import f.a.q;
import f.a.x;
import java.util.concurrent.CancellationException;
import n.m.c.f;
/* compiled from: Exceptions.kt */
public final class JobCancellationException extends CancellationException implements q<JobCancellationException> {
public final p0 e;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public JobCancellationException(String str, Throwable th, p0 p0Var) {
super(str);
if (str == null) {
f.a("message");
throw null;
} else if (p0Var != null) {
this.e = p0Var;
if (th != null) {
initCause(th);
}
} else {
f.a("job");
throw null;
}
}
public Throwable a() {
if (!x.f865b) {
return null;
}
String message = getMessage();
if (message != null) {
return new JobCancellationException(message, this, this.e);
}
f.a();
throw null;
}
public boolean equals(Object obj) {
if (obj != this) {
if (obj instanceof JobCancellationException) {
JobCancellationException jobCancellationException = (JobCancellationException) obj;
if (!f.a((Object) jobCancellationException.getMessage(), (Object) getMessage()) || !f.a((Object) jobCancellationException.e, (Object) this.e) || !f.a((Object) jobCancellationException.getCause(), (Object) getCause())) {
return false;
}
}
return false;
}
return true;
}
public Throwable fillInStackTrace() {
if (!x.f865b) {
return this;
}
Throwable fillInStackTrace = super.fillInStackTrace();
f.a((Object) fillInStackTrace, "super.fillInStackTrace()");
return fillInStackTrace;
}
public int hashCode() {
String message = getMessage();
if (message != null) {
int hashCode = (this.e.hashCode() + (message.hashCode() * 31)) * 31;
Throwable cause = getCause();
return hashCode + (cause != null ? cause.hashCode() : 0);
}
f.a();
throw null;
}
public String toString() {
return super.toString() + "; job=" + this.e;
}
}
|
[
"ghuntley@ghuntley.com"
] |
ghuntley@ghuntley.com
|
390dac31a209aa68cd9c90732b78542310671f08
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/com/alipay/sofa/rpc/common/utils/CompatibleTypeUtilsTest.java
|
a7fb124a58b377014ba7ab3c7f979f2c0df25001
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 6,656
|
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 com.alipay.sofa.rpc.common.utils;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Set;
import org.junit.Assert;
import org.junit.Test;
/**
*
*
* @author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
*/
public class CompatibleTypeUtilsTest {
@Test
public void convert() throws Exception {
Assert.assertEquals('x', CompatibleTypeUtils.convert("x", char.class));
Assert.assertEquals('x', CompatibleTypeUtils.convert("x", Character.class));
boolean error = false;
try {
CompatibleTypeUtils.convert("xx", Character.class);
} catch (Exception e) {
error = true;
}
Assert.assertTrue(error);
Assert.assertEquals(TestEnum.A, CompatibleTypeUtils.convert("A", TestEnum.class));
Assert.assertEquals(new BigInteger("123"), CompatibleTypeUtils.convert("123", BigInteger.class));
Assert.assertEquals(new BigDecimal("123.12"), CompatibleTypeUtils.convert("123.12", BigDecimal.class));
Assert.assertEquals(new Short("123"), CompatibleTypeUtils.convert("123", Short.class));
Assert.assertEquals(new Short("123"), CompatibleTypeUtils.convert("123", short.class));
Assert.assertEquals(new Integer("123"), CompatibleTypeUtils.convert("123", Integer.class));
Assert.assertEquals(new Integer("123"), CompatibleTypeUtils.convert("123", int.class));
Assert.assertEquals(new Long("123"), CompatibleTypeUtils.convert("123", Long.class));
Assert.assertEquals(new Long("123"), CompatibleTypeUtils.convert("123", long.class));
Assert.assertEquals(new Double("123.1"), CompatibleTypeUtils.convert("123.1", Double.class));
Assert.assertEquals(new Double("123.1"), CompatibleTypeUtils.convert("123.1", double.class));
Assert.assertEquals(new Byte("123"), CompatibleTypeUtils.convert("123", Byte.class));
Assert.assertEquals(new Byte("123"), CompatibleTypeUtils.convert("123", byte.class));
Assert.assertEquals(new Float("123.1"), CompatibleTypeUtils.convert("123.1", Float.class));
Assert.assertEquals(new Float("123.1"), CompatibleTypeUtils.convert("123.1", float.class));
Assert.assertEquals(Boolean.TRUE, CompatibleTypeUtils.convert("true", Boolean.class));
Assert.assertEquals(Boolean.TRUE, CompatibleTypeUtils.convert("true", boolean.class));
Date dataTime = DateUtils.strToDate("2018-1-1 11:22:33");
Assert.assertEquals(dataTime, CompatibleTypeUtils.convert("2018-1-1 11:22:33", Date.class));
Long timeLong = DateUtils.strToLong("2018-1-1 11:22:33");
java.sql.Date sqlDate = new java.sql.Date(timeLong);
Object timeResult = CompatibleTypeUtils.convert("2018-1-1 11:22:33", java.sql.Date.class);
Assert.assertEquals(sqlDate, timeResult);
timeResult = CompatibleTypeUtils.convert(timeLong, java.sql.Date.class);
Assert.assertEquals(sqlDate, timeResult);
timeResult = CompatibleTypeUtils.convert("2018-1-1 11:22:33", Timestamp.class);
Timestamp timestamp = new Timestamp(timeLong);
Assert.assertEquals(timestamp, timeResult);
timeResult = CompatibleTypeUtils.convert("2018-1-1 11:22:33", Time.class);
Time time = new Time(timeLong);
Assert.assertEquals(time, timeResult);
Assert.assertEquals(new Short("123"), CompatibleTypeUtils.convert(123, Short.class));
Assert.assertEquals(new Short("123"), CompatibleTypeUtils.convert(123, short.class));
Assert.assertEquals(new Integer("123"), CompatibleTypeUtils.convert(123, Integer.class));
Assert.assertEquals(new Integer("123"), CompatibleTypeUtils.convert(123, int.class));
Assert.assertEquals(new Long("123"), CompatibleTypeUtils.convert(123, Long.class));
Assert.assertEquals(new Long("123"), CompatibleTypeUtils.convert(123, long.class));
Assert.assertEquals(new Double("123.1"), CompatibleTypeUtils.convert(123.1, Double.class));
Assert.assertEquals(new Double("123.1"), CompatibleTypeUtils.convert(123.1, double.class));
Assert.assertEquals(new Byte("123"), CompatibleTypeUtils.convert(123, Byte.class));
Assert.assertEquals(new Byte("123"), CompatibleTypeUtils.convert(123, byte.class));
Assert.assertEquals(new Float("123.1"), CompatibleTypeUtils.convert(123.1, Float.class));
Assert.assertEquals(new Float("123.1"), CompatibleTypeUtils.convert(123.1, float.class));
Assert.assertEquals(Boolean.TRUE, CompatibleTypeUtils.convert("true", Boolean.class));
Assert.assertEquals(Boolean.TRUE, CompatibleTypeUtils.convert("true", boolean.class));
String[] ss = ((String[]) (CompatibleTypeUtils.convert(Collections.singletonList("x"), String[].class)));
Assert.assertEquals("x", ss[0]);
List list = ((List) (CompatibleTypeUtils.convert(Collections.singleton("x"), List.class)));
Assert.assertEquals("x", list.get(0));
list = ((List) (CompatibleTypeUtils.convert(Collections.singletonList("x"), ArrayList.class)));
Assert.assertEquals("x", list.get(0));
Set set = ((Set) (CompatibleTypeUtils.convert(Collections.singletonList("x"), Set.class)));
Assert.assertEquals("x", set.iterator().next());
list = ((List) (CompatibleTypeUtils.convert(new String[]{ "x" }, List.class)));
Assert.assertEquals("x", list.get(0));
list = ((List) (CompatibleTypeUtils.convert(new String[]{ "x" }, ArrayList.class)));
Assert.assertEquals("x", list.get(0));
set = ((Set) (CompatibleTypeUtils.convert(new String[]{ "x" }, Set.class)));
Assert.assertEquals("x", set.iterator().next());
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
cbce21f8193489b57743c3f6341ec8a356d26613
|
fef6d6dc71693215abc22cfd56382746b014e4ce
|
/src/java/com/entities/Merchantprofile.java
|
6a321badcd5108a60db1032f6ebb18a2f4655879
|
[] |
no_license
|
lawale4me/ExitPortal
|
0be926dcda7740b460717a473f27306f829d5d5b
|
8b427f1a44d53164500a4e6b16b2ed095553b7ed
|
refs/heads/master
| 2020-04-06T03:20:45.642544
| 2016-09-27T13:50:24
| 2016-09-27T13:50:24
| 69,361,830
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,507
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.entities;
import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import org.codehaus.jackson.annotate.JsonIgnore;
/**
*
* @author Ahmed
*/
@Entity
@Table(name = "merchantprofile")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Merchantprofile.findAll", query = "SELECT m FROM Merchantprofile m"),
@NamedQuery(name = "Merchantprofile.findById", query = "SELECT m FROM Merchantprofile m WHERE m.id = :id"),
@NamedQuery(name = "Merchantprofile.findByUserName", query = "SELECT m FROM Merchantprofile m WHERE m.userName = :userName"),
@NamedQuery(name = "Merchantprofile.findByPassword", query = "SELECT m FROM Merchantprofile m WHERE m.password = :password"),
@NamedQuery(name = "Merchantprofile.findByFullName", query = "SELECT m FROM Merchantprofile m WHERE m.fullName = :fullName"),
@NamedQuery(name = "Merchantprofile.findByPhoneNo", query = "SELECT m FROM Merchantprofile m WHERE m.phoneNo = :phoneNo"),
@NamedQuery(name = "Merchantprofile.findByEmail", query = "SELECT m FROM Merchantprofile m WHERE m.email = :email"),
@NamedQuery(name = "Merchantprofile.findByLocation", query = "SELECT m FROM Merchantprofile m WHERE m.location = :location"),
@NamedQuery(name = "Merchantprofile.findByUuid", query = "SELECT m FROM Merchantprofile m WHERE m.uuid = :uuid"),
@NamedQuery(name = "Merchantprofile.findByStatus", query = "SELECT m FROM Merchantprofile m WHERE m.status = :status"),
@NamedQuery(name = "Merchantprofile.findByLatlng", query = "SELECT m FROM Merchantprofile m WHERE m.latlng = :latlng"),
@NamedQuery(name = "Merchantprofile.findByRole", query = "SELECT m FROM Merchantprofile m WHERE m.role = :role")})
public class Merchantprofile implements Serializable {
@OneToMany(mappedBy = "adminuser")
private Collection<Campaignbatch> campaignbatchCollection;
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "ID")
private Integer id;
@Column(name = "userName")
private String userName;
@Column(name = "password")
private String password;
@Column(name = "fullName")
private String fullName;
@Column(name = "phoneNo")
private String phoneNo;
@Column(name = "email")
private String email;
@Column(name = "location")
private String location;
@Column(name = "uuid")
private String uuid;
@Column(name = "status")
private Boolean status;
@Column(name = "latlng")
private String latlng;
@Column(name = "role")
private Integer role;
@JoinColumn(name = "branch", referencedColumnName = "branch_id")
@ManyToOne
private Branch branch;
public Merchantprofile() {
}
public Merchantprofile(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public String getPhoneNo() {
return phoneNo;
}
public void setPhoneNo(String phoneNo) {
this.phoneNo = phoneNo;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public Boolean getStatus() {
return status;
}
public void setStatus(Boolean status) {
this.status = status;
}
public String getLatlng() {
return latlng;
}
public void setLatlng(String latlng) {
this.latlng = latlng;
}
public Integer getRole() {
return role;
}
public void setRole(Integer role) {
this.role = role;
}
public Branch getBranch() {
return branch;
}
public void setBranch(Branch branch) {
this.branch = branch;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Merchantprofile)) {
return false;
}
Merchantprofile other = (Merchantprofile) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.entities.Merchantprofile[ id=" + id + " ]";
}
@XmlTransient
@JsonIgnore
public Collection<Campaignbatch> getCampaignbatchCollection() {
return campaignbatchCollection;
}
public void setCampaignbatchCollection(Collection<Campaignbatch> campaignbatchCollection) {
this.campaignbatchCollection = campaignbatchCollection;
}
}
|
[
"ahmed.oladele@vanso.com"
] |
ahmed.oladele@vanso.com
|
4b4b3d458c184f56ec0d8b872b18f7534ea464eb
|
a88404e860f9e81f175d80c51b8e735fa499c93c
|
/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ReferenceClientParam.java
|
7b2aba70b6b6bd5054b135eb7fc5a194fbd8b096
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
sabri0/hapi-fhir
|
4a53409d31b7f40afe088aa0ee8b946860b8372d
|
c7798fee4880ee8ffc9ed2e42c29c3b8f6753a1c
|
refs/heads/master
| 2020-06-07T20:02:33.258075
| 2019-06-18T09:40:00
| 2019-06-18T09:40:00
| 193,081,738
| 2
| 0
|
Apache-2.0
| 2019-06-21T10:46:17
| 2019-06-21T10:46:17
| null |
UTF-8
|
Java
| false
| false
| 4,764
|
java
|
package ca.uhn.fhir.rest.gclient;
import ca.uhn.fhir.context.FhirContext;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.api.IIdType;
import java.util.Arrays;
import java.util.Collection;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 - 2019 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
public class ReferenceClientParam extends BaseClientParam implements IParam {
private String myName;
public ReferenceClientParam(String theName) {
myName = theName;
}
@Override
public String getParamName() {
return myName;
}
/**
* Include a chained search. For example:
* <pre>
* Bundle resp = ourClient
* .search()
* .forResource(QuestionnaireResponse.class)
* .where(QuestionnaireResponse.SUBJECT.hasChainedProperty(Patient.FAMILY.matches().value("SMITH")))
* .returnBundle(Bundle.class)
* .execute();
* </pre>
*/
public ICriterion<ReferenceClientParam> hasChainedProperty(ICriterion<?> theCriterion) {
return new ReferenceChainCriterion(getParamName(), theCriterion);
}
/**
* Include a chained search with a resource type. For example:
* <pre>
* Bundle resp = ourClient
* .search()
* .forResource(QuestionnaireResponse.class)
* .where(QuestionnaireResponse.SUBJECT.hasChainedProperty("Patient", Patient.FAMILY.matches().value("SMITH")))
* .returnBundle(Bundle.class)
* .execute();
* </pre>
*/
public ICriterion<ReferenceClientParam> hasChainedProperty(String theResourceType, ICriterion<?> theCriterion) {
return new ReferenceChainCriterion(getParamName(), theResourceType, theCriterion);
}
/**
* Match the referenced resource if the resource has the given ID (this can be
* the logical ID or the absolute URL of the resource)
*/
public ICriterion<ReferenceClientParam> hasId(IIdType theId) {
return new StringCriterion<>(getParamName(), theId.getValue());
}
/**
* Match the referenced resource if the resource has the given ID (this can be
* the logical ID or the absolute URL of the resource)
*/
public ICriterion<ReferenceClientParam> hasId(String theId) {
return new StringCriterion<>(getParamName(), theId);
}
/**
* Match the referenced resource if the resource has ANY of the given IDs
* (this is an OR search, not an AND search), (this can be the logical ID or
* the absolute URL of the resource). Note that to specify an AND search,
* simply add a subsequent {@link IQuery#where(ICriterion) where} criteria
* with the same parameter.
*/
public ICriterion<ReferenceClientParam> hasAnyOfIds(Collection<String> theIds) {
return new StringCriterion<>(getParamName(), theIds);
}
/**
* Match the referenced resource if the resource has ANY of the given IDs
* (this is an OR search, not an AND search), (this can be the logical ID or
* the absolute URL of the resource). Note that to specify an AND search,
* simply add a subsequent {@link IQuery#where(ICriterion) where} criteria
* with the same parameter.
*/
public ICriterion<ReferenceClientParam> hasAnyOfIds(String... theIds) {
Validate.notNull(theIds, "theIds must not be null");
return hasAnyOfIds(Arrays.asList(theIds));
}
private static class ReferenceChainCriterion implements ICriterion<ReferenceClientParam>, ICriterionInternal {
private final String myResourceTypeQualifier;
private String myParamName;
private ICriterionInternal myWrappedCriterion;
ReferenceChainCriterion(String theParamName, ICriterion<?> theWrappedCriterion) {
this(theParamName, null, theWrappedCriterion);
}
ReferenceChainCriterion(String theParamName, String theResourceType, ICriterion<?> theWrappedCriterion) {
myParamName = theParamName;
myResourceTypeQualifier = isNotBlank(theResourceType) ? ":" + theResourceType : "";
myWrappedCriterion = (ICriterionInternal) theWrappedCriterion;
}
@Override
public String getParameterName() {
return myParamName + myResourceTypeQualifier + "." + myWrappedCriterion.getParameterName();
}
@Override
public String getParameterValue(FhirContext theContext) {
return myWrappedCriterion.getParameterValue(theContext);
}
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
ecdb28791444a46950ee1423680daeb283e958b5
|
e0e27926d952b5a5abedf24c850c7cae821f69fd
|
/google image loader api complete/com/google/android/accounts/CupcakeContentSyncer.java
|
d8ce9e7456a21c90a88aaa493a4bddb9dd5585e1
|
[] |
no_license
|
shadymumo/hbworkspace1-100
|
b8d7794ba1b6e7b101641f015e2e92b3d6cd6e27
|
a5e6f2f418cd6173ca2fb131e06842e1a7fa5113
|
refs/heads/master
| 2021-06-04T06:00:31.587498
| 2015-08-13T07:15:53
| 2015-08-13T07:15:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,188
|
java
|
/*-
* Copyright (C) 2010 Google 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.google.android.accounts;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.format.DateUtils;
import android.util.Log;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* A Cupcake-compatibile implementation of {@link ContentSyncer} where sync is
* executed by a per-application {@link AbstractSyncService} and sync
* preferences are stored in a database managed by a
* {@link DatabaseAuthenticator} declared in the manifest.
*/
class CupcakeContentSyncer extends ContentSyncer {
private static final String LOG_TAG = "CupcakeContentSyncer";
private static final String NAMESPACE = "http://schemas.android.com/apk/res/android";
// Adapted from com.android.internal.util.XmlUtils
private static final void beginDocument(XmlPullParser parser, String firstElementName)
throws XmlPullParserException, IOException {
int type;
while ((type = parser.next()) != XmlPullParser.START_TAG
&& type != XmlPullParser.END_DOCUMENT) {
}
if (type != XmlPullParser.START_TAG) {
throw new XmlPullParserException("No start tag found");
}
if (!parser.getName().equals(firstElementName)) {
throw new XmlPullParserException("Unexpected start tag: found " + parser.getName()
+ ", expected " + firstElementName);
}
}
private Context mContext;
private Map<String, DatabaseAuthenticator> mAuthenticators;
public CupcakeContentSyncer(Context context) {
mContext = context;
mAuthenticators = DatabaseAuthenticator.createDatabaseAuthenticators(context);
}
private DatabaseAuthenticator getAuthenticator(String type) {
return mAuthenticators.get(type);
}
@Override
public void setIsSyncable(Account account, String authority, int syncable) {
if (account == null || authority == null) {
throw new NullPointerException();
}
// All accounts are syncable by default
}
@Override
public int getIsSyncable(Account account, String authority) {
if (account == null || authority == null) {
throw new NullPointerException();
}
// All accounts are syncable by default
return 1;
}
@Override
public void setSyncAutomatically(Account account, String authority, boolean sync) {
if (account == null || authority == null) {
throw new NullPointerException();
}
DatabaseAuthenticator authenticator = getAuthenticator(account.type);
if (authenticator != null) {
authenticator.setSyncAutomatically(account, authority, sync);
}
}
@Override
public boolean getSyncAutomatically(Account account, String authority) {
if (account == null || authority == null) {
throw new NullPointerException();
}
DatabaseAuthenticator authenticator = getAuthenticator(account.type);
if (authenticator != null) {
return authenticator.getSyncAutomatically(account, authority);
} else {
return false;
}
}
private List<ResolveInfo> querySyncAdapterServices() {
PackageManager pm = mContext.getPackageManager();
Intent intent = new Intent("android.content.SyncAdapter");
int flags = PackageManager.GET_META_DATA;
return pm.queryIntentServices(intent, flags);
}
@Override
public void requestSync(Account account, String authority, Bundle extras) {
if (account == null || authority == null) {
throw new NullPointerException();
}
for (ResolveInfo service : querySyncAdapterServices()) {
try {
ServiceInfo info = service.serviceInfo;
PackageManager pm = mContext.getPackageManager();
Resources resources = pm.getResourcesForApplication(info.packageName);
Bundle metaData = info.metaData;
int resId = metaData.getInt("android.content.SyncAdapter");
XmlResourceParser xml = resources.getXml(resId);
try {
beginDocument(xml, "sync-adapter");
String contentAuthority = xml.getAttributeValue(NAMESPACE, "contentAuthority");
String accountType = xml.getAttributeValue(NAMESPACE, "accountType");
String supportsUploadingValue = xml.getAttributeValue(NAMESPACE,
"supportsUploading");
boolean supportsUploading = "true".equals(supportsUploadingValue);
if (contentAuthority.equals(authority)) {
if (accountType.equals(account.type)) {
Intent serviceIntent = new Intent(
AbstractSyncService.ACTION_REQUEST_SYNC);
serviceIntent.setClassName(info.packageName, info.name);
serviceIntent.putExtra(AbstractSyncService.EXTRA_ACCOUNT_NAME,
account.name);
serviceIntent.putExtra(AbstractSyncService.EXTRA_ACCOUNT_TYPE,
account.type);
serviceIntent.putExtra(AbstractSyncService.EXTRA_AUTHORITY, authority);
serviceIntent.putExtra(AbstractSyncService.EXTRA_BUNDLE, extras);
serviceIntent.putExtra(AbstractSyncService.EXTRA_SUPPORTS_UPLOADING,
supportsUploading);
mContext.startService(serviceIntent);
}
}
} finally {
xml.close();
}
} catch (Exception e) {
Log.e(LOG_TAG, "Could not read SyncAdapter meta-data", e);
}
}
}
private AlarmManager getAlarmManager() {
return (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
}
private PendingIntent createOperation(Account account, String authority, Bundle extras) {
return PeriodicSyncReceiver.createPendingIntent(mContext, account, authority, extras);
}
@Override
public void addPeriodicSync(Account account, String authority, Bundle extras, long pollFrequency) {
long pollFrequencyMsec = pollFrequency * DateUtils.SECOND_IN_MILLIS;
AlarmManager manager = getAlarmManager();
int type = AlarmManager.ELAPSED_REALTIME_WAKEUP;
long triggerAtTime = SystemClock.elapsedRealtime() + pollFrequencyMsec;
long interval = pollFrequencyMsec;
PendingIntent operation = createOperation(account, authority, extras);
manager.setInexactRepeating(type, triggerAtTime, interval, operation);
}
@Override
public void removePeriodicSync(Account account, String authority, Bundle extras) {
AlarmManager manager = getAlarmManager();
PendingIntent operation = createOperation(account, authority, extras);
manager.cancel(operation);
}
}
|
[
"harshalbenake@gmail.com"
] |
harshalbenake@gmail.com
|
5eb7d3e3d519826dfda621f69498ec856ec0f0b4
|
5b5f90c99f66587cea981a640063a54b6ea75185
|
/src/main/java/com/coxandkings/travel/operations/model/core/OpsPaxTypeFareSupplier.java
|
3d80a9d335200a3d30aca8ea6eec268e2eec952f
|
[] |
no_license
|
suyash-capiot/operations
|
02558d5f4c72a895d4a7e7e743495a118b953e97
|
b6ad01cbdd60190e3be1f2a12d94258091fec934
|
refs/heads/master
| 2020-04-02T06:22:30.589898
| 2018-10-26T12:11:11
| 2018-10-26T12:11:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 773
|
java
|
package com.coxandkings.travel.operations.model.core;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;
@JsonIgnoreProperties(ignoreUnknown = true)
public class OpsPaxTypeFareSupplier extends OpsPaxTypeFare {
@JsonProperty("clientCommercials")
private List<OpsFlightPaxSupplierCommercial> clientCommercials = new ArrayList<>();
public OpsPaxTypeFareSupplier() {
}
public List<OpsFlightPaxSupplierCommercial> getClientCommercials() {
return clientCommercials;
}
public void setClientCommercials(List<OpsFlightPaxSupplierCommercial> clientCommercials) {
this.clientCommercials = clientCommercials;
}
}
|
[
"sahil@capiot.com"
] |
sahil@capiot.com
|
59345751f2be4a58f7ecf4c5744094359297f601
|
2e03da8505fba2f5fba0aa96096240cfe1584490
|
/crunchyroll/crunchyroll2-0-3/com/fasterxml/jackson/databind/ser/std/DateSerializer.java
|
f09d5bec328783f97efc97ca724f02b495c785a8
|
[] |
no_license
|
JairoBm13/crunchywomod
|
c00f8535a76ee7a5e0554d766ddc08b608e57f9b
|
90ad43cdf12e41fc6ff2323ec5d6d94cc45a1c52
|
refs/heads/master
| 2021-01-20T14:48:30.312526
| 2017-05-08T21:37:16
| 2017-05-08T21:37:16
| 90,674,385
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,814
|
java
|
//
// Decompiled by Procyon v0.5.30
//
package com.fasterxml.jackson.databind.ser.std;
import com.fasterxml.jackson.core.JsonGenerationException;
import java.io.IOException;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.core.JsonGenerator;
import java.text.DateFormat;
import com.fasterxml.jackson.databind.annotation.JacksonStdImpl;
import java.util.Date;
@JacksonStdImpl
public class DateSerializer extends DateTimeSerializerBase<Date>
{
public static final DateSerializer instance;
static {
instance = new DateSerializer();
}
public DateSerializer() {
this(false, null);
}
public DateSerializer(final boolean b, final DateFormat dateFormat) {
super(Date.class, b, dateFormat);
}
@Override
protected long _timestamp(final Date date) {
if (date == null) {
return 0L;
}
return date.getTime();
}
@Override
public void serialize(final Date date, final JsonGenerator jsonGenerator, final SerializerProvider serializerProvider) throws IOException, JsonGenerationException {
if (this._useTimestamp) {
jsonGenerator.writeNumber(this._timestamp(date));
return;
}
if (this._customFormat != null) {
synchronized (this._customFormat) {
jsonGenerator.writeString(this._customFormat.format(date));
return;
}
}
serializerProvider.defaultSerializeDateValue(date, jsonGenerator);
}
@Override
public DateSerializer withFormat(final boolean b, final DateFormat dateFormat) {
if (b) {
return new DateSerializer(true, null);
}
return new DateSerializer(false, dateFormat);
}
}
|
[
"j.bautista.m13@outlook.com"
] |
j.bautista.m13@outlook.com
|
15de7e1b70159104d18befebf829a7093d1f2a95
|
342e571310f8019a4fa8117b08897b9fb5736030
|
/src/test/java/com/firedata/qtacker/repository/search/AddressSearchRepositoryMockConfiguration.java
|
e9c6464ef4d01250da8b19c227f6a899e6777d61
|
[] |
no_license
|
Marko-Mijovic/qtacker-application
|
383ae9e2bd6c6d92d2555c8b79bdfca9d801851b
|
3f97152f208cb3347142b2bbc207c498469b6c6c
|
refs/heads/master
| 2022-04-14T04:03:28.834874
| 2020-04-15T00:32:04
| 2020-04-15T00:32:04
| 255,757,303
| 0
| 0
| null | 2020-04-15T00:32:42
| 2020-04-15T00:04:04
|
Java
|
UTF-8
|
Java
| false
| false
| 455
|
java
|
package com.firedata.qtacker.repository.search;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.Configuration;
/**
* Configure a Mock version of {@link AddressSearchRepository} to test the
* application without starting Elasticsearch.
*/
@Configuration
public class AddressSearchRepositoryMockConfiguration {
@MockBean
private AddressSearchRepository mockAddressSearchRepository;
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
013c605efbc1b168fd3d282081c20aaf9ee7f596
|
54990cda09e6275868cf7702e0a62690e26d2e7d
|
/app/src/main/java/com/example/app_deepanshu/student.java
|
d20efb2f1fb642c25a943bbda0129b2b531b0083
|
[] |
no_license
|
Deepanshuchauhan123/Education-System-App
|
d0b2e70a02a0c355787eb364ca14e94f172869b0
|
1384f5683c0d459afbade9c78914a559197ca755
|
refs/heads/master
| 2022-04-09T12:36:37.504022
| 2020-02-23T20:59:58
| 2020-02-23T20:59:58
| 232,082,533
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,330
|
java
|
package com.example.app_deepanshu;
public class student {
public String E_mail,Name,Guardian_Name,student_adhaar,father_adhaar,Father_mobile,student_add,student_state;
public student(){
}
public student(String student_email,String student_name,String student_parents,
String student_adhaar,String father_adhaar,String student_mobile,String student_add,String student_state) {
this.E_mail = student_email;
this.Name = student_name;
this.Guardian_Name = student_parents;
this.student_adhaar = student_adhaar;
this.father_adhaar = father_adhaar;
this.Father_mobile = student_mobile;
this.student_add=student_add;
this.student_state=student_state;
}
public String getE_mail() {
return E_mail;
}
public String getName() {
return Name;
}
public String getGuardian_Name() {
return Guardian_Name;
}
public String getStudent_adhaar() {
return student_adhaar;
}
public String getFather_adhaar() {
return father_adhaar;
}
public String getFather_mobile() {
return Father_mobile;
}
public String getStudent_add() {
return student_add;
}
public String getStudent_state() {
return student_state;
}
}
|
[
"deepanshuchauhan7287@gmail.com"
] |
deepanshuchauhan7287@gmail.com
|
4f755a447a2e76380ea56d2f81b8662db8ba53b4
|
83d56024094d15f64e07650dd2b606a38d7ec5f1
|
/sicc_druida/fuentes/java/LPBusquedaModificarKitProductos.java
|
5a469592985dc73665150052562d2da2694589ad
|
[] |
no_license
|
cdiglesias/SICC
|
bdeba6af8f49e8d038ef30b61fcc6371c1083840
|
72fedb14a03cb4a77f62885bec3226dbbed6a5bb
|
refs/heads/master
| 2021-01-19T19:45:14.788800
| 2016-04-07T16:20:51
| 2016-04-07T16:20:51
| null | 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 1,435
|
java
|
/**
* Copyright 2003 © por Indra Sistemas,S.A.. Todos los derechos reservados.
* Avda. de Bruselas, 35
* Parque Empresarial Arroyo de la Vega
* 28108 Alcobendas, Madrid
* España
*
* Privado y Confidencial.
* La información contenida en este documento es propiedad de Indra sistemas.
* Para uso exclusivo de empleados autorizados no permitiéndose
* la distribución de este código sin permiso expreso.
*/
/*
INDRA/CAR/PROY
$Id: LPBusquedaModificarKitProductos.java,v 1.1 2009/12/03 18:38:52 pecbazalar Exp $
DESC
*/
/**
* Sistema: Belcorp
* Modulo: MAE
* Submódulo:
* Componente: LP
* Fecha: 16/02/2004
* Observaciones: Componente construido de acuerdo a la especificación del
* Modelo de Componentes SICC-DMCO-MAE-201-304
* @version 1.0
* @autor Matias Dolce
*/
import LPSICCBase;
public class LPBusquedaModificarKitProductos extends LPSICCBase {
public LPBusquedaModificarKitProductos() {
super();
}
public void inicio() throws Exception {
}
public void ejecucion() throws Exception {
setTrazaFichero();
try {
rastreo();
traza("Caso de Uso = Modificar");
conectorAction("LPBusquedaKit");
conectorActionParametro("casoDeUso", "modificar");
}
catch ( Exception e ) {
e.printStackTrace();
lanzarPaginaError(e);
}
}
}
|
[
"hp.vega@hotmail.com"
] |
hp.vega@hotmail.com
|
de16fb5cfcd23405234e4d26d170d2aa2e659727
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/83_xbus-net.sf.xbus.base.core.arithmetic.XIntSupport-0.5-3/net/sf/xbus/base/core/arithmetic/XIntSupport_ESTest.java
|
39bd7c94885ec21a2b603f65938d29b993594ffd
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 660
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Oct 29 11:09:19 GMT 2019
*/
package net.sf.xbus.base.core.arithmetic;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class XIntSupport_ESTest extends XIntSupport_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
04105f51cd3f20d050390740497622b279d78e3b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/4/4_527fd82f377ae31fba6bfe4a87633a692715c4e1/AndroidAlertUI/4_527fd82f377ae31fba6bfe4a87633a692715c4e1_AndroidAlertUI_s.java
|
cc485f6ab44a03c56d9a1892ee9de0406270ef64
|
[] |
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
| 6,882
|
java
|
/**
* MicroEmulator
* Copyright (C) 2009 Bartek Teodorczyk <barteo@barteo.net>
*
* It is licensed under the following two licenses as alternatives:
* 1. GNU Lesser General Public License (the "LGPL") version 2.1 or any newer version
* 2. Apache License (the "AL") Version 2.0
*
* You may not use this file except in compliance with at least one of
* the above two licenses.
*
* You may obtain a copy of the LGPL at
* http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
*
* You may obtain a copy of the AL 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 LGPL or the AL for the specific language governing permissions and
* limitations.
*
* @version $Id$
*/
package org.microemu.android.device.ui;
import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Command;
import org.microemu.MIDletBridge;
import org.microemu.android.MicroEmulatorActivity;
import org.microemu.device.ui.AlertUI;
import org.microemu.device.ui.CommandUI;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.widget.Toast;
import java.util.Map;
import java.util.HashMap;
/**
* Represents an Alert dialog or a Toast, depending on the properties.
*/
public class AndroidAlertUI extends AndroidDisplayableUI implements AlertUI {
private AlertDialog alertDialog;
private DialogInterface.OnClickListener onClickListener;
private Map<Integer, CommandUI> buttons = new HashMap<Integer, CommandUI>();
/**
* A quick reference to the Alert, without needing to unbox.
*/
protected Alert displayableUnboxed;
/**
* Needed at runtime to know if we are showing a Toast instead of an Alert.
*/
protected boolean inShowingToast;
/**
* Depending on the properties, the Alert can be rendered as a Toast or
* Alert.
*
* @see #isToastable()
* @see #showNotifyAsToast()
*/
public AndroidAlertUI(final MicroEmulatorActivity activity,
final Alert alert) {
super(activity, alert, false);
displayableUnboxed = alert;
activity.post(new Runnable() {
public void run() {
alertDialog = new AlertDialog.Builder(activity).create();
alertDialog.setTitle(alert.getTitle());
onClickListener = new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
activity.setDialog(null);
MIDletBridge.getMIDletAccess().getDisplayAccess().commandAction(
buttons.get(which).getCommand(), displayable);
}
};
}
});
}
/**
* Decides if we should show a Toast instead of an Alert.
*
* @return <code>true</code> if the current Alert is of type
* {@link AlertType#INFO} and has one command only and the timeout
* {@link Alert#getTimeout()} is different from
* {@link Alert#FOREVER}.
*/
protected boolean isToastable() {
boolean isToastable = displayableUnboxed.getType().equals(
AlertType.INFO)
&& displayableUnboxed.getTimeout() != Alert.FOREVER
&& getCommandsUI().size() == 1;
return isToastable;
}
/**
* Gets the message to show in the Toast.<br>
* Called by {@link #showNotifyAsToast()}.
*
* @return if both {@link Alert#getTitle()} and {@link Alert#getString()}
* available then Alert.title + ": " + Alert.string. If not both
* available, then Alert.title + Alert.string.
*/
protected String getToastMessage() {
String title = displayableUnboxed.getTitle();
String string = displayableUnboxed.getString();
boolean hasBoth = title != null && !title.equals("") && string != null
&& !string.equals("");
String message = title + (hasBoth ? ": " : "") + string;
return message;
}
/**
* Shows a Toast instead of the Alert dialog and calls the commandAction
* handler for the Ok/Default button of the Alert.
*
* @see #isToastable()
*/
protected void showNotifyAsToast() {
// show toast
// according to the documentation the duration of the Toast
// can be user defined, but this is not true according to the
// implementation.
//IMPLEMENTATION
// http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/NotificationManagerService.java#l74
// private static final int LONG_DELAY = 3500; // 3.5 seconds
// private static final int SHORT_DELAY = 2000; // 2 seconds
// displayableUnboxed.getTimeout() in J2ME is in millis
int duration = displayableUnboxed.getTimeout() <= 2000 ? Toast.LENGTH_SHORT
: Toast.LENGTH_LONG;
Toast toast = Toast.makeText(activity, getToastMessage(), duration);
toast.show();
// needed because we later need to call the commandListener
fixLookAndFeel();
// call commandAction
MIDletBridge.getMIDletAccess().getDisplayAccess().commandAction(
getCommandsUI().elementAt(0).getCommand(), displayable);
}
@Override
public void showNotify() {
boolean isToastable = isToastable();
// set toast flag
// needed for hideNotify
inShowingToast = isToastable;
if (isToastable) {
activity.post(new Runnable() {
public void run() {
showNotifyAsToast();
}
});
} else {
activity.post(new Runnable() {
public void run() {
fixLookAndFeel();
activity.setDialog(alertDialog);
}
});
}
}
@Override
public void hideNotify() {
// we don't need to hide anything if Toasted
if (inShowingToast) {
inShowingToast = false;
} else {
activity.post(new Runnable() {
public void run() {
activity.setDialog(null);
}
});
}
}
private void fixLookAndFeel() {
for (CommandUI cmd : getCommandsUI()) {
buttonize(cmd);
}
}
private void buttonize(CommandUI cmd) {
int which = 0;
Command command = cmd.getCommand();
if (command == Alert.DISMISS_COMMAND) {
which = DialogInterface.BUTTON_NEUTRAL;
} else {
switch (command.getCommandType()) {
case Command.OK:
which = DialogInterface.BUTTON_POSITIVE;
break;
case Command.CANCEL:
which = DialogInterface.BUTTON_NEGATIVE;
break;
}
}
if (which == 0) {
alertDialog.setButton(command.getLabel(), onClickListener);
} else {
alertDialog.setButton(which, command.getLabel(), onClickListener);
}
buttons.put(which, cmd);
}
//
// AlertUI
//
public void setString(final String str) {
activity.post(new Runnable() {
public void run() {
alertDialog.setMessage(str);
}
});
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a9c2df46b0273ec5ee06a1891a33e8a7cbb38071
|
adc60003df5a5f339bdd53be116e0f478698e481
|
/tyre2.0/src/com/psylife/dao/impl/DeviceLoginLogDaoImpl.java
|
a622409b17f3f1d4c79116861b35851c9ee0643e
|
[] |
no_license
|
shanghaif/ineutech
|
39cac67c1a71d3dc77dc714c8ea39199fbbbddf0
|
9fab2e91cff8408452652c4aba8d8e0e3fd2cb5b
|
refs/heads/master
| 2023-03-18T09:13:15.377277
| 2020-12-28T06:31:09
| 2020-12-28T06:31:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,151
|
java
|
package com.psylife.dao.impl;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.psylife.dao.DeviceLoginLogDao;
import com.psylife.dao.TrucksDeviceDao;
import com.psylife.entity.DeviceLoginLog;
import com.psylife.hardware.HardwareElement;
import com.psylife.hardware.process.HeartProcess;
import com.psylife.util.ConnectionPool;
import com.psylife.util.Constants;
import com.psylife.util.StringHelper;
public class DeviceLoginLogDaoImpl extends BaseDaoImpl implements DeviceLoginLogDao{
private TrucksDeviceDao trucksDeviceDao=(TrucksDeviceDao)new TrucksDeviceDaoImpl();
@Override
public void loginOut(HardwareElement element){
Connection connection = null;
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
List<ResultSet> rList=new ArrayList<ResultSet>();
List<PreparedStatement> pList=new ArrayList<PreparedStatement>();
try {
connection = ConnectionPool.getConnection();
connection.setAutoCommit(false);
saveByDeviceData(new Object[]{new Date(),Constants.STATUS_NORMAL,element.getUdpAddress().getAddress().getHostAddress(),element.getUdpAddress().getPort(),DeviceLoginLog.TYPE_LOGOUT,element.getPhone()},
"create_time,status,remote_ip,remote_port,type,dtu_id", DeviceLoginLog.TB_N, connection, rList, pList);
trucksDeviceDao.updateTrucksFlag(0, element, connection, rList, pList);//停止中
connection.commit();
logger.info("设备退出保存成功,设备号:"+element.getPhone()+",车牌号:"+element.getCarNum());
return ;
} catch (Exception e) {
try {
connection.rollback();
} catch (SQLException e1) {
e1.printStackTrace();
}
e.printStackTrace();
logger.error("设备退出保存失败,设备号:"+element.getPhone()+",车牌号:"+element.getCarNum()+StringHelper.getTrace(e));
}finally {
try {
if (resultSet != null && !resultSet.isClosed()) {
resultSet.close();
}
if(preparedStatement!=null && !preparedStatement.isClosed()){
preparedStatement.close();
}
for(ResultSet set:rList){
try {
if (set!=null && !set.isClosed()) {
set.close();
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
for(PreparedStatement statement:pList){
try {
if (statement!=null && !statement.isClosed()) {
statement.close();
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
} catch (Exception e2) {
e2.printStackTrace();
}
ConnectionPool.close(connection);
}
return;
}
//保存
private long saveByDeviceData(Object[] paramters, String sqlCols,String tabeName,Connection connection,List<ResultSet> rList,List<PreparedStatement> pList) {
long id = 0;
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
StringBuffer SQL = new StringBuffer();
SQL.append("insert into ").append(tabeName).append("(").append(sqlCols).append(") ").append("values( ");
int i=0;
for(i=0;i<paramters.length;i++){
if(i==0){
SQL.append("?");
}else{
SQL.append(",?");
}
}
SQL.append(") ");
try {
preparedStatement = connection.prepareStatement(SQL.toString(),Statement.RETURN_GENERATED_KEYS);
for(i=0;i<paramters.length;i++){
preparedStatement.setObject(i+1, paramters[i]);
}
int a = preparedStatement.executeUpdate();
if (a > 0) {
resultSet = preparedStatement.getGeneratedKeys();
if(resultSet.next()) {
id = resultSet.getLong(1);
}
logger.info("保存成功!");
}
} catch (Exception e) {
try {
connection.rollback();
} catch (SQLException e1) {
e1.printStackTrace();
}
logger.error("保存失败:"+StringHelper.getTrace(e));
} finally {
if (resultSet != null) {
rList.add(resultSet);
}
if (preparedStatement != null) {
pList.add(preparedStatement);
}
}
SQL = null;
return id;
}
@Override
public boolean startSysDtuProcessTrucksFlag() {
Connection connection = null;
PreparedStatement preparedStatement = null;
int isOK = 0;
try {
connection = ConnectionPool.getConnection();
preparedStatement = connection.prepareStatement("UPDATE trucks INNER JOIN device ON device.trucks_id=trucks.trucks_id SET trucks.trucks_flag=0 WHERE device.caiji_time<? ");
preparedStatement.setTimestamp(1, new java.sql.Timestamp(System.currentTimeMillis()-HeartProcess.INTERVAL_TIMEOUT_TCP));
isOK = preparedStatement.executeUpdate();
logger.info("系统启动时处理dtu离线时,行驶状态为停放");
} catch (Exception e) {
logger.error("系统启动时处理dtu离线时,行驶状态为停放:"+StringHelper.getTrace(e));
} finally {
try {
if (preparedStatement != null && !preparedStatement.isClosed()) {
preparedStatement.close();
}
} catch (SQLException e) {
}
ConnectionPool.close(connection);
}
return isOK == 1 ? true : false;
}
}
|
[
"543979100@qq.com"
] |
543979100@qq.com
|
6ffbf886670b81b509b6de4c1cca8970185045b5
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_143f58f863e0c749acde46de8a6fa7ca9251e645/VersionRange/10_143f58f863e0c749acde46de8a6fa7ca9251e645_VersionRange_s.java
|
e81357e90116fe24c77118ec9690bb574df7d5dd
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,537
|
java
|
/*******************************************************************************
* Copyright (c) 2003, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.osgi.service.resolver;
import org.osgi.framework.Version;
/**
* This class represents a version range.
* @since 3.1
* @noextend This class is not intended to be subclassed by clients.
*/
public class VersionRange {
private static final Version versionMax = new Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
/**
* An empty version
*/
public static final VersionRange emptyRange = new VersionRange(null);
private Version minVersion;
private boolean includeMin;
private Version maxVersion;
private boolean includeMax;
/**
* Constructs a VersionRange with the specified minVersion and maxVersion.
* @param minVersion the minimum version of the range
* @param maxVersion the maximum version of the range
*/
public VersionRange(Version minVersion, boolean includeMin, Version maxVersion, boolean includeMax) {
this.minVersion = minVersion;
this.includeMin = includeMin;
this.maxVersion = maxVersion;
this.includeMax = includeMax;
}
/**
* Constructs a VersionRange from the given versionRange String.
* @param versionRange a version range String that specifies a range of
* versions.
*/
public VersionRange(String versionRange) {
if (versionRange == null || versionRange.length() == 0) {
minVersion = Version.emptyVersion;
includeMin = true;
maxVersion = VersionRange.versionMax;
includeMax = true;
return;
}
versionRange = versionRange.trim();
if (versionRange.charAt(0) == '[' || versionRange.charAt(0) == '(') {
int comma = versionRange.indexOf(',');
if (comma < 0)
throw new IllegalArgumentException();
char last = versionRange.charAt(versionRange.length() - 1);
if (last != ']' && last != ')')
throw new IllegalArgumentException();
minVersion = Version.parseVersion(versionRange.substring(1, comma).trim());
includeMin = versionRange.charAt(0) == '[';
maxVersion = Version.parseVersion(versionRange.substring(comma + 1, versionRange.length() - 1).trim());
includeMax = last == ']';
} else {
minVersion = Version.parseVersion(versionRange.trim());
includeMin = true;
maxVersion = VersionRange.versionMax;
includeMax = true;
}
}
/**
* Returns the minimum Version of this VersionRange
* @return the minimum Version of this VersionRange
*/
public Version getMinimum() {
return minVersion;
}
/**
* Indicates if the minimum version is included in the version range.
* @return true if the minimum version is included in the version range;
* otherwise false is returned
*/
public boolean getIncludeMinimum() {
return includeMin;
}
/**
* Returns the maximum Version of this VersionRange
* @return the maximum Version of this VersionRange
*/
public Version getMaximum() {
return maxVersion;
}
/**
* Indicates if the maximum version is included in the version range.
* @return true if the maximum version is included in the version range;
* otherwise false is returned
*/
public boolean getIncludeMaximum() {
return includeMax;
}
/**
* Returns whether the given version is included in this VersionRange.
* This will depend on the minimum and maximum versions of this VersionRange
* and the given version.
*
* @param version a version to be tested for inclusion in this VersionRange.
* (may be <code>null</code>)
* @return <code>true</code> if the version is include,
* <code>false</code> otherwise
*/
public boolean isIncluded(Version version) {
Version minRequired = getMinimum();
if (minRequired == null)
return true;
if (version == null)
return false;
Version maxRequired = getMaximum() == null ? VersionRange.versionMax : getMaximum();
int minCheck = includeMin ? 0 : 1;
int maxCheck = includeMax ? 0 : -1;
return version.compareTo(minRequired) >= minCheck && version.compareTo(maxRequired) <= maxCheck;
}
public boolean equals(Object object) {
if (!(object instanceof VersionRange))
return false;
VersionRange vr = (VersionRange) object;
if (minVersion != null && vr.getMinimum() != null) {
if (minVersion.equals(vr.getMinimum()) && includeMin == vr.includeMin)
if (maxVersion != null && vr.getMaximum() != null) {
if (maxVersion.equals(vr.getMaximum()) && includeMax == vr.includeMax)
return true;
} else
return maxVersion == vr.getMaximum();
} else {
return minVersion == vr.getMinimum();
}
return false;
}
public String toString() {
if (minVersion == null)
return Version.emptyVersion.toString();
if (VersionRange.versionMax.equals(maxVersion))
return minVersion.toString();
StringBuffer result = new StringBuffer();
result.append(includeMin ? '[' : '(');
result.append(minVersion);
result.append(',');
result.append(maxVersion);
result.append(includeMax ? ']' : ')');
return result.toString();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
2331545d2005166a8c6e8c7987a68592d13c27c6
|
5920503431adfdc8e20f229e4902e5ee9000a997
|
/jvm/jvm-annotations/src/main/java/org/quickperf/jvm/allocation/AllocationRepository.java
|
669ad22ede4c80c8f8d27206ad8ae29f93954ce5
|
[
"Apache-2.0"
] |
permissive
|
balaaagi/quickperf
|
08abc224851f012ffe4188f5ea2ed2a16f5feb16
|
7343c12536fe8a42667ac8910629f4bdcc4eb879
|
refs/heads/master
| 2020-12-28T17:59:30.548404
| 2020-02-02T17:51:00
| 2020-02-02T17:51:00
| 238,431,583
| 1
| 0
|
Apache-2.0
| 2020-02-05T11:11:51
| 2020-02-05T11:11:50
| null |
UTF-8
|
Java
| false
| false
| 1,784
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Copyright 2019-2019 the original author or authors.
*/
package org.quickperf.jvm.allocation;
import org.quickperf.TestExecutionContext;
import org.quickperf.WorkingFolder;
import org.quickperf.repository.LongRepository;
import org.quickperf.repository.LongRepositoryFactory;
public class AllocationRepository {
private static final String BYTE_WATCHER_FILE_NAME = "allocation.ser";
public void saveAllocationInBytes(long allocation, TestExecutionContext testExecutionContext) {
LongRepository longRepository = LongRepositoryFactory.getLongRepository(testExecutionContext);
WorkingFolder workingFolder = testExecutionContext.getWorkingFolder();
longRepository.save(allocation, workingFolder.getPath(), BYTE_WATCHER_FILE_NAME);
}
public Allocation findAllocation(TestExecutionContext testExecutionContext) {
LongRepository longRepository = LongRepositoryFactory.getLongRepository(testExecutionContext);
WorkingFolder workingFolder = testExecutionContext.getWorkingFolder();
long allocationInBytes = longRepository.find(workingFolder.getPath(), BYTE_WATCHER_FILE_NAME);
return new Allocation((double)(allocationInBytes), AllocationUnit.BYTE);
}
}
|
[
"jean.bisutti@gmail.com"
] |
jean.bisutti@gmail.com
|
407ba12b1f8018622f6f5c53f39e285f65d263b8
|
9a62169ace507c0be95adf3f86c849b0dc144c3e
|
/src/softtest/rules/keilc/fault/OOBSUMMARYStateMachine.java
|
7134dc3e1130f2c38a51beb9362ccbf29799ed16
|
[] |
no_license
|
13001090108/DTSEmbed_LSC
|
84b2e7edbf1c7f5162b19f06c892a5b42d3ad88e
|
38cc44c10304458e923a1a834faa6b0ca216c0e2
|
refs/heads/master
| 2020-04-02T05:27:57.577850
| 2018-10-22T06:28:28
| 2018-10-22T06:28:28
| 154,078,761
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 6,613
|
java
|
package softtest.rules.keilc.fault;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import softtest.ast.c.ASTAssignmentExpression;
import softtest.ast.c.ASTConstant;
import softtest.ast.c.ASTPrimaryExpression;
import softtest.ast.c.SimpleNode;
import softtest.cfg.c.VexNode;
import softtest.domain.c.analysis.ExpressionValueVisitor;
import softtest.domain.c.analysis.ExpressionVistorData;
import softtest.domain.c.interval.Domain;
import softtest.domain.c.interval.IntegerDomain;
import softtest.domain.c.interval.IntegerInterval;
import softtest.domain.c.symbolic.Expression;
import softtest.fsm.c.FSMMachine;
import softtest.fsm.c.FSMMachineInstance;
import softtest.interpro.c.InterContext;
import softtest.interpro.c.Variable;
import softtest.rules.c.BasicStateMachine;
import softtest.rules.c.StateMachineUtils;
import softtest.summary.c.MethodSummary;
import softtest.summary.keilc.fault.MethodOOBPreCondition;
import softtest.summary.keilc.fault.MethodOOBPreConditionVisitor;
import softtest.symboltable.c.MethodNameDeclaration;
import softtest.symboltable.c.NameDeclaration;
import softtest.symboltable.c.Search;
import softtest.symboltable.c.SourceFileScope;
import softtest.symboltable.c.VariableNameDeclaration;
import softtest.symboltable.c.Type.CType_BaseType;
/**
* 带函数摘要的数组越界自动机
* @author zys
* 2010-5-12
*/
public class OOBSUMMARYStateMachine extends BasicStateMachine{
public static List<FSMMachineInstance> createOOBSUMMARYStateMachines(SimpleNode node, FSMMachine fsm) {
List<FSMMachineInstance> list = new LinkedList<FSMMachineInstance>();
/** 查找当前函数的所有函数调用节点,对存在MethodOOBPreCondition的函数进行OOB检测 */
String xPath=".//PrimaryExpression[@Method='true']";
List<SimpleNode> funcNodeList = StateMachineUtils.getEvaluationResults(node, xPath);
for (SimpleNode funcNode : funcNodeList)
{
MethodNameDeclaration mnd=((ASTPrimaryExpression)funcNode).getMethodDecl();
MethodSummary ms=mnd.getMethodSummary();
if(ms!=null)
{
MethodOOBPreCondition preCondition = (MethodOOBPreCondition)ms.findMethodFeature(MethodOOBPreCondition.class);
if(preCondition!=null)
{
FSMMachineInstance fsmInstance = fsm.creatInstance();
fsmInstance.setRelatedASTNode(funcNode);
fsmInstance.setStateData(preCondition);
list.add(fsmInstance);
}
}
}
return list;
}
public static boolean checkFunctionCallOOB(List<ASTPrimaryExpression> nodes, FSMMachineInstance fsmin)
{
//是否检测出错的标志位
boolean b=false;
for(ASTPrimaryExpression funcNode:nodes)
{
if (!fsmin.getRelatedASTNode().equals(funcNode))
{
continue;
}
MethodOOBPreCondition preCondition = (MethodOOBPreCondition) fsmin.getStateData();
Set<Variable> subScriptVarSet = preCondition.getSubScriptVariableSet();
for (Variable subScriptVar : subScriptVarSet)
{
IntegerInterval summaryInterval = preCondition.getSubScriptInterval(subScriptVar);
//获取函数前置结束所关联变量的区间
Domain d=null;
//根据形参的下标位置,得到实参处的下标变量,目前只处理单变量的情况如f(i) f(1),f(i+j)之类的暂时不处理
if(funcNode.jjtGetParent().jjtGetNumChildren()==1||!subScriptVar.isParam())
{//无参数的函数调用,如f(); 此种情况前置条件所关联的变量必然为全局变量
//补充:(chh)有参数的函数调用,前置条件所关联的变量也有可能是全局变量,所以加了变量是否是全局变量的判断
NameDeclaration var=Search.searchInVariableUpward(subScriptVar.getName(), funcNode.getScope());
if(var!=null)
{
d=getDomain(funcNode, (VariableNameDeclaration) var);
}
}else{
ASTAssignmentExpression assignExpr=(ASTAssignmentExpression) funcNode.getNextSibling().jjtGetChild(subScriptVar.getParamIndex());
ASTPrimaryExpression priExpr=(ASTPrimaryExpression) assignExpr.getSingleChildofType(ASTPrimaryExpression.class);
if(priExpr!=null)
{
VariableNameDeclaration var=priExpr.getVariableNameDeclaration();
if(var!=null)
{
//如果形参是变量,如f(i)
d=getDomain(funcNode, var);
}else{
//如果形参是常数,,如f(1)
ASTConstant cons=(ASTConstant) priExpr.getSingleChildofType(ASTConstant.class);
int value=Integer.parseInt(cons.getImage());
d=new IntegerDomain(new IntegerInterval(value,value));
}
}else{
//如果实参既不是单个变量,也不是单个常数,则计算该实参表达式的值比如f(a+b)
ExpressionValueVisitor expvst = new ExpressionValueVisitor();
ExpressionVistorData visitdata = new ExpressionVistorData();
visitdata.currentvex = assignExpr.getCurrentVexNode();
visitdata.currentvex.setfsmCompute(true);
expvst.visit(assignExpr, visitdata);
visitdata.currentvex.setfsmCompute(false);
Expression value1 = visitdata.value;
d = value1.getDomain(visitdata.currentvex.getLastsymboldomainset());
}
}
//modified by nmh
if(d==null || Domain.isEmpty(d) || d.isUnknown())
continue;
//由于是数组下标的值域,所以只讨论整形区间
Domain temp=Domain.intersect(new IntegerDomain(summaryInterval), d, CType_BaseType.intType);
if(temp!=null && Domain.isEmpty(temp))
{
if(fsmin.getDesp()==null || fsmin.getDesp().length()==0)
{
String desp = "在代码第"+funcNode.getBeginLine()+"调用";
fsmin.setDesp(desp+preCondition.getSubScriptDesp(subScriptVar));
}else{
String desp =fsmin.getDesp()+"\n";
fsmin.setDesp(desp+preCondition.getSubScriptDesp(subScriptVar));
}
b=true;
}
}
}
return b;
}
private static Domain getDomain(SimpleNode funcNode, VariableNameDeclaration var)
{
Domain d=null;
if(var==null)
return d;
VexNode vex=funcNode.getCurrentVexNode();
d=vex.getVarDomainSet().getDomain(var);
if(d==null && var.getScope() instanceof SourceFileScope)
{//如果是全局变量,且其区间在控制流图上未知,则试图获取其初始化值:
Object initValue=var.getVariable().getValue();
if(initValue!=null){
try{
long t=((Long)initValue).longValue();
d=new IntegerDomain(t,t);
}catch(Exception e){
d=null;
}
}
}
return d;
}
@Override
public void registFetureVisitors() {
super.registFetureVisitors();
InterContext.addPreConditionVisitor(MethodOOBPreConditionVisitor.getInstance());
}
}
|
[
"lishaochun@bupt.edu.cn"
] |
lishaochun@bupt.edu.cn
|
362d82024e61f249f0647b9f3f2e8f6be22bd3d3
|
99a8722d0d16e123b69e345df7aadad409649f6c
|
/jpa/deferred/src/main/java/example/repo/Customer172Repository.java
|
84896374da152bfa83586b3fc761257bb23e1737
|
[
"Apache-2.0"
] |
permissive
|
spring-projects/spring-data-examples
|
9c69a0e9f3e2e73c4533dbbab00deae77b2aacd7
|
c4d1ca270fcf32a93c2a5e9d7e91a5592b7720ff
|
refs/heads/main
| 2023-09-01T14:17:56.622729
| 2023-08-22T16:51:10
| 2023-08-24T19:48:04
| 16,381,571
| 5,331
| 3,985
|
Apache-2.0
| 2023-08-25T09:02:19
| 2014-01-30T15:42:43
|
Java
|
UTF-8
|
Java
| false
| false
| 280
|
java
|
package example.repo;
import example.model.Customer172;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
public interface Customer172Repository extends CrudRepository<Customer172, Long> {
List<Customer172> findByLastName(String lastName);
}
|
[
"ogierke@pivotal.io"
] |
ogierke@pivotal.io
|
d90639e54e00c8be8fc759e162a45d70b9809db9
|
c3d386b1a08ef0e1fb2d667cfc34f8dead2b487e
|
/app/src/main/java/com/app/alldemo/courview/phto/ClipTangularView.java
|
3419ec4a8b1165b042912343b93551956f707404
|
[] |
no_license
|
wbsguo/StudioAlldemo
|
ef1b7ae131752ad8f90c76ccfbda0deb961dcc75
|
7e8b42eeb6c19f109f3e3ec57826b40c7a9a6c1c
|
refs/heads/master
| 2021-01-17T12:52:11.158909
| 2016-08-04T07:08:55
| 2016-08-04T07:08:55
| 58,708,516
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,188
|
java
|
package com.app.alldemo.courview.phto;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;
/**
* 裁剪边框,矩形
*/
public class ClipTangularView extends View {
/**
* 边框距左右边界距离,用于调整边框长度
*/
public static final int BORDERDISTANCE = 50;
private Paint mPaint;
public ClipTangularView(Context context) {
this(context, null);
}
public ClipTangularView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public ClipTangularView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
mPaint = new Paint();
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
int width = this.getWidth();
int height = this.getHeight();
// 边框长度,据屏幕左右边缘50px
int borderlength = width - BORDERDISTANCE *2;
mPaint.setColor(0xaa000000);
// 以下绘制透明暗色区域
// top
canvas.drawRect(0, 0, width, (height - borderlength) / 2, mPaint);
// bottom
canvas.drawRect(0, (height + borderlength) / 2, width, height, mPaint);
// left
canvas.drawRect(0, (height - borderlength) / 2, BORDERDISTANCE,
(height + borderlength) / 2, mPaint);
// right
canvas.drawRect(borderlength + BORDERDISTANCE, (height - borderlength) / 2, width,
(height + borderlength) / 2, mPaint);
// 以下绘制边框线
mPaint.setColor(Color.WHITE);
mPaint.setStrokeWidth(2.0f);
// top
canvas.drawLine(BORDERDISTANCE, (height - borderlength) / 2, width - BORDERDISTANCE, (height - borderlength) / 2, mPaint);
// bottom
canvas.drawLine(BORDERDISTANCE, (height + borderlength) / 2, width - BORDERDISTANCE, (height + borderlength) / 2, mPaint);
// left
canvas.drawLine(BORDERDISTANCE, (height - borderlength) / 2, BORDERDISTANCE, (height + borderlength) / 2, mPaint);
// right
canvas.drawLine(width - BORDERDISTANCE, (height - borderlength) / 2, width - BORDERDISTANCE, (height + borderlength) / 2, mPaint);
}
}
|
[
"563492052@qq.com"
] |
563492052@qq.com
|
9c708681f2669d7ee9eb826975b01bedc76f2c36
|
cefec0c12fa4b69c90ba54f135fb3bf83823690a
|
/imagepicker/src/main/java/com/lzy/imagepicker/ui/ImagePreviewBaseActivity.java
|
8aeb53766bc8b4ff883b99f9f1fb2d0821fc2e31
|
[] |
no_license
|
freakcsh/legalaid
|
1bb32504573a6c1ac64461082f758f67536b6dc3
|
d461aebba256d65a8123527334a3bbda6e665ad1
|
refs/heads/master
| 2021-05-08T10:42:45.656627
| 2018-04-23T01:40:49
| 2018-04-23T01:40:49
| 119,856,154
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,121
|
java
|
package com.lzy.imagepicker.ui;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.lzy.imagepicker.DataHolder;
import com.lzy.imagepicker.ImagePicker;
import com.lzy.imagepicker.R;
import com.lzy.imagepicker.adapter.ImagePageAdapter;
import com.lzy.imagepicker.bean.ImageItem;
import com.lzy.imagepicker.util.Utils;
import com.lzy.imagepicker.view.ViewPagerFixed;
import java.util.ArrayList;
/**
* 图片预览的基类
*/
public abstract class ImagePreviewBaseActivity extends ImageBaseActivity {
protected ImagePicker imagePicker;
protected ArrayList<ImageItem> mImageItems; //跳转进ImagePreviewFragment的图片文件夹
protected int mCurrentPosition = 0; //跳转进ImagePreviewFragment时的序号,第几个图片
protected TextView mTitleCount; //显示当前图片的位置 例如 5/31
protected ArrayList<ImageItem> selectedImages; //所有已经选中的图片
protected View content;
protected View topBar;
protected ViewPagerFixed mViewPager;
protected ImagePageAdapter mAdapter;
protected boolean isFromItems = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_image_preview);
mCurrentPosition = getIntent().getIntExtra(ImagePicker.EXTRA_SELECTED_IMAGE_POSITION, 0);
isFromItems = getIntent().getBooleanExtra(ImagePicker.EXTRA_FROM_ITEMS, false);
if (isFromItems) {
// 据说这样会导致大量图片崩溃
mImageItems = (ArrayList<ImageItem>) getIntent().getSerializableExtra(ImagePicker.EXTRA_IMAGE_ITEMS);
} else {
// 下面采用弱引用会导致预览崩溃
mImageItems = (ArrayList<ImageItem>) DataHolder.getInstance().retrieve(DataHolder.DH_CURRENT_IMAGE_FOLDER_ITEMS);
}
imagePicker = ImagePicker.getInstance();
selectedImages = imagePicker.getSelectedImages();
//初始化控件
content = findViewById(R.id.content);
//因为状态栏透明后,布局整体会上移,所以给头部加上状态栏的margin值,保证头部不会被覆盖
topBar = findViewById(R.id.top_bar);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) topBar.getLayoutParams();
params.topMargin = Utils.getStatusHeight(this);
topBar.setLayoutParams(params);
}
topBar.findViewById(R.id.btn_ok).setVisibility(View.GONE);
topBar.findViewById(R.id.btn_back).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
mTitleCount = (TextView) findViewById(R.id.tv_des);
mViewPager = (ViewPagerFixed) findViewById(R.id.viewpager);
mAdapter = new ImagePageAdapter(this, mImageItems);
mAdapter.setPhotoViewClickListener(new ImagePageAdapter.PhotoViewClickListener() {
@Override
public void OnPhotoTapListener(View view, float v, float v1) {
onImageSingleTap();
}
});
mViewPager.setAdapter(mAdapter);
mViewPager.setCurrentItem(mCurrentPosition, false);
//初始化当前页面的状态
mTitleCount.setText(getString(R.string.ip_preview_image_count, mCurrentPosition + 1, mImageItems.size()));
}
/** 单击时,隐藏头和尾 */
public abstract void onImageSingleTap();
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
ImagePicker.getInstance().restoreInstanceState(savedInstanceState);
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
ImagePicker.getInstance().saveInstanceState(outState);
}
}
|
[
"740997937@qq.com"
] |
740997937@qq.com
|
c0b6333e81ef5a168379f1c294755af68a32cda7
|
2f3c04382a66dbf222c8587edd67a5df4bc80422
|
/src/com/cedar/cp/ejb/base/cube/CubeUpdateEngine$5.java
|
624cfd7984a710c759f5626475064b516562170b
|
[] |
no_license
|
arnoldbendaa/cppro
|
d3ab6181cc51baad2b80876c65e11e92c569f0cc
|
f55958b85a74ad685f1360ae33c881b50d6e5814
|
refs/heads/master
| 2020-03-23T04:18:00.265742
| 2018-09-11T08:15:28
| 2018-09-11T08:15:28
| 141,074,966
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,144
|
java
|
// Decompiled by: Fernflower v0.8.6
// Date: 12.08.2012 13:07:02
// Copyright: 2008-2012, Stiver
// Home page: http://www.neshkov.com/ac_decompiler.html
package com.cedar.cp.ejb.base.cube;
import com.cedar.cp.ejb.base.cube.CubeUpdateEngine;
import com.cedar.cp.util.TemplateParser;
class CubeUpdateEngine$5 extends TemplateParser {
// $FF: synthetic field
final CubeUpdateEngine this$0;
CubeUpdateEngine$5(CubeUpdateEngine var1, String x0) {
super(x0);
this.this$0 = var1;
}
public String parseToken(String token) {
StringBuffer sb = new StringBuffer();
if(token.equals("temp_table_name")) {
sb.append(this.this$0.getXactTableName());
} else if(token.equals("dim_cols")) {
sb.append(CubeUpdateEngine.accessMethod700(this.this$0));
} else {
if(!token.equals("dim_cols_bind_vars")) {
throw new IllegalStateException("Unexpected token :" + token);
}
sb.append(CubeUpdateEngine.accessMethod800(this.this$0));
}
return sb.toString();
}
}
|
[
"arnoldbendaa@gmail.com"
] |
arnoldbendaa@gmail.com
|
b7739490185915bbc66c79e68c243f8eae005f00
|
10fdc3aa333ef07a180f29a4425650945c3da9c8
|
/zhuanbo-external/src/main/java/com/zhuanbo/external/service/wx/config/WXConfig.java
|
c8f257f06e793f18c5a63b0301686c7edda84895
|
[] |
no_license
|
arvin-xiao/lexuan
|
4d67f4ab40243c7e6167e514d899c6cd0c3f0995
|
6cffeee1002bad067e6c8481a3699186351d91a8
|
refs/heads/master
| 2023-04-27T21:01:06.644131
| 2020-05-03T03:03:52
| 2020-05-03T03:03:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 935
|
java
|
package com.zhuanbo.external.service.wx.config;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
import com.zhuanbo.core.config.AuthConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class WXConfig {
@Autowired
private AuthConfig authConfig;
@Bean
public WxMaService wxMaService(){
WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
config.setAppid(authConfig.getWxMpAppId());
config.setSecret(authConfig.getWxMpSecret());
config.setMsgDataFormat("JSON");
WxMaService wxMaService = new WxMaServiceImpl();
wxMaService.setWxMaConfig(config);
return wxMaService;
}
}
|
[
"13509030019@163.com"
] |
13509030019@163.com
|
c374a73e8ad754ad24c119466f4c3959e95c54c4
|
ff026f7189dc7127c99bddf2067b67f2aeba9363
|
/erian/src/test/java/com/rambo/erian/repository/TaskDaoTest.java
|
d6769a24297b0ea330114836c96d428aba977519
|
[] |
no_license
|
freerambo/rambo
|
41e383c7b94d078de884f44af38387f317e5ba49
|
4e7d710c9a01e0ecb7e38480c4041cd902c022ae
|
refs/heads/master
| 2022-12-20T20:13:37.196253
| 2020-09-12T10:42:13
| 2020-09-12T10:42:13
| 25,810,606
| 1
| 2
| null | 2022-12-16T03:23:01
| 2014-10-27T08:53:33
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,419
|
java
|
/*******************************************************************************
* Copyright (c) 2005, 2014 springside.github.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
*******************************************************************************/
package com.rambo.erian.repository;
import static org.assertj.core.api.Assertions.*;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.test.context.ContextConfiguration;
import com.rambo.erian.entity.Task;
import org.springside.modules.test.spring.SpringTransactionalTestCase;
@ContextConfiguration(locations = { "/applicationContext.xml" })
public class TaskDaoTest extends SpringTransactionalTestCase {
@Autowired
private TaskDao taskDao;
@Test
public void findTasksByUserId() throws Exception {
Page<Task> tasks = taskDao.findByUserId(2L, new PageRequest(0, 100, Direction.ASC, "id"));
assertThat(tasks.getContent()).hasSize(5);
assertThat(tasks.getContent().get(0).getId()).isEqualTo(1);
tasks = taskDao.findByUserId(99999L, new PageRequest(0, 100, Direction.ASC, "id"));
assertThat(tasks.getContent()).isEmpty();
assertThat(tasks.getContent()).isEmpty();
}
}
|
[
"zhuyb@ntu.edu.sg"
] |
zhuyb@ntu.edu.sg
|
291ab8cbf374f8a3d6f15a5bfcda689bd5d50a5c
|
eab084584e34ec065cd115139c346180e651c1c2
|
/src/main/java/v1/t500/T523.java
|
2e3e92575ba4c68015a80b850ed4b003255ee316
|
[] |
no_license
|
zhouyuan93/leetcode
|
5396bd3a01ed0f127553e1e175bb1f725d1c7919
|
cc247bc990ad4d5aa802fc7a18a38dd46ed40a7b
|
refs/heads/master
| 2023-05-11T19:11:09.322348
| 2023-05-05T09:12:53
| 2023-05-05T09:12:53
| 197,735,845
| 0
| 0
| null | 2020-04-05T09:17:34
| 2019-07-19T08:38:17
|
Java
|
UTF-8
|
Java
| false
| false
| 494
|
java
|
package v1.t500;
import java.util.HashSet;
public class T523 {
public boolean checkSubarraySum(int[] nums, int k) {
HashSet<Integer> set = new HashSet<>(2*k);
int before = 0;
int sum = 0;
for (int i = 0; i < nums.length; i++) {
sum += nums[i];
sum %= k;
if (set.contains(sum)) {
return true;
}
set.add(before);
before = sum;
}
return false;
}
}
|
[
"492407250@qq.com"
] |
492407250@qq.com
|
68d58cac96faf765dbad411bf83cccd06d7ee1e8
|
a1d34d57e8bbdb5d9331d600d0de9fded269c871
|
/test/java/secfox/soc/melon/es/EsIndexTest.java
|
774c8794692bfce049be1edf5911b50897b90d43
|
[] |
no_license
|
zhanght86/melon-sg
|
b26117cca6a4c31011781acb73671505bef8304b
|
6bdd1f06cf532727ea6b639de852bfeaf405babb
|
refs/heads/master
| 2022-04-13T11:18:19.355386
| 2015-04-07T09:30:11
| 2015-04-07T09:30:11
| 104,092,166
| 0
| 0
| null | 2020-03-31T10:14:30
| 2017-09-19T15:20:11
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 4,624
|
java
|
/*
* (c) Copyright 2013 网神信息技术(北京)股份有限公司
* http://www.legendsec.com
*/
package secfox.soc.melon.es;
import java.io.IOException;
import java.util.Date;
import java.util.Map;
import javax.annotation.Resource;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.collect.Maps;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.node.Node;
import org.elasticsearch.node.NodeBuilder;
import org.junit.Ignore;
import org.junit.Test;
import secfox.soc.melon.BaseTest;
import secfox.soc.melon.elasticsearch.controller.EsQueryTest;
import secfox.soc.melon.knowledge.domain.Knowledge;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* @since 2015年1月27日,下午3:22:07
* @author <a href="mailto:zhangdi@legendsec.com>张棣</a>
* @version 1.0
*/
public class EsIndexTest extends BaseTest {
@Resource
private EsQueryTest esTest;
@Ignore
@Test
public void testToJson() throws IOException{
XContentBuilder builder = XContentFactory.jsonBuilder()
.startObject()
.field("user", "kimchy")
.field("postDate", new Date())
.field("message", "trying out Elasticsearch")
.endObject();
String json = builder.string();
System.out.println(json);
Map<String, Object> map = Maps.newHashMap();
map.put("a", 100);
ObjectMapper mapper = new ObjectMapper();
System.out.println(mapper.writeValueAsString(map));
}
@Ignore
@Test
public void testCreateClient() throws ElasticsearchException, IOException {
Node node = NodeBuilder.nodeBuilder().clusterName("las").client(true).node();
Client client = node.client();
//
IndexResponse response = client.prepareIndex("twitter", "tweet", "1")
.setSource(XContentFactory.jsonBuilder()
.startObject()
.field("user", "kimchy")
.field("postDate", new Date())
.field("message", "trying out Elasticsearch")
.endObject()
)
.execute()
.actionGet();
String _index = response.getIndex();
long _version = response.getVersion();
System.out.println(_index);
System.out.println(_version);
//
node.close();
}
@Test
public void knowledge() throws ElasticsearchException, JsonProcessingException {
Knowledge knowledge = new Knowledge();
/*knowledge.setId(100002l);
knowledge.setTitle("引导区病毒");
knowledge.setContent("引导型病毒是一种在ROM BIOS之后,引导区病毒,它先于操作系统,依托的环境是BIOS中断服务程序。"
+"引导型病毒是利用操作系统的引导模块放在某个固定的位置,并且控制权的转交方式是以物理位置为依据,而不是以操作系统引导区的内容为依据,"
+"因而病毒占据该物理位置即可获得控制权,而将真正的引导区内容搬家转移或替换,待病毒程序执行后,将控制权交给真正的引导区内容,使得这个带病毒的系统看似正常运转,而病毒已隐藏在系统中并伺机传染、发作");
*/
/*knowledge.setId(100001l);
knowledge.setTitle("跳板攻击");
knowledge.setContent("P跳板攻击是利用别人的机器做中转站来攻击你的机器的,最实用的方法是根据攻击IP的地址一个一个去寻找,"
+"攻击者往往在跳板中加入路由器或者交换机(比如Cisco的产品),虽然路由器的日志文件会记录登陆IP,但是可以通过相关的命令清除该日志。"
+"并且这些日志清除后将永远消失,因为路由器的日志保存在flash中,一旦删除将无法恢复。如果跳板全部用主机的话,虽然也可以清除日志,"
+"但是现在的恢复软件往往可以恢复这些日志,就会留下痕迹,网络安全人员可以通过这些蛛丝马迹可能找到自己。");*/
knowledge.setId(100003l);
knowledge.setTitle("口令攻击2");
knowledge.setContent("口令攻击是黑客最喜欢采用的入侵网络的方法。黑客通过获取系统管理员或其他殊用户的口令,获得系统的管理权,窃取系统信息、磁盘中的文件甚至对系统进行破坏");
//esTest.addKnowledge(knowledge, "100003");
esTest.delete("100003");
//esTest.update(knowledge, "100003");
}
}
|
[
"493449712@qq.com"
] |
493449712@qq.com
|
8b95b145a317ee464d85261c4a0675cd26dad8ce
|
5d00b27e4022698c2dc56ebbc63263f3c44eea83
|
/gen/com/ah/xml/be/config/LDAPAuthPrivateKeyPassword.java
|
a74abc4dc9a9939ab8c2ca1fcb29659d81c7151a
|
[] |
no_license
|
Aliing/WindManager
|
ac5b8927124f992e5736e34b1b5ebb4df566770a
|
f66959dcaecd74696ae8bc764371c9a2aa421f42
|
refs/heads/master
| 2020-12-27T23:57:43.988113
| 2014-07-28T17:58:46
| 2014-07-28T17:58:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,601
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.07.01 at 11:29:17 AM CST
//
package com.ah.xml.be.config;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for LDAP-auth-private-key-password complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="LDAP-auth-private-key-password">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="verify-server" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="value" type="{http://www.aerohive.com/configuration/aaa}LDAP-auth-verify-server-value" default="try" />
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="encrypted" type="{http://www.aerohive.com/configuration/general}ah-encrypted-value" default="1" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LDAP-auth-private-key-password", namespace = "http://www.aerohive.com/configuration/aaa", propOrder = {
"verifyServer"
})
public class LDAPAuthPrivateKeyPassword {
@XmlElement(name = "verify-server")
protected LDAPAuthPrivateKeyPassword.VerifyServer verifyServer;
@XmlAttribute(name = "value", required = true)
protected String value;
@XmlAttribute(name = "encrypted")
protected Integer encrypted;
/**
* Gets the value of the verifyServer property.
*
* @return
* possible object is
* {@link LDAPAuthPrivateKeyPassword.VerifyServer }
*
*/
public LDAPAuthPrivateKeyPassword.VerifyServer getVerifyServer() {
return verifyServer;
}
/**
* Sets the value of the verifyServer property.
*
* @param value
* allowed object is
* {@link LDAPAuthPrivateKeyPassword.VerifyServer }
*
*/
public void setVerifyServer(LDAPAuthPrivateKeyPassword.VerifyServer value) {
this.verifyServer = value;
}
/**
* 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;
}
/**
* Gets the value of the encrypted property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public int getEncrypted() {
if (encrypted == null) {
return 1;
} else {
return encrypted;
}
}
/**
* Sets the value of the encrypted property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setEncrypted(Integer value) {
this.encrypted = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="value" type="{http://www.aerohive.com/configuration/aaa}LDAP-auth-verify-server-value" default="try" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
public static class VerifyServer {
@XmlAttribute(name = "value")
protected LDAPAuthVerifyServerValue value;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link LDAPAuthVerifyServerValue }
*
*/
public LDAPAuthVerifyServerValue getValue() {
if (value == null) {
return LDAPAuthVerifyServerValue.TRY;
} else {
return value;
}
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link LDAPAuthVerifyServerValue }
*
*/
public void setValue(LDAPAuthVerifyServerValue value) {
this.value = value;
}
}
}
|
[
"zjie@aerohive.com"
] |
zjie@aerohive.com
|
0e787b9a4e51b4729d5e412b2bf4c6d79b495a64
|
b831852b771669a19acfc02ae5589c00cabeca8b
|
/src/com/speical/first/Pro147.java
|
6981b8ee72a19eeaa39e7c5334f5c78ef37b0800
|
[] |
no_license
|
SpecialYang/NowCoderPostgraduateTest
|
36d61573da1882269cdcf8dec38d77ba4c56670e
|
9dbb442e0790f64b0e8cf96f569ff3a2fbe8919a
|
refs/heads/master
| 2021-09-07T01:03:49.544599
| 2018-02-14T16:07:06
| 2018-02-14T16:07:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 810
|
java
|
package com.speical.first;
import java.util.Scanner;
/**
*
* @author special
* @date 2018年1月25日 上午11:30:46
*/
public class Pro147 {
static final int MIN = Integer.MIN_VALUE;
static final int MAX = Integer.MAX_VALUE;
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
int n, m;
while(input.hasNext()){
n = input.nextInt();
m = input.nextInt();
if(n == 0 && m == 0) break;
int minX = MAX, maxX = MIN, minY = MAX, maxY = MIN;
while(!(n == 0 && m == 0)){
minX = Math.min(minX, n);
maxX = Math.max(maxX, n);
minY = Math.min(minY, m);
maxY = Math.max(maxY, m);
n = input.nextInt();
m = input.nextInt();
}
System.out.println(minX + " " + minY + " " + maxX + " " + maxY);
}
}
}
|
[
"940129520@qq.com"
] |
940129520@qq.com
|
67b78cac5f48ac33fc908b98026cfb25ef6a7343
|
19e0a7362b33632d7f000ae8abbb930d322a7cfa
|
/src/main/java/com/thinkgem/jeesite/modules/pms/dao/UnitDao.java
|
2e83c2a663cf52972de5a1af5af5efa2cb0e1e47
|
[
"Apache-2.0"
] |
permissive
|
chuabo/pms
|
3abf5b274b39bf61437979ea0c46a2a69b4bc12f
|
5ad0ec915909e6ad1cee32a2632e2dbc524734d4
|
refs/heads/master
| 2022-03-04T09:25:24.990716
| 2022-03-02T09:15:38
| 2022-03-02T09:15:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 496
|
java
|
/**
* There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
*/
package com.thinkgem.jeesite.modules.pms.dao;
import org.springframework.stereotype.Repository;
import com.thinkgem.jeesite.common.persistence.BaseDao;
import com.thinkgem.jeesite.common.persistence.Parameter;
import com.thinkgem.jeesite.modules.pms.entity.Unit;
/**
* 单元信息DAO接口
* @author vriche
* @version 2014-04-18
*/
@Repository
public class UnitDao extends BaseDao<Unit> {
}
|
[
"46430212@qq.com"
] |
46430212@qq.com
|
5452e263abb594e90ed30258dcd05c1c3c0ef366
|
c99d70315aa072f2e38d1c66d049a5ee0adf8d2b
|
/elara-core/src/main/java/org/tools4j/elara/app/factory/AppendingSequencerFactory.java
|
f7aa6ea3763c51d94c2c18a5a1b837e4c821fdb2
|
[
"MIT"
] |
permissive
|
tools4j/elara
|
bb5d00d3fe2bc18a546170cabbc15412579eec71
|
57276e2d82628de7e41962ab4d36cbfaaefa3ca8
|
refs/heads/master
| 2023-09-02T01:25:21.168070
| 2023-06-09T11:30:09
| 2023-06-09T11:30:09
| 243,245,824
| 12
| 3
|
MIT
| 2023-03-28T15:50:20
| 2020-02-26T11:25:03
|
Java
|
UTF-8
|
Java
| false
| false
| 3,441
|
java
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2020-2023 tools4j.org (Marco Terzer, Anton Anufriev)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.tools4j.elara.app.factory;
import org.tools4j.elara.app.config.AppConfig;
import org.tools4j.elara.app.config.CommandStoreConfig;
import org.tools4j.elara.app.state.BaseState;
import org.tools4j.elara.send.CommandAppendingSender;
import org.tools4j.elara.send.SenderSupplier;
import org.tools4j.elara.source.DefaultSourceContextProvider;
import org.tools4j.elara.source.SourceContextProvider;
import org.tools4j.elara.step.AgentStep;
import org.tools4j.elara.store.MessageStore;
import java.util.function.Supplier;
import static java.util.Objects.requireNonNull;
public class AppendingSequencerFactory implements SequencerFactory {
private final AppConfig appConfig;
private final CommandStoreConfig commandStoreConfig;
private final BaseState baseState;
private final Supplier<? extends SequencerFactory> sequencerSingletons;
private final Supplier<? extends InputFactory> inOutSingletons;
public AppendingSequencerFactory(final AppConfig appConfig,
final CommandStoreConfig commandStoreConfig,
final BaseState baseState,
final Supplier<? extends SequencerFactory> sequencerSingletons,
final Supplier<? extends InputFactory> inOutSingletons) {
this.appConfig = requireNonNull(appConfig);
this.commandStoreConfig = requireNonNull(commandStoreConfig);
this.baseState = requireNonNull(baseState);
this.sequencerSingletons = requireNonNull(sequencerSingletons);
this.inOutSingletons = requireNonNull(inOutSingletons);
}
@Override
public SourceContextProvider sourceContextProvider() {
return new DefaultSourceContextProvider(baseState, sequencerSingletons.get().senderSupplier());
}
@Override
public SenderSupplier senderSupplier() {
final MessageStore.Appender commandAppender = commandStoreConfig.commandStore().appender();
return new CommandAppendingSender(appConfig.timeSource(), commandAppender);
}
@Override
public AgentStep sequencerStep() {
return inOutSingletons.get().input().inputPollerStep(sequencerSingletons.get().sourceContextProvider());
}
}
|
[
"terzerm@gmail.com"
] |
terzerm@gmail.com
|
d209713993c5f96ce7a63a124776553b10328c7f
|
9c5280f886007402de36dacc78c2be1ecf2408a6
|
/languages/naming/source_gen/de/voelter/mps/naming/constraints/NamespaceImport_Constraints.java
|
7abf61a5a9ce1580f9acf9fb20885aa5f85fe503
|
[] |
no_license
|
michaelhow/MPSLangComp-MPS2.0
|
b169e00df06d0930240f3c7f70ab8d2669aa75ca
|
52a7d7b58cacc72672714761d74eb84a43adf824
|
refs/heads/master
| 2021-01-15T10:35:42.245621
| 2011-07-05T13:26:32
| 2011-07-05T13:26:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,713
|
java
|
package de.voelter.mps.naming.constraints;
/*Generated by MPS */
import jetbrains.mps.smodel.runtime.base.BaseConstraintsDescriptor;
import java.util.Map;
import jetbrains.mps.smodel.runtime.ReferenceConstraintsDescriptor;
import java.util.HashMap;
import jetbrains.mps.smodel.runtime.base.BaseReferenceConstraintsDescriptor;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.smodel.runtime.ReferenceScopeProvider;
import jetbrains.mps.smodel.runtime.base.BaseReferenceScopeProvider;
import jetbrains.mps.smodel.IOperationContext;
import jetbrains.mps.smodel.runtime.ReferencePresentationContext;
import de.voelter.mps.naming.behavior.IQualifiedNamedConcept_Behavior;
public class NamespaceImport_Constraints extends BaseConstraintsDescriptor {
public NamespaceImport_Constraints() {
super("de.voelter.mps.naming.structure.NamespaceImport");
}
@Override
protected Map<String, ReferenceConstraintsDescriptor> getNotDefaultReferences() {
Map<String, ReferenceConstraintsDescriptor> references = new HashMap();
references.put("namespace", new BaseReferenceConstraintsDescriptor("namespace", this) {
@Nullable
@Override
public ReferenceScopeProvider getScopeProvider() {
return new BaseReferenceScopeProvider() {
@Override
public boolean hasPresentation() {
return true;
}
@Override
public String getPresentation(final IOperationContext operationContext, final ReferencePresentationContext _context) {
return IQualifiedNamedConcept_Behavior.call_qualifiedName_5019556274771758840(_context.getParameterNode());
}
};
}
});
return references;
}
}
|
[
"voelter@acm.org"
] |
voelter@acm.org
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.