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
4caf5615a40f19734a40fa52b5378b9ee3277f83
f81b3e84a32008ff430defa3c7a3ee877043baad
/Congreso/src/congreso/Congreso.java
4e52f90344dc14969a9a4c59128bd2bfe1d5f3ee
[]
no_license
juanra1997/PSP
4f53a0859a26c59b370e43e5bd3eefa6b429aa4b
692ca38187d59af851461da6bd2a7ba676e75d00
refs/heads/master
2020-03-29T19:03:36.908916
2019-03-12T12:26:00
2019-03-12T12:26:00
150,245,471
0
0
null
null
null
null
UTF-8
Java
false
false
422
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package congreso; /** * * @author Juanra */ public class Congreso { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here } }
[ "juanrainmortal22@yahoo.com" ]
juanrainmortal22@yahoo.com
ab4bbbaac6e61645791de65a60e2d7166dbd0ef7
759539504b154cc4154e04f960db38fd3ccce8a1
/ftgo-order-service/src/test/java/net/chrisrichardson/ftgo/orderservice/domain/OrderTest.java
3931b40d907a6b83bc5c31bc1ea5d24be4af9fe3
[ "Apache-2.0" ]
permissive
przodownikR1/ftgo-application
d44c3d981c5a913b191276db5bdc9edd1c457528
55585041f9bebdc4621f5149deff01031c2739d7
refs/heads/master
2021-04-30T06:49:59.430755
2018-02-13T01:15:10
2018-02-13T01:15:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
971
java
package net.chrisrichardson.ftgo.orderservice.domain; import io.eventuate.tram.events.ResultWithEvents; import net.chrisrichardson.ftgo.common.Money; import net.chrisrichardson.ftgo.orderservice.api.events.OrderLineItem; import org.junit.Test; import java.util.Collections; import java.util.Optional; import static org.junit.Assert.*; public class OrderTest { @Test public void shouldReviseOrder() { Order order = Order.createOrder(101L, 102L, Collections.singletonList(new OrderLineItem("1", "Chicken Vindaloo", new Money(4), 5))).result; order.noteAuthorized(); OrderRevision orderRevision = new OrderRevision(Optional.empty(), Collections.singletonMap("1", 10)); ResultWithEvents<LineItemQuantityChange> result = order.revise(orderRevision); assertEquals(new Money(4).multiply(10), result.result.getNewOrderTotal()); order.confirmRevision(orderRevision); assertEquals(new Money(4).multiply(10), order.getOrderTotal()); } }
[ "chris@chrisrichardson.net" ]
chris@chrisrichardson.net
e66917c04b160e5c67b2b5ad3b429ee3b80f376f
c0542546866385891c196b665d65a8bfa810f1a3
/decompiled/com/android/dex/MethodId.java
a3829c0b63bd6900298b49b2b1f1cf1a9191a692
[]
no_license
auxor/android-wear-decompile
6892f3564d316b1f436757b72690864936dd1a82
eb8ad0d8003c5a3b5623918c79334290f143a2a8
refs/heads/master
2016-09-08T02:32:48.433800
2015-10-12T02:17:27
2015-10-12T02:19:32
42,517,868
5
1
null
null
null
null
UTF-8
Java
false
false
1,797
java
package com.android.dex; import com.android.dex.Dex.Section; import com.android.dex.util.Unsigned; public final class MethodId implements Comparable<MethodId> { private final int declaringClassIndex; private final Dex dex; private final int nameIndex; private final int protoIndex; public MethodId(Dex dex, int declaringClassIndex, int protoIndex, int nameIndex) { this.dex = dex; this.declaringClassIndex = declaringClassIndex; this.protoIndex = protoIndex; this.nameIndex = nameIndex; } public int getDeclaringClassIndex() { return this.declaringClassIndex; } public int getProtoIndex() { return this.protoIndex; } public int getNameIndex() { return this.nameIndex; } public int compareTo(MethodId other) { if (this.declaringClassIndex != other.declaringClassIndex) { return Unsigned.compare(this.declaringClassIndex, other.declaringClassIndex); } if (this.nameIndex != other.nameIndex) { return Unsigned.compare(this.nameIndex, other.nameIndex); } return Unsigned.compare(this.protoIndex, other.protoIndex); } public void writeTo(Section out) { out.writeUnsignedShort(this.declaringClassIndex); out.writeUnsignedShort(this.protoIndex); out.writeInt(this.nameIndex); } public String toString() { if (this.dex == null) { return this.declaringClassIndex + " " + this.protoIndex + " " + this.nameIndex; } return ((String) this.dex.typeNames().get(this.declaringClassIndex)) + "." + ((String) this.dex.strings().get(this.nameIndex)) + this.dex.readTypeList(((ProtoId) this.dex.protoIds().get(this.protoIndex)).getParametersOffset()); } }
[ "itop.my@gmail.com" ]
itop.my@gmail.com
890ea459c833904f7c4a8ad40fe2e05c9187a445
7ae0e08a6bf05dc4b5e690f46d72997225e7d42d
/src/main/java/org/gwtproject/i18n/client/impl/cldr/DateTimeFormatInfoImpl_en_VI.java
41a271659e5a04688b30d50733fa9a9cb9ff1ebb
[]
no_license
niloc132/gwt-i18n-cldr
776521e18f8a43f2d72b72b5b4b76e0ec6103571
c57796a071a73b1bbeff678c14a4be57fa20005a
refs/heads/master
2020-08-14T05:30:26.612739
2019-10-13T08:54:05
2019-10-13T08:54:05
215,106,442
0
0
null
2019-10-14T17:34:21
2019-10-14T17:34:21
null
UTF-8
Java
false
false
2,058
java
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.gwtproject.i18n.client.impl.cldr; // DO NOT EDIT - GENERATED FROM CLDR AND ICU DATA /** * Implementation of DateTimeFormatInfo for the "en_VI" locale. */ public class DateTimeFormatInfoImpl_en_VI extends DateTimeFormatInfoImpl_en_001 { @Override public String[] ampms() { return new String[] { "AM", "PM" }; } @Override public String dateFormatFull() { return "EEEE, MMMM d, y"; } @Override public String dateFormatLong() { return "MMMM d, y"; } @Override public String dateFormatMedium() { return "MMM d, y"; } @Override public String dateFormatShort() { return "M/d/yy"; } @Override public int firstDayOfTheWeek() { return 0; } @Override public String formatMonthAbbrevDay() { return "MMM d"; } @Override public String formatMonthFullDay() { return "MMMM d"; } @Override public String formatMonthFullWeekdayDay() { return "EEEE, MMMM d"; } @Override public String formatMonthNumDay() { return "M/d"; } @Override public String formatYearMonthAbbrevDay() { return "MMM d, y"; } @Override public String formatYearMonthFullDay() { return "MMMM d, y"; } @Override public String formatYearMonthNum() { return "M/y"; } @Override public String formatYearMonthNumDay() { return "M/d/y"; } @Override public String formatYearMonthWeekdayDay() { return "EEE, MMM d, y"; } }
[ "akabme@gmail.com" ]
akabme@gmail.com
1409e554468b9e2981e249f6d74b4b433ec34f1a
524df4196241684fc6d0fa0bff09c6cf5b72fd17
/CustomSearchSuggestionItem/app/src/main/java/com/nex3z/examples/customsearchsuggestionitem/SimpleSearchSuggestionsProvider.java
8674ab497ed2e49822ee9e71de725f7c1fa0b611
[]
no_license
WZFlik/android-examples
459330f04fe4d374ba00141917487532cd89d142
7da7a685d31dac1388406dbaa8ccf5b3109e924a
refs/heads/master
2020-03-28T21:08:34.649938
2018-06-04T14:57:18
2018-06-04T14:57:18
149,132,237
1
0
null
2018-09-17T13:48:20
2018-09-17T13:48:20
null
UTF-8
Java
false
false
582
java
package com.nex3z.examples.customsearchsuggestionitem; import android.content.SearchRecentSuggestionsProvider; public class SimpleSearchSuggestionsProvider extends SearchRecentSuggestionsProvider { private static final String LOG_TAG = SimpleSearchSuggestionsProvider.class.getSimpleName(); public final static String AUTHORITY = "com.nex3z.examples.customsearchsuggestionitem.SimpleSearchSuggestionsProvider"; public final static int MODE = DATABASE_MODE_QUERIES; public SimpleSearchSuggestionsProvider() { setupSuggestions(AUTHORITY, MODE); } }
[ "litianxing9@gmail.com" ]
litianxing9@gmail.com
a0c3ab438ef363fde20e3ba409d0236e307080ae
c9884b5938b12d77574ba5d9fbea735ba347e5f7
/src/main/java/com/sen/blog/shiro/CaptchaAuthenticationToken.java
285d23a9ea809f83259c5ac077be2439e21998ef
[ "Apache-2.0" ]
permissive
sumforest/blog
29743807d8da8c5df4979545240bc00665973082
399517d5c23579fd5fa60df507575656dfcdddbe
refs/heads/master
2022-12-20T13:28:57.810309
2019-10-08T16:34:48
2019-10-08T16:34:48
210,127,788
0
0
Apache-2.0
2022-12-16T06:23:28
2019-09-22T10:19:41
Java
UTF-8
Java
false
false
770
java
package com.sen.blog.shiro; import org.apache.shiro.authc.UsernamePasswordToken; /** * 扩展Shiro登录表单Token,增加验证码字段 */ public class CaptchaAuthenticationToken extends UsernamePasswordToken { private static final long serialVersionUID = -2398729751909840213L; private String kaptcha; public CaptchaAuthenticationToken (){} public CaptchaAuthenticationToken (String username, String password, boolean rememberMe, String host, String kaptcha) { super(username, password, rememberMe, host); this.kaptcha = kaptcha; } public void setKaptcha(String kaptcha){ this.kaptcha= kaptcha; } public String getKaptcha(){ return this.kaptcha; } }
[ "12345678" ]
12345678
84c7eab89238ca1e3fa4dc3ad474f79e7a920a56
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/3.1.0-stable0/code/base/common/src/com/tc/io/serializer/impl/StringUTFSerializer.java
33031d3e41b2e646b8afdc43e41e2210963b06ad
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
649
java
/* * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved. */ package com.tc.io.serializer.impl; import com.tc.io.serializer.api.Serializer; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; public class StringUTFSerializer implements Serializer { public void serializeTo(Object o, ObjectOutput out) throws IOException { out.writeUTF((String) o); } public Object deserializeFrom(ObjectInput in) throws IOException { return in.readUTF(); } public byte getSerializerID() { return STRING_UTF; } }
[ "foshea@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
foshea@7fc7bbf3-cf45-46d4-be06-341739edd864
a194f343306b06123a96c3fe925a0b33dc11070e
cee232c96f9ed255db9545b78729fcf0c7d62365
/src/main/java/io/devfactory/core/web/view/JspView.java
25ac08d972f787b0541b099b6b05c23b5d601539
[ "MIT" ]
permissive
mvmaniac/basic-servlet
afef266ff692dd1377e1185c8cb0813a87a57272
f048b04b880a75eb9f276a478157feec9a86ccfd
refs/heads/master
2023-06-24T12:19:02.536626
2022-10-19T14:13:06
2022-10-19T14:13:06
133,379,140
0
1
MIT
2023-06-14T22:29:34
2018-05-14T15:02:49
Java
UTF-8
Java
false
false
1,161
java
package io.devfactory.core.web.view; import javax.servlet.RequestDispatcher; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Map; import java.util.Set; public class JspView implements View { private static final String DEFAULT_REDIRECT_PREFIX = "redirect:"; private String viewName; public JspView(String viewName) { if (viewName == null) { throw new NullPointerException("viewName is null. 이동할 URL을 추가해 주세요."); } this.viewName = viewName; } @Override public void render(Map<String, ?> model, HttpServletRequest request, HttpServletResponse response) throws Exception { if (viewName.startsWith(DEFAULT_REDIRECT_PREFIX)) { response.sendRedirect(viewName.substring(DEFAULT_REDIRECT_PREFIX.length())); return; } Set<String> keys = model.keySet(); for (String key : keys) { request.setAttribute(key, model.get(key)); } RequestDispatcher rd = request.getRequestDispatcher(viewName); rd.forward(request, response); } }
[ "mvmaniaz@gmail.com" ]
mvmaniaz@gmail.com
e520a7aa36a2311dcf39720b1aefe004e2cec1c1
73ed047720702445d6d35b0bf80a142b104982f3
/logisland-plugins/logisland-sampling-plugin/src/test/java/com/hurence/logisland/processor/SampleRecordsTest.java
90ade0c45837d092cb0ffb9fee57fd277373a79d
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
mariemat/logisland
e9b4c6bb0739972e4875b1abd0a508cd21cb43a6
f5fd9c94c28d27430026ad7d50afdc65f48bd9e6
refs/heads/master
2021-01-21T18:40:06.628325
2017-05-22T08:42:01
2017-05-22T08:42:01
92,075,118
0
0
null
2017-05-22T16:27:34
2017-05-22T16:27:34
null
UTF-8
Java
false
false
6,478
java
/** * Copyright (C) 2016 Hurence (bailet.thomas@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hurence.logisland.processor; import com.hurence.logisland.record.*; import com.hurence.logisland.util.runner.MockRecord; import com.hurence.logisland.util.runner.TestRunner; import com.hurence.logisland.util.runner.TestRunners; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.List; public class SampleRecordsTest { static String RAW_DATA1 = "/data/raw-data1.txt"; static String RAW_DATA2 = "/data/raw-data2.txt"; static String SAMPLED_RECORD = "sampled_record"; private static Logger logger = LoggerFactory.getLogger(SampleRecordsTest.class); private Record createRecord(long time, double value) { return new StandardRecord(SAMPLED_RECORD) .setField(FieldDictionary.RECORD_VALUE, FieldType.DOUBLE, value) .setField(FieldDictionary.RECORD_TIME, FieldType.LONG, time); } private List<Record> loadData(String filename) throws IOException { BufferedReader br = new BufferedReader(new FileReader(filename)); try { List<Record> res = new ArrayList<>(); String line; while ((line = br.readLine()) != null) { line = line.trim(); if (line.startsWith("#")) { continue; } int pos = line.indexOf(","); String ts = line.substring(0, pos); String val = line.substring(pos + 1); Long lts = Long.parseLong(ts); Double dval = Double.parseDouble(val); res.add(createRecord(lts, dval)); } return res; } finally { br.close(); } } private Record[] createRawData(int sampleCount) { Record[] res = new Record[sampleCount]; for (int i = 0; i < sampleCount; i++) { res[i] = createRecord( ((long) i + 1000000L), (Math.sin((double) i / 300)) * 300); } return res; } private void printRecords(List<MockRecord> records){ records.forEach(r -> System.out.println(r.getField(FieldDictionary.RECORD_TIME).asLong() + ":" + r.getField(FieldDictionary.RECORD_VALUE).asDouble()) ); } @Test public void validateNoSampling() { final TestRunner testRunner = TestRunners.newTestRunner(new SampleRecords()); testRunner.setProperty(SampleRecords.RECORD_VALUE_FIELD, FieldDictionary.RECORD_VALUE); testRunner.setProperty(SampleRecords.RECORD_TIME_FIELD, FieldDictionary.RECORD_TIME); testRunner.setProperty(SampleRecords.SAMPLING_ALGORITHM, SampleRecords.NO_SAMPLING); testRunner.setProperty(SampleRecords.SAMPLING_PARAMETER, "0"); testRunner.assertValid(); int recordsCount = 2000; testRunner.clearQueues(); testRunner.enqueue(createRawData(recordsCount)); testRunner.run(); testRunner.assertAllInputRecordsProcessed(); testRunner.assertOutputRecordsCount(recordsCount); } @Test public void validateFirstItemSampling() { int recordsCount = 2000; final TestRunner testRunner = TestRunners.newTestRunner(new SampleRecords()); testRunner.setProperty(SampleRecords.RECORD_VALUE_FIELD, FieldDictionary.RECORD_VALUE); testRunner.setProperty(SampleRecords.RECORD_TIME_FIELD, FieldDictionary.RECORD_TIME); testRunner.setProperty(SampleRecords.SAMPLING_ALGORITHM, SampleRecords.FIRST_ITEM_SAMPLING); testRunner.setProperty(SampleRecords.SAMPLING_PARAMETER, "230"); // bucket size => 9 buckets testRunner.assertValid(); testRunner.clearQueues(); testRunner.enqueue(createRawData(recordsCount)); testRunner.run(); testRunner.assertAllInputRecordsProcessed(); testRunner.assertOutputRecordsCount(9); printRecords(testRunner.getOutputRecords()); } @Test public void validateAverageSampling() { int recordsCount = 2000; final TestRunner testRunner = TestRunners.newTestRunner(new SampleRecords()); testRunner.setProperty(SampleRecords.RECORD_VALUE_FIELD, FieldDictionary.RECORD_VALUE); testRunner.setProperty(SampleRecords.RECORD_TIME_FIELD, FieldDictionary.RECORD_TIME); testRunner.setProperty(SampleRecords.SAMPLING_ALGORITHM, SampleRecords.AVERAGE_SAMPLING); testRunner.setProperty(SampleRecords.SAMPLING_PARAMETER, "230"); // bucket size => 9 buckets testRunner.assertValid(); testRunner.clearQueues(); testRunner.enqueue(createRawData(recordsCount)); testRunner.run(); testRunner.assertAllInputRecordsProcessed(); testRunner.assertOutputRecordsCount(9); printRecords(testRunner.getOutputRecords()); } @Test public void validateLLTBSampling() { int recordsCount = 2000; final TestRunner testRunner = TestRunners.newTestRunner(new SampleRecords()); testRunner.setProperty(SampleRecords.RECORD_VALUE_FIELD, FieldDictionary.RECORD_VALUE); testRunner.setProperty(SampleRecords.RECORD_TIME_FIELD, FieldDictionary.RECORD_TIME); testRunner.setProperty(SampleRecords.SAMPLING_ALGORITHM, SampleRecords.LTTB_SAMPLING); testRunner.setProperty(SampleRecords.SAMPLING_PARAMETER, "10"); // bucket size => 9 buckets testRunner.assertValid(); testRunner.clearQueues(); testRunner.enqueue(createRawData(recordsCount)); testRunner.run(); testRunner.assertAllInputRecordsProcessed(); testRunner.assertOutputRecordsCount(9); printRecords(testRunner.getOutputRecords()); } }
[ "bailet.thomas@gmail.com" ]
bailet.thomas@gmail.com
c5d865233e185e06ee95a36677de50cc95d5ce69
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a121/A121109Test.java
372136def4d104f69cc48a16e756f1e2198ccfab
[]
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.a121; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A121109Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
1de50d42b02fcc4fbe5f3a4e6abc667a27b97362
e475d02258fa33720de8ff4673acce1f0129743f
/src/test/java/com/altran/wide/application/security/SecurityUtilsUnitTest.java
aecf99e797baf3aa9d637e25f29239cd6ce93637
[]
no_license
jadozr/wide-application
15d894d8a754411b66e512f209f6e2dfe1a579a9
65c3c2c0c35c4371bb603e5dbb98ba3e0cc001de
refs/heads/master
2020-04-04T11:11:45.613585
2018-11-02T15:01:49
2018-11-02T15:01:49
155,881,054
0
0
null
null
null
null
UTF-8
Java
false
false
3,214
java
package com.altran.wide.application.security; import org.junit.Test; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import java.util.ArrayList; import java.util.Collection; import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; /** * Test class for the SecurityUtils utility class. * * @see SecurityUtils */ public class SecurityUtilsUnitTest { @Test public void testgetCurrentUserLogin() { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin")); SecurityContextHolder.setContext(securityContext); Optional<String> login = SecurityUtils.getCurrentUserLogin(); assertThat(login).contains("admin"); } @Test public void testgetCurrentUserJWT() { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "token")); SecurityContextHolder.setContext(securityContext); Optional<String> jwt = SecurityUtils.getCurrentUserJWT(); assertThat(jwt).contains("token"); } @Test public void testIsAuthenticated() { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin")); SecurityContextHolder.setContext(securityContext); boolean isAuthenticated = SecurityUtils.isAuthenticated(); assertThat(isAuthenticated).isTrue(); } @Test public void testAnonymousIsNotAuthenticated() { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); Collection<GrantedAuthority> authorities = new ArrayList<>(); authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS)); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("anonymous", "anonymous", authorities)); SecurityContextHolder.setContext(securityContext); boolean isAuthenticated = SecurityUtils.isAuthenticated(); assertThat(isAuthenticated).isFalse(); } @Test public void testIsCurrentUserInRole() { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); Collection<GrantedAuthority> authorities = new ArrayList<>(); authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.USER)); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("user", "user", authorities)); SecurityContextHolder.setContext(securityContext); assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.USER)).isTrue(); assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.ADMIN)).isFalse(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
1383abfc71a90ab19ea0e62276cf515a1bdaafd8
750ad9d1e511b23be27acc60998cb81eb8989025
/src/main/java/com/teddy/dev/api/pojo/ApiEntry.java
65b8e3bc7f5129f99473d8533e388c135bd232e8
[]
no_license
Leefacy/dev-api
d3bb303e39dc5841e69a4e4981b6a0f6e5f1fcd0
6b89be77b5aa5cb696434c0c9c7b2bea8245e477
refs/heads/master
2021-05-01T17:07:28.354336
2018-02-25T10:06:52
2018-02-25T10:06:52
120,994,268
0
0
null
null
null
null
UTF-8
Java
false
false
965
java
/** * TODO */ package com.teddy.dev.api.pojo; /** * 字段基础单元 * * @author Teddy.D.Share 2018年1月30日 */ public class ApiEntry { private String name; // key private String type; // type private String desc; // desc public String getName() { return name; } public void setName(String name) { this.name = name; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } /** * */ public ApiEntry() { super(); // TODO Auto-generated constructor stub } /** * @param name * @param type * @param desc */ public ApiEntry(String name, String type, String desc) { super(); this.name = name; this.type = type; this.desc = desc; } @Override public String toString() { return "ApiEntry [name=" + name + ", type=" + type + ", desc=" + desc + "]"; } }
[ "starlich.1207@gmail.com" ]
starlich.1207@gmail.com
00e5bca05d08a4645160c50f41edba40712ad07d
20657e89da643aa74b9a637686b7db16cf4483ca
/2.JavaCore/src/com/javarush/task/task20/task2025/Solution.java
92a5fae525f10551cece9b0de64a8d6ac55ad0b3
[]
no_license
ValentinKiselev/StudyJava_ru
383009754dadc7966bd96768c803531fe2b9f626
2631a6d9c50f7e773708ec9a9d9bb8faefe802a8
refs/heads/master
2021-06-26T07:39:52.632439
2020-11-03T10:22:26
2020-11-03T10:22:26
165,408,181
0
0
null
null
null
null
UTF-8
Java
false
false
1,731
java
package com.javarush.task.task20.task2025; import java.util.*; public class Solution { public static long[] getNumbers(long N) { /* В решении проверяется соответствие всех натуральных чисел меньше N числам Армстронга. */ long[] armstrongNum = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474, 54748, 92727, 93084, 548834, 1741725, 4210818, 9800817, 9926315, 24678050, 24678051, 88593477, 146511208, 472335975, 534494836, 912985153, 4679307774L, 32164049650L, 32164049651L, 40028394225L, 42678290603L, 44708635679L, 49388550606L, 82693916578L, 94204591914L, 28116440335967L, 4338281769391370L, 4338281769391371L, 21897142587612075L, 35641594208964132L, 35875699062250035L, 1517841543307505039L, 3289582984443187032L, 4498128791164624869L, 4929273885928088826L}; ArrayList<Long> collect = new ArrayList<>(); for (long x : armstrongNum) { if (x < N) { collect.add(x); } } if (collect.size() > 0) { long[] result = new long[collect.size()]; for (int i = 0; i < collect.size(); i++) { result[i] = collect.get(i); } return result; } return null; } public static void main(String[] args) { long[] ex = getNumbers(2); if (ex == null) { System.out.println("null returned"); } else { for (long z : ex) { System.out.println(z); } } } }
[ "valentin_kiselev@iszf.irk.ru" ]
valentin_kiselev@iszf.irk.ru
5c1c95ba0e8764c29f5f0d380abe980b97a4af10
377405a1eafa3aa5252c48527158a69ee177752f
/src/com/google/android/gms/internal/ib.java
b6b9f52bd9b7cebb3b637c4fd15c952a3c54bf31
[]
no_license
apptology/AltFuelFinder
39c15448857b6472ee72c607649ae4de949beb0a
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
refs/heads/master
2016-08-12T04:00:46.440301
2015-10-25T18:25:16
2015-10-25T18:25:16
44,921,258
0
1
null
null
null
null
UTF-8
Java
false
false
5,044
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.google.android.gms.internal; import android.os.RemoteException; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.PendingResult; import com.google.android.gms.common.api.Result; import com.google.android.gms.common.api.Status; import com.google.android.gms.plus.People; import com.google.android.gms.plus.Plus; import com.google.android.gms.plus.internal.e; import com.google.android.gms.plus.model.people.Person; import com.google.android.gms.plus.model.people.PersonBuffer; import java.util.Collection; public final class ib implements People { private static abstract class a extends com.google.android.gms.plus.Plus.a { public com.google.android.gms.plus.People.LoadPeopleResult ab(Status status) { return new com.google.android.gms.plus.People.LoadPeopleResult(this, status) { final a UH; final Status wz; public String getNextPageToken() { return null; } public PersonBuffer getPersonBuffer() { return null; } public Status getStatus() { return wz; } public void release() { } { UH = a1; wz = status; super(); } }; } public Result d(Status status) { return ab(status); } private a() { } } public ib() { } public Person getCurrentPerson(GoogleApiClient googleapiclient) { return Plus.a(googleapiclient, Plus.wx).getCurrentPerson(); } public PendingResult load(GoogleApiClient googleapiclient, Collection collection) { return googleapiclient.a(new a(collection) { final ib UE; final Collection UF; protected volatile void a(com.google.android.gms.common.api.Api.a a1) throws RemoteException { a((e)a1); } protected void a(e e1) { e1.a(this, UF); } { UE = ib.this; UF = collection; super(); } }); } public transient PendingResult load(GoogleApiClient googleapiclient, String as[]) { return googleapiclient.a(new a(as) { final ib UE; final String UG[]; protected volatile void a(com.google.android.gms.common.api.Api.a a1) throws RemoteException { a((e)a1); } protected void a(e e1) { e1.d(this, UG); } { UE = ib.this; UG = as; super(); } }); } public PendingResult loadConnected(GoogleApiClient googleapiclient) { return googleapiclient.a(new a() { final ib UE; protected volatile void a(com.google.android.gms.common.api.Api.a a1) throws RemoteException { a((e)a1); } protected void a(e e1) { e1.m(this); } { UE = ib.this; super(); } }); } public PendingResult loadVisible(GoogleApiClient googleapiclient, int i, String s) { return googleapiclient.a(new a(i, s) { final int UD; final ib UE; final String Uw; protected volatile void a(com.google.android.gms.common.api.Api.a a1) throws RemoteException { a((e)a1); } protected void a(e e1) { a(e1.a(this, UD, Uw)); } { UE = ib.this; UD = i; Uw = s; super(); } }); } public PendingResult loadVisible(GoogleApiClient googleapiclient, String s) { return googleapiclient.a(new a(s) { final ib UE; final String Uw; protected volatile void a(com.google.android.gms.common.api.Api.a a1) throws RemoteException { a((e)a1); } protected void a(e e1) { a(e1.o(this, Uw)); } { UE = ib.this; Uw = s; super(); } }); } }
[ "rich.foreman@apptology.com" ]
rich.foreman@apptology.com
9eed1743081e1e6596832f0a599b3c172df04934
8a6cedbbdec2bd0e27a30e6356bc90ce2bbaaf0d
/app/src/main/java/id/can/web/taxionline/Rest/Server/ApiServiceServer.java
e257d5f9f302fec859ac4d7907c688edd5ac8c75
[]
no_license
iavtamvan/TaxiOnline
aaf74e76e9a636942702e8f168b4046ab5eb3a46
fb9bb252e51f66ca351f20b74b649b99abb5b811
refs/heads/master
2020-03-17T07:06:38.114500
2018-06-02T03:43:05
2018-06-02T03:43:05
133,383,732
1
0
null
null
null
null
UTF-8
Java
false
false
3,971
java
package id.can.web.taxionline.Rest.Server; import java.util.ArrayList; import id.can.web.taxionline.Model.BankModel; import id.can.web.taxionline.Model.CallCenterModel; import id.can.web.taxionline.Model.CariJadwalModel; import id.can.web.taxionline.Model.HistoryOrderModel; import id.can.web.taxionline.Model.KotaAwalModel; import id.can.web.taxionline.Model.KotaTujuanModel; import id.can.web.taxionline.Model.HistoryPoinModel; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.http.Field; import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.Query; public interface ApiServiceServer { // http://taxi.can.co.id/travel_api/apilist/get_callcenter.php?userId=el&loginToken=e8b685652b62a2effce190c37fd12c @GET("getLatLong.php") Call<ResponseBody> getTps(); @GET("get_callcenter.php") Call<CallCenterModel> getCallCenter( @Query("userId") String userid, @Query("loginToken") String token); @GET("saldo_user_api.php") Call<ArrayList<CallCenterModel>> getSaldoUser( @Query("userId") String userid, @Query("loginToken") String token); @GET("slider.php") Call<ArrayList<CallCenterModel>> getSlider( @Query("userId") String userid, @Query("loginToken") String token); @GET("faq_api.php") Call<ArrayList<CallCenterModel>> getFaq( @Query("userId") String userid, @Query("loginToken") String token); @GET("get_kota_awal.php") Call<ArrayList<KotaAwalModel>> getKotaAwal( @Query("userId") String userid, @Query("loginToken") String token); @GET("get_kota_tujuan.php") Call<ArrayList<KotaTujuanModel>> getKotaTujuan( @Query("userId") String userid, @Query("loginToken") String token); @GET("get_bank.php") Call<ArrayList<BankModel>> getBank( @Query("userId") String userid, @Query("loginToken") String token); @GET("get_history_order.php") Call<ArrayList<HistoryOrderModel>> getHistoryOrder( @Query("userId") String userid, @Query("loginToken") String token ); @GET("get_history_poin.php") Call<ArrayList<HistoryPoinModel>> getHistoryPoin( @Query("userId") String userid, @Query("loginToken") String token ); @FormUrlEncoded @POST("get_serch_byKota.php") Call<ArrayList<CariJadwalModel>> postCariJadwal( @Query("userId") String userid, @Query("loginToken") String token, @Field("tanggal") String tanggal, @Field("pesan") String pesan, @Field("kotaAwal") String kotaAwal, @Field("kotaTujuan") String kotaTujuan); @FormUrlEncoded @POST("register_api.php") Call<ResponseBody> postRegister(@Field("userId") String userId, @Field("fullname") String fullname, @Field("email") String email, @Field("telpon") String telpon, @Field("password") String password, @Field("gender") String gender, @Field("deviceid") String deviceid); @FormUrlEncoded @POST("login_api.php") Call<ResponseBody> postLogin(@Field("mobileEmail") String U_NAME, @Field("mobilePassword") String U_PASSWORD); @FormUrlEncoded @POST("logout_api.php") Call<ResponseBody> postLogout(@Field("user_id") String user_id); @FormUrlEncoded @POST("forgot_password.php") Call<ResponseBody> postForgotPassword(@Field("username") String username); // @Multipart // @POST("upload.php") // Call<Result> postIMmage(@Part MultipartBody.Part image); }
[ "ade.fajr.ariav@gmail.com" ]
ade.fajr.ariav@gmail.com
1e653a995fd1a9be97155af9990e0994bc04a0df
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
/iBatisSqlChecker/src/test/java/com/servicelive/ibatis/sqlchecker/XmlUtilTest.java
63abb9b31ab581561028dcfd76a5ffec812e8411
[]
no_license
ssriha0/sl-b2b-platform
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
refs/heads/master
2023-01-06T18:32:24.623256
2020-11-05T12:23:26
2020-11-05T12:23:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,479
java
package com.servicelive.ibatis.sqlchecker; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import junit.framework.Assert; import org.apache.log4j.Logger; import org.junit.Test; import org.w3c.dom.Comment; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.servicelive.ibatis.sqlchecker.XmlUtil; public class XmlUtilTest { private Logger logger = Logger.getLogger(XmlUtilTest.class); private XmlUtil xmlUtil; @Test public void convertDocumentToString(){ xmlUtil = new XmlUtil(); String documentAsString = null; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); try{ DocumentBuilder builder = dbf.newDocumentBuilder(); Document doc = builder.newDocument(); Element element = doc.createElement("root"); doc.appendChild(element); Comment comment = doc.createComment("This is a comment"); doc.insertBefore(comment, element); Element itemElement = doc.createElement("item"); element.appendChild(itemElement); itemElement.setAttribute("myattr", "attrvalue"); itemElement.insertBefore(doc.createTextNode("text"), itemElement.getLastChild()); documentAsString = xmlUtil.convertW3CDocumentToString(doc); Assert.assertNotNull("Document is Null",documentAsString); }catch (Exception e) { logger.error("Exception in converting document to string:"+ e.getMessage()); } } }
[ "Kunal.Pise@transformco.com" ]
Kunal.Pise@transformco.com
acb1a41a385d0674292257dc09ba7c10e9a9f08b
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_1477.java
ad5706137112360201d3a0faaaa29ded94aa8d03
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
151
java
package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_1477 { }
[ "sebastien.lesaint@gmail.com" ]
sebastien.lesaint@gmail.com
b71cea4dd0ab3976954b889858453dd0c5fca15a
e89dc01c95b8b45404f971517c2789fd21657749
/src/main/java/com/alipay/api/domain/AlipayDataAiserviceCloudbusScheduletaskodQueryModel.java
dcf13307cede90ea4a7c4e6a578c61eb90808fa9
[ "Apache-2.0" ]
permissive
guoweiecust/alipay-sdk-java-all
3370466eec70c5422c8916c62a99b1e8f37a3f46
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
refs/heads/master
2023-05-05T07:06:47.823723
2021-05-25T15:26:21
2021-05-25T15:26:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
849
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-10-21 10:35:15 */ public class AlipayDataAiserviceCloudbusScheduletaskodQueryModel extends AlipayObject { private static final long serialVersionUID = 2577165336454674195L; /** * 接口版本 */ @ApiField("app_version") private String appVersion; /** * 任务id */ @ApiField("plan_id") private String planId; public String getAppVersion() { return this.appVersion; } public void setAppVersion(String appVersion) { this.appVersion = appVersion; } public String getPlanId() { return this.planId; } public void setPlanId(String planId) { this.planId = planId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
9d97b04d81c81f9eb9d2b9af1f75491ed6a4667b
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
/bazaar8.apk-decompiled/sources/com/farsitel/bazaar/ui/fehrest/FehrestParams.java
0c3726e80b7abcff93838ac03009f54bac63bf0b
[]
no_license
BaseMax/PopularAndroidSource
a395ccac5c0a7334d90c2594db8273aca39550ed
bcae15340907797a91d39f89b9d7266e0292a184
refs/heads/master
2020-08-05T08:19:34.146858
2019-10-06T20:06:31
2019-10-06T20:06:31
212,433,298
2
0
null
null
null
null
UTF-8
Java
false
false
1,668
java
package com.farsitel.bazaar.ui.fehrest; import c.c.a.c.d.e; import com.farsitel.bazaar.common.model.page.PageTypeItem; import h.a.l; import h.f.b.f; import h.f.b.j; import java.io.Serializable; import java.util.List; /* compiled from: FehrestParams.kt */ public final class FehrestParams implements Serializable { public final List<PageTypeItem> pageItems; public final String referrer; public final boolean showAnimation; public final boolean showBackButton; public final String slug; public final String titleName; public FehrestParams(String str, List<? extends PageTypeItem> list, String str2, boolean z, boolean z2, String str3) { j.b(str, "slug"); j.b(list, "pageItems"); this.slug = str; this.pageItems = list; this.titleName = str2; this.showBackButton = z; this.showAnimation = z2; this.referrer = str3; } public final List<PageTypeItem> a() { return this.pageItems; } public final boolean b() { return this.showAnimation; } public final String c() { return this.slug; } public final String d() { return this.titleName; } public final String getReferrer() { return this.referrer; } /* JADX INFO: this call moved to the top of the method (can break code semantics) */ public /* synthetic */ FehrestParams(String str, List list, String str2, boolean z, boolean z2, String str3, int i2, f fVar) { this(str, (i2 & 2) != 0 ? l.a() : list, (i2 & 4) != 0 ? null : str2, (i2 & 8) != 0 ? false : z, (i2 & 16) != 0 ? true : z2, (i2 & 32) != 0 ? e.a() : str3); } }
[ "MaxBaseCode@gmail.com" ]
MaxBaseCode@gmail.com
0bfcff92cb4784c8fae89091aafbe9628b14bf13
0a5e60366a4ed63ae186de5ab7eb3fa59983f6d5
/2.JavaCore/src/com/javarush/task/task13/task1315/Solution.java
632906517cc1c1c3139386a9e779f0f9f198e98b
[]
no_license
p-agapov/JavaRushTasks
b2f45e648d18b10f28abf963cc6f0fa4a10cdf22
94fdfcdadd1876f465dc1bcf8f4d0eae4c06a839
refs/heads/master
2021-03-27T14:12:07.320434
2018-05-03T09:59:25
2018-05-03T09:59:25
95,984,353
0
0
null
null
null
null
UTF-8
Java
false
false
1,077
java
package com.javarush.task.task13.task1315; /* Том, Джерри и Спайк */ public class Solution { public static void main(final String[] args) { } //может двигаться public interface Movable { void move(); } //может быть съеден public interface Eatable { void eaten(); } //может кого-нибудь съесть public interface Eat { void eat(); } public static class Dog implements Movable, Eat { @Override public void move() { } @Override public void eat() { } } public static class Cat implements Movable, Eatable, Eat { @Override public void move() { } @Override public void eaten() { } @Override public void eat() { } } public static class Mouse implements Movable, Eatable { @Override public void move() { } @Override public void eaten() { } } }
[ "p.a.agapov@gmail.com" ]
p.a.agapov@gmail.com
623387622b694461f9ffea39da91e54655b4dd88
56fcbd0681b112f0e7c6ec8cbd7b4aaf3ae75cae
/shopComputer/BE/src/main/java/com/example/be/model/repo/ProductInOrderRepo.java
161eb20a1f92476ba166fb51b508d4eb0ca8648a
[]
no_license
thanhtai18021994/project_for_cv
6b34114992befc59cf72e83616ee82b17a363e9d
dacc9297f63d5360794c2d3f03b7f637317166f3
refs/heads/main
2023-08-21T15:42:17.548275
2021-10-28T08:41:17
2021-10-28T08:41:17
401,180,290
0
0
null
null
null
null
UTF-8
Java
false
false
233
java
package com.example.be.model.repo; import com.example.be.model.entity.ProductInOrder; import org.springframework.data.jpa.repository.JpaRepository; public interface ProductInOrderRepo extends JpaRepository<ProductInOrder,Long> { }
[ "taibui18021994@gmail.com" ]
taibui18021994@gmail.com
b5d59f89db227905da5d8476358558e7a42c678f
f7c5e3f5834206a7b0d1dadd773d1de032f731e7
/dmerce3/src/ncc/com/wanci/ncc/servicemonitor/MonitorInetService.java
bcd4ae7af6e8175cb5f1ac664a7f008c98047326
[]
no_license
rbe/dmerce
93d601462c50dfbbf62b577803ae697d3abde333
3cfcae894c165189cc3ff61e27ca284f09e87871
refs/heads/master
2021-01-01T17:06:27.872197
2012-05-04T07:22:26
2012-05-04T07:22:26
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
5,209
java
/** * MonitorInetService.java * * Created on 1. Januar 2003, 23:09 */ package com.wanci.ncc.servicemonitor; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.ConnectException; import java.net.DatagramSocket; import java.net.Socket; import java.net.SocketException; import com.wanci.dmerce.kernel.Logfile; import com.wanci.ncc.audit.AuditMonitorInetService; /** Überwachen eines Internet-Server-Dientes * Abstrakte Klasse, die alle grundlegenden Methoden zur Überwachung * von TCP- und UDP-basierten Internet-Diensten zur Verfügung stellt * * @author rb */ public abstract class MonitorInetService implements InetServiceMonitor { private Logfile logfile; private MonitorInetServiceDefinition misd; private InetServiceDefinition isd; private Socket[] tcpSockets; private InputStream[] tcpIns; private OutputStream[] tcpOuts; private String tcpSendString; private String tcpExpectedAnswer; private DatagramSocket[] udpSockets; /** Creates a new instance of MonitorInetService * * @param inetServiceName Name des Services * @param tcpPorts TCP-Ports * @param udpPorts UDP-Ports */ public MonitorInetService(MonitorInetServiceDefinition misd) { this.misd = misd; this.isd = misd.getInetServiceDefinition(); logfile = new Logfile("MonitorInetService[" + isd.getInetServiceName() + "]"); setDebug(false); } public abstract AuditMonitorInetService check(); /** * @see com.wanci.ncc.InetServiceMonitor#checkTcp() */ public boolean checkTcp() throws IOException { boolean ok = false; System.out.println(misd.isConnectOnly()); if (!misd.isConnectOnly()) { int[] tcpPorts = isd.getTcpPorts(); if (tcpSendString != null && tcpExpectedAnswer != null) { for (int i = 0; i < tcpPorts.length; i++) { logfile.putDebug( "Writing to TCP-Port " + tcpPorts[i] + " " + tcpSendString.trim()); tcpOuts[i].write(tcpSendString.getBytes()); logfile.putDebug("Reading from TCP-Port " + tcpPorts[i]); BufferedReader b = new BufferedReader(new InputStreamReader(tcpIns[i])); String s; logfile.putDebug("Trying to find: " + tcpExpectedAnswer); while ((s = b.readLine()) != null) { if (s.indexOf(tcpExpectedAnswer) != -1) { logfile.putDebug( "Found " + tcpExpectedAnswer + " in line: " + s); ok = true; } } } } logfile.write(); return ok; } else return true; } /** * @see com.wanci.ncc.InetServiceMonitor#closeTcpSockets() */ public void closeTcpSockets() throws IOException { for (int i = 0; i < tcpSockets.length; i++) { Socket socket = tcpSockets[i]; if (socket != null) { socket.shutdownInput(); socket.shutdownOutput(); socket.close(); } } } public void closeUdpSockets() throws SocketException { for (int i = 0; i < udpSockets.length; i++) { DatagramSocket socket = udpSockets[i]; if (socket != null) { socket.disconnect(); } } } public abstract void deinit(); public void dump() { int[] tcpPorts = isd.getTcpPorts(); int[] udpPorts = isd.getUdpPorts(); logfile.putDump("Service: " + isd.getInetServiceName()); for (int i = 0; i < tcpPorts.length; i++) logfile.putDump("TCP-Port: " + tcpPorts[i]); for (int i = 0; i < udpPorts.length; i++) logfile.putDump("UDP-Port: " + udpPorts[i]); logfile.putDump("Hostname: " + misd.getHostname()); logfile.putDump("Poll Time: " + misd.getPollTime()); logfile.putDump( "Maximum Response Time: " + misd.getMaximumResponseTime()); logfile.write(); } public abstract void init(); public void initTcpSockets() { int[] tcpPorts = isd.getTcpPorts(); tcpSockets = new Socket[tcpPorts.length]; tcpIns = new InputStream[tcpPorts.length]; tcpOuts = new OutputStream[tcpPorts.length]; } public void initUdpSockets() { int[] udpPorts = isd.getUdpPorts(); udpSockets = new DatagramSocket[udpPorts.length]; } public void openTcpSockets() throws IOException, ConnectException { int[] tcpPorts = isd.getTcpPorts(); for (int i = 0; i < tcpPorts.length; i++) { Socket socket = new Socket(misd.getHost(), tcpPorts[i]); socket.setSoTimeout(1000); tcpSockets[i] = socket; tcpIns[i] = socket.getInputStream(); tcpOuts[i] = socket.getOutputStream(); } } public void openUdpSockets() throws SocketException { int[] udpPorts = isd.getUdpPorts(); for (int i = 0; i < udpPorts.length; i++) { DatagramSocket socket = new DatagramSocket(); udpSockets[i] = socket; } } public void setDebug(boolean debug) { logfile.setSuppressDebug(debug); } public void setTcpExpectedAnswer(String answer) { if (answer != null) tcpExpectedAnswer = answer; else tcpExpectedAnswer = "<html>"; } public void setTcpSendString(String send) { if (send != null) tcpSendString = send; else tcpSendString = "GET /\r\n\r\n"; } }
[ "ralf@art-of-coding.eu" ]
ralf@art-of-coding.eu
b7b82539765c47ce40dc152f5a1771117808916e
23e52faf7a07976d4fa9f59a74449f23b9b208be
/app/src/main/java/com/zgty/robotandroid/presenter/TrainInfoPresenter.java
f1d3827b4b9dc02632036c1e42f3a2cdce63422a
[]
no_license
wzyxzy/RobotAndroid
648293fa1f859678d09004909f552a5a5bcd657c
f4fd82fede1329e070f9a76ac35c5a7c58403f23
refs/heads/master
2021-09-17T22:53:51.432519
2018-07-06T07:54:53
2018-07-06T07:56:14
108,102,052
0
0
null
null
null
null
UTF-8
Java
false
false
164
java
package com.zgty.robotandroid.presenter; /** * Created by zy on 2017/10/23. */ public interface TrainInfoPresenter { void getTrainInfo(String robot_mac); }
[ "xzywzy@gmail.com" ]
xzywzy@gmail.com
0fc924aad1dcef537882e714c9bc0ad71ce7c3b5
fa057b3fe67264872c5bc06297dd0100425853d4
/fuelmis/src/com/zhiren/fuelmis/dc/service/xitgl/IZiyxxService.java
c3ce933bd0d832b6a9f5b1ae9313c2610e200a11
[]
no_license
paddy235/gdhyc
5df6a6280403784e89f52649c7710e7224a18414
9ce5925636589a9f4f2bed5f1a2fe90cefd89119
refs/heads/master
2021-06-23T22:55:17.210623
2017-09-07T09:29:50
2017-09-07T09:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
487
java
package com.zhiren.fuelmis.dc.service.xitgl; import java.util.Map; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import com.zhiren.fuelmis.dc.entity.xitgl.Ziyxx; /** * @author 陈宝露 */ public interface IZiyxxService { JSONArray getZiyxx(); JSONArray getTopMenu(Long renyxxb_id); JSONObject insertZiyxx(Ziyxx ziyxx); JSONObject updateZiyxx(Ziyxx ziyxx); JSONObject deleteZiyxx(Map<String,Object> map); JSONArray getOne(Map<String,Object> map); }
[ "liu@qq.com" ]
liu@qq.com
77658046b8433916330c11e5f21913ec29c6705e
5718b2f8718c944a132d06108016a99d7120a797
/recursion/src/main/java/recursion/recursion/FibonnaciApp.java
77246969f7d8b1dcd908f6369d0151e89787bf4f
[]
no_license
sunilwagh/projects
8938be1d9509944dba57299bd78da7352d6be942
6aa294680ee3994d88876bf636b7300c00b17ea7
refs/heads/master
2021-01-19T20:53:39.501723
2017-10-18T17:02:15
2017-10-18T17:02:15
101,236,032
0
1
null
null
null
null
UTF-8
Java
false
false
465
java
package recursion.recursion; /** * Hello world! * */ public class FibonnaciApp { public static void main(String[] args) { int n=15; int i=0; while (i<15) { System.out.println(fibonacci(i)); i++; } } public static int fibonacci(int n) { if (n==0) return 0; else if (n <= 2) return 1; else { return fibonacci(n-1)+fibonacci(n-2); } } }
[ "sunilwagh2004@gmail.com" ]
sunilwagh2004@gmail.com
9227b892ca89ab21e0659f900ff4730d8f1a9b31
0e06e096a9f95ab094b8078ea2cd310759af008b
/classes53-dex2jar/com/google/android/gms/internal/ads/zzqf.java
dffeeb5732771df725b211748f9662d195791d88
[]
no_license
Manifold0/adcom_decompile
4bc2907a057c73703cf141dc0749ed4c014ebe55
fce3d59b59480abe91f90ba05b0df4eaadd849f7
refs/heads/master
2020-05-21T02:01:59.787840
2019-05-10T00:36:27
2019-05-10T00:36:27
185,856,424
1
2
null
2019-05-10T00:36:28
2019-05-09T19:04:28
Java
UTF-8
Java
false
false
441
java
// // Decompiled by Procyon v0.5.34 // package com.google.android.gms.internal.ads; import com.google.android.gms.dynamic.IObjectWrapper; import android.os.RemoteException; import android.os.IInterface; public interface zzqf extends IInterface { void unregisterNativeAd() throws RemoteException; void zza(final IObjectWrapper p0) throws RemoteException; void zzc(final IObjectWrapper p0) throws RemoteException; }
[ "querky1231@gmail.com" ]
querky1231@gmail.com
1a5ff2b42d1bfee72c3d682dc185b7537bf916e4
27f6a988ec638a1db9a59cf271f24bf8f77b9056
/Code-Hunt-data/users/User109/Sector1-Level6/attempt024-20140920-235140.java
29ef2101b68978ad6f866938f94bde106170837a
[]
no_license
liiabutler/Refazer
38eaf72ed876b4cfc5f39153956775f2123eed7f
991d15e05701a0a8582a41bf4cfb857bf6ef47c3
refs/heads/master
2021-07-22T06:44:46.453717
2017-10-31T01:43:42
2017-10-31T01:43:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
198
java
import java.util.*; public class Program { public static int Puzzle(String s) { Scanner sc =- new Scanner(s); int count = 0; while(sc.hasNext()){ count++; } return count; } }
[ "liiabiia@yahoo.com" ]
liiabiia@yahoo.com
b9dce22f5db1daab340899813c4cdacc494178e5
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project98/src/main/java/org/gradle/test/performance98_2/Production98_173.java
113ec15b65f084d24e3cb7d6082338c9255ba19e
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance98_2; public class Production98_173 extends org.gradle.test.performance17_2.Production17_173 { private final String property; public Production98_173() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f237c0fece81c3ab26f23c59654bac5a01cfdd73
590cebae4483121569983808da1f91563254efed
/Router/schemas-src/eps-fts-schemas/src/main/java/ru/acs/fts/schemas/album/measuringprotocol/LogMeasuringInfoType.java
8e943622744b15f5a88288a26dbb16232af42184
[]
no_license
ke-kontur/eps
8b00f9c7a5f92edeaac2f04146bf0676a3a78e27
7f0580cd82022d36d99fb846c4025e5950b0c103
refs/heads/master
2020-05-16T23:53:03.163443
2014-11-26T07:00:34
2014-11-26T07:01:51
null
0
0
null
null
null
null
WINDOWS-1251
Java
false
false
4,929
java
package ru.acs.fts.schemas.album.measuringprotocol; import java.util.ArrayList; import java.util.List; /** * Сведения об измерениях бревна методом концевых сечений, срединного сечения, с использованием таблиц объемов ГОСТ 2708 */ public class LogMeasuringInfoType { private String logSerialNumber; private String factLength; private String factVolume; private String nominalVolume; private String nominalVolume2; private String logRise; private List<MeasuringDetailsType> measuringDetailList = new ArrayList<MeasuringDetailsType>(); private TabularValuesType tabularValues; /** * Get the 'LogSerialNumber' element value. Номер бревна по порядку измеряемого сортимента * * @return value */ public String getLogSerialNumber() { return logSerialNumber; } /** * Set the 'LogSerialNumber' element value. Номер бревна по порядку измеряемого сортимента * * @param logSerialNumber */ public void setLogSerialNumber(String logSerialNumber) { this.logSerialNumber = logSerialNumber; } /** * Get the 'FactLength' element value. Измеренная фактическая длина, м * * @return value */ public String getFactLength() { return factLength; } /** * Set the 'FactLength' element value. Измеренная фактическая длина, м * * @param factLength */ public void setFactLength(String factLength) { this.factLength = factLength; } /** * Get the 'FactVolume' element value. Фактический объем бревна (с учетом коры) * * @return value */ public String getFactVolume() { return factVolume; } /** * Set the 'FactVolume' element value. Фактический объем бревна (с учетом коры) * * @param factVolume */ public void setFactVolume(String factVolume) { this.factVolume = factVolume; } /** * Get the 'NominalVolume' element value. Номинальный объем бревна (без учета коры) / Номинальный объем бревна с применением таблиц объемов 1 ГОСТ2708 * * @return value */ public String getNominalVolume() { return nominalVolume; } /** * Set the 'NominalVolume' element value. Номинальный объем бревна (без учета коры) / Номинальный объем бревна с применением таблиц объемов 1 ГОСТ2708 * * @param nominalVolume */ public void setNominalVolume(String nominalVolume) { this.nominalVolume = nominalVolume; } /** * Get the 'NominalVolume2' element value. Номинальный объем бревна с применением таблиц объемов 4 ГОСТ2708 * * @return value */ public String getNominalVolume2() { return nominalVolume2; } /** * Set the 'NominalVolume2' element value. Номинальный объем бревна с применением таблиц объемов 4 ГОСТ2708 * * @param nominalVolume2 */ public void setNominalVolume2(String nominalVolume2) { this.nominalVolume2 = nominalVolume2; } /** * Get the 'LogRise' element value. Сбег * * @return value */ public String getLogRise() { return logRise; } /** * Set the 'LogRise' element value. Сбег * * @param logRise */ public void setLogRise(String logRise) { this.logRise = logRise; } /** * Get the list of 'MeasuringDetails' element items. Результаты измерений * * @return list */ public List<MeasuringDetailsType> getMeasuringDetailList() { return measuringDetailList; } /** * Set the list of 'MeasuringDetails' element items. Результаты измерений * * @param list */ public void setMeasuringDetailList(List<MeasuringDetailsType> list) { measuringDetailList = list; } /** * Get the 'TabularValues' element value. Табличные данные * * @return value */ public TabularValuesType getTabularValues() { return tabularValues; } /** * Set the 'TabularValues' element value. Табличные данные * * @param tabularValues */ public void setTabularValues(TabularValuesType tabularValues) { this.tabularValues = tabularValues; } }
[ "m@brel.me" ]
m@brel.me
aa27fed8e65dcb04113c4a43afb635851d95623b
82bda3ed7dfe2ca722e90680fd396935c2b7a49d
/app-meipai/src/main/java/com/baidu/picapture/ui/widget/dialog/AppForceUpdateDialog.java
e2cb1e424ec7407f3adf1289db9f41365c96b515
[]
no_license
cvdnn/PanoramaApp
86f8cf36d285af08ba15fb32348423af7f0b7465
dd6bbe0987a46f0b4cfb90697b38f37f5ad47cfc
refs/heads/master
2023-03-03T11:15:40.350476
2021-01-29T09:14:06
2021-01-29T09:14:06
332,968,433
1
1
null
null
null
null
UTF-8
Java
false
false
880
java
package com.baidu.picapture.ui.widget.dialog; import android.app.Dialog; import android.content.Context; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.view.Window; import e.c.d.e.e0; public class AppForceUpdateDialog extends Dialog { /* renamed from: a reason: collision with root package name */ public String f2020a; public AppForceUpdateDialog(Context context, String str) { super(context); this.f2020a = str; } public void onCreate(Bundle bundle) { super.onCreate(bundle); Window window = getWindow(); if (window != null) { window.setGravity(17); window.setBackgroundDrawable(new ColorDrawable(0)); } e0 a2 = e0.a(getLayoutInflater()); a2.a(this); setContentView(a2.f926d); setCancelable(false); } }
[ "cvvdnn@gmail.com" ]
cvvdnn@gmail.com
8702f9b1289ebd86d33015fafbc2741e91deded3
b4d0642c6a3db0a990708b44d65a3b1c5717fa9f
/pampas-core/src/main/java/com/github/pampas/core/route/rule/HttpRule.java
e6b5cbf8a8f1a9f9d506b71296967b7266ad6e3b
[ "Apache-2.0" ]
permissive
simon518/pampas
38e5aa577623e3d8bb6f1b7eb73fbe8ec4c3cf29
0b1e139d1ebfdd3826931dba84ea7fccaf6f10bb
refs/heads/master
2020-03-14T23:20:32.232068
2018-05-02T10:21:04
2018-05-02T10:21:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,708
java
/* * * * Copyright 2009-2018. * * * * 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.github.pampas.core.route.rule; import com.github.pampas.common.exec.payload.PampasRequest; import com.github.pampas.common.tools.AntPathMatcher; import io.netty.handler.codec.http.FullHttpRequest; import lombok.Data; import org.apache.commons.lang3.StringUtils; /** * HTTP路由规则 * Created by darrenfu on 18-3-14. * * @author: darrenfu * @date: 18-3-14 */ @Data public class HttpRule extends AbstractRule { private String mappedPath; @Override public RuleTypeEnum ruleType() { return RuleTypeEnum.HTTP; } @Override public boolean checkMatch(PampasRequest<FullHttpRequest> request) { if (StringUtils.isNotEmpty(this.getPath())) { return antPathMatcher().match(this.getPath(), request.path()); } if (StringUtils.isNotEmpty(this.getHeader())) { String headerValue = request.requestData().headers().get(this.getHeader()); return antPathMatcher().match(this.getPath(), request.path()); } return false; } }
[ "tiger_kin@163.com" ]
tiger_kin@163.com
9052b2e91e8d6852215d681fc91bf47d7a3ccb44
1f441fd2d5fb26880e674f562c52a7301d92489c
/app/src/main/java/Controllers/Config.java
82754a707d79e7a857f8eb40ef486007736bd7c0
[]
no_license
DivyDhiman/ShrinkMyIssues
7d90d2e3a81c58065412f99bad20a4c169956e0c
ab3097910570d93b26d2db02e81098b049ce5fb5
refs/heads/master
2020-06-16T17:31:35.415078
2019-07-07T13:11:16
2019-07-07T13:11:16
195,651,389
0
0
null
null
null
null
UTF-8
Java
false
false
219
java
package Controllers; /** * Created by Abhay dhiman */ // All Constant Data Method public class Config { public final static String Place_API = "https://maps.googleapis.com/maps/api/place/autocomplete/json"; }
[ "divyiiet@gmail.com" ]
divyiiet@gmail.com
b91baac81d80d1a7b918132e32e5e464a1d8a7d4
760f173d4e4c97822149537285aa4bbb5ce13b3e
/src/main/java/pe/joedayz/api/util/JsonUtil.java
64c47ccc10b5cbc8651c39a8be5a3c7dc8f7c65e
[]
no_license
JANCARLO123/campusbackend
a80fdd53052ecef12c33f7453d76ec12c785367c
d59606becebbfcd4c65271620ac1f5346a04d0d4
refs/heads/master
2021-01-09T23:36:15.563278
2016-11-05T15:16:34
2016-11-05T15:16:34
73,211,306
1
0
null
2016-11-08T17:40:55
2016-11-08T17:40:55
null
UTF-8
Java
false
false
1,283
java
package pe.joedayz.api.util; import java.math.BigDecimal; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class JsonUtil { static final Logger LOG = LoggerFactory.getLogger(JsonUtil.class); public static String getString(JSONObject jsonObject, String key){ try{ return jsonObject.getString(key); }catch (Exception ex){ LOG.error("error in json value <"+key+">",ex); } return null; } public static boolean getBoolean(JSONObject jsonObject, String key){ try{ return jsonObject.getBoolean(key); }catch (Exception ex){ LOG.error("error in json value <"+key+">",ex); } return false; } public static BigDecimal getBigDecimal(JSONObject jsonObject, String key){ try{ return jsonObject.getBigDecimal(key); }catch (Exception ex){ LOG.error("error in json value <"+key+">",ex); } return null; } public static Long getLong(JSONObject jsonObject, String key){ try{ return jsonObject.getLong(key); }catch (Exception ex){ LOG.error("error in json value <"+key+">",ex); } return null; } }
[ "jose.diaz@joedayz.pe" ]
jose.diaz@joedayz.pe
4e1e02b466d449b74c6d302fc9c6f00eef9b07d5
348de4c617d1db7c8d697e717e0a21bce50cb995
/haikudepotserver-webapp/src/main/java/org/haikuos/haikudepotserver/dataobjects/User.java
a1d40569ce294c72742a43cd08d8f53f393d67d6
[ "MIT" ]
permissive
diversys/haikudepotserver
c25409bfc9a48c13f533fe2467ca9281970482ea
8dbd4090dae16f1810d66c610bd5f850a1c2b2fb
refs/heads/master
2021-01-20T19:13:38.781356
2015-03-16T18:51:09
2015-03-16T18:51:09
32,403,687
0
0
null
2015-03-17T15:55:16
2015-03-17T15:55:16
null
UTF-8
Java
false
false
7,634
java
/* * Copyright 2013-2014, Andrew Lindesay * Distributed under the terms of the MIT License. */ package org.haikuos.haikudepotserver.dataobjects; import com.google.common.base.Optional; import com.google.common.base.Preconditions; import com.google.common.base.Predicate; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.hash.Hashing; import com.google.common.io.BaseEncoding; import org.apache.cayenne.ObjectContext; import org.apache.cayenne.ObjectId; import org.apache.cayenne.exp.ExpressionFactory; import org.apache.cayenne.query.ObjectIdQuery; import org.apache.cayenne.query.SelectQuery; import org.apache.cayenne.validation.BeanValidationFailure; import org.apache.cayenne.validation.ValidationResult; import org.haikuos.haikudepotserver.dataobjects.auto._User; import org.haikuos.haikudepotserver.dataobjects.support.CreateAndModifyTimestamped; import org.haikuos.haikudepotserver.security.model.AuthorizationPkgRule; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import java.util.List; import java.util.UUID; import java.util.regex.Pattern; public class User extends _User implements CreateAndModifyTimestamped { public final static String NICKNAME_ROOT = "root"; public final static Pattern NICKNAME_PATTERN = Pattern.compile("^[a-z0-9]{4,16}$"); public final static Pattern PASSWORDHASH_PATTERN = Pattern.compile("^[a-f0-9]{64}$"); public final static Pattern PASSWORDSALT_PATTERN = Pattern.compile("^[a-f0-9]{10,32}$"); public static List<User> findByEmail(ObjectContext context, String email) { Preconditions.checkNotNull(context); Preconditions.checkState(!Strings.isNullOrEmpty(email)); return context.performQuery(new SelectQuery( User.class, ExpressionFactory.matchExp(User.EMAIL_PROPERTY, email) )); } public static User getByObjectId(ObjectContext context, ObjectId objectId) { Preconditions.checkNotNull(context); Preconditions.checkNotNull(objectId); Preconditions.checkState(objectId.getEntityName().equals(User.class.getSimpleName())); ObjectIdQuery objectIdQuery = new ObjectIdQuery( objectId, false, // fetching data rows ObjectIdQuery.CACHE_NOREFRESH); List result = context.performQuery(objectIdQuery); switch(result.size()) { case 0: throw new IllegalStateException("unable to find the user from the objectid; " + objectId.toString()); case 1: return (User) result.get(0); default: throw new IllegalStateException("more than one user returned from an objectid lookup"); } } public static Optional<User> getByNickname(ObjectContext context, String nickname) { Preconditions.checkNotNull(context); Preconditions.checkState(!Strings.isNullOrEmpty(nickname)); return Optional.fromNullable(Iterables.getOnlyElement( (List<User>) context.performQuery(new SelectQuery( User.class, ExpressionFactory.matchExp(User.NICKNAME_PROPERTY, nickname))), null)); } // configured as a listener method in the model. public void onPostAdd() { if(null==getIsRoot()) { setIsRoot(Boolean.FALSE); } if(null==getCanManageUsers()) { setCanManageUsers(Boolean.FALSE); } if(null==getActive()) { setActive(Boolean.TRUE); } if(null==getPasswordSalt()) { setPasswordSalt(UUID.randomUUID().toString()); } // create and modify timestamp handled by listener. } @Override protected void validateForSave(ValidationResult validationResult) { super.validateForSave(validationResult); if(null==getIsRoot()) { setIsRoot(Boolean.FALSE); } if(null != getNickname()) { if(!NICKNAME_PATTERN.matcher(getNickname()).matches()) { validationResult.addFailure(new BeanValidationFailure(this,NICKNAME_PROPERTY,"malformed")); } } if(null != getPasswordHash()) { if(!PASSWORDHASH_PATTERN.matcher(getPasswordHash()).matches()) { validationResult.addFailure(new BeanValidationFailure(this,PASSWORD_HASH_PROPERTY,"malformed")); } } if(null != getPasswordSalt()) { if(!PASSWORDSALT_PATTERN.matcher(getPasswordSalt()).matches()) { validationResult.addFailure(new BeanValidationFailure(this,PASSWORD_HASH_PROPERTY,"malformed")); } } if(null != getEmail()) { try { InternetAddress internetAddress = new InternetAddress(getEmail()); internetAddress.validate(); } catch(AddressException ae) { validationResult.addFailure(new BeanValidationFailure(this,EMAIL_PROPERTY,"malformed")); } } } /** * <p>This method will return all of the rules pertaining to the supplied package; including those * rules that might apply to any package.</p> */ public List<? extends AuthorizationPkgRule> getAuthorizationPkgRules(final Pkg pkg) { Preconditions.checkNotNull(pkg); return ImmutableList.copyOf(Iterables.filter( getPermissionUserPkgs(), new Predicate<PermissionUserPkg>() { @Override public boolean apply(PermissionUserPkg input) { return null==input.getPkg() || input.getPkg().equals(pkg); } } )); } /** * <p>The LDAP entry for a person can have a 'userPassword' attribute. This has the format * {SSHA-256}&lt;base64data&gt;. The base 64 data, decoded to bytes contains 20 bytes of * hash and the rest is salt.</p> * * <p>This method will convert the information stored in this user over into a format suitable * for storage in this format for LDAP.</p> * * <p>SSHA stands for salted SHA hash.</p> * * <p>RFC-2307</p> */ public String toLdapUserPasswordAttributeValue() { StringBuilder builder = new StringBuilder(); builder.append("{SSHA-256}"); byte[] hash = BaseEncoding.base16().decode(getPasswordHash().toUpperCase()); if(32 != hash.length) { throw new IllegalStateException("the password hash should be 20 bytes long"); } byte[] salt = BaseEncoding.base16().decode(getPasswordSalt().toUpperCase()); byte[] hashAndSalt = new byte[hash.length + salt.length]; System.arraycopy(hash, 0, hashAndSalt, 0, hash.length); System.arraycopy(salt, 0, hashAndSalt, hash.length, salt.length); return "{SSHA-256}" + BaseEncoding.base64().encode(hashAndSalt); } /** * <p>This method will configure a random salt value.</p> */ public void setPasswordSalt() { String randomHash = Hashing.sha256().hashUnencodedChars(UUID.randomUUID().toString()).toString(); setPasswordSalt(randomHash.substring(0,16)); // LDAP server doesn't seem to like very long salts } public Boolean getDerivedCanManageUsers() { return getCanManageUsers() || getIsRoot(); } @Override public String toString() { return "user;"+getNickname(); } }
[ "apl@lindesay.co.nz" ]
apl@lindesay.co.nz
443caa70822b76b3aa6b347fa88eddaeb2a636f2
33140c146c4ceb1a36239b0bbec54b80a6179d40
/src/test/java/domain/frame/LastFrameTest.java
31ea1769adb6f305e18ba23331c565a8cdea8553
[]
no_license
imjinbro/java-bowling
86567a41e33f36d8fff5a531a0e2e9b13ff4c9b0
eab9d3e3b74c67d4e318f6b4231bb484443397a3
refs/heads/master
2020-03-08T13:18:05.483159
2018-04-23T00:57:49
2018-04-23T00:57:49
116,966,608
0
0
null
null
null
null
UTF-8
Java
false
false
2,691
java
package domain.frame; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; public class LastFrameTest { private Frame testFrame; @Before public void setUp() throws Exception { testFrame = Frame.of(10); } @Test public void 스트라이크_상태변화() { testFrame.roll(10); assertFalse(testFrame.isFinish()); } @Test public void 스패어_상태변화() { testFrame.roll(5); testFrame.roll(5); assertFalse(testFrame.isFinish()); } @Test public void 미쓰_상태변화() { testFrame.roll(3); assertFalse(testFrame.isFinish()); } @Test public void 스트라이크_투구_미완료_점수합계() { testFrame.roll(10); testFrame.roll(5); assertEquals(Frame.CANNOT_CALC_SCORE_STATE, testFrame.getResult().getScore()); } @Test public void 스패어_투구_미완료_점수합계() { testFrame.roll(5); testFrame.roll(5); assertEquals(Frame.CANNOT_CALC_SCORE_STATE, testFrame.getResult().getScore()); } @Test public void 진행중_투구_점수합계() { testFrame.roll(9); assertEquals(Frame.CANNOT_CALC_SCORE_STATE, testFrame.getResult().getScore()); } @Test(expected = IllegalArgumentException.class) public void 투구_스트라이크시_보너스_오류() { testFrame.roll(10); testFrame.roll(3); testFrame.roll(10); } @Test public void 투구_스트라이크_보너스_출력메세지() { testFrame.roll(10); testFrame.roll(5); testFrame.roll(5); assertEquals("X|5|/", testFrame.getResult().getMessage()); } @Test public void 투구_스패어_보너스_출력메세지() { testFrame.roll(5); testFrame.roll(5); testFrame.roll(0); assertEquals("5|/|-", testFrame.getResult().getMessage()); } @Test public void 투구_미쓰_출력메세지() { testFrame.roll(3); testFrame.roll(6); assertEquals("3|6", testFrame.getResult().getMessage()); } @Test public void 투구_진행중_출력메세지() { testFrame.roll(3); assertEquals("3", testFrame.getResult().getMessage()); } @Test public void 다른프레임_미전환() { assertSame(testFrame, testFrame.roll(10)); } @Test public void 다른프레임_미전환2() { testFrame.roll(3); assertSame(testFrame, testFrame.roll(7)); } @Test public void 다른프레임_미전환3() { assertSame(testFrame, testFrame.roll(7)); } }
[ "javajigi@gmail.com" ]
javajigi@gmail.com
80b0384da0fc13dff7374e7a52f90c1763c50f38
e4eb547141929d5c61b3335c09904f258a65f5ea
/minijvm/java/src/main/java/java/security/AllPermission.java
6411b70e76ad3038871dd9d9905a751972db11c4
[ "MIT" ]
permissive
digitalgust/miniJVM
14e11fa518e965ebe6c6b8172b2cacffde7a46d7
aa504d6c3c17a365a8f8f2ea91eb580d6ec94711
refs/heads/master
2023-08-22T12:55:31.981267
2023-08-10T07:09:28
2023-08-10T07:09:28
101,243,754
269
78
null
2023-03-08T06:50:54
2017-08-24T02:10:21
C
UTF-8
Java
false
false
502
java
/* Copyright (c) 2008-2015, Avian Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. There is NO WARRANTY for this software. See license.txt for details. */ package java.security; public class AllPermission extends Permission { public AllPermission() { super("<all>"); } }
[ "digitalgust@163.com" ]
digitalgust@163.com
e0db0665570dbd422c0f0f1d20309ee1ef9f617a
6e7a516aee7328b10eb64a2ade1688985fa1a0b6
/com.io7m.jtensors.tests/src/test/java/com/io7m/jtensors/tests/storage/bytebuffered/PMatrixByteBuffered3x3s16Test.java
6fd21154b6c62fed470534ba4feb6adc5e74e1d1
[ "ISC" ]
permissive
herike/jtensors
aebd3f1ff9bacd70e8b70018aed24082f6fd2a9c
c8d8fd96a287f1323178e59ca1a6c6772de8fd01
refs/heads/master
2021-06-19T07:55:13.102564
2017-06-27T21:22:15
2017-06-27T21:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,170
java
/* * Copyright © 2017 <code@io7m.com> http://io7m.com * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package com.io7m.jtensors.tests.storage.bytebuffered; import com.io7m.mutable.numbers.core.MutableLong; import com.io7m.jtensors.core.parameterized.matrices.PMatrix3x3D; import com.io7m.jtensors.core.parameterized.matrices.PMatrix3x3F; import com.io7m.jtensors.core.unparameterized.matrices.Matrix3x3D; import com.io7m.jtensors.core.unparameterized.matrices.Matrix3x3F; import com.io7m.jtensors.generators.Matrix3x3DGenerator; import com.io7m.jtensors.generators.Matrix3x3FGenerator; import com.io7m.jtensors.generators.PMatrix3x3DGenerator; import com.io7m.jtensors.generators.PMatrix3x3FGenerator; import com.io7m.jtensors.storage.api.parameterized.matrices.PMatrixStorage3x3Type; import com.io7m.jtensors.storage.bytebuffered.PMatrixByteBuffered3x3Type; import com.io7m.jtensors.storage.bytebuffered.PMatrixByteBuffered3x3s16; import com.io7m.jtensors.tests.TestUtilities; import com.io7m.jtensors.tests.core.TestB16Ops; import com.io7m.jtensors.tests.rules.PercentagePassRule; import net.java.quickcheck.Generator; import org.junit.Rule; import java.nio.ByteBuffer; public final class PMatrixByteBuffered3x3s16Test extends PMatrixByteBuffered3x3Contract { @Rule public final PercentagePassRule percent = new PercentagePassRule(TestUtilities.TEST_ITERATIONS); @Override protected PMatrixStorage3x3Type<Object, Object> create( final int offset) { return this.create(MutableLong.create(), offset); } @Override protected PMatrixByteBuffered3x3Type<Object, Object> create( final MutableLong base, final int offset) { return PMatrixByteBuffered3x3s16.createWithBase( ByteBuffer.allocate(BufferSizes.BUFFER_SIZE_DEFAULT), base, offset); } @Override protected Generator<PMatrix3x3D<Object, Object>> createGeneratorP3x3D() { return PMatrix3x3DGenerator.createNormal(); } @Override protected Generator<PMatrix3x3F<Object, Object>> createGeneratorP3x3F() { return PMatrix3x3FGenerator.createNormal(); } @Override protected Generator<Matrix3x3D> createGenerator3x3D() { return Matrix3x3DGenerator.createNormal(); } @Override protected Generator<Matrix3x3F> createGenerator3x3F() { return Matrix3x3FGenerator.createNormal(); } @Override protected void checkAlmostEquals( final double x, final double y) { TestB16Ops.checkAlmostEquals(x, y); } }
[ "code@io7m.com" ]
code@io7m.com
62773061f871dd9d6373fabc4c45deb548d7ac2f
f83ba9361c861f7ac0646ee737b8658c1ca42f33
/app/src/main/java/com/example/hai_da_shi_tang2019/ma_la_ji_si_chao_fan.java
23761ef22dd2acafe1eff6c1b7da567b6a3f89f8
[ "Apache-2.0" ]
permissive
HelloWST2019/hai_da_shi_tang
4bd4369de48e9799e7290e6504f0dc5cc10d3e1e
530802bced228b00f5b404ab2fe62c9ab0eeab66
refs/heads/master
2020-08-06T23:08:15.133220
2019-10-06T15:59:36
2019-10-06T15:59:36
213,192,646
1
0
null
null
null
null
UTF-8
Java
false
false
916
java
package com.example.hai_da_shi_tang2019; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.ListView; public class ma_la_ji_si_chao_fan extends AppCompatActivity { private String[]data={"麻辣鸡块是一道非常好吃的肉类食品,麻辣味浓,干香味美,很多人喜欢吃麻辣鸡块。主要原料是鸡肉;工艺是炖,制作简单。\n" + "麻辣味浓,干香味美"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_ma_la_ji_si_chao_fan); ArrayAdapter<String> adapter=new ArrayAdapter<String>(ma_la_ji_si_chao_fan.this,android.R.layout.simple_list_item_1,data); ListView listView=(ListView)findViewById(R.id.list_view); listView.setAdapter(adapter); } }
[ "tony@gmail.com" ]
tony@gmail.com
da00e1530574f7af53b2b658170f99dab52eb4a9
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/google/android/gms/ads/internal/C14833o.java
e2b2b0b6266a11a30d7225450450c0c65a460fd3
[]
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
800
java
package com.google.android.gms.ads.internal; import com.google.android.gms.internal.ads.abj; import com.google.android.gms.internal.ads.ans; import com.google.android.gms.internal.ads.bub; import com.google.android.gms.internal.ads.buf; /* renamed from: com.google.android.gms.ads.internal.o */ final /* synthetic */ class C14833o implements ans { /* renamed from: a */ private final C14832n f38406a; /* renamed from: b */ private final abj f38407b; C14833o(C14832n nVar, abj abj) { this.f38406a = nVar; this.f38407b = abj; } /* renamed from: a */ public final void mo37707a() { C14832n nVar = this.f38406a; abj abj = this.f38407b; new bub(nVar.f38140e.f38268c, abj.f39862b.getView()).mo41319a((buf) abj.f39862b); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
9bdec1b58b539247f8a4a2ff4d9ad32566ff109d
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a021/A021469Test.java
423cda2dbe48efbb8c24760c3cabb96af699ec57
[]
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.a021; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A021469Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
c96d48992ef89bb71c1c93b4a2b0d99467b8d0b4
1e9c9f2a9639db7cdb032aae69cb4d99aef1d3a5
/codingBat/src/javaExample/recursion1/CountHi.java
c7888baa78336cb863d386675e595ceebe65ed55
[ "MIT" ]
permissive
sagarnikam123/learnNPractice
f0da3f8acf653e56c591353ab342765a6831698c
1b3b0cb2cff2f478006626a4c37a99102acbb628
refs/heads/master
2023-02-04T11:21:18.211654
2023-01-24T14:47:52
2023-01-24T14:47:52
61,184,927
2
1
MIT
2022-03-06T11:07:18
2016-06-15T06:57:19
Python
UTF-8
Java
false
false
677
java
/************************************************************************************************** countHi Given a string, compute recursively (no loops) the number of times lowercase "hi" appears in the string. *************************************************************************************************** countHi("xxhixx") → 1 countHi("xhixhix") → 2 countHi("hi") → 1 **************************************************************************************************/ package javaExample.recursion1; public class CountHi { public static void main(String[] args) { } public static int countHi(String str) { return 0; } }
[ "sagarnikam123@gmail.com" ]
sagarnikam123@gmail.com
5ecec3ec321f0a13d3709e9ebc60ae20f2813628
e8f6f52f86141a8d93190237ef0b03b27b2ffc76
/demo/src/main/java/com/example/demo/handler/GlobalExceptionHandler.java
c16b4666cc2274001537a7913062ddab11d3ac95
[ "MIT" ]
permissive
chendongpu/hd
69eb0abe8026f98d8233308b5c2ee448c91e0d18
77e4fd6fc433427d5e1bc851bfc28f5f981aa73f
refs/heads/master
2023-01-31T10:25:38.808985
2020-03-09T09:52:24
2020-03-09T09:52:24
320,778,410
0
0
null
null
null
null
UTF-8
Java
false
false
2,494
java
package com.example.demo.handler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MaxUploadSizeExceededException; import javax.servlet.http.HttpServletRequest; @ControllerAdvice public class GlobalExceptionHandler { private static final Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class); /** * 处理自定义的业务异常 * @param req * @param e * @return */ @ExceptionHandler(value = BizException.class) @ResponseBody public ResultBody bizExceptionHandler(HttpServletRequest req, BizException e){ logger.error("发生业务异常!原因是:{}",e.getErrorMsg()); return ResultBody.error(e.getErrorCode(),e.getErrorMsg()); } /** * 处理空指针的异常 * @param req * @param e * @return */ @ExceptionHandler(value =NullPointerException.class) @ResponseBody public ResultBody exceptionHandler(HttpServletRequest req, NullPointerException e){ logger.error("发生空指针异常!原因是:",e); return ResultBody.error(CommonEnum.BODY_NOT_MATCH); } /** * 不允许访问异常 * @param req * @param e * @return */ @ExceptionHandler(value = RuntimeException.class) @ResponseBody public ResultBody exceptionHandler(HttpServletRequest req, RuntimeException e){ logger.error("发生不允许访问异常!",e); return ResultBody.error(CommonEnum.NOT_ALLOW); } /** * 处理文件过大异常 * @param req * @param e * @return */ @ExceptionHandler(value = MaxUploadSizeExceededException.class) @ResponseBody public ResultBody exceptionHandler(HttpServletRequest req, MaxUploadSizeExceededException e){ logger.error("发生文件过大异常!"); return ResultBody.error(CommonEnum.FILE_SIZE_LIMIT_EXCEEDED); } /** * 处理其他异常 * @param req * @param e * @return */ @ExceptionHandler(value =Exception.class) @ResponseBody public ResultBody exceptionHandler(HttpServletRequest req, Exception e){ logger.error("未知异常!原因是:",e); return ResultBody.error(CommonEnum.INTERNAL_SERVER_ERROR); } }
[ "2323178881@qq.com" ]
2323178881@qq.com
8f20b753d549bc737e67bb41bcd7aaea897afb3f
4b40be16170cb95850a17ed8be4878645b0e8d08
/src/be/kaho/msec/museum/app/ui/AuthorActivity.java
765ebfd4efd7232d9bf21eb6a5ec90e74e5cbd6c
[]
no_license
hellowzp/MuseumApp
0358a1453cb43bac583cd39c18b065b24c770796
df5615b54c33c8512e7018eb9ad9c4af3fa23ca2
refs/heads/master
2021-01-23T06:55:08.518621
2015-05-05T10:25:16
2015-05-05T10:25:16
35,088,550
0
0
null
null
null
null
UTF-8
Java
false
false
2,169
java
/** * Copyright MSEC - KAHO Sint Lieven 2011 */ package be.kaho.msec.museum.app.ui; import org.restlet.resource.ClientResource; import android.app.Activity; import android.graphics.Bitmap; import android.os.Bundle; import android.widget.ImageView; import android.widget.TextView; import be.kaho.msec.museum.ServerLocation; import be.kaho.msec.museum.app.NetworkingHelper; import be.kaho.msec.museum.app.R; import be.kaho.msec.museum.app.Util; import be.kaho.msec.museum.common.Artifact; import be.kaho.msec.museum.common.Author; import be.kaho.msec.museum.common.AuthorResource; public class AuthorActivity extends Activity { /* (non-Javadoc) * @see android.app.Activity#onCreate(android.os.Bundle) */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.author); final String lang = Util.getSystemLanguage(); final Artifact artifact = (Artifact)getIntent().getExtras().get("artifact"); NetworkingHelper.executeInBackground(this, new Runnable() { @Override public void run() { final ClientResource resource = new ClientResource( ServerLocation.MUSEUM_SERVER.resolve( lang + "/authors/" + artifact.getAuthorRef())); AuthorResource aur = resource.wrap(AuthorResource.class); final Author author = aur.getAuthor(); final Bitmap imageBitmap = Util.downloadBitmap( ServerLocation.MUSEUM_SERVER.resolve("media/" + author.getImageRef())); AuthorActivity.this.runOnUiThread(new Runnable() { @Override public void run() { TextView name = (TextView)findViewById(R.id.aut_name); name.setText(author.getName()); TextView date = (TextView)findViewById(R.id.aut_date); date.setText(author.getDate()); TextView bio = (TextView)findViewById(R.id.aut_bio); bio.setText(author.getBiography()); ImageView img = (ImageView)findViewById(R.id.aut_image); img.setImageBitmap(imageBitmap); } }); resource.release(); } }); } }
[ "zpkx.wang@gmail.com" ]
zpkx.wang@gmail.com
790de1aa1cc006c37cab38a1831dc7b7ca3fad62
cc79fa08c524650f7e08c913d2d3671f0ef25095
/voms-admin-server/src/main/java/org/glite/security/voms/admin/persistence/tools/DeleteRecordCommand.java
5be0259f61a76cc9088f610a75f8ab93267ec7f8
[]
no_license
italiangrid/voms-admin-server
6203a8cba600cf627b5723c890763d8856fe0946
26fdc5f9da0a4ace7a33e419ae852b5a9bff71fe
refs/heads/master
2022-11-26T04:58:05.922289
2021-04-10T09:22:04
2021-04-10T09:22:04
2,885,076
0
6
null
2022-11-24T08:30:48
2011-11-30T17:50:06
Java
UTF-8
Java
false
false
1,815
java
/** * Copyright (c) Istituto Nazionale di Fisica Nucleare (INFN). 2006-2016 * * 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.glite.security.voms.admin.persistence.tools; import org.apache.commons.cli.CommandLine; import org.glite.security.voms.admin.persistence.dao.generic.AuditDAO; import org.glite.security.voms.admin.persistence.dao.generic.DAOFactory; import org.glite.security.voms.admin.persistence.model.audit.AuditEvent; public class DeleteRecordCommand extends AbstractAuditLogSearchCommand { public static final String NAME = "delete-record"; @Override public void execute(CommandLine line) { if (!line.hasOption("id")) { throw new AuditLogCommandError( "Please provide a record id (using the id option)"); } Long id = Long.parseLong(line.getOptionValue("id")); AuditDAO dao = DAOFactory.instance().getAuditDAO(); AuditEvent event = dao.findById(id, true); System.out.println("Deleting the following audit event..."); printAuditLogEvent(event); System.out.println("Done."); dao.makeTransient(event); } @Override public String getDescription() { return "Deletes the record from the audit LOG identified by the --id option"; } @Override public String getName() { return NAME; } }
[ "andrea.ceccanti@gmail.com" ]
andrea.ceccanti@gmail.com
9f62d2739035ef1fc5cf6264d7a29b27867dfce3
258de8e8d556901959831bbdc3878af2d8933997
/utopia-schedule/src/main/java/com/voxlearning/utopia/schedule/schedule/studytogether/AutoCalculateJoinLessonStatisticsJob.java
d79c2706983d60d6e74f77199994b34315fb8261
[]
no_license
Explorer1092/vox
d40168b44ccd523748647742ec376fdc2b22160f
701160b0417e5a3f1b942269b0e7e2fd768f4b8e
refs/heads/master
2020-05-14T20:13:02.531549
2019-04-17T06:54:06
2019-04-17T06:54:06
181,923,482
0
4
null
2019-04-17T15:53:25
2019-04-17T15:53:25
null
UTF-8
Java
false
false
8,193
java
package com.voxlearning.utopia.schedule.schedule.studytogether; import com.voxlearning.alps.annotation.common.Mode; import com.voxlearning.alps.annotation.remote.ImportService; import com.voxlearning.alps.core.util.CollectionUtils; import com.voxlearning.alps.core.util.MapUtils; import com.voxlearning.alps.core.util.StringUtils; import com.voxlearning.alps.lang.calendar.DayRange; import com.voxlearning.alps.lang.convert.SafeConverter; import com.voxlearning.alps.schedule.progress.ISimpleProgressMonitor; import com.voxlearning.alps.schedule.support.ProgressedScheduleJob; import com.voxlearning.alps.spi.schedule.ProgressTotalWork; import com.voxlearning.alps.spi.schedule.ScheduledJobDefinition; import com.voxlearning.utopia.service.parent.api.CrmMonitorRecruitService; import com.voxlearning.utopia.service.parent.api.CrmStudyTogetherService; import com.voxlearning.utopia.service.parent.api.MonitorRecruitLoader; import com.voxlearning.utopia.service.parent.api.MonitorRecruitService; import com.voxlearning.utopia.service.parent.api.entity.studytogether.GroupArea; import com.voxlearning.utopia.service.parent.api.entity.studytogether.StudentJoinStatistics; import com.voxlearning.utopia.service.parent.api.entity.studytogether.StudyGroup; import javax.inject.Named; import java.math.BigDecimal; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; /** * @author shiwei.liao * @since 2018-7-14 */ @Named @ScheduledJobDefinition( jobName = "一起学计算参课率排名", jobDescription = "每半小时执行一次", disabled = {Mode.DEVELOPMENT, Mode.STAGING}, cronExpression = "0 0/30 * * * ? " ) @ProgressTotalWork(100) public class AutoCalculateJoinLessonStatisticsJob extends ProgressedScheduleJob { @ImportService(interfaceClass = MonitorRecruitService.class) private MonitorRecruitService monitorRecruitService; @ImportService(interfaceClass = MonitorRecruitLoader.class) private MonitorRecruitLoader monitorRecruitLoader; @ImportService(interfaceClass = CrmStudyTogetherService.class) private CrmStudyTogetherService crmStudyTogetherService; @ImportService(interfaceClass = CrmMonitorRecruitService.class) private CrmMonitorRecruitService crmMonitorRecruitService; @Override protected void executeJob(long startTimestamp, Map<String, Object> parameters, ISimpleProgressMonitor progressMonitor) { Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) { return; } List<GroupArea> groupAreas = crmStudyTogetherService.$getAllForJob(); if (CollectionUtils.isEmpty(groupAreas)) { return; } for (GroupArea groupArea : groupAreas) { ISimpleProgressMonitor monitor = progressMonitor.subTask(10, 100); //用班级区id取数据 Map<String, List<StudyGroup>> studyGroupMaps = crmStudyTogetherService.getStudyGroupByAreaId(groupArea.getId()); if (MapUtils.isEmpty(studyGroupMaps)) { continue; } //所有班级按照课程分组 Map<String, List<StudyGroup>> lessonGroupMaps = studyGroupMaps.values() .stream() .flatMap(Collection::stream) .filter(p -> StringUtils.isNotBlank(p.getLessonId())) .collect(Collectors.groupingBy(StudyGroup::getLessonId)); //一个班级区内上报的所有班级数据 List<StudentJoinStatistics> studentJoinStatistics = crmMonitorRecruitService.loadTodayStatisticsForJobByGroupAreaId(groupArea.getId(), DayRange.current()); if (CollectionUtils.isEmpty(studentJoinStatistics)) { continue; } for (String lessonId : lessonGroupMaps.keySet()) { List<StudyGroup> list = lessonGroupMaps.get(lessonId); if (CollectionUtils.isEmpty(list)) { continue; } //一个课程下的所有班级ID Set<String> groupIds = list.stream().map(StudyGroup::getId).collect(Collectors.toSet()); //一个课程下的所有班级的统计数据 List<StudentJoinStatistics> joinStatisticsList = studentJoinStatistics.stream().filter(p -> groupIds.contains(p.getGroupId())).collect(Collectors.toList()); Map<String, StudentJoinStatistics> joinStatisticsMap = joinStatisticsList.stream().collect(Collectors.toMap(StudentJoinStatistics::getGroupId, Function.identity())); Integer classTotalCount = list.size(); //班级人数不足20人的班级个数 int needRemoveClassCount = 0; for (String groupId : groupIds) { StudentJoinStatistics statistics = joinStatisticsMap.get(groupId); if (statistics == null) { //没有上报。生成一个新的。便于之后直接Upsert进数据库 statistics = new StudentJoinStatistics(); statistics.setDayRange(DayRange.current().toString()); statistics.setClassArea(groupArea.getGroupAreaName()); statistics.setGroupId(groupId); statistics.setGroupAreaId(groupArea.getId()); statistics.setStudentJoinCount(0); statistics.setLessonId(lessonId); joinStatisticsList.add(statistics); } Long studentTotalCount = monitorRecruitLoader.loadStudentCountForJob(groupId); //班级人数 statistics.setStudentTotalCount(SafeConverter.toInt(studentTotalCount)); if (studentTotalCount == null || studentTotalCount == 0) { statistics.setStudentJoinRate(0d); } else if (statistics.getStudentJoinCount() == null) { statistics.setStudentJoinRate(0d); } else if (statistics.getStudentJoinCount() > studentTotalCount) { statistics.setStudentJoinRate(100d); } else { //参课率 double rate = new BigDecimal(statistics.getStudentJoinCount() * 100).divide(new BigDecimal(studentTotalCount), 2, BigDecimal.ROUND_HALF_UP).doubleValue(); statistics.setStudentJoinRate(rate); } //班级人数少于20 //TODO 临时修改成4个 if (statistics.getStudentTotalCount() < 2) { needRemoveClassCount++; } } //参课率排序 joinStatisticsList.sort((o1, o2) -> o2.getStudentJoinRate().compareTo(o1.getStudentJoinRate())); //移除班级人数少于20后的班级 classTotalCount = classTotalCount - needRemoveClassCount; Double lastRate = null; int rank = 0; for (StudentJoinStatistics statistics : joinStatisticsList) { statistics.setTotalClassCount(classTotalCount); //班级人数少于20.不参与排名。直接保存 //TODO 临时修改成4个 if (statistics.getStudentTotalCount() < 2) { statistics.setRank(0); } else { //处理排名 if (!Objects.equals(lastRate, statistics.getStudentJoinRate())) { lastRate = statistics.getStudentJoinRate(); rank++; } statistics.setRank(rank); } //保存排名 monitorRecruitService.saveStatistics(statistics); } } monitor.done(); } } }
[ "wangahai@300.cn" ]
wangahai@300.cn
c2e0ddb8e94f377aaebd33a5fa80afd19629a68d
522c4abef6c0410d52dd5b8433bf4487d46c1c25
/efamily-server/src/main/java/com/winterframework/efamily/server/handler/DeleteRemindsHandler.java
cd5a1f27264481be57dfc29b98c41d0b1f76700d
[]
no_license
xjiafei/efamily
05b1c71e1f7f485132e5d6243e7af7208b567517
0401d6ec572c7959721c294408f6d525e3d12866
refs/heads/master
2020-03-10T11:42:00.359799
2018-04-13T08:13:58
2018-04-13T08:13:58
129,361,914
0
3
null
null
null
null
UTF-8
Java
false
false
1,981
java
package com.winterframework.efamily.server.handler; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.stereotype.Service; import com.winterframework.efamily.base.enums.StatusCode; import com.winterframework.efamily.base.model.Context; import com.winterframework.efamily.base.model.Response; import com.winterframework.efamily.dto.DeleteRemindRequest; import com.winterframework.efamily.dto.DeleteRemindResponse; import com.winterframework.efamily.server.core.AbstractHandler; import com.winterframework.efamily.server.exception.ServerException; import com.winterframework.efamily.server.protocol.FmlRequest; import com.winterframework.efamily.server.protocol.FmlResponse; import com.winterframework.modules.spring.exetend.PropertyConfig; /** * 获取家庭用户健康列表handler * @author floy * */ @Service("deleteRemindsHandler") public class DeleteRemindsHandler extends AbstractHandler { @PropertyConfig("server.url.app") private String serverUrl; @PropertyConfig("app.server.delete_remind") private String urlPath; @Override protected FmlResponse doHandle(Context ctx, FmlRequest request) throws ServerException { DeleteRemindRequest bizReqList = new DeleteRemindRequest(); String remindIdStr[] = request.getData().get("remindIds").split(","); List<Long> ids = new ArrayList<Long>(); for(String remindId:remindIdStr){ ids.add(Long.valueOf(remindId)); } bizReqList.setRemindIds(ids); bizReqList.setType(Long.valueOf(request.getData().get("type"))); Response<DeleteRemindResponse> bizRes=http(serverUrl,urlPath,ctx,bizReqList,DeleteRemindResponse.class); FmlResponse res=new FmlResponse(request); if(null!=bizRes){ res.setStatus(bizRes.getStatus().getCode()); Map<String,String> responseMap = new HashMap<String,String>(); res.setData(responseMap); }else{ res.setStatus(StatusCode.UNKNOW.getValue()); } return res; } }
[ "xjiafei126@126.com" ]
xjiafei126@126.com
527ce1c646ecaf89fda6fc6d6dc9aada682f94be
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/LANG-6b-3-2-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/lang3/StringEscapeUtils_ESTest_scaffolding.java
4016897315c3c06b671c909aec6282bd8e2383dd
[]
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
446
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Jan 20 13:22:34 UTC 2020 */ package org.apache.commons.lang3; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class StringEscapeUtils_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
bb488c15e5dcdce6cd4a8c9024426ee8dfbd5cb4
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Hibernate/Hibernate2605.java
3cd8694c5242bd4fe65781061183a1c8b7198227
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
413
java
public String getDisplayText() { StringBuilder buf = new StringBuilder(); if ( getWalker().getQuerySpaces().size() > 0 ) { buf.append( " querySpaces (" ); for ( Iterator iterator = getWalker().getQuerySpaces().iterator(); iterator.hasNext(); ) { buf.append( iterator.next() ); if ( iterator.hasNext() ) { buf.append( "," ); } } buf.append( ")" ); } return buf.toString(); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
b98a73d7f59b46bc103297f4d509944d274399ec
61602d4b976db2084059453edeafe63865f96ec5
/com/xunlei/downloadprovider/download/privatespace/a/b/f.java
41c514f2e27d17fb4d91b4a4fb5f8e7f9d1be583
[]
no_license
ZoranLi/thunder
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
0778679ef03ba1103b1d9d9a626c8449b19be14b
refs/heads/master
2020-03-20T23:29:27.131636
2018-06-19T06:43:26
2018-06-19T06:43:26
137,848,886
12
1
null
null
null
null
UTF-8
Java
false
false
549
java
package com.xunlei.downloadprovider.download.privatespace.a.b; import android.support.annotation.NonNull; import com.xunlei.downloadprovider.member.payment.network.BaseJsonRequest.IMethod; /* compiled from: BindCheckSmsRequest */ public final class f extends a { public f(Object obj, @NonNull String str, @NonNull String str2, @NonNull String str3) { super(obj, IMethod.GET, "https://xluser-ssl.xunlei.com/msg/v1/CheckSms"); a("token", str); a("sign", str2); a("code", str3); a("scene", "040"); } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
26c008805a72bb23f6e5825a280edcd352d9c392
a3c5ba63a4203b6c2dc9f9377fbd1b9ef2285324
/src/main/java/com/aditya/project/blog/client/BlogClient.java
cf5f89b6d3a176cf519fef02d9891379e65c632e
[]
no_license
AdityaKshettri/Blog-Service-using-gRPC-in-Java
ffb33388484dcdc180fefbdfa0bbd6af96d3e057
8fadec309f9eacb5dd1791ce61b03df807cb1caa
refs/heads/master
2023-03-16T08:46:57.229467
2021-03-11T18:06:46
2021-03-11T18:06:46
340,329,545
0
0
null
null
null
null
UTF-8
Java
false
false
3,597
java
package com.aditya.project.blog.client; import com.proto.blog.Blog; import com.proto.blog.BlogServiceGrpc; import com.proto.blog.CreateBlogRequest; import com.proto.blog.CreateBlogResponse; import com.proto.blog.DeleteBlogRequest; import com.proto.blog.DeleteBlogResponse; import com.proto.blog.ListBlogRequest; import com.proto.blog.ReadBlogRequest; import com.proto.blog.ReadBlogResponse; import com.proto.blog.UpdateBlogRequest; import com.proto.blog.UpdateBlogResponse; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; public class BlogClient { public static void main(String[] args) { System.out.println("Hello I am gRPC Client for Blogs!"); BlogClient main = new BlogClient(); main.run(); } private void run() { ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 50051) .usePlaintext() .build(); // Created sync Client for Blogs BlogServiceGrpc.BlogServiceBlockingStub blogClient = BlogServiceGrpc.newBlockingStub(channel); // Creating a Blog System.out.println("Creating blog..."); Blog blog = Blog.newBuilder() .setAuthorId("Aditya") .setTitle("First Blog") .setContent("This is my new blog!") .build(); CreateBlogRequest createBlogRequest = CreateBlogRequest.newBuilder() .setBlog(blog) .build(); CreateBlogResponse createBlogResponse = blogClient.createBlog(createBlogRequest); System.out.println("Received Create Blog Response."); System.out.println(createBlogResponse.toString()); // Reading a Blog System.out.println("Reading blog..."); ReadBlogRequest readBlogRequest = ReadBlogRequest.newBuilder() .setId(createBlogResponse.getBlog().getId()) .build(); ReadBlogResponse readBlogResponse = blogClient.readBlog(readBlogRequest); System.out.println("Received Read Blog Response."); System.out.println(readBlogResponse.toString()); // Updating a Blog System.out.println("Updating blog..."); Blog newBlog = Blog.newBuilder() .setId(createBlogResponse.getBlog().getId()) .setAuthorId("Aditya Kshettri") .setTitle("First Blog updated") .setContent("This is my new blog! updated") .build(); UpdateBlogRequest updateBlogRequest = UpdateBlogRequest.newBuilder() .setBlog(newBlog) .build(); UpdateBlogResponse updateBlogResponse = blogClient.updateBlog(updateBlogRequest); System.out.println("Updated Blog."); System.out.println(updateBlogResponse.toString()); // Deleting a blog System.out.println("Deleting blog..."); DeleteBlogRequest deleteBlogRequest = DeleteBlogRequest.newBuilder() .setId(createBlogResponse.getBlog().getId()) .build(); DeleteBlogResponse deleteBlogResponse = blogClient.deleteBlog(deleteBlogRequest); System.out.println("Deleted blog..."); System.out.println(deleteBlogResponse.getId()); // Listing all Blogs System.out.println("Listing all blogs..."); ListBlogRequest listBlogRequest = ListBlogRequest.newBuilder() .build(); blogClient.listBlog(listBlogRequest) .forEachRemaining(response -> System.out.println(response.getBlog().toString())); channel.shutdown(); } }
[ "adikshettri1623@gmail.com" ]
adikshettri1623@gmail.com
ad636614d5fa63d51871f62a8e345a7b874f6a77
324f6c696c6d0ff8e3df7a89c431c65bc19950ae
/src/main/java/org/onvif/ver10/schema/PolylineArrayConfiguration.java
beff5c62719f822d801244c6f9df5f4a22bbc538
[]
no_license
nightdeveloper/WebCamera
731ebd81341bc43a20740b10b39651ab5f1c9110
be69873691c669da8a1f7e0edd35cc6d985a7a86
refs/heads/master
2021-01-01T20:42:59.190684
2017-07-31T18:16:02
2017-07-31T18:16:02
98,915,806
2
1
null
null
null
null
UTF-8
Java
false
false
3,566
java
package org.onvif.ver10.schema; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import javax.xml.namespace.QName; import org.w3c.dom.Element; /** * <p>Java class for PolylineArrayConfiguration complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PolylineArrayConfiguration"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="PolylineArray" type="{http://www.onvif.org/ver10/schema}PolylineArray"/&gt; * &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;anyAttribute processContents='lax'/&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PolylineArrayConfiguration", propOrder = { "polylineArray", "any" }) public class PolylineArrayConfiguration { @XmlElement(name = "PolylineArray", required = true) protected PolylineArray polylineArray; @XmlAnyElement(lax = true) protected List<java.lang.Object> any; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the polylineArray property. * * @return * possible object is * {@link PolylineArray } * */ public PolylineArray getPolylineArray() { return polylineArray; } /** * Sets the value of the polylineArray property. * * @param value * allowed object is * {@link PolylineArray } * */ public void setPolylineArray(PolylineArray value) { this.polylineArray = value; } /** * Gets the value of the any property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the any property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAny().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link java.lang.Object } * {@link Element } * * */ public List<java.lang.Object> getAny() { if (any == null) { any = new ArrayList<java.lang.Object>(); } return this.any; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } }
[ "pri@vate.localhost" ]
pri@vate.localhost
51fa18ed20cefa72db12ca8ea6afab2e5976847d
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_148/Testnull_14717.java
d7fadab52dab124b1c97f70fafdebe391ac3dfa4
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_148; import static org.junit.Assert.*; public class Testnull_14717 { private final Productionnull_14717 production = new Productionnull_14717("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
4ab8b401434c79d2be24eabfdea15ed1969efcd4
97ac56789526363c207bc0c08e835d9bd0ae22c8
/padroes-20152/src/p09_abstractFactory/CambioManual.java
db0e4e95539dd3db72786e946a13f7db022e143e
[]
no_license
joaoslz/padroes-20152
4a386d51d7f90219f0e88ec23657a18f12373392
bccf9a690185dcab792d9b677307264ae283ea4f
refs/heads/master
2021-01-10T09:52:55.954860
2016-01-14T21:21:09
2016-01-14T21:21:09
45,565,444
0
2
null
2016-01-27T15:47:42
2015-11-04T20:28:13
Java
UTF-8
Java
false
false
339
java
package p09_abstractFactory; public class CambioManual extends Cambio { @Override public int getNumeroDeMarchas() { return this.numeroDeMarchas; } @Override public void setNumeroDeMarchas(int numeroDeMarchas) { this.numeroDeMarchas = numeroDeMarchas; } } // Classe representando um participante ConcreteProduct
[ "joaoslz@gmail.com" ]
joaoslz@gmail.com
dc47430c0ed0fb7d3637f9a53b687328b9a5ccde
6635387159b685ab34f9c927b878734bd6040e7e
/src/com/google/android/gms/maps/model/LatLngBounds.java
aa7f80f83023e32ba7da3cadc22b38745ac4e970
[]
no_license
RepoForks/com.snapchat.android
987dd3d4a72c2f43bc52f5dea9d55bfb190966e2
6e28a32ad495cf14f87e512dd0be700f5186b4c6
refs/heads/master
2021-05-05T10:36:16.396377
2015-07-16T16:46:26
2015-07-16T16:46:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,298
java
package com.google.android.gms.maps.model; import android.os.Parcel; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; import com.google.android.gms.common.internal.zzw; import com.google.android.gms.common.internal.zzw.zza; import com.google.android.gms.common.internal.zzx; import com.google.android.gms.maps.internal.zzaa; public final class LatLngBounds implements SafeParcelable { public static final zzg CREATOR = new zzg(); public final LatLng northeast; public final LatLng southwest; private final int zzFG; LatLngBounds(int paramInt, LatLng paramLatLng1, LatLng paramLatLng2) { zzx.zzb(paramLatLng1, "null southwest"); zzx.zzb(paramLatLng2, "null northeast"); if (latitude >= latitude) {} for (boolean bool = true;; bool = false) { zzx.zzb(bool, "southern latitude exceeds northern latitude (%s > %s)", new Object[] { Double.valueOf(latitude), Double.valueOf(latitude) }); zzFG = paramInt; southwest = paramLatLng1; northeast = paramLatLng2; return; } } public LatLngBounds(LatLng paramLatLng1, LatLng paramLatLng2) { this(1, paramLatLng1, paramLatLng2); } public static Builder builder() { return new Builder(); } private static double zzb(double paramDouble1, double paramDouble2) { return (paramDouble1 - paramDouble2 + 360.0D) % 360.0D; } private static double zzc(double paramDouble1, double paramDouble2) { return (paramDouble2 - paramDouble1 + 360.0D) % 360.0D; } private boolean zzc(double paramDouble) { return (southwest.latitude <= paramDouble) && (paramDouble <= northeast.latitude); } private boolean zzd(double paramDouble) { if (southwest.longitude <= northeast.longitude) { if ((southwest.longitude > paramDouble) || (paramDouble > northeast.longitude)) {} } while ((southwest.longitude <= paramDouble) || (paramDouble <= northeast.longitude)) { return true; return false; } return false; } public final boolean contains(LatLng paramLatLng) { return (zzc(latitude)) && (zzd(longitude)); } public final int describeContents() { return 0; } public final boolean equals(Object paramObject) { if (this == paramObject) {} do { return true; if (!(paramObject instanceof LatLngBounds)) { return false; } paramObject = (LatLngBounds)paramObject; } while ((southwest.equals(southwest)) && (northeast.equals(northeast))); return false; } public final LatLng getCenter() { double d2 = (southwest.latitude + northeast.latitude) / 2.0D; double d1 = northeast.longitude; double d3 = southwest.longitude; if (d3 <= d1) {} for (d1 = (d1 + d3) / 2.0D;; d1 = (d1 + 360.0D + d3) / 2.0D) { return new LatLng(d2, d1); } } final int getVersionCode() { return zzFG; } public final int hashCode() { return zzw.hashCode(new Object[] { southwest, northeast }); } public final LatLngBounds including(LatLng paramLatLng) { double d4 = Math.min(southwest.latitude, latitude); double d5 = Math.max(northeast.latitude, latitude); double d2 = northeast.longitude; double d3 = southwest.longitude; double d1 = longitude; if (!zzd(d1)) { if (zzb(d3, d1) >= zzc(d2, d1)) {} } for (;;) { return new LatLngBounds(new LatLng(d4, d1), new LatLng(d5, d2)); d2 = d1; d1 = d3; continue; d1 = d3; } } public final String toString() { return zzw.zzk(this).zza("southwest", southwest).zza("northeast", northeast).toString(); } public final void writeToParcel(Parcel paramParcel, int paramInt) { if (zzaa.zzqF()) { zzh.zza(this, paramParcel, paramInt); return; } zzg.zza(this, paramParcel, paramInt); } public static final class Builder { private double zzaro = Double.POSITIVE_INFINITY; private double zzarp = Double.NEGATIVE_INFINITY; private double zzarq = NaN.0D; private double zzarr = NaN.0D; private boolean zzd(double paramDouble) { if (zzarq <= zzarr) { if ((zzarq > paramDouble) || (paramDouble > zzarr)) {} } while ((zzarq <= paramDouble) || (paramDouble <= zzarr)) { return true; return false; } return false; } public final LatLngBounds build() { if (!Double.isNaN(zzarq)) {} for (boolean bool = true;; bool = false) { zzx.zza(bool, "no included points"); return new LatLngBounds(new LatLng(zzaro, zzarq), new LatLng(zzarp, zzarr)); } } public final Builder include(LatLng paramLatLng) { zzaro = Math.min(zzaro, latitude); zzarp = Math.max(zzarp, latitude); double d = longitude; if (Double.isNaN(zzarq)) { zzarq = d; } do { zzarr = d; do { return this; } while (zzd(d)); } while (LatLngBounds.zzd(zzarq, d) >= LatLngBounds.zze(zzarr, d)); zzarq = d; return this; } } } /* Location: * Qualified Name: com.google.android.gms.maps.model.LatLngBounds * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
82dcd4388080954bf2a3c3bc7e45214036e9bc45
ad1188d524ec118308b2d1b5abfc29887f501566
/src/main/java/project/healthbox/domain/models/view/DoctorDashboardViewModel.java
4b567a3b62cde41ccac5094f4a857916d2d87ed7
[]
no_license
yavor300/HealthBox
8b3d7fe1ea6d816b58e74d5558b695bd7bc1f2aa
43f72a2eef44e514ea95fc88238f2cb903b58113
refs/heads/master
2023-04-13T15:35:10.920390
2021-04-03T18:14:02
2021-04-03T18:14:02
293,304,536
2
0
null
null
null
null
UTF-8
Java
false
false
325
java
package project.healthbox.domain.models.view; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor public class DoctorDashboardViewModel { private String id; private String problemTitle; private String userFirstName; private String userLastName; }
[ "yavor300@gmail.com" ]
yavor300@gmail.com
1305f89ded2818117e996c70496a00dfa0fff6d6
4e89d371a5f8cca3c5c7e426af1bcb7f1fc4dda3
/java/java_core_technology_first_volume/chapter10/notHelloWorld/NotHelloWorld.java
76ad2da46fc8518049fef3814d61e52e395c2c6e
[]
no_license
bodii/test-code
f2a99450dd3230db2633a554fddc5b8ee04afd0b
4103c80d6efde949a4d707283d692db9ffac4546
refs/heads/master
2023-04-27T16:37:36.685521
2023-03-02T08:38:43
2023-03-02T08:38:43
63,114,995
4
1
null
2023-04-17T08:28:35
2016-07-12T01:29:24
Go
UTF-8
Java
false
false
1,073
java
package notHelloWord; import javax.swing.*; import java.awt.*; /** * @version 1.1 2019-09 * @author wong */ public class NotHelloWorld { public static void main(String[] args) { EventQueue.invokeLater( () -> { JFrame frame = new NotHelloWorldFrame(); frame.setTitle("NotHelloWorld"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } ); } } /** * A frame that contains a message panel */ class NotHelloWorldFrame extends JFrame { public NotHelloWorldFrame() { add(new NotHelloWorldComponent()); pack(); } } /** * A component that displays a message. */ class NotHelloWorldComponent extends JComponent { public static final int MESSAGE_X = 75; public static final int MESSAGE_Y = 100; private static final int DEFAULT_WIDTH = 300; private static final int DEFAULT_HEIGHT = 200; public void paintComponent(Graphics g) { g.drawString("Not a Hello, World program", MESSAGE_X, MESSAGE_Y); } public Dimension getPreferredSize() { return new Dimension(DEFAULT_WIDTH, DEFAULT_HEIGHT); } }
[ "1401097251@qq.com" ]
1401097251@qq.com
04496b6590ff7c84804b4d7ba38dbfa34f0af394
75950d61f2e7517f3fe4c32f0109b203d41466bf
/modules/tags/fabric3-modules-parent-pom-0.6.5/kernel/impl/fabric3-fabric/src/main/java/org/fabric3/fabric/instantiator/LogicalModelInstantiator.java
12291431b6d992bb90888d631eba4dc51805bb41
[]
no_license
codehaus/fabric3
3677d558dca066fb58845db5b0ad73d951acf880
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
refs/heads/master
2023-07-20T00:34:33.992727
2012-10-31T16:32:19
2012-10-31T16:32:19
36,338,853
0
0
null
null
null
null
MacCentralEurope
Java
false
false
1,912
java
/* * Fabric3 * Copyright © 2008 Metaform Systems Limited * * This proprietary software may be used only connection with the Fabric3 license * (the “License”), a copy of which is included in the software or may be * obtained at: http://www.metaformsystems.com/licenses/license.html. * Software distributed under the License is distributed on an “as is” basis, * without warranties or conditions of any kind. See the License for the * specific language governing permissions and limitations of use of the software. * This software is distributed in conjunction with other software licensed under * different terms. See the separate licenses for those programs included in the * distribution for the permitted and restricted uses of such software. * */ package org.fabric3.fabric.instantiator; import org.fabric3.scdl.Composite; import org.fabric3.spi.model.instance.LogicalCompositeComponent; /** * Implementations instantiate logical components within a domain. * * @version $Revision$ $Date$ */ public interface LogicalModelInstantiator { /** * Creates a LogicalChange for including a composite in another composite. * * @param targetComposite the target composite in which the composite is to be included. * @param composite the composite to be included. * @return the change that would result from this include operation */ LogicalChange include(LogicalCompositeComponent targetComposite, Composite composite); /** * Creates a LogicalChange for removing the composite from the target composite. * * @param targetComposite the target composite from which the composite is to be removed. * @param composite Composite to be removed. * @return the change that would result from this remove operation */ LogicalChange remove(LogicalCompositeComponent targetComposite, Composite composite); }
[ "jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf" ]
jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf
0bd8161c323ba0cebb4ea654bcd20302d6499fc3
45aa4060fea4b66426359955e3bd229db159b614
/socket/src/main/java/org/zgl/tcp/utils/builder_rpc_interface/ParamertModel.java
4672bd84b146545cf14ee96c3ef9e290cc7cc56c
[]
no_license
zglbig/zglgame_S
79bca616d75e21888b756c163ef94ecf1738cdff
9144f50002e0f6a9a7f9e5daaabc37e39524ec81
refs/heads/master
2020-03-19T20:49:55.000600
2018-06-12T07:35:01
2018-06-12T07:35:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
578
java
package org.zgl.tcp.utils.builder_rpc_interface; /** * @作者: big * @创建时间: 2018/6/6 * @文件描述: */ public class ParamertModel { private String type; private String name; public ParamertModel(String type, String name) { this.type = type; this.name = name; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "1030681978@qq.com" ]
1030681978@qq.com
058fe4ea4ff25b73ab30ea3cf8eb1469d3336e97
5cc5d132fc6eaba2f6497af5a9bc1be05be265a6
/impl/src/main/java/stilldi/impl/DeclarationInfoImpl.java
1e4daca638643a5ad88b375749c2d0de0d1ea8f7
[]
no_license
antoinesd/StillDI
00c47af8123f2f64ce6a403e2cd25ce8f9c81efc
f98ec52a6b076819f1d46128fd10bc456ce34b82
refs/heads/main
2023-03-10T03:45:39.503099
2021-02-23T14:45:04
2021-02-23T14:45:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,423
java
package stilldi.impl; import cdi.lite.extension.model.AnnotationInfo; import cdi.lite.extension.model.declarations.DeclarationInfo; import stilldi.impl.util.fake.AnnotatedPackage; import java.lang.annotation.Annotation; import java.util.Collection; import java.util.function.Predicate; import java.util.stream.Collectors; // TODO all *Info subclasses have equals/hashCode, but *Config do not, and that's probably correct? abstract class DeclarationInfoImpl<CdiDeclaration extends javax.enterprise.inject.spi.Annotated> implements DeclarationInfo { final CdiDeclaration cdiDeclaration; DeclarationInfoImpl(CdiDeclaration cdiDeclaration) { this.cdiDeclaration = cdiDeclaration; } static DeclarationInfo fromCdiDeclaration(javax.enterprise.inject.spi.Annotated cdiDeclaration) { if (cdiDeclaration instanceof javax.enterprise.inject.spi.AnnotatedType) { return new ClassInfoImpl((javax.enterprise.inject.spi.AnnotatedType<?>) cdiDeclaration); } else if (cdiDeclaration instanceof javax.enterprise.inject.spi.AnnotatedCallable) { // method or constructor return new MethodInfoImpl((javax.enterprise.inject.spi.AnnotatedCallable<?>) cdiDeclaration); } else if (cdiDeclaration instanceof javax.enterprise.inject.spi.AnnotatedParameter) { return new ParameterInfoImpl((javax.enterprise.inject.spi.AnnotatedParameter<?>) cdiDeclaration); } else if (cdiDeclaration instanceof javax.enterprise.inject.spi.AnnotatedField) { return new FieldInfoImpl((javax.enterprise.inject.spi.AnnotatedField<?>) cdiDeclaration); } else if (cdiDeclaration instanceof AnnotatedPackage) { return new PackageInfoImpl((AnnotatedPackage) cdiDeclaration); } else { throw new IllegalArgumentException("Unknown declaration " + cdiDeclaration); } } @Override public boolean hasAnnotation(Class<? extends Annotation> annotationType) { return cdiDeclaration.isAnnotationPresent(annotationType); } @Override public boolean hasAnnotation(Predicate<AnnotationInfo> predicate) { return cdiDeclaration.getAnnotations() .stream() .anyMatch(it -> predicate.test(new AnnotationInfoImpl(cdiDeclaration, null, it))); } @Override public AnnotationInfo annotation(Class<? extends Annotation> annotationType) { return new AnnotationInfoImpl(cdiDeclaration, null, cdiDeclaration.getAnnotation(annotationType)); } @Override public Collection<AnnotationInfo> repeatableAnnotation(Class<? extends Annotation> annotationType) { return cdiDeclaration.getAnnotations(annotationType) .stream() .map(it -> new AnnotationInfoImpl(cdiDeclaration, null, it)) .collect(Collectors.toList()); } @Override public Collection<AnnotationInfo> annotations(Predicate<AnnotationInfo> predicate) { return cdiDeclaration.getAnnotations() .stream() .map(it -> new AnnotationInfoImpl(cdiDeclaration, null, it)) .filter(predicate) .collect(Collectors.toList()); } @Override public Collection<AnnotationInfo> annotations() { return annotations(it -> true); } @Override public String toString() { return cdiDeclaration.toString(); } }
[ "lthon@redhat.com" ]
lthon@redhat.com
b3ed51cd117cbcf0ef0f53e187960a0eab916505
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/102/1143.java
32bd0710bfecd2ad4c738fb86d40fe017f73d243
[ "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,291
java
package <missing>; public class GlobalMembers { public static int Main() { int n; int i; int j; int x = 0; int y = 0; double h; double[] a = new double[100]; double[] b = new double[100]; String c = new String(new char[100]); String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } for (i = 0;i < n;i++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { c = tempVar2.charAt(0); } String tempVar3 = ConsoleInput.scanfRead(" "); if (tempVar3 != null) { h = Double.parseDouble(tempVar3); } if (c.charAt(0) == 'm') { a[x] = h; x++; } else if (c.charAt(0) == 'f') { b[y] = h; y++; } } double e; for (i = 1;i <= x;i++) { for (j = 0;j < x - i;j++) { if (a[j] > a[j + 1]) { e = a[j]; a[j] = a[j + 1]; a[j + 1] = e; } } } double f; for (i = 1;i <= y;i++) { for (j = 0;j < y - i;j++) { if (b[j] < b[j + 1]) { f = b[j]; b[j] = b[j + 1]; b[j + 1] = f; } } } System.out.printf("%.2lf",a[0]); for (i = 1;i < x;i++) { System.out.printf(" %.2lf",a[i]); } for (i = 0;i < y;i++) { System.out.printf(" %.2lf",b[i]); } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
7e182bc7649df70c58e1a90747c180dd2a754897
cd602223060180939d6eb2a02729f1bfa35a4fa5
/app/src/main/java/com/chunsun/redenvelope/widget/XCArcProgressBar.java
b40de93f788074a4dd4151f980621070844ab662
[]
no_license
himon/ChunSunRE
25c351ea2385b9c7c0ef494e5604a09fa315c07e
44cfdec4ad97eaecc9913f48dcec278aba84f963
refs/heads/master
2021-01-18T22:09:20.095786
2016-04-28T14:25:01
2016-04-28T14:25:01
41,711,612
3
0
null
null
null
null
UTF-8
Java
false
false
8,628
java
package com.chunsun.redenvelope.widget; import android.annotation.SuppressLint; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.PaintFlagsDrawFilter; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffXfermode; import android.graphics.Typeface; import android.util.AttributeSet; import android.view.View; import com.chunsun.redenvelope.R; import com.chunsun.redenvelope.utils.ProgressBarUtils; /** * 开口圆环类型的进度条:带进度百分比显示的进度条,线程安全的View,可直接在线程中更新进度 * * @author caizhiming */ @SuppressLint("DrawAllocation") public class XCArcProgressBar extends View { private Paint paint;// 画笔对象的引用 private int textColor;// 中间进度百分比字符串的颜色 private float textSize;// 中间进度百分比字符串的字体 private int max;// 最大进度 private int progress;// 当前进度 private boolean isDisplayText;// 是否显示中间百分比进度字符串 private String title;// 标题 private Bitmap bmpTemp = null; private int degrees; public XCArcProgressBar(Context context) { this(context, null); } public XCArcProgressBar(Context context, AttributeSet attrs) { this(context, attrs, 0); } public XCArcProgressBar(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); degrees = 0; paint = new Paint(); // 从attrs.xml中获取自定义属性和默认值 TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.XCRoundProgressBar); textColor = typedArray.getColor( R.styleable.XCRoundProgressBar_textColor, Color.RED); textSize = typedArray.getDimension( R.styleable.XCRoundProgressBar_textSize, 15); max = typedArray.getInteger(R.styleable.XCRoundProgressBar_max, 100); isDisplayText = typedArray.getBoolean( R.styleable.XCRoundProgressBar_textIsDisplayable, true); typedArray.recycle(); } @SuppressWarnings("static-access") @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); int width = getWidth(); int height = getHeight(); int centerX = getWidth() / 2;// 获取中心点X坐标 int centerY = getHeight() / 2;// 获取中心点Y坐标 Bitmap bitmap = Bitmap.createBitmap(width, height, Config.ARGB_8888); Canvas can = new Canvas(bitmap); // 绘制底部背景图 bmpTemp = ProgressBarUtils.decodeCustomRes(getContext(), R.drawable.arc_bg); float dstWidth = (float) width; float dstHeight = (float) height; int srcWidth = bmpTemp.getWidth(); int srcHeight = bmpTemp.getHeight(); can.setDrawFilter(new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG));// 抗锯齿 Bitmap bmpBg = Bitmap.createScaledBitmap(bmpTemp, width, height, true); can.drawBitmap(bmpBg, 0, 0, null); // 绘制进度前景图 Matrix matrixProgress = new Matrix(); matrixProgress.postScale(dstWidth / srcWidth, dstHeight / srcWidth); bmpTemp = ProgressBarUtils.decodeCustomRes(getContext(), R.drawable.arc_progress); Bitmap bmpProgress = Bitmap.createBitmap(bmpTemp, 0, 0, srcWidth, srcHeight, matrixProgress, true); degrees = progress * 270 / max - 270; // 遮罩处理前景图和背景图 can.save(); can.rotate(degrees, centerX, centerY); paint.setAntiAlias(true); paint.setXfermode(new PorterDuffXfermode(Mode.SRC_ATOP)); can.drawBitmap(bmpProgress, 0, 0, paint); can.restore(); if ((-degrees) >= 85) { int posX = 0; int posY = 0; if ((-degrees) >= 270) { posX = 0; posY = 0; } else if ((-degrees) >= 225) { posX = centerX / 2; posY = 0; } else if ((-degrees) >= 180) { posX = centerX; posY = 0; } else if ((-degrees) >= 135) { posX = centerX; posY = 0; } else if ((-degrees) >= 85) { posX = centerX; posY = centerY; } if ((-degrees) >= 225) { can.save(); Bitmap dst = bitmap .createBitmap(bitmap, 0, 0, centerX, centerX); paint.setAntiAlias(true); paint.setXfermode(new PorterDuffXfermode(Mode.SRC_ATOP)); Bitmap src = bmpBg.createBitmap(bmpBg, 0, 0, centerX, centerX); can.drawBitmap(src, 0, 0, paint); can.restore(); can.save(); dst = bitmap.createBitmap(bitmap, centerX, 0, centerX, height); paint.setAntiAlias(true); paint.setXfermode(new PorterDuffXfermode(Mode.SRC_ATOP)); src = bmpBg.createBitmap(bmpBg, centerX, 0, centerX, height); can.drawBitmap(src, centerX, 0, paint); can.restore(); } else { can.save(); Bitmap dst = bitmap.createBitmap(bitmap, posX, posY, width - posX, height - posY); paint.setAntiAlias(true); paint.setXfermode(new PorterDuffXfermode(Mode.SRC_ATOP)); Bitmap src = bmpBg.createBitmap(bmpBg, posX, posY, width - posX, height - posY); can.drawBitmap(src, posX, posY, paint); can.restore(); } } // 绘制遮罩层位图 canvas.drawBitmap(bitmap, 0, 0, null); // 画中间进度百分比字符串 paint.reset(); paint.setStrokeWidth(0); paint.setColor(textColor); paint.setTextSize(textSize); paint.setTypeface(Typeface.DEFAULT_BOLD); int percent = (int) (((float) progress / (float) max) * 100);// 计算百分比 float textWidth = paint.measureText(percent + "%");// 测量字体宽度,需要居中显示 if (isDisplayText && percent != 0) { // canvas.drawText(percent + "%", centerX - textWidth / 2, centerX // + textSize / 2 - 25, paint); } // 画底部开口处标题文字 //paint.setTextSize(textSize / 2); //textWidth = paint.measureText(title); //canvas.drawText(title, centerX - textWidth / 2, height - textSize / 2, //paint); } public Paint getPaint() { return paint; } public void setPaint(Paint paint) { this.paint = paint; } public int getTextColor() { return textColor; } public void setTextColor(int textColor) { this.textColor = textColor; } public float getTextSize() { return textSize; } public void setTextSize(float textSize) { this.textSize = textSize; } public synchronized int getMax() { return max; } public synchronized void setMax(int max) { if (max < 0) { throw new IllegalArgumentException("max must more than 0"); } this.max = max; } public synchronized int getProgress() { return progress; } /** * 设置进度,此为线程安全控件,由于考虑多线的问题,需要同步 刷新界面调用postInvalidate()能在非UI线程刷新 * * @author caizhiming */ public synchronized void setProgress(int progress) { if (progress < 0) { throw new IllegalArgumentException("progress must more than 0"); } if (progress > max) { this.progress = progress; } if (progress <= max) { this.progress = progress; postInvalidate(); } } public boolean isDisplayText() { return isDisplayText; } public void setDisplayText(boolean isDisplayText) { this.isDisplayText = isDisplayText; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } }
[ "258798596@qq.com" ]
258798596@qq.com
621e599ccd15c7f55e45ac3d0e39a150c129408d
2b6e3a34ec277f72a5da125afecfe3f4a61419f5
/Ruyicai_168/v3.6.2/src/com/ruyicai/activity/more/lotnoalarm/LotnoAlarmManager.java
5c3d1db8584b1dacce264162cfa626d4f99dc647
[]
no_license
surport/Android
03d538fe8484b0ff0a83b8b0b2499ad14592c64b
afc2668728379caeb504c9b769011f2ba1e27d25
refs/heads/master
2020-04-02T10:29:40.438348
2013-12-18T09:55:42
2013-12-18T09:55:42
15,285,717
3
5
null
null
null
null
UTF-8
Java
false
false
7,465
java
package com.ruyicai.activity.more.lotnoalarm; import java.util.Calendar; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import com.palmdream.RuyicaiAndroid168.R; import com.ruyicai.activity.home.HomeActivity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.util.Log; import android.widget.RemoteViews; /** * 购彩提醒管理类:1.处理购彩相关设置的保存和获取;2.购彩消息的发送 * * @author PengCX * */ public class LotnoAlarmManager { private static final String TAG = "LotnoAlarmManager"; private static final int LNTNOALARM_NOTIFICATION_ID = 1; private static final String LONTOALARM_PREFERENCES_NAME = "AlarmSet"; static final String PREFERENCE_HOUR_KEY = "hour"; static final String PREFERENCE_MINUTE_KEY = "minute"; static final String PREFERENCE_OPENVOICE_KEY = "openvoice"; static final String PREFERENCE_SSQ_KEY = "ssq"; static final String PREFERENCE_DLT_KEY = "dlt"; static final String PREFERENCE_FC3D_KEY = "fc3d"; static final String PREFERENCE_QLC_KEY = "qlc"; static final String PREFERENCE_QXC_KEY = "qxc"; static final String PREFERENCE_PL3_KEY = "pl3"; static final String PREFERENCE_PL5_KEY = "pl5"; static final String PREFERENCE_TWENTYFIVE_KEY = "22x5"; static Map<String, String> lotnosNameMap; private static LotnoAlarmManager instance = null; private SharedPreferences sharedPreferences; private SharedPreferences.Editor editor; private Context context; public boolean getLotnoSetting(String key) { boolean setting = sharedPreferences.getBoolean(key, false); return setting; } public int getAlarmTimeSetting(String key) { int time; //默认的设置时间是19:00 if (key.equals(PREFERENCE_HOUR_KEY)) { time = sharedPreferences.getInt(key, 19); } else { time = sharedPreferences.getInt(key, 0); } return time; } public void setLotnoSetting(String key, boolean setting) { editor.putBoolean(key, setting); editor.commit(); } public void setAlarmTimeSetting(String key, int time) { editor.putInt(key, time); editor.commit(); } private LotnoAlarmManager(Context context) { this.context = context; sharedPreferences = context.getSharedPreferences(LONTOALARM_PREFERENCES_NAME, 0); editor = sharedPreferences.edit(); lotnosNameMap = new HashMap<String, String>(); lotnosNameMap.put(PREFERENCE_SSQ_KEY, "双色球"); lotnosNameMap.put(PREFERENCE_DLT_KEY, "大乐透"); lotnosNameMap.put(PREFERENCE_FC3D_KEY, "福彩3D"); lotnosNameMap.put(PREFERENCE_QLC_KEY, "七乐彩"); lotnosNameMap.put(PREFERENCE_QXC_KEY, "七星彩"); lotnosNameMap.put(PREFERENCE_PL3_KEY, "排列3"); lotnosNameMap.put(PREFERENCE_PL5_KEY, "排列5"); lotnosNameMap.put(PREFERENCE_TWENTYFIVE_KEY, "22选5"); } public static final LotnoAlarmManager getInstance(Context context) { if (instance == null) { instance = new LotnoAlarmManager(context); } return instance; } public void sendBuyLotnoNotification() { NotificationManager notificationManager = (NotificationManager) context .getSystemService(Context.NOTIFICATION_SERVICE); //初始化消息内容 int notificationIcon = R.drawable.icon; String notificationTitle = "购彩提醒"; long notificationTime = System.currentTimeMillis(); Notification notification = new Notification(notificationIcon, notificationTitle, notificationTime); //初始化消息视图 RemoteViews notificationView = new RemoteViews(context.getApplicationContext().getPackageName(), R.layout.custom_notification); notification.contentView = notificationView; notificationView.setImageViewResource(R.id.icon, notificationIcon); notificationView.setTextViewText(R.id.title, notificationTitle); String notificationContent = appendNotifationContent(); notificationView.setTextViewText(R.id.content, notificationContent); //初始化点击意图 Intent launchIntent = new Intent(context, HomeActivity.class); PendingIntent pendingIntentForHomeActivity = PendingIntent.getActivity(context, 0, launchIntent, 0); notification.contentIntent = pendingIntentForHomeActivity; // 取消消息设置和声音设置 notification.flags |= Notification.FLAG_AUTO_CANCEL; if (getLotnoSetting(PREFERENCE_OPENVOICE_KEY)) { notification.defaults |= Notification.DEFAULT_SOUND; } // 发送消息 notificationManager.notify(LNTNOALARM_NOTIFICATION_ID, notification); } /** * 拼接购彩提示消息内容 * * @return 购彩提示消息内容 */ private String appendNotifationContent() { StringBuffer lotnoContent = new StringBuffer(); //遍历各个彩种,如果该彩种的提醒打开,并且当前时间可提醒,则加入到提示消息 Iterator iterator = lotnosNameMap.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry lotno = (Entry) iterator.next(); if (isAlarmNow(lotno.getKey().toString())) { lotnoContent.append(lotno.getValue() + " "); } } String notificationContent = "今天是" + lotnoContent.toString() + "的开奖日,不要错过购彩!"; return notificationContent; } /** * 当前是否是可提醒彩种 * * @param key * 彩种关键字 * @return 是否是可提醒彩种标识符 */ public boolean isAlarmNow(String key) { boolean isSetting = getLotnoSetting(key); if (isSetting) { // 福彩3D、排列3、排列5、22选5每天提醒 if (key.equals(PREFERENCE_FC3D_KEY) || key.equals(PREFERENCE_PL3_KEY) || key.equals(PREFERENCE_PL5_KEY) || key.equals(PREFERENCE_TWENTYFIVE_KEY)) { return true; } else { Calendar calendar = Calendar.getInstance(); int day = calendar.get(Calendar.DAY_OF_WEEK); switch (day) { // 周日提醒双色球和七星彩 case Calendar.SUNDAY: if (key.equals(PREFERENCE_SSQ_KEY) || key.equals(PREFERENCE_QXC_KEY)) { return true; } break; // 周一提醒大乐透和七乐彩 case Calendar.MONDAY: if (key.equals(PREFERENCE_DLT_KEY) || key.equals(PREFERENCE_QLC_KEY)) { return true; } break; // 周二提醒双色球和七星彩 case Calendar.TUESDAY: if (key.equals(PREFERENCE_SSQ_KEY) || key.equals(PREFERENCE_QXC_KEY)) { return true; } break; // 周三提醒大乐透和七乐彩 case Calendar.WEDNESDAY: if (key.equals(PREFERENCE_DLT_KEY) || key.equals(PREFERENCE_QLC_KEY)) { return true; } break; // 周四提醒双色球 case Calendar.THURSDAY: if (key.equals(PREFERENCE_SSQ_KEY)) { return true; } break; // 周五提醒七星彩和七乐彩 case Calendar.FRIDAY: if (key.equals(PREFERENCE_QXC_KEY) || key.equals(PREFERENCE_QLC_KEY)) { return true; } break; // 周六提醒大乐透 case Calendar.SATURDAY: if (key.equals(PREFERENCE_DLT_KEY)) { return true; } break; } } } return false; } }
[ "zxflimit@gmail.com" ]
zxflimit@gmail.com
0a4c7c544129eddc594f267988b3f2c6b61e1c07
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a170/A170552Test.java
04583672853779495b4ee60bbda787f4065cbdd4
[]
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.a170; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A170552Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
64105cfac9044a9e799ed58b9b7c4afdd4d8b7b1
f8e8d74bb3920c0e31de43145bfd54530820bd66
/src/main/java/com/navneet/config/Constants.java
e08959bfa3eaed4c7ea5340455c200f7368594f5
[]
no_license
navneetrastogi/test-angular
ab6e9457edfd4fb71355b166ebedfd974fc9bba3
743340fce9d7ff64643def14854896b128dbc00a
refs/heads/master
2020-03-26T16:23:36.522635
2018-08-17T09:13:22
2018-08-17T09:13:22
145,099,173
0
0
null
2023-09-06T06:16:58
2018-08-17T09:13:15
Java
UTF-8
Java
false
false
416
java
package com.navneet.config; /** * Application constants. */ public final class Constants { // Regex for acceptable logins public static final String LOGIN_REGEX = "^[_.@A-Za-z0-9-]*$"; public static final String SYSTEM_ACCOUNT = "system"; public static final String ANONYMOUS_USER = "anonymoususer"; public static final String DEFAULT_LANGUAGE = "en"; private Constants() { } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
168458ca43648bfdf5fb23f8d25b7e3e4b2fcb53
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/62_dom4j-org.dom4j.tree.AbstractDocumentType-1.0-6/org/dom4j/tree/AbstractDocumentType_ESTest.java
4560f7670969f0e2fd3e9c40ab2528b7bab23dfc
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
660
java
/* * This file was automatically generated by EvoSuite * Fri Oct 25 21:19:11 GMT 2019 */ package org.dom4j.tree; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class AbstractDocumentType_ESTest extends AbstractDocumentType_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
6ab0a5f8e8deaf23be23eb88054c9af0c45ff5ff
1925dc2945e1d6cc82525ceff3dbef278ba8d0d9
/src/main/java/com/jalaj/jhipstergateway/domain/AbstractAuditingEntity.java
61249e016ab3ccab3f99650c0e5049732b9da49a
[]
no_license
trustjalaj/jhipster-sample-application
54be7677e39e36abf0374be0b2dce11acd44b825
be357dfaa973bd8d98315d39ef6c6b544eb757c8
refs/heads/master
2020-03-27T01:41:02.390736
2018-08-22T16:10:26
2018-08-22T16:10:26
145,733,051
0
0
null
null
null
null
UTF-8
Java
false
false
2,240
java
package com.jalaj.jhipstergateway.domain; import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonIgnore; import org.hibernate.envers.Audited; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.Instant; import javax.persistence.Column; import javax.persistence.EntityListeners; import javax.persistence.MappedSuperclass; /** * Base abstract class for entities which will hold definitions for created, last modified by and created, * last modified by date. */ @MappedSuperclass @Audited @EntityListeners(AuditingEntityListener.class) public abstract class AbstractAuditingEntity implements Serializable { private static final long serialVersionUID = 1L; @CreatedBy @Column(name = "created_by", nullable = false, length = 50, updatable = false) @JsonIgnore private String createdBy; @CreatedDate @Column(name = "created_date", nullable = false, updatable = false) @JsonIgnore private Instant createdDate = Instant.now(); @LastModifiedBy @Column(name = "last_modified_by", length = 50) @JsonIgnore private String lastModifiedBy; @LastModifiedDate @Column(name = "last_modified_date") @JsonIgnore private Instant lastModifiedDate = Instant.now(); public String getCreatedBy() { return createdBy; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } public Instant getCreatedDate() { return createdDate; } public void setCreatedDate(Instant createdDate) { this.createdDate = createdDate; } public String getLastModifiedBy() { return lastModifiedBy; } public void setLastModifiedBy(String lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } public Instant getLastModifiedDate() { return lastModifiedDate; } public void setLastModifiedDate(Instant lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
77e2dbdfc1f8487aff820e82e5a972e849ddd272
f5049214ff99cdd7c37da74619b60ac4a26fc6ba
/fileshare/app/eu.agno3.fileshare.service/src/main/java/eu/agno3/fileshare/service/chunks/internal/BaseChunkTrackerImpl.java
137f27ad93cbbf6f52a8b4d2f4f1a01d8679f58f
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
AgNO3/code
d17313709ee5db1eac38e5811244cecfdfc23f93
b40a4559a10b3e84840994c3fd15d5f53b89168f
refs/heads/main
2023-07-28T17:27:53.045940
2021-09-17T14:25:01
2021-09-17T14:31:41
407,567,058
0
2
null
null
null
null
UTF-8
Java
false
false
4,200
java
/** * © 2017 AgNO3 Gmbh & Co. KG * All right reserved. * * Created: Oct 4, 2017 by mbechler */ package eu.agno3.fileshare.service.chunks.internal; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.log4j.Logger; import eu.agno3.fileshare.model.query.ChunkInfo; import eu.agno3.fileshare.service.ChunkStateTracker; import eu.agno3.fileshare.service.UploadStateTracker; /** * @author mbechler * */ public abstract class BaseChunkTrackerImpl implements ChunkStateTracker { private static final Logger log = Logger.getLogger(BaseChunkTrackerImpl.class); private final UploadStateTracker uploadState; private final int numChunks; private final long chunkSize; private final Long lastChunkSize; private final Long totalSize; /** * @param ust * @param chunkSize * @param totalSize * */ public BaseChunkTrackerImpl ( UploadStateTracker ust, long chunkSize, long totalSize ) { this.uploadState = ust; this.totalSize = totalSize; this.chunkSize = chunkSize; int nc = (int) ( totalSize / chunkSize ); long lastSize = totalSize % chunkSize; if ( lastSize != 0 ) { nc++; } else { lastSize = chunkSize; } this.numChunks = nc; this.lastChunkSize = lastSize; } /** * @return the uploadState */ protected UploadStateTracker getUploadState () { return this.uploadState; } /** * {@inheritDoc} * * @see eu.agno3.fileshare.service.ChunkStateTracker#getChunkSize() */ @Override public long getChunkSize () { return this.chunkSize; } /** * {@inheritDoc} * * @see eu.agno3.fileshare.service.ChunkStateTracker#getLastChunkSize() */ @Override public Long getLastChunkSize () { return this.lastChunkSize; } /** * {@inheritDoc} * * @see eu.agno3.fileshare.service.ChunkStateTracker#getTotalSize() */ @Override public Long getTotalSize () { return this.totalSize; } /** * {@inheritDoc} * * @see eu.agno3.fileshare.service.ChunkStateTracker#getNumChunks() */ @Override public int getNumChunks () { return this.numChunks; } /** * {@inheritDoc} * * @see eu.agno3.fileshare.service.ChunkStateTracker#haveChunk(int) */ @Override public boolean haveChunk ( int chunkIdx ) { if ( chunkIdx >= getNumChunks() ) { throw new IllegalArgumentException(); } return getChunkState(chunkIdx) != 0; } /** * @param i * @return */ protected abstract byte getChunkState ( int i ); /** * {@inheritDoc} * * @see eu.agno3.fileshare.service.ChunkStateTracker#getMissingChunks() */ @Override public List<ChunkInfo> getMissingChunks () { return getChunksWithState((byte) 0); } /** * {@inheritDoc} * * @see eu.agno3.fileshare.service.ChunkStateTracker#getCompletedChunks() */ @Override public List<ChunkInfo> getCompletedChunks () { return getChunksWithState((byte) 1); } /** * @param state * @return */ protected List<ChunkInfo> getChunksWithState ( byte state ) { if ( !this.getUploadState().isValid() ) { log.debug("Context is gone"); //$NON-NLS-1$ return Collections.EMPTY_LIST; } int nc = getNumChunks(); List<ChunkInfo> info = new ArrayList<>(); for ( int i = 0; i < nc; i++ ) { if ( getChunkState(i) == state ) { info.add(makeChunkInfo(i)); } } return info; } /** * @param i * @return */ protected ChunkInfo makeChunkInfo ( int i ) { long start = i * this.chunkSize; long end = ( i + 1 ) * this.chunkSize; if ( i == this.numChunks - 1 ) { end = start + ( this.lastChunkSize != null ? this.lastChunkSize : this.chunkSize ); } return new ChunkInfo(i, start, end); } }
[ "bechler@agno3.eu" ]
bechler@agno3.eu
fd145dd0ebf7e639d13db0f9dae347bac8f61d5b
313d8c7a97a32612a13911ac93073115d1419cb8
/photo_processing/src/main/java/ru/vsu/cs/documentpreparing/photo_processing/manager/tasks/filtertask/filters/support/ThresholdResizeFilter.java
891851ffd3001808f82bea86abd2aa3476984da3
[]
no_license
Alegor95/document_processing
f4a2f4a705563754e99b887eab97bc8126263282
5193a95cb17721326adee507bbf158b90d9dda62
refs/heads/master
2020-05-01T06:38:46.602264
2016-05-30T05:55:11
2016-05-30T05:55:11
58,309,338
0
0
null
null
null
null
UTF-8
Java
false
false
1,399
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ru.vsu.cs.documentpreparing.photo_processing.manager.tasks.filtertask.filters.support; import org.opencv.core.Mat; import org.opencv.core.Size; import org.opencv.imgproc.Imgproc; import ru.vsu.cs.documentpreparing.photo_processing.manager.tasks.filtertask.filters.ImageFilter; /** * * @author aleksandr */ public class ThresholdResizeFilter extends ImageFilter { private int threshold; @Override public Mat filterImage(Mat image) { //Count size double k = image.cols()/(double)image.rows(); if (image.cols() > image.rows()){ if (image.cols() > threshold){ Size size = new Size(threshold, threshold/k); //Resize Imgproc.resize(image, image, size); } } else { if (image.rows() > threshold){ Size size = new Size(threshold*k, threshold); //Resize Imgproc.resize(image, image, size); } } return image; } public ThresholdResizeFilter(Integer t){ this(t.intValue()); } public ThresholdResizeFilter(int threshold){ this.threshold = threshold; } }
[ "=" ]
=
4ec44924f1c8f97e9907258c0d7a3cb8a8e9449f
68b57975b1a5bcb03b01259a49a8f989ce64f6d3
/thaumcraft/client/renderers/item/ItemTrunkSpawnerRenderer.java
b81916ab633e51e1ea45b90735106992fce6ef4c
[]
no_license
KAMKEEL/Thaumcraft4-1.7.10
62ae23c025bb72d826797114c8546c6019b878d7
059a869367c7bfeef97e5c1aeca78a4b9fa26554
refs/heads/master
2021-12-15T02:43:23.921572
2017-07-19T00:56:18
2017-07-19T00:56:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,387
java
/* */ package thaumcraft.client.renderers.item; /* */ /* */ import net.minecraft.client.Minecraft; /* */ import net.minecraft.client.model.ModelChest; /* */ import net.minecraft.item.ItemStack; /* */ import net.minecraftforge.client.IItemRenderer; /* */ import net.minecraftforge.client.IItemRenderer.ItemRenderType; /* */ import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; /* */ import org.lwjgl.opengl.GL11; /* */ import thaumcraft.client.lib.UtilsFX; /* */ /* */ public class ItemTrunkSpawnerRenderer implements IItemRenderer /* */ { /* 14 */ private ModelChest chest = new ModelChest(); /* */ /* */ /* */ /* */ /* */ public boolean handleRenderType(ItemStack item, IItemRenderer.ItemRenderType type) /* */ { /* 21 */ return true; /* */ } /* */ /* */ public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper) /* */ { /* 26 */ return true; /* */ } /* */ /* */ public void renderItem(IItemRenderer.ItemRenderType type, ItemStack item, Object... data) /* */ { /* 31 */ Minecraft mc = Minecraft.func_71410_x(); /* */ /* 33 */ GL11.glPushMatrix(); /* 34 */ UtilsFX.bindTexture("textures/models/trunk.png"); /* */ /* 36 */ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); /* 37 */ GL11.glScalef(1.0F, -1.0F, -1.0F); /* 38 */ short var11 = 0; /* */ /* 40 */ if ((type == IItemRenderer.ItemRenderType.EQUIPPED) || (type == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON)) { /* 41 */ GL11.glTranslatef(-0.25F, -0.5F, -0.25F); /* 42 */ if ((type == IItemRenderer.ItemRenderType.EQUIPPED) && (type != IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON)) { /* 43 */ GL11.glTranslatef(1.0F, 0.0F, 0.0F); /* */ } /* */ } /* */ /* */ /* 48 */ GL11.glRotatef(var11, 0.0F, 1.0F, 0.0F); /* */ /* 50 */ GL11.glTranslatef(-0.5F, -0.5F, -0.5F); /* */ /* 52 */ this.chest.func_78231_a(); /* */ /* 54 */ GL11.glPopMatrix(); /* */ } /* */ } /* Location: /Users/shannon/Desktop/Thaumcraft-1.7.10-4.2.3.5.jar!/thaumcraft/client/renderers/item/ItemTrunkSpawnerRenderer.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "phanegan2@gmail.com" ]
phanegan2@gmail.com
8cc13fe5e3144771ed291c7289609b19bb27868d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_881e0106962f37180a08bf953d6ce0575946e3b3/BookModel/11_881e0106962f37180a08bf953d6ce0575946e3b3_BookModel_s.java
a06a1e055c4695cb19471ae4db1a566399e478b7
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,656
java
/* * Copyright (C) 2007-2012 Geometer Plus <contact@geometerplus.com> * * 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 2 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. */ package org.geometerplus.fbreader.bookmodel; import java.util.*; import org.geometerplus.zlibrary.core.image.*; import org.geometerplus.zlibrary.text.model.*; import org.geometerplus.fbreader.library.Book; import org.geometerplus.fbreader.formats.*; public abstract class BookModel { public static BookModel createModel(Book book) { final FormatPlugin plugin = PluginCollection.Instance().getPlugin(book.File); if (plugin == null) { return null; } final BookModel model; if (plugin.type() == FormatPlugin.Type.NATIVE) { model = new NativeBookModel(book); } else { model = new JavaBookModel(book); } if (plugin.readModel(model)) { return model; } return null; } protected final ZLImageMap myImageMap = new ZLImageMap(); public final Book Book; public final TOCTree TOCTree = new TOCTree(); public static final class Label { public final String ModelId; public final int ParagraphIndex; public Label(String modelId, int paragraphIndex) { ModelId = modelId; ParagraphIndex = paragraphIndex; } } protected BookModel(Book book) { Book = book; } public abstract ZLTextModel getTextModel(); public abstract ZLTextModel getFootnoteModel(String id); protected abstract Label getLabelInternal(String id); public interface LabelResolver { List<String> getCandidates(String id); } private LabelResolver myResolver; public void setLabelResolver(LabelResolver resolver) { myResolver = resolver; } public Label getLabel(String id) { Label label = getLabelInternal(id); if (label == null && myResolver != null) { for (String candidate : myResolver.getCandidates(id)) { label = getLabelInternal(candidate); if (label != null) { break; } } } return label; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f561acb7d187d7f18a7dff7c58dc1c70408b5650
034143d4676a46d61234ff6dc65394ce03ecb259
/Tema02/AprendiendoJava/src/pe/egcc/dos/ClaseD.java
5cb8dff80256cfb5f8ba5dca0d93899c9ab73145
[]
no_license
fmorantea/CURSO-JAVA-OO
8904068c2d46a2f8323053741bb2aaecf39a0133
028f04358cd7ca44427e1118444af78696cdff30
refs/heads/master
2020-07-11T14:29:45.622326
2019-05-07T22:23:16
2019-05-07T22:23:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
430
java
package pe.egcc.dos; import pe.egcc.uno.ClaseA; /** * * @author Eric Gustavo Coronel Castillo * @blog www.desarrollasoftware.com * @email gcoronelc@gmail.com */ public class ClaseD { public void metodoD() { ClaseA bean = new ClaseA(); //System.out.println("n1: " + bean.n1); //System.out.println("n2: " + bean.n2); //System.out.println("n3: " + bean.n3); System.out.println("n4: " + bean.n4); } }
[ "gcoronelc@gmail.com" ]
gcoronelc@gmail.com
5d0849a5184ab187390e6be77c481fe7b0c8d6e1
67f7d4f7d33c94667d050b6aa97ceee3912b89ec
/querydsl-collections/src/main/java/com/mysema/query/collections/CollQueryTemplates.java
ff2476c8c44dc226219e2012cd3c85bb57114097
[]
no_license
clee-r7/querydsl
ec98ffbd19b804517f75f73935048edcd2b269b3
8e154e5b66fa4e7af86b5335f6a3092ee7bc65e4
refs/heads/master
2021-01-16T22:42:48.919069
2013-07-09T16:29:35
2013-07-09T16:29:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,730
java
/* * Copyright 2011, Mysema Ltd * * 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.mysema.query.collections; import com.mysema.query.types.JavaTemplates; import com.mysema.query.types.Ops; import com.mysema.query.types.PathType; /** * CollQueryTemplates extends {@link JavaTemplates} to add module specific operation * templates. * * @author tiwe */ public class CollQueryTemplates extends JavaTemplates { public static final CollQueryTemplates DEFAULT = new CollQueryTemplates(); protected CollQueryTemplates() { String functions = CollQueryFunctions.class.getName(); add(Ops.EQ, "{0}.equals({1})"); add(Ops.NE, "!{0}.equals({1})"); add(Ops.INSTANCE_OF, "{1}.isInstance({0})"); // Comparable add(Ops.GT, "{0}.compareTo({1}) > 0"); add(Ops.LT, "{0}.compareTo({1}) < 0"); add(Ops.GOE, "{0}.compareTo({1}) >= 0"); add(Ops.LOE, "{0}.compareTo({1}) <= 0"); add(Ops.BETWEEN, functions + ".between({0},{1},{2})"); add(Ops.STRING_CAST, "String.valueOf({0})"); // Number add(Ops.MathOps.COT, functions + ".cot({0})"); add(Ops.MathOps.COTH, functions + ".coth({0})"); add(Ops.MathOps.DEG, functions + ".degrees({0})"); add(Ops.MathOps.LN, "Math.log({0})"); add(Ops.MathOps.LOG, functions + ".log({0},{1})"); add(Ops.MathOps.RAD, functions + ".radians({0})"); add(Ops.MathOps.SIGN, "{0} > 0 ? 1 : -1"); add(Ops.ADD, "{0}.add({1})"); add(Ops.SUB, "{0}.subtract({1})"); add(Ops.MULT, "{0}.multiply({1})"); add(Ops.DIV, "{0}.divide({1})"); // Date and Time add(Ops.DateTimeOps.YEAR, functions + ".getYear({0})"); add(Ops.DateTimeOps.MONTH, functions + ".getMonth({0})"); add(Ops.DateTimeOps.WEEK, functions + ".getWeek({0})"); add(Ops.DateTimeOps.DAY_OF_WEEK, functions + ".getDayOfWeek({0})"); add(Ops.DateTimeOps.DAY_OF_MONTH, functions + ".getDayOfMonth({0})"); add(Ops.DateTimeOps.DAY_OF_YEAR, functions + ".getDayOfYear({0})"); add(Ops.DateTimeOps.HOUR, functions + ".getHour({0})"); add(Ops.DateTimeOps.MINUTE, functions + ".getMinute({0})"); add(Ops.DateTimeOps.SECOND, functions + ".getSecond({0})"); add(Ops.DateTimeOps.MILLISECOND, functions + ".getMilliSecond({0})"); add(Ops.DateTimeOps.YEAR_WEEK, functions + ".getYearWeek({0})"); // String add(Ops.LIKE, functions + ".like({0},{1})"); add(Ops.LIKE_ESCAPE, functions + ".like({0},{1},{2})"); // Path types for (PathType type : new PathType[] { PathType.LISTVALUE, PathType.MAPVALUE, PathType.MAPVALUE_CONSTANT }) { add(type, "{0}.get({1})"); } add(PathType.LISTVALUE_CONSTANT, "{0}.get({1})"); add(PathType.ARRAYVALUE, "{0}[{1}]"); add(PathType.ARRAYVALUE_CONSTANT, "{0}[{1}]"); add(PathType.COLLECTION_ANY, "{0}_any"); // coalesce add(Ops.COALESCE, functions + ".coalesce({0})"); add(Ops.NULLIF, functions + ".nullif({0}, {1})"); } }
[ "timo.westkamper@mysema.com" ]
timo.westkamper@mysema.com
e20882ed90a38c7f5028f5871878a884fc286db0
562143b65f53cfa2ae485866b4214a628084f2cd
/app/src/main/java/com/eleganz/msafiri/utils/HistoryData.java
03f127ad277d3adc62e971bfeb66f458d98ce9c1
[]
no_license
ritueleganzit/MSafiri-2
3e8b603542550209e7d2ad80dae95476c127e1d8
8ecf2c5a7bc415a53965b82f03b2a799fdf8312a
refs/heads/master
2020-05-15T05:16:28.523353
2019-04-18T14:24:19
2019-04-18T14:24:19
182,102,542
0
0
null
null
null
null
UTF-8
Java
false
false
5,556
java
package com.eleganz.msafiri.utils; import java.io.Serializable; /** * Created by eleganz on 4/1/19. */ public class HistoryData implements Serializable { String driver_id,trip_id,rating,comments,user_trip_status,status,from_title,from_lat,from_lng,from_address , to_title,to_lat,to_lng,to_address,end_datetime,last_lat,last_lng,date,fullname,photo,vehicle_name,trip_price,calculate_time,trip_screenshot; public String getTrip_screenshot() { return trip_screenshot; } public void setTrip_screenshot(String trip_screenshot) { this.trip_screenshot = trip_screenshot; } public HistoryData(String driver_id, String trip_id, String rating, String comments, String user_trip_status, String status, String from_title, String from_lat, String from_lng, String from_address, String to_title, String to_lat, String to_lng, String to_address, String end_datetime, String last_lat, String last_lng, String fullname, String photo, String vehicle_name, String trip_price, String calculate_time, String trip_screenshot) { this.driver_id = driver_id; this.trip_id = trip_id; this.rating = rating; this.comments = comments; this.user_trip_status = user_trip_status; this.status = status; this.from_title = from_title; this.from_lat = from_lat; this.from_lng = from_lng; this.from_address = from_address; this.to_title = to_title; this.to_lat = to_lat; this.to_lng = to_lng; this.to_address = to_address; this.end_datetime = end_datetime; this.last_lat = last_lat; this.last_lng = last_lng; this.fullname = fullname; this.photo = photo; this.vehicle_name = vehicle_name; this.trip_price = trip_price; this.calculate_time = calculate_time; this.trip_screenshot = trip_screenshot; } public String getCalculate_time() { return calculate_time; } public void setCalculate_time(String calculate_time) { this.calculate_time = calculate_time; } public String getTrip_price() { return trip_price; } public void setTrip_price(String trip_price) { this.trip_price = trip_price; } public String getVehicle_name() { return vehicle_name; } public void setVehicle_name(String vehicle_name) { this.vehicle_name = vehicle_name; } public String getFullname() { return fullname; } public void setFullname(String fullname) { this.fullname = fullname; } public String getPhoto() { return photo; } public void setPhoto(String photo) { this.photo = photo; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getDriver_id() { return driver_id; } public void setDriver_id(String driver_id) { this.driver_id = driver_id; } public String getTrip_id() { return trip_id; } public void setTrip_id(String trip_id) { this.trip_id = trip_id; } public String getRating() { return rating; } public void setRating(String rating) { this.rating = rating; } public String getComments() { return comments; } public void setComments(String comments) { this.comments = comments; } public String getUser_trip_status() { return user_trip_status; } public void setUser_trip_status(String user_trip_status) { this.user_trip_status = user_trip_status; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getFrom_title() { return from_title; } public void setFrom_title(String from_title) { this.from_title = from_title; } public String getFrom_lat() { return from_lat; } public void setFrom_lat(String from_lat) { this.from_lat = from_lat; } public String getFrom_lng() { return from_lng; } public void setFrom_lng(String from_lng) { this.from_lng = from_lng; } public String getFrom_address() { return from_address; } public void setFrom_address(String from_address) { this.from_address = from_address; } public String getTo_title() { return to_title; } public void setTo_title(String to_title) { this.to_title = to_title; } public String getTo_lat() { return to_lat; } public void setTo_lat(String to_lat) { this.to_lat = to_lat; } public String getTo_lng() { return to_lng; } public void setTo_lng(String to_lng) { this.to_lng = to_lng; } public String getTo_address() { return to_address; } public void setTo_address(String to_address) { this.to_address = to_address; } public String getEnd_datetime() { return end_datetime; } public void setEnd_datetime(String end_datetime) { this.end_datetime = end_datetime; } public String getLast_lat() { return last_lat; } public void setLast_lat(String last_lat) { this.last_lat = last_lat; } public String getLast_lng() { return last_lng; } public void setLast_lng(String last_lng) { this.last_lng = last_lng; } }
[ "ritu.eleganzit@gmail.com" ]
ritu.eleganzit@gmail.com
d4d3fc63cbaae66464a181b41ff45870ef43bac0
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/retailcloud-20180313/src/main/java/com/aliyun/retailcloud20180313/models/ListAppResponse.java
4cf8ef238a3d97cbd5f8cde228aaf42f8194b265
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,295
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.retailcloud20180313.models; import com.aliyun.tea.*; public class ListAppResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public ListAppResponseBody body; public static ListAppResponse build(java.util.Map<String, ?> map) throws Exception { ListAppResponse self = new ListAppResponse(); return TeaModel.build(map, self); } public ListAppResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public ListAppResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public ListAppResponse setBody(ListAppResponseBody body) { this.body = body; return this; } public ListAppResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
d40ac2906bfb948bd110b453997c99df2715ec9c
5d473a369790a6ce6e02788bfa22bc7e6858fa08
/org/apache/catalina/util/ManifestResource.java
8df6807695084591947acb03c660e7123d1339e8
[]
no_license
toby941/tomcat
a187a3d676b7544f7607c364dedbef6d0bfa0821
2e6f458470ef0671905aed3ba2e8c998e0ff33cd
refs/heads/master
2021-01-23T07:21:41.388214
2013-09-14T04:02:38
2013-09-14T04:02:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,131
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.catalina.util; import java.util.Iterator; import java.util.jar.Manifest; import java.util.jar.Attributes; import java.util.ArrayList; /** * Representation of a Manifest file and its available extensions and * required extensions * * @author Greg Murray * @author Justyna Horwat * @version $Id: ManifestResource.java 939353 2010-04-29 15:50:43Z kkolinko $ * */ public class ManifestResource { // ------------------------------------------------------------- Properties // These are the resource types for determining effect error messages public static final int SYSTEM = 1; public static final int WAR = 2; public static final int APPLICATION = 3; private ArrayList availableExtensions = null; private ArrayList requiredExtensions = null; private String resourceName = null; private int resourceType = -1; public ManifestResource(String resourceName, Manifest manifest, int resourceType) { this.resourceName = resourceName; this.resourceType = resourceType; processManifest(manifest); } /** * Gets the name of the resource * * @return The name of the resource */ public String getResourceName() { return resourceName; } /** * Gets the list of available extensions * * @return List of available extensions */ public ArrayList getAvailableExtensions() { return availableExtensions; } /** * Gets the list of required extensions * * @return List of required extensions */ public ArrayList getRequiredExtensions() { return requiredExtensions; } // --------------------------------------------------------- Public Methods /** * Gets the number of available extensions * * @return The number of available extensions */ public int getAvailableExtensionCount() { return (availableExtensions != null) ? availableExtensions.size() : 0; } /** * Gets the number of required extensions * * @return The number of required extensions */ public int getRequiredExtensionCount() { return (requiredExtensions != null) ? requiredExtensions.size() : 0; } /** * Convienience method to check if this <code>ManifestResource</code> * has an requires extensions. * * @return true if required extensions are present */ public boolean requiresExtensions() { return (requiredExtensions != null) ? true : false; } /** * Returns <code>true</code> if all required extension dependencies * have been meet for this <code>ManifestResource</code> object. * * @return boolean true if all extension dependencies have been satisfied */ public boolean isFulfilled() { if (requiredExtensions == null) { return true; } Iterator it = requiredExtensions.iterator(); while (it.hasNext()) { Extension ext = (Extension)it.next(); if (!ext.isFulfilled()) return false; } return true; } @Override public String toString() { StringBuffer sb = new StringBuffer("ManifestResource["); sb.append(resourceName); sb.append(", isFulfilled="); sb.append(isFulfilled() +""); sb.append(", requiredExtensionCount ="); sb.append(getRequiredExtensionCount()); sb.append(", availableExtensionCount="); sb.append(getAvailableExtensionCount()); switch (resourceType) { case SYSTEM : sb.append(", resourceType=SYSTEM"); break; case WAR : sb.append(", resourceType=WAR"); break; case APPLICATION : sb.append(", resourceType=APPLICATION"); break; } sb.append("]"); return (sb.toString()); } // -------------------------------------------------------- Private Methods private void processManifest(Manifest manifest) { availableExtensions = getAvailableExtensions(manifest); requiredExtensions = getRequiredExtensions(manifest); } /** * Return the set of <code>Extension</code> objects representing optional * packages that are required by the application associated with the * specified <code>Manifest</code>. * * @param manifest Manifest to be parsed * * @return List of required extensions, or null if the application * does not require any extensions */ private ArrayList getRequiredExtensions(Manifest manifest) { Attributes attributes = manifest.getMainAttributes(); String names = attributes.getValue("Extension-List"); if (names == null) return null; ArrayList extensionList = new ArrayList(); names += " "; while (true) { int space = names.indexOf(' '); if (space < 0) break; String name = names.substring(0, space).trim(); names = names.substring(space + 1); String value = attributes.getValue(name + "-Extension-Name"); if (value == null) continue; Extension extension = new Extension(); extension.setExtensionName(value); extension.setImplementationURL (attributes.getValue(name + "-Implementation-URL")); extension.setImplementationVendorId (attributes.getValue(name + "-Implementation-Vendor-Id")); String version = attributes.getValue(name + "-Implementation-Version"); extension.setImplementationVersion(version); extension.setSpecificationVersion (attributes.getValue(name + "-Specification-Version")); extensionList.add(extension); } return extensionList; } /** * Return the set of <code>Extension</code> objects representing optional * packages that are bundled with the application associated with the * specified <code>Manifest</code>. * * @param manifest Manifest to be parsed * * @return List of available extensions, or null if the web application * does not bundle any extensions */ private ArrayList getAvailableExtensions(Manifest manifest) { Attributes attributes = manifest.getMainAttributes(); String name = attributes.getValue("Extension-Name"); if (name == null) return null; ArrayList extensionList = new ArrayList(); Extension extension = new Extension(); extension.setExtensionName(name); extension.setImplementationURL( attributes.getValue("Implementation-URL")); extension.setImplementationVendor( attributes.getValue("Implementation-Vendor")); extension.setImplementationVendorId( attributes.getValue("Implementation-Vendor-Id")); extension.setImplementationVersion( attributes.getValue("Implementation-Version")); extension.setSpecificationVersion( attributes.getValue("Specification-Version")); extensionList.add(extension); return extensionList; } }
[ "toby941@gmail.com" ]
toby941@gmail.com
54085c1761a9f54f04c0eff395db98ae4fa0c403
fd9da616c35dff8ed32730ef4db3e768de33cdf7
/src/gen/java/io/swagger/model/Event.java
69fc07a7108990b6aa3aee2442477d6acdea45db
[]
no_license
gythialy/sonata4j
7a92282e7e5caf7655f3785a550df83024613673
12b8e74b4dc8d1230f82122f29d8d4f9361b869b
refs/heads/master
2022-06-23T09:43:53.262799
2020-05-09T04:01:11
2020-05-09T04:01:11
262,467,256
0
0
null
null
null
null
UTF-8
Java
false
false
3,236
java
package io.swagger.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.NotNull; import java.util.Date; import java.util.Objects; @ApiModel(description = "Event class is used to describe information structure used for notification.") @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaResteasyEapServerCodegen", date = "2020-05-09T02:18:19.320Z") public class Event { private ProductOrderEvent event = null; private String eventId = null; private Date eventTime = null; private ProductOrderEventType eventType = null; /** * **/ @ApiModelProperty(required = true, value = "") @JsonProperty("event") @NotNull public ProductOrderEvent getEvent() { return event; } public void setEvent(ProductOrderEvent event) { this.event = event; } /** * **/ @ApiModelProperty(required = true, value = "") @JsonProperty("eventId") @NotNull public String getEventId() { return eventId; } public void setEventId(String eventId) { this.eventId = eventId; } /** * **/ @ApiModelProperty(required = true, value = "") @JsonProperty("eventTime") @NotNull public Date getEventTime() { return eventTime; } public void setEventTime(Date eventTime) { this.eventTime = eventTime; } /** * **/ @ApiModelProperty(required = true, value = "") @JsonProperty("eventType") @NotNull public ProductOrderEventType getEventType() { return eventType; } public void setEventType(ProductOrderEventType eventType) { this.eventType = eventType; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Event event = (Event) o; return Objects.equals(event, event.event) && Objects.equals(eventId, event.eventId) && Objects.equals(eventTime, event.eventTime) && Objects.equals(eventType, event.eventType); } @Override public int hashCode() { return Objects.hash(event, eventId, eventTime, eventType); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Event {\n"); sb.append(" event: ").append(toIndentedString(event)).append("\n"); sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); sb.append(" eventTime: ").append(toIndentedString(eventTime)).append("\n"); sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "gythialy.koo+github@gmail.com" ]
gythialy.koo+github@gmail.com
e78e8a78f3fa5c906a163724d5d248e0d16038c6
beb7b090b088406c741e22548b53b43f473e68ea
/src/main/java/de/mxro/utils/log/impl/SwtUserErrorDialog.java
5f9697b477fdf9838b2c061a0ebde58cccf446c4
[]
no_license
mxro/mxUtilities
4b4dffe0bf83044a410e08bd4257cc8a1f33be01
d35bf35f48d9190d81b6a006b9d03ab5ae055e0e
refs/heads/master
2016-09-03T04:07:49.528852
2015-07-27T05:40:25
2015-07-27T05:40:25
14,198,077
0
0
null
null
null
null
UTF-8
Java
false
false
2,345
java
package de.mxro.utils.log.impl; import java.awt.BorderLayout; import java.awt.Frame; import java.awt.HeadlessException; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.JTextPane; public class SwtUserErrorDialog extends JDialog { private static final long serialVersionUID = 1L; private JPanel jContentPane = null; private JTextPane jTextPaneError = null; private JButton jButtonOk = null; public void ready() { this.setVisible(false); //this. } public SwtUserErrorDialog(boolean modal, Frame owner, SwtUserError swtError, String message, String debugInfo) throws HeadlessException { super(owner, modal); this.initialize(); this.jTextPaneError.setText(message); } /** * @param owner */ public SwtUserErrorDialog(Frame owner) { super(owner); this.initialize(); } /** * This method initializes this * * @return void */ private void initialize() { this.setSize(326, 193); this.setTitle("Error"); this.setContentPane(this.getJContentPane()); } /** * This method initializes jContentPane * * @return javax.swing.JPanel */ private JPanel getJContentPane() { if (this.jContentPane == null) { this.jContentPane = new JPanel(); this.jContentPane.setLayout(new BorderLayout()); this.jContentPane.add(this.getJTextPaneError(), BorderLayout.CENTER); this.jContentPane.add(this.getJButtonOk(), BorderLayout.SOUTH); } return this.jContentPane; } /** * This method initializes jTextPaneError * * @return javax.swing.JTextPane */ private JTextPane getJTextPaneError() { if (this.jTextPaneError == null) { this.jTextPaneError = new JTextPane(); } return this.jTextPaneError; } /** * This method initializes jButtonOk * * @return javax.swing.JButton */ private JButton getJButtonOk() { if (this.jButtonOk == null) { this.jButtonOk = new JButton(); this.jButtonOk.setText("Okay"); this.jButtonOk.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { SwtUserErrorDialog.this.ready(); } }); } return this.jButtonOk; } } // @jve:decl-index=0:visual-constraint="146,67"
[ "mxro@nowhere.com" ]
mxro@nowhere.com
f1edcd00d1d31eaf19bc238dcb4419d1e81f8319
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/emoji/sync/c$a.java
736988226d28e559126e86cb4dda982d6630ae60
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
138
java
package com.tencent.mm.plugin.emoji.sync; public class c$a implements c { public void aEZ() { } public void aFa() { } }
[ "707194831@qq.com" ]
707194831@qq.com
9a8b32972999e70edabcac59c2e6c904bf07cea4
03e214ef1943b9500d1666e4c98f021005fcc4df
/src/main/java/m2/s11/Arithmetic.java
8f0a1d921fc1789c9f6f529556dcecb08be8664a
[]
no_license
Stefano2107/mpjp
496a61f30571b20b6acb6569b36d187339d2fed2
b74aa20ca9db279f70cbd0e1141b124a8ccf3ea5
refs/heads/master
2022-08-29T22:08:19.601401
2020-05-27T09:54:09
2020-05-27T09:54:09
267,278,797
0
1
null
2020-05-27T09:37:01
2020-05-27T09:37:00
null
UTF-8
Java
false
false
674
java
package m2.s11; public class Arithmetic { public static void main(String[] args) { int a = 10; int b = 3; System.out.println(a + b); // 13 System.out.println(a - b); // 7 System.out.println(a * b); // 30 System.out.println(a / b); // 3 System.out.println(a % b); // 1 // System.out.println(a / 0); // ArithmeticException double c = 3.0; System.out.println(a + c); // 13.0 System.out.println(a / c); // 3.3333333333333335 System.out.println(a % c); // 1.0 System.out.println(c - 2.1); // 0.8999999999999999 System.out.println(c / 0); // Infinity } }
[ "egalli64@gmail.com" ]
egalli64@gmail.com
4ae5fb5ac1c3d6b378ebc9acaf408ace42d5a406
542e78ed5a5fb6074e83f8b1afbf5a9165988a79
/bin/custom/training/trainingfulfilmentprocess/src/com/training/fulfilmentprocess/exceptions/PaymentMethodException.java
a2ebeb3c3215ea6b7055425606972ec914434684
[]
no_license
VladislawL/hybris-commerce-trails
49d08b6639520a5e71273132b2761b5f27ddc114
a1ce4ae00952077bf23a78a64162a375cb50f1a1
refs/heads/master
2022-12-27T19:39:27.514634
2020-10-06T08:25:13
2020-10-06T08:25:13
299,559,346
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package com.training.fulfilmentprocess.exceptions; /** * */ public class PaymentMethodException extends RuntimeException { /** * * @param message */ public PaymentMethodException(final String message) { super(message); } }
[ "vladislaw.logvin@yandex.ru" ]
vladislaw.logvin@yandex.ru
e56ea95fa47a833b2f865af5437582ff039bf8ee
c94f888541c0c430331110818ed7f3d6b27b788a
/deps/java/src/main/java/com/antgroup/antchain/openapi/deps/models/QueryBgreleaseArrangementprogressResponse.java
b4f19c562113fc09d9c2b4b099b99fd0aed5646e
[ "MIT", "Apache-2.0" ]
permissive
alipay/antchain-openapi-prod-sdk
48534eb78878bd708a0c05f2fe280ba9c41d09ad
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
refs/heads/master
2023-09-03T07:12:04.166131
2023-09-01T08:56:15
2023-09-01T08:56:15
275,521,177
9
10
MIT
2021-03-25T02:35:20
2020-06-28T06:22:14
PHP
UTF-8
Java
false
false
1,812
java
// This file is auto-generated, don't edit it. Thanks. package com.antgroup.antchain.openapi.deps.models; import com.aliyun.tea.*; public class QueryBgreleaseArrangementprogressResponse extends TeaModel { // 请求唯一ID,用于链路跟踪和问题排查 @NameInMap("req_msg_id") public String reqMsgId; // 结果码,一般OK表示调用成功 @NameInMap("result_code") public String resultCode; // 异常信息的文本描述 @NameInMap("result_msg") public String resultMsg; // 进度 @NameInMap("progresses") public java.util.List<String> progresses; public static QueryBgreleaseArrangementprogressResponse build(java.util.Map<String, ?> map) throws Exception { QueryBgreleaseArrangementprogressResponse self = new QueryBgreleaseArrangementprogressResponse(); return TeaModel.build(map, self); } public QueryBgreleaseArrangementprogressResponse setReqMsgId(String reqMsgId) { this.reqMsgId = reqMsgId; return this; } public String getReqMsgId() { return this.reqMsgId; } public QueryBgreleaseArrangementprogressResponse setResultCode(String resultCode) { this.resultCode = resultCode; return this; } public String getResultCode() { return this.resultCode; } public QueryBgreleaseArrangementprogressResponse setResultMsg(String resultMsg) { this.resultMsg = resultMsg; return this; } public String getResultMsg() { return this.resultMsg; } public QueryBgreleaseArrangementprogressResponse setProgresses(java.util.List<String> progresses) { this.progresses = progresses; return this; } public java.util.List<String> getProgresses() { return this.progresses; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
8c222d9ad19daf61cc391ac04fae801effb0d929
87c3c335023681d1c906892f96f3a868b3a6ee8e
/HTML5/dev/simplivity-citrixplugin-service/src/main/java/com/vmware/vim25/SecondaryVmNotRegistered.java
25b52d780366819a2f3de2a163a2faf1063e8970
[ "Apache-2.0" ]
permissive
HewlettPackard/SimpliVity-Citrix-VCenter-Plugin
19d2b7655b570d9515bf7e7ca0cf1c823cbf5c61
504cbeec6fce27a4b6b23887b28d6a4e85393f4b
refs/heads/master
2023-08-09T08:37:27.937439
2020-04-30T06:15:26
2020-04-30T06:15:26
144,329,090
0
1
Apache-2.0
2020-04-07T07:27:53
2018-08-10T20:24:34
Java
UTF-8
Java
false
false
720
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2019.06.12 at 09:16:35 AM EDT // package com.vmware.vim25; /** * */ @SuppressWarnings("all") public class SecondaryVmNotRegistered extends VmFaultToleranceIssue { public String instanceUuid; public String getInstanceUuid() { return instanceUuid; } public void setInstanceUuid(String instanceUuid) { this.instanceUuid = instanceUuid; } }
[ "anuanusha471@gmail.com" ]
anuanusha471@gmail.com
0b51a8e3202ca4adeb97dcf570123efa9ae52e33
0b85e873533b87ad235934118b7c80429f5a913b
/Dev Framework/springboot/mybatis_plus/src/main/java/com/qitong/config/MybatisPlusConfig.java
6dcb543057680108a0923e5986659d49e1085ac7
[]
no_license
lqt1401737962/Java-Notes
0eeed847d45957b0e8f5d2017287238eea910e62
9ceb16dd89fe9343fd80cf5a861fe6da5e502b07
refs/heads/master
2022-08-05T21:43:04.183997
2021-04-06T09:04:26
2021-04-06T09:04:26
228,815,761
0
0
null
2022-06-21T04:16:04
2019-12-18T10:28:35
Java
UTF-8
Java
false
false
1,762
java
package com.qitong.config; import com.baomidou.mybatisplus.core.injector.ISqlInjector; import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector; import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor; import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; import com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor; import org.mybatis.spring.annotation.MapperScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.transaction.annotation.EnableTransactionManagement; @MapperScan("com.qitong.mapper") @EnableTransactionManagement //开启事务管理 @Configuration public class MybatisPlusConfig { // 注册乐观锁插件 @Bean public OptimisticLockerInterceptor optimisticLockerInterceptor() { return new OptimisticLockerInterceptor(); } // 分页插件 @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); } // 逻辑删除组件! @Bean public ISqlInjector sqlInjector() { return new LogicSqlInjector(); } /** * SQL执行效率插件 */ @Bean @Profile({"dev","test"})// 设置 dev test 环境开启,保证我们的效率 public PerformanceInterceptor performanceInterceptor() { PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor(); performanceInterceptor.setMaxTime(100); // ms设置sql执行的最大时间,如果超过了则不执行 performanceInterceptor.setFormat(true); // 是否格式化代码 return performanceInterceptor; } }
[ "1401737962@qq.com" ]
1401737962@qq.com
abe711bdb68800c0ba5b3702da84e4fdca2df28b
89e390281f856f0231ef2969f6f0d38169f9372e
/j2ee/RestfulApiTest/src/java/com/huasoft/provider/JacksonSerializeExceptionMapper.java
0023353c8bf32d23834a029a8eaf0b1a3334198e
[]
no_license
koalhou/java_jiaoxue
a5f10d8514b8ea55c50c04f9c9b3c9e63a57e2fb
b52170f57bce8d30fcac1631ce389bd39865c1c6
refs/heads/master
2021-01-10T08:28:14.708187
2015-11-04T02:10:00
2015-11-04T02:10:00
44,717,321
0
0
null
null
null
null
UTF-8
Java
false
false
990
java
package com.huasoft.provider; import javax.ws.rs.Produces; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.huasoft.common.ErrorConstant; import com.huasoft.common.HttpConstant; import com.huasoft.common.ModCommonConstant; import com.huasoft.exceptions.JacksonSerializeException; @Provider @Produces({ HttpConstant.MEDIATYPE_JSON_UTF_8 }) public class JacksonSerializeExceptionMapper implements ExceptionMapper<JacksonSerializeException> { /** * 日志记录器. */ private static Logger logger = LoggerFactory.getLogger(ModCommonConstant.LOGGER_NAME); @Override public Response toResponse(JacksonSerializeException e) { logger.error("将实体内容序列化为JSON字符串时出错", e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ErrorConstant.ERROR90000.toJson()).build(); } }
[ "houjunhu_2009@163.com" ]
houjunhu_2009@163.com
6cdf1fafb872525304e5e6f011cd1b833a28302e
899a427a903148d0d26e903faf8021b94b126911
/11-Binary-Tree/3-Advance/0652-find-duplicate-subtrees/src/Solution.java
c59e597abbb44b20d8e2200aa5a2a1673b5eeb19
[ "Apache-2.0" ]
permissive
liweiwei1419/LeetCode-Solutions-in-Good-Style
033ab69b93fa2d294ab6a08c8b9fbcff6d32a178
acc8661338cc7c1ae067915fb16079a9e3e66847
refs/heads/master
2022-07-27T15:24:57.717791
2021-12-19T03:11:02
2021-12-19T03:11:02
161,101,415
2,016
351
Apache-2.0
2022-01-07T10:38:35
2018-12-10T01:50:09
Java
UTF-8
Java
false
false
838
java
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class Solution { public List<TreeNode> findDuplicateSubtrees(TreeNode root) { Map<String, Integer> map = new HashMap<>(); List<TreeNode> res = new ArrayList<>(); dfs(root, map, res); return res; } private String dfs(TreeNode node, Map<String, Integer> map, List<TreeNode> res) { if (node == null) { return ""; } // 前序遍历 String curStr = ""; curStr += node.val + ","; curStr += dfs(node.left, map, res) + ","; curStr += dfs(node.right, map, res); map.put(curStr, map.getOrDefault(curStr, 0) + 1); if (map.get(curStr) == 2) { res.add(node); } return curStr; } }
[ "liweiwei1419@gmail.com" ]
liweiwei1419@gmail.com
1dd25fe95a41d964fa878eada4393bf27df9b90f
5a2b265183d8bb7170d0ace4e4449a2d3a3adfa3
/extensions/training/trainingfulfilmentprocess/src/com/epam/training/fulfilmentprocess/warehouse/MockProcess2WarehouseAdapter.java
7821622eb62b031c82ed82f9b7762183ea8d0ef9
[]
no_license
studenthybris/study_project
5401f6800030f3592ac0aa8ab9ce72b9ec1ac68c
8b30e2a422929af008075a3670e0ac1c04c67bb2
refs/heads/master
2021-05-14T07:40:44.418472
2018-01-23T14:45:32
2018-01-23T14:45:32
116,271,960
0
0
null
null
null
null
UTF-8
Java
false
false
4,166
java
/* * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package com.epam.training.fulfilmentprocess.warehouse; import de.hybris.platform.basecommerce.enums.ConsignmentStatus; import de.hybris.platform.commerceservices.model.PickUpDeliveryModeModel; import de.hybris.platform.core.PK; import de.hybris.platform.core.Registry; import de.hybris.platform.ordersplitting.model.ConsignmentEntryModel; import de.hybris.platform.ordersplitting.model.ConsignmentModel; import de.hybris.platform.servicelayer.model.ModelService; import de.hybris.platform.servicelayer.time.TimeService; import de.hybris.platform.warehouse.Process2WarehouseAdapter; import de.hybris.platform.warehouse.Warehouse2ProcessAdapter; import de.hybris.platform.warehouse.WarehouseConsignmentStatus; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Required; public class MockProcess2WarehouseAdapter implements Process2WarehouseAdapter { private static final Logger LOG = Logger.getLogger(MockProcess2WarehouseAdapter.class); private ModelService modelService; private Warehouse2ProcessAdapter warehouse2ProcessAdapter; private TimeService timeService; @Override public void prepareConsignment(final ConsignmentModel consignment) { for (final ConsignmentEntryModel consignmentEntries : consignment.getConsignmentEntries()) { consignmentEntries.setShippedQuantity(consignmentEntries.getQuantity()); } consignment.setStatus(ConsignmentStatus.READY); getModelService().save(consignment); final Thread warehouse = new Thread(new Warehouse(Registry.getCurrentTenant().getTenantID(), consignment.getPk() .getLongValue())); warehouse.start(); try { Thread.sleep(3000); } catch (final InterruptedException e) { //nothing to do } } public class Warehouse implements Runnable { private final long consignment; private final String tenant; public Warehouse(final String tenant, final long consignment) { super(); this.consignment = consignment; this.tenant = tenant; } @Override public void run() { Registry.setCurrentTenant(Registry.getTenantByID(tenant)); try { final ConsignmentModel model = getModelService().get(PK.fromLong(consignment)); getWarehouse2ProcessAdapter().receiveConsignmentStatus(model, WarehouseConsignmentStatus.COMPLETE); } finally { Registry.unsetCurrentTenant(); } } } @Override public void shipConsignment(final ConsignmentModel consignment) { if (consignment == null) { LOG.error("No consignment to ship"); } else { if (consignment.getDeliveryMode() instanceof PickUpDeliveryModeModel) { consignment.setStatus(ConsignmentStatus.READY_FOR_PICKUP); } else { consignment.setStatus(ConsignmentStatus.SHIPPED); } consignment.setShippingDate(getTimeService().getCurrentTime()); for (final ConsignmentEntryModel entry : consignment.getConsignmentEntries()) { entry.setShippedQuantity(entry.getOrderEntry().getQuantity()); getModelService().save(entry); } getModelService().save(consignment); if (LOG.isInfoEnabled()) { LOG.info("Consignment [" + consignment.getCode() + "] shipped"); } } } @Required public void setModelService(final ModelService modelService) { this.modelService = modelService; } protected ModelService getModelService() { return modelService; } @Required public void setWarehouse2ProcessAdapter(final Warehouse2ProcessAdapter warehouse2ProcessAdapter) { this.warehouse2ProcessAdapter = warehouse2ProcessAdapter; } protected Warehouse2ProcessAdapter getWarehouse2ProcessAdapter() { return warehouse2ProcessAdapter; } public void setTimeService(final TimeService timeService) { this.timeService = timeService; } protected TimeService getTimeService() { return timeService; } }
[ "Oleksandr_Bohdan@epam.com" ]
Oleksandr_Bohdan@epam.com
c328e01cca99cd7fc43298b48b7c1e5c63f378cb
85ce3a70a4bcfb824833053a2d5ab78e5870dc4d
/IdeaProjects/rbac2_template/src/main/java/cn/wolfcode/rbac/check/SecurityInerceptor.java
a2cfd8a574541ede1f68138a79170b4e44dcfada
[]
no_license
qyl1006/Hello_World
87e4aef81874cef1ddd5cd0d7278ac56c8f8bb19
be81d9e957d4e81e3d2097ac7ab9ae7ba1a620af
refs/heads/master
2020-03-08T03:14:44.053205
2018-05-18T02:31:16
2018-05-18T02:31:16
127,881,971
0
0
null
null
null
null
UTF-8
Java
false
false
1,756
java
package cn.wolfcode.rbac.check; import cn.wolfcode.rbac.domain.Employee; import cn.wolfcode.rbac.util.PermissionUtil; import cn.wolfcode.rbac.util.RequiredPermission; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.lang.reflect.Method; import java.util.List; //安全拦截器 public class SecurityInerceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { HttpSession session = request.getSession(); //得到当前用户信息 Employee emp = (Employee) session.getAttribute("emp_in_session"); //超级管理员 if (emp.isAdmin()){ return true; } //拿到当前被访问的方法对象 HandlerMethod hm = (HandlerMethod) handler; Method m = hm.getMethod(); //判断当前方法是否需要权限 //该方法不需要, 直接放行 if (!m.isAnnotationPresent(RequiredPermission.class)){ return true; } //判断当前用户是否拥有执行的权限 String exp = PermissionUtil.builExpression(m); List<String> exps = (List<String>) session.getAttribute("exps_in_session"); if(exps.contains(exp)){ return true; } //没有权限跳转页页面 request.getRequestDispatcher("/WEB-INF/views/common/nopermission.jsp") .forward(request,response); return false; } }
[ "yuelinshi@qq.com" ]
yuelinshi@qq.com
0fd634dec1d4b0b178c7b6ec3fe2279b2e616328
dd674d74a7bba206c7f17b612c0a573dfc211445
/leetcode/src/com/app/augustchallenge/GoatLatin.java
04252635cd1a3d1f7e1c37102670dcb417553f75
[]
no_license
TanayaKarmakar/ds_algo
3f2ea4de9876922b007ae8dc3f9b5a406052d49d
26344e9e4b5d76367355c3ec39c04550ccccb9b1
refs/heads/master
2021-06-23T02:28:32.446005
2021-05-21T01:41:06
2021-05-21T01:41:06
217,259,241
0
0
null
null
null
null
UTF-8
Java
false
false
1,024
java
package com.app.augustchallenge; import java.util.Scanner; public class GoatLatin { private static boolean isVowel(char ch) { return (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' || ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U'); } private static String toGoatLatin(String S) { String[] arr = S.split("\\s+"); StringBuilder lastPartSb = new StringBuilder(); lastPartSb.append("maa"); StringBuilder respSb = new StringBuilder(); for(String str: arr) { String newStr; if(isVowel(str.charAt(0))) newStr = str; else newStr = str.substring(1) + str.charAt(0); newStr = newStr + lastPartSb.toString(); respSb.append(newStr); respSb.append(" "); lastPartSb.append("a"); } return respSb.toString(); } public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String text = scanner.nextLine(); String res = toGoatLatin(text); System.out.println(res); scanner.close(); } }
[ "karmakar.tanaya@gmail.com" ]
karmakar.tanaya@gmail.com
ca4a11e4d63168e881cd1a1c10128502782903f9
07abcad3885092aef8abe76e0d78c2296d7fcd1b
/twoFactorClient/src/ext/org/openTwoFactor/clientExt/org/apache/commons/jexl2/parser/ASTAmbiguous.java
f7a3dcffe07d23cd659b761d90d8b5bb5d61b09e
[]
no_license
mchyzer/openTwoFactor
df3acfc07f2f385999bd081eeaf2bfc937ee8ff0
6a62b59d176b13a1bc51a0b60a258cef7ea1012c
refs/heads/master
2023-08-28T19:06:16.817966
2023-08-14T17:30:34
2023-08-14T17:30:34
10,210,206
2
2
null
2021-06-04T01:00:06
2013-05-22T02:42:06
JavaScript
UTF-8
Java
false
false
707
java
/* Generated By:JJTree: Do not edit this line. ASTAmbiguous.java Version 4.3 */ /* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.openTwoFactor.clientExt.org.apache.commons.jexl2.parser; public class ASTAmbiguous extends JexlNode { public ASTAmbiguous(int id) { super(id); } public ASTAmbiguous(Parser p, int id) { super(p, id); } /** Accept the visitor. **/ public Object jjtAccept(ParserVisitor visitor, Object data) { return visitor.visit(this, data); } } /* JavaCC - OriginalChecksum=854bd14b6d25599c386930a38d598263 (do not edit this line) */
[ "mchyzer@yahoo.com" ]
mchyzer@yahoo.com
f38ee0e8e1214cb8d9195ad9cd9e137b85dbee95
43c012a9cdea1df74ddeaf16f7850ccaaedf0782
/DAP/android/reference_wallet/fermat-dap-android-reference-wallet-asset-user/src/main/java/org/fermat/fermat_dap_android_wallet_asset_user/util/CommonLogger.java
6f15d6e76ac2e250f0783542115731ae65c23a57
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
franklinmarcano1970/fermat
ef08d8c46740ac80ebeec96eca85936ce36d3ee8
c5239a0d4c97414881c9baf152243e6311c9afd5
refs/heads/develop
2020-04-07T04:12:39.745585
2016-05-23T21:20:37
2016-05-23T21:20:37
52,887,265
1
22
null
2016-08-23T12:58:03
2016-03-01T15:26:55
Java
UTF-8
Java
false
false
1,467
java
package org.fermat.fermat_dap_android_wallet_asset_user.util; import android.util.Log; import com.bitdubai.android_api.BuildConfig; /** * CommonLogger Utility Class * * @author Francisco Vasquez */ public class CommonLogger { /** * Send Log type info only if the signature is debug type * * @param tag String Tag name * @param msg message to send */ public static void info(String tag, String msg) { if (BuildConfig.DEBUG) { Log.i(tag, msg); } } /** * Send Log type debug only if the signature is debug type * * @param tag String Tag name * @param msg message to send */ public static void debug(String tag, String msg) { if (BuildConfig.DEBUG) { Log.d(tag, msg); } } /** * Send Log type error only if the signature is debug type * * @param tag String Tag name * @param msg message to send */ public static void error(String tag, String msg) { if (BuildConfig.DEBUG) { Log.e(tag, msg); } } /** * Send Log type error only if the signature is debug type * * @param tag String Tag name * @param msg message to send * @param ex Throwable exception to send stackTrace */ public static void exception(String tag, String msg, Throwable ex) { if (BuildConfig.DEBUG) { Log.e(tag, msg, ex); } } }
[ "marsvicam@gmail.com" ]
marsvicam@gmail.com
2ce353fca8346da41a950a410780f47d0d7f2bbe
5b3e1a291d111a8c04d47280477e64ba43ebc5ee
/src/com/ecodation/abstractpaket/MaviKalem.java
f29de95c1f2a6f2f78829868da42eee21893f845
[]
no_license
hamitmizrak/JavaSE-3-12aralik
6f84e4efe3d31c9b762bb8a0f6c1155ec471dad8
9669e341b417d5ae8d816cef455fb9feaa6316a0
refs/heads/master
2023-02-18T07:14:02.553153
2021-01-16T07:01:30
2021-01-16T07:01:30
321,098,156
0
0
null
null
null
null
UTF-8
Java
false
false
175
java
package com.ecodation.abstractpaket; public class MaviKalem extends Kalem { @Override public void methodAdi() { // TODO Auto-generated method stub } }
[ "hamitmizrak@gmail.com" ]
hamitmizrak@gmail.com
9cc255c35c0d687edc8649b217e5692ea861ffa7
e3ae30a49ef1e24584bd07cead0a052167ab6593
/LARAC/src/org/dojo/jsl/parser/ast/ASTGeneratorFunctionExpression.java
b0f46a8ded2bdb6429aa673cf2f405c8abb70ca2
[ "Apache-2.0" ]
permissive
specs-feup/lara-framework
5ca0378caff4acf9a6fb25b9ee560d84eeb45a7d
792f3a68e7c672d7283b174dbee193451b9025f4
refs/heads/master
2023-08-28T07:28:50.813797
2023-07-22T17:12:12
2023-07-22T17:12:12
99,968,191
9
2
Apache-2.0
2023-09-08T17:10:09
2017-08-10T22:00:38
Java
UTF-8
Java
false
false
6,802
java
/* Generated By:JJTree: Do not edit this line. ASTGeneratorFunctionExpression.java Version 4.3 */ /* * JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=false,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=, * NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.dojo.jsl.parser.ast; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import org.w3c.dom.Document; import org.w3c.dom.Element; import larac.objects.Enums.Types; import larac.objects.Variable; public class ASTGeneratorFunctionExpression extends SimpleNode { private LinkedHashMap<String, Variable> args = new LinkedHashMap<>(); private final List<String> params = new ArrayList<>(); private Types myType = Types.GFN; private int pos = 0; private boolean toXML = true; private String funcName = ""; public ASTGeneratorFunctionExpression(int id) { super(id); } public ASTGeneratorFunctionExpression(LARAEcmaScript p, int id) { super(p, id); } @Override public Object organize(Object obj) { if (parent instanceof ASTExpressionStatement) { ((ASTExpressionStatement) parent).insertTag = false; if (!(children[0] instanceof ASTIdentifier)) { throw newException("Cannot declare a function without an identifier."); } funcName = ((ASTIdentifier) children[0]).value.toString(); final Variable var = new Variable(funcName); // var.setInitialize(this); myType = Types.GenFNDecl; var.setType(Types.GenFNDecl); final HashMap<String, Variable> parentVars = ((SimpleNode) parent).getHMVars(); if (parentVars.containsKey(funcName)) { throw newException("Identifier '" + funcName + "' already in use"); } parentVars.put(funcName, var); final ASTFormalParameterList paramList = ((ASTFormalParameterList) children[1]); if (paramList.children != null) { for (final Node argChild : paramList.children) { final String argName = ((ASTIdentifier) argChild).value.toString(); if (args.containsKey(argName)) { throw newException( "Function \"" + funcName + "\" contains variables with the same name: " + argName); } final Variable argVar = new Variable(argName); args.put(argName, argVar); params.add(argName); } } ((SimpleNode) children[2]).organize(obj); ((SimpleNode) children[2]).insertTag = false; toXML = true; } else { if (children[0] instanceof ASTIdentifier) { funcName = ((ASTIdentifier) children[0]).value.toString(); pos++; } final ASTFormalParameterList paramList = ((ASTFormalParameterList) children[pos]); if (paramList.children != null) { for (final Node argChild : paramList.children) { final String argName = ((ASTIdentifier) argChild).value.toString(); if (args.containsKey(argName)) { throw newException("Function expression contains variables with the same name: " + argName); } final Variable argVar = new Variable(argName); args.put(argName, argVar); params.add(argName); } } ((SimpleNode) children[++pos]).organize(obj); ((SimpleNode) children[pos]).insertTag = false; } return obj; } @Override public void toXML(Document doc, Element parent) { if (!toXML) { return; } if (myType.equals(Types.GenFNDecl)) { final Element statEl = doc.createElement("statement"); statEl.setAttribute("name", "genfndecl"); statEl.setAttribute("coord", getCoords()); parent.appendChild(statEl); final Element exprEl = doc.createElement("expression"); statEl.appendChild(exprEl); final Element opEl = doc.createElement("op"); opEl.setAttribute("name", "GFN"); exprEl.appendChild(opEl); Element litEl = doc.createElement("literal"); litEl.setAttribute("value", funcName); litEl.setAttribute("type", Types.String.toString()); opEl.appendChild(litEl); // for (final String id : args.keySet()) { for (final String id : params) { litEl = doc.createElement("literal"); litEl.setAttribute("value", id); litEl.setAttribute("type", Types.String.toString()); opEl.appendChild(litEl); } ((SimpleNode) children[2]).toXML(doc, opEl); toXML = false; return; } final Element opEl = doc.createElement("op"); opEl.setAttribute("name", "GFN"); parent.appendChild(opEl); Element litEl = doc.createElement("literal"); litEl.setAttribute("value", funcName); litEl.setAttribute("type", Types.String.toString()); opEl.appendChild(litEl); // for (final String id : args.keySet()) { for (final String id : params) { litEl = doc.createElement("literal"); litEl.setAttribute("value", id); litEl.setAttribute("type", Types.String.toString()); opEl.appendChild(litEl); } ((SimpleNode) children[pos]).toXML(doc, opEl); toXML = false; } @Override public Types getExpressionType() { return Types.GFN; } /** * @param args * the args to set */ public void setArgs(LinkedHashMap<String, Variable> args) { this.args = args; } /** * @return the args */ public LinkedHashMap<String, Variable> getArgs() { return args; } @Override public Variable lookup(String var) { if (args.containsKey(var)) { return args.get(var); } return ((SimpleNode) parent).lookup(var); } @Override public Variable lookupNoError(String var) { if (args.containsKey(var)) { return args.get(var); } return ((SimpleNode) parent).lookupNoError(var); } @Override public HashMap<String, Variable> getHMVars() { return args; } public String getFuncName() { return funcName; } } /* JavaCC - OriginalChecksum=8ab604c185541f2c5b862d427e704d3a (do not edit this line) */
[ "joaobispo@gmail.com" ]
joaobispo@gmail.com
b1590c204d8fe0a3eb4f001988e73f8c6016a3ee
428d5e19ff14be07de303fdf452cc5ff0ad195ba
/src/main/java/vn/com/websockettest/security/SpringSecurityAuditorAware.java
f1b25853867b94d5691a7210f21f1b2b4ce5fd11
[]
no_license
minhnna/web-socket-test
6641626b7be0196da6ba64824c2aa9cb04c44599
9829a6fb0ebeb6f8f0e6c9c8a14f13c7fcc6dd09
refs/heads/master
2020-03-28T17:12:04.978381
2018-09-14T09:27:51
2018-09-14T09:27:51
148,766,747
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
package vn.com.websockettest.security; import vn.com.websockettest.config.Constants; import java.util.Optional; import org.springframework.data.domain.AuditorAware; import org.springframework.stereotype.Component; /** * Implementation of AuditorAware based on Spring Security. */ @Component public class SpringSecurityAuditorAware implements AuditorAware<String> { @Override public Optional<String> getCurrentAuditor() { return Optional.of(SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT)); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
bc35d69b5de2190b801e4f30560a28bd6f72b46f
d448139d67dd37e6243ed9e88cb54c0273ced8b7
/ocraft-s2client-protocol/src/test/java/com/github/ocraft/s2client/protocol/query/PathingTest.java
868cc4fe059b7cdfbc170a57f3b5312134ccbbda
[ "MIT" ]
permissive
ocraft/ocraft-s2client
f2b27a217d3f43cd5b0217d8b0a085020c9fe588
7efdae6da0112e4a14302192c748db27215029b7
refs/heads/master
2023-09-01T14:11:13.870690
2023-07-01T16:05:50
2023-07-01T16:05:50
111,026,852
52
28
MIT
2023-08-28T08:22:42
2017-11-16T21:58:20
Java
UTF-8
Java
false
false
2,358
java
package com.github.ocraft.s2client.protocol.query; /*- * #%L * ocraft-s2client-protocol * %% * Copyright (C) 2017 - 2018 Ocraft Project * %% * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * #L% */ import nl.jqno.equalsverifier.EqualsVerifier; import org.junit.jupiter.api.Test; import static com.github.ocraft.s2client.protocol.Constants.nothing; import static com.github.ocraft.s2client.protocol.Fixtures.DISTANCE; import static com.github.ocraft.s2client.protocol.Fixtures.sc2ApiPathing; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; class PathingTest { @Test void throwsExceptionWhenSc2ApiPathingIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Pathing.from(nothing())) .withMessage("sc2api response query pathing is required"); } @Test void convertsAllFieldsFromSc2ApiPathing() { assertThatAllFieldsAreConverted(Pathing.from(sc2ApiPathing())); } private void assertThatAllFieldsAreConverted(Pathing pathing) { assertThat(pathing.getDistance()).as("pathing: distance").hasValue(DISTANCE); } @Test void fulfillsEqualsContract() { EqualsVerifier.forClass(Pathing.class).verify(); } }
[ "ocraftproject@gmail.com" ]
ocraftproject@gmail.com
9573a60da016936af9a3c17d7aa335fd070ac152
964aa6796539d9f86c1b3d10be312a77d94cba09
/Sources/Talend/.JETEmitters/src/org/talend/designer/codegen/translators/databases/ldap/TLDAPCloseMainJava.java
2556025b9e124a1342525dfcecb49c6e7cfad91b
[]
no_license
hedim3ali/TalendBI
3d33858c674bb83ccc64a1c5fda645574ec64437
c55b47eefcf2f4a203803dbca231409a90213003
refs/heads/master
2021-01-10T10:39:15.807393
2015-12-15T15:18:13
2015-12-15T15:18:13
48,033,156
0
1
null
null
null
null
UTF-8
Java
false
false
1,780
java
package org.talend.designer.codegen.translators.databases.ldap; import org.talend.core.model.process.INode; import org.talend.core.model.process.ElementParameterParser; import org.talend.designer.codegen.config.CodeGeneratorArgument; public class TLDAPCloseMainJava { protected static String nl; public static synchronized TLDAPCloseMainJava create(String lineSeparator) { nl = lineSeparator; TLDAPCloseMainJava result = new TLDAPCloseMainJava(); nl = null; return result; } public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; protected final String TEXT_1 = "\tjavax.naming.ldap.InitialLdapContext ctx_"; protected final String TEXT_2 = " = (javax.naming.ldap.InitialLdapContext)globalMap.get(\""; protected final String TEXT_3 = "\");" + NL + "\tif(ctx_"; protected final String TEXT_4 = " != null)" + NL + "\t{" + NL + "\t\tctx_"; protected final String TEXT_5 = ".close();" + NL + "\t}"; protected final String TEXT_6 = NL; public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument; INode node = (INode)codeGenArgument.getArgument(); String cid = node.getUniqueName(); String connection = ElementParameterParser.getValue(node,"__CONNECTION__"); String conn = "conn_" + connection; stringBuffer.append(TEXT_1); stringBuffer.append(cid); stringBuffer.append(TEXT_2); stringBuffer.append(conn); stringBuffer.append(TEXT_3); stringBuffer.append(cid); stringBuffer.append(TEXT_4); stringBuffer.append(cid); stringBuffer.append(TEXT_5); stringBuffer.append(TEXT_6); return stringBuffer.toString(); } }
[ "mh.maali@applicam.tn" ]
mh.maali@applicam.tn
696b5a814bdc6be65d4e4a09c79ff2e194862bf7
ee461488c62d86f729eda976b421ac75a964114c
/tags/HtmlUnit-2.16/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlHiddenInput2Test.java
7825e832250de29771d19bb3951615b492de7493
[ "Apache-2.0" ]
permissive
svn2github/htmlunit
2c56f7abbd412e6d9e0efd0934fcd1277090af74
6fc1a7d70c08fb50fef1800673671fd9cada4899
refs/heads/master
2023-09-03T10:35:41.987099
2015-07-26T13:12:45
2015-07-26T13:12:45
37,107,064
0
1
null
null
null
null
UTF-8
Java
false
false
1,592
java
/* * Copyright (c) 2002-2015 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gargoylesoftware.htmlunit.html; import org.junit.Test; import org.junit.runner.RunWith; import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.SimpleWebTestCase; /** * Tests for {@link HtmlHiddenInput}. * * @version $Revision$ * @author Marc Guillemot * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class HtmlHiddenInput2Test extends SimpleWebTestCase { /** * @throws Exception if an error occurs */ @Test public void isDisplayed() throws Exception { final String html = "<html><head><title>Page A</title></head><body>" + "<form id='theForm'>" + " <input type='hidden' id='myHiddenInput' value='HiddenValue'/>" + "</form>" + "</body></html>"; final HtmlPage page = loadPage(html); final HtmlElement hidden = page.getHtmlElementById("myHiddenInput"); assertFalse(hidden.isDisplayed()); } }
[ "asashour@5f5364db-9458-4db8-a492-e30667be6df6" ]
asashour@5f5364db-9458-4db8-a492-e30667be6df6
7e7e2b5f05b111ac723f0e0f7da3892fa8aaff38
935eda8ae77d4606fbf707d062f3671b06a35bcd
/app/src/main/java/com/yoler/potato/fragment/ConsiliaPatientDirFragment.java
0887081e0e5cd0df900ed25bcf7aacd27cebcedf
[]
no_license
zzhangyyu/Potato
3f242a4b61f2126b0ca1f6dfa06e94c14a296c2c
acacb93b5ed52c423e7932ceddb1bf5f11e56575
refs/heads/master
2021-09-11T15:28:55.451679
2018-04-09T08:57:13
2018-04-09T08:57:13
109,788,650
0
1
null
null
null
null
UTF-8
Java
false
false
5,960
java
package com.yoler.potato.fragment; import android.os.Bundle; import android.support.v4.widget.DrawerLayout; import android.support.v7.widget.DividerItemDecoration; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.chad.library.adapter.base.BaseQuickAdapter; import com.scwang.smartrefresh.layout.api.RefreshLayout; import com.yoler.potato.R; import com.yoler.potato.activity.ConsiliaPatientIntroActivity; import com.yoler.potato.adapter.RvConsiliaPatientDirAdapter; import com.yoler.potato.request.ConsiliaPatientDirReq; import com.yoler.potato.request.ConsiliaPatientDirReqContent; import com.yoler.potato.response.PatientDirResp; import com.yoler.potato.response.PatientDirRespContent; import com.yoler.potato.util.ActivityUtil; import com.yoler.potato.util.Host; import com.yoler.potato.util.GsonUtil; import com.yoler.potato.util.LogUtil; import com.yoler.potato.util.MyOkHttpUtil; import com.yoler.potato.util.ToastUtil; import java.io.IOException; import java.util.ArrayList; import java.util.List; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Response; public class ConsiliaPatientDirFragment extends BaseFragment implements BaseQuickAdapter.OnItemClickListener { private TextView tvTitle; private RecyclerView mRecyclerView; private RefreshLayout refreshView; private RvConsiliaPatientDirAdapter mAdapter; private List<PatientDirRespContent> patientDirDatas = new ArrayList<>(); private DrawerLayout mDrawerLayout; private LinearLayout vDrawer; private ImageView ivMenu; @Override public String getTagName() { return null; } @Override protected int getLayoutResource() { return R.layout.fragment_consilia_patient_dir; } @Override protected void findViews() { mDrawerLayout = (DrawerLayout) getActivity().findViewById(R.id.drawer_layout); vDrawer = (LinearLayout) getActivity().findViewById(R.id.v_drawer);//主内容view ivMenu = (ImageView) view.findViewById(R.id.iv_menu); tvTitle = (TextView) view.findViewById(R.id.tv_title); refreshView = (RefreshLayout) view.findViewById(R.id.refresh_view); mRecyclerView = (RecyclerView) view.findViewById(R.id.rv_consilia_patient_dir); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = super.onCreateView(inflater, container, savedInstanceState); tvTitle.setText(getResources().getText(R.string.consilia_patient_title)); LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity); layoutManager.setOrientation(LinearLayoutManager.VERTICAL); mRecyclerView.setLayoutManager(layoutManager); mAdapter = new RvConsiliaPatientDirAdapter(R.layout.item_rv_consilia_patient_dir, patientDirDatas); mRecyclerView.addItemDecoration(new DividerItemDecoration(mActivity, DividerItemDecoration.VERTICAL)); mAdapter.setUpFetchEnable(false); mAdapter.setEnableLoadMore(false); mRecyclerView.setAdapter(mAdapter); ivMenu.setOnClickListener(this); mAdapter.setOnItemClickListener(this); getPatientDirDatas(null, true); return view; } private void getPatientDirDatas(String pageIdx, final boolean needClear) { ConsiliaPatientDirReq consiliaPatientDirReq = new ConsiliaPatientDirReq(); ConsiliaPatientDirReqContent consiliaPatientDirReqContent = new ConsiliaPatientDirReqContent(); consiliaPatientDirReqContent.setPageIdx("1"); consiliaPatientDirReqContent.setRecordPerPage("20"); consiliaPatientDirReq.setContent(consiliaPatientDirReqContent); consiliaPatientDirReq.setOs("Android"); consiliaPatientDirReq.setPhone("15311496135"); consiliaPatientDirReq.setVersion("V1.0"); MyOkHttpUtil.postAsync(Host.GET_CONSILIA_PATIENT_DIR, GsonUtil.objectToJson(consiliaPatientDirReq), new Callback() { @Override public void onFailure(Call call, final IOException e) { mActivity.runOnUiThread(new Runnable() { @Override public void run() { ToastUtil.showToast(mActivity, getResources().getString(R.string.load_fail)); LogUtil.e(e.getMessage(), e); } }); } @Override public void onResponse(Call call, final Response response) throws IOException { String resp = response.body().string(); final PatientDirResp patientDirResp = GsonUtil.jsonToObject(resp, PatientDirResp.class); mActivity.runOnUiThread(new Runnable() { @Override public void run() { if (needClear) { patientDirDatas.clear(); } patientDirDatas.addAll(patientDirResp.getContent()); mAdapter.notifyDataSetChanged(); } }); } }); } @Override public void onClick(View v) { super.onClick(v); if (v.getId() == ivMenu.getId()) { if (!mDrawerLayout.isDrawerOpen(vDrawer)) { mDrawerLayout.openDrawer(vDrawer); } } } @Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { Bundle extras = new Bundle(); extras.putString("patientInfoId", patientDirDatas.get(position).getPatientInfoId()); ActivityUtil.startActivity(mActivity, ConsiliaPatientIntroActivity.class, extras); } }
[ "l" ]
l
69c6abba2e9d58d86b427f3c2243a0c104ede216
d132a32f07cdc583c021e56e61a4befff6228900
/src/main/java/net/minecraftforge/client/IRenderHandler.java
157f2720654124837d29db44e530322213d55e75
[]
no_license
TechCatOther/um_clean_forge
27d80cb6e12c5ed38ab7da33a9dd9e54af96032d
b4ddabd1ed7830e75df9267e7255c9e79d1324de
refs/heads/master
2020-03-22T03:14:54.717880
2018-07-02T09:28:10
2018-07-02T09:28:10
139,421,233
0
0
null
null
null
null
UTF-8
Java
false
false
375
java
package net.minecraftforge.client; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.WorldClient; public abstract class IRenderHandler { @SideOnly(Side.CLIENT) public abstract void render(float partialTicks, WorldClient world, Minecraft mc); }
[ "alone.inbox@gmail.com" ]
alone.inbox@gmail.com
091014fe85b8872374a525b32eeac7f0548ebaba
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.browser-base/sources/org/chromium/chrome/browser/password_manager/PasswordGenerationDialogCustomView.java
331f42470b2a0d3a51ce54f850492bad0fcb05b4
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
759
java
package org.chromium.chrome.browser.password_manager; import android.content.Context; import android.util.AttributeSet; import android.widget.LinearLayout; import android.widget.TextView; import com.oculus.browser.R; /* compiled from: chromium-OculusBrowser.apk-stable-281887347 */ public class PasswordGenerationDialogCustomView extends LinearLayout { public TextView F; public TextView G; public PasswordGenerationDialogCustomView(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public void onFinishInflate() { super.onFinishInflate(); this.F = (TextView) findViewById(R.id.generated_password); this.G = (TextView) findViewById(R.id.generation_save_explanation); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
e65d0fa472aa3b054e3b9aec3da502f4d5580a42
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/java-design-patterns/learning/6201/LordVarysTest.java
91403f80de17db68c24fa6563affd420366667dc
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,519
java
/** * The MIT License * Copyright (c) 2014-2016 Ilkka Seppälä * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.iluwatar.event.aggregator; /** * Date: 12/12/15 - 10:57 AM * * @author Jeroen Meulemeester */ public class LordVarysTest extends EventEmitterTest<LordVarys> { /** * Create a new test instance, using the correct object factory */ public LordVarysTest() { super( Weekday.SATURDAY, Event.TRAITOR_DETECTED, LordVarys::new, LordVarys::new); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com