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
e8ed7b2281f9dc17f50c9a1632e5663e5af0513e
5a86421f61da5c7faf7443defb06423f18565332
/container-search/src/test/java/com/yahoo/prelude/semantics/test/ComparisonTestCase.java
44774c6321941ba2edbfe80458c3f48ca57b6ebf
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
t1707/vespa
1d62116f4345dbc5020dbfcab1fc2934e82e5d68
9f4859e9996ac9913ce80ed9b209f683507fe157
refs/heads/master
2021-04-03T06:24:10.556834
2018-03-08T17:02:09
2018-03-08T17:02:09
124,473,863
0
0
Apache-2.0
2018-03-15T06:06:27
2018-03-09T02:07:53
Java
UTF-8
Java
false
false
1,561
java
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.prelude.semantics.test; /** * @author bratseth */ public class ComparisonTestCase extends RuleBaseAbstractTestCase { public ComparisonTestCase(String name) { super(name,"comparison.sr"); } /** * Tests that we can wriote rules which depends on the <i>same term</i> (java) being matched by two * different conditions (coffee, island) */ public void testNamedConditionReturnComparison() { // Not sufficient that both conditions are matched assertSemantics("AND borneo arabica island:borneo coffee:arabica","borneo arabica"); // They must match the same word assertSemantics("AND java noise island:java coffee:java control:ambigous off","java noise"); // Works also when there are other, not-equal matches assertSemantics("AND borneo arabica java island:borneo island:java coffee:arabica coffee:java control:ambigous off", "borneo arabica java"); } public void testContainsAsSubstring() { assertSemantics("AND java island:java coffee:java control:ambigous off","java"); assertSemantics("AND kanava island:kanava off","kanava"); assertSemantics("AND borneo island:borneo","borneo"); } public void testAlphanumericComparison() { assertSemantics("a","a"); assertSemantics("AND z highletter","z"); assertSemantics("AND p highletter","p"); } }
[ "bratseth@yahoo-inc.com" ]
bratseth@yahoo-inc.com
3c78654e971752cd5bd0b6a88f888a136c45bdf9
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-11-04-tempmail/sources/com/google/android/gms/common/server/converter/zaa.java
98188ba0c82d5d60e2767328688f281e29a84bb2
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
2,121
java
package com.google.android.gms.common.server.converter; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; import com.google.android.gms.common.server.response.FastJsonResponse; @SafeParcelable.Class public final class zaa extends AbstractSafeParcelable { public static final Parcelable.Creator<zaa> CREATOR = new zab(); @SafeParcelable.VersionField /* renamed from: b reason: collision with root package name */ private final int f3267b; @SafeParcelable.Field /* renamed from: c reason: collision with root package name */ private final StringToIntConverter f3268c; @SafeParcelable.Constructor zaa(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) StringToIntConverter stringToIntConverter) { this.f3267b = i; this.f3268c = stringToIntConverter; } public static zaa u(FastJsonResponse.FieldConverter<?, ?> fieldConverter) { if (fieldConverter instanceof StringToIntConverter) { return new zaa((StringToIntConverter) fieldConverter); } throw new IllegalArgumentException("Unsupported safe parcelable field converter class."); } public final FastJsonResponse.FieldConverter<?, ?> v() { StringToIntConverter stringToIntConverter = this.f3268c; if (stringToIntConverter != null) { return stringToIntConverter; } throw new IllegalStateException("There was no converter wrapped in this ConverterWrapper."); } public final void writeToParcel(Parcel parcel, int i) { int a2 = SafeParcelWriter.a(parcel); SafeParcelWriter.l(parcel, 1, this.f3267b); SafeParcelWriter.r(parcel, 2, this.f3268c, i, false); SafeParcelWriter.b(parcel, a2); } private zaa(StringToIntConverter stringToIntConverter) { this.f3267b = 1; this.f3268c = stringToIntConverter; } }
[ "zteeed@minet.net" ]
zteeed@minet.net
432e5fe7686d6649887c0425438fa12b258c8427
6b2e1f5fdd3668b32c471ff872f03f043b18d5f7
/mutants/dataset/lcs_length/1323/LCS_LENGTH.java
2aafb797b4ba27c541f6f9b6e8347ef6febc3f48
[]
no_license
mou23/Impact-of-Similarity-on-Repairing-Small-Programs
87e58676348f1b55666171128ecced3571979d44
6704d78b2bc9c103d97bcf55ecd5c12810ba2851
refs/heads/master
2023-03-25T10:42:17.464870
2021-03-20T04:55:17
2021-03-20T04:55:17
233,513,246
0
0
null
null
null
null
UTF-8
Java
false
false
1,960
java
package buggy_java_programs; import java.util.*; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author derricklin */ public class LCS_LENGTH { public static Integer lcs_length(String s, String t) { // make a Counter // pair? no! just hashtable to a hashtable.. woo.. currying Map<Integer, Map<Integer,Integer>> dp = new HashMap<Integer,Map<Integer,Integer>>(); // just set all the internal maps to 0 for (int i=0; i < s.length(); util) { Map<Integer,Integer> initialize = new HashMap<Integer,Integer>(); dp.put(i, initialize); for (int j=0; j < t.length(); j++) { Map<Integer,Integer> internal_map = dp.get(i); internal_map.put(j,0); dp.put(i, internal_map); } } // now the actual code for (int i=0; i < s.length(); i++) { for (int j=0; j < t.length(); j++) { if (s.charAt(i) == t.charAt(j)) { if (dp.containsKey(i-1)) { Map<Integer, Integer> internal_map = dp.get(i); int insert_value = dp.get(i-1).get(j) + 1; internal_map.put(j, insert_value); dp.put(i,internal_map); } else { Map<Integer, Integer> internal_map = dp.get(i); internal_map.put(j,1); dp.put(i,internal_map); } } } } if (!dp.isEmpty()) { List<Integer> ret_list = new ArrayList<Integer>(); for (int i=0; i<s.length(); i++) { ret_list.add(!dp.get(i).isEmpty() ? Collections.max(dp.get(i).values()) : 0); } return Collections.max(ret_list); } else { return 0; } } }
[ "bsse0731@iit.du.ac.bd" ]
bsse0731@iit.du.ac.bd
3188ae0ba418b820e183af8de6dc772abc9d09b2
1d98349ab2ce254455f6b9a01f7aaa58d38f286d
/src/main/java/net/minestom/server/command/builder/arguments/ArgumentGroup.java
513839b6035d5804eb2e8da7636824b27155818c
[ "Apache-2.0" ]
permissive
DiamondCodingYT/Minestom
b99bde418d917d6704b1d414e2f33212535bc1f3
e17ce94241db6f5e69539614daee29cec0367188
refs/heads/master
2023-04-02T21:38:17.241527
2021-04-15T06:21:24
2021-04-15T06:21:24
355,570,919
0
0
Apache-2.0
2021-04-07T14:15:43
2021-04-07T14:15:42
null
UTF-8
Java
false
false
1,710
java
package net.minestom.server.command.builder.arguments; import net.minestom.server.command.builder.CommandContext; import net.minestom.server.command.builder.NodeMaker; import net.minestom.server.command.builder.exception.ArgumentSyntaxException; import net.minestom.server.command.builder.parser.CommandParser; import net.minestom.server.command.builder.parser.ValidSyntaxHolder; import org.apache.commons.lang3.StringUtils; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.List; public class ArgumentGroup extends Argument<CommandContext> { public static final int INVALID_ARGUMENTS_ERROR = 1; private final Argument<?>[] group; public ArgumentGroup(@NotNull String id, @NotNull Argument<?>... group) { super(id, true, false); this.group = group; } @NotNull @Override public CommandContext parse(@NotNull String input) throws ArgumentSyntaxException { List<ValidSyntaxHolder> validSyntaxes = new ArrayList<>(); CommandParser.parse(null, group, input.split(StringUtils.SPACE), input, validSyntaxes, null); CommandContext context = new CommandContext(input); CommandParser.findMostCorrectSyntax(validSyntaxes, context); if (validSyntaxes.isEmpty()) { throw new ArgumentSyntaxException("Invalid arguments", input, INVALID_ARGUMENTS_ERROR); } return context; } @Override public void processNodes(@NotNull NodeMaker nodeMaker, boolean executable) { for (int i = 0; i < group.length; i++) { final boolean isLast = i == group.length - 1; group[i].processNodes(nodeMaker, executable && isLast); } } }
[ "themode@outlook.fr" ]
themode@outlook.fr
b16d67dfa13ca819d52b69cafefa72f3aeab6190
1b79acd70a31d18c965d5bf63462dbdf7d5d8023
/src/main/java/com/socolabs/mo/components/deliveryroutetiki/model/OrderItem.java
a9229b97b1440e3cc55a5f03c46131e8a6dd2684
[]
no_license
dungkhmt/mo
69f0552863c9c91f973401f3c57cd1bfcd9fd8ef
e8e03bfd337e13bb4d51ba83c3fbff2dc94ce127
refs/heads/master
2021-06-24T10:34:30.217272
2021-02-17T16:54:12
2021-02-17T16:54:12
197,187,617
0
1
null
null
null
null
UTF-8
Java
false
false
245
java
package com.socolabs.mo.components.deliveryroutetiki.model; import lombok.Getter; import lombok.Setter; @Getter @Setter public class OrderItem { private String orderItemCode; private int height; private int width; private int length; }
[ "dungkhmt@gmail.com" ]
dungkhmt@gmail.com
ccc61e89a2a9c0776779038faacf91d0f8149da9
ca350891825b9ddeae2e3671ab8d749f57d7770a
/src/main/java/com/iqmsoft/springboot/hibernate/controller/MainController.java
fdb379715319a8d32b37641019bfe8d11f5b4c71
[]
no_license
Murugar/Spring5Boot2HibernateMySQL
552a5457174a65c401f12f65906f53e09b139e7a
2a2c055fb4736f51531bc87ea966c786ac61599f
refs/heads/master
2021-09-28T23:26:57.163323
2021-09-25T05:05:48
2021-09-25T05:05:48
116,917,258
0
0
null
null
null
null
UTF-8
Java
false
false
2,842
java
package com.iqmsoft.springboot.hibernate.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.iqmsoft.springboot.hibernate.model.Client; import com.iqmsoft.springboot.hibernate.service.ClientService; @Controller public class MainController { @Autowired private ClientService clientService; @Autowired public void setClientService(ClientService clientService) { this.clientService = clientService; } @Transactional(propagation = Propagation.REQUIRED) @RequestMapping(value = "/", method = RequestMethod.GET) public String initializeClient(Model model) { return "index"; } @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @RequestMapping(value = "customers", method = RequestMethod.GET) public String listCustomers(Model model) { model.addAttribute("customer", new Client()); model.addAttribute("listCustomers", this.clientService.listCustomers()); return "customers"; } @Transactional(propagation = Propagation.REQUIRED) @RequestMapping(value = "/customer/add", method = RequestMethod.POST) public String addCustomer(@ModelAttribute("customer") Client customer) { if (customer.getId() == 0) { this.clientService.addCustomer(customer); } else { this.clientService.updateCustomer(customer); } return "redirect:/customers"; } @Transactional(propagation = Propagation.REQUIRED) @RequestMapping("/remove/{id}") public String removeCustomer(@PathVariable("id") int id) { this.clientService.removeCustomer(id); return "redirect:/customers"; } @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @RequestMapping("/edit/{id}") public String editCustomer(@PathVariable("id") int id, Model model) { model.addAttribute("customer", this.clientService.getCustomerById(id)); model.addAttribute("listCustomers", this.clientService.listCustomers()); return "customers"; } @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @RequestMapping("customerdata/{id}") public String customerData(@PathVariable("id") int id, Model model) { model.addAttribute("customer", this.clientService.getCustomerById(id)); return "customerdata"; } }
[ "davanon2014@gmail.com" ]
davanon2014@gmail.com
14e1389fb04ff3ba7f57c210b15792a16c14d1c9
af290c7aae9f6955da909768b99c8533cd87bd3b
/08-web-intro-1/src/main/java/rewardsadmin/web/springmvc20/RewardForm.java
ec39bfb6440de0fad015c344afa2505ec27cd4f2
[]
no_license
Oliver3214/corespring
06ef19048c6d8af8626b97c80875801bed9333d9
6a917c7da01ef5e48402dbc3739771010981d8a8
refs/heads/master
2020-12-19T03:01:19.727312
2020-01-22T15:43:19
2020-01-22T15:43:19
235,601,240
0
0
null
2020-01-22T15:21:17
2020-01-22T15:21:16
null
UTF-8
Java
false
false
1,456
java
package rewardsadmin.web.springmvc20; import rewards.Dining; import rewards.RewardNetwork; import common.datetime.SimpleDate; import common.money.MonetaryAmount; /** * A form-backing object holding data for fields of the "new reward" form. Just a plain-old-java-object (POJO). Strongly * typed--Spring's data binder is capable of performing type conversion and validation. */ public class RewardForm { private String creditCardNumber = "1234123412341234"; private MonetaryAmount amount = MonetaryAmount.valueOf("100.00"); private String merchantNumber = "1234567890"; public String getCreditCardNumber() { return creditCardNumber; } public void setCreditCardNumber(String creditCardNumber) { this.creditCardNumber = creditCardNumber; } public MonetaryAmount getAmount() { return amount; } public void setAmount(MonetaryAmount amount) { this.amount = amount; } public String getMerchantNumber() { return merchantNumber; } public void setMerchantNumber(String merchantNumber) { this.merchantNumber = merchantNumber; } /** * Factory method that creates a Dining object from this RewardForm. A Dining is needed as input into the * {@link RewardNetwork} application to create new rewards. * @return the dining populated from this form */ public Dining createDining() { return new Dining(amount, creditCardNumber, merchantNumber, SimpleDate.today()); } }
[ "jose.diaz@joedayz.pe" ]
jose.diaz@joedayz.pe
f8a18f64442d1498a0977b9ce687ecce2c36a52d
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/13/org/jfree/chart/text/TextUtilities_setUseFontMetricsGetStringBounds_822.java
9d7cb271afe2d89f92481f9facf0975bbde3fe1f
[]
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,123
java
org jfree chart text util method work text text util textutil set flag control font metric fontmetr string bound getstringbound method troubl label align posit chang flag param flag set font metric string bound setusefontmetricsgetstringbound font metric string bound usefontmetricsgetstringbound
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
78e248033f57e5cfad6807e58ab7def05edf39af
7cc5aa3a77333a0f3cfbd49e4a6905371de58320
/src/main/java/org/apache/ctakes/typesystem/type/temporary/assertion/AssertionCuePhraseAnnotation_Type.java
c06c0a74a44bda6cebc98753f0b98c8ff97f46fc
[ "BSD-3-Clause" ]
permissive
dbmi-pitt/birads
30e81bfbd0ebbbecf5fb87b95e705ebdcd9a9629
fc059bc22fd77f07f9b68139d4476d439995fa8b
refs/heads/master
2021-01-10T12:49:02.239024
2017-08-03T15:45:07
2017-08-03T15:45:07
36,369,294
0
0
null
null
null
null
UTF-8
Java
false
false
7,645
java
/* First created by JCasGen Sun May 08 17:42:41 EDT 2016 */ package org.apache.ctakes.typesystem.type.temporary.assertion; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.cas.impl.CASImpl; import org.apache.uima.cas.impl.FSGenerator; import org.apache.uima.cas.FeatureStructure; import org.apache.uima.cas.impl.TypeImpl; import org.apache.uima.cas.Type; import org.apache.uima.cas.impl.FeatureImpl; import org.apache.uima.cas.Feature; import org.apache.uima.jcas.tcas.Annotation_Type; /** A cue phrase indicating potential negation, uncertainty, or conditional * Updated by JCasGen Mon Sep 19 10:07:55 EDT 2016 * @generated */ public class AssertionCuePhraseAnnotation_Type extends Annotation_Type { /** @generated */ @SuppressWarnings ("hiding") public final static int typeIndexID = AssertionCuePhraseAnnotation.typeIndexID; /** @generated @modifiable */ @SuppressWarnings ("hiding") public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); /** @generated */ final Feature casFeat_id; /** @generated */ final int casFeatCode_id; /** @generated * @param addr low level Feature Structure reference * @return the feature value */ public int getId(int addr) { if (featOkTst && casFeat_id == null) jcas.throwFeatMissing("id", "org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); return ll_cas.ll_getIntValue(addr, casFeatCode_id); } /** @generated * @param addr low level Feature Structure reference * @param v value to set */ public void setId(int addr, int v) { if (featOkTst && casFeat_id == null) jcas.throwFeatMissing("id", "org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); ll_cas.ll_setIntValue(addr, casFeatCode_id, v);} /** @generated */ final Feature casFeat_cuePhraseCategory; /** @generated */ final int casFeatCode_cuePhraseCategory; /** @generated * @param addr low level Feature Structure reference * @return the feature value */ public String getCuePhraseCategory(int addr) { if (featOkTst && casFeat_cuePhraseCategory == null) jcas.throwFeatMissing("cuePhraseCategory", "org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); return ll_cas.ll_getStringValue(addr, casFeatCode_cuePhraseCategory); } /** @generated * @param addr low level Feature Structure reference * @param v value to set */ public void setCuePhraseCategory(int addr, String v) { if (featOkTst && casFeat_cuePhraseCategory == null) jcas.throwFeatMissing("cuePhraseCategory", "org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); ll_cas.ll_setStringValue(addr, casFeatCode_cuePhraseCategory, v);} /** @generated */ final Feature casFeat_cuePhraseAssertionFamily; /** @generated */ final int casFeatCode_cuePhraseAssertionFamily; /** @generated * @param addr low level Feature Structure reference * @return the feature value */ public String getCuePhraseAssertionFamily(int addr) { if (featOkTst && casFeat_cuePhraseAssertionFamily == null) jcas.throwFeatMissing("cuePhraseAssertionFamily", "org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); return ll_cas.ll_getStringValue(addr, casFeatCode_cuePhraseAssertionFamily); } /** @generated * @param addr low level Feature Structure reference * @param v value to set */ public void setCuePhraseAssertionFamily(int addr, String v) { if (featOkTst && casFeat_cuePhraseAssertionFamily == null) jcas.throwFeatMissing("cuePhraseAssertionFamily", "org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); ll_cas.ll_setStringValue(addr, casFeatCode_cuePhraseAssertionFamily, v);} /** @generated */ final Feature casFeat_cuePhraseFirstWord; /** @generated */ final int casFeatCode_cuePhraseFirstWord; /** @generated * @param addr low level Feature Structure reference * @return the feature value */ public String getCuePhraseFirstWord(int addr) { if (featOkTst && casFeat_cuePhraseFirstWord == null) jcas.throwFeatMissing("cuePhraseFirstWord", "org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); return ll_cas.ll_getStringValue(addr, casFeatCode_cuePhraseFirstWord); } /** @generated * @param addr low level Feature Structure reference * @param v value to set */ public void setCuePhraseFirstWord(int addr, String v) { if (featOkTst && casFeat_cuePhraseFirstWord == null) jcas.throwFeatMissing("cuePhraseFirstWord", "org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); ll_cas.ll_setStringValue(addr, casFeatCode_cuePhraseFirstWord, v);} /** @generated */ final Feature casFeat_cuePhrase; /** @generated */ final int casFeatCode_cuePhrase; /** @generated * @param addr low level Feature Structure reference * @return the feature value */ public String getCuePhrase(int addr) { if (featOkTst && casFeat_cuePhrase == null) jcas.throwFeatMissing("cuePhrase", "org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); return ll_cas.ll_getStringValue(addr, casFeatCode_cuePhrase); } /** @generated * @param addr low level Feature Structure reference * @param v value to set */ public void setCuePhrase(int addr, String v) { if (featOkTst && casFeat_cuePhrase == null) jcas.throwFeatMissing("cuePhrase", "org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation"); ll_cas.ll_setStringValue(addr, casFeatCode_cuePhrase, v);} /** initialize variables to correspond with Cas Type and Features * @generated * @param jcas JCas * @param casType Type */ public AssertionCuePhraseAnnotation_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); casFeat_id = jcas.getRequiredFeatureDE(casType, "id", "uima.cas.Integer", featOkTst); casFeatCode_id = (null == casFeat_id) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_id).getCode(); casFeat_cuePhraseCategory = jcas.getRequiredFeatureDE(casType, "cuePhraseCategory", "uima.cas.String", featOkTst); casFeatCode_cuePhraseCategory = (null == casFeat_cuePhraseCategory) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_cuePhraseCategory).getCode(); casFeat_cuePhraseAssertionFamily = jcas.getRequiredFeatureDE(casType, "cuePhraseAssertionFamily", "uima.cas.String", featOkTst); casFeatCode_cuePhraseAssertionFamily = (null == casFeat_cuePhraseAssertionFamily) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_cuePhraseAssertionFamily).getCode(); casFeat_cuePhraseFirstWord = jcas.getRequiredFeatureDE(casType, "cuePhraseFirstWord", "uima.cas.String", featOkTst); casFeatCode_cuePhraseFirstWord = (null == casFeat_cuePhraseFirstWord) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_cuePhraseFirstWord).getCode(); casFeat_cuePhrase = jcas.getRequiredFeatureDE(casType, "cuePhrase", "uima.cas.String", featOkTst); casFeatCode_cuePhrase = (null == casFeat_cuePhrase) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_cuePhrase).getCode(); } }
[ "tseytlin@pitt.edu" ]
tseytlin@pitt.edu
bf0ce9131ce43c7426d302c07e7b4355ddeaeb50
6d7e6feb8996078ac2afe405e80cb194b83d2ccf
/src/main/java/Singleton.java
d684531a97b071cc0d13c6d73786c15c53be61aa
[]
no_license
Seraphim-lyx/SpringMVC
56587e44e5eeddbf6fac1211abfc676ce3d8e710
4f7fc876bb2c733639561c30ba055b2074dcc670
refs/heads/master
2020-03-29T20:52:15.886764
2018-09-25T22:18:26
2018-09-25T22:18:26
150,335,756
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
public class Singleton { private static Singleton instance; private Singleton() { // .......// } public static Singleton getInstance() { if (instance == null) instance = new Singleton(); return instance; } }
[ "563150079@qq.com" ]
563150079@qq.com
405b84c91ef2b3d8c32af9bc18c65d85c66b5de7
ba09be3c156d47dbb0298ff2d49b693a4d0ad07f
/src/com/sgepit/pmis/equipment/hbm/EquWarehouse.java
40bbc26db546c23b57d180ba332236c47a1103bb
[]
no_license
newlethe/myProject
835d001abc86cd2e8be825da73d5421f8d31620f
ff2a30e9c58a751fa78ac7722e2936b3c9a02d20
refs/heads/master
2021-01-21T04:53:53.244374
2016-06-07T04:11:36
2016-06-07T04:19:11
47,071,697
0
0
null
null
null
null
UTF-8
Java
false
false
2,482
java
package com.sgepit.pmis.equipment.hbm; public class EquWarehouse { private String pid; private String uids; private String equid; private String equno; private String detailed; private String memo; private Long isleaf; private String parent; private String waretype; private String waretypecode; private String wareno; private String warenocode; public EquWarehouse() { } public EquWarehouse(String pid, String uids, String equid, String equno, String detailed, String memo, Long isleaf, String parent,String waretype, String waretypecode,String wareno,String warenocode) { this.pid = pid; this.uids = uids; this.equid = equid; this.equno = equno; this.detailed = detailed; this.memo = memo; this.isleaf = isleaf; this.parent = parent; this.waretype = waretype; this.waretypecode = waretypecode; this.wareno = wareno; this.warenocode = warenocode; } public String getPid() { return pid; } public void setPid(String pid) { this.pid = pid; } public String getUids() { return uids; } public void setUids(String uids) { this.uids = uids; } public String getEquid() { return equid; } public void setEquid(String equid) { this.equid = equid; } public String getEquno() { return equno; } public void setEquno(String equno) { this.equno = equno; } public String getDetailed() { return detailed; } public void setDetailed(String detailed) { this.detailed = detailed; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } public Long getIsleaf() { return isleaf; } public void setIsleaf(Long isleaf) { this.isleaf = isleaf; } public String getParent() { return parent; } public void setParent(String parent) { this.parent = parent; } public String getWaretype() { return waretype; } public void setWaretype(String waretype) { this.waretype = waretype; } public String getWaretypecode() { return waretypecode; } public void setWaretypecode(String waretypecode) { this.waretypecode = waretypecode; } public String getWareno() { return wareno; } public void setWareno(String wareno) { this.wareno = wareno; } public String getWarenocode() { return warenocode; } public void setWarenocode(String warenocode) { this.warenocode = warenocode; } }
[ "newlethe@qq.com" ]
newlethe@qq.com
1cffd29631b24d63335730546b8d89c5b5217723
9013b13f741bce3328ca6bf03be7ccce18240b5c
/src/main/java/cn/ccxst/zwd/tinyioc/context/ApplicationContext.java
41dc359ef274a2451ea96adc9fffb7f7ec572c5c
[]
no_license
chenglinjava68/tiny-spring-1
7df7cc542a6946e9269a8d8c8bb927ce363c1245
015e2a922aaf56d8bbf86da5a978dec0a0a71f5f
refs/heads/master
2020-04-14T15:56:52.266935
2018-12-04T11:37:53
2018-12-04T11:37:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
234
java
package cn.ccxst.zwd.tinyioc.context; import cn.ccxst.zwd.tinyioc.bean.factory.BeanFactory; /** * @author zwd * @date 2018/11/30 18:58 * @Email stephen.zwd@gmail.com */ public interface ApplicationContext extends BeanFactory{ }
[ "810095178@qq.com" ]
810095178@qq.com
ba0bfc3aa4bd28ac3cb15f80122874fb9d7234a1
1be23a01a4c01da80ca4880e328ae15fef4e5dec
/jiayida-mobile/src/main/java/com/joinway/mobile/bean/form/LogoutForm.java
cb888f89379573943043f47e55654136c01b9377
[]
no_license
scorpiopapa/spring-driving
6d70d775c4b0326ca5014022aa41d3d269a95fb5
698ce13ebffebd4c57a4516ad03f313f1c52cdc9
refs/heads/master
2020-05-29T13:03:44.785571
2014-09-04T15:10:01
2014-09-04T15:10:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
657
java
package com.joinway.mobile.bean.form; import javax.validation.constraints.Min; import org.jsondoc.core.annotation.ApiObject; import org.jsondoc.core.annotation.ApiObjectField; import com.joinway.bean.form.Form; import com.joinway.bean.logging.annotation.LogMask; @ApiObject(name = "LogoutForm", description = "用户注销信息") public class LogoutForm extends Form { /** * */ private static final long serialVersionUID = 2345238275392039284L; @ApiObjectField(description = "登录用户ID") @Min(1) // @LogMask int userId; public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } }
[ "liliang2005@gmail.com" ]
liliang2005@gmail.com
3ffc2f581a8368d2fd950d812fec5e967b96fdec
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/70/437.java
30f3b271511ca6163fc67231dfea02e2284ae48e
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,346
java
package <missing>; public class GlobalMembers { public static void Main(String[] args) { int n; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } double[] p1 = new double[100]; double[] p2 = new double[100]; double dism = 0; double dis; for (int k = 0;k < n;k++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { p1[k] = Double.parseDouble(tempVar2); } String tempVar3 = ConsoleInput.scanfRead(); if (tempVar3 != null) { p2[k] = Double.parseDouble(tempVar3); } } for (int i = 0;i < n;i++) { String tempVar4 = ConsoleInput.scanfRead(); if (tempVar4 != null) { p1[i] = Double.parseDouble(tempVar4); } String tempVar5 = ConsoleInput.scanfRead(); if (tempVar5 != null) { p2[i] = Double.parseDouble(tempVar5); } for (int j = i + 1;j < n;j++) { String tempVar6 = ConsoleInput.scanfRead(); if (tempVar6 != null) { p1[j] = Double.parseDouble(tempVar6); } String tempVar7 = ConsoleInput.scanfRead(); if (tempVar7 != null) { p2[j] = Double.parseDouble(tempVar7); } dis = Math.sqrt(Math.pow(p1[i] - p1[j],2) + Math.pow(p2[i] - p2[j],2)); if (dis > dism) { dism = dis; } } } System.out.printf("%.4lf",dism); } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
687cb31f2cb762e608dcea210a5091aa609b4aac
04dd1b23b3da12911ccfe85695636b061043d64b
/core/src/main/java/org/jdbi/v3/core/extension/ExtensionHandlerFactory.java
7b0a8df70a966cce71c9bb298a1addff6eb64a97
[ "Apache-2.0" ]
permissive
jdbi/jdbi
3446abe74aac3c8a961b601c10119548709bf2ba
2f64af082783ea2101c86445cd06b4ac74e5acef
refs/heads/master
2023-08-31T07:35:40.049189
2023-08-23T20:23:27
2023-08-23T20:23:27
229,738
1,613
367
Apache-2.0
2023-09-10T00:48:43
2009-06-17T16:36:36
Java
UTF-8
Java
false
false
1,932
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jdbi.v3.core.extension; import java.lang.reflect.Method; import java.util.Optional; import org.jdbi.v3.meta.Alpha; /** * A factory to create {@link ExtensionHandler} instances. */ @Alpha public interface ExtensionHandlerFactory { /** * Determines whether the factory can create an {@link ExtensionHandler} for combination of extension type and method. * * @param extensionType The extension type class * @param method A method * @return True if the factory can create an extension handler for extension type and method, false otherwise */ boolean accepts(Class<?> extensionType, Method method); /** * Returns an {@link ExtensionHandler} instance for a extension type and method combination. * * @param extensionType The extension type class * @param method A method * @return An {@link ExtensionHandler} instance wrapped into an {@link Optional}. The optional can be empty. This is necessary to retrofit old code * that does not have an accept/build code pair but unconditionally tries to build a handler and returns empty if it can not. New code should always * return <code>Optional.of(extensionHandler}</code> and never return <code>Optional.empty()</code> */ Optional<ExtensionHandler> createExtensionHandler(Class<?> extensionType, Method method); }
[ "henning@schmiedehausen.org" ]
henning@schmiedehausen.org
0ff6472569beba398510612bbe045f9685368fd7
1e8f514229db4d1c15a75668cf4d6fccac22ca83
/src/main/java/com/github/lindenb/jvarkit/tools/gnomad/VcfGnomadExomeVsGenome.java
942f4e0f4fe8bfb64a3b05a958e3de1296ba63ea
[ "MIT" ]
permissive
ammar257ammar/jvarkit
58fb936aca2c7e1bbbd21e30c77edcd3fa5eba6e
1dfd4ec7e85294bf689a08a7afe451c68f689d99
refs/heads/master
2022-05-04T10:30:47.148406
2022-04-26T14:08:40
2022-04-26T14:08:40
216,183,678
0
0
NOASSERTION
2019-10-19T09:49:10
2019-10-19T09:49:09
null
UTF-8
Java
false
false
7,230
java
/* The MIT License (MIT) Copyright (c) 2022 Pierre Lindenbaum Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.github.lindenb.jvarkit.tools.gnomad; import java.nio.file.Path; import java.util.Collections; import java.util.Set; import java.util.function.UnaryOperator; import java.util.stream.Collectors; import com.beust.jcommander.Parameter; import com.github.lindenb.jvarkit.jcommander.OnePassVcfLauncher; import com.github.lindenb.jvarkit.lang.StringUtils; import com.github.lindenb.jvarkit.samtools.util.SimpleInterval; import com.github.lindenb.jvarkit.util.JVarkitVersion; import com.github.lindenb.jvarkit.util.bio.AcidNucleics; import com.github.lindenb.jvarkit.util.bio.DistanceParser; import com.github.lindenb.jvarkit.util.bio.SequenceDictionaryUtils; import com.github.lindenb.jvarkit.util.bio.fasta.ContigNameConverter; import com.github.lindenb.jvarkit.util.jcommander.Program; import com.github.lindenb.jvarkit.util.log.Logger; import com.github.lindenb.jvarkit.variant.vcf.BufferedVCFReader; import com.github.lindenb.jvarkit.variant.vcf.VCFReaderFactory; import htsjdk.samtools.SAMSequenceDictionary; import htsjdk.samtools.util.CloseableIterator; import htsjdk.samtools.util.SequenceUtil; import htsjdk.variant.variantcontext.Allele; import htsjdk.variant.variantcontext.VariantContext; import htsjdk.variant.variantcontext.VariantContextBuilder; import htsjdk.variant.variantcontext.writer.VariantContextWriter; import htsjdk.variant.vcf.VCFFilterHeaderLine; import htsjdk.variant.vcf.VCFHeader; import htsjdk.variant.vcf.VCFIterator; import htsjdk.variant.vcf.VCFReader; @Program(name="vcfgnomadexomevsgenome", description="filter out variant in exome but not in genome", keywords={"vcf","annotation","gnomad"}, modificationDate="20210707", creationDate="20210707" ) public class VcfGnomadExomeVsGenome extends OnePassVcfLauncher { private static final Logger LOG = Logger.build(VcfGnomadExomeVsGenome.class).make(); @Parameter(names={"-exome"},description="Path to Indexed Gnomad VCF exome file.",required=true) private Path exomePath =null; @Parameter(names={"-genome"},description="Path to Indexed Gnomad VCF genome file.",required=true) private Path genomePath =null; @Parameter(names={"--bufferSize"},description= BufferedVCFReader.OPT_BUFFER_DESC+" "+DistanceParser.OPT_DESCRIPTION,converter=DistanceParser.StringConverter.class,splitter=com.github.lindenb.jvarkit.util.jcommander.NoSplitter.class) private int gnomadBufferSize= 10_000; @Parameter(names={"--filter"},description= BufferedVCFReader.OPT_BUFFER_DESC+" "+DistanceParser.OPT_DESCRIPTION,converter=DistanceParser.StringConverter.class,splitter=com.github.lindenb.jvarkit.util.jcommander.NoSplitter.class) private String filterSr= "GNOMAD_ONLY_EXOME"; private BufferedVCFReader exomeReader = null; private BufferedVCFReader genomeReader = null; private ContigNameConverter ctgNameConverter=null; @Override protected int beforeVcf() { final UnaryOperator<VariantContext> simplifier = V-> new VariantContextBuilder(V).noGenotypes().noID().attributes(Collections.emptyMap()).make(); SAMSequenceDictionary dict1=null; try { final VCFReader r = VCFReaderFactory.makeDefault().open(this.exomePath,true); this.exomeReader = new BufferedVCFReader(r, this.gnomadBufferSize); this.exomeReader.setSimplifier(simplifier); this.ctgNameConverter = ContigNameConverter.fromOneDictionary(SequenceDictionaryUtils.extractRequired(r.getHeader())); dict1 = SequenceDictionaryUtils.extractRequired(r.getHeader()); } catch(final Throwable err) { LOG.error(err); return -1; } try { final VCFReader r = VCFReaderFactory.makeDefault().open(this.genomePath,true); this.genomeReader = new BufferedVCFReader(r, this.gnomadBufferSize); this.genomeReader.setSimplifier(simplifier); final SAMSequenceDictionary dict2 = SequenceDictionaryUtils.extractRequired(r.getHeader()); SequenceUtil.assertSequenceDictionariesEqual(dict1, dict2); } catch(final Throwable err) { LOG.error(err); return -1; } return super.beforeVcf(); } boolean isVariantIn(final VariantContext ctx,final BufferedVCFReader reader) { final String ctg = this.ctgNameConverter.apply(ctx.getContig()); if(StringUtils.isBlank(ctg)) return false; try(CloseableIterator<VariantContext> iterE = reader.query(new SimpleInterval(ctg,ctx.getStart(),ctx.getEnd()))) { while(iterE.hasNext()) { final VariantContext ctx2 = iterE.next(); if(ctx.getStart()!=ctx2.getStart()) continue; if(!ctx.getReference().equals(ctx2.getReference())) continue; final Set<Allele> alt2 = ctx2.getAlternateAlleles().stream().filter(A->AcidNucleics.isATGC(A)).collect(Collectors.toSet()); if(ctx.getAlternateAlleles().stream().anyMatch(A->alt2.contains(A))) return true; } } return false; } @Override protected int doVcfToVcf(String inputName, VCFIterator iterin, VariantContextWriter out) { final VCFHeader h2 = new VCFHeader(iterin.getHeader()); long removed = 0L; if(!StringUtils.isBlank(this.filterSr)) { final VCFFilterHeaderLine fh2 = new VCFFilterHeaderLine( this.filterSr, "variant wasfound in "+this.exomePath+" but not in "+this.genomePath ); h2.addMetaDataLine(fh2); } JVarkitVersion.getInstance().addMetaData(this, h2); out.writeHeader(h2); while(iterin.hasNext()) { final VariantContext ctx = iterin.next(); if(isVariantIn(ctx,this.exomeReader) && !isVariantIn(ctx,this.genomeReader)) { ++removed; if(StringUtils.isBlank(this.filterSr)) { continue; } else { out.add(new VariantContextBuilder(ctx).filter(this.filterSr).make()); } } else { out.add(ctx); } } if(removed>0L) LOG.info(String.valueOf(removed)+" variants were found in "+this.exomePath+" but not in "+this.genomePath); return 0; } @Override protected void afterVcf() { try { this.exomeReader.close(); } catch(final Throwable err) { LOG.error(err); } try { this.genomeReader.close(); } catch(final Throwable err) { LOG.error(err); } } public static void main(final String[] args) { new VcfGnomadExomeVsGenome().instanceMainWithExit(args); } }
[ "plindenbaum@yahoo.fr" ]
plindenbaum@yahoo.fr
7e6f58e45a3e743b2289bf7fed3deb2982e3fd4a
c84211b58757f75d6b4b586fb0d21b836ec06b2e
/src/main/java/com/test/resource/FruitResource0.java
72e0eb460114a0917334e720a5ff32eb4302401d
[]
no_license
stuartwdouglas/jcon-crud
b935d51b51353e565ac448daa1ad16d76fa8f007
25039371a7242951090a7feda51e2485e415e743
refs/heads/main
2023-08-24T01:18:55.216263
2021-10-07T11:36:41
2021-10-07T11:36:41
413,622,405
0
0
null
null
null
null
UTF-8
Java
false
false
981
java
package com.test.resource; import com.test.entity.Fruit0; import com.test.service.FruitService0; import javax.inject.Inject; import javax.transaction.Transactional; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Response; import java.util.List; @Path("/fruit0") @Transactional public class FruitResource0 { @Inject FruitService0 fruitService; @GET public List<Fruit0> list() { return fruitService.list(); } @GET @Path("{id}") public Fruit0 find(int id) { return fruitService.find(id); } @POST public Response save(Fruit0 fruit) { fruitService.save(fruit); return Response.status(201).build(); } @DELETE @Path("{id}") public Response delete(@PathParam("id") int id) { fruitService.delete(fruitService.find(id)); return Response.noContent().build(); } }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
294703aef73577c5a1284bbf403f3b418e368bc1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_d75013dd387b2af1dc1b4c85b22b9d567db91073/JDIModificationVariable/16_d75013dd387b2af1dc1b4c85b22b9d567db91073_JDIModificationVariable_s.java
70cfb8d4e26fc204acce577bf8ca533cdae87eb2
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,371
java
/******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * 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.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.debug.core.model; import java.text.MessageFormat; import java.util.ArrayList; import org.eclipse.debug.core.DebugEvent; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IValue; import org.eclipse.jdt.debug.core.IJavaValue; import com.sun.jdi.VMDisconnectedException; import com.sun.jdi.Value; import com.sun.jdi.VirtualMachine; /** * Common functionality for variables that support value modification */ public abstract class JDIModificationVariable extends JDIVariable { private final static ArrayList fgValidSignatures = new ArrayList (9); static { fgValidSignatures.add("B"); // byte //$NON-NLS-1$ fgValidSignatures.add("C"); // char //$NON-NLS-1$ fgValidSignatures.add("D"); // double //$NON-NLS-1$ fgValidSignatures.add("F"); // float //$NON-NLS-1$ fgValidSignatures.add("I"); // int //$NON-NLS-1$ fgValidSignatures.add("J"); // long //$NON-NLS-1$ fgValidSignatures.add("S"); // short //$NON-NLS-1$ fgValidSignatures.add("Z"); // boolean //$NON-NLS-1$ fgValidSignatures.add(jdiStringSignature); // String } public JDIModificationVariable(JDIDebugTarget target) { super(target); } public boolean supportsValueModification() { try { Value currentValue= getCurrentValue(); if (currentValue != null) { String signature = currentValue.type().signature(); return fgValidSignatures.contains(signature); } else { String signature = getSignature(); return fgValidSignatures.contains(signature); } } catch (DebugException e) { logError(e); } catch (VMDisconnectedException e) { JDIDebugTarget target = (JDIDebugTarget)getDebugTarget(); if (!target.isAvailable()) { return false; } logError(e); } catch (RuntimeException e) { logError(e); } return false; } protected Value generateVMValue(String expression) throws DebugException { String signature= null; Value cValue= getCurrentValue(); VirtualMachine vm= getVM(); if (vm == null) { requestFailed(JDIDebugModelMessages.getString("JDIModificationVariable.Unable_to_generate_value_-_VM_disconnected._1"), null); //$NON-NLS-1$ } if (cValue == null) { //String with null value signature = jdiStringSignature; } else { signature= cValue.type().signature(); } if (signature.length() > 1 && !signature.equals(jdiStringSignature)) { return null; } Value vmValue= null; try { switch (signature.charAt(0)) { case 'Z' : String flse= Boolean.FALSE.toString(); String tre= Boolean.TRUE.toString(); if (expression.equals(tre) || expression.equals(flse)) { boolean booleanValue= Boolean.valueOf(expression).booleanValue(); vmValue= vm.mirrorOf(booleanValue); } break; case 'B' : byte byteValue= Byte.valueOf(expression).byteValue(); vmValue= vm.mirrorOf(byteValue); break; case 'C' : if (expression.length() == 1) { char charValue= expression.charAt(0); vmValue= vm.mirrorOf(charValue); } else if (expression.length() == 2) { char charValue; if (!(expression.charAt(0) == '\\')) { return null; } switch (expression.charAt(1)) { case 'b': charValue= '\b'; break; case 'f': charValue= '\f'; break; case 'n': charValue= '\n'; break; case 'r': charValue= '\r'; break; case 't': charValue= '\t'; break; case '\'': charValue= '\''; break; case '\"': charValue= '\"'; break; case '\\': charValue= '\\'; break; default : return null; } vmValue= vm.mirrorOf(charValue); } break; case 'S' : short shortValue= Short.valueOf(expression).shortValue(); vmValue= vm.mirrorOf(shortValue); break; case 'I' : int intValue= Integer.valueOf(expression).intValue(); vmValue= vm.mirrorOf(intValue); break; case 'J' : long longValue= Long.valueOf(expression).longValue(); vmValue= vm.mirrorOf(longValue); break; case 'F' : float floatValue= Float.valueOf(expression).floatValue(); vmValue= vm.mirrorOf(floatValue); break; case 'D' : double doubleValue= Double.valueOf(expression).doubleValue(); vmValue= vm.mirrorOf(doubleValue); break; case 'L' : vmValue= vm.mirrorOf(expression); break; } } catch (NumberFormatException nfe) { return null; } return vmValue; } /** * @see IValueModification#verifyValue(String) */ public boolean verifyValue(String expression) { try { Value vmValue= generateVMValue(expression); return vmValue != null; } catch (DebugException e) { logError(e); return false; } } /** * @see IValueModification#verifyValue(IValue) */ public boolean verifyValue(IValue value) { return value instanceof IJavaValue && value.getDebugTarget().equals(getDebugTarget()); } /** * @see IValueModification#setValue(String) */ public final void setValue(String expression) throws DebugException { Value value= generateVMValue(expression); if (value == null) { requestFailed(MessageFormat.format(JDIDebugModelMessages.getString("JDIModificationVariable.value_modification_failed"), new String[] {expression}), null); //$NON-NLS-1$ } setValue(value); fireChangeEvent(DebugEvent.CONTENT); } /** * Set this variable's value to the given value */ protected abstract void setValue(Value value) throws DebugException; }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
146cdb452ae08e467e7ddfa6bd1e67d031e138cb
ad0fe9f21d55ec64ff72fabf77da92a442463b7e
/core/src/test/resources/maven-3-trunk/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/ProjectDependencyGraphStubTest.java
8c6057234354921ca3c276125faef213865f7695
[ "MIT", "Apache-2.0" ]
permissive
gems-uff/oceano
91425da8a11aa0268c9b5c1e2db70013f0152bac
a37468dab497c1ffe338bbf06df179bfe27b59d1
refs/heads/master
2020-12-24T19:27:06.468798
2018-11-18T00:20:13
2018-11-18T00:20:13
13,281,731
3
3
MIT
2018-11-18T00:20:13
2013-10-02T20:18:47
Java
UTF-8
Java
false
false
2,382
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.maven.lifecycle.internal.stub; import junit.framework.TestCase; import org.apache.maven.project.MavenProject; import java.util.List; /** * Tests the stub. Yeah, I know. * * @author Kristian Rosenvold */ public class ProjectDependencyGraphStubTest extends TestCase { public void testADependencies() { ProjectDependencyGraphStub stub = new ProjectDependencyGraphStub(); final List<MavenProject> mavenProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.A, false ); assertEquals( 0, mavenProjects.size() ); } public void testBDepenencies( ProjectDependencyGraphStub stub ) { final List<MavenProject> bProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.B, false ); assertEquals( 1, bProjects.size() ); assertTrue( bProjects.contains( ProjectDependencyGraphStub.A ) ); } public void testCDepenencies( ProjectDependencyGraphStub stub ) { final List<MavenProject> cProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.C, false ); assertEquals( 1, cProjects.size() ); assertTrue( cProjects.contains( ProjectDependencyGraphStub.C ) ); } public void testXDepenencies( ProjectDependencyGraphStub stub ) { final List<MavenProject> cProjects = stub.getUpstreamProjects( ProjectDependencyGraphStub.X, false ); assertEquals( 2, cProjects.size() ); assertTrue( cProjects.contains( ProjectDependencyGraphStub.C ) ); assertTrue( cProjects.contains( ProjectDependencyGraphStub.B ) ); } }
[ "leomurta@ic.uff.br" ]
leomurta@ic.uff.br
8abeb94ce67626f23e6fdf0657d39afcf09f3d3d
573568f5fe9b5729f820bb3d001a5ee8ad1331b6
/src/studio/app/CastPane.java
4e9ec1e4412d1ceb79c6b2f50dd6b6d43634da53
[]
no_license
jbwyatt4archive/SnapStudio
0577dc2d5d3fc65f4c185cc5df8d7ba208249d99
0f2549f7225ad9e74b9d48153b85317ce0f306cd
refs/heads/master
2020-05-05T13:58:38.500841
2019-01-24T21:30:42
2019-01-24T21:30:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,029
java
package studio.app; import snap.gfx.*; import snap.view.*; import snap.viewx.*; import snap.web.WebFile; /** * A pane to add SnapActors to a SnapScene. */ public class CastPane extends EditorPane.SupportPane { // The UI ColView _ui; // The shared CastPane static CastPane _shared; // The currently dragging actor static SnapActor _dragActor; /** * Creates a new CastPane. */ public CastPane(EditorPane anEP) { super(anEP); _shared = this; } /** * Creates a new CastPane. */ protected View createUI() { _ui = new ColView(); _ui.setSpacing(6); _ui.setGrowWidth(true); _ui.setPickable(false); _ui.setAlign(Pos.CENTER); // Create Actors SnapActor cat = createActor("Cat"); SnapActor car = createActor("Car"); SnapActor dog = createActor("Dog"); SnapActor duke = createActor("Duke"); // Add nodes View nodes[] = { cat, car, dog, duke }; for(View n : nodes) addItem(_ui, n); //Box box2 = new Box(); box2.setPadding(4,4,4,4); box2.setContent(_ui); //box2.setFill(ViewUtils.getBackDarkFill()); //_ui.setFill(ViewUtils.getBackFill()); _ui.setEffect(new ShadowEffect()); _ui.setBorder(Border.createCompoundBorder(Border.createLoweredBevelBorder(), Border.createEmptyBorder(8,8,8,12))); BoxView box = new BoxView(); box.setPadding(3,3,3,3); box.setContent(_ui); box.setFillWidth(true); box.setAlign(Pos.TOP_CENTER); enableEvents(box, DragGesture, ViewEvent.Type.DragSourceEnd); ScrollView sview = new ScrollView(box); sview.setFill(ViewUtils.getBackFill()); sview.setGrowWidth(true); sview.setGrowHeight(true); return sview; } protected SnapActor createActor(String aName) { SnapActor actr = new SnapActor(); actr.setName(aName); actr.setRealClassName(aName); actr.setImage(Image.get(getClass(), "actor.images/" + aName + ".png")); actr.setImageName(aName + ".png"); actr.setPrefSize(120,120); return actr; } /** * Respond to UI. */ public void respondUI(ViewEvent anEvent) { // Handle DragGesture if(anEvent.isDragGesture()) { ParentView view = anEvent.getView(ParentView.class); _ui.setPickable(true); _dragActor = ViewUtils.getDeepestChildAt(view, anEvent.getX(), anEvent.getY(), SnapActor.class); _ui.setPickable(false); //while(!(view2.getParent() instanceof ChildView)) view2 = view2.getParent(); Clipboard cboard = anEvent.getClipboard(); cboard.addData("CastPane: " + _dragActor.getRealClassName()); cboard.setDragImage(_dragActor.getImage()); cboard.startDrag(); } // Handle DragSource if(anEvent.isDragSourceEnd()) _dragActor = null; } /** * Adds a Gallery item. */ public void addItem(ColView aVBox, View aView) { RowView hbox = new RowView(); hbox.setSpacing(3); aView.setLeanX(HPos.CENTER); //Label label = new Label(aView.getClass().getSimpleName()); label.setPrefWidth(80); hbox.setChildren(aView); //label aVBox.addChild(hbox); } /** * Called to drop an Actor. */ public void dropActor(View aView, ViewEvent anEvent) { String name = _dragActor.getName(); Image img = _dragActor.getImage(); SnapActor actr = new SnapActor(); actr.setName(name); actr.setImage(img); actr.setImageName(_dragActor.getImageName()); actr.setRealClassName(_dragActor.getRealClassName()); actr.setSize(actr.getPrefSize()); ParentView content = getEditor().getContent(); SnapScene scene = content instanceof SnapScene? (SnapScene)content : null; if(scene==null) { beep(); return; } Point pnt = scene.parentToLocal(anEvent.getX(), anEvent.getY(), anEvent.getView()); double w = img.getWidth(), h = img.getHeight(); double x = Math.round(pnt.getX() - w/2), y = Math.round(pnt.getY() - h/2); actr.setBounds(x, y, w, h); scene.addActor(actr, x, y); getEditor().setSelectedView(actr); // Adds the actor source and image file addActorSource(name); addActorImage(name, img); } /** * Adds an actor for name, image and location. */ void addActorSource(String aName) { // Get Site and SceneFile WebFile sfile = getEditor().getSourceURL().getFile(); WebFile sdir = sfile.getParent(); String actrPath = sdir.getDirPath() + aName + ".java"; WebFile actrfile = sdir.getSite().getFile(actrPath); if(actrfile!=null) return; actrfile = sdir.getSite().createFile(actrPath, false); // Create ActorFile text StringBuffer sb = new StringBuffer(); sb.append("import snap.viewx.*;\n\n"); sb.append("/**\n * An Actor implementation. SnapEdit=true.\n */\n"); sb.append("public class " + aName + " extends SnapActor {\n\n"); sb.append("/**\n * Creates a new " + aName + " (constructor).\n */\n"); sb.append("public " + aName + "()\n{\n}\n\n"); //sb.append("/**\n * Initialize Actor here.\n */\n"); //sb.append("public void main()\n{\n}\n\n"); sb.append("/**\n * Update Actor here.\n */\n"); sb.append("public void act()\n{\n}\n\n}"); // Set text and save file actrfile.setText(sb.toString()); try { actrfile.save(); } catch(Exception e) { throw new RuntimeException(e); } } /** * Adds an actor for name, image and location. */ void addActorImage(String aName, Image anImg) { WebFile sfile = getEditor().getSourceURL().getFile(); WebFile sdir = sfile.getParent(); String path = sdir.getDirPath() + aName + '.' + anImg.getType(); WebFile ifile = sdir.getSite().getFile(path); if(ifile!=null) return; ifile = sdir.getSite().createFile(path, false); ifile.setBytes(anImg.getBytes()); try { ifile.save(); } catch(Exception e) { throw new RuntimeException(e); } } /** * Returns whether CastPane is dragging. */ public static boolean isDragging() { return _dragActor!=null; } /** * Returns the current dragging actor. */ public static SnapActor getDragActor() { return _dragActor; } /** * Returns the Shared CastPane. */ public static CastPane get() { return _shared; } }
[ "jeff@reportmill.com" ]
jeff@reportmill.com
bbddff1b7dcab520a566d9a12f460ac086cff37c
d3419ceaa95c3f112b4e17447bdd3d2b5ddef6a9
/src/main/java/org/phantomapi/phast/PhastAlertNode.java
4fcd6cbe2bd2cfc17ae46f33b526bcfffc81a60b
[ "WTFPL" ]
permissive
DiyarSavda/Phantom
97f1185da2409b68a959512fdfb6126ddd276044
f2f293692d1d7790d0dfb018f689f46f6bb7ff52
refs/heads/master
2021-01-01T17:15:04.167721
2017-07-22T13:37:57
2017-07-22T13:37:57
98,033,512
0
0
null
2017-07-22T13:37:00
2017-07-22T13:37:00
null
UTF-8
Java
false
false
625
java
package org.phantomapi.phast; import org.bukkit.entity.Player; import org.phantomapi.Phantom; import org.phantomapi.lang.GList; import org.phantomapi.util.F; /** * A Node for broadcasting messages * * @author cyberpwn */ public class PhastAlertNode extends PhastNode { public PhastAlertNode() { super("alert"); } @Override public String phastHelp() { return "alert [msg] - Broadcast message"; } @Override public void on(String[] args) { String command = F.color(new GList<String>(args).toString(" ")); for(Player i : Phantom.instance().onlinePlayers()) { i.sendMessage(command); } } }
[ "danielmillst@gmail.com" ]
danielmillst@gmail.com
a098aecb4e1b2545434723755a13888953f47e3b
c81dd37adb032fb057d194b5383af7aa99f79c6a
/java/com/facebook/ads/redexgen/X/ZS.java
9deee3277833d8ea9a91f101464ad6bf514235e3
[]
no_license
hongnam207/pi-network-source
1415a955e37fe58ca42098967f0b3307ab0dc785
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
refs/heads/main
2023-03-30T07:49:35.920796
2021-03-28T06:56:24
2021-03-28T06:56:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,864
java
package com.facebook.ads.redexgen.X; import com.facebook.ads.internal.exoplayer2.metadata.Metadata; import com.facebook.ads.internal.exoplayer2.metadata.scte35.PrivateCommand; import com.facebook.ads.internal.exoplayer2.metadata.scte35.SpliceCommand; import com.facebook.ads.internal.exoplayer2.metadata.scte35.SpliceInsertCommand; import com.facebook.ads.internal.exoplayer2.metadata.scte35.SpliceNullCommand; import com.facebook.ads.internal.exoplayer2.metadata.scte35.SpliceScheduleCommand; import com.facebook.ads.internal.exoplayer2.metadata.scte35.TimeSignalCommand; import java.nio.ByteBuffer; public final class ZS implements AbstractC0358Dy { public static String[] A03; public C0462Ic A00; public final IP A01 = new IP(); public final IQ A02 = new IQ(); static { A00(); } public static void A00() { A03 = new String[]{"TasyJMHsWGEkz863ImR0Q5Lz0Jv5KZRl", "wAvcoPGmhTOD2UdnkI7mjYYyFDdz6tY4", "tIFolEUfJcQQhLLKuuKqSvXZilOQ0d41", "wnba1Mxhk7UAzMMhJxuW", "IqdHVgHf3sWcJ9J53HVfrlZmkyidEDTw", "kUaC4Xj2GLTFGhk3U8FgQLf5h3yptWRi", "yAL9OJMifRSpz7GOwtKlA6RWbWPVLH5t", "1By3yk2Axs3IVYX9txEI"}; } @Override // com.facebook.ads.redexgen.X.AbstractC0358Dy public final Metadata A4e(CC cc) throws C0359Dz { if (this.A00 == null || cc.A00 != this.A00.A06()) { this.A00 = new C0462Ic(((C0861Xw) cc).A00); this.A00.A07(((C0861Xw) cc).A00 - cc.A00); } ByteBuffer byteBuffer = cc.A01; byte[] array = byteBuffer.array(); int limit = byteBuffer.limit(); this.A02.A0c(array, limit); this.A01.A0D(array, limit); this.A01.A09(39); long A05 = (((long) this.A01.A05(1)) << 32) | ((long) this.A01.A05(32)); this.A01.A09(20); int A052 = this.A01.A05(12); int spliceCommandType = this.A01.A05(8); SpliceCommand command = null; this.A02.A0a(14); if (spliceCommandType == 0) { command = new SpliceNullCommand(); } else if (spliceCommandType == 255) { IQ iq = this.A02; if (A03[1].charAt(6) != 'G') { throw new RuntimeException(); } String[] strArr = A03; strArr[3] = "IAVDgnOrTVyqUqMF0jCb"; strArr[7] = "AiSzseiiVBo4zRVGAcCm"; command = PrivateCommand.A00(iq, A052, A05); } else if (spliceCommandType == 4) { command = SpliceScheduleCommand.A00(this.A02); } else if (spliceCommandType == 5) { command = SpliceInsertCommand.A00(this.A02, A05, this.A00); } else if (spliceCommandType == 6) { command = TimeSignalCommand.A01(this.A02, A05, this.A00); } if (command == null) { return new Metadata(new Metadata.Entry[0]); } return new Metadata(command); } }
[ "nganht2@vng.com.vn" ]
nganht2@vng.com.vn
577076d593c8481141850ace65443577c81c6461
4810a15f89f4481fa2f600386a73983e48c3fdfe
/ServletJsp/src/servlet/quiz/Exam02.java
9655cbef0b5bde355c7594cff98b1d0ed892fd8a
[]
no_license
fship1124/java86
54d779e46f8296ce6fb5e38dd58bd5d8ead92d05
d116fa70af0829675e281f90fc6baa8128f60cc5
refs/heads/master
2022-12-08T17:20:16.713751
2020-08-20T12:18:30
2020-08-20T12:18:30
288,993,715
0
0
null
null
null
null
UTF-8
Java
false
false
1,394
java
package servlet.quiz; import java.io.IOException; import java.io.PrintWriter; import java.util.Random; import javax.servlet.GenericServlet; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.annotation.WebServlet; @WebServlet("/servlet/quiz/Exam02") public class Exam02 extends GenericServlet { private int answerNum; private int count = 0; public void init(ServletConfig config) { Random r = new Random(); answerNum = r.nextInt(100) + 1; } @Override public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { response.setContentType("text/html; charset=UTF-8"); PrintWriter out = response.getWriter(); String msg = ""; int num = Integer.parseInt(request.getParameter("num")); if (num > answerNum) { msg = "작은 수를 입력하세요"; } else if (num < answerNum) { msg = "큰 수를 입력하세요"; } else { msg = "정답입니다."; } count++; out.println("<html><body>"); out.println(" <h1>정답 : " + answerNum + "</h1>"); out.println(" <h1>" + count + "회 시도</h1>"); out.println(" <h1>" + msg + "</h1>"); if (num != answerNum) { out.println(" <h1><a href='exam02.html'>다시입력</a></h1>"); } out.println("</body></html>"); } }
[ "fship1124@gmail.com" ]
fship1124@gmail.com
449cf9ce66bd824b4f935f54660c953c965dcc65
6fa701cdaa0d83caa0d3cbffe39b40e54bf3d386
/google/cloud/notebooks/v1beta1/google-cloud-notebooks-v1beta1-java/proto-google-cloud-notebooks-v1beta1-java/src/main/java/com/google/cloud/notebooks/v1beta1/SetInstanceMachineTypeRequestOrBuilder.java
c89df4b836ed0fc862c64a792eb7b06b3bd6990e
[ "Apache-2.0" ]
permissive
oltoco/googleapis-gen
bf40cfad61b4217aca07068bd4922a86e3bbd2d5
00ca50bdde80906d6f62314ef4f7630b8cdb6e15
refs/heads/master
2023-07-17T22:11:47.848185
2021-08-29T20:39:47
2021-08-29T20:39:47
null
0
0
null
null
null
null
UTF-8
Java
false
true
1,589
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/notebooks/v1beta1/service.proto package com.google.cloud.notebooks.v1beta1; public interface SetInstanceMachineTypeRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1beta1.SetInstanceMachineTypeRequest) com.google.protobuf.MessageOrBuilder { /** * <pre> * Required. Format: * `projects/{project_id}/locations/{location}/instances/{instance_id}` * </pre> * * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code> * @return The name. */ java.lang.String getName(); /** * <pre> * Required. Format: * `projects/{project_id}/locations/{location}/instances/{instance_id}` * </pre> * * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code> * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** * <pre> * Required. The [Compute Engine machine * type](https://cloud.google.com/compute/docs/machine-types). * </pre> * * <code>string machine_type = 2 [(.google.api.field_behavior) = REQUIRED];</code> * @return The machineType. */ java.lang.String getMachineType(); /** * <pre> * Required. The [Compute Engine machine * type](https://cloud.google.com/compute/docs/machine-types). * </pre> * * <code>string machine_type = 2 [(.google.api.field_behavior) = REQUIRED];</code> * @return The bytes for machineType. */ com.google.protobuf.ByteString getMachineTypeBytes(); }
[ "bazel-bot-development[bot]@users.noreply.github.com" ]
bazel-bot-development[bot]@users.noreply.github.com
5595558c18a494a2e8e134d5aea1f90473628e17
6033f8ce0ce6f633923c2393ecfb21c3901ed700
/quickstart-motan/src/main/java/org/quickstart/rpc/motan/App.java
dd166dbe057c8dee68f4f7b0c38e58a595d7d42a
[ "Apache-2.0" ]
permissive
youngzil/quickstart-rpc
cb0dc91bcd2a6ab10bfa74f41d788fee6415a2af
983ba822c5865c3685432946aac8488094d53f5b
refs/heads/master
2023-03-16T02:20:49.624163
2022-08-25T15:01:07
2022-08-25T15:01:07
140,261,537
0
2
Apache-2.0
2022-08-25T15:02:05
2018-07-09T09:18:39
Java
UTF-8
Java
false
false
187
java
package org.quickstart.rpc.motan; /** * Hello world! * */ public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }
[ "youngzil@163.com" ]
youngzil@163.com
0ee3ca9a8a5a93ac12216e857c8002a695c50352
9f9a74f31c52b303c3daa9585bb757e71df7b4ba
/wise-web-console/src/main/java/com/wise/common/utils/excel/fieldtype/RoleListType.java
63377d359672d4b8aee68a42d4f5b6aae15f6e9d
[ "Apache-2.0" ]
permissive
zhechu/wise
7ae6cd4a24a2c2ab04b30f32016eebf5f884f12c
f0aa4a87c61b96ff1b31e6a5aa1a6003c7dce868
refs/heads/master
2020-12-30T16:16:24.426346
2017-05-11T12:47:02
2017-05-11T12:47:15
89,262,483
0
0
null
null
null
null
UTF-8
Java
false
false
1,217
java
package com.wise.common.utils.excel.fieldtype; import java.util.List; import com.google.common.collect.Lists; import com.wise.common.utils.Collections3; import com.wise.common.utils.StringUtils; import com.wise.core.bean.manage.SysRole; import com.wise.core.service.manage.SysRoleService; import com.wise.web.utils.SpringContextHolder; /** * 字段类型转换 * @author lingyuwang * */ public class RoleListType { private static SysRoleService sysRoleService = SpringContextHolder.getBean(SysRoleService.class); /** * 获取对象值(导入) */ public static Object getValue(String val) { List<SysRole> roleList = Lists.newArrayList(); List<SysRole> allRoleList = sysRoleService.findValid(); for (String s : StringUtils.split(val, ",")){ for (SysRole e : allRoleList){ if (StringUtils.trimToEmpty(s).equals(e.getName())){ roleList.add(e); } } } return roleList.size()>0?roleList:null; } /** * 设置对象值(导出) */ public static String setValue(Object val) { if (val != null){ @SuppressWarnings("unchecked") List<SysRole> roleList = (List<SysRole>)val; return Collections3.extractToString(roleList, "name", ", "); } return ""; } }
[ "ling-yu-wang@qq.com" ]
ling-yu-wang@qq.com
edef3db485b4e15f47befd95b2c31fae3f0dc667
fcc88521f63a3c22c81a9242ae3b203f2ea888fd
/Java/1334-Find-the-City-with-the-Smallest-Number-of-Neighbors-at-a-Threshold-Distance/soln.java
37994cc9bcc7467b7a2067a24998e59e6ea5bb89
[ "MIT" ]
permissive
wyaadarsh/LeetCode-Solutions
b5963e3427aa547d485d3a2cb24e6cedc72804fd
3719f5cb059eefd66b83eb8ae990652f4b7fd124
refs/heads/master
2022-12-06T15:50:37.930987
2020-08-30T15:49:27
2020-08-30T15:49:27
291,811,790
0
1
MIT
2020-08-31T19:57:35
2020-08-31T19:57:34
null
UTF-8
Java
false
false
1,844
java
class Solution { public int findTheCity(int n, int[][] edges, int threshold) { List<int []> [] graph = new ArrayList[n]; for(int i = 0; i < n; ++i) { graph[i] = new ArrayList<>(); } for(int [] edge : edges) { int u = edge[0], v = edge[1], w = edge[2]; graph[u].add(new int[] {v, w}); graph[v].add(new int[] {u, w}); } // System.out.println(cnt); if (cnt <= mn) { idx = i; mn = cnt; } } return idx; } private int dijkstra(List<int []> [] graph, int start, int n, int threshold) { PriorityQueue<int []> frontier = new PriorityQueue<>(100, (a, b) -> (a[0] - b[0])); Map<Integer, Integer> costs = new HashMap<>(); costs.put(start, 0); frontier.offer(new int [] {0, start}); boolean [] processed = new boolean[n]; while (!frontier.isEmpty()) { int [] node = frontier.poll(); int u = node[1], cost = node[0]; if (processed[u]) continue; processed[u] = true; // System.out.println(u); for(int [] nei : graph[u]) { // System.out.println(nei[0]); // System.out.println(costs.containsKey(nei[0])); int v = nei[0], w = nei[1]; if (cost + w <= threshold && (!costs.containsKey(v) || cost + w < costs.get(v))) { // System.out.println(nei[0] + "H"); costs.put(v, cost + w); frontier.offer(new int [] {cost + w, v}); } } } return costs.size() - 1; } } int idx = 0, mn = n + 1; for(int i = 0; i < n; ++i) { int cnt = dijkstra(graph, i, n, threshold);
[ "zhang623@wisc.edu" ]
zhang623@wisc.edu
33a6d851f67a2c58872f2e76e6b749f6bd854913
e1e5bd6b116e71a60040ec1e1642289217d527b0
/H5/L2jSunrise_com/L2jSunrise_com_2019_09_16/L2J_SunriseProject_Core/java/l2r/gameserver/ai/L2AirShipAI.java
71b2680a0ab78142036f5d5c9aba902dc22ab1ca
[]
no_license
serk123/L2jOpenSource
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
603e784e5f58f7fd07b01f6282218e8492f7090b
refs/heads/master
2023-03-18T01:51:23.867273
2020-04-23T10:44:41
2020-04-23T10:44:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,024
java
/* * Copyright (C) 2004-2015 L2J Server * * This file is part of L2J Server. * * L2J Server 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. * * L2J Server 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 l2r.gameserver.ai; import l2r.gameserver.model.Location; import l2r.gameserver.model.actor.instance.L2AirShipInstance; import l2r.gameserver.model.actor.instance.L2PcInstance; import l2r.gameserver.network.serverpackets.ExMoveToLocationAirShip; import l2r.gameserver.network.serverpackets.ExStopMoveAirShip; /** * @author DS */ public class L2AirShipAI extends L2VehicleAI { public L2AirShipAI(L2AirShipInstance creature) { super(creature); } @Override protected void moveTo(int x, int y, int z) { if (!_actor.isMovementDisabled()) { _clientMoving = true; _actor.moveToLocation(x, y, z, 0); _actor.broadcastPacket(new ExMoveToLocationAirShip(getActor())); } } @Override public void clientStopMoving(Location pos) { if (_actor.isMoving()) { _actor.stopMove(pos); } if (_clientMoving || (pos != null)) { _clientMoving = false; _actor.broadcastPacket(new ExStopMoveAirShip(getActor())); } } @Override public void describeStateToPlayer(L2PcInstance player) { if (_clientMoving) { player.sendPacket(new ExMoveToLocationAirShip(getActor())); } } @Override public L2AirShipInstance getActor() { return (L2AirShipInstance) _actor; } }
[ "64197706+L2jOpenSource@users.noreply.github.com" ]
64197706+L2jOpenSource@users.noreply.github.com
67586c73386a2cc5214fd14e963e0c81cd46aae8
f9fd138d5e6f1f23d9aced533b5a3f5ff2b7d6f4
/Common/src/main/java/com/blamejared/crafttweaker/natives/item/enchantment/ExpandEnchantment.java
880fa85d978b3ece316fbf49571f840d49b5c0a4
[ "MIT" ]
permissive
kindlich/CraftTweaker
fd61116413b274dc6eac2d6f7468095eb04a9a06
c15ecad34374f09a4917506dc9eb17cf743b792e
refs/heads/1.18
2023-08-17T16:30:47.448860
2022-05-29T14:45:02
2022-05-29T14:45:02
109,025,585
0
0
MIT
2023-04-04T09:46:26
2017-10-31T16:49:14
Java
UTF-8
Java
false
false
4,620
java
package com.blamejared.crafttweaker.natives.item.enchantment; import com.blamejared.crafttweaker.api.annotation.ZenRegister; import com.blamejared.crafttweaker.platform.Services; import com.blamejared.crafttweaker_annotations.annotations.Document; import com.blamejared.crafttweaker_annotations.annotations.NativeTypeRegistration; import com.blamejared.crafttweaker_annotations.annotations.TaggableElement; import net.minecraft.network.chat.Component; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.MobType; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.enchantment.Enchantment; import org.openzen.zencode.java.ZenCodeType; import java.util.Map; @ZenRegister @Document("vanilla/api/item/enchantment/Enchantment") @NativeTypeRegistration(value = Enchantment.class, zenCodeName = "crafttweaker.api.item.enchantment.Enchantment") @TaggableElement("minecraft:enchantment") public class ExpandEnchantment { @ZenCodeType.Method public static Map<EquipmentSlot, ItemStack> getSlotItems(Enchantment internal, LivingEntity entity) { return internal.getSlotItems(entity); } @ZenCodeType.Method @ZenCodeType.Getter("rarity") public static Enchantment.Rarity getRarity(Enchantment internal) { return internal.getRarity(); } @ZenCodeType.Method @ZenCodeType.Getter("minLevel") public static int getMinLevel(Enchantment internal) { return internal.getMinLevel(); } @ZenCodeType.Method @ZenCodeType.Getter("maxLevel") public static int getMaxLevel(Enchantment internal) { return internal.getMaxLevel(); } @ZenCodeType.Method public static int getMinCost(Enchantment internal, int level) { return internal.getMinCost(level); } @ZenCodeType.Method public static int getMaxCost(Enchantment internal, int level) { return internal.getMaxCost(level); } @ZenCodeType.Method public static int getDamageProtection(Enchantment internal, int level, DamageSource source) { return internal.getDamageProtection(level, source); } @ZenCodeType.Method public static float getDamageBonus(Enchantment internal, int level, MobType mobType) { return internal.getDamageBonus(level, mobType); } @ZenCodeType.Method public static boolean isCompatibleWith(Enchantment internal, Enchantment other) { return internal.isCompatibleWith(other); } @ZenCodeType.Method @ZenCodeType.Getter("descriptionId") public static String getDescriptionId(Enchantment internal) { return internal.getDescriptionId(); } @ZenCodeType.Method public static Component getFullname(Enchantment internal, int level) { return internal.getFullname(level); } @ZenCodeType.Method public static boolean canEnchant(Enchantment internal, ItemStack stack) { return internal.canEnchant(stack); } @ZenCodeType.Method public static void doPostAttack(Enchantment internal, LivingEntity source, Entity target, int level) { internal.doPostAttack(source, target, level); } @ZenCodeType.Method public static void doPostHurt(Enchantment internal, LivingEntity source, Entity target, int level) { internal.doPostHurt(source, target, level); } @ZenCodeType.Method @ZenCodeType.Getter("isTreasureOnly") public static boolean isTreasureOnly(Enchantment internal) { return internal.isTreasureOnly(); } @ZenCodeType.Method @ZenCodeType.Getter("isCurse") public static boolean isCurse(Enchantment internal) { return internal.isCurse(); } @ZenCodeType.Method @ZenCodeType.Getter("isTradeable") public static boolean isTradeable(Enchantment internal) { return internal.isTradeable(); } @ZenCodeType.Method @ZenCodeType.Getter("isDiscoverable") public static boolean isDiscoverable(Enchantment internal) { return internal.isDiscoverable(); } @ZenCodeType.Getter("commandString") public static String getCommandString(Enchantment internal) { return "<enchantment:" + Services.REGISTRY.getRegistryKey(internal) + ">"; } }
[ "jaredlll08@gmail.com" ]
jaredlll08@gmail.com
32fb1b93e6efdcb5abc1ecb132413fe45d76a40b
caa125234a3c3e8fff496a9d4e11f49ac7701309
/main/java/com/maywide/biz/inter/pojo/queversion/QueVersionInterResp.java
57db14cfdc62e5d00f762cb4030afeeab34e315b
[]
no_license
lisongkang/my-first-project-for-revcocomcmms
1885f49fa1a7ef8686c3d8b7d9b5a50585bb3b8d
6079a3d9d24bd44ae3af24dc603846d460910f3b
refs/heads/master
2022-05-01T16:34:20.261009
2022-04-18T13:55:04
2022-04-18T13:55:04
207,246,589
1
0
null
null
null
null
UTF-8
Java
false
false
903
java
package com.maywide.biz.inter.pojo.queversion; import java.util.Date; public class QueVersionInterResp implements java.io.Serializable { private String version;// 最新版本号 private String downloadurl;// 下载地址 private String descript;// 更新说明 private Date updatetime; public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } public String getDownloadurl() { return downloadurl; } public void setDownloadurl(String downloadurl) { this.downloadurl = downloadurl; } public String getDescript() { return descript; } public void setDescript(String descript) { this.descript = descript; } public Date getUpdatetime() { return updatetime; } public void setUpdatetime(Date updatetime) { this.updatetime = updatetime; } }
[ "1223128449@qq.com" ]
1223128449@qq.com
a03ba0c69722e825ff14d5b6064078c89a2f56d8
594dbe9ad659263e560e2d84d02dae411e3ff2ca
/glaf/workspace/glaf-core/src/main/java/com/glaf/core/base/Scheduler.java
40d23292955c8ca9f9a8fedd88978a74d09ea385
[]
no_license
eosite/openyourarm
670b3739f9abb81b36a7d90846b6d2e68217b443
7098657ee60bf6749a13c0ea19d1ac1a42a684a0
refs/heads/master
2021-05-08T16:38:30.406098
2018-01-24T03:38:45
2018-01-24T03:38:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,346
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.glaf.core.base; import java.util.Date; import java.util.Map; import com.alibaba.fastjson.JSONObject; public interface Scheduler { String getAttribute(); int getAutoStartup(); String getBusinessType(); String getContent(); String getCreateBy(); Date getCreateDate(); Date getEndDate(); String getExpression(); Date getFireTime(); String getId(); String getIntervalTime(); String getIntervalType(); String getIntervalValue(); String getJobClass(); Map<String, Parameter> getJobDataMap(); long getJobRunTime(); int getLocked(); String getMethodName(); Date getNextFireTime(); Date getPreviousFireTime(); int getPriority(); int getRepeatCount(); int getRepeatInterval(); int getRunStatus(); int getRunType(); String getSpringBeanId(); String getSpringClass(); Date getStartDate(); int getStartDelay(); int getStartup(); String getTaskId(); String getTaskName(); String getTaskType(); int getThreadSize(); String getTitle(); boolean isSchedulerAutoStartup(); boolean isSchedulerStartup(); boolean isValid(); Scheduler jsonToObject(JSONObject jsonObject); void setAttribute(String attribute); void setBusinessType(String businessType); void setAutoStartup(int autoStartup); void setContent(String content); void setCreateBy(String createBy); void setCreateDate(Date createDate); void setEndDate(Date endDate); void setExpression(String expression); void setFireTime(Date fireTime); void setId(String id); void setIntervalTime(String intervalTime); void setIntervalType(String intervalType); void setIntervalValue(String intervalValue); void setJobClass(String jobClass); void setJobDataMap(Map<String, Parameter> jobDataMap); void setJobRunTime(long jobRunTime); void setLocked(int locked); void setMethodName(String methodName); void setNextFireTime(Date nextFireTime); void setPreviousFireTime(Date previousFireTime); void setPriority(int priority); void setRepeatCount(int repeatCount); void setRepeatInterval(int repeatInterval); void setRunStatus(int runStatus); void setRunType(int runType); void setSpringBeanId(String springBeanId); void setSpringClass(String springClass); void setStartDate(Date startDate); void setStartDelay(int startDelay); void setStartup(int startup); void setTaskId(String taskId); void setTaskName(String taskName); void setTaskType(String taskType); void setThreadSize(int threadSize); void setTitle(String title); JSONObject toJsonObject(); }
[ "weishang80@qq.com" ]
weishang80@qq.com
a4aad04236c0d7c00d67597a43a3755e39858efc
88252dad1b411dd2a580f1182af707d0c0981841
/JavaSE210301/day15/src/com/atguigu/java2/ExceptionTest.java
3624fb47e8726213de79c3e4fc14e77b73c6c6f1
[]
no_license
FatterXiao/myJavaLessons
37db50d24cbcc5524e5b8060803ab08ab3b3ac0c
fa6ff208b46048527b899001561bd952f48bbe15
refs/heads/main
2023-04-20T09:18:06.694611
2021-04-29T10:18:30
2021-04-29T10:18:30
347,562,482
0
1
null
null
null
null
UTF-8
Java
false
false
3,162
java
package com.atguigu.java2; import com.sun.corba.se.impl.orbutil.CorbaResourceUtil; import com.sun.xml.internal.bind.v2.runtime.output.StAXExStreamWriterOutput; import org.junit.Test; import java.io.File; import java.io.FileInputStream; import java.io.FileReader; import java.util.Date; import java.util.InputMismatchException; import java.util.Scanner; /** * 一、异常的体系结构: * java.lang.Throwable * |----java.lang.Error :错误 ,我们不编写针对性的代码进行处理。 * |----StackOverflowError \ OutOfMemoryError * |----java.lang.Exception : 异常,我们可以编写针对性的代码进行处理 * |---编译时异常: * |---FileNotFoundException * |---IOException * |---运行时异常: * |----InputMismatchException * |----ArrayIndexOutOfBoundsException * |----NullPointerException * |----ClassCastException * |----NumberFormatException * |----ArithmeticException * * * 复习:java程序执行过程分为:过程一:编译:javac.exe --->此过程中出现的异常,称为:编译时异常 * 过程二:运行:java.exe --->此过程中出现的异常,称为:运行时异常 * * 面试题:开发中,你都有遇到过哪些异常呢? * * * * @author shkstart * @create 14:26 */ public class ExceptionTest { //InputMismatchException @Test public void test1(){ Scanner scan = new Scanner(System.in); System.out.println("请输入你的年龄:"); int age = scan.nextInt(); System.out.println(age); } //ArrayIndexOutOfBoundsException @Test public void test2(){ int[] arr = new int[10]; System.out.println(arr[-1]); } //NullPointerException @Test public void test3(){ //情况1: // int[] arr = null; // System.out.println(arr[0]); //情况2: // int[][] arr = new int[10][]; // System.out.println(arr[0][0]); //情况3: String str = "hello"; str = null; System.out.println(str.toString());//bank.getCustomer(0).getAccount().withdraw(500); } //ClassCastException @Test public void test4(){ Object obj = new String("hello"); Date date = (Date)obj; } //NumberFormatException:数字转换异常 @Test public void test5(){ String str = "123"; str = "123a"; int num = Integer.parseInt(str); System.out.println(num); } //ArithmeticException:算术异常 @Test public void test6(){ int m = 10; int n = 0; System.out.println(m / n); } @Test public void test7(){ // File file = new File("hello.txt"); // FileReader fr = new FileReader(file); // char[] buffer = new char[4]; // int len; // while((len = fr.read(buffer)) != -1){ // String str = new String(buffer,0,len); // System.out.print(str); // } // fr.close(); } }
[ "xuweijunxinlan@yeah.net" ]
xuweijunxinlan@yeah.net
6ce50630ab66eebbef337323c385543e77c252a5
9089284ef26e528b449f75f315597cee33a2504d
/src/main/java/com/ups/xolt/codesamples/request/jaxb/LabelMethodType.java
a8eaf638fc507ca9f2639a3b9371ca22fce17cd0
[]
no_license
TheRealMarcusChiu/JavaApiUps
f50798fcaf688a429db700f84b616a9606160804
cbd33a6fc3321af89545c2ff526965565c13be1b
refs/heads/master
2020-12-30T10:12:06.805935
2017-08-03T13:58:34
2017-08-03T13:58:34
99,238,603
1
2
null
null
null
null
UTF-8
Java
false
false
2,466
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.08.03 at 08:56:33 AM CDT // package com.ups.xolt.codesamples.request.jaxb; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for LabelMethodType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="LabelMethodType"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="Code" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LabelMethodType", propOrder = { "code", "description" }) public class LabelMethodType { @XmlElement(name = "Code", required = true) protected String code; @XmlElement(name = "Description") protected String description; /** * Gets the value of the code property. * * @return * possible object is * {@link String } * */ public String getCode() { return code; } /** * Sets the value of the code property. * * @param value * allowed object is * {@link String } * */ public void setCode(String value) { this.code = value; } /** * Gets the value of the description property. * * @return * possible object is * {@link String } * */ public String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link String } * */ public void setDescription(String value) { this.description = value; } }
[ "marcuschiu9@gmail.com" ]
marcuschiu9@gmail.com
5cbe810525820cd46a5ef3d71dada7002e7af7a4
f9ff5aa5b205d55e3c19a935f4441494a4cba525
/leetcode/201.bitwise-and-of-numbers-range.java
0eec35afc3f178dffd27351298b6d972cb6c8819
[]
no_license
MondayCoke/ArchKnowledgeTree
a5987725fb45df22292db48826f2e7c3f5e6c138
cd1bfcd51b09fabee9aa23c194571b5e8572b273
refs/heads/master
2023-04-10T10:30:03.057868
2021-04-20T14:06:20
2021-04-22T09:12:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
833
java
/* * @lc app=leetcode id=201 lang=java * * [201] Bitwise AND of Numbers Range */ // @lc code=start class Solution { public int rangeBitwiseAnd(int m, int n) { /* 利用求公共前缀的思路 由于只要有一位是0,所有数字在该位上的与操作结果都是0。问题可以转化为:找到这个区间内所有数字的最长公共前缀,因为非公共部分是既有0、又有1。 有m n是这个区间的最小、最大值,只用求这两个即可获得所有数字的最长公共前缀。 而求最长公共前缀有两种思路: 1、m n移位运算,算出移动多少位时两者相等 2、利用n&(n-1)可以消除n末尾1,不断消减n末尾的1,直至n<=m */ while(m < n) { n = n & (n - 1); } return n; } } // @lc code=end
[ "chenglong.yu@100credit.com" ]
chenglong.yu@100credit.com
abc0430fede489bfbd6ca20cf05ed98e0a0206ac
855b4041b6a7928988a41a5f3f7e7c7ae39565e4
/hk/src/web/epp/mgr/action/Sys_DelMgrCmtAction.java
b41d143fbf9b2b8c949ad6938bff393e0396bb69
[]
no_license
mestatrit/newbyakwei
60dca96c4c21ae5fcf6477d4627a0eac0f76df35
ea9a112ac6fcbc2a51dbdc79f417a1d918aa4067
refs/heads/master
2021-01-10T06:29:50.466856
2013-03-07T08:09:58
2013-03-07T08:09:58
36,559,185
0
1
null
null
null
null
UTF-8
Java
false
false
1,972
java
package web.epp.mgr.action; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import web.pub.action.EppBaseAction; import web.pub.util.LabaParser; import web.pub.util.WebUtil; import com.hk.frame.util.ServletUtil; import com.hk.frame.util.page.SimplePage; import com.hk.frame.web.http.HkRequest; import com.hk.frame.web.http.HkResponse; import com.hk.svr.CmpCommentService; import com.hk.web.company.action.CmpCommentVo; @Deprecated // @Component("/epp/mgr/cmt") public class Sys_DelMgrCmtAction extends EppBaseAction { @Autowired private CmpCommentService cmpCommentService; public String execute(HkRequest req, HkResponse resp) throws Exception { // TODO Auto-generated method stub return null; } /** * @param req * @param resp * @return * @throws Exception */ public String list(HkRequest req, HkResponse resp) throws Exception { long companyId = req.getLong("companyId"); SimplePage page = ServletUtil.getSimplePage(req, 20); List<com.hk.bean.CmpComment> list = cmpCommentService .getCmpCommentList(companyId, page.getBegin(), page.getSize() + 1); this.processListForPage(page, list); for (com.hk.bean.CmpComment o : list) { String c = LabaParser.parseContent(WebUtil.getUrlInfo(req), o .getContent()); o.setContent(c); } List<CmpCommentVo> volist = CmpCommentVo.createVoList(list, null, true); req.setAttribute("volist", volist); return this.getMgrJspPath(req, "cmt/list.jsp"); } /** * @param req * @param resp * @return * @throws Exception */ public String del(HkRequest req, HkResponse resp) throws Exception { long companyId = req.getLong("companyId"); long cmtId = req.getLong("cmtId"); this.cmpCommentService.deleteCmpComment(companyId, cmtId); req.setSessionText("func.mgrsite.cmt.delete_ok"); return "r:/epp/mgr/cmt_list.do?companyId=" + req.getLong("companyId"); } }
[ "ak478288@gmail.com" ]
ak478288@gmail.com
f9fcc75680141066cc450dfa0c338624fa0294e1
b0ecdd553196227496fe2f1c0637fab7dc6b9a80
/blade-core/src/main/java/com/blade/http/Response.java
a808d496de14e4d9dc86859ad4c853763ded37d5
[ "Apache-2.0" ]
permissive
woofww/blade
2194ff51f6d5d4836910819e77bcd6f0630ff3f6
c8c543e83bee26fb0c0d453ebbb7d6df02d81557
refs/heads/master
2021-05-30T01:00:15.014078
2015-12-08T08:48:56
2015-12-08T08:48:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,146
java
/** * Copyright (c) 2015, biezhi 王爵 (biezhi.me@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.blade.http; import java.io.IOException; import java.io.OutputStream; import java.util.Map; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; import com.blade.render.ModelAndView; /** * * <p> * HTTP响应对象 * </p> * * @author <a href="mailto:biezhi.me@gmail.com" target="_blank">biezhi</a> * @since 1.0 */ public interface Response { HttpServletResponse raw(); int status(); Response status(int status); Response badRequest(); Response unauthorized(); Response notFound(); Response conflict(); String contentType(); Response contentType(String contentType); String header(String name); Response header(String name, String value); Response cookie(Cookie cookie); Response cookie(String name, String value); Response cookie(String name, String value, int maxAge); Response cookie(String name, String value, int maxAge, boolean secured); Response cookie(String path, String name, String value, int maxAge, boolean secured); Response removeCookie(Cookie cookie); Response removeCookie(String name); Map<String,Object> attributes(); Response attribute(String name, Object object); Response text(String output); Response html(String output); Response json(String output); Response xml(String output); OutputStream outputStream() throws IOException; Response render(String view) ; Response render(ModelAndView modelAndView) ; void redirect(String path); void go(String path); boolean isWritten(); }
[ "biezhi.me@gmail.com" ]
biezhi.me@gmail.com
5884d1a8a5faaeb28e35841475c81942d17921e4
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13141-21-18-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/container/servlet/filters/internal/SavedRequestRestorerFilter_ESTest.java
4123b90ee8c1cd8066af9f9586cdfad3e16276bb
[]
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
603
java
/* * This file was automatically generated by EvoSuite * Sun Jan 19 03:38:45 UTC 2020 */ package org.xwiki.container.servlet.filters.internal; 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(useVFS = true, useJEE = true) public class SavedRequestRestorerFilter_ESTest extends SavedRequestRestorerFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
c49c8ead2e134afc1cc3c7598aa41f3fd8cd6546
995f73d30450a6dce6bc7145d89344b4ad6e0622
/DVC-AN20_EMUI10.1.1/src/main/java/android/hardware/radio/config/V1_1/ModemInfo.java
96b2ed6b228ca8ed12080a6aebabc5cbe42e6d07
[]
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,799
java
package android.hardware.radio.config.V1_1; import android.os.HidlSupport; import android.os.HwBlob; import android.os.HwParcel; import java.util.ArrayList; import java.util.Objects; public final class ModemInfo { public byte modemId; public final boolean equals(Object otherObject) { if (this == otherObject) { return true; } if (otherObject != null && otherObject.getClass() == ModemInfo.class && this.modemId == ((ModemInfo) otherObject).modemId) { return true; } return false; } public final int hashCode() { return Objects.hash(Integer.valueOf(HidlSupport.deepHashCode(Byte.valueOf(this.modemId)))); } public final String toString() { return "{" + ".modemId = " + ((int) this.modemId) + "}"; } public final void readFromParcel(HwParcel parcel) { readEmbeddedFromParcel(parcel, parcel.readBuffer(1), 0); } public static final ArrayList<ModemInfo> readVectorFromParcel(HwParcel parcel) { ArrayList<ModemInfo> _hidl_vec = new ArrayList<>(); HwBlob _hidl_blob = parcel.readBuffer(16); int _hidl_vec_size = _hidl_blob.getInt32(8); HwBlob childBlob = parcel.readEmbeddedBuffer((long) (_hidl_vec_size * 1), _hidl_blob.handle(), 0, true); _hidl_vec.clear(); for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) { ModemInfo _hidl_vec_element = new ModemInfo(); _hidl_vec_element.readEmbeddedFromParcel(parcel, childBlob, (long) (_hidl_index_0 * 1)); _hidl_vec.add(_hidl_vec_element); } return _hidl_vec; } public final void readEmbeddedFromParcel(HwParcel parcel, HwBlob _hidl_blob, long _hidl_offset) { this.modemId = _hidl_blob.getInt8(0 + _hidl_offset); } public final void writeToParcel(HwParcel parcel) { HwBlob _hidl_blob = new HwBlob(1); writeEmbeddedToBlob(_hidl_blob, 0); parcel.writeBuffer(_hidl_blob); } public static final void writeVectorToParcel(HwParcel parcel, ArrayList<ModemInfo> _hidl_vec) { HwBlob _hidl_blob = new HwBlob(16); int _hidl_vec_size = _hidl_vec.size(); _hidl_blob.putInt32(8, _hidl_vec_size); _hidl_blob.putBool(12, false); HwBlob childBlob = new HwBlob(_hidl_vec_size * 1); for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) { _hidl_vec.get(_hidl_index_0).writeEmbeddedToBlob(childBlob, (long) (_hidl_index_0 * 1)); } _hidl_blob.putBlob(0, childBlob); parcel.writeBuffer(_hidl_blob); } public final void writeEmbeddedToBlob(HwBlob _hidl_blob, long _hidl_offset) { _hidl_blob.putInt8(0 + _hidl_offset, this.modemId); } }
[ "dstmath@163.com" ]
dstmath@163.com
c5c8f0040bf73b303172f4b18ba2a35423236861
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes9.dex_source_from_JADX/com/facebook/composer/topics/ComposerTopicControllerProvider.java
1603b9c49bb5975e29b74859219058a400cea7f3
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
3,260
java
package com.facebook.composer.topics; import android.support.v4.app.Fragment; import android.view.ViewStub; import com.facebook.composer.attachments.ComposerAttachment.ProvidesAttachments; import com.facebook.composer.minutiae.model.MinutiaeObject.ProvidesMinutiae; import com.facebook.composer.tip.TipManager; import com.facebook.composer.topics.analytics.ComposerTopicLoggerProvider; import com.facebook.feed.topicfeeds.abtest.TopicFeedsTestUtil; import com.facebook.inject.AbstractAssistedProvider; import com.facebook.inject.IdBasedSingletonScopeProvider; import com.facebook.ipc.composer.dataaccessor.ComposerBasicDataProviders.ProvidesIsImplicitLocationSupported; import com.facebook.ipc.composer.dataaccessor.ComposerBasicDataProviders.ProvidesPredictedTopics; import com.facebook.ipc.composer.dataaccessor.ComposerBasicDataProviders.ProvidesSessionId; import com.facebook.ipc.composer.dataaccessor.ComposerBasicDataProviders.ProvidesTextWithEntities; import com.facebook.ipc.composer.dataaccessor.ComposerBasicDataProviders.ProvidesTopics; import com.facebook.ipc.composer.dataaccessor.ComposerBasicSetters.SetsTopics; import com.facebook.ipc.composer.dataaccessor.ComposerMutator; import com.facebook.ipc.composer.dataaccessor.ComposerTransaction; import com.facebook.ipc.composer.intent.ComposerConfigurationSpec.ProvidesConfiguration; import com.facebook.ipc.composer.intent.ComposerPageDataSpec.ProvidesPageData; import com.facebook.ipc.composer.intent.ComposerShareParams.ProvidesShareParams; import com.facebook.ipc.composer.intent.ComposerTargetData.ProvidesTargetData; import com.facebook.ipc.composer.model.ComposerFacecastInfo.ProvidesFacecastInfo; import com.facebook.ipc.composer.model.ComposerLocationInfo.ProvidesLocationInfo; import com.facebook.ipc.composer.model.ComposerTaggedUser.ProvidesTaggedUsers; import com.facebook.qe.api.QeAccessor; import com.facebook.qe.module.QeInternalImplMethodAutoProvider; import com.facebook.uicontrib.tipseentracker.TipSeenTracker; /* compiled from: UA */ public class ComposerTopicControllerProvider extends AbstractAssistedProvider<ComposerTopicController> { public final <DataProvider extends ProvidesAttachments & ProvidesIsImplicitLocationSupported & ProvidesPredictedTopics & ProvidesSessionId & ProvidesTextWithEntities & ProvidesTopics & ProvidesConfiguration & ProvidesFacecastInfo & ProvidesLocationInfo & ProvidesPageData & ProvidesShareParams & ProvidesTaggedUsers & ProvidesTargetData & ProvidesMinutiae, Transaction extends ComposerTransaction & SetsTopics<Transaction>> ComposerTopicController<DataProvider, Transaction> m25861a(ViewStub viewStub, DataProvider dataProvider, Fragment fragment, int i, TipManager tipManager, ComposerMutator<Transaction> composerMutator) { return new ComposerTopicController(viewStub, (ProvidesAttachments) dataProvider, fragment, i, tipManager, composerMutator, (QeAccessor) QeInternalImplMethodAutoProvider.a(this), TipSeenTracker.b(this), TopicFeedsTestUtil.b(this), (ComposerTopicsDetectorProvider) getOnDemandAssistedProviderForStaticDi(ComposerTopicsDetectorProvider.class), IdBasedSingletonScopeProvider.b(this, 616), (ComposerTopicLoggerProvider) getOnDemandAssistedProviderForStaticDi(ComposerTopicLoggerProvider.class)); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
4ef2712490c05d36371d7df93419e5d49afe8d45
aca457909ef8c4eb989ba23919de508c490b074a
/DialerJADXDecompile/defpackage/aym.java
c09a48e23098a31ca2406d128efb69660463b365
[]
no_license
KHikami/ProjectFiCallingDeciphered
bfccc1e1ba5680d32a4337746de4b525f1911969
cc92bf6d4cad16559a2ecbc592503d37a182dee3
refs/heads/master
2021-01-12T17:50:59.643861
2016-12-08T01:20:34
2016-12-08T01:23:04
71,650,754
1
0
null
null
null
null
UTF-8
Java
false
false
157
java
package defpackage; /* compiled from: PG */ /* renamed from: aym */ public interface aym { void a(boolean z); void b(int i); void c(int i); }
[ "chu.rachelh@gmail.com" ]
chu.rachelh@gmail.com
8041be523b78b85f2c0892f5a9a9a5d80b651842
1c60628be211ca164690734e13577ebe2ec3bedc
/src/main/java/org/xmlet/htmlapi/EnumFormmethodButton.java
3279b685e11b1e55c0c863b2d848ef06b94397bd
[ "MIT" ]
permissive
xmlet/HtmlApi
5dd79e4ccd60368f775c22ac45f12f78e9eecf4c
b77d4a37e399935153bcd2371aa7b051f729821a
refs/heads/master
2021-05-13T17:49:48.112719
2018-11-12T12:44:41
2018-11-12T14:08:20
116,836,369
3
0
null
null
null
null
UTF-8
Java
false
false
464
java
package org.xmlet.htmlapi; import org.xmlet.xsdasm.classes.infrastructure.EnumInterface; public enum EnumFormmethodButton implements EnumInterface<String> { GET(String.valueOf("get")), POST(String.valueOf("post")), PUT(String.valueOf("put")), DELETE(String.valueOf("delete")); private final String value; private EnumFormmethodButton(String var3) { this.value = var3; } public String getValue() { return this.value; } }
[ "lois_duarte@msn.com" ]
lois_duarte@msn.com
21ed01bd0a5aab0da2d72aba964216265a936d58
99493975c02399f744b9856f684c30a316dece84
/Exemplo03CaminhoMinimo/src/teste/TestaCaminho.java
308bb3844726522ba7c4aaa7d55f2c427292d138
[]
no_license
viniciusdenovaes/Unip201IAnoturno
731a82fc0d9a11a8dba490b7cecc9fe9debfbf8e
d27dbf160f09d98e97b741f9605c12aecedb2c67
refs/heads/master
2021-02-11T12:04:54.515772
2020-05-19T01:02:02
2020-05-19T01:02:02
244,490,306
2
0
null
null
null
null
UTF-8
Java
false
false
473
java
package teste; import java.util.List; import java.util.Random; import dao.Dao; import entity.Caminho; import entity.Grafo; public class TestaCaminho { public static void main(String[] args) { Dao dao = new Dao("instances/mapa.inst"); Grafo g = dao.getInstance(); Caminho c = new Caminho(g, g.getVertice("A")); c.addVertice(g.getVertice("S")); c.addVertice(g.getVertice("F")); c.addVertice(g.getVertice("B")); System.out.println(c); } }
[ "viniciusdenovaes@gmail.com" ]
viniciusdenovaes@gmail.com
da1154bf9e1b423b20633b0a290e60ce8ac3a22b
71505060050f0a9f4e6478e1755280c2bbaccac9
/bridgewater-remittance/src/test/java/com/suidifu/bridgewater/controller/QueryApiRemittanceControllerTest.java
e428ca6980982f911e7340e4b390a9210cf5da3c
[]
no_license
soldiers1989/comsui
1f73003e7345946ef51af7d73ee3da593f6151ed
6f5c8a28fb1f58e0afc979a1dd5f2e43cbfa09cc
refs/heads/master
2020-03-27T19:25:33.560060
2018-07-06T06:21:05
2018-07-06T06:21:05
146,988,141
0
1
null
2018-09-01T10:11:31
2018-09-01T10:11:31
null
UTF-8
Java
false
false
6,580
java
package com.suidifu.bridgewater.controller; import com.demo2do.core.entity.Result; import com.demo2do.core.persistence.GenericDaoSupport; import com.demo2do.core.utils.JsonUtils; import com.suidifu.bridgewater.api.model.RemittanceResultBatchPackModel; import com.suidifu.bridgewater.api.model.RemittanceResultBatchQueryModel; import com.suidifu.bridgewater.controller.api.remittance.QueryApiRemittanceController; import com.zufangbao.sun.yunxin.entity.remittance.RemittanceApplication; import com.zufangbao.sun.yunxin.service.remittance.IRemittanceApplicationService; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.jdbc.Sql; import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.TransactionConfiguration; import javax.transaction.Transactional; import java.util.ArrayList; import java.util.List; import java.util.UUID; import static com.zufangbao.sun.zhonghang.v2.ZhonghangResponseMapSpec.VALID_REMITTANCD_NOT_CORRECT_PARAMS; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:/context/applicationContext-*.xml", "classpath:/local/applicationContext-*.xml", "classpath:/DispatcherServlet.xml" }) @Transactional() @TransactionConfiguration(defaultRollback = true) public class QueryApiRemittanceControllerTest extends AbstractTransactionalJUnit4SpringContextTests { @Autowired private QueryApiRemittanceController queryApiRemittanceController; // @Autowired // private CombineNoticeTask combineNoticeTask; @Autowired private GenericDaoSupport genericDaoSupport; @Autowired private IRemittanceApplicationService remittanceApplicationService; @Test @Sql("classpath:test/remittance/test_getRemittanceResultBy.sql") public void test_getRemittanceResult() { //这里测试uniqueId和oriRequestNo 与fn和requestNo值无关 String fn = "100011"; String requestNo = UUID.randomUUID().toString(); //可以设置唯恐的参数 String uniqueId = "FANT078"; String oriRequestNo = "9cde18e1-b926-4816-81bc-62b3cc0458fb"; RemittanceResultBatchQueryModel batchQueryModel = new RemittanceResultBatchQueryModel(); batchQueryModel.setOriRequestNo(oriRequestNo); batchQueryModel.setUniqueId(uniqueId); String uniqueId2 = "FANT200"; String oriRequestNo2 = "f9b542db-2c34-4cd2-848e-3021b2683b6d"; RemittanceResultBatchQueryModel batchQueryModel2 = new RemittanceResultBatchQueryModel(); batchQueryModel2.setOriRequestNo(oriRequestNo2); batchQueryModel2.setUniqueId(uniqueId2); List<RemittanceResultBatchQueryModel> batchQueryModelList = new ArrayList<>(); batchQueryModelList.add(batchQueryModel); batchQueryModelList.add(batchQueryModel2); String s = JsonUtils.toJsonString(batchQueryModelList); RemittanceResultBatchPackModel batchPackModel = new RemittanceResultBatchPackModel(); batchPackModel.setRequestNo(requestNo); batchPackModel.setFn(fn); batchPackModel.setRemittanceResultBatchQueryModels(s); String requestJson = JsonUtils.toJsonString(batchPackModel); System.out.println(requestJson); MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); String message = queryApiRemittanceController.batchQueryRemittanceResult(batchPackModel, response ,request); System.out.println(message); Result result = JsonUtils.parse(message, Result.class); Assert.assertEquals("成功!", result.getMessage()); } @Test public void testRemittance() { // CombineNoticeTask task = SpringContextUtil.getBean("combineNoticeTask"); // combineNoticeTask.execPushApplicationsToOutlier(); try { // String hql = "INSERT INTO t_remittance_application ( remittance_application_uuid, request_no, financial_contract_uuid, financial_contract_id, // financial_product_code, contract_unique_id, contract_no, planned_total_amount, actual_total_amount, auditor_name, audit_time, notify_url, plan_notify_number, // actual_notify_number, remittance_strategy, remark, transaction_recipient, execution_status, execution_remark, create_time, creator_name, ip, last_modified_time, // opposite_receive_date, remittance_id, total_count, actual_count, version_lock, check_request_no, check_status, check_retry_number, check_send_time, int_field_1, // int_field_2, int_field_3, string_field_1, string_field_2, string_field_3, decimal_field_1, decimal_field_2, decimal_field_3) VALUES // ('ad52a5f8-270d-4fdf-b62b-0116358b3a8e', '8b3b3abf-c4e1-4038-87fc-c89262era359', 'd2812bc5-5057-4a91-b3fd-9019506f0499', '38', 'G31700', // 'f16b31fa-5e1c-4079-8c2d-b9f9042661cf', '妹妹你大胆的往前走150', '3000.00', '3000.00', 'auditorName1', '2017-10-15 00:00:00', 'http://www.mocky // .io/v2/5185415ba171ea3a00704eed', '3', '0', '0', '交易备注', '1', '2', NULL, '2017-10-11 15:54:06', 't_test_zfb', '192.168.0.158', '2017-10-11 15:56:43', // '2017-10-11 23:54:31', 'wsha9d616a4-fd0d-44f7-a5eb-1e3f29b19e1b', '2', '2', '9c11d931-e316-4941-8ea3-5c5da2dd4762', 'f5e19ed7-2e8b-4060-886a-df36e79117e7', '1', // '3', '2017-10-11 15:54:06', '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL)"; RemittanceApplication remittanceApplication = new RemittanceApplication(); remittanceApplication.setRequestNo("8b3b3abf-c4e1-4038-87fc-c892620ba359"); remittanceApplication.setRemittanceApplicationUuid("ad52a5f8-270d-4fdf-b62b-0116358b3a8h"); remittanceApplication.setVersionLock("23"); // genericDaoSupport.executeHQL(hql, new HashedMap()); genericDaoSupport.save(remittanceApplication); } catch (Exception e) { e.printStackTrace(); System.out.println("message:" + "[" + e.getCause() + "]"); String s = VALID_REMITTANCD_NOT_CORRECT_PARAMS.keySet().stream().filter(param -> e.getCause().toString().contains(param)).findFirst().get(); String message = VALID_REMITTANCD_NOT_CORRECT_PARAMS.getOrDefault(VALID_REMITTANCD_NOT_CORRECT_PARAMS.keySet().stream().filter(param -> e.getCause() .toString().contains(param)).findFirst().get(), "system error"); boolean b = e.getCause().toString().contains("unique_key_request_no"); System.out.println(b); System.out.println("message =" + message); } } }
[ "mwf5310@163.com" ]
mwf5310@163.com
50ec02a49e333e0756798c8b57973bc153c622ab
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-14599-17-10-Single_Objective_GGA-WeightedSum/org/xwiki/job/AbstractJob_ESTest.java
76061fe610952947c1a1c7b6b826e9f610c91c3f
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
/* * This file was automatically generated by EvoSuite * Wed Apr 01 10:17:23 UTC 2020 */ package org.xwiki.job; 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(useVFS = true, useJEE = true) public class AbstractJob_ESTest extends AbstractJob_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
f24a1fa789f2a736a7980eea6120a9ff0b4cc0d7
3ebd14e15e940cd91014298bd8b1d3af69bc8e21
/polymer-pay-dao-parent/polymer-pay-back-dao/src/main/java/com/zyzf/polymer/pay/coupon/dao/PmsCouponProductDao.java
6d27127e2afaa2f9e832f96e9b13f63593068abb
[]
no_license
rjzfrj/polymerPay
50e680cf072703e1a30d9055b72e41c58ed971ae
a6019128e3caa20db0d4590136abd19070e86ee9
refs/heads/master
2021-05-12T05:19:25.107255
2018-04-21T04:37:22
2018-04-21T04:37:22
117,188,773
0
1
null
null
null
null
UTF-8
Java
false
false
239
java
package com.zyzf.polymer.pay.coupon.dao; import com.zyzf.polymer.pay.common.core.dao.BaseDao; import com.zyzf.polymer.pay.coupon.entity.PmsCouponProduct; public interface PmsCouponProductDao extends BaseDao<PmsCouponProduct>{ }
[ "1074166578@qq.com" ]
1074166578@qq.com
4100d03395ef5b30ba8219b86f7f07cccacd331d
d89633b645868f8c08b14060d83defe313f00554
/x-ray-services/src/main/java/com/abien/xray/business/hits/entity/Post.java
5a726c94533c56b67bb2887dd8e4976feb4efc72
[]
no_license
akachiw/x-ray
40b28c74bbfbb88640867824ec2c619483fda51f
eca7b418dc68b4da5c7cb94ff53bd9becf748160
refs/heads/master
2021-01-06T13:02:53.037726
2018-12-04T19:54:19
2018-12-04T19:54:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,996
java
package com.abien.xray.business.hits.entity; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; /** * * @author Adam Bien, blog.adam-bien.com */ @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) public class Post implements Comparable<Post> { private String uri; private String title; private long numberOfHits; public final static String EMPTY = "-"; public Post(String uri, String title, long numberOfHits) { this.uri = uri; this.title = title; this.numberOfHits = numberOfHits; } public Post(String uri, long numberOfHits) { this.uri = uri; this.numberOfHits = numberOfHits; } public Post(String uri, String numberOfHits) { this(uri, Long.parseLong(numberOfHits)); } public Post() { /* for JAXB*/ } public long getNumberOfHits() { return numberOfHits; } public String getTitle() { return title; } public String getShortenedTitle(int totalLength) { if (title == null) { return null; } int length = title.length(); if (length < totalLength) { return title; } String shortened = title.substring(0, totalLength - 5); return shortened + "[...]"; } public boolean isTitleEmpty() { return (title == null || EMPTY.equals(title)); } public String getUri() { return uri; } public void setTitle(String title) { this.title = title; } @Override public String toString() { return "Post{" + "uri=" + uri + "title=" + title + "numberOfHits=" + numberOfHits + '}'; } @Override public int compareTo(Post other) { if (numberOfHits == other.numberOfHits) { return 0; } if (numberOfHits > other.numberOfHits) { return 1; } return -1; } }
[ "abien@adam-bien.com" ]
abien@adam-bien.com
a21e26f48482112fb5ea5832f12a788d410de558
3604bcb4c8b815398741a351e8ba740be52cef5c
/app/src/main/java/com/mx/booboo/mvp/Bean/JokeTextBean.java
d5658e9b057c5a5d96b2bffde4e94afb942f2dc9
[]
no_license
Dreamer206602/RxJava_Retrofit_MVP_Demo
9b0c6f624f92f2a71e39013c13413cb803e65a12
f366a7e7d7f382757cf008143faaea058e190ef0
refs/heads/master
2020-04-03T09:55:37.724348
2016-06-19T23:28:03
2016-06-19T23:28:03
61,272,005
1
0
null
null
null
null
UTF-8
Java
false
false
2,507
java
package com.mx.booboo.mvp.Bean; import java.util.List; /** * Created by hww on 2016/6/17. */ public class JokeTextBean { private String showapi_res_code; private String showapi_res_error; private JokeText showapi_res_body; public String getShowapi_res_error() { return showapi_res_error; } public void setShowapi_res_error(String showapi_res_error) { this.showapi_res_error = showapi_res_error; } public JokeText getShowapi_res_body() { return showapi_res_body; } public void setShowapi_res_body(JokeText showapi_res_body) { this.showapi_res_body = showapi_res_body; } public String getShowapi_res_code() { return showapi_res_code; } public void setShowapi_res_code(String showapi_res_code) { this.showapi_res_code = showapi_res_code; } public class JokeText { private String allNum; private String allPages; private List<JokeTextInfo> contentlist; public List<JokeTextInfo> getContentlist() { return contentlist; } public void setContentlist(List<JokeTextInfo> contentlist) { this.contentlist = contentlist; } public String getAllPages() { return allPages; } public void setAllPages(String allPages) { this.allPages = allPages; } public String getAllNum() { return allNum; } public void setAllNum(String allNum) { this.allNum = allNum; } } public class JokeTextInfo { private String ct; private String id; private String text; private String title; private String type; public String getType() { return type; } public void setType(String type) { this.type = type; } public String getCt() { return ct; } public void setCt(String ct) { this.ct = ct; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getText() { return text; } public void setText(String text) { this.text = text; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } } }
[ "boobooMX@163.com" ]
boobooMX@163.com
d556f4a2616dcc5eb5a09a2418f9ea9a9420ce58
64794b4ea0b5a2c5c98b8bc7ecfbeb3bbd6686ff
/goods/src/main/java/com/lanjing/goods/controller/app/EvaluationController.java
49e731b0406d74abcc885f68dbc7635d57ee1bd7
[]
no_license
chinaares/agc_server
a31ba3bee0df5748a0bdf6533cae7cd887cfd7c3
a2b64007d5259d8426b8b21965a97a475010f5fa
refs/heads/master
2023-02-10T08:03:16.617788
2021-01-04T09:43:42
2021-01-04T09:46:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,850
java
package com.lanjing.goods.controller.app; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.jester.util.utils.Result; import com.lanjing.goods.controller.BaseController; import com.lanjing.goods.dao.ShopOrderMapper; import com.lanjing.goods.model.Evaluation; import com.lanjing.goods.model.Goods; import com.lanjing.goods.model.MallShop; import com.lanjing.goods.model.ShopOrder; import com.lanjing.goods.service.EvaluationService; import com.lanjing.goods.service.GoodsService; import com.lanjing.goods.service.MallShopService; import com.lanjing.goods.util.GetInformation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @RestController @Transactional public class EvaluationController extends BaseController { @Autowired private EvaluationService evaluationService; @Resource private ShopOrderMapper orderMapper; @Autowired private GetInformation getInformation; @Autowired private GoodsService goodsService; @Autowired private MallShopService mallShopService; @RequestMapping("/app/orders/queryevaluation") public Object queryevaluation(@RequestBody JSONObject param){ int goodsId = param.getIntValue("goodsId"); int pageNum = param.getIntValue("pageNum"); int pageSize = param.getIntValue("pageSize"); List<Evaluation> evaluations = evaluationService.queryByGoodsidPage(goodsId,pageSize*(pageNum-1),pageSize); List<Map<String,Object>> jsonList = new ArrayList<>(); java.text.NumberFormat nf = java.text.NumberFormat.getInstance(); nf.setMaximumFractionDigits(1); for (Evaluation evaluation : evaluations){ double svg = (evaluation.getGoodsevaluation()+evaluation.getShopevaluation()+evaluation.getLogisticsevaluation())/3; JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(evaluation)); jsonObject.put("svg",nf.format(svg)); jsonObject.put("imgs",JSONArray.parseArray(evaluation.getImgs())); jsonList.add(jsonObject); } int count = evaluationService.selectByGoodsidcount(goodsId); Map map = new HashMap(); map.put("pageNum",pageNum); map.put("pageSize",pageSize); map.put("evaluations",jsonList); map.put("pages",count%pageSize == 0?count/pageSize:count/pageSize + 1); map.put("count",count); return Result.success(map); } }
[ "1044508403@qq.com" ]
1044508403@qq.com
1a36f4257b09d7912d7639b7c5b4ab75f60dc06e
84e064c973c0cc0d23ce7d491d5b047314fa53e5
/latest9.0/bj/net/sf/saxon/xqj/SaxonXQPreparedExpression.java
f232716b47b78bb4994ba7f5267606e7ee6d8463
[]
no_license
orbeon/saxon-he
83fedc08151405b5226839115df609375a183446
250c5839e31eec97c90c5c942ee2753117d5aa02
refs/heads/master
2022-12-30T03:30:31.383330
2020-10-16T15:21:05
2020-10-16T15:21:05
304,712,257
1
1
null
null
null
null
UTF-8
Java
false
false
7,513
java
package net.sf.saxon.xqj; import net.sf.saxon.expr.Expression; import net.sf.saxon.instruct.GlobalParam; import net.sf.saxon.instruct.GlobalVariable; import net.sf.saxon.javax.xml.xquery.*; import net.sf.saxon.om.SequenceIterator; import net.sf.saxon.om.StructuredQName; import net.sf.saxon.query.DynamicQueryContext; import net.sf.saxon.query.XQueryExpression; import net.sf.saxon.sort.IntHashSet; import net.sf.saxon.sort.IntIterator; import net.sf.saxon.trans.XPathException; import net.sf.saxon.type.ItemType; import net.sf.saxon.value.SequenceExtent; import net.sf.saxon.value.SequenceType; import net.sf.saxon.value.Value; import javax.xml.namespace.QName; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Set; /** * Saxon implementation of the XQJ interface XQPreparedExpression. This represents a compiled XQuery * expression, together with the dynamic context for its evaluation. Note that this means the object * should not be used in more than one thread concurrently. * <p> * Note that an expression is scrollable or not depending on the scrollability property of the XQConnection * that was used to compile this expression (at the time it was compiled). If the expression is scrollable then * its results are delivered in an XQSequence that supports scrolling backwards as well as forwards. * <p> * For full Javadoc details, see the XQJ interface specification. */ public class SaxonXQPreparedExpression extends SaxonXQDynamicContext implements XQPreparedExpression { private XQueryExpression expression; private DynamicQueryContext context; private boolean closed; private boolean scrollable; protected SaxonXQPreparedExpression(SaxonXQConnection connection, XQueryExpression expression, DynamicQueryContext context) throws XQException { this.connection = connection; this.expression = expression; this.context = context; scrollable = connection.getStaticContext().getScrollability() == XQConstants.SCROLLTYPE_SCROLLABLE; } protected DynamicQueryContext getDynamicContext() { return context; } protected void checkNotClosed() throws XQException { if (isClosed()) { throw new XQException("Expression has been closed"); } } protected SaxonXQDataFactory getDataFactory() throws XQException { if (connection.isClosed()) { close(); } checkNotClosed(); return connection; } public void cancel() throws XQException { checkNotClosed(); } public void close() { closed = true; } public XQResultSequence executeQuery() throws XQException { checkNotClosed(); try { SequenceIterator iter = expression.iterator(context); if (scrollable) { Value value = Value.asValue(SequenceExtent.makeSequenceExtent(iter)); return new SaxonXQSequence(value, connection.getConfiguration(), connection); } else { return new SaxonXQForwardSequence(iter, connection); } } catch (XPathException de) { XQException xqe = new XQException(de.getMessage()); xqe.initCause(de); throw xqe; } } public QName[] getAllExternalVariables() throws XQException { checkNotClosed(); HashMap vars = expression.getExecutable().getCompiledGlobalVariables(); if (vars == null || vars.isEmpty()) { return EMPTY_QNAME_ARRAY; } else { HashSet params = new HashSet(vars.size()); Iterator iter = vars.values().iterator(); while (iter.hasNext()) { GlobalVariable var = (GlobalVariable)iter.next(); if (var instanceof GlobalParam) { params.add(var.getVariableQName()); }; } QName[] qnames = new QName[params.size()]; int q=0; for (Iterator it=params.iterator(); it.hasNext();) { StructuredQName name = (StructuredQName)it.next(); qnames[q++] = new QName(name.getNamespaceURI(), name.getLocalName(), name.getPrefix()); } return qnames; } } private static QName[] EMPTY_QNAME_ARRAY = new QName[0]; public QName[] getAllUnboundExternalVariables() throws XQException { checkNotClosed(); Set boundParameters = getDynamicContext().getParameters().keySet(); IntHashSet unbound = new IntHashSet(boundParameters.size()); QName[] all = getAllExternalVariables(); for (int i=0; i<all.length; i++) { String clark = "{" + all[i].getNamespaceURI() + "}" + all[i].getLocalPart(); if (!boundParameters.contains(clark)) { unbound.add(i); } } QName[] unboundq = new QName[unbound.size()]; int c = 0; IntIterator iter = unbound.iterator(); while (iter.hasNext()) { int x = iter.next(); unboundq[c++] = all[x]; } return unboundq; } public XQStaticContext getStaticContext() throws XQException { return new SaxonXQExpressionContext(expression); } public XQSequenceType getStaticResultType() throws XQException { checkNotClosed(); Expression exp = expression.getExpression(); // unwrap two layers! ItemType itemType = exp.getItemType(connection.getConfiguration().getTypeHierarchy()); int cardinality = exp.getCardinality(); SequenceType staticType = SequenceType.makeSequenceType(itemType, cardinality); return new SaxonXQSequenceType(staticType, connection.getConfiguration()); } public XQSequenceType getStaticVariableType(QName name) throws XQException { checkNotClosed(); StructuredQName qn = new StructuredQName( name.getPrefix(), name.getNamespaceURI(), name.getLocalPart()); HashMap vars = expression.getExecutable().getCompiledGlobalVariables(); GlobalVariable var = (vars == null ? null : (GlobalVariable)vars.get(qn)); if (var == null) { throw new XQException("Variable " + name + " is not declared"); } return new SaxonXQSequenceType(var.getRequiredType(), connection.getConfiguration()); } public boolean isClosed() { if (connection.isClosed()) { close(); } return closed; } } // // The contents of this file are subject to the Mozilla Public License Version 1.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.mozilla.org/MPL/ // // Software distributed under the License is distributed on an "AS IS" basis, // WITHOUT WARRANTY OF ANY KIND, either express or implied. // See the License for the specific language governing rights and limitations under the License. // // The Original Code is: all this file. // // The Initial Developer of the Original Code is Michael H. Kay. // // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved. // // Contributor(s): //
[ "mike@saxonica.com" ]
mike@saxonica.com
a57965ad488b270434364178c1a26cca53aaf8b1
18c47122b5de0f192035a368609aacf211bb06b3
/src/main/java/com/example/carddeck/PinochleDeck.java
f3e4d5090c5412b15c4b6424f815cd590c8b2c95
[]
no_license
tresnichole/card-activity
dc1676ca90e7e004a4607c5a79d8c5f9a7fff018
5997c54a95673284827e3e04278271ccf220c053
refs/heads/master
2023-08-15T08:30:34.999254
2021-09-17T02:39:56
2021-09-17T02:39:56
407,381,044
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package com.example.carddeck; public class PinochleDeck extends AbstractDeck{ @Override public void cut(int index) { } @Override public Card deal() { return null; } @Override public void newOrder(Deck deck) { } @Override public int search(Card card) { return 0; } @Override public int size() { return 0; } @Override public Card turnOver() { return null; } }
[ "none" ]
none
b33b97ead4a2cc89f500dde7d872cb48000343cf
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/org/mp4parser/muxer/builder/SyncSampleIntersectFinderImplTest.java
e1ece8e9b900566fc33f609897fe58879b5ad287
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
4,274
java
package org.mp4parser.muxer.builder; import java.io.IOException; import org.junit.Assert; import org.junit.Test; import org.mp4parser.muxer.InTestMovieCreator; import org.mp4parser.muxer.Movie; import org.mp4parser.muxer.Track; public class SyncSampleIntersectFinderImplTest { @Test public void testFindSameFrameRate() throws IOException { Movie m = InTestMovieCreator.createMovieOnlyVideo("/BBB_qpfile_10sec/BBB_fixedres_B_180x320_150.mp4", "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_200.mp4"); SyncSampleIntersectFinderImpl syncSampleIntersectFinder = new SyncSampleIntersectFinderImpl(m, null, (-1)); long[] fragmentStartSamplesRef = null; Assert.assertTrue(((m.getTracks().size()) > 1)); for (Track track : m.getTracks()) { long[] fragmentStartSamples = syncSampleIntersectFinder.sampleNumbers(track); Assert.assertNotNull(fragmentStartSamples); if (fragmentStartSamplesRef == null) { fragmentStartSamplesRef = fragmentStartSamples; } else { Assert.assertArrayEquals(fragmentStartSamplesRef, fragmentStartSamples); } } } @Test public void testGetIndicesToBeRemoved() { SyncSampleIntersectFinderImpl syncSampleIntersectFinder = new SyncSampleIntersectFinderImpl(null, null, (-1)); long[] a_sample = new long[]{ 20, 40, 48, 60, 80, 82 }; long[] a_times = new long[]{ 10, 20, 24, 30, 40, 41 }; long[] b_1 = new long[]{ 10, 20, 26, 30, 40 }; long[] b_2 = new long[]{ 10, 20, 25, 30, 40 }; long[] a_2 = syncSampleIntersectFinder.getCommonIndices(a_sample, a_times, 10, b_1, b_2); // long[] a_sample = new long[]{20, 40, 48, 60, 80, 82, 100}; // long[] a_times = new long[]{10, 20, 24, 30, 40, 41, 80, 81}; // long[] b_1 = new long[]{10, 20, 26, 30, 40, 80}; // long[] b_2 = new long[]{10, 20, 25, 30, 40, 80}; // long[] a_2 = SyncSampleIntersectFinderImpl.getCommonIndices(a_sample, a_times, 10, b_1, b_2); Assert.assertArrayEquals(new long[]{ 20, 40, 60, 80 }, a_2); } @Test public void testGetIndicesToBeRemovedMinTwoSecondsFragments() { SyncSampleIntersectFinderImpl syncSampleIntersectFinder = new SyncSampleIntersectFinderImpl(null, null, 2); long[] a_sample = new long[]{ 20, 40, 48, 60, 80, 82, 90, 100 }; long[] a_times = new long[]{ 10, 20, 24, 30, 60, 61, 80, 81 }; long[] b_1 = new long[]{ 10, 20, 26, 30, 40, 80, 81, 100 }; long[] b_2 = new long[]{ 10, 20, 25, 30, 40, 80, 90, 100 }; long[] a_2 = syncSampleIntersectFinder.getCommonIndices(a_sample, a_times, 10, b_1, b_2); Assert.assertArrayEquals(new long[]{ 20, 60, 90 }, a_2); } @Test public void testFindDifferentFrameRates() throws IOException { /* Movie m = createMovieOnlyVideo( "/working_now/FBW_fixedres_B_640x360_200.mp4", "/working_now/FBW_fixedres_B_640x360_400.mp4", "/working_now/FBW_fixedres_B_640x360_800.mp4", "/working_now/FBW_fixedres_B_640x360_1200.mp4", "/working_now/FBW_fixedres_B_640x360_2400.mp4" ); */ Movie m = InTestMovieCreator.createMovieOnlyVideo("/BBB_qpfile_10sec/BBB_fixedres_B_180x320_80.mp4", "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_100.mp4", "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_120.mp4", "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_150.mp4", "/BBB_qpfile_10sec/BBB_fixedres_B_180x320_200.mp4"); SyncSampleIntersectFinderImpl syncSampleIntersectFinder = new SyncSampleIntersectFinderImpl(m, null, (-1)); long[] fragmentStartSamplesRef = null; for (Track track : m.getTracks()) { long[] fragmentStartSamples = syncSampleIntersectFinder.sampleNumbers(track); Assert.assertNotNull(fragmentStartSamples); if (fragmentStartSamplesRef == null) { fragmentStartSamplesRef = fragmentStartSamples; } else { // this is all I can do here now. // we should verify that all samples in the array are at the same times. Assert.assertEquals(fragmentStartSamplesRef.length, fragmentStartSamples.length); } } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
08415355e01bd9bacc70831563955838ba16456b
76fb910a2d7d8d5f43366a43d4fb6b5427d18325
/d2k4_source/dtcheng/ncsa/d2k/modules/projects/dtcheng/matrix/MatrixNumCols.java
3ee42ee1c896e6888965f4683ce07bdd9fa30120
[]
no_license
EISALab/IMOGAgroundwater
2bf8342a89753c0fefa95a45809cdc376b307f4a
6bf1bd74e7fbc59082fec127b4b6b1537076c180
refs/heads/master
2016-09-06T04:49:14.305434
2013-06-12T16:22:52
2013-06-12T16:22:52
10,646,593
1
0
null
null
null
null
UTF-8
Java
false
false
1,499
java
package ncsa.d2k.modules.projects.dtcheng.matrix; import ncsa.d2k.core.modules.*; import Jama.Matrix; public class MatrixNumCols extends ComputeModule { public String getModuleName() { return "MatrixNumCols"; } public String getModuleInfo() { return "This module returns the number of cols in the matrix. "; } public String getInputName(int i) { switch (i) { case 0: return "Matrix"; default: return "Error! No such input. "; } } public String getInputInfo(int i) { switch (i) { case 0: return "Matrix"; default: return "Error! No such input. "; } } public String[] getInputTypes() { String[] types = { "ncsa.d2k.modules.projects.dtcheng.matrix.MultiFormatMatrix" }; return types; } public String getOutputName(int i) { switch (i) { case 0: return "NumberOfCols"; default: return "Error! No such output. "; } } public String getOutputInfo(int i) { switch (i) { case 0: return "NumberOfCols"; default: return "Error! No such output. "; } } public String[] getOutputTypes() { String[] types = { "java.lang.Integer"}; return types; } public void doit() { MultiFormatMatrix X = (MultiFormatMatrix)this.pullInput(0); this.pushOutput(new Integer(X.getDimensions()[1]), 0); } }
[ "krishjadhwani@gmail.com" ]
krishjadhwani@gmail.com
a9707171310dddbde1b534c407e5fe99e3d78c44
52c36ce3a9d25073bdbe002757f08a267abb91c6
/src/main/java/com/alipay/api/request/AlipayOpenPublicPersonalizedMenuDeleteRequest.java
5992ee23c3cd7af161be0a564b78e9b9dd4c4332
[ "Apache-2.0" ]
permissive
itc7/alipay-sdk-java-all
d2f2f2403f3c9c7122baa9e438ebd2932935afec
c220e02cbcdda5180b76d9da129147e5b38dcf17
refs/heads/master
2022-08-28T08:03:08.497774
2020-05-27T10:16:10
2020-05-27T10:16:10
267,271,062
0
0
Apache-2.0
2020-05-27T09:02:04
2020-05-27T09:02:04
null
UTF-8
Java
false
false
3,206
java
package com.alipay.api.request; import com.alipay.api.domain.AlipayOpenPublicPersonalizedMenuDeleteModel; import java.util.Map; import com.alipay.api.AlipayRequest; import com.alipay.api.internal.util.AlipayHashMap; import com.alipay.api.response.AlipayOpenPublicPersonalizedMenuDeleteResponse; import com.alipay.api.AlipayObject; /** * ALIPAY API: alipay.open.public.personalized.menu.delete request * * @author auto create * @since 1.0, 2020-04-07 16:58:40 */ public class AlipayOpenPublicPersonalizedMenuDeleteRequest implements AlipayRequest<AlipayOpenPublicPersonalizedMenuDeleteResponse> { private AlipayHashMap udfParams; // add user-defined text parameters private String apiVersion="1.0"; /** * 个性化菜单删除 */ private String bizContent; public void setBizContent(String bizContent) { this.bizContent = bizContent; } public String getBizContent() { return this.bizContent; } private String terminalType; private String terminalInfo; private String prodCode; private String notifyUrl; private String returnUrl; private boolean needEncrypt=false; private AlipayObject bizModel=null; public String getNotifyUrl() { return this.notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getReturnUrl() { return this.returnUrl; } public void setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; } public String getApiVersion() { return this.apiVersion; } public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public void setTerminalType(String terminalType){ this.terminalType=terminalType; } public String getTerminalType(){ return this.terminalType; } public void setTerminalInfo(String terminalInfo){ this.terminalInfo=terminalInfo; } public String getTerminalInfo(){ return this.terminalInfo; } public void setProdCode(String prodCode) { this.prodCode=prodCode; } public String getProdCode() { return this.prodCode; } public String getApiMethodName() { return "alipay.open.public.personalized.menu.delete"; } public Map<String, String> getTextParams() { AlipayHashMap txtParams = new AlipayHashMap(); txtParams.put("biz_content", this.bizContent); if(udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new AlipayHashMap(); } this.udfParams.put(key, value); } public Class<AlipayOpenPublicPersonalizedMenuDeleteResponse> getResponseClass() { return AlipayOpenPublicPersonalizedMenuDeleteResponse.class; } public boolean isNeedEncrypt() { return this.needEncrypt; } public void setNeedEncrypt(boolean needEncrypt) { this.needEncrypt=needEncrypt; } public AlipayObject getBizModel() { return this.bizModel; } public void setBizModel(AlipayObject bizModel) { this.bizModel=bizModel; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
5f0679f54b7c8796a6b6aa986110ec944031b6d0
272274a37c6f4ea031dea803cf8fc8ee689ac471
/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeJUnit4ClassRunner.java
59d57112750fc0f5176d44d3ea320dde5457420f
[ "BSD-3-Clause" ]
permissive
zjh19861014/chromium
6db9890f3b2981df3e8a0a56883adc93f6761fd5
8d48b756239d336d8724f8f593a7b22959c506b4
refs/heads/master
2023-01-09T06:34:30.549622
2019-04-13T06:55:11
2019-04-13T06:55:11
181,134,794
1
0
NOASSERTION
2019-04-13T07:12:06
2019-04-13T07:12:06
null
UTF-8
Java
false
false
7,575
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.test; import android.content.Context; import android.os.Build; import android.support.test.InstrumentationRegistry; import android.text.TextUtils; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GoogleApiAvailability; import com.google.vr.ndk.base.DaydreamApi; import com.google.vr.ndk.base.GvrApi; import org.junit.rules.TestRule; import org.junit.runners.model.InitializationError; import org.chromium.base.CommandLine; import org.chromium.base.ContextUtils; import org.chromium.base.StrictModeContext; import org.chromium.base.test.BaseTestResult.PreTestHook; import org.chromium.base.test.util.RestrictionSkipCheck; import org.chromium.base.test.util.SkipCheck; import org.chromium.chrome.browser.ChromeVersionInfo; import org.chromium.chrome.test.util.ChromeRestriction; import org.chromium.chrome.test.util.browser.Features; import org.chromium.content_public.browser.test.ContentJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.policy.test.annotations.Policies; import java.util.List; import java.util.concurrent.ExecutionException; /** * A custom runner for //chrome JUnit4 tests. */ public class ChromeJUnit4ClassRunner extends ContentJUnit4ClassRunner { /** * Create a ChromeJUnit4ClassRunner to run {@code klass} and initialize values * * @throws InitializationError if the test class malformed */ public ChromeJUnit4ClassRunner(final Class<?> klass) throws InitializationError { super(klass); } @Override protected List<SkipCheck> getSkipChecks() { return addToList(super.getSkipChecks(), new ChromeRestrictionSkipCheck(InstrumentationRegistry.getTargetContext())); } @Override protected List<PreTestHook> getPreTestHooks() { return addToList(super.getPreTestHooks(), Policies.getRegistrationHook()); } @Override protected List<TestRule> getDefaultTestRules() { return addToList(super.getDefaultTestRules(), new Features.InstrumentationProcessor()); } private static class ChromeRestrictionSkipCheck extends RestrictionSkipCheck { public ChromeRestrictionSkipCheck(Context targetContext) { super(targetContext); } private boolean isDaydreamReady() { // We normally check things like this through VrShellDelegate. However, with the // introduction of Dynamic Feature Modules (DFMs), we have tests that expect the VR // DFM to not be loaded. Using the normal approach (VrModuleProvider.getDelegate()) // causes the DFM to be loaded, which we don't want done before the test starts. So, // access the Daydream API directly. return DaydreamApi.isDaydreamReadyPlatform(ContextUtils.getApplicationContext()); } private boolean isDaydreamViewPaired() { if (!isDaydreamReady()) { return false; } // We need to ensure that the DaydreamApi instance is created on the main thread. DaydreamApi daydreamApi; try { daydreamApi = TestThreadUtils.runOnUiThreadBlocking( () -> { return DaydreamApi.create(ContextUtils.getApplicationContext()); }); } catch (ExecutionException e) { return false; } int viewerType; // Getting the current viewer type may result in a disk write in VrCore, so allow that // to prevent StrictMode errors. try (StrictModeContext smc = StrictModeContext.allowDiskWrites()) { viewerType = daydreamApi.getCurrentViewerType(); } daydreamApi.close(); return viewerType == GvrApi.ViewerType.DAYDREAM; } private boolean isOnStandaloneVrDevice() { return Build.DEVICE.equals("vega"); } private boolean isVrSettingsServiceEnabled() { // We can't directly check whether the VR settings service is enabled since we don't // have permission to read the VrCore settings file. Instead, pass a flag. return CommandLine.getInstance().hasSwitch("vr-settings-service-enabled"); } @Override protected boolean restrictionApplies(String restriction) { if (TextUtils.equals( restriction, ChromeRestriction.RESTRICTION_TYPE_GOOGLE_PLAY_SERVICES) && (ConnectionResult.SUCCESS != GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable( getTargetContext()))) { return true; } if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_OFFICIAL_BUILD) && (!ChromeVersionInfo.isOfficialBuild())) { return true; } if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_DEVICE_DAYDREAM) || TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_DEVICE_NON_DAYDREAM)) { boolean isDaydream = isDaydreamReady(); if (TextUtils.equals( restriction, ChromeRestriction.RESTRICTION_TYPE_DEVICE_DAYDREAM) && !isDaydream) { return true; } else if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_DEVICE_NON_DAYDREAM) && isDaydream) { return true; } } if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM) || TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_VIEWER_NON_DAYDREAM)) { boolean daydreamViewPaired = isDaydreamViewPaired(); if (TextUtils.equals( restriction, ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM) && (!daydreamViewPaired || isOnStandaloneVrDevice())) { return true; } else if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_VIEWER_NON_DAYDREAM) && daydreamViewPaired) { return true; } } if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_STANDALONE)) { return !isOnStandaloneVrDevice(); } if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE)) { // Standalone devices are considered to have Daydream View paired. return !isDaydreamViewPaired(); } if (TextUtils.equals(restriction, ChromeRestriction.RESTRICTION_TYPE_SVR)) { return isOnStandaloneVrDevice(); } if (TextUtils.equals( restriction, ChromeRestriction.RESTRICTION_TYPE_VR_SETTINGS_SERVICE)) { return !isVrSettingsServiceEnabled(); } return false; } } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
8de8ffbd6699a062c13aa49f9ebd47713b1cf511
1074c97cdd65d38c8c6ec73bfa40fb9303337468
/rda0105-agl-aus-java-a43926f304e3/xms-delivery/src/main/java/com/gms/delivery/ups/service/rest/transit/TimeInTransitService.java
f01d41aa63251b3fb8a76db3877431f1a501294c
[]
no_license
gahlawat4u/repoName
0361859254766c371068e31ff7be94025c3e5ca8
523cf7d30018b7783e90db98e386245edad34cae
refs/heads/master
2020-05-17T01:26:00.968575
2019-04-29T06:11:52
2019-04-29T06:11:52
183,420,568
0
0
null
null
null
null
UTF-8
Java
false
false
3,854
java
package com.gms.delivery.ups.service.rest.transit; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.methods.RequestEntity; import org.apache.commons.httpclient.methods.StringRequestEntity; import com.gms.delivery.ups.service.rest.transit.response.pojo.TimeInTransitResponseVO; public class TimeInTransitService { /** * @param args */ public TimeInTransitResponseVO getTransitTime(TimeInTransitVO timeInTransitVO) { PostMethod post = new PostMethod("https://wwwcie.ups.com/rest/TimeInTransit"); HttpClient client = new HttpClient(); TimeInTransitResponseVO timeInTransitResponseVO = null; try{ // Security security = new Security(); // UsernameToken usernameToken = new UsernameToken(); // usernameToken.setUsername("inayatAhmed"); // usernameToken.setPassword("indic@4Soft"); // security.setUsernameToken(usernameToken); // // UPSServiceAccessToken uPSServiceAccessToken = new UPSServiceAccessToken(); // uPSServiceAccessToken.setAccessLicenseNumber("4D1E6848A188D418"); // security.setUPSServiceAccessToken(uPSServiceAccessToken); // timeInTransitVO.setSecurity(security); // // // TimeInTransitRequest timeInTransitRequest = new TimeInTransitRequest(); // // Request request = new Request(); // TransactionReference transactionReference = new TransactionReference(); // transactionReference.setCustomerContext(""); // transactionReference.setTransactionIdentifier(""); // // request.setTransactionReference(transactionReference); // request.setRequestOption("TNT"); // // timeInTransitRequest.setRequest(request); // // ShipFrom shipFrom = new ShipFrom(); // Address addressFrom= new Address(); // addressFrom.setCountryCode("US"); // addressFrom.setPostalCode("30076"); // addressFrom.setStateProvinceCode("GA"); // // shipFrom.setAddress(addressFrom); // // timeInTransitRequest.setShipFrom(shipFrom); // // // ShipTo shipTo = new ShipTo(); // Address addressTo= new Address(); // addressTo.setCountryCode("US"); // addressTo.setPostalCode("30076"); // addressTo.setStateProvinceCode("GA"); // shipTo.setAddress(addressTo); // // timeInTransitRequest.setShipTo(shipTo); // // Pickup pickup = new Pickup(); // pickup.setDate("20170121"); // // timeInTransitRequest.setPickup(pickup); // // ShipmentWeight shipmentWeight = new ShipmentWeight(); // shipmentWeight.setWeight("10"); // // UnitOfMeasurement unitOfMeasurement = new UnitOfMeasurement(); // unitOfMeasurement.setCode("KGS"); // unitOfMeasurement.setDescription("Kilograms"); // // shipmentWeight.setUnitOfMeasurement(unitOfMeasurement); // // timeInTransitRequest.setShipmentWeight(shipmentWeight); // // timeInTransitRequest.setMaximumListSize("1"); // // timeInTransitVO.setTimeInTransitRequest(timeInTransitRequest); String json = GsonContextLoader.getGsonContext().toJson(timeInTransitVO); System.out.println(" REQUEST JSON :: "+json); RequestEntity entity = new StringRequestEntity(json, "application/json", null); post.setRequestEntity(entity); // post.setRequestBody(json); int status = client.executeMethod(post); System.out.println(" status :: "+status); //System.out.println(post.getResponseBodyAsString()); String outPut= post.getResponseBodyAsString(); timeInTransitResponseVO = GsonContextLoader.getGsonContext().fromJson(outPut, TimeInTransitResponseVO.class); post.releaseConnection(); }catch (Exception e) { System.out.println("Exception "+e); } return timeInTransitResponseVO; } }
[ "sachin.gahlawat19@gmail.com" ]
sachin.gahlawat19@gmail.com
5c9114a191e18a5be4dba9a61b3713fb5e0cc286
50a43f8981ab77794936be2f9f85b19ca1a74a4c
/src06/main/java/bitcamp/java106/pms/dao/OrderDao.java
b7291ea6247631cdb09533d01bd46d377fdb6fd9
[]
no_license
SangKyeongLee/testproject
f7bc235b741fca71447dd9e8ffc71bd84b7f13df
6a4062306e39ca1ba5b1214445e7f942ebb9664c
refs/heads/master
2020-03-22T16:52:06.247116
2018-08-16T04:08:49
2018-08-16T04:08:49
140,357,255
0
0
null
null
null
null
UTF-8
Java
false
false
460
java
package bitcamp.java106.pms.dao; import java.util.List; import java.util.Map; import bitcamp.java106.pms.domain.Odnwk; import bitcamp.java106.pms.domain.Order; public interface OrderDao { Order selectOne(int no); int insert(Order order); int update(Order order); List<Order> selectList(int no); //관리자 전용 int adUpdate(Order order); Order adGet(int no); Object adList(int no); }
[ "sangkyeong.lee93@gmail.com" ]
sangkyeong.lee93@gmail.com
71ea6f1a6518e0822dd0ecff7fea2f32d68e8405
e92a0a22c637db8235d771c924b9c672e0c77d3e
/src/main/java/com/playernguyen/weaponist/asset/ammunition/DefaultItemMetadata.java
550d014d0adc392d578937c1efa931b267d0f450
[]
no_license
PlayerNguyen/Weaponist
cca932c881203c568594365143f61b4558ebbd52
277a99cdf20847b609232a5ea55c3d2f9cc76582
refs/heads/master
2023-01-20T10:46:15.979981
2020-11-29T23:50:20
2020-11-29T23:50:20
288,635,332
0
0
null
null
null
null
UTF-8
Java
false
false
1,796
java
package com.playernguyen.weaponist.asset.ammunition; import com.playernguyen.weaponist.asset.ItemMetadata; import com.playernguyen.weaponist.asset.ItemType; import org.bukkit.ChatColor; import org.bukkit.Material; import java.util.ArrayList; import java.util.List; public class DefaultItemMetadata implements ItemMetadata { private final String id; private final String displayName; private final List<String> description; private final Material material; private final int maxStackSize; private final ItemType type; public DefaultItemMetadata(String id, String displayName, List<String> description, Material material, int maxStackSize, ItemType type) { this.id = id; this.displayName = ChatColor.translateAlternateColorCodes('&', displayName); this.material = material; this.maxStackSize = maxStackSize; this.type = type; List<String> des = new ArrayList<>(); for (String e : description) { des.add(ChatColor.translateAlternateColorCodes('&', e)); } this.description = des; } @Override public String getId() { return id; } @Override public String getGlobalId() { return type.getPrefix() + "_" + getId(); } @Override public String getDisplayName() { return this.displayName; } @Override public List<String> getDescription() { return this.description; } @Override public Material getMaterial() { return this.material; } @Override public int getMaxStackSize() { return this.maxStackSize; } }
[ "daudaua3782@gmail.com" ]
daudaua3782@gmail.com
f2d56cf251c3ca1e02470f5496c41a15b6196fe6
bde8dfc2cab9852f11167ea1fba072718efd7eeb
/acris-widgets-beantable/src/main/java/com/google/gwt/gen2/table/client/property/HeaderProperty.java
be5165a48fc535ae18bcfeee93694b48f15db86b
[]
no_license
seges/acris
1051395f8900dce44cbaabf373538de6d4a5c565
db8bd8f1533a767a4e43b4b8cc1039b0c8882e70
refs/heads/master
2020-12-13T02:18:28.968038
2015-08-29T13:28:07
2015-08-29T13:28:07
41,421,718
4
1
null
2018-08-21T18:08:35
2015-08-26T11:22:52
Java
UTF-8
Java
false
false
2,878
java
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.gen2.table.client.property; /** * A {@link ColumnProperty} that provides information about the headers above a * column. The row indexes start from the bottom of the header, such that all * headers at the 0th index refer to the row directly above the data table. */ public class HeaderProperty extends HeaderPropertyBase { /** * Property type. */ public static final Type<HeaderProperty> TYPE = new Type<HeaderProperty>() { private HeaderProperty instance; @Override public HeaderProperty getDefault() { if (instance == null) { instance = new HeaderProperty(); } return instance; } }; /** * Get the header at the given row index. * * @param row the row index from the bottom. * @return the header for the given row */ @Override public Object getHeader(int row) { return super.getHeader(row); } /** * Get the header at the given row and column index. Override this method if * your header includes dynamic content that depends on the column index. * * @param row the row index from the bottom * @param column the column index at runtime * @return the header for the given row */ @Override public Object getHeader(int row, int column) { return getHeader(row); } /** * @return get the number of headers above the column */ @Override public int getHeaderCount() { return super.getHeaderCount(); } /** * Remove the header above this column for the specified row. * * @param row the row index from the bottom */ @Override public void removeHeader(int row) { super.removeHeader(row); } /** * Set the header above this column. The row index starts with the bottom row, * which is reverse of a normal table. The headerCount will automatically be * increased to accommodate the row. * * @param row the row index from the bottom * @param header the header */ @Override public void setHeader(int row, Object header) { super.setHeader(row, header); } /** * Set the number of headers above the column. * * @param headerCount the number of headers */ @Override public void setHeaderCount(int headerCount) { super.setHeaderCount(headerCount); } }
[ "sloboda@seges.sk@e28c4d36-3818-11de-97fb-aff7d2a6cc54" ]
sloboda@seges.sk@e28c4d36-3818-11de-97fb-aff7d2a6cc54
87e8845eb189d7ea29043fe905a1d2355e1dccbb
bf53f727b8fb5d8eecf6f11bcb446b07a2a55215
/src_1.2.2/home/JRD_Server.java
e07cf3e2e9bb258a8bad0cf474cf3bd3609cdd79
[ "Apache-2.0" ]
permissive
markymarkmk2/MailSecurerClient
7323949479414ce3387518092b35b25ead98d7e5
d50084fbe04765d313187b394be07063ba35a58a
refs/heads/master
2021-01-09T06:32:46.156875
2017-02-05T16:25:02
2017-02-05T16:25:02
81,003,665
0
0
null
null
null
null
UTF-8
Java
false
false
7,062
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package dimm.home; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Properties; import jrdesktop.JRCommons; import jrdesktop.JRConfig; import jrdesktop.server.Server; import jrdesktop.utilities.JRConnectEvent; import jrdesktop.utilities.JRConnectEventListener; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.HostConfiguration; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.StatusLine; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.methods.GetMethod; /** * * @author mw */ public class JRD_Server { public static final String SERVER_JRDESKTOP_PARAMS = "/mailsecurer/jrd_params.txt"; public static final String LOCAL_JRDESKTOP_PARAMS = "./jrd_params.txt"; public static String DEFAULTSERVER = "www.mailsecurer.de"; public static final String HTTPUSER = "mailsecurer"; public static final String HTTPPWD = "123456"; public static final int DEFAULTPORT = 80; String upd_server = DEFAULTSERVER; String http_user = HTTPUSER; String http_pwd = HTTPPWD; Header[] response_hlist; boolean viewer_is_running; Server server; ArrayList<JRConnectEventListener> evt_listener; public JRD_Server() { evt_listener = new ArrayList<JRConnectEventListener>(); } void add_listener( JRConnectEventListener l ) { if (!evt_listener.contains(l)) evt_listener.add(l); } void remove_listener( JRConnectEventListener l ) { if (evt_listener.contains(l)) evt_listener.remove(l); } void notify_listeners( JRConnectEvent.EVENT evt ) { for (int i = 0; i < evt_listener.size(); i++) { JRConnectEventListener connectEventListener = evt_listener.get(i); connectEventListener.connect_event( new JRConnectEvent(evt)); } } boolean download_file( String host, int port, String http_user, String http_pwd, String server_path, String local_path, boolean obfuscate) { HostConfiguration host_conf = new HostConfiguration(); host_conf.setHost( host, port ); GetMethod get = new GetMethod(server_path); HttpClient http_client = new HttpClient(); Credentials defaultcreds = new UsernamePasswordCredentials(http_user, http_pwd); http_client.getState().setCredentials(new AuthScope(host, port, AuthScope.ANY_REALM), defaultcreds); int data_len = 0; try { http_client.executeMethod(host_conf, get ); int rcode = get.getStatusCode(); StatusLine sl = get.getStatusLine(); if (rcode < 200 || rcode > 210) { // SERVER ANSWERS WITH ERROR return false; } response_hlist = get.getResponseHeaders(); long len = 0; int last_percent = 0; try { String cont_len_str = get_resonse_header("Content-Length"); len = Long.parseLong(cont_len_str); } catch ( NumberFormatException numberFormatException ) { } InputStream istr = get.getResponseBodyAsStream(); BufferedInputStream bis = new BufferedInputStream( istr ); FileOutputStream fw = new FileOutputStream( local_path ); int bs = 4096; byte[] buffer = new byte[bs]; while (true) { int rlen = bis.read( buffer ); data_len += rlen; if (rlen == -1) break; if (obfuscate) { for (int i = 0; i < rlen; i++) { buffer[i] = (byte)~buffer[i]; // KOMPLEMENT: BILLIG UND GUT } } fw.write( buffer,0, rlen ); } fw.close(); bis.close(); } catch ( Exception exc ) { return false; } finally { } if (data_len == 0) return false; File f = new File( local_path ); if (f.exists()) return true; return false; } public String get_resonse_header( String key) { if (response_hlist == null) return null; for (int i = 0; i < response_hlist.length; i++) { if (response_hlist[i].getName().compareTo(key) == 0) return response_hlist[i].getValue(); } return null; } public boolean start_session(String user) { if (viewer_is_running) return true; if (!download_file(upd_server, DEFAULTPORT, http_user, http_pwd, SERVER_JRDESKTOP_PARAMS, LOCAL_JRDESKTOP_PARAMS, false )) { System.out.println("Cannot load jrd params"); } Properties p = new Properties(); try { p.load(new FileInputStream(LOCAL_JRDESKTOP_PARAMS)); } catch (IOException iOException) { notify_listeners( JRConnectEvent.EVENT.CONNECT_FAILED ); return false; } String port = p.getProperty("Port", "1099"); String jrd_server = p.getProperty("Server", "www.mailsecurer.de"); int jrd_port = 1099; try { jrd_port = Integer.parseInt(port); } catch (NumberFormatException numberFormatException) { notify_listeners( JRConnectEvent.EVENT.CONNECT_FAILED ); return false; } JRConfig config = new JRConfig(JRCommons.viewerSide, JRCommons.DEFAULT_CONFIG, jrd_server, jrd_port, user, "12345", /*ssl*/false, /*reverse*/true); server = new Server(config); server._Start(); if (server.isConnected()) { viewer_is_running = true; notify_listeners( JRConnectEvent.EVENT.CONNECTED ); } else { viewer_is_running = false; notify_listeners( JRConnectEvent.EVENT.CONNECT_FAILED ); } return server.isConnected(); } public boolean stop_session() { if (!viewer_is_running) return false; server._Stop(); Server.Stop(); server = null; viewer_is_running = false; notify_listeners( JRConnectEvent.EVENT.DISCONNECTED ); return true; } public boolean is_running() { return viewer_is_running; } }
[ "mark@dimm.de" ]
mark@dimm.de
b577152508ed7165448ef3c9c152636e11087ac8
722ff6b6ab7039ee4136df8637ab3edfb4349b92
/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/context/LocalRSocketServerPortTests.java
452a7d8e1d3ee857ff54a04bdf1c43ff1e4f7403
[ "Apache-2.0" ]
permissive
BradOselo/spring-boot
77ee69e549032a73c183a1983b1840dc07b4c65e
8a0bfef9bbf3ab94998fb9a1d3470c8648bdf916
refs/heads/main
2023-05-30T00:21:54.593214
2021-06-10T18:18:29
2021-06-10T18:18:29
375,946,993
3
0
Apache-2.0
2021-06-11T07:51:57
2021-06-11T07:51:56
null
UTF-8
Java
false
false
1,677
java
/* * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.rsocket.context; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit.jupiter.SpringExtension; import static org.assertj.core.api.Assertions.assertThat; /** * Tests for {@link LocalRSocketServerPort @LocalRSocketServerPort}. * * @author Verónica Vásquez * @author Eddú Meléndez */ @ExtendWith(SpringExtension.class) @TestPropertySource(properties = "local.rsocket.server.port=8181") class LocalRSocketServerPortTests { @Value("${local.rsocket.server.port}") private String fromValue; @LocalRSocketServerPort private String fromAnnotation; @Test void testLocalRSocketServerPortAnnotation() { assertThat(this.fromAnnotation).isNotNull().isEqualTo(this.fromValue); } @Configuration(proxyBeanMethods = false) static class Config { } }
[ "pwebb@pivotal.io" ]
pwebb@pivotal.io
dc2e33c32c7e0c78c087c2347f9825b5ee3a454d
3eb360b54c646b2bdf9239696ddd7ce8409ece8d
/lm_terminal/src/com/lauvan/dutymanage/vo/DutyLogVo.java
1b130734505dc9b54528fe6cf44214028b95cd3b
[]
no_license
amoydream/workspace
46a8052230a1eeede2c51b5ed2ca9e4c3f8fc39e
72f0f1db3e4a63916634929210d0ab3512a69df5
refs/heads/master
2021-06-11T12:05:24.524282
2017-03-01T01:43:35
2017-03-01T01:43:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,742
java
package com.lauvan.dutymanage.vo; import java.util.Date; import org.apache.commons.lang.time.DateFormatUtils; import org.springframework.format.annotation.DateTimeFormat; import com.lauvan.base.vo.BaseVo; public class DutyLogVo extends BaseVo { private static final long serialVersionUID = 1L; private Integer duty_log_id; private Integer duty_sch_id; private Integer pe_id; private String pe_name; private String pe_mobilephone; private Integer or_id; private String or_name; private String duty_prop; private String duty_type; @DateTimeFormat(pattern = "yyyy-MM-dd") private Date duty_date; @DateTimeFormat(pattern = "yyyy-MM-dd") private Date duty_date_start; @DateTimeFormat(pattern = "yyyy-MM-dd") private Date duty_date_end; private Integer ev_id; private String ev_name; @DateTimeFormat(pattern = "yyyy-MM") private Date duty_month; public Integer getDuty_sch_id() { return duty_sch_id; } public void setDuty_sch_id(Integer duty_sch_id) { this.duty_sch_id = duty_sch_id; } public Integer getDuty_log_id() { return duty_log_id; } public void setDuty_log_id(Integer duty_log_id) { this.duty_log_id = duty_log_id; } public Integer getPe_id() { return pe_id; } public void setPe_id(Integer pe_id) { this.pe_id = pe_id; } public String getPe_name() { return pe_name; } public void setPe_name(String pe_name) { this.pe_name = pe_name; } public String getPe_mobilephone() { return pe_mobilephone; } public void setPe_mobilephone(String pe_mobilephone) { this.pe_mobilephone = pe_mobilephone; } public Integer getOr_id() { return or_id; } public void setOr_id(Integer or_id) { this.or_id = or_id; } public String getOr_name() { return or_name; } public void setOr_name(String or_name) { this.or_name = or_name; } public String getDuty_prop() { return duty_prop; } public void setDuty_prop(String duty_prop) { this.duty_prop = duty_prop; } public String getDuty_type() { return duty_type; } public void setDuty_type(String duty_type) { this.duty_type = duty_type; } public Date getDuty_date() { return duty_date; } public String getDuty_date_str() { if(duty_date == null) { return ""; } return DateFormatUtils.format(duty_date, "yyyy-MM-dd"); } public void setDuty_date(Date duty_date) { this.duty_date = duty_date; } public Date getDuty_date_start() { return duty_date_start; } public String getDuty_date_start_str() { if(duty_date_start == null) { return ""; } return DateFormatUtils.format(duty_date_start, "yyyy-MM-dd"); } public void setDuty_date_start(Date duty_date_start) { this.duty_date_start = duty_date_start; } public Date getDuty_date_end() { return duty_date_end; } public String getDuty_date_end_str() { if(duty_date_end == null) { return ""; } return DateFormatUtils.format(duty_date_end, "yyyy-MM-dd"); } public void setDuty_date_end(Date duty_date_end) { this.duty_date_end = duty_date_end; } public Integer getEv_id() { return ev_id; } public void setEv_id(Integer ev_id) { this.ev_id = ev_id; } public String getEv_name() { return ev_name; } public void setEv_name(String ev_name) { this.ev_name = ev_name; } public Date getDuty_month() { return duty_month; } public String getDuty_month_str() { if(duty_month == null) { return ""; } return DateFormatUtils.format(duty_month, "yyyy-MM"); } public void setDuty_month(Date duty_month) { this.duty_month = duty_month; } }
[ "jason.ss.tao@qq.com" ]
jason.ss.tao@qq.com
7b76f010beca26eb79d318f519bbe18726dd89a7
4e9db8e706d8e052ea860b84203d8bac91ac7850
/DemoEfficacious/app/src/main/java/com/mobi/efficacious/arohanschool/fragment/TuesdayFragment.java
16e46f3885467820d7dbdab782ed08c69c4923cf
[]
no_license
EfficaciousIT/ArohanSchoolAndroidApp
4ebcc4b84d9c3d73315896b697d34e59dc2015df
167dd79cbef75b5d13f5f00812d9adde19cd925f
refs/heads/main
2023-07-22T19:29:07.807340
2021-09-01T09:12:25
2021-09-01T09:12:25
401,999,328
0
0
null
null
null
null
UTF-8
Java
false
false
5,333
java
package com.mobi.efficacious.arohanschool.fragment; import android.app.ProgressDialog; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Toast; import com.mobi.efficacious.arohanschool.Interface.DataService; import com.mobi.efficacious.arohanschool.R; import com.mobi.efficacious.arohanschool.Tab.TimetableActivity_student; import com.mobi.efficacious.arohanschool.adapters.StandardAdapter; import com.mobi.efficacious.arohanschool.adapters.StudentTimetableAdapter; import com.mobi.efficacious.arohanschool.entity.TimeTableDetail; import com.mobi.efficacious.arohanschool.entity.TimeTableDetailPojo; import com.mobi.efficacious.arohanschool.webApi.RetrofitInstance; import java.util.ArrayList; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; import io.reactivex.observers.DisposableObserver; import io.reactivex.schedulers.Schedulers; public class TuesdayFragment extends Fragment { String Std_id, school_id; RecyclerView mrecyclerView; RecyclerView.Adapter madapter; private CompositeDisposable mCompositeDisposable; private ProgressDialog progress; private static final String PREFRENCES_NAME = "myprefrences"; SharedPreferences settings; String Academic_id, role_id; public TuesdayFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_tuesday, container, false); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mrecyclerView = (RecyclerView) getActivity().findViewById(R.id.tuesday_list); settings = getActivity().getSharedPreferences(PREFRENCES_NAME, Context.MODE_PRIVATE); Academic_id = settings.getString("TAG_ACADEMIC_ID", ""); role_id = settings.getString("TAG_USERTYPEID", ""); try { if (role_id.contentEquals("6") || role_id.contentEquals("7") || role_id.contentEquals("3")) { school_id = StandardAdapter.intSchool_id; } else { school_id = settings.getString("TAG_SCHOOL_ID", ""); } } catch (Exception ex) { } try { Std_id = TimetableActivity_student.stdid; } catch (Exception ex) { } try { friAsync (); } catch (Exception ex) { } } public void friAsync (){ try { DataService service = RetrofitInstance.getRetrofitInstance().create(DataService.class); mCompositeDisposable.add(service.getTimeTableDetails("selectStudentTT",school_id,"tuesday",Academic_id,Std_id,"") .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.io()) .subscribeWith(getObserver())); } catch (Exception ex) { } } public DisposableObserver<TimeTableDetailPojo> getObserver(){ return new DisposableObserver<TimeTableDetailPojo>() { @Override public void onNext(@NonNull TimeTableDetailPojo timeTableDetailPojo) { try { generateTimetableList((ArrayList<TimeTableDetail>) timeTableDetailPojo.getTimeTableDetail()); } catch (Exception ex) { Toast.makeText(getActivity(), "Response taking time seems Network issue!", Toast.LENGTH_SHORT).show(); } } @Override public void onError(@NonNull Throwable e) { Toast.makeText(getActivity(), "Response taking time seems Network issue!", Toast.LENGTH_SHORT).show(); } @Override public void onComplete() { } }; } @Override public void onDestroy() { super.onDestroy(); if (mCompositeDisposable != null && !mCompositeDisposable.isDisposed()) { mCompositeDisposable.dispose(); } } public void generateTimetableList(ArrayList<TimeTableDetail> taskListDataList) { try { if ((taskListDataList != null && !taskListDataList.isEmpty())) { madapter = new StudentTimetableAdapter(getActivity(),taskListDataList,"Student"); RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity()); mrecyclerView.setLayoutManager(layoutManager); mrecyclerView.setAdapter(madapter); } else { } } catch (Exception ex) { Toast.makeText(getActivity(), "Response taking time seems Network issue!", Toast.LENGTH_SHORT).show(); } } }
[ "EfficaciousIT@gmail.com" ]
EfficaciousIT@gmail.com
045198a2e1e782c75778f1f77c76b9289e296dde
7c748bd3c9b78936ea100fab4b94c33901fac603
/integration-tests/src/main/java/io/quarkiverse/operatorsdk/it/AbstractController.java
a78c7e5e3bf269cccec2906c8a0451fa14f68a74
[ "Apache-2.0" ]
permissive
secondsun/quarkus-operator-sdk
7ffefa6acdfd0b1f987f368a13f7c4fac9e58b0e
ed2312d9e5afdc8b2e5f70f74056efe63f01a3d2
refs/heads/master
2023-04-04T18:46:37.860541
2021-04-05T16:02:31
2021-04-05T16:02:31
348,456,672
0
0
Apache-2.0
2021-04-05T16:02:32
2021-03-16T18:44:48
null
UTF-8
Java
false
false
856
java
package io.quarkiverse.operatorsdk.it; import io.javaoperatorsdk.operator.api.Context; import io.javaoperatorsdk.operator.api.DeleteControl; import io.javaoperatorsdk.operator.api.UpdateControl; import io.javaoperatorsdk.operator.processing.event.EventSourceManager; public abstract class AbstractController<T extends TestResource> implements RegistrableController<T> { private boolean initialized; @Override public void init(EventSourceManager eventSourceManager) { initialized = true; } @Override public boolean isInitialized() { return initialized; } @Override public DeleteControl deleteResource(T resource, Context<T> context) { return null; } @Override public UpdateControl<T> createOrUpdateResource(T resource, Context<T> context) { return null; } }
[ "metacosm@gmail.com" ]
metacosm@gmail.com
4a367d1e0a803440dbb6db0f5fde1c8dacd56953
941f73c18c0b260b4b6307bc8edcf55763052fa6
/src/DataStructures/Linear/Test_LinkQueue.java
7c48450da98139ffbda01ad0aed5b7aff799e313
[]
no_license
abelzyp/DSA
2b8d46b23a17901e895f68aaf6b5e8004c0573eb
b136cc04ff548987af616d3890c64953d0a6c602
refs/heads/master
2020-05-21T16:27:24.455506
2020-01-15T03:54:19
2020-01-15T03:54:19
64,267,780
0
0
null
null
null
null
UTF-8
Java
false
false
528
java
package DataStructures.Linear; public class Test_LinkQueue { public static void main(String[] args) { LinkQueue lq = new LinkQueue(); System.out.println(lq.Empty_LinkQueue()==1?"是空的":"不是空的"); lq.In_LinkQueue(1); lq.In_LinkQueue(2); System.out.println(lq.Empty_LinkQueue()==1?"是空的":"不是空的"); System.out.println("队头元素是:"+lq.Front_LinkQueue()); System.out.println("出队元素是:"+lq.Out_LinkQueue()); System.out.println("队头元素是:"+lq.Front_LinkQueue()); } }
[ "abelzyp@foxmail.com" ]
abelzyp@foxmail.com
3b422233c8272f531c008f520f5829fa3939ebdc
df134b422960de6fb179f36ca97ab574b0f1d69f
/net/minecraft/server/v1_16_R2/GenLayerMushroomIsland.java
2e1e2a56c2cc9220f5f2acc7c6505b69af937d71
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
758
java
/* */ package net.minecraft.server.v1_16_R2; /* */ /* */ /* */ public enum GenLayerMushroomIsland /* */ implements AreaTransformer4 /* */ { /* 7 */ INSTANCE; /* */ /* */ /* */ public int a(WorldGenContext var0, int var1, int var2, int var3, int var4, int var5) { /* 11 */ if (GenLayers.b(var5) && GenLayers.b(var4) && GenLayers.b(var1) && GenLayers.b(var3) && GenLayers.b(var2) && var0.a(100) == 0) { /* 12 */ return 14; /* */ } /* 14 */ return var5; /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\net\minecraft\server\v1_16_R2\GenLayerMushroomIsland.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
7828d2b191c2be0c1eb5d405661b8864a31c9201
85de583e8fd138413ba723455c05a23e853d9c08
/test.programs/test/java/test/programs/ClassProgram.java
7cd42c03c743e4a818ab5094522b24bcf217e538
[ "MIT" ]
permissive
sormuras/mainrunner
0905e7b76f163f11abb94ddfc4fee124f6c7007e
cfbcad670f52d381dcb9bef2b61f3e5a8c9589f7
refs/heads/main
2022-06-13T00:12:19.430847
2022-05-12T18:49:37
2022-05-12T18:49:37
159,445,522
6
0
MIT
2020-12-14T18:41:10
2018-11-28T04:52:26
Java
UTF-8
Java
false
false
130
java
package test.programs; public class ClassProgram { public static void main(String[] args) { assert args.length == 0; } }
[ "sormuras@gmail.com" ]
sormuras@gmail.com
d82489ed8292792eb74e2d9dd70c1805d76b10bd
a58f4a2e82408e9adc2f0dbbf8a27d7107a46421
/backlego-service/backlego-service-common/src/main/java/com/backlego/service/common/serialize/support/hessian/Hessian2SerializerFactory.java
6a22164fc4cdc90f2226635813c9b6fdd2428cb2
[]
no_license
K-Darker/backlego-service
7dee9b110c9dade67d456126cf2bd6def6fa8754
d706d61ac2dfd83cd6ae79420b26a8f513f9e1ee
refs/heads/master
2021-05-29T18:33:04.522294
2015-11-14T04:44:05
2015-11-14T04:44:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,053
java
/* * Copyright 1999-2011 Alibaba Group. * * 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.backlego.service.common.serialize.support.hessian; import com.alibaba.com.caucho.hessian.io.SerializerFactory; public class Hessian2SerializerFactory extends SerializerFactory { public static final SerializerFactory SERIALIZER_FACTORY = new Hessian2SerializerFactory(); private Hessian2SerializerFactory() { } @Override public ClassLoader getClassLoader() { return Thread.currentThread().getContextClassLoader(); } }
[ "614720519@qq.com" ]
614720519@qq.com
956279967490b60cd93ceea1a3b832c2f10de1a4
2bda2777b4699cba6c8e952ff17cf495743c7e3c
/src/com/js/common/util/PageList.java
4606376086b4b02167bbc6dd9fdc5852fa8e5316
[]
no_license
xiexlp/DbAutoJavaFx
8db44db07ab7ade27569a5c742b4844563eca71a
c7cf05e6dc0e4b5515b7807fea77694587faca8c
refs/heads/master
2022-07-10T12:23:59.462973
2019-07-23T07:46:20
2019-07-23T07:46:20
198,379,877
1
0
null
2022-06-17T02:21:15
2019-07-23T07:48:35
Java
UTF-8
Java
false
false
1,418
java
package com.js.common.util; import java.util.ArrayList; public class PageList<E> extends ArrayList<E>{ //页面大小,默认为20 int pageSize=20; //当前页 int pageNo; //总条目数 int total; //总页数 int pageTotal; int offset; public PageList(int pageNo){ this.pageNo= pageNo; } public PageList(int pageNo2, int total2) { this.pageNo = pageNo2; setTotal(total2); // TODO Auto-generated constructor stub } public PageList(int pageNo2,int total2,int pageSize2){ this.pageNo = pageNo2; this.pageSize = pageSize2; setTotal(total2); } public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } public int getPageNo() { return this.pageNo; } public void setPageNo(int pageNo) { this.pageNo = pageNo; } public int getTotal() { return total; } public void setTotal(int total) { this.total = total; setTotalPage(); setOffset(); } public int getPageTotal() { return pageTotal; } public void setPageTotal(int pageTotal) { this.pageTotal = pageTotal; } public int getOffset() { return offset; } public void setOffset() { this.offset = (pageNo-1)*pageSize; } /** * 计算总的页数 * @return */ public Integer setTotalPage(){ this.pageTotal =MathUtils.upperInteger(total,pageSize); return this.pageTotal; } //setTotalPageNumber(); }
[ "pkuping@foxmail.com" ]
pkuping@foxmail.com
5223c2e1c15f9af25b5731c86390a9c6545b65ea
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14599-15-7-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/observation/internal/DefaultObservationManager_ESTest_scaffolding.java
e3bf7327193e8aad891c9b85a4897ac3e23764fc
[]
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
460
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Apr 09 07:28:47 UTC 2020 */ package org.xwiki.observation.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultObservationManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
403576f847b26fa3e28cc4e0d67a724e1587a3b2
20eb62855cb3962c2d36fda4377dfd47d82eb777
/newEvaluatedBugs/Jsoup_36_buggy/mutated/109/Cleaner.java
a2ffb4fda23bb7e188b85fcda2ac8e3605e01e83
[]
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
5,237
java
package org.jsoup.safety; import org.jsoup.helper.Validate; import org.jsoup.nodes.*; import org.jsoup.parser.Tag; import java.util.List; /** The whitelist based HTML cleaner. Use to ensure that end-user provided HTML contains only the elements and attributes that you are expecting; no junk, and no cross-site scripting attacks! <p/> The HTML cleaner parses the input as HTML and then runs it through a white-list, so the output HTML can only contain HTML that is allowed by the whitelist. <p/> It is assumed that the input HTML is a body fragment; the clean methods only pull from the source's body, and the canned white-lists only allow body contained tags. <p/> Rather than interacting directly with a Cleaner object, generally see the {@code clean} methods in {@link org.jsoup.Jsoup}. */ public class Cleaner { private Whitelist whitelist; /** Create a new cleaner, that sanitizes documents using the supplied whitelist. @param whitelist white-list to clean with */ public Cleaner(Whitelist whitelist) { Validate.notNull(whitelist); this.whitelist = whitelist; } /** Creates a new, clean document, from the original dirty document, containing only elements allowed by the whitelist. The original document is not modified. Only elements from the dirt document's <code>body</code> are used. @param dirtyDocument Untrusted base document to clean. @return cleaned document. */ public Document clean(Document dirtyDocument) { Validate.notNull(dirtyDocument); Document clean = Document.createShell(dirtyDocument.baseUri()); if (dirtyDocument.body() != null) // frameset documents won't have a body. the clean doc will have empty body. copySafeNodes(dirtyDocument.body(), clean.body()); return clean; } /** Determines if the input document is valid, against the whitelist. It is considered valid if all the tags and attributes in the input HTML are allowed by the whitelist. <p/> This method can be used as a validator for user input forms. An invalid document will still be cleaned successfully using the {@link #clean(Document)} document. If using as a validator, it is recommended to still clean the document to ensure enforced attributes are set correctly, and that the output is tidied. @param dirtyDocument document to test @return true if no tags or attributes need to be removed; false if they do */ public boolean isValid(Document dirtyDocument) { Validate.notNull(dirtyDocument); Document clean = Document.createShell(dirtyDocument.baseUri()); int numDiscarded = copySafeNodes(dirtyDocument.body(), clean.body()); return numDiscarded == 0; } /** Iterates the input and copies trusted nodes (tags, attributes, text) into the destination. */ private int copySafeNodes(Element source, Element dest) { List<Node> sourceChildren = source.childNodes(); int numDiscarded = 0; for (Node sourceChild : sourceChildren) { if (sourceChild instanceof Element) { Element sourceEl = (Element) sourceChild; if (whitelist.isSafeTag(sourceEl.tagName())) { // safe, clone and copy safe attrs ElementMeta meta = createSafeElement(sourceEl); Element destChild = meta.el; dest.appendChild(destChild); numDiscarded += meta.numAttribsDiscarded; numDiscarded += copySafeNodes(sourceEl, destChild); // recurs } else { // not a safe tag, but it may have children (els or text) that are, so recurse numDiscarded++; numDiscarded += copySafeNodes(sourceEl, dest); } } else if (sourceChild instanceof TextNode) { TextNode sourceText = (TextNode) sourceChild; TextNode destText = new TextNode(sourceText.getWholeText(), sourceChild.baseUri()); dest.appendChild(destText); } // else, we don't care about comments, xml proc instructions, etc } return numDiscarded; } private ElementMeta createSafeElement(Element sourceEl) { String sourceTag = sourceEl.tagName(); Attributes destAttrs = new Attributes(); Element dest = new Element(Tag.valueOf(sourceTag), sourceEl.baseUri(), destAttrs); int numDiscarded = 0; Attributes sourceAttrs = sourceEl.attributes(); for (Attribute sourceAttr : sourceAttrs) { if (whitelist.isSafeAttribute(sourceTag, sourceEl, sourceAttr)) destAttrs.put(sourceAttr); else numDiscarded++; } Attributes enforcedAttrs = whitelist.getEnforcedAttributes(sourceTag); sourceAttrs.addAll(enforcedAttrs); return new ElementMeta(dest, numDiscarded); } private static class ElementMeta { Element el; int numAttribsDiscarded; ElementMeta(Element el, int numAttribsDiscarded) { this.el = el; this.numAttribsDiscarded = numAttribsDiscarded; } } }
[ "justinwm@163.com" ]
justinwm@163.com
0040749987eabbc81250bd6cff2674af82b293cd
66b2d0cc86ec6717464053113f72b46e67b1dfec
/02_JAVA语言进价/day04-常用API/day04源码/src/com/itheima04/date/SimpleDataFormatDemo02.java
5b9a2eed29dd2afc9f595863437d183a0b5c41bd
[]
no_license
wjphappy90/360Java
c33ca9bbb85b310f01ee42c585dd1aa28682e7b4
867dfb7f4788ca4df44e14dd21ffa9322a5dbb43
refs/heads/master
2022-11-28T09:03:28.791935
2020-08-10T02:20:48
2020-08-10T02:20:48
285,675,392
0
1
null
null
null
null
UTF-8
Java
false
false
1,148
java
package com.itheima.date; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; /** * 如果以字符串的形式提供日期 * 数据来源都是字符串, "2019-9-9" * 字符串转成日期对象 * 实现步骤: * 1: 创建子类对象SimpleDateFormat * 在子类构造方法中,传递格式化后的日期格式 * 日前格式参考API,不要胡来 * y 表示年, M表示月 , d月份中天数, H表示0-23, m分钟,s秒 * 2: 对象调用方法 Date parse(String str) * 传递字符串形式的时期,转成Date对象 */ public class SimpleDataFormatDemo02 { public static void main(String[] args) throws ParseException { //定义日期格式的字符串 String str = "2019-9-10"; //创建子类对象 //日期格式注意: 必须和要转的字符串的格式一致,否则转不了 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); //对象调用方法parse,传递字符串,返回日期对象 Date date = sdf.parse(str);//方法有异常 System.out.println(date); } }
[ "981146457@qq.com" ]
981146457@qq.com
62c00d861a45854458b36bd64a2f3780a6fb0ab5
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Hibernate/Hibernate9141.java
bd4b2fe58fccdc761a897eee416ecac81063d7b2
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,528
java
@Test public void testEntityWithLazyAssnList() throws Exception { CriteriaExecutor criteriaExecutor = new CriteriaExecutor() { protected Criteria getCriteria(Session s) { // should use RootEntityTransformer by default return s.createCriteria( Student.class ) .addOrder( Order.asc( "studentNumber" ) ); } }; HqlExecutor hqlExecutor = new HqlExecutor() { public Query getQuery(Session s) { return s.createQuery( "from Student order by studentNumber" ); } }; ResultChecker checker = new ResultChecker() { public void check(Object results) { List resultList = ( List ) results; assertEquals( 2, resultList.size() ); assertEquals( yogiExpected, resultList.get( 0 ) ); assertEquals( shermanExpected, resultList.get( 1 ) ); assertNotNull( ((Student) resultList.get( 0 )).getEnrolments() ); assertNotNull( ( ( Student ) resultList.get( 0 ) ).getPreferredCourse() ); assertNotNull( ( ( Student ) resultList.get( 1 ) ).getEnrolments() ); assertNull( ( ( Student ) resultList.get( 1 ) ).getPreferredCourse() ); assertFalse( Hibernate.isInitialized( ( ( Student ) resultList.get( 0 ) ).getEnrolments() ) ); assertFalse( Hibernate.isInitialized( ( ( Student ) resultList.get( 0 ) ).getPreferredCourse() ) ); assertFalse( Hibernate.isInitialized( ( ( Student ) resultList.get( 1 ) ).getEnrolments() ) ); assertNull( ( ( Student ) resultList.get( 1 ) ).getPreferredCourse() ); } }; runTest( hqlExecutor, criteriaExecutor, checker, false ); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
3e7ac9c29e16568182c4f21e09ea1f12b4887353
153e6380d8b372129a435e4bc290665026355a97
/OnlineBookStoreClient/src/RMI/addToCart.java
fc07c19ef511a724ede308d451fcb6145c8d97b0
[]
no_license
rdgt321/OBBS
e4cac22d22f9674fd603b4a715584c3c7a582f11
ac6a261dd740b4a3ceb3cc0bb07fe57e01854418
refs/heads/master
2016-09-06T13:03:46.792064
2012-12-26T17:13:10
2012-12-26T17:13:10
6,744,392
4
0
null
2015-10-09T01:42:03
2012-11-18T06:53:02
Java
UTF-8
Java
false
false
210
java
package RMI; import java.rmi.Remote; import Sale.ItemPO; public interface addToCart extends Remote { public ResultMessage addToCart(ItemPO itemPO,int memberID) throws java.rmi.RemoteException; }
[ "rdgt321@gmail.com" ]
rdgt321@gmail.com
45e57267d4f09a33577f643757c1f28162b62d75
5761e951d342a1756407e26c7b1f4009d05a1a2d
/Lecture7/multiphase/src/desmoj/java/desmoj/extensions/chaining/report/SmartReporter.java
03a475f1144fa9c5c51cf066c4970ab024322a58
[]
no_license
nitman118/JAVA-for-operations-management
1a67a6ed978fbeec5847da55f1a2f4de672f71f5
71087d786e47802bed9e0c7a549e18032ff2ae1a
refs/heads/master
2022-11-22T14:34:21.595056
2017-12-31T02:30:17
2017-12-31T02:30:17
115,837,560
0
0
null
2020-07-29T10:18:18
2017-12-31T02:26:07
Java
UTF-8
Java
false
false
2,464
java
package desmoj.extensions.chaining.report; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.List; import java.util.Locale; import desmoj.core.report.Reporter; import desmoj.core.simulator.Reportable; import desmoj.extensions.chaining.report.FlexReporterBuilder.FlexReporter; /** * The SmartReporter is a helper class for generating reporters based * on user-defined header-value pairs, supporting the modification * of entries. * * @version DESMO-J, Ver. 2.4.2 copyright (c) 2014 * @author Malte Unkrig * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You * may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing * permissions and limitations under the License. */ public class SmartReporter extends Reporter { public static class HeaderValuePair { private final String header; private final String value; public HeaderValuePair(String header, Object value) { super(); this.header = header; if (value instanceof Double || value instanceof Float) { NumberFormat numberFormat; numberFormat = DecimalFormat.getInstance(Locale.ENGLISH); numberFormat.setMaximumFractionDigits(4); numberFormat.setMinimumFractionDigits(4); numberFormat.setGroupingUsed(false); this.value = numberFormat.format(value); } else { this.value = value.toString(); } } @Override public String toString() { return header + ": " + value; } } public SmartReporter(String groupHeading, int groupId, List<HeaderValuePair> headerValuePairs, Reportable reportable) { super(reportable); super.groupHeading = groupHeading; super.groupID = groupId; numColumns = headerValuePairs.size(); columns = new String[numColumns]; entries = new String[numColumns]; for (int i = 0; i < numColumns; i++) { HeaderValuePair pair = headerValuePairs.get(i); columns[i] = pair.header; entries[i] = pair.value; } } public void overrideValueAt(String newValue, int columnPos) { entries[columnPos] = newValue; } @Override public String[] getEntries() { return entries; } }
[ "nitman118@google.com" ]
nitman118@google.com
b73eaf67cd0661467b3a1439005dcde0050b99f4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/15/15_10c67870925cf98223c1f97e744eb54e4497cc2b/NormalChunkGenerator/15_10c67870925cf98223c1f97e744eb54e4497cc2b_NormalChunkGenerator_t.java
b36547b494e081bb2dc6b14433b738ae17b51b60
[]
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,717
java
package org.bukkit.craftbukkit.generator; import java.util.ArrayList; import java.util.List; import java.util.Random; import net.minecraft.entity.EnumCreatureType; import net.minecraft.util.IProgressUpdate; import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.IChunkProvider; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.generator.BlockPopulator; //import org.bukkit.craftbukkit.CraftWorld; public class NormalChunkGenerator extends InternalChunkGenerator { public final IChunkProvider provider; public NormalChunkGenerator(World world, long seed) { provider = world.getChunkProvider(); } public NormalChunkGenerator(World world) { this(world, world.getWorldInfo().getSeed()); } public byte[] generate(org.bukkit.World world, Random random, int x, int z) { throw new UnsupportedOperationException("Not supported."); } public boolean canSpawn(org.bukkit.World world, int x, int z) { return ((CraftWorld) world).getHandle().provider.canCoordinateBeSpawn(x, z); } public List<BlockPopulator> getDefaultPopulators(org.bukkit.World world) { return new ArrayList<BlockPopulator>(); } public boolean isChunkLoaded(int i, int i1) { return provider.chunkExists(i, i1); } public Chunk getOrCreateChunk(int i, int i1) { return provider.provideChunk(i, i1); } public Chunk getChunkAt(int i, int i1) { return provider.loadChunk(i, i1); } public void getChunkAt(IChunkProvider icp, int i, int i1) { provider.populate(icp, i, i1); } public boolean saveChunks(boolean bln, IProgressUpdate ipu) { return provider.saveChunks(bln, ipu); } public boolean unloadChunks() { return provider.unload100OldestChunks(); } public boolean canSave() { return provider.canSave(); } public List<?> getMobsFor(EnumCreatureType ect, int i, int i1, int i2) { return provider.getPossibleCreatures(ect, i, i1, i2); } public ChunkPosition findNearestMapFeature(World world, String string, int i, int i1, int i2) { return provider.findClosestStructure(world, string, i, i1, i2); } public int getLoadedChunks() { return 0; } public String getName() { return "NormalWorldGenerator"; } @Override public boolean chunkExists(int var1, int var2) { return provider.chunkExists(var1, var2); } @Override public ChunkPosition findClosestStructure(World var1, String var2, int var3, int var4, int var5) { return this.findNearestMapFeature(var1, var2, var3, var4, var5); } @Override public int getLoadedChunkCount() { return this.getLoadedChunks(); } @Override public List<?> getPossibleCreatures(EnumCreatureType var1, int var2, int var3, int var4) { return this.getMobsFor(var1, var2, var3, var4); } @Override public Chunk loadChunk(int var1, int var2) { return this.getChunkAt(var1, var2); } @Override public String makeString() { return provider.makeString(); } @Override public void populate(IChunkProvider var1, int var2, int var3) { provider.populate(var1, var2, var3); } @Override public Chunk provideChunk(int var1, int var2) { return this.getOrCreateChunk(var1, var2); } @Override public boolean unload100OldestChunks() { return this.unloadChunks(); } @Override public void recreateStructures(int arg0, int arg1) { this.provider.recreateStructures(arg0, arg1); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7cced909228c78b271cc124e3339fd52af23a055
5a5bb57d1665352ed24088c20c2d6aaa9a0fe9d8
/src/main/java/com/luckyun/demo/base/controller/MsTestController.java
c7863790a51a08d0b4321d2fccdd407307c453ca
[]
no_license
kyo9988789/com-luckyun-demo
0f74368ead9884dcf36b058533f16704816d046d
f75395ed6147d359036a52a3db6248644a92e7db
refs/heads/master
2022-10-17T20:18:24.667205
2020-06-12T05:21:00
2020-06-12T05:21:00
271,714,804
0
0
null
null
null
null
UTF-8
Java
false
false
3,293
java
package com.luckyun.demo.base.controller; import java.util.Calendar; import java.util.Date; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import com.alibaba.fastjson.JSON; import com.luckyun.core.annotation.UrlByPkgController; import com.luckyun.core.api.annotation.Api; import com.luckyun.demo.base.entity.MsgBody; import com.luckyun.demo.base.entity.MsgDetail; @Api(author = "omai", name = "消息接口测试", regdate = "2019-12-10") @UrlByPkgController public class MsTestController { // 接口请求失败概率值 public final static int SEND_ERROR_RATE = 10; // 状态查询立即成功的概率值 public final static int STATUS_SUCCESS_RATE = 10; // 状态查询在一定时间内完成的概率值 public final static int STATUS_PROGRESS_RATE = 90; // 消息成功的概率值 public final static int MSG_SUCCUSS_RATE = 90; public final static String MS_KEY = "MS_TEST"; @Autowired private StringRedisTemplate stringRedisTemplate; @Api(author = "omai", name = "发送消息") @PostMapping(value = "/send") public String send(@RequestBody MsgBody msgBody) throws Exception { double random = Math.random() * 100; if (random <= SEND_ERROR_RATE) { throw new Exception("error!"); } Long max = stringRedisTemplate.opsForValue().increment(MS_KEY); random = Math.random() * 100; if (random <= STATUS_SUCCESS_RATE) { // 立即成功 setTime(msgBody, 0); } else if (random <= STATUS_PROGRESS_RATE) { // 五分钟内成功 setTime(msgBody, 300); } else { // 半小时内超时完成 setTime(msgBody, 1800); } stringRedisTemplate.opsForValue().set(MS_KEY + "_" + max, JSON.toJSONString(msgBody)); return max.toString(); } @Api(author = "omai", name = "状态查询") @GetMapping(value = "/status") public MsgBody status(@RequestParam("code") String code) throws Exception { double random = Math.random() * 100; if (random <= SEND_ERROR_RATE) { throw new Exception("error!"); } String msgStr = stringRedisTemplate.opsForValue().get(MS_KEY + "_" + code); if (msgStr == null || "".equals(msgStr)) { throw new Exception("invail code!"); } MsgBody msgBody = JSON.parseObject(msgStr, MsgBody.class); for (MsgDetail msg : msgBody.getList()) { Date now = new Date(); if (now.getTime() >= msg.getDatetime().getTime()) { random = Math.random() * 100; if(msg.getStatus()==0) { if (random > MSG_SUCCUSS_RATE) { msg.setStatus(1); } else { msg.setStatus(-1); } } } } stringRedisTemplate.opsForValue().set(MS_KEY + "_" + code, JSON.toJSONString(msgBody)); return msgBody; } /** * * @param msgBody 消息体 * @param maxInterval 最大时间间隔 */ private void setTime(MsgBody msgBody, int maxInterval) { for (MsgDetail msg : msgBody.getList()) { Calendar now = Calendar.getInstance(); now.add(Calendar.SECOND, (int) (maxInterval * Math.random())); msg.setDatetime(now.getTime()); } } }
[ "704378949@qq.com" ]
704378949@qq.com
22579e86b32906fc02e447c8f38e2754b0ed7784
832adcdeb34c5ba6ba7d9ac6f1be01619711579d
/src/day170811/homework/benchmarking/Benchmarking.java
2039eab2a2a3c3919d6e1780e3a4355e5c5ffca1
[]
no_license
Duelist256/CoreJava
208d5281988350e3a178ddefbebdba21ed6473b9
1fb5461691a7ac47ebd97577a8d5dd22171adb74
refs/heads/master
2021-01-21T15:19:44.807973
2017-09-10T13:51:19
2017-09-10T13:51:19
95,383,213
1
0
null
null
null
null
UTF-8
Java
false
false
2,675
java
package day170811.homework.benchmarking; import java.util.*; /** * Created by Duelist on 17.08.2017. */ public class Benchmarking { static final int SIZE = 1000000; public static void main(String[] args) { Random random = new Random(SIZE); int[] array = new int[SIZE]; for (int i = 0; i < array.length; i++) { array[i] = random.nextInt(); } List<Integer> linkedList = new LinkedList<>(); System.out.println("LinkedList addition"); long start = System.nanoTime(); for (int i = 0; i < SIZE; i++) { linkedList.add(array[i]); } long stop = System.nanoTime(); System.out.println("Time elapsed = " + (stop - start)); List<Integer> arrayList = new ArrayList<>(); System.out.println("ArrayList addition"); start = System.nanoTime(); for (int i = 0; i < SIZE; i++) { arrayList.add(array[i]); } stop = System.nanoTime(); System.out.println("Time elapsed = " + (stop - start)); Set<Integer> treeSet = new TreeSet<>(); System.out.println("TreeSet addition"); start = System.nanoTime(); for (int i = 0; i < SIZE; i++) { treeSet.add(array[i]); } stop = System.nanoTime(); System.out.println("Time elapsed = " + (stop - start)); System.out.println(); System.out.println("LinkedList sorting"); start = System.nanoTime(); Collections.sort(linkedList); stop = System.nanoTime(); System.out.println("Time elapsed = " + (stop - start)); System.out.println("ArrayList sorting"); start = System.nanoTime(); Collections.sort(arrayList); stop = System.nanoTime(); System.out.println("Time elapsed = " + (stop - start)); System.out.println(); int searchElement = arrayList.get(443123); System.out.println("LinkedList binarySearch"); start = System.nanoTime(); Collections.binarySearch(linkedList, searchElement); stop = System.nanoTime(); System.out.println("Time elapsed = " + (stop - start)); System.out.println("ArrayList binarySearch"); start = System.nanoTime(); Collections.binarySearch(arrayList, searchElement); stop = System.nanoTime(); System.out.println("Time elapsed = " + (stop - start)); System.out.println("TreeSet binarySearch"); start = System.nanoTime(); treeSet.contains(searchElement); stop = System.nanoTime(); System.out.println("Time elapsed = " + (stop - start)); } }
[ "selykov.iw@yandex.ru" ]
selykov.iw@yandex.ru
f30b7b24cc8f8a29e91f62a837ca3ce21f87e7ca
c81dd37adb032fb057d194b5383af7aa99f79c6a
/java/com/facebook/ads/redexgen/X/C0892Zb.java
199b533e567ebddaca5d267f606b6d1fbf5fffda
[]
no_license
hongnam207/pi-network-source
1415a955e37fe58ca42098967f0b3307ab0dc785
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
refs/heads/main
2023-03-30T07:49:35.920796
2021-03-28T06:56:24
2021-03-28T06:56:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
379
java
package com.facebook.ads.redexgen.X; /* renamed from: com.facebook.ads.redexgen.X.Zb reason: case insensitive filesystem */ public class C0892Zb implements OG { public final /* synthetic */ ZY A00; public C0892Zb(ZY zy) { this.A00 = zy; } @Override // com.facebook.ads.redexgen.X.OG public final void A9t() { this.A00.A04 = false; } }
[ "nganht2@vng.com.vn" ]
nganht2@vng.com.vn
2653df062708894ffe583224296aa0dcf5a85fab
71071f98d05549b67d4d6741e8202afdf6c87d45
/files/Spring_Data_for_Apache_Cassandra/DATACASS-343/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/StringBasedCassandraQuery.java
99254442942bd815ddfde4f0318674a3d3656fb5
[]
no_license
Sun940201/SpringSpider
0adcdff1ccfe9ce37ba27e31b22ca438f08937ad
ff2fc7cea41e8707389cb62eae33439ba033282d
refs/heads/master
2022-12-22T09:01:54.550976
2018-06-01T06:31:03
2018-06-01T06:31:03
128,649,779
1
0
null
2022-12-16T00:51:27
2018-04-08T14:30:30
Java
UTF-8
Java
false
false
4,738
java
/* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.data.cassandra.repository.query; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.cassandra.core.CassandraOperations; import org.springframework.data.repository.query.EvaluationContextProvider; import org.springframework.data.repository.query.QueryCreationException; import org.springframework.expression.spel.standard.SpelExpressionParser; import com.datastax.driver.core.Cluster; import com.datastax.driver.core.CodecRegistry; import com.datastax.driver.core.Session; /** * String-based {@link AbstractCassandraQuery} implementation. * <p> * A {@link StringBasedCassandraQuery} expects a query method to be annotated with * {@link org.springframework.data.cassandra.repository.Query} with a CQL query. String-based queries support named, * index-based and expression parameters that are resolved during query execution. * * @author Matthew Adams * @author Mark Paluch * @see org.springframework.data.cassandra.repository.Query */ public class StringBasedCassandraQuery extends AbstractCassandraQuery { private static final Logger LOG = LoggerFactory.getLogger(StringBasedCassandraQuery.class); private final StringBasedQuery stringBasedQuery; /** * Create a new {@link StringBasedCassandraQuery} for the given {@link CassandraQueryMethod}, * {@link CassandraOperations}, {@link SpelExpressionParser}, and {@link EvaluationContextProvider}. * * @param queryMethod {@link CassandraQueryMethod} on which this query is based. * @param operations {@link CassandraOperations} used to perform data access in Cassandra. * @param expressionParser {@link SpelExpressionParser} used to parse expressions in the query. * @param evaluationContextProvider {@link EvaluationContextProvider} used to access the potentially shared * {@link org.springframework.expression.spel.support.StandardEvaluationContext}. */ public StringBasedCassandraQuery(CassandraQueryMethod queryMethod, CassandraOperations operations, SpelExpressionParser expressionParser, EvaluationContextProvider evaluationContextProvider) { this(queryMethod.getAnnotatedQuery(), queryMethod, operations, expressionParser, evaluationContextProvider); } /** * Create a new {@link StringBasedCassandraQuery} for the given {@code query}, {@link CassandraQueryMethod}, * {@link CassandraOperations}, {@link SpelExpressionParser}, and {@link EvaluationContextProvider}. * * @param query * @param queryMethod {@link CassandraQueryMethod} on which this query is based. * @param operations {@link CassandraOperations} used to perform data access in Cassandra. * @param expressionParser {@link SpelExpressionParser} used to parse expressions in the query. * @param evaluationContextProvider {@link EvaluationContextProvider} used to access the potentially shared * {@link org.springframework.expression.spel.support.StandardEvaluationContext}. */ public StringBasedCassandraQuery(String query, CassandraQueryMethod queryMethod, CassandraOperations operations, SpelExpressionParser expressionParser, EvaluationContextProvider evaluationContextProvider) { super(queryMethod, operations); Cluster cluster = operations.getCqlOperations().execute(Session::getCluster); CodecRegistry codecRegistry = cluster.getConfiguration().getCodecRegistry(); this.stringBasedQuery = new StringBasedQuery(query, new ExpressionEvaluatingParameterBinder(expressionParser, evaluationContextProvider), codecRegistry); } /* (non-Javadoc) * @see org.springframework.data.cassandra.repository.query.AbstractCassandraQuery#createQuery(org.springframework.data.cassandra.repository.query.CassandraParameterAccessor) */ @Override public String createQuery(CassandraParameterAccessor parameterAccessor) { try { String boundQuery = stringBasedQuery.bindQuery(parameterAccessor, getQueryMethod()); if (LOG.isDebugEnabled()) { LOG.debug(String.format("Created query [%s].", boundQuery)); } return boundQuery; } catch (RuntimeException e) { throw QueryCreationException.create(getQueryMethod(), e); } } }
[ "527474541@qq.com" ]
527474541@qq.com
e2c6b75935db257eda69bb1bf3466875304fb36a
d76a3bf1a5a1612e3f1cb99a2001f08c76e28631
/app/src/main/java/com/andview/example/stickyListHeaders/SectionIndexerAdapterWrapper.java
675c1b1066d0199e33b935ea733827427a079d2c
[ "Apache-2.0" ]
permissive
TommyLemon/XRefreshView
0c7b9fa53d9bf669382d74cec101306f289771c7
4749a9262fcd4fa8bf752f43563de43f34e80fed
refs/heads/master
2020-12-25T02:11:13.235683
2016-06-03T03:30:16
2016-06-03T03:30:16
60,349,959
2
1
null
2016-06-03T13:31:21
2016-06-03T13:31:20
null
UTF-8
Java
false
false
890
java
package com.andview.example.stickyListHeaders; import android.content.Context; import android.widget.SectionIndexer; class SectionIndexerAdapterWrapper extends AdapterWrapper implements SectionIndexer { final SectionIndexer mSectionIndexerDelegate; SectionIndexerAdapterWrapper(Context context, StickyListHeadersAdapter delegate) { super(context, delegate); mSectionIndexerDelegate = (SectionIndexer) delegate; } @Override public int getPositionForSection(int section) { return mSectionIndexerDelegate.getPositionForSection(section); } @Override public int getSectionForPosition(int position) { return mSectionIndexerDelegate.getSectionForPosition(position); } @Override public Object[] getSections() { return mSectionIndexerDelegate.getSections(); } }
[ "huxq17@163.com" ]
huxq17@163.com
253193f6f5da5f6dfe30b10a4f0fe763f39cd31f
99b2b9af045a29f1cfece5282460fe6151307da5
/engine/src/main/java/org/terasology/persistence/internal/EntityStorer.java
b77c5111ab39e3576e54614996d86de8e8c49df5
[ "Apache-2.0" ]
permissive
trentjones21/Terasology
1b8e9aaabdd4cf40756ef66a02a4332f31e36f8a
031924bf7ac507af5ae911d004af8d3eb43e83f5
refs/heads/master
2021-01-18T00:59:53.324146
2014-02-14T02:20:41
2014-02-14T02:20:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,483
java
/* * Copyright 2013 MovingBlocks * * 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.terasology.persistence.internal; import com.google.common.collect.Maps; import gnu.trove.set.TIntSet; import gnu.trove.set.hash.TIntHashSet; import org.terasology.entitySystem.Component; import org.terasology.entitySystem.entity.EntityRef; import org.terasology.entitySystem.entity.internal.EngineEntityManager; import org.terasology.entitySystem.entity.internal.OwnershipHelper; import org.terasology.entitySystem.metadata.ComponentMetadata; import org.terasology.persistence.serializers.EntitySerializer; import org.terasology.persistence.serializers.FieldSerializeCheck; import org.terasology.persistence.typeSerialization.typeHandlers.extension.EntityRefTypeHandler; import org.terasology.protobuf.EntityData; import java.util.Map; /** * @author Immortius */ final class EntityStorer implements EntityRefTypeHandler.EntityRefInterceptor { private final EngineEntityManager entityManager; private final EntitySerializer serializer; private final EntityData.EntityStore.Builder entityStoreBuilder; private final OwnershipHelper helper; private TIntSet externalReferences = new TIntHashSet(); private TIntSet storedEntityIds = new TIntHashSet(); public EntityStorer(EngineEntityManager entityManager) { this.entityManager = entityManager; this.entityStoreBuilder = EntityData.EntityStore.newBuilder(); this.serializer = new EntitySerializer(entityManager); this.helper = new OwnershipHelper(entityManager.getComponentLibrary()); Map<Class<? extends Component>, Integer> componentIds = Maps.newHashMap(); for (ComponentMetadata<?> componentMetadata : entityManager.getComponentLibrary().iterateComponentMetadata()) { entityStoreBuilder.addComponentClass(componentMetadata.getUri().toString()); componentIds.put(componentMetadata.getType(), componentIds.size()); } serializer.setComponentIdMapping(componentIds); } public void store(EntityRef entity, boolean deactivate) { store(entity, "", deactivate); } public void store(EntityRef entity, String name, boolean deactivate) { if (entity.isActive()) { for (EntityRef ownedEntity : helper.listOwnedEntities(entity)) { if (!ownedEntity.isAlwaysRelevant()) { if (!ownedEntity.isPersistent()) { if (deactivate) { ownedEntity.destroy(); } } else { store(ownedEntity, deactivate); } } } EntityRefTypeHandler.setReferenceInterceptor(this); EntityData.Entity entityData = serializer.serialize(entity, true, FieldSerializeCheck.NullCheck.<Component>newInstance()); EntityRefTypeHandler.setReferenceInterceptor(null); entityStoreBuilder.addEntity(entityData); if (!name.isEmpty()) { entityStoreBuilder.addEntityName(name); entityStoreBuilder.addEntityNamed(entityData.getId()); } storedEntityIds.add(entityData.getId()); externalReferences.remove(entityData.getId()); if (deactivate) { entityManager.deactivateForStorage(entity); } } } public EntityData.EntityStore finaliseStore() { return entityStoreBuilder.build(); } public TIntSet getExternalReferences() { return externalReferences; } @Override public boolean loadingRef(int id) { return true; } @Override public boolean savingRef(EntityRef ref) { if (!ref.isPersistent()) { return false; } if (!storedEntityIds.contains(ref.getId())) { externalReferences.add(ref.getId()); } return true; } }
[ "immortius@gmail.com" ]
immortius@gmail.com
d793a9eb2332465c3cf4d1f4802eab7d53739176
77f3f5e1d9c8d6560bb4697b57c28c14404b55aa
/erpwell/erpwell/trunk/SourceCode/Client/com.graly.erp.pur/src/com/graly/erp/internalorder/DeliveryDialog.java
b461692abb82b55741f99ca5f9049f291c6d5aad
[ "Apache-2.0" ]
permissive
liulong02/ERPL
b1871a1836c8e25af6a18d184b2f68f1b1bfdc5e
c8db598a3f762b357ae986050066098ce62bed44
refs/heads/master
2020-03-21T22:26:06.459293
2018-06-30T14:55:48
2018-06-30T14:55:48
139,126,269
0
0
null
2018-06-29T13:59:15
2018-06-29T08:57:20
null
GB18030
Java
false
false
3,104
java
package com.graly.erp.internalorder; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.forms.IMessageManager; import org.eclipse.ui.forms.ManagedForm; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.ScrolledForm; import com.graly.erp.inv.model.AlarmData; import com.graly.erp.ppm.model.MpsLineDelivery; import com.graly.framework.activeentity.model.ADTable; import com.graly.framework.base.entitymanager.dialog.InClosableTitleAreaDialog; import com.graly.framework.base.entitymanager.forms.EntityForm; import com.graly.framework.base.ui.util.Message; /** * @author Administrator * 用于修改质检备注信息 */ public class DeliveryDialog extends InClosableTitleAreaDialog { protected ManagedForm managedForm; private ADTable adTable; private MpsLineDelivery lineDelivery; private EntityForm entityForm; public DeliveryDialog(Shell parentShell, MpsLineDelivery lineDelivery,ADTable adTable) { super(parentShell); this.lineDelivery = lineDelivery; this.adTable = adTable; } @Override protected Control createDialogArea(Composite parent) { setTitle("添加主计划通知--交货期信息"); Composite composite = (Composite)super.createDialogArea(parent); FormToolkit toolkit = new FormToolkit(getShell().getDisplay()); ScrolledForm sForm = toolkit.createScrolledForm(composite); sForm.setLayoutData(new GridData(GridData.FILL_BOTH)); managedForm = new ManagedForm(toolkit, sForm); Composite body = sForm.getForm().getBody(); configureBody(body); final IMessageManager mmng = managedForm.getMessageManager(); entityForm = new EntityForm(body, SWT.NONE, lineDelivery, adTable, null); entityForm.setLayoutData(new GridData(GridData.FILL_BOTH)); // createContent(body, toolkit); return composite; } @Override protected void buttonPressed(int buttonId) { if (IDialogConstants.OK_ID == buttonId) { entityForm.saveToObject(); okPressed(); }else if (IDialogConstants.CANCEL_ID == buttonId) { cancelPressed(); } } @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, Message.getString("common.ok"), false); createButton(parent, IDialogConstants.CANCEL_ID, Message.getString("common.cancel"), false); } protected void configureBody(Composite body) { GridLayout layout = new GridLayout(2, false); layout.horizontalSpacing = 10; layout.verticalSpacing = 10; layout.marginHeight = 5; layout.marginWidth = 5; layout.marginLeft = 5; layout.marginRight = 5; layout.marginTop = 5; layout.marginBottom = 5; body.setLayout(layout); body.setLayoutData(new GridData(GridData.FILL_BOTH)); } public MpsLineDelivery getLineDelivery() { return lineDelivery; } public void setLineDelivery(MpsLineDelivery lineDelivery) { this.lineDelivery = lineDelivery; } }
[ "529409301@qq.com" ]
529409301@qq.com
00764d73355a5b503c1172b19ef96d5e9edefee7
6b962561d8792212d308d976905579b5996412dd
/src/test/java/com/jojoldu/batch/example/socketclose/RealSocketCloseSlowNoTxBatchTest.java
867a27c4ee2087a9e44e87b3b2ed49379fb5ca41
[]
no_license
Beom-Chu/spring-batch-in-action
f2b2f358b593b8e1131e73d8631e0a5687cec3d3
d21bb3fd607a0d04f56d8f713dd79185619f02be
refs/heads/master
2023-03-14T22:36:40.991131
2021-03-08T09:35:57
2021-03-08T09:35:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,061
java
package com.jojoldu.batch.example.socketclose; import com.jojoldu.batch.TestBatchConfig; import com.jojoldu.batch.entity.product.Store; import com.jojoldu.batch.entity.product.StoreRepository; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.batch.core.BatchStatus; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.JobParametersBuilder; import org.springframework.batch.test.JobLauncherTestUtils; import org.springframework.batch.test.context.SpringBatchTest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit.jupiter.SpringExtension; import static org.assertj.core.api.Assertions.assertThat; /** * Created by jojoldu@gmail.com on 11/09/2020 * Blog : http://jojoldu.tistory.com * Github : http://github.com/jojoldu */ @ExtendWith(SpringExtension.class) @SpringBootTest(classes = {TestBatchConfig.class, SocketCloseSlowNoTxBatch.class}) @SpringBatchTest @ActiveProfiles(profiles = "real") public class RealSocketCloseSlowNoTxBatchTest { @Autowired private JobLauncherTestUtils jobLauncherTestUtils; @Autowired private StoreRepository storeRepository; @AfterEach void after() { storeRepository.deleteAll(); } @Test public void ResourcelessTransactionManager를_사용하면_실패하지않는다() throws Exception { //given storeRepository.save(new Store("jojoldu")); JobParameters jobParameters = new JobParametersBuilder(jobLauncherTestUtils.getUniqueJobParameters()) .toJobParameters(); //when JobExecution jobExecution = jobLauncherTestUtils.launchJob(jobParameters); //then assertThat(jobExecution.getStatus()).isEqualTo(BatchStatus.COMPLETED); } }
[ "jojoldu@gmail.com" ]
jojoldu@gmail.com
b1a31d6d3b0ca9376bf5d96800dc2da12372f272
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Spring/Spring7537.java
663dbb27da2b8d64f5b50592059539279a23846b
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,837
java
@Test public void subcribeDisconnectPublish() { String sess1 = "sess1"; String sess2 = "sess2"; this.messageHandler.start(); this.messageHandler.handleMessage(createSubscriptionMessage(sess1, "sub1", "/foo")); this.messageHandler.handleMessage(createSubscriptionMessage(sess1, "sub2", "/foo")); this.messageHandler.handleMessage(createSubscriptionMessage(sess1, "sub3", "/bar")); this.messageHandler.handleMessage(createSubscriptionMessage(sess2, "sub1", "/foo")); this.messageHandler.handleMessage(createSubscriptionMessage(sess2, "sub2", "/foo")); this.messageHandler.handleMessage(createSubscriptionMessage(sess2, "sub3", "/bar")); SimpMessageHeaderAccessor headers = SimpMessageHeaderAccessor.create(SimpMessageType.DISCONNECT); headers.setSessionId(sess1); headers.setUser(new TestPrincipal("joe")); Message<byte[]> message = MessageBuilder.createMessage(new byte[0], headers.getMessageHeaders()); this.messageHandler.handleMessage(message); this.messageHandler.handleMessage(createMessage("/foo", "message1")); this.messageHandler.handleMessage(createMessage("/bar", "message2")); verify(this.clientOutboundChannel, times(4)).send(this.messageCaptor.capture()); Message<?> captured = this.messageCaptor.getAllValues().get(0); assertEquals(SimpMessageType.DISCONNECT_ACK, SimpMessageHeaderAccessor.getMessageType(captured.getHeaders())); assertSame(message, captured.getHeaders().get(SimpMessageHeaderAccessor.DISCONNECT_MESSAGE_HEADER)); assertEquals(sess1, SimpMessageHeaderAccessor.getSessionId(captured.getHeaders())); assertEquals("joe", SimpMessageHeaderAccessor.getUser(captured.getHeaders()).getName()); assertTrue(messageCaptured(sess2, "sub1", "/foo")); assertTrue(messageCaptured(sess2, "sub2", "/foo")); assertTrue(messageCaptured(sess2, "sub3", "/bar")); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
94617dee61e4d0113f2fbfebfd007b9a1f143959
29be9115918d0fd73606657bb1cb9074c928d2fa
/camel/jbpm-workitems-camel/src/main/java/org/jbpm/process/workitem/camel/uri/CXFURIMapper.java
056fc1a5f30c7356960a4ee1c6ee24d423186e19
[ "Apache-2.0" ]
permissive
jiripetrlik/fuse-bxms-integ
662b21321be296f78c719594b8f63c266a12b4fb
4b2f63e87c3fb1d67f4b85fb5415dc696092735b
refs/heads/master
2020-12-30T22:57:29.235327
2015-11-27T12:51:32
2015-11-27T13:38:56
38,488,307
0
1
null
2015-07-03T10:57:23
2015-07-03T10:57:22
null
UTF-8
Java
false
false
491
java
package org.jbpm.process.workitem.camel.uri; import java.net.URI; import java.net.URISyntaxException; import java.util.Map; public class CXFURIMapper extends URIMapper { //cxf://someAddress[?options] public CXFURIMapper() { super("cxf"); } @Override public URI toURI(Map<String, Object> options) throws URISyntaxException { String address = (String) options.get("address"); options.remove("address"); String path = address; return prepareCamelUri(path, options); } }
[ "kris.verlaenen@gmail.com" ]
kris.verlaenen@gmail.com
18505dfe7e49cd158652defb3383a558a98ef31e
a7497fae8dd751b07abe1c61dbb09d52f47f3d76
/org.isistan.flabot.executionstatemapping/src/org/isistan/flabot/executionstatemapping/editor/actions/EditPreFiltersAction.java
85d8537afa44f3dcc87f26ee525d5be3b7ab0e8e
[]
no_license
niconistal/FLABot
639388ec36e514cb6f8c63caa01530bff2e1fcbd
a118b9fd20c3ee44b6d2b456b3f7b362ce92327a
refs/heads/master
2021-03-12T19:52:59.571266
2013-01-29T01:46:46
2013-01-29T01:46:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,354
java
package org.isistan.flabot.executionstatemapping.editor.actions; import java.util.List; import org.eclipse.gef.commands.Command; import org.eclipse.gef.ui.actions.SelectionAction; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.internal.Workbench; import org.isistan.flabot.edit.editor.CommandExecutor; import org.isistan.flabot.edit.multipage.FlabotMultiPageEditor; import org.isistan.flabot.executionstatemapping.InterfacePluginExecutionStateMapping; import org.isistan.flabot.executionstatemapping.commands.diagram.AssignPreFiltersToStateContainerCommand; import org.isistan.flabot.executionstatemapping.dialogs.ExecutionConditionFilterDialog; import org.isistan.flabot.executionstatemapping.editor.editparts.StateDiagramEditPart; import org.isistan.flabot.executionstatemapping.messages.Messages; import org.isistan.flabot.executionstatemapping.model.semantic.ExecutionCondition; import org.isistan.flabot.executionstatemapping.model.semantic.StateContainer; import org.isistan.flabot.executionstatemapping.model.visual.StateDiagram; public class EditPreFiltersAction extends SelectionAction { /** * Action id */ public static final String EDIT_PREFILTERS = "Edit.PreFilters"; //$NON-NLS-1$ private StateContainer stateContainer; public EditPreFiltersAction(IWorkbenchPart part) { super(part); setText(Messages.getString("org.isistan.flabot.executionmapping.editor.actions.EditPreFiltersAction.actionText")); //$NON-NLS-1$ setToolTipText(Messages.getString("org.isistan.flabot.executionmapping.editor.actions.EditPreFiltersAction.actionTooltip")); //$NON-NLS-1$ setId(EDIT_PREFILTERS); } @Override protected boolean calculateEnabled() { return canPerformAction(); } @SuppressWarnings("unchecked") //$NON-NLS-1$ private boolean canPerformAction() { List selection = getSelectedObjects(); if (selection == null || selection.isEmpty()) { return false; } if (selection.size() > 1) { return false; } Object o = selection.get(0); if (o instanceof StateDiagramEditPart) { stateContainer = (StateContainer) ((StateDiagram)((StateDiagramEditPart)o).getModel()).getSemanticModel(); return true; } return false; } protected Command getCommand() { ExecutionConditionFilterDialog executionConditionDialog = new ExecutionConditionFilterDialog(); executionConditionDialog.build(Messages.getString("org.isistan.flabot.executionmapping.editor.actions.EditPreFiltersAction.preFilters"), InterfacePluginExecutionStateMapping.getFileModel(getEditor()), null, null); //$NON-NLS-1$ List<ExecutionCondition> newPreFilters = executionConditionDialog.showDialog(stateContainer.getPreFilters()); if (newPreFilters != null) { return new AssignPreFiltersToStateContainerCommand(stateContainer, newPreFilters); } return null; } @Override public void run() { CommandExecutor commandExecutor = (CommandExecutor)getWorkbenchPart().getAdapter(CommandExecutor.class); commandExecutor.executeCommand(getCommand(), false); } @SuppressWarnings("restriction") //$NON-NLS-1$ private FlabotMultiPageEditor getEditor() { return (FlabotMultiPageEditor) Workbench.getInstance().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); } }
[ "nistal.nicolas@gmail.com" ]
nistal.nicolas@gmail.com
2aa10a43cd31895fb8a0bc79c0814aaefb652c5b
0add69c608f614666166bd2b12264792ee023563
/jumbo-converters-cif/src/test/java/org/xmlcml/cml/converters/cif/dict/units/CIFUnitMapperTest.java
cf42975884c5577084767d92f00ac61c37b5d221
[ "Apache-2.0" ]
permissive
BlueObelisk/jumbo-converters
60d4963803ea9f3469136c67f67230ba81493b6f
858ba47240f3109db7d0338e572736eb6f8e5b61
refs/heads/master
2021-07-03T06:58:33.946886
2020-01-05T19:59:51
2020-01-05T19:59:51
230,640,192
5
1
Apache-2.0
2021-04-26T19:50:10
2019-12-28T17:20:13
Java
UTF-8
Java
false
false
838
java
package org.xmlcml.cml.converters.cif.dict.units; import static org.junit.Assert.*; import org.junit.Assert; import org.junit.Test; import org.xmlcml.cml.converters.cif.dict.units.CIFUnitMapper; import org.xmlcml.cml.converters.cif.dict.units.CifUnit; public class CIFUnitMapperTest { @Test public void testCIFUnitMapper() { CIFUnitMapper mapper = new CIFUnitMapper(); Assert.assertNotNull(mapper); } @Test public void testCifUnitMapperMap(){ CIFUnitMapper mapper = new CIFUnitMapper(); assertEquals(CifUnit.values().length, mapper.cifUnitMap.size()); } @Test public void testGetCMLIdFor() { CIFUnitMapper mapper = new CIFUnitMapper(); String cml=mapper.getCMLIdFor("A"); assertNotNull(cml); assertEquals("angstrom", cml); } }
[ "733515+petermr@users.noreply.github.com" ]
733515+petermr@users.noreply.github.com
8614684fbf9f6f847859dabedf318e728bc27a2a
2c7bbc8139c4695180852ed29b229bb5a0f038d7
/android/support/v7/widget/OrientationHelper$1.java
81fe593b3995185f128ba558010069163ec8d5a4
[]
no_license
suliyu/evolucionNetflix
6126cae17d1f7ea0bc769ee4669e64f3792cdd2f
ac767b81e72ca5ad636ec0d471595bca7331384a
refs/heads/master
2020-04-27T05:55:47.314928
2017-05-08T17:08:22
2017-05-08T17:08:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,844
java
// // Decompiled by Procyon v0.5.30 // package android.support.v7.widget; import android.view.View; final class OrientationHelper$1 extends OrientationHelper { OrientationHelper$1(final RecyclerView$LayoutManager recyclerView$LayoutManager) { super(recyclerView$LayoutManager, null); } @Override public int getDecoratedEnd(final View view) { return ((RecyclerView$LayoutParams)view.getLayoutParams()).rightMargin + this.mLayoutManager.getDecoratedRight(view); } @Override public int getDecoratedMeasurement(final View view) { final RecyclerView$LayoutParams recyclerView$LayoutParams = (RecyclerView$LayoutParams)view.getLayoutParams(); return recyclerView$LayoutParams.rightMargin + (this.mLayoutManager.getDecoratedMeasuredWidth(view) + recyclerView$LayoutParams.leftMargin); } @Override public int getDecoratedMeasurementInOther(final View view) { final RecyclerView$LayoutParams recyclerView$LayoutParams = (RecyclerView$LayoutParams)view.getLayoutParams(); return recyclerView$LayoutParams.bottomMargin + (this.mLayoutManager.getDecoratedMeasuredHeight(view) + recyclerView$LayoutParams.topMargin); } @Override public int getDecoratedStart(final View view) { return this.mLayoutManager.getDecoratedLeft(view) - ((RecyclerView$LayoutParams)view.getLayoutParams()).leftMargin; } @Override public int getEnd() { return this.mLayoutManager.getWidth(); } @Override public int getEndAfterPadding() { return this.mLayoutManager.getWidth() - this.mLayoutManager.getPaddingRight(); } @Override public int getEndPadding() { return this.mLayoutManager.getPaddingRight(); } @Override public int getMode() { return this.mLayoutManager.getWidthMode(); } @Override public int getModeInOther() { return this.mLayoutManager.getHeightMode(); } @Override public int getStartAfterPadding() { return this.mLayoutManager.getPaddingLeft(); } @Override public int getTotalSpace() { return this.mLayoutManager.getWidth() - this.mLayoutManager.getPaddingLeft() - this.mLayoutManager.getPaddingRight(); } @Override public int getTransformedEndWithDecoration(final View view) { this.mLayoutManager.getTransformedBoundingBox(view, true, this.mTmpRect); return this.mTmpRect.right; } @Override public int getTransformedStartWithDecoration(final View view) { this.mLayoutManager.getTransformedBoundingBox(view, true, this.mTmpRect); return this.mTmpRect.left; } @Override public void offsetChildren(final int n) { this.mLayoutManager.offsetChildrenHorizontal(n); } }
[ "sy.velasquez10@uniandes.edu.co" ]
sy.velasquez10@uniandes.edu.co
02163753ba9bd3742b51be19e4021b4e181e84a8
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_partial/762814.java
2fd496e20e861a93f353c29f74c4b0066b925279
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
574
java
class c762814 { public static void zipFile(String file, String entry) throws IOException { FileInputStream in = new FileInputStream(file); ZipOutputStream out = new ZipOutputStream(new FileOutputStream(file + ".zip")); out.putNextEntry(new ZipEntry(entry)); byte[] buffer = new byte[4096]; int bytes_read; while ((bytes_read = in.read(buffer)) != -1) out.write(buffer, 0, bytes_read); in.close(); out.closeEntry(); out.close(); File fin = new File(file); fin.delete(); } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
aff9f591a6ec548bb566c6a0212b0e932101779c
ccf94dcb6b1500fcbbd56964ae8c4832a496b8b3
/java/baiduads-sdk-auto/src/main/java/com/baidu/dev2/api/sdk/imagesegment/model/AddImageSegmentRequestWrapper.java
f7e03b5ae8fabad3dfd29f37e931bcccbb097cf8
[ "Apache-2.0" ]
permissive
baidu/baiduads-sdk
24c36b5cf3da9362ec5c8ecd417ff280421198ff
176363de5e8a4e98aaca039e4300703c3964c1c7
refs/heads/main
2023-06-08T15:40:24.787863
2023-05-20T03:40:51
2023-05-20T03:40:51
446,718,177
16
11
Apache-2.0
2023-06-02T05:19:40
2022-01-11T07:23:17
Python
UTF-8
Java
false
false
3,872
java
/* * dev2 api schema * 'dev2.baidu.com' api schema * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.baidu.dev2.api.sdk.imagesegment.model; import java.util.Objects; import java.util.Arrays; import com.baidu.dev2.api.sdk.imagesegment.model.AddImageSegmentRequestType; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; /** * AddImageSegmentRequestWrapper */ @JsonPropertyOrder({ AddImageSegmentRequestWrapper.JSON_PROPERTY_HEADER, AddImageSegmentRequestWrapper.JSON_PROPERTY_BODY }) @JsonTypeName("AddImageSegmentRequestWrapper") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class AddImageSegmentRequestWrapper { public static final String JSON_PROPERTY_HEADER = "header"; private com.baidu.dev2.api.sdk.common.ApiRequestHeader header; public static final String JSON_PROPERTY_BODY = "body"; private AddImageSegmentRequestType body; public AddImageSegmentRequestWrapper() { } public AddImageSegmentRequestWrapper header(com.baidu.dev2.api.sdk.common.ApiRequestHeader header) { this.header = header; return this; } /** * Get header * @return header **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_HEADER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public com.baidu.dev2.api.sdk.common.ApiRequestHeader getHeader() { return header; } @JsonProperty(JSON_PROPERTY_HEADER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setHeader(com.baidu.dev2.api.sdk.common.ApiRequestHeader header) { this.header = header; } public AddImageSegmentRequestWrapper body(AddImageSegmentRequestType body) { this.body = body; return this; } /** * Get body * @return body **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BODY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public AddImageSegmentRequestType getBody() { return body; } @JsonProperty(JSON_PROPERTY_BODY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setBody(AddImageSegmentRequestType body) { this.body = body; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AddImageSegmentRequestWrapper addImageSegmentRequestWrapper = (AddImageSegmentRequestWrapper) o; return Objects.equals(this.header, addImageSegmentRequestWrapper.header) && Objects.equals(this.body, addImageSegmentRequestWrapper.body); } @Override public int hashCode() { return Objects.hash(header, body); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AddImageSegmentRequestWrapper {\n"); sb.append(" header: ").append(toIndentedString(header)).append("\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "jiangyuan04@baidu.com" ]
jiangyuan04@baidu.com
b1cf301e64b4a1023ee3afa448ec4fcaf010f13d
38c4451ab626dcdc101a11b18e248d33fd8a52e0
/identifiers/apache-ant-1.8.4/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapter.java
5f8de0ccfdb984902aecfa086d598788c8984353
[]
no_license
habeascorpus/habeascorpus-data
47da7c08d0f357938c502bae030d5fb8f44f5e01
536d55729f3110aee058ad009bcba3e063b39450
refs/heads/master
2020-06-04T10:17:20.102451
2013-02-19T15:19:21
2013-02-19T15:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
732
java
org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false tools PACKAGE_IDENTIFIER false ant PACKAGE_IDENTIFIER false taskdefs PACKAGE_IDENTIFIER false compilers PACKAGE_IDENTIFIER false org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false tools PACKAGE_IDENTIFIER false ant PACKAGE_IDENTIFIER false BuildException TYPE_IDENTIFIER false org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false tools PACKAGE_IDENTIFIER false ant PACKAGE_IDENTIFIER false taskdefs PACKAGE_IDENTIFIER false Javac TYPE_IDENTIFIER false CompilerAdapter TYPE_IDENTIFIER true setJavac METHOD_IDENTIFIER true Javac TYPE_IDENTIFIER false attributes VARIABLE_IDENTIFIER true execute METHOD_IDENTIFIER true BuildException TYPE_IDENTIFIER false
[ "pschulam@gmail.com" ]
pschulam@gmail.com
0176838ebad2abe343b1a1f3afcf67819d5d93b7
449cc92656d1f55bd7e58692657cd24792847353
/weixin-service/src/main/java/com/lj/business/weixin/dto/smallprogram/FindWxSmallProgramPage.java
61b16f6cc7a52bea0a4360e370b986ebb9468cbc
[]
no_license
cansou/HLM
f80ae1c71d0ce8ead95c00044a318796820a8c1e
69d859700bfc074b5948b6f2c11734ea2e030327
refs/heads/master
2022-08-27T16:40:17.206566
2019-12-18T06:48:10
2019-12-18T06:48:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,773
java
package com.lj.business.weixin.dto.smallprogram; import java.util.List; import com.lj.base.core.pagination.PageParamEntity; public class FindWxSmallProgramPage extends PageParamEntity { /** * */ private static final long serialVersionUID = -3341808674212809821L; /** * 中控微信号 . */ private String noWxZk; /** * 类型 . */ private String type; /** * 小程序名称 . */ private String spName; /** * 状态:0无效、1有效 . */ private Integer status; /** * 终端编号 . */ /** * 商户编号 . */ private String merchantNo; /** 终端编号集合. */ private List<String> shopNos; /** * 中控微信号 . * */ public String getNoWxZk() { return noWxZk; } /** * 中控微信号 . * */ public void setNoWxZk(String noWxZk) { this.noWxZk = noWxZk == null ? null : noWxZk.trim(); } /** * 类型 . * */ public String getType() { return type; } /** * 类型 . * */ public void setType(String type) { this.type = type == null ? null : type.trim(); } /** * 状态:0无效、1有效 . * */ public Integer getStatus() { return status; } /** * 状态:0无效、1有效 . * */ public void setStatus(Integer status) { this.status = status; } /** * 商户编号 . * */ public String getMerchantNo() { return merchantNo; } /** * 商户编号 . * */ public void setMerchantNo(String merchantNo) { this.merchantNo = merchantNo == null ? null : merchantNo.trim(); } /** * @return the spName */ public String getSpName() { return spName; } /** * @param spName the spName to set */ public void setSpName(String spName) { this.spName = spName; } /** * @return the shopNos */ public List<String> getShopNos() { return shopNos; } /** * @param shopNos the shopNos to set */ public void setShopNos(List<String> shopNos) { this.shopNos = shopNos; } /** * 输出BEAN数据信息 * @author LeoPeng */ public String toString() { StringBuilder builder = new StringBuilder(); builder.append("FindWxSmallProgramPage [noWxZk=").append(noWxZk); builder.append(",type=").append(type); builder.append(",spName=").append(spName); builder.append(",status=").append(status); builder.append(",merchantNo=").append(merchantNo); builder.append(",shopNos=").append(shopNos); builder.append("]"); return builder.toString(); } }
[ "37724558+wo510751575@users.noreply.github.com" ]
37724558+wo510751575@users.noreply.github.com
669fbe1c95f53ac04ff5d790171942867b1840a4
be28a7b64a4030f74233a79ebeba310e23fe2c3a
/generated-tests/qmosa/tests/s1010/85_shop/evosuite-tests/umd/cs/shop/JSTerm_ESTest_scaffolding.java
52ff51ad23c86847aab4d4abdd8bf2e7b0239dca
[ "MIT" ]
permissive
blindsubmissions/icse19replication
664e670f9cfcf9273d4b5eb332562a083e179a5f
42a7c172efa86d7d01f7e74b58612cc255c6eb0f
refs/heads/master
2020-03-27T06:12:34.631952
2018-08-25T11:19:56
2018-08-25T11:19:56
146,074,648
0
0
null
null
null
null
UTF-8
Java
false
false
4,959
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Aug 24 12:18:02 GMT 2018 */ package umd.cs.shop; 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; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class JSTerm_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 = "umd.cs.shop.JSTerm"; 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(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @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("file.encoding", "UTF-8"); java.lang.System.setProperty("java.awt.headless", "true"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); java.lang.System.setProperty("user.country", "US"); java.lang.System.setProperty("user.dir", "/home/ubuntu/evosuite_readability_gen/projects/85_shop"); java.lang.System.setProperty("user.home", "/home/ubuntu"); java.lang.System.setProperty("user.language", "en"); java.lang.System.setProperty("user.name", "ubuntu"); java.lang.System.setProperty("user.timezone", "Etc/UTC"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(JSTerm_ESTest_scaffolding.class.getClassLoader() , "umd.cs.shop.JSUtil", "umd.cs.shop.JSPairVarTerm", "umd.cs.shop.JSJshopVars", "umd.cs.shop.JSTerm", "umd.cs.shop.JSParserError", "umd.cs.shop.JSEvaluate", "umd.cs.shop.JSPredicateForm", "umd.cs.shop.JSSubstitution" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("java.util.function.Function", false, JSTerm_ESTest_scaffolding.class.getClassLoader())); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(JSTerm_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "umd.cs.shop.JSPredicateForm", "umd.cs.shop.JSTerm", "umd.cs.shop.JSJshopVars", "umd.cs.shop.JSEvaluate", "umd.cs.shop.JSSubstitution", "umd.cs.shop.JSUtil", "umd.cs.shop.JSParserError", "umd.cs.shop.JSPairVarTerm" ); } }
[ "my.submission.blind@gmail.com" ]
my.submission.blind@gmail.com
86083c97cf5004a44e2ad12cd522d5f61bf5d604
39ff4b44e729c0510fe1c161da2469c63ed4c71f
/MAVGCL/src/com/comino/flight/ui/widgets/view3D/objects/VehicleModel.java
aca2537973b7ccf494c36c30379bf4fe53ff42d3
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
hudaoyang/MAVGCL
1c587181a028ec30656cab40af9bd85ab8e708de
d9eeda47862156dedcf3d52b5dbd3984c5fd56fb
refs/heads/master
2022-11-27T04:43:43.639100
2020-08-06T13:54:07
2020-08-06T13:54:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,703
java
/**************************************************************************** * * Copyright (c) 2017,2018 Eike Mansfeld ecm@gmx.de. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ package com.comino.flight.ui.widgets.view3D.objects; import com.comino.flight.model.AnalysisDataModel; import com.comino.mavutils.MSPMathUtils; import com.interactivemesh.jfx.importer.obj.ObjModelImporter; import javafx.geometry.Point3D; import javafx.scene.Group; import javafx.scene.shape.MeshView; import javafx.scene.transform.Affine; import javafx.scene.transform.Rotate; public class VehicleModel extends Group { private ObjModelImporter obj = null; private MeshView[] mesh = null; public Rotate rx = new Rotate(0, Rotate.X_AXIS); public Rotate ry = new Rotate(0, Rotate.Y_AXIS); public Rotate rz = new Rotate(0, Rotate.Z_AXIS); public VehicleModel(float scale) { super(); obj = new ObjModelImporter(); obj.read(this.getClass().getResource("resources/quad_x.obj")); mesh = obj.getImport(); this.setScaleX(scale); this.setScaleY(scale); this.setScaleZ(scale); } public void updateState(AnalysisDataModel model) { // model.setValue("LPOSZ", -2.0); // model.setValue("LPOSX", 1.0); // model.setValue("LPOSY", 1.0); // model.setValue("YAW", MSPMathUtils.toRad(45)); // model.setValue("ROLL", MSPMathUtils.toRad(10)); // model.setValue("PITCH", MSPMathUtils.toRad(0)); this.getTransforms().clear(); this.addRotate(this, this.ry, 180-MSPMathUtils.fromRad(model.getValue("YAW"))-90); this.addRotate(this, this.rz, 180-MSPMathUtils.fromRad(model.getValue("PITCH"))); this.addRotate(this, this.rx, MSPMathUtils.fromRad(model.getValue("ROLL"))+90); this.setTranslateX(-model.getValue("LPOSY")*100); this.setTranslateY(model.getValue("LPOSZ") > 0 ? 0 : -model.getValue("LPOSZ") *100); this.setTranslateZ(model.getValue("LPOSX")*100); // this.setTranslate(-model.getValue("LPOSY")*100, model.getValue("LPOSZ") > 0 ? 0 : -model.getValue("LPOSZ") *100, model.getValue("LPOSX")*100); // this.ry.setAngle(180-MSPMathUtils.fromRad(model.getValue("YAW"))+90); } public void show(boolean show) { if(show) this.getChildren().addAll(mesh); else this.getChildren().clear(); } private void addRotate(Group node, Rotate rotate, double angle) { Affine affine = node.getTransforms().isEmpty() ? new Affine() : new Affine(node.getTransforms().get(0)); double A11 = affine.getMxx(), A12 = affine.getMxy(), A13 = affine.getMxz(); double A21 = affine.getMyx(), A22 = affine.getMyy(), A23 = affine.getMyz(); double A31 = affine.getMzx(), A32 = affine.getMzy(), A33 = affine.getMzz(); // rotations over local axis Rotate newRotateX = new Rotate(angle, new Point3D(A11, A21, A31)); Rotate newRotateY = new Rotate(angle, new Point3D(A12, A22, A32)); Rotate newRotateZ = new Rotate(angle, new Point3D(A13, A23, A33)); // apply rotation affine.prepend(rotate.getAxis() == Rotate.X_AXIS ? newRotateX : rotate.getAxis() == Rotate.Y_AXIS ? newRotateY : newRotateZ); node.getTransforms().setAll(affine); } }
[ "ecm@gmx.de" ]
ecm@gmx.de
234cb96b4f8cf14f50e12998d2c19fa568deb3f5
b5562349ad9ba8230aba41fd683c5496fd03bb2d
/LoxleyColourActivity/src/org/com/vn/loxleycolour/views/orderinprogress/ItemProgressDetailView.java
7b7f68705d6d32064a620bd6215173caa1bb06c5
[]
no_license
fordream/store-vnp2
fb35fc84db56d41e6ac8ba740488758dd2f458bd
c404ad48996ab82b16fe42914e75d5afdedca169
refs/heads/master
2021-01-12T21:02:33.900974
2015-10-23T14:35:54
2015-10-23T14:35:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,791
java
package org.com.vn.loxleycolour.views.orderinprogress; import org.com.vn.loxleycolour.CommonApp; import org.com.vn.loxleycolour.v1.R; import org.com.vn.loxleycolour._interface.Const; import org.com.vn.loxleycolour._interface.IView; import org.com.vn.loxleycolour.items.order1.ItemGetMyOrderItems; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.widget.LinearLayout; import android.widget.TextView; public class ItemProgressDetailView extends LinearLayout implements OnClickListener, Const, IView { public ItemProgressDetailView(Context context) { super(context); init(); } public ItemProgressDetailView(Context context, AttributeSet attrs) { super(context, attrs); init(); } private void init() { LayoutInflater li = (LayoutInflater) getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE); li.inflate(R.layout.item_detail_progress, this); } public void onClick(View view) { } public void reset() { } public View setData(ItemGetMyOrderItems itemOrder) { getTextView(R.id.TextView05).setText(""); ; getTextView(R.id.TextView04).setText(CommonApp.convertQty(itemOrder.Quantity)); getTextView(R.id.TextView03).setText(CommonApp.convertMoney(itemOrder.UnitCost)); getTextView(R.id.TextView02).setText(CommonApp.convertMoney(itemOrder.DiscountAmount)); getTextView(R.id.TextView01).setText(CommonApp.convertMoney(itemOrder.Amount)); getTextView(R.id.textView2).setText(CommonApp.convertPer(itemOrder.AmountIncVAT)); // getTextView(R.id.textView1).setText(itemOrder.ItemDescription); return this; } private TextView getTextView(int res) { return (TextView) findViewById(res); } }
[ "truongvv@atmarkcafe.org" ]
truongvv@atmarkcafe.org
c266e9962d772aa624c104700825a9ee983e4881
462c6815dadc83b1bd406fba29ab0c905cf4bc05
/src/bee/generated/server/GetPkcs10Request.java
f3877173f3e3565e565377a0516265eecd95d913
[]
no_license
francoisperron/learning-soap-onvif
ab89b38d770547c0b9ad17a45865c7b8adea5d09
6a0ed9167ad8c2369993da21a5d115a309f42e16
refs/heads/master
2020-05-14T23:53:35.084374
2019-04-18T02:33:17
2019-04-18T02:33:17
182,002,749
1
0
null
null
null
null
UTF-8
Java
false
false
3,357
java
package bee.generated.server; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="CertificateID" type="{http://www.w3.org/2001/XMLSchema}token"/> * &lt;element name="Subject" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Attributes" type="{http://www.onvif.org/ver10/schema}BinaryData" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "certificateID", "subject", "attributes" }) @XmlRootElement(name = "GetPkcs10Request", namespace = "http://www.onvif.org/ver10/device/wsdl") public class GetPkcs10Request { @XmlElement(name = "CertificateID", namespace = "http://www.onvif.org/ver10/device/wsdl", required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") protected String certificateID; @XmlElement(name = "Subject", namespace = "http://www.onvif.org/ver10/device/wsdl") protected String subject; @XmlElement(name = "Attributes", namespace = "http://www.onvif.org/ver10/device/wsdl") protected BinaryData attributes; /** * Gets the value of the certificateID property. * * @return * possible object is * {@link String } * */ public String getCertificateID() { return certificateID; } /** * Sets the value of the certificateID property. * * @param value * allowed object is * {@link String } * */ public void setCertificateID(String value) { this.certificateID = value; } /** * Gets the value of the subject property. * * @return * possible object is * {@link String } * */ public String getSubject() { return subject; } /** * Sets the value of the subject property. * * @param value * allowed object is * {@link String } * */ public void setSubject(String value) { this.subject = value; } /** * Gets the value of the attributes property. * * @return * possible object is * {@link BinaryData } * */ public BinaryData getAttributes() { return attributes; } /** * Sets the value of the attributes property. * * @param value * allowed object is * {@link BinaryData } * */ public void setAttributes(BinaryData value) { this.attributes = value; } }
[ "fperron@gmail.com" ]
fperron@gmail.com
83017bde908ec21f6cebf04c0423ba4d1c5839a5
e3990e8c3b1e0b8824a0a19bf9d12e48441def7a
/ebean-test/src/test/java/org/tests/model/m2o/Addr.java
83e06d26bbf7a42b120d214b9e535cbbff6ebbc4
[ "Apache-2.0" ]
permissive
ebean-orm/ebean
13c9c465f597dd2cf8b3e54e4b300543017c9dee
bfe94786de3c3b5859aaef5afb3a7572e62275c4
refs/heads/master
2023-08-22T12:57:34.271133
2023-08-22T11:43:41
2023-08-22T11:43:41
5,793,895
1,199
224
Apache-2.0
2023-09-11T14:05:26
2012-09-13T11:49:56
Java
UTF-8
Java
false
false
1,262
java
package org.tests.model.m2o; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.Version; @Entity public class Addr { @Id Long id; @ManyToOne Empl employee; String name; String addressLine1; String addressLine2; String city; @Version long version; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Empl getEmployee() { return employee; } public void setEmployee(Empl employee) { this.employee = employee; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAddressLine1() { return addressLine1; } public void setAddressLine1(String addressLine1) { this.addressLine1 = addressLine1; } public String getAddressLine2() { return addressLine2; } public void setAddressLine2(String addressLine2) { this.addressLine2 = addressLine2; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public long getVersion() { return version; } public void setVersion(long version) { this.version = version; } }
[ "robin.bygrave@gmail.com" ]
robin.bygrave@gmail.com
b7f4b544d1624c446a8c7775c33c50fbb8969e62
40516a259b130f4c769b6ff676b0e43af61fc535
/org/omg/DynamicAny/NameValuePairHelper.java
a4e05c1f328210c1244c3a1cbff5ec700c2c96f7
[]
no_license
ZhaoX/jdk-1.8-annotated
cedefd7de37cf75c03a94f1668f2332af2c9f5ea
d65e52317f29d07f591a05cba0cc379d1ea9eee7
refs/heads/master
2020-05-30T02:57:29.398745
2019-05-31T01:27:03
2019-05-31T01:27:03
189,505,842
1
0
null
null
null
null
UTF-8
Java
false
false
2,766
java
package org.omg.DynamicAny; /** * org/omg/DynamicAny/NameValuePairHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u102/7268/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl * Wednesday, June 22, 2016 1:16:37 PM PDT */ abstract public class NameValuePairHelper { private static String _id = "IDL:omg.org/DynamicAny/NameValuePair:1.0"; public static void insert (org.omg.CORBA.Any a, org.omg.DynamicAny.NameValuePair that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static org.omg.DynamicAny.NameValuePair extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; private static boolean __active = false; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.DynamicAny.FieldNameHelper.id (), "FieldName", _tcOf_members0); _members0[0] = new org.omg.CORBA.StructMember ( "id", _tcOf_members0, null); _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_any); _members0[1] = new org.omg.CORBA.StructMember ( "value", _tcOf_members0, null); __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.omg.DynamicAny.NameValuePairHelper.id (), "NameValuePair", _members0); __active = false; } } } return __typeCode; } public static String id () { return _id; } public static org.omg.DynamicAny.NameValuePair read (org.omg.CORBA.portable.InputStream istream) { org.omg.DynamicAny.NameValuePair value = new org.omg.DynamicAny.NameValuePair (); value.id = istream.read_string (); value.value = istream.read_any (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.DynamicAny.NameValuePair value) { ostream.write_string (value.id); ostream.write_any (value.value); } }
[ "zhaoxina@gmail.com" ]
zhaoxina@gmail.com
a880840e0727f4ed79215b8afee562646554a914
e3b1a99ff96c50674651236cbb5ad67c6a5332b0
/working-effectively-with-legacycode-java/src/main/java/com/uj/seam/objectseam/CustomSpreadSheet.java
a1aa3b9d29066e64297850a67899fc0432c384e5
[]
no_license
unclejet/software-craftsman-ship
6388864bf4acaa0b543b0e26d65dd110a8ebac5b
6310c5b618f32cb84ff193e625b6c38a8469f460
refs/heads/master
2023-03-31T11:36:18.494187
2021-04-05T01:25:34
2021-04-05T01:25:34
292,982,586
0
0
null
null
null
null
UTF-8
Java
false
false
222
java
package com.uj.seam.objectseam; /** * Created by jehan on 12/2/2014. */ public class CustomSpreadSheet extends SpreadSheet { @Override protected void recalculate(Cell cell) { cell.recalculate(); } }
[ "unclejet@126.com" ]
unclejet@126.com
d21442653ebb3213c35fc771b351ed86a773e395
875d88ee9cf7b40c9712178d1ee48f0080fa0f8a
/geronimo-validation_1.1_spec/src/main/java/javax/validation/executable/ValidateOnExecution.java
ac7c6c60e1fbd461f360c0fdae9d82bcc8c6388f
[ "Apache-2.0", "W3C", "W3C-19980720" ]
permissive
jgallimore/geronimo-specs
b152164488692a7e824c73a9ba53e6fb72c6a7a3
09c09bcfc1050d60dcb4656029e957837f851857
refs/heads/trunk
2022-12-15T14:02:09.338370
2020-09-14T18:21:46
2020-09-14T18:21:46
284,994,475
0
1
Apache-2.0
2020-09-14T18:21:47
2020-08-04T13:51:47
Java
UTF-8
Java
false
false
1,389
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 javax.validation.executable; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** @since 1.1 */ @Target({ CONSTRUCTOR, METHOD, TYPE, PACKAGE }) @Retention(RUNTIME) public @interface ValidateOnExecution { ExecutableType[] type() default { ExecutableType.IMPLICIT }; }
[ "rmannibucau@apache.org" ]
rmannibucau@apache.org