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
9b208858eb95edda9b152dbd9b16c3c175c1d6ab
ee461488c62d86f729eda976b421ac75a964114c
/tags/HtmlUnit-1dot1/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript/host/Input.java
7b870e68dc25010a077a273edb7191df944b94c0
[]
no_license
svn2github/htmlunit
2c56f7abbd412e6d9e0efd0934fcd1277090af74
6fc1a7d70c08fb50fef1800673671fd9cada4899
refs/heads/master
2023-09-03T10:35:41.987099
2015-07-26T13:12:45
2015-07-26T13:12:45
37,107,064
0
1
null
null
null
null
UTF-8
Java
false
false
4,490
java
/* * Copyright (C) 2002 Gargoyle Software Inc. All rights reserved. * * This file is part of HtmlUnit. For details on use and redistribution * please refer to the license.html file included with these sources. */ package com.gargoylesoftware.htmlunit.javascript.host; import org.w3c.dom.Element; /** * The javascript object that represents something that can be put in a form. * *@version $Revision$ *@author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> */ public class Input extends HTMLElement { /** * Create an instance. */ public Input() { } /** * Javascript constructor. This must be declared in every javascript file * because the rhino engine won't walk up the hierarchy looking for * constructors. */ public void jsConstructor() { } /** * Return the value of the javascript attribute "value". * *@return The value of this attribute. */ public String jsGet_value() { return getHtmlElementOrDie().getAttributeValue( "value" ); } /** * Set the value of the javascript attribute "value". * *@param newValue The new value. */ public void jsSet_value( final String newValue ) { getHtmlElementOrDie().getElement().setAttribute( "value", newValue ); } /** * Return the value of the javascript attribute "name". * *@return The value of this attribute. */ public String jsGet_name() { return getHtmlElementOrDie().getAttributeValue( "name" ); } /** * Return the value of the javascript attribute "form". * *@return The value of this attribute. */ public Form jsGet_form() { return (Form)getHtmlElementOrDie().getEnclosingForm().getScriptObject(); } /** * Return the value of the javascript attribute "type". * *@return The value of this attribute. */ public String jsGet_type() { return "Foobar"; } /** * Set the checked property. Although this property is defined in Input it * doesn't make any sense for input's other than checkbox and radio. This * implementation does nothing. The implementations in Checkbox and Radio * actually do the work. * *@param checked True if this input should have the "checked" attribute * set */ public void jsSet_checked( final boolean checked ) { getLog().debug( "Input.jsSet_checked(" + checked + ") was called for class " + getClass().getName() ); } /** * Return the value of the checked property. Although this property is * defined in Input it doesn't make any sense for input's other than * checkbox and radio. This implementation does nothing. The * implementations in Checkbox and Radio actually do the work. * *@return The checked property. */ public boolean jsGet_checked() { getLog().warn( "Input.jsGet_checked() was called for class " + getClass().getName() ); return false; } /** * Set the focus to this element. */ public void jsFunction_focus() { getLog().debug( "Input.jsFunction_focus() not implemented" ); } /** * Remove focus from this element */ public void jsFunction_blur() { getLog().debug( "Input.jsFunction_blur() not implemented" ); } /** * Click this element. This simulates the action of the user clicking with the mouse. */ public void jsFunction_click() { getLog().debug( "Input.jsFunction_click() not implemented" ); } /** * Select this element. */ public void jsFunction_select() { getLog().debug( "Input.jsFunction_select() not implemented" ); } /** * Return true if this element is disabled. * @return True if this element is disabled. */ public boolean jsGet_disabled() { return getHtmlElementOrDie().isAttributeDefined("disabled"); } /** * Set whether or not to disable this element * @param disabled True if this is to be disabled. */ public void jsSet_disabled( final boolean disabled ) { final Element xmlElement = getHtmlElementOrDie().getElement(); if( disabled ) { xmlElement.setAttribute("disabled", "disabled"); } else { xmlElement.removeAttribute("disabled"); } } }
[ "(no author)@5f5364db-9458-4db8-a492-e30667be6df6" ]
(no author)@5f5364db-9458-4db8-a492-e30667be6df6
137fcd483e04eba217e5f9c2f63e8e004a044abe
0d39e46be7c84a4a38a56743744ec15994e8c8b1
/src/main/java/com/example/googleactionswebhooks/hook/google/api/generic/GAType.java
c5da94d2f4b330f4c45fb6c9ba36a76912703234
[]
no_license
ekim197711/google-actions-webhooks
5c02832d23cfe81ca4fad55692c0ab6ec1a90182
d259d7844d9ee5f995fb089e5a231955a46c8b21
refs/heads/main
2023-01-22T10:42:23.622969
2020-11-23T23:01:40
2020-11-23T23:01:40
309,348,932
1
1
null
null
null
null
UTF-8
Java
false
false
323
java
package com.example.googleactionswebhooks.hook.google.api.generic; public enum GAType { /** * type unspecified, should not set this explicitly. */ TYPE_UNSPECIFIED, /** * Only update status of the order. */ ORDER_STATUS, /** * Update order snapshot. */ SNAPSHOT }
[ "mmni@protonmail.com" ]
mmni@protonmail.com
530bfb2ff0f2e6ed32e2c0080736b2792791ad2d
de07223f56ea4b82e06bdb7dac671cdfae256b4f
/sf-house-bean/src/test/java/sf/house/bean/FunctionUtilTest.java
a0e8f489579e676aa25363c45fcdcc6ee3e27b5d
[]
no_license
nigel1000/sf-house
0fab60f731f90bced53eea4269ee4d290af0441f
786240fe86232c91fc2c40e622afa8687bdbeb82
refs/heads/master
2020-04-05T10:56:26.253066
2019-03-06T03:05:58
2019-03-06T03:05:58
144,843,938
0
0
null
null
null
null
UTF-8
Java
false
false
1,045
java
package sf.house.bean; import lombok.extern.slf4j.Slf4j; import sf.house.bean.util.FunctionUtil; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; /** * Created by hznijianfeng on 2018/11/14. */ @Slf4j public class FunctionUtilTest { public static void main(String[] args) { List<Object> result = FunctionUtil.batchFunctionResults( Arrays.asList( list -> list.stream().collect(Collectors.summarizingInt(x -> x)), list -> list.stream().filter(x -> x < 50).sorted().collect(Collectors.toList()), list -> list.stream().collect(Collectors.groupingBy(x -> (x % 2 == 0 ? "even" : "odd"))), list -> list.stream().sorted().collect(Collectors.toList()), list -> list.stream().sorted().map(Math::sqrt).collect(Collectors.toMap(x -> x, y -> Math.pow(2, y)))), Arrays.asList(64, 49, 25, 16, 9, 4, 1, 81, 36)); log.info("{}", result); } }
[ "xiaodangjia@gov.cn" ]
xiaodangjia@gov.cn
f6e506ce3dd8763a62241b999107f931095efaa5
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/cgeo_c-geo-opensource/main/src/cgeo/geocaching/loaders/NextPageGeocacheListLoader.java
e2c58af05b28944c5c4f090940d3311d6e72025a
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
896
java
// isComment package cgeo.geocaching.loaders; import cgeo.geocaching.SearchResult; import cgeo.geocaching.connector.ConnectorFactory; import cgeo.geocaching.connector.capability.ISearchByNextPage; import android.app.Activity; import io.reactivex.functions.Function; public class isClassOrIsInterface extends AbstractSearchLoader { private final SearchResult isVariable; public isConstructor(final Activity isParameter, final SearchResult isParameter) { super(isNameExpr); this.isFieldAccessExpr = isNameExpr; } @Override public SearchResult isMethod() { return isNameExpr.isMethod(isNameExpr.isMethod(), new Function<ISearchByNextPage, SearchResult>() { @Override public SearchResult isMethod(final ISearchByNextPage isParameter) { return isNameExpr.isMethod(isNameExpr); } }); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
2630d16ee403f2018aed58daf23cf7d50524c5ce
1977757fa8a337e3346795cfb1ceca9ae95b97fb
/src/day25/Task1.java
ba8c43783f8756b9bf5b1f155e313593c2541318
[]
no_license
Tarana82/MyFirstProject
fcb3e81c3659e9f846a71c7856fcf4ba914e15ad
6fe9bb5f1d90812f6c2e5ef68ba275435a7cabce
refs/heads/master
2021-02-11T16:22:21.801471
2020-03-03T03:33:39
2020-03-03T03:33:39
244,509,280
0
0
null
null
null
null
UTF-8
Java
false
false
280
java
package day25; import java.util.Arrays; public class Task1 { public static void main(String[] args) { String myName = "Tarana"; char [] myNamesChar = myName.toCharArray(); System.out.println("My name Char = " + Arrays.toString(myNamesChar)); } }
[ "tahmadova1982@gmail.com" ]
tahmadova1982@gmail.com
b05e88cf92eb7d36733e71a0bec545fbbc2edb8d
8b27f0d905f724cb6a18e75fc5b082c18d24b203
/app/src/main/java/com/dawoo/lotterybox/adapter/hall/parent/BannerViewHolder.java
7f673d87d69642421a218bdd55a4a646761a8181
[]
no_license
easyGuyLyn/lt_b_pai
96a03989e6075dc731e76d5f83bfbb93a8664c50
a63853d73cf1e2b3a8a0e002af08a54d632f4990
refs/heads/master
2023-04-04T11:48:20.736794
2021-04-05T04:31:32
2021-04-05T04:31:32
140,645,815
1
0
null
null
null
null
UTF-8
Java
false
false
1,600
java
package com.dawoo.lotterybox.adapter.hall.parent; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.View; import com.dawoo.lotterybox.ConstantValue; import com.dawoo.lotterybox.R; import com.dawoo.lotterybox.adapter.hall.child.BaseViewHolder; import com.dawoo.lotterybox.adapter.hall.child.adapterset.BannerConfigInit; import com.dawoo.lotterybox.bean.BannerBean; import com.dawoo.lotterybox.bean.DataCenter; import com.dawoo.lotterybox.util.ActivityUtil; import com.dawoo.lotterybox.util.NetUtil; import com.youth.banner.Banner; import java.util.ArrayList; import java.util.List; /** * Created by b on 18-4-12. * 轮播图 */ public class BannerViewHolder extends BaseViewHolder { Banner mBanner; public BannerViewHolder(Context context ,View itemView) { super(itemView); mBanner = itemView.findViewById(R.id.banner); } public void bindView(List<BannerBean> bannerBeans){ List images = new ArrayList(); List titles = new ArrayList(); List<String> Links = new ArrayList(); for (int i = 0; i < bannerBeans.size(); i++) { images.add(NetUtil.handleUrl(DataCenter.getInstance().getImgDomain(), bannerBeans.get(i).getCover())); titles.add(bannerBeans.get(i).getName()); Links.add(bannerBeans.get(i).getLink()); } BannerConfigInit init = new BannerConfigInit(mBanner, images, titles, position -> ActivityUtil.startWebView(Links.get(position), ConstantValue.WEBVIEW_TYPE_ORDINARY)); init.start(); } }
[ "archar@dawoo.com" ]
archar@dawoo.com
c9a64835f126e7b4b490f70606e24a95ed8e6964
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/jdbi/validation/488/ParsedParameters.java
83154e50dfa92c493002bc49010b7705b06cdff5
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,742
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.statement; import static java.util.Collections.unmodifiableList; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; /** * The parsed parameters from an SQL statement. */ public class ParsedParameters { private final boolean positional; private final List<String> parameterNames; ParsedParameters(boolean positional, List<String> parameterNames) { this.positional = positional; this.parameterNames = unmodifiableList(new ArrayList<>(parameterNames)); } /** * @return true if the SQL statement uses positional parameters, false if * the statement uses named parameters, or has no parameters at all. */ public boolean isPositional() { return positional; } /** * @return the number of parameters from the SQL statement. */ public int getParameterCount() { return parameterNames.size(); } /** * @return the parameter names from the SQL statement. */ public List<String> getParameterNames() { return parameterNames; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ParsedParameters that = (ParsedParameters) o; return positional == that.positional && Objects.equals(parameterNames, that.parameterNames); } @Override public int hashCode() { return Objects.hash(positional, parameterNames); } @Override public String toString() { return "ParsedParameters{" + "positional=" + positional + ", parameterNames=" + parameterNames + '}'; } /** * A static factory of named {@link ParsedParameters} instances. * List given in argument must contain parameter names from the * related statement. They must be bare names, free of SQL * variable processing syntax such as a prefixed colon or other * delimiters. * * @param names the parameter names from SQL statement * @return New {@link ParsedParameters} instance * @throws IllegalArgumentException if names list contains positional parameter */ public static ParsedParameters named(List<String> names) { if (names.contains(ParsedSql.POSITIONAL_PARAM)) { throw new IllegalArgumentException("Named parameters " + "list must not contain positional parameter " + "\"" + ParsedSql.POSITIONAL_PARAM + "\""); } return new ParsedParameters(false, names); } /** * A static factory of positional {@link ParsedParameters} instances. * The count given in the argument must indicate how many positional * parameters are available in the statement. * * @param count the number of positional parameters in statement * @return New {@link ParsedParameters} instance */ public static ParsedParameters positional(int count) { return new ParsedParameters(true, Collections.nCopies(count, "?")); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
aabe3e51607eaa1090535f77e07e7bfac15b97b3
9016cc89d51073699cd67f6d57d9acddde9c2726
/trunk/deliver_ck-store-sdk/src/tw/com/sti/clientsdk/unionpay/SignBy.java
a9465f084479bf275af7b99386b47587ced7224d
[]
no_license
BGCX067/ezui001-svn-to-git
6457e33d033f99c1d79103302d880eb5b521c1c5
f0d73556324f2b407f5a069ec967d3204449f518
refs/heads/master
2016-09-01T08:52:31.606593
2015-12-28T14:21:05
2015-12-28T14:21:05
48,872,282
0
0
null
null
null
null
UTF-8
Java
false
false
2,431
java
package tw.com.sti.clientsdk.unionpay; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.security.KeyStore; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.cert.CertificateException; import javax.crypto.Cipher; public class SignBy { /** * 生成签名 */ public String createSign(String original_string,String alias,String password,InputStream PrivateSign){ try { byte [] signsMD5 = MD5(original_string); byte [] signsRSA = rsaEncode(signsMD5,alias,password,PrivateSign); return new String(Base64.encode(signsRSA)); } catch (Exception e) { e.printStackTrace(); } return null; } /** * * @param md5 * @return */ private byte[] MD5(String src) { MessageDigest messageDigest; try { messageDigest = MessageDigest.getInstance("MD5"); messageDigest.update(src.getBytes("utf-8")); byte[] digest = messageDigest.digest(); return digest; } catch (NoSuchAlgorithmException e) { e.printStackTrace(); return null; } catch (UnsupportedEncodingException e) { e.printStackTrace(); return null; } } /** * BASE64编码 * @param bstr * @return */ // private String BASE64encode(byte[] bstr){ // String s = new sun.misc.BASE64Encoder().encode(bstr).replaceAll("\r\n", ""); // s = s.replaceAll("\n", ""); // return s; // } /** * * @param signsRSA * @param isTest * @return * @throws IOException * @throws CertificateException * @throws NoSuchAlgorithmException */ private byte[] rsaEncode(byte[] signsRSA,String alias,String pwd,InputStream dataSign) { // 以PKCS2类型打开密钥库 try { KeyStore store = KeyStore.getInstance("PKCS12"); InputStream inStream = dataSign; store.load(inStream, pwd.toCharArray()); inStream.close(); // 从密钥库中提取密钥 PrivateKey pKey = (PrivateKey)store.getKey(alias, pwd.toCharArray()); Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); cipher.init(Cipher.ENCRYPT_MODE, pKey); return cipher.doFinal(signsRSA); } catch (Exception e) { e.printStackTrace(); } return null; } }
[ "you@example.com" ]
you@example.com
0c36bd253ed7c39a7d04e95e60de0c2ef1edb327
9ec69ec03acf33068474ea482d3965e6cef2a786
/src/main/java/com/example/blogreact/web/rest/util/PaginationUtil.java
bfcf6585dfe6cb9f64313ed52287464d134b55e4
[]
no_license
marcopgordillo/blogreact
cba58b16bc3b3146f9ae699c11591de23e31bf04
35987eb8ccd0189349b5e4485a255691bd2c6e9d
refs/heads/master
2020-03-22T22:08:38.245291
2018-11-26T17:27:34
2018-11-26T17:27:34
140,735,692
0
0
null
2018-07-12T17:41:39
2018-07-12T16:00:40
Java
UTF-8
Java
false
false
1,751
java
package com.example.blogreact.web.rest.util; import org.springframework.data.domain.Page; import org.springframework.http.HttpHeaders; import org.springframework.web.util.UriComponentsBuilder; /** * Utility class for handling pagination. * * <p> * Pagination uses the same principles as the <a href="https://developer.github.com/v3/#pagination">GitHub API</a>, * and follow <a href="http://tools.ietf.org/html/rfc5988">RFC 5988 (Link header)</a>. */ public final class PaginationUtil { private PaginationUtil() { } public static <T> HttpHeaders generatePaginationHttpHeaders(Page<T> page, String baseUrl) { HttpHeaders headers = new HttpHeaders(); headers.add("X-Total-Count", Long.toString(page.getTotalElements())); String link = ""; if ((page.getNumber() + 1) < page.getTotalPages()) { link = "<" + generateUri(baseUrl, page.getNumber() + 1, page.getSize()) + ">; rel=\"next\","; } // prev link if ((page.getNumber()) > 0) { link += "<" + generateUri(baseUrl, page.getNumber() - 1, page.getSize()) + ">; rel=\"prev\","; } // last and first link int lastPage = 0; if (page.getTotalPages() > 0) { lastPage = page.getTotalPages() - 1; } link += "<" + generateUri(baseUrl, lastPage, page.getSize()) + ">; rel=\"last\","; link += "<" + generateUri(baseUrl, 0, page.getSize()) + ">; rel=\"first\""; headers.add(HttpHeaders.LINK, link); return headers; } private static String generateUri(String baseUrl, int page, int size) { return UriComponentsBuilder.fromUriString(baseUrl).queryParam("page", page).queryParam("size", size).toUriString(); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
1d07cf08a0f8a2686f5b12ecdff91e2b139807d5
4edce2a17e0c0800cdfeaa4b111e0c2fbea4563b
/net/minecraft/src/SelectionListInvited.java
cce3dbf26d94125dba3d5c2475b59ea3154995d8
[]
no_license
zaices/minecraft
da9b99abd99ac56e787eef1b6fecbd06b2d4cd51
4a99d8295e7ce939663e90ba8f1899c491545cde
refs/heads/master
2021-01-10T20:20:38.388578
2013-10-06T00:16:11
2013-10-06T00:18:48
13,142,359
2
1
null
null
null
null
UTF-8
Java
false
false
2,053
java
package net.minecraft.src; class SelectionListInvited extends SelectionListBase { final GuiScreenConfigureWorld field_98264_a; public SelectionListInvited(GuiScreenConfigureWorld par1GuiScreenConfigureWorld) { super(GuiScreenConfigureWorld.func_96265_a(par1GuiScreenConfigureWorld), GuiScreenConfigureWorld.func_96271_b(par1GuiScreenConfigureWorld), GuiScreenConfigureWorld.func_96274_a(par1GuiScreenConfigureWorld, 2), GuiScreenConfigureWorld.func_96269_c(par1GuiScreenConfigureWorld), GuiScreenConfigureWorld.func_96274_a(par1GuiScreenConfigureWorld, 9) - GuiScreenConfigureWorld.func_96274_a(par1GuiScreenConfigureWorld, 2), 12); this.field_98264_a = par1GuiScreenConfigureWorld; } protected int func_96608_a() { return GuiScreenConfigureWorld.func_96266_d(this.field_98264_a).field_96402_f.size() + 1; } protected void func_96615_a(int par1, boolean par2) { if (par1 < GuiScreenConfigureWorld.func_96266_d(this.field_98264_a).field_96402_f.size()) { GuiScreenConfigureWorld.func_96270_b(this.field_98264_a, par1); } } protected boolean func_96609_a(int par1) { return par1 == GuiScreenConfigureWorld.func_96263_e(this.field_98264_a); } protected int func_96613_b() { return this.func_96608_a() * 12; } protected void func_96611_c() {} protected void func_96610_a(int par1, int par2, int par3, int par4, Tessellator par5Tessellator) { if (par1 < GuiScreenConfigureWorld.func_96266_d(this.field_98264_a).field_96402_f.size()) { this.func_98263_b(par1, par2, par3, par4, par5Tessellator); } } private void func_98263_b(int par1, int par2, int par3, int par4, Tessellator par5Tessellator) { String var6 = (String)GuiScreenConfigureWorld.func_96266_d(this.field_98264_a).field_96402_f.get(par1); this.field_98264_a.drawString(GuiScreenConfigureWorld.func_96273_f(this.field_98264_a), var6, par2 + 2, par3 + 1, 16777215); } }
[ "chlumanog@gmail.com" ]
chlumanog@gmail.com
049add00a658204fb4e615149acb93fbf0073f31
e78524f7bde2dc64056a7173982fc49146cb06ee
/workspace/app_v2/src/com/icanit/app_v2/adapter/MerchandizeAdPagerAdapter.java
510c51d0c60d87caf3a349b6b66a8e7cd5eb984a
[]
no_license
ben-kenobi/android_lagacy
90b417538a94c1643ef8b70998c478ec508eb217
ecaf31f82a8245f9c0a3702870cfa84ac747b6e1
refs/heads/master
2020-12-24T08:08:36.967953
2017-06-06T16:12:21
2017-06-06T16:12:21
73,343,156
1
0
null
null
null
null
UTF-8
Java
false
false
4,740
java
package com.icanit.app_v2.adapter; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import android.content.Context; import android.support.v4.view.ViewPager; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageView; import com.icanit.app_v2.R; import com.icanit.app_v2.entity.AppGoods; import com.icanit.app_v2.exception.AppException; import com.icanit.app_v2.util.ImageUtil; public class MerchandizeAdPagerAdapter extends MyBasePagerAdapter{ private LayoutInflater inflater; private Context context; private List<AppGoods> goodsList; private int resId=R.layout.item4vp_advertisement; private Map<Integer,View> viewMap=new HashMap<Integer,View>(); private LinkedList<View> convertViews=new LinkedList<View>(); public MerchandizeAdPagerAdapter(Context context) throws AppException{ super(); this.context=context;inflater=LayoutInflater.from(context); } public int getCount() { Log.d("pagerAdapter","getCount"); if(goodsList==null) return 0; return goodsList.size(); } public boolean isViewFromObject(View arg0, Object arg1) { Log.d("pagerAdapter","arg0="+arg0+",arg1="+arg1+" isViewFromObject"); return arg0==arg1; } @Override public void finishUpdate(ViewGroup container) { Log.d("pagerAdapter","container="+container+" finishUpdate"); super.finishUpdate(container); } @Override public int getItemPosition(Object object) { Log.d("pagerAdapter","object="+object+" getItemPosition"); // return super.getItemPosition(object); return POSITION_NONE; } @Override public void setPrimaryItem(ViewGroup container, int position, Object object) { Log.d("pagerAdapter","container="+container+",position="+position+",object="+object+" setPrimaryItem"); super.setPrimaryItem(container, position, object); } @Override public void startUpdate(ViewGroup container) { Log.d("pagerAdapter","container="+container+" startUpdate"); super.startUpdate(container); } @Override public CharSequence getPageTitle(int position) { return null; } @Override public void destroyItem(ViewGroup container, int position, Object object) { viewMap.remove(position); container.removeView((View)object); convertViews.add((View)object); // System.out.println(position+",object="+object+",convertViews="+convertViews+" destoryItem @MerchantAdPagerAdapter"); } @Override public Object instantiateItem(ViewGroup container,final int position) { final ViewHolder holder;final AppGoods goods= goodsList.get(position); View convertView=null; if(convertView==null&&!convertViews.isEmpty()) convertView=convertViews.removeFirst(); if(convertView==null){ holder=new ViewHolder(); convertView=inflater.inflate(resId, container,false); holder.imageView=(ImageView)convertView.findViewById(R.id.imageView1); convertView.setTag(holder); Log.d("errorTag",position+" @MerchandizeAdPagerAdapter convertView==null"); }else holder=(ViewHolder)convertView.getTag(); Log.d("errorTag",position+" @MerchantdizeAdPagerAdapter convertView!=null"); ImageUtil.asyncDownloadImageAndShow(holder.imageView, "",context,busy); viewMap.put(position,convertView); holder.imageView.setOnClickListener(new OnClickListener() { public void onClick(View v) { try { context.getClass().getMethod("showMerchandizeDetail", AppGoods.class) .invoke(context, goods); } catch (Exception e) { e.printStackTrace(); } } }); container.addView(convertView); // System.out.println(position+",convertViews="+convertViews+",convertView="+convertView+" instantiateItem @MerchantAdPagerAdapter"); return convertView; } public void updateView(ViewPager pager,int position){ if(position!=-1&&!viewMap.containsKey(position))return ; System.out.println(position+",viewMap="+viewMap+",contains="+viewMap.containsKey(position)+" @MerchandizeAdpagerAdapter"); Iterator<Entry<Integer,View>> it=viewMap.entrySet().iterator(); while(it.hasNext()){ Entry<Integer,View> en = it.next(); AppGoods goods =goodsList.get(en.getKey()); ViewHolder holder = (ViewHolder)en.getValue().getTag(); } } public List<AppGoods> getGoodsList() { return goodsList; } public void setGoodsList(List<AppGoods> goodsList) { this.goodsList = goodsList; notifyDataSetChanged(); } public void refreshViewPager(){ } static class ViewHolder{ ImageView imageView; } }
[ "whatelsecani@gmail.com" ]
whatelsecani@gmail.com
3a5ea54545078296290771a93917cbf328eb3987
7eb5efd151453ddc644212c0d8603d9cc6c23e0e
/src/main/java/org/cheng/pojo/JSONResult.java
1de93abd898d6463d42e2154dfd84b8a9c7b8872
[]
no_license
zchengi/springboot-starter
93c9696991a8701c71633e3c35466410cbf52c91
62b40266ddf65edc14533ff0f4a059ed1061d43d
refs/heads/master
2020-03-13T15:07:41.218897
2018-08-04T12:07:06
2018-08-04T12:07:06
131,171,523
0
0
null
null
null
null
UTF-8
Java
false
false
5,310
java
package org.cheng.pojo; import java.util.List; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; /** * @author leechenxiang * @version V1.0 * @Title JSONResult.java * @Package com.cheng.pojo * @Description 自定义响应数据结构 * 这个类是提供给门户,ios,安卓,微信商城用的 * 门户接受此类数据后需要使用本类的方法转换成对于的数据类型格式(类,或者list) * 其他自行处理 * 200:表示成功 * 500:表示错误,错误信息在msg字段中 * 501:bean验证错误,不管多少个错误都以map形式返回 * 502:拦截器拦截到用户token出错 * 555:异常抛出信息 * Copyright: Copyright (c) 2016 * Company:Nathan.Lee.Salvatore * @date 2016年4月22日 下午8:33:36 */ public class JSONResult { // 定义jackson对象 private static final ObjectMapper MAPPER = new ObjectMapper(); // 响应业务状态 private Integer status; // 响应消息 private String msg; // 响应中的数据 private Object data; private String ok; // 不使用 public static JSONResult build(Integer status, String msg, Object data) { return new JSONResult(status, msg, data); } public static JSONResult ok(Object data) { return new JSONResult(data); } public static JSONResult ok() { return new JSONResult(null); } public static JSONResult errorMsg(String msg) { return new JSONResult(500, msg, null); } public static JSONResult errorMap(Object data) { return new JSONResult(501, "error", data); } public static JSONResult errorTokenMsg(String msg) { return new JSONResult(502, msg, null); } public static JSONResult errorException(String msg) { return new JSONResult(555, msg, null); } public JSONResult() { } // public static LeeJSONResult build(Integer status, String msg) { // return new LeeJSONResult(status, msg, null); // } public JSONResult(Integer status, String msg, Object data) { this.status = status; this.msg = msg; this.data = data; } public JSONResult(Object data) { this.status = 200; this.msg = "OK"; this.data = data; } public Boolean isOK() { return this.status == 200; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public Object getData() { return data; } public void setData(Object data) { this.data = data; } /** * @param jsonData * @param clazz * @return * @Description 将json结果集转化为LeeJSONResult对象 * 需要转换的对象是一个类 * @author leechenxiang * @date 2016年4月22日 下午8:34:58 */ public static JSONResult formatToPojo(String jsonData, Class<?> clazz) { try { if (clazz == null) { return MAPPER.readValue(jsonData, JSONResult.class); } JsonNode jsonNode = MAPPER.readTree(jsonData); JsonNode data = jsonNode.get("data"); Object obj = null; if (clazz != null) { if (data.isObject()) { obj = MAPPER.readValue(data.traverse(), clazz); } else if (data.isTextual()) { obj = MAPPER.readValue(data.asText(), clazz); } } return build(jsonNode.get("status").intValue(), jsonNode.get("msg").asText(), obj); } catch (Exception e) { return null; } } /** * @param json * @return * @Description 没有object对象的转化 * @author leechenxiang * @date 2016年4月22日 下午8:35:21 */ public static JSONResult format(String json) { try { return MAPPER.readValue(json, JSONResult.class); } catch (Exception e) { e.printStackTrace(); } return null; } /** * @param jsonData * @param clazz * @return * @Description Object是集合转化 * 需要转换的对象是一个list * @author leechenxiang * @date 2016年4月22日 下午8:35:31 */ public static JSONResult formatToList(String jsonData, Class<?> clazz) { try { JsonNode jsonNode = MAPPER.readTree(jsonData); JsonNode data = jsonNode.get("data"); Object obj = null; if (data.isArray() && data.size() > 0) { obj = MAPPER.readValue(data.traverse(), MAPPER.getTypeFactory().constructCollectionType(List.class, clazz)); } return build(jsonNode.get("status").intValue(), jsonNode.get("msg").asText(), obj); } catch (Exception e) { return null; } } public String getOk() { return ok; } public void setOk(String ok) { this.ok = ok; } }
[ "792702352@qq.com" ]
792702352@qq.com
1a08a09180d7e48237b5265edab83c14e4bd04e1
0da97d140179cf72c408c1da530a72eeb5e64830
/msgpack-java-modified/src/main/java/org/msgpack/template/CharacterTemplate.java
ed1a58ca155bded3ac1e130f8554bce342b75b11
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
bachden/msgpack-java-modified
b69044a76cdf1c1ce82b02962b6f088b2f606cd4
2ca437b4d989895c9861f59041522680bc2d93e4
refs/heads/master
2021-01-20T14:58:57.957891
2018-09-10T11:02:11
2018-09-10T11:02:11
90,699,563
0
0
null
null
null
null
UTF-8
Java
false
false
1,613
java
// // MessagePack for Java // // Copyright (C) 2009 - 2013 FURUHASHI Sadayuki // // 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.msgpack.template; import java.io.IOException; import org.msgpack.MessageTypeException; import org.msgpack.packer.Packer; import org.msgpack.unpacker.Unpacker; /** * CharacterTemplate<br/> * * @author watabiki */ public class CharacterTemplate extends AbstractTemplate<Character> { private CharacterTemplate() { } @Override public void write(Packer pk, Character target, boolean required) throws IOException { if (target == null) { if (required) { throw new MessageTypeException("Attempted to write null"); } pk.writeNil(); return; } pk.write((int) (char) target); } @Override public Character read(Unpacker u, Character to, boolean required) throws IOException { if (!required && u.trySkipNil()) { return null; } return (char) u.readInt(); } static public CharacterTemplate getInstance() { return instance; } static final CharacterTemplate instance = new CharacterTemplate(); }
[ "hoangbach.bk@gmail.com" ]
hoangbach.bk@gmail.com
b174b79ff6d98ae0d547035706f9cd192569903b
4d0f2d62d1c156d936d028482561585207fb1e49
/Ma nguon/zcs-8.0.2_GA_5570-src/ZimbraSoap/src/java/com/zimbra/soap/voice/message/GetVoiceFeaturesResponse.java
5e6fc285c6b56a6ffcf9301d5dc49c908e50d5df
[]
no_license
vuhung/06-email-captinh
e3f0ff2e84f1c2bc6bdd6e4167cd7107ec42c0bd
af828ac73fc8096a3cc096806c8080e54d41251f
refs/heads/master
2020-07-08T09:09:19.146159
2013-05-18T12:57:24
2013-05-18T12:57:24
32,319,083
0
2
null
null
null
null
UTF-8
Java
false
false
1,714
java
/* * ***** BEGIN LICENSE BLOCK ***** * Zimbra Collaboration Suite Server * Copyright (C) 2012 Zimbra, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.zimbra.com/license. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * ***** END LICENSE BLOCK ***** */ package com.zimbra.soap.voice.message; import com.google.common.base.Objects; 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 com.zimbra.common.soap.VoiceConstants; import com.zimbra.soap.voice.type.PhoneVoiceFeaturesInfo; @XmlAccessorType(XmlAccessType.NONE) @XmlRootElement(name=VoiceConstants.E_GET_VOICE_FEATURES_RESPONSE) public class GetVoiceFeaturesResponse { /** * @zm-api-field-description Phone voice feature information */ @XmlElement(name=VoiceConstants.E_PHONE /* phone */, required=false) private PhoneVoiceFeaturesInfo phone; public GetVoiceFeaturesResponse() { } public void setPhone(PhoneVoiceFeaturesInfo phone) { this.phone = phone; } public PhoneVoiceFeaturesInfo getPhone() { return phone; } public Objects.ToStringHelper addToStringInfo(Objects.ToStringHelper helper) { return helper .add("phone", phone); } @Override public String toString() { return addToStringInfo(Objects.toStringHelper(this)).toString(); } }
[ "vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931" ]
vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931
cb486d99184ea814178d92ad74077abb23ef79ae
622259e01d8555d552ddeba045fafe6624d80312
/edu.harvard.i2b2.eclipse.plugins.querytool/src/edu/harvard/i2b2/eclipse/plugins/querytool/z/tests/CustomExpandBar.java
14a04ee4d73f0920ea29a4da685cdf2f1553d960
[]
no_license
kmullins/i2b2-workbench-old
93c8e7a3ec7fc70b68c4ce0ae9f2f2c5101f5774
8144b0b62924fa8a0e4076bf9672033bdff3b1ff
refs/heads/master
2021-05-30T01:06:11.258874
2015-11-05T18:00:58
2015-11-05T18:00:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,987
java
package edu.harvard.i2b2.eclipse.plugins.querytool.z.tests; import java.util.Random; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import edu.harvard.i2b2.eclipse.plugins.querytool.ui.utils.Colors; import edu.harvard.i2b2.eclipse.plugins.querytool.ui.utils.DaemonThreadFactory; import edu.harvard.i2b2.eclipse.plugins.querytool.ui.utils.FormDataMaker; public class CustomExpandBar extends Composite { private static final Random RANDOM = new Random(); private ScheduledExecutorService myAnimationExecutor = Executors.newSingleThreadScheduledExecutor( new DaemonThreadFactory() ); private ScheduledFuture <?> myFuture = null; private boolean isMoving = false; private Label myLabel; private boolean isExpanded = false; private int contractedHeight = 0; private int expandedHeight = 0; public CustomExpandBar(Composite parent, int style, String name) { super(parent, style); setupUI( name ); attachListeners(); } private void setupUI( String name ) { this.setBackground( Colors.DARK_GRAY ); this.setLayout( new FormLayout() ); Composite labelComposite = new Composite( this, SWT.NONE ); labelComposite.setLayout( new FormLayout() ); labelComposite.setLayoutData( FormDataMaker.makeFormData(0, (Integer)null, 0, 100)); myLabel = new Label( labelComposite, SWT.NONE ); myLabel.setText( name ); //myLabel.setBackground( Colors.DUCKLING_FEATHER ); myLabel.setForeground( Colors.BLACK ); myLabel.setLayoutData( FormDataMaker.makeFormData(0, 0, (Integer)null, 0, 0, 0, 100, 0) ); contractedHeight = myLabel.computeSize( SWT.DEFAULT, SWT.DEFAULT).y; int numComps = RANDOM.nextInt(4) + 1; Control previousControl = labelComposite; for ( int i = 0; i < numComps; i++ ) { Composite comp = new Composite( this, SWT.BORDER ); FormData compFD = FormDataMaker.makeFormData( previousControl, 2, (Integer)null, 0, 0, 30, 100, -4); compFD.height = 30; comp.setLayoutData( compFD ); comp.setBackground( Colors.WHITE ); previousControl = comp; } myLabel.setText( name + " (" + numComps + ")" ); expandedHeight = this.computeSize( SWT.DEFAULT, SWT.DEFAULT).y; } private void attachListeners() { MouseAdapter clicker = new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { if ( isMoving ) return; // don't do anything if it's already expanding/contracting isMoving = true; if (isExpanded) contract(); else expand(); } }; this.addMouseListener( clicker ); myLabel.addMouseListener( clicker ); } public int getPreferredContractedHeight() { return this.contractedHeight; } public void expand() { isExpanded = true; final Runnable expandAction = new Runnable() { int counter = 0; @Override public void run() { Display.getDefault().asyncExec( new Runnable() { @Override public void run() { FormData fd = (FormData)CustomExpandBar.this.getLayoutData(); if ( fd.height >= expandedHeight ) { myFuture.cancel( true ); isMoving = false; counter = 0; return; } int distance = (int)(expandedHeight/(Math.pow(2, counter+1))); fd.height = Math.min( (fd.height + distance), expandedHeight); CustomExpandBar.this.getParent().layout(); if ( counter < 9) counter++; else counter = 0; } }); } }; myFuture = myAnimationExecutor.scheduleAtFixedRate( expandAction, 0, 30, TimeUnit.MILLISECONDS ); } public void contract() { isExpanded = false; final Runnable contractAction = new Runnable() { int contractionStep = (expandedHeight - contractedHeight)/4 + 1; @Override public void run() { Display.getDefault().asyncExec( new Runnable() { @Override public void run() { FormData fd = (FormData)CustomExpandBar.this.getLayoutData(); if ( fd.height <= contractedHeight ) { myFuture.cancel( true ); isMoving = false; return; } fd.height = Math.max( fd.height - contractionStep, contractedHeight); CustomExpandBar.this.getParent().layout(); } }); } }; myFuture = myAnimationExecutor.scheduleAtFixedRate( contractAction, 0, 30, TimeUnit.MILLISECONDS ); } }
[ "Janice@phs000774.partners.org" ]
Janice@phs000774.partners.org
118c3175d05c0b1df8cbc977e551595327171fbf
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/9/org/apache/commons/math3/geometry/euclidean/threed/FieldVector3D_dotProduct_774.java
9fa04795a217e8c3824193685075b2a54585cf77
[]
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,710
java
org apach common math3 geometri euclidean threed implement link vector3 vector3d link extend field element extendedfieldel instanc guarante immut param type field element version field vector3 fieldvector3d extend field element extendedfieldel serializ comput dot product instanc vector implement specif multipl addit algorithm preserv accuraci reduc cancel effect accur orthogon vector math arrai matharrai linear combin linearcombin param vector dot product dot product dotproduct vector3 vector3d linear combin linearcombin getx geti getz
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
fe76b382dfcfcd03d226a258e91256181a9d386e
bfa29f79e7205aefbc5ec8c881cf889519445f8d
/app/src/main/java/com/rainwood/sentlogistics/model/domain/PublishType.java
d7b208690ed758f8b88206ab0c9e22c08b1c8fd1
[]
no_license
maple00/FarceSentLogistics
4e635a3748ba8cf20cdc4173626cbb28f4dcdd40
3df59f2e2f8e1f36d4fbf6cdd0b43949b4bdb75b
refs/heads/master
2022-11-16T04:16:31.421543
2020-07-10T10:02:13
2020-07-10T10:02:13
278,600,681
0
0
null
null
null
null
UTF-8
Java
false
false
615
java
package com.rainwood.sentlogistics.model.domain; import java.io.Serializable; /** * @Author: a797s * @Date: 2020/7/9 14:43 * @Desc: 服务类型 */ public final class PublishType implements Serializable { /** * 类型 */ private String type; /** * 选中 */ private boolean selected; public String getType() { return type; } public void setType(String type) { this.type = type; } public boolean isSelected() { return selected; } public void setSelected(boolean selected) { this.selected = selected; } }
[ "a797shaoxuesong@163.com" ]
a797shaoxuesong@163.com
82e8df8a1a842516bc99449685fdeace250fd7a4
e80c2f3fdb63466c3f8c7ca399445770e6a15d7f
/src/com/kq/jvm/field/A.java
c82ea3897d7d9687fdc0184b342e033a805f36ab
[]
no_license
kongq1983/java8
386d2c2e1d3a39e09ce97991e13e682600b18553
409cd50577d59d4f797f80e09eec85e2c87e7759
refs/heads/master
2023-05-25T18:06:42.464147
2023-05-19T15:51:04
2023-05-19T15:51:04
130,213,626
0
0
null
null
null
null
UTF-8
Java
false
false
564
java
package com.kq.jvm.field; /** * * @author kq * @date 2021-11-17 13:55 * @since 2020-0630 */ public class A { public static final int PAGE_SIZE = 20; public static final byte BYTEBYTE = 50; public static final double DOU = 50; public static final float FLO = 60; private int a = 10; protected int b = 12; public int c = 15; public int d = 11; public int f = 16; public char cByte = 10; public double dou1 = 1; public byte aByte = 1; public static int getPageSize(){ return PAGE_SIZE; } }
[ "king@qq.com" ]
king@qq.com
52291718b97ebe6bd659f1b7c9f448acd815fd3a
79a6cf43828280dde4a8957ab2878def495cde95
/platform/platform-impl/src/main/java/com/asiainfo/rms/alm/arsenal/dao/AlmAsnltmpSgExtendDao.java
fbde4183fa581d4532c15f54add3ef711397bb30
[]
no_license
zostudy/cb
aeee90afde5f83fc8fecb02073c724963cf3c44f
c18b3d6fb078d66bd45f446707e67d918ca57ae0
refs/heads/master
2020-05-17T22:24:44.910256
2019-05-07T09:29:39
2019-05-07T09:29:39
183,999,895
0
0
null
null
null
null
UTF-8
Java
false
false
992
java
package com.asiainfo.rms.alm.arsenal.dao; import com.asiainfo.rms.alm.arsenal.domain.AlmAsnltmpSgExtendRepository; import org.apache.ibatis.annotations.Param; public interface AlmAsnltmpSgExtendDao { Integer saveAlmAsnltmpSgExtend(AlmAsnltmpSgExtendRepository almAsnltmpSgExtendRepository); // Integer updateAlmAsnltmpSgExtend(AlmAsnltmpSgExtendRepository almAsnltmpSgExtendRepository); // // Integer deleteAlmAsnltmpSgExtend(Integer aasId); AlmAsnltmpSgExtendRepository selectAlmAsnltmpSgExtend(Integer aasId); // List<AlmAsnltmpSgExtendRepository> selectAllAlmAsnltmpSgExtend(@Param("aatId")Integer aatId, // @Param("offset") Integer offset, // @Param("size") Integer size); // // Integer getAllAlmAsnltmpSgExtend(@Param("aatId")Integer aatId); AlmAsnltmpSgExtendRepository selectSgExtendInfo(@Param("aatId")Integer aatId); }
[ "wangrupeng@foxmail.com" ]
wangrupeng@foxmail.com
3f9ea543262e9dd8ad32624cecdb85e56ed5ef6f
c2dfe9cbd07f0084ec4c386adb1a997f1a433e9d
/src/main/java/com/dreamcc/gs/util/PropertiesUtil.java
1cc855d215898ee0e690fe11919f3d05c7aa8a64
[ "Apache-2.0" ]
permissive
dreamcc0817/GS
f60e578a6c0eb5a77d021deabe23cc2a6d17d3bb
d795832d893df7dcbde377d42145aeb9abeca6ab
refs/heads/master
2021-01-21T22:36:03.450371
2017-09-16T03:51:04
2017-09-16T03:51:04
102,166,139
0
0
null
null
null
null
UTF-8
Java
false
false
1,253
java
package com.dreamcc.gs.util; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.InputStreamReader; import java.util.Properties; /** * Created by geely */ public class PropertiesUtil { private static Logger logger = LoggerFactory.getLogger(PropertiesUtil.class); private static Properties props; static { String fileName = "gs.properties"; props = new Properties(); try { props.load(new InputStreamReader(PropertiesUtil.class.getClassLoader().getResourceAsStream(fileName),"UTF-8")); } catch (IOException e) { logger.error("配置文件读取异常",e); } } public static String getProperty(String key){ String value = props.getProperty(key.trim()); if(StringUtils.isBlank(value)){ return null; } return value.trim(); } public static String getProperty(String key,String defaultValue){ String value = props.getProperty(key.trim()); if(StringUtils.isBlank(value)){ value = defaultValue; } return value.trim(); } }
[ "dreamcc0817@gmail.com" ]
dreamcc0817@gmail.com
989bb673ec5cc9b35f441ca1f7ee0334fe2ac0ee
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/iRobot_com.irobot.home/javafiles/com/gigya/socialize/android/GSAPI$15.java
e33a2d222b55b09b4677018b27cdbc0777f3cc26
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
3,958
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.gigya.socialize.android; import com.gigya.socialize.android.login.LoginProviderFactory; import com.gigya.socialize.android.login.providers.FacebookProvider; import java.util.List; // Referenced classes of package com.gigya.socialize.android: // GSAPI, GSPermissionResultHandler class GSAPI$15 implements Runnable { public void run() { com.gigya.socialize.android.login.providers.LoginProvider loginprovider = loginProviderFactory.getLoginProvider("facebook"); // 0 0:aload_0 // 1 1:getfield #21 <Field GSAPI this$0> // 2 4:getfield #34 <Field LoginProviderFactory GSAPI.loginProviderFactory> // 3 7:ldc1 #36 <String "facebook"> // 4 9:invokevirtual #42 <Method com.gigya.socialize.android.login.providers.LoginProvider LoginProviderFactory.getLoginProvider(String)> // 5 12:astore_1 if(((Object) (loginProviderFactory.getLoginProvider("facebook"))).getClass() == com/gigya/socialize/android/login/providers/FacebookProvider) //* 6 13:aload_0 //* 7 14:getfield #21 <Field GSAPI this$0> //* 8 17:getfield #34 <Field LoginProviderFactory GSAPI.loginProviderFactory> //* 9 20:ldc1 #36 <String "facebook"> //* 10 22:invokevirtual #42 <Method com.gigya.socialize.android.login.providers.LoginProvider LoginProviderFactory.getLoginProvider(String)> //* 11 25:invokevirtual #46 <Method Class Object.getClass()> //* 12 28:ldc1 #48 <Class FacebookProvider> //* 13 30:if_acmpne 51 { ((FacebookProvider)loginprovider).requestPermissions("read", val$permissions, val$callback); // 14 33:aload_1 // 15 34:checkcast #48 <Class FacebookProvider> // 16 37:ldc1 #50 <String "read"> // 17 39:aload_0 // 18 40:getfield #23 <Field List val$permissions> // 19 43:aload_0 // 20 44:getfield #25 <Field GSPermissionResultHandler val$callback> // 21 47:invokevirtual #54 <Method void FacebookProvider.requestPermissions(String, List, GSPermissionResultHandler)> return; // 22 50:return } if(val$callback != null) //* 23 51:aload_0 //* 24 52:getfield #25 <Field GSPermissionResultHandler val$callback> //* 25 55:ifnull 78 val$callback.onResult(false, new Exception("App isn't configured for Facebook native login."), ((List) (null))); // 26 58:aload_0 // 27 59:getfield #25 <Field GSPermissionResultHandler val$callback> // 28 62:iconst_0 // 29 63:new #56 <Class Exception> // 30 66:dup // 31 67:ldc1 #58 <String "App isn't configured for Facebook native login."> // 32 69:invokespecial #61 <Method void Exception(String)> // 33 72:aconst_null // 34 73:invokeinterface #67 <Method void GSPermissionResultHandler.onResult(boolean, Exception, List)> // 35 78:return } final GSAPI this$0; final GSPermissionResultHandler val$callback; final List val$permissions; GSAPI$15() { this$0 = final_gsapi; // 0 0:aload_0 // 1 1:aload_1 // 2 2:putfield #21 <Field GSAPI this$0> val$permissions = list; // 3 5:aload_0 // 4 6:aload_2 // 5 7:putfield #23 <Field List val$permissions> val$callback = GSPermissionResultHandler.this; // 6 10:aload_0 // 7 11:aload_3 // 8 12:putfield #25 <Field GSPermissionResultHandler val$callback> super(); // 9 15:aload_0 // 10 16:invokespecial #28 <Method void Object()> // 11 19:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
b8ea14b02a0bc3f3f8189f3f5d708c2dde9d2f84
14a0d0dc977295cc1077a099e12ca05794e7f84a
/gokong-main/src/main/java/cn/gokong/www/gokongmain/service/MerchantsService.java
32d40777d0139f6a513848da78fc7f3f746a6fda
[]
no_license
yht-817/gokong-manage
2ec59e86fd1aa8839b6566471026d78c55e2b8c5
f779614f12b30ccf2495856f873d6b9c87898612
refs/heads/master
2020-05-03T18:55:09.754700
2019-04-01T03:05:45
2019-04-01T03:05:45
178,774,202
0
0
null
null
null
null
UTF-8
Java
false
false
1,299
java
package cn.gokong.www.gokongmain.service; import cn.gokong.www.gokongmain.domain.Merchants; import cn.gokong.www.gokongmain.vo.merchants.QueryMerchantsDetailsOutput; import cn.gokong.www.gokongmain.vo.merchants.PageQueryMerchantsOutput; import com.baomidou.mybatisplus.extension.service.IService; import java.util.List; /** * <p> * 商户数据 服务类 * </p> * * @author iKook * @since 2018-09-11 */ public interface MerchantsService extends IService<Merchants> { /** * 分页查询商户数据 * * * @param cityName 城市名称 * @param keyword 检索内容 * @param startNo 开始位置 * @param pageSize 检索长度 * @param merchantsType 商户类型 * @return */ List<PageQueryMerchantsOutput> pageQueryMerchants(String cityName, String keyword, int startNo, int pageSize, String merchantsType); /** * 获取商户详情 * @param userNo 用户编码 * @param merchantsNo 商户编码 * @return */ QueryMerchantsDetailsOutput queryMerchantsDetails(String userNo, String merchantsNo); /** * 根据商户编码查询商户信息 * @param merchantsNo 商户编码 * @return */ Merchants findByMerchantsNo(String merchantsNo); }
[ "1475409096@qq.com" ]
1475409096@qq.com
126b29d70dfd54f7146a1e95ed215386bf73e06e
38c6e3cb1de37dda61e854b762233b7d4ed39e9f
/extend/org/adempiere/apps/graph/PAPanel.java
f44464e32fc44e8b2fd7c011efe3f068b4c5aea9
[]
no_license
agalemiri/customizacion380OFB
62f9dafb55c90126dc0157b661889cffe828f735
9cb28d677d01a6ff96895ed7b1ac70712659cb2d
refs/heads/master
2023-06-16T14:22:42.271774
2021-07-12T13:48:36
2021-07-12T13:48:36
385,280,607
0
0
null
null
null
null
UTF-8
Java
false
false
5,638
java
/****************************************************************************** * Product: Adempiere ERP & CRM Smart Business Solution * * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * * by the Free Software Foundation. This program is distributed in the hope * * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * * with this program; if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * For the text or an alternative of this public license, you may reach us * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ package org.adempiere.apps.graph; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Box; import javax.swing.JScrollPane; import javax.swing.ScrollPaneConstants; import org.compiere.model.MGoal; import org.compiere.swing.CPanel; import org.compiere.util.CLogger; import org.compiere.util.Env; /** * Performance Analysis Panel. * Key Performace Indicators * * @author Jorg Janke * @version $Id: PAPanel.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $ */ public class PAPanel extends CPanel implements ActionListener { /** * */ private static final long serialVersionUID = 4937417260772233929L; /** * Get Panel if User has Perfpormance Goals * @return panel pr null */ public static PAPanel get() { int AD_User_ID = Env.getAD_User_ID(Env.getCtx()); MGoal[] goals = MGoal.getUserGoals(Env.getCtx(), AD_User_ID); if (goals.length == 0) return null; return new PAPanel(goals); } // get /************************************************************************** * Constructor * @param goals */ private PAPanel (MGoal[] goals) { super (); m_goals = goals; init(); } // PAPanel /** Goals */ private MGoal[] m_goals = null; /** Logger */ private static CLogger log = CLogger.getCLogger (PAPanel.class); /** * Static/Dynamic Init */ private void init() { /* BOXES: * * boxV Header * ******** * boxH * * boxH * * * * * boxV1 * boxV2 * * * * * * * boxV1 dial1 * ******** * dial2 * * boxV2 HTML * ******** * boxH1 * * boxH1 * * * * * bar1 * bar2 * * * * * * * * V1 + HTML in scrollpane */ this.setLayout(new BorderLayout()); // HEADER Box boxV = Box.createVerticalBox(); // DIALS/HTML+Bars Box boxH = Box.createHorizontalBox(); // DIALS Box boxV1 = Box.createVerticalBox(); // HTML/Bars Box boxV2 = Box.createVerticalBox(); // barChart Box boxH1 = Box.createHorizontalBox(); //boxH_V.setPreferredSize(new Dimension(180, 1500)); //boxH1.setPreferredSize(new Dimension(400, 180)); boxV2.setPreferredSize(new Dimension(120, 120)); // DIALS below HEADER, LEFT for (int i = 0; i < m_goals.length; i++) { PerformanceIndicator pi = new PerformanceIndicator(m_goals[i]); pi.addActionListener(this); boxV1.add (pi, BorderLayout.NORTH); } boxV1.add(Box.createVerticalGlue(), BorderLayout.CENTER); JScrollPane scrollPane = new JScrollPane(); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.getViewport().add(boxV1, BorderLayout.CENTER ); scrollPane.setMinimumSize(new Dimension(190, 180)); // RIGHT, HTML + Bars HtmlDashboard contentHtml = new HtmlDashboard("http:///local/home", m_goals, true); boxV2.add(contentHtml, BorderLayout.CENTER); for (int i = 0; i < java.lang.Math.min(2, m_goals.length); i++) { if (m_goals[i].getMeasure() != null) //MGoal goal = pi.getGoal(); boxH1.add ( new Graph(m_goals[i]), BorderLayout.SOUTH); } boxV2.add(boxH1, BorderLayout.SOUTH); // below HEADER boxH.add(scrollPane, BorderLayout.WEST ); boxH.add(Box.createHorizontalStrut(5)); //space boxH.add(boxV2, BorderLayout.CENTER); // HEADER + below HtmlDashboard t = new HtmlDashboard("http:///local/logo", null, false); t.setMaximumSize(new Dimension(2000,80)); //t.setPreferredSize(new Dimension(200,10)); //t.setMaximumSize(new Dimension(2000,10)); boxV.add(t, BorderLayout.NORTH); boxV.add(Box.createVerticalStrut(5)); //space boxV.add(boxH, BorderLayout.CENTER); boxV.add(Box.createVerticalGlue()); // WINDOW add(boxV, BorderLayout.CENTER); } // init /** * Action Listener for Drill Down * @param e event */ public void actionPerformed (ActionEvent e) { if (e.getSource() instanceof PerformanceIndicator) { PerformanceIndicator pi = (PerformanceIndicator)e.getSource(); log.info(pi.getName()); MGoal goal = pi.getGoal(); if (goal.getMeasure() != null) new PerformanceDetail(goal); } } // actionPerformed } // PAPanel
[ "agalemiri@comercialwindsor.cl" ]
agalemiri@comercialwindsor.cl
529088f7bd73700e018fd5397b2b3acdbe42b946
faf55adee6ebf064d1abd4c0a1c7ee72126c2caa
/trunk/zhikebao/src/com/xyz/system/dao/AuthorityDao.java
de1ad9e118f67faf28397173f22f571ef15faf37
[]
no_license
BGCX261/zhikebao-ecom-svn-to-git
48ebb95d1e5883b9991ee116482eb556cd320c64
33616de5a809b7dd6f2c2cc98784b04004eef996
refs/heads/master
2019-01-20T12:40:43.882941
2015-08-25T15:28:09
2015-08-25T15:28:09
42,322,786
1
2
null
null
null
null
UTF-8
Java
false
false
1,058
java
package com.xyz.system.dao; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import org.springframework.stereotype.Repository; import org.springframework.util.Assert; import com.xyz.framework.data.impl.JpaDao; import com.xyz.system.model.Authority; @Repository public class AuthorityDao extends JpaDao<Authority, Integer> { public List<Authority> findAuthsByKeys(Set<String> keys) { Assert.notEmpty(keys, "没有关联主键"); List<Authority> userAuths = new ArrayList<Authority>(); List<Authority> la= getAllAuths(); Map<String,Authority> ms = new HashMap<String,Authority>(); for(int i=0;i<la.size();i++) { Authority a = la.get(i); ms.put(a.getPid().toString(), a); } for(String k : keys) { Authority a = ms.get(k); userAuths.add(a); } return userAuths; } /** * 获取全部对象. */ public List<Authority> getAllAuths() { return find(" from "+Authority.class.getName()+ " a "); } }
[ "you@example.com" ]
you@example.com
32be2b2f8799fd723fd0f6747e6becd386e4df86
d24de9be4c3993d9dc726e9a3c74d9662c470226
/reverse/Rocketbank_All_3.12.4_source_from_JADX/sources/ru/rocketbank/core/model/CardData.java
50ddd9d2553c26b7775b7396bdd124225b742798
[]
no_license
MEJIOMAH17/rocketbank-api
b18808ee4a2fdddd8b3045cd16655b0d82e0b13b
fc4eb0cbb4a8f52277fdb09a3b26b4cceef6ff79
refs/heads/master
2022-07-17T20:24:29.721131
2019-07-26T18:55:21
2019-07-26T18:55:21
198,698,231
4
0
null
2022-06-20T22:43:15
2019-07-24T19:31:49
Smali
UTF-8
Java
false
false
4,270
java
package ru.rocketbank.core.model; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import kotlin.jvm.internal.Intrinsics; /* compiled from: CardData.kt */ public final class CardData implements Parcelable { public static final Creator<CardData> CREATOR = new CardData$$special$$inlined$createParcel$1(); public static final Companion Companion = new Companion(); private final String cvv; private final String expirationDate; private final String pan; /* compiled from: CardData.kt */ public static final class Companion { private Companion() { } } public static /* bridge */ /* synthetic */ CardData copy$default(CardData cardData, String str, String str2, String str3, int i, Object obj) { if ((i & 1) != 0) { str = cardData.pan; } if ((i & 2) != 0) { str2 = cardData.expirationDate; } if ((i & 4) != 0) { str3 = cardData.cvv; } return cardData.copy(str, str2, str3); } public final String component1() { return this.pan; } public final String component2() { return this.expirationDate; } public final String component3() { return this.cvv; } public final CardData copy(String str, String str2, String str3) { Intrinsics.checkParameterIsNotNull(str, "pan"); Intrinsics.checkParameterIsNotNull(str2, "expirationDate"); Intrinsics.checkParameterIsNotNull(str3, "cvv"); return new CardData(str, str2, str3); } public final int describeContents() { return 0; } public final boolean equals(Object obj) { if (this != obj) { if (obj instanceof CardData) { CardData cardData = (CardData) obj; if (Intrinsics.areEqual(this.pan, cardData.pan) && Intrinsics.areEqual(this.expirationDate, cardData.expirationDate) && Intrinsics.areEqual(this.cvv, cardData.cvv)) { } } return false; } return true; } public final int hashCode() { String str = this.pan; int i = 0; int hashCode = (str != null ? str.hashCode() : 0) * 31; String str2 = this.expirationDate; hashCode = (hashCode + (str2 != null ? str2.hashCode() : 0)) * 31; str2 = this.cvv; if (str2 != null) { i = str2.hashCode(); } return hashCode + i; } public final String toString() { StringBuilder stringBuilder = new StringBuilder("CardData(pan="); stringBuilder.append(this.pan); stringBuilder.append(", expirationDate="); stringBuilder.append(this.expirationDate); stringBuilder.append(", cvv="); stringBuilder.append(this.cvv); stringBuilder.append(")"); return stringBuilder.toString(); } public CardData(String str, String str2, String str3) { Intrinsics.checkParameterIsNotNull(str, "pan"); Intrinsics.checkParameterIsNotNull(str2, "expirationDate"); Intrinsics.checkParameterIsNotNull(str3, "cvv"); this.pan = str; this.expirationDate = str2; this.cvv = str3; } public final String getPan() { return this.pan; } public final String getExpirationDate() { return this.expirationDate; } public final String getCvv() { return this.cvv; } public CardData(Parcel parcel) { Intrinsics.checkParameterIsNotNull(parcel, "parcel"); String readString = parcel.readString(); Intrinsics.checkExpressionValueIsNotNull(readString, "parcel.readString()"); String readString2 = parcel.readString(); Intrinsics.checkExpressionValueIsNotNull(readString2, "parcel.readString()"); parcel = parcel.readString(); Intrinsics.checkExpressionValueIsNotNull(parcel, "parcel.readString()"); this(readString, readString2, parcel); } public final void writeToParcel(Parcel parcel, int i) { if (parcel != null) { parcel.writeString(this.pan); parcel.writeString(this.expirationDate); parcel.writeString(this.cvv); } } }
[ "mekosichkin.ru" ]
mekosichkin.ru
d2d85977756e5206b965bbb5a11e9ecf4733605b
4ba3a51538e6e65e62593beb2c7a38b891c9e907
/ChichenItza/64_MinimumPathSum.java
a83d2a9100f37f831712c655fd780db4020486ba
[]
no_license
RuiLu/Xel-Ha
86c92daf5d6f849b8ae44e76d834375354301a7d
cad5404ec91a5fe6bb84094564805682c56a104b
refs/heads/master
2021-01-10T19:27:30.551992
2017-02-22T19:52:37
2017-02-22T19:52:37
55,649,444
2
0
null
null
null
null
UTF-8
Java
false
false
875
java
public class Solution { /** * Idea -> Dynamica programming * Time complexity -> O(mn) */ public int minPathSum(int[][] grid) { if (grid == null || grid.length == 0 || grid[0].length == 0) return 0; int m = grid.length; int n = grid[0].length; int[][] dp = new int[m][n]; dp[0][0] = grid[0][0]; /* calculate all positions */ for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (i == 0 && j == 0) dp[i][i] = grid[i][j]; else if (i == 0) dp[i][j] = dp[i][j-1]+grid[i][j]; else if (j == 0) dp[i][j] = dp[i-1][j]+grid[i][j]; else { dp[i][j] = Math.min(dp[i-1][j], dp[i][j-1])+grid[i][j]; } } } return dp[m-1][n-1]; } }
[ "rlu0213@hotmail.com" ]
rlu0213@hotmail.com
bb61ef1224fe1f9074e386c99dd001b607ef5151
5876a99492784e9bd68e595973d76257c9ba7f9f
/src/main/java/com/wondertek/mybatis/plugin/MybatisConfig.java
ab12ab1e5c176bd565c3fbaeb93d7f525f82bf80
[]
no_license
zbcstudy/spring-boot-mybatis
dec0bf60895fa1b9b191f823c37e733e3e26f7e0
597c1a3d7fc7edb00d8a888ccb8cf37b6fc1547e
refs/heads/master
2020-03-26T06:19:05.787282
2019-03-08T15:43:05
2019-03-08T15:43:05
144,599,149
0
0
null
null
null
null
UTF-8
Java
false
false
533
java
package com.wondertek.mybatis.plugin; import org.apache.ibatis.plugin.Interceptor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class MybatisConfig { // @Bean // public Interceptor getInterceptor() { // System.out.println("注册拦截器"); // return new FirstPlugin(); // } /** * * @return */ @Bean public Interceptor getInterceptor() { return new SqlStatsInterceptor(); } }
[ "1434756304@qq.com" ]
1434756304@qq.com
347838709a2fe82c36bd1c565328fedd9deb80c8
e590b52b0b52d022624c65e212d8a1caed87a60e
/personal-space/src/main/java/com/zss/personalspace/vo/CommentLikeVo.java
576b795576dad3b9d17767310b942753af3a7549
[]
no_license
ZSSXL/personal-website
f5c98d76ab7a6d3467770930d3af87dd709017a0
91ba7010fcde302a4e59071d503ed4eff3f1fb6a
refs/heads/master
2022-12-12T06:31:00.709683
2019-08-29T02:32:02
2019-08-29T02:32:02
201,632,193
0
0
null
2022-12-06T00:43:23
2019-08-10T13:13:05
JavaScript
UTF-8
Java
false
false
712
java
package com.zss.personalspace.vo; import lombok.Builder; import lombok.Data; /** * @author ZSS * @date 2019/8/19 13:04 * @description */ @Data @Builder public class CommentLikeVo { /** * 评论id */ private String commentId; /** * 评论所属 */ private String commentOf; /** * 评论者 */ private String commentAuthor; /** * 作者头像 */ private String headImg; /** * 评论内容 */ private String comment; /** * 点赞id */ private String likeId; /** * 点赞数量 */ private Integer likeCount; /** * 创建时间 */ private Long createTime; }
[ "1271130458@qq.com" ]
1271130458@qq.com
e318f4b61b3192f2c82bcddc0e7d897303866e8a
fb2b27f0638feaa8a435425a563910de48925931
/df_miniapp/classes/com/tt/miniapphost/placeholder/MiniappService3.java
c9078a66dc7378cd4fac7b7550d0b28ccd9ad542
[]
no_license
0moura/tiktok_source
168fdca45a76e9dc41a4667e41b7743c54692e45
dc2f1740f1f4adcb16448107e5c15fabc40ed8e5
refs/heads/master
2023-01-08T22:51:02.019984
2020-11-03T13:18:24
2020-11-03T13:18:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
360
java
package com.tt.miniapphost.placeholder; import com.tt.miniapphost.MiniappHostService; public class MiniappService3 extends MiniappHostService {} /* Location: C:\Users\august\Desktop\tik\df_miniapp\classes.jar!\com\tt\miniapphost\placeholder\MiniappService3.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "augustgl@protonmail.ch" ]
augustgl@protonmail.ch
18f995eb0cbae566d29a5344b3766e22a917032f
97fd02f71b45aa235f917e79dd68b61c62b56c1c
/src/main/java/com/tencentcloudapi/tsf/v20180326/models/DescribeClustersResponse.java
291dccc21eecf34ead4303bce808cede66261207
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java
7df922f7c5826732e35edeab3320035e0cdfba05
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
refs/heads/master
2023-09-04T10:51:57.854153
2023-09-01T03:21:09
2023-09-01T03:21:09
129,837,505
537
317
Apache-2.0
2023-09-13T02:42:03
2018-04-17T02:58:16
Java
UTF-8
Java
false
false
3,430
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.tsf.v20180326.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class DescribeClustersResponse extends AbstractModel{ /** * Cluster分页信息 注意:此字段可能返回 null,表示取不到有效值。 */ @SerializedName("Result") @Expose private TsfPageClusterV2 Result; /** * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get Cluster分页信息 注意:此字段可能返回 null,表示取不到有效值。 * @return Result Cluster分页信息 注意:此字段可能返回 null,表示取不到有效值。 */ public TsfPageClusterV2 getResult() { return this.Result; } /** * Set Cluster分页信息 注意:此字段可能返回 null,表示取不到有效值。 * @param Result Cluster分页信息 注意:此字段可能返回 null,表示取不到有效值。 */ public void setResult(TsfPageClusterV2 Result) { this.Result = Result; } /** * Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public String getRequestId() { return this.RequestId; } /** * Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } public DescribeClustersResponse() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public DescribeClustersResponse(DescribeClustersResponse source) { if (source.Result != null) { this.Result = new TsfPageClusterV2(source.Result); } if (source.RequestId != null) { this.RequestId = new String(source.RequestId); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamObj(map, prefix + "Result.", this.Result); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
febfc9b51957d79d3640dcd63ab6961b7a2c8cd7
c83cd04472b651619062252a6c6b0388c42ac3a8
/3 GENERICS/p05_NullFinder/Main.java
c2dd174503664e6845ed492bf70c09236282ae94
[ "MIT" ]
permissive
TsvetanNikolov123/JAVA---OOP-Advanced
06bd7d28eaf2db26c802302aa919d7a47ab569d3
a2d1086e70dffc9de65927910e18b9dbb199f769
refs/heads/master
2021-06-04T19:43:38.367917
2019-09-17T06:24:07
2019-09-17T06:24:07
140,524,169
0
0
MIT
2020-10-13T16:06:27
2018-07-11T05:07:01
Java
UTF-8
Java
false
false
531
java
package p05_NullFinder; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; public class Main { public static void main(String[] args) { List<Integer> integers = new ArrayList<>(); Collections.addAll(integers, 1, 2, null, 2, null); Iterable<Integer> integerNulls = ListUtils.getNullIndices(integers); // Iterable<String> strings = new ArrayList<>(); // Collections.addAll(strings, "a", null, "c"); } }
[ "tsdman1985@gmail.com" ]
tsdman1985@gmail.com
770e1067885886e9473d37665b6e9560ffc286c6
7c20e36b535f41f86b2e21367d687ea33d0cb329
/Capricornus/src/com/gopawpaw/erp/hibernate/c/ContMstr.java
3c9a38e27a8768289d421b79a950f9b7aa1757c6
[]
no_license
fazoolmail89/gopawpaw
50c95b924039fa4da8f309e2a6b2ebe063d48159
b23ccffce768a3d58d7d71833f30b85186a50cc5
refs/heads/master
2016-09-08T02:00:37.052781
2014-05-14T11:46:18
2014-05-14T11:46:18
35,091,153
1
1
null
null
null
null
UTF-8
Java
false
false
1,597
java
package com.gopawpaw.erp.hibernate.c; import java.util.Date; /** * ContMstr entity. @author MyEclipse Persistence Tools */ public class ContMstr extends AbstractContMstr implements java.io.Serializable { // Constructors /** default constructor */ public ContMstr() { } /** full constructor */ public ContMstr(ContMstrId id, String contDesc, Integer contCmtindx, Double contHeight, Double contWidth, Double contLength, String contHwlUm, Double contTareWeight, Double contMaxLoadWeight, String contWeightUm, Double contVolume, String contVolumeUm, String contSize, String contColor, String contClass, String contComposition, Boolean contReusable, Boolean contReturnable, String contReference1, String contReference2, String contReference3, String contReference4, String contReference5, Date contModDate, String contModUserid, String contUser1, String contUser2, String contQadc01, String contQadc02, Double contThickness, String contThicknessUm, Integer contOwner, String contIdMethod, Boolean contSpecialReqmnts, Double oidContMstr) { super(id, contDesc, contCmtindx, contHeight, contWidth, contLength, contHwlUm, contTareWeight, contMaxLoadWeight, contWeightUm, contVolume, contVolumeUm, contSize, contColor, contClass, contComposition, contReusable, contReturnable, contReference1, contReference2, contReference3, contReference4, contReference5, contModDate, contModUserid, contUser1, contUser2, contQadc01, contQadc02, contThickness, contThicknessUm, contOwner, contIdMethod, contSpecialReqmnts, oidContMstr); } }
[ "ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5" ]
ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5
2fba075a9924e500f71a095f0cc7a2f388813db7
6bb24b0aad6d6ba532054fde7ae3d8489e867021
/src/main/java/com/aibton/server/monitor/entity/SysProject.java
81b3fa1de1860d2370f7879b843fe830a6b2a1b6
[]
no_license
zhihuihu/server-monitor
03ff6b99f61b339cf0747a523ba5e06745ec2e03
e2fe9c6fe7dc342cbff030c5a25c968feff17607
refs/heads/master
2021-04-15T11:46:07.986972
2018-04-12T09:28:21
2018-04-12T09:28:21
126,816,397
1
0
null
null
null
null
UTF-8
Java
false
false
3,103
java
/** * otoc.cn ltd. * Copyright (c) 2016-2018 All Rights Reserved. */ package com.aibton.server.monitor.entity; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import java.util.Date; /** * 拥有项目 * * @author huzhihui * @version $: v 0.1 2018 2018/3/26 18:29 huzhihui Exp $$ */ @Table(name = "sys_project") @Entity public class SysProject { @Id private String id; /** * 项目名称 */ private String name; /** * 项目具体值 */ private String value; /** * pid搜索值 */ private String pidSearchValue; /** * 项目总文件夹 */ private String homeProjectFolder; /** * 编译后文件夹 */ private String buildFolder; /** * 发布的文件夹 */ private String deployFolder; /** * 发布项目文件夹名称 */ private String deployProjectFolderName; /** * 运行命令文件夹 */ private String startCmdFolder; /** * 测试连接URL */ private String openConnectUrl; /** * 创建时间 */ private Date createTime; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getPidSearchValue() { return pidSearchValue; } public void setPidSearchValue(String pidSearchValue) { this.pidSearchValue = pidSearchValue; } public String getBuildFolder() { return buildFolder; } public void setBuildFolder(String buildFolder) { this.buildFolder = buildFolder; } public String getDeployFolder() { return deployFolder; } public void setDeployFolder(String deployFolder) { this.deployFolder = deployFolder; } public String getOpenConnectUrl() { return openConnectUrl; } public void setOpenConnectUrl(String openConnectUrl) { this.openConnectUrl = openConnectUrl; } public String getHomeProjectFolder() { return homeProjectFolder; } public void setHomeProjectFolder(String homeProjectFolder) { this.homeProjectFolder = homeProjectFolder; } public String getDeployProjectFolderName() { return deployProjectFolderName; } public void setDeployProjectFolderName(String deployProjectFolderName) { this.deployProjectFolderName = deployProjectFolderName; } public String getStartCmdFolder() { return startCmdFolder; } public void setStartCmdFolder(String startCmdFolder) { this.startCmdFolder = startCmdFolder; } }
[ "huzhihui_c@qq.com" ]
huzhihui_c@qq.com
99ac879549fb19e91c078e9dfc4f91ec510e3545
7592d4f866aec2ce6724eea8a2ef256b9f8ee2ba
/chorDataModel/src/main/java/org/eclipse/bpel4chor/model/globalDataModel/DataMappings.java
1ce129adaa06ad39ac830aeee0e330d37ec0fc7d
[ "MIT" ]
permissive
chorsystem/middleware
831a55c92c41ac726fc0c3ecc556f1a20848132e
6d1768c5ee3f1555ffea6c2ac566a70430fdc8ba
refs/heads/master
2021-01-20T19:33:49.903074
2018-01-09T19:46:47
2018-01-09T19:46:47
63,236,713
1
0
null
null
null
null
UTF-8
Java
false
false
1,383
java
/** * <copyright> * </copyright> * * $Id$ */ package org.eclipse.bpel4chor.model.globalDataModel; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Data Mappings</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link org.eclipse.bpel4chor.model.globalDataModel.DataMappings#getDataMapping <em>Data Mapping</em>}</li> * </ul> * </p> * * @see org.eclipse.bpel4chor.model.globalDataModel.GlobalDataModelPackage#getDataMappings() * @model * @generated */ public interface DataMappings extends EObject { /** * Returns the value of the '<em><b>Data Mapping</b></em>' containment reference list. * The list contents are of type {@link org.eclipse.bpel4chor.model.globalDataModel.DataMapping}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Data Mapping</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Data Mapping</em>' containment reference list. * @see org.eclipse.bpel4chor.model.globalDataModel.GlobalDataModelPackage#getDataMappings_DataMapping() * @model containment="true" * @generated */ EList<DataMapping> getDataMapping(); } // DataMappings
[ "andreas1.weiss@googlemail.com" ]
andreas1.weiss@googlemail.com
dc7b19b2a5d2955934b87f3d20f79c7c170ffd3e
b2a635e7cc27d2df8b1c4197e5675655add98994
/com/facebook/react/uimanager/p0.java
0b751a780c325e2e5efb2a2846967f32f594e230
[]
no_license
history-purge/LeaveHomeSafe-source-code
5f2d87f513d20c0fe49efc3198ef1643641a0313
0475816709d20295134c1b55d77528d74a1795cd
refs/heads/master
2023-06-23T21:38:37.633657
2021-07-28T13:27:30
2021-07-28T13:27:30
390,328,492
1
0
null
null
null
null
UTF-8
Java
false
false
529
java
package com.facebook.react.uimanager; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.events.d; @Deprecated public class p0 { o0 a(ReactApplicationContext paramReactApplicationContext, a1 parama1, d paramd, int paramInt) { return new o0(paramReactApplicationContext, parama1, paramd, paramInt); } } /* Location: /home/yc/Downloads/LeaveHomeSafe.jar!/com/facebook/react/uimanager/p0.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "game0427game@gmail.com" ]
game0427game@gmail.com
d66c3f94d64e32f0dcfcbd90d83578ee2eac9b97
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/naver--pinpoint/5eedd95712aeeb603cf38e0341c60265d4fea5b8/before/ConnectorInitializeInterceptor.java
6976da6723014ac6a651456499e159b2fe1a0d6f
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,222
java
package com.profiler.modifier.tomcat.interceptors; import com.profiler.Agent; import com.profiler.interceptor.StaticAfterInterceptor; import com.profiler.util.Assert; import com.profiler.util.StringUtils; import org.apache.catalina.connector.Connector; import java.util.Arrays; import java.util.logging.Level; import java.util.logging.Logger; /** * */ public class ConnectorInitializeInterceptor implements StaticAfterInterceptor { private Logger logger = Logger.getLogger(this.getClass().getName()); private Agent agent; public ConnectorInitializeInterceptor(Agent agent) { Assert.notNull(agent, "agent must not be null"); this.agent = agent; } @Override public void after(Object target, String className, String methodName, String parameterDescription, Object[] args, Object result) { if (logger.isLoggable(Level.INFO)) { logger.info("after " + StringUtils.toString(target) + " " + className + "." + methodName + parameterDescription + " args:" + Arrays.toString(args) + " result:" + result); } Connector connector = (Connector) target; agent.getServerInfo().addConnector(connector.getProtocol(), connector.getPort()); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
69f2838960d16fe1af38b3fe1bef57e7caec5bef
65befe28d69189681a2c79c77d9fcbdceab3dc27
/Algorithms/new2019/src/new2019/B11724.java
e4e92da5a3c433cc2c9704814f2098e46960706f
[]
no_license
solwish/TIL
554a67f79c66ed5d5a5075f08b6f0369aa363249
4314767fa763de73238aa141e105a5cf3641a9fc
refs/heads/master
2023-01-08T01:11:34.677452
2021-01-07T13:43:56
2021-01-07T13:43:56
101,876,124
10
0
null
2023-01-03T14:41:06
2017-08-30T12:03:25
CSS
UTF-8
Java
false
false
845
java
package new2019; import java.util.Scanner; public class B11724 { static int N, M, map[][], cnt, start, visit[]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); M = sc.nextInt(); map = new int[N + 1][N + 1]; visit = new int[N + 1]; cnt = 0; int t1, t2; for (int i = 1; i <= M; i++) { t1 = sc.nextInt(); t2 = sc.nextInt(); map[t1][t2] = 1; map[t2][t1] = 1; } for (int i = 1; i <= N; i++) { start = i; for (int j = 1; j <= N; j++) if (map[start][j] == 1 && visit[i] == 0) { cnt++; dfs(j); } } for (int i = 1; i <= N; i++) if (visit[i] == 0) cnt++; System.out.println(cnt); } private static void dfs(int now) { visit[now] = cnt; for (int i = 1; i <= N; i++) if (map[now][i] == 1 && visit[i] == 0) dfs(i); } }
[ "solwish90@gmail.com" ]
solwish90@gmail.com
e6856394f20a924d96ef765bbc4d86f1cb8c3155
c1b5514b43bb3bfa7d3f52df1be0c01492557746
/src/main/java/designPattern/Structural/Proxy/template/RealSubject.java
ddf3880bb97b9ff225abb96b6d0558dfe078f802
[]
no_license
Qstar/JavaCases
9fa7ff7bdd65aa9ba19c06c750712433c97efa71
dc1e87c17a31365afaf3385d712018ceeea3470d
refs/heads/master
2020-04-15T12:42:10.865419
2018-08-02T06:27:08
2018-08-02T06:27:08
64,284,352
0
0
null
null
null
null
UTF-8
Java
false
false
173
java
package designPattern.Structural.Proxy.template; public class RealSubject extends Subject { @Override public void operation() { //the real operation } }
[ "davesla2012@hotmail.com" ]
davesla2012@hotmail.com
47f4a9e51fa060b4e7d885d8c9d17d06afa4478f
383e578ec8ac3043ddece8223494f27f4a4c76dd
/legend.biz/src/main/java/com/tqmall/legend/biz/sms/impl/MobileVerifyRecordServiceImpl.java
06e8ef8116a10e111107b706955dbd8cc8d44073
[]
no_license
xie-summer/legend
0018ee61f9e864204382cd202fe595b63d58343a
7e7bb14d209e03445a098b84cf63566702e07f15
refs/heads/master
2021-06-19T13:44:58.640870
2017-05-18T08:34:13
2017-05-18T08:34:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,645
java
package com.tqmall.legend.biz.sms.impl; import com.tqmall.common.exception.BizException; import com.tqmall.common.template.BizTemplate; import com.tqmall.legend.biz.base.BaseServiceImpl; import com.tqmall.legend.biz.sms.MobileVerifyRecordService; import com.tqmall.legend.dao.sms.MobileVerifyRecordDao; import com.tqmall.legend.entity.sms.MobileVerifyRecord; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import javax.validation.constraints.NotNull; import java.util.*; /** * Created by lixiao on 15-3-13. */ @Service public class MobileVerifyRecordServiceImpl extends BaseServiceImpl implements MobileVerifyRecordService { @Autowired MobileVerifyRecordDao mobileVerifyRecordDao; @Override public List<MobileVerifyRecord> select(Map map) { return mobileVerifyRecordDao.select(map); } @Override public int insert(MobileVerifyRecord mobileVerifyRecord) { return mobileVerifyRecordDao.insert(mobileVerifyRecord); } @Override public int update(MobileVerifyRecord mobileVerifyRecord) { return mobileVerifyRecordDao.updateById(mobileVerifyRecord); } @Override public void saveVerifyRecord(@NotNull String mobile, @NotNull String sendCode) { // IF 存在记录 THEN 更新验证码 Map<String, Object> queryParam = new HashMap<String, Object>(4); queryParam.put("mobile", mobile); List<String> sorts = new ArrayList<String>(1); sorts.add(" id desc "); queryParam.put("sorts", sorts); queryParam.put("offset", 0); queryParam.put("limit", 1); List<MobileVerifyRecord> mobileVerifyRecords = this.select(queryParam); if (!CollectionUtils.isEmpty(mobileVerifyRecords)) { MobileVerifyRecord mobileVerifyRecord = mobileVerifyRecords.get(0); mobileVerifyRecord.setCode(sendCode); mobileVerifyRecord.setGmtModified(new Date()); this.update(mobileVerifyRecord); return; } // 插入一条新的验证码 MobileVerifyRecord mobileVerifyRecord = new MobileVerifyRecord(); mobileVerifyRecord.setCode(sendCode); mobileVerifyRecord.setMobile(mobile); mobileVerifyRecord.setGmtModified(new Date()); mobileVerifyRecord.setGmtCreate(new Date()); this.insert(mobileVerifyRecord); } @Override public boolean checkSMSCode(@NotNull String mobile, @NotNull String smsCode, int validTime) { // 是否通过 boolean isPass = Boolean.FALSE; Map<String, Object> queryParam = new HashMap<String, Object>(4); queryParam.put("mobile", mobile); List<String> sorts = new ArrayList<String>(1); sorts.add(" id desc "); queryParam.put("sorts", sorts); queryParam.put("offset", 0); queryParam.put("limit", 1); List<MobileVerifyRecord> mobileVerifyRecords = this.select(queryParam); if (CollectionUtils.isEmpty(mobileVerifyRecords)) { return isPass; } MobileVerifyRecord mobileVerifyRecord = mobileVerifyRecords.get(0); Date gmtModified = mobileVerifyRecord.getGmtModified(); if (gmtModified == null) { return isPass; } // 是否超过有效时间 Long diffTime = new Date().getTime() - gmtModified.getTime(); if (diffTime > validTime * 1000) { return isPass; } String code = mobileVerifyRecord.getCode(); if (code != null && code.equals(smsCode)) { return Boolean.TRUE; } return isPass; } @Override public String checkSMSCodeThrowException(final String mobile, final String smsCode, final int validTime) { return new BizTemplate<String>() { @Override protected void checkParams() throws IllegalArgumentException { } @Override protected String process() throws BizException { Map<String, Object> queryParam = new HashMap<String, Object>(4); queryParam.put("mobile", mobile); List<String> sorts = new ArrayList<String>(1); sorts.add(" id desc "); queryParam.put("sorts", sorts); queryParam.put("offset", 0); queryParam.put("limit", 1); List<MobileVerifyRecord> mobileVerifyRecords = select(queryParam); if (CollectionUtils.isEmpty(mobileVerifyRecords)) { throw new BizException("未发送验证码"); } MobileVerifyRecord mobileVerifyRecord = mobileVerifyRecords.get(0); Date gmtModified = mobileVerifyRecord.getGmtModified(); if (gmtModified == null) { throw new BizException("手机验证码错误"); } // 是否超过有效时间ms Long diffTime = new Date().getTime() - gmtModified.getTime(); if (diffTime > validTime) { throw new BizException("手机验证码已失效,请重新发送"); } String code = mobileVerifyRecord.getCode(); if (code != null && code.equals(smsCode)) { return "验证通过"; } throw new BizException("手机验证码错误"); } }.execute(); } @Override public MobileVerifyRecord getMobileVerifyRecord(final String mobile) { return new BizTemplate<MobileVerifyRecord>() { @Override protected void checkParams() throws IllegalArgumentException { } @Override protected MobileVerifyRecord process() throws BizException { MobileVerifyRecord mobileVerifyRecord = null; Map<String, Object> queryParam = new HashMap<String, Object>(4); queryParam.put("mobile", mobile); List<String> sorts = new ArrayList<String>(1); sorts.add(" id desc "); queryParam.put("sorts", sorts); queryParam.put("offset", 0); queryParam.put("limit", 1); List<MobileVerifyRecord> mobileVerifyRecords = select(queryParam); if (!CollectionUtils.isEmpty(mobileVerifyRecords)) { mobileVerifyRecord = mobileVerifyRecords.get(0); } return mobileVerifyRecord; } }.execute(); } }
[ "zhangting.huang@tqmall.com" ]
zhangting.huang@tqmall.com
d21492ebdf60afa65ad8633e326e4793d8bbaa9a
5f4afbc92a72bd847b8aa9ae95f9be9d706ad7d8
/esuizhen-service/esuizhen-business-system/src/main/java/com/esuizhen/cloudservice/business/service/business/mdt/PatientActivityService.java
f63ab6b244d61055dd747d5e6cf49806743fa865
[]
no_license
331491512/esz
dfc13ba9e142ab1cbacc92cd0bf1b55fec2a05a1
8edd10a74b75d36d3963d2ae64602d02ba548b43
refs/heads/master
2021-04-06T20:31:45.968785
2018-03-16T02:56:36
2018-03-16T02:56:36
125,451,748
1
0
null
null
null
null
UTF-8
Java
false
false
441
java
package com.esuizhen.cloudservice.business.service.business.mdt; import com.esuizhen.cloudservice.business.bean.TPatientActivitySignupReq; /** * @ClassName: PatientActivityService.java * @Description: * @author fanpanwei * @date 2016年9月28日 */ public interface PatientActivityService { public Integer searchPatientActivity(TPatientActivitySignupReq req); public void markPatientActivity(TPatientActivitySignupReq req); }
[ "zhuguo@qgs-china.com" ]
zhuguo@qgs-china.com
0b86552c29a63a9b8e9cd5839bf5ca4f187b75a2
7219f75733d906ff930e1b6ba1be249d6007b582
/src/com/vikings/sanguo/ui/alert/PlayerWantedConfirmTip.java
ae258cac4363322d85069f46e5865723f9bdd7f6
[]
no_license
wongainia/sanguo
9c9b528a3b4cfaf58f94badf71add1b8bb77e038
55e38be665f1b9e3a4dc7a1caaa09728563cf4b2
refs/heads/master
2020-05-23T09:51:26.455001
2019-05-14T22:44:06
2019-05-14T22:44:06
186,711,060
0
1
null
null
null
null
UTF-8
Java
false
false
3,513
java
package com.vikings.sanguo.ui.alert; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import com.vikings.sanguo.R; import com.vikings.sanguo.biz.GameBiz; import com.vikings.sanguo.cache.Account; import com.vikings.sanguo.exception.GameException; import com.vikings.sanguo.invoker.BaseInvoker; import com.vikings.sanguo.model.BriefGuildInfoClient; import com.vikings.sanguo.model.ItemBag; import com.vikings.sanguo.model.OtherUserClient; import com.vikings.sanguo.model.ReturnInfoClient; import com.vikings.sanguo.utils.IconUtil; import com.vikings.sanguo.utils.StringUtil; import com.vikings.sanguo.utils.ViewUtil; import com.vikings.sanguo.widget.CustomConfirmDialog; public class PlayerWantedConfirmTip extends CustomConfirmDialog implements OnClickListener { private static final int layout = R.layout.alert_player_wanted_confirm; private OtherUserClient ouc; private BriefGuildInfoClient bgic; private ItemBag itemBag; public PlayerWantedConfirmTip(OtherUserClient ouc, BriefGuildInfoClient bgic, ItemBag itemBag) { super("确认追杀目标", CustomConfirmDialog.DEFAULT); this.bgic = bgic; this.ouc = ouc; this.itemBag = itemBag; setButton(FIRST_BTN, "确定", this); setButton(SECOND_BTN, "取消", closeL); } public void show() { setValue(); super.show(); } private void setValue() { if (ouc.bref().isVip()) { IconUtil.setUserIcon( (ViewGroup) content.findViewById(R.id.iconLayout), ouc.bref(), "VIP" + ouc.bref().getCurVip().getLevel()); } else { IconUtil.setUserIcon( (ViewGroup) content.findViewById(R.id.iconLayout), ouc.bref()); } ViewUtil.setText(content, R.id.nickName, ouc.getNick()); ViewUtil.setText(content, R.id.userID, "(ID:" + ouc.getId().intValue() + ")"); String countryName = ouc.bref().getCountryName(); ViewUtil.setText(content, R.id.countryName, "国家:" + (StringUtil.isNull(countryName) ? "无" : countryName)); if (bgic == null) { ViewUtil.setText(content, R.id.guildName, "家族:无"); } else { ViewUtil.setText(content, R.id.guildName, "家族:" + bgic.getName()); } } @Override protected View getContent() { return controller.inflate(layout, contentLayout, false); } @Override public void onClick(View v) { if (Account.user.getCountry().intValue() == ouc.getCountry()) { dismiss(); controller.alert("抱歉,追杀令使用失败!<br/>不可对本国玩家发布追杀令,请填写敌国玩家的ID;"); return; } if (ouc.getManor().getPos() == 0) { dismiss(); controller.alert("抱歉,追杀令使用失败!<br>你选择的用户级别太低,等他开启了世界征战再来吧!"); return; } if (ouc.isWanted()) { dismiss(); controller.alert("抱歉,追杀令使用失败!<br>目标正在被人追杀,请不要重复使用!"); return; } new PlayerWantedInvoker().start(); } private class PlayerWantedInvoker extends BaseInvoker { private ReturnInfoClient ric; @Override protected String loadingMsg() { return "发布中..."; } @Override protected String failMsg() { return "使用" + itemBag.getItem().getName() + "失败"; } @Override protected void fire() throws GameException { ric = GameBiz.getInstance().playerWanted(ouc.getId()); } @Override protected void onOK() { dismiss(); ric.setMsg("使用" + itemBag.getItem().getName() + "成功"); controller.updateUI(ric, true, false, true); } } }
[ "dengyuanming@dengyuanming" ]
dengyuanming@dengyuanming
2f9312a6311a4110531de3803451839f7ef52d27
fca2e675f48aaff31048710cc00ce7046aa711d9
/src/main/java/com/xero/models/payrollnz/Account.java
6f630eedd17f456b32de3e1299b75b9c8699f280
[ "MIT" ]
permissive
XeroAPI/Xero-Java
c13b69366cd624bbba2993e9db9e38bdecb7c7eb
9912bd6fe795b706aadb152e53c9c28b1e03d9ba
refs/heads/master
2023-08-08T20:14:56.452424
2023-06-15T18:38:41
2023-06-15T18:38:41
61,156,602
82
114
MIT
2023-08-29T20:36:57
2016-06-14T21:22:47
Java
UTF-8
Java
false
false
5,542
java
/* * Xero Payroll NZ * This is the Xero Payroll API for orgs in the NZ region. * * Contact: api@xero.com * * 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.xero.models.payrollnz; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import com.xero.api.StringUtil; import io.swagger.annotations.ApiModelProperty; import java.util.Objects; import java.util.UUID; /** Account */ public class Account { StringUtil util = new StringUtil(); @JsonProperty("accountID") private UUID accountID; /** The assigned AccountType */ public enum TypeEnum { /** PAYELIABILITY */ PAYELIABILITY("PAYELIABILITY"), /** WAGESPAYABLE */ WAGESPAYABLE("WAGESPAYABLE"), /** WAGESEXPENSE */ WAGESEXPENSE("WAGESEXPENSE"), /** BANK */ BANK("BANK"); private String value; TypeEnum(String value) { this.value = value; } /** * getValue * * @return String value */ @JsonValue public String getValue() { return value; } /** * toString * * @return String value */ @Override public String toString() { return String.valueOf(value); } /** * fromValue * * @param value String */ @JsonCreator public static TypeEnum fromValue(String value) { for (TypeEnum b : TypeEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } @JsonProperty("type") private TypeEnum type; @JsonProperty("code") private String code; @JsonProperty("name") private String name; /** * The Xero identifier for Settings. * * @param accountID UUID * @return Account */ public Account accountID(UUID accountID) { this.accountID = accountID; return this; } /** * The Xero identifier for Settings. * * @return accountID */ @ApiModelProperty(value = "The Xero identifier for Settings.") /** * The Xero identifier for Settings. * * @return accountID UUID */ public UUID getAccountID() { return accountID; } /** * The Xero identifier for Settings. * * @param accountID UUID */ public void setAccountID(UUID accountID) { this.accountID = accountID; } /** * The assigned AccountType * * @param type TypeEnum * @return Account */ public Account type(TypeEnum type) { this.type = type; return this; } /** * The assigned AccountType * * @return type */ @ApiModelProperty(value = "The assigned AccountType") /** * The assigned AccountType * * @return type TypeEnum */ public TypeEnum getType() { return type; } /** * The assigned AccountType * * @param type TypeEnum */ public void setType(TypeEnum type) { this.type = type; } /** * A unique 3 digit number for each Account * * @param code String * @return Account */ public Account code(String code) { this.code = code; return this; } /** * A unique 3 digit number for each Account * * @return code */ @ApiModelProperty(value = "A unique 3 digit number for each Account") /** * A unique 3 digit number for each Account * * @return code String */ public String getCode() { return code; } /** * A unique 3 digit number for each Account * * @param code String */ public void setCode(String code) { this.code = code; } /** * Name of the Account. * * @param name String * @return Account */ public Account name(String name) { this.name = name; return this; } /** * Name of the Account. * * @return name */ @ApiModelProperty(value = "Name of the Account.") /** * Name of the Account. * * @return name String */ public String getName() { return name; } /** * Name of the Account. * * @param name String */ public void setName(String name) { this.name = name; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Account account = (Account) o; return Objects.equals(this.accountID, account.accountID) && Objects.equals(this.type, account.type) && Objects.equals(this.code, account.code) && Objects.equals(this.name, account.name); } @Override public int hashCode() { return Objects.hash(accountID, type, code, name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Account {\n"); sb.append(" accountID: ").append(toIndentedString(accountID)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).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(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "sid.maestre@gmail.com" ]
sid.maestre@gmail.com
f6e936c7348f85497cf67dc424f744fa47b00cd4
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13141-17-22-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/com/xpn/xwiki/web/ActionFilter_ESTest.java
fc473f03383fb375fb5316d460ab0fdee660c2f4
[]
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
548
java
/* * This file was automatically generated by EvoSuite * Wed Jan 22 04:14:17 UTC 2020 */ package com.xpn.xwiki.web; 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 ActionFilter_ESTest extends ActionFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
ba4b910deda86c2e6eda78e479d20f271a958039
0981333953bdbf488421f094bd584efd0c789902
/SillyChildClient/app/src/main/java/com/sillykid/app/mine/myorder/goodorder/GoodOrderContract.java
3fb1bb33caec602b2b9929d0969d4f90e7a250c7
[ "Apache-2.0" ]
permissive
921668753/SillyChildClient2-Android
ff7f0d9a97be64e610ecad304903bc853cbb3db0
f8f8ea3cca9013d39c9d7164bd2bd9573528093d
refs/heads/master
2020-03-23T09:18:15.433017
2018-12-04T13:46:33
2018-12-04T13:46:33
141,379,323
1
0
null
null
null
null
UTF-8
Java
false
false
836
java
package com.sillykid.app.mine.myorder.goodorder; import android.content.Context; import com.common.cklibrary.common.BasePresenter; import com.common.cklibrary.common.BaseView; /** * Created by ruitu on 2016/9/24. */ public interface GoodOrderContract { interface Presenter extends BasePresenter { /** * 获取订单信息 */ void getOrderList(Context context, String status, int page); /** * 取消订单 */ void postOrderCancel(Context context, int orderid); /** * 提醒发货 */ void postOrderRemind(Context context, int orderid); /** * 确认收货 */ void postOrderConfirm(Context context, int orderid); } interface View extends BaseView<Presenter, String> { } }
[ "921668753@qq.com" ]
921668753@qq.com
b110ee213b474bdde4988a54b5cec814b5fa4a95
32d70784dedff6e1738d3a498c315a1b6fefde82
/java8demo/src/main/java/com/art2cat/dev/Insurance.java
7eaf8dcaa70e2b879b7cf475cd60912410688a16
[]
no_license
UncleTian/JavaDemo
125fb9ad6709ddfe55c00de97a4bdcf8a77402c7
1cfb26e6b5c5df8ddb90a24f628b49d6987ffdfa
refs/heads/master
2020-03-24T17:19:56.713230
2018-07-18T09:54:47
2018-07-18T09:54:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
321
java
package com.art2cat.dev; public class Insurance { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String toString() { return this.name + this.hashCode(); } }
[ "yiming.whz@gmail.com" ]
yiming.whz@gmail.com
be93a8d7afa7b487574825a08305757fd0efaf5c
5a027c7a6d9afc1bbc8b2bc86e43e96b80dd9fa8
/workspace_movistar_wl11/zejbVpiStbBa/ejbModule/co/com/telefonica/atiempo/vpistbba/serviciosba/ejb/sb/ConfiguracionTerraBABean.java
840d2ba93c244ea2acd7c4c370d2cb6bed228710
[]
no_license
alexcamp/ArrobaTiempoGradle
00135dc6f101e99026a377adc0d3b690cb5f2bd7
fc4a845573232e332c5f1211b72216ce227c3f38
refs/heads/master
2020-12-31T00:18:57.337668
2016-05-27T15:02:04
2016-05-27T15:02:04
59,520,455
0
0
null
null
null
null
UTF-8
Java
false
false
588
java
package co.com.telefonica.atiempo.vpistbba.serviciosba.ejb.sb; import co.com.telefonica.atiempo.intf.IServicio; import co.com.telefonica.atiempo.vpistbba.serviciosba.ConfiguracionTerraBAServicio; /** * Bean implementation class for Enterprise Bean: ConfiguracionTerraBA */ public class ConfiguracionTerraBABean extends co.com.telefonica.atiempo.utiles.MDServicioBean{ /* (non-Javadoc) * @see co.com.telefonica.atiempo.utiles.MDServicioBean#getServicio() */ public IServicio getServicio() { // TODO Auto-generated method stub return new ConfiguracionTerraBAServicio(); } }
[ "alexander5075@hotmail.com" ]
alexander5075@hotmail.com
94eb00737385d9dffbd82d5cfbe8ffac976e3346
e1e5bd6b116e71a60040ec1e1642289217d527b0
/H5/L2jReunion/L2jReunion_2014_07_14/L2J_ReunionProject_Core/java/l2r/gameserver/datatables/sql/TeleportLocationTable.java
3057cb9e021f9a73a9b9198eed55d4d46ecd5c69
[]
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
4,014
java
/* * Copyright (C) 2004-2014 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.datatables.sql; import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; import java.util.HashMap; import java.util.Map; import l2r.Config; import l2r.L2DatabaseFactory; import l2r.gameserver.model.L2TeleportLocation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * This class ... * @version $Revision: 1.3.2.2.2.3 $ $Date: 2005/03/27 15:29:18 $ */ public class TeleportLocationTable { private static Logger _log = LoggerFactory.getLogger(TeleportLocationTable.class); private final Map<Integer, L2TeleportLocation> _teleports = new HashMap<>(); protected TeleportLocationTable() { reloadAll(); } public void reloadAll() { _teleports.clear(); try (Connection con = L2DatabaseFactory.getInstance().getConnection(); Statement s = con.createStatement(); ResultSet rs = s.executeQuery("SELECT id, loc_x, loc_y, loc_z, price, fornoble, itemId FROM teleport")) { L2TeleportLocation teleport; while (rs.next()) { teleport = new L2TeleportLocation(); teleport.setTeleId(rs.getInt("id")); teleport.setX(rs.getInt("loc_x")); teleport.setY(rs.getInt("loc_y")); teleport.setZ(rs.getInt("loc_z")); teleport.setPrice(rs.getInt("price")); teleport.setIsForNoble(rs.getInt("fornoble") == 1); teleport.setItemId(rs.getInt("itemId")); _teleports.put(teleport.getTeleId(), teleport); } _log.info(getClass().getSimpleName() + ": Loaded " + _teleports.size() + " Teleport Location Templates."); } catch (Exception e) { _log.error(getClass().getSimpleName() + ": Error loading Teleport Table.", e); } if (Config.CUSTOM_TELEPORT_TABLE) { int _cTeleCount = _teleports.size(); try (Connection con = L2DatabaseFactory.getInstance().getConnection(); Statement s = con.createStatement(); ResultSet rs = s.executeQuery("SELECT id, loc_x, loc_y, loc_z, price, fornoble, itemId FROM custom_teleport")) { L2TeleportLocation teleport; while (rs.next()) { teleport = new L2TeleportLocation(); teleport.setTeleId(rs.getInt("id")); teleport.setX(rs.getInt("loc_x")); teleport.setY(rs.getInt("loc_y")); teleport.setZ(rs.getInt("loc_z")); teleport.setPrice(rs.getInt("price")); teleport.setIsForNoble(rs.getInt("fornoble") == 1); teleport.setItemId(rs.getInt("itemId")); _teleports.put(teleport.getTeleId(), teleport); } _cTeleCount = _teleports.size() - _cTeleCount; if (_cTeleCount > 0) { _log.info(getClass().getSimpleName() + ": Loaded " + _cTeleCount + " Custom Teleport Location Templates."); } } catch (Exception e) { _log.warn(getClass().getSimpleName() + ": Error while creating custom teleport table " + e.getMessage(), e); } } } /** * @param id * @return */ public L2TeleportLocation getTemplate(int id) { return _teleports.get(id); } public static TeleportLocationTable getInstance() { return SingletonHolder._instance; } private static class SingletonHolder { protected static final TeleportLocationTable _instance = new TeleportLocationTable(); } }
[ "64197706+L2jOpenSource@users.noreply.github.com" ]
64197706+L2jOpenSource@users.noreply.github.com
89486168af6d56d0232ad9d232539d44415d51b9
498dd2daff74247c83a698135e4fe728de93585a
/clients/google-api-services-videointelligence/v1p2beta1/1.26.0/com/google/api/services/videointelligence/v1p2beta1/model/GoogleCloudVideointelligenceV1p3beta1Entity.java
fc7a1e6845c67667848784e4d849e29d9c838db2
[ "Apache-2.0" ]
permissive
googleapis/google-api-java-client-services
0e2d474988d9b692c2404d444c248ea57b1f453d
eb359dd2ad555431c5bc7deaeafca11af08eee43
refs/heads/main
2023-08-23T00:17:30.601626
2023-08-20T02:16:12
2023-08-20T02:16:12
147,399,159
545
390
Apache-2.0
2023-09-14T02:14:14
2018-09-04T19:11:33
null
UTF-8
Java
false
false
3,905
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. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.videointelligence.v1p2beta1.model; /** * Detected entity from video analysis. * * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Video Intelligence API. For a detailed * explanation see: * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> * </p> * * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class GoogleCloudVideointelligenceV1p3beta1Entity extends com.google.api.client.json.GenericJson { /** * Textual description, e.g. `Fixed-gear bicycle`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String description; /** * Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search * API](https://developers.google.com/knowledge-graph/). * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String entityId; /** * Language code for `description` in BCP-47 format. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String languageCode; /** * Textual description, e.g. `Fixed-gear bicycle`. * @return value or {@code null} for none */ public java.lang.String getDescription() { return description; } /** * Textual description, e.g. `Fixed-gear bicycle`. * @param description description or {@code null} for none */ public GoogleCloudVideointelligenceV1p3beta1Entity setDescription(java.lang.String description) { this.description = description; return this; } /** * Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search * API](https://developers.google.com/knowledge-graph/). * @return value or {@code null} for none */ public java.lang.String getEntityId() { return entityId; } /** * Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search * API](https://developers.google.com/knowledge-graph/). * @param entityId entityId or {@code null} for none */ public GoogleCloudVideointelligenceV1p3beta1Entity setEntityId(java.lang.String entityId) { this.entityId = entityId; return this; } /** * Language code for `description` in BCP-47 format. * @return value or {@code null} for none */ public java.lang.String getLanguageCode() { return languageCode; } /** * Language code for `description` in BCP-47 format. * @param languageCode languageCode or {@code null} for none */ public GoogleCloudVideointelligenceV1p3beta1Entity setLanguageCode(java.lang.String languageCode) { this.languageCode = languageCode; return this; } @Override public GoogleCloudVideointelligenceV1p3beta1Entity set(String fieldName, Object value) { return (GoogleCloudVideointelligenceV1p3beta1Entity) super.set(fieldName, value); } @Override public GoogleCloudVideointelligenceV1p3beta1Entity clone() { return (GoogleCloudVideointelligenceV1p3beta1Entity) super.clone(); } }
[ "45548808+kolea2@users.noreply.github.com" ]
45548808+kolea2@users.noreply.github.com
6df40bf9358a51980349375b40b682b460c5c7d2
51a172696626ff4eecd69e24178db52212de1b7d
/mall/dao/src/main/java/com/dao/common/ExpressCompanyMapper.java
c31122cc8fda6c46d8293f27dd51bed869418160
[]
no_license
295647706/mall
eb2bf9d9c8efd326aa01fb5b7e7dd8ff7bb814e5
141643f92bc7edff8c5888ba18df6d4029233503
refs/heads/master
2020-05-16T18:35:31.123120
2019-04-24T13:20:29
2019-04-24T13:20:29
183,231,222
0
0
null
null
null
null
UTF-8
Java
false
false
266
java
package com.dao.common; import com.dao.BaseMapper; import com.model.common.ExpressCompany; import com.model.common.ExpressCompanySub; /** * * @Author Ruan * */ public interface ExpressCompanyMapper extends BaseMapper<ExpressCompany, ExpressCompanySub> { }
[ "295647706@qq.com" ]
295647706@qq.com
afcd6b5e1692bd746fd75f2077e8e92c03095b12
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_0ebaa13942d084dd78704a38e7eebdb5c14bcf8f/CheckBoxZone/14_0ebaa13942d084dd78704a38e7eebdb5c14bcf8f_CheckBoxZone_t.java
206a8d81f747e410aa8215c261b0668f03014882
[]
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
539
java
package vialab.SMT; public class CheckBoxZone extends Zone { public CheckBoxZone(String name, int x, int y, int width, int height) { super(name, x, y, width, height); } public boolean checked = false; protected void drawImpl() { fill(255); rect(0, 0, width, height, 10); if (checked) { stroke(0); strokeWeight(5); line(width, 0, width / 3, height); line(width / 3, height, 0, (float) (height * 2. / 3.)); } } @Override protected void touchUpImpl(Touch t) { checked = !checked; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
995c10068f3b409e9197ac40925bebe2a727f0e7
495bd721adc0a8e6566566516e94f15186149cf7
/alloy/src/main/java/com/liferay/faces/alloy/component/AUITextBoxListItem.java
1514b88cb7c56e1a6c61b746304b7d33c135b072
[]
no_license
prakashnsm/liferay-faces
fd7c01b20bd35be6ee3749ef855f0c61f8581aa3
86ebb2e87a9a34d5f3c3d54354a5260767192698
refs/heads/master
2020-04-07T10:26:56.866379
2013-04-02T19:12:07
2013-04-02T19:12:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
915
java
/** * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.liferay.faces.alloy.component; import javax.faces.component.NamingContainer; /** * @author Neil Griffin */ public class AUITextBoxListItem extends AUIPanel implements NamingContainer { @Override public String getRendererType() { return "com.liferay.faces.alloy.renderkit.TextBoxListItemRenderer"; } }
[ "neil.griffin.scm@gmail.com" ]
neil.griffin.scm@gmail.com
dc58ac693ab1814f6bc0897046994d2f90c8f4fb
2241f29c7f4c5b5237d88233436955a37625994d
/mysmarthompage/src/net/syntax/part03/JoinDemo.java
46ac3275a412eb019c4ef403abc883433e886024
[]
no_license
LeeHyeonHyeong/mysmarthomepage
ce59c8e429d9d23e0e5533dfff202fa3876b846c
919874807027c4b88aaf91851e8f15441f3024a3
refs/heads/master
2020-05-09T13:40:19.464279
2015-06-01T06:33:34
2015-06-01T06:33:34
35,527,412
0
0
null
null
null
null
UHC
Java
false
false
1,752
java
package net.syntax.part03; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Servlet implementation class JoinDemo */ @WebServlet("/part03/join_demo.do") public class JoinDemo extends HttpServlet { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); String gender = request.getParameter("gender"); String name = request.getParameter("name"); String age = request.getParameter("age"); String id = request.getParameter("id"); String pwd = request.getParameter("pwd"); String check_mail = request.getParameter("check_mail"); String content = request.getParameter("content"); PrintWriter out = response.getWriter(); out.print("<html><body>"); out.println("당신의 입력한 정보입니다.<hr>"); out.print("성별 : <b>"); out.print(gender +"</b>"); out.print("이름 : <b>"); out.print(name +"</b>"); out.print("나이 : <b>"); out.print(age +"</b>"); out.print("ID : <b>"); out.print(id +"</b>"); out.print("비밀번호 : <b>"); out.print(pwd +"</b>"); out.print("<br> 메일정보 수신여부 : <b>"); out.print(check_mail); out.println("</b><br> 가입인사 : <b><pre>"); out.print(content); out.println("</b></pre><br/><a href='javascript:history.go(-1)'>뒤로<a/>"); out.print("</body></html>"); out.close(); } }
[ "Administrator@MSDN-SPECIAL" ]
Administrator@MSDN-SPECIAL
f215efb7b6a42d820443eea6bbeea6b8516dac0a
d67a7e871ad7936242f4d5b162904cda5352ff90
/src/main/java/top/hequehua/swagger/utils/StringUtil.java
c415ac3c310f5cbab5f434c7823de2b9cb009b36
[]
no_license
luotianwen/lorderinterface2
b5578018ec4a9a7ee252cea8fce60c3863d63fcb
9edb123d5278a7de6fcf33ad895433618837c77b
refs/heads/master
2022-06-24T12:47:21.252824
2021-01-20T06:57:39
2021-01-20T06:57:39
203,414,623
0
0
null
2022-06-21T01:42:48
2019-08-20T16:33:28
JavaScript
UTF-8
Java
false
false
2,054
java
package top.hequehua.swagger.utils; import com.jfinal.kit.StrKit; /** **/ public class StringUtil { /** * 转换为下划线 * * @param camelCaseName * @return */ public static String underscoreName(String camelCaseName) { StringBuilder result = new StringBuilder(); if (camelCaseName != null && camelCaseName.length() > 0) { result.append(camelCaseName.substring(0, 1).toLowerCase()); for (int i = 1; i < camelCaseName.length(); i++) { char ch = camelCaseName.charAt(i); if (Character.isUpperCase(ch)) { result.append("_"); result.append(Character.toLowerCase(ch)); } else { result.append(ch); } } } return result.toString(); } /** * 转换为驼峰 * * @param underscoreName * @return */ public static String camelCaseName(String underscoreName) { StringBuilder result = new StringBuilder(); if (underscoreName != null && underscoreName.length() > 0) { boolean flag = false; for (int i = 0; i < underscoreName.length(); i++) { char ch = underscoreName.charAt(i); if ("_".charAt(0) == ch) { flag = true; } else { if (flag) { result.append(Character.toUpperCase(ch)); flag = false; } else { result.append(ch); } } } } return result.toString(); } public static String substringAfter(String str, String separator) { if (StrKit.isBlank(str)) { return str; } else if (separator == null) { return ""; } else { int pos = str.indexOf(separator); return pos == -1 ? "" : str.substring(pos + separator.length()); } } }
[ "luotianwen456123@126.com" ]
luotianwen456123@126.com
86043530d1e7d064e34fa7aca826b97ab5be464f
f15bb0ddf9e28ea808f4c49e8c442c29e6f53218
/bus-health/src/main/java/org/aoju/bus/health/hardware/AbstractUsbDevice.java
b075a8104d7b1200cb49b22516ed80dc331ab295
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
erickwang/bus
7f31a19ace167b2ce525105d4393b379118a525e
a8ed185f2f1c0f085d8a2be5e005bcbf50431386
refs/heads/master
2022-04-15T15:28:06.342430
2020-03-26T06:14:42
2020-03-26T06:14:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,499
java
/********************************************************************************* * * * The MIT License * * * * Copyright (c) 2015-2020 aoju.org and other contributors. * * * * Permission is hereby granted, free of charge, to any person obtaining a copy * * of this software and associated documentation files (the "Software"), to deal * * in the Software without restriction, including without limitation the rights * * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included in * * all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * * THE SOFTWARE. * ********************************************************************************/ package org.aoju.bus.health.hardware; import org.aoju.bus.core.lang.Normal; import org.aoju.bus.core.lang.Symbol; import java.util.Arrays; /** * A USB device * * @author Kimi Liu * @version 5.8.1 * @since JDK 1.8+ */ public abstract class AbstractUsbDevice implements UsbDevice { protected String name; protected String vendor; protected String vendorId; protected String productId; protected String serialNumber; protected String uniqueDeviceId; protected UsbDevice[] connectedDevices; /** * <p> * Constructor for AbstractUsbDevice. * </p> * * @param name a {@link java.lang.String} object. * @param vendor a {@link java.lang.String} object. * @param vendorId a {@link java.lang.String} object. * @param productId a {@link java.lang.String} object. * @param serialNumber a {@link java.lang.String} object. * @param uniqueDeviceId a {@link java.lang.String} object. * @param connectedDevices an array of {@link UsbDevice} objects. */ public AbstractUsbDevice(String name, String vendor, String vendorId, String productId, String serialNumber, String uniqueDeviceId, UsbDevice[] connectedDevices) { this.name = name; this.vendor = vendor; this.vendorId = vendorId; this.productId = productId; this.serialNumber = serialNumber; this.uniqueDeviceId = uniqueDeviceId; this.connectedDevices = Arrays.copyOf(connectedDevices, connectedDevices.length); } /** * Helper method for indenting chained USB devices * * @param usbDevice A USB device to print * @param indent number of spaces to indent */ private static String indentUsb(UsbDevice usbDevice, int indent) { String indentFmt = indent > 2 ? String.format("%%%ds|-- ", indent - 4) : String.format("%%%ds", indent); StringBuilder sb = new StringBuilder(String.format(indentFmt, Normal.EMPTY)); sb.append(usbDevice.getName()); if (usbDevice.getVendor().length() > 0) { sb.append(" (").append(usbDevice.getVendor()).append(Symbol.C_PARENTHESE_RIGHT); } if (usbDevice.getSerialNumber().length() > 0) { sb.append(" [s/n: ").append(usbDevice.getSerialNumber()).append(Symbol.C_BRACKET_RIGHT); } for (UsbDevice connected : usbDevice.getConnectedDevices()) { sb.append(Symbol.C_LF).append(indentUsb(connected, indent + 4)); } return sb.toString(); } @Override public String getName() { return this.name; } @Override public String getVendor() { return this.vendor; } @Override public String getVendorId() { return this.vendorId; } @Override public String getProductId() { return this.productId; } @Override public String getSerialNumber() { return this.serialNumber; } @Override public String getUniqueDeviceId() { return this.uniqueDeviceId; } @Override public UsbDevice[] getConnectedDevices() { return Arrays.copyOf(this.connectedDevices, this.connectedDevices.length); } @Override public int compareTo(UsbDevice usb) { // Naturally sort by device name return getName().compareTo(usb.getName()); } @Override public String toString() { return indentUsb(this, 1); } }
[ "839536@qq.com" ]
839536@qq.com
3a8d73dc5f9a84fbaf2157919b0e7b303830158e
39bef83f3a903f49344b907870feb10a3302e6e4
/Android Studio Projects/bf.io.openshop/src/okhttp3/internal/DiskLruCache$3.java
e973bce458f8860b13b4c3dc85d1b64003980d77
[]
no_license
Killaker/Android
456acf38bc79030aff7610f5b7f5c1334a49f334
52a1a709a80778ec11b42dfe9dc1a4e755593812
refs/heads/master
2021-08-19T06:20:26.551947
2017-11-24T22:27:19
2017-11-24T22:27:19
111,960,738
0
0
null
null
null
null
UTF-8
Java
false
false
1,805
java
package okhttp3.internal; import java.util.*; import java.io.*; import okio.*; class DiskLruCache$3 implements Iterator<Snapshot> { final Iterator<Entry> delegate = new ArrayList<Entry>(DiskLruCache.access$2000(DiskLruCache.this).values()).iterator(); Snapshot nextSnapshot; Snapshot removeSnapshot; @Override public boolean hasNext() { if (this.nextSnapshot != null) { return true; } Label_0076: { synchronized (DiskLruCache.this) { if (DiskLruCache.access$100(DiskLruCache.this)) { return false; } Snapshot snapshot = null; Block_6: { while (this.delegate.hasNext()) { snapshot = this.delegate.next().snapshot(); if (snapshot != null) { break Block_6; } } break Label_0076; } this.nextSnapshot = snapshot; return true; } } // monitorexit(diskLruCache) return false; } @Override public Snapshot next() { if (!this.hasNext()) { throw new NoSuchElementException(); } this.removeSnapshot = this.nextSnapshot; this.nextSnapshot = null; return this.removeSnapshot; } @Override public void remove() { if (this.removeSnapshot == null) { throw new IllegalStateException("remove() before next()"); } try { DiskLruCache.this.remove(this.removeSnapshot.key); } catch (IOException ex) {} finally { this.removeSnapshot = null; } } }
[ "ema1986ct@gmail.com" ]
ema1986ct@gmail.com
ca976e0ba769976634bc40ed0cafedb95fd72b8a
a51591370c8433d297b1f197390f19f789bea4cb
/app/src/main/java/com/reryde/app/Activities/WalletAndCouponHistory.java
bf7ea2757879d2f4807be8f3be67b455968c042e
[]
no_license
gistapp/ReRyde
ece9157da21583980bcf09f8292fa2d0806cf3ae
f888335d4414b753dd935594ae0ec50accd408d5
refs/heads/master
2020-04-27T02:24:43.560833
2018-09-29T06:46:38
2018-09-29T06:46:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,178
java
package com.reryde.app.Activities; import android.content.Context; import android.os.Bundle; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.Window; import android.widget.ImageView; import android.widget.TextView; import com.appsflyer.AppsFlyerLib; import com.reryde.app.Fragments.CouponHistory; import com.reryde.app.Fragments.WalletHistory; import com.reryde.app.R; import java.util.HashMap; import java.util.Map; public class WalletAndCouponHistory extends AppCompatActivity { private ViewPager viewPager; private TabLayout tabLayout; private String tabTitles[]; private ImageView backArrow; private TextView lblTitle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_history); viewPager = (ViewPager) findViewById(R.id.viewpager); tabLayout = (TabLayout) findViewById(R.id.sliding_tabs); lblTitle = (TextView) findViewById(R.id.lblTitle); lblTitle.setText(getResources().getString(R.string.passbook)); backArrow = (ImageView) findViewById(R.id.backArrow); backArrow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { onBackPressed(); } }); tabLayout.setupWithViewPager(viewPager); String strTag = getIntent().getExtras().getString("tag"); tabTitles = new String[]{getResources().getString(R.string.walletHistory), getResources().getString(R.string.couponHistory)}; viewPager.setAdapter(new SampleFragmentPagerAdapter(tabTitles, getSupportFragmentManager(), this)); if (strTag != null) { if (strTag.equalsIgnoreCase("past")) { viewPager.setCurrentItem(0); } else { viewPager.setCurrentItem(1); } } setupTabIcons(); tabLayout.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener(){ @Override public void onTabSelected(TabLayout.Tab tab){ int position = tab.getPosition(); if (position==0){ Map<String, Object> wallethistory_eventValue = new HashMap<String, Object>(); AppsFlyerLib.getInstance().trackEvent(getApplicationContext(),"af_click_wallethistory",wallethistory_eventValue); }else { Map<String, Object> couponhistory_eventValue = new HashMap<String, Object>(); AppsFlyerLib.getInstance().trackEvent(getApplicationContext(),"af_click_couponhistory",couponhistory_eventValue); } } @Override public void onTabUnselected(TabLayout.Tab tab) { } @Override public void onTabReselected(TabLayout.Tab tab) { } }); } /** * Adding custom view to tab */ private void setupTabIcons() { TextView tabOne = (TextView) LayoutInflater.from(WalletAndCouponHistory.this).inflate(R.layout.custom_tab, null); tabOne.setText(getResources().getString(R.string.walletHistory)); tabLayout.getTabAt(0).setCustomView(tabOne); TextView tabTwo = (TextView) LayoutInflater.from(WalletAndCouponHistory.this).inflate(R.layout.custom_tab, null); tabTwo.setText(getResources().getString(R.string.couponHistory)); tabLayout.getTabAt(1).setCustomView(tabTwo); } @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == android.R.id.home) onBackPressed(); return super.onOptionsItemSelected(item); } public class SampleFragmentPagerAdapter extends FragmentPagerAdapter { final int PAGE_COUNT = 2; private String tabTitles[]; private Context context; public SampleFragmentPagerAdapter(String tabTitles[], FragmentManager fm, Context context) { super(fm); this.context = context; this.tabTitles = tabTitles; } @Override public int getCount() { return PAGE_COUNT; } @Override public Fragment getItem(int position) { switch (position) { case 0: return new WalletHistory(); case 1: return new CouponHistory(); default: return new WalletHistory(); } } @Override public CharSequence getPageTitle(int position) { // Generate title based on item position return tabTitles[position]; } } }
[ "sundar@appoets.com" ]
sundar@appoets.com
500ccd4a068c4397f3917061db9bf720cd4e0eac
fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4
/struts2/src/base/zyf/struts/interceptor/LogInterceptor.java
f749e86f4a68237436baba8b2f32840e8ed82c0c
[]
no_license
sensui74/legacy-project
4502d094edbf8964f6bb9805be88f869bae8e588
ff8156ae963a5c61575ff34612c908c4ccfc219b
refs/heads/master
2020-03-17T06:28:16.650878
2016-01-08T03:46:00
2016-01-08T03:46:00
null
0
0
null
null
null
null
GB18030
Java
false
false
990
java
/** * * 项目名称:struts2 * 制作时间:Jun 4, 20094:28:33 PM * 包名:base.zyf.struts.interceptor * 文件名:LogInterceptor.java * 制作者:zhaoyifei * @version 1.0 */ package base.zyf.struts.interceptor; import java.util.Map; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.AbstractInterceptor; /** * 拦截其主要目的是自动记录用户在系统内操作的痕迹,记录到数据库中,和log4j的作用不一样。 * @author zhaoyifei * @version 1.0 */ public class LogInterceptor extends AbstractInterceptor { private Map<String, Object> params; /* (non-Javadoc) * @see com.opensymphony.xwork2.interceptor.AbstractInterceptor#intercept(com.opensymphony.xwork2.ActionInvocation) */ @Override public String intercept(ActionInvocation actionInv) throws Exception { params = actionInv.getInvocationContext().getParameters(); if(params != null) { } return actionInv.invoke(); } }
[ "wow_fei@163.com" ]
wow_fei@163.com
5be83289106fa7f1293db48cfb9d783ef5b4270a
5aa1d34ac9497d14662601b5363ee31c4a059a4b
/src/threads/SyncTest.java
9e25cf4404b269e18ac6ff04317a59e1da34d8b7
[]
no_license
liyuan231/leetcode
dc71eeb2b6d68c7cd99a6d67e9f4522a957abd35
3e35297c5eea356e8543aee930fed832c6576cd2
refs/heads/master
2023-04-18T20:12:02.162298
2021-05-01T01:59:03
2021-05-01T01:59:03
286,483,592
0
0
null
null
null
null
UTF-8
Java
false
false
1,475
java
package threads; public class SyncTest implements Runnable { @Override public synchronized void run() { count--; System.out.println(Thread.currentThread() + ":" + this.count); } private int count; public static void main(String[] args) throws InterruptedException { // SyncTest syncTest = new SyncTest(); // syncTest.count=100; // for(int i=0;i<100;i++){ // new Thread(syncTest).start(); // } // Thread.sleep(2000); // System.out.println(syncTest.count); SyncTest syncTest = new SyncTest(); new Thread(() -> { try { syncTest.m1(); } catch (InterruptedException e) { e.printStackTrace(); } }).start(); new Thread(() -> { try { syncTest.m2(); } catch (InterruptedException e) { e.printStackTrace(); } }).start(); } public synchronized void m1() throws InterruptedException { for(int i=0;i<100;i++){ System.out.println(Thread.currentThread() + "method m1 is invoked!->"+i); } System.out.println("m1 is finished!"); } public void m2() throws InterruptedException { for(int i=0;i<100;i++){ System.out.println(Thread.currentThread() + "method m2 is invoked!->"+i); } System.out.println("method m2 is finished!"); } }
[ "1987151116@qq.com" ]
1987151116@qq.com
13a6d1e676ee990a35f766b4f58bc33ff1c462a2
29445b5c51e9995a8651dac3afd7d98eb9e0a2d5
/src/me/cryocell/cryopersistence/config/backup/BackupConfigService.java
d79e1db6440495fead678becfa9c412e10c3ce9f
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
pitoniak32/CryoPersistence
36510f6dfab48d019e22a221be15e79b72a3f6f8
22e72fcbf1b54d1116f185ef7b5c948feeab3e9b
refs/heads/main
2023-08-11T19:22:20.115228
2021-10-08T23:05:45
2021-10-08T23:05:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,130
java
package me.cryocell.cryopersistence.config.backup; import me.cryocell.cryopersistence.config.Constants; import org.bukkit.configuration.file.YamlConfiguration; import java.io.File; public class BackupConfigService { private YamlConfiguration config; private File dataFolder; public BackupConfigService(YamlConfiguration config, File dataFolder) { this.config = config; this.dataFolder = dataFolder; this.dataFolder = new File(this.dataFolder + File.separator + "backups"); this.setDefaults(); } public int getMaxBackupWorldsCount() { return this.config.getInt(Constants.BACKUP_MAX_COUNT_PATH); } public int getAutoBackupIntervalTicks() { return this.config.getInt(Constants.AUTO_BACKUP_INTERVAL_TICKS_PATH); } private void setDefaults() { // Settings Defaults. this.config.addDefault(Constants.AUTO_BACKUP_INTERVAL_TICKS_PATH, Constants.AUTO_BACKUP_INTERVAL_TICKS_DEFAULT); this.config.addDefault(Constants.BACKUP_MAX_COUNT_PATH, Constants.BACKUP_MAX_COUNT_DEFAULT); this.config.options().copyDefaults(true); } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
01e95e0a6cefd18fa60a076942a7b300c8b353f5
6ac1f64c7ad8c2cf9935f90ac9dc3d941d5764f8
/app/src/main/java/com/cinderellavip/adapter/recycleview/XiaohuiRecommentAdapter.java
433c3baca982d8e2b40c25690e2c83dc86cc3640
[]
no_license
sengeiou/cinderell
e8595b1c3b3afa0735017c556e575f7a2a00298c
095b9a07ba2f472af5c0665db35bd4d57ff36402
refs/heads/master
2023-03-13T10:29:45.266563
2021-03-02T01:06:21
2021-03-02T01:06:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,011
java
package com.cinderellavip.adapter.recycleview; import android.widget.ImageView; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.module.LoadMoreModule; import com.chad.library.adapter.base.viewholder.BaseViewHolder; import com.cinderellavip.R; import com.cinderellavip.bean.net.mine.MineInviteItem; import com.cinderellavip.global.ImageUtil; public class XiaohuiRecommentAdapter extends BaseQuickAdapter<MineInviteItem, BaseViewHolder> implements LoadMoreModule { public XiaohuiRecommentAdapter() { super(R.layout.item_xiaohui_recomment, null); } @Override protected void convert(final BaseViewHolder helper, final MineInviteItem item) { int position = helper.getAdapterPosition(); ImageView iv_image = helper.getView(R.id.iv_image); ImageUtil.loadNet(getContext(),iv_image,item.avatar); helper.setText(R.id.tv_title,item.username) .setText(R.id.tv_money,"+"+item.integral); } }
[ "835683840@qq.com" ]
835683840@qq.com
b327e49ff27aae1bd758ce9877337c16de9548c6
f4fb031f70595659a44cee19ac5a745285ffd01e
/Minecraft/src/net/minecraft/src/EntityAIOpenDoor.java
230a33d5d81ca040fdacc5a029795ec995d3045b
[]
no_license
minecraftmuse3/Minecraft
7adfae39fccbacb8f4e5d9b1b0adf0d3ad9aebc4
b3efea7d37b530b51bab42b8cf92eeb209697c01
refs/heads/master
2021-01-17T21:53:09.461358
2013-07-22T13:10:43
2013-07-22T13:10:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
885
java
package net.minecraft.src; public class EntityAIOpenDoor extends EntityAIDoorInteract { boolean field_75361_i; int field_75360_j; public EntityAIOpenDoor(EntityLiving par1EntityLiving, boolean par2) { super(par1EntityLiving); theEntity = par1EntityLiving; field_75361_i = par2; } @Override public boolean continueExecuting() { return field_75361_i && field_75360_j > 0 && super.continueExecuting(); } @Override public void resetTask() { if(field_75361_i) { targetDoor.onPoweredBlockChange(theEntity.worldObj, entityPosX, entityPosY, entityPosZ, false); } } @Override public void startExecuting() { field_75360_j = 20; targetDoor.onPoweredBlockChange(theEntity.worldObj, entityPosX, entityPosY, entityPosZ, true); } @Override public void updateTask() { --field_75360_j; super.updateTask(); } }
[ "sashok7241@gmail.com" ]
sashok7241@gmail.com
0a812e92d2aae2a1bc129b11ccaee6528ac1af44
b2a635e7cc27d2df8b1c4197e5675655add98994
/e/f/a/e/i/i/c0.java
d93958b1adeac62d3370329b26058e2831f635f1
[]
no_license
history-purge/LeaveHomeSafe-source-code
5f2d87f513d20c0fe49efc3198ef1643641a0313
0475816709d20295134c1b55d77528d74a1795cd
refs/heads/master
2023-06-23T21:38:37.633657
2021-07-28T13:27:30
2021-07-28T13:27:30
390,328,492
1
0
null
null
null
null
UTF-8
Java
false
false
322
java
package e.f.a.e.i.i; import e.f.b.a.c.e; import e.f.b.a.c.i; import e.f.b.a.c.m; final class c0 extends e<String, v> { private final a0 b = new a0(i.b().a()); } /* Location: /home/yc/Downloads/LeaveHomeSafe.jar!/e/f/a/e/i/i/c0.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "game0427game@gmail.com" ]
game0427game@gmail.com
65f0e8698df0fd6a825ab38521517b0413e3cee1
48ffebecc569275ea0d60a649f690aae8492f07d
/3310 2018/src/main/java/org/usfirst/frc/team3310/robot/commands/DriveStraightUntilCube.java
c3b44f784f355a7f99e9b73cd21992c58ddeffa0
[]
no_license
Matthew-Ruane/Team-207
3022037135e4046f0e161a2ab1ec8bdd7f254a10
0a61ec6aec557af0d6299b6a30ac7bbabe77fd32
refs/heads/master
2022-12-21T15:18:04.265974
2019-06-17T17:59:28
2019-06-17T17:59:28
182,201,878
1
0
null
2022-12-16T08:18:09
2019-04-19T04:33:27
Java
UTF-8
Java
false
false
345
java
package org.usfirst.frc.team3310.robot.commands; import edu.wpi.first.wpilibj.command.CommandGroup; /** * */ public class DriveStraightUntilCube extends CommandGroup { public DriveStraightUntilCube() { addParallel(new IntakeCubeAndLiftAbortDrive(false)); addSequential(new DriveStraightMP(100, 50, true, true, 0)); } }
[ "49774263+Matthew-Ruane@users.noreply.github.com" ]
49774263+Matthew-Ruane@users.noreply.github.com
0f41647af6a71dcb3751ed4291a56f3c9e055222
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes5/het.java
b2652997377e08e0e28ea1ebd16b13565c4c2a0a
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,618
java
import android.content.Intent; import android.text.TextUtils; import android.view.View; import com.tencent.biz.PoiMapActivity; import com.tencent.biz.PoiMapActivity.ShopListAdapter; import com.tencent.biz.PoiMapActivity.Shops; import com.tencent.biz.coupon.CouponActivity; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.widget.AdapterView; import com.tencent.widget.AdapterView.OnItemClickListener; public class het implements AdapterView.OnItemClickListener { public het(PoiMapActivity paramPoiMapActivity) { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } public void a(AdapterView paramAdapterView, View paramView, int paramInt, long paramLong) { paramAdapterView = this.a.a.a(paramInt); if (paramAdapterView == null) { return; } paramView = new Intent(this.a, CouponActivity.class); paramView.putExtra("url", paramAdapterView.g); this.a.startActivity(paramView); if (!TextUtils.isEmpty(PoiMapActivity.a(this.a))) { this.a.a("rec_locate", "click_shangjia", paramAdapterView.h, "", "", ""); } for (;;) { if (paramAdapterView.b != 0) { this.a.a("rec_locate", "view_share_tuan", paramAdapterView.h, "", "", ""); } if (paramAdapterView.c == 0) { break; } this.a.a("rec_locate", "click_quan", paramAdapterView.h, "", "", ""); return; this.a.a("rec_locate", "click_near_food", paramAdapterView.h, "", "", ""); } } } /* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\het.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
749012bb36d4fa6bf56d83b523f8421e10838fdc
e977c424543422f49a25695665eb85bfc0700784
/benchmark/icse15/430143/buggy-version/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedureJdbc30.java
8fe85140d459865719b81581d17aa19218130c27
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,085
java
/* Derby - Class org.apache.derbyTesting.functionTests.tests.lang.procedureJdbc30 Copyright 2003, 2005 The Apache Software Foundation or its licensors, as applicable. 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.apache.derbyTesting.functionTests.tests.lang; import java.sql.*; import org.apache.derby.tools.ij; import java.io.PrintStream; import java.math.BigInteger; import java.math.BigDecimal; import org.apache.derbyTesting.functionTests.tests.jdbcapi.parameterMetaDataJdbc30; import org.apache.derbyTesting.functionTests.util.TestUtil; public class procedureJdbc30 { static private boolean isDerbyNet = false; static private String[] testObjects = { "TABLE MRS.FIVERS", "PROCEDURE MRS.FIVEJP"}; public static void main (String[] argv) throws Throwable { ij.getPropertyArg(argv); Connection conn = ij.startJBMS(); isDerbyNet = TestUtil.isNetFramework(); runTests( conn); } public static void runTests( Connection conn) throws Throwable { try { testMoreResults(conn); } catch (SQLException sqle) { org.apache.derby.tools.JDBCDisplayUtil.ShowSQLException(System.out, sqle); sqle.printStackTrace(System.out); } } private static void testMoreResults(Connection conn) throws SQLException { Statement s = conn.createStatement(); TestUtil.cleanUpTest(s, testObjects); s.executeUpdate("create table MRS.FIVERS(i integer)"); PreparedStatement ps = conn.prepareStatement("insert into MRS.FIVERS values (?)"); for (int i = 1; i <= 20; i++) { ps.setInt(1, i); ps.executeUpdate(); } ps.close(); // create a procedure that returns 5 result sets. s.executeUpdate("create procedure MRS.FIVEJP() parameter style JAVA READS SQL DATA dynamic result sets 5 language java external name 'org.apache.derbyTesting.functionTests.util.ProcedureTest.fivejp'"); CallableStatement cs = conn.prepareCall("CALL MRS.FIVEJP()"); ResultSet[] allRS = new ResultSet[5]; // execute the procedure that returns 5 result sets and then use the various // options of getMoreResults(). System.out.println("\n\nFetching result sets with getMoreResults()"); int pass = 0; cs.execute(); do { allRS[pass++] = cs.getResultSet(); System.out.println(" PASS " + pass + " got result set " + (allRS[pass -1] != null)); // expect everything except the current result set to be closed. showResultSetStatus(allRS); } while (cs.getMoreResults()); // check last one got closed showResultSetStatus(allRS); java.util.Arrays.fill(allRS, null); System.out.println("\n\nFetching result sets with getMoreResults(Statement.CLOSE_CURRENT_RESULT)"); pass = 0; cs.execute(); do { allRS[pass++] = cs.getResultSet(); System.out.println(" PASS " + pass + " got result set " + (allRS[pass -1] != null)); // expect everything except the current result set to be closed. showResultSetStatus(allRS); } while (cs.getMoreResults(Statement.CLOSE_CURRENT_RESULT)); // check last one got closed showResultSetStatus(allRS); java.util.Arrays.fill(allRS, null); System.out.println("\n\nFetching result sets with getMoreResults(Statement.CLOSE_ALL_RESULTS)"); pass = 0; cs.execute(); do { allRS[pass++] = cs.getResultSet(); System.out.println(" PASS " + pass + " got result set " + (allRS[pass -1] != null)); // expect everything except the current result set to be closed. showResultSetStatus(allRS); } while (cs.getMoreResults(Statement.CLOSE_ALL_RESULTS)); // check last one got closed showResultSetStatus(allRS); java.util.Arrays.fill(allRS, null); System.out.println("\n\nFetching result sets with getMoreResults(Statement.KEEP_CURRENT_RESULT)"); pass = 0; cs.execute(); do { allRS[pass++] = cs.getResultSet(); System.out.println(" PASS " + pass + " got result set " + (allRS[pass -1] != null)); // expect everything to stay open. showResultSetStatus(allRS); } while (cs.getMoreResults(Statement.KEEP_CURRENT_RESULT)); // All should still be open. showResultSetStatus(allRS); // now close them all. for (int i = 0; i < allRS.length; i++) { allRS[i].close(); } java.util.Arrays.fill(allRS, null); System.out.println("\n\nFetching result sets with getMoreResults(<mixture>)"); cs.execute(); System.out.println(" first two with KEEP_CURRENT_RESULT"); allRS[0] = cs.getResultSet(); boolean moreRS = cs.getMoreResults(Statement.KEEP_CURRENT_RESULT); if (!moreRS) System.out.println("FAIL - no second result set"); allRS[1] = cs.getResultSet(); // two open showResultSetStatus(allRS); System.out.println(" third with CLOSE_CURRENT_RESULT"); moreRS = cs.getMoreResults(Statement.CLOSE_CURRENT_RESULT); if (!moreRS) System.out.println("FAIL - no third result set"); allRS[2] = cs.getResultSet(); // first and third open, second closed showResultSetStatus(allRS); System.out.println(" fourth with KEEP_CURRENT_RESULT"); moreRS = cs.getMoreResults(Statement.KEEP_CURRENT_RESULT); if (!moreRS) System.out.println("FAIL - no fourth result set"); allRS[3] = cs.getResultSet(); // first, third and fourth open, second closed showResultSetStatus(allRS); System.out.println(" fifth with CLOSE_ALL_RESULTS"); moreRS = cs.getMoreResults(Statement.CLOSE_ALL_RESULTS); if (!moreRS) System.out.println("FAIL - no fifth result set"); allRS[4] = cs.getResultSet(); // only fifth open showResultSetStatus(allRS); System.out.println(" no more results with with KEEP_CURRENT_RESULT"); moreRS = cs.getMoreResults(Statement.KEEP_CURRENT_RESULT); if (moreRS) System.out.println("FAIL - too many result sets"); // only fifth open showResultSetStatus(allRS); allRS[4].close(); java.util.Arrays.fill(allRS, null); System.out.println("\n\nFetching result sets with getMoreResults(Statement.KEEP_CURRENT_RESULT) and checking that cs.execute() closes them"); pass = 0; cs.execute(); do { allRS[pass++] = cs.getResultSet(); System.out.println(" PASS " + pass + " got result set " + (allRS[pass -1] != null)); // expect everything to stay open. showResultSetStatus(allRS); } while (cs.getMoreResults(Statement.KEEP_CURRENT_RESULT)); System.out.println(" fetched all results"); // All should still be open. showResultSetStatus(allRS); System.out.println(" executing statement"); cs.execute(); // all should be closed. showResultSetStatus(allRS); java.util.Arrays.fill(allRS, null); System.out.println("\n\nFetching result sets with getMoreResults(Statement.KEEP_CURRENT_RESULT) and checking that cs.close() closes them"); pass = 0; // using execute from above. do { allRS[pass++] = cs.getResultSet(); System.out.println(" PASS " + pass + " got result set " + (allRS[pass -1] != null)); // expect everything to stay open. showResultSetStatus(allRS); } while (cs.getMoreResults(Statement.KEEP_CURRENT_RESULT)); System.out.println(" fetched all results"); // All should still be open. showResultSetStatus(allRS); System.out.println(" closing statement"); cs.close(); // all should be closed. showResultSetStatus(allRS); java.util.Arrays.fill(allRS, null); } private static void showResultSetStatus(ResultSet[] allRS) { for (int i = 0; i < allRS.length; i++) { try { ResultSet rs = allRS[i]; if (rs == null) continue; rs.next(); System.out.println(" RS (" + (i + 1) + ") val " + rs.getInt(1)); } catch (SQLException sqle) { System.out.println(" Exception - " + sqle.getMessage()); } } } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
bf420be1d4de0fc49c45896f098dbaf6c1916a69
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_cfr/com/google/common/collect/ImmutableListMultimap$Builder.java
c77210f011a589ab5315cb6d1a5d1e5b590aa1dc
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,839
java
/* * Decompiled with CFR 0_115. */ package com.google.common.collect; import com.google.common.annotations.Beta; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableMultimap$Builder; import com.google.common.collect.Multimap; import java.util.Comparator; import java.util.Map; public final class ImmutableListMultimap$Builder extends ImmutableMultimap$Builder { @Override public ImmutableListMultimap$Builder put(Object object, Object object2) { super.put(object, object2); return this; } @Override public ImmutableListMultimap$Builder put(Map.Entry entry) { super.put(entry); return this; } @Beta @Override public ImmutableListMultimap$Builder putAll(Iterable iterable) { super.putAll(iterable); return this; } @Override public ImmutableListMultimap$Builder putAll(Object object, Iterable iterable) { super.putAll(object, iterable); return this; } @Override public /* varargs */ ImmutableListMultimap$Builder putAll(Object object, Object ... arrobject) { super.putAll(object, arrobject); return this; } @Override public ImmutableListMultimap$Builder putAll(Multimap multimap) { super.putAll(multimap); return this; } @Override public ImmutableListMultimap$Builder orderKeysBy(Comparator comparator) { super.orderKeysBy(comparator); return this; } @Override public ImmutableListMultimap$Builder orderValuesBy(Comparator comparator) { super.orderValuesBy(comparator); return this; } @Override public ImmutableListMultimap build() { return (ImmutableListMultimap)super.build(); } }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
1962f30db6318c6ad35af1e7405885213c089b9c
23d21d575da06d8a0f0c3a266915df321b5154eb
/java/patternsample/src/main/java/pattern/sample/patternuse14/v1/weapon/WeaponAdapter.java
02c6989643ef318c82aeae7d61f86dd3bcaf7cd9
[]
no_license
keepinmindsh/sample
180431ce7fce20808e65d885eab1ca3dca4a76a9
4169918f432e9008b4715f59967f3c0bd619d3e6
refs/heads/master
2023-04-30T19:26:44.510319
2023-04-23T12:43:43
2023-04-23T12:43:43
248,352,910
4
0
null
2023-03-05T23:20:43
2020-03-18T22:03:16
Java
UTF-8
Java
false
false
401
java
package pattern.sample.patternuse14.v1.weapon; import lombok.RequiredArgsConstructor; import pattern.sample.patternuse14.v1.weapon.inf.Weapon; import pattern.sample.patternuse14.v2.weapon.NewWeapon; @RequiredArgsConstructor public class WeaponAdapter implements Weapon { private final NewWeapon newWeapon; @Override public void checkStatus() { newWeapon.checkStatus(); } }
[ "keepinmindsh@gmail.com" ]
keepinmindsh@gmail.com
772ccae995ca4327ae19c7c22acdc0c97fc7b251
61093dd1de48d37175133d3a874a4c897d05bdfe
/tika-parsers/src/main/java/org/apache/tika/parser/mp4/DirectFileReadDataSource.java
698a1065bbd197ce889c0b9aef6e9bf755cb9d57
[ "Apache-2.0", "GPL-2.0-only", "LGPL-2.1-or-later", "CDDL-1.0", "Classpath-exception-2.0", "LicenseRef-scancode-unknown-license-reference", "CDDL-1.1", "LicenseRef-scancode-unknown", "EPL-1.0", "ICU", "LicenseRef-scancode-bsd-simplified-darwin", "MPL-2.0", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-iptc-2006", "MIT", "NetCDF", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unrar" ]
permissive
fsonntag/tika
ca4dbbe41cb03848735269a35e4762be4935dbe5
ff762e6c262aa830235b1fe302df474ba4a5cf5b
refs/heads/master
2020-09-15T11:20:44.930098
2019-11-21T13:43:37
2019-11-21T13:43:37
223,430,660
1
0
Apache-2.0
2019-11-22T15:21:31
2019-11-22T15:21:29
null
UTF-8
Java
false
false
4,896
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.tika.parser.mp4; import static com.googlecode.mp4parser.util.CastUtils.l2i; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; import java.math.BigInteger; import java.nio.ByteBuffer; import java.nio.channels.WritableByteChannel; import com.googlecode.mp4parser.DataSource; /** * A {@link DataSource} implementation that relies on direct reads from a {@link RandomAccessFile}. * It should be slower than {@link com.googlecode.mp4parser.FileDataSourceImpl} but does not incur the implicit file locks of * memory mapped I/O on some JVMs. This implementation allows for a more controlled deletion of files * and might be preferred when working with temporary files. * @see <a href="http://bugs.java.com/view_bug.do?bug_id=4724038">JDK-4724038 : (fs) Add unmap method to MappedByteBuffer</a> * @see <a href="http://bugs.java.com/view_bug.do?bug_id=6359560">JDK-6359560 : (fs) File.deleteOnExit() doesn't work when MappedByteBuffer exists (win)</a> */ public class DirectFileReadDataSource implements DataSource { private static final int TRANSFER_SIZE = 8192; private RandomAccessFile raf; public DirectFileReadDataSource(File f) throws IOException { this.raf = new RandomAccessFile(f, "r"); } public int read(ByteBuffer byteBuffer) throws IOException { int len = byteBuffer.remaining(); int totalRead = 0; int bytesRead = 0; byte[] buf = new byte[TRANSFER_SIZE]; while (totalRead < len) { int bytesToRead = Math.min((len - totalRead), TRANSFER_SIZE); bytesRead = raf.read(buf, 0, bytesToRead); if (bytesRead < 0) { break; } else { totalRead += bytesRead; } byteBuffer.put(buf, 0, bytesRead); } if (bytesRead < 0 && position() == size() && byteBuffer.hasRemaining()) { throw new IOException("End of stream reached earlier than expected"); } return ((bytesRead < 0) && (totalRead == 0)) ? -1 : totalRead; } public int readAllInOnce(ByteBuffer byteBuffer) throws IOException { if (byteBuffer.remaining() > raf.length()) { throw new IOException("trying to readAllInOnce past end of stream"); } byte[] buf = new byte[byteBuffer.remaining()]; int read = raf.read(buf); byteBuffer.put(buf, 0, read); return read; } public long size() throws IOException { return raf.length(); } public long position() throws IOException { return raf.getFilePointer(); } public void position(long nuPos) throws IOException { if (nuPos > raf.length()) { throw new IOException("requesting seek past end of stream"); } raf.seek(nuPos); } public long transferTo(long position, long count, WritableByteChannel target) throws IOException { return target.write(map(position, count)); } public ByteBuffer map(long startPosition, long size) throws IOException { if (startPosition < 0 || size < 0) { throw new IOException("startPosition and size must both be >= 0"); } //make sure that start+size aren't greater than avail size //in raf. BigInteger end = BigInteger.valueOf(startPosition); end = end.add(BigInteger.valueOf(size)); if (end.compareTo(BigInteger.valueOf(raf.length())) > 0) { throw new IOException("requesting read past end of stream"); } raf.seek(startPosition); int payLoadSize = l2i(size); //hack to check for potential overflow if (Long.MAX_VALUE-payLoadSize < startPosition || Long.MAX_VALUE-payLoadSize > raf.length()) { throw new IOException("requesting read past end of stream"); } byte[] payload = new byte[payLoadSize]; raf.readFully(payload); return ByteBuffer.wrap(payload); } @Override public void close() throws IOException { raf.close(); } }
[ "tallison@apache.org" ]
tallison@apache.org
a6a0d2e7384fbf9ed2a9da225e508f1d345dfa6e
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/checkstyle_cluster/1321/src_1.java
af14844c9bee7751746c869c0a647f6505c5417d
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,041
java
//////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code for adherence to a set of rules. // Copyright (C) 2001-2002 Oliver Burn // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// package com.puppycrawl.tools.checkstyle.checks; import java.io.Serializable; import java.io.ObjectStreamException; import java.util.Map; /** * Abstract class that represents options. * * @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a> * @author Rick Giles */ public abstract class AbstractOption implements Serializable { /** the string representation of the option **/ private final String mStrRep; /** * Creates a new <code>AbstractOption</code> instance. * @param aStrRep the string representation */ protected AbstractOption(String aStrRep) { mStrRep = aStrRep.trim().toLowerCase(); Map strToOpt = getStrToOpt(); strToOpt.put(mStrRep, this); } /** * Returns the map from string representations to options. * @return <code>Map</code> from strings to options. */ protected abstract Map getStrToOpt(); /** * Returns the option specified by a string representation. If no * option exists then null is returned. * @param aStrRep the String representation to parse * @return the <code>AbstractOption</code> value represented by * aStrRep, or null if none exists. */ public AbstractOption decode(String aStrRep) { Map strToOpt = getStrToOpt(); return (AbstractOption) strToOpt.get(aStrRep.trim().toLowerCase()); } /** * Returns the string representation of this AbstractOption. * @see java.lang.Object **/ public String toString() { return mStrRep; } /** * Ensures that we don't get multiple instances of one AbstractOption * during deserialization. See Section 3.6 of the Java Object * Serialization Specification for details. * * @return the serialization replacement object * @throws ObjectStreamException if a deserialization error occurs */ protected Object readResolve() throws ObjectStreamException { return decode(mStrRep); } }
[ "375833274@qq.com" ]
375833274@qq.com
79b9623b24582500a598a30ca3e5f451b6942066
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/9/113.java
2064a58ee6ea71849a4543f86c7411c405c39572
[ "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,329
java
package <missing>; public class GlobalMembers { public static void Main() { int n; int i; int j; int z; int y; y = 0; z = 0; //C++ TO JAVA CONVERTER TODO TASK: Java does not allow declaring types within methods: // struct member // { // char xh[10]; // int ag; // }; member[] a = tangible.Arrays.initializeWithDefaultmemberInstances(100); member[] b = tangible.Arrays.initializeWithDefaultmemberInstances(101); member[] c = tangible.Arrays.initializeWithDefaultmemberInstances(100); String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } for (i = 0;i < n;i++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { a[i].xh = tempVar2; } String tempVar3 = ConsoleInput.scanfRead(" "); if (tempVar3 != null) { a[i].ag = tempVar3; } } for (i = 0;i < n;i++) { if (a[i].ag >= 60) { b[y] = a[i]; y++; } else { c[z] = a[i]; z++; } } for (i = 1;i < y;i++) { for (j = 0;j < y - i;j++) { if (b[j].ag < b[j + 1].ag) { b[100] = b[j]; b[j] = b[j + 1]; b[j + 1] = b[100]; } } } for (i = 0;i < y;i++) { System.out.printf("%s\n",b[i].xh); } for (i = 0;i < z;i++) { System.out.printf("%s\n",c[i].xh); } } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
e24a17758152daba92400f61ca3cdd9ec9045ecd
9e20645e45cc51e94c345108b7b8a2dd5d33193e
/L2J_Mobius_C4_ScionsOfDestiny/dist/game/data/scripts/quests/Q080_SagaOfTheWindRider/Q080_SagaOfTheWindRider.java
a64c2c5d136941d5392b473cbe36d92010e8cb67
[]
no_license
Enryu99/L2jMobius-01-11
2da23f1c04dcf6e88b770f6dcbd25a80d9162461
4683916852a03573b2fe590842f6cac4cc8177b8
refs/heads/master
2023-09-01T22:09:52.702058
2021-11-02T17:37:29
2021-11-02T17:37:29
423,405,362
2
2
null
null
null
null
UTF-8
Java
false
false
2,896
java
/* * This file is part of the L2J Mobius project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package quests.Q080_SagaOfTheWindRider; import quests.SagasSuperClass; /** * @author Emperorc */ public class Q080_SagaOfTheWindRider extends SagasSuperClass { public Q080_SagaOfTheWindRider() { super(80, "Saga of the Wind Rider"); _npc = new int[] { 31603, 31624, 31284, 31615, 31612, 31646, 31648, 31652, 31654, 31655, 31659, 31616 }; _items = new int[] { 7080, 7517, 7081, 7495, 7278, 7309, 7340, 7371, 7402, 7433, 7103, 0 }; _mob = new int[] { 27300, 27229, 27303 }; _classId = new int[] { 101 }; _prevClass = new int[] { 0x17 }; _x = new int[] { 161719, 124314, 124355 }; _y = new int[] { -92823, 82155, 82155 }; _z = new int[] { -1893, -2803, -2803 }; _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", "I do not have the patience ..! I have been a giant force ...! Cough chatter ah ah ah!", "Paying homage to those who disrupt the orderly will be PLAYERNAME's death!", "Now, my soul freed from the shackles of the millennium, Halixia, to the back side I come ...", "Why do you interfere others' battles?", "This is a waste of time.. Say goodbye...!", "...That is the enemy", "...Goodness! PLAYERNAME you are still looking?", "PLAYERNAME ... Not just to whom the victory. Only personnel involved in the fighting are eligible to share in the victory.", "Your sword is not an ornament. Don't you think, PLAYERNAME?", "Goodness! I no longer sense a battle there now.", "let...", "Only engaged in the battle to bar their choice. Perhaps you should regret.", "The human nation was foolish to try and fight a giant's strength.", "Must...Retreat... Too...Strong.", "PLAYERNAME. Defeat...by...retaining...and...Mo...Hacker", "....! Fight...Defeat...It...Fight...Defeat...It..." }; registerNPCs(); } }
[ "MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b" ]
MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b
37c839733472196a974b549c4bd38ad0bfcf05df
52c36ce3a9d25073bdbe002757f08a267abb91c6
/src/main/java/com/alipay/api/response/AlipayInsCooperationProductOfflineBatchqueryResponse.java
7e3a8fcbb25606facdf1ebbde32058e51cebd205
[ "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
946
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.InsOffilneProduct; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.ins.cooperation.product.offline.batchquery response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayInsCooperationProductOfflineBatchqueryResponse extends AlipayResponse { private static final long serialVersionUID = 4328757299832459755L; /** * 返回给机构的线下产品信息列表 */ @ApiListField("product_list") @ApiField("ins_offilne_product") private List<InsOffilneProduct> productList; public void setProductList(List<InsOffilneProduct> productList) { this.productList = productList; } public List<InsOffilneProduct> getProductList( ) { return this.productList; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
880c528de9b688221f4a4d01a5cb883fc7685b33
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/3/org/jfree/chart/text/TextUtilities_drawRotatedString_457.java
72ffdee7935c24776fb8ec0f448a513ecc28f85c
[]
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,190
java
org jfree chart text util method work text text util textutil util method draw rotat text common rotat math draw text 'vertically' top charact left param text text param graphic devic param angl angl clockwis rotat radian param coordin param coordin draw rotat string drawrotatedstr string text graphics2 graphics2d angl draw rotat string drawrotatedstr text angl
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
ea7a6889cd108cae0c3ca7ab8435864448b8b762
508da7012b304f5d698adcaa21ef1ea444417851
/connectors/camel-pulsar-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/pulsar/CamelPulsarSourceTask.java
8079b601672c2fa8b5a5ae9c6b89d587043ae6d0
[ "Apache-2.0" ]
permissive
jboss-fuse/camel-kafka-connector
02fd86c99ee4d2ac88ac5cf8b4cf56bd0bbcc007
8411f2f772a00d1d4a53ca8f24e13128306f5c02
refs/heads/master
2021-07-02T19:43:30.085652
2020-10-19T13:17:53
2020-10-19T13:18:04
181,911,766
16
7
Apache-2.0
2019-12-04T08:44:47
2019-04-17T14:45:05
Java
UTF-8
Java
false
false
1,685
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.camel.kafkaconnector.pulsar; import java.util.HashMap; import java.util.Map; import javax.annotation.Generated; import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig; import org.apache.camel.kafkaconnector.CamelSourceTask; @Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.") public class CamelPulsarSourceTask extends CamelSourceTask { @Override protected CamelSourceConnectorConfig getCamelSourceConnectorConfig( Map<String, String> props) { return new CamelPulsarSourceConnectorConfig(props); } @Override protected Map<String, String> getDefaultConfig() { return new HashMap<String, String>() {{ put(CamelSourceConnectorConfig.CAMEL_SOURCE_COMPONENT_CONF, "pulsar"); }}; } }
[ "andrea.tarocchi@gmail.com" ]
andrea.tarocchi@gmail.com
be8275dfb4a456c76b90b04d201d78c42766917f
672ee6d4679f5a435561da8d3e482fe90b9c9943
/ee/src/cdi/CDI9.java
92746efe2d039facee891cde25c2f5f3bc7152f0
[]
no_license
stea1th/FirstServletLesson
8859dc899348c9e286bec2b29e2e5e3e475d6b78
783475a1f08a81fbfa455619216c78d853f472f2
refs/heads/master
2020-07-27T02:12:03.795668
2019-09-19T11:54:48
2019-09-19T11:54:48
208,825,488
0
0
null
null
null
null
UTF-8
Java
false
false
550
java
package cdi; import interfaces.A; import javax.inject.Inject; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @WebServlet("/test9") public class CDI9 extends HttpServlet { @Inject A a; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { a.print(); } }
[ "stea1th@mail.ru" ]
stea1th@mail.ru
a8ec83a0846e823f411dac2f2fca82ead56f15b9
83dced5bea77d0aaed5964754fcdd3c8da3d67f7
/itest/src/it/regression-multi/src/test/java/org/ops4j/pax/exam/regression/multi/junit/BeforeAfterParent.java
2673c7a28da1a40977fa10e6c821b3103a21de1b
[ "Apache-2.0" ]
permissive
carrot-garden/pax_org.ops4j.pax.exam2
66742252e9ea1c20c41ab6e3cefde900ae8702e6
ca8369105c7c793a3dc59401be76942697114cbe
refs/heads/master
2021-01-17T22:37:55.869970
2012-09-29T14:44:10
2012-09-29T14:44:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,415
java
/* * Copyright (C) 2011 Harald Wellmann * * 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.ops4j.pax.exam.regression.multi.junit; import static org.ops4j.pax.exam.CoreOptions.junitBundles; import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.url; import static org.ops4j.pax.exam.regression.multi.RegressionConfiguration.regressionDefaults; import java.util.prefs.BackingStoreException; import java.util.prefs.Preferences; import org.junit.After; import org.junit.Before; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.TestContainerException; import org.ops4j.pax.exam.junit.Configuration; import org.ops4j.pax.exam.util.PathUtils; public class BeforeAfterParent { @Configuration public Option[] config() { return options( regressionDefaults(), url( "reference:file:" + PathUtils.getBaseDir() + "/target/regression-pde-bundle.jar" ), junitBundles() ); } @Before public void before() { addMessage( "Before in parent" ); } @After public void after() { addMessage( "After in parent" ); } public static void clearMessages() throws BackingStoreException { Preferences prefs = Preferences.userNodeForPackage( BeforeAfterParent.class ); prefs.clear(); prefs.sync(); } public static void addMessage( String message ) { Preferences prefs = Preferences.userNodeForPackage( BeforeAfterParent.class ); int numMessages = prefs.getInt( "numMessages", 0 ); prefs.put( "message." + numMessages, message ); prefs.putInt( "numMessages", ++numMessages ); try { prefs.sync(); } catch ( BackingStoreException exc ) { throw new TestContainerException( exc ); } } }
[ "harald.wellmann@gmx.de" ]
harald.wellmann@gmx.de
f702347683e32f8e4ab76fd3be1886ba2d75d674
21e092f59107e5cceaca12442bc2e90835473c8b
/eorderfile/src/main/java/com/basoft/file/application/FileData.java
b5c98318e876e800a77c8e88be2943027002e8df
[]
no_license
kim50012/smart-menu-endpoint
55095ac22dd1af0851c04837190b7b6652d884a0
d45246f341f315f8810429b3a4ec1d80cb894d7f
refs/heads/master
2023-06-17T02:52:01.135480
2021-07-15T15:05:19
2021-07-15T15:05:19
381,788,497
0
0
null
null
null
null
UTF-8
Java
false
false
3,176
java
package com.basoft.file.application; import java.util.Arrays; public class FileData extends FileService.FileRef { private String name; private String originalName; private String type; private int size; private byte[] payload; private String keyUrl; public FileData(String fileId, String fullFilePath, String fullName) { super(fileId, fullFilePath, fullName, null); } public String name() { return name; } public String originalName() { return originalName; } public String type() { return type; } public int size() { return size; } public byte[] payload() { return payload; } public String getKeyUrl() { return keyUrl; } public static final Builder newBuilder() { return new Builder(); } public static final class Builder { private String id; private String name; private String originalName; private String type; private int size; private String fullUrl; private byte[] payload; public Builder id(String id) { this.id = id; return this; } public Builder name(String name) { this.name = name; return this; } public Builder originalName(String originalName) { this.originalName = originalName; return this; } public Builder contentsType(String type) { this.type = type; return this; } public Builder size(int size) { this.size = size; return this; } public Builder fullUrl(String url) { this.fullUrl = url; return this; } public Builder payload(byte[] payload) { this.payload = payload; return this; } private String keyUrl; public Builder keyUrl(String key_url) { this.keyUrl = key_url; return this; } public String getId() { return id; } public String getName() { return name; } public String getOriginalName() { return originalName; } public String getType() { return type; } public String getFullUrl() { return fullUrl; } public FileData build() { FileData fd = new FileData(id, fullUrl, name); fd.name = this.name; fd.originalName = this.originalName; fd.size = this.size; fd.type = this.type; fd.payload = this.payload; fd.keyUrl = this.keyUrl; return fd; } } @Override public String toString() { return "FileData{" + "name='" + name + '\'' + ", originalName='" + originalName + '\'' + ", type='" + type + '\'' + ", size=" + size + ", payload=" + Arrays.toString(payload) + ", keyUrl='" + keyUrl + '\'' + '}'; } }
[ "kim50012@naver.com" ]
kim50012@naver.com
4e2e8c8f20fd98b3dfbef7fa590efd76b8ac91bc
aea01209ae2af58dacfc12b218dd47281b81df33
/src/main/java/io/ennate/trucker/repository/VehicleRepository.java
26e943916bd2d19412f060907966340cd4a104d1
[]
no_license
niketpatel2525/trucker
075a7d956bb1f8ff41d7dc2e8ec1e0bbf2e77077
4aec3caa98e48febfa4f17eb3e8ba4e1f5f1ca93
refs/heads/master
2022-07-01T08:07:44.546658
2020-11-15T19:22:01
2020-11-15T19:22:01
134,105,122
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
package io.ennate.trucker.repository; import io.ennate.trucker.entity.Vehicle; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import java.util.Optional; @Repository public interface VehicleRepository extends CrudRepository<Vehicle, String> { Optional<Vehicle> findByVin(String vin); }
[ "niketpatel2525@gmail.com" ]
niketpatel2525@gmail.com
c4b553aa77462647bf629fabff70ab5345cd7477
46b51f93d09df1d77684bc52cf5bc703bf06c5b5
/microservice-order/src/main/java/com/hao/microservice/Model/OrderDetail.java
b983e643845366e7c140205f08d317301694f062
[]
no_license
MuggleLee/microservice
9665ebff94187263ec0f28c709127a39e51bf090
c375f4392f95a5ef407f9276f212c5c96d937877
refs/heads/master
2020-04-14T13:10:22.874990
2019-01-08T09:58:47
2019-01-08T09:58:47
163,861,139
0
0
null
null
null
null
UTF-8
Java
false
false
1,765
java
package com.hao.microservice.Model; import lombok.Data; import javax.persistence.Entity; import javax.persistence.Id; import java.math.BigDecimal; @Data @Entity public class OrderDetail { @Id private String detailId; /** 订单id. */ private String orderId; /** 商品id. */ private String productId; /** 商品名称. */ private String productName; /** 商品单价. */ private BigDecimal productPrice; /** 商品数量. */ private Integer productQuantity; /** 商品小图. */ private String productIcon; public String getDetailId() { return detailId; } public void setDetailId(String detailId) { this.detailId = detailId; } public String getOrderId() { return orderId; } public void setOrderId(String orderId) { this.orderId = orderId; } public String getProductId() { return productId; } public void setProductId(String productId) { this.productId = productId; } public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public BigDecimal getProductPrice() { return productPrice; } public void setProductPrice(BigDecimal productPrice) { this.productPrice = productPrice; } public Integer getProductQuantity() { return productQuantity; } public void setProductQuantity(Integer productQuantity) { this.productQuantity = productQuantity; } public String getProductIcon() { return productIcon; } public void setProductIcon(String productIcon) { this.productIcon = productIcon; } }
[ "770796059@qq.com" ]
770796059@qq.com
1f1b7eedc84c9a429a89d0d7536392c6894842a9
c36842d81ca5df57da61b263dd639fb8ac9ae096
/src/main/java/com/ixcode/framework/parameter/model/Category.java
e3d57bd1081bacc478eef471ac9a353f35f3d9d1
[]
no_license
jimbarritt/bugsim
ebbc7ee7fb10df678b6c3e6107bf90169c01dfec
7f9a83770fff9bac0d9e07c560cd0b604eb1c937
refs/heads/master
2016-09-06T08:32:19.941440
2010-03-13T10:13:50
2010-03-13T10:13:50
32,143,814
0
0
null
null
null
null
UTF-8
Java
false
false
6,954
java
package com.ixcode.framework.parameter.model; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Stack; public class Category implements IParameterModel{ public boolean hasParent() { return getParentCategory() != null; } public IParameterModel getParent() { return getParentCategory(); } public Category() { } public Category(String name) { _name = name; } public String getName() { return _name; } public IParameterModel findParentCalled(String name) { IParameterModel found = null; if (_name.equals(name)) { found = this; } else if (hasParent()) { found = getParent().findParentCalled(name) ; } return found; } public void setName(String name) { _name = name; } public List getParameters() { return _parameters; } public List getSubCategories() { return _subCategories; } public void addParameter(Parameter parameter) { _parameters.add(parameter); parameter.setParentCategory(this); } public void addSubCategory(Category subCategory) { _subCategories.add(subCategory); subCategory.setParent(this); } public Category findSubCategory(String name) { Category found = null; for (Iterator itr = _subCategories.iterator(); itr.hasNext();) { Category category = (Category)itr.next(); if (category.getName().equals(name)) { found = category; break; } } return found; } public Parameter findParameter(String name) { Parameter found = null; for (Iterator itr = _parameters.iterator(); itr.hasNext();) { Parameter parameter = (Parameter)itr.next(); if (parameter.findParameter(name)!= null) { found = parameter; break; } } return found; } public String getFullyQualifiedName() { Category current = this; String fullName = current.getName(); while (current.getParentCategory() != null) { current = current.getParentCategory(); fullName = current.getName() + "." + fullName; } return fullName; } public Category getParentCategory() { return _parent; } /** * @todo probably need to do the opposit aswell although at this point we have no plans to be able to dynamically replace categoreis!@! * @param parent */ public void setParent(Category parent) { _parent = parent; if (_parent.isConnectedToParameterMap()) { fireConnectedEvents(this); } } private void fireConnectedEvents(Category category) { for (Iterator itr = category.getParameters().iterator(); itr.hasNext();) { Parameter parameter = (Parameter)itr.next(); parameter.fireParameterConnectedEvent(new Stack()); } for (Iterator itr = category.getSubCategories().iterator(); itr.hasNext();) { Category subCategory= (Category)itr.next(); fireConnectedEvents(subCategory); } } public void setRoot(ParameterMap parent) { _root = parent; fireConnectedEvents(this); } public List getAllParameters() { List allParams = new ArrayList(); addParameters(allParams, _parameters); for (Iterator itr = _subCategories.iterator(); itr.hasNext();) { Category category = (Category)itr.next(); allParams.addAll(category.getAllParameters()); } return allParams; } private void addParameters(List allParams, List currentParameters) { for (Iterator itr = currentParameters.iterator(); itr.hasNext();) { Parameter parameter = (Parameter)itr.next(); allParams.add(parameter); if (parameter instanceof StrategyDefinitionParameter) { addAllAlgorithmParameters(allParams, (StrategyDefinitionParameter)parameter); } else if (parameter.containsStrategy()) { allParams.add(parameter.getValue()); addAllAlgorithmParameters(allParams, (StrategyDefinitionParameter)parameter.getValue()); } } } private void addAllAlgorithmParameters(List allParams, StrategyDefinitionParameter algorithmParameter) { addParameters(allParams, algorithmParameter.getParameters()); } public String toString() { return _name; } /** * Recursively searches for an object * @param nameStack * @return */ public Object findObject(Stack nameStack) { String currentLevelName = (String)nameStack.peek(); Object found = null; if (currentLevelName.equals(_name)) { nameStack.pop(); found = recurseCategories(nameStack); if (found == null) { found = recurseParameters(nameStack); } } return found; } private Object recurseParameters(Stack nameStack) { Object found = null; for (Iterator itr = _parameters.iterator(); itr.hasNext();) { Parameter parameter = (Parameter)itr.next(); found = parameter.findObject(nameStack); if (found != null) { break; } } return found; } private Object recurseCategories(Stack nameStack) { Object found = null; for (Iterator itr = _subCategories.iterator(); itr.hasNext();) { Category category = (Category)itr.next(); found = category.findObject(nameStack); if (found != null) { break; } } return found; } public Category findCategory(String name) { Category found = null; for (Iterator itr = _subCategories.iterator(); itr.hasNext();) { Category category = (Category)itr.next(); if (category.getName().equals(name)) { found = category; break; } } return found; } public ParameterMap getParameterMap() { ParameterMap parameterMap = null; if (_parent != null) { parameterMap = _parent.getParameterMap(); } else if (_root != null) { parameterMap = _root; } return parameterMap; } public boolean isConnectedToParameterMap() { return getParameterMap() != null; } private String _name; private List _parameters = new ArrayList(); private List _subCategories = new ArrayList(); private Category _parent; private ParameterMap _root; public static final String P_NAME = "name"; }
[ "jim.barritt@cada1ade-4555-11de-b25d-9f9778916a3c" ]
jim.barritt@cada1ade-4555-11de-b25d-9f9778916a3c
f0431afd218e9a4190136c284ffce8d79a4522ac
d76e76e2b6322b4a821ec18f67c03156d5b1e70f
/src/com/zsy/frame/sample/java/control/designmode/structural/adapter/interfaceof/single/SourceSub1.java
e16b9d5094c76dffa41f958d9f740d993fe51350
[]
no_license
sy-and/sample_java
f20749562741bedde83e824fc6653ab5859d0176
c54afe0509873499c59cf9f63d8ebe978e5ef0dd
refs/heads/main
2023-02-28T10:38:16.749939
2017-04-16T07:01:57
2017-04-16T07:01:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
package com.zsy.frame.sample.java.control.designmode.structural.adapter.interfaceof.single; public class SourceSub1 extends Wrapper { public void method1(){ System.out.println("the sourceable interface's first Sub1!"); } }
[ "shengyouzhang@qq.com" ]
shengyouzhang@qq.com
9faefa42d731afb169833e2b6816008bc7d19b83
8dc84558f0058d90dfc4955e905dab1b22d12c08
/third_party/android_tools/sdk/sources/android-25/com/android/internal/app/procstats/PssTable.java
b6df983d2ac8c0067aa4dec2ca9d849df93f97d1
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LGPL-2.0-or-later", "GPL-1.0-or-later", "MIT", "Apache-2.0" ]
permissive
meniossin/src
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
44f73f7e76119e5ab415d4593ac66485e65d700a
refs/heads/master
2022-12-16T20:17:03.747113
2020-09-03T10:43:12
2020-09-03T10:43:12
263,710,168
1
0
BSD-3-Clause
2020-05-13T18:20:09
2020-05-13T18:20:08
null
UTF-8
Java
false
false
4,224
java
/* * Copyright (C) 2013 The Android Open Source Project * * 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.android.internal.app.procstats; import static com.android.internal.app.procstats.ProcessStats.PSS_SAMPLE_COUNT; import static com.android.internal.app.procstats.ProcessStats.PSS_MINIMUM; import static com.android.internal.app.procstats.ProcessStats.PSS_AVERAGE; import static com.android.internal.app.procstats.ProcessStats.PSS_MAXIMUM; import static com.android.internal.app.procstats.ProcessStats.PSS_USS_MINIMUM; import static com.android.internal.app.procstats.ProcessStats.PSS_USS_AVERAGE; import static com.android.internal.app.procstats.ProcessStats.PSS_USS_MAXIMUM; import static com.android.internal.app.procstats.ProcessStats.PSS_COUNT; /** * Class to accumulate PSS data. */ public class PssTable extends SparseMappingTable.Table { /** * Construct the PssTable with 'tableData' as backing store * for the longs data. */ public PssTable(SparseMappingTable tableData) { super(tableData); } /** * Merge the the values from the other table into this one. */ public void mergeStats(PssTable that) { final int N = that.getKeyCount(); for (int i=0; i<N; i++) { final int key = that.getKeyAt(i); final int state = SparseMappingTable.getIdFromKey(key); mergeStats(state, (int)that.getValue(key, PSS_SAMPLE_COUNT), that.getValue(key, PSS_MINIMUM), that.getValue(key, PSS_AVERAGE), that.getValue(key, PSS_MAXIMUM), that.getValue(key, PSS_USS_MINIMUM), that.getValue(key, PSS_USS_AVERAGE), that.getValue(key, PSS_USS_MAXIMUM)); } } /** * Merge the supplied PSS data in. The new min pss will be the minimum of the existing * one and the new one, the average will now incorporate the new average, etc. */ public void mergeStats(int state, int inCount, long minPss, long avgPss, long maxPss, long minUss, long avgUss, long maxUss) { final int key = getOrAddKey((byte)state, PSS_COUNT); final long count = getValue(key, PSS_SAMPLE_COUNT); if (count == 0) { setValue(key, PSS_SAMPLE_COUNT, inCount); setValue(key, PSS_MINIMUM, minPss); setValue(key, PSS_AVERAGE, avgPss); setValue(key, PSS_MAXIMUM, maxPss); setValue(key, PSS_USS_MINIMUM, minUss); setValue(key, PSS_USS_AVERAGE, avgUss); setValue(key, PSS_USS_MAXIMUM, maxUss); } else { setValue(key, PSS_SAMPLE_COUNT, count + inCount); long val; val = getValue(key, PSS_MINIMUM); if (val > minPss) { setValue(key, PSS_MINIMUM, minPss); } val = getValue(key, PSS_AVERAGE); setValue(key, PSS_AVERAGE, (long)(((val*(double)count)+(avgPss*(double)inCount)) / (count+inCount))); val = getValue(key, PSS_MAXIMUM); if (val < maxPss) { setValue(key, PSS_MAXIMUM, maxPss); } val = getValue(key, PSS_USS_MINIMUM); if (val > minUss) { setValue(key, PSS_USS_MINIMUM, minUss); } val = getValue(key, PSS_USS_AVERAGE); setValue(key, PSS_AVERAGE, (long)(((val*(double)count)+(avgUss*(double)inCount)) / (count+inCount))); val = getValue(key, PSS_USS_MAXIMUM); if (val < maxUss) { setValue(key, PSS_USS_MAXIMUM, maxUss); } } } }
[ "arnaud@geometry.ee" ]
arnaud@geometry.ee
981b4575400dd2cefb9113084108bc00a2edec15
f6c8ef02c43ab6ec6d941cf93b9c454e19c6a6ee
/src/com/company/Lesson_34/Task_01/Task_02/SleepingThread.java
8ec6714edf783025306143f26c09b58eefca0349
[]
no_license
VasylN/Tutor_project
0b96e3437b15b4e55c9806dfde13c4338cf28784
835080f6c767f5e8d14d800f0d6d032445677626
refs/heads/master
2021-01-22T21:48:57.478089
2017-05-24T18:02:39
2017-05-24T18:02:39
85,478,361
0
0
null
null
null
null
UTF-8
Java
false
false
2,016
java
package com.company.Lesson_34.Task_01.Task_02; /** * Created by Pc on 18.01.2017. *//* Последовательные выполнения нитей 1. В выполняющем классе создать статическую переменную int COUNT = 4 2. Создать класс SleepingThread, унаследовать его от Thread 3. В классе SleepingThread переопределить метод toString() - Определить формат вывода, что бы он выводил нити, так как показано в примере: "#" + getName() + ": " + countDownIndex, где countDownIndex - число от COUNT до 1 4. Сделай так, чтобы все нити выполнялись последовательно: сначала для нити №1 отсчет с COUNT до 1, потом для нити №2 с COUNT до 1 и т.д. 5. В методе run после всех действий поставь задержку в 10 миллисекунд. Выведи "Нить прервана", если нить будет прервана. 6. Подумать, как должен быть реализован метод main Пример: #1: 4 #1: 3 ... #1: 1 #2: 4 ... */ public class SleepingThread extends Thread { int countDownIndex = Test_01.COUNT; static int countThreads = 0; public SleepingThread() throws InterruptedException { super(String.valueOf(++countThreads)); start(); // join(); } @Override public void run() { while (true) { System.out.println(this); if (--countDownIndex == 0) { return; } try { Thread.sleep(10); } catch (InterruptedException e) { System.out.println("Thread interrupted"); } } } @Override public String toString() { return "#" + getName() + ": " + countDownIndex; } }
[ "vasyln86@gmail.com" ]
vasyln86@gmail.com
1c3d6a2b8e4bb9b71bb9a3cd97107c781f865ae0
611b2f6227b7c3b4b380a4a410f357c371a05339
/src/main/java/android/support/v7/widget/AppCompatCompoundButtonHelper.java
cea75242b10518ddc0e4ff2d8a261817a105a9af
[]
no_license
obaby/bjqd
76f35fcb9bbfa4841646a8888c9277ad66b171dd
97c56f77380835e306ea12401f17fb688ca1373f
refs/heads/master
2022-12-04T21:33:17.239023
2020-08-25T10:53:15
2020-08-25T10:53:15
290,186,830
3
1
null
null
null
null
UTF-8
Java
false
false
5,255
java
package android.support.v7.widget; import android.content.res.ColorStateList; import android.content.res.TypedArray; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.support.annotation.Nullable; import android.support.v4.graphics.drawable.DrawableCompat; import android.support.v4.widget.CompoundButtonCompat; import android.support.v7.appcompat.R; import android.support.v7.content.res.AppCompatResources; import android.util.AttributeSet; import android.widget.CompoundButton; class AppCompatCompoundButtonHelper { private ColorStateList mButtonTintList = null; private PorterDuff.Mode mButtonTintMode = null; private boolean mHasButtonTint = false; private boolean mHasButtonTintMode = false; private boolean mSkipNextApply; private final CompoundButton mView; interface DirectSetButtonDrawableInterface { void setButtonDrawable(Drawable drawable); } AppCompatCompoundButtonHelper(CompoundButton compoundButton) { this.mView = compoundButton; } /* access modifiers changed from: package-private */ public void loadFromAttributes(AttributeSet attributeSet, int i) { int resourceId; TypedArray obtainStyledAttributes = this.mView.getContext().obtainStyledAttributes(attributeSet, R.styleable.CompoundButton, i, 0); try { if (obtainStyledAttributes.hasValue(R.styleable.CompoundButton_android_button) && (resourceId = obtainStyledAttributes.getResourceId(R.styleable.CompoundButton_android_button, 0)) != 0) { this.mView.setButtonDrawable(AppCompatResources.getDrawable(this.mView.getContext(), resourceId)); } if (obtainStyledAttributes.hasValue(R.styleable.CompoundButton_buttonTint)) { CompoundButtonCompat.setButtonTintList(this.mView, obtainStyledAttributes.getColorStateList(R.styleable.CompoundButton_buttonTint)); } if (obtainStyledAttributes.hasValue(R.styleable.CompoundButton_buttonTintMode)) { CompoundButtonCompat.setButtonTintMode(this.mView, DrawableUtils.parseTintMode(obtainStyledAttributes.getInt(R.styleable.CompoundButton_buttonTintMode, -1), (PorterDuff.Mode) null)); } } finally { obtainStyledAttributes.recycle(); } } /* access modifiers changed from: package-private */ public void setSupportButtonTintList(ColorStateList colorStateList) { this.mButtonTintList = colorStateList; this.mHasButtonTint = true; applyButtonTint(); } /* access modifiers changed from: package-private */ public ColorStateList getSupportButtonTintList() { return this.mButtonTintList; } /* access modifiers changed from: package-private */ public void setSupportButtonTintMode(@Nullable PorterDuff.Mode mode) { this.mButtonTintMode = mode; this.mHasButtonTintMode = true; applyButtonTint(); } /* access modifiers changed from: package-private */ public PorterDuff.Mode getSupportButtonTintMode() { return this.mButtonTintMode; } /* access modifiers changed from: package-private */ public void onSetButtonDrawable() { if (this.mSkipNextApply) { this.mSkipNextApply = false; return; } this.mSkipNextApply = true; applyButtonTint(); } /* access modifiers changed from: package-private */ public void applyButtonTint() { Drawable buttonDrawable = CompoundButtonCompat.getButtonDrawable(this.mView); if (buttonDrawable == null) { return; } if (this.mHasButtonTint || this.mHasButtonTintMode) { Drawable mutate = DrawableCompat.wrap(buttonDrawable).mutate(); if (this.mHasButtonTint) { DrawableCompat.setTintList(mutate, this.mButtonTintList); } if (this.mHasButtonTintMode) { DrawableCompat.setTintMode(mutate, this.mButtonTintMode); } if (mutate.isStateful()) { mutate.setState(this.mView.getDrawableState()); } this.mView.setButtonDrawable(mutate); } } /* access modifiers changed from: package-private */ /* JADX WARNING: Code restructure failed: missing block: B:2:0x0006, code lost: r0 = android.support.v4.widget.CompoundButtonCompat.getButtonDrawable(r2.mView); */ /* Code decompiled incorrectly, please refer to instructions dump. */ public int getCompoundPaddingLeft(int r3) { /* r2 = this; int r0 = android.os.Build.VERSION.SDK_INT r1 = 17 if (r0 >= r1) goto L_0x0013 android.widget.CompoundButton r0 = r2.mView android.graphics.drawable.Drawable r0 = android.support.v4.widget.CompoundButtonCompat.getButtonDrawable(r0) if (r0 == 0) goto L_0x0013 int r0 = r0.getIntrinsicWidth() int r3 = r3 + r0 L_0x0013: return r3 */ throw new UnsupportedOperationException("Method not decompiled: android.support.v7.widget.AppCompatCompoundButtonHelper.getCompoundPaddingLeft(int):int"); } }
[ "obaby.lh@gmail.com" ]
obaby.lh@gmail.com
59a549c661e3b02161fdf475e333d5018b89eaba
6635387159b685ab34f9c927b878734bd6040e7e
/src/com/brightcove/player/captioning/BrightcoveClosedCaptioningOptionsDialog$TextSizeChangedListener.java
c215a47f33e7a50fcaa48489bb3ae11a5fd13e31
[]
no_license
RepoForks/com.snapchat.android
987dd3d4a72c2f43bc52f5dea9d55bfb190966e2
6e28a32ad495cf14f87e512dd0be700f5186b4c6
refs/heads/master
2021-05-05T10:36:16.396377
2015-07-16T16:46:26
2015-07-16T16:46:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,834
java
package com.brightcove.player.captioning; import android.widget.RadioGroup; import android.widget.RadioGroup.OnCheckedChangeListener; import com.brightcove.player.R.id; public class BrightcoveClosedCaptioningOptionsDialog$TextSizeChangedListener implements RadioGroup.OnCheckedChangeListener { protected BrightcoveClosedCaptioningOptionsDialog$TextSizeChangedListener(BrightcoveClosedCaptioningOptionsDialog paramBrightcoveClosedCaptioningOptionsDialog) {} private float getTextSize(int paramInt) { float f2 = 1.0F; float f1; if (paramInt == R.id.closed_captioning_options_text_size_50_percent) { f1 = 0.5F; } for (;;) { String.format("sizeMultipler is %f", new Object[] { Float.valueOf(f1) }); return f1 * 14.0F; if (paramInt == R.id.closed_captioning_options_text_size_75_percent) { f1 = 0.75F; } else { f1 = f2; if (paramInt != R.id.closed_captioning_options_text_size_100_percent) { if (paramInt == R.id.closed_captioning_options_text_size_150_percent) { f1 = 1.5F; } else { f1 = f2; if (paramInt == R.id.closed_captioning_options_text_size_200_percent) { f1 = 2.0F; } } } } } } public void onCheckedChanged(RadioGroup paramRadioGroup, int paramInt) { String.format("Text Size %d selected", new Object[] { Integer.valueOf(paramInt) }); BrightcoveClosedCaptioningOptionsDialog.access$200(this$0).setTextSize(getTextSize(paramInt)); this$0.updateCaptions(); } } /* Location: * Qualified Name: com.brightcove.player.captioning.BrightcoveClosedCaptioningOptionsDialog.TextSizeChangedListener * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
cb2799d6733e4f3d478c872e36980518651f84e2
a56c966615252d1c2d739836bf44caafe66f387f
/src/main/java/de/st_ddt/crazyutil/databases/FlatDatabaseEntry.java
61ca7220056f1b98db3efde2cc08917b8d6fdb1f
[ "Apache-2.0" ]
permissive
ST-DDT/CrazyCore
eada1ad23d1c733afd022912e7b970d3df2e813d
f6f33dd0826c6fd5d066db94dbdacbfe3b96e842
refs/heads/master
2022-06-27T11:02:17.850223
2022-06-21T08:13:35
2022-06-21T08:13:35
15,260,398
0
10
Apache-2.0
2022-06-21T08:13:37
2013-12-17T16:56:14
Java
UTF-8
Java
false
false
189
java
package de.st_ddt.crazyutil.databases; public interface FlatDatabaseEntry extends DatabaseEntry { // public FlatDatabaseEntry(String[] rawData); public String[] saveToFlatDatabase(); }
[ "ST-DDT@gmx.de" ]
ST-DDT@gmx.de
c64b4075ee4668ed322d658be089af6a828067d4
9ab91b074703bcfe9c9407e1123e2b551784a680
/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PerformanceInfoCommand.java
2e4f5a9707c36f7c08454efb07690de1fd3dcade
[]
no_license
pkdevbox/osee
7ad9c083c3df8a7e9ef6185a419680cc08e21769
7e31f80f43d6d0b661af521fdd93b139cb694001
refs/heads/master
2021-01-22T00:30:05.686402
2015-06-08T21:19:57
2015-06-09T18:42:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,964
java
/******************************************************************************* * Copyright (c) 2012 Boeing. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Boeing - initial API and implementation *******************************************************************************/ package org.eclipse.osee.orcs.core.internal.console; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.concurrent.Callable; import org.eclipse.osee.console.admin.Console; import org.eclipse.osee.console.admin.ConsoleCommand; import org.eclipse.osee.console.admin.ConsoleParameters; import org.eclipse.osee.executor.admin.CancellableCallable; import org.eclipse.osee.orcs.OrcsApi; import org.eclipse.osee.orcs.OrcsPerformance; import org.eclipse.osee.orcs.statistics.IndexerStatistics; import org.eclipse.osee.orcs.statistics.QueryStatistics; /** * @author Roberto E. Escobar */ public class PerformanceInfoCommand implements ConsoleCommand { private OrcsApi orcsApi; private enum StatsType { QUERY, INDEXER, ALL } public void setOrcsApi(OrcsApi orcsApi) { this.orcsApi = orcsApi; } public OrcsApi getOrcsApi() { return orcsApi; } @Override public String getName() { return "performance"; } @Override public String getDescription() { return "Displays performance information"; } @Override public String getUsage() { return "[statusId=<[QUERY|INDEXER|ALL],..>] [reset=<TRUE|FALSE>]"; } private Collection<StatsType> toStatusTypes(String[] stats) { Collection<StatsType> statsType = new HashSet<StatsType>(); boolean addAllStatTypes = false; if (stats != null && stats.length > 0) { for (String stat : stats) { StatsType type = StatsType.valueOf(stat.toUpperCase()); if (StatsType.ALL == type) { addAllStatTypes = true; break; } else { statsType.add(type); } } } else { addAllStatTypes = true; } if (addAllStatTypes) { statsType.addAll(Arrays.asList(StatsType.values())); } return statsType; } @Override public Callable<?> createCallable(Console console, ConsoleParameters params) { boolean isResetAllowed = params.getBoolean("reset"); Collection<StatsType> statsType = toStatusTypes(params.getArray("statusId")); OrcsPerformance performance = getOrcsApi().getOrcsPerformance(null); return new PerformanceCallable(console, performance, statsType, isResetAllowed); } private static final class PerformanceCallable extends CancellableCallable<Boolean> { private final Console console; private final OrcsPerformance performance; private final Collection<StatsType> statsType; private final boolean isResetAllowed; public PerformanceCallable(Console console, OrcsPerformance performance, Collection<StatsType> statsType, boolean isResetAllowed) { super(); this.console = console; this.performance = performance; this.statsType = statsType; this.isResetAllowed = isResetAllowed; } private boolean isResetAllowed(StatsType type) { return isResetAllowed && isWriteAllowed(type); } private boolean isWriteAllowed(StatsType type) { return statsType.contains(type); } @Override public Boolean call() throws Exception { if (isResetAllowed(StatsType.QUERY)) { performance.clearQueryStatistics(); } if (isWriteAllowed(StatsType.QUERY)) { QueryStatistics queryStats = performance.getQueryStatistics(); writeStatistics(queryStats); } if (isResetAllowed(StatsType.INDEXER)) { performance.clearIndexerStatistics(); } if (isWriteAllowed(StatsType.INDEXER)) { IndexerStatistics indexerStats = performance.getIndexerStatistics(); IndexerUtil.writeStatistics(console, indexerStats); } return Boolean.TRUE; } private void writeStatistics(QueryStatistics stats) { console.writeln("\n----------------------------------------------"); console.writeln(" Search Stats"); console.writeln("----------------------------------------------"); console.writeln("Total Searches - [%d]", stats.getTotalSearches()); console.writeln("Search Time - avg: [%s] ms - longest: [%s] ms", stats.getAverageSearchTime(), stats.getLongestSearchTime()); console.writeln("Longest Search - %s", stats.getLongestSearch()); } } }
[ "ryan.d.brooks@boeing.com" ]
ryan.d.brooks@boeing.com
d8f6adc9601b638ba9daa670eafe6836b0ec3115
5622d518bac15a05590055a147628a728ca19b23
/jcore-mallet-0.4/src/main/java/edu/umass/cs/mallet/base/pipe/tsf/tests/TestSequencePrintingPipe.java
7665e878bfc8872b2600967ea33a433da3396535
[ "BSD-2-Clause", "CPL-1.0" ]
permissive
JULIELab/jcore-dependencies
e51349ccf6f26c7b7dab777a9e6baacd7068b853
a303c6a067add1f4b05c4d2fe31c1d81ecaa7073
refs/heads/master
2023-03-19T20:26:55.083193
2023-03-09T20:32:13
2023-03-09T20:32:13
44,806,492
4
2
BSD-2-Clause
2022-11-16T19:48:08
2015-10-23T10:32:10
Java
UTF-8
Java
false
false
3,328
java
/* Copyright (C) 2003 Univ. of Massachusetts Amherst, Computer Science Dept. This file is part of "MALLET" (MAchine Learning for LanguagE Toolkit). http://www.cs.umass.edu/~mccallum/mallet This software is provided under the terms of the Common Public License, version 1.0, as published by http://www.opensource.org. For further information, see the file `LICENSE' included with this distribution. */ package edu.umass.cs.mallet.base.pipe.tsf.tests; import edu.umass.cs.mallet.base.pipe.Pipe; import edu.umass.cs.mallet.base.pipe.tsf.SequencePrintingPipe; import edu.umass.cs.mallet.base.types.*; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import java.io.PrintWriter; import java.io.StringWriter; /** * Created: Jul 8, 2005 * * @author <A HREF="mailto:casutton@cs.umass.edu>casutton@cs.umass.edu</A> * @version $Id: TestSequencePrintingPipe.java,v 1.2 2005/07/08 20:37:32 casutton Exp $ */ public class TestSequencePrintingPipe extends TestCase { public TestSequencePrintingPipe (String name) { super (name); } public static Test suite () { return new TestSuite (TestSequencePrintingPipe.class); } public static void testPrinting () { Alphabet dict = dictOfSize (3); FeatureVector[] vecs = new FeatureVector[] { new FeatureVector (dict, new int[] { 0, 1 }), new FeatureVector (dict, new int[] { 0, 2 }), new FeatureVector (dict, new int[] { 2 }), new FeatureVector (dict, new int[] { 1, 2 }), }; LabelAlphabet ld = labelDictOfSize (3); LabelSequence lbls = new LabelSequence (ld, new int [] { 0, 2, 0, 1}); FeatureVectorSequence fvs = new FeatureVectorSequence (vecs); StringWriter sw = new StringWriter (); PrintWriter w = new PrintWriter (sw); Pipe p = new SequencePrintingPipe (w); // pipe the instance new Instance (fvs, lbls, null, null, p); // Do a second one FeatureVectorSequence fvs2 = new FeatureVectorSequence (new FeatureVector[] { new FeatureVector (dict, new int[] { 1 }), new FeatureVector (dict, new int[] { 0 }), }); LabelSequence lbls2 = new LabelSequence (ld, new int[] { 2, 1 }); new Instance (fvs2, lbls2, null, null, p); w.close(); assertEquals ("LABEL0 feature0 feature1\n" + "LABEL2 feature0 feature2\n" + "LABEL0 feature2\n" + "LABEL1 feature1 feature2\n" + "\n" + "LABEL2 feature1\n" + "LABEL1 feature0\n\n", sw.toString()); } private static Alphabet dictOfSize (int n) { Alphabet dict = new Alphabet (); for (int i = 0; i < n; i++) { dict.lookupIndex ("feature"+i); } return dict; } private static LabelAlphabet labelDictOfSize (int n) { LabelAlphabet dict = new LabelAlphabet (); for (int i = 0; i < n; i++) { dict.lookupIndex ("LABEL"+i); } return dict; } public static void main (String[] args) throws Throwable { TestSuite theSuite; if (args.length > 0) { theSuite = new TestSuite (); for (int i = 0; i < args.length; i++) { theSuite.addTest (new TestSequencePrintingPipe (args[i])); } } else { theSuite = (TestSuite) suite (); } junit.textui.TestRunner.run (theSuite); } }
[ "chew@gmx.net" ]
chew@gmx.net
69bdcd8e01043e290a18dbf4e0f1bfcadf9d9a82
4cfda4f1b4d7703e1b460359012082c158103476
/miliconvert/xsmt/trunk/plugins/org.miliconvert.xsmt.functions/src/org/miliconvert/xsmt/functions/math/Division.java
fd26891ae3bfcf418c29462c25cd01b9e8997e59
[]
no_license
opensourcejavadeveloper/military_xml_project_miliconvert
e62dee54499fdb8abaa76a9d44ed97ace19dc887
bb0276970c243ec3acc07fd4b255673d6d7dd080
refs/heads/master
2022-01-10T18:11:39.021413
2018-08-20T12:45:02
2018-08-20T12:45:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,560
java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * 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 Initial Developer of the Original Code is * BT Global Services / Etat français Ministre de la Défense * * ***** END LICENSE BLOCK ***** */ package org.miliconvert.xsmt.functions.math; import org.miliconvert.xsmt.tmodel.AbstractFunctionImpl; import org.miliconvert.xsmt.tmodel.TModelException; import org.miliconvert.xsmt.tmodel.Variable; public class Division extends AbstractFunctionImpl { public Division() { super(); variables.add(new Variable("a")); //$NON-NLS-1$ variables.add(new Variable("b")); //$NON-NLS-1$ } public String getName() { return Messages.Division_label_name; } /** * Divide a and b * * @param a * @param b * @return the division of a and b * @throws TModelException * when one of the parameters is null */ public String execute(String a, String b) throws TModelException { if (a == null || b == null) { throw new TModelException( "One parameter of the addition function is null: " + ": a=" //$NON-NLS-1$ //$NON-NLS-2$ + a + ", " + "b=" + b); //$NON-NLS-1$ //$NON-NLS-2$ } else return "" + (Float.parseFloat(a) / Float.parseFloat(b)); } }
[ "you@example.com" ]
you@example.com
b6b62aef09b208784bb34cfe8c18b781130551c4
33c34b024cf0c2d6c6967938ef5bdaa1433b2a94
/spring-security-fundamentals/security-demo/src/main/java/kyocoolcool/security/controller/FileController.java
e2b361a12d0c8507afa18c59122463fecfc6aab1
[]
no_license
kyocoolcool/spring-integration
4c6e8dc86834c7470fef97c081e50aa529ce229a
492e89a3c965f3a3d6d6c2519dbe6601679a182f
refs/heads/master
2022-12-21T01:39:46.050254
2020-03-09T02:10:46
2020-03-09T02:10:46
204,111,069
0
0
null
2022-12-16T00:02:47
2019-08-24T05:05:10
Java
UTF-8
Java
false
false
2,165
java
package kyocoolcool.security.controller; import kyocoolcool.security.bean.FileInfo; import org.apache.commons.io.IOUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.net.URLEncoder; import java.util.Date; /** * @ClassName FileController * @Description 檔案上傳下載範例 * @Author Chris Chen * @Date 2019/10/22 5:29 PM * @Version 1.0 **/ @RestController @RequestMapping("/file") public class FileController { private final String folder = "/Users/chris/git/spring-integration/spring-security-fundamentals/security-demo/src/main/java/kyocoolcool/security/controller"; @PostMapping public FileInfo upload(MultipartFile file) throws IOException { System.out.println(file.getName()); System.out.println(file.getOriginalFilename()); System.out.println(file.getSize()); File localFile = new File(folder, new Date().getTime() + ".txt"); file.transferTo(localFile); return new FileInfo(localFile.getAbsolutePath()); } @GetMapping("/{id}") public void download(@PathVariable String id, HttpServletRequest request, HttpServletResponse response) throws IOException { System.out.println(id); try (FileInputStream inputStream = new FileInputStream(new File(folder, id + ".txt")); ServletOutputStream outputStream = response.getOutputStream();) { // response.setContentType("application/x-download"); // response.setHeader("Content-Disposition", "attachment,filename=test.txt"); response.setHeader("content-type", "application/octet-stream"); response.setContentType("application/octet-stream"); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("test.txt", "UTF-8")); IOUtils.copy(inputStream, outputStream); outputStream.flush(); } } }
[ "kyocoolcool@hotmail.com" ]
kyocoolcool@hotmail.com
7be51151cb22baea43e7707be94ad1b59c52eb94
f7c09cfcbe351693759c8a6eccdecca05514d089
/src/com/tsekhanovich/patterns/behavioral/mediator/example1/ConcreteColleague2.java
ede149bdb79f97665301e99cefaae119bb19a4a4
[]
no_license
PavelTsekhanovich/SimplePatterns
4453ac51c0be4c3f322cb4b917da2571ceb0ceba
475fbf5cc40b36724006f7dc404afabfa064d646
refs/heads/master
2020-03-26T22:30:19.564244
2018-10-23T19:49:56
2018-10-23T19:49:56
145,463,949
0
0
null
null
null
null
UTF-8
Java
false
false
331
java
package com.tsekhanovich.patterns.behavioral.mediator.example1; public class ConcreteColleague2 extends Colleague { public ConcreteColleague2(Mediator mediator) { super(mediator); } @Override public void notify(String message) { System.out.println("Colleague2 gets message: " + message); } }
[ "p.tsekhanovich93@gmail.com" ]
p.tsekhanovich93@gmail.com
ec1fd784ead093889a06d6fa0ba873fb1fb5f31e
2e007171683616881b62eb3f1db8b271dc3284d1
/app/src/main/java/com/zhihuianxin/xyaxf/app/payment/CashierDeskFeeNormalAdapter.java
cf4638d3d38d9580aa46e1ac9e2a0d5e99111901
[ "Apache-2.0" ]
permissive
ZcrPro/axinfu
cc85856cefbd4b2050566d2d18f611e664facd9d
66fc7c6df4c6ea8a8a01a0008d5165eb6e53f09a
refs/heads/master
2020-03-20T08:45:38.205203
2018-07-09T01:56:39
2018-07-09T01:56:39
127,858,246
0
0
null
null
null
null
UTF-8
Java
false
false
927
java
package com.zhihuianxin.xyaxf.app.payment; import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.pacific.adapter.RecyclerAdapter; import com.pacific.adapter.RecyclerAdapterHelper; import com.zhihuianxin.xyaxf.R; import java.util.List; public class CashierDeskFeeNormalAdapter extends RecyclerAdapter<FeeListData> { public CashierDeskFeeNormalAdapter(Context context, @NonNull int... layoutResIds) { super(context, layoutResIds); } public CashierDeskFeeNormalAdapter(Context context, @Nullable List<FeeListData> data, @NonNull int... layoutResIds) { super(context, data, layoutResIds); } @Override protected void convert(RecyclerAdapterHelper helper, FeeListData feeList) { helper.setText(R.id.tv_sub_fee_name, feeList.name); helper.setText(R.id.tv_sub_fee_amount, feeList.amount); } }
[ "zcrpro@gmail.com" ]
zcrpro@gmail.com
da309f58f6bb25113de3fdaea08e7fcd4f6bcf7c
3c5caeb7f3d983d20796f42d1e9f0a5ddf30ea06
/backend/src/main/java/br/com/sisdb/dscatalog/entities/User.java
0ef61c8d532b35671c0ce61c4385ea57af2951b8
[]
no_license
danielbortolozo/dscatalog-bootcamp-devsuperior
e45ed086efa06c03af4ed3d628915dde5e3ef066
9dfa6065c261c04106695237a6036d1b7204210f
refs/heads/master
2023-04-21T05:46:42.257948
2021-02-19T03:59:35
2021-02-19T03:59:35
330,244,104
1
0
null
null
null
null
UTF-8
Java
false
false
2,261
java
package br.com.sisdb.dscatalog.entities; import com.fasterxml.jackson.annotation.JsonIgnore; import javax.persistence.*; import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.HashSet; import java.util.Objects; import java.util.Set; @Entity @Table(name = "user") public class User implements Serializable { private static final long serialVersionUID =1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String firstName; private String lastName; @Column(unique = true) private String email; private String password; @JsonIgnore @ManyToMany(fetch = FetchType.EAGER) @JoinTable(name = "user_role", joinColumns = @JoinColumn(name = "user_id"), inverseJoinColumns = @JoinColumn(name = "role_id")) private Set<Role> roles = new HashSet<>(); public User() { } public User(Long id, String firstName, String lastName, String email, String password) { this.id = id; this.firstName = firstName; this.lastName = lastName; this.email = email; this.password = password; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Set<Role> getRoles() { return roles; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; return id.equals(user.id); } @Override public int hashCode() { return Objects.hash(id); } }
[ "danielbortolozo@hotmail.com" ]
danielbortolozo@hotmail.com
53c5eec825ce0d9a422b50c10b2063b751722e58
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE129_Improper_Validation_of_Array_Index/s04/CWE129_Improper_Validation_of_Array_Index__Property_array_write_no_check_81a.java
fd9acd5b63ab2d5d17d8ab7d86a3fcc0dadf6bf7
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
3,899
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE129_Improper_Validation_of_Array_Index__Property_array_write_no_check_81a.java Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml Template File: sources-sinks-81a.tmpl.java */ /* * @description * CWE: 129 Improper Validation of Array Index * BadSource: Property Read data from a system property * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: array_write_no_check * GoodSink: Write to array after verifying index * BadSink : Write to array without any verification of index * Flow Variant: 81 Data flow: data passed in a parameter to an abstract method * * */ package testcases.CWE129_Improper_Validation_of_Array_Index.s04; import testcasesupport.*; import javax.servlet.http.*; import java.util.logging.Level; public class CWE129_Improper_Validation_of_Array_Index__Property_array_write_no_check_81a extends AbstractTestCase { public void bad() throws Throwable { int data; data = Integer.MIN_VALUE; /* Initialize data */ /* get system property user.home */ /* POTENTIAL FLAW: Read data from a system property */ { String stringNumber = System.getProperty("user.home"); try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } CWE129_Improper_Validation_of_Array_Index__Property_array_write_no_check_81_base baseObject = new CWE129_Improper_Validation_of_Array_Index__Property_array_write_no_check_81_bad(); baseObject.action(data ); } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use GoodSource and BadSink */ private void goodG2B() throws Throwable { int data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; CWE129_Improper_Validation_of_Array_Index__Property_array_write_no_check_81_base baseObject = new CWE129_Improper_Validation_of_Array_Index__Property_array_write_no_check_81_goodG2B(); baseObject.action(data ); } /* goodB2G() - use BadSource and GoodSink */ private void goodB2G() throws Throwable { int data; data = Integer.MIN_VALUE; /* Initialize data */ /* get system property user.home */ /* POTENTIAL FLAW: Read data from a system property */ { String stringNumber = System.getProperty("user.home"); try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } CWE129_Improper_Validation_of_Array_Index__Property_array_write_no_check_81_base baseObject = new CWE129_Improper_Validation_of_Array_Index__Property_array_write_no_check_81_goodB2G(); baseObject.action(data ); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
893678f1b708d25fe62201098a95e7d12c4a4934
6a0c54d6a0372254763a4cae2ef9fb84e3dde530
/test/de/caluga/test/mongo/suite/ComplexTest.java
d0d5ba6bf43deccbba64fbf24511f68acb7401bc
[]
no_license
sksundaram-learning/morphium
b4bbbb7df7d86e01a0def4db673e0274c1e0f90b
6d962f531fcef274190215308d669ea64296be7d
refs/heads/master
2021-01-22T14:55:28.394321
2017-05-17T08:46:14
2017-05-17T08:46:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,208
java
package de.caluga.test.mongo.suite; import de.caluga.morphium.Utils; import de.caluga.morphium.query.Query; import de.caluga.test.mongo.suite.data.EmbeddedObject; import de.caluga.test.mongo.suite.data.UncachedObject; import org.junit.Test; import java.util.HashMap; import java.util.List; import java.util.Map; /** * User: Stpehan Bösebeck * Date: 29.03.12 * Time: 15:56 * <p> * testing compley queryies on Morphium */ public class ComplexTest extends MongoTest { @Test public void testStoreAndRead() { UncachedObject o = new UncachedObject(); o.setCounter(111); o.setValue("Embedded object"); //morphium.store(o); EmbeddedObject eo = new EmbeddedObject(); eo.setName("Embedded object 1"); eo.setValue("A value"); eo.setTest(System.currentTimeMillis()); ComplexObject co = new ComplexObject(); co.setEmbed(eo); co.setEntityEmbeded(o); UncachedObject ref = new UncachedObject(); ref.setCounter(100); ref.setValue("The reference"); morphium.store(ref); co.setRef(ref); co.setEinText("This is a very complex object"); morphium.store(co); //object stored!!! waitForWrites(); //now read it again... Query<ComplexObject> q = morphium.createQueryFor(ComplexObject.class); ComplexObject co2 = q.getById(co.getId()); log.info("Just loaded: " + co2.toString()); log.info("Stored : " + co.toString()); assert (co2.getId().equals(co.getId())) : "Ids not equal?"; } @Test public void testAccessTimestamps() { ComplexObject o = new ComplexObject(); o.setEinText("A test"); o.setTrans("Tansient"); o.setNullValue(15); //And test for null-References! morphium.store(o); assert (o.getChanged() != 0) : "Last change not set!?!?"; Query<ComplexObject> q = morphium.createQueryFor(ComplexObject.class).f("ein_text").eq("A test"); o = q.get(); assert (o.getLastAccess() != 0) : "Last access not set!"; o = new ComplexObject(); o.setEinText("A test2"); o.setTrans("Tansient"); o.setNullValue(18); List<ComplexObject> lst = morphium.readAll(ComplexObject.class); for (ComplexObject co : lst) { assert (co.getChanged() != 0) : "Last Access not set!"; } } @Test public void testCopmplexQuery() { for (int i = 1; i <= 100; i++) { UncachedObject o = new UncachedObject(); o.setCounter(i); o.setValue("Uncached " + i); morphium.store(o); } Query<UncachedObject> q = morphium.createQueryFor(UncachedObject.class); q.f("counter").lt(50).or(q.q().f("counter").eq(10), q.q().f("value").eq("Uncached 15")); List<UncachedObject> lst = q.asList(); assert (lst.size() == 2) : "List size wrong: " + lst.size(); for (UncachedObject o : lst) { assert (o.getCounter() < 50 && (o.getCounter() == 10 || o.getCounter() == 15)) : "Counter wrong: " + o.getCounter(); } q = morphium.createQueryFor(UncachedObject.class); q.f("counter").lt(50).or(q.q().f("counter").eq(10), q.q().f("value").eq("Uncached 15"), q.q().f("counter").eq(52)); lst = q.asList(); assert (lst.size() == 2) : "List size wrong: " + lst.size(); for (UncachedObject o : lst) { assert (o.getCounter() < 50 && (o.getCounter() == 10 || o.getCounter() == 15)) : "Counter wrong: " + o.getCounter(); } q = morphium.createQueryFor(UncachedObject.class); q.f("counter").lt(50).f("counter").gt(10).or(q.q().f("counter").eq(22), q.q().f("value").eq("Uncached 15"), q.q().f("counter").gte(70)); lst = q.asList(); assert (lst.size() == 2) : "List size wrong: " + lst.size(); for (UncachedObject o : lst) { assert (o.getCounter() < 50 && o.getCounter() > 10 && (o.getCounter() == 22 || o.getCounter() == 15)) : "Counter wrong: " + o.getCounter(); } } @Test public void testNorQuery() throws Exception { for (int i = 1; i <= 100; i++) { UncachedObject o = new UncachedObject(); o.setCounter(i); o.setValue("Uncached " + i); morphium.store(o); } Thread.sleep(500); Query<UncachedObject> q = morphium.createQueryFor(UncachedObject.class); q.nor(q.q().f("counter").lt(90), q.q().f("counter").gt(95)); log.info("Query: " + q.toQueryObject().toString()); List<UncachedObject> lst = q.asList(); assert (lst.size() == 6) : "List size wrong: " + lst.size(); for (UncachedObject o : lst) { assert (!(o.getCounter() < 90 || o.getCounter() > 95)) : "Counter wrong: " + o.getCounter(); } } @Test public void complexQuery() { for (int i = 1; i <= 100; i++) { UncachedObject o = new UncachedObject(); o.setCounter(i); o.setValue("Uncached " + i); morphium.store(o); } Map<String, Object> query = new HashMap<>(); query.put("counter", Utils.getMap("$lt", 10)); Query<UncachedObject> q = morphium.createQueryFor(UncachedObject.class); List<UncachedObject> lst = q.complexQuery(query); assert (lst != null && !lst.isEmpty()) : "Nothing found?"; for (UncachedObject o : lst) { assert (o.getCounter() < 10) : "Wrong counter: " + o.getCounter(); } } @Test public void referenceQuery() throws Exception { UncachedObject o = new UncachedObject(); o.setCounter(15); o.setValue("Uncached " + 15); morphium.store(o); ComplexObject co = new ComplexObject(); co.setEinText("Text"); co.setRef(o); co.setTrans("trans"); morphium.store(co); Query<ComplexObject> qc = morphium.createQueryFor(ComplexObject.class); qc.f("ref").eq(o); ComplexObject fnd = qc.get(); assert (fnd != null) : "not found?!?!"; assert (fnd.getEinText().equals(co.getEinText())) : "Text different?"; assert (fnd.getRef().getCounter() == co.getRef().getCounter()) : "Reference broken?"; } @Test public void searchForSubObj() throws Exception { UncachedObject o = new UncachedObject(); o.setCounter(15); o.setValue("Uncached " + 15); morphium.store(o); ComplexObject co = new ComplexObject(); co.setEinText("Text"); co.setRef(o); co.setTrans("trans"); EmbeddedObject eo = new EmbeddedObject(); eo.setName("embedded1"); eo.setValue("154"); co.setEmbed(eo); morphium.store(co); waitForWrites(); Query<ComplexObject> qc = morphium.createQueryFor(ComplexObject.class); co = qc.f("embed.name").eq("embedded1").get(); assert (co != null); assert (co.getEmbed() != null); assert (co.getEmbed().getName().equals("embedded1")); assert (co.getEinText().equals("Text")); } }
[ "sb@caluga.de" ]
sb@caluga.de
c045b11e64c32503ac1dad15230abad25eac8051
f1a960e0a62e8188a05fb8e50751a11d19133e4a
/crux-dev/src/main/java/org/cruxframework/crux/core/rebind/screen/widget/creator/direction/DirectionEstimator.java
aa7b4ed27a94a0b2917289341da6908927f62fe5
[]
no_license
CruxFramework/crux
4fe5b6dbf9ee02c86ca84339e4489c197b84c0ab
b11bdc7c8ef6a70c62aa7460453109d853134b18
refs/heads/master
2022-12-23T23:31:52.415055
2016-08-05T19:10:55
2016-08-05T19:10:55
33,684,032
27
13
null
2022-12-13T19:14:41
2015-04-09T17:59:03
Java
UTF-8
Java
false
false
835
java
/* * Copyright 2011 cruxframework.org. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.cruxframework.crux.core.rebind.screen.widget.creator.direction; /** * @author Thiago da Rosa de Bustamante * */ public enum DirectionEstimator { anyRtl, firstStrong, wordCount, defaultAlign }
[ "thiago@cruxframework.org" ]
thiago@cruxframework.org
d6a746a3b06960976dc0532d6c71dabb26c7cf44
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_abae1b3f1aef8dac1a31448842930fa80d0fedb7/Main/2_abae1b3f1aef8dac1a31448842930fa80d0fedb7_Main_s.java
8e3545dfb36f1bb1d69ae74863cf17caf83bfe27
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,516
java
/*----------------------------------------------------------------------------*/ /* Copyright (c) FIRST 2008. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ package core; import autonomous.Autonomous; import utilities.Robot; import utilities.Vars; import utilities.MyJoystick; import edu.wpi.first.wpilibj.IterativeRobot; /** * The VM is configured to automatically run this class, and to call the * functions corresponding to each mode, as described in the IterativeRobot * documentation. If you change the name of this class or the package after * creating this project, you must also update the manifest file in the resource * directory. */ public class Main extends IterativeRobot { final String sCodeVersion = "Welcome to Bubblefish 2.2 Series !"; MyJoystick ps3Joy = new MyJoystick(1, Vars.iPs3Buttons); Robot bot = new Robot(ps3Joy); Compressor compressor = new Compressor(); Autonomous autonomous = new Autonomous(ps3Joy, bot); /* * This function is run when the robot is first started up and should be * used for any initialization code. */ public void robotInit() { Vars.fnPutDashBoardStringBox(Vars.skCodeVersion, sCodeVersion); } // This function is called when we disable the robot. public void disabledInit() { // Resets the replay to false if it was true before autonomous.resetAutonomous(); } public void disabledPeriodic() { compressor.run(); } /* Called once in autonomous, tells autonomous which file to play based on * the value of "iFileType" */ public void autonomousInit() { autonomous.setFileBasedOnDriverInput(); } // This function is called periodically during autonomous public void autonomousPeriodic() { autonomous.replay(); } // This function is called periodically during operator control public void teleopPeriodic() { bot.run(); compressor.run(); autonomous.run(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
cd61836b2c6533efef3f77822a76368fb9405038
a7d7907d76f874958222c34251a58f9676cc2126
/app/src/main/java/com/mobium/reference/view/ServicePointView.java
f831450afe5529973d66126a038faf3161cf6bb5
[ "Unlicense" ]
permissive
naebomium/android
450b29dded6c1bee112515e8cc74ddfeef2d2390
9e6a816a99e2fe7c7b4ad6755d945760caff854d
refs/heads/master
2021-01-10T06:57:57.610925
2015-11-25T13:57:58
2015-11-25T13:57:58
46,860,560
5
1
null
null
null
null
UTF-8
Java
false
false
267
java
package com.mobium.reference.view; /** * on 25.07.15. * http://mobiumapps.com/ */ public interface ServicePointView { void showTitle(String title); void showPhone(String phone); void showSubway(String subway); void showAddress(String addtess); }
[ "johndoe@example.com" ]
johndoe@example.com
ca6a20bfb17153cb11e7bebe00e789428f786b33
dc945e62937adfecd9faad1ce434d5856316369e
/src/utils/Log.java
83567e3bb02b95ec76e093cbb900be1d84a6d0d3
[]
no_license
SCRAPPYDOO/ScrappyAirsoftShop
bbdc7a7da4f1ab0b47ffb08905d6cf3ee031bd35
977a7030b3643ce7796cf8e4d0005eb55aafd5bc
refs/heads/master
2021-03-12T21:45:57.101351
2015-09-16T10:49:45
2015-09-16T10:49:45
41,765,695
0
0
null
null
null
null
UTF-8
Java
false
false
519
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package utils; import global.GlobalParameters; /** * * @author User */ public class Log { private static boolean logEnabled = true; public static void log(String log) { if(logEnabled) { System.out.println(log); } } public static void email(String log) { if(GlobalParameters.LOGGER_EMAIL) { log("EMAIL SENDER: " + log); } } }
[ "scrapek69@gmail.com" ]
scrapek69@gmail.com
0fab80d480c4a72c0d0ec3e905d6d60728b396db
5fa48a0da4bb139dd859c11c255114ef6872ba76
/alipaysdk/src/main/java/com/alipay/api/response/AlipayMarketingCampaignActivityOfflineCreateResponse.java
91b20132cffc679a4a58c263e4db8331fa967c5d
[]
no_license
zhangzui/alipay_sdk
0b6c4ff198fc5c1249ff93b4d26245405015f70f
e86b338364b24f554e73a6be430265799765581c
refs/heads/master
2020-03-22T17:43:26.553694
2018-07-11T10:28:33
2018-07-11T10:28:33
140,411,652
0
0
null
null
null
null
UTF-8
Java
false
false
860
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.marketing.campaign.activity.offline.create response. * * @author auto create * @since 1.0, 2017-04-07 18:22:19 */ public class AlipayMarketingCampaignActivityOfflineCreateResponse extends AlipayResponse { private static final long serialVersionUID = 2473957256426715897L; /** * 创建成功的活动id */ @ApiField("camp_id") private String campId; /** * 创建成功的券模版id */ @ApiField("prize_id") private String prizeId; public void setCampId(String campId) { this.campId = campId; } public String getCampId( ) { return this.campId; } public void setPrizeId(String prizeId) { this.prizeId = prizeId; } public String getPrizeId( ) { return this.prizeId; } }
[ "zhangzuizui@qq.com" ]
zhangzuizui@qq.com