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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b4f63cf6c254dc7891c9b6408d1c957fbe07c64f | 54c6bf3179cce122a1baaa2b070c465bc3c255b6 | /app/src/main/java/co/ke/bsl/ui/views/widgets/PyrethrumInspectionRecyclerAdapter.java | 849ac33e0f3664ae28c6a724259c3311c9212a55 | [] | no_license | koskcom/navigationdrawer | 27a65d5bba315517e1fcc89c4828a1b5bfdd8926 | 275fb599c6953a30c0dac03ee01770aaa4579a04 | refs/heads/master | 2022-12-10T08:00:07.336464 | 2020-09-14T06:46:51 | 2020-09-14T06:46:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,759 | java | package co.ke.bsl.ui.views.widgets;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import co.ke.bsl.R;
import co.ke.bsl.data.model.PyrethrumInspection;
public class PyrethrumInspectionRecyclerAdapter extends RecyclerView.Adapter<PyrethrumInspectionRecyclerAdapter.CustomViewHolder> {
private Context mContext;
private List<PyrethrumInspection> pyrethrumInspectionList;
@NonNull
@Override
public PyrethrumInspectionRecyclerAdapter.CustomViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.pyrethrum_inspection_list_adapter, null);
CustomViewHolder viewHolder = new CustomViewHolder(view);
return viewHolder;
}
public interface MyClickListener {
public void onItemClick(int position, View v);
}
@Override
public void onBindViewHolder(@NonNull PyrethrumInspectionRecyclerAdapter.CustomViewHolder holder, int position) {
PyrethrumInspection pyrethrumInspection = pyrethrumInspectionList.get(position);
holder.textApplicant_name.setText("Applicant name: " + pyrethrumInspection.getName_of_applicant());
holder.textdoc_number.setText("Document Number: " + pyrethrumInspection.getDocument_number());
holder.textdocument_date.setText("Document Date: " + pyrethrumInspection.getDocument_date());
holder.textnursery_cert_number.setText("Certificate Number: " + pyrethrumInspection.getCertificate_number());
}
public PyrethrumInspectionRecyclerAdapter(Context context) {
this.mContext = context;
}
public void setItems(List<PyrethrumInspection> pyrethrumInspectionList) {
this.pyrethrumInspectionList = pyrethrumInspectionList;
notifyDataSetChanged();
}
@Override
public int getItemCount() {
return (null != pyrethrumInspectionList ? pyrethrumInspectionList.size() : 0);
}
public class CustomViewHolder extends RecyclerView.ViewHolder {
@BindView(R.id.txtApplicant_name)
TextView textApplicant_name;
@BindView(R.id.txtdocument_date)
TextView textdocument_date;
@BindView(R.id.txtnursery_certificate_number)
TextView textnursery_cert_number;
@BindView(R.id.txtdoc_number)
TextView textdoc_number;
public CustomViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}
}
}
| [
"hosea.koskei@briskbusiness.co.ke"
] | hosea.koskei@briskbusiness.co.ke |
af6f63b8673971e19bb7c8e597729cbb3d3611d4 | 2c7eedf2fdc408acd7d488fd3e32a2d71c1ecd2a | /src/action/kiwi/service/admin/PermissionHandlerLocal.java | 398e65da0de4b05157e45d9ae5ec28e225b18c5e | [
"BSD-3-Clause"
] | permissive | fregaham/KiWi | c110135509d66a795ed377a458151a7f17bc3344 | 04952f928b2cc23555961dbc5988cfcd496f4854 | refs/heads/master | 2021-01-19T08:50:47.854392 | 2011-01-20T15:43:36 | 2011-01-20T15:43:36 | 1,102,761 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,995 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008-2009, The KiWi Project (http://www.kiwi-project.eu)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither the name of the KiWi Project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 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.
*
* Contributor(s):
*
*
*/
package kiwi.service.admin;
import javax.faces.convert.Converter;
/**
* @author Rolf Sint
*
*/
public interface PermissionHandlerLocal {
public void init();
public String saveNewGroup();
public Converter getConverter();
public void destroy();
public void remove();
} | [
"fregaham@gmail.com"
] | fregaham@gmail.com |
fbe94fca7e614537d6ff7e57a4f7cb56e09d87d0 | 47acc2c0b182fc046f3c846ab357bf334963c670 | /app/src/main/java/com/example/navigation/ActivityEditnhacc.java | 094d82ab0dcaa8430c95d232e75504fa97d725c6 | [] | no_license | thaibaquyen/App | a1c9fe8786ef485483af6a67089136122cc2f557 | 3f281ac60e6951a00d8774873d7eef42f64c1dc7 | refs/heads/master | 2022-12-17T20:10:47.523452 | 2020-09-28T05:00:31 | 2020-09-28T05:00:31 | 299,192,698 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package com.example.navigation;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class ActivityEditnhacc extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_editnhacc);
}
}
| [
"="
] | = |
7d651b6e5a73d05ef501a1318dba0b2898e353fa | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/az/g.java | aee64c1addb771447bb8d60561f1bec6f3b33662 | [] | no_license | xsren/AndroidReverseNotes | 9631a5aabc031006e795a112b7ac756a8edd4385 | 9202c276fe9f04a978e4e08b08e42645d97ca94b | refs/heads/master | 2021-04-07T22:50:51.072197 | 2019-07-16T02:24:43 | 2019-07-16T02:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 463 | java | package com.tencent.mm.az;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.messenger.foundation.a.a.j.b;
import com.tencent.mm.protocal.protobuf.act;
@Deprecated
public final class g extends b {
private act fLB = new act();
public g(int i, int i2) {
super(23);
AppMethodBeat.i(989);
this.fLB.wkw = i;
this.fLB.pvD = i2;
this.oqT = this.fLB;
AppMethodBeat.o(989);
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
1049b7ae7699a97c078d93787aff2e12a41a280c | c3319fb9adce6a3e88f4cd949721ca032726941e | /com/syntax/class11/TwoDArraysDemo.java | 11c8f415e3a3d239559fb59befec387d42130699 | [] | no_license | Dinara9786/JavaBatch7 | 9a0fa5d16f3961ecc1468189f5ea621b09521365 | 3c0484c974d0721a410fc8ebfdc7e63cdb0fd9ea | refs/heads/master | 2023-01-15T19:59:38.420543 | 2020-11-22T03:01:13 | 2020-11-22T03:01:13 | 272,066,513 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 973 | java | package com.syntax.class11;
public class TwoDArraysDemo {
public static void main(String[] args) {
int [][] numbers = new int [3][4]; //rows and columns
//1s row, row with index 0
numbers[0][0] = 10;
numbers[0][1] = 16;
numbers[0][2] = 20;
numbers[0][3] = 25;
// 2nd row, row with index 1
numbers[1][0] = 32;
numbers[1][1] = 36;
numbers[1][2] = 40;
numbers[1][3] = 44;
// numbers[1][4] = 36 --> runtime error, outofbound exception
// 3rd row, row with index 2
numbers[2][0] = 63;
numbers[2][1] = 66;
numbers[2][2] = 69;
numbers[2][3] = 72;
System.out.println(numbers[0][2]);
System.out.println("=======if we know values upfront then we can do this way==========");
// 2D arrays are array of arrays
int [][] nums = {
{10, 16, 20, 25},
{32,36, 40, 44},
{63,66, 69, 72}
};
System.out.println(nums [2][0]); //63
System.out.println(nums [1][3]); // 44
}
}
| [
"knowledge9786@gmail.com"
] | knowledge9786@gmail.com |
104881ca5bea3da047d873bd07094660ad76cac6 | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/validation/org/jboss/as/test/integration/weld/deployment/beanDeploymentArchive/BeanDeploymentArchiveLookupTest.java | 5d83969d9f59ed1a03a0006fe33146c8b3349d08 | [] | 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 | 2,731 | java | /**
* JBoss, Home of Professional Open Source
* Copyright 2017, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.as.test.integration.weld.deployment.beanDeploymentArchive;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.weld.bean.builtin.BeanManagerProxy;
import org.jboss.weld.manager.BeanManagerImpl;
import org.jboss.weld.manager.BeanManagerLookupService;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Tests WFLY-9536
*
* @author <a href="mailto:manovotn@redhat.com">Matej Novotny</a>
*/
@RunWith(Arquillian.class)
public class BeanDeploymentArchiveLookupTest {
@Inject
BeanManager bm;
@Test
public void verifyDiscoveryOfAllClasses() {
// BM proxy is injected, we unwrap it
BeanManagerImpl bmImpl = BeanManagerProxy.unwrap(bm);
// use service to lookup BM based on class
BeanManagerImpl bmFromSomeBean = BeanManagerLookupService.lookupBeanManager(SomeBean.class, bmImpl);
BeanManagerImpl bmFromNotABean = BeanManagerLookupService.lookupBeanManager(NotABean.class, bmImpl);
BeanManagerImpl bmFromSomeOtherBean = BeanManagerLookupService.lookupBeanManager(SomeOtherBean.class, bmImpl);
Assert.assertNotNull(bmFromSomeBean);
Assert.assertNotNull(bmFromNotABean);
Assert.assertNotNull(bmFromSomeOtherBean);
// verify that BMs from WAR and JAR differ
Assert.assertNotEquals(bmFromSomeBean, bmFromSomeOtherBean);
// Manager injected here is the same as the one for SomeOtherBean as they are in the same archive
Assert.assertEquals(bmImpl, bmFromSomeOtherBean);
// BM injected here should be different from that we get from classes in JAR lib
Assert.assertNotEquals(bmImpl, bmFromSomeBean);
Assert.assertNotEquals(bmImpl, bmFromNotABean);
// classes in JAR lib should have the same BM Impl
Assert.assertEquals(bmFromSomeBean, bmFromNotABean);
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
eba390c637d254e6f8dcc73e211e8b92755427e2 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/commerce/service/C24436a.java | 83058d4764311f7c4a3ef8fd457d6e6e502d0859 | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 674 | java | package com.p280ss.android.ugc.aweme.commerce.service;
import com.p280ss.android.ugc.aweme.framework.services.ServiceManager;
/* renamed from: com.ss.android.ugc.aweme.commerce.service.a */
public final class C24436a {
/* renamed from: a */
public static final C24436a f64500a = new C24436a();
private C24436a() {
}
/* renamed from: a */
public static final ICommerceService m80356a() {
ICommerceService iCommerceService = (ICommerceService) ServiceManager.get().getService(ICommerceService.class);
if (iCommerceService == null) {
return new EmptyCommerceService();
}
return iCommerceService;
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
134506fba1bec287cf21a1b5f6773a3fe5d97f33 | 1ca86d5d065372093c5f2eae3b1a146dc0ba4725 | /core-java-modules/core-java-streams-3/src/main/java/com/surya/streams/parallel/SequentialStream.java | d8477a8ecf27be072385c161df4913cf6a49cb42 | [] | no_license | Suryakanta97/DemoExample | 1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e | 5c6b831948e612bdc2d9d578a581df964ef89bfb | refs/heads/main | 2023-08-10T17:30:32.397265 | 2021-09-22T16:18:42 | 2021-09-22T16:18:42 | 391,087,435 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 376 | java | package com.surya.streams.parallel;
import java.util.Arrays;
import java.util.List;
public class SequentialStream {
public static void main(String[] args) {
List<Integer> listOfNumbers = Arrays.asList(1, 2, 3, 4);
listOfNumbers.stream().forEach(number ->
System.out.println(number + " " + Thread.currentThread().getName())
);
}
}
| [
"suryakanta97@github.com"
] | suryakanta97@github.com |
c3c745ae7a4f3ba2aedf5c8fe4d19b6b3ac21c38 | d2310f985771b4f5b6a10223f9692425c05cf6a2 | /microraft/src/test/java/io/microraft/test/util/RaftTestUtils.java | 99c834e0d516775969a27e3b48ca2968be6aa310 | [
"Apache-2.0"
] | permissive | mdogan/MicroRaft | 05f72efa9b26a83738df90e072b77697c5ce1edb | fee64c5936faacf9ed926d5174b7a12b77d58d06 | refs/heads/master | 2023-08-16T00:03:53.829585 | 2021-09-08T22:00:23 | 2021-09-08T22:00:23 | 402,744,768 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,699 | java | /*
* Original work Copyright (c) 2008-2020, Hazelcast, Inc.
* Modified work Copyright 2020, MicroRaft.
*
* 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.microraft.test.util;
import io.microraft.RaftConfig;
import io.microraft.RaftEndpoint;
import io.microraft.RaftNode;
import io.microraft.RaftNodeStatus;
import io.microraft.RaftRole;
import io.microraft.executor.RaftNodeExecutor;
import io.microraft.executor.impl.DefaultRaftNodeExecutor;
import io.microraft.impl.RaftNodeImpl;
import io.microraft.impl.local.InMemoryRaftStore;
import io.microraft.impl.log.SnapshotChunkCollector;
import io.microraft.impl.state.LeaderState;
import io.microraft.impl.state.RaftGroupMembersState;
import io.microraft.model.log.BaseLogEntry;
import io.microraft.model.log.SnapshotEntry;
import io.microraft.persistence.RaftStore;
import io.microraft.persistence.RestoredRaftState;
import io.microraft.report.RaftNodeReport;
import java.lang.reflect.Field;
import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
import java.util.function.Function;
import static org.junit.Assert.assertNotNull;
public final class RaftTestUtils {
public static final RaftConfig TEST_RAFT_CONFIG = RaftConfig.newBuilder().setLeaderElectionTimeoutMillis(2000)
.setLeaderHeartbeatPeriodSecs(1).setLeaderHeartbeatTimeoutSecs(5)
.build();
private RaftTestUtils() {
}
public static RaftRole getRole(RaftNodeImpl node) {
return readRaftReport(node, RaftNodeReport::getRole);
}
private static <T> T readRaftReport(RaftNodeImpl node, Function<RaftNodeReport, T> query) {
try {
return query.apply(node.getReport().join().getResult());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public static BaseLogEntry getLastLogOrSnapshotEntry(RaftNodeImpl node) {
return readRaftState(node, () -> node.state().log().lastLogOrSnapshotEntry());
}
public static <T> T readRaftState(RaftNodeImpl node, Callable<T> task) {
try {
RaftNodeExecutor executor = getExecutor(node);
if (executor instanceof DefaultRaftNodeExecutor) {
DefaultRaftNodeExecutor e = (DefaultRaftNodeExecutor) executor;
if (e.getExecutor().isShutdown()) {
return task.call();
}
}
FutureTask<T> futureTask = new FutureTask<>(task);
executor.submit(futureTask);
return futureTask.get();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private static RaftNodeExecutor getExecutor(RaftNodeImpl node)
throws NoSuchFieldException, IllegalAccessException {
Field field = RaftNodeImpl.class.getDeclaredField("executor");
field.setAccessible(true);
return (RaftNodeExecutor) field.get(node);
}
public static SnapshotEntry getSnapshotEntry(RaftNodeImpl node) {
return readRaftState(node, () -> node.state().log().snapshotEntry());
}
public static SnapshotChunkCollector getSnapshotChunkCollector(RaftNodeImpl node) {
return readRaftState(node, () -> {
SnapshotChunkCollector snapshotChunkCollector = node.state().snapshotChunkCollector();
if (snapshotChunkCollector == null) {
return null;
}
return snapshotChunkCollector.copy();
});
}
public static long getCommitIndex(RaftNodeImpl node) {
return readRaftReport(node, report -> report.getLog().getCommitIndex());
}
public static long getLastApplied(RaftNodeImpl node) {
return readRaftState(node, () -> node.state().lastApplied());
}
public static int getTerm(RaftNodeImpl node) {
return readRaftReport(node, report -> report.getTerm().getTerm());
}
public static RaftEndpoint getVotedEndpoint(RaftNodeImpl node) {
return readRaftReport(node, report -> report.getTerm().getVotedEndpoint());
}
public static long getMatchIndex(RaftNodeImpl leader, RaftEndpoint follower) {
Callable<Long> task = () -> {
LeaderState leaderState = leader.state().leaderState();
return leaderState.getFollowerState(follower).matchIndex();
};
return readRaftState(leader, task);
}
public static long getLeaderQuerySequenceNumber(RaftNodeImpl leader) {
Callable<Long> task = () -> {
LeaderState leaderState = leader.state().leaderState();
assertNotNull(leader.getLocalEndpoint() + " has no leader state!", leaderState);
return leaderState.querySequenceNumber();
};
return readRaftState(leader, task);
}
public static RaftNodeStatus getStatus(RaftNodeImpl node) {
return readRaftReport(node, RaftNodeReport::getStatus);
}
public static RaftGroupMembersState getEffectiveGroupMembers(RaftNodeImpl node) {
Callable<RaftGroupMembersState> task = () -> node.state().effectiveGroupMembers();
return readRaftState(node, task);
}
public static RaftGroupMembersState getCommittedGroupMembers(RaftNodeImpl node) {
Callable<RaftGroupMembersState> task = () -> node.state().committedGroupMembers();
return readRaftState(node, task);
}
public static <T extends RaftStore> T getRaftStore(RaftNode node) {
Callable<RaftStore> task = () -> ((RaftNodeImpl) node).state().store();
return (T) readRaftState((RaftNodeImpl) node, task);
}
public static RestoredRaftState getRestoredState(RaftNode node) {
Callable<RestoredRaftState> task = () -> {
InMemoryRaftStore store = (InMemoryRaftStore) ((RaftNodeImpl) node).state().store();
return store.toRestoredRaftState();
};
return readRaftState((RaftNodeImpl) node, task);
}
public static int minority(int count) {
return count - majority(count);
}
public static int majority(int count) {
return count / 2 + 1;
}
}
| [
"ebkahveci@gmail.com"
] | ebkahveci@gmail.com |
176c131400445adf6ebff464585e84f1dad51df7 | ef39cd6dac299db7e717a0c81c1a87b6a510daf6 | /src/com/aeolus/media/renderable/TemporaryObject.java | 5576985797e94adb2090813b8d2fc07fc264ac40 | [] | no_license | rojr/Project-Aeolus-Official-Client | eca3d7fdf84c1e80130a66c7fa0a50f22294bbd1 | 5936b9cafde04f440d45f013620f9ace36d1565a | refs/heads/master | 2020-12-24T14:01:28.070051 | 2015-09-16T13:18:30 | 2015-09-16T13:18:30 | 42,508,642 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 484 | java | package com.aeolus.media.renderable;
import com.aeolus.collection.Linkable;
public final class TemporaryObject extends Linkable {
public TemporaryObject()
{
anInt1294 = -1;
}
public int anInt1291;
public int anInt1292;
public int anInt1293;
public int anInt1294;
public int anInt1295;
public int anInt1296;
public int anInt1297;
public int anInt1298;
public int anInt1299;
public int anInt1300;
public int anInt1301;
public int anInt1302;
}
| [
"nshusa99@gmail.com"
] | nshusa99@gmail.com |
72cd2349055cd2d27d33fe4798ef00e860de74d7 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_95ccf93a8ae6ba2d9b0540d0d3f115aac75c484e/SongDb/2_95ccf93a8ae6ba2d9b0540d0d3f115aac75c484e_SongDb_s.java | d1f9c729237f1069395b7428d95e31da599afbea | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 7,816 | java | package yuku.alkitab.base.storage;
import android.database.Cursor;
import android.database.DatabaseUtils.InsertHelper;
import android.database.sqlite.SQLiteDatabase;
import android.os.Parcel;
import android.util.TimingLogger;
import java.util.ArrayList;
import java.util.List;
import yuku.alkitab.base.model.SongInfo;
import yuku.alkitab.base.util.SongFilter;
import yuku.alkitab.base.util.SongFilter.CompiledFilter;
import yuku.kpri.model.Song;
public class SongDb extends yuku.afw.storage.InternalDb {
public static final String TAG = SongDb.class.getSimpleName();
public SongDb(SongDbHelper helper) {
super(helper);
}
private static byte[] marshallSong(Song song, int dataFormatVersion) {
Parcel p = Parcel.obtain();
song.writeToParcelCompat(dataFormatVersion, p, 0);
byte[] buf = p.marshall();
p.recycle();
return buf;
}
private static Song unmarshallSong(byte[] buf, int dataFormatVersion) {
Parcel p = Parcel.obtain();
p.unmarshall(buf, 0, buf.length);
p.setDataPosition(0);
Song res = Song.createFromParcelCompat(dataFormatVersion, p);
p.recycle();
return res;
}
public void storeSongs(String bookName, List<Song> songs, int dataFormatVersion) {
TimingLogger tl = new TimingLogger(TAG, "storeSongs"); //$NON-NLS-1$
SQLiteDatabase db = helper.getWritableDatabase();
db.beginTransaction();
try {
// remove existing one if exists
for (Song song: songs) {
db.delete(Table.SongInfo.tableName(),
Table.SongInfo.bookName + "=? and " + Table.SongInfo.code + "=? and " + Table.SongInfo.dataFormatVersion + "=?", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new String[] {bookName, song.code, "" + dataFormatVersion} //$NON-NLS-1$
);
}
tl.addSplit("finished deleting existings (if any)"); //$NON-NLS-1$
int ordering = 1; // ordering of the songs for display
// insert new ones
InsertHelper ih = new InsertHelper(db, Table.SongInfo.tableName());
int col_bookName = ih.getColumnIndex(Table.SongInfo.bookName.name());
int col_code = ih.getColumnIndex(Table.SongInfo.code.name());
int col_title = ih.getColumnIndex(Table.SongInfo.title.name());
int col_title_original = ih.getColumnIndex(Table.SongInfo.title_original.name());
int col_ordering = ih.getColumnIndex(Table.SongInfo.ordering.name());
int col_dataFormatVersion = ih.getColumnIndex(Table.SongInfo.dataFormatVersion.name());
int col_data = ih.getColumnIndex(Table.SongInfo.data.name());
tl.addSplit("The real insertion of " + songs.size()); //$NON-NLS-1$
for (Song song: songs) {
ih.prepareForInsert();
ih.bind(col_bookName, bookName);
ih.bind(col_code, song.code);
ih.bind(col_title, song.title);
ih.bind(col_title_original, song.title_original);
ih.bind(col_ordering, ordering++);
ih.bind(col_dataFormatVersion, dataFormatVersion);
ih.bind(col_data, marshallSong(song, dataFormatVersion));
ih.execute();
}
tl.addSplit("Real insertion finished"); //$NON-NLS-1$
db.setTransactionSuccessful();
} finally {
db.endTransaction();
tl.dumpToLog();
}
}
public Song getSong(String bookName, String code) {
SQLiteDatabase db = helper.getReadableDatabase();
String[] columns = new String[] {
Table.SongInfo.data.name(), // 0
Table.SongInfo.dataFormatVersion.name(), // 1
};
Cursor c = db.query(Table.SongInfo.tableName(),
columns,
Table.SongInfo.bookName + "=? and " + Table.SongInfo.code + "=?", //$NON-NLS-1$ //$NON-NLS-2$
new String[] {bookName, code},
null, null, null);
try {
if (c.moveToNext()) {
byte[] data = c.getBlob(0);
int dataFormatVersion = c.getInt(1);
return unmarshallSong(data, dataFormatVersion);
} else {
return null;
}
} finally {
c.close();
}
}
public boolean songExists(String bookName, String code) {
SQLiteDatabase db = helper.getReadableDatabase();
Cursor c = db.rawQuery("select count(*) from " + Table.SongInfo.tableName() + " where " //$NON-NLS-1$ //$NON-NLS-2$
+ Table.SongInfo.bookName + "=? and " + Table.SongInfo.code + "=?", //$NON-NLS-1$ //$NON-NLS-2$
new String[] {bookName});
try {
if (c.moveToNext()) {
return c.getInt(0) > 0;
} else {
return false;
}
} finally {
c.close();
}
}
public Song getFirstSongFromBook(String bookName) {
SQLiteDatabase db = helper.getReadableDatabase();
String[] columns = new String[] { // column indexes!
Table.SongInfo.data.name(), // 0
Table.SongInfo.dataFormatVersion.name(), // 1
};
Cursor c = db.query(Table.SongInfo.tableName(),
columns,
Table.SongInfo.bookName + "=?", //$NON-NLS-1$
new String[] {bookName},
null, null, Table.SongInfo.ordering + " asc", "1"); //$NON-NLS-1$ //$NON-NLS-2$
try {
if (c.moveToNext()) {
byte[] data = c.getBlob(0);
int dataFormatVersion = c.getInt(1);
return unmarshallSong(data, dataFormatVersion);
} else {
return null;
}
} finally {
c.close();
}
}
public List<SongInfo> getSongInfosByBookName(String bookName) {
SQLiteDatabase db = helper.getReadableDatabase();
List<SongInfo> res = new ArrayList<SongInfo>();
String[] columns = { // column indexes!
Table.SongInfo.bookName.name(), // 0
Table.SongInfo.code.name(), // 1
Table.SongInfo.title.name(), // 2
Table.SongInfo.title_original.name(), // 3
};
Cursor c = querySongs(db, columns, bookName);
try {
while (c.moveToNext()) {
String bookName2 = c.getString(0);
String code = c.getString(1);
String title = c.getString(2);
String title_original = c.getString(3);
res.add(new SongInfo(bookName2, code, title, title_original));
}
} finally {
c.close();
}
return res;
}
public List<SongInfo> getSongInfosByBookNameAndDeepFilter(String bookName, String filter_string) {
SQLiteDatabase db = helper.getReadableDatabase();
List<SongInfo> res = new ArrayList<SongInfo>();
String[] columns = { // column indexes!
Table.SongInfo.bookName.name(), // 0
Table.SongInfo.code.name(), // 1
Table.SongInfo.title.name(), // 2
Table.SongInfo.title_original.name(), // 3
Table.SongInfo.data.name(), // 4
Table.SongInfo.dataFormatVersion.name(), // 5
};
CompiledFilter cf = SongFilter.compileFilter(filter_string);
Cursor c = querySongs(db, columns, bookName);
try {
while (c.moveToNext()) {
String bookName2 = c.getString(0);
String code = c.getString(1);
String title = c.getString(2);
String title_original = c.getString(3);
byte[] data = c.getBlob(4);
int dataFormatVersion = c.getInt(5);
Song song = unmarshallSong(data, dataFormatVersion);
if (SongFilter.match(song, cf)) {
res.add(new SongInfo(bookName2, code, title, title_original));
}
}
} finally {
c.close();
}
return res;
}
private static Cursor querySongs(SQLiteDatabase db, String[] columns, String bookName) {
Cursor c;
if (bookName == null) {
c = db.query(Table.SongInfo.tableName(),
columns,
null,
null,
null, null, Table.SongInfo.bookName + " asc, " + Table.SongInfo.ordering + " asc"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
c = db.query(Table.SongInfo.tableName(),
columns,
Table.SongInfo.bookName + "=?", //$NON-NLS-1$
new String[] {bookName},
null, null, Table.SongInfo.ordering + " asc"); //$NON-NLS-1$
}
return c;
}
public int deleteAllSongs() {
SQLiteDatabase db = helper.getWritableDatabase();
int count = db.delete(Table.SongInfo.tableName(), "1", null);
db.execSQL("vacuum");
return count;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
cf898bcc60e3d0e5163599139e4ecb6db826653f | 805ec745004ff5a066393dd81f810f40f1d9e382 | /src/main/java/myFrame/myFun/MyFunctions.java | 8ba6e8d875422f3c4287cd12afa98c2014438cd1 | [] | no_license | ligson/hehuoren | ba9f2bcb36dd7cd97344cc35c462a4f49923c6b6 | 3b98f968e42a633acf9a084a3cc1c47b0aa62181 | refs/heads/master | 2021-01-10T08:44:15.941341 | 2016-01-03T03:05:31 | 2016-01-03T03:05:31 | 48,914,504 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,994 | java | package myFrame.myFun;
public class MyFunctions{
public static void main(String[] args){
//String txt = replace("pt-[18]_sl-1","pt-\\[.*\\]_*","");
/*String txt = replace("sl-15_pt-[18]","sl-.*_*","");
System.out.println(txt);*/
String txt = clearQueryArgs("","pt");
System.out.println(txt);
}
public static String replace(String txt,String oldTxt,String newTxt){
if(null!=txt && !txt.equals("")){
txt=txt.replaceAll(oldTxt, newTxt);
}
return txt;
}
/**
*
* @param queryArgs1 pt-[18]_sl-1 sl-15_pt-[18]
* @param item pt
* @return
* 重新遍历
*/
public static String clearQueryArgs(String queryArgs1,String item){
StringBuffer sb = new StringBuffer();
if(null!=queryArgs1 && !queryArgs1.equals("")){
String[] array=queryArgs1.split("_");
int len = array.length;
String queryItem = null;
for(int i=0;i<len;i++){
queryItem=array[i];
if(!queryItem.equals("")){
if(!queryItem.startsWith(item)){
sb.append(queryItem).append("_");
}
}
}
String sbs = sb.toString();
if(null!=sbs && !sbs.equals("")){
sbs=sbs.substring(0,sbs.length()-1);
}
if(!sbs.equals("")){
sbs=sbs+"_";
}
return sbs;
}
return "";
}
//找出一个queryArgs1中的key的值
public static String getValue(String queryArgs1,String itemKey){
if(null!=queryArgs1 && !queryArgs1.equals("")){
String[] array=queryArgs1.split("_");
int len = array.length;
String queryItem = null;
String value = null;
for(int i=0;i<len;i++){
queryItem=array[i];
if(null!=queryItem && !queryItem.equals("")){
if(queryItem.startsWith(itemKey)){
String[] qiArray=queryItem.split("-");
if(null!=qiArray){
int qiLen = qiArray.length;
if(qiLen==2){
value=qiArray[1];
if(value.startsWith("[") && value.endsWith("]")){
value=value.substring(1,value.length()-1);
}
return value;
}
}
}
}
}
}
return "";
}
}
| [
"593949938@qq.com"
] | 593949938@qq.com |
b58b04e99ed0e574bc130e26beb77946f0628ee4 | 4c9d35da30abf3ec157e6bad03637ebea626da3f | /eclipse/src/org/ripple/power/ui/todo/HTMLExporter.java | 68bfb58ea91401642c8a249147b969fa9347e047 | [
"Apache-2.0"
] | permissive | youweixue/RipplePower | 9e6029b94a057e7109db5b0df3b9fd89c302f743 | 61c0422fa50c79533e9d6486386a517565cd46d2 | refs/heads/master | 2020-04-06T04:40:53.955070 | 2015-04-02T12:22:30 | 2015-04-02T12:22:30 | 33,860,735 | 0 | 0 | null | 2015-04-13T09:52:14 | 2015-04-13T09:52:11 | null | UTF-8 | Java | false | false | 1,084 | java | package org.ripple.power.ui.todo;
import java.io.FileWriter;
import java.io.IOException;
import java.util.List;
public class HTMLExporter implements Exporter {
private String content;
private String file;
public HTMLExporter(List<TodoItem> items, String file) {
this.file = file;
StringBuilder sbr = new StringBuilder();
for (TodoItem item : items) {
sbr.append("Id:"+item.getId());
sbr.append("<br>");
sbr.append("Note:"+item.getNote());
sbr.append("<br>");
sbr.append("Status:"+item.getStatus());
sbr.append("<br>");
sbr.append("Period:"+item.getPeriod());
sbr.append("<br>");
sbr.append("Timeout:"+item.getTimeout());
sbr.append("<br>");
}
this.content = sbr.toString();
}
public String doExport() {
return content;
}
public void store() {
FileWriter writer = null;
try {
writer = new FileWriter(file);
writer.write(content);
writer.close();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (writer != null) {
try {
writer.close();
} catch (Exception e) {
}
}
}
}
}
| [
"longwind2012@hotmail.com"
] | longwind2012@hotmail.com |
a7dda30a68df3f0b30c65c6c4e26b3be522a45ab | f77d04f1e0f64a6a5e720ce24b65b1ccb3c546d2 | /zyj-hec-master/zyj-hec/src/main/java/com/hand/hec/expm/controllers/ExpPolicyDistrictController.java | e4f414635ccd7bcae86ba49aad2c3b19217f8a0a | [] | no_license | floodboad/zyj-hssp | 3139a4e73ec599730a67360cd04aa34bc9eaf611 | dc0ef445935fa48b7a6e86522ec64da0042dc0f3 | refs/heads/master | 2023-05-27T21:28:01.290266 | 2020-01-03T06:21:59 | 2020-01-03T06:29:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,267 | java | package com.hand.hec.expm.controllers;
import org.springframework.stereotype.Controller;
import com.hand.hap.system.controllers.BaseController;
import com.hand.hap.core.IRequest;
import com.hand.hap.system.dto.ResponseData;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import com.hand.hap.core.IRequest;
import com.hand.hap.system.controllers.BaseController;
import com.hand.hap.system.dto.ResponseData;
import com.hand.hec.expm.dto.ExpPolicyDistrict;
import com.hand.hec.expm.service.IExpPolicyDistrictService;
/**
*
* xx控制器
*
* @author xxx YYYY-mm-dd
*/
@Controller
@RequestMapping(value = "/exp/policy-district")
public class ExpPolicyDistrictController extends BaseController{
@Autowired
private IExpPolicyDistrictService service;
@RequestMapping(value = "/query",method = {RequestMethod.GET,RequestMethod.POST})
@ResponseBody
public ResponseData query(ExpPolicyDistrict dto, @RequestParam(defaultValue = DEFAULT_PAGE) int page,
@RequestParam(defaultValue = DEFAULT_PAGE_SIZE) int pageSize, HttpServletRequest request) {
IRequest requestContext = createRequestContext(request);
return new ResponseData(service.select(requestContext,dto,page,pageSize));
}
@RequestMapping(value = "/submit")
@ResponseBody
public ResponseData update(@RequestBody List<ExpPolicyDistrict> dto, BindingResult result, HttpServletRequest request){
getValidator().validate(dto, result);
if (result.hasErrors()) {
ResponseData responseData = new ResponseData(false);
responseData.setMessage(getErrorMessage(result, request));
return responseData;
}
IRequest requestCtx = createRequestContext(request);
return new ResponseData(service.batchUpdate(requestCtx, dto));
}
@RequestMapping(value = "/remove")
@ResponseBody
public ResponseData delete(HttpServletRequest request,@RequestBody List<ExpPolicyDistrict> dto){
service.batchDelete(dto);
return new ResponseData();
}
} | [
"1961187382@qq.com"
] | 1961187382@qq.com |
4b2721145d1724c6f04203c9505cdfc3a4515a63 | 5f179a192fdda1933f8dccda73f254548817825a | /docroot/WEB-INF/service/com/idetronic/subur/service/persistence/ViewSummaryActionableDynamicQuery.java | fcf534023fea29f8dc07669d69c5d866a641cac9 | [] | no_license | merbauraya/Subur | 4e71f2a130fd4f87a40f8c9058e2bd3410877ac5 | 49f229aa33c37f888835928817acf964f4bcf35f | refs/heads/master | 2021-01-18T21:24:03.841861 | 2016-05-19T05:03:06 | 2016-05-19T05:03:06 | 40,219,551 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,312 | java | /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.idetronic.subur.service.persistence;
import com.idetronic.subur.model.ViewSummary;
import com.idetronic.subur.service.ViewSummaryLocalServiceUtil;
import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
/**
* @author Mazlan Mat
* @generated
*/
public abstract class ViewSummaryActionableDynamicQuery
extends BaseActionableDynamicQuery {
public ViewSummaryActionableDynamicQuery() throws SystemException {
setBaseLocalService(ViewSummaryLocalServiceUtil.getService());
setClass(ViewSummary.class);
setClassLoader(com.idetronic.subur.service.ClpSerializer.class.getClassLoader());
setPrimaryKeyPropertyName("id");
}
} | [
"mazlan.mat@gmail.com"
] | mazlan.mat@gmail.com |
f5371a3f18f02194ab602ca9ee5f1c29c3a6692c | c53eff0794037b9dde61cfe31d972f6d07799338 | /Mage.Sets/src/mage/cards/s/SoulOfTheRapids.java | 9f10f1663fa234bf925b9f6b96f937b63ac7a18e | [] | no_license | theelk801/mage | 0cd1c942c54e204db03a7e1603c4250c58a65f9f | 9a59d801200f327d9f01b4086d0e979d263c095d | refs/heads/master | 2022-11-11T13:02:45.533594 | 2018-04-24T12:35:37 | 2018-04-24T12:35:37 | 98,135,127 | 3 | 0 | null | 2018-04-24T12:35:38 | 2017-07-24T00:54:07 | Java | UTF-8 | Java | false | false | 2,632 | java | /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``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 BetaSteward_at_googlemail.com 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.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
/**
*
* @author LevelX2
*/
public class SoulOfTheRapids extends CardImpl {
public SoulOfTheRapids(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Hexproof
this.addAbility(HexproofAbility.getInstance());
}
public SoulOfTheRapids(final SoulOfTheRapids card) {
super(card);
}
@Override
public SoulOfTheRapids copy() {
return new SoulOfTheRapids(this);
}
}
| [
"ludwig.hirth@online.de"
] | ludwig.hirth@online.de |
60abce85db2d81c50e902016f8dd10230795b79b | 88a1a5d89fff48e0c8bf23cd5f95f91e739e3f51 | /api-gateway/src/test/java/com/vennetics/bell/sam/apigateway/ApiGatewayApplicationTests.java | 2f71a6f474725cb8ab4c76676a7af55e1a224524 | [] | no_license | mc0171v/test | 1fde7611c2c96cda4fe3317add6e7a93d927dfa6 | 2e00f9fbe73ab0d452a4cb0d2b84e4199a41fa9f | refs/heads/master | 2021-01-10T07:28:56.156382 | 2016-02-18T09:32:14 | 2016-02-18T09:32:14 | 50,094,927 | 2 | 0 | null | 2016-02-18T09:24:54 | 2016-01-21T08:58:07 | Java | UTF-8 | Java | false | false | 481 | java | package com.vennetics.bell.sam.apigateway;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = ApiGatewayApplication.class)
@Ignore
public class ApiGatewayApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"martin.caldwell@vennetics.com"
] | martin.caldwell@vennetics.com |
0cd6eb93473cefe1e2605a1951f4bae7db9ebfb3 | 40ca219f59a9c7106a977831981651949bbeb04e | /src/main/java/com/thebuzzmedia/exiftool/exceptions/PoolIOException.java | d2c3ac7a6e839a0a60e9ff6257762dacb6c683b8 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mjeanroy/exiftool | 80c3ed5fb81a0659e65456d5c5af11a11d2932e2 | eb3e08939df137cae189f2655511894e1e1ccd72 | refs/heads/master | 2023-08-31T12:01:38.988354 | 2023-08-14T16:14:40 | 2023-08-14T16:14:40 | 45,069,588 | 62 | 28 | Apache-2.0 | 2023-09-12T07:08:44 | 2015-10-27T20:58:00 | Perl | UTF-8 | Java | false | false | 1,557 | java | /**
* Copyright 2011 The Buzz Media, LLC
* Copyright 2015-2019 Mickael Jeanroy
*
* 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.thebuzzmedia.exiftool.exceptions;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import static java.util.Collections.unmodifiableCollection;
/**
* Error thrown when an error occurs with pool execution.
*/
public class PoolIOException extends IOException {
/**
* Original exceptions.
*/
private final Collection<Exception> thrownExceptions;
/**
* Create exception.
*
* @param message Error message.
* @param thrownExceptions Original exceptions.
*/
public PoolIOException(String message, Collection<Exception> thrownExceptions) {
super(message);
this.thrownExceptions = new ArrayList<>(thrownExceptions);
}
/**
* Get {@link #thrownExceptions}, as an unmodifiable collection.
*
* @return {@link #thrownExceptions}
*/
public Collection<Exception> getThrownExceptions() {
return unmodifiableCollection(thrownExceptions);
}
}
| [
"mickael.jeanroy@gmail.com"
] | mickael.jeanroy@gmail.com |
fc6cccfb3f7b0ef3ac2d16866a6ede949346a5c3 | 70f7a06017ece67137586e1567726579206d71c7 | /alimama/src/main/java/com/taobao/alivfssdk/fresco/cache/disk/FileCache.java | 8dcee5297c4e2f14299ed9b1a19dfb03895fb81a | [] | no_license | liepeiming/xposed_chatbot | 5a3842bd07250bafaffa9f468562021cfc38ca25 | 0be08fc3e1a95028f8c074f02ca9714dc3c4dc31 | refs/heads/master | 2022-12-20T16:48:21.747036 | 2020-10-14T02:37:49 | 2020-10-14T02:37:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,148 | java | package com.taobao.alivfssdk.fresco.cache.disk;
import com.taobao.alivfssdk.fresco.binaryresource.BinaryResource;
import com.taobao.alivfssdk.fresco.cache.common.CacheKey;
import com.taobao.alivfssdk.fresco.cache.common.WriterCallback;
import com.taobao.alivfssdk.fresco.cache.disk.DiskStorage;
import com.taobao.alivfssdk.fresco.common.disk.DiskTrimmable;
import java.io.Closeable;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
public interface FileCache extends DiskTrimmable, Closeable {
void clearAll();
long clearOldEntries(long j);
List<String> getCatalogs(CacheKey cacheKey);
long getCount();
DiskStorage.DiskDumpInfo getDumpInfo() throws IOException;
Collection<DiskStorage.Entry> getEntries() throws IOException;
BinaryResource getResource(CacheKey cacheKey);
long getSize();
boolean hasKey(CacheKey cacheKey);
boolean hasKeySync(CacheKey cacheKey);
BinaryResource insert(CacheKey cacheKey, WriterCallback writerCallback) throws IOException;
boolean isEnabled();
boolean probe(CacheKey cacheKey);
boolean remove(CacheKey cacheKey);
}
| [
"zhangquan@snqu.com"
] | zhangquan@snqu.com |
63e65d2ef180b249b222a33babecad9e6bd92fdb | 92583f2a9e376a8b7bd0a5dccc3aa455f24280be | /src/main/java/com/lakeqiu/base/juc/collections/concurrents/MyQueue.java | e3868588269dd08035f6bc75a9666b5e944fef09 | [] | no_license | lakeqiu/try-concurrency | f4b3a5bf92d80845312b5d68af7607b0ac154a73 | 65c31b0a44bd9690c0ae15dcb3f669f5289dc023 | refs/heads/master | 2020-08-02T17:08:03.772587 | 2019-10-26T12:25:36 | 2019-10-26T12:25:36 | 211,439,969 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,997 | java | package com.lakeqiu.base.juc.collections.concurrents;
import java.util.stream.IntStream;
/**
* 自定义队列,线程不安全版
* @author lakeqiu
*/
public class MyQueue<E> {
private Node<E> first, last;
private int size;
public int size(){
return size;
}
public boolean isEmpty(){
return size() == 0;
}
/**
* 获取头部元素,不会删除
* @return E
*/
public E peekFirst(){
return (null == this.first) ? null : this.first.getElement();
}
/**
* 获取尾部元素,不会删除
* @return E
*/
public E peekLast(){
return (null == this.last) ? null : this.last.getElement();
}
public void addLast(E element){
Node<E> newNode = new Node<>(element);
// 如果头部元素为空
if (null == this.first){
newNode.setNext(null);
this.first = newNode;
this.last = newNode;
}
// 因为if中设置了只有一个元素的话,头部和尾部元素都是同一个,
// 所以在头部元素不为空的情况下,尾部元素不会为空
this.last.setNext(newNode);
this.last = newNode;
this.size++;
}
public E removeFirst(){
// 如果为空,返回null
if (isEmpty()){
return null;
}
E val = this.first.getElement();
this.first = this.first.getNext();
this.size--;
// 如果size为0,说明没有元素了,需要把last节点置为空
// 至于为什么,看addLast方法。
if (this.size == 0){
this.last = null;
}
return val;
}
@Override
public String toString() {
if (isEmpty()){
return "[]";
}
StringBuffer buffer = new StringBuffer("[");
Node node = this.first;
while (null != node){
buffer.append(node.toString() + ", ");
node = node.next;
}
buffer.replace(buffer.length() - 2, buffer.length(), "]");
return new String(buffer);
}
private static class Node<E> {
private final E element;
private Node next;
public Node(E element) {
this.element = element;
this.next = null;
}
public E getElement() {
return element;
}
public Node getNext() {
return next;
}
public void setNext(Node next) {
this.next = next;
}
@Override
public String toString() {
return (element == null) ? "" : element.toString();
}
}
public static void main(String[] args) {
MyQueue<Integer> queue = new MyQueue<>();
IntStream.range(0,8).forEach(queue::addLast);
System.out.println(queue.toString());
IntStream.range(0, 9).forEach(i -> queue.removeFirst());
System.out.println(queue.toString());
}
}
| [
"884506946@qq.com"
] | 884506946@qq.com |
00e2175f3226f3127ef25d1cbb2f7b7cee23a29e | 27d3bd05fb10253080eb1b35a7aefbc30f72ca96 | /codes/javaweb/javaweb-rpc/javaweb-rpc-zookeeper/src/main/java/io/github/dunwu/javaweb/zookeeper/ZKDelete.java | 20272ef33c335454d1b50aea1ea66b24ef71abc6 | [
"MIT"
] | permissive | zwkzwk/javaweb | 8babf625f6670e752033ece19f4c7d578fc48961 | 8726abf92efd47ee194f16aefb3df4eba3775a7c | refs/heads/master | 2020-06-04T21:11:18.120349 | 2019-10-31T11:19:30 | 2019-10-31T11:19:30 | 192,193,589 | 0 | 0 | MIT | 2019-10-31T11:19:31 | 2019-06-16T13:22:52 | Java | UTF-8 | Java | false | false | 931 | java | package io.github.dunwu.javaweb.zookeeper;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooKeeper;
public class ZKDelete {
private static final String HOST = "localhost";
private static ZooKeeper zk;
private static ZKConnection conn;
public static void main(String[] args) throws InterruptedException, KeeperException {
String path = "/MyFirstZnode"; // Assign path to the znode
try {
conn = new ZKConnection();
zk = conn.connect(HOST);
delete(path); // delete the node with the specified path
} catch (Exception e) {
System.out.println(e.getMessage()); // catches error messages
} finally {
if (conn != null) {
conn.close();
}
}
}
// Method to check existence of znode and its status, if znode is available.
public static void delete(String path) throws KeeperException, InterruptedException {
zk.delete(path, zk.exists(path, true).getVersion());
}
}
| [
"forbreak@163.com"
] | forbreak@163.com |
f4c9393438f477ae0d49846caa405ffd7a26acf5 | 031a5cc6fd288572a6595d925a5f817ae3ee77f4 | /services/hrdb/src/com/auto_napsovlhzo/hrdb/controller/ProcedureExecutionController.java | 8ef1d72253f0cfb9064589db6d2364220e4bb813 | [] | no_license | wavemakerapps/Auto_NApsOvLhzO | 4a0ef2b46b1e02e6eedb0d736f262e9eacf5c83f | acdf6a2c011548c1a8ffb73d7be816c5d4737c2d | refs/heads/master | 2021-09-01T16:18:29.794440 | 2017-12-27T22:37:44 | 2017-12-27T22:37:44 | 115,562,380 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,444 | java | /*Copyright (c) 2015-2016 wavemaker.com All Rights Reserved.
This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance
with the terms of the source code license agreement you entered into with wavemaker.com*/
package com.auto_napsovlhzo.hrdb.controller;
/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wavemaker.runtime.data.dao.procedure.WMProcedureExecutor;
import com.wordnik.swagger.annotations.Api;
import com.auto_napsovlhzo.hrdb.service.HrdbProcedureExecutorService;
@RestController(value = "Hrdb.ProcedureExecutionController")
@RequestMapping("/hrdb/procedureExecutor")
@Api(value = "ProcedureExecutionController", description = "controller class for procedure execution")
public class ProcedureExecutionController {
private static final Logger LOGGER = LoggerFactory.getLogger(ProcedureExecutionController.class);
@Autowired
private HrdbProcedureExecutorService procedureService;
}
| [
"automate1@wavemaker.com"
] | automate1@wavemaker.com |
dff0d344913427e8ac5c23e53eb7d4f2c4e9a42c | 9c00688a804f059fa128cc929ec5523351731b3e | /framework/webapp/src/com/hanlin/fadp/webapp/event/GroovyEventHandler.java | 50b4b31bd7323f90ec3ead47a0edf782b1580e1b | [] | no_license | yangrui110/asunerp | f37b4c9f425cd67c9dd6fc35cac124ae9f89e241 | 3f702ce694b7b7bd6df77a60cd6578a8e1744bb5 | refs/heads/master | 2020-05-07T12:45:16.575197 | 2019-04-10T07:46:41 | 2019-04-10T07:46:41 | 180,295,937 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,856 | 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.hanlin.fadp.webapp.event;
import groovy.lang.Script;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import javax.script.ScriptContext;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.codehaus.groovy.runtime.InvokerHelper;
import com.hanlin.fadp.base.util.Debug;
import com.hanlin.fadp.base.util.GroovyUtil;
import com.hanlin.fadp.base.util.ScriptHelper;
import com.hanlin.fadp.base.util.ScriptUtil;
import com.hanlin.fadp.base.util.UtilHttp;
import com.hanlin.fadp.base.util.UtilMisc;
import com.hanlin.fadp.base.util.UtilValidate;
import com.hanlin.fadp.webapp.control.ConfigXMLReader.Event;
import com.hanlin.fadp.webapp.control.ConfigXMLReader.RequestMap;
public class GroovyEventHandler implements EventHandler {
public static final String module = GroovyEventHandler.class.getName();
protected static final Object[] EMPTY_ARGS = {};
private static final Set<String> protectedKeys = createProtectedKeys();
private static Set<String> createProtectedKeys() {
Set<String> newSet = new HashSet<String>();
newSet.add("request");
newSet.add("response");
newSet.add("session");
newSet.add("dispatcher");
newSet.add("delegator");
newSet.add("security");
newSet.add("locale");
newSet.add("timeZone");
newSet.add("userLogin");
/* Commenting out for now because some scripts write to the parameters Map - which should not be allowed.
newSet.add(ScriptUtil.PARAMETERS_KEY);
*/
return Collections.unmodifiableSet(newSet);
}
public void init(ServletContext context) throws EventHandlerException {
}
public String invoke(Event event, RequestMap requestMap, HttpServletRequest request, HttpServletResponse response) throws EventHandlerException {
try {
Map<String, Object> context = new HashMap<String, Object>();
context.put("request", request);
context.put("response", response);
HttpSession session = request.getSession();
context.put("session", session);
context.put("dispatcher", request.getAttribute("dispatcher"));
context.put("delegator", request.getAttribute("delegator"));
context.put("security", request.getAttribute("security"));
context.put("locale", UtilHttp.getLocale(request));
context.put("timeZone", UtilHttp.getTimeZone(request));
context.put("userLogin", session.getAttribute("userLogin"));
context.put(ScriptUtil.PARAMETERS_KEY, UtilHttp.getCombinedMap(request, UtilMisc.toSet("delegator", "dispatcher", "security", "locale", "timeZone", "userLogin")));
Object result = null;
try {
ScriptContext scriptContext = ScriptUtil.createScriptContext(context, protectedKeys);
ScriptHelper scriptHelper = (ScriptHelper)scriptContext.getAttribute(ScriptUtil.SCRIPT_HELPER_KEY);
if (scriptHelper != null) {
context.put(ScriptUtil.SCRIPT_HELPER_KEY, scriptHelper);
}
Script script = InvokerHelper.createScript(GroovyUtil.getScriptClassFromLocation(event.path), GroovyUtil.getBinding(context));
if (UtilValidate.isEmpty(event.invoke)) {
result = script.run();
} else {
result = script.invokeMethod(event.invoke, EMPTY_ARGS);
}
if (result == null) {
result = scriptContext.getAttribute(ScriptUtil.RESULT_KEY);
}
} catch (Exception e) {
Debug.logWarning(e, "Error running event " + event.path + ": ", module);
request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
return "error";
}
// check the result
if (result instanceof Map) {
Map resultMap = (Map)result;
String successMessage = (String)resultMap.get("_event_message_");
if (successMessage != null) {
request.setAttribute("_EVENT_MESSAGE_", successMessage);
}
String errorMessage = (String)resultMap.get("_error_message_");
if (errorMessage != null) {
request.setAttribute("_ERROR_MESSAGE_", errorMessage);
}
return (String)resultMap.get("_response_code_");
}
if (result != null && !(result instanceof String)) {
throw new EventHandlerException("Event did not return a String result, it returned a " + result.getClass().getName());
}
return (String) result;
} catch (Exception e) {
throw new EventHandlerException("Groovy Event Error", e);
}
}
}
| [
"“Youremail@xxx.com”"
] | “Youremail@xxx.com” |
a894505c528c0925092e74f25185a084c664a317 | ff90aedaff2b3adab50e68b2f3eef3a74f3f2b0d | /src/com/google/android/gms/internal/ads/zzakp.java | 5e6b656609b4da9a61e7b8e7c8e5c7fcf90a9456 | [] | no_license | rrabit42/Malware_Project_EWHA | cf81ab0d6cdc64cf0fb722e9427f7307da3689ab | 3865c1c393a9873915ec07389afb799573d5d135 | refs/heads/master | 2020-11-24T06:42:17.435890 | 2019-12-16T20:48:04 | 2019-12-16T20:48:04 | 228,010,763 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 567 | java | package com.google.android.gms.internal.ads;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
final class zzakp extends BroadcastReceiver {
private zzakp(zzakk paramzzakk) {}
public final void onReceive(Context paramContext, Intent paramIntent) {
if ("android.intent.action.USER_PRESENT".equals(paramIntent.getAction())) {
zzakk.zza(this.zzcru, true);
return;
}
if ("android.intent.action.SCREEN_OFF".equals(paramIntent.getAction()))
zzakk.zza(this.zzcru, false);
}
}
| [
"gegiraffe@gmail.com"
] | gegiraffe@gmail.com |
aff408c457f3a2ed8af641cc3eb4860944352274 | cd2ef82fb7f18d31f316da82bc94a76a497c4ab0 | /api-backend/3scale-library/src/main/java/com/hisense/gateway/library/model/pojo/base/SapConvertInfo.java | 1d3eb6a4ad8bd4da51c3784c9b1b9f1fef788902 | [] | no_license | xiongliang1/3scale-api-2.0.0 | 3b6a45f196f44235fd9da336e09ecbf4b7f854b4 | 2843b45d8639d10b75b0477e3e63786136bf23d3 | refs/heads/master | 2023-03-23T06:51:31.839019 | 2021-03-24T03:40:24 | 2021-03-24T03:40:24 | 350,931,316 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,161 | java | package com.hisense.gateway.library.model.pojo.base;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import static com.hisense.gateway.library.constant.BaseConstants.DATE_TIME_FORMAT;
/**
* @author huangchen 2020/12/04
*/
@Entity
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "sap_convert_info")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class SapConvertInfo{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Integer id;
/**
* 环境
*/
@Column(name = "environment")
public String environment;
/**
* 系统id
*/
@Column(name = "project_id")
public String projectId;
/**
* 测试sap基本信息id
*/
@Column(name = "dev_base_id")
public Integer devBaseId;
/**
* 生成api的id 测试
*/
@Column(name = "dev_api_id")
public Integer devApiId;
/**
* 测试环境版本 第一次发布是1.0 以后是 2.0 3.0
*/
@Column(name = "dev_version")
public String devVersion;
/**
* 测试环境版本创建时间
*/
@Column(name = "dev_create_date")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DATE_TIME_FORMAT,timezone = "GMT+8")
public Date devCreateDate;
/**
* 生产sap基本信息id
*/
@Column(name = "prd_base_id")
public Integer prdBaseId;
/**
* 生成api的id 生产
*/
@Column(name = "prd_api_id")
public Integer prdApiId;
/**
* 测试环境版本创建时间
*/
@Column(name = "prd_version")
public String prdVersion;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DATE_TIME_FORMAT,timezone = "GMT+8")
/**
* 生产环境发布时间
*/
@Column(name = "prd_create_date")
public Date prdCreateDate;
}
| [
"chaoyang.beijing"
] | chaoyang.beijing |
a9fdd34989f69f670abe35e30a3137288ccadc8d | a1db640b5e04cf4ed955da50203e49431b32afb6 | /ControleDispensacao/src/br/com/remendo/PadraoFluxo.java | 9a815edc82be5b75adb59a398a43da682d2f834b | [] | no_license | marlonassis/Imhotep | 845aef6150198b4b1c37f1ac15bea53e966a3ddd | b5e9c1a02cd209e9e14f18b12011475f9fdcf8be | refs/heads/master | 2021-01-13T02:14:53.467004 | 2015-01-13T16:17:09 | 2015-01-13T16:17:09 | 3,450,022 | 0 | 0 | null | null | null | null | MacCentralEurope | Java | false | false | 4,971 | java | package br.com.remendo;
import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity;
import javax.faces.context.FacesContext;
import br.com.remendo.interfaces.IPadraoHome;
public abstract class PadraoFluxo extends PadraoGeral implements IPadraoHome {
private Object instancia;
private boolean exibeMensagemAtualizacao = true;
private boolean exibeMensagemDelecao = true;
private boolean exibeMensagemInsercao = true;
private String mensagemErro="Ocorrreu um erro ao cadastrar";
private String mensagemSucesso="Cadastro realizado com sucesso";
public boolean enviar() {
boolean ret = false;
try{
iniciarTransacao();
session.save(instancia);
session.flush();
tx.commit();
ret = true;
if(isExibeMensagemInsercao()){
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, getMensagemSucesso(), null));
}
aposEnviar();
}
catch (Exception e) {
session.getTransaction().rollback();
e.printStackTrace();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, getMensagemErro(), e.getCause().getMessage()));
}finally{
finallyTransacao();
}
return ret;
}
public void aposEnviar() {
}
public boolean apagar() {
boolean ret = false;
try{
iniciarTransacao();
session.delete(instancia); // Realiza persistźncia
tx.commit(); // Finaliza transaćčo
setInstancia(null);
ret = true;
if(isExibeMensagemDelecao()){
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,"Delećčo realizada com sucesso", "Registro apagado!"));
}
}catch (Exception e) {
e.printStackTrace();
if(isExibeMensagemDelecao()){
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Ocorrreu um erro ao apagar", e.getCause().getMessage()));
}
if(session != null){
session.getTransaction().rollback();
}
}finally{
finallyTransacao();
}
return ret;
}
public boolean atualizar() {
return atualizarGenerico(instancia) != null;
}
public Object atualizarGenerico(Object obj) {
Object o = null;
try{
iniciarTransacao();
session.merge(obj); // Realiza persistźncia
tx.commit(); // Finaliza transaćčo
o = obj;
if(isExibeMensagemAtualizacao()){
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,"Atualizaćčo realizada com sucesso", "Registro atualizado!"));
}
}catch (org.hibernate.exception.ConstraintViolationException e) {
session.getTransaction().rollback();
if(isExibeMensagemAtualizacao()){
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Registro já cadastrado.","Operaćčo nčo permitida!"));
}
}catch (Exception e) {
session.getTransaction().rollback();
e.printStackTrace();
if(isExibeMensagemAtualizacao()){
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Ocorrreu um erro ao atualizar", e.getCause().getMessage()));
}
}finally{
finallyTransacao();
}
return o;
}
public Integer executa(String sql) {
Integer res = null;
try{
iniciarTransacao();
res = session.createQuery(sql).executeUpdate();
}catch (Exception e) {
if(session != null){
session.getTransaction().rollback();
}
e.printStackTrace();
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Ocorrreu um erro ao executar o comando", e.getCause().getMessage()));
}finally{
finallyTransacao();
}
return res;
}
protected void mensagem(String msg, String msg2, Severity tipoMensagem){
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(tipoMensagem,msg, msg2));
}
public void setInstancia(Object instancia) {
this.instancia = instancia;
}
public Object getInstancia() {
return instancia;
}
public boolean isExibeMensagemAtualizacao() {
return exibeMensagemAtualizacao;
}
public void setExibeMensagemAtualizacao(boolean exibeMensagemAtualizacao) {
this.exibeMensagemAtualizacao = exibeMensagemAtualizacao;
}
public boolean isExibeMensagemDelecao() {
return exibeMensagemDelecao;
}
public void setExibeMensagemDelecao(boolean exibeMensagemDelecao) {
this.exibeMensagemDelecao = exibeMensagemDelecao;
}
public boolean isExibeMensagemInsercao() {
return exibeMensagemInsercao;
}
public void setExibeMensagemInsercao(boolean exibeMensagemInsercao) {
this.exibeMensagemInsercao = exibeMensagemInsercao;
}
public String getMensagemErro() {
return mensagemErro;
}
public void setMensagemErro(String mensagemErro) {
this.mensagemErro = mensagemErro;
}
public String getMensagemSucesso() {
return mensagemSucesso;
}
public void setMensagemSucesso(String mensagemSucesso) {
this.mensagemSucesso = mensagemSucesso;
}
}
| [
"marlonassis@gmail.com"
] | marlonassis@gmail.com |
4c95551e6017e16e5a29e7bf7ddff87c982e2b56 | 6129672c95174bf4e75f008e1dcd5662cf93dfc8 | /src/main/java/com/contact/Rest/ex/UserErrorResponse.java | 577d13d356d81163603bd07950e0585d03aa1bd0 | [] | no_license | RazS88/noteBookServerSide | 7470133db6b0db7fec7e3c7de458d31bd8baf59d | 2f2bc6a9ddbb9f0728ec039a2becef83abd355d4 | refs/heads/master | 2020-09-05T23:36:29.012489 | 2020-02-22T14:29:13 | 2020-02-22T14:29:13 | 220,245,966 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 902 | java | package com.contact.Rest.ex;
import org.springframework.http.HttpStatus;
public class UserErrorResponse {
private HttpStatus status;
private String message;
private long timestamp;
public UserErrorResponse(HttpStatus status, String message, long timestamp) {
this.status = status;
this.message = message;
this.timestamp = timestamp;
}
public static UserErrorResponse now(HttpStatus status , String message) {
return new UserErrorResponse(status, message, System.currentTimeMillis());
}
public HttpStatus getStatus() {
return status;
}
public void setStatus(HttpStatus status) {
this.status = status;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
}
| [
"you@example.com"
] | you@example.com |
51f20696c6a5c61f8c179ab52282ef2ce9f87948 | 5f7ee726c47a136eece1ae88df4f1016cc5a856b | /spring-context/src/main/java/org/springframework/context/support/ClassPathXmlApplicationContext.java | 641c01a338465b9bb96e2b8a643581ac075eaf6d | [] | no_license | yangxin1994/read-spring-source | 015abce836cca573a2ee42a02a409cfeb07ffd4d | 16abbdc5f2d27e7af39d3d5a813795131240941f | refs/heads/master | 2023-02-16T09:54:51.067550 | 2021-01-07T07:28:12 | 2021-01-07T07:28:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,108 | java | /*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.context.support;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.util.Assert;
/**
* Standalone XML application context, taking the context definition files
* from the class path, interpreting plain paths as class path resource names
* that include the package path (e.g. "mypackage/myresource.txt"). Useful for
* test harnesses as well as for application contexts embedded within JARs.
*
* <p>The config location defaults can be overridden via {@link #getConfigLocations},
* Config locations can either denote concrete files like "/myfiles/context.xml"
* or Ant-style patterns like "/myfiles/*-context.xml" (see the
* {@link org.springframework.util.AntPathMatcher} javadoc for pattern details).
*
* <p>Note: In case of multiple config locations, later bean definitions will
* override ones defined in earlier loaded files. This can be leveraged to
* deliberately override certain bean definitions via an extra XML file.
*
* <p><b>This is a simple, one-stop shop convenience ApplicationContext.
* Consider using the {@link GenericApplicationContext} class in combination
* with an {@link org.springframework.beans.factory.xml.XmlBeanDefinitionReader}
* for more flexible context setup.</b>
*
* @author Rod Johnson
* @author Juergen Hoeller
* @see #getResource
* @see #getResourceByPath
* @see GenericApplicationContext
*/
public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContext {
private Resource[] configResources;
/**
* Create a new ClassPathXmlApplicationContext for bean-style configuration.
* @see #setConfigLocation
* @see #setConfigLocations
* @see #afterPropertiesSet()
*/
public ClassPathXmlApplicationContext() {
}
/**
* Create a new ClassPathXmlApplicationContext for bean-style configuration.
* @param parent the parent context
* @see #setConfigLocation
* @see #setConfigLocations
* @see #afterPropertiesSet()
*/
public ClassPathXmlApplicationContext(ApplicationContext parent) {
super(parent);
}
/**
* Create a new ClassPathXmlApplicationContext, loading the definitions
* from the given XML file and automatically refreshing the context.
* @param configLocation resource location
* @throws BeansException if context creation failed
*/
public ClassPathXmlApplicationContext(String configLocation) throws BeansException {
this(new String[] {configLocation}, true, null);
}
/**
* Create a new ClassPathXmlApplicationContext, loading the definitions
* from the given XML files and automatically refreshing the context.
* @param configLocations array of resource locations
* @throws BeansException if context creation failed
*/
public ClassPathXmlApplicationContext(String... configLocations) throws BeansException {
this(configLocations, true, null);
}
/**
* Create a new ClassPathXmlApplicationContext with the given parent,
* loading the definitions from the given XML files and automatically
* refreshing the context.
* @param configLocations array of resource locations
* @param parent the parent context
* @throws BeansException if context creation failed
*/
public ClassPathXmlApplicationContext(String[] configLocations, ApplicationContext parent) throws BeansException {
this(configLocations, true, parent);
}
/**
* Create a new ClassPathXmlApplicationContext, loading the definitions
* from the given XML files.
* @param configLocations array of resource locations
* @param refresh whether to automatically refresh the context,
* loading all bean definitions and creating all singletons.
* Alternatively, call refresh manually after further configuring the context.
* @throws BeansException if context creation failed
* @see #refresh()
*/
public ClassPathXmlApplicationContext(String[] configLocations, boolean refresh) throws BeansException {
this(configLocations, refresh, null);
}
/**
* Create a new ClassPathXmlApplicationContext with the given parent,
* loading the definitions from the given XML files.
* @param configLocations array of resource locations
* @param refresh whether to automatically refresh the context,
* loading all bean definitions and creating all singletons.
* Alternatively, call refresh manually after further configuring the context.
* @param parent the parent context
* @throws BeansException if context creation failed
* @see #refresh()
*/
public ClassPathXmlApplicationContext(String[] configLocations, boolean refresh, ApplicationContext parent)
throws BeansException {
super(parent);
setConfigLocations(configLocations);
if (refresh) {
refresh();
}
}
/**
* Create a new ClassPathXmlApplicationContext, loading the definitions
* from the given XML file and automatically refreshing the context.
* <p>This is a convenience method to load class path resources relative to a
* given Class. For full flexibility, consider using a GenericApplicationContext
* with an XmlBeanDefinitionReader and a ClassPathResource argument.
* @param path relative (or absolute) path within the class path
* @param clazz the class to load resources with (basis for the given paths)
* @throws BeansException if context creation failed
* @see ClassPathResource#ClassPathResource(String, Class)
* @see GenericApplicationContext
* @see org.springframework.beans.factory.xml.XmlBeanDefinitionReader
*/
public ClassPathXmlApplicationContext(String path, Class<?> clazz) throws BeansException {
this(new String[] {path}, clazz);
}
/**
* Create a new ClassPathXmlApplicationContext, loading the definitions
* from the given XML files and automatically refreshing the context.
* @param paths array of relative (or absolute) paths within the class path
* @param clazz the class to load resources with (basis for the given paths)
* @throws BeansException if context creation failed
* @see ClassPathResource#ClassPathResource(String, Class)
* @see GenericApplicationContext
* @see org.springframework.beans.factory.xml.XmlBeanDefinitionReader
*/
public ClassPathXmlApplicationContext(String[] paths, Class<?> clazz) throws BeansException {
this(paths, clazz, null);
}
/**
* Create a new ClassPathXmlApplicationContext with the given parent,
* loading the definitions from the given XML files and automatically
* refreshing the context.
* @param paths array of relative (or absolute) paths within the class path
* @param clazz the class to load resources with (basis for the given paths)
* @param parent the parent context
* @throws BeansException if context creation failed
* @see ClassPathResource#ClassPathResource(String, Class)
* @see GenericApplicationContext
* @see org.springframework.beans.factory.xml.XmlBeanDefinitionReader
*/
public ClassPathXmlApplicationContext(String[] paths, Class<?> clazz, ApplicationContext parent)
throws BeansException {
super(parent);
Assert.notNull(paths, "Path array must not be null");
Assert.notNull(clazz, "Class argument must not be null");
this.configResources = new Resource[paths.length];
for (int i = 0; i < paths.length; i++) {
this.configResources[i] = new ClassPathResource(paths[i], clazz);
}
refresh();
}
@Override
protected Resource[] getConfigResources() {
return this.configResources;
}
}
| [
"“dinghaifeng@enmonster.com”"
] | “dinghaifeng@enmonster.com” |
15e03e5a4c733a5673bfb07881276b01f818340e | 044fa73ee3106fe81f6414fa33dd2f8d44c8457e | /rta-api/rta-core/src/main/java/org/rta/core/dao/payment/invoice/DealerInvoiceDAO.java | 8aa5de26a8492ef4b37ce05138aaf80c1042cce4 | [] | no_license | VinayAddank/webservices | 6ec87de5b90d28c6511294de644b7579219473ca | 882ba250a7bbe9c7112aa6e2dc1a34640731bfb8 | refs/heads/master | 2021-01-25T11:34:25.534538 | 2018-03-01T09:18:26 | 2018-03-01T09:18:26 | 123,411,464 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 295 | java | package org.rta.core.dao.payment.invoice;
import org.rta.core.dao.base.GenericDAO;
import org.rta.core.entity.payment.invoice.DealerInvoiceEntity;
public interface DealerInvoiceDAO extends GenericDAO<DealerInvoiceEntity> {
public DealerInvoiceEntity getByVehicleRcId(long vehicleRcId);
}
| [
"vinay.addanki540@gmail.com"
] | vinay.addanki540@gmail.com |
4220d35444c83589afafb1af70d6790ebea09e67 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a081/A081907Test.java | 4970b6e8c1f7d0b93716bf3b535952266a3a1699 | [] | 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.a081;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A081907Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
681332fd59120f48a904d21845aa40b8c3edea18 | 1309a8d1fa3655d8e9d3c4923b0af3d74b88aaf1 | /liz-design-pattern/src/main/java/com/liz/designPattern/construct7/Proxy/游戏代练/GamePlayerProxy.java | 352579ec2dc513acf3d17b87f98999c98b4f2c6e | [] | no_license | lizhou828/liz-incubator | a00b119aa13115d4f73d55022f9e26ae82fddbd8 | 2f01a77248b8bbc94588d948fcb7b3eb5985461d | refs/heads/master | 2022-12-08T07:49:46.291259 | 2020-07-23T08:43:10 | 2020-07-23T08:43:10 | 66,536,421 | 0 | 0 | null | 2022-11-16T05:55:36 | 2016-08-25T07:41:34 | JavaScript | UTF-8 | Java | false | false | 806 | java | package com.liz.designPattern.construct7.Proxy.游戏代练;
/**
* 游戏代练者
* Created by Administrator on 2017/3/22 0022.
*/
public class GamePlayerProxy implements IGamePlayer ,IPoxy{
private IGamePlayer iGamePlayer;
/**
* 通过构造函数传递 要对谁进行代练
* @param iGamePlayer
*/
public GamePlayerProxy(IGamePlayer iGamePlayer) {
this.iGamePlayer = iGamePlayer;
}
public void login(String username, String password) {
this.iGamePlayer.login(username,password);
}
public void killBoss() {
this.iGamePlayer.killBoss();
}
public void upgrade() {
this.iGamePlayer.upgrade();
this.count();
}
public void count() {
System.out.println("升级总费用是:150元");
}
}
| [
"lizhou828@126.com"
] | lizhou828@126.com |
cbebaf5437041eabe0a04c5084039a1495f84b41 | 96b053bfd08175ed882f3f47d100f395c1e1eae0 | /src/main/java/app/utilities/AuditVerticle.java | 4857f7661eb48a4a39534f5fc07e786cf26413c8 | [] | no_license | cescoffier/reactive-landscape-javaday-istanbul-2019 | bf5230d20c8289ca7ac1eec2781e687e32e7f2c3 | 45fa008a6e51971253627cef63df69ee9883e62e | refs/heads/master | 2020-04-29T07:40:07.270996 | 2019-03-19T09:58:39 | 2019-03-19T09:58:39 | 175,961,202 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 482 | java | package app.utilities;
import io.vertx.reactivex.core.AbstractVerticle;
public class AuditVerticle extends AbstractVerticle {
private int actionID = 1000;
@Override
public void start() {
vertx.eventBus().consumer("audit").toObservable()
.subscribe(msg -> {
actionID++;
System.out.println("[AUDIT] " + msg.body()
+ "(" + actionID + ")");
msg.reply(actionID);
});
}
}
| [
"clement.escoffier@gmail.com"
] | clement.escoffier@gmail.com |
73a71411e22f80253606919abca3d8d089a59693 | 07faeaab515163f3493f86805e50f0b0d1aa258a | /src_hr/com/seeyon/v3x/hr/domain/PageProperty.java | e90bf85f57bf6171d63cffcd93d6f5d8033d1ffc | [] | no_license | zhengxyzw/seeyon_v3x | 033563e558794eb3d3c6d14b65fc3bd985f24e03 | f2f91c1db65c93681ef504d410d517e77048deec | refs/heads/master | 2020-06-12T20:33:08.873703 | 2017-07-11T01:21:52 | 2017-07-11T01:21:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,837 | java | package com.seeyon.v3x.hr.domain;
import com.seeyon.v3x.common.domain.BaseModel;
/**
* HR管理信息项
*/
public class PageProperty extends BaseModel implements java.io.Serializable {
private static final long serialVersionUID = -5233589750592581689L;
private String name;
private Long type;
private int length;
private int ordering;
private String defaultValue;
private int not_null;
private int remove;
private Long category_id;
private Long accountId;
private boolean sysFlag;
public String getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
public int getRemove() {
return remove;
}
public void setRemove(int remove) {
this.remove = remove;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getNot_null() {
return not_null;
}
public void setNot_null(int not_null) {
this.not_null = not_null;
}
public Long getCategory_id() {
return category_id;
}
public void setCategory_id(Long category_id) {
this.category_id = category_id;
}
public int getOrdering() {
return ordering;
}
public void setOrdering(int ordering) {
this.ordering = ordering;
}
public Long getType() {
return type;
}
public void setType(Long type) {
this.type = type;
}
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
this.accountId = accountId;
}
public boolean isSysFlag() {
return sysFlag;
}
public void setSysFlag(boolean sysFlag) {
this.sysFlag = sysFlag;
}
} | [
"839428881@qq.com"
] | 839428881@qq.com |
fe5de164ccaca7f60c7a11db90b93d12dfc0ae47 | 55889712a9adf03489f4b6402a48c1a854d70321 | /ignite_pos_mm_v1/src/com/ignite/pos/UpdateItemListActivity.java | 6faf378a8efc4660c6ec47af284bede7ec91022f | [] | no_license | ignitemyanmar/POSAndroid | 7b346b5a62a00d0db576cc739776ea80dd876a8f | 9614177e73fe019d42afc283ed23877fccf8ab75 | refs/heads/master | 2021-05-01T09:30:56.967489 | 2015-06-08T04:30:23 | 2015-06-08T04:30:23 | 27,748,660 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,529 | java |
package com.ignite.pos;
import java.util.ArrayList;
import java.util.List;
import android.app.AlertDialog;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.AdapterView.OnItemSelectedListener;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockActivity;
import com.ignite.pos.adapter.CategorySpinnerAdapter;
import com.ignite.pos.adapter.ItemListUpdateAdapter;
import com.ignite.pos.adapter.LedgerReportListViewAdapter;
import com.ignite.pos.adapter.SalepersonSpinnerAdapter;
import com.ignite.pos.database.controller.CategoryController;
import com.ignite.pos.database.controller.ItemListController;
import com.ignite.pos.database.controller.LedgerController;
import com.ignite.pos.database.controller.PurchaseVoucherController;
import com.ignite.pos.database.controller.spSalePersonController;
import com.ignite.pos.database.util.DatabaseManager;
import com.ignite.pos.model.Category;
import com.ignite.pos.model.ItemList;
import com.ignite.pos.model.Ledger;
import com.ignite.pos.model.spSalePerson;
public class UpdateItemListActivity extends SherlockActivity{
private ListView lv_item_list;
private DatabaseManager dbManager;
private List<Object> item_list_obj;
private List<Object> pvList;
private View title_view;
private ActionBar actionBar;
private TextView title;
private RelativeLayout add_layout;
private List<Object> category_list_obj;
private Spinner spnCategory;
private EditText edt_item_name;
private Button btn_search;
private String selectedItemName = "";
private String selectedCategoryID;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_update_item_list);
actionBar = getSupportActionBar();
actionBar.setCustomView(R.layout.action_bar_update);
title = (TextView)actionBar.getCustomView().findViewById(R.id.txt_title);
//title.setText("Update Item");
title.setText("ပစၥည္းအမည္ ျပင္ျခင္း");
add_layout = (RelativeLayout)actionBar.getCustomView().findViewById(R.id.layout_add_new);
add_layout.setVisibility(View.GONE);
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
selectData();
getCategory();
}
CategoryController category_control;
private void selectData()
{
//Get Item List from Item Table
dbManager = new ItemListController(this);
ItemListController item_control = (ItemListController) dbManager ;
item_list_obj = new ArrayList<Object>();
item_list_obj = item_control.select();
title_view = LayoutInflater.from(this).inflate(R.layout.update_item_list_title,null,false);
spnCategory = (Spinner)title_view.findViewById(R.id.spCategory);
edt_item_name = (EditText) title_view.findViewById(R.id.etxt_item_name);
btn_search = (Button)title_view.findViewById(R.id.btnSearch);
btn_search.setOnClickListener(clicklistener);
spnCategory.setOnItemSelectedListener(categoryClickListener);
lv_item_list = (ListView) findViewById(R.id.lv_item_list);
if(lv_item_list.getHeaderViewsCount() == 0)
{
lv_item_list.addHeaderView(title_view);
}
//Get Category List from Category Table
dbManager = new CategoryController(this);
category_control = (CategoryController) dbManager ;
category_list_obj = new ArrayList<Object>();
for (int i = 0; i < item_list_obj.size(); i++) {
ItemList itemL = (ItemList)item_list_obj.get(i);
category_list_obj = category_control.select(itemL.getCategoryId());
if(category_list_obj.size() > 0){
Category cate = (Category) category_list_obj.get(0);
((ItemList)item_list_obj.get(i)).setCategoryName(cate.getCategoryName());
}else{
((ItemList)item_list_obj.get(i)).setCategoryName("-");
}
}
lv_item_list.setAdapter(new ItemListUpdateAdapter(this, item_list_obj));
if (item_list_obj.size() == 0) {
AlertDialog.Builder alert = new AlertDialog.Builder(UpdateItemListActivity.this);
alert.setTitle("Info");
alert.setMessage("No Item Yet!");
alert.show();
alert.setCancelable(true);
}
}
private OnItemSelectedListener categoryClickListener = new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View v, int position,
long id) {
// TODO Auto-generated method stub
Category cat = (Category) category_list.get(position);
selectedCategoryID = String.valueOf(cat.getCategoryID());
}
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
};
private OnClickListener clicklistener = new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
if (v == spnCategory) {
}
if (v == btn_search) {
//if (checkFields()) {
selectedItemName = edt_item_name.getText().toString();
//Get Data from Item Table
dbManager = new ItemListController(UpdateItemListActivity.this);
ItemListController itemControl = (ItemListController)dbManager;
item_list_obj = new ArrayList<Object>();
item_list_obj = itemControl.selectByCatItemName(selectedCategoryID, selectedItemName);
//Get Category List from Category Table
dbManager = new CategoryController(UpdateItemListActivity.this);
category_control = (CategoryController) dbManager ;
category_list_obj = new ArrayList<Object>();
if (item_list_obj != null && item_list_obj.size() > 0) {
for (int i = 0; i < item_list_obj.size(); i++) {
ItemList itemL = (ItemList)item_list_obj.get(i);
category_list_obj = category_control.select(itemL.getCategoryId());
if(category_list_obj.size() > 0){
Category cate = (Category) category_list_obj.get(0);
((ItemList)item_list_obj.get(i)).setCategoryName(cate.getCategoryName());
}else{
((ItemList)item_list_obj.get(i)).setCategoryName("-");
}
}
lv_item_list.setAdapter(new ItemListUpdateAdapter(UpdateItemListActivity.this, item_list_obj));
}
if (item_list_obj == null || item_list_obj.size() == 0) {
AlertDialog.Builder alert = new AlertDialog.Builder(UpdateItemListActivity.this);
alert.setTitle("Info");
alert.setMessage("No Item!");
alert.show();
alert.setCancelable(true);
//lv_item_list.removeAllViewsInLayout();
lv_item_list.setAdapter(null);
}
//}
}
}
};
private List<Object> category_list;
private void getCategory()
{
Category cat = new Category(0,"All");
category_list = new ArrayList<Object>();
category_list.add(cat);
category_list.addAll(category_control.select());
if (category_list_obj.size() > 0) {
spnCategory.setAdapter(new CategorySpinnerAdapter(this,category_list));
}
Log.i("","Category List:" + category_list.toString());
}
public boolean checkFields() {
if (edt_item_name.getText().toString().length() == 0) {
edt_item_name.setError("Enter Item Name");
return false;
}
return true;
}
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
}
}
| [
"suwaiphyo1985@gmail.com"
] | suwaiphyo1985@gmail.com |
3af8bb48ec54809c4d27af0acf9baf03ab2d111d | 9d1870a895c63f540937f04a6285dd25ada5e52a | /chromecast-app-reverse-engineering/src/from-jd-gui/ayt.java | ebd9efdf1816b51db0809c10df6aa1599cf74714 | [] | no_license | Churritosjesus/Chromecast-Reverse-Engineering | 572aa97eb1fd65380ca0549b4166393505328ed4 | 29fae511060a820f2500a4e6e038dfdb591f4402 | refs/heads/master | 2023-06-04T10:27:15.869608 | 2015-10-27T10:43:11 | 2015-10-27T10:43:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 949 | java | import java.util.Iterator;
import java.util.List;
final class ayt
implements bff
{
ayt(ayq paramayq, ayv paramayv) {}
public final void a()
{
synchronized (ayq.c(this.b))
{
ayq.c(this.b).a.remove(this.a);
ayq.c(this.b).b.add(this.a);
this.a.c = null;
this.a.d = null;
aym localaym = this.a.b;
ayq.d(this.b);
??? = ayq.e(this.b);
if (??? != null)
{
??? = ((List)???).iterator();
if (((Iterator)???).hasNext()) {
((ayw)((Iterator)???).next()).a(localaym);
}
}
}
}
public final void a(int paramInt)
{
this.a.f = true;
}
public final void b()
{
synchronized (ayq.c(this.b))
{
ayq.c(this.b).a.remove(this.a);
return;
}
}
}
/* Location: C:\DEV\android\dex2jar-2.1-SNAPSHOT\classes-dex2jar.jar!\ayt.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"v.richomme@gmail.com"
] | v.richomme@gmail.com |
f20e71e5b974baadcaabe2b20b998e6b280db639 | 0eb7dcb0459de31871e2357cf5c713a53ea5f015 | /toolbus-ng/src/toolbus/process/Alternative.java | 186245cda767a67c78b6ba53d04d51bb13b23dfc | [] | no_license | cwi-swat/meta-environment | a87055da2a6825c97c7744cdd84c08d39d9f3f66 | eea9a90fdb52415f43430a89adc7acddba2be0a4 | refs/heads/master | 2021-01-19T08:42:05.812049 | 2012-11-15T14:16:54 | 2012-11-15T14:16:54 | 5,178,544 | 8 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,545 | java | package toolbus.process;
/**
* @author paulk
*/
import java.util.Stack;
import toolbus.AtomList;
import toolbus.State;
import toolbus.TBTermFactory;
import toolbus.environment.Environment;
import toolbus.exceptions.ToolBusException;
import toolbus.parsercup.PositionInformation;
/**
* Alternative is the abstract syntax operator for the choice operator (+) in Tscripts. It is
* compiled away and does not exist during execution.
*/
public class Alternative extends ProcessExpression{
private final ProcessExpression left;
private final ProcessExpression right;
public Alternative(ProcessExpression left, ProcessExpression right, TBTermFactory tbfactory, PositionInformation posInfo){
super(tbfactory, posInfo);
this.left = left;
this.right = right;
}
protected ProcessExpression copy(){
return new Alternative(left.copy(), right.copy(), tbfactory, getPosInfo());
}
public String toString(){
return "Alt(" + left.toString() + ", " + right.toString() + ")";
}
protected void computeFirst(){
left.computeFirst();
right.computeFirst();
setFirst(left.getFirst().union(right.getFirst()));
}
protected void compile(ProcessInstance P, Stack<String> calls, State follow) throws ToolBusException{
left.compile(P, calls, follow);
right.compile(P, calls, follow);
setFollow(follow);
}
protected void replaceFormals(Environment env) throws ToolBusException{
left.replaceFormals(env);
right.replaceFormals(env);
}
public AtomList getAtoms(){
return left.getAtoms().union(right.getAtoms());
}
}
| [
"arnold.lankamp@gmail.com"
] | arnold.lankamp@gmail.com |
2d4bd7d7391e0fbc60094e4af6981a7219f616dd | 56d9a917225720540067d22a29726ffb67cf8523 | /src/main/java/challenge/design_patterns/behavioral_patterns/command/document_ex/Document.java | 81362346a728cceca4199a5360f724cf21b3d0ba | [] | no_license | xuanvinhln/java-challenge | 0775386854b4472b72f325fd17b560ee41d40cc6 | 91e443b3ab10190a2c40542fb20a287006073a83 | refs/heads/master | 2023-04-15T21:10:56.233738 | 2021-04-23T04:48:17 | 2021-04-23T04:48:17 | 352,489,016 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 678 | java | package challenge.design_patterns.behavioral_patterns.command.document_ex;
public class Document {
private String name;
public Document(String name) {
this.name = name;
}
public void open() {
System.out.println(Document.class.getSimpleName() + " open " + name);
}
public void close() {
System.out.println(Document.class.getSimpleName() + " close " + name);
}
public void cut() {
System.out.println(Document.class.getSimpleName() + " cut " + name);
}
public void copy() {
System.out.println(Document.class.getSimpleName() + " copy " + name);
}
public void paste() {
System.out.println(Document.class.getSimpleName() + " paste " + name);
}
}
| [
"you@example.com"
] | you@example.com |
d590aa41c8d71e1d37cb99aa0f4f82f4bea5f381 | f86938ea6307bf6d1d89a07b5b5f9e360673d9b8 | /CodeComment_Data/Code_Jam/train/Magic_Trick/S/A(149).java | daf8646e7c26bb6f2ac0523aecd0e2d66ed16d22 | [] | no_license | yxh-y/code_comment_generation | 8367b355195a8828a27aac92b3c738564587d36f | 2c7bec36dd0c397eb51ee5bd77c94fa9689575fa | refs/heads/master | 2021-09-28T18:52:40.660282 | 2018-11-19T14:54:56 | 2018-11-19T14:54:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,529 | java | package methodEmbedding.Magic_Trick.S.LYD61;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.Scanner;
public class A {
public static void main(String args[]) throws FileNotFoundException{
Scanner in = new Scanner(new File("A-small-attempt0.in"));
PrintStream out = new PrintStream(new File("A-small-attempt0.out"));
int t = in.nextInt();
in.nextLine();
int r1,r2;
int[]count;
int temp;
int cases=0;
while(in.hasNext()){
count=new int[17];
cases++;
r1=in.nextInt();
in.nextLine();
for(int i=1;i<=4;i++){
for(int j=1;j<=4;j++){
temp=in.nextInt();
if(i==r1)
count[temp]++;
}
if(in.hasNext())
in.nextLine();
}
r2=in.nextInt();
in.nextLine();
for(int i=1;i<=4;i++){
for(int j=1;j<=4;j++){
temp=in.nextInt();
if(i==r2)
count[temp]++;
}
if(in.hasNext())
in.nextLine();
}
int two=0;
int pos=0;
for(int i=1;i<count.length;i++)
if(count[i]==2){
two++;
pos=i;
}
if(two==1){
out.println("Case #"+cases+": "+pos);
}else{
if(two>=2)
out.println("Case #"+cases+": "+"Bad magician!");
else
out.println("Case #"+cases+": "+"Volunteer cheated!");
}
}
}
}
| [
"liangyuding@sjtu.edu.cn"
] | liangyuding@sjtu.edu.cn |
96b75c21e237f5c965b0d4f90c839b878e637508 | 0bc9e9e3d6e1f2e9ad40861e689aa4a9352e76a1 | /src/main/java/com/antifraud/entity/Photo.java | 796e1b65f7deeefcd1487f9b713c163f746d7c20 | [] | no_license | gintian/AntiFraud | 0b21b1f12d784d367334e0175aae471e426dd111 | 675cc4c30e033327383eee7c1a4b7bd474425cc0 | refs/heads/master | 2023-05-27T23:53:09.494977 | 2020-06-19T08:12:38 | 2020-06-19T08:12:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,222 | java | package com.antifraud.entity;
import java.util.Date;
public class Photo {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column t_photo.id
*
* @mbggenerated
*/
private Long id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column t_photo.report_id
*
* @mbggenerated
*/
private String report_id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column t_photo.img_url
*
* @mbggenerated
*/
private String img_url;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column t_photo.img_format
*
* @mbggenerated
*/
private String img_format;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column t_photo.bussness_type
*
* @mbggenerated
*/
private Byte bussness_type;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column t_photo.create_time
*
* @mbggenerated
*/
private Date create_time;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column t_photo.update_time
*
* @mbggenerated
*/
private Date update_time;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column t_photo.id
*
* @return the value of t_photo.id
*
* @mbggenerated
*/
public Long getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column t_photo.id
*
* @param id the value for t_photo.id
*
* @mbggenerated
*/
public void setId(Long id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column t_photo.report_id
*
* @return the value of t_photo.report_id
*
* @mbggenerated
*/
public String getReport_id() {
return report_id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column t_photo.report_id
*
* @param report_id the value for t_photo.report_id
*
* @mbggenerated
*/
public void setReport_id(String report_id) {
this.report_id = report_id == null ? null : report_id.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column t_photo.img_url
*
* @return the value of t_photo.img_url
*
* @mbggenerated
*/
public String getImg_url() {
return img_url;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column t_photo.img_url
*
* @param img_url the value for t_photo.img_url
*
* @mbggenerated
*/
public void setImg_url(String img_url) {
this.img_url = img_url == null ? null : img_url.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column t_photo.img_format
*
* @return the value of t_photo.img_format
*
* @mbggenerated
*/
public String getImg_format() {
return img_format;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column t_photo.img_format
*
* @param img_format the value for t_photo.img_format
*
* @mbggenerated
*/
public void setImg_format(String img_format) {
this.img_format = img_format == null ? null : img_format.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column t_photo.bussness_type
*
* @return the value of t_photo.bussness_type
*
* @mbggenerated
*/
public Byte getBussness_type() {
return bussness_type;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column t_photo.bussness_type
*
* @param bussness_type the value for t_photo.bussness_type
*
* @mbggenerated
*/
public void setBussness_type(Byte bussness_type) {
this.bussness_type = bussness_type;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column t_photo.create_time
*
* @return the value of t_photo.create_time
*
* @mbggenerated
*/
public Date getCreate_time() {
return create_time;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column t_photo.create_time
*
* @param create_time the value for t_photo.create_time
*
* @mbggenerated
*/
public void setCreate_time(Date create_time) {
this.create_time = create_time;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column t_photo.update_time
*
* @return the value of t_photo.update_time
*
* @mbggenerated
*/
public Date getUpdate_time() {
return update_time;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column t_photo.update_time
*
* @param update_time the value for t_photo.update_time
*
* @mbggenerated
*/
public void setUpdate_time(Date update_time) {
this.update_time = update_time;
}
@Override
public String toString() {
return "Photo [id=" + id + ", report_id=" + report_id + ", img_url=" + img_url + ", img_format=" + img_format
+ ", bussness_type=" + bussness_type + ", create_time=" + create_time + ", update_time=" + update_time
+ "]";
}
} | [
"liujiayiii@qq.com"
] | liujiayiii@qq.com |
70b748da9c746a3933a417195a889204b306d157 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/7/org/apache/commons/math3/analysis/solvers/BaseAbstractUnivariateSolver_getMax_117.java | 1deb84c75244a1efe3c4fabb2b8884fddabd6f3d | [] | 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 | 572 | java |
org apach common math3 analysi solver
provid implement function gener
solver
param func type function solv
version
base abstract univari solver baseabstractunivariatesolv func univari function univariatefunct
higher end search interv
max getmax
search max searchmax
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
27c8fa45aa241eafe25021819151c64eebb145f9 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5631572862566400_1/java/sroyal/c2.java | b2cfd1e6244ab3809191945d50f7dbdbcd9d9a4b | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Java | false | false | 2,064 | java | import java.util.*;
public class c2 {
public static int n;
public static int[] nums;
public static void main(String[] args){
Scanner br = new Scanner(System.in);
int t = br.nextInt();
for(int c = 1;c<=t;c++){
n = br.nextInt();
ArrayList<Integer>[] rgraph = new ArrayList[n];
for(int i = 0;i<n;i++){
rgraph[i] = new ArrayList<Integer>();
}
nums = new int[n];
for(int i = 0;i<n;i++){
nums[i] = br.nextInt()-1;
rgraph[nums[i]].add(i);
}
int best = 2;
boolean[] done = new boolean[n];
for(int i = 0;i<n;i++){
if(!done[i]){
int[] seen = new int[n];
int pos = i;
int time = 1;
while(true){
if(seen[pos] != 0){
best = Math.max(best, time-seen[pos]);
break;
}
seen[pos] = time;
done[pos] = true;
pos = nums[pos];
time++;
}
}
}
int count = 0;
for(int i = 0;i<n;i++){
if(nums[nums[i]] == i){
count++;
}
}
int add = 0;
for(int i = 0;i<n;i++){
if(nums[nums[i]] == i && i < nums[i]){
ArrayDeque<Integer> qu = new ArrayDeque<Integer>();
qu.add(i);
int[] dist = new int[n];
Arrays.fill(dist, -1);
dist[i] = 0;
int max1 = 0;
while(qu.size() > 0){
int cur = qu.poll();
max1 = Math.max(max1, dist[cur]);
for(int j : rgraph[cur]){
if(j != nums[i] && j != i){
if(dist[j] == -1){
dist[j] = 1+dist[cur];
qu.add(j);
}
}
}
}
qu = new ArrayDeque<Integer>();
qu.add(nums[i]);
dist = new int[n];
Arrays.fill(dist, -1);
dist[nums[i]] = 0;
int max2 = 0;
while(qu.size() > 0){
int cur = qu.poll();
max2 = Math.max(max2, dist[cur]);
for(int j : rgraph[cur]){
if(j != nums[i] && j != i){
if(dist[j] == -1){
dist[j] = 1+dist[cur];
qu.add(j);
}
}
}
}
add+=max1;
add+=max2;
}
}
best = Math.max(best, count+add);
System.out.println("Case #"+c+": "+best);
}
}
}
| [
"alexandra1.back@gmail.com"
] | alexandra1.back@gmail.com |
803d756ad5308095e5818bad0a215041d8f36da8 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/third-party/other/external-module-0035/src/java/external_module_0035/a/Foo0.java | 116606fe035fe626be1ba96b30aeb5c7dc542b22 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 1,230 | java | package external_module_0035.a;
import javax.annotation.processing.*;
import javax.lang.model.*;
import javax.management.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.io.File
* @see java.rmi.Remote
* @see java.nio.file.FileStore
*/
@SuppressWarnings("all")
public abstract class Foo0<I> implements external_module_0035.a.IFoo0<I> {
java.sql.Array f0 = null;
java.util.logging.Filter f1 = null;
java.util.zip.Deflater f2 = null;
public I element;
public static Foo0 instance;
public static Foo0 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return null;
}
public String getName() {
return element.toString();
}
public void setName(String string) {
return;
}
public I get() {
return element;
}
public void set(Object element) {
this.element = (I)element;
}
public I call() throws Exception {
return (I)getInstance().call();
}
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
f7bfb7b63d8bb0b132fe509c5a36aeabbd4f6698 | 58da62dfc6e145a3c836a6be8ee11e4b69ff1878 | /src/main/java/com/alipay/api/domain/WorkPatternDetail.java | 4f1c494295ffab71ceb766c6b308795d86a99930 | [
"Apache-2.0"
] | permissive | zhoujiangzi/alipay-sdk-java-all | 00ef60ed9501c74d337eb582cdc9606159a49837 | 560d30b6817a590fd9d2c53c3cecac0dca4449b3 | refs/heads/master | 2022-12-26T00:27:31.553428 | 2020-09-07T03:39:05 | 2020-09-07T03:39:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,418 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 大出行智能平台-排班任务-班型-班型明细
*
* @author auto create
* @since 1.0, 2020-08-17 21:23:57
*/
public class WorkPatternDetail extends AlipayObject {
private static final long serialVersionUID = 1575265973888749683L;
/**
* 结束时刻(hh24:mi:ss)
*/
@ApiField("end_time")
private String endTime;
/**
* 扩展参数,json格式,由双方约定取值
*/
@ApiField("ext_param")
private String extParam;
/**
* 营运车次数
*/
@ApiField("service_trip_count")
private Long serviceTripCount;
/**
* 开始时刻(hh24:mi:ss)
*/
@ApiField("start_time")
private String startTime;
public String getEndTime() {
return this.endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getExtParam() {
return this.extParam;
}
public void setExtParam(String extParam) {
this.extParam = extParam;
}
public Long getServiceTripCount() {
return this.serviceTripCount;
}
public void setServiceTripCount(Long serviceTripCount) {
this.serviceTripCount = serviceTripCount;
}
public String getStartTime() {
return this.startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
3cb9c07f95a4d00183f4aa6b07ba0aa8108585bf | 96c5d6f05d80b7ed0f049dbecc5d888aca4486e4 | /src/main/java/com/ebay/soap/eBLBaseComponents/SetPromotionalSaleListingsRequestType.java | d260ec54d00c7192641669a77add981d9da719e7 | [] | no_license | lespaul361/eBaySDK939 | 4bb445b9553960e24b74e6ff3f8e8cc9fcb36e74 | 717b31e5611d499b11c3843adef18078e21ce914 | refs/heads/master | 2020-03-25T04:02:57.220508 | 2018-08-03T03:50:19 | 2018-08-03T03:50:19 | 114,824,989 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,380 | java |
package com.ebay.soap.eBLBaseComponents;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Enables the seller to change the item listings that are affected by a promotional sale.
*
*
* <p>Java class for SetPromotionalSaleListingsRequestType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SetPromotionalSaleListingsRequestType">
* <complexContent>
* <extension base="{urn:ebay:apis:eBLBaseComponents}AbstractRequestType">
* <sequence>
* <element name="PromotionalSaleID" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* <element name="Action" type="{urn:ebay:apis:eBLBaseComponents}ModifyActionCodeType" minOccurs="0"/>
* <element name="PromotionalSaleItemIDArray" type="{urn:ebay:apis:eBLBaseComponents}ItemIDArrayType" minOccurs="0"/>
* <element name="StoreCategoryID" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* <element name="CategoryID" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* <element name="AllFixedPriceItems" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="AllStoreInventoryItems" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="AllAuctionItems" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SetPromotionalSaleListingsRequestType", propOrder = {
"promotionalSaleID",
"action",
"promotionalSaleItemIDArray",
"storeCategoryID",
"categoryID",
"allFixedPriceItems",
"allStoreInventoryItems",
"allAuctionItems"
})
public class SetPromotionalSaleListingsRequestType
extends AbstractRequestType
implements Serializable
{
private final static long serialVersionUID = 12343L;
@XmlElement(name = "PromotionalSaleID")
protected Long promotionalSaleID;
@XmlElement(name = "Action")
protected ModifyActionCodeType action;
@XmlElement(name = "PromotionalSaleItemIDArray")
protected ItemIDArrayType promotionalSaleItemIDArray;
@XmlElement(name = "StoreCategoryID")
protected Long storeCategoryID;
@XmlElement(name = "CategoryID")
protected Long categoryID;
@XmlElement(name = "AllFixedPriceItems")
protected Boolean allFixedPriceItems;
@XmlElement(name = "AllStoreInventoryItems")
protected Boolean allStoreInventoryItems;
@XmlElement(name = "AllAuctionItems")
protected Boolean allAuctionItems;
/**
* Gets the value of the promotionalSaleID property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getPromotionalSaleID() {
return promotionalSaleID;
}
/**
* Sets the value of the promotionalSaleID property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setPromotionalSaleID(Long value) {
this.promotionalSaleID = value;
}
/**
* Gets the value of the action property.
*
* @return
* possible object is
* {@link ModifyActionCodeType }
*
*/
public ModifyActionCodeType getAction() {
return action;
}
/**
* Sets the value of the action property.
*
* @param value
* allowed object is
* {@link ModifyActionCodeType }
*
*/
public void setAction(ModifyActionCodeType value) {
this.action = value;
}
/**
* Gets the value of the promotionalSaleItemIDArray property.
*
* @return
* possible object is
* {@link ItemIDArrayType }
*
*/
public ItemIDArrayType getPromotionalSaleItemIDArray() {
return promotionalSaleItemIDArray;
}
/**
* Sets the value of the promotionalSaleItemIDArray property.
*
* @param value
* allowed object is
* {@link ItemIDArrayType }
*
*/
public void setPromotionalSaleItemIDArray(ItemIDArrayType value) {
this.promotionalSaleItemIDArray = value;
}
/**
* Gets the value of the storeCategoryID property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getStoreCategoryID() {
return storeCategoryID;
}
/**
* Sets the value of the storeCategoryID property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setStoreCategoryID(Long value) {
this.storeCategoryID = value;
}
/**
* Gets the value of the categoryID property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getCategoryID() {
return categoryID;
}
/**
* Sets the value of the categoryID property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setCategoryID(Long value) {
this.categoryID = value;
}
/**
* Gets the value of the allFixedPriceItems property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isAllFixedPriceItems() {
return allFixedPriceItems;
}
/**
* Sets the value of the allFixedPriceItems property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setAllFixedPriceItems(Boolean value) {
this.allFixedPriceItems = value;
}
/**
* Gets the value of the allStoreInventoryItems property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isAllStoreInventoryItems() {
return allStoreInventoryItems;
}
/**
* Sets the value of the allStoreInventoryItems property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setAllStoreInventoryItems(Boolean value) {
this.allStoreInventoryItems = value;
}
/**
* Gets the value of the allAuctionItems property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isAllAuctionItems() {
return allAuctionItems;
}
/**
* Sets the value of the allAuctionItems property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setAllAuctionItems(Boolean value) {
this.allAuctionItems = value;
}
}
| [
"lespaul36@gmail.com"
] | lespaul36@gmail.com |
be179ab5689f2824a16d797e83814ed5e7d6137b | 704507754a9e7f300dfab163e97cd976b677661b | /src/com/sun/corba/se/spi/activation/ServerHeldDown.java | 80c0a8fed46b0de78ef96e9562787469eeafe233 | [] | no_license | ossaw/jdk | 60e7ca5e9f64541d07933af25c332e806e914d2a | b9d61d6ade341b4340afb535b499c09a8be0cfc8 | refs/heads/master | 2020-03-27T02:23:14.010857 | 2019-08-07T06:32:34 | 2019-08-07T06:32:34 | 145,785,700 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 873 | java | package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/ServerHeldDown.java . Generated by the
* IDL-to-Java compiler (portable), version "3.2" from
* c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u144/9417/corba/src/share/
* classes/com/sun/corba/se/spi/activation/activation.idl Friday, July 21, 2017
* 9:58:51 PM PDT
*/
public final class ServerHeldDown extends org.omg.CORBA.UserException {
public int serverId = (int) 0;
public ServerHeldDown() {
super(ServerHeldDownHelper.id());
} // ctor
public ServerHeldDown(int _serverId) {
super(ServerHeldDownHelper.id());
serverId = _serverId;
} // ctor
public ServerHeldDown(String $reason, int _serverId) {
super(ServerHeldDownHelper.id() + " " + $reason);
serverId = _serverId;
} // ctor
} // class ServerHeldDown
| [
"jianghao7625@gmail.com"
] | jianghao7625@gmail.com |
cd6b589e14a958a3c1eceb9b9876d948ba0a059d | 124df74bce796598d224c4380c60c8e95756f761 | /gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/edex/common/metparameters/CondProbOf12HrFreezingPrecip.java | ec2109ccc6324981a461150ddbda23ab87c1279c | [] | no_license | Mapoet/AWIPS-Test | 19059bbd401573950995c8cc442ddd45588e6c9f | 43c5a7cc360b3cbec2ae94cb58594fe247253621 | refs/heads/master | 2020-04-17T03:35:57.762513 | 2017-02-06T17:17:58 | 2017-02-06T17:17:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 931 | java | /**
*
*/
package gov.noaa.nws.ncep.edex.common.metparameters;
import javax.measure.quantity.Dimensionless;
import javax.measure.unit.Unit;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.adapters.UnitAdapter;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/**
* Maps to the GEMPAK parameter PZ12
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class CondProbOf12HrFreezingPrecip extends AbstractMetParameter implements
Dimensionless, ISerializableObject {
/**
*
*/
private static final long serialVersionUID = -5752791443181533431L;
public CondProbOf12HrFreezingPrecip()throws Exception {
super( new UnitAdapter().marshal(UNIT) );
}
} | [
"joshua.t.love@saic.com"
] | joshua.t.love@saic.com |
54562a7371b9c7cd149fd3c862bdc88a6376987e | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13031-2-22-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/search/solr/internal/reference/SolrEntityReferenceResolver_ESTest_scaffolding.java | f67bb5f37ef9684ce84f85dd7c0e14b0ccf001c3 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,431 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Jan 18 17:16:06 UTC 2020
*/
package org.xwiki.search.solr.internal.reference;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class SolrEntityReferenceResolver_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 = "org.xwiki.search.solr.internal.reference.SolrEntityReferenceResolver";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
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.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(SolrEntityReferenceResolver_ESTest_scaffolding.class.getClassLoader() ,
"org.xwiki.model.reference.EntityReferenceResolver",
"org.apache.solr.common.SolrDocument",
"org.xwiki.component.util.DefaultParameterizedType",
"org.xwiki.model.reference.DocumentReference",
"org.xwiki.component.annotation.Component",
"org.xwiki.model.reference.EntityReference",
"org.xwiki.search.solr.internal.reference.SolrEntityReferenceResolver",
"org.xwiki.model.EntityType",
"org.apache.commons.lang3.StringUtils"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
cb3844ebf2bf2d0f787a5a5182779f536ea7cdee | 31e1af0809dca48e05aa7e5c2f002fcfbf97fe4e | /coding-dojo-huawei/src/main/java/com/uj/study/password_crack/transformer/old/LowercaseTransformerOld.java | c35d3f1efeb78c31c7d88718a7110a8bc11daaf7 | [
"Apache-2.0"
] | permissive | unclejet/coding-dojo-huawei | 42f45dfc539d224ae1edf11490a558487087ebf1 | 98b1c55d3ad590c31d6d54191d774d1696e43346 | refs/heads/master | 2023-07-24T15:29:36.130694 | 2023-07-12T04:41:38 | 2023-07-12T04:41:38 | 222,038,771 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,212 | java | package com.uj.study.password_crack.transformer.old;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @author :UncleJet
* @date :Created in 2021/6/23 上午10:08
* @description:
*/
public class LowercaseTransformerOld extends PwdTransformerOld {
private static final Pattern LOWER_PATTERN = Pattern.compile("\\p{Lower}");
private static Map<String, Character> mapper;
static {
mapper = new HashMap<>();
mapper.put("abc", '2');
mapper.put("def", '3');
mapper.put("ghi", '4');
mapper.put("jkl", '5');
mapper.put("mno", '6');
mapper.put("pqrs", '7');
mapper.put("tuv", '8');
mapper.put("wxyz", '9');
}
public LowercaseTransformerOld(PwdTransformerOld nextTransformer) {
super(nextTransformer);
}
@Override
public char handle(char c) {
String key = mapper.keySet().stream().filter(k->k.contains(String.valueOf(c))).collect(Collectors.joining());
return mapper.get(key);
}
@Override
boolean canHandle(char c) {
return LOWER_PATTERN.matcher(String.valueOf(c)).matches();
}
}
| [
"unclejet@126.com"
] | unclejet@126.com |
6460efc9bab36b5a1a6c5e62d96c276c8baff850 | 37fdc74bbf8220b4efa3a209a0398dde51f1d57b | /src/main/java/cn/com/rebirth/search/core/indices/AliasFilterParsingException.java | 1e391c3b02ed5154448c4bba3462b35355b63059 | [] | no_license | dowsam/rebirth-search-core | 4c39e7f1b30c78e4dd97380b82af235c72161ee4 | ab615cd8e74f318c20137c0f0dd7d740cd0a6bec | refs/heads/master | 2016-09-09T18:35:33.145132 | 2012-09-05T05:58:55 | 2012-09-05T05:58:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,144 | java | /*
* Copyright (c) 2005-2012 www.china-cti.com All rights reserved
* Info:rebirth-search-core AliasFilterParsingException.java 2012-7-6 14:29:02 l.xue.nong$$
*/
package cn.com.rebirth.search.core.indices;
import cn.com.rebirth.search.core.index.Index;
import cn.com.rebirth.search.core.index.IndexException;
/**
* The Class AliasFilterParsingException.
*
* @author l.xue.nong
*/
public class AliasFilterParsingException extends IndexException {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 3184923614780342337L;
/**
* Instantiates a new alias filter parsing exception.
*
* @param index the index
* @param name the name
* @param desc the desc
*/
public AliasFilterParsingException(Index index, String name, String desc) {
super(index, "[" + name + "], " + desc);
}
/**
* Instantiates a new alias filter parsing exception.
*
* @param index the index
* @param name the name
* @param desc the desc
* @param ex the ex
*/
public AliasFilterParsingException(Index index, String name, String desc, Throwable ex) {
super(index, "[" + name + "], " + desc, ex);
}
} | [
"l.xue.nong@gmail.com"
] | l.xue.nong@gmail.com |
21a5d11a086798a82b44f36d33f59f94fc115eba | 2c1d85d1bdf4dd6816567998bc037669f7c5d85c | /src/main/java/demoMod/relics/WaxWing.java | ba982a3921af048b8bad0fabdb429578e3579a3c | [] | no_license | tldyl/demoMod | ecf996f47adfda0ffd78581c2405b22b960ac1f5 | 66e55a9aad53e65af65875bdb3edf3f396e92c47 | refs/heads/master | 2022-06-03T08:51:43.592210 | 2022-05-15T14:09:25 | 2022-05-15T14:09:25 | 243,190,716 | 4 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,141 | java | package demoMod.relics;
import basemod.abstracts.CustomRelic;
import com.badlogic.gdx.graphics.Texture;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.RelicAboveCreatureAction;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import demoMod.DemoMod;
import demoMod.powers.PlayerFlightPower;
public class WaxWing extends CustomRelic {
public static final String ID = DemoMod.makeID("WaxWing");
public static final String IMG_PATH = "relics/waxWing.png";
public WaxWing() {
super(ID, new Texture(DemoMod.getResourcePath(IMG_PATH)),
RelicTier.BOSS, LandingSound.MAGICAL);
}
@Override
public String getUpdatedDescription() {
return this.DESCRIPTIONS[0];
}
@Override
public void atBattleStart() {
this.flash();
AbstractPlayer p = AbstractDungeon.player;
this.addToTop(new RelicAboveCreatureAction(p, this));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new PlayerFlightPower(p, 1)));
}
}
| [
"756560020@qq.com"
] | 756560020@qq.com |
d0b48bd501589e1b0101f741d5cf5da08c06daa1 | 392b183ece3b41beaec08ab88dcafd504e8cf4e9 | /com/squareup/okhttp/internal/Internal.java | e3993113347e7358c959dab3010f939bf414c41e | [
"MIT"
] | permissive | 3000IQPlay/RailHack-0.5.9-Src | 552decf5749ee744b565494415f89af948257a98 | 9c1396d095a72f7a414f24cfb1720fc294a9f24a | refs/heads/main | 2023-06-27T16:58:42.177134 | 2021-08-04T15:53:07 | 2021-08-04T15:53:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,975 | java | package com.squareup.okhttp.internal;
import com.squareup.okhttp.Address;
import com.squareup.okhttp.Call;
import com.squareup.okhttp.Callback;
import com.squareup.okhttp.ConnectionPool;
import com.squareup.okhttp.ConnectionSpec;
import com.squareup.okhttp.Headers;
import com.squareup.okhttp.HttpUrl;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.internal.http.StreamAllocation;
import com.squareup.okhttp.internal.io.RealConnection;
import java.net.MalformedURLException;
import java.net.UnknownHostException;
import java.util.logging.Logger;
import javax.net.ssl.SSLSocket;
public abstract class Internal {
public static final Logger logger = Logger.getLogger(OkHttpClient.class.getName());
public static Internal instance;
public static void initializeInstanceForTests() {
new OkHttpClient();
}
public abstract void addLenient(Headers.Builder headers_builder, String s);
public abstract void addLenient(Headers.Builder headers_builder, String s, String s1);
public abstract void setCache(OkHttpClient okhttpclient, InternalCache internalcache);
public abstract InternalCache internalCache(OkHttpClient okhttpclient);
public abstract RealConnection get(ConnectionPool connectionpool, Address address, StreamAllocation streamallocation);
public abstract void put(ConnectionPool connectionpool, RealConnection realconnection);
public abstract boolean connectionBecameIdle(ConnectionPool connectionpool, RealConnection realconnection);
public abstract RouteDatabase routeDatabase(ConnectionPool connectionpool);
public abstract void apply(ConnectionSpec connectionspec, SSLSocket sslsocket, boolean flag);
public abstract HttpUrl getHttpUrlChecked(String s) throws MalformedURLException, UnknownHostException;
public abstract void callEnqueue(Call call, Callback callback, boolean flag);
public abstract StreamAllocation callEngineGetStreamAllocation(Call call);
}
| [
"56791945+AfkBranta@users.noreply.github.com"
] | 56791945+AfkBranta@users.noreply.github.com |
52efe9dedb55383f0956d9953f939e1e72c89c08 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.minihd.qq/assets/exlibs.2.jar/classes.jar/fgk.java | a9d17953cb8169e4a9c6b89c31cc8be6c27919ab | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 574 | java | import com.tencent.mobileqq.activity.TroopClassChoiceActivity;
import com.tencent.mobileqq.activity.TroopClassChoiceActivity.GetClassChoiceCallBack;
public class fgk
implements Runnable
{
public fgk(TroopClassChoiceActivity.GetClassChoiceCallBack paramGetClassChoiceCallBack) {}
public void run()
{
TroopClassChoiceActivity.a(this.a.a).notifyDataSetChanged();
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.2.jar\classes.jar
* Qualified Name: fgk
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
a70c5b2dd3d26437f65ab909a02d099204a7f6fc | 373c798cd4e6cfe91aeef514b1f6fae307666d99 | /server/speciality/src/main/java/com/df/spec/locality/validation/group/CampaignConstraintGroup.java | 41aae1ea0ffe115023eefc6c67a3ee7dc9ca83d8 | [] | no_license | sala223/cloudress | 3ff42faf5c59f23001eb8f0f5aa6152aa2d01cf9 | 8052d925a8751e5004eb9bbf5ba547d36c561c62 | refs/heads/master | 2021-05-27T08:28:19.531212 | 2014-10-22T11:41:55 | 2014-10-22T11:41:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 200 | java | package com.df.spec.locality.validation.group;
public interface CampaignConstraintGroup {
public static interface CreateCampaign {
}
public static interface CreateSpecialityGroupCampaign {
}
}
| [
"sala223@msn.com"
] | sala223@msn.com |
eb44092b120ba47c4072b6ac5ada06f7a2512526 | f3aec68bc48dc52e76f276fd3b47c3260c01b2a4 | /core/referencebook/src/main/java/ru/korus/tmis/pix/TableRuleStyle.java | 8d59c97c8106fdb35e65a7978db5b92861d230eb | [] | no_license | MarsStirner/core | c9a383799a92e485e2395d81a0bc95d51ada5fa5 | 6fbf37af989aa48fabb9c4c2566195aafd2b16ab | refs/heads/master | 2020-12-03T00:39:51.407573 | 2016-04-29T12:28:32 | 2016-04-29T12:28:32 | 96,041,573 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,305 | java |
package ru.korus.tmis.pix;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for TableRuleStyle.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="TableRuleStyle">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="Botrule"/>
* <enumeration value="Lrule"/>
* <enumeration value="Rrule"/>
* <enumeration value="Toprule"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "TableRuleStyle")
@XmlEnum
public enum TableRuleStyle {
@XmlEnumValue("Botrule")
BOTRULE("Botrule"),
@XmlEnumValue("Lrule")
LRULE("Lrule"),
@XmlEnumValue("Rrule")
RRULE("Rrule"),
@XmlEnumValue("Toprule")
TOPRULE("Toprule");
private final String value;
TableRuleStyle(String v) {
value = v;
}
public String value() {
return value;
}
public static TableRuleStyle fromValue(String v) {
for (TableRuleStyle c: TableRuleStyle.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
| [
"szgrebelny@korusconsulting.ru"
] | szgrebelny@korusconsulting.ru |
2b745863bfa2231f516cff3d82286a9561ad7eaf | b60bdc95fc8ec97f0371096d489aff1e2eea34e9 | /app/src/main/java/com/prmobiapp/ustamilfm/activity/MyRecyclerMovieAdapter.java | da8f86cdf21b99c900419b75c2faf317200dbd24 | [] | no_license | kapw001/UstamilFmLatest | 415352a4b2da8ce7ba4af9fbef656964ced4309e | 0a15f64cbb2ddb3bdd38bda193715ed1b3e2465e | refs/heads/master | 2020-03-19T19:53:23.908655 | 2018-06-11T05:22:07 | 2018-06-11T05:22:07 | 136,877,987 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,217 | java | package com.prmobiapp.ustamilfm.activity;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.text.Html;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.squareup.picasso.Picasso;
import java.util.List;
import com.prmobiapp.ustamilfm.MovieTraillerItem;
import com.prmobiapp.ustamilfm.R;
/**
* Created by Karthik on 11/16/2015.
*/
public class MyRecyclerMovieAdapter extends RecyclerView.Adapter<MovieFeedListRowHolder> {
private List<MovieTraillerItem> feedItemList;
private Context mContext;
public MyRecyclerMovieAdapter(Context context, List<MovieTraillerItem> feedItemList) {
this.feedItemList = feedItemList;
this.mContext = context;
// MovieTraillerItem feedItem = feedItemList.get(1);
// Log.e("RE",feedItem.getThumimage());
}
@Override
public MovieFeedListRowHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.teaser_row, null);
MovieFeedListRowHolder mh = new MovieFeedListRowHolder(v,feedItemList,mContext);
return mh;
}
@Override
public void onBindViewHolder(MovieFeedListRowHolder feedListRowHolder, int i) {
MovieTraillerItem feedItem = feedItemList.get(i);
Log.e("RE",feedItem.getThumimage());
// byte[] data = Base64.decode(feedItem.getThumimage(), Base64.DEFAULT);
// String text = null;
// try {
// text = new String(data, "UTF-8");
// } catch (UnsupportedEncodingException e) {
// e.printStackTrace();
// }
Picasso.with(mContext).load(feedItem.getThumimage())
// .error(R.drawable.placeholder)
// .placeholder(R.drawable.placeholder)
.into(feedListRowHolder.movieteaserimage);
feedListRowHolder.moviename.setText(Html.fromHtml(feedItem.getName()));
feedListRowHolder.moviesubname.setText(Html.fromHtml(feedItem.getSubname()));
}
@Override
public int getItemCount() {
return (null != feedItemList ? feedItemList.size() : 0);
}
}
| [
"karthik@think42labs.com"
] | karthik@think42labs.com |
a23061e45da83ddfd54bdafe44f53422a013d580 | e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3 | /src/chosun/ciis/fc/acct/ds/FC_ACCT_2030_MDataSet.java | 916c4be03be4f2325b9e837b449e8c7dfffdaed8 | [] | no_license | nosmoon/misdevteam | 4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60 | 1829d5bd489eb6dd307ca244f0e183a31a1de773 | refs/heads/master | 2020-04-15T15:57:05.480056 | 2019-01-10T01:12:01 | 2019-01-10T01:12:01 | 164,812,547 | 1 | 0 | null | null | null | null | UHC | Java | false | false | 3,483 | java | /***************************************************************************************************
* 파일명 : .java
* 기능 : 독자우대-구독신청
* 작성일자 : 2007-05-22
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.fc.acct.ds;
import java.sql.*;
import java.util.*;
import somo.framework.db.*;
import somo.framework.util.*;
import chosun.ciis.fc.acct.dm.*;
import chosun.ciis.fc.acct.rec.*;
/**
*
*/
public class FC_ACCT_2030_MDataSet extends somo.framework.db.BaseDataSet implements java.io.Serializable{
public String errcode;
public String errmsg;
public String srch_slip_clsf_cd;
public String slip_clsf_cd;
public FC_ACCT_2030_MDataSet(){}
public FC_ACCT_2030_MDataSet(String errcode, String errmsg, String srch_slip_clsf_cd, String slip_clsf_cd){
this.errcode = errcode;
this.errmsg = errmsg;
this.srch_slip_clsf_cd = srch_slip_clsf_cd;
this.slip_clsf_cd = slip_clsf_cd;
}
public void setErrcode(String errcode){
this.errcode = errcode;
}
public void setErrmsg(String errmsg){
this.errmsg = errmsg;
}
public void setSrch_slip_clsf_cd(String srch_slip_clsf_cd){
this.srch_slip_clsf_cd = srch_slip_clsf_cd;
}
public void setSlip_clsf_cd(String slip_clsf_cd){
this.slip_clsf_cd = slip_clsf_cd;
}
public String getErrcode(){
return this.errcode;
}
public String getErrmsg(){
return this.errmsg;
}
public String getSrch_slip_clsf_cd(){
return this.srch_slip_clsf_cd;
}
public String getSlip_clsf_cd(){
return this.slip_clsf_cd;
}
public void getValues(CallableStatement cstmt) throws SQLException{
this.errcode = Util.checkString(cstmt.getString(1));
this.errmsg = Util.checkString(cstmt.getString(2));
if(!"".equals(this.errcode)){
return;
}
this.srch_slip_clsf_cd = Util.checkString(cstmt.getString(5));
this.slip_clsf_cd = Util.checkString(cstmt.getString(6));
}
}/*----------------------------------------------------------------------------------------------------
Web Tier에서 DataSet 객체 관련 코드 작성시 사용하십시오.
<%
FC_ACCT_2030_MDataSet ds = (FC_ACCT_2030_MDataSet)request.getAttribute("ds");
%>
Web Tier에서 Record 객체 관련 코드 작성시 사용하십시오.
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 DataSet 객체의 <%= %> 작성시 사용하십시오.
<%= ds.getErrcode()%>
<%= ds.getErrmsg()%>
<%= ds.getSrch_slip_clsf_cd()%>
<%= ds.getSlip_clsf_cd()%>
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 Record 객체의 <%= %> 작성시 사용하십시오.
----------------------------------------------------------------------------------------------------*/
/* 작성시간 : Mon Jan 09 19:55:20 KST 2012 */ | [
"DLCOM000@172.16.30.11"
] | DLCOM000@172.16.30.11 |
9023e990e4e47b85ca36a9b78e6ab462977ca0f5 | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /P9-8.0/src/main/java/com/huawei/android/pushagent/utils/d.java | 2c0e9b13d9088d8315b4fef9d44b828e16fdec3b | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,027 | java | package com.huawei.android.pushagent.utils;
import com.huawei.android.pushagent.utils.d.c;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
public abstract class d {
public static void uw(Closeable closeable) {
if (closeable != null) {
try {
closeable.close();
} catch (IOException e) {
c.sj("PushLog2951", "close IOException");
}
}
}
public static void ux(HttpURLConnection httpURLConnection) {
if (httpURLConnection != null) {
try {
httpURLConnection.disconnect();
} catch (Throwable th) {
c.sj("PushLog2951", "close HttpURLConnection Exception");
}
}
}
public static String uy(InputStream inputStream) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
while (true) {
int read = inputStream.read();
if (-1 != read) {
byteArrayOutputStream.write(read);
} else {
String byteArrayOutputStream2 = byteArrayOutputStream.toString("UTF-8");
uw(inputStream);
return byteArrayOutputStream2;
}
}
}
public static String uv(BufferedReader bufferedReader) {
StringBuffer stringBuffer = new StringBuffer();
while (true) {
int read = bufferedReader.read();
if (read == -1) {
break;
}
char c = (char) read;
if (c == 10 || c == 13) {
break;
} else if (stringBuffer.length() >= 2097152) {
c.sf("PushLog2951", "read date exceed the max size!");
return null;
} else {
stringBuffer.append(c);
}
}
return stringBuffer.toString();
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
87b9a5f9331885fb38cff2e110f8d29621352e8e | 23cf8d31f288aabce2c8f8488262f48699640374 | /app/src/main/java/apextechies/services/FirebaseIDService.java | ff4a800daca5551a350f4b083f4a091603f354f4 | [] | no_license | Shankar1056/liveStreeming | 7b3c833f4e8facff8ea2ac2b034f5d0de3aa38ff | 7ce3b5548bb1743e757cf5d40cbc27b9cebb17cd | refs/heads/master | 2020-05-16T13:38:35.524719 | 2019-05-04T11:56:26 | 2019-05-04T11:56:26 | 183,079,797 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,026 | java | package apextechies.services;
import android.util.Log;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService;
public class FirebaseIDService extends FirebaseInstanceIdService {
private static final String TAG = "FirebaseIDService";
@Override
public void onTokenRefresh() {
// Get updated InstanceID token.
String refreshedToken = FirebaseInstanceId.getInstance().getToken();
Log.d(TAG, "Refreshed token: " + refreshedToken);
// TODO: Implement this method to send any registration to your app's servers.
sendRegistrationToServer(refreshedToken);
}
/**
* Persist token to third-party servers.
*
* Modify this method to associate the user's FCM InstanceID token with any server-side account
* maintained by your application.
*
* @param token The new token.
*/
private void sendRegistrationToServer(String token) {
// Add custom implementation, as needed.
}
} | [
"dayashankargupta86@gmail.com"
] | dayashankargupta86@gmail.com |
eb1ff81d68c390392b2e9b923bcd13ea7bc1c506 | 217cb8e0b447d453b013e3d95598e638b2c0c29c | /src/main/java/com/galileoindonesia/schema/pnr/GetMembership.java | 9c9355ba32c7777d96da635bc5890c53aa3286f0 | [] | no_license | sfranklyn/segcounter | 798e1853d2eb70901871273b1d1e74b39b7a2da7 | c4d0ca8ee10465a2d1c485b117d75cca87145506 | refs/heads/master | 2021-01-10T04:17:42.184081 | 2015-12-12T09:05:35 | 2015-12-12T09:05:35 | 47,546,047 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,436 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-548
// 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: 2009.03.31 at 11:27:25 AM ICT
//
package com.galileoindonesia.schema.pnr;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <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">
* <sequence>
* <element ref="{http://www.galileoindonesia.com/schema/PNR}AirMembershipReq"/>
* <element ref="{http://www.galileoindonesia.com/schema/PNR}CarMembershipReq"/>
* <element ref="{http://www.galileoindonesia.com/schema/PNR}HtlMembershipReq"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"airMembershipReq",
"carMembershipReq",
"htlMembershipReq"
})
@XmlRootElement(name = "GetMembership")
public class GetMembership
implements Serializable
{
@XmlElement(name = "AirMembershipReq", required = true)
protected String airMembershipReq;
@XmlElement(name = "CarMembershipReq", required = true)
protected String carMembershipReq;
@XmlElement(name = "HtlMembershipReq", required = true)
protected String htlMembershipReq;
/**
* Gets the value of the airMembershipReq property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAirMembershipReq() {
return airMembershipReq;
}
/**
* Sets the value of the airMembershipReq property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAirMembershipReq(String value) {
this.airMembershipReq = value;
}
/**
* Gets the value of the carMembershipReq property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCarMembershipReq() {
return carMembershipReq;
}
/**
* Sets the value of the carMembershipReq property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCarMembershipReq(String value) {
this.carMembershipReq = value;
}
/**
* Gets the value of the htlMembershipReq property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHtlMembershipReq() {
return htlMembershipReq;
}
/**
* Sets the value of the htlMembershipReq property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHtlMembershipReq(String value) {
this.htlMembershipReq = value;
}
}
| [
"sfranklyn@gmail.com"
] | sfranklyn@gmail.com |
c9effb80b809d7ef37549d6b48a6dca704247261 | f1db874b174b3322d07bcc8c381eac223378abc8 | /src/testng/SampleTestNg.java | 3f9b7a15b923b24eda030b8f2cf3f6244a1d6fbf | [] | no_license | Selenium12345/MorningBatch | a9027fb87aaa5a7ae62eb1967f8e200398805e82 | 97bcc743c99b40b11249ef2b7533be67bf7428d3 | refs/heads/master | 2020-12-02T07:50:04.482300 | 2017-08-20T10:41:35 | 2017-08-20T10:41:35 | 96,731,684 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 521 | java | package testng;
import junit.framework.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.Test;
public class SampleTestNg
{
@Test
public void appLaunch()
{
String exp="LOGIN Panel";
FirefoxDriver driver=new FirefoxDriver();
driver.get("http://opensource.demo.orangehrmlive.com/");
driver.manage().window().maximize();
String act=driver.findElement(By.xpath(".//*[@id='logInPanelHeading']")).getText();
Assert.assertEquals(exp, act);
}
}
| [
"vasu.584@gmail.com"
] | vasu.584@gmail.com |
c325051f7f8c65fe3bd01639be0c65f12b81779b | 863194470dceb3dff433fb9cb8846de4e491f316 | /src/main/java/com/github/fabriciolfj/javacodeproblems/features/concurrency/recursive/CalcUtil.java | 7f8a85437b6a7232da7a867062ef6427367c6106 | [] | no_license | fabriciolfj/javacodeproblems | b69c1bb8175a8a6b6acc3610778600215580d49e | 43252b964f9a1ea67d7f5c0235cf15e8bb1d06e6 | refs/heads/master | 2023-06-13T03:30:32.541971 | 2021-07-16T13:46:16 | 2021-07-16T13:46:16 | 272,845,112 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 467 | java | package com.github.fabriciolfj.javacodeproblems.features.concurrency.recursive;
import java.math.BigInteger;
public class CalcUtil {
public static BigInteger calculateFactorial (BigInteger input) {
BigInteger factorial = BigInteger.ONE;
for (BigInteger i = BigInteger.ONE;
i.compareTo(input) <= 0;
i = i.add(BigInteger.ONE)) {
factorial = factorial.multiply(i);
}
return factorial;
}
}
| [
"fabricio.jacob@outlook.com"
] | fabricio.jacob@outlook.com |
798bff22ffcc36c3e23d393db4d31a91fa1c5052 | aa3cde82a7b1cab0182c8ce5a5d09796d6772f1e | /AppsterAndroid/Appster/app/src/main/java/com/appster/adapters/EndlessPagerAdapter.java | a2618cb5d42c20923288d38db9308de98710ecbf | [] | no_license | zaizaixinhtrai/belive | fc474fc588bb3065f04e2e30239ca2790eb6c957 | db38db29f040e40865d1f5bfa3e35e36fd797ccf | refs/heads/master | 2020-09-10T00:39:40.313547 | 2019-11-14T03:54:06 | 2019-11-14T03:54:06 | 221,606,172 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,673 | java | package com.appster.adapters;
import android.os.Parcelable;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.fragment.app.FragmentStatePagerAdapter;
import androidx.viewpager.widget.PagerAdapter;
/**
* Created by User on 9/29/2016.
*/
public class EndlessPagerAdapter extends PagerAdapter {
private static final String TAG = "EndlessPagerAdapter";
private final PagerAdapter mPagerAdapter;
public EndlessPagerAdapter(PagerAdapter pagerAdapter) {
if (pagerAdapter == null) {
throw new IllegalArgumentException("Did you forget initialize PagerAdapter?");
}
if ((pagerAdapter instanceof FragmentPagerAdapter || pagerAdapter instanceof FragmentStatePagerAdapter) && pagerAdapter.getCount() < 3) {
throw new IllegalArgumentException("When you use FragmentPagerAdapter or FragmentStatePagerAdapter, it only supports >= 3 pages.");
}
mPagerAdapter = pagerAdapter;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
mPagerAdapter.destroyItem(container, getVirtualPosition(position), object);
if (mPagerAdapter.getCount() < 4) {
mPagerAdapter.instantiateItem(container, getVirtualPosition(position));
}
}
@Override
public void finishUpdate(ViewGroup container) {
mPagerAdapter.finishUpdate(container);
}
@Override
public int getCount() {
return Integer.MAX_VALUE; // this is the magic that we can scroll infinitely.
}
@Override
public CharSequence getPageTitle(int position) {
return mPagerAdapter.getPageTitle(getVirtualPosition(position));
}
@Override
public float getPageWidth(int position) {
return mPagerAdapter.getPageWidth(getVirtualPosition(position));
}
@Override
public boolean isViewFromObject(View view, Object o) {
return mPagerAdapter.isViewFromObject(view, o);
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
return mPagerAdapter.instantiateItem(container, getVirtualPosition(position));
}
@Override
public Parcelable saveState() {
return mPagerAdapter.saveState();
}
@Override
public void restoreState(Parcelable state, ClassLoader loader) {
mPagerAdapter.restoreState(state, loader);
}
@Override
public void startUpdate(ViewGroup container) {
mPagerAdapter.startUpdate(container);
}
int getVirtualPosition(int realPosition) {
return realPosition % mPagerAdapter.getCount();
}
} | [
"doithengoc@appsters.net"
] | doithengoc@appsters.net |
76673eb510c216a305c88794ceb4cb6e15aece6d | 3f605d058523f0b1e51f6557ed3c7663d5fa31d6 | /core/runtime/org.ebayopensource.vjet.rt.jsdebugger/src/org/ebayopensource/dsf/jsdebugger/gui/VariableDataModel.java | 69a25386423f3f2034492d44e48ed8a080c18dd4 | [] | no_license | vjetteam/vjet | 47e21a13978cd860f1faf5b0c2379e321a9b688c | ba90843b89dc40d7a7eb289cdf64e127ec548d1d | refs/heads/master | 2020-12-25T11:05:55.420303 | 2012-08-07T21:56:30 | 2012-08-07T21:56:30 | 3,181,492 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,309 | java | /*******************************************************************************
* Copyright (c) 2005-2011 eBay Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
*******************************************************************************/
package org.ebayopensource.dsf.jsdebugger.gui;
import javax.swing.event.TreeModelListener;
import javax.swing.tree.TreePath;
import org.ebayopensource.dsf.jsdi.ISession;
import org.ebayopensource.dsf.jsdi.IValue;
import org.ebayopensource.dsf.jsdi.IVariable;
public class VariableDataModel implements TreeTableModel {
/**
* Tree column names.
*/
private static final String[] cNames = { " Name", " Value" };
/**
* Tree column types.
*/
private static final Class[] cTypes = { TreeTableModel.class, String.class };
/**
* The root node.
*/
private IVariable m_root;
private ISession m_session;
/**
* Creates a new VariableModel.
*/
public VariableDataModel() {
}
/**
* Creates a new VariableModel.
*/
public VariableDataModel(IVariable root, ISession session) {
m_root = root;
m_session = session;
}
// TreeTableModel
/**
* Returns the root node of the tree.
*/
public Object getRoot() {
return m_root;
}
/**
* Returns the number of children of the given node.
*/
public int getChildCount(Object nodeObj) {
IVariable node = (IVariable) nodeObj;
return node.getValue().getMemberCount(m_session);
}
/**
* Returns a child of the given node.
*/
public Object getChild(Object nodeObj, int i) {
IVariable node = (IVariable) nodeObj;
return node.getValue().getMember(i, m_session);
}
/**
* Returns whether the given node is a leaf node.
*/
public boolean isLeaf(Object nodeObj) {
IVariable node = (IVariable) nodeObj;
IValue value = node.getValue();
return value.getMemberCount(m_session) == 0;
}
/**
* Returns the index of a node under its parent.
*/
public int getIndexOfChild(Object parentObj, Object childObj) {
IVariable parent = (IVariable) parentObj;
IVariable child = (IVariable) childObj;
IVariable[] children = parent.getValue().getMembers(m_session);
for (int i = 0; i != children.length; i++) {
if (children[i] == child) {
return i;
}
}
return -1;
}
/**
* Returns whether the given cell is editable.
*/
public boolean isCellEditable(Object node, int column) {
return column == 0;
}
/**
* Sets the value at the given cell.
*/
public void setValueAt(Object value, Object node, int column) {
}
/**
* Adds a TreeModelListener to this tree.
*/
public void addTreeModelListener(TreeModelListener l) {
}
/**
* Removes a TreeModelListener from this tree.
*/
public void removeTreeModelListener(TreeModelListener l) {
}
public void valueForPathChanged(TreePath path, Object newValue) {
}
// TreeTableNode
/**
* Returns the number of columns.
*/
public int getColumnCount() {
return cNames.length;
}
/**
* Returns the name of the given column.
*/
public String getColumnName(int column) {
return cNames[column];
}
/**
* Returns the type of value stored in the given column.
*/
public Class getColumnClass(int column) {
return cTypes[column];
}
/**
* Returns the value at the given cell.
*/
public Object getValueAt(Object nodeObj, int column) {
IVariable node = (IVariable)nodeObj;
switch (column) {
case 0: // Name
return node.getName();
case 1: // Value
String result;
try {
result = node.getValue().getObjectValueAsString(m_session);
} catch (RuntimeException exc) {
result = exc.getMessage();
if (result == null) {
exc.printStackTrace();
return null;
}
}
StringBuffer buf = new StringBuffer();
int len = result.length();
for (int i = 0; i < len; i++) {
char ch = result.charAt(i);
if (Character.isISOControl(ch)) {
ch = ' ';
}
buf.append(ch);
}
return buf.toString();
}
return null;
}
}
| [
"pwang@27f4aac7-f869-4a38-a8c2-f1a995e726e6"
] | pwang@27f4aac7-f869-4a38-a8c2-f1a995e726e6 |
00706767d0d74f17f49963b9eb441b4bbc4bfc44 | a422de59c29d077c512d66b538ff17d179cc077a | /hsxt/hsxt-es/hsxt-es-service/src/main/java/com/gy/hsxt/es/points/service/AccountQuotaService.java | 774549f6c03e82d60bdf53ebe81ac2ddf7de9669 | [] | no_license | liveqmock/hsxt | c554e4ebfd891e4cc3d57e920d8a79ecc020b4dd | 40bb7a1fe5c22cb5b4f1d700e5d16371a3a74c04 | refs/heads/master | 2020-03-28T14:09:31.939168 | 2018-09-12T10:20:46 | 2018-09-12T10:20:46 | 148,461,898 | 0 | 0 | null | 2018-09-12T10:19:11 | 2018-09-12T10:19:10 | null | UTF-8 | Java | false | false | 8,821 | java | /*
* Copyright (c) 2015-2018 SHENZHEN GUIYI SCIENCE AND TECHNOLOGY DEVELOP CO., LTD. All rights reserved.
*
* 注意:本内容仅限于深圳市归一科技研发有限公司内部传阅,禁止外泄以及用于其他的商业目的
*/
package com.gy.hsxt.es.points.service;
import java.math.BigDecimal;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gy.hsi.lc.client.log4j.SystemLog;
import com.gy.hsxt.bp.bean.BusinessCustParamItemsRedis;
import com.gy.hsxt.bp.client.api.BusinessParamSearch;
import com.gy.hsxt.common.constant.BusinessParam;
import com.gy.hsxt.common.constant.RespCode;
import com.gy.hsxt.common.exception.HsException;
import com.gy.hsxt.common.utils.DateUtil;
import com.gy.hsxt.es.common.Compute;
import com.gy.hsxt.es.common.EsTools;
/**
* @Package: com.gy.hsxt.ps.points.service
* @ClassName: AccountQuotaService
* @Description: 互生币支付限额
*
* @author: chenhz
* @date: 2015-12-30 下午2:35:53
* @version V3.0
*/
@Service
public class AccountQuotaService
{
/**
* 业务参数系统配置服务
*/
@Autowired
private BusinessParamSearch businessParamSearch;
// 当天日期
public static final String today = DateUtil
.DateToString(DateUtil.today(), DateUtil.DATE_FORMAT);
/**
* 消费者支付限额检查
*
* @param custId
* 消费者客户号
* @param amount
* 消费者支付金额
* @return
* @throws HsException
* @see com.gy.hsxt.ps.points.service.IAccountQuotaService#checkConsumerQuota()
*/
public boolean checkCustQuota(String custId, String amount) throws HsException
{
BigDecimal payAmount = new BigDecimal(amount);
Map<String,BusinessCustParamItemsRedis> custParamMap = businessParamSearch.searchCustParamItemsByGroup(custId);
// 获取单笔限额参数
BusinessCustParamItemsRedis singleQuotaParam = custParamMap.get(BusinessParam.CONSUMER_PAYMENT_MAX.getCode());
BigDecimal singleQuota = null;
if(singleQuotaParam != null && "Y".equals(singleQuotaParam.getIsActive()))
{
singleQuota = new BigDecimal(singleQuotaParam.getSysItemsValue());
}
// 获取每日限额参数
BusinessCustParamItemsRedis dailyQuotaParam = custParamMap.get(BusinessParam.CONSUMER_PAYMENT_DAY_MAX.getCode());
BigDecimal dailyQuota = null;
if(dailyQuotaParam != null && "Y".equals(dailyQuotaParam.getIsActive()))
{
dailyQuota = new BigDecimal(dailyQuotaParam.getSysItemsValue());
}
// // 获取互生币支付单日已经交易次数
// BusinessCustParamItemsRedis dailyFrequencyParam = businessParamSearch
// .searchCustParamItemsByIdKey(custId, BusinessParam.HSB_PAYMENT.getCode(),
// BusinessParam.CONSUMER_PAYMENT_DAY_NUMBER.getCode());
// int dailyFrequency = Integer.parseInt(dailyFrequencyParam.getSysItemsValue());
// 互生币支付单笔限额校验
if (singleQuota != null && payAmount.compareTo(singleQuota) == 1)
{
throw new HsException(RespCode.PS_HSB_CONSUMER_PAYMENT_MAX.getCode(), "互生币支付单笔金额已超限");
}
// 获得当天日期
// String today = DateUtil.DateToString(DateUtil.today(),
// DateUtil.DATE_FORMAT);
/**
* 业务描述判断更新日期是否是当天,是当天的日期就验证金额是否超限,支付次数是否超限.
* 否则更新日期不是当天的,就是第二天初次验证未恢复额度情况下放行不拦截, 同时在下面的处理上更新额度、次数
*/
if (!EsTools.isEmpty(dailyQuota) && dailyQuota.compareTo(BigDecimal.valueOf(0)) == 1)
{
// 获取当日已支付的信息
BusinessCustParamItemsRedis hadQuotaParam = businessParamSearch.searchCustParamItemsByIdKey(custId,BusinessParam.HAD_PAYMENT_DAY.getCode());
// 消费者互生币已支付额度
String dailyAlreadyAmount = hadQuotaParam == null?"0":hadQuotaParam.getSysItemsValue();
if (payAmount.compareTo(dailyQuota) == 1)
{
throw new HsException(RespCode.PS_HSB_CONSUMER_PAYMENT_DAY_MAX.getCode(), "互生币单日支付金额已超限");
}
if (!EsTools.isEmpty(hadQuotaParam.getDueDate()))
{
if (hadQuotaParam.getDueDate().equals(today))
{
// 判断当天支付金额已超限
if (!EsTools.isEmpty(dailyAlreadyAmount))
{
BigDecimal alreadyAmount = Compute.add(new BigDecimal(dailyAlreadyAmount),
payAmount);
if (alreadyAmount.compareTo(dailyQuota) == 1)
{
throw new HsException(RespCode.PS_HSB_CONSUMER_PAYMENT_DAY_MAX.getCode(), "互生币单日支付金额已超限");
}
}
}
}
}
/*if (dailyQuotaParam != null && !EsTools.isEmpty(dailyQuotaParam.getDueDate()))
{
if (dailyQuotaParam.getDueDate().equals(today))
{
// 消费者互生币已支付额度
String dailyAlreadyAmount = businessParamSearch.searchCustParamItemsByIdKey(custId,
BusinessParam.HAD_PAYMENT_DAY.getCode()).getSysItemsValue();
// 判断当天支付金额已超限
if (!EsTools.isEmpty(dailyAlreadyAmount))
{
BigDecimal alreadyAmount = Compute.add(new BigDecimal(dailyAlreadyAmount),
new BigDecimal(amount));
if (alreadyAmount.compareTo(dailyQuota) == 1)
{
throw new HsException(RespCode.PS_HSB_CONSUMER_PAYMENT_DAY_MAX.getCode(), "互生币单日支付金额已超限");
}
}
}
}*/
// if (!EsTools.isEmpty(dailyFrequencyParam.getDueDate()))
// {
// if (dailyFrequencyParam.getDueDate().equals(today))
// {
// // 互生币支付单日已经交易次数
// String dailyAlreadyFrequency = businessParamSearch.searchCustParamItemsByIdKey(
// custId, BusinessParam.HAD_PAYMENT_DAY_NUMBER.getCode()).getSysItemsValue();
// // 判断当天已经交易次数已超限
// if (!EsTools.isEmpty(dailyAlreadyFrequency))
// {
// if (dailyFrequency <= Integer.parseInt(dailyAlreadyFrequency))
// {
// throw new HsException(RespCode.PS_PARAM_ERROR.getCode(), "互生币单日支付次数已超限");
// }
// }
// }
// }
return true;
}
/**
* 消费者互生币支付限额处理
*
* @param custId
* 企业客户号
* @param amount
* 企业支付金额
* @throws HsException
* java.lang.String)
*/
public void quotaHandle(String custId, String amount) throws HsException
{
int count = 0;
BigDecimal alreadyAmount = new BigDecimal("0.00");
BusinessCustParamItemsRedis CustParam = new BusinessCustParamItemsRedis();
//start--modified by liuzh on 2016-05-18
// 消费者互生币已支付额度
/*
String dailyAlreadyAmount = businessParamSearch.searchCustParamItemsByIdKey(custId,
BusinessParam.HAD_PAYMENT_DAY.getCode()).getSysItemsValue();
*/
BusinessCustParamItemsRedis hadQuotaParam = businessParamSearch.searchCustParamItemsByIdKey(custId,BusinessParam.HAD_PAYMENT_DAY.getCode());
String dailyAlreadyAmount = hadQuotaParam.getSysItemsValue();
//要比较是否当日,当日就累计,非当日就从0计
if (!today.equals(hadQuotaParam.getDueDate())) {
dailyAlreadyAmount = "0";
}
SystemLog.debug(this.getClass().getName(), "quotaHandle","hadQuotaParam.getDueDate():" + hadQuotaParam.getDueDate()
+ ",dailyAlreadyAmount:" + dailyAlreadyAmount);
//end--modified by liuzh on 2016-05-18
if(!EsTools.isEmpty(dailyAlreadyAmount)){
alreadyAmount = new BigDecimal(dailyAlreadyAmount);
}
// 互生币支付单日已经交易次数
String dailyAlreadyFrequency = businessParamSearch.searchCustParamItemsByIdKey(custId,
BusinessParam.HAD_PAYMENT_DAY_NUMBER.getCode()).getSysItemsValue();
if(!EsTools.isEmpty(dailyAlreadyFrequency)){
count = Integer.parseInt(dailyAlreadyFrequency);
}
CustParam.setCustId(custId);
CustParam.setSysItemsKey(BusinessParam.HAD_PAYMENT_DAY.getCode());
// 更新单日互生币已支付金额
BigDecimal alreadyPayAmount = Compute.add(alreadyAmount, new BigDecimal(amount));
CustParam.setSysItemsValue(String.valueOf(alreadyPayAmount));
CustParam.setDueDate(today);
businessParamSearch.setBusinessCustParamItemsRed(CustParam);
CustParam.setCustId(custId);
CustParam.setSysItemsKey(BusinessParam.HAD_PAYMENT_DAY_NUMBER.getCode());
// 更新单日互生币已支付次数
CustParam.setSysItemsValue(String.valueOf(count + 1));
CustParam.setDueDate(today);
businessParamSearch.setBusinessCustParamItemsRed(CustParam);
}
}
| [
"864201042@qq.com"
] | 864201042@qq.com |
fce4b48a40c40e03ee8a6595cb8d2f37a8ab965c | 350736833b6be9d6ba7e3fe0a41b5fc60f1f0cb6 | /juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestHook.java | b1556cdc081e3cec5e5df1c3a1f95e05f9fe0f53 | [
"Apache-2.0"
] | permissive | jamesbognar/juneau | d798584365e8e948818810e20da844cb1ca35d39 | f45834e0f86475a3bbbddfc0f79851ed8974bcc1 | refs/heads/master | 2021-09-04T22:37:12.558014 | 2018-01-21T15:47:05 | 2018-01-21T15:47:05 | 56,869,710 | 0 | 1 | null | 2016-08-02T13:11:14 | 2016-04-22T16:27:24 | Java | UTF-8 | Java | false | false | 3,982 | java | // ***************************************************************************************************************************
// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
// * with the License. You may obtain a copy of the License at *
// * *
// * http://www.apache.org/licenses/LICENSE-2.0 *
// * *
// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
package org.apache.juneau.rest.annotation;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.*;
/**
* Identifies Java methods on a resource/servlet class that get invoked during particular lifecycle events of
* the servlet or REST call.
*
* <p>
* For example, if you want to add an initialization method to your resource:
* <p class='bcode'>
* <ja>@RestResource</ja>(...)
* <jk>public class</jk> MyResource {
*
* <jc>// Our database.</jc>
* <jk>private</jk> Map<Integer,Object> <jf>myDatabase</jf>;
*
* <ja>@RestHook</ja>(<jsf>INIT</jsf>)
* <jk>public void</jk> initMyDatabase(RestContextBuilder builder) <jk>throws</jk> Exception {
* <jf>myDatabase</jf> = <jk>new</jk> LinkedHashMap<>();
* }
* }
* </p>
*
* <p>
* Or if you want to intercept REST calls:
* <p class='bcode'>
* <ja>@RestResource</ja>(...)
* <jk>public class</jk> MyResource {
*
* <jc>// Add a request attribute to all incoming requests.</jc>
* <ja>@RestHook</ja>(<jsf>PRE_CALL</jsf>)
* <jk>public void</jk> onPreCall(RestRequest req) {
* req.setAttribute(<js>"foo"</js>, <js>"bar"</js>);
* }
* }
* </p>
*
* <p>
* The hook events can be broken down into two categories:
* <ul class='spaced-list'>
* <li>Resource lifecycle events:
* <ul>
* <li>{@link HookEvent#INIT INIT} - Right before initialization.
* <li>{@link HookEvent#POST_INIT POST_INIT} - Right after initialization.
* <li>{@link HookEvent#POST_INIT_CHILD_FIRST POST_INIT_CHILD_FIRST} - Right after initialization, but run child methods first.
* <li>{@link HookEvent#DESTROY DESTROY} - Right before servlet destroy.
* </ul>
* <li>REST call lifecycle events:
* <ul>
* <li>{@link HookEvent#START_CALL START_CALL} - At the beginning of a REST call.
* <li>{@link HookEvent#PRE_CALL PRE_CALL} - Right before the <ja>@RestMethod</ja> method is invoked.
* <li>{@link HookEvent#POST_CALL POST_CALL} - Right after the <ja>@RestMethod</ja> method is invoked.
* <li>{@link HookEvent#END_CALL END_CALL} - At the end of the REST call after the response has been flushed.
* </ul>
* </ul>
*
* <p>
* See the {@link HookEvent} class for information about individual event types.
*/
@Documented
@Target(METHOD)
@Retention(RUNTIME)
@Inherited
public @interface RestHook {
/**
* The lifecycle event.
*/
HookEvent value();
}
| [
"jamesbognar@apache.org"
] | jamesbognar@apache.org |
72f8e2a6ad9b75559c488c9fbbfd4e7263da31c3 | 1b350359a7fd77054dc87e1949fa27661625c7a3 | /src/main/java/pe/com/fisi/cenpro/sigeco/mgc/services/impl/HorarioClinicaServiceImpl.java | 0564e0fea7e0fd8190b3778af0171788a56ed55a | [] | no_license | JorgeMeza2106/SGC-LOCAL | fa8b738d976f0324e57861f224ad653ed681fcec | 5a878867b4cdcd0ba3a4251e459aaf45952eef2d | refs/heads/master | 2020-04-28T18:28:31.091767 | 2019-03-25T23:25:52 | 2019-03-25T23:25:52 | 175,479,682 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,314 | java | package pe.com.fisi.cenpro.sigeco.mgc.services.impl;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pe.com.fisi.cenpro.sigeco.mgc.repository.HorarioClinicaRepository;
import pe.com.fisi.cenpro.sigeco.mgc.services.HorarioClinicaService;
import pe.com.fisi.cenpro.sigeco.mgc.services.bo.HorarioClinicaAdministrativoBO;
import pe.com.fisi.cenpro.sigeco.mgc.services.bo.HorarioClinicaBO;
import pe.com.fisi.cenpro.sigeco.mgc.services.transformer.HorarioClinicaTransformer;
import pe.com.fisi.cenpro.sigeco.mgc.utils.DateUtil;
@Service
public class HorarioClinicaServiceImpl implements HorarioClinicaService {
@Autowired
private HorarioClinicaRepository horarioClinicaRepository;
@Override
public List<HorarioClinicaBO> obtenerTodosHorarios() {
return HorarioClinicaTransformer.transformObjectsToListBo(horarioClinicaRepository.obtenerHorarios());
}
@Override
public List<HorarioClinicaAdministrativoBO> buscarHorariosClinicosPorAdministrativo(String dniAdministrativo) {
return HorarioClinicaTransformer.transformToHorarioClinicaAdministrativoBO(
horarioClinicaRepository.buscarHorariosPorAdministrativo(dniAdministrativo));
}
@Override
public Optional<HorarioClinicaAdministrativoBO> buscarHorarioClinicoActualPorAdministrativo(
String dniAdministrativo, LocalDateTime fechaHoraRegistro) {
LocalTime horaActual = fechaHoraRegistro.toLocalTime();
LocalDate fechaActual = fechaHoraRegistro.toLocalDate();
List<HorarioClinicaAdministrativoBO> lsHorarioClinicaAdministrativoBO = buscarHorariosClinicosPorAdministrativo(
dniAdministrativo);
System.out.println("esto sera como yo diga: " + lsHorarioClinicaAdministrativoBO.stream().filter(hca ->
DateUtil.isBetween(horaActual, hca.getInicioTurno(), hca.getFinTurno().plusMinutes(45))
&& DateUtil.isSameDay(hca.getDiaHorarioClinica(), fechaActual))
.findFirst());
return lsHorarioClinicaAdministrativoBO.stream().filter(hca ->
DateUtil.isBetween(horaActual, hca.getInicioTurno(), hca.getFinTurno().plusMinutes(45))
&& DateUtil.isSameDay(hca.getDiaHorarioClinica(), fechaActual))
.findFirst();
}
}
| [
"carlos.llontop3@unmsm.edu.pe"
] | carlos.llontop3@unmsm.edu.pe |
1fd48b714d47823fe45ba9d677cb39f9a495cb80 | e6640144038dab496e868d28e324c3c72aaa0840 | /src/main/其他/t258/AddDigits.java | 2eaa6b6d405b05f0cf9f0f3838d1c093ffc7e995 | [] | no_license | sotowang/leetcode | f8de0530521eb864b07509ae45c5c916341b5f12 | 83970f766c95ea8dd84b187dd583ee1ac6ee330e | refs/heads/master | 2021-12-01T01:32:50.646299 | 2021-11-15T13:25:37 | 2021-11-15T13:25:37 | 207,312,983 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 292 | java | package 其他.t258;
/**
* @auther: sotowang
* @date: 2019/12/16 15:35
*/
public class AddDigits {
public int addDigits(int num) {
return (num - 1) % 9 + 1;
}
public static void main(String[] args) {
System.out.println(new AddDigits().addDigits(38));
}
}
| [
"sotowang@qq.com"
] | sotowang@qq.com |
c0dc8c3421d8292f258a960a97d06fcb78e384c6 | 9926a6a4ac88171c98b07b848f5861728fd18239 | /.history/taxFiling_20211031184631.java | b9ac3a4b421a609fc7150dc5aac0e42cba8b39b2 | [] | no_license | magikflowz/JavaAssignments | 4dadee2f0f23d581f94c998680ab188c1247013c | a4f01f60cedd08dd216841ba98fadac9c09bbe76 | refs/heads/master | 2023-08-28T13:08:43.877417 | 2021-11-02T10:47:55 | 2021-11-02T10:47:55 | 423,601,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,719 | java | public class taxFiling {
String name;
int Income;
String Status;
public taxFiling(String name, int Income, String Status)
{
this.name = name;
this.Income = Income;
this.Status = Status;
}
public String Single(String Name, int Income){
double tax = 0;
if(Income >=0 && Income <= 9750){
tax = .1;
}
if(Income >= 9701 && Income <=39475){
tax = .12;
}
if(Income >= 39476 && Income <= 82200){
tax = .22;
}
if(Income >= 82201 && Income <= 160725){
tax = .24;
}
if(Income >= 160726 && Income <= 204100){
tax = .32;
}
if(Income >= 204101 && Income <= 510300){
tax = .35;
}
if(Income >= 510301){
tax = .37;
}
tax = (Income/100)*tax;
return (name+", the federal income tax for an annual salary of "+Income+" for single status "+tax);
}
public String headofHousehold(String name, int Income, String Status){
double tax = 0;
if(Income >= 0 && Income <= 13850){
tax = .1;
}
if(Income >= 13851 && Income <= 52850){
tax = .12;
}
if(Income >= 52851 && Income <= 84200){
tax = .22;
}
if(Income >= 84201 && Income <= 160700){
tax = .24;
}
if(Income >= 160701 && Income <= 204100){
tax = .32;
}
if(Income >= 204101 && Income <= 510300){
tax = .35;
}
if(Income >= 510301){
tax = .37;
}
tax = (Income/100)*tax;
return (name+", the federal income tax for an annual salary of "+Income+" for a household status filer is "+tax);
}
public String marriedJointly(String name, int Income){
double tax = 0;
if(Income >=0 && Income<=19400){
tax = .1;
}
if(Income >= 19401 && Income <= 78950){
tax = .12;
}
if(Income >= 78951 && Income <= 168400){
tax = .22;
}
if(Income >= 168401 && Income <= 321450){
tax = .24;
}
if(Income >= 321451 && Income<=408200){
tax = .32;
}
if(Income >= 408201 && Income<=612350){
tax = .35;
}
if(Income >= 612351){
tax = .37;
}
tax = (Income/100)*tax;
return (name+", the federal income tax for an annual salary of "+Income+" for a married status filer is "+tax);
}
public String marriedSeparately(String name, int Income){
}
}
| [
"75277480+ImNotMagik@users.noreply.github.com"
] | 75277480+ImNotMagik@users.noreply.github.com |
d1569594f5500d485e136171b4eee92f1af990cd | e333da64200154a52c50541974c3e26da8290e02 | /tensquare_qa/src/main/java/com/tensquare/qa/controller/BaseExceptionHandler.java | a48db9d472da61f0c6ce5e6ac8df9674af1a0261 | [] | no_license | lyfGeek/tensquare_geek | 4b363073bd7038201a1a6e68396434ba4059e72f | 9a9579c0ff897fad820b4b8b15a3c3a0e5f4d662 | refs/heads/master | 2023-01-13T07:51:49.269453 | 2020-11-10T15:13:10 | 2020-11-14T04:21:01 | 312,740,708 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 582 | java | package com.tensquare.qa.controller;
import entity.Result;
import entity.StatusCode;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* 统一异常处理类。
*/
@ControllerAdvice
public class BaseExceptionHandler {
@ExceptionHandler(value = Exception.class)
@ResponseBody
public Result error(Exception e) {
e.printStackTrace();
return new Result(false, StatusCode.ERROR, "执行出错。");
}
}
| [
"YifanLiGeek@gmail.com"
] | YifanLiGeek@gmail.com |
864bc55b8d4fc5b01c51b5d674c30f9f65d37433 | 4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849 | /aliyun-java-sdk-computenestsupplier/src/main/java/com/aliyuncs/computenestsupplier/transform/v20210521/ListServiceInstancesResponseUnmarshaller.java | 0b27229d5f51fb856c4ab2143031ab40bd687ec9 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-java-sdk | a263fa08e261f12d45586d1b3ad8a6609bba0e91 | e19239808ad2298d32dda77db29a6d809e4f7add | refs/heads/master | 2023-09-03T12:28:09.765286 | 2023-09-01T09:03:00 | 2023-09-01T09:03:00 | 39,555,898 | 1,542 | 1,317 | NOASSERTION | 2023-09-14T07:27:05 | 2015-07-23T08:41:13 | Java | UTF-8 | Java | false | false | 7,522 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.computenestsupplier.transform.v20210521;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.computenestsupplier.model.v20210521.ListServiceInstancesResponse;
import com.aliyuncs.computenestsupplier.model.v20210521.ListServiceInstancesResponse.ServiceInstance;
import com.aliyuncs.computenestsupplier.model.v20210521.ListServiceInstancesResponse.ServiceInstance.Service;
import com.aliyuncs.computenestsupplier.model.v20210521.ListServiceInstancesResponse.ServiceInstance.Service.ServiceInfo;
import com.aliyuncs.computenestsupplier.model.v20210521.ListServiceInstancesResponse.ServiceInstance.Tag;
import com.aliyuncs.transform.UnmarshallerContext;
public class ListServiceInstancesResponseUnmarshaller {
public static ListServiceInstancesResponse unmarshall(ListServiceInstancesResponse listServiceInstancesResponse, UnmarshallerContext _ctx) {
listServiceInstancesResponse.setRequestId(_ctx.stringValue("ListServiceInstancesResponse.RequestId"));
listServiceInstancesResponse.setNextToken(_ctx.stringValue("ListServiceInstancesResponse.NextToken"));
listServiceInstancesResponse.setTotalCount(_ctx.integerValue("ListServiceInstancesResponse.TotalCount"));
listServiceInstancesResponse.setMaxResults(_ctx.stringValue("ListServiceInstancesResponse.MaxResults"));
List<ServiceInstance> serviceInstances = new ArrayList<ServiceInstance>();
for (int i = 0; i < _ctx.lengthValue("ListServiceInstancesResponse.ServiceInstances.Length"); i++) {
ServiceInstance serviceInstance = new ServiceInstance();
serviceInstance.setStatus(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Status"));
serviceInstance.setUpdateTime(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].UpdateTime"));
serviceInstance.setName(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Name"));
serviceInstance.setServiceInstanceId(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].ServiceInstanceId"));
serviceInstance.setCreateTime(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].CreateTime"));
serviceInstance.setUserId(_ctx.longValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].UserId"));
serviceInstance.setParameters(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Parameters"));
serviceInstance.setProgress(_ctx.longValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Progress"));
serviceInstance.setStatusDetail(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].StatusDetail"));
serviceInstance.setTemplateName(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].TemplateName"));
serviceInstance.setOperatedServiceInstanceId(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].OperatedServiceInstanceId"));
serviceInstance.setOperationStartTime(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].OperationStartTime"));
serviceInstance.setOperationEndTime(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].OperationEndTime"));
serviceInstance.setEnableInstanceOps(_ctx.booleanValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].EnableInstanceOps"));
serviceInstance.setSource(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Source"));
serviceInstance.setEndTime(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].EndTime"));
serviceInstance.setServiceType(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].ServiceType"));
serviceInstance.setPayType(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].PayType"));
serviceInstance.setIsOperated(_ctx.booleanValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].IsOperated"));
Service service = new Service();
service.setStatus(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.Status"));
service.setPublishTime(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.PublishTime"));
service.setVersion(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.Version"));
service.setDeployType(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.DeployType"));
service.setServiceId(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.ServiceId"));
service.setSupplierUrl(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.SupplierUrl"));
service.setServiceType(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.ServiceType"));
service.setSupplierName(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.SupplierName"));
service.setVersionName(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.VersionName"));
service.setDeployMetadata(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.DeployMetadata"));
service.setEnablePrivateVpcConnection(_ctx.booleanValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.EnablePrivateVpcConnection"));
List<ServiceInfo> serviceInfos = new ArrayList<ServiceInfo>();
for (int j = 0; j < _ctx.lengthValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.ServiceInfos.Length"); j++) {
ServiceInfo serviceInfo = new ServiceInfo();
serviceInfo.setLocale(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.ServiceInfos["+ j +"].Locale"));
serviceInfo.setImage(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.ServiceInfos["+ j +"].Image"));
serviceInfo.setName(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.ServiceInfos["+ j +"].Name"));
serviceInfo.setShortDescription(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Service.ServiceInfos["+ j +"].ShortDescription"));
serviceInfos.add(serviceInfo);
}
service.setServiceInfos(serviceInfos);
serviceInstance.setService(service);
List<Tag> tags = new ArrayList<Tag>();
for (int j = 0; j < _ctx.lengthValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Tags.Length"); j++) {
Tag tag = new Tag();
tag.setKey(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Tags["+ j +"].Key"));
tag.setValue(_ctx.stringValue("ListServiceInstancesResponse.ServiceInstances["+ i +"].Tags["+ j +"].Value"));
tags.add(tag);
}
serviceInstance.setTags(tags);
serviceInstances.add(serviceInstance);
}
listServiceInstancesResponse.setServiceInstances(serviceInstances);
return listServiceInstancesResponse;
}
} | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
b7376349be95ad3c14652a9c6d90f72dc7fb022b | b3b112efc462ea58e1a3aa0c345701d6a407be22 | /Examples/Java/SDK/src/main/java/com/aspose/cells/cloud/examples/pictures/ConvertPictureToImageWorksheet.java | 2461a29f438e84502b69068b8fef6358dd25e2b1 | [] | no_license | sohail-aspose/Aspose_Cells_Cloud | c12e60cf0ce3cc4162b3ce6d52cad1eabbe202c3 | 532990f882a6811a18018690d22bf16c71f3706c | refs/heads/master | 2021-01-18T05:31:02.212322 | 2015-10-12T08:41:56 | 2015-10-12T08:41:56 | 44,082,986 | 0 | 0 | null | 2015-10-12T03:52:12 | 2015-10-12T03:52:12 | null | UTF-8 | Java | false | false | 1,264 | java | package com.aspose.cells.cloud.examples.pictures;
import com.aspose.cells.cloud.examples.Common;
import com.aspose.cells.model.ResponseMessage;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
public class ConvertPictureToImageWorksheet {
public static void main(String... args) throws IOException {
String input = "sample1.xlsx";
Path inputFile = Common.getPath(ConvertPictureToImageWorksheet.class, input);
String output = "output.png";
Path outputFile = Common.getPath(ConvertPictureToImageWorksheet.class, output);
String sheetName = "Sheet1";
Integer pictureNumber = 0;
String format = "png";
Common.getStorageSdk().PutCreate(
input,
null,
Common.STORAGE,
inputFile.toFile()
);
ResponseMessage sr = Common.getCellsSdk().GetWorksheetPictureWithFormat(
input,
sheetName,
pictureNumber,
format,
Common.STORAGE,
Common.FOLDER
);
Files.copy(sr.getInputStream(), outputFile, StandardCopyOption.REPLACE_EXISTING);
}
}
| [
"saqib@masood.pk"
] | saqib@masood.pk |
5d9b9fb3986aebf2472456205489678bd86e35a9 | b95ee8022eab9c6671a12b0313cb7e0e7aa5f36c | /cglib-proxy/src/main/java/com/hz/v3/callbackFilter/MyCallbackFilter.java | 072a4315683c8169052d717061c372b7ca88a777 | [] | no_license | mp2930696631/newStart | c10f399a8e1ae04404d806ed9a5249b68cfa09a1 | bc3a05c52081826af099201a4434d44190e81937 | refs/heads/main | 2023-03-14T13:23:44.439150 | 2021-03-08T07:44:52 | 2021-03-08T07:44:52 | 306,849,648 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 539 | java | package com.hz.v3.callbackFilter;
import net.sf.cglib.proxy.CallbackFilter;
import java.lang.reflect.Method;
/**
* @author zehua
* @date 2021/2/18 12:16
*/
public class MyCallbackFilter implements CallbackFilter {
@Override
public int accept(Method method) {
final Class<?> declaringClass = method.getDeclaringClass();
if (declaringClass.isInterface()) {
return 1;
} else if (declaringClass == Object.class) {
return 2;
} else {
return 0;
}
}
}
| [
"891393221@qq.com"
] | 891393221@qq.com |
beb7e025fa7f76806cba9d64fa4faa1eef8bf349 | 5e1da9684bb5d9dda590445bb95ef513147d23b4 | /zt-order/zt-order-service/src/main/java/com/zsyc/zt/order/inca/mapper/BmsCloudEmployeeMapper.java | ae7182c96006ae4e3c807bc4d6faf6b9f3f5233d | [] | no_license | liutaota/b2b2 | 4df87e2d3f7597bf36334112e3203bf92deba6c8 | 3d71bd4062170e5c99e5e59d7dd10f3a8c00a5fd | refs/heads/master | 2023-03-15T11:10:38.699907 | 2021-03-05T08:13:15 | 2021-03-05T08:13:15 | 344,737,055 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 311 | java | package com.zsyc.zt.order.inca.mapper;
import com.zsyc.zt.order.entity.BmsCloudEmployee;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author peiqy
* @since 2020-08-18
*/
public interface BmsCloudEmployeeMapper extends BaseMapper<BmsCloudEmployee> {
}
| [
"liutao@qq.com"
] | liutao@qq.com |
0e51b005756169546dbfa4318bfd170075229d15 | 5741045375dcbbafcf7288d65a11c44de2e56484 | /reddit-decompilada/kotlin/reflect/jvm/internal/impl/load/java/lazy/TypeParameterResolver.java | 18d78eeb589afdccc9eb34b0aeabc9095c3cbb88 | [] | no_license | miarevalo10/ReporteReddit | 18dd19bcec46c42ff933bb330ba65280615c281c | a0db5538e85e9a081bf268cb1590f0eeb113ed77 | refs/heads/master | 2020-03-16T17:42:34.840154 | 2018-05-11T10:16:04 | 2018-05-11T10:16:04 | 132,843,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 904 | java | package kotlin.reflect.jvm.internal.impl.load.java.lazy;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaTypeParameter;
/* compiled from: resolvers.kt */
public interface TypeParameterResolver {
/* compiled from: resolvers.kt */
public static final class EMPTY implements TypeParameterResolver {
public static final EMPTY f32713a = null;
public final TypeParameterDescriptor mo5779a(JavaTypeParameter javaTypeParameter) {
Intrinsics.m26847b(javaTypeParameter, "javaTypeParameter");
return null;
}
static {
EMPTY empty = new EMPTY();
}
private EMPTY() {
f32713a = this;
}
}
TypeParameterDescriptor mo5779a(JavaTypeParameter javaTypeParameter);
}
| [
"mi.arevalo10@uniandes.edu.co"
] | mi.arevalo10@uniandes.edu.co |
256526cffc0f6dacfe4515339cf8abdc99aa9b67 | 516fb367430d4c1393f4cd726242618eca862bda | /sources/com/google/android/gms/internal/ads/zzwr.java | 9ffc672eb6100ac0e33aca33c9d180b28fa13e98 | [] | no_license | cmFodWx5YWRhdjEyMTA5/Gaana2 | 75d6d6788e2dac9302cff206a093870e1602921d | 8531673a5615bd9183c9a0466325d0270b8a8895 | refs/heads/master | 2020-07-22T15:46:54.149313 | 2019-06-19T16:11:11 | 2019-06-19T16:11:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,229 | java | package com.google.android.gms.internal.ads;
import android.os.RemoteException;
import android.view.View;
import com.google.android.gms.dynamic.ObjectWrapper;
import java.util.HashMap;
final class zzwr extends zzwt<zzadk> {
private final /* synthetic */ zzwj zzclc;
private final /* synthetic */ View zzclf;
private final /* synthetic */ HashMap zzclg;
private final /* synthetic */ HashMap zzclh;
zzwr(zzwj zzwj, View view, HashMap hashMap, HashMap hashMap2) {
this.zzclc = zzwj;
this.zzclf = view;
this.zzclg = hashMap;
this.zzclh = hashMap2;
}
/* Access modifiers changed, original: protected|final|synthetic */
public final /* synthetic */ Object zzpq() {
zzwj.zza(this.zzclf.getContext(), "native_ad_view_holder_delegate");
return new zzzp();
}
public final /* synthetic */ Object zzpr() throws RemoteException {
return this.zzclc.zzcky.zzb(this.zzclf, this.zzclg, this.zzclh);
}
public final /* synthetic */ Object zza(zzxw zzxw) throws RemoteException {
return zzxw.createNativeAdViewHolderDelegate(ObjectWrapper.wrap(this.zzclf), ObjectWrapper.wrap(this.zzclg), ObjectWrapper.wrap(this.zzclh));
}
}
| [
"master@master.com"
] | master@master.com |
e0e91c7105bc548bbd6bde7445e89250c7c767f7 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module1613_public/tests/more/src/java/module1613_public_tests_more/a/IFoo1.java | 4083dd0e80e8ba0cee6d71f626253e90e01f2294 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 853 | java | package module1613_public_tests_more.a;
import java.rmi.*;
import java.nio.file.*;
import java.sql.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.util.logging.Filter
* @see java.util.zip.Deflater
* @see javax.annotation.processing.Completion
*/
@SuppressWarnings("all")
public interface IFoo1<Z> extends module1613_public_tests_more.a.IFoo0<Z> {
javax.lang.model.AnnotatedConstruct f0 = null;
javax.management.Attribute f1 = null;
javax.naming.directory.DirContext f2 = null;
String getName();
void setName(String s);
Z get();
void set(Z e);
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
0231d7045836c816f60ad624cedcdaafdeeaca51 | cc70f0eac152553f0744954a1c4da8af67faa5ab | /PPA/src/examples/AES/class_1268.java | 60fa9ba5312b183fd2423d344749a1968519a217 | [] | no_license | islamazhar/Detecting-Insecure-Implementation-code-snippets | b49b418e637a2098027e6ce70c0ddf93bc31643b | af62bef28783c922a8627c62c700ef54028b3253 | refs/heads/master | 2023-02-01T10:48:31.815921 | 2020-12-11T00:21:40 | 2020-12-11T00:21:40 | 307,543,127 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,730 | java | package examples.AES;
public class class_1268 {
SecretKeySpec key = null;
byte[] ciphertext;
public void generateKey() {
String passphrase = "3xtr3meDiFficUltp@ss";
MessageDigest digest = null;
try {
digest = MessageDigest.getInstance("SHA");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
digest.update(passphrase.getBytes());
key = new SecretKeySpec(digest.digest(), 0, 16, "AES");
byte[] keyBytes = key.getEncoded();
}
public byte[] encrypt(String string) {
Cipher aes = null;
try {
aes = Cipher.getInstance("AES/ECB/PKCS5Padding");
aes.init(Cipher.ENCRYPT_MODE, key);
ciphertext = aes.doFinal(string.getBytes());
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
}
return ciphertext;
}
public String decrypt(byte[] ciphertext) {
Cipher aes = null;
String cleartext =null;
try {
aes = Cipher.getInstance("AES/ECB/PKCS5Padding");
aes.init(Cipher.DECRYPT_MODE, key);
cleartext = new String(aes.doFinal(ciphertext));
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
}
return cleartext;
}
}
| [
"mislam9@wisc.edu"
] | mislam9@wisc.edu |
0edf189404a0be31d3b47330f286c5234a61f456 | 6c54ea57ff47b9aad414627b972268623134d1f4 | /TSS.Java/src/tss/tpm/FirmwareReadResponse.java | 03c742fbdebf13ce690a92a29f28a1999d0f38d2 | [
"MIT"
] | permissive | raghuncstate/TSS.MSR | c7f062fccbd1c05ac2433e7badb1942c5a996cd3 | 50b9c36d09d5cae89a965f2fc65c58ad29fe1732 | refs/heads/master | 2021-05-15T10:36:59.454709 | 2018-05-14T06:32:22 | 2018-05-14T06:32:22 | 108,195,473 | 0 | 0 | MIT | 2018-04-30T17:04:44 | 2017-10-24T23:34:50 | C++ | UTF-8 | Java | false | false | 2,344 | java | package tss.tpm;
import tss.*;
// -----------This is an auto-generated file: do not edit
//>>>
/**
* This command is used to read a copy of the current firmware installed in the TPM.
*/
public class FirmwareReadResponse extends TpmStructure
{
/**
* This command is used to read a copy of the current firmware installed in the TPM.
*
* @param _fuData field upgrade image data
*/
public FirmwareReadResponse(byte[] _fuData)
{
fuData = _fuData;
}
/**
* This command is used to read a copy of the current firmware installed in the TPM.
*/
public FirmwareReadResponse() {};
/**
* size of the buffer
*/
// private short fuDataSize;
/**
* field upgrade image data
*/
public byte[] fuData;
@Override
public void toTpm(OutByteBuf buf)
{
buf.writeInt((fuData!=null)?fuData.length:0, 2);
if(fuData!=null)
buf.write(fuData);
}
@Override
public void initFromTpm(InByteBuf buf)
{
int _fuDataSize = buf.readInt(2);
fuData = new byte[_fuDataSize];
buf.readArrayOfInts(fuData, 1, _fuDataSize);
}
@Override
public byte[] toTpm()
{
OutByteBuf buf = new OutByteBuf();
toTpm(buf);
return buf.getBuf();
}
public static FirmwareReadResponse fromTpm (byte[] x)
{
FirmwareReadResponse ret = new FirmwareReadResponse();
InByteBuf buf = new InByteBuf(x);
ret.initFromTpm(buf);
if (buf.bytesRemaining()!=0)
throw new AssertionError("bytes remaining in buffer after object was de-serialized");
return ret;
}
public static FirmwareReadResponse fromTpm (InByteBuf buf)
{
FirmwareReadResponse ret = new FirmwareReadResponse();
ret.initFromTpm(buf);
return ret;
}
@Override
public String toString()
{
TpmStructurePrinter _p = new TpmStructurePrinter("TPM2_FirmwareRead_RESPONSE");
toStringInternal(_p, 1);
_p.endStruct();
return _p.toString();
}
@Override
public void toStringInternal(TpmStructurePrinter _p, int d)
{
_p.add(d, "byte", "fuData", fuData);
};
};
//<<<
| [
"Andrey.Marochko@microsoft.com"
] | Andrey.Marochko@microsoft.com |
95095b1f5407378d54272a90959755f4d8aa2327 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/third-party/other/external-module-0811/src/java/external_module_0811/a/IFoo1.java | 7e1a9b0bb23f418ad6b9a5d8362a21da8cd2ada1 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 816 | java | package external_module_0811.a;
import java.util.zip.*;
import javax.annotation.processing.*;
import javax.lang.model.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.awt.datatransfer.DataFlavor
* @see java.beans.beancontext.BeanContext
* @see java.io.File
*/
@SuppressWarnings("all")
public interface IFoo1<R> extends external_module_0811.a.IFoo0<R> {
java.rmi.Remote f0 = null;
java.nio.file.FileStore f1 = null;
java.sql.Array f2 = null;
String getName();
void setName(String s);
R get();
void set(R e);
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
1edb4ff0576ef8ec4dcecd5865faec62b96e79bf | 4b7b7dc6497cb7b7af05a72d1936b0f1b5f4c10e | /java/tests/integrationtests/com/google/idea/blaze/java/libraries/LoggedJarCacheDirectoryTest.java | 57c896857c3555b3c5f16211a8a54ca0909c22d4 | [
"Apache-2.0"
] | permissive | bhavu24/bazelbuild-intellij | 04ab38c35dc56903f7341d75b677d382e1963b19 | a878bf6d430bf4bdf0eacf1a2208a6bcc43beaab | refs/heads/master | 2023-07-14T08:03:41.733433 | 2021-08-31T09:08:51 | 2021-08-31T09:09:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,234 | java | /*
* Copyright 2021 The Bazel Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.idea.blaze.java.libraries;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth8.assertThat;
import static org.mockito.Mockito.when;
import com.google.idea.blaze.base.logging.LoggedDirectoryProvider;
import com.google.idea.blaze.base.logging.LoggedDirectoryProvider.LoggedDirectory;
import com.google.idea.blaze.base.settings.BlazeImportSettings;
import com.google.idea.blaze.base.settings.BlazeImportSettingsManager;
import com.google.idea.blaze.base.settings.BuildSystem;
import com.google.idea.blaze.java.libraries.JarCacheFolderProvider.LoggedJarCacheDirectory;
import com.google.idea.testing.IntellijRule;
import java.util.Optional;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
/** Tests for {@link LoggedJarCacheDirectory}. */
@RunWith(JUnit4.class)
public class LoggedJarCacheDirectoryTest {
@Rule public final IntellijRule intellij = new IntellijRule();
@Rule public final MockitoRule mockito = MockitoJUnit.rule();
@Rule public final TemporaryFolder temporaryFolder = new TemporaryFolder();
@Mock private JarCacheFolderProvider jarCacheFolderProvider;
@Mock private BlazeImportSettingsManager importSettingsManager;
private final LoggedDirectoryProvider directoryProvider = new LoggedJarCacheDirectory();
@Before
public void setUp() throws Exception {
intellij.registerProjectService(JarCacheFolderProvider.class, jarCacheFolderProvider);
intellij.registerProjectService(BlazeImportSettingsManager.class, importSettingsManager);
when(jarCacheFolderProvider.isJarCacheFolderReady()).thenReturn(true);
when(jarCacheFolderProvider.getJarCacheFolder()).thenReturn(temporaryFolder.getRoot());
setBuildSystemTo(BuildSystem.Bazel);
}
@Test
public void getLoggedDirectory_whenJarCacheFolderNotReady_returnsNothing() {
when(jarCacheFolderProvider.isJarCacheFolderReady()).thenReturn(false);
Optional<LoggedDirectory> loggedDirectory =
directoryProvider.getLoggedDirectory(intellij.getProject());
assertThat(loggedDirectory).isEmpty();
}
@Test
public void getLoggedDirectory_hasADirectory() {
when(jarCacheFolderProvider.isJarCacheFolderReady()).thenReturn(true);
when(jarCacheFolderProvider.getJarCacheFolder()).thenReturn(temporaryFolder.getRoot());
Optional<LoggedDirectory> loggedDirectory =
directoryProvider.getLoggedDirectory(intellij.getProject());
assertThat(loggedDirectory).isPresent();
assertThat(loggedDirectory.get().path()).isEqualTo(temporaryFolder.getRoot().toPath());
}
@Test
public void getLoggedDirectory_hasCorrectPurpose() {
Optional<LoggedDirectory> loggedDirectory =
directoryProvider.getLoggedDirectory(intellij.getProject());
assertThat(loggedDirectory).isPresent();
assertThat(loggedDirectory.get().purpose()).isEqualTo("Jar cache");
}
@Test
public void getLoggedDirectory_hasThePluginAsOriginatingIdePart() {
setBuildSystemTo(BuildSystem.Blaze);
Optional<LoggedDirectory> loggedDirectory =
directoryProvider.getLoggedDirectory(intellij.getProject());
assertThat(loggedDirectory).isPresent();
assertThat(loggedDirectory.get().originatingIdePart()).isEqualTo("Blaze plugin");
}
@Test
public void getLoggedDirectory_originatingIdePartIsSensitiveToBuildSystem() {
setBuildSystemTo(BuildSystem.Bazel);
Optional<LoggedDirectory> bazelDirectory =
directoryProvider.getLoggedDirectory(intellij.getProject());
setBuildSystemTo(BuildSystem.Blaze);
Optional<LoggedDirectory> blazeDirectory =
directoryProvider.getLoggedDirectory(intellij.getProject());
assertThat(bazelDirectory).isPresent();
assertThat(bazelDirectory.get().originatingIdePart()).contains("Bazel");
assertThat(blazeDirectory).isPresent();
assertThat(blazeDirectory.get().originatingIdePart()).contains("Blaze");
}
private void setBuildSystemTo(BuildSystem buildSystem) {
BlazeImportSettings settings = createSettings(buildSystem);
when(importSettingsManager.getImportSettings()).thenReturn(settings);
}
private static BlazeImportSettings createSettings(BuildSystem buildSystem) {
return new BlazeImportSettings(
/* workspaceRoot= */ "",
/* projectName= */ "",
/* projectDataDirectory= */ "",
/* projectViewFile= */ "",
buildSystem);
}
}
| [
"copybara-worker@google.com"
] | copybara-worker@google.com |
9351cdc913093e9e9ac1ee0842a318cab8582531 | fd3e4cc20a58c2a46892b3a38b96d5e2303266d8 | /src/main/java/com/amap/api/services/route/Path.java | 4b9c1814e1d0205ac2a7060d1decf2a29343474e | [] | no_license | makewheels/AnalyzeBusDex | 42ef50f575779b66bd659c096c57f94dca809050 | 3cb818d981c7bc32c3cbd8c046aa78cd38b20e8a | refs/heads/master | 2021-10-22T07:16:40.087139 | 2019-03-09T03:11:05 | 2019-03-09T03:11:05 | 173,123,231 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 985 | java | package com.amap.api.services.route;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
public class Path implements Parcelable {
public static final Creator<Path> CREATOR = new C0536i();
/* renamed from: a */
private float f3168a;
/* renamed from: b */
private long f3169b;
public float getDistance() {
return this.f3168a;
}
public void setDistance(float f) {
this.f3168a = f;
}
public long getDuration() {
return this.f3169b;
}
public void setDuration(long j) {
this.f3169b = j;
}
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel parcel, int i) {
parcel.writeFloat(this.f3168a);
parcel.writeLong(this.f3169b);
}
public Path(Parcel parcel) {
this.f3168a = parcel.readFloat();
this.f3169b = parcel.readLong();
}
}
| [
"spring@qbserver.cn"
] | spring@qbserver.cn |
4cdd6c77eaa8027f4e6901c1ae7654ed1021999d | 5e518e80a8be4bc6ce2d9b7067500ff71707864f | /java/spring/aggregator/data/src/test/java/com/github/signed/sandboxes/spring/data/H2Configuration.java | 495be4b494151698ba19291b2df11b3d3af7eaa3 | [] | no_license | signed/sandboxes | 7a510b4ee421f0eb9478dac2e0f952ab6dd4ce41 | a662ff7e5483b75ac52a1c356effe9bedf83b4f7 | refs/heads/master | 2023-08-17T04:06:51.490936 | 2023-08-15T19:42:55 | 2023-08-15T19:42:55 | 4,309,543 | 1 | 0 | null | 2014-06-01T10:01:47 | 2012-05-12T20:34:47 | Java | UTF-8 | Java | false | false | 2,026 | java | package com.github.signed.sandboxes.spring.data;
import com.github.signed.sandboxes.spring.data.bg.Job;
import com.github.signed.sandboxes.spring.data.customers.Customer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.Database;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import java.util.Map;
@Configuration
@EnableJpaRepositories
@EnableTransactionManagement
public class H2Configuration {
@Bean
public DataSource dataSource() {
return new EmbeddedDatabaseBuilder()
.setType(EmbeddedDatabaseType.H2)
.ignoreFailedDrops(true)
.build();
}
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource, JpaVendorAdapter jpaVendorAdapter) {
LocalContainerEntityManagerFactoryBean lef = new LocalContainerEntityManagerFactoryBean();
lef.setDataSource(dataSource);
lef.setJpaVendorAdapter(jpaVendorAdapter);
lef.setPackagesToScan(Customer.class.getPackage().getName(), Job.class.getPackage().getName());
return lef;
}
@Bean
public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
return new JpaTransactionManager(entityManagerFactory);
}
}
| [
"thomas.heilbronner@gmail.com"
] | thomas.heilbronner@gmail.com |
fc4884c1fbf61ec5cf93850fbed20d412cb12d42 | 488fbd59bf87b00175d1498862e0d02264e491cf | /ratpack-core/src/main/java/org/ratpackframework/http/internal/DefaultMediaType.java | 4f22e7ecfdaa192a7fb1dffbfcf2e001fa80da82 | [
"Apache-2.0"
] | permissive | scullxbones/ratpack | 8bb38d96b1f1ef2055c30e6e208a278fd3a30e26 | 87bac418abd110690cba84e8634348d4eb11c5cc | refs/heads/master | 2021-01-16T21:27:45.388101 | 2013-08-06T19:00:53 | 2013-08-06T19:00:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,787 | java | /*
* Copyright 2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ratpackframework.http.internal;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.collect.ImmutableMap;
import org.ratpackframework.http.MediaType;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
public class DefaultMediaType implements MediaType {
public static final String DEFAULT_CHARSET = "ISO-8859-1";
public static final String UTF8 = "UTF-8";
public static final String CHARSET_KEY = "charset";
private final String type;
protected final Map<String, String> params;
private final String string;
private static final int CACHE_SIZE = 200;
private static final Cache<String, MediaType> ISO_CACHE = CacheBuilder.newBuilder().maximumSize(CACHE_SIZE).build();
private static final Cache<String, MediaType> UTF8_CACHE = CacheBuilder.newBuilder().maximumSize(CACHE_SIZE).build();
public static MediaType get(final String contentType) {
return fromCache(ISO_CACHE, contentType, DEFAULT_CHARSET);
}
public static MediaType utf8(final String contentType) {
return fromCache(UTF8_CACHE, contentType, UTF8);
}
private static MediaType fromCache(final Cache<String, MediaType> cache, String contentType, final String defaultCharset) {
if (contentType == null) {
contentType = "";
} else {
contentType = contentType.trim();
}
final String finalContentType = contentType;
try {
return cache.get(contentType, new Callable<MediaType>() {
public MediaType call() throws Exception {
return new DefaultMediaType(finalContentType, defaultCharset);
}
});
} catch (ExecutionException e) {
throw new RuntimeException(e);
}
}
private DefaultMediaType(String value, String defaultCharset) {
ImmutableMap.Builder<String, String> paramsBuilder = ImmutableMap.builder();
boolean setCharset = false;
if (value == null) {
type = null;
} else {
value = value.trim();
if (value.length() == 0) {
type = null;
} else {
String[] parts = value.split(";");
type = parts[0].toLowerCase();
if (parts.length > 1) {
for (int i = 1; i < parts.length; ++i) {
String part = parts[i].trim();
String keyPart;
String valuePart;
if (part.contains("=")) {
String[] valueSplit = part.split("=", 2);
keyPart = valueSplit[0].toLowerCase();
valuePart = valueSplit[1];
if (keyPart.equals(CHARSET_KEY)) {
setCharset = true;
}
} else {
keyPart = part.toLowerCase();
valuePart = "";
}
paramsBuilder.put(keyPart, valuePart);
}
}
}
}
if (!setCharset && !defaultCharset.equals(DEFAULT_CHARSET)) {
paramsBuilder.put(CHARSET_KEY, defaultCharset);
}
params = paramsBuilder.build();
string = generateString();
}
public String getType() {
return type;
}
public Map<String, String> getParams() {
return Collections.unmodifiableMap(params);
}
public String getCharset() {
return params.containsKey(CHARSET_KEY) ? params.get(CHARSET_KEY) : DEFAULT_CHARSET;
}
public boolean isText() {
return !isEmpty() && getType().startsWith("text/");
}
public boolean isJson() {
return !isEmpty() && getType().equals(APPLICATION_JSON);
}
public boolean isForm() {
return !isEmpty() && getType().equals(APPLICATION_FORM);
}
public boolean isEmpty() {
return getType() == null;
}
@Override
public String toString() {
return string;
}
private String generateString() {
if (isEmpty()) {
return "";
} else {
StringBuilder s = new StringBuilder(getType());
for (Map.Entry<String, String> param : getParams().entrySet()) {
s.append(";").append(param.getKey());
if (!param.getValue().isEmpty()) {
s.append("=").append(param.getValue());
}
}
return s.toString();
}
}
}
| [
"ld@ldaley.com"
] | ld@ldaley.com |
a0a84448dc8a8158662069985be1ecee8146f454 | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/JavaProgramData/85/467.java | a54b3385b1517bb21019d0f39cf2dfebc4daae74 | [
"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,017 | java | package <missing>;
public class GlobalMembers
{
public static void Main()
{
char[][] s = new char[100][20];
int n;
int i;
int j;
int m;
int k;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
for (i = 0;i < n;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
s[i] = tempVar2.charAt(0);
}
}
for (i = 0;i < n;i++)
{
k = 0;
m = String.valueOf(s[i]).length();
for (j = 0;j < m;j++)
{
if (s[i][0] >= '0' && s[i][0] <= '9')
{
k = 1;
break;
}
else if (s[i][j] < '0' || s[i][j]>'9')
{
if (s[i][j] > 'z' || s[i][j] < 'a')
{
if (s[i][j] < 'A' || s[i][j]>'Z')
{
if (s[i][j] != '_')
{
k = 1;
break;
}
}
}
}
}
if (i > 0)
{
System.out.print("\n");
}
if (k == 1)
{
System.out.print("no");
}
else if (k == 0)
{
System.out.print("yes");
}
}
}
}
| [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
e744de4bb9f774f2ff6aeb846fdbd5a23ce48e4e | 24643916cd1515911b7837ce81ebd17b0890cc81 | /packages/apps/EngineerMode/tests/src/com/mediatek/engineermode/tests/MatvTest.java | 0070ff0751022f6f29612f37035d1b14c3b99c00 | [
"Apache-2.0"
] | permissive | touxiong88/92_mediatek | 3a0d61109deb2fa77f79ecb790d0d3fdd693e5fd | 5e96a7bb778fd9d9b335825584664e0c8b5ff2c7 | refs/heads/master | 2020-05-02T10:20:49.365871 | 2019-04-25T09:12:56 | 2019-04-25T09:12:56 | 177,894,636 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,510 | java | /* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
* the prior written permission of MediaTek inc. and/or its licensors, any
* reproduction, modification, use or disclosure of MediaTek Software, and
* information contained herein, in whole or in part, shall be strictly
* prohibited.
*
* MediaTek Inc. (C) 2010. All rights reserved.
*
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
* ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
* RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
* INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
* TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
* RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
* OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
* SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
* RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
* ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
* RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
* MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
* CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* The following software/firmware and/or related documentation ("MediaTek
* Software") have been modified by MediaTek Inc. All revisions are subject to
* any receiver's applicable license agreements with MediaTek Inc.
*/
package com.mediatek.engineermode.tests;
import android.app.Activity;
import android.app.Instrumentation;
import android.test.ActivityInstrumentationTestCase2;
import android.content.Context;
import android.util.Log;
import com.jayway.android.robotium.solo.Solo;
import com.mediatek.engineermode.ChipSupport;
import com.mediatek.engineermode.EngineerMode;
import com.mediatek.engineermode.R;
import com.mediatek.xlog.Xlog;
import com.mediatek.common.featureoption.FeatureOption;
public class MatvTest extends ActivityInstrumentationTestCase2<EngineerMode> {
private static final String TAG = "MatvTest";
private Instrumentation mInst = null;
private Activity mActivity = null;
private Solo mSolo = null;
private boolean mIsMatvSupported = false;
public MatvTest() {
super("com.mediatek.engineermode", EngineerMode.class);
}
protected void setUp() throws Exception {
super.setUp();
mInst = getInstrumentation();
mActivity = getActivity();
mSolo = new Solo(mInst, mActivity);
if (ChipSupport.isFeatureSupported(ChipSupport.HAVE_MATV_FEATURE)) {
mIsMatvSupported = true;
}
Xlog.d(TAG, "HAVE_MATV_FEATURE: " + FeatureOption.HAVE_MATV_FEATURE);
}
public void testCase01Precondition() {
assertNotNull(mInst);
assertNotNull(mActivity);
assertNotNull(mSolo);
}
public void testCase02MatvExisted() {
// switch to Hardware Testing
mSolo.sendKey(Solo.RIGHT);
mSolo.sendKey(Solo.RIGHT);
mSolo.sleep(100);
if (mIsMatvSupported) {
assertTrue(mSolo.searchText("MATV"));
} else {
assertFalse(mSolo.searchText("MATV"));
Xlog.d(TAG, "[FOR_NATA_MATV_NO_SUPPORT]");
}
}
public void testCase03LaunchMatv() {
if (mIsMatvSupported) {
mSolo.sendKey(Solo.RIGHT);
mSolo.sendKey(Solo.RIGHT);
mSolo.sleep(100);
mSolo.clickOnText("MATV");
mSolo.sleep(500);
mSolo.goBack();
Xlog.d(TAG, "[FOR_NATA_MATV_LAUNCH_PASS]");
}
}
protected void tearDown() throws Exception {
mSolo.goBack();
super.tearDown();
}
}
| [
"sunhouzan@163.com"
] | sunhouzan@163.com |
0228896307bd8b7d2e80988cf0e364d5397dd12b | 772b177ac68d078c0e4e5091132e08175916d9ad | /COR/fermat-android-core/src/main/java/com/bitdubai/android_core/app/common/version_1/util/res_manager/ResManager.java | 207242f46bc283c512d579c907435046c79c61ec | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | danigo252/fermat | 320432458c9b60e3f20f700775a1553a055dfbcb | 23ed6ed64c6e40ebc0dc40547be55cc3d5f3feb0 | refs/heads/master | 2020-12-28T23:45:39.999405 | 2016-07-12T19:15:50 | 2016-07-12T19:15:50 | 58,672,144 | 1 | 0 | null | 2016-05-12T19:51:08 | 2016-05-12T19:51:08 | null | UTF-8 | Java | false | false | 1,494 | java | package com.bitdubai.android_core.app.common.version_1.util.res_manager;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
import com.bitdubai.fermat_android_api.core.ResourceSearcher;
import com.bitdubai.fermat_api.layer.all_definition.navigation_structure.FermatDrawable;
import com.bitdubai.fermat_api.layer.all_definition.navigation_structure.FermatView;
/**
* Created by Matias Furszyfer on 2016.07.02..
*/
public class ResManager extends ResourceSearcher {
private static volatile ResourceSearcher instance;
public static ResourceSearcher getInstance() {
if(instance==null){
instance = new ResManager();
}
return instance;
}
@Override
public Drawable obtainDrawable(Context context,FermatDrawable fermatDrawable) {
return ResDrawableFrameworkHelper.obtainDrawable(context,fermatDrawable);
}
@Override
public View obtainView(Context context,FermatView fermatView) {
return ResViewFrameworkHelper.obtainView(context,fermatView);
}
@Override
public int obtainRes(int resType,Context context, int id) {
int resId = 0;
switch (resType){
case DRAWABLE_TYPE:
resId = ResDrawableFrameworkHelper.obtainResDrawable(context,id);
break;
case VIEW_TYPE:
break;
case UNKNOWN_TYPE:
break;
}
return resId;
}
}
| [
"mati_fur@hotmail.com"
] | mati_fur@hotmail.com |
1b3ccdc504ab7d8276bd8eb153db3b0f8384280c | f0d25d83176909b18b9989e6fe34c414590c3599 | /app/src/main/java/com/amazonaws/util/Throwables.java | bf4f18e9bf55d45fa303b6258697f9178b667822 | [] | no_license | lycfr/lq | e8dd702263e6565486bea92f05cd93e45ef8defc | 123914e7c0d45956184dc908e87f63870e46aa2e | refs/heads/master | 2022-04-07T18:16:31.660038 | 2020-02-23T03:09:18 | 2020-02-23T03:09:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 612 | java | package com.amazonaws.util;
import org.apache.commons.logging.LogFactory;
public enum Throwables {
;
public static Throwable getRootCause(Throwable orig) {
if (orig == null) {
return orig;
}
Throwable t = orig;
for (int i = 0; i < 1000; i++) {
Throwable cause = t.getCause();
if (cause == null) {
return t;
}
t = cause;
}
LogFactory.getLog(Throwables.class).debug("Possible circular reference detected on " + orig.getClass() + ": [" + orig + "]");
return orig;
}
}
| [
"quyenlm.vn@gmail.com"
] | quyenlm.vn@gmail.com |
751cdf735df3e561a6fef8c6000b385aef860f1e | 580459ef76530f879d1110d6821fac8cd350c6aa | /customer/src/com/zs/service/basic/user/AddUserService.java | 45c6ba4e243fa1c1cd9e0dc2369e5230b5944a69 | [] | no_license | Allen5413/customer | 4bc40d9247e8308a40bcb17ec6a72a29a2a68c77 | c21921e62a5681e8558bfc7d8684480864d5c878 | refs/heads/master | 2021-01-17T14:09:46.923377 | 2018-04-28T03:09:26 | 2018-04-28T03:09:26 | 53,113,261 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 463 | java | package com.zs.service.basic.user;
import com.feinno.framework.common.service.EntityService;
import com.zs.domain.basic.User;
/**
* 新增用户信息
* Created by Allen on 2015/4/27.
*/
public interface AddUserService extends EntityService<User> {
/**
* 新增用户信息
* @param user
* @param zzCode
* @throws Exception
*/
public void addUser(User user, long userGroupId, String zzCode, long loginId)throws Exception;
}
| [
"2319772333@qq.com"
] | 2319772333@qq.com |
167b15d56c7cbe2862ac031d551176ead9f69ce7 | 70f7a06017ece67137586e1567726579206d71c7 | /alimama/src/main/java/com/taobao/weex/analyzer/core/DevOptionsConfig.java | 4f6de0c55615be4a6a1d8859ff7f35c059686265 | [] | no_license | liepeiming/xposed_chatbot | 5a3842bd07250bafaffa9f468562021cfc38ca25 | 0be08fc3e1a95028f8c074f02ca9714dc3c4dc31 | refs/heads/master | 2022-12-20T16:48:21.747036 | 2020-10-14T02:37:49 | 2020-10-14T02:37:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,984 | java | package com.taobao.weex.analyzer.core;
import android.content.Context;
import android.content.SharedPreferences;
import androidx.annotation.NonNull;
import java.util.Arrays;
import java.util.List;
public class DevOptionsConfig {
private static final String CONFIG_CPU_CHART = "config_cpu_chart";
private static final String CONFIG_EXCEPTION_NOTIFICATION = "config_exception_notification";
private static final String CONFIG_FPS_CHART = "config_fps_chart";
private static final String CONFIG_INSPECTOR_VIEW_SIZE = "config_inspector_view_size";
private static final String CONFIG_JS_EXCEPTION = "config_js_exception";
private static final String CONFIG_LOG_FILTER = "config_log_filter";
private static final String CONFIG_LOG_LEVEL = "config_log_level";
private static final String CONFIG_LOG_OUTPUT = "config_log_output";
private static final String CONFIG_LOG_VIEW_SIZE = "config_log_view_size";
private static final String CONFIG_MEMORY_CHART = "config_mem_chart";
private static final String CONFIG_NETWORK_INSPECTOR = "config_network_inspector";
private static final String CONFIG_PERF_COMMON = "config_perf_common";
private static final String CONFIG_TRAFFIC_CHART = "config_traffic_chart";
private static final String CONFIG_UPLOAD_LOG = "config_weex_upload_log";
private static final String CONFIG_VDOM_DEPTH = "config_vdom_depth";
private static final String CONFIG_VIEW_INSPECTOR = "config_view_inspector";
private static final String CONFIG_WEEX_PERFORMANCE_V2 = "config_weex_performance_v2";
private static final String DEV_CONFIG_NAME = "weex_dev_config";
public static final String TAG = "weex-analyzer";
public static final List<String> WHITE_SCALPEL_VIEW_NAMES = Arrays.asList(new String[]{"WXRecyclerView", "WXScrollView", "WXFrameLayout"});
private static DevOptionsConfig sConfig;
private SharedPreferences mSharedPreferences;
private DevOptionsConfig(@NonNull Context context) {
this.mSharedPreferences = context.getSharedPreferences(DEV_CONFIG_NAME, 0);
}
public static DevOptionsConfig getInstance(@NonNull Context context) {
if (sConfig == null) {
synchronized (DevOptionsConfig.class) {
if (sConfig == null) {
sConfig = new DevOptionsConfig(context);
}
}
}
return sConfig;
}
public void setPerfCommonEnabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_PERF_COMMON, z).apply();
}
public boolean isPerfCommonEnabled() {
return this.mSharedPreferences.getBoolean(CONFIG_PERF_COMMON, false);
}
public void setVdomDepthEnabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_VDOM_DEPTH, z).apply();
}
public boolean isVDomDepthEnabled() {
return this.mSharedPreferences.getBoolean(CONFIG_VDOM_DEPTH, false);
}
public void setWeexPerformanceV2Enabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_WEEX_PERFORMANCE_V2, z).apply();
}
public boolean isWeexPerformanceV2Enabled() {
return this.mSharedPreferences.getBoolean(CONFIG_WEEX_PERFORMANCE_V2, false);
}
public void setViewInspectorEnabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_VIEW_INSPECTOR, z).apply();
}
public boolean isViewInspectorEnabled() {
return this.mSharedPreferences.getBoolean(CONFIG_VIEW_INSPECTOR, false);
}
public void setUploadLogViewEnabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_UPLOAD_LOG, z).apply();
}
public boolean isUploadLogViewEnabled() {
return this.mSharedPreferences.getBoolean(CONFIG_UPLOAD_LOG, false);
}
public boolean isNetworkInspectorEnabled() {
return this.mSharedPreferences.getBoolean(CONFIG_NETWORK_INSPECTOR, false);
}
public void setNetworkInspectorEnabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_NETWORK_INSPECTOR, z).apply();
}
public void setLogOutputEnabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_LOG_OUTPUT, z).apply();
}
public boolean isLogOutputEnabled() {
return this.mSharedPreferences.getBoolean(CONFIG_LOG_OUTPUT, false);
}
public void setMemoryChartEnabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_MEMORY_CHART, z).apply();
}
public boolean isMemoryChartEnabled() {
return this.mSharedPreferences.getBoolean(CONFIG_MEMORY_CHART, false);
}
public void setCpuChartEnabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_CPU_CHART, z).apply();
}
public boolean isCPUChartEnabled() {
return this.mSharedPreferences.getBoolean(CONFIG_CPU_CHART, false);
}
public void setTrafficChartEnabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_TRAFFIC_CHART, z).apply();
}
public boolean isTrafficChartEnabled() {
return this.mSharedPreferences.getBoolean(CONFIG_TRAFFIC_CHART, false);
}
public void setFpsChartEnabled(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_FPS_CHART, z).apply();
}
public boolean isFpsChartEnabled() {
return this.mSharedPreferences.getBoolean(CONFIG_FPS_CHART, false);
}
public void setShownJSException(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_JS_EXCEPTION, z).apply();
}
public boolean isShownJSException() {
return this.mSharedPreferences.getBoolean(CONFIG_JS_EXCEPTION, true);
}
public void setAllowExceptionNotification(boolean z) {
this.mSharedPreferences.edit().putBoolean(CONFIG_EXCEPTION_NOTIFICATION, z).apply();
}
public boolean isAllowExceptionNotification() {
return this.mSharedPreferences.getBoolean(CONFIG_EXCEPTION_NOTIFICATION, true);
}
public void setLogLevel(int i) {
this.mSharedPreferences.edit().putInt(CONFIG_LOG_LEVEL, i).apply();
}
public int getLogLevel() {
return this.mSharedPreferences.getInt(CONFIG_LOG_LEVEL, 2);
}
public void setLogFilter(String str) {
this.mSharedPreferences.edit().putString(CONFIG_LOG_FILTER, str).apply();
}
public String getLogFilter() {
return this.mSharedPreferences.getString(CONFIG_LOG_FILTER, (String) null);
}
public void setLogViewSize(int i) {
this.mSharedPreferences.edit().putInt(CONFIG_LOG_VIEW_SIZE, i).apply();
}
public int getLogViewSize() {
return this.mSharedPreferences.getInt(CONFIG_LOG_VIEW_SIZE, 1);
}
public void setNetworkInspectorViewSize(int i) {
this.mSharedPreferences.edit().putInt(CONFIG_INSPECTOR_VIEW_SIZE, i).apply();
}
public int getNetworkInspectorViewSize() {
return this.mSharedPreferences.getInt(CONFIG_INSPECTOR_VIEW_SIZE, 1);
}
}
| [
"zhangquan@snqu.com"
] | zhangquan@snqu.com |
001c2ebf19905daa9c4dd60066074c5b5043f672 | c4e97dce21396c2c3cd4b49442b4066b4b862523 | /src/com/tang/intellij/devkt/lua/comment/psi/impl/LuaDocClassDefImpl.java | 7665548072e9b35041cb64ba9d13555911531ceb | [
"MIT"
] | permissive | devkt-plugins/emmylua-devkt | 33c8d558fd8d9a37528c6984819a5f4bcf683e3c | 268f8703800fc6dd3aba1ef3af0300de1136adf7 | refs/heads/master | 2020-03-11T15:40:17.885662 | 2018-09-15T03:19:12 | 2018-09-15T03:19:12 | 130,092,275 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | true | 1,538 | java | // This is a generated file. Not intended for manual editing.
package com.tang.intellij.devkt.lua.comment.psi.impl;
import com.tang.intellij.devkt.lua.comment.psi.LuaDocClassDef;
import com.tang.intellij.devkt.lua.comment.psi.LuaDocClassNameRef;
import com.tang.intellij.devkt.lua.comment.psi.LuaDocCommentString;
import com.tang.intellij.devkt.lua.comment.psi.LuaDocVisitor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.com.intellij.extapi.psi.ASTWrapperPsiElement;
import org.jetbrains.kotlin.com.intellij.lang.ASTNode;
import org.jetbrains.kotlin.com.intellij.psi.PsiElement;
import org.jetbrains.kotlin.com.intellij.psi.PsiElementVisitor;
import static com.tang.intellij.devkt.lua.comment.psi.LuaDocTypes.ID;
public class LuaDocClassDefImpl extends ASTWrapperPsiElement implements LuaDocClassDef {
public LuaDocClassDefImpl(ASTNode node) {
super(node);
}
public void accept(@NotNull LuaDocVisitor visitor) {
visitor.visitClassDef(this);
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof LuaDocVisitor) accept((LuaDocVisitor) visitor);
else super.accept(visitor);
}
@Override
@Nullable
public LuaDocClassNameRef getClassNameRef() {
return findChildByClass(LuaDocClassNameRef.class);
}
@Override
@Nullable
public LuaDocCommentString getCommentString() {
return findChildByClass(LuaDocCommentString.class);
}
@Override
@NotNull
public PsiElement getId() {
return findNotNullChildByType(ID);
}
}
| [
"ice1000kotlin@foxmail.com"
] | ice1000kotlin@foxmail.com |
376f7fca09a0c921d046855ff29cf4388d520f6b | 930c207e245c320b108e9699bbbb036260a36d6a | /BRICK-RDF4J/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/Brick/IWater_Discharge_Temperature_Sensor.java | 65a5399efe3a0087b1795583ae37fc159c675395 | [] | no_license | InnovationSE/BRICK-Generated-By-OLGA | 24d278f543471e1ce622f5f45d9e305790181fff | 7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2 | refs/heads/master | 2021-07-01T14:13:11.302860 | 2017-09-21T12:44:17 | 2017-09-21T12:44:17 | 104,251,784 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 447 | java | /**
* This file is automatically generated by OLGA
* @author OLGA
* @version 1.0
*/
package brickschema.org.schema._1_0_2.Brick;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.vocabulary.RDF;
import brickschema.org.schema._1_0_2.Brick.ITemperature_Sensor;
public interface IWater_Discharge_Temperature_Sensor extends ITemperature_Sensor {
public IRI iri();
}
| [
"Andre.Ponnouradjane@non.schneider-electric.com"
] | Andre.Ponnouradjane@non.schneider-electric.com |
ffb83016bdfeb216c5bbbf6f614e26300ff8f74a | 025f0223abcbf69b5fbdc119d23605a384e0bda6 | /Assignment9-master/src/test/java/ac/za/cput/controller/MP/MPBranchControllerTest.java | 76fa2f4115d659fba29237391acd6eccc837aca0 | [] | no_license | MugammadRihaad/Assignemtn12-SQL | 7939b97bb2b65c16a4938de234d6c4366359a305 | e9ecc2f1243e0734f80fc788a1583f45f56fcd34 | refs/heads/master | 2022-07-12T15:52:50.723761 | 2019-10-06T18:54:03 | 2019-10-06T18:54:03 | 213,216,622 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,707 | java | package ac.za.cput.controller.MP;
import ac.za.cput.domain.MP.MPBranch;
import ac.za.cput.factory.MP.FactoryMPBranch;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.*;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.client.HttpClientErrorException;
import static org.junit.Assert.*;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@RunWith(SpringRunner.class)
public class MPBranchControllerTest {
@Autowired
private TestRestTemplate restTemplate;
private String baseURL="http://localhost:8080/baker";
public void testGetAccountantById() {
MPBranch bellBaker = restTemplate.getForObject(baseURL + "/baker/1", MPBranch.class);
System.out.println(bellBaker.getMpBrId());
assertNotNull(bellBaker);
}
@Test
public void create() {
MPBranch bellBranch = FactoryMPBranch.getMPBranch();
bellBranch.setMpBrId("newId");
ResponseEntity<MPBranch> postResponse = restTemplate.postForEntity(baseURL + "/new", bellBranch, MPBranch.class);
assertNotNull(postResponse);
assertNotNull(postResponse.getBody());
}
@Test
public void update() {
int id = 1;
MPBranch bellvilleBranch = restTemplate.getForObject(baseURL + "/baker/" + id, MPBranch.class);
restTemplate.put(baseURL + "/baker/" + id, bellvilleBranch);
MPBranch bellBranch = restTemplate.getForObject(baseURL + "/baker/" + id, MPBranch.class);
assertNotNull(bellBranch);
}
@Test
public void delete() {
int id = 2;
MPBranch bellvilleBranch = restTemplate.getForObject(baseURL + "/baker/" + id, MPBranch.class);
assertNotNull(bellvilleBranch);
restTemplate.delete(baseURL + "/baker/" + id);
try {
bellvilleBranch = restTemplate.getForObject(baseURL + "/baker/" + id, MPBranch.class);
} catch (final HttpClientErrorException e) {
assertEquals(e.getStatusCode(), HttpStatus.NOT_FOUND);
}
}
@Test
public void read() {
}
@Test
public void getAll() {
HttpHeaders headers = new HttpHeaders();
HttpEntity<String> entity = new HttpEntity<String>(null, headers);
ResponseEntity<String> response = restTemplate.exchange(baseURL + "/read/all",
HttpMethod.GET, entity, String.class);
assertNotNull(response.getBody());
}
} | [
"mugammadrihaadvanblerck@gmail.com"
] | mugammadrihaadvanblerck@gmail.com |
da3c569b3a54571aab5b0ae661e4e7bc9bc93dfa | 78d7cc1b76b7e906f671a800732d7fc158653c79 | /DAP/plugin/digital_asset_transaction/fermat-dap-plugin-digital-asset-transaction-asset-seller-bitdubai/src/main/java/com/bitdubai/fermat_dap_plugin/layer/digital_asset_transaction/asset_seller/developer/bitdubai/version_1/developer_utils/AssetSellerDeveloperDatabaseFactory.java | cfe2dd46461d73c55f1ebca1b4743357db173f58 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | nivrem/fermat | a1877ebf9df64d70bdffcd4baba184f95798fced | c9f6adef675f64c483cfc89c0b898940d39c1dcf | refs/heads/master | 2020-04-01T10:11:25.758941 | 2016-03-10T21:02:44 | 2016-03-10T21:02:44 | 53,174,114 | 0 | 0 | null | 2016-03-05T00:21:47 | 2016-03-05T00:21:47 | null | UTF-8 | Java | false | false | 7,004 | java | package com.bitdubai.fermat_dap_plugin.layer.digital_asset_transaction.asset_seller.developer.bitdubai.version_1.developer_utils;
import com.bitdubai.fermat_api.layer.all_definition.developer.DeveloperDatabase;
import com.bitdubai.fermat_api.layer.all_definition.developer.DeveloperDatabaseTable;
import com.bitdubai.fermat_api.layer.all_definition.developer.DeveloperDatabaseTableRecord;
import com.bitdubai.fermat_api.layer.all_definition.developer.DeveloperObjectFactory;
import com.bitdubai.fermat_api.layer.osa_android.database_system.Database;
import com.bitdubai.fermat_api.layer.osa_android.database_system.DatabaseRecord;
import com.bitdubai.fermat_api.layer.osa_android.database_system.DatabaseTable;
import com.bitdubai.fermat_api.layer.osa_android.database_system.DatabaseTableRecord;
import com.bitdubai.fermat_dap_plugin.layer.digital_asset_transaction.asset_seller.developer.bitdubai.version_1.structure.database.AssetSellerDatabaseConstants;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
/**
* Created by Víctor A. Mars M. (marsvicam@gmail.com) on 9/02/16.
*/
public class AssetSellerDeveloperDatabaseFactory {
//PUBLIC METHODS
public static List<DeveloperDatabaseTable> getDatabaseTableList(DeveloperObjectFactory developerObjectFactory) {
List<DeveloperDatabaseTable> tables = new ArrayList<>();
/**
* Events Recorder table
* */
List<String> eventsRecorderColumns = new ArrayList<>();
eventsRecorderColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_EVENTS_RECORDED_ID_COLUMN_NAME);
eventsRecorderColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_EVENTS_RECORDED_EVENT_COLUMN_NAME);
eventsRecorderColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_EVENTS_RECORDED_SOURCE_COLUMN_NAME);
eventsRecorderColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_EVENTS_RECORDED_STATUS_COLUMN_NAME);
eventsRecorderColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_EVENTS_RECORDED_TIMESTAMP_COLUMN_NAME);
DeveloperDatabaseTable eventsRecorderTable = developerObjectFactory.getNewDeveloperDatabaseTable(AssetSellerDatabaseConstants.ASSET_SELLER_EVENTS_RECORDED_TABLE_NAME, eventsRecorderColumns);
tables.add(eventsRecorderTable);
List<String> assetSellerColumns = new ArrayList<>();
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_ENTRY_ID_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_GENESIS_TRANSACTION_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_NETWORK_TYPE_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_BUYER_PUBLICKEY_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_SELL_STATUS_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_NEGOTIATION_REFERENCE_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_SELLER_TRANSACTION_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_SELLER_VALUE_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_BUYER_TRANSACTION_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_BUYER_VALUE_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_TX_HASH_COLUMN_NAME);
assetSellerColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_TIMESTAMP_COLUMN_NAME);
DeveloperDatabaseTable transactionMetadataTable = developerObjectFactory.getNewDeveloperDatabaseTable(AssetSellerDatabaseConstants.ASSET_SELLER_TABLE_NAME, assetSellerColumns);
tables.add(transactionMetadataTable);
List<String> assetNegotiationColumns = new ArrayList<>();
assetNegotiationColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_NEGOTIATION_ID_COLUMN_NAME);
assetNegotiationColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_NEGOTIATION_OBJECT_XML_COLUMN_NAME);
assetNegotiationColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_NEGOTIATION_ACCEPTED_ASSETS_COLUMN_NAME);
assetNegotiationColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_NEGOTIATION_REJECTED_ASSETS_COLUMN_NAME);
assetNegotiationColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_NEGOTIATION_STATUS_COLUMN_NAME);
assetNegotiationColumns.add(AssetSellerDatabaseConstants.ASSET_SELLER_NEGOTIATION_TIMESTAMP_COLUMN_NAME);
DeveloperDatabaseTable assetNegotiationTable = developerObjectFactory.getNewDeveloperDatabaseTable(AssetSellerDatabaseConstants.ASSET_SELLER_NEGOTIATION_TABLE_NAME, assetNegotiationColumns);
tables.add(assetNegotiationTable);
return tables;
}
public static List<DeveloperDatabase> getDatabaseList(DeveloperObjectFactory developerObjectFactory, UUID pluginId) {
/**
* I only have one database on my plugin. I will return its name.
*/
List<DeveloperDatabase> databases = new ArrayList<>();
databases.add(developerObjectFactory.getNewDeveloperDatabase(AssetSellerDatabaseConstants.ASSET_SELLER_DATABASE, pluginId.toString()));
return databases;
}
public static List<DeveloperDatabaseTableRecord> getDatabaseTableContent(DeveloperObjectFactory developerObjectFactory, Database database, DeveloperDatabaseTable developerDatabaseTable) {
/**
* Will get the records for the given table
*/
List<DeveloperDatabaseTableRecord> returnedRecords = new ArrayList<DeveloperDatabaseTableRecord>();
/**
* I load the passed table name from the SQLite database.
*/
DatabaseTable selectedTable = database.getTable(developerDatabaseTable.getName());
try {
selectedTable.loadToMemory();
List<DatabaseTableRecord> records = selectedTable.getRecords();
for (DatabaseTableRecord row : records) {
List<String> developerRow = new ArrayList<String>();
/**
* for each row in the table list
*/
for (DatabaseRecord field : row.getValues()) {
/**
* I get each row and save them into a List<String>
*/
developerRow.add(field.getValue());
}
/**
* I create the Developer Database record
*/
returnedRecords.add(developerObjectFactory.getNewDeveloperDatabaseTableRecord(developerRow));
}
/**
* return the list of DeveloperRecords for the passed table.
*/
} catch (Exception e) {
return Collections.EMPTY_LIST;
}
return returnedRecords;
}
//PRIVATE METHODS
//GETTER AND SETTERS
//INNER CLASSES
}
| [
"marsvicam@gmail.com"
] | marsvicam@gmail.com |
974492c1e0c1fe3d0d5c9d6f05c02b0656a239a7 | 491ecb26ff8d2dacd6b97e8f27ae8fbe59ae4ba5 | /slack-api-client/src/main/java/com/slack/api/methods/response/conversations/ConversationsKickResponse.java | b2888ce17d399702a38e37526cc35bcd40966040 | [
"MIT"
] | permissive | seratch/java-slack-sdk | af238d3c507d3525f9b81aa35ba4ad81a2e4f2c8 | e2218be44d17c4bde16f865fd182e22e8b1db635 | refs/heads/main | 2023-07-25T17:26:57.228078 | 2020-12-02T12:20:38 | 2020-12-02T12:23:50 | 237,015,084 | 1 | 2 | MIT | 2021-05-07T01:34:06 | 2020-01-29T15:25:22 | Java | UTF-8 | Java | false | false | 343 | java | package com.slack.api.methods.response.conversations;
import com.slack.api.methods.SlackApiTextResponse;
import lombok.Data;
@Data
public class ConversationsKickResponse implements SlackApiTextResponse {
private boolean ok;
private String warning;
private String error;
private String needed;
private String provided;
}
| [
"seratch@gmail.com"
] | seratch@gmail.com |
4c490a008c7a446bd90fecb4b3726205324a25fe | 30e44d574a9cbcd68ede035205ee1522696fb944 | /java/com/l2jmobius/gameserver/network/serverpackets/ExAutoFishAvailable.java | 77d687defffc063c72515a4ce63e8118633a4112 | [] | no_license | cietwwl/trunk | 136aa93006f870e0926ac75b47d52eddce01604e | 97c9ece3e967585409e1b495fb9c9f787172d70b | refs/heads/master | 2020-03-14T01:26:45.418051 | 2016-02-04T20:42:17 | 2016-02-04T20:42:17 | 131,377,385 | 0 | 1 | null | 2018-04-28T05:51:26 | 2018-04-28T05:51:25 | null | UTF-8 | Java | false | false | 1,191 | java | /*
* This file is part of the L2J Mobius project.
*
* This program 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 com.l2jmobius.gameserver.network.serverpackets;
import com.l2jmobius.gameserver.model.actor.L2Character;
/**
* @author Mobius
*/
public class ExAutoFishAvailable extends L2GameServerPacket
{
private final L2Character _activeChar;
public ExAutoFishAvailable(L2Character character)
{
_activeChar = character;
}
@Override
protected void writeImpl()
{
writeC(0xFE);
writeH(0x179);
writeD(_activeChar.getObjectId());
}
} | [
"MobiusDev@7325c9f8-25fd-504a-9f63-8876acdc129b"
] | MobiusDev@7325c9f8-25fd-504a-9f63-8876acdc129b |
30c7a928d178ba75c4efccb009e25784e24086d4 | 863052231309e164f187ec5d0f5b515602a9e8e2 | /microservices/event-producer/src/main/java/org/mddarr/producer/EventProducer.java | 949f1ed39d16f330aa406cd4800843e69890cbc8 | [] | no_license | MathiasDarr/event-driven-kafka-microservices | a46b52c5cb6f6135aebe624bb0e6fd32bf7171e1 | fbb1d8ce1ec303d33f7994092f24f83df9e0ee81 | refs/heads/master | 2023-02-23T15:03:47.281347 | 2021-01-26T03:32:31 | 2021-01-26T03:32:31 | 329,455,570 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,799 | java | package org.mddarr.producer;
import org.mddarr.producer.kafka.generictemplate.KafkaGenericTemplate;
import org.mddarr.producer.models.*;
import org.mddarr.producer.repositories.DriverRepository;
import org.mddarr.producer.repositories.UserRepository;
import org.mddarr.rides.event.dto.*;
import org.springframework.kafka.core.KafkaTemplate;
import java.util.*;
public class EventProducer {
public static void main(String[] args) throws Exception {
populateRideCoordinates();
}
public static void populateRideCoordinates() throws InterruptedException {
Location location = new Location("Ballard", 12.0, -47.2);
Location destination = new Location("Fremont", 12.1, 55.2);
String rideid = "ride3";
int npoints = 100000;
List<RideCoordinate> rideCoordinates = CoordinatesProducer.generateCoordinateArray(rideid, location, destination, npoints);
KafkaGenericTemplate<AvroRideCoordinate> kafkaGenericTemplate = new KafkaGenericTemplate<>();
KafkaTemplate<String, AvroRideCoordinate> coordinatesKafkaTemplate = kafkaGenericTemplate.getKafkaTemplate();
coordinatesKafkaTemplate.setDefaultTopic(Constants.COORDINATES_TOPIC);
for(RideCoordinate rideCoordinate: rideCoordinates){
AvroRideCoordinate avroRideCoordinate = AvroRideCoordinate.newBuilder()
.setLatitude(rideCoordinate.getLat())
.setLongitude(rideCoordinate.getLng())
.setEventime(System.currentTimeMillis())
.build();
coordinatesKafkaTemplate.sendDefault(rideid, avroRideCoordinate);
System.out.println("SENDING COORDINATES FOR RIDE " + rideid + " at timestamp " + avroRideCoordinate.toString() + " ");
Thread.sleep(2000);
}
}
public static void populateSingleRideRequests() throws Exception {
KafkaGenericTemplate<AvroRideRequest> kafkaGenericTemplate = new KafkaGenericTemplate<>();
KafkaTemplate<String, AvroRideRequest> rideRequestKafkaTemplate = kafkaGenericTemplate.getKafkaTemplate();
rideRequestKafkaTemplate.setDefaultTopic(Constants.RIDE_REQUEST_TOPIC);
AvroRideRequest rideRequest = new AvroRideRequest("requestid1", "user1", 3, "Ballard");
String city = "Seattle";
rideRequestKafkaTemplate.sendDefault(city, rideRequest);
System.out.println("Writing ride request for '" + rideRequest.getUserId() + "' in the city of " + city);
}
public static void populateSingleRide() throws Exception{
KafkaGenericTemplate<AvroRide> kafkaGenericTemplate = new KafkaGenericTemplate<AvroRide>();
KafkaTemplate<String, AvroRide> rideRequestKafkaTemplate = kafkaGenericTemplate.getKafkaTemplate();
rideRequestKafkaTemplate.setDefaultTopic(Constants.RIDES_TOPIC);
AvroRide avroRide = new AvroRide("ride1","user1","driver1");
rideRequestKafkaTemplate.sendDefault(avroRide);
System.out.println("SENT " + avroRide);
}
public static void populateSingleDriver(){
KafkaGenericTemplate<AvroDriver> kafkaGenericTemplate = new KafkaGenericTemplate<>();
KafkaTemplate<String, AvroDriver> driverKafkaTemplate = kafkaGenericTemplate.getKafkaTemplate();
driverKafkaTemplate.setDefaultTopic(Constants.DRIVERS_TOPIC);
String city = "Seattle";
AvroDriver avroDriver = AvroDriver.newBuilder()
.setDriverid("driver1")
.setFirstname("Erik")
.setLastname("Charles")
.setState(AvroDriverState.ACTIVE)
.build();
System.out.println("Activating driver '" + avroDriver.getFirstname() + "' to input topic " + Constants.DRIVERS_TOPIC);
driverKafkaTemplate.sendDefault(city, avroDriver);
}
public static void populateAllDrivers() throws Exception{
KafkaGenericTemplate<AvroDriver> kafkaGenericTemplate = new KafkaGenericTemplate<>();
KafkaTemplate<String, AvroDriver> driverKafkaTemplate = kafkaGenericTemplate.getKafkaTemplate();
driverKafkaTemplate.setDefaultTopic(Constants.DRIVERS_TOPIC);
List<Driver> drivers = DriverRepository.getDriversFromDB();
drivers.forEach(driver -> {
System.out.println("Writing driver for '" + driver.getFirst_name() + "' to input topic " +
Constants.DRIVERS_TOPIC);
AvroDriver avroDriver = AvroDriver.newBuilder()
.setDriverid(driver.getDriverid())
.setFirstname(driver.getFirst_name())
.setLastname(driver.getLast_name())
.setState(AvroDriverState.ACTIVE)
.build();
driverKafkaTemplate.sendDefault(avroDriver);
});
}
}
| [
"mddarr@gmail.com"
] | mddarr@gmail.com |
24daaff1d622ac3b94c3ffb79073e4430313719f | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/7/7_b71f900d4416787905918f8843caa5830bfdda61/ClientRxSessionDataReplicatedImpl/7_b71f900d4416787905918f8843caa5830bfdda61_ClientRxSessionDataReplicatedImpl_t.java | 684096a8d85274e965654c7bb513b715babd7201 | [] | 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 | 4,192 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.mobicents.diameter.impl.ha.client.rx;
import org.jboss.cache.Fqn;
import org.jdiameter.api.rx.ClientRxSession;
import org.jdiameter.client.api.IContainer;
import org.jdiameter.client.impl.app.rx.IClientRxSessionData;
import org.jdiameter.common.api.app.rx.ClientRxSessionState;
import org.mobicents.cluster.MobicentsCluster;
import org.mobicents.diameter.impl.ha.common.AppSessionDataReplicatedImpl;
import org.mobicents.diameter.impl.ha.data.ReplicatedSessionDatasource;
/**
*
* @author <a href="mailto:baranowb@gmail.com"> Bartosz Baranowski </a>
* @author <a href="mailto:brainslog@gmail.com"> Alexandre Mendonca </a>
*/
public class ClientRxSessionDataReplicatedImpl extends AppSessionDataReplicatedImpl implements IClientRxSessionData {
private static final String EVENT_BASED = "EVENT_BASED";
private static final String REQUEST_TYPE = "REQUEST_TYPE";
private static final String STATE = "STATE";
/**
* @param nodeFqn
* @param mobicentsCluster
* @param iface
*/
public ClientRxSessionDataReplicatedImpl(Fqn<?> nodeFqn, MobicentsCluster mobicentsCluster, IContainer container) {
super(nodeFqn, mobicentsCluster);
if (super.create()) {
setAppSessionIface(this, ClientRxSession.class);
setClientRxSessionState(ClientRxSessionState.IDLE);
}
}
/**
* @param sessionId
* @param mobicentsCluster
* @param iface
*/
public ClientRxSessionDataReplicatedImpl(String sessionId, MobicentsCluster mobicentsCluster, IContainer container) {
this(Fqn.fromRelativeElements(ReplicatedSessionDatasource.SESSIONS_FQN, sessionId), mobicentsCluster, container);
}
@Override
public boolean isEventBased() {
if (exists()) {
return (Boolean) getNode().get(EVENT_BASED);
} else {
throw new IllegalStateException();
}
}
@Override
public void setEventBased(boolean isEventBased) {
if (exists()) {
getNode().put(EVENT_BASED, isEventBased);
} else {
throw new IllegalStateException();
}
}
@Override
public boolean isRequestTypeSet() {
if (exists()) {
return (Boolean) getNode().get(REQUEST_TYPE);
} else {
throw new IllegalStateException();
}
}
@Override
public void setRequestTypeSet(boolean requestTypeSet) {
if (exists()) {
getNode().put(REQUEST_TYPE, requestTypeSet);
} else {
throw new IllegalStateException();
}
}
@Override
public ClientRxSessionState getClientRxSessionState() {
if (exists()) {
return (ClientRxSessionState) getNode().get(STATE);
} else {
throw new IllegalStateException();
}
}
@Override
public void setClientRxSessionState(ClientRxSessionState state) {
if (exists()) {
getNode().put(STATE, state);
} else {
throw new IllegalStateException();
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
e86f2ba702fcd1352b59b8895fd37decdd9d3446 | c7746fbbfdcb16524580a9c631d0b787692216a1 | /dds-bindings/src/main/java/org/openfmb/model/dds/rti/solar/SolarReadingModuleDataReader.java | 9fce4fe2ce85621fcddfed6c76ede77b076d593f | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | gec/openfmb-sgip | ebc49e87425b8d5fd955b66326526da6b4568006 | 34bea83fa873cd32fbaa3d34f910460c89ae935c | refs/heads/master | 2021-01-10T11:20:27.341369 | 2015-09-30T16:14:58 | 2015-09-30T16:14:58 | 43,443,258 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,949 | java |
/*
WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY.
This file was generated from .idl using "rtiddsgen".
The rtiddsgen tool is part of the RTI Connext distribution.
For more information, type 'rtiddsgen -help' at a command shell
or consult the RTI Connext manual.
*/
package org.openfmb.model.dds.rti.solar;
import com.rti.dds.infrastructure.InstanceHandle_t;
import com.rti.dds.subscription.DataReaderImpl;
import com.rti.dds.subscription.DataReaderListener;
import com.rti.dds.subscription.ReadCondition;
import com.rti.dds.subscription.SampleInfo;
import com.rti.dds.subscription.SampleInfoSeq;
import com.rti.dds.topic.TypeSupportImpl;
// ===========================================================================
/**
* A reader for the SolarReadingModule user type.
*/
public class SolarReadingModuleDataReader extends DataReaderImpl {
// -----------------------------------------------------------------------
// Public Methods
// -----------------------------------------------------------------------
public void read(SolarReadingModuleSeq received_data, SampleInfoSeq info_seq,
int max_samples,
int sample_states, int view_states, int instance_states) {
read_untyped(received_data, info_seq, max_samples, sample_states,
view_states, instance_states);
}
public void take(SolarReadingModuleSeq received_data, SampleInfoSeq info_seq,
int max_samples,
int sample_states, int view_states, int instance_states) {
take_untyped(received_data, info_seq, max_samples, sample_states,
view_states, instance_states);
}
public void read_w_condition(SolarReadingModuleSeq received_data,
SampleInfoSeq info_seq,
int max_samples,
ReadCondition condition) {
read_w_condition_untyped(received_data, info_seq, max_samples,
condition);
}
public void take_w_condition(SolarReadingModuleSeq received_data,
SampleInfoSeq info_seq,
int max_samples,
ReadCondition condition) {
take_w_condition_untyped(received_data, info_seq, max_samples,
condition);
}
public void read_next_sample(SolarReadingModule received_data, SampleInfo sample_info) {
read_next_sample_untyped(received_data, sample_info);
}
public void take_next_sample(SolarReadingModule received_data, SampleInfo sample_info) {
take_next_sample_untyped(received_data, sample_info);
}
public void read_instance(SolarReadingModuleSeq received_data, SampleInfoSeq info_seq,
int max_samples, InstanceHandle_t a_handle, int sample_states,
int view_states, int instance_states) {
read_instance_untyped(received_data, info_seq, max_samples, a_handle,
sample_states, view_states, instance_states);
}
public void take_instance(SolarReadingModuleSeq received_data, SampleInfoSeq info_seq,
int max_samples, InstanceHandle_t a_handle, int sample_states,
int view_states, int instance_states) {
take_instance_untyped(received_data, info_seq, max_samples, a_handle,
sample_states, view_states, instance_states);
}
public void read_instance_w_condition(SolarReadingModuleSeq received_data,
SampleInfoSeq info_seq, int max_samples,
InstanceHandle_t a_handle, ReadCondition condition) {
read_instance_w_condition_untyped(received_data, info_seq,
max_samples, a_handle, condition);
}
public void take_instance_w_condition(SolarReadingModuleSeq received_data,
SampleInfoSeq info_seq, int max_samples,
InstanceHandle_t a_handle, ReadCondition condition) {
take_instance_w_condition_untyped(received_data, info_seq,
max_samples, a_handle, condition);
}
public void read_next_instance(SolarReadingModuleSeq received_data,
SampleInfoSeq info_seq, int max_samples,
InstanceHandle_t a_handle, int sample_states, int view_states,
int instance_states) {
read_next_instance_untyped(received_data, info_seq, max_samples,
a_handle, sample_states, view_states, instance_states);
}
public void take_next_instance(SolarReadingModuleSeq received_data,
SampleInfoSeq info_seq, int max_samples,
InstanceHandle_t a_handle, int sample_states, int view_states,
int instance_states) {
take_next_instance_untyped(received_data, info_seq, max_samples,
a_handle, sample_states, view_states, instance_states);
}
public void read_next_instance_w_condition(SolarReadingModuleSeq received_data,
SampleInfoSeq info_seq, int max_samples,
InstanceHandle_t a_handle, ReadCondition condition) {
read_next_instance_w_condition_untyped(received_data, info_seq,
max_samples, a_handle, condition);
}
public void take_next_instance_w_condition(SolarReadingModuleSeq received_data,
SampleInfoSeq info_seq, int max_samples,
InstanceHandle_t a_handle, ReadCondition condition) {
take_next_instance_w_condition_untyped(received_data, info_seq,
max_samples, a_handle, condition);
}
public void return_loan(SolarReadingModuleSeq received_data, SampleInfoSeq info_seq) {
return_loan_untyped(received_data, info_seq);
}
public void get_key_value(SolarReadingModule key_holder, InstanceHandle_t handle){
get_key_value_untyped(key_holder, handle);
}
public InstanceHandle_t lookup_instance(SolarReadingModule key_holder) {
return lookup_instance_untyped(key_holder);
}
// -----------------------------------------------------------------------
// Package Methods
// -----------------------------------------------------------------------
// --- Constructors: -----------------------------------------------------
/*package*/ SolarReadingModuleDataReader (long native_reader, DataReaderListener listener,
int mask, TypeSupportImpl data_type) {
super(native_reader, listener, mask, data_type);
}
}
| [
"devans@greenenergycorp.com"
] | devans@greenenergycorp.com |
52a0ee8f08ad7b272aec797adb574145c420e32d | d0994997c7f6a3d6552220d8d396b9ff1fd5b715 | /tophlc/src/main/java/com/toobei/common/view/wheel/OnWheelChangedListener.java | 136801c4072390256d262f802832688019f7f70e | [
"MIT"
] | permissive | liqimoon/xiubit-android | 65ab6f1a56b9f89e86530401f07a8cf16c6c2efd | 5723b5a8187a14909f605605b42fb3e7a8c3d768 | refs/heads/master | 2020-06-28T09:40:01.876486 | 2018-09-21T05:50:49 | 2018-09-21T05:50:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,169 | java | /*
* Copyright 2011 Yuri Kanivets
*
* 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.toobei.common.view.wheel;
/**
* Wheel changed listener interface.
* <p>The onChanged() method is called whenever current wheel positions is changed:
* <li> New Wheel position is set
* <li> Wheel view is scrolled
*/
public interface OnWheelChangedListener {
/**
* Callback method to be invoked when current item changed
* @param wheel the wheel view whose state has changed
* @param oldValue the old value of current item
* @param newValue the new value of current item
*/
void onChanged(WheelView wheel, int oldValue, int newValue);
}
| [
"694208570@qq.com"
] | 694208570@qq.com |
600bb2df3628d4582e2679c4d15051a92ca71aa5 | 1010d04158546b097f620ba38e9377ca6636a558 | /Curs12/security2/src/main/java/com/example/security2/configs/ProjectConfig.java | e77c1a44a31a278e0142319951c4cf589bd868de | [] | no_license | linteflorin/EndavaCurs3 | 91f611ed22cc2a2be67be804638bacf54fd1de08 | 350ecbf4b5eb0f83bcc649fc989e2758a4a96e9d | refs/heads/master | 2022-11-12T08:12:17.266131 | 2019-05-23T16:53:40 | 2019-05-23T16:53:40 | 181,508,547 | 0 | 0 | null | 2022-06-21T01:05:27 | 2019-04-15T14:52:09 | Java | UTF-8 | Java | false | false | 1,104 | java | package com.example.security2.configs;
import com.example.security2.Security.JpaUserDetailsService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.password.NoOpPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
@Configuration
public class ProjectConfig extends WebSecurityConfigurerAdapter {
@Bean
public PasswordEncoder passwordEncoder(){
return NoOpPasswordEncoder.getInstance();
}
@Bean
public UserDetailsService userDetailsService(){
return new JpaUserDetailsService();
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.httpBasic();
http.authorizeRequests().anyRequest().authenticated();
}
}
| [
"you@example.com"
] | you@example.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.