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
9ccf2f72eb334cab4fbae0644c390425f4799376
c577f5380b4799b4db54722749cc33f9346eacc1
/BugSwarm/spring-projects-spring-hateoas-255781343/buggy_files/src/main/java/org/springframework/hateoas/hal/forms/HalFormsDeserializers.java
0e79d70a152b42939542b010213b41aae033d78c
[]
no_license
tdurieux/BugSwarm-dissection
55db683fd95f071ff818f9ca5c7e79013744b27b
ee6b57cfef2119523a083e82d902a6024e0d995a
refs/heads/master
2020-04-30T17:11:52.050337
2019-05-09T13:42:03
2019-05-09T13:42:03
176,972,414
1
0
null
null
null
null
UTF-8
Java
false
false
7,661
java
/* * Copyright 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.hateoas.hal.forms; import static org.springframework.hateoas.hal.Jackson2HalModule.*; import static org.springframework.hateoas.hal.forms.HalFormsDocument.*; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.springframework.http.MediaType; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.deser.std.ContainerDeserializerBase; import com.fasterxml.jackson.databind.type.TypeFactory; /** * @author Greg Turnquist */ public class HalFormsDeserializers { /** * Deserialize an entire <a href="https://rwcbook.github.io/hal-forms/">HAL-Forms</a> document. */ static class HalFormsDocumentDeserializer extends JsonDeserializer<HalFormsDocument> { private final HalLinkListDeserializer linkDeser = new HalLinkListDeserializer(); private final HalFormsTemplateListDeserializer templateDeser = new HalFormsTemplateListDeserializer(); @Override public HalFormsDocument deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { HalFormsDocumentBuilder halFormsDocumentBuilder = halFormsDocument(); while (!JsonToken.END_OBJECT.equals(jp.nextToken())) { if (!JsonToken.FIELD_NAME.equals(jp.getCurrentToken())) { throw new JsonParseException(jp, "Expected property ", jp.getCurrentLocation()); } jp.nextToken(); if ("_links".equals(jp.getCurrentName())) { halFormsDocumentBuilder.links(this.linkDeser.deserialize(jp, ctxt)); } else if ("_templates".equals(jp.getCurrentName())) { halFormsDocumentBuilder.templates(this.templateDeser.deserialize(jp, ctxt)); } } return halFormsDocumentBuilder.build(); } } /** * Deserialize an object of HAL-Forms {@link Template}s into a {@link List} of {@link Template}s. */ static class HalFormsTemplateListDeserializer extends ContainerDeserializerBase<List<Template>> { public HalFormsTemplateListDeserializer() { super(TypeFactory.defaultInstance().constructCollectionLikeType(List.class, Template.class)); } /** * Accessor for declared type of contained value elements; either exact * type, or one of its supertypes. */ @Override public JavaType getContentType() { return null; } /** * Accesor for deserializer use for deserializing content values. */ @Override public JsonDeserializer<Object> getContentDeserializer() { return null; } /** * Method that can be called to ask implementation to deserialize * JSON content into the value type this serializer handles. * Returned instance is to be constructed by method itself. * <p> * Pre-condition for this method is that the parser points to the * first event that is part of value to deserializer (and which * is never JSON 'null' literal, more on this below): for simple * types it may be the only value; and for structured types the * Object start marker or a FIELD_NAME. * </p> * The two possible input conditions for structured types result * from polymorphism via fields. In the ordinary case, Jackson * calls this method when it has encountered an OBJECT_START, * and the method implementation must advance to the next token to * see the first field name. If the application configures * polymorphism via a field, then the object looks like the following. * <pre> * { * "@class": "class name", * ... * } * </pre> * Jackson consumes the two tokens (the <tt>@class</tt> field name * and its value) in order to learn the class and select the deserializer. * Thus, the stream is pointing to the FIELD_NAME for the first field * after the @class. Thus, if you want your method to work correctly * both with and without polymorphism, you must begin your method with: * <pre> * if (jp.getCurrentToken() == JsonToken.START_OBJECT) { * jp.nextToken(); * } * </pre> * This results in the stream pointing to the field name, so that * the two conditions align. * Post-condition is that the parser will point to the last * event that is part of deserialized value (or in case deserialization * fails, event that was not recognized or usable, which may be * the same event as the one it pointed to upon call). * Note that this method is never called for JSON null literal, * and thus deserializers need (and should) not check for it. * * @param jp Parsed used for reading JSON content * @param ctxt Context that can be used to access information about * this deserialization activity. * @return Deserialized value */ @Override public List<Template> deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { List<Template> result = new ArrayList<Template>(); String relation; Template template; // links is an object, so we parse till we find its end. while (!JsonToken.END_OBJECT.equals(jp.nextToken())) { if (!JsonToken.FIELD_NAME.equals(jp.getCurrentToken())) { throw new JsonParseException(jp, "Expected relation name", jp.getCurrentLocation()); } // save the relation in case the link does not contain it relation = jp.getText(); if (JsonToken.START_ARRAY.equals(jp.nextToken())) { while (!JsonToken.END_ARRAY.equals(jp.nextToken())) { template = jp.readValueAs(Template.class); template.setKey(relation); result.add(template); } } else { template = jp.readValueAs(Template.class); template.setKey(relation); result.add(template); } } return result; } } /** * Deserialize a {@link MediaType} embedded inside a HAL-Forms document. */ static class MediaTypesDeserializer extends ContainerDeserializerBase<List<MediaType>> { private static final long serialVersionUID = -7218376603548438390L; public MediaTypesDeserializer() { super(TypeFactory.defaultInstance().constructCollectionLikeType(List.class, MediaType.class)); } /* * (non-Javadoc) * @see com.fasterxml.jackson.databind.deser.std.ContainerDeserializerBase#getContentType() */ @Override public JavaType getContentType() { return null; } /* * (non-Javadoc) * @see com.fasterxml.jackson.databind.deser.std.ContainerDeserializerBase#getContentDeserializer() */ @Override public JsonDeserializer<Object> getContentDeserializer() { return null; } /* * (non-Javadoc) * @see com.fasterxml.jackson.databind.JsonDeserializer#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext) */ @Override public List<MediaType> deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { return MediaType.parseMediaTypes(p.getText()); } } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
cf8927e4143709bc91b573f3759808f2fa1af664
36073e09d6a12a275cc85901317159e7fffa909e
/oVirt_ovirt-engine/modifiedFiles/8/old/OsValueAutoCompleter.java
b4ef7656b440c7fa051eed1ba93270e1efb053e6
[]
no_license
monperrus/bug-fixes-saner16
a867810451ddf45e2aaea7734d6d0c25db12904f
9ce6e057763db3ed048561e954f7aedec43d4f1a
refs/heads/master
2020-03-28T16:00:18.017068
2018-11-14T13:48:57
2018-11-14T13:48:57
148,648,848
3
0
null
null
null
null
UTF-8
Java
false
false
1,546
java
package org.ovirt.engine.core.searchbackend; import java.util.ArrayList; import java.util.List; import java.util.Map; public class OsValueAutoCompleter implements IConditionValueAutoCompleter { private Map<Integer, String> map; public OsValueAutoCompleter(Map<Integer, String> vmCompletionMap) { this.map = vmCompletionMap; } @Override public String convertFieldEnumValueToActualValue(String fieldValue) { for (Map.Entry<Integer, String> e : map.entrySet()) { if (fieldValue.equalsIgnoreCase(e.getValue())) { return e.getKey().toString(); } } return ""; } @Override public String[] getCompletion(String wordPart) { if (wordPart == null || wordPart.isEmpty()) { return map.values().toArray(new String[]{}); } List<String> list = new ArrayList<String>(); for (String osName : map.values()) { if (osName.contains(wordPart)) { list.add(osName); } } return list.toArray(new String[]{}); } @Override public boolean validate(String text) { text = text.trim().toLowerCase(); for (String os : map.values()) { if (os.equals(text)) { return true; } } return false; } @Override public boolean validateCompletion(String text) { return true; } @Override public String changeCaseDisplay(String text) { return text; } }
[ "martin.monperrus@gnieh.org" ]
martin.monperrus@gnieh.org
e0e2d737dec78d7bb65128dcc188c4265327f964
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/smallest/f2997e14a460c6df0ed10aa9f6e792666e37d5c06a9a81445f14509e4a0113f59f5589ef37774dfea1f7d0ae9bb6c388e6eeb44e745e35f8511bbd4b82709d9a/000/mutations/26/smallest_f2997e14_000.java
7fc3bd85e0ea6001d89b442a995f11a26610baf5
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,431
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class smallest_f2997e14_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_f2997e14_000 mainClass = new smallest_f2997e14_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj num1 = new IntObj (), num2 = new IntObj (), num3 = new IntObj (), num4 = new IntObj (); output += (String.format ("Please enter 4 numbers separated by spaces > ")); num1.value = scanner.nextInt (); num2.value = scanner.nextInt (); num3.value = scanner.nextInt (); num4.value = scanner.nextInt (); if (num1.value < num2.value && num1.value < num3.value && num1.value < num4.value) { output += (String.format ("%d is the smallest\n", num1.value)); } else if (num2.value < num1.value && num2.value < num3.value && num2.value < num4.value) { output += (String.format ("%d is the smallest\n", num2.value)); } else if (num3.value < num1.value && num3.value < num2.value && num3.value < num4.value) { output += (String.format ("%d is the smallest\n", num3.value)); } else if (num4.value < num1.value && num3.value < num2.value && num4.value < num3.value) { output += (String.format ("%d is the smallest\n", num4.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
729b40116728b23b92bdd509f1341d185c5c69ce
647ce242e20bc792b334cf445d1fb3243f0f3b47
/chintai-migration-cms/src/net/chintai/backend/sysadmin/review/dao/ReviewBukkenWebStatusUpdatePageParamBean.java
f3046922e71e4eb09b4856e6f5cd6018f99ce3c8
[]
no_license
sangjiexun/20191031test
0ce6c9e3dabb7eed465d4add33a107e5b5525236
3248d86ce282c1455f2e6ce0e05f0dbd15e51518
refs/heads/master
2020-12-14T20:31:05.085987
2019-11-01T06:03:50
2019-11-01T06:03:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,361
java
/* * $Id: ReviewBukkenWebStatusUpdatePageParamBean.java 3570 2007-12-14 08:55:47Z t-kojima $ * --------------------------------------------------------- * 更新日 更新者 内容 * --------------------------------------------------------- * 2007/10/19 BGT)李昊燮 新規作成 * */ package net.chintai.backend.sysadmin.review.dao; /** * CHINTAI.NET掲載状況情報検索条件 * * @author lee-hosup * @version $Revision: 3570 $ * Copyright: (C) CHINTAI Corporation All Right Reserved. */ public class ReviewBukkenWebStatusUpdatePageParamBean { /** 部屋キー */ private String roomKey; /** 店舗コード */ private String shopCd; /** 物件コード */ private String bkCd; /** 部屋番号 */ private String roomNo; /** 管理コード */ private String kanriCd; /** 初回審査自動削除期間 */ private int syokaiAutoDel; /** 定期審査自動削除期間 */ private int teikiAutoDel; /** * 店舗コードを取得します。 * @return 店舗コード */ public String getShopCd() { return shopCd; } /** * 店舗コードを設定します。 * @param shopCd 店舗コード */ public void setShopCd(String shopCd) { this.shopCd = shopCd; } /** * 物件コードを取得します。 * @return 物件コード */ public String getBkCd() { return bkCd; } /** * 物件コードを設定します。 * @param bkCd 物件コード */ public void setBkCd(String bkCd) { this.bkCd = bkCd; } /** * 部屋番号を取得します。 * @return 部屋番号 */ public String getRoomNo() { return roomNo; } /** * 部屋番号を設定します。 * @param roomNo 部屋番号 */ public void setRoomNo(String roomNo) { this.roomNo = roomNo; } /** * 管理コードを取得します。 * @return 管理コード */ public String getKanriCd() { return kanriCd; } /** * 管理コードを設定します。 * @param kanriCd 管理コード */ public void setKanriCd(String kanriCd) { this.kanriCd = kanriCd; } /** * 初回審査自動削除期間を取得します。 * @return 初回審査自動削除期間 */ public int getSyokaiAutoDel() { return syokaiAutoDel; } /** * 初回審査自動削除期間を設定します。 * @param syokaiAutoDel 初回審査自動削除期間 */ public void setSyokaiAutoDel(int syokaiAutoDel) { this.syokaiAutoDel = syokaiAutoDel; } /** * 定期審査自動削除期間を取得します。 * @return 定期審査自動削除期間 */ public int getTeikiAutoDel() { return teikiAutoDel; } /** * 定期審査自動削除期間を設定します。 * @param teikiAutoDel 定期審査自動削除期間 */ public void setTeikiAutoDel(int teikiAutoDel) { this.teikiAutoDel = teikiAutoDel; } /** * @return roomKey */ public String getRoomKey() { return roomKey; } /** * @param roomKey セットする roomKey */ public void setRoomKey(String roomKey) { this.roomKey = roomKey; } }
[ "yuki.hirukawa@ctc-g.co.jp" ]
yuki.hirukawa@ctc-g.co.jp
860925414f8cfc87c8aef6105e8dbbf49af43030
8f35674ff5b8c58d292aa160988c2c599d50699d
/src/main/java/com/demo/fes/entity/VerificationToken.java
da8c77595b1d535db21e4215c70e77dc42ba32d7
[]
no_license
bravesoftdz/FES-backend
0d219df30e6a1a752932b088b05d4d5de1c5c8c2
d1e9958e17839cdd9991fa6f8c2fb6339a8b122b
refs/heads/master
2021-10-10T09:11:50.089959
2019-01-08T22:16:51
2019-01-08T22:16:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
555
java
package com.demo.fes.entity; import lombok.Data; import javax.persistence.*; @Entity @Data public class VerificationToken { private static final int EXPIRATION_TIME = 60 * 24; @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String token; @OneToOne(targetEntity = User.class, fetch = FetchType.EAGER) @JoinColumn(nullable = false, name = "id_user") private User user; public VerificationToken(String token, User user) { this.token = token; this.user = user; } }
[ "you@example.com" ]
you@example.com
daaa19127867fcb1098351061e5f361afb0f7e10
bf390e6589e240c6ccc325355cfd0c21fbe9d884
/2.JavaCore/src/com/javarush/task/task13/task1301/Solution.java
3035232d83a8d5049eed116359b6a3c3d311e845
[]
no_license
vladmeh/jrt
84878788fbb1f10aa55d320d205f886d1df9e417
0272ded03ac8eced7bf901bdfcc503a4eb6da12a
refs/heads/master
2020-04-05T11:20:15.441176
2019-05-22T22:24:56
2019-05-22T22:24:56
81,300,849
4
5
null
null
null
null
UTF-8
Java
false
false
795
java
package com.javarush.task.task13.task1301; /* Пиво */ public class Solution { public static void main(String[] args) throws Exception { } public interface Drink { void askMore(String message); void sayThankYou(); boolean isReadyToGoHome(); } public interface Alcohol extends Drink { boolean READY_TO_GO_HOME = false; void sleepOnTheFloor(); } public static class Beer implements Alcohol{ @Override public void askMore(String message) { } @Override public void sayThankYou() { } @Override public boolean isReadyToGoHome() { return READY_TO_GO_HOME; } @Override public void sleepOnTheFloor() { } } }
[ "vladmeh@gmail.com" ]
vladmeh@gmail.com
8db5720644562e0f8c9a772dfa8d97a40240b0aa
dd3eec242deb434f76d26b4dc0e3c9509c951ce7
/2018-work/yjj/miscroservice_user/src/main/java/com/e_commerce/miscroservice/user/service/impl/WhitePhoneServiceImpl.java
d1feaddfbdfe1febab8f2a48889c11cd21f77abd
[]
no_license
github4n/other_workplace
1091e6368abc51153b4c7ebbb3742c35fb6a0f4a
7c07e0d078518bb70399e50b35e9f9ca859ba2df
refs/heads/master
2020-05-31T10:12:37.160922
2019-05-25T15:48:54
2019-05-25T15:48:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
245
java
package com.e_commerce.miscroservice.user.service.impl; import org.springframework.stereotype.Service; /** * @author hyf * @version V1.0 * @date 2018/11/6 15:15 * @Copyright 玖远网络 */ @Service public class WhitePhoneServiceImpl { }
[ "nessary@foxmail.com" ]
nessary@foxmail.com
6a43f1e415f373f1afeaf48b83003464bfe690c6
deac36a2f8e8d4597e2e1934ab8a7dd666621b2b
/java源码的副本/src-2/com/sun/org/apache/xalan/internal/xsltc/compiler/ParameterRef.java
9b955a54b210e0dd8b54f5eaabf3eb0395133e42
[]
no_license
ZytheMoon/First
ff317a11f12c4ec7714367994924ee9fb4649611
9078fb8be8537a98483c50928cb92cf9835aed1c
refs/heads/master
2021-04-27T00:09:31.507273
2018-03-06T12:25:56
2018-03-06T12:25:56
123,758,924
0
1
null
null
null
null
UTF-8
Java
false
false
4,290
java
/* * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 2001-2004 The Apache Software Foundation. * * 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. */ /* * $Id: ParameterRef.java,v 1.2.4.1 2005/09/02 11:05:08 pvedula Exp $ */ package com.sun.org.apache.xalan.internal.xsltc.compiler; import com.sun.org.apache.bcel.internal.generic.CHECKCAST; import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import com.sun.org.apache.bcel.internal.generic.GETFIELD; import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE; import com.sun.org.apache.bcel.internal.generic.InstructionList; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.NodeSetType; import com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen * @author Erwin Bolwidt <ejb@klomp.org> */ final class ParameterRef extends VariableRefBase { /** * Name of param being referenced. */ QName _name = null; public ParameterRef(Param param) { super(param); _name = param._name; } public String toString() { return "parameter-ref("+_variable.getName()+'/'+_variable.getType()+')'; } public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); /* * To fix bug 24518 related to setting parameters of the form * {namespaceuri}localName, which will get mapped to an instance * variable in the class. */ final String name = BasisLibrary.mapQNameToJavaName (_name.toString()); final String signature = _type.toSignature(); if (_variable.isLocal()) { if (classGen.isExternal()) { Closure variableClosure = _closure; while (variableClosure != null) { if (variableClosure.inInnerClass()) break; variableClosure = variableClosure.getParentClosure(); } if (variableClosure != null) { il.append(ALOAD_0); il.append(new GETFIELD( cpg.addFieldref(variableClosure.getInnerClassName(), name, signature))); } else { il.append(_variable.loadInstruction()); _variable.removeReference(this); } } else { il.append(_variable.loadInstruction()); _variable.removeReference(this); } } else { final String className = classGen.getClassName(); il.append(classGen.loadTranslet()); if (classGen.isExternal()) { il.append(new CHECKCAST(cpg.addClass(className))); } il.append(new GETFIELD(cpg.addFieldref(className,name,signature))); } if (_variable.getType() instanceof NodeSetType) { // The method cloneIterator() also does resetting final int clone = cpg.addInterfaceMethodref(NODE_ITERATOR, "cloneIterator", "()" + NODE_ITERATOR_SIG); il.append(new INVOKEINTERFACE(clone, 1)); } } }
[ "2353653849@qq.com" ]
2353653849@qq.com
3bc92265877890a17978406b50f64be194e62498
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2019/12/RelationshipGroupGetterTest.java
f31deceaf3b896e9d1c643bd21b18d102a950274
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
5,610
java
/* * Copyright (c) 2002-2019 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.internal.recordstorage; import org.junit.jupiter.api.Test; import org.mockito.InOrder; import org.neo4j.configuration.Config; import org.neo4j.internal.id.DefaultIdGeneratorFactory; import org.neo4j.internal.recordstorage.RelationshipGroupGetter.RelationshipGroupPosition; import org.neo4j.io.fs.EphemeralFileSystemAbstraction; import org.neo4j.io.layout.DatabaseLayout; import org.neo4j.io.pagecache.PageCache; import org.neo4j.kernel.impl.store.NeoStores; import org.neo4j.kernel.impl.store.RecordStore; import org.neo4j.kernel.impl.store.StoreFactory; import org.neo4j.kernel.impl.store.StoreType; import org.neo4j.kernel.impl.store.record.NodeRecord; import org.neo4j.kernel.impl.store.record.RecordLoad; import org.neo4j.kernel.impl.store.record.RelationshipGroupRecord; import org.neo4j.logging.LogProvider; import org.neo4j.logging.NullLogProvider; import org.neo4j.test.extension.EphemeralNeo4jLayoutExtension; import org.neo4j.test.extension.Inject; import org.neo4j.test.extension.pagecache.EphemeralPageCacheExtension; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector.immediate; @EphemeralPageCacheExtension @EphemeralNeo4jLayoutExtension class RelationshipGroupGetterTest { @Inject private EphemeralFileSystemAbstraction fs; @Inject private PageCache pageCache; @Inject private DatabaseLayout databaseLayout; @Test void shouldAbortLoadingGroupChainIfComeTooFar() { // GIVEN a node with relationship group chain 2-->4-->10-->23 LogProvider logProvider = NullLogProvider.getInstance(); StoreFactory storeFactory = new StoreFactory( databaseLayout, Config.defaults(), new DefaultIdGeneratorFactory( fs, immediate() ), pageCache, fs, logProvider ); try ( NeoStores stores = storeFactory.openNeoStores( true, StoreType.RELATIONSHIP_GROUP ) ) { RecordStore<RelationshipGroupRecord> store = spy( stores.getRelationshipGroupStore() ); RelationshipGroupRecord group2 = group( 0, 2 ); RelationshipGroupRecord group4 = group( 1, 4 ); RelationshipGroupRecord group10 = group( 2, 10 ); RelationshipGroupRecord group23 = group( 3, 23 ); link( group2, group4, group10, group23 ); store.updateRecord( group2 ); store.updateRecord( group4 ); store.updateRecord( group10 ); store.updateRecord( group23 ); RelationshipGroupGetter groupGetter = new RelationshipGroupGetter( store ); NodeRecord node = new NodeRecord( 0, true, group2.getId(), -1 ); // WHEN trying to find relationship group 7 RecordAccess<RelationshipGroupRecord, Integer> access = new DirectRecordAccess<>( store, Loaders.relationshipGroupLoader( store ) ); RelationshipGroupPosition result = groupGetter.getRelationshipGroup( node, 7, access ); // THEN only groups 2, 4 and 10 should have been loaded InOrder verification = inOrder( store ); verification.verify( store ).getRecord( eq( group2.getId() ), any( RelationshipGroupRecord.class ), any( RecordLoad.class ) ); verification.verify( store ).getRecord( eq( group4.getId() ), any( RelationshipGroupRecord.class ), any( RecordLoad.class ) ); verification.verify( store ).getRecord( eq( group10.getId() ), any( RelationshipGroupRecord.class ), any( RecordLoad.class ) ); verification.verify( store, never() ) .getRecord( eq( group23.getId() ), any( RelationshipGroupRecord.class ), any( RecordLoad.class ) ); // it should also be reported as not found assertNull( result.group() ); // with group 4 as closes previous one assertEquals( group4, result.closestPrevious().forReadingData() ); } } private static void link( RelationshipGroupRecord... groups ) { for ( int i = 0; i < groups.length; i++ ) { if ( i > 0 ) { groups[i].setPrev( groups[i - 1].getId() ); } if ( i < groups.length - 1 ) { groups[i].setNext( groups[i + 1].getId() ); } } } private static RelationshipGroupRecord group( long id, int type ) { RelationshipGroupRecord group = new RelationshipGroupRecord( id, type ); group.setInUse( true ); return group; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
d25fa6a523b7d835647f203a1fc5c5237961b159
eb31160e5915c422860267acbd1dcb3c3743c09c
/jOOQ-test/examples/org/jooq/examples/sqlserver/adventureworks/purchasing/tables/records/ProductVendor.java
b61c089a919058dd9a27c7b41be5401a969b3998
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
digulla/jOOQ
b75b43c2e15b4e46d3412aca9d08d65c240c94f3
6c3334d5b73749a2045ae038e71a0003ba5f6139
refs/heads/master
2022-06-20T17:34:48.041188
2022-06-04T21:52:39
2022-06-04T21:52:39
4,752,073
0
0
NOASSERTION
2022-06-04T21:52:40
2012-06-22T14:36:17
Java
UTF-8
Java
false
false
7,403
java
/** * This class is generated by jOOQ */ package org.jooq.examples.sqlserver.adventureworks.purchasing.tables.records; /** * This class is generated by jOOQ. */ @javax.persistence.Entity @javax.persistence.Table(name = "ProductVendor", schema = "Purchasing", uniqueConstraints = { @javax.persistence.UniqueConstraint(columnNames = {"ProductID", "VendorID"}) }) public class ProductVendor extends org.jooq.impl.UpdatableRecordImpl<org.jooq.examples.sqlserver.adventureworks.purchasing.tables.records.ProductVendor> { private static final long serialVersionUID = -1055203280; /** * An uncommented item * * PRIMARY KEY * <p> * <code><pre> * CONSTRAINT FK_ProductVendor_Product_ProductID * FOREIGN KEY (ProductID) * REFERENCES Production.Product (ProductID) * </pre></code> */ public void setProductID(java.lang.Integer value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.ProductID, value); } /** * An uncommented item * * PRIMARY KEY * <p> * <code><pre> * CONSTRAINT FK_ProductVendor_Product_ProductID * FOREIGN KEY (ProductID) * REFERENCES Production.Product (ProductID) * </pre></code> */ @javax.persistence.Column(name = "ProductID", nullable = false, precision = 10) public java.lang.Integer getProductID() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.ProductID); } /** * An uncommented item * * PRIMARY KEY * <p> * <code><pre> * CONSTRAINT FK_ProductVendor_Vendor_VendorID * FOREIGN KEY (VendorID) * REFERENCES Purchasing.Vendor (VendorID) * </pre></code> */ public void setVendorID(java.lang.Integer value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.VendorID, value); } /** * An uncommented item * * PRIMARY KEY * <p> * <code><pre> * CONSTRAINT FK_ProductVendor_Vendor_VendorID * FOREIGN KEY (VendorID) * REFERENCES Purchasing.Vendor (VendorID) * </pre></code> */ @javax.persistence.Column(name = "VendorID", nullable = false, precision = 10) public java.lang.Integer getVendorID() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.VendorID); } /** * An uncommented item */ public void setAverageLeadTime(java.lang.Integer value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.AverageLeadTime, value); } /** * An uncommented item */ @javax.persistence.Column(name = "AverageLeadTime", nullable = false, precision = 10) public java.lang.Integer getAverageLeadTime() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.AverageLeadTime); } /** * An uncommented item */ public void setStandardPrice(java.math.BigDecimal value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.StandardPrice, value); } /** * An uncommented item */ @javax.persistence.Column(name = "StandardPrice", nullable = false, precision = 19, scale = 4) public java.math.BigDecimal getStandardPrice() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.StandardPrice); } /** * An uncommented item */ public void setLastReceiptCost(java.math.BigDecimal value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.LastReceiptCost, value); } /** * An uncommented item */ @javax.persistence.Column(name = "LastReceiptCost", precision = 19, scale = 4) public java.math.BigDecimal getLastReceiptCost() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.LastReceiptCost); } /** * An uncommented item */ public void setLastReceiptDate(java.sql.Timestamp value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.LastReceiptDate, value); } /** * An uncommented item */ @javax.persistence.Column(name = "LastReceiptDate") public java.sql.Timestamp getLastReceiptDate() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.LastReceiptDate); } /** * An uncommented item */ public void setMinOrderQty(java.lang.Integer value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.MinOrderQty, value); } /** * An uncommented item */ @javax.persistence.Column(name = "MinOrderQty", nullable = false, precision = 10) public java.lang.Integer getMinOrderQty() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.MinOrderQty); } /** * An uncommented item */ public void setMaxOrderQty(java.lang.Integer value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.MaxOrderQty, value); } /** * An uncommented item */ @javax.persistence.Column(name = "MaxOrderQty", nullable = false, precision = 10) public java.lang.Integer getMaxOrderQty() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.MaxOrderQty); } /** * An uncommented item */ public void setOnOrderQty(java.lang.Integer value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.OnOrderQty, value); } /** * An uncommented item */ @javax.persistence.Column(name = "OnOrderQty", precision = 10) public java.lang.Integer getOnOrderQty() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.OnOrderQty); } /** * An uncommented item * <p> * <code><pre> * CONSTRAINT FK_ProductVendor_UnitMeasure_UnitMeasureCode * FOREIGN KEY (UnitMeasureCode) * REFERENCES Production.UnitMeasure (UnitMeasureCode) * </pre></code> */ public void setUnitMeasureCode(java.lang.String value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.UnitMeasureCode, value); } /** * An uncommented item * <p> * <code><pre> * CONSTRAINT FK_ProductVendor_UnitMeasure_UnitMeasureCode * FOREIGN KEY (UnitMeasureCode) * REFERENCES Production.UnitMeasure (UnitMeasureCode) * </pre></code> */ @javax.persistence.Column(name = "UnitMeasureCode", nullable = false, length = 3) public java.lang.String getUnitMeasureCode() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.UnitMeasureCode); } /** * An uncommented item */ public void setModifiedDate(java.sql.Timestamp value) { setValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.ModifiedDate, value); } /** * An uncommented item */ @javax.persistence.Column(name = "ModifiedDate", nullable = false) public java.sql.Timestamp getModifiedDate() { return getValue(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor.ModifiedDate); } /** * Create a detached ProductVendor */ public ProductVendor() { super(org.jooq.examples.sqlserver.adventureworks.purchasing.tables.ProductVendor.ProductVendor); } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
471f14b75c5b8123496b46e693cdca857742a7f4
c73e06b4131122a899f68ae926a1c3d70890d886
/zavrsni15-kucniSaveti2/src/main/java/jwd/wafepa/support/GlasToDTO.java
b610c698b57cd8b9d5edac5b2f36fa3937474705
[]
no_license
DraganKal/kucni-saveti
69552baa318ac981e0fe28f01076da3cb8734628
cd9416539e68e3b9d2db3117cfbed86283e02129
refs/heads/master
2022-07-19T09:27:31.365367
2020-01-17T13:50:39
2020-01-17T13:50:39
234,557,622
0
0
null
2022-06-21T02:39:42
2020-01-17T13:49:36
Java
UTF-8
Java
false
false
847
java
package jwd.wafepa.support; import java.util.ArrayList; import java.util.List; import org.springframework.core.convert.converter.Converter; import org.springframework.stereotype.Component; import jwd.wafepa.model.Glas; import jwd.wafepa.web.dto.GlasDTO; @Component public class GlasToDTO implements Converter<Glas, GlasDTO>{ @Override public GlasDTO convert(Glas glas) { GlasDTO retValue = new GlasDTO(); retValue.setId(glas.getId()); retValue.setPorukaNaziv(glas.getPoruka().getNaslov()); retValue.setPorukaId(glas.getPoruka().getId()); retValue.setPredlogPodrzan(glas.getPredlogPodrzan()); return retValue; } public List<GlasDTO> convert(List<Glas> dtos){ List<GlasDTO> ret = new ArrayList<>(); for(Glas it : dtos){ ret.add(convert(it)); } return ret; } }
[ "User@User-PC" ]
User@User-PC
75a9efa158b231fb7a0b9a79fb32990bcc4309da
9cdf4a803b5851915b53edaeead2546f788bddc6
/machinelearning/5.0/drools-verifier/src/main/java/org/drools/verifier/Solver.java
ff2e1c7db202db37ca7f0a52e2d8259438c1403c
[ "Apache-2.0" ]
permissive
kiegroup/droolsjbpm-contributed-experiments
8051a70cfa39f18bc3baa12ca819a44cc7146700
6f032d28323beedae711a91f70960bf06ee351e5
refs/heads/master
2023-06-01T06:11:42.641550
2020-07-15T15:09:02
2020-07-15T15:09:02
1,184,582
1
13
null
2021-06-24T08:45:52
2010-12-20T15:42:26
Java
UTF-8
Java
false
false
3,675
java
package org.drools.verifier; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.drools.verifier.components.VerifierComponent; import org.drools.verifier.components.OperatorDescr; /** * Takes a list of Constraints and makes possibilities from them. * * @author Toni Rikkola */ class Solver { private List<Set<VerifierComponent>> possibilityLists = new ArrayList<Set<VerifierComponent>>(); private Solver subSolver = null; private boolean isChildExists = false; private boolean isChildForall = false; private boolean isChildNot = false; private OperatorDescr.Type type; protected Solver(OperatorDescr.Type type) { this.type = type; } public void addOperator(OperatorDescr.Type type) { if (subSolver != null) { subSolver.addOperator(type); } else { subSolver = new Solver(type); } } /** * Add new descr. * * @param descr */ public void add(VerifierComponent descr) { if (descr instanceof OperatorDescr) { throw new UnsupportedOperationException( "Operator descrs are not supported."); } if (subSolver != null) { subSolver.add(descr); } else { if (type == OperatorDescr.Type.AND) { if (possibilityLists.isEmpty()) { possibilityLists.add(new HashSet<VerifierComponent>()); } for (Set<VerifierComponent> set : possibilityLists) { set.add(descr); } } else if (type == OperatorDescr.Type.OR) { Set<VerifierComponent> set = new HashSet<VerifierComponent>(); set.add(descr); possibilityLists.add(set); } } } /** * Ends subSolvers data collection. * */ protected void end() { if (subSolver != null && subSolver.subSolver == null) { if (type == OperatorDescr.Type.AND) { if (possibilityLists.isEmpty()) { possibilityLists.add(new HashSet<VerifierComponent>()); } List<Set<VerifierComponent>> newPossibilities = new ArrayList<Set<VerifierComponent>>(); List<Set<VerifierComponent>> sets = subSolver .getPossibilityLists(); for (Set<VerifierComponent> possibilityList : possibilityLists) { for (Set<VerifierComponent> set : sets) { Set<VerifierComponent> newSet = new HashSet<VerifierComponent>(); newSet.addAll(possibilityList); newSet.addAll(set); newPossibilities.add(newSet); } } possibilityLists = newPossibilities; } else if (type == OperatorDescr.Type.OR) { possibilityLists.addAll(subSolver.getPossibilityLists()); } subSolver = null; } else if (subSolver != null && subSolver.subSolver != null) { subSolver.end(); } } public void setChildForall(boolean b) { if (subSolver != null) { subSolver.setChildForall(b); } else { isChildForall = b; } } public void setChildExists(boolean b) { if (subSolver != null) { subSolver.setChildExists(b); } else { isChildExists = b; } } public void setChildNot(boolean b) { if (subSolver != null) { subSolver.setChildNot(b); } else { isChildNot = b; } } public boolean isForall() { if (subSolver != null) { return subSolver.isForall(); } else { return isChildForall; } } public boolean isExists() { if (subSolver != null) { return subSolver.isExists(); } else { return isChildExists; } } public boolean isChildNot() { if (subSolver != null) { return subSolver.isChildNot(); } else { return isChildNot; } } public List<Set<VerifierComponent>> getPossibilityLists() { return possibilityLists; } }
[ "gizil.oguz@gmail.com" ]
gizil.oguz@gmail.com
fbe07b4ff9859bffbb00559717cdfd83766ed0b8
7ee881d6057a8720184d26579941cceab7480115
/Try_BkParser_decompile_1_/hidden_folder/xxx/bkparser/org/maltparser/core/feature/function/FeatureFunction.java
e8e07809721fe50b9bb360f416b3ac08d6cd7110
[]
no_license
dunglason6789p/INTELLIJ_WORKSPACE
0023f57ee8abd24edb7f996900ff21c7c412ffa6
9f391d4bfede0ffa06707a3852a97b4270377b52
refs/heads/master
2021-07-12T09:36:49.121091
2019-09-21T00:45:15
2019-09-21T00:45:15
209,901,588
0
0
null
2020-10-13T16:12:02
2019-09-21T00:25:14
Java
UTF-8
Java
false
false
500
java
package org.maltparser.core.feature.function; import org.maltparser.core.exception.MaltChainedException; import org.maltparser.core.feature.value.FeatureValue; import org.maltparser.core.symbol.SymbolTable; public interface FeatureFunction extends Function { String getSymbol(int var1) throws MaltChainedException; int getCode(String var1) throws MaltChainedException; SymbolTable getSymbolTable(); FeatureValue getFeatureValue(); int getType(); String getMapIdentifier(); }
[ "sonnt6789p@gmail.com" ]
sonnt6789p@gmail.com
d776b98b01ffe38abdc918fe4f54b76df1a64a70
565792cc38b96e21b7bdd9b0e01e3cff863fd832
/app/src/main/java/developersancho/eventbusapp/MainActivity.java
f8a0e9ffa5b1f6b0b75f55629a89c6a33896b4dd
[]
no_license
developersancho/EventBusApp
3ca978fd541a7de156dda94f99bb25290db22e16
5e25988dc7a80da0477f710a2581f006469d4033
refs/heads/master
2020-04-07T05:02:55.107402
2018-11-18T12:27:25
2018-11-18T12:27:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,314
java
package developersancho.eventbusapp; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; public class MainActivity extends AppCompatActivity { private final static String TAG = MainActivity.class.getSimpleName(); private TextView textResult; private Button btnClick; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // event bus is starting EventBus.getDefault().register(this); textResult = findViewById(R.id.textResult); btnClick = findViewById(R.id.btnClick); btnClick.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(MainActivity.this, ChildActivity.class); startActivity(intent); } }); Log.d(TAG, "onCreate"); } // This method will be called when a MessageEvent is posted (in the UI thread for Toast) @Subscribe(threadMode = ThreadMode.MAIN) public void onMessageEvent(MessageEvent event) { Log.d(TAG, event.message); textResult.setText(event.getMessage()); Toast.makeText(getApplicationContext(), event.message, Toast.LENGTH_LONG).show(); } @Override protected void onStart() { super.onStart(); Log.d(TAG, "onStart"); } @Override protected void onResume() { super.onResume(); Log.d(TAG, "onResume"); } @Override protected void onPause() { super.onPause(); Log.d(TAG, "onPause"); } @Override protected void onRestart() { super.onRestart(); Log.d(TAG, "onRestart"); } @Override protected void onStop() { super.onStop(); Log.d(TAG, "onStop"); } @Override protected void onDestroy() { super.onDestroy(); EventBus.getDefault().unregister(this); } }
[ "developersancho@gmail.com" ]
developersancho@gmail.com
ad5c74d4cb63ed2c3200158bf2984f15689da8e1
258de8e8d556901959831bbdc3878af2d8933997
/utopia-service/utopia-afenti/utopia-afenti-impl/src/main/java/com/voxlearning/utopia/service/afenti/base/cache/managers/SelfLearningActionCacheManager.java
49494fc3d1cb997f4593f29024d33046c9517939
[]
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
725
java
package com.voxlearning.utopia.service.afenti.base.cache.managers; import com.voxlearning.alps.annotation.cache.CachedObjectExpirationPolicy; import com.voxlearning.alps.annotation.cache.UtopiaCacheExpiration; import com.voxlearning.alps.cache.support.PojoCacheObject; import com.voxlearning.alps.spi.cache.UtopiaCache; /** * @author Ruib * @since 2016/8/25 */ @UtopiaCacheExpiration(policy = CachedObjectExpirationPolicy.today) public class SelfLearningActionCacheManager extends PojoCacheObject<Long, String> { public SelfLearningActionCacheManager(UtopiaCache cache) { super(cache); } public boolean sended(Long studentId) { return null != studentId && !add(studentId, "dummy"); } }
[ "wangahai@300.cn" ]
wangahai@300.cn
c5ab485660b8100becc78760c28bc1e859c2b0af
a55b85b6dd6a4ebf856b3fd80c9a424da2cd12bd
/core/src/main/java/org/marketcetera/trade/OrderCancelReject.java
480f2f5ba1e490a030b7674fb5439293f81315f0
[]
no_license
jeffreymu/marketcetera-2.2.0-16652
a384a42b2e404bcc6140119dd2c6d297d466596c
81cdd34979492f839233552432f80b3606d0349f
refs/heads/master
2021-12-02T11:18:01.399940
2013-08-09T14:36:21
2013-08-09T14:36:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,047
java
package org.marketcetera.trade; import org.marketcetera.util.misc.ClassVersion; /* $License$ */ /** * Represents the rejection of an {@link OrderCancel} or a * {@link OrderReplace}. Instances of this message can be created via * {@link Factory#createOrderCancelReject(quickfix.Message, BrokerID, Originator, UserID, UserID)}. * <p> * The enum attributes of this type have a null value, in case a value * is not specified for that attribute / field in the underlying FIX Message. * However, if the attribute / field has a value that does not have a * corresponding value in the Enum type, the sentinel value <code>Unknown</code> * is returned to indicate that the value is set but is not currently * expressible through the current API. * * @author anshul@marketcetera.com * @version $Id: OrderCancelReject.java 16154 2012-07-14 16:34:05Z colin $ * @since 1.0.0 */ @ClassVersion("$Id: OrderCancelReject.java 16154 2012-07-14 16:34:05Z colin $") //$NON-NLS-1$ public interface OrderCancelReject extends TradeMessage, ReportBase { }
[ "vladimir_petrovich@yahoo.com" ]
vladimir_petrovich@yahoo.com
97f767f2bf5509aa0b854df7412660dc55db93d6
5928bc46d350fbb1abd6dfe6be598033b63ea7ed
/upay-settlement/src/test/java/af/asr/settlement/upaysettlement/UpaySettlementApplicationTests.java
0167d0423786d8ecb65259c61f51b1ef5c4149b0
[]
no_license
mohbadar/upay
3fa4808b298a1e06a62130ace8c97cc230cbb0c1
c40c46d305abf0e1b0a1fd5ecd50202864985931
refs/heads/master
2023-06-22T07:58:23.959294
2020-01-06T11:05:54
2020-01-06T11:05:54
231,886,323
1
0
null
2023-06-14T22:26:05
2020-01-05T08:04:01
Java
UTF-8
Java
false
false
232
java
package af.asr.settlement.upaysettlement; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class UpaySettlementApplicationTests { @Test void contextLoads() { } }
[ "mohammadbadarhashimi@gmail.com" ]
mohammadbadarhashimi@gmail.com
e49a186c95bf554aec9236d4c7b8a1e097d7b80e
f33ea055f6c42337a90512b3847715915c5952b9
/enrollment-service/src/main/java/academic/system/enrollment/model/Student.java
ca63a5dd2e065264c0a0513b13a92b5db9449a0e
[]
no_license
lenyn15/Isabel-project
25f764b576135a4c891fec10e1a6a43b51aced3d
1627912fc9235818ef9a9d7746bae5b676214104
refs/heads/master
2023-08-19T00:10:09.215712
2021-10-03T19:48:37
2021-10-03T19:48:37
408,982,601
0
0
null
null
null
null
UTF-8
Java
false
false
378
java
package academic.system.enrollment.model; import lombok.Data; import java.util.Date; @Data public class Student { private int id; private String name; private String surname; private String dni; private String gender; private String phone; private String email; private String address; private Date date_birth; private String state; }
[ "you@example.com" ]
you@example.com
e6935c8558d1536ff97e529b971372f6b935951c
284b2d81f9f5547106be95b6e7092dd445decfa2
/src/main/java/pl/Wojtek/util/State.java
dae6852db80a3601461b47cad9832170ba998480
[ "MIT" ]
permissive
PythonicNinja/VaadinPictionary
a55b4c0e7c6ddf7f5f5a719c8a62a2716aabad8d
18ad6dec6dd5014c306ed1b3370013b9a6477b1c
refs/heads/master
2021-01-18T08:09:24.742595
2016-04-01T07:06:50
2016-04-01T07:06:50
52,731,664
0
0
null
null
null
null
UTF-8
Java
false
false
372
java
package pl.Wojtek.util; /** * */ public class State { private String name; public State(String s) { this.name = s; } public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String toString() { return "State(" + this.getName() + ")"; } }
[ "mail@pythonic.ninja" ]
mail@pythonic.ninja
35ea77637d25d7391d3a571d068006454791b6f0
cfc6767fd140df2a5abaab2ae0262ee8fbcb5c4f
/src/main/java/org/spongepowered/asm/launch/Blackboard.java
eb3860c7a5120e7405fa55858871e99d7807e6f7
[ "MIT" ]
permissive
OrionMinecraft/Mixin
ce391da55aa2f270fb6184c89c1696ed79f75196
861e833d03ce7add86f8bac3e08752a2b1c5e451
refs/heads/master
2021-07-01T03:52:26.436759
2017-09-17T15:23:46
2017-09-17T15:23:46
103,837,410
0
0
null
2017-09-17T14:58:50
2017-09-17T14:58:49
null
UTF-8
Java
false
false
4,410
java
/* * This file is part of Mixin, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.spongepowered.asm.launch; import org.spongepowered.asm.service.IMixinService; import org.spongepowered.asm.service.MixinService; /** * Abstractions for working with the blackboard */ public final class Blackboard { /** * Blackboard keys */ public static final class Keys { public static final String TWEAKCLASSES = "TweakClasses"; public static final String TWEAKS = "Tweaks"; public static final String INIT = "mixin.initialised"; public static final String AGENTS = "mixin.agents"; public static final String CONFIGS = "mixin.configs"; public static final String TRANSFORMER = "mixin.transformer"; public static final String PLATFORM_MANAGER = "mixin.platform"; public static final String FML_LOAD_CORE_MOD = "mixin.launch.fml.loadcoremodmethod"; public static final String FML_GET_REPARSEABLE_COREMODS = "mixin.launch.fml.reparseablecoremodsmethod"; public static final String FML_CORE_MOD_MANAGER = "mixin.launch.fml.coremodmanagerclass"; public static final String FML_GET_IGNORED_MODS = "mixin.launch.fml.ignoredmodsmethod"; private Keys() {} } private static IMixinService service; private Blackboard() {} private static IMixinService getService() { if (Blackboard.service == null) { Blackboard.service = MixinService.getService(); } return Blackboard.service; } /** * Get a value from the blackboard and duck-type it to the specified type * * @param key blackboard key * @param <T> duck type * @return value */ public static <T> T get(String key) { return Blackboard.getService().<T>getGlobalProperty(key); } /** * Put the specified value onto the blackboard * * @param key blackboard key * @param value new value */ public static void put(String key, Object value) { Blackboard.getService().setGlobalProperty(key, value); } /** * Get the value from the blackboard but return <tt>defaultValue</tt> if the * specified key is not set. * * @param key blackboard key * @param defaultValue value to return if the key is not set or is null * @param <T> duck type * @return value from blackboard or default value */ public static <T> T get(String key, T defaultValue) { return Blackboard.getService().getGlobalProperty(key, defaultValue); } /** * Get a string from the blackboard, returns default value if not set or * null. * * @param key blackboard key * @param defaultValue default value to return if the specified key is not * set or is null * @return value from blackboard or default */ public static String getString(String key, String defaultValue) { return Blackboard.getService().getGlobalPropertyString(key, defaultValue); } }
[ "adam@eq2.co.uk" ]
adam@eq2.co.uk
90a2be66a66c911a8d2f1fa9afce520ee8e6e03c
351ede50510f06a75b9d3a376f124ec99077a3c4
/mallplus-mbg/src/main/java/com/zrp/mallplus/build/mapper/BuildRepairMapper.java
9172be3a449f82bbf1e4069f7ef0575ae2fc1af0
[]
no_license
zhangRuiPei/mallPlus
5ada557425d27490d49a3cebd17a4ddc5993940d
e23741c50b0f4f1d65de438f0caaddd0c7794285
refs/heads/master
2022-12-17T22:42:29.697965
2020-09-14T09:36:44
2020-09-14T09:36:44
293,774,917
0
0
null
null
null
null
UTF-8
Java
false
false
300
java
package com.zrp.mallplus.build.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.zrp.mallplus.build.entity.BuildRepair; /** * <p> * Mapper 接口 * </p> * * @author zscat * @since 2019-12-02 */ public interface BuildRepairMapper extends BaseMapper<BuildRepair> { }
[ "695239914@qq.com" ]
695239914@qq.com
3c4d7e652f571a6496c65ab1a2f6914c0d3ca1c2
9b01ffa3db998c4bca312fd28aa977f370c212e4
/app/src/streamB/java/com/loki/singlemoduleapp/stub/SampleClass3002.java
a8e223e0afc7660401b02c9f4cddc80a9b8525c3
[]
no_license
SergiiGrechukha/SingleModuleApp
932488a197cb0936785caf0e73f592ceaa842f46
b7fefea9f83fd55dbbb96b506c931cc530a4818a
refs/heads/master
2022-05-13T17:15:21.445747
2017-07-30T09:55:36
2017-07-30T09:56:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
256
java
package stub; public class SampleClass3002 { private SampleClass3003 sampleClass; public SampleClass3002(){ sampleClass = new SampleClass3003(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
45b04316f2dbc42e4e8732e59e1d32b99f4a3225
6bd14132416cf75b4cb8b06485b2406aa581ed18
/cashloan-manage/src/main/java/com/xindaibao/cashloan/manage/controller/ManageSmsTplController.java
8d3cc24be07846d1c2ab42dd467c84a9d83ee6cc
[]
no_license
tanglongjia/cashloan
b21e6a5e4dc1c5629fc7167c5fb727a6033ba619
9b55e7f1b51b89016750b6d9a732d1e895209877
refs/heads/master
2020-06-18T06:51:12.348238
2018-12-14T03:12:07
2018-12-14T03:12:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,629
java
package com.xindaibao.cashloan.manage.controller; import java.util.HashMap; import java.util.Map; import javax.annotation.Resource; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import com.github.pagehelper.Page; import com.xindaibao.cashloan.cl.domain.SmsTpl; import com.xindaibao.cashloan.cl.service.SmsTplService; import com.xindaibao.cashloan.core.common.context.Constant; import com.xindaibao.cashloan.core.common.util.JsonUtil; import com.xindaibao.cashloan.core.common.util.RdPage; import com.xindaibao.cashloan.core.common.util.ServletUtils; import com.xindaibao.cashloan.core.common.web.controller.BaseController; /** * */ @Controller @Scope("prototype") public class ManageSmsTplController extends BaseController{ @Resource private SmsTplService smsTplService; /** * 短信模板列表 * @param searchParams * @param current * @param pageSize */ @SuppressWarnings("unchecked") @RequestMapping(value="/modules/manage/smstpl/list.htm",method={RequestMethod.GET}) public void listMessages(@RequestParam(value="searchParams",required=false) String searchParams, @RequestParam(value = "current") int current, @RequestParam(value = "pageSize") int pageSize){ Map<String, Object> params = JsonUtil.parse(searchParams, Map.class); Page<SmsTpl> page = smsTplService.list(params, current, pageSize); Map<String,Object> list = new HashMap<String,Object>(); list.put("list", page); Map<String,Object> result = new HashMap<String,Object>(); result.put(Constant.RESPONSE_DATA, list); result.put(Constant.RESPONSE_DATA_PAGE, new RdPage(page)); result.put(Constant.RESPONSE_CODE,Constant.SUCCEED_CODE_VALUE); result.put(Constant.RESPONSE_CODE_MSG, "获取成功"); ServletUtils.writeToResponse(response,result); } /** * 新增短信模板 * @param type * @param typeName * @param tpl * @param number */ @RequestMapping(value="/modules/manage/smstpl/save.htm",method={RequestMethod.POST}) public void save(@RequestParam(value="type") String type, @RequestParam(value="typeName") String typeName, @RequestParam(value="tpl") String tpl, @RequestParam(value="number") String number){ Map<String,Object> result = new HashMap<String,Object>(); SmsTpl smsTpl = new SmsTpl(); smsTpl.setNumber(number); smsTpl.setTpl(tpl); smsTpl.setType(type); smsTpl.setTypeName(typeName); smsTpl.setState("10"); int msg = smsTplService.insert(smsTpl); if (msg>0) { result.put(Constant.RESPONSE_CODE, Constant.SUCCEED_CODE_VALUE); result.put(Constant.RESPONSE_CODE_MSG, "添加成功"); } else { result.put(Constant.RESPONSE_CODE, Constant.FAIL_CODE_VALUE); result.put(Constant.RESPONSE_CODE_MSG, "添加失败"); } ServletUtils.writeToResponse(response,result); } /** * 修改短信模板 * @param params */ @RequestMapping(value="/modules/manage/smstpl/update.htm",method={RequestMethod.POST}) public void update(@RequestParam(value="type") String type, @RequestParam(value="typeName") String typeName, @RequestParam(value="tpl") String tpl, @RequestParam(value="number") String number, @RequestParam(value="id") long id){ Map<String,Object> result = new HashMap<String,Object>(); Map<String, Object> paramMap = new HashMap<String, Object>(); paramMap.put("type", type); paramMap.put("typeName", typeName); paramMap.put("id", id); paramMap.put("tpl", tpl); paramMap.put("number", number); int msg = smsTplService.updateSelective(paramMap); if (msg>0) { result.put(Constant.RESPONSE_CODE, Constant.SUCCEED_CODE_VALUE); result.put(Constant.RESPONSE_CODE_MSG, "修改成功"); } else { result.put(Constant.RESPONSE_CODE, Constant.FAIL_CODE_VALUE); result.put(Constant.RESPONSE_CODE_MSG, "修改失败"); } ServletUtils.writeToResponse(response,result); } /** * 禁用短信模板 * @param id */ @RequestMapping(value="/modules/manage/smstpl/disable.htm",method={RequestMethod.POST,RequestMethod.GET}) public void disable(@RequestParam(value="id") long id){ Map<String,Object> result = new HashMap<String,Object>(); Map<String, Object> paramMap = new HashMap<String, Object>(); paramMap.put("id",id); paramMap.put("state", "20"); int msg = smsTplService.updateSelective(paramMap); if (msg>0) { result.put(Constant.RESPONSE_CODE, Constant.SUCCEED_CODE_VALUE); result.put(Constant.RESPONSE_CODE_MSG, "禁用成功"); } else { result.put(Constant.RESPONSE_CODE, Constant.FAIL_CODE_VALUE); result.put(Constant.RESPONSE_CODE_MSG, "禁用失败"); } ServletUtils.writeToResponse(response,result); } /** * 启用短信模板 * @param id */ @RequestMapping(value="/modules/manage/smstpl/enable.htm",method={RequestMethod.POST,RequestMethod.GET}) public void enable(@RequestParam(value="id") long id){ Map<String,Object> result = new HashMap<String,Object>(); Map<String, Object> paramMap = new HashMap<String, Object>(); paramMap.put("id",id); paramMap.put("state", "10"); int msg = smsTplService.updateSelective(paramMap); if (msg>0) { result.put(Constant.RESPONSE_CODE, Constant.SUCCEED_CODE_VALUE); result.put(Constant.RESPONSE_CODE_MSG, "启用成功"); } else { result.put(Constant.RESPONSE_CODE, Constant.FAIL_CODE_VALUE); result.put(Constant.RESPONSE_CODE_MSG, "启用失败"); } ServletUtils.writeToResponse(response,result); } }
[ "15237815570@126.com" ]
15237815570@126.com
a48be9e59eb1468da6eba1544cb3e957103db56b
2e6e940606e4be0e0ea8367e3602a716935bb02e
/app/src/main/java/com/toro/helper/activity/HealthActivity.java
f9b4e3b4c065d0d78ec1cf1129cafebae1b11e67
[]
no_license
skypep/Family-Child
b88123f763e70c6d1faac70410e2cd4d53f7484a
f59ab1f15aa4d2a020f29fb1810de141413b9ea5
refs/heads/master
2020-04-11T08:04:37.453779
2018-12-13T11:47:27
2018-12-13T11:47:27
161,631,261
0
0
null
null
null
null
UTF-8
Java
false
false
6,789
java
package com.toro.helper.activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import android.widget.TextView; import com.toro.helper.R; import com.toro.helper.base.ToroActivity; import com.toro.helper.modle.BaseResponeData; import com.toro.helper.modle.DataModleParser; import com.toro.helper.modle.data.HealthInfo; import com.toro.helper.modle.data.ToroDataModle; import com.toro.helper.utils.ConnectManager; import com.toro.helper.utils.StringUtils; import com.toro.helper.view.MainActionBar; import com.toro.helper.view.calendarView.OnCalendarClickListener; import com.toro.helper.view.calendarView.WeekCalendarView; import org.joda.time.DateTime; /** * Create By liujia * on 2018/11/5. **/ public class HealthActivity extends ToroActivity { private static final String EXTRA_UID = "extra_uid"; private MainActionBar mainActionBar; private int uid; private WeekCalendarView weekCalendarView; private TextView curDateText; private TextView stepUpdateTimeText,heartRateUpdateTimeText,bloodOxygenUpdateTimeText; private TextView stepValueText,heartRateValueText,bloodOxygenValueText; private TextView stepUnitText,heartRateUnitText,bloodOxygenUnitText; private TextView stepEmptyText,heartRateEmptyText,bloodOxygenEmptyText; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fragment_health); uid = getIntent().getIntExtra(EXTRA_UID,0); initView(); mainActionBar.updateView(getString(R.string.health_data), R.mipmap.action_back_icon, 0, new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }, null); DateTime dt = new DateTime(); curDateText.setText(dt.getYear() + getString(R.string.date_time_year) + dt.getMonthOfYear() + getString(R.string.date_time_mouth) + dt.getDayOfMonth() + getString(R.string.date_time_day) + " " + getString(R.string.date_time_week) + StringUtils.getChiniseNumber(this,dt.getDayOfWeek())); updateData(dt.getYear(),dt.getMonthOfYear(),dt.getDayOfMonth()); } @Override protected void onResume() { super.onResume(); } private void initView() { weekCalendarView = findViewById(R.id.mWcvCalendar); mainActionBar = findViewById(R.id.main_action_view); curDateText = findViewById(R.id.mToDayTv); stepUpdateTimeText = findViewById(R.id.textView14); heartRateUpdateTimeText = findViewById(R.id.textView18); bloodOxygenUpdateTimeText = findViewById(R.id.textView22); stepValueText = findViewById(R.id.textView13); heartRateValueText = findViewById(R.id.textView17); bloodOxygenValueText = findViewById(R.id.textView21); stepUnitText = findViewById(R.id.textView12); heartRateUnitText = findViewById(R.id.textView16); bloodOxygenUnitText = findViewById(R.id.textView20); stepEmptyText = findViewById(R.id.empty_step); heartRateEmptyText = findViewById(R.id.textView31); bloodOxygenEmptyText = findViewById(R.id.textView32); weekCalendarView.setOnCalendarClickListener(new OnCalendarClickListener() { @Override public void onClickDate(int year, int month, int day) { updateData(year,month+1,day); } @Override public void onPageChange(int year, int month, int day) { updateData(year,month+1,day); } }); resetView(); } private void resetView() { showStepEmpty(); showHeartRateEmpty(); showBloodOxygenEmpty(); } private void updateView(HealthInfo info) { stepEmptyText.setVisibility(View.GONE); stepValueText.setVisibility(View.VISIBLE); stepUpdateTimeText.setVisibility(View.VISIBLE); stepUnitText.setVisibility(View.VISIBLE); stepValueText.setText(info.getStep()+""); stepUpdateTimeText.setText(info.getStepDate()); heartRateEmptyText.setVisibility(View.GONE); heartRateValueText.setVisibility(View.VISIBLE); heartRateUpdateTimeText.setVisibility(View.VISIBLE); heartRateUnitText.setVisibility(View.VISIBLE); heartRateValueText.setText(info.getHrrest()); heartRateUpdateTimeText.setText(info.getMeasureDate()); bloodOxygenEmptyText.setVisibility(View.GONE); bloodOxygenValueText.setVisibility(View.VISIBLE); bloodOxygenUnitText.setVisibility(View.VISIBLE); bloodOxygenUpdateTimeText.setVisibility(View.VISIBLE); bloodOxygenValueText.setText(info.getBloodOxygen()); bloodOxygenUpdateTimeText.setText(info.getMeasureDate()); } private void updateData(int year,int mouth,int day) { String mouthString = mouth < 10?"0" + mouth:mouth + ""; String dayString = day < 10?"0" + day:day + ""; ConnectManager.getInstance().getHealthData(this,uid,year + "-" + mouthString + "-" + dayString, ToroDataModle.getInstance().getLocalData().getToken()); } private void showStepEmpty() { stepEmptyText.setVisibility(View.VISIBLE); stepValueText.setVisibility(View.GONE); stepUpdateTimeText.setVisibility(View.GONE); stepUnitText.setVisibility(View.GONE); } private void showHeartRateEmpty() { heartRateEmptyText.setVisibility(View.VISIBLE); heartRateValueText.setVisibility(View.GONE); heartRateUpdateTimeText.setVisibility(View.GONE); heartRateUnitText.setVisibility(View.GONE); } private void showBloodOxygenEmpty() { bloodOxygenEmptyText.setVisibility(View.VISIBLE); bloodOxygenValueText.setVisibility(View.GONE); bloodOxygenUnitText.setVisibility(View.GONE); bloodOxygenUpdateTimeText.setVisibility(View.GONE); } @Override public boolean bindData(int tag, Object object) { boolean status = super.bindData(tag, object); if(status) { BaseResponeData data = DataModleParser.parserBaseResponeData((String) object); HealthInfo info = HealthInfo.newInstance(data.getEntry()); if(info != null) { updateView(info); }else { resetView(); } } else { resetView(); } return status; } public static Intent createIntent(Context context, int uid) { Intent intent = new Intent(); intent.setClass(context,HealthActivity.class); intent.putExtra(EXTRA_UID,uid); return intent; } }
[ "lj@toro-tech.com" ]
lj@toro-tech.com
4ed6b133d433cb77bb07f7059eff7590d7145087
2cd64269df4137e0a39e8e67063ff3bd44d72f1b
/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyMeEmailConfirmTest.java
c1e906f59a82c38537604f1bbbf11c114c30fbc9
[ "Apache-2.0", "GPL-2.0-only", "EPL-2.0", "CDDL-1.0", "MIT", "BSD-3-Clause", "Classpath-exception-2.0" ]
permissive
commercetools/commercetools-sdk-java-v2
a8703f5f8c5dde6cc3ebe4619c892cccfcf71cb8
76d5065566ff37d365c28829b8137cbc48f14df1
refs/heads/main
2023-08-14T16:16:38.709763
2023-08-14T11:58:19
2023-08-14T11:58:19
206,558,937
29
13
Apache-2.0
2023-09-14T12:30:00
2019-09-05T12:30:27
Java
UTF-8
Java
false
false
3,894
java
package com.commercetools.api.client.resource; import java.nio.charset.StandardCharsets; import java.util.concurrent.CompletableFuture; import com.commercetools.api.client.ApiRoot; import com.tngtech.junit.dataprovider.DataProvider; import com.tngtech.junit.dataprovider.DataProviderExtension; import com.tngtech.junit.dataprovider.UseDataProvider; import com.tngtech.junit.dataprovider.UseDataProviderExtension; import io.vrap.rmf.base.client.*; import io.vrap.rmf.base.client.ApiHttpClient; import io.vrap.rmf.base.client.ApiHttpRequest; import io.vrap.rmf.base.client.VrapHttpClient; import io.vrap.rmf.base.client.error.ApiClientException; import io.vrap.rmf.base.client.error.ApiServerException; import io.vrap.rmf.base.client.utils.Generated; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mockito; @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @ExtendWith(UseDataProviderExtension.class) @ExtendWith(DataProviderExtension.class) public class ByProjectKeyInStoreKeyByStoreKeyMeEmailConfirmTest { private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); private final String projectKey = "test_projectKey"; private final static ApiRoot apiRoot = ApiRoot.of(); private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); @TestTemplate @UseDataProvider("requestWithMethodParameters") public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); } @TestTemplate @UseDataProvider("executeMethodParameters") public void executeServerException(ClientRequestCommand<?> httpRequest) throws Exception { Mockito.when(httpClientMock.execute(Mockito.any())) .thenReturn(CompletableFuture.completedFuture( new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) .hasCauseInstanceOf(ApiServerException.class); } @TestTemplate @UseDataProvider("executeMethodParameters") public void executeClientException(ClientRequestCommand<?> httpRequest) throws Exception { Mockito.when(httpClientMock.execute(Mockito.any())) .thenReturn(CompletableFuture.completedFuture( new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) .hasCauseInstanceOf(ApiClientException.class); } @DataProvider public static Object[][] requestWithMethodParameters() { return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") .inStoreKeyWithStoreKeyValue("test_storeKey") .me() .emailConfirm() .post(com.commercetools.api.models.customer.MyCustomerEmailVerify.of()) .createHttpRequest(), "post", "test_projectKey/in-store/key=test_storeKey/me/email/confirm", } }; } @DataProvider public static Object[][] executeMethodParameters() { return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") .inStoreKeyWithStoreKeyValue("test_storeKey") .me() .emailConfirm() .post(com.commercetools.api.models.customer.MyCustomerEmailVerify.of()), } }; } }
[ "automation@commercetools.com" ]
automation@commercetools.com
eda63f675dfe27db23761cda1ccd4c1660755f28
2ec905b5b130bed2aa6f1f37591317d80b7ce70d
/ihmc-ros-tools/src/main/generated-java/ethz_asl_icp_mapper/MatchCloudsResponse.java
d94ba4a0885bd49426ec7dc580e226be53a56613
[ "Apache-2.0" ]
permissive
ihmcrobotics/ihmc-open-robotics-software
dbb1f9d7a4eaf01c08068b7233d1b01d25c5d037
42a4e385af75e8e13291d6156a5c7bebebbecbfd
refs/heads/develop
2023-09-01T18:18:14.623332
2023-09-01T14:16:26
2023-09-01T14:16:26
50,613,360
227
91
null
2023-01-25T21:39:35
2016-01-28T21:00:16
Java
UTF-8
Java
false
false
372
java
package ethz_asl_icp_mapper; public interface MatchCloudsResponse extends org.ros.internal.message.Message { static final java.lang.String _TYPE = "ethz_asl_icp_mapper/MatchCloudsResponse"; static final java.lang.String _DEFINITION = "geometry_msgs/Transform transform"; geometry_msgs.Transform getTransform(); void setTransform(geometry_msgs.Transform value); }
[ "dcalvert@ihmc.us" ]
dcalvert@ihmc.us
ceffe2451785eade2c095b1bd6eaf0315d8336d2
d06f031a2c7cb37895d0dea7e1f49070a018f298
/src/main/java/okjiaoyu/qa/middle/auto/testcase/teacherspace/teachingresources/coursepackage/Api1_2.java
69656cf2b66f2e6ef5cdf91d992106d7f7bdb9c3
[]
no_license
mylove132/monitor_middle_whole
398124830f96996f8acea63d21a0f135eb68fd61
4f8279a29b0351ddba3dc69116ae879ebf5a7820
refs/heads/master
2022-07-17T05:31:38.950432
2019-11-06T08:17:00
2019-11-06T08:17:00
219,944,397
0
0
null
2022-06-21T02:14:56
2019-11-06T08:10:23
Java
UTF-8
Java
false
false
1,269
java
package okjiaoyu.qa.middle.auto.testcase.teacherspace.teachingresources.coursepackage; import okjiaoyu.qa.middle.auto.testcase.teacherspace.TeacherSpace; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import org.testng.annotations.Test; import java.util.ArrayList; import java.util.List; import java.util.Map; //共享课程包 public class Api1_2 extends TeacherSpace { @Override public void getParams(Map<String, String> param) { //params for Get request List<NameValuePair> getRequestParms = new ArrayList<>(); //parms getRequestParms.add(new BasicNameValuePair("custom_directory_id", param.get("custom_directory_id"))); getRequestParms.add(new BasicNameValuePair("custom_system_id", param.get("custom_system_id"))); getRequestParms.add(new BasicNameValuePair("id", param.get("id"))); requestSampler.setGetRequsetParams(getRequestParms); } @Test(dataProvider = "providerMethod", groups = {"normal"}) public void test(Map<String, String> param) { getRequest(param); } @Test(dataProvider = "providerMethod", groups = {"exception"}) public void exceptionTest(Map<String, String> param) { getRequest(param); } }
[ "liuzhanhui@okay.cn" ]
liuzhanhui@okay.cn
59c16dc5ffe85c31cada4242efa7246c53c031d0
dedd8b238961dbb6889a864884e011ce152d1d5c
/src/com/nineoldandroids/animation/Keyframe.java
b01cd3e81262fef8afd92c068495498f9cb6ab62
[]
no_license
reverseengineeringer/gov.cityofboston.commonwealthconnect
d553a8a7a4fcd7b846eebadb6c1e3e9294919eb7
1a829995d5527f4d5798fa578ca1b0fe499839e1
refs/heads/master
2021-01-10T05:08:31.188375
2016-03-19T20:37:17
2016-03-19T20:37:17
54,285,966
0
1
null
null
null
null
UTF-8
Java
false
false
4,782
java
package com.nineoldandroids.animation; import android.view.animation.Interpolator; public abstract class Keyframe implements Cloneable { float mFraction; boolean mHasValue = false; private Interpolator mInterpolator = null; Class mValueType; public static Keyframe ofFloat(float paramFloat) { return new FloatKeyframe(paramFloat); } public static Keyframe ofFloat(float paramFloat1, float paramFloat2) { return new FloatKeyframe(paramFloat1, paramFloat2); } public static Keyframe ofInt(float paramFloat) { return new IntKeyframe(paramFloat); } public static Keyframe ofInt(float paramFloat, int paramInt) { return new IntKeyframe(paramFloat, paramInt); } public static Keyframe ofObject(float paramFloat) { return new ObjectKeyframe(paramFloat, null); } public static Keyframe ofObject(float paramFloat, Object paramObject) { return new ObjectKeyframe(paramFloat, paramObject); } public abstract Keyframe clone(); public float getFraction() { return mFraction; } public Interpolator getInterpolator() { return mInterpolator; } public Class getType() { return mValueType; } public abstract Object getValue(); public boolean hasValue() { return mHasValue; } public void setFraction(float paramFloat) { mFraction = paramFloat; } public void setInterpolator(Interpolator paramInterpolator) { mInterpolator = paramInterpolator; } public abstract void setValue(Object paramObject); static class FloatKeyframe extends Keyframe { float mValue; FloatKeyframe(float paramFloat) { mFraction = paramFloat; mValueType = Float.TYPE; } FloatKeyframe(float paramFloat1, float paramFloat2) { mFraction = paramFloat1; mValue = paramFloat2; mValueType = Float.TYPE; mHasValue = true; } public FloatKeyframe clone() { FloatKeyframe localFloatKeyframe = new FloatKeyframe(getFraction(), mValue); localFloatKeyframe.setInterpolator(getInterpolator()); return localFloatKeyframe; } public float getFloatValue() { return mValue; } public Object getValue() { return Float.valueOf(mValue); } public void setValue(Object paramObject) { if ((paramObject != null) && (paramObject.getClass() == Float.class)) { mValue = ((Float)paramObject).floatValue(); mHasValue = true; } } } static class IntKeyframe extends Keyframe { int mValue; IntKeyframe(float paramFloat) { mFraction = paramFloat; mValueType = Integer.TYPE; } IntKeyframe(float paramFloat, int paramInt) { mFraction = paramFloat; mValue = paramInt; mValueType = Integer.TYPE; mHasValue = true; } public IntKeyframe clone() { IntKeyframe localIntKeyframe = new IntKeyframe(getFraction(), mValue); localIntKeyframe.setInterpolator(getInterpolator()); return localIntKeyframe; } public int getIntValue() { return mValue; } public Object getValue() { return Integer.valueOf(mValue); } public void setValue(Object paramObject) { if ((paramObject != null) && (paramObject.getClass() == Integer.class)) { mValue = ((Integer)paramObject).intValue(); mHasValue = true; } } } static class ObjectKeyframe extends Keyframe { Object mValue; ObjectKeyframe(float paramFloat, Object paramObject) { mFraction = paramFloat; mValue = paramObject; boolean bool; if (paramObject != null) { bool = true; mHasValue = bool; if (!mHasValue) { break label48; } } label48: for (paramObject = paramObject.getClass();; paramObject = Object.class) { mValueType = ((Class)paramObject); return; bool = false; break; } } public ObjectKeyframe clone() { ObjectKeyframe localObjectKeyframe = new ObjectKeyframe(getFraction(), mValue); localObjectKeyframe.setInterpolator(getInterpolator()); return localObjectKeyframe; } public Object getValue() { return mValue; } public void setValue(Object paramObject) { mValue = paramObject; if (paramObject != null) {} for (boolean bool = true;; bool = false) { mHasValue = bool; return; } } } } /* Location: * Qualified Name: com.nineoldandroids.animation.Keyframe * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
0dcd2e7717c7aaf437c68cae3c10956a000d0a23
9c2ee93014f91da3e6eb37bebe9bfd54e9b07591
/models/src/main/java/com/emc/storageos/model/StringHashMapEntry.java
86a469d3e30bf8d67eb881fab1d5bdbc3849b626
[ "Apache-2.0" ]
permissive
jasoncwik/controller-client-java
c0b58be4c579ad9d748dc9a5d674be5ec12d4d24
b1c115f73393381a58fd819e758dae55968ff488
refs/heads/master
2021-01-18T16:24:57.131929
2014-03-13T15:27:30
2014-03-13T15:27:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,164
java
/** * Copyright (c) 2008-2011 EMC Corporation * All Rights Reserved * * This software contains the intellectual property of EMC Corporation * or is licensed to EMC Corporation from third parties. Use of this * software and the intellectual property contained therein is expressly * limited to the terms and conditions of the License Agreement under which * it is provided by or on behalf of EMC. */ package com.emc.storageos.model; import javax.xml.bind.annotation.XmlElement; /** * The class represent an entry for REST representation of a Map<String,String> * */ public class StringHashMapEntry { private String name; private String value; public StringHashMapEntry() {} public StringHashMapEntry(String name, String value) { this.name = name; this.value = value; } @XmlElement(name = "name") public String getName() { return name; } public void setName(String name) { this.name = name; } @XmlElement(name = "value") public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
[ "Christopher.Dail@emc.com" ]
Christopher.Dail@emc.com
116000202d54bb0d832410a8553e5f68386a63df
db5e2811d3988a5e689b5fa63e748c232943b4a0
/jadx/sources/o/C0332.java
8c82c32518e618980a3de7037cfa9467de4be074
[]
no_license
ghuntley/TraceTogether_1.6.1.apk
914885d8be7b23758d161bcd066a4caf5ec03233
b5c515577902482d741cabdbd30f883a016242f8
refs/heads/master
2022-04-23T16:59:33.038690
2020-04-27T05:44:49
2020-04-27T05:44:49
259,217,124
0
0
null
null
null
null
UTF-8
Java
false
false
682
java
package o; /* renamed from: o.ıɞ reason: contains not printable characters */ final class C0332 implements Runnable { /* renamed from: ı reason: contains not printable characters */ private final /* synthetic */ C0366 f3687; /* renamed from: ɩ reason: contains not printable characters */ private final /* synthetic */ C3178 f3688; C0332(C3178 r1, C0366 r2) { this.f3688 = r1; this.f3687 = r2; } public final void run() { synchronized (this.f3688.f14438.f14517) { if (!this.f3688.f14438.f14517.isEmpty()) { this.f3687.m4555(this.f3688.f14438.f14517.get(0)); } } } }
[ "ghuntley@ghuntley.com" ]
ghuntley@ghuntley.com
d20c844837c214ce58f56502c22e8f2d300b13fa
38dca1e231079a0ea12c293e9f95de5c3ad12efd
/app/src/main/java/com/example/foody/PageOrder/LichsuFragment.java
2f8c43948425bc2d68133dc43de3dc72787d9531
[]
no_license
voquangnha1998/foody
eac8ad688a8b571d2b8cdcc1f476208fb91010f9
63455643962f0ee8dbcb45d55fbea0c8df3d286f
refs/heads/master
2023-01-18T17:09:18.152376
2020-11-15T08:34:39
2020-11-15T08:34:39
312,989,165
0
0
null
null
null
null
UTF-8
Java
false
false
7,616
java
package com.example.foody.PageOrder; import android.app.DatePickerDialog; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.DatePicker; import android.widget.ListView; import android.widget.Spinner; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import com.example.foody.R; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; public class LichsuFragment extends Fragment { View V; Spinner spinner; TextView ngaytruoc,ngaysau; ListView listView; Context context; CustomAdapter customAdapter; ArrayList<CountriesModel> countriesData; CountriesModel countriesModel; public LichsuFragment(){ } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { V = inflater.inflate(R.layout.lichsu,container,false); Employee[] employees = EmployeeDataUtils.getEmployees(); spinner = (Spinner) V.findViewById(R.id.spinner); ArrayAdapter<Employee> LTRadapter = new ArrayAdapter<Employee>(this.getActivity(), R.layout.spinner_item, employees); LTRadapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line); spinner.setAdapter(LTRadapter); ngaytruoc = (TextView) V.findViewById(R.id.ngaytruoc); ngaysau = (TextView) V.findViewById(R.id.ngaysau); layngay(); ngaytruoc.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { chonngay(); } }); ngaysau.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { chonngaysau(); } }); listView = V.findViewById(R.id.list); countriesData = new ArrayList<>(); //addlichsudata LichsuaddData(); context = this.getActivity(); customAdapter = new CustomAdapter(context, countriesData); listView.setAdapter(customAdapter); //setsukien listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) { } }); return V; } private void layngay(){ Calendar calendar = Calendar.getInstance(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd,MM,yyyy"); ngaytruoc.setText(simpleDateFormat.format(calendar.getTime())); ngaysau.setText(simpleDateFormat.format(calendar.getTime())); } private void chonngay(){ final Calendar calendar = Calendar.getInstance(); int ngay = calendar.get(Calendar.DATE); int thang = calendar.get(Calendar.MONTH); int nam = calendar.get(Calendar.YEAR); DatePickerDialog datePickerDialog = new DatePickerDialog(this.getActivity(), new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) { calendar.set(year,month,dayOfMonth); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd,MM,yyyy"); ngaytruoc.setText(simpleDateFormat.format(calendar.getTime())); } },nam,thang,ngay); datePickerDialog.show(); } private void chonngaysau(){ final Calendar calendar = Calendar.getInstance(); int ngay = calendar.get(Calendar.DATE); int thang = calendar.get(Calendar.MONTH); int nam = calendar.get(Calendar.YEAR); DatePickerDialog datePickerDialog = new DatePickerDialog(this.getActivity(), new DatePickerDialog.OnDateSetListener() { @Override public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) { calendar.set(year,month,dayOfMonth); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd,MM,yyyy"); ngaysau.setText(simpleDateFormat.format(calendar.getTime())); } },nam,thang,ngay); datePickerDialog.show(); } private void LichsuaddData() { //food1 countriesModel = new CountriesModel(); countriesModel.setId(1); countriesModel.setImg(R.drawable.gongcha); countriesModel.setTencuahang("Gong Cha Đà Nẵng"); countriesModel.setTensp("Trà sữa khoai môn full thạch Size M"); countriesModel.setDiachi("30 Nguyễn Văn Linh"); countriesModel.setNgaythang("20/10/2020"); countriesData.add(countriesModel); //food2 countriesModel = new CountriesModel(); countriesModel.setId(2); countriesModel.setImg(R.drawable.gongcha); countriesModel.setTencuahang("Gong Cha Đà Nẵng"); countriesModel.setTensp("Trà sữa khoai môn full thạch Size M"); countriesModel.setDiachi("30 Nguyễn Văn Linh"); countriesModel.setNgaythang("20/10/2020"); countriesData.add(countriesModel); //food3 countriesModel = new CountriesModel(); countriesModel.setId(3); countriesModel.setImg(R.drawable.gongcha); countriesModel.setTencuahang("Gong Cha Đà Nẵng"); countriesModel.setTensp("Trà sữa khoai môn full thạch Size M"); countriesModel.setDiachi("30 Nguyễn Văn Linh"); countriesModel.setNgaythang("20/10/2020"); countriesData.add(countriesModel); //food4 countriesModel = new CountriesModel(); countriesModel.setId(4); countriesModel.setImg(R.drawable.gongcha); countriesModel.setTencuahang("Gong Cha Đà Nẵng"); countriesModel.setTensp("Trà sữa khoai môn full thạch Size M"); countriesModel.setDiachi("30 Nguyễn Văn Linh"); countriesModel.setNgaythang("20/10/2020"); countriesData.add(countriesModel); //food5 countriesModel = new CountriesModel(); countriesModel.setId(5); countriesModel.setImg(R.drawable.gongcha); countriesModel.setTencuahang("Gong Cha Đà Nẵng"); countriesModel.setTensp("Trà sữa khoai môn full thạch Size M"); countriesModel.setDiachi("30 Nguyễn Văn Linh"); countriesModel.setNgaythang("20/10/2020"); countriesData.add(countriesModel); //food6 countriesModel = new CountriesModel(); countriesModel.setId(6); countriesModel.setImg(R.drawable.gongcha); countriesModel.setTencuahang("Gong Cha Đà Nẵng"); countriesModel.setTensp("Trà sữa khoai môn full thạch Size M"); countriesModel.setDiachi("30 Nguyễn Văn Linh"); countriesModel.setNgaythang("20/10/2020"); countriesData.add(countriesModel); //food7 countriesModel = new CountriesModel(); countriesModel.setId(7); countriesModel.setImg(R.drawable.gongcha); countriesModel.setTencuahang("Gong Cha Đà Nẵng"); countriesModel.setTensp("Trà sữa khoai môn full thạch Size M"); countriesModel.setDiachi("30 Nguyễn Văn Linh"); countriesModel.setNgaythang("20/10/2020"); countriesData.add(countriesModel); } }
[ "you@example.com" ]
you@example.com
efb531d365e892fddec8b185923be0a10d905732
7e6acb0d23e368a3ca0b813458cf47b7eaf7c10f
/JavaProgramming/src/ch05/homework01/ForMultiplicationTableExample.java
8d5268e02f9b55108e8ae6cbb23569ff7262495a
[]
no_license
KoByungWook/PrivateRepository
12493c8bfe8869f7adfe67a6b1f46fd4e1f75bd3
2d1d6fbdf1f75941eb206da87631e57b89d09d34
refs/heads/master
2021-01-20T00:52:01.068782
2017-08-09T05:32:14
2017-08-09T05:32:14
89,203,318
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
297
java
package ch05.homework01; public class ForMultiplicationTableExample { public static void main(String[] args) { for(int m=2 ; m<=9 ; m++) { System.out.println("*** " + m + "´Ü ***"); for(int n=1 ; n<=9 ; n++) { System.out.println(m + "x " + n + " = " + (m*n)); } } } }
[ "rhquddnr0219@gmail.com" ]
rhquddnr0219@gmail.com
a96ed5c1737c03c0b931cd4e1b58fe2c4bbc5946
7992fc70ac93a52891d99e6fe23879e5158d0371
/src/main/java/com/tvd12/ezyfox/sfs2x/serverhandler/MessageEventHandler.java
5074bc41a5bde21828aed2a6ed2db0c15702b9f5
[ "Apache-2.0" ]
permissive
youngmonkeys/ezyfox-sfs2x
d95526361b2939d90bda524b7a45bc45c03f375e
bc93e479f4ed522b7b9c31931efda7d0f9b272d3
refs/heads/master
2021-12-26T07:02:49.687419
2021-12-21T02:25:51
2021-12-21T02:25:51
60,058,366
3
10
null
2017-10-27T15:20:25
2016-05-31T04:33:38
Java
UTF-8
Java
false
false
2,102
java
package com.tvd12.ezyfox.sfs2x.serverhandler; import com.smartfoxserver.v2.entities.data.ISFSObject; import com.smartfoxserver.v2.entities.data.SFSObject; import com.tvd12.ezyfox.core.content.impl.BaseAppContext; import com.tvd12.ezyfox.core.reflect.ReflectMethodUtil; import com.tvd12.ezyfox.core.structure.MessageParamsClass; import com.tvd12.ezyfox.core.structure.ServerHandlerClass; import com.tvd12.ezyfox.sfs2x.serializer.RequestParamDeserializer; import com.tvd12.ezyfox.sfs2x.serializer.ResponseParamSerializer; /** * Support to handle event related to message * * @author tavandung12 * Created on May 26, 2016 * */ public abstract class MessageEventHandler extends ServerBaseEventHandler { /** * @param context the context */ public MessageEventHandler(BaseAppContext context) { super(context); } /** * Propagate event to handlers * * @param message message data * @param params addition data to send */ protected void notifyToHandlers(Object message, ISFSObject params) { if(params == null) params = new SFSObject(); for(ServerHandlerClass handler : handlers) { notifyToHandler(handler, message, params); } } /** * Propagate event to handler * * @param handler structure of handler class * @param message message data * @param params addition data to send */ protected void notifyToHandler(ServerHandlerClass handler, Object message, ISFSObject params) { Object object = handler.newInstance(); MessageParamsClass paramsClass = context.getMessageParamsClass(object.getClass()); if(paramsClass == null) paramsClass = new MessageParamsClass(object.getClass()); new RequestParamDeserializer().deserialize(paramsClass.getWrapper(), params, object); ReflectMethodUtil.invokeHandleMethod( handler.getHandleMethod(), object, context, message); new ResponseParamSerializer().object2params(paramsClass.getUnwrapper(), object, params); } }
[ "dungtv@puppetteam.com" ]
dungtv@puppetteam.com
3212341f21d41dfc1deb331022755ac95ec673cb
6439b86464aa8fe865057aed9e237ae147cf7157
/src/main/java/com/pro/social/media/agent/servicedto/ReplyMailServiceDto.java
8758a43e7bf6d1d17451f9ecfbb7dc422b19c627
[]
no_license
Ranjeetkumars/sma
1e7b2080083779386163ed42a964a995e519fd74
b3620ddbc2ecb69d4dd1680b6dc33a8e70770d4e
refs/heads/master
2023-07-27T16:18:04.719081
2021-09-03T08:08:06
2021-09-03T08:08:06
402,694,441
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
package com.pro.social.media.agent.servicedto; import lombok.Getter; import lombok.Setter; import lombok.ToString; @Setter @Getter @ToString public class ReplyMailServiceDto { private String strfrom_mailId_jkey; private String strSubject_jkey; private String oldMessageBody_jkey; private String newReplyMailBody_jkey; }
[ "ranjeetkumar@procreate.co.in" ]
ranjeetkumar@procreate.co.in
d92af08d8da87d3b658d5c9236ea726b9343a51e
ac7651d5c15f26e42a6ee807adfc83a30940bcda
/apps/webapps/artist-bo-webapp/src/main/java/fr/k2i/adbeback/webapp/bean/security/RoleBean.java
fe0b4449ac4df8231a9da675220628d90babfc31
[]
no_license
icudroid/mtzik-v2
8763c23439e5fd3aa581a1abc60d760715c667ab
e977d7afda35b62a689c5ab0080b2f9204f942ff
refs/heads/master
2021-01-13T14:37:54.649304
2016-12-17T13:08:13
2016-12-17T13:08:13
76,724,596
0
0
null
null
null
null
UTF-8
Java
false
false
583
java
package fr.k2i.adbeback.webapp.bean.security; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; import lombok.ToString; import lombok.experimental.Builder; import java.util.ArrayList; import java.util.List; /** * User: dimitri * Date: 07/01/15 * Time: 11:03 * Goal: */ @Getter @Setter @ToString @AllArgsConstructor @Builder public class RoleBean{ private Integer id; private String name; private String description; private List<PermissionBean> permissions; public RoleBean(){ permissions = new ArrayList<>(); } }
[ "dimitri@d-kahn.net" ]
dimitri@d-kahn.net
4417dc14ae1f7ce10eaee80ee81a59ef6bf0d138
1719fafc232144f05f071832e7feee3e715885a3
/libretrofit/src/main/java/com/haier/cellarette/libretrofit/common/ResponseSlbBean2.java
78f77f7b31d26cdf971f28edbfd02a9d44f82c92
[]
no_license
xeon-ye/geeklibs
b1b19a1eb6ff259cb0797a02f46f883568f6c8ff
5c0f4d257f65a1d5b2e62c76a50f7fd2e4ff43bc
refs/heads/main
2023-07-08T05:19:10.627179
2021-08-20T03:27:00
2021-08-20T03:27:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,123
java
package com.haier.cellarette.libretrofit.common; public class ResponseSlbBean2<T> { private boolean success; private String code; private String message; private T data; public ResponseSlbBean2() { } public boolean isSuccess() { return success; } public void setSuccess(boolean success) { this.success = success; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMsg() { return message; } public void setMsg(String msg) { this.message = msg; } public T getData() { return data; } public void setData(T data) { this.data = data; } public String toString() { StringBuilder sb = new StringBuilder(); sb.append("success: ").append(this.success).append("\n"); sb.append("code: ").append(this.code).append("\n"); sb.append("msg: ").append(this.message).append("\n"); sb.append("data: ").append(this.data).append("\n"); return sb.toString(); } }
[ "liangxiao6@live.com" ]
liangxiao6@live.com
ad01517212c7562be6bef62a3f91357b275a2b49
b69c56bf195a6283a4f537160fd8bd44da4608a9
/src/main/java/ru/dias/entites/Product.java
ee7a3bbe5893315f7cfa87b44aef9a328b5568cb
[]
no_license
IDmitrenko/spring1mvc
137b558c33656b9bc8a02c73d3f3639742d48515
17e24471183dbecd82fa64e8276bcd4fadfc6c7c
refs/heads/master
2021-01-05T16:12:50.076071
2020-02-19T13:13:06
2020-02-19T13:13:06
241,072,093
0
0
null
2020-06-18T17:17:28
2020-02-17T09:51:01
Java
UTF-8
Java
false
false
719
java
package ru.dias.entites; import java.math.BigDecimal; public class Product { private Long id; private String title; private BigDecimal cost; public Product() { } public Product(Long id, String title, BigDecimal cost) { this.id = id; this.title = title; this.cost = cost; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public BigDecimal getCost() { return cost; } public void setCost(BigDecimal cost) { this.cost = cost; } }
[ "Dias64@mail.ru" ]
Dias64@mail.ru
c976c59990722bd336ae8796877ddbc970c42055
afd3a2aff126c345536d1b9ff1c2e19aa8aed139
/source/branches/prototype-v2/at.rc.tacos.platform.model/src/at/rc/tacos/platform/iface/ITransportPriority.java
5e72d5e352aabad431e77643253d711131109d32
[]
no_license
mheiss/rc-tacos
5705e6e8aabe0b98b2626af0a6a9598dd5a7a41d
df7e1dbef5287d46ee2fc9c3f76f0f7f0ffeb08b
refs/heads/master
2021-01-09T05:27:45.141578
2017-02-02T22:15:58
2017-02-02T22:15:58
80,772,164
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,067
java
package at.rc.tacos.platform.iface; /** * The available priorities for a transport * Available transport priorities in the system: A to G * The user shown transort priorities are 1 to 7 * @author b.thek */ public interface ITransportPriority { /** A (1) NEF und RTW entsenden */ public final static String TRANSPORT_PRIORITY_EMERGENCY_DOCTOR_INTERNAL = "A"; /** B (2) RTW mit BD1 entsenden */ public final static String TRANSPORT_PRIORITY_BLUELIGHT = "B"; /** C (3) normaler Transport */ public final static String TRANSPORT_PRIORITY_TRANSPORT = "C"; /** D (4) Rücktransport (von ambulant) */ public final static String TRANSPORT_PRIORITY_BACK_TRANSPORT = "D"; /** E (5) Heimtransport (von stationär) */ public final static String TRANSPORT_PRIORITY_HOME_TRANSPORT = "E"; /** F (6) Sonstiges (Dienstfahrten,...) */ public final static String TRANSPORT_PRIORITY_OTHER = "F"; /** G (7) NEF für andere Bezirksstelle entsenden */ public final static String TRANSPORT_PRIORITY_EMERGENCY_DOCTOR_EXTERNAL = "G"; }
[ "michael.heiss@outlook.at" ]
michael.heiss@outlook.at
7324edb31dab4c3d39125108f9092a537ca592e2
27f6a988ec638a1db9a59cf271f24bf8f77b9056
/Code-Hunt-data/users/User031/Sector2-Level1/attempt141-20140920-172243.java
e4d3425d982052ed3ece764b69ae16bac8393260
[]
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
495
java
public class Program { public static int Puzzle(int[] a) { int arr = a.length; int count=0; for(int i = 0; i < arr; i++){ count = count + a[i]; } if(count >= 0){ count = ((count+(count%arr))/arr); }else{ if((count%arr==0 && (arr!=1)) || (count%arr<=2 && arr==4) || (arr == 5 && count%arr+1!=0 && count!=arr+1) || (arr == 6)){ count = ((count+(count%arr))/arr)+1; }else{ count = ((count-(count%arr))/arr); } } return count; } }
[ "liiabiia@yahoo.com" ]
liiabiia@yahoo.com
25daa00706c4aac783f2b792b46e5e8d39db0c80
07d5605350374bc7a17ac1c75b3f40b059d07945
/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_people/auto/_AbstractPerson.java
01c4534ce5fe2535a1ea484faa0f2186ac233426
[ "Apache-2.0" ]
permissive
wx930910/cayenne_refactoring
839521ac1245fd91183312b94b6004b2b6bb115e
b5356d80b9d6a8bb0f763bf4e748c4669f4b1a87
refs/heads/master
2023-01-30T04:49:52.767938
2020-12-15T07:17:25
2020-12-15T07:17:25
314,658,092
0
0
null
null
null
null
UTF-8
Java
false
false
3,820
java
package org.apache.cayenne.testdo.inheritance_people.auto; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.List; import org.apache.cayenne.BaseDataObject; import org.apache.cayenne.exp.Property; import org.apache.cayenne.testdo.inheritance_people.PersonNotes; /** * Class _AbstractPerson was generated by Cayenne. * It is probably a good idea to avoid changing this class manually, * since it may be overwritten next time code is regenerated. * If you need to make any customizations, please use subclass. */ public abstract class _AbstractPerson extends BaseDataObject { private static final long serialVersionUID = 1L; public static final String PERSON_ID_PK_COLUMN = "PERSON_ID"; public static final Property<String> NAME = Property.create("name", String.class); public static final Property<String> PERSON_TYPE = Property.create("personType", String.class); public static final Property<List<PersonNotes>> NOTES = Property.create("notes", List.class); protected String name; protected String personType; protected Object notes; public void setName(String name) { beforePropertyWrite("name", this.name, name); this.name = name; } public String getName() { beforePropertyRead("name"); return this.name; } public void setPersonType(String personType) { beforePropertyWrite("personType", this.personType, personType); this.personType = personType; } public String getPersonType() { beforePropertyRead("personType"); return this.personType; } public void addToNotes(PersonNotes obj) { addToManyTarget("notes", obj, true); } public void removeFromNotes(PersonNotes obj) { removeToManyTarget("notes", obj, true); } @SuppressWarnings("unchecked") public List<PersonNotes> getNotes() { return (List<PersonNotes>)readProperty("notes"); } @Override public Object readPropertyDirectly(String propName) { if(propName == null) { throw new IllegalArgumentException(); } switch(propName) { case "name": return this.name; case "personType": return this.personType; case "notes": return this.notes; default: return super.readPropertyDirectly(propName); } } @Override public void writePropertyDirectly(String propName, Object val) { if(propName == null) { throw new IllegalArgumentException(); } switch (propName) { case "name": this.name = (String)val; break; case "personType": this.personType = (String)val; break; case "notes": this.notes = val; break; default: super.writePropertyDirectly(propName, val); } } private void writeObject(ObjectOutputStream out) throws IOException { writeSerialized(out); } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { readSerialized(in); } @Override protected void writeState(ObjectOutputStream out) throws IOException { super.writeState(out); out.writeObject(this.name); out.writeObject(this.personType); out.writeObject(this.notes); } @Override protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException { super.readState(in); this.name = (String)in.readObject(); this.personType = (String)in.readObject(); this.notes = in.readObject(); } }
[ "wx19930910@gmail.com" ]
wx19930910@gmail.com
d133748f3b49773649b1a8ad856cd5fa9493f0a7
daf5382837918087f2e6fd90a39725d43b931ed3
/Spring-IOC/ConstDepInjectionCollection/src/com/srcsys/Question.java
d2c1c9797f2171bb5306a45ed065508fd282987e
[]
no_license
amitmca/Spring
b51e7c0246585ae02ef57afa53ee012d510364c2
09b251ee812a8c49b698abde995dd46674ee1099
refs/heads/master
2023-01-12T08:43:29.295766
2021-05-10T02:39:34
2021-05-10T02:39:34
133,842,672
0
0
null
2022-12-29T19:44:06
2018-05-17T16:46:35
JavaScript
UTF-8
Java
false
false
523
java
package com.srcsys; import java.util.Iterator; import java.util.List; public class Question { private int id; private String name; private List<String> answers; public Question() {} public Question(int id, String name, List<String> answers) { super(); this.id = id; this.name = name; this.answers = answers; } public void displayInfo(){ System.out.println(id+" "+name); System.out.println("Answers are:"); Iterator<String> itr=answers.iterator(); while(itr.hasNext()){ System.out.println(itr.next()); } } }
[ "amitbaramatimca@gmail.com" ]
amitbaramatimca@gmail.com
f51f85580a15252d8638ab88fe3c32e4e658c179
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/31/org/apache/commons/math3/geometry/partitioning/AbstractRegion_AbstractRegion_141.java
47f1dc9cbce94d20dc1b92ef6e8217221252ad93
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,365
java
org apach common math3 geometri partit abstract region independ geometri type dimens param type space param type space version abstract region abstractregion space space region build convex region arrai bound hyperplan param hyperplan arrai bound hyperplan empti region built abstract region abstractregion hyperplan hyperplan hyperplan hyperplan length tree bsp tree bsptree boolean fals hyperplan build tree hyperplan space wholespac tree gettre chop part space bsp tree bsptree node tree node set attribut setattribut boolean true hyperplan hyperplan hyperplan node insert cut insertcut hyperplan node set attribut setattribut node getplu set attribut setattribut boolean fals node node minu getminu node set attribut setattribut boolean true
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
1eaef73fee639076f0f1a3c31a86bd5e992cd96c
795f6c626e5d7a07c01bb66386f710795180a02e
/n_mastercp/src/org/csapi/www/ui_data/schema/TpUICollectCriteria.java
2e6841c8fb1a84a3360373b5d5630fd0208f3300
[]
no_license
hungdt138/mastercp
6d426c56f6cfd5d95dfcdba1b98dad2b163ebb30
7cdff6f328156e9a5c450d1cfb9829ce0f60ef71
refs/heads/master
2021-01-22T08:23:20.726286
2014-07-17T12:23:33
2014-07-17T12:23:33
21,679,708
0
1
null
null
null
null
UTF-8
Java
false
false
4,582
java
/** * TpUICollectCriteria.java * * This file was auto-generated from WSDL * by the Apache Axis 1.2.1 Aug 08, 2005 (11:49:10 PDT) WSDL2Java emitter. */ package org.csapi.www.ui_data.schema; public class TpUICollectCriteria implements java.io.Serializable { private int minLength; private int maxLength; private java.lang.String endSequence; private int startTimeout; private int interCharTimeout; public TpUICollectCriteria() { } public TpUICollectCriteria( int minLength, int maxLength, java.lang.String endSequence, int startTimeout, int interCharTimeout) { this.minLength = minLength; this.maxLength = maxLength; this.endSequence = endSequence; this.startTimeout = startTimeout; this.interCharTimeout = interCharTimeout; } /** * Gets the minLength value for this TpUICollectCriteria. * * @return minLength */ public int getMinLength() { return minLength; } /** * Sets the minLength value for this TpUICollectCriteria. * * @param minLength */ public void setMinLength(int minLength) { this.minLength = minLength; } /** * Gets the maxLength value for this TpUICollectCriteria. * * @return maxLength */ public int getMaxLength() { return maxLength; } /** * Sets the maxLength value for this TpUICollectCriteria. * * @param maxLength */ public void setMaxLength(int maxLength) { this.maxLength = maxLength; } /** * Gets the endSequence value for this TpUICollectCriteria. * * @return endSequence */ public java.lang.String getEndSequence() { return endSequence; } /** * Sets the endSequence value for this TpUICollectCriteria. * * @param endSequence */ public void setEndSequence(java.lang.String endSequence) { this.endSequence = endSequence; } /** * Gets the startTimeout value for this TpUICollectCriteria. * * @return startTimeout */ public int getStartTimeout() { return startTimeout; } /** * Sets the startTimeout value for this TpUICollectCriteria. * * @param startTimeout */ public void setStartTimeout(int startTimeout) { this.startTimeout = startTimeout; } /** * Gets the interCharTimeout value for this TpUICollectCriteria. * * @return interCharTimeout */ public int getInterCharTimeout() { return interCharTimeout; } /** * Sets the interCharTimeout value for this TpUICollectCriteria. * * @param interCharTimeout */ public void setInterCharTimeout(int interCharTimeout) { this.interCharTimeout = interCharTimeout; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof TpUICollectCriteria)) return false; TpUICollectCriteria other = (TpUICollectCriteria) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && this.minLength == other.getMinLength() && this.maxLength == other.getMaxLength() && ((this.endSequence==null && other.getEndSequence()==null) || (this.endSequence!=null && this.endSequence.equals(other.getEndSequence()))) && this.startTimeout == other.getStartTimeout() && this.interCharTimeout == other.getInterCharTimeout(); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; _hashCode += getMinLength(); _hashCode += getMaxLength(); if (getEndSequence() != null) { _hashCode += getEndSequence().hashCode(); } _hashCode += getStartTimeout(); _hashCode += getInterCharTimeout(); __hashCodeCalc = false; return _hashCode; } }
[ "hungd138@outlook.com" ]
hungd138@outlook.com
b0d88263c3dd2ae2894331a0f670a941625c5365
89050d714d31b72232cdaeed588dc70ebe20f098
/SPSEJBService/ejbModule/estimate/ejb/SpsetwirDao.java
55d5a5cf90c57ee4411a3e044e39de467b1f8a3b
[]
no_license
se3mis/SPS_VERSION
8c185823b2e7ded17a8bd1a84a4bd5eaf7874b8d
50f25979a095e94125c57ca2604d41969f873de9
refs/heads/master
2016-09-14T01:55:23.537357
2016-05-06T05:56:38
2016-05-06T05:56:38
58,184,917
0
0
null
null
null
null
UTF-8
Java
false
false
3,597
java
package estimate.ejb; import java.util.List; import javax.ejb.Stateless; import javax.persistence.NonUniqueResultException; import javax.persistence.PersistenceException; import javax.persistence.Query; import util.emSelect.EmSelector; import estimate.model.Spsetwir; import estimate.model.SpsetwirPK; /** * Session Bean implementation class SpsetwirDao */ @Stateless public class SpsetwirDao extends EmSelector implements SpsetwirDaoRemote, SpsetwirDaoLocal { /** * Default constructor. */ public SpsetwirDao() { // TODO Auto-generated constructor stub } @Override public void createSpsetwir(Spsetwir spsetwir, String webAppName) { //getEntityManager(webAppName); getEntityManager(webAppName).persist(spsetwir); } @SuppressWarnings("unchecked") @Override public List<Spsetwir> getAll(String deptId, String webAppName) { //getEntityManager(webAppName); String qryStr = "select a from Spsetwir a where a.id.deptId=:deptId"; Query query = getEntityManager(webAppName).createQuery(qryStr); query.setParameter("deptId", deptId); List<Spsetwir> list = query.getResultList(); return list; } @Override public void updateSpsetwir(Spsetwir spsetwir, String webAppName) { //getEntityManager(webAppName); getEntityManager(webAppName).merge(spsetwir); } @Override public void removeSpsetwir(Spsetwir spsetwir, String webAppName) { //getEntityManager(webAppName); spsetwir=getEntityManager(webAppName).merge(spsetwir); getEntityManager(webAppName).remove(spsetwir); } @Override public void removeAll(String webAppName) { //getEntityManager(webAppName); throw new UnsupportedOperationException("Not supported yet."); } @SuppressWarnings("unchecked") @Override public Spsetwir findById(SpsetwirPK id, String webAppName) throws PersistenceException { //getEntityManager(webAppName); String qryStr = "select a from Spsetwir a where a.id.applicationNo = :applicationNo AND a.id.deptId = :deptId AND a.id.matCd= :matCd "; Query query = getEntityManager(webAppName).createQuery(qryStr); query.setParameter("applicationNo", id.getApplicationNo()); query.setParameter("deptId", id.getDeptId()); query.setParameter("matCd", id.getMatCd()); List<Spsetwir> list = query.getResultList(); if (list.isEmpty()) return null; else if (list.size() == 1) return list.get(0); throw new NonUniqueResultException(); } @SuppressWarnings("unchecked") @Override public List<Spsetwir> getWireList(String applicationNo, String deptId, String webAppName) throws PersistenceException { //getEntityManager(webAppName); String qryStr = "select a from Spsetwir a where a.id.applicationNo = :applicationNo AND a.id.deptId = :deptId "; Query query = getEntityManager(webAppName).createQuery(qryStr); query.setParameter("applicationNo", applicationNo); query.setParameter("deptId", deptId); List<Spsetwir> list = query.getResultList(); return list; } @SuppressWarnings("unchecked") @Override public List<Spsetwir> getWireList(String applicationNo, String webAppName) throws PersistenceException { //getEntityManager(webAppName); String qryStr = "select a from Spsetwir a where a.id.applicationNo = :applicationNo "; Query query = getEntityManager(webAppName).createQuery(qryStr); query.setParameter("applicationNo", applicationNo); List<Spsetwir> list = query.getResultList(); return list; } }
[ "se3mis@ceb.lk" ]
se3mis@ceb.lk
0bb54b8c0c0dcd99cafeb166a2d21d313da6f102
2328022c0fdb34596a98092b4b5aa38550f23b53
/cv97/SceneGraphObject.java
fc0ba6332c8d74beef8c7c0243cce04cee26ee88
[]
no_license
cybergarage/CyberToolbox4Java3D
2d90f09af90a49aac783a0da819a4bb570013935
936b7c7274b6f1a12c4b806aff1f2c797c842e25
refs/heads/master
2023-03-23T18:54:45.209327
2014-12-03T16:36:33
2014-12-03T16:36:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
825
java
/****************************************************************** * * CyberVRML97 for Java * * Copyright (C) Satoshi Konno 1997-1998 * * File : SceneGraphObject.java * ******************************************************************/ package cv97; import cv97.node.*; public interface SceneGraphObject { public boolean initialize(SceneGraph sg); public boolean uninitialize(SceneGraph sg); public NodeObject createNodeObject(SceneGraph sg, cv97.node.Node node); public boolean addNode(SceneGraph sg, Node node); public boolean removeNode(SceneGraph sg, Node node); public boolean update(SceneGraph sg); public boolean remove(SceneGraph sg); public boolean start(SceneGraph sg); public boolean stop(SceneGraph sg); public boolean setRenderingMode(SceneGraph sg, int mode); }
[ "skonno@cybergarage.org" ]
skonno@cybergarage.org
0ff7fe8e88ab1d949b1e1dedf725fe6014ac1bfa
a0735993b2c8756c9452ee73c33411fe63707d79
/loris-base/src/main/java/com/loris/base/web/http/HttpUtil.java
7a2ca9d6724442cc903b9d258889d980fd01b9d2
[]
no_license
dsjzzwdy0/Finance
433de43a916d783a3f0713a77256af1879db2727
c5e889bac50bf963cd90fd3f40ceac9e4b33f0fe
refs/heads/master
2022-12-27T17:16:26.890097
2019-05-24T09:16:53
2019-05-24T09:16:53
155,797,343
2
1
null
2022-12-16T09:57:05
2018-11-02T01:26:55
Java
UTF-8
Java
false
false
3,040
java
/* * @Author Irakli Nadareishvili * CVS-ID: $Id: HttpUtil.java,v 1.2 2005/01/25 11:43:29 idumali Exp $ * * Copyright (c) 2004 Development Gateway Foundation, Inc. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Common Public License v1.0 which accompanies this * distribution, and is available at: * http://www.opensource.org/licenses/cpl.php * *****************************************************************************/ package com.loris.base.web.http; import java.net.MalformedURLException; import java.net.URL; import org.apache.log4j.Logger; public class HttpUtil { protected static Logger log = Logger.getLogger(UrlFetcher.class); // 200 - ok public final static int OK_200 = 200; // 300 - redirect public final static int PARTIAL_CONTENT_206 = 206; public final static int MOVED_PERMANENTLY_301 = 301; public final static int FOUND_302 = 302; public final static int SEE_OTHER_303 = 303; public final static int TEMPORARY_REDIRECT_307 = 307; // 400 - client error public final static int NOT_FOUND_404 = 404; public final static int REQUESTED_RANGE_NOT_SATISFIABLE_416 = 416; public static String getBaseUriFromUrl(String url) throws MalformedURLException { URL javaURL = new URL(url); String path = javaURL.getPath(); int index = path.lastIndexOf("/"); if (index == -1) { return ""; } else { return path.substring(0, index); } } /** * URLs, in anchors, can come in three flavours: * <li>Canonical (begining with "http://") * <li>Absolute, non-canonical (begining with "/") * <li>Relative (not begining with either "http" or "/") * * @param domain * @param baseUrl * @param link * @return */ public static String canonizeURL(String domain, String baseUrl, String link) { link = link.trim(); String ret = ""; if (link.startsWith("javascript") || link.startsWith("mailto:")) { ret = ""; // Illegal URL } else if (link.startsWith("http")) { ret = link; } else if (link.startsWith("www.")) { ret = "http://" + link; } else if (link.startsWith("/")) { int indx = 0; if (domain.endsWith("/")) { indx = 1; } ret = domain.substring(indx) + link; } else { String slash2 = "/"; if (!domain.endsWith("/")) domain = domain + "/"; if (baseUrl.startsWith("/")) baseUrl = baseUrl.substring(1); if (link.startsWith("/")) link = link.substring(1); if (baseUrl.equals("")) { slash2 = ""; } if (baseUrl.endsWith("/")) { slash2 = ""; } if (link.equals("")) { slash2 = ""; } // System.out.println( domain + "%1%" + baseUrl + "%3%" + slash2 + // "%4%" + link ); ret = domain + baseUrl + slash2 + link; } return ret; } public static String getDomainFromUrl(String url) throws MalformedURLException { URL javaURL = new URL(url); return javaURL.getProtocol() + "://" + javaURL.getHost() + (javaURL.getPort() != -1 ? ":" + javaURL.getPort() : ""); } }
[ "dsjzzwdy0@163.com" ]
dsjzzwdy0@163.com
c2784bf65b1dcd26d93b8d8832134c3fc4f88322
642323b88f6a3f9050d3ce297b80c02715ba08db
/Java OOP Basics/BashSoftOOPBasics/src/main/bg/softuni/network/DownloadManager.java
bf4db252d9a27aa2bdc9504d923a2bf6d83327a2
[]
no_license
VenelinBakalov/javaAdvanced
5a9e418c6666f85fe8a8d1e65d587a863af367b9
d890a84fa56af2e24669e60f48f6d776cf55e9ef
refs/heads/master
2021-01-11T21:07:45.912758
2017-12-03T15:39:27
2017-12-03T15:39:27
79,252,307
8
8
null
null
null
null
UTF-8
Java
false
false
2,593
java
package main.bg.softuni.network; import main.bg.softuni.exceptions.InvalidPathException; import main.bg.softuni.io.OutputWriter; import main.bg.softuni.staticData.SessionData; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.nio.channels.Channels; import java.nio.channels.ReadableByteChannel; public class DownloadManager { public void download(String fileUrl) { URL url; ReadableByteChannel rbc = null; FileOutputStream fos = null; try { if (Thread.currentThread().getName().equals("main")) { OutputWriter.writeMessageOnNewLine("Started downloading.."); } url = new URL(fileUrl); rbc = Channels.newChannel(url.openStream()); String fileName = extractNameOfFile(url.toString()); File file = new File(SessionData.currentPath + "/" + fileName); fos = new FileOutputStream(file); fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); if (Thread.currentThread().getName().equals("main")) { OutputWriter.writeMessageOnNewLine("Download complete."); } } catch (MalformedURLException e) { OutputWriter.displayException(e.getMessage()); } catch (IOException e) { OutputWriter.displayException(e.getMessage()); } finally { try { if (fos != null) { fos.close(); } } catch (IOException e) { e.printStackTrace(); } finally { if (rbc != null) { try { rbc.close(); } catch (IOException e) { e.printStackTrace(); } } } } } public void downloadOnNewThread(String fileUrl) { Thread thread = new Thread(() -> download(fileUrl)); thread.setDaemon(false); OutputWriter.writeMessageOnNewLine( String.format("Worker thread %d started download..", thread.getId())); SessionData.threadPool.add(thread); thread.start(); } private String extractNameOfFile(String fileUrl) throws MalformedURLException { int indexOfLastSlash = fileUrl.lastIndexOf('/'); if (indexOfLastSlash == -1) { throw new InvalidPathException(); } return fileUrl.substring(indexOfLastSlash + 1); } }
[ "venelin_bakalov@abv.bg" ]
venelin_bakalov@abv.bg
7cd9b92a267c7b79b21ce109468f0a1f0454f35f
c3a89d0a50d41bd22a8196c42f3520b279689966
/src/main/java/org/diorite/material/blocks/others/CarpetMat.java
1e3781d0bc8b0b7239bc1c830520127fe0cb293f
[ "MIT" ]
permissive
piotrpiatyszek/Diorite-API
e4938b6bc6f04b2f42f2d7befeb64966aa498f59
06c68c997747ff9db051003d2ce0fc65aadeb90e
refs/heads/master
2021-05-31T01:32:37.024564
2015-07-01T09:22:45
2015-07-01T09:22:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,763
java
package org.diorite.material.blocks.others; import java.util.Map; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.diorite.DyeColor; import org.diorite.cfg.magic.MagicNumbers; import org.diorite.material.BlockMaterialData; import org.diorite.material.ColorableMat; import org.diorite.utils.collections.maps.CaseInsensitiveMap; import gnu.trove.map.TByteObjectMap; import gnu.trove.map.hash.TByteObjectHashMap; /** * Class representing block "Carpet" and all its subtypes. */ public class CarpetMat extends BlockMaterialData implements ColorableMat { /** * Sub-ids used by diorite/minecraft by default */ public static final byte USED_DATA_VALUES = 16; /** * Blast resistance of block, can be changed only before server start. * Final copy of blast resistance from {@link MagicNumbers} class. */ public static final float BLAST_RESISTANCE = MagicNumbers.MATERIAL__CARPET__BLAST_RESISTANCE; /** * Hardness of block, can be changed only before server start. * Final copy of hardness from {@link MagicNumbers} class. */ public static final float HARDNESS = MagicNumbers.MATERIAL__CARPET__HARDNESS; public static final CarpetMat CARPET_WHITE = new CarpetMat(); public static final CarpetMat CARPET_ORANGE = new CarpetMat(DyeColor.ORANGE); public static final CarpetMat CARPET_MAGENTA = new CarpetMat(DyeColor.MAGENTA); public static final CarpetMat CARPET_LIGHT_BLUE = new CarpetMat(DyeColor.LIGHT_BLUE); public static final CarpetMat CARPET_YELLOW = new CarpetMat(DyeColor.YELLOW); public static final CarpetMat CARPET_LIME = new CarpetMat(DyeColor.LIME); public static final CarpetMat CARPET_PINK = new CarpetMat(DyeColor.PINK); public static final CarpetMat CARPET_GRAY = new CarpetMat(DyeColor.GRAY); public static final CarpetMat CARPET_SILVER = new CarpetMat(DyeColor.SILVER); public static final CarpetMat CARPET_CYAN = new CarpetMat(DyeColor.CYAN); public static final CarpetMat CARPET_PURPLE = new CarpetMat(DyeColor.PURPLE); public static final CarpetMat CARPET_BLUE = new CarpetMat(DyeColor.BLUE); public static final CarpetMat CARPET_BROWN = new CarpetMat(DyeColor.BROWN); public static final CarpetMat CARPET_GREEN = new CarpetMat(DyeColor.GREEN); public static final CarpetMat CARPET_RED = new CarpetMat(DyeColor.RED); public static final CarpetMat CARPET_BLACK = new CarpetMat(DyeColor.BLACK); private static final Map<String, CarpetMat> byName = new CaseInsensitiveMap<>(USED_DATA_VALUES, SMALL_LOAD_FACTOR); private static final TByteObjectMap<CarpetMat> byID = new TByteObjectHashMap<>(USED_DATA_VALUES, SMALL_LOAD_FACTOR); protected final DyeColor color; @SuppressWarnings("MagicNumber") protected CarpetMat() { super("CARPET", 171, "minecraft:carpet", "WHITE", DyeColor.WHITE.getBlockFlag()); this.color = DyeColor.WHITE; } protected CarpetMat(final DyeColor color) { super(CARPET_WHITE.name(), CARPET_WHITE.ordinal(), CARPET_WHITE.getMinecraftId(), color.name(), color.getBlockFlag()); this.color = color; } protected CarpetMat(final String enumName, final int id, final String minecraftId, final int maxStack, final String typeName, final byte type, final DyeColor color) { super(enumName, id, minecraftId, maxStack, typeName, type); this.color = color; } @Override public float getBlastResistance() { return BLAST_RESISTANCE; } @Override public float getHardness() { return HARDNESS; } @Override public CarpetMat getType(final String name) { return getByEnumName(name); } @Override public CarpetMat getType(final int id) { return getByID(id); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).appendSuper(super.toString()).append("color", this.color).toString(); } @Override public DyeColor getColor() { return this.color; } @Override public CarpetMat getColor(final DyeColor color) { return getByID(color.getBlockFlag()); } /** * Returns one of Carpet sub-type based on sub-id, may return null * * @param id sub-type id * * @return sub-type of Carpet or null */ public static CarpetMat getByID(final int id) { return byID.get((byte) id); } /** * Returns one of Carpet sub-type based on name (selected by diorite team), may return null * If block contains only one type, sub-name of it will be this same as name of material. * * @param name name of sub-type * * @return sub-type of Carpet or null */ public static CarpetMat getByEnumName(final String name) { return byName.get(name); } /** * Returns one of Carpet sub-type based on {@link DyeColor}. * It will never return null; * * @param color color of Carpet * * @return sub-type of Carpet */ public static CarpetMat getCarpet(final DyeColor color) { return getByID(color.getBlockFlag()); } /** * Register new sub-type, may replace existing sub-types. * Should be used only if you know what are you doing, it will not create fully usable material. * * @param element sub-type to register */ public static void register(final CarpetMat element) { byID.put((byte) element.getType(), element); byName.put(element.name(), element); } @Override public CarpetMat[] types() { return CarpetMat.carpetTypes(); } /** * @return array that contains all sub-types of this block. */ public static CarpetMat[] carpetTypes() { return byID.values(new CarpetMat[byID.size()]); } static { CarpetMat.register(CARPET_WHITE); CarpetMat.register(CARPET_ORANGE); CarpetMat.register(CARPET_MAGENTA); CarpetMat.register(CARPET_LIGHT_BLUE); CarpetMat.register(CARPET_YELLOW); CarpetMat.register(CARPET_LIME); CarpetMat.register(CARPET_PINK); CarpetMat.register(CARPET_GRAY); CarpetMat.register(CARPET_SILVER); CarpetMat.register(CARPET_CYAN); CarpetMat.register(CARPET_PURPLE); CarpetMat.register(CARPET_BLUE); CarpetMat.register(CARPET_BROWN); CarpetMat.register(CARPET_GREEN); CarpetMat.register(CARPET_RED); CarpetMat.register(CARPET_BLACK); } }
[ "bartlomiejkmazur@gmail.com" ]
bartlomiejkmazur@gmail.com
8c326b163f93e07fa3f42f213b7a4d6b2a1cbeb6
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/websearch/widget/c/a/c.java
414ad91a1430b825e9c8652140760e5a6d2673a1
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
3,602
java
package com.tencent.mm.plugin.websearch.widget.c.a; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.text.TextUtils; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.pluginsdk.model.app.h; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.platformtools.MMApplicationContext; import com.tencent.mm.sdk.platformtools.Util; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public final class c implements a { private boolean c(final Context paramContext, final String paramString, Map<String, String> paramMap) { AppMethodBeat.i(116664); if ((paramContext == null) || (TextUtils.isEmpty(paramString))) { AppMethodBeat.o(116664); return false; } try { paramString = paramContext.getPackageManager().getLaunchIntentForPackage(paramString); if (paramString != null) { paramMap = paramMap.entrySet().iterator(); while (paramMap.hasNext()) { Map.Entry localEntry = (Map.Entry)paramMap.next(); paramString.putExtra((String)localEntry.getKey(), (String)localEntry.getValue()); } } com.tencent.mm.ci.a.post(new Runnable() { public final void run() { AppMethodBeat.i(116660); h.b(paramContext, paramString, ""); AppMethodBeat.o(116660); } }); } catch (Exception paramContext) { Log.e("OpenAppNativeApp", Util.stackTraceToString(paramContext)); AppMethodBeat.o(116664); return false; } AppMethodBeat.o(116664); return true; } public final boolean biQ(String paramString) { AppMethodBeat.i(116662); if (TextUtils.isEmpty(paramString)) { AppMethodBeat.o(116662); return false; } boolean bool = paramString.startsWith("app://"); AppMethodBeat.o(116662); return bool; } public final boolean biR(String paramString) { AppMethodBeat.i(116663); if (!biQ(paramString)) { AppMethodBeat.o(116663); return false; } Object localObject = Uri.parse(paramString); paramString = ((Uri)localObject).getQueryParameter("pkgName"); String str1 = ((Uri)localObject).getQueryParameter("extra"); String str2 = ((Uri)localObject).getQueryParameter("extraIntentKey"); localObject = ((Uri)localObject).getQueryParameter("fallbackUrl"); HashMap localHashMap = new HashMap(); if ((!TextUtils.isEmpty(str1)) && (!TextUtils.isEmpty(str2))) { localHashMap.put(str2, str1); } if (!c(MMApplicationContext.getContext(), paramString, localHashMap)) { paramString = new Intent(); paramString.putExtra("rawUrl", (String)localObject); paramString.putExtra("useJs", true); com.tencent.mm.br.c.b(MMApplicationContext.getContext(), "webview", ".ui.tools.WebViewUI", paramString); } AppMethodBeat.o(116663); return true; } public final boolean xJ(long paramLong) { AppMethodBeat.i(116661); boolean bool = com.tencent.mm.plugin.websearch.widget.c.c.aJ(paramLong, 1); AppMethodBeat.o(116661); return bool; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar * Qualified Name: com.tencent.mm.plugin.websearch.widget.c.a.c * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
db6e36eb4e3d43405cb4ed6fb3e4215e58d96b8c
2164abbdf155117137ad3e3084bdcb4f6888230f
/userapp/src/test/java/com/naresh/userapp/UserappApplicationTests.java
3df35ab03d4cf495e1f5767eab798aab789b7b49
[]
no_license
nareshkumar-h/microservice-training
0235c9cb818b6281dab011f1137d6757aba80867
9181cfcd282a02c2010b0e0884d8c871cb9a9c65
refs/heads/master
2020-08-09T17:48:40.575983
2019-10-10T09:05:48
2019-10-10T09:05:48
214,136,466
0
0
null
null
null
null
UTF-8
Java
false
false
336
java
package com.naresh.userapp; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class UserappApplicationTests { @Test public void contextLoads() { } }
[ "nareshkumarh@live.com" ]
nareshkumarh@live.com
698b96118c1fcfcd4a857524a70606e03ebee83d
231a828518021345de448c47c31f3b4c11333d0e
/src/pdf/bouncycastle/crypto/modes/gcm/Tables4kGCMMultiplier.java
5331ecbe06f8e81510ec786f169a84a7b8d68da8
[]
no_license
Dynamit88/PDFBox-Java
f39b96b25f85271efbb3a9135cf6a15591dec678
480a576bc97fc52299e1e869bb80a1aeade67502
refs/heads/master
2020-05-24T14:58:29.287880
2019-05-18T04:25:21
2019-05-18T04:25:21
187,312,933
0
0
null
null
null
null
UTF-8
Java
false
false
1,547
java
package pdf.bouncycastle.crypto.modes.gcm; import pdf.bouncycastle.util.Arrays; import pdf.bouncycastle.util.Pack; public class Tables4kGCMMultiplier implements GCMMultiplier { private byte[] H; private long[][] T; public void init(byte[] H) { if (T == null) { T = new long[256][2]; } else if (Arrays.areEqual(this.H, H)) { return; } this.H = Arrays.clone(H); // T[0] = 0 // T[1] = H.p^7 GCMUtil.asLongs(this.H, T[1]); GCMUtil.multiplyP7(T[1], T[1]); for (int n = 2; n < 256; n += 2) { // T[2.n] = T[n].p^-1 GCMUtil.divideP(T[n >> 1], T[n]); // T[2.n + 1] = T[2.n] + T[1] GCMUtil.xor(T[n], T[1], T[n + 1]); } } public void multiplyH(byte[] x) { // long[] z = new long[2]; // GCMUtil.copy(T[x[15] & 0xFF], z); // for (int i = 14; i >= 0; --i) // { // GCMUtil.multiplyP8(z); // GCMUtil.xor(z, T[x[i] & 0xFF]); // } // Pack.longToBigEndian(z, x, 0); long[] t = T[x[15] & 0xFF]; long z0 = t[0], z1 = t[1]; for (int i = 14; i >= 0; --i) { t = T[x[i] & 0xFF]; long c = z1 << 56; z1 = t[1] ^ ((z1 >>> 8) | (z0 << 56)); z0 = t[0] ^ (z0 >>> 8) ^ c ^ (c >>> 1) ^ (c >>> 2) ^ (c >>> 7); } Pack.longToBigEndian(z0, x, 0); Pack.longToBigEndian(z1, x, 8); } }
[ "vtuse@mail.ru" ]
vtuse@mail.ru
6f601cbfff6635087327bcb782b459717bc4901b
23a210a857e1d8cda630f3ad40830e2fc8bb2876
/emp_7.3/emp/rms/com/montnets/emp/rms/rmstask/biz/ReplyParams.java
299320763f3a2e18b76cff2edfd047ccfb1faf2a
[]
no_license
zengyijava/shaoguang
415a613b20f73cabf9ab171f3bf64a8233e994f8
5d8ad6fa54536e946a15b5e7e7a62eb2e110c6b0
refs/heads/main
2023-04-25T07:57:11.656001
2021-05-18T01:18:49
2021-05-18T01:18:49
368,159,409
0
0
null
null
null
null
UTF-8
Java
false
false
695
java
package com.montnets.emp.rms.rmstask.biz; public class ReplyParams { //手机号 private String phone = ""; //姓名 private String name = ""; //回复内容 private String content = ""; //回复时间 private String time = ""; public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } }
[ "2461418944@qq.com" ]
2461418944@qq.com
8cefbc4991942113b64a56f39c4afae3c03dfe54
81477def65389853d9bc2fae8e2b5d806a2ecb48
/src/com/haxademic/app/kacheout/game/Shard.java
a7516ae70258b8cc8a2e729b3e1f33b51b6fde52
[ "MIT" ]
permissive
Abujules/haxademic
5d86886fc73f012f30857e99d0b689a98bc02801
3b7bd3bbc43cf2c214ace706a3232d8683ce1cae
refs/heads/master
2021-01-15T21:44:03.185081
2015-01-28T07:13:53
2015-01-28T07:13:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,748
java
package com.haxademic.app.kacheout.game; import toxi.geom.Vec3D; import toxi.geom.mesh.WETriangleMesh; import com.haxademic.core.draw.util.ThreeDeeUtil; import com.haxademic.core.math.MathUtil; public class Shard { protected WETriangleMesh _mesh; protected Vec3D _origPos; protected Vec3D _curPos; protected Vec3D _speed; protected Vec3D _rotationSpeed; protected Vec3D _curRotation; public Shard( WETriangleMesh mesh, float x, float y, float z ) { _mesh = mesh; ThreeDeeUtil.addPositionToMesh( mesh, x, y, z ); _origPos = mesh.computeCentroid(); _curPos = mesh.computeCentroid(); _speed = new Vec3D( 0, 0, 0 ); _curRotation = new Vec3D( 0, 0, 0 ); _rotationSpeed = new Vec3D( MathUtil.randRangeDecimal( -0.1f, 0.1f ), MathUtil.randRangeDecimal( -0.1f, 0.1f ), MathUtil.randRangeDecimal( -0.1f, 0.1f ) ); } public WETriangleMesh mesh() { return _mesh; } public void update() { _curPos.x += _speed.x; _curPos.y += _speed.y; _curPos.z += _speed.z; _mesh.center( new Vec3D( _curPos.x, _curPos.y, _curPos.z ) ); _curRotation.x = _curRotation.x + _rotationSpeed.x; _curRotation.y = _curRotation.y + _rotationSpeed.y; _curRotation.x = _curRotation.z + _rotationSpeed.z; // _mesh.rotateX( _curRotation.x ); // _mesh.rotateY( _curRotation.y ); // _mesh.rotateZ( _curRotation.z ); // ThreeDeeUtil.addPositionToMesh( _mesh, _speed.x, _speed.y, _speed.z ); } public void setSpeed( float x, float y, float z ) { _speed.x = x; _speed.y = y; _speed.z = z; } public void reset() { _speed.x = 0; _speed.y = 0; _speed.z = 0; _curPos.x = _origPos.x; _curPos.y = _origPos.y; _curPos.z = _origPos.z; _curRotation.x = 0; _curRotation.y = 0; _curRotation.z = 0; } }
[ "cacheflowe@cacheflowe.com" ]
cacheflowe@cacheflowe.com
dbed6ff65ed41174494c97a5d123a0ee9ae5cb03
7dbbe21b902fe362701d53714a6a736d86c451d7
/BzenStudio-5.6/Source/com/zend/ide/cb/a/c/d.java
e2aaa5113a58244c20af712fa639982cc9ae4d0a
[]
no_license
HS-matty/dev
51a53b4fd03ae01981549149433d5091462c65d0
576499588e47e01967f0c69cbac238065062da9b
refs/heads/master
2022-05-05T18:32:24.148716
2022-03-20T16:55:28
2022-03-20T16:55:28
196,147,486
0
0
null
null
null
null
UTF-8
Java
false
false
602
java
package com.zend.ide.cb.a.c; import com.zend.ide.d.co; import com.zend.ide.n.gz; import com.zend.ide.y.m; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; class d implements PropertyChangeListener { final b a; private d(b paramb) { } public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent) { b.a(this.a).a(m.a().c()); } d(b paramb, c paramc) { this(paramb); } } /* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar * Qualified Name: com.zend.ide.cb.a.c.d * JD-Core Version: 0.6.0 */
[ "byqdes@gmail.com" ]
byqdes@gmail.com
63809e43a4ed6434574111e8c7ae4e147cba0c72
a7032d87fb060ca3af869d34820ca6ae3fc3aab1
/spring_mvc_04_ajax/src/com/mycom/controller/AjaxController.java
4094509234555a8f802133f2321bda30bb43b743
[]
no_license
fellownew/framework_workspace
7ba224521578f11089587ef0e1db26a3ae61455e
e0c2363442297acfff86375865ca00d774cfb8a5
refs/heads/master
2016-09-06T16:13:03.501196
2015-05-26T04:23:20
2015-05-26T04:23:20
34,445,821
0
0
null
null
null
null
UTF-8
Java
false
false
1,645
java
package com.mycom.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.mycom.model.service.MemberService; import com.mycom.vo.Member; @Controller public class AjaxController { @Autowired private MemberService service; @RequestMapping("/ajax/findById.do") @ResponseBody // return 되는 값을 http 응답 정보 body에 넣어 출력하라. public String findMemberById(@RequestParam String id){ Member member = service.getMemberById(id); String result = String.format("ID : %s<br>이름 : %s<br>나이 : %d",member.getId(),member.getName(),member.getAge()); return result; } @RequestMapping("/ajax/findById_JSON.do") @ResponseBody public Member findMemberById_JSON(@RequestParam String id){ return service.getMemberById(id); } /* * ResponseBody을 이용해 JSON 문자열 응답처리 하기. * - MappingJackson2HttpMessageConverter 필요. - 리턴값을 JSON 문자열로 변환해 응답 body에 넣는 컨버터. * mvc:annotation-driven 설정시 자동으로 등록됨. 단, JacksonJSON API 모듈이 classpath에 있어야함. * * return type * VO, Map -> Json Object : {name:value, name:value,...} * array, List -> JSON Array : [값,값,값,...] */ @RequestMapping(value="/ajax/memberList.do") @ResponseBody public List<Member> memberList(){ return service.getMemberList(); } }
[ "hotttnew@naver.com" ]
hotttnew@naver.com
690d9014d9513347fc5de9ccaae4e156db007dd9
7033d33d0ce820499b58da1d1f86f47e311fd0e1
/org/lwjgl/opengl/ARBTextureCompressionRGTC.java
faace077047f0a463a48d7424d8e835dbae99fe3
[ "MIT" ]
permissive
gabrielvicenteYT/melon-client-src
1d3f1f65c5a3bf1b6bc3e1cb32a05bf1dd56ee62
e0bf34546ada3afa32443dab838b8ce12ce6aaf8
refs/heads/master
2023-04-04T05:47:35.053136
2021-04-19T18:34:36
2021-04-19T18:34:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
package org.lwjgl.opengl; public final class ARBTextureCompressionRGTC { public static final int GL_COMPRESSED_RED_RGTC1 = 36283; public static final int GL_COMPRESSED_SIGNED_RED_RGTC1 = 36284; public static final int GL_COMPRESSED_RG_RGTC2 = 36285; public static final int GL_COMPRESSED_SIGNED_RG_RGTC2 = 36286; private ARBTextureCompressionRGTC() { } }
[ "haroldthesenpai@gmail.com" ]
haroldthesenpai@gmail.com
184901139d511c69276245b30825bc986f0f5666
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_6fe03d110b44e239b86ce6f7250bbb4f19b3531c/DdPlistTest/11_6fe03d110b44e239b86ce6f7250bbb4f19b3531c_DdPlistTest_t.java
8cd73f720e4a7f47a710c73a529bb41cc7f5ba96
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,463
java
/* * Copyright 2013-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.ddplist; import static org.junit.Assert.assertEquals; import com.dd.plist.NSDictionary; import com.dd.plist.PropertyListParser; import org.junit.Before; import org.junit.Test; import java.io.File; import java.io.IOException; import java.io.InputStream; public class DdPlistTest { private File outputFile; @Before public void setUp() throws IOException { outputFile = File.createTempFile("out", ".plist"); } @Test public void testASCIIWriting() throws Exception { InputStream in = getClass().getResourceAsStream("test-files/test1.plist"); NSDictionary x = (NSDictionary)PropertyListParser.parse(in); PropertyListParser.saveAsASCII(x, outputFile); NSDictionary y = (NSDictionary)PropertyListParser.parse(outputFile); assertEquals(x, y); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d3aed6d76dfef97882fc338dabc49952d3986dd5
37e5017a81547513724a5b97bf40914bbdec1c38
/src/opengl/lance/demo_13/Cube_1.java
a80f8aeed1e119a463d63aeb5a803b932052ee5d
[]
no_license
luoyiqi/Lance
df04399d04f1d32e4afa2521e1ea244e8a1ca112
150ab5e5f3ff0cfd19351372e7f3d0d420b3fb3f
refs/heads/master
2020-12-14T07:28:28.280847
2014-07-06T13:36:12
2014-07-06T13:36:12
null
0
0
null
null
null
null
GB18030
Java
false
false
6,327
java
package opengl.lance.demo_13; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import javax.microedition.khronos.opengles.GL10; public class Cube_1 { private FloatBuffer mVertexBuffer;// 顶点坐标数据缓冲 private FloatBuffer mTextureBuffer; // 纹理坐标数据缓冲 public float mOffsetX; public float mOffsetY; float scale; // 立方体大小 int textureId; // 纹理ID int vCount;// 顶点数量 public Cube_1(int textureId, float scale, float length, float width) { this.scale = scale; this.textureId = textureId; vCount = 36; float TABLE_UNIT_SIZE = 0.5f; float TABLE_UNIT_HIGHT = 0.5f; // 创建一个立方体---创建一个立方体就是将各个面通过三角形顶点计算出来;顺序只要和纹理切分顺序相同就行 float[] verteices = { // 顶面 -TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, // 后面 -TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, // 前面 -TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, // 下面 -TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, // 左面 -TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, -TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, // 右面 TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, -TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width, TABLE_UNIT_SIZE * length, -TABLE_UNIT_HIGHT * scale, TABLE_UNIT_SIZE * width }; ByteBuffer vbb = ByteBuffer.allocateDirect(verteices.length * 4); // 创建顶点坐标数据缓冲 vbb.order(ByteOrder.nativeOrder());// 设置字节顺序 mVertexBuffer = vbb.asFloatBuffer();// 转换为float型缓冲 mVertexBuffer.put(verteices);// 向缓冲区中放入顶点坐标数据 mVertexBuffer.position(0);// 设置缓冲区起始位置 float[] textureCoors = new float[vCount * 2]; for (int i = 0; i < vCount / 6; i++)// 个顶点纹理坐标 { textureCoors[i * 12] = 0; textureCoors[(i * 12) + 1] = 0; textureCoors[(i * 12) + 2] = 0; textureCoors[(i * 12) + 3] = 1; textureCoors[(i * 12) + 4] = 1; textureCoors[(i * 12) + 5] = 0; textureCoors[(i * 12) + 6] = 1; textureCoors[(i * 12) + 7] = 0; textureCoors[(i * 12) + 8] = 0; textureCoors[(i * 12) + 9] = 1; textureCoors[(i * 12) + 10] = 1; textureCoors[(i * 12) + 11] = 1; } ByteBuffer tbb = ByteBuffer.allocateDirect(textureCoors.length * 4);// 创建顶点坐标数据缓冲 tbb.order(ByteOrder.nativeOrder());// 设置字节顺序 mTextureBuffer = tbb.asFloatBuffer();// 转换为float型缓冲 mTextureBuffer.put(textureCoors);// 向缓冲区中放入顶点坐标数据 mTextureBuffer.position(0);// 设置缓冲区起始位置 } public void drawSelf(GL10 gl) { gl.glRotatef(mOffsetX, 1, 0, 0); gl.glRotatef(mOffsetY, 0, 1, 0); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexBuffer); gl.glEnable(GL10.GL_TEXTURE_2D);// 开启纹理 gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);// 允许使用纹理数组 gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, mTextureBuffer);// 指定纹理数组 gl.glBindTexture(GL10.GL_TEXTURE_2D, textureId);// 绑定纹理 gl.glDrawArrays(GL10.GL_TRIANGLES, 0, vCount);// 绘制 gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);// 关闭纹理数组 gl.glDisable(GL10.GL_TEXTURE_2D);// 关闭纹理 } }
[ "chengkaizone@163.com" ]
chengkaizone@163.com
94bf8c2184a5ec083660d0feac900ef737e44bbe
3e1758a6650b6d9f9d506b296451109b2909e9ff
/runtime/src/main/java/com/kotcrab/vis/runtime/system/render/TextRenderSystem.java
a1f65e6c64ba9f0a619beffc343c66654d708da8
[ "Apache-2.0" ]
permissive
roylanceMichael/vis-editor
c8dd69ec1c6d79dd05658b13512c0628ec294d72
db63a3c3c67f77ad9be9c79efcbff5eeebc66b80
refs/heads/master
2020-04-04T20:58:17.788494
2018-11-05T19:22:40
2018-11-05T19:22:40
156,267,344
0
0
Apache-2.0
2018-11-05T19:18:51
2018-11-05T18:58:11
Java
UTF-8
Java
false
false
4,325
java
/* * Copyright 2014-2017 See AUTHORS file. * * 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.kotcrab.vis.runtime.system.render; import com.artemis.Aspect; import com.artemis.ComponentMapper; import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.graphics.g2d.GlyphLayout; import com.badlogic.gdx.graphics.glutils.ShaderProgram; import com.badlogic.gdx.math.Matrix4; import com.badlogic.gdx.math.Polygon; import com.kotcrab.vis.runtime.component.*; import com.kotcrab.vis.runtime.system.delegate.DeferredEntityProcessingSystem; import com.kotcrab.vis.runtime.system.delegate.EntityProcessPrincipal; /** * Renders entities with {@link VisText}. * @author Kotcrab */ public class TextRenderSystem extends DeferredEntityProcessingSystem { private static final Matrix4 IDT_MATRIX = new Matrix4(); private ComponentMapper<VisText> textCm; private ComponentMapper<Transform> transformCm; private ComponentMapper<Origin> originCm; private ComponentMapper<Tint> tintCm; private RenderBatchingSystem renderBatchingSystem; private Batch batch; private ShaderProgram distanceFieldShader; private Polygon polygon; private float[] polygonVerts = new float[8]; //tmp vars private VisText text; private Transform transform; private Tint tint; private Origin origin; public TextRenderSystem (EntityProcessPrincipal principal, ShaderProgram distanceFieldShader) { super(Aspect.all(VisText.class).exclude(Invisible.class), principal); this.distanceFieldShader = distanceFieldShader; polygon = new Polygon(polygonVerts); } @Override protected void initialize () { batch = renderBatchingSystem.getBatch(); } @Override protected void process (int entityId) { text = textCm.get(entityId); transform = transformCm.get(entityId); tint = tintCm.get(entityId); origin = originCm.get(entityId); if (text.isDirty() || tint.isDirty()) { text.updateCache(tint.getTint()); updateText(entityId); } else if (transform.isDirty() || origin.isDirty()) { updateText(entityId); } //TODO: optimize texts VisText text = textCm.get(entityId); batch.setTransformMatrix(text.getTranslationMatrix()); if (text.isDistanceFieldShaderEnabled()) batch.setShader(distanceFieldShader); text.getCache().draw(batch); if (text.isDistanceFieldShaderEnabled()) batch.setShader(null); } private void updateText (int entityId) { Matrix4 translationMatrix = text.getTranslationMatrix(); GlyphLayout layout = text.getGlyphLayout(); if (text.isAutoSetOriginToCenter()) { origin.setOrigin(layout.width / 2, layout.height / 2); } translationMatrix.idt(); translationMatrix.translate(transform.getX() + origin.getOriginX(), transform.getY() + origin.getOriginY(), 0); translationMatrix.rotate(0, 0, 1, transform.getRotation()); translationMatrix.scale(transform.getScaleX(), transform.getScaleY(), 1); translationMatrix.translate(-origin.getOriginX(), -origin.getOriginY(), 0); translationMatrix.translate(0, layout.height, 0); //assign vertices, similar to: (we can skip zeros) //Polygon polygon = new Polygon(new float[]{0, 0, // textLayout.width, 0, // textLayout.width, textLayout.height, // 0, textLayout.height}); polygonVerts[2] = layout.width; polygonVerts[4] = layout.width; polygonVerts[5] = layout.height; polygonVerts[7] = layout.height; polygon.setPosition(transform.getX(), transform.getY()); polygon.setRotation(transform.getRotation()); polygon.setScale(transform.getScaleX(), transform.getScaleY()); polygon.setOrigin(origin.getOriginX(), origin.getOriginY()); text.updateBounds(polygon.getBoundingRectangle()); } @Override protected void end () { batch.setTransformMatrix(IDT_MATRIX); text = null; transform = null; tint = null; origin = null; } }
[ "kotcrab@gmail.com" ]
kotcrab@gmail.com
646243934777e48379ee6a9d371aa2d4cd4eea7a
862c40c47444e9b4aea1fdb1249b75cacfdb66fc
/basicKnowledge/test/com/xdc/basic/algorithm/basic/graph/AdjacencyMatrixGraphTest.java
2bc6c68abec28aba4421ca6a17cb5491cec84196
[]
no_license
apple006/java-code
1e1402ef0a8cd9146ae392221f1bf717a6eb2f49
2e24a27aa06ec17cd004ed62afb62ea84982a0f0
refs/heads/master
2021-09-03T19:57:02.391585
2018-01-11T14:47:53
2018-01-11T14:47:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,481
java
package com.xdc.basic.algorithm.basic.graph; import org.junit.Test; import com.xdc.basic.algorithm.basic.graph.AdjacencyMatrixGraph; import com.xdc.basic.algorithm.basic.graph.Graph; public class AdjacencyMatrixGraphTest { private <T> Graph<T> newGraph(boolean directed) { return new AdjacencyMatrixGraph<T>(100, directed); } @Test public void testSearch() { Graph<String> g = newGraph(false); g.addVertex("V1"); g.addVertex("V2"); g.addVertex("V3"); g.addVertex("V4"); g.addVertex("V5"); g.addVertex("V6"); g.addVertex("V7"); g.addVertex("V8"); g.addEdge("V1", "V2", 1); g.addEdge("V1", "V3", 1); g.addEdge("V2", "V4", 1); g.addEdge("V2", "V5", 1); g.addEdge("V3", "V6", 1); g.addEdge("V3", "V7", 1); g.addEdge("V4", "V8", 1); g.addEdge("V5", "V8", 1); g.addEdge("V6", "V7", 1); System.out.println("深度遍历:"); g.DFS(0); System.out.println(); System.out.println("广度遍历:"); g.BFS(0); System.out.println(); } @Test public void testminCostSpanTree() { Graph<String> g = newGraph(false); g.addVertex("V1"); g.addVertex("V2"); g.addVertex("V3"); g.addVertex("V4"); g.addVertex("V5"); g.addVertex("V6"); g.addEdge("V1", "V2", 6); g.addEdge("V1", "V3", 1); g.addEdge("V1", "V4", 5); g.addEdge("V2", "V3", 5); g.addEdge("V2", "V5", 3); g.addEdge("V3", "V4", 5); g.addEdge("V3", "V5", 6); g.addEdge("V3", "V6", 4); g.addEdge("V4", "V6", 2); g.addEdge("V5", "V6", 6); System.out.println("最小生成树(普里姆)"); g.minCostSpanTreePrim(0); System.out.println(); System.out.println("最小生成树(克鲁斯卡尔):"); g.minCostSpanTreeKruskal(); System.out.println(); } @Test public void testToplogicalSort() { Graph<String> g = newGraph(true); g.addVertex("V1"); g.addVertex("V2"); g.addVertex("V3"); g.addVertex("V4"); g.addVertex("V5"); g.addVertex("V6"); g.addEdge("V1", "V2", 1); g.addEdge("V1", "V3", 1); g.addEdge("V1", "V4", 1); g.addEdge("V3", "V2", 1); g.addEdge("V3", "V5", 1); g.addEdge("V4", "V5", 1); g.addEdge("V6", "V4", 1); g.addEdge("V6", "V5", 1); System.out.println("拓扑排序:"); g.toplogicalSort(); System.out.println(); } @Test public void testCriticalPath() { Graph<String> g = newGraph(true); g.addVertex("V1"); g.addVertex("V2"); g.addVertex("V3"); g.addVertex("V4"); g.addVertex("V5"); g.addVertex("V6"); g.addEdge("V1", "V2", 3); g.addEdge("V1", "V3", 2); g.addEdge("V2", "V4", 2); g.addEdge("V2", "V5", 3); g.addEdge("V3", "V4", 4); g.addEdge("V3", "V6", 3); g.addEdge("V4", "V6", 2); g.addEdge("V5", "V6", 1); System.out.println("关键路径:"); g.criticalPath(); System.out.println(); } @Test public void testShortestPathDijkstra() { Graph<String> g = newGraph(true); g.addVertex("V0"); g.addVertex("V1"); g.addVertex("V2"); g.addVertex("V3"); g.addVertex("V4"); g.addVertex("V5"); g.addEdge("V0", "V2", 10); g.addEdge("V0", "V4", 30); g.addEdge("V0", "V5", 100); g.addEdge("V1", "V2", 5); g.addEdge("V2", "V3", 50); g.addEdge("V3", "V5", 10); g.addEdge("V4", "V3", 20); g.addEdge("V4", "V5", 60); System.out.println("单源最短路径(迪杰斯特拉):"); g.shortestPathDijkstra(0); System.out.println(); } @Test public void testShortestPathFloyd() { Graph<String> g = newGraph(true); g.addVertex("V0"); g.addVertex("V1"); g.addVertex("V2"); g.addEdge("V0", "V1", 4); g.addEdge("V0", "V2", 11); g.addEdge("V1", "V0", 6); g.addEdge("V1", "V2", 2); g.addEdge("V2", "V0", 3); System.out.println("多源最短路径(弗洛伊德):"); g.shortestPathFloyd(); System.out.println(); } }
[ "xdc0209@qq.com" ]
xdc0209@qq.com
47b292d8a558e5f07754787b6174e4181f648bee
447520f40e82a060368a0802a391697bc00be96f
/apks/playstore_apps/com_idamob_tinkoff_android/source/io/fabric/sdk/android/InitializationException.java
1ddfca9564fd64f7481236c6fd1832f5c5d04df6
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
185
java
package io.fabric.sdk.android; public class InitializationException extends RuntimeException { public InitializationException(String paramString) { super(paramString); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
e16952278e6365194fa12069c4a14c9f57247611
4312a71c36d8a233de2741f51a2a9d28443cd95b
/RawExperiments/Lang/Lang428/3/AstorMain-Lang428/src/variant-232/org/apache/commons/lang3/event/EventListenerSupport.java
89a64a268e48cb312b7a3e462fa3f613104c0626
[]
no_license
SajjadZaidi/AutoRepair
5c7aa7a689747c143cafd267db64f1e365de4d98
e21eb9384197bae4d9b23af93df73b6e46bb749a
refs/heads/master
2021-05-07T00:07:06.345617
2017-12-02T18:48:14
2017-12-02T18:48:14
112,858,432
0
0
null
null
null
null
UTF-8
Java
false
false
4,688
java
package org.apache.commons.lang3.event; public class EventListenerSupport<L> implements java.io.Serializable { private static final long serialVersionUID = 3593265990380473632L; private java.util.List<L> listeners = new java.util.concurrent.CopyOnWriteArrayList<L>(); private transient L proxy; private transient L[] prototypeArray; public static <T>org.apache.commons.lang3.event.EventListenerSupport<T> create(java.lang.Class<T> listenerInterface) { return new org.apache.commons.lang3.event.EventListenerSupport<T>(listenerInterface); } public EventListenerSupport(java.lang.Class<L> listenerInterface) { this(listenerInterface, java.lang.Thread.currentThread().getContextClassLoader()); } public EventListenerSupport(java.lang.Class<L> listenerInterface ,java.lang.ClassLoader classLoader) { this(); org.apache.commons.lang3.Validate.notNull(listenerInterface, "Listener interface cannot be null."); org.apache.commons.lang3.Validate.notNull(classLoader, "ClassLoader cannot be null."); org.apache.commons.lang3.Validate.isTrue(listenerInterface.isInterface(), "Class {0} is not an interface", listenerInterface.getName()); initializeTransientFields(listenerInterface, classLoader); } private EventListenerSupport() { } public L fire() { return proxy; } public void addListener(L listener) { org.apache.commons.lang3.Validate.notNull(listener, "Listener object cannot be null."); listeners.add(listener); } int getListenerCount() { return listeners.size(); } public void removeListener(L listener) { org.apache.commons.lang3.Validate.notNull(listener, "Listener object cannot be null."); listeners.remove(listener); } public L[] getListeners() { return listeners.toArray(prototypeArray); } private void writeObject(java.io.ObjectOutputStream objectOutputStream) throws java.io.IOException { java.util.ArrayList<L> serializableListeners = new java.util.ArrayList<L>(); java.io.ObjectOutputStream testObjectOutputStream = new java.io.ObjectOutputStream(new java.io.ByteArrayOutputStream()); for (L listener : listeners) { try { testObjectOutputStream.writeObject(listener); serializableListeners.add(listener); } catch (java.io.IOException exception) { testObjectOutputStream = new java.io.ObjectOutputStream(new java.io.ByteArrayOutputStream()); } } objectOutputStream.writeObject(serializableListeners.toArray(prototypeArray)); } private void readObject(java.io.ObjectInputStream objectInputStream) throws java.io.IOException, java.lang.ClassNotFoundException { @java.lang.SuppressWarnings(value = "unchecked") L[] listeners = ((L[])(objectInputStream.readObject())); org.apache.commons.lang3.event.EventListenerSupport.this.listeners = new java.util.concurrent.CopyOnWriteArrayList<L>(listeners); @java.lang.SuppressWarnings(value = "unchecked") java.lang.Class<L> listenerInterface = ((java.lang.Class<L>)(listeners.getClass().getComponentType())); initializeTransientFields(listenerInterface, java.lang.Thread.currentThread().getContextClassLoader()); } private void initializeTransientFields(java.lang.Class<L> listenerInterface, java.lang.ClassLoader classLoader) { @java.lang.SuppressWarnings(value = "unchecked") L[] array = ((L[])(java.lang.reflect.Array.newInstance(listenerInterface, 0))); org.apache.commons.lang3.event.EventListenerSupport.this.prototypeArray = array; org.apache.commons.lang3.CharSet.COMMON.put("0-9", org.apache.commons.lang3.CharSet.ASCII_NUMERIC); } private void createProxy(java.lang.Class<L> listenerInterface, java.lang.ClassLoader classLoader) { proxy = listenerInterface.cast(java.lang.reflect.Proxy.newProxyInstance(classLoader, new java.lang.Class[]{ listenerInterface }, createInvocationHandler())); } protected java.lang.reflect.InvocationHandler createInvocationHandler() { return new ProxyInvocationHandler(); } protected class ProxyInvocationHandler implements java.lang.reflect.InvocationHandler { private static final long serialVersionUID = 1L; public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable { for (L listener : listeners) { method.invoke(listener, args); } return null; } } }
[ "sajjad.syed@ucalgary.ca" ]
sajjad.syed@ucalgary.ca
fd5abb7605de5aca4fdc3631c2f278d56e098c27
2d19fc2215dfdc64266d4ae13b1bf18fa2d970ca
/commoncore/src/main/java/tech/com/commoncore/interf/TitleBarViewControl.java
a0509fda8c812c63c400d68be444e05959fd1170
[]
no_license
965310001/Financa
be88873e249fc45e89b27e5a722c8074b5932e27
4f70943e50a33ce77a7c66659740e912b48b98d2
refs/heads/master
2020-07-21T03:37:41.380545
2019-11-19T06:30:23
2019-11-19T06:30:23
206,750,079
0
0
null
null
null
null
UTF-8
Java
false
false
487
java
package tech.com.commoncore.interf; import com.aries.ui.view.title.TitleBarView; /** * @Author: AriesHoo on 2018/7/23 10:51 * @E-Mail: AriesHoo@126.com * Function: 全局TitleBarView属性控制 * Description: */ public interface TitleBarViewControl { /** * 全局设置TitleBarView 属性回调 * * @param titleBar * @param cls 包含TitleBarView的类 * @return */ boolean createTitleBarViewControl(TitleBarView titleBar, Class<?> cls); }
[ "965310001@qq.com" ]
965310001@qq.com
d9f891a5a2d53d92f784a5a2ac5aa503b5115fc8
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/2_a4j-net.kencochrane.a4j.beans.SellerFeedback-1.0-5/net/kencochrane/a4j/beans/SellerFeedback_ESTest.java
0ea6609b26ea72117c0fb43365a864caa66f3521
[]
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
659
java
/* * This file was automatically generated by EvoSuite * Mon Oct 28 17:58:23 GMT 2019 */ package net.kencochrane.a4j.beans; 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 SellerFeedback_ESTest extends SellerFeedback_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
fd0fdee6e069ae24594f6592383e0ae5f12b89a5
a3bbeb443f4ed66c94f9019df060bf7ae2c44c7f
/test/java/src/java/security/interfaces/DSAPrivateKey.java
a7359da4fd272843729027a064562e19b25cdfcd
[]
no_license
FLC-project/ebison
d2bbab99a1b17800cb64e513d6bb2811e5ddb070
69da710bdd63a5d83af9f67a3d1fb9ba44524173
refs/heads/master
2021-08-29T05:36:39.118743
2021-08-22T09:45:51
2021-08-22T09:45:51
34,455,631
0
0
null
null
null
null
UTF-8
Java
false
false
1,106
java
/* * @(#)DSAPrivateKey.java 1.16 00/02/02 * * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved. * * This software is the proprietary information of Sun Microsystems, Inc. * Use is subject to license terms. * */ package java.security.interfaces; import java.math.BigInteger; /** * The standard interface to a DSA private key. DSA (Digital Signature * Algorithm) is defined in NIST's FIPS-186. * * @see java.security.Key * @see java.security.Signature * @see DSAKey * @see DSAPublicKey * * @version 1.16 00/02/02 * @author Benjamin Renaud */ public interface DSAPrivateKey extends DSAKey, java.security.PrivateKey { // Declare serialVersionUID to be compatible with JDK1.1 /** * The class fingerprint that is set to indicate * serialization compatibility with a previous * version of the class. */ static final long serialVersionUID = 7776497482533790279L; /** * Returns the value of the private key, <code>x</code>. * * @return the value of the private key, <code>x</code>. */ public BigInteger getX(); }
[ "luca.breveglieri@polimi.it" ]
luca.breveglieri@polimi.it
426b7204f7421c379456764f77bd2f27bc4cc113
995f73d30450a6dce6bc7145d89344b4ad6e0622
/DVC-AN20_EMUI10.1.1/src/main/java/android/media/MediaCasStateException.java
3db32583fa608cb81f235d57c1a98f7b4c514d56
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,486
java
package android.media; public class MediaCasStateException extends IllegalStateException { private final String mDiagnosticInfo; private final int mErrorCode; private MediaCasStateException(int err, String msg, String diagnosticInfo) { super(msg); this.mErrorCode = err; this.mDiagnosticInfo = diagnosticInfo; } static void throwExceptionIfNeeded(int err) { throwExceptionIfNeeded(err, null); } static void throwExceptionIfNeeded(int err, String msg) { String diagnosticInfo; if (err != 0) { if (err != 6) { switch (err) { case 1: diagnosticInfo = "No license"; break; case 2: diagnosticInfo = "License expired"; break; case 3: diagnosticInfo = "Session not opened"; break; case 4: diagnosticInfo = "Unsupported scheme or data format"; break; case 5: diagnosticInfo = "Invalid CAS state"; break; case 6: case 7: case 8: case 11: default: diagnosticInfo = "Unknown CAS state exception"; break; case 9: diagnosticInfo = "Insufficient output protection"; break; case 10: diagnosticInfo = "Tamper detected"; break; case 12: diagnosticInfo = "Not initialized"; break; case 13: diagnosticInfo = "Decrypt error"; break; case 14: diagnosticInfo = "General CAS error"; break; } throw new MediaCasStateException(err, msg, String.format("%s (err=%d)", diagnosticInfo, Integer.valueOf(err))); } throw new IllegalArgumentException(); } } public int getErrorCode() { return this.mErrorCode; } public String getDiagnosticInfo() { return this.mDiagnosticInfo; } }
[ "dstmath@163.com" ]
dstmath@163.com
0e7cc748e2c468d01044e6281fb30538923e8b1f
562dc65e20ff9822204c615d5558e175bf171599
/taotao-parent/taotao-manager/taotao-manager-dao/src/main/java/com/wj/taotao/mapper/TbItemCatMapper.java
e4c89474da58117ea5ed98d9490d47aac72ed90d
[]
no_license
wj1996/taotao
99187864cc28e166ed5d93b1353d6f578727e26a
00fc6be63b9fdbc3d54bc769102c1edb594bea62
refs/heads/master
2020-04-17T18:43:18.546707
2019-04-11T00:46:49
2019-04-11T00:46:49
166,838,668
0
0
null
null
null
null
UTF-8
Java
false
false
865
java
package com.wj.taotao.mapper; import com.wj.taotao.pojo.TbItemCat; import com.wj.taotao.pojo.TbItemCatExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface TbItemCatMapper { int countByExample(TbItemCatExample example); int deleteByExample(TbItemCatExample example); int deleteByPrimaryKey(Long id); int insert(TbItemCat record); int insertSelective(TbItemCat record); List<TbItemCat> selectByExample(TbItemCatExample example); TbItemCat selectByPrimaryKey(Long id); int updateByExampleSelective(@Param("record") TbItemCat record, @Param("example") TbItemCatExample example); int updateByExample(@Param("record") TbItemCat record, @Param("example") TbItemCatExample example); int updateByPrimaryKeySelective(TbItemCat record); int updateByPrimaryKey(TbItemCat record); }
[ "15236730688@163.com" ]
15236730688@163.com
f832b51e96ff89254ba828ac2be3de018b495231
124a35ef5026c3e00785a9920584d594c702f1cd
/nix-string/src/main/java/ua/com/alevel/Main.java
2dc1a3de1afc7dc3071d401b9161e5d3585af292
[]
no_license
Iegor-Funtusov/nix-4
c5a7c8ce5652dcfc872a4620a89643e193fdfcc0
15d77a1870cf35cf13fb2a0b62fc90433bc9baf4
refs/heads/master
2023-04-19T13:34:31.113018
2021-05-12T18:33:31
2021-05-12T18:33:31
343,026,189
4
3
null
null
null
null
UTF-8
Java
false
false
1,230
java
package ua.com.alevel; import org.apache.commons.lang.StringUtils; import java.util.Arrays; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; public class Main { public static void main(String[] args) { String s = null; if (s == null) { } if (Objects.isNull(s)) { } String s1 = "fkjds;fdsf ds;kjfhdsahfsa ljdf;s fd;usahf;s"; String[] strings = s1.split(" "); Arrays.stream(strings).filter(s2 -> StringUtils.containsIgnoreCase(s2, "gg")).collect(Collectors.toList()); List<String> list1 = Arrays.stream(strings).filter(StringUtils::isNotBlank).collect(Collectors.toList()); List<String> list2 = Arrays.stream(strings).filter(s2 -> !s2.isBlank()).collect(Collectors.toList()); List<String> list3 = Arrays .stream(strings) .filter(Objects::nonNull) .filter(StringUtils::isNotBlank) .collect(Collectors.toList()); List<String> list4 = Arrays .stream(strings) .filter(s2 -> s2 != null) .filter(s2 -> !s2.isBlank()) .collect(Collectors.toList()); } }
[ "funtushan@gmail.com" ]
funtushan@gmail.com
78347df12ab965a780c1b535729d7e58c035d13e
bbfa56cfc81b7145553de55829ca92f3a97fce87
/plugins/org.ifc4emf.metamodel.ifc/src/IFC2X3/jaxb/IfcReferencesValueDocumentImplAdapter.java
a0b587db19e01377a9a2f04f23ddf4e7ffb52b13
[]
no_license
patins1/raas4emf
9e24517d786a1225344a97344777f717a568fdbe
33395d018bc7ad17a0576033779dbdf70fa8f090
refs/heads/master
2021-08-16T00:27:12.859374
2021-07-30T13:01:48
2021-07-30T13:01:48
87,889,951
1
0
null
null
null
null
UTF-8
Java
false
false
322
java
package IFC2X3.jaxb; import org.eclipse.emf.ecore.jaxb.EObjectImplAdapter; import IFC2X3.IfcReferencesValueDocument; import IFC2X3.impl.IfcReferencesValueDocumentImpl; public class IfcReferencesValueDocumentImplAdapter extends EObjectImplAdapter<IfcReferencesValueDocumentImpl, IfcReferencesValueDocument> { }
[ "patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e" ]
patins@f81cfaeb-dc96-476f-bd6d-b0d16e38694e
e0e46aa7f7e0e537641e10c4f18d27c0981d01c9
8d4a69e281915a8a68b0488db0e013b311942cf4
/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/SpringApplicationAdminClient.java
e7d892d3cd4e85b6d551874746e53547da92e8a4
[ "Apache-2.0" ]
permissive
yuanmabiji/spring-boot-2.1.0.RELEASE
798b4c29d25fdcb22fa3a0baf24a08ddd0dfa27e
6fe0467c9bc95d3849eb2ad5bae04fd9bdee3a82
refs/heads/master
2023-03-10T05:20:52.846557
2022-03-25T15:53:13
2022-03-25T15:53:13
252,902,347
320
107
Apache-2.0
2023-02-22T07:44:16
2020-04-04T03:49:51
Java
UTF-8
Java
false
false
4,277
java
/* * Copyright 2012-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.maven; import java.io.IOException; import javax.management.AttributeNotFoundException; import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanServerConnection; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import org.apache.maven.plugin.MojoExecutionException; /** * A JMX client for the {@code SpringApplicationAdmin} MBean. Permits to obtain * information about a given Spring application. * * @author Stephane Nicoll */ class SpringApplicationAdminClient { // Note: see SpringApplicationAdminJmxAutoConfiguration static final String DEFAULT_OBJECT_NAME = "org.springframework.boot:type=Admin,name=SpringApplication"; private final MBeanServerConnection connection; private final ObjectName objectName; SpringApplicationAdminClient(MBeanServerConnection connection, String jmxName) { this.connection = connection; this.objectName = toObjectName(jmxName); } /** * Check if the spring application managed by this instance is ready. Returns * {@code false} if the mbean is not yet deployed so this method should be repeatedly * called until a timeout is reached. * @return {@code true} if the application is ready to service requests * @throws MojoExecutionException if the JMX service could not be contacted */ public boolean isReady() throws MojoExecutionException { try { return (Boolean) this.connection.getAttribute(this.objectName, "Ready"); } catch (InstanceNotFoundException ex) { return false; // Instance not available yet } catch (AttributeNotFoundException ex) { throw new IllegalStateException("Unexpected: attribute 'Ready' not available", ex); } catch (ReflectionException ex) { throw new MojoExecutionException("Failed to retrieve Ready attribute", ex.getCause()); } catch (MBeanException | IOException ex) { throw new MojoExecutionException(ex.getMessage(), ex); } } /** * Stop the application managed by this instance. * @throws MojoExecutionException if the JMX service could not be contacted * @throws IOException if an I/O error occurs * @throws InstanceNotFoundException if the lifecycle mbean cannot be found */ public void stop() throws MojoExecutionException, IOException, InstanceNotFoundException { try { this.connection.invoke(this.objectName, "shutdown", null, null); } catch (ReflectionException ex) { throw new MojoExecutionException("Shutdown failed", ex.getCause()); } catch (MBeanException ex) { throw new MojoExecutionException("Could not invoke shutdown operation", ex); } } private ObjectName toObjectName(String name) { try { return new ObjectName(name); } catch (MalformedObjectNameException ex) { throw new IllegalArgumentException("Invalid jmx name '" + name + "'"); } } /** * Create a connector for an {@link javax.management.MBeanServer} exposed on the * current machine and the current port. Security should be disabled. * @param port the port on which the mbean server is exposed * @return a connection * @throws IOException if the connection to that server failed */ public static JMXConnector connect(int port) throws IOException { String url = "service:jmx:rmi:///jndi/rmi://127.0.0.1:" + port + "/jmxrmi"; JMXServiceURL serviceUrl = new JMXServiceURL(url); return JMXConnectorFactory.connect(serviceUrl, null); } }
[ "983656956@qq.com" ]
983656956@qq.com
67e216521fab048cef8d6371773fdfb74531b5f1
647b1232e7bd89039ebeb13088460bab0faad36c
/projects/stage-1/middleware-frameworks/my-configuration/src/main/java/org/geektimes/configuration/microprofile/config/source/servlet/initializer/ServletRequestThreadLocalListener.java
3b45d0cbb9b781bebee3c4f78f03cb7b4431d122
[ "Apache-2.0" ]
permissive
bestzhangtao/geekbang-lessons
8ebf986e4416e352a9c649dc97433680a308452d
35e8e6ce0a2296225ce699def7ec8bdd6f200252
refs/heads/master
2023-05-27T13:02:08.732705
2023-05-17T19:14:38
2023-05-17T19:14:38
229,888,436
1
0
Apache-2.0
2020-04-14T07:23:27
2019-12-24T06:54:13
null
UTF-8
Java
false
false
1,969
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.geektimes.configuration.microprofile.config.source.servlet.initializer; import javax.servlet.ServletRequest; import javax.servlet.ServletRequestEvent; import javax.servlet.ServletRequestListener; import javax.servlet.http.HttpServletRequest; /** * The {@link ServletRequestListener} implementation for the {@link ThreadLocal} of {@link ServletRequest} * * @author <a href="mailto:mercyblitz@gmail.com">Mercy</a> * @since 1.0.0 */ public class ServletRequestThreadLocalListener implements ServletRequestListener { private static ThreadLocal<HttpServletRequest> requestThreadLocal = new ThreadLocal<>(); @Override public void requestInitialized(ServletRequestEvent servletRequestEvent) { ServletRequest request = servletRequestEvent.getServletRequest(); HttpServletRequest httpServletRequest = (HttpServletRequest) request; requestThreadLocal.set(httpServletRequest); } @Override public void requestDestroyed(ServletRequestEvent servletRequestEvent) { requestThreadLocal.remove(); } public static HttpServletRequest getRequest() { return requestThreadLocal.get(); } }
[ "mercyblitz@gmail.com" ]
mercyblitz@gmail.com
c0cf62556d72ff953d51cf12120891c491814b84
c3debbc571031781ec2f156783ae0d17fb663d90
/mex/src/main/java/org/wso2/mex/om/Dialect.java
39aac877062232e3e1dcf20869411cdc9f68687d
[]
no_license
manoj-kristhombu/commons
1e0b24ed25a21691dfa848b8debaf95a47b9a8e0
4928923d66a345a3dca15c6f2a6f1fe9b246b2e8
refs/heads/master
2021-05-28T15:53:21.146705
2014-11-17T14:53:18
2014-11-17T14:53:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,863
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.wso2.mex.om; import org.apache.axiom.om.OMFactory; import org.wso2.mex.MexConstants; /** * Class implemented for Dialect element defined in * the WS-MEX spec. * */ public class Dialect extends AnyURIType { /** * Constructor * @param defaultFactory * @param namespaceValue namespace info * @param dialect Dialect in URI representation * @throws MexOMException */ public Dialect(OMFactory defaultFactory, String namespaceValue, String dialect) throws MexOMException { super(defaultFactory, namespaceValue, dialect); } /** * Constructor with default namespace * @param defaultFactory * @param dialect Dialect in URI representation * @throws MexOMException */ public Dialect(OMFactory defaultFactory, String dialect) throws MexOMException { super(defaultFactory, MexConstants.Spec_2004_09.NS_URI, dialect ); } /* * Return name of this element * (non-Javadoc) * @see org.apache.axis2.Mex.OM.AnyURIType#getElementName() */ protected String getElementName(){ return MexConstants.SPEC.DIALECT; } }
[ "hasini@a5903396-d722-0410-b921-86c7d4935375" ]
hasini@a5903396-d722-0410-b921-86c7d4935375
66ab8f4e973585f1a947812e49ff1e7aa4a13c45
c2e6f7c40edce79fd498a5bbaba4c2d69cf05e0c
/src/main/java/kotlin/jvm/internal/ArrayCharIterator.java
56893f2198d915dd3328e50a30a23c5596933ec6
[]
no_license
pengju1218/decompiled-apk
7f64ee6b2d7424b027f4f112c77e47cd420b2b8c
b60b54342a8e294486c45b2325fb78155c3c37e6
refs/heads/master
2022-03-23T02:57:09.115704
2019-12-28T23:13:07
2019-12-28T23:13:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,578
java
package kotlin.jvm.internal; import java.util.NoSuchElementException; import kotlin.Metadata; import kotlin.collections.CharIterator; import org.jetbrains.annotations.NotNull; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0019\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\f\n\u0000\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\t\u0010\u0007\u001a\u00020\bH–\u0002J\b\u0010\t\u001a\u00020\nH\u0016R\u000e\u0010\u0002\u001a\u00020\u0003X‚\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X‚\u000e¢\u0006\u0002\n\u0000¨\u0006\u000b"}, d2 = {"Lkotlin/jvm/internal/ArrayCharIterator;", "Lkotlin/collections/CharIterator;", "array", "", "([C)V", "index", "", "hasNext", "", "nextChar", "", "kotlin-stdlib"}, k = 1, mv = {1, 1, 15}) final class ArrayCharIterator extends CharIterator { private final char[] array; private int index; public ArrayCharIterator(@NotNull char[] cArr) { Intrinsics.checkParameterIsNotNull(cArr, "array"); this.array = cArr; } public boolean hasNext() { return this.index < this.array.length; } public char nextChar() { try { char[] cArr = this.array; int i = this.index; this.index = i + 1; return cArr[i]; } catch (ArrayIndexOutOfBoundsException e) { this.index--; throw new NoSuchElementException(e.getMessage()); } } }
[ "apoorwaand@gmail.com" ]
apoorwaand@gmail.com
0377b46635017641b752fcf5c868a2749998c6d6
f321db1ace514d08219cc9ba5089ebcfff13c87a
/generated-tests/dynamosa/tests/s1000/7_okhttp/evosuite-tests/okhttp3/CacheControl_ESTest_scaffolding.java
04ca4c793bd4ef8a579b6edd2b39f7e7f3f074b3
[]
no_license
sealuzh/dynamic-performance-replication
01bd512bde9d591ea9afa326968b35123aec6d78
f89b4dd1143de282cd590311f0315f59c9c7143a
refs/heads/master
2021-07-12T06:09:46.990436
2020-06-05T09:44:56
2020-06-05T09:44:56
146,285,168
2
2
null
null
null
null
UTF-8
Java
false
false
5,408
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Jul 02 19:55:02 GMT 2019 */ package okhttp3; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class CacheControl_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "okhttp3.CacheControl"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/home/apaniche/performance/Dataset/gordon_scripts/projects/7_okhttp"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CacheControl_ESTest_scaffolding.class.getClassLoader() , "okhttp3.internal.http.HttpHeaders", "okhttp3.ResponseBody$BomAwareReader", "okhttp3.Request$Builder", "okio.Source", "okhttp3.CacheControl$Builder", "okhttp3.RequestBody$1", "okhttp3.internal.http.HttpDate", "okio.Timeout$1", "okhttp3.CacheControl", "okio.Options", "okhttp3.Headers", "okio.Sink", "okhttp3.RequestBody", "okhttp3.CookieJar$1", "okio.Timeout", "okhttp3.CipherSuite", "okio.BufferedSink", "okio.ByteString", "okhttp3.internal.Util", "okhttp3.internal.http.HttpDate$1", "okhttp3.Response$Builder", "okhttp3.Headers$Builder", "okhttp3.Response", "okio.Segment", "okio.Util", "okhttp3.ResponseBody", "okhttp3.MediaType", "okhttp3.CookieJar", "okhttp3.Request", "okio.Buffer", "okhttp3.ResponseBody$1", "okio.SegmentedByteString", "okio.BufferedSource", "okhttp3.HttpUrl$Builder", "okhttp3.TlsVersion", "okio.Buffer$2", "okio.Buffer$1", "okhttp3.RequestBody$2", "okhttp3.Protocol", "okhttp3.RequestBody$3", "okhttp3.Handshake", "okhttp3.HttpUrl", "okhttp3.HttpUrl$Builder$ParseResult" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CacheControl_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "okhttp3.CacheControl$Builder", "okhttp3.CacheControl", "okhttp3.Headers", "okhttp3.Headers$Builder", "okhttp3.ResponseBody", "okio.Buffer", "okio.Util", "okhttp3.ResponseBody$1", "okhttp3.RequestBody", "okhttp3.RequestBody$2", "okio.ByteString", "okhttp3.internal.Util", "okhttp3.internal.http.HttpHeaders", "okhttp3.internal.http.HttpDate$1", "okhttp3.internal.http.HttpDate" ); } }
[ "granogiovanni90@gmail.com" ]
granogiovanni90@gmail.com
56757ae38cfd7a9f07a60024019bc70dee17f4eb
c8de7488ed6b5181eb49954002eac5f4f2311eaa
/Sources/API/MiniGame/src/main/java/pl/north93/northplatform/api/minigame/shared/impl/arena/ArenaManager.java
726391c2097934a633c5947f9111bb160d94d738
[]
no_license
northpl93/NorthPlatform
9a72b4c071444b6de408a5e4b2b2bdd54092a448
94808b22cf905c792df850dd0e179bbe9152257c
refs/heads/master
2023-07-10T06:22:34.018751
2021-08-06T19:17:42
2021-08-06T19:17:42
151,781,268
39
1
null
null
null
null
UTF-8
Java
false
false
1,493
java
package pl.north93.northplatform.api.minigame.shared.impl.arena; import java.util.Set; import java.util.UUID; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import pl.north93.northplatform.api.minigame.shared.api.arena.RemoteArena; import pl.north93.northplatform.api.global.component.annotations.bean.Bean; import pl.north93.northplatform.api.global.component.annotations.bean.Inject; import pl.north93.northplatform.api.global.redis.observable.Hash; import pl.north93.northplatform.api.global.redis.observable.IObservationManager; public class ArenaManager { @Inject private IObservationManager observer; private Hash<RemoteArena> arenas; @Bean private ArenaManager() { this.arenas = this.observer.getHash(RemoteArena.class, "arenas"); } public RemoteArena getArena(final UUID arenaId) { return this.arenas.get(arenaId.toString()); } public Set<RemoteArena> getAllArenas() { return this.arenas.values(); } public void setArena(final RemoteArena arena) { this.arenas.put(arena.getId().toString(), arena); } public void removeArena(final UUID arenaId) { this.arenas.delete(arenaId.toString()); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).appendSuper(super.toString()).append("arenas", this.arenas).toString(); } }
[ "northpl93@gmail.com" ]
northpl93@gmail.com
c23900af0f4e6593d406cc5adce2efe3dd432f4c
f2cd73bbf96f59838eb2e22bf80fcf8db4a520fc
/src/main/java/tr/com/github/emre/altun/sc/aop/logging/LoggingAspect.java
4f451cb19416aa4ec1f1bb65b64728277255311a
[]
no_license
emre5444/sirketimcepte
0508586517a914300d4d854fde25740a1494cc30
ff4de0c046f9d133db44a583b50eff11fcd8a261
refs/heads/master
2021-07-12T21:08:16.513750
2017-10-18T14:23:09
2017-10-18T14:23:09
107,418,888
0
0
null
null
null
null
UTF-8
Java
false
false
3,858
java
package tr.com.github.emre.altun.sc.aop.logging; import io.github.jhipster.config.JHipsterConstants; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.env.Environment; import java.util.Arrays; /** * Aspect for logging execution of service and repository Spring components. * * By default, it only runs with the "dev" profile. */ @Aspect public class LoggingAspect { private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Environment env; public LoggingAspect(Environment env) { this.env = env; } /** * Pointcut that matches all repositories, services and Web REST endpoints. */ @Pointcut("within(@org.springframework.stereotype.Repository *)" + " || within(@org.springframework.stereotype.Service *)" + " || within(@org.springframework.web.bind.annotation.RestController *)") public void springBeanPointcut() { // Method is empty as this is just a Pointcut, the implementations are in the advices. } /** * Pointcut that matches all Spring beans in the application's main packages. */ @Pointcut("within(tr.com.github.emre.altun.sc.repository..*)"+ " || within(tr.com.github.emre.altun.sc.service..*)"+ " || within(tr.com.github.emre.altun.sc.web.rest..*)") public void applicationPackagePointcut() { // Method is empty as this is just a Pointcut, the implementations are in the advices. } /** * Advice that logs methods throwing exceptions. * * @param joinPoint join point for advice * @param e exception */ @AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e") public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { log.error("Exception in {}.{}() with cause = \'{}\' and exception = \'{}\'", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL", e.getMessage(), e); } else { log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL"); } } /** * Advice that logs when a method is entered and exited. * * @param joinPoint join point for advice * @return result * @throws Throwable throws IllegalArgumentException */ @Around("applicationPackagePointcut() && springBeanPointcut()") public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { if (log.isDebugEnabled()) { log.debug("Enter: {}.{}() with argument[s] = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs())); } try { Object result = joinPoint.proceed(); if (log.isDebugEnabled()) { log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), result); } return result; } catch (IllegalArgumentException e) { log.error("Illegal argument: {} in {}.{}()", Arrays.toString(joinPoint.getArgs()), joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName()); throw e; } } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
f45607c2913523bb929e9210a4fe81826dc11606
350d2f790c21319e2b0f992e9e2978336d50f6ca
/smscenter-service/src/main/java/com/sanerzone/smscenter/gateway/base/JmsgGateWayInfo.java
46ef6eaba0125deb3c2ee5435055f12fc6467d44
[]
no_license
aiical/smscenter-parent
f485876fe121b1a5db3e0bb71548676cbbb272a2
20c18770280c47d60523f4bc89044dc85b58f489
refs/heads/master
2023-02-18T00:23:46.110175
2020-04-19T09:57:30
2020-04-19T09:57:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,785
java
package com.sanerzone.smscenter.gateway.base; import java.util.Date; import java.util.Map; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; public class JmsgGateWayInfo { private String id; private String gatewayName; private String gatewayState; private String type; private String spNumber; private String host; private Integer port; private String localHost; private Integer localPort; private String sourceAddr; private String sharedSecret; private String version; private Integer readTimeout; private Integer reconnectInterval; private Integer transactionTimeout; private Integer heartbeatInterval; private Integer heartbeatNoresponseout; private Integer debug; private String corpId; private String status; private Date gmtCreated; private Date gmtModified; private String isOutProv; private String appCode; private int gatewaySign; // 网关签名 0:否 1:是 private int supportLongMsg; // 是否支持长短信 private int readLimit; // 接收速率 private int writeLimit; // 请求速率 private String appHost; // 应用IP private int reportGetFlag; // 状态获取方式 0:主动查询 1:异步通知 private String extClass; private String extParam; private boolean isWholeSpNumber; //是否完整SP接入号 private Map<String, String> param; private String serviceId; public boolean isWholeSpNumber() { return isWholeSpNumber; } public void setWholeSpNumber(boolean isWholeSpNumber) { this.isWholeSpNumber = isWholeSpNumber; } public String getAppHost() { return appHost; } public void setAppHost(String appHost) { this.appHost = appHost; } public int getReportGetFlag() { return reportGetFlag; } public void setReportGetFlag(int reportGetFlag) { this.reportGetFlag = reportGetFlag; } public String getExtClass() { return extClass; } public void setExtClass(String extClass) { this.extClass = extClass; } public String getExtParam() { return extParam; } public void setExtParam(String extParam) { this.extParam = extParam; } public int getGatewaySign() { return gatewaySign; } public void setGatewaySign(int gatewaySign) { this.gatewaySign = gatewaySign; } public int getSupportLongMsg() { return supportLongMsg; } public void setSupportLongMsg(int supportLongMsg) { this.supportLongMsg = supportLongMsg; } public int getReadLimit() { return readLimit; } public void setReadLimit(int readLimit) { this.readLimit = readLimit; } public int getWriteLimit() { return writeLimit; } public void setWriteLimit(int writeLimit) { this.writeLimit = writeLimit; } public String getAppCode() { return appCode; } public void setAppCode(String appCode) { this.appCode = appCode; } public String getId() { return id; } public void setId(String id) { this.id = id == null ? null : id.trim(); } public String getGatewayName() { return gatewayName; } public void setGatewayName(String gatewayName) { this.gatewayName = gatewayName == null ? null : gatewayName.trim(); } public String getGatewayState() { return gatewayState; } public void setGatewayState(String gatewayState) { this.gatewayState = gatewayState == null ? null : gatewayState.trim(); } public String getType() { return type; } public void setType(String type) { this.type = type == null ? null : type.trim(); } public String getSpNumber() { return spNumber; } public void setSpNumber(String spNumber) { this.spNumber = spNumber == null ? null : spNumber.trim(); } public String getHost() { return host; } public void setHost(String host) { this.host = host == null ? null : host.trim(); } public Integer getPort() { return port; } public void setPort(Integer port) { this.port = port; } public String getLocalHost() { return localHost; } public void setLocalHost(String localHost) { this.localHost = localHost == null ? null : localHost.trim(); } public Integer getLocalPort() { return localPort; } public void setLocalPort(Integer localPort) { this.localPort = localPort; } public String getSourceAddr() { return sourceAddr; } public void setSourceAddr(String sourceAddr) { this.sourceAddr = sourceAddr == null ? null : sourceAddr.trim(); } public String getSharedSecret() { return sharedSecret; } public void setSharedSecret(String sharedSecret) { this.sharedSecret = sharedSecret == null ? null : sharedSecret.trim(); } public String getVersion() { return version; } public void setVersion(String version) { this.version = version == null ? null : version.trim(); } public Integer getReadTimeout() { return readTimeout; } public void setReadTimeout(Integer readTimeout) { this.readTimeout = readTimeout; } public Integer getReconnectInterval() { return reconnectInterval; } public void setReconnectInterval(Integer reconnectInterval) { this.reconnectInterval = reconnectInterval; } public Integer getTransactionTimeout() { return transactionTimeout; } public void setTransactionTimeout(Integer transactionTimeout) { this.transactionTimeout = transactionTimeout; } public Integer getHeartbeatInterval() { return heartbeatInterval; } public void setHeartbeatInterval(Integer heartbeatInterval) { this.heartbeatInterval = heartbeatInterval; } public Integer getHeartbeatNoresponseout() { return heartbeatNoresponseout; } public void setHeartbeatNoresponseout(Integer heartbeatNoresponseout) { this.heartbeatNoresponseout = heartbeatNoresponseout; } public Integer getDebug() { return debug; } public void setDebug(Integer debug) { this.debug = debug; } public String getCorpId() { return corpId; } public void setCorpId(String corpId) { this.corpId = corpId == null ? null : corpId.trim(); } public String getStatus() { return status; } public void setStatus(String status) { this.status = status == null ? null : status.trim(); } public Date getGmtCreated() { return gmtCreated; } public void setGmtCreated(Date gmtCreated) { this.gmtCreated = gmtCreated; } public Date getGmtModified() { return gmtModified; } public void setGmtModified(Date gmtModified) { this.gmtModified = gmtModified; } public String getIsOutProv() { return isOutProv; } public void setIsOutProv(String isOutProv) { this.isOutProv = isOutProv == null ? null : isOutProv.trim(); } @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); } public Map<String, String> getParam() { return param; } public void setParam(Map<String, String> param) { this.param = param; } public String getServiceId() { return serviceId; } public void setServiceId(String serviceId) { this.serviceId = serviceId; } }
[ "563248403@qq.com" ]
563248403@qq.com
de834cb49f6ec52f0d811a7a5eade61e781ce4d1
322994e68e818f7e4aa0d4b8f648c3ddc2231add
/org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/core/palette/CategoryInfoTest.java
3930b98ca7335ce7e940e47775872d2ec1ce4ea0
[]
no_license
urna/windowbuilder-eclipse
55e74f075e3eafdd4914d7607965332a815e3a6c
47e9177ee99229551055602303376566e933b136
refs/heads/master
2021-04-15T13:44:13.385372
2017-11-24T14:20:56
2018-02-21T09:21:00
126,906,772
1
1
null
null
null
null
UTF-8
Java
false
false
4,412
java
/******************************************************************************* * Copyright (c) 2011 Google, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Google, Inc. - initial API and implementation *******************************************************************************/ package org.eclipse.wb.tests.designer.core.palette; import org.eclipse.wb.core.editor.palette.model.CategoryInfo; import org.eclipse.wb.core.editor.palette.model.EntryInfo; import org.eclipse.wb.core.editor.palette.model.PaletteInfo; import org.eclipse.wb.core.editor.palette.model.entry.ComponentEntryInfo; /** * Tests for {@link CategoryInfo}. * * @author scheglov_ke */ public class CategoryInfoTest extends AbstractPaletteTest { //////////////////////////////////////////////////////////////////////////// // // Tests // //////////////////////////////////////////////////////////////////////////// public void test_toString() throws Exception { CategoryInfo category = new CategoryInfo(); category.setId("1"); category.setName("category 1"); // add entry { ComponentEntryInfo component = new ComponentEntryInfo(); component.setComponentClassName("javax.swing.JButton"); category.addEntry(component); } // check assertEquals( "Category(id='1', name='category 1', entries=[Component(class='javax.swing.JButton')])", category.toString()); } /** * Test for "open" property. */ public void test_open() throws Exception { CategoryInfo category = new CategoryInfo(); assertFalse(category.isOpen()); category.setOpen(true); assertTrue(category.isOpen()); } /** * Test for "entries" operations. */ public void test_entries() throws Exception { CategoryInfo category = new CategoryInfo(); assertTrue(category.getEntries().isEmpty()); // prepare entries EntryInfo entry_1 = new ComponentEntryInfo(); entry_1.setId("1"); EntryInfo entry_2 = new ComponentEntryInfo(); entry_2.setId("2"); // add entries { category.addEntry(entry_1); category.addEntry(entry_2); assertEquals(2, category.getEntries().size()); assertSame(entry_1, category.getEntries().get(0)); assertSame(entry_2, category.getEntries().get(1)); // clean up category.getEntries().clear(); } // add with index { category.addEntry(entry_1); category.addEntry(0, entry_2); assertEquals(2, category.getEntries().size()); assertSame(entry_2, category.getEntries().get(0)); assertSame(entry_1, category.getEntries().get(1)); } // remove one by one { category.removeEntry(null); assertEquals(2, category.getEntries().size()); // category.removeEntry(entry_1); assertEquals(1, category.getEntries().size()); assertSame(entry_2, category.getEntries().get(0)); // category.removeEntry(entry_2); assertEquals(0, category.getEntries().size()); } } public void test_parse() throws Exception { addPaletteExtension(new String[]{"<category id='id_1' name='name 1' description='description 1'/>"}); PaletteInfo palette = loadPalette(); // check category CategoryInfo category = palette.getCategory("id_1"); assertEquals("id_1", category.getId()); assertEquals("name 1", category.getName()); assertEquals("description 1", category.getDescription()); assertTrue(category.isVisible()); assertTrue(category.isOpen()); assertFalse(category.isOptional()); } public void test_parse_notDefault() throws Exception { addPaletteExtension(new String[]{"<category id='id_1'" + " name='name 1'" + " visible='false'" + " open='false'" + " optional='true'/>"}); PaletteInfo palette = loadPalette(); // check category CategoryInfo category = palette.getCategory("id_1"); assertEquals("id_1", category.getId()); assertFalse(category.isVisible()); assertFalse(category.isOpen()); assertTrue(category.isOptional()); } }
[ "eclayberg@f1f5f5c2-2e22-11e0-a36a-49c83f4898e7" ]
eclayberg@f1f5f5c2-2e22-11e0-a36a-49c83f4898e7
c31934a57cd157dddc5e4cb28c70ab3ee712cb81
34ed294866440f11f0d46fc33b49da970e292294
/src/BasicDemo/Demo02/ReverseList.java
8881c0b110ac61907b6a8b91eadaef5867e3e60c
[]
no_license
songwell1024/Algorithm-JAVA
f4033128ce4327335c9225c3235ed2a489734066
bfdc8a4291984f324d4cb07ce42233919af1367a
refs/heads/master
2021-07-15T10:12:05.692703
2019-01-03T13:55:22
2019-01-03T13:55:22
109,383,871
1
0
null
null
null
null
UTF-8
Java
false
false
1,669
java
package BasicDemo.Demo02; /** * 反转单向和双向链表 【题目】 分别实现反转单向链表和反转双向链表的函数。 【要求】 如果链表长度为N,时间复杂度要求为O(N),额外空间 复杂度要求为O(1) * @author WilsonSong * @date 2018/9/6/006 */ public class ReverseList { private class Node{ Node next; int value; public Node(Node next, int value){ this.next = next; this.value = value; } public Node(int value){ this(null, value); } } //1-->2-->3-->null ----转换----- null<---1<---2<----3; public static Node reverseList(Node head){ Node pre = null; Node next = null; while (head != null){ next = head.next; head.next = pre; pre = head; head = next; } return pre; } private class DoubleNode{ public DoubleNode last; public DoubleNode next; public int value; public DoubleNode(int value){ this.value = value; } } // ---->----> // 1 2 3 // <----<---- //双向链表的一个节点分别有指向前驱和指向后继的两个节点 //反转的话其实就是指向前驱和指向后继的两个指针交换 public DoubleNode reverseDoubleList(DoubleNode head){ DoubleNode pre = null; DoubleNode next = null; while (head != null){ next = head.next; head.next = pre; head.last = next; pre = head; head = next; } return pre; } }
[ "zysong0709@foxmail.com" ]
zysong0709@foxmail.com
123d31d49d415db53d28ff8fc629b504fe83a6b7
18b20a45faa4cf43242077e9554c0d7d42667fc2
/HelicoBacterMod/build/tmp/expandedArchives/forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3-sources.jar_db075387fe30fb93ccdc311746149f9d/net/minecraft/client/gui/screen/OptimizeWorldScreen.java
b25b23a8166cd1257b70d523df626f05f8df8369
[]
no_license
qrhlhplhp/HelicoBacterMod
2cbe1f0c055fd5fdf97dad484393bf8be32204ae
0452eb9610cd70f942162d5b23141b6bf524b285
refs/heads/master
2022-07-28T16:06:03.183484
2021-03-20T11:01:38
2021-03-20T11:01:38
347,618,857
2
0
null
null
null
null
UTF-8
Java
false
false
3,944
java
package net.minecraft.client.gui.screen; import it.unimi.dsi.fastutil.booleans.BooleanConsumer; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenCustomHashMap; import net.minecraft.client.gui.widget.button.Button; import net.minecraft.client.resources.I18n; import net.minecraft.util.Util; import net.minecraft.util.WorldOptimizer; import net.minecraft.util.math.MathHelper; import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.world.dimension.DimensionType; import net.minecraft.world.storage.SaveFormat; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @OnlyIn(Dist.CLIENT) public class OptimizeWorldScreen extends Screen { private static final Object2IntMap<DimensionType> PROGRESS_BAR_COLORS = Util.make(new Object2IntOpenCustomHashMap<>(Util.identityHashStrategy()), (p_212346_0_) -> { p_212346_0_.put(DimensionType.OVERWORLD, -13408734); p_212346_0_.put(DimensionType.THE_NETHER, -10075085); p_212346_0_.put(DimensionType.THE_END, -8943531); p_212346_0_.defaultReturnValue(-2236963); }); private final BooleanConsumer field_214332_b; private final WorldOptimizer optimizer; public OptimizeWorldScreen(BooleanConsumer p_i51072_1_, String p_i51072_2_, SaveFormat p_i51072_3_, boolean p_i51072_4_) { super(new TranslationTextComponent("optimizeWorld.title", p_i51072_3_.getWorldInfo(p_i51072_2_).getWorldName())); this.field_214332_b = p_i51072_1_; this.optimizer = new WorldOptimizer(p_i51072_2_, p_i51072_3_, p_i51072_3_.getWorldInfo(p_i51072_2_), p_i51072_4_); } protected void init() { super.init(); this.addButton(new Button(this.width / 2 - 100, this.height / 4 + 150, 200, 20, I18n.format("gui.cancel"), (p_214331_1_) -> { this.optimizer.cancel(); this.field_214332_b.accept(false); })); } public void tick() { if (this.optimizer.isFinished()) { this.field_214332_b.accept(true); } } public void removed() { this.optimizer.cancel(); } public void render(int p_render_1_, int p_render_2_, float p_render_3_) { this.renderBackground(); this.drawCenteredString(this.font, this.title.getFormattedText(), this.width / 2, 20, 16777215); int i = this.width / 2 - 150; int j = this.width / 2 + 150; int k = this.height / 4 + 100; int l = k + 10; this.drawCenteredString(this.font, this.optimizer.getStatusText().getFormattedText(), this.width / 2, k - 9 - 2, 10526880); if (this.optimizer.getTotalChunks() > 0) { fill(i - 1, k - 1, j + 1, l + 1, -16777216); this.drawString(this.font, I18n.format("optimizeWorld.info.converted", this.optimizer.getConverted()), i, 40, 10526880); this.drawString(this.font, I18n.format("optimizeWorld.info.skipped", this.optimizer.getSkipped()), i, 40 + 9 + 3, 10526880); this.drawString(this.font, I18n.format("optimizeWorld.info.total", this.optimizer.getTotalChunks()), i, 40 + (9 + 3) * 2, 10526880); int i1 = 0; for(DimensionType dimensiontype : DimensionType.getAll()) { int j1 = MathHelper.floor(this.optimizer.getProgress(dimensiontype) * (float)(j - i)); fill(i + i1, k, i + i1 + j1, l, PROGRESS_BAR_COLORS.getInt(dimensiontype)); i1 += j1; } int k1 = this.optimizer.getConverted() + this.optimizer.getSkipped(); this.drawCenteredString(this.font, k1 + " / " + this.optimizer.getTotalChunks(), this.width / 2, k + 2 * 9 + 2, 10526880); this.drawCenteredString(this.font, MathHelper.floor(this.optimizer.getTotalProgress() * 100.0F) + "%", this.width / 2, k + (l - k) / 2 - 9 / 2, 10526880); } super.render(p_render_1_, p_render_2_, p_render_3_); } }
[ "rubickraft169@gmail.com" ]
rubickraft169@gmail.com
5e4ba39902bedae853047f049118b79bc1310f6c
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Mate20-9.0/src/main/java/com/huawei/hiai/awareness/service/AwarenessInnerConstants.java
32924ecfc1078909f4ec9afe2ea0ce83aac7afcc
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
660
java
package com.huawei.hiai.awareness.service; public class AwarenessInnerConstants { public static final String AWARENESS_BUNDLE_TYPE_TAG = "AWARENESS_BUNDLE_TYPE_TAG"; public static final String AWARENESS_NOTIFY_HEAD_TAG = "AWARENESS_NOTIFY_HEAD_TAG"; public static final String AWARENESS_VERSION_CODE = "1.8.0"; public static final int DEFAULT_CONFIDENCE_VALUE = 100; public static final int EVENT_TYPE_ENTER = 1; public static final int EVENT_TYPE_EXIT = 2; public static final int MOVEMENT_TYPE_ACTIVITY = 1; public static final int MOVEMENT_TYPE_ENVIRONMENT = 2; public static final char PACKAGE_SPLITE_CHAR_TAG = ':'; }
[ "dstmath@163.com" ]
dstmath@163.com
cf9003a8121352ace1213fd84c3fc87047407748
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_8e0d49341c3996d41ddece43850543d00745341a/ColorToAlphaTransformerDelegate/30_8e0d49341c3996d41ddece43850543d00745341a_ColorToAlphaTransformerDelegate_s.java
ce1cdc317477f4ce1f07a1fd7f9e9dadbab5a7d9
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,258
java
package au.gov.ga.worldwind.layers.tiled.image.delegate.colortoalpha; import java.awt.Color; import java.awt.image.BufferedImage; import java.util.regex.Matcher; import java.util.regex.Pattern; import au.gov.ga.worldwind.layers.tiled.image.delegate.Delegate; import au.gov.ga.worldwind.layers.tiled.image.delegate.ImageTransformerDelegate; public class ColorToAlphaTransformerDelegate implements ImageTransformerDelegate { private final static String DEFINITION_STRING = "ColorToAlphaTransformer"; protected final Color color; public ColorToAlphaTransformerDelegate() { this(Color.black); } public ColorToAlphaTransformerDelegate(Color color) { this.color = color; } public Color getColor() { return color; } @Override public String toDefinition() { return DEFINITION_STRING + "(" + color.getRed() + "," + color.getGreen() + "," + color.getBlue() + ")"; } @Override public Delegate fromDefinition(String definition) { if (definition.toLowerCase().startsWith(DEFINITION_STRING.toLowerCase())) { Pattern pattern = Pattern.compile("(?:(\\d+),(\\d+),(\\d+))"); Matcher matcher = pattern.matcher(definition); if (matcher.find()) { int r = Integer.parseInt(matcher.group(1)); int g = Integer.parseInt(matcher.group(2)); int b = Integer.parseInt(matcher.group(3)); Color color = new Color(r, g, b); return new ColorToAlphaTransformerDelegate(color); } } return null; } @Override public BufferedImage transformImage(BufferedImage image) { if (image == null) return null; BufferedImage dst = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB_PRE); for (int y = 0; y < image.getHeight(); y++) { for (int x = 0; x < image.getWidth(); x++) { int rgb = image.getRGB(x, y); rgb = colorToAlpha(rgb, color); dst.setRGB(x, y, rgb); } } return dst; } public static int colorToAlpha(int argb, Color color) { int a = (argb >> 24) & 0xff; int r = (argb >> 16) & 0xff; int g = (argb >> 8) & 0xff; int b = (argb) & 0xff; float pr = distancePercent(r, color.getRed(), 0, 255); float pg = distancePercent(g, color.getGreen(), 0, 255); float pb = distancePercent(b, color.getBlue(), 0, 255); float percent = Math.max(pr, Math.max(pg, pb)); //(image - color) / alpha + color if (percent > 0) { r = (int) ((r - color.getRed()) / percent) + color.getRed(); g = (int) ((g - color.getGreen()) / percent) + color.getGreen(); b = (int) ((b - color.getBlue()) / percent) + color.getBlue(); } a = (int) (a * percent); return (a & 0xff) << 24 | (r & 0xff) << 16 | (g & 0xff) << 8 | (b & 0xff); } private static float distancePercent(int value, int distanceTo, int min, int max) { float diff = 0f; if (value < distanceTo) { diff = (distanceTo - value) / (float) (distanceTo - min); } else if (value > distanceTo) { diff = (value - distanceTo) / (float) (max - distanceTo); } return Math.max(0f, Math.min(1f, diff)); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
480d4f4f9790df939b945d8a4d1492dd6d457d87
e9dd45ec80d7acc2504ac52e9a46a39173aa9012
/src/main/java/org/voovan/tools/TObject.java
24cfabcda84c24cb7075b762fa87368268d13e45
[ "Apache-2.0" ]
permissive
bryant1410/Voovan
81824edf188c5100b9985b985f4b5e276609f826
c2b5cc552f81b15eaa0359ed4801b36bbcd5428a
refs/heads/master
2021-01-19T21:06:28.031870
2017-04-18T09:46:26
2017-04-18T09:46:26
88,608,915
0
0
null
2017-04-18T09:46:27
2017-04-18T09:46:27
null
UTF-8
Java
false
false
2,521
java
package org.voovan.tools; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 对象工具类 * * @author helyho * * Voovan Framework. * WebSite: https://github.com/helyho/Voovan * Licence: Apache v2 License */ public class TObject { /** * 类型转换 * @param <T> 范型 * @param obj 被转换对象 * @return 转换后的对象 */ @SuppressWarnings("unchecked") public static <T> T cast(Object obj){ return (T)obj; } /** * 转换成指定类型 * @param <T> 范型 * @param obj 被转换对象 * @param t 指定的类型 * @return 转换后的对象 */ @SuppressWarnings("unchecked") public static <T> T cast(Object obj,Class<T> t){ return (T)obj; } /** * 空值默认值 * @param <T> 范型 * @param source 检测对象 * @param defValue null 值替换值 * @return 如果非 null 则返回 source,如果为 null 则返回 defValue。 */ public static <T>T nullDefault(T source,T defValue){ return source!=null?source:defValue; } /** * 初始化一个 List * @param objs List 列表的每一个元素 * @return 初始化完成的List对象 */ @SuppressWarnings("rawtypes") public static List newList(Object ...objs){ ArrayList<Object> list = new ArrayList<Object>(); for(Object obj:objs){ list.add(obj); } return list; } /** * 初始化一个 Map * @param objs 每两个参数组成一个键值对,来初始化一个 Map. 如:key1,value1,key2,value2..... * @return 初始化完成的Map对象 */ @SuppressWarnings("rawtypes") public static Map newMap(Object ...objs){ HashMap<Object,Object> map = new HashMap<Object,Object>(); for(int i=1;i<objs.length;i+=2){ map.put(objs[i-1], objs[i]); } return map; } /** * 将 Map 的值转换成 List * @param map 需转换的 Map 对象 * @return 转后的 Value 的 list */ public static List<?> mapValueToList(Map<?,?> map){ ArrayList<Object> result = new ArrayList<Object>(); for(Map.Entry<?,?> entry : map.entrySet()){ result.add(entry.getValue()); } return result; } /** * 将数组转换成 Map * key 位置坐标 * value 数组值 * @param objs 待转换的数组 * @return 转换后的 Map */ public static Map<String, Object> arrayToMap(Object[] objs){ HashMap<String ,Object> arrayMap = new HashMap<String ,Object>(); for(int i=0;i<objs.length;i++){ arrayMap.put(Integer.toString(i+1), objs[i]); } return arrayMap; } }
[ "helyho@gmail.com" ]
helyho@gmail.com
7b5986c1f54a19f1177747ac8c6caf842bfa8e27
e682fa3667adce9277ecdedb40d4d01a785b3912
/internal/fischer/mangf/A112520.java
c6ef676c094c336937788825152685376aed777e
[ "Apache-2.0" ]
permissive
gfis/joeis-lite
859158cb8fc3608febf39ba71ab5e72360b32cb4
7185a0b62d54735dc3d43d8fb5be677734f99101
refs/heads/master
2023-08-31T00:23:51.216295
2023-08-29T21:11:31
2023-08-29T21:11:31
179,938,034
4
1
Apache-2.0
2022-06-25T22:47:19
2019-04-07T08:35:01
Roff
UTF-8
Java
false
false
469
java
package irvine.oeis.a112; import irvine.math.z.Z; import irvine.oeis.recur.HolonomicRecurrence; /** * A112520 Expansion of 2/(3-sqrt(3-2*sqrt(1-4x))). * @author Georg Fischer */ public class A112520 extends HolonomicRecurrence { /** Construct the sequence. */ public A112520() { super(0, "[[0],[-32760,39096,-17456,3456,-256],[-64800,76728,-33784,6528,-464],[2016,-4128,3096,-1008,120],[1152,-2370,1625,-450,43],[0,60,-110,60,-10]]", "1,1,1,3", 0); } }
[ "dr.Georg.Fischer@gmail.com" ]
dr.Georg.Fischer@gmail.com
bde55dbec4105dd4666b84a09c0a8ccf60232691
9e12b1242172c310a3f9cf46ec0020d523168f55
/src/main/java/com/hybrid/config/SiteMeshFilterConfig.java
192f579a67a19db1ed594f0f0ed834e97021ff5d
[]
no_license
hmhee12/MosaicWebJSP
61d37779130d0e9c2acce0104bf0631259998531
aadf4b8c366c37618d24680eebbaba501aae3789
refs/heads/master
2021-01-12T22:22:49.997116
2016-08-08T09:06:12
2016-08-08T09:06:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
832
java
package com.hybrid.config; import org.sitemesh.builder.SiteMeshFilterBuilder; import org.sitemesh.config.ConfigurableSiteMeshFilter; import org.springframework.boot.context.embedded.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class SiteMeshFilterConfig extends ConfigurableSiteMeshFilter { @Override protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) { builder.addDecoratorPath("/deco/*", "/WEB-INF/deco/maindeco.jsp"); builder.addDecoratorPath("/deco2/*", "/WEB-INF/deco/maindeco2.jsp"); } @Bean FilterRegistrationBean siteMesh() { FilterRegistrationBean bean = new FilterRegistrationBean(); bean.setFilter(this); return bean; } }
[ "java" ]
java
378eb83a9034febbb33183046c88575daa259a64
244849bbaa6e3c1b524cc1fbed7834a898890d66
/ebox_uer/gege_package/src/main/java/com/moge/gege/model/ImageModel.java
c7cdd493e38a977be4aac2d8f3db1d8cfbcf327b
[]
no_license
hellob5code/DevelopProject
db5d7ed27549135a9b9811c012d7e4942947c152
b4eae66d316e468e41dca1443223e2657ebb58fa
refs/heads/master
2021-01-13T03:14:47.253253
2016-09-11T02:50:26
2016-09-11T02:50:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
package com.moge.gege.model; public class ImageModel { private String url; private String image; public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } }
[ "shi.delei@mgooo.cn" ]
shi.delei@mgooo.cn
75c8fbe9bba2e910940bb4fa3d64852c23997a91
3c45ef1bb3b404e3ddb0791f5139043eac48a79e
/SDK/liferay-plugins-sdk/portlets/rev-portlet/docroot/WEB-INF/service/com/hitss/layer/service/ActividadPlanAccionUsuarioServiceClp.java
cfd2b3de417a02d9ff4048793d0cb4310a5fb690
[]
no_license
danieldelgado/ProyectoInformatico-Reporsitorio
216d91ca6f8a4598bcad27bfc5f018e5ba5f6561
2ac768ae4d41e7b566a521b5cef976a78271e336
refs/heads/master
2021-04-09T17:15:19.944886
2017-02-26T05:52:04
2017-02-26T05:52:04
55,432,714
0
0
null
null
null
null
UTF-8
Java
false
false
2,584
java
/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.hitss.layer.service; import com.liferay.portal.service.InvokableService; /** * @author Danielle Delgado * @generated */ public class ActividadPlanAccionUsuarioServiceClp implements ActividadPlanAccionUsuarioService { public ActividadPlanAccionUsuarioServiceClp( InvokableService invokableService) { _invokableService = invokableService; _methodName0 = "getBeanIdentifier"; _methodParameterTypes0 = new String[] { }; _methodName1 = "setBeanIdentifier"; _methodParameterTypes1 = new String[] { "java.lang.String" }; } @Override public java.lang.String getBeanIdentifier() { Object returnObj = null; try { returnObj = _invokableService.invokeMethod(_methodName0, _methodParameterTypes0, new Object[] { }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); if (t instanceof RuntimeException) { throw (RuntimeException)t; } else { throw new RuntimeException(t.getClass().getName() + " is not a valid exception"); } } return (java.lang.String)ClpSerializer.translateOutput(returnObj); } @Override public void setBeanIdentifier(java.lang.String beanIdentifier) { try { _invokableService.invokeMethod(_methodName1, _methodParameterTypes1, new Object[] { ClpSerializer.translateInput(beanIdentifier) }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); if (t instanceof RuntimeException) { throw (RuntimeException)t; } else { throw new RuntimeException(t.getClass().getName() + " is not a valid exception"); } } } @Override public java.lang.Object invokeMethod(java.lang.String name, java.lang.String[] parameterTypes, java.lang.Object[] arguments) throws java.lang.Throwable { throw new UnsupportedOperationException(); } private InvokableService _invokableService; private String _methodName0; private String[] _methodParameterTypes0; private String _methodName1; private String[] _methodParameterTypes1; }
[ "danieldelgado20g@gmail.com" ]
danieldelgado20g@gmail.com
a889a80288f684df4f9b71dd5427a8a74bbd064f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-418-7-2-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer_ESTest_scaffolding.java
7e1fe312921ea2adb42c41569c0f5e8cf53d26ca
[]
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
469
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Apr 01 21:11:30 UTC 2020 */ package org.xwiki.rendering.internal.renderer.xhtml; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XHTMLChainingRenderer_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
c1cc02bd8d8925a363d2ab4174ebbed4151725ca
477ae6d042b6feaf9fa0c3822097bccd081e59b4
/src/factorymethod/OperationDiv.java
2aa2b80487614a9b5c3a24fe205580c6cafef7a2
[ "Apache-2.0" ]
permissive
simplebam/JavaDesignPatterns
655f5ef76ae77b6fa00538e77ee193fa13bf7386
90be24b545873ee506028db5280f9fbadcb6f17a
refs/heads/master
2021-08-28T05:01:04.381565
2017-12-11T08:20:55
2017-12-11T08:20:55
110,493,418
1
0
null
null
null
null
UTF-8
Java
false
false
181
java
package factorymethod; /** * 相加 */ public class OperationDiv extends Operate { @Override protected String getResult() { return numA + numB + ""; } }
[ "3421448373@qq.com" ]
3421448373@qq.com
bf19af8b910d374e89eb5c37caf2b490c1923f97
1095fea85170be0fead52a277f7c5c2661c747ff
/rs3 files/Server/src/com/rs/io/InputStream.java
69ac5b5e42c2367612b287f3486614074d90c6f1
[ "Apache-2.0" ]
permissive
emcry666/project-scape
fed5d533f561cb06b3187ea116ff2692b840b6b7
827d213f129a9fd266cf42e7412402609191c484
refs/heads/master
2021-09-01T01:01:40.472745
2017-12-23T19:55:02
2017-12-23T19:55:02
114,505,346
0
0
null
null
null
null
UTF-8
Java
false
false
6,635
java
package com.rs.io; import com.rs.game.player.Player; import com.rs.utils.StringUtilities; public final class InputStream extends Stream { private static final int[] BIT_MASK = { 0, 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff, 0xffff, 0x1ffff, 0x3ffff, 0x7ffff, 0xfffff, 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff, 0x7ffffff, 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, -1 }; public InputStream(byte[] buffer) { this.buffer = buffer; this.length = buffer.length; } public void initBitAccess() { bitPosition = offset * 8; } public void finishBitAccess() { offset = (bitPosition + 7) / 8; } public final int readBits(int count) { int bufferPosition = this.bitPosition >> 3; int bitOffset = 8 - (this.bitPosition & 0x7); this.bitPosition += count; int value = 0; for (; count > bitOffset; bitOffset = 8) { value += ((this.getBuffer()[bufferPosition++] & BIT_MASK[bitOffset]) << count - bitOffset); count -= bitOffset; } if (count != bitOffset) value += (this.getBuffer()[bufferPosition] >> bitOffset - count & BIT_MASK[count]); else value += (BIT_MASK[bitOffset] & this.getBuffer()[bufferPosition]); return value; } public int getRemaining() { return offset < length ? length - offset : 0; } public void skip(int length) { offset += length; } public int readByte() { return getRemaining() > 0 ? buffer[offset++] : 0; } public int peekByte() { return getRemaining() > 0 ? buffer[offset] : 0; } public void readBytes(byte buffer[]) { readBytes(buffer, 0, buffer.length); } public void readBytes(byte buffer[], int off, int len) { for (int k = off; k < len + off; k++) { buffer[k] = (byte) readByte(); } } public int readPacket(Player player) { int id = 0xff & readUnsignedByte() - player.getIsaacKeyPair().inKey().getNextValue(); if (id < 128) return id; return (id - 128 << 8) + (readUnsignedByte() - player.getIsaacKeyPair().inKey().getNextValue()); } public String readString() { int startpos = offset; while (offset < buffer.length && buffer[offset++] != 0) { } int strlen = offset - startpos - 1; if (strlen <= 0) return ""; return StringUtilities.decodeString(buffer, startpos, strlen); } public String readVersionedString() { // aka JAG string as you called it return readVersionedString((byte) 0); } public String readVersionedString(byte versionNumber) { if (readByte() != versionNumber) throw new IllegalStateException("Bad string version number!"); return readString(); } public String readNullString() { if (peekByte() == 0) { skip(1); return null; } return readString(); } public int read24BitInt() { return (readUnsignedByte() << 16) + (readUnsignedByte() << 8) + (readUnsignedByte()); } public int readSmart2() { int i = 0; int i_33_ = readUnsignedSmart(); while (i_33_ == 32767) { i_33_ = readUnsignedSmart(); i += 32767; } i += i_33_; return i; } public int readUnsignedByte() { return readByte() & 0xff; } public int readByte128() { return (byte) (readByte() - 128); } public int readByteC() { return (byte) -readByte(); } public int read128Byte() { return (byte) (128 - readByte()); } public int readUnsignedByte128() { return readUnsignedByte() - 128 & 0xff; } public int readUnsignedByteC() { return -readUnsignedByte() & 0xff; } public int readUnsigned128Byte() { return 128 - readUnsignedByte() & 0xff; } public int readShortLE() { int i = readUnsignedByte() + (readUnsignedByte() << 8); if (i > 32767) { i -= 0x10000; } return i; } public int readShort128() { int i = (readUnsignedByte() << 8) + (readByte() - 128 & 0xff); if (i > 32767) { i -= 0x10000; } return i; } public int readShortLE128() { int i = (readByte() - 128 & 0xff) + (readUnsignedByte() << 8); if (i > 32767) { i -= 0x10000; } return i; } public int read128ShortLE() { int i = (128 - readByte() & 0xff) + (readUnsignedByte() << 8); if (i > 32767) { i -= 0x10000; } return i; } public int readShort() { int i = (readUnsignedByte() << 8) + readUnsignedByte(); if (i > 32767) { i -= 0x10000; } return i; } public int readUnsignedShortLE() { return readUnsignedByte() + (readUnsignedByte() << 8); } public int readUnsignedShort() { return (readUnsignedByte() << 8) + readUnsignedByte(); } public int readSmart() { int var2 = peekByte() & 0xff; if (var2 < 128) { return readUnsignedByte(); } return readUnsignedShort() - 32768; } public int readSmart3() { int var2 = peekByte() & 0xff; if (var2 < 128) { return readUnsignedByte() - 64; } return readUnsignedShort() - 49152; } public int readBigSmart() { if ((peekByte() ^ 0xffffffff) <= -1) { int value = readUnsignedShort(); if (value == 32767) { return -1; } return value; } return readInt() & 0x7fffffff; } public int readSmart4() { int var2 = peekByte() & 0xff; if (var2 < 128) { return readUnsignedByte() - 1; } return readUnsignedShort() - 32769; } public int readUnsignedShort128() { return (readUnsignedByte() << 8) + (readByte() - 128 & 0xff); } public int readUnsignedShortLE128() { return (readByte() - 128 & 0xff) + (readUnsignedByte() << 8); } public int readInt() { return (readUnsignedByte() << 24) + (readUnsignedByte() << 16) + (readUnsignedByte() << 8) + readUnsignedByte(); } public int readIntV1() { return (readUnsignedByte() << 8) + readUnsignedByte() + (readUnsignedByte() << 24) + (readUnsignedByte() << 16); } public int readIntV2() { return (readUnsignedByte() << 16) + (readUnsignedByte() << 24) + readUnsignedByte() + (readUnsignedByte() << 8); } public int readIntLE() { return readUnsignedByte() + (readUnsignedByte() << 8) + (readUnsignedByte() << 16) + (readUnsignedByte() << 24); } public long readLong() { long l = readInt() & 0xffffffffL; long l1 = readInt() & 0xffffffffL; return (l << 32) + l1; } public int readUnsignedSmart() { int i = peekByte() & 0xff; if (i >= 128) { return -32768 + readUnsignedShort(); } return readUnsignedByte(); } public int readCustomInt() { return (readUnsignedByte() << 24) + (readUnsignedByte() << 16) + (readUnsignedByte() << 8) + readUnsignedByte() + 128; } public long readDynamic(int byteCount) { if (--byteCount < 0 || byteCount > 7) { throw new IllegalArgumentException(); } int bitOffset = byteCount * 8; long l = 0L; for (/**/; bitOffset >= 0; bitOffset -= 8) { l |= (0xffL & readByte()) << bitOffset; } return l; } }
[ "34613829+emcry666@users.noreply.github.com" ]
34613829+emcry666@users.noreply.github.com
78874a4467218519251182cdc0a2b96cfc27a7cb
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1230/src/main/java/module1230packageJava0/Foo49.java
0814a30cabe49b1b3d4cf3d964a14c2d303eb71d
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
334
java
package module1230packageJava0; import java.lang.Integer; public class Foo49 { Integer int0; public void foo0() { new module1230packageJava0.Foo48().foo4(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
39b91debe40f0fd2bb65a79b24cfc874991ede65
a88218107de69a422bc0910c9246a5baae6a21ba
/chapter3/src/main/java/com/wst/chapter3/mapper/RoleMapper.java
beb095697c828dc2c0ce48f22574a610e66afc10
[]
no_license
TaoWang4446/ssmr
52766457b2b4bc85376f5a667c2d45749df0a5b5
b9fbb3f1bf5cad1b04f85bcfa1bab8d1bc17cde4
refs/heads/master
2022-12-22T03:16:50.030205
2019-12-22T07:32:04
2019-12-22T07:32:04
229,228,886
0
0
null
null
null
null
UTF-8
Java
false
false
321
java
package com.wst.chapter3.mapper; import com.wst.chapter3.pojo.Role; import java.util.List; public interface RoleMapper { public int insertRole(Role role); public int deleteRole(Long id); public int updateRole(Role role); public Role getRole(Long id); public List<Role> findRoles(String roleName); }
[ "2825586682@qq.com" ]
2825586682@qq.com
416f426700551e167344bd7bc78f0d720d12eb27
fb7efe44f4d9f30d623f880d0eb620f3a81f0fbd
/chrome/android/junit/src/org/chromium/chrome/browser/init/AsyncInitTaskRunnerTest.java
34fb48c076effcb04e34d99332e74fa7f85b2661
[ "BSD-3-Clause" ]
permissive
wzyy2/chromium-browser
2644b0daf58f8b3caee8a6c09a2b448b2dfe059c
eb905f00a0f7e141e8d6c89be8fb26192a88c4b7
refs/heads/master
2022-11-23T20:25:08.120045
2018-01-16T06:41:26
2018-01-16T06:41:26
117,618,467
3
2
BSD-3-Clause
2022-11-20T22:03:57
2018-01-16T02:09:10
null
UTF-8
Java
false
false
4,706
java
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.init; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.Robolectric; import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; import org.robolectric.util.concurrent.RoboExecutorService; import org.chromium.base.ContextUtils; import org.chromium.base.library_loader.LibraryLoader; import org.chromium.base.library_loader.LibraryProcessType; import org.chromium.base.library_loader.LoaderErrors; import org.chromium.base.library_loader.ProcessInitException; import org.chromium.components.variations.firstrun.VariationsSeedFetcher; import org.chromium.testing.local.LocalRobolectricTestRunner; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; /** * Tests for {@link AsyncInitTaskRunner} */ @RunWith(LocalRobolectricTestRunner.class) @Config(manifest = Config.NONE) public class AsyncInitTaskRunnerTest { private static final int THREAD_WAIT_TIME_MS = 1000; private LibraryLoader mLoader; private AsyncInitTaskRunner mRunner; private CountDownLatch mLatch; private VariationsSeedFetcher mVariationsSeedFetcher; public AsyncInitTaskRunnerTest() throws ProcessInitException { mLoader = spy(LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER)); doNothing().when(mLoader).ensureInitialized(); doNothing().when(mLoader).asyncPrefetchLibrariesToMemory(); LibraryLoader.setLibraryLoaderForTesting(mLoader); mVariationsSeedFetcher = mock(VariationsSeedFetcher.class); VariationsSeedFetcher.setVariationsSeedFetcherForTesting(mVariationsSeedFetcher); ContextUtils.initApplicationContextForTests(RuntimeEnvironment.application); mLatch = new CountDownLatch(1); mRunner = spy(new AsyncInitTaskRunner() { @Override protected void onSuccess() { mLatch.countDown(); } @Override protected void onFailure() { mLatch.countDown(); } @Override protected Executor getExecutor() { return new RoboExecutorService(); } }); // Allow test to run on all builds when(mRunner.shouldFetchVariationsSeedDuringFirstRun()).thenReturn(true); } @Test public void libraryLoaderOnlyTest() throws InterruptedException, ProcessInitException, ExecutionException { mRunner.startBackgroundTasks(false, false); Robolectric.flushBackgroundThreadScheduler(); Robolectric.flushForegroundThreadScheduler(); assertTrue(mLatch.await(0, TimeUnit.SECONDS)); verify(mLoader).ensureInitialized(); verify(mLoader).asyncPrefetchLibrariesToMemory(); verify(mRunner).onSuccess(); verify(mVariationsSeedFetcher, never()).fetchSeed(""); } @Test public void libraryLoaderFailTest() throws InterruptedException, ProcessInitException { doThrow(new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_LIBRARY_LOAD_FAILED)) .when(mLoader) .ensureInitialized(); mRunner.startBackgroundTasks(false, false); Robolectric.flushBackgroundThreadScheduler(); Robolectric.flushForegroundThreadScheduler(); assertTrue(mLatch.await(0, TimeUnit.SECONDS)); verify(mRunner).onFailure(); verify(mVariationsSeedFetcher, never()).fetchSeed(""); } @Test public void fetchVariationsTest() throws InterruptedException, ProcessInitException { mRunner.startBackgroundTasks(false, true); Robolectric.flushBackgroundThreadScheduler(); Robolectric.flushForegroundThreadScheduler(); assertTrue(mLatch.await(0, TimeUnit.SECONDS)); verify(mLoader).ensureInitialized(); verify(mLoader).asyncPrefetchLibrariesToMemory(); verify(mRunner).onSuccess(); verify(mVariationsSeedFetcher).fetchSeed(""); } // TODO(aberent) Test for allocateChildConnection. Needs refactoring of ChildProcessLauncher to // make it mockable. }
[ "jacob-chen@iotwrt.com" ]
jacob-chen@iotwrt.com
ae92d4144f99f9a1b7c4070921cbc91a598c785c
4482bb07aaae0f901fa48f74127f416ddbcf56f9
/projects/uk.ac.york.ocl.javaMM/src/javaMM/validation/InfixExpressionValidator.java
f17cc8366111fcf6493caa2cdef1f760ce8c980b
[]
no_license
SMadani/PhD
931add010375b6df64fd4bf43fba0c8c85bc4d3b
18c44b0126d22eb50a4dad4719a41e025402a337
refs/heads/master
2023-02-18T04:55:53.011207
2021-01-20T19:38:17
2021-01-20T19:38:17
275,636,801
0
0
null
null
null
null
UTF-8
Java
false
false
829
java
/** * * $Id$ */ package javaMM.validation; import javaMM.Expression; import javaMM.InfixExpressionKind; import org.eclipse.emf.common.util.EList; /** * A sample validator interface for {@link javaMM.InfixExpression}. * This doesn't really do anything, and it's not a real EMF artifact. * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. */ public interface InfixExpressionValidator { boolean validate(); boolean validateOperator(InfixExpressionKind value); boolean validateRightOperand(Expression value); boolean validateLeftOperand(Expression value); boolean validateExtendedOperands(EList<Expression> value); }
[ "sinadoom@googlemail.com" ]
sinadoom@googlemail.com
4db11e2b8426556bcde2cfa24965c57626efcee4
d438b8b4b7953e20586019adcef6133587a1bdd3
/peppol-smp-server-webapp/src/main/java/com/helger/peppol/smpserver/mock/MockWebServer.java
a6995cfe986c0a918a5f778c202521414a0f336e
[]
no_license
jannewaren/peppol-smp-server
98ecdbd90010f7e60e9e2e4e32cb58ec5443aa21
1e1cb0878def390f0d165e906d92b7c36734ca2c
refs/heads/master
2021-07-14T05:09:15.555610
2017-10-16T16:40:12
2017-10-16T16:40:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,450
java
/** * Copyright (C) 2014-2017 Philip Helger (www.helger.com) * philip[at]helger[dot]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.helger.peppol.smpserver.mock; import java.net.URI; import java.util.Map; import javax.annotation.Nonnull; import javax.servlet.Servlet; import org.glassfish.grizzly.http.server.HttpServer; import org.glassfish.grizzly.servlet.ServletRegistration; import org.glassfish.grizzly.servlet.WebappContext; import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; import org.glassfish.jersey.servlet.ServletContainer; import org.glassfish.jersey.uri.UriComponent; import com.helger.commons.collection.impl.CommonsHashMap; import com.helger.commons.collection.impl.ICommonsMap; /** * WebServer based on Grizzly for standalone SMP server testing. * * @author Philip Helger */ final class MockWebServer { // Base URI the Grizzly HTTP server will listen on public static final String BASE_URI_HTTP = "http://localhost:9090/unittest/"; @Nonnull private static WebappContext _createContext (final URI u, final Class <? extends Servlet> aServletClass, final Servlet aServlet, final Map <String, String> aInitParams, final Map <String, String> aContextInitParams) { String path = u.getPath (); if (path == null) throw new IllegalArgumentException ("The URI path, of the URI " + u + ", must be non-null"); if (path.isEmpty ()) throw new IllegalArgumentException ("The URI path, of the URI " + u + ", must be present"); if (path.charAt (0) != '/') throw new IllegalArgumentException ("The URI path, of the URI " + u + ". must start with a '/'"); path = String.format ("/%s", UriComponent.decodePath (u.getPath (), true).get (1).toString ()); final WebappContext aContext = new WebappContext ("GrizzlyContext", path); ServletRegistration aRegistration; if (aServletClass != null) aRegistration = aContext.addServlet (aServletClass.getName (), aServletClass); else aRegistration = aContext.addServlet (aServlet.getClass ().getName (), aServlet); aRegistration.addMapping ("/*"); if (aContextInitParams != null) for (final Map.Entry <String, String> e : aContextInitParams.entrySet ()) aContext.setInitParameter (e.getKey (), e.getValue ()); if (aInitParams != null) aRegistration.setInitParameters (aInitParams); return aContext; } @Nonnull private static WebappContext _createContext (final String sURI) { final ICommonsMap <String, String> aInitParams = new CommonsHashMap<> (); aInitParams.put ("jersey.config.server.provider.packages", com.helger.peppol.smpserver.rest.ServiceGroupInterface.class.getPackage ().getName () + "," + com.helger.peppol.smpserver.exceptionmapper.RuntimeExceptionMapper.class.getPackage () .getName ()); return _createContext (URI.create (sURI), ServletContainer.class, null, aInitParams, null); } /** * Starts Grizzly HTTP server exposing JAX-RS resources defined in this * application. * * @return Grizzly HTTP server. */ @Nonnull public static HttpServer startRegularServer () { final WebappContext aContext = _createContext (BASE_URI_HTTP); // create and start a new instance of grizzly http server // exposing the Jersey application at BASE_URI final HttpServer ret = GrizzlyHttpServerFactory.createHttpServer (URI.create (BASE_URI_HTTP)); aContext.deploy (ret); return ret; } }
[ "philip@helger.com" ]
philip@helger.com
3d716b2b09e952d959b0c5a0309facfeae21cabe
b19674396d9a96c7fd7abdcfa423fe9fea4bb5be
/ratis-proto-shaded/src/main/java/org/apache/ratis/shaded/proto/grpc/GRpcProtos.java
346172ee590969ded2f96c43b633a6cb927624f4
[]
no_license
snemuri/ratis.github.io
0529ceed6f86ad916fbc559576b39ae123c465a0
85e1dd1890477d4069052358ed0b163c3e23db76
refs/heads/master
2020-03-24T07:18:03.130700
2018-07-27T13:29:06
2018-07-27T13:29:06
142,558,496
0
0
null
null
null
null
UTF-8
Java
false
true
3,118
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: GRpc.proto package org.apache.ratis.shaded.proto.grpc; public final class GRpcProtos { private GRpcProtos() {} public static void registerAllExtensions( org.apache.ratis.shaded.com.google.protobuf.ExtensionRegistryLite registry) { } public static void registerAllExtensions( org.apache.ratis.shaded.com.google.protobuf.ExtensionRegistry registry) { registerAllExtensions( (org.apache.ratis.shaded.com.google.protobuf.ExtensionRegistryLite) registry); } public static org.apache.ratis.shaded.com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static org.apache.ratis.shaded.com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\nGRpc.proto\022\nratis.grpc\032\nRaft.proto2\333\001\n" + "\031RaftClientProtocolService\022d\n\020setConfigu" + "ration\022*.ratis.common.SetConfigurationRe" + "questProto\032\".ratis.common.RaftClientRepl" + "yProto\"\000\022X\n\006append\022$.ratis.common.RaftCl" + "ientRequestProto\032\".ratis.common.RaftClie" + "ntReplyProto\"\000(\0010\0012\312\002\n\031RaftServerProtoco" + "lService\022[\n\013requestVote\022%.ratis.common.R" + "equestVoteRequestProto\032#.ratis.common.Re" + "questVoteReplyProto\"\000\022e\n\rappendEntries\022\'" + ".ratis.common.AppendEntriesRequestProto\032" + "%.ratis.common.AppendEntriesReplyProto\"\000" + "(\0010\001\022i\n\017installSnapshot\022).ratis.common.I" + "nstallSnapshotRequestProto\032\'.ratis.commo" + "n.InstallSnapshotReplyProto\"\000(\0012\343\001\n\024Admi" + "nProtocolService\022\\\n\014reinitialize\022&.ratis" + ".common.ReinitializeRequestProto\032\".ratis" + ".common.RaftClientReplyProto\"\000\022m\n\021server" + "Information\022+.ratis.common.ServerInforma" + "tionRequestProto\032).ratis.common.ServerIn" + "formationReplyProto\"\000B3\n\"org.apache.rati" + "s.shaded.proto.grpcB\nGRpcProtos\240\001\001b\006prot" + "o3" }; org.apache.ratis.shaded.com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new org.apache.ratis.shaded.com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { public org.apache.ratis.shaded.com.google.protobuf.ExtensionRegistry assignDescriptors( org.apache.ratis.shaded.com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; return null; } }; org.apache.ratis.shaded.com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new org.apache.ratis.shaded.com.google.protobuf.Descriptors.FileDescriptor[] { org.apache.ratis.shaded.proto.RaftProtos.getDescriptor(), }, assigner); org.apache.ratis.shaded.proto.RaftProtos.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }
[ "snemuri@hortonworks.com" ]
snemuri@hortonworks.com
c8a974714f0f9dbf4ad6b1c734b2e8fb7865b06b
5f8f4839c9ca2fe5671456ef649233825c532532
/src/main/java/teavm/gradle/TeaVMTask.java
8db8cd2b1cdac4a35c552180f7a83fddd474523d
[]
no_license
Anuken/teavm-gradle
8b21da4004f1c399bc08a8264dc502cb92f8cfb9
74ed89b3252e531f2f6b7b1c9f397bed70d1aa10
refs/heads/master
2022-05-25T09:14:36.494012
2020-04-17T20:06:10
2020-04-17T20:06:10
256,591,399
1
0
null
null
null
null
UTF-8
Java
false
false
3,813
java
package teavm.gradle; import groovy.lang.*; import org.gradle.api.*; import org.gradle.api.artifacts.*; import org.gradle.api.plugins.*; import org.gradle.api.tasks.*; import org.teavm.diagnostics.*; import org.teavm.tooling.*; import org.teavm.tooling.sources.*; import org.teavm.vm.*; import java.io.*; import java.net.*; import java.util.*; import java.util.function.*; import java.util.stream.*; public class TeaVMTask extends DefaultTask{ public String installDirectory = new File(getProject().getBuildDir(), "teavm").getAbsolutePath(); public String targetFileName = "app.js"; public boolean copySources = false; public boolean generateSourceMap = false; public boolean obfuscate = true; public boolean incremental = true; public TeaVMOptimizationLevel optimization = TeaVMOptimizationLevel.ADVANCED; public TeaVMTargetType target = TeaVMTargetType.JAVASCRIPT; public Closure<TeaVMTool> config; public String mainClass; @TaskAction public void compTeaVM(){ TeaVMTool tool = new TeaVMTool(); Project project = getProject(); tool.setTargetDirectory(new File(installDirectory)); tool.setTargetFileName(targetFileName); Consumer<File> addSrc = f -> { if(f.isFile()){ if(f.getAbsolutePath().endsWith(".jar")){ tool.addSourceFileProvider(new JarSourceFileProvider(f)); }else{ tool.addSourceFileProvider(new DirectorySourceFileProvider(f)); } }else{ tool.addSourceFileProvider(new DirectorySourceFileProvider(f)); } }; JavaPluginConvention convention = project.getConvention().getPlugin(JavaPluginConvention.class); convention .getSourceSets() .getByName(SourceSet.MAIN_SOURCE_SET_NAME) .getAllSource() .getSrcDirs().forEach(addSrc); project .getConfigurations() .getByName("teavmsources") .getFiles() .forEach(addSrc); File cacheDirectory = new File(project.getBuildDir(), "teavm-cache"); cacheDirectory.mkdirs(); tool.setCacheDirectory(cacheDirectory); tool.setObfuscated(obfuscate); tool.setOptimizationLevel(optimization); tool.setIncremental(incremental); tool.setSourceFilesCopied(copySources); tool.setTargetType(target); tool.setSourceMapsFileGenerated(generateSourceMap); if(mainClass != null){ tool.setMainClass(mainClass); }else{ throw new RuntimeException("mainClass not defined!"); } if(config != null){ config.call(tool); } try{ Configuration it = getProject().getConfigurations().getByName("runtime"); List<URL> urls = new ArrayList<>(); for(File file : new File(project.getBuildDir(), "libs").listFiles()) urls.add(file.toURI().toURL()); for(File file : it.getFiles()) urls.add(file.toURI().toURL()); for(File file : it.getAllArtifacts().getFiles()) urls.add(file.toURI().toURL()); tool.setClassLoader(new URLClassLoader(urls.toArray(new URL[0]), getClass().getClassLoader())); tool.generate(); String issues = tool.getProblemProvider().getProblems().stream().map(p -> { DefaultProblemTextConsumer cons = new DefaultProblemTextConsumer(); p.render(cons); return cons.getText(); }).collect(Collectors.joining("\n")); if(!issues.isEmpty()){ System.out.println("Issues:\n" + issues); } }catch(Exception e){ throw new RuntimeException(e); } } }
[ "arnukren@gmail.com" ]
arnukren@gmail.com
c6abab2da756e6a1f333a2d21e5756921958196d
20d7a12575ffa0b3b3095a83a16f6c0b6a02e133
/src/main/java/cn/gtmap/estateplat/server/core/service/impl/YztIntServiceImpl.java
3b7f41cc101580355ac61fdcbcc2f21be1461f23
[]
no_license
MrLiJun88/estateplat-service
937e52cb81951e411a0bc4c8317d93a3455227f8
0ba27a9251ce2cd712efe76f8cbe0b769b970cc9
refs/heads/master
2022-12-07T13:32:32.727808
2020-08-13T04:07:12
2020-08-13T04:07:12
287,170,568
0
0
null
null
null
null
UTF-8
Java
false
false
5,050
java
package cn.gtmap.estateplat.server.core.service.impl; import cn.gtmap.estateplat.core.support.mybatis.page.model.Page; import cn.gtmap.estateplat.core.support.mybatis.page.repository.Repo; import cn.gtmap.estateplat.server.core.mapper.DjxxMapper; import cn.gtmap.estateplat.server.core.service.YztIntService; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import java.util.*; /** * Created with IntelliJ IDEA. * User: sunchao * Date: 15-10-9 * Time: 下午6:23 * To change this template use File | Settings | File Templates. */ @Repository public class YztIntServiceImpl implements YztIntService { @Autowired private Repo repository; @Autowired private DjxxMapper djxxMapper; @Override @Transactional(readOnly = true) public HashMap<String, Object> getSerchJson(JSONArray jsonArray, String l, int p, int s) { Map map = new HashMap(); map.put("layerName", l); List list = new ArrayList(); HashMap querymap = new HashMap(); List<String> bdcdys = new ArrayList<String>(); if (CollectionUtils.isNotEmpty(jsonArray)) { for (int i = 0; i < jsonArray.size(); i++) { JSONObject field = (JSONObject) jsonArray.get(i); querymap.put(field.get("name"), field.get("value")); //根据自然幢号获取不动产单元号集合 if (StringUtils.equals(field.get("name").toString(), "ZRZH")) { String zrzh = field.get("value").toString(); //获取所对应的房屋类型 List<String> bdcfwlxList = djxxMapper.getBdcfwlxByzrzh(zrzh); if (CollectionUtils.isNotEmpty(bdcfwlxList)) { for (int j = 0; j < bdcfwlxList.size(); j++) { HashMap zrzhMap = new HashMap(); zrzhMap.put("bdcfwlx", bdcfwlxList.get(j)); zrzhMap.put("zrzh", zrzh); //根据房屋类型和自然幢号去不同的表查询不动产单元号 List<String> bdcdyhList = djxxMapper.getBdcdyhByZrzh(zrzhMap); if (CollectionUtils.isNotEmpty(bdcdyhList)) { for (String bdcdyh : bdcdyhList) { bdcdys.add(bdcdyh); } } } } } } if (CollectionUtils.isNotEmpty(bdcdys)) { String[] newStr = bdcdys.toArray(new String[1]); querymap.put("bdcdyhs", newStr); } } Page<HashMap> dataPaging = null; if (dataPaging != null) { map.put("page", dataPaging.getPage()); map.put("total", dataPaging.getTotal()); List<HashMap> zsList = dataPaging.getRows(); if (CollectionUtils.isNotEmpty(zsList)) { for (int i = 0; i < zsList.size(); i++) { HashMap zsTemp = new HashMap(); HashMap zs = zsList.get(i); Set set = zs.keySet(); Iterator iter = set.iterator(); StringBuilder zrzh = new StringBuilder(); //将Hash的key从大写转换成小写 while (iter.hasNext()) { String key = (String) iter.next(); //获取自然幢号 if (StringUtils.equals(key, "BDCDYH")) { List<String> zrzhList = djxxMapper.getZrzhByBdcdyh(zs.get(key).toString()); if (CollectionUtils.isNotEmpty(zrzhList)) { for (int j = 0; j < zrzhList.size(); j++) { String zrddy = zrzhList.get(i); if (i < zrzhList.size() - 1) zrzh.append(zrddy).append(","); else zrzh.append(zrddy); } } } zsTemp.put(key.toLowerCase(), zs.get(key)); } zsTemp.put("zrzh", zrzh); list.add(zsTemp); } } } map.put("returns", list); HashMap<String, Object> result = new HashMap(); result.put("success", true); result.put("result", map); return result; } }
[ "1424146780@qq.com" ]
1424146780@qq.com
ca3772ca58a9c74057100551819bf4694429670c
18d689fa4bb82f49c8c6098dcf9125d54657c5db
/unicardsoftwaredevelopment-androidmobileappfortopupandrefund-c0e3674d02c4/app/src/main/java/au/com/unicard/tafenswwallet/ui/refund/RefundFragment.java
02f409dd2175c33f34d45a6ebc618a1be9dd44f7
[]
no_license
hellcy/AndroidApprenticePratice
c0c971797002103922425507894e0ad70dc13d18
3747ecdf146399a131db1f71a61c4763972f5922
refs/heads/master
2020-06-29T23:35:12.883128
2020-01-08T06:19:34
2020-01-08T06:19:34
200,656,560
0
0
null
null
null
null
UTF-8
Java
false
false
1,175
java
package au.com.unicard.tafenswwallet.ui.refund; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import au.com.unicard.tafenswwallet.R; public class RefundFragment extends Fragment { private RefundViewModel refundViewModel; public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { refundViewModel = ViewModelProviders.of(this).get(RefundViewModel.class); View root = inflater.inflate(R.layout.fragment_refund, container, false); final TextView textView = root.findViewById(R.id.text_refund); refundViewModel.getText().observe(this, new Observer<String>() { @Override public void onChanged(@Nullable String s) { textView.setText(s); } }); return root; } }
[ "chengyuan82281681@hotmail.com" ]
chengyuan82281681@hotmail.com
8c910de9a2641f086c655dc321a429ffe9197b2f
76baa7106257c71580e0e441fa9836a1f3b22772
/java/src/com/programming/leetcode/house_robber_198/TestHouseRobber.java
11cbba26e4f48265efd26d8dab0335c5b2283268
[]
no_license
yogeshrnaik/programming-problems
58072a69484772978e3d4cc6feae7b6494f45c6d
6fd05bbbc019a9d9a19e20de2ba022109db42db6
refs/heads/master
2023-08-08T03:22:19.989331
2023-07-31T12:04:17
2023-07-31T12:04:17
38,365,498
0
1
null
2023-07-25T20:49:57
2015-07-01T10:37:27
Java
UTF-8
Java
false
false
414
java
package com.programming.leetcode.house_robber_198; import org.junit.Assert; import org.junit.Test; public class TestHouseRobber { @Test public void test_house_robber_sample1() { Assert.assertEquals(4, new Solution().rob(new int[]{1, 2, 3, 1})); } @Test public void test_house_robber_sample2() { Assert.assertEquals(12, new Solution().rob(new int[]{2, 7, 9, 3, 1})); } }
[ "yogeshrnaik@gmail.com" ]
yogeshrnaik@gmail.com