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
2a21803e6eb0570fab4b65b7b04292b82f23af78
ab8a34e5b821dde7b09abe37c838de046846484e
/twilio/sample-code-master/chat/v1/message/update-default/update-default.7.x.java
63b6b2c5b50d905a1ab6b71cadd8384c4e972fb0
[]
no_license
sekharfly/twilio
492b599fff62618437c87e05a6c201d6de94527a
a2847e4c79f9fbf5c53f25c8224deb11048fe94b
refs/heads/master
2020-03-29T08:39:00.079997
2018-09-21T07:20:24
2018-09-21T07:20:24
149,721,431
0
1
null
null
null
null
UTF-8
Java
false
false
772
java
// Install the Java helper library from twilio.com/docs/java/install import com.twilio.Twilio; import com.twilio.rest.chat.v1.service.channel.Message; public class Example { // Find your Account Sid and Token at twilio.com/console public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; public static final String AUTH_TOKEN = "your_auth_token"; public static void main(String[] args) { Twilio.init(ACCOUNT_SID, AUTH_TOKEN); Message message = Message.updater( "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") .setBody("body").update(); System.out.println(message.getTo()); } }
[ "sekharfly@gmail.com" ]
sekharfly@gmail.com
503da4a57e201449e69225b59954d4106cdcaad3
8cdd38dfd700c17d688ac78a05129eb3a34e68c7
/JVXML_HOME/org.jvoicexml/src/org/jvoicexml/interpreter/JVoiceXmlContextFactory.java
86733780c9255d9d9d93bb4305556b8f78c35be3
[]
no_license
tymiles003/JvoiceXML-Halef
b7d975dbbd7ca998dc1a4127f0bffa0552ee892e
540ff1ef50530af24be32851c2962a1e6a7c9dbb
refs/heads/master
2021-01-18T18:13:56.781237
2014-05-13T15:56:07
2014-05-13T15:56:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,413
java
/* * File: $HeadURL: https://svn.code.sf.net/p/jvoicexml/code/trunk/org.jvoicexml/src/org/jvoicexml/interpreter/JVoiceXmlContextFactory.java $ * Version: $LastChangedRevision: 3242 $ * Date: $Date: 2012-10-08 15:41:57 +0200 (Mon, 08 Oct 2012) $ * Author: $LastChangedBy: schnelle $ * * JVoiceXML - A free VoiceXML implementation. * * Copyright (C) 2011 JVoiceXML group - http://jvoicexml.sourceforge.net * The JVoiceXML group hereby disclaims all copyright interest in the * library `JVoiceXML' (a free VoiceXML implementation). * JVoiceXML group, $Date: 2012-10-08 15:41:57 +0200 (Mon, 08 Oct 2012) $, Dirk Schnelle-Walka, project lead * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library 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 org.jvoicexml.interpreter; import org.mozilla.javascript.Context; import org.mozilla.javascript.ContextFactory; /** * A context factory for the {@link ScriptingEngine}. The VoiceXML specification * requires the activation of certain features, like strict variable * declarations. This implementation takes care that they are set properly. * @author Dirk Schnelle-Walka * @version $Revision: 3242 $ * @since 0.7.5 */ class JVoiceXmlContextFactory extends ContextFactory { /** * {@inheritDoc} */ @Override protected boolean hasFeature(final Context cx, final int featureIndex) { switch (featureIndex) { case Context.FEATURE_STRICT_MODE: return true; case Context.FEATURE_STRICT_VARS: return true; case Context.FEATURE_STRICT_EVAL: return true; case Context.FEATURE_WARNING_AS_ERROR: return true; default: return super.hasFeature(cx, featureIndex); } } }
[ "malatawy15@gmail.com" ]
malatawy15@gmail.com
8443632e9a220731c9bc45a2f183d7080110a8cf
9fcf10a445cc34f319d18b92008fc7c37630d34f
/project1-war/src/test/java/com/saike/grape/controller/UmsClientTest.java
dc36d9fb3fbc455e5457daebb900c36a127a8d6a
[]
no_license
liubao19860416/project1-war
c668096fac0611341985996844ca5d4e3d286aee
14294d686ae0a27b7d8fc5cea732b2f2d4fcc6ef
refs/heads/master
2021-01-10T08:12:15.659636
2015-10-25T06:01:18
2015-10-25T06:01:18
44,898,463
0
0
null
null
null
null
UTF-8
Java
false
false
2,692
java
package com.saike.grape.controller; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import com.meidusa.fastjson.JSON; import com.saike.grape.utils.v11.ConsField; import com.saike.grape.utils.v11.ResultInfoUtil; import com.saike.grape.venus.client.UmsClient; /** * 短信消息发送测试类 * * @author Liubao * @2014年10月21日 */ public class UmsClientTest extends ControllerTest { private String url="/umsClient/testUmsClientSendMessage/0"; @Autowired private UmsClient umsClient; // @Test public void testUmsClient() throws Exception{ String overdueTime = new Timestamp(System.currentTimeMillis()).toString().substring(0, new Timestamp(new Date().getTime()).toString().length() - 10); String saikemobilehead="{\"userId\": \"11111\","; saikemobilehead+="\"deviceId\": \"22222\","; HttpHeaders httpHeaders=new HttpHeaders(); httpHeaders.add("saikemobilehead", saikemobilehead); Map<String, Object> params = new HashMap<>(); List<String> destPhones = new ArrayList<String>(); destPhones.add("+8618611478781"); params.put("appId", ConsField.UMS_COUPON_APPID); params.put("schemaId", ConsField.UMS_COUPON_SCHAMDID); params.put("couponAmount", "200"); params.put("couponCode", "FEDCB"); params.put("verifyCode", "EDCBA"); params.put("overdueTime", overdueTime); params.put("note", "新用户发送保养券短信信息"); //params.put("destPhones", destPhones); params.put("destPhones", "18611478781"); mockMvc.perform( post(url,params) .header( "content-type", CONTENT_TYPE_JSON ) .headers(httpHeaders) .content( JSON.toJSONString( params ) ) ) .andExpect( status().isOk() ) .andExpect( content().contentType( CONTENT_TYPE_JSON ) ) .andExpect( content().encoding( CONTENT_ENCODE ) ); /*.andExpect( content().string( JSON.toJSONString( ResultInfoUtil.setSuccessInfo("1") ) ) );*/ } }
[ "18611478781@163.com" ]
18611478781@163.com
3e3a3ae419e01e8bff939cadc0c9528c73a40ba0
028d6009f3beceba80316daa84b628496a210f8d
/uidesigner/com.nokia.sdt.symbian/src/com/nokia/sdt/symbian/images/uriHandlers/ProjectBasedURIImageInfoSchemeHandlerBase.java
d08afe70e5e8d6a840e46313f367ebd94793d2ea
[]
no_license
JamesLinus/oss.FCL.sftools.dev.ide.carbidecpp
fa50cafa69d3e317abf0db0f4e3e557150fd88b3
4420f338bc4e522c563f8899d81201857236a66a
refs/heads/master
2020-12-30T16:45:28.474973
2010-10-20T16:19:31
2010-10-20T16:19:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,129
java
/* * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. * * Contributors: * * Description: * */ package com.nokia.sdt.symbian.images.uriHandlers; import com.nokia.carbide.cpp.ui.images.*; import com.nokia.sdt.symbian.images.ProjectImageInfo; import com.nokia.cpp.internal.api.utils.core.Check; import com.nokia.cpp.internal.api.utils.core.ProjectUtils; import org.eclipse.core.runtime.IPath; /** * Base handler for schemes that reference image files in the project. * * */ public class ProjectBasedURIImageInfoSchemeHandlerBase extends NullURIImageInfoSchemeHandler { protected final ProjectImageInfo projectImageInfo; protected IPath projectLocation; /** * @param projectImageInfo * */ public ProjectBasedURIImageInfoSchemeHandlerBase(ProjectImageInfo projectImageInfo) { Check.checkArg(projectImageInfo); this.projectImageInfo = projectImageInfo; this.projectLocation = ProjectUtils.getRealProjectLocation(projectImageInfo.getProject()); } /** * Take the URI path and convert it to the full path on the host. * @param projectImageInfo_ the project image info * @param path the URI path * @return full path on host, or <code>null</code> */ protected IPath convertToHostImage(String pathString) { // need to iterate map due to likelihood of non-canonical strings for (IImageModel model : projectImageInfo.getProjectImageModels()) { if (model instanceof IURIRepresentableImageModel && model instanceof IFileImageModel) { IURIRepresentableImageModel uriModel = (IURIRepresentableImageModel) model; if (pathString.equalsIgnoreCase(uriModel.getURI())) { return ((IFileImageModel)uriModel).getSourceLocation(); } } } return null; } }
[ "Deepak.Modgil@Nokia.com" ]
Deepak.Modgil@Nokia.com
6fae00dc7f0812a90a8dec5ead8bb894b846abc7
9310225eb939f9e4ac1e3112190e6564b890ac63
/jsf/jsf-widgets/src/java/org/sakaiproject/jsf/renderer/GroupBoxRenderer.java
e9dd2f83e967439fe204082b7bf8cd3eae7389dd
[ "ECL-2.0" ]
permissive
deemsys/version-1.0
89754a8acafd62d37e0cdadf680ddc9970e6d707
cd45d9b7c5633915a18bd75723c615037a4eb7a5
refs/heads/master
2020-06-04T10:47:01.608886
2013-06-15T11:01:28
2013-06-15T11:01:28
10,705,153
1
0
null
null
null
null
UTF-8
Java
false
false
2,119
java
/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/jsf/branches/jsf-2.9.x/jsf-widgets/src/java/org/sakaiproject/jsf/renderer/GroupBoxRenderer.java $ * $Id: GroupBoxRenderer.java 68846 2009-11-13 12:27:32Z arwhyte@umich.edu $ *********************************************************************************** * * Copyright (c) 2003, 2004, 2005, 2006, 2008 The Sakai Foundation * * Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaiproject.jsf.renderer; import java.io.IOException; import javax.faces.component.UIComponent; import javax.faces.component.UIOutput; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.render.Renderer; import org.sakaiproject.jsf.util.RendererUtil; public class GroupBoxRenderer extends Renderer { public boolean supportsComponentType(UIComponent component) { return (component instanceof UIOutput); } public void encodeBegin(FacesContext context, UIComponent component) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.write("<fieldset>"); String title = (String) RendererUtil.getAttribute(context, component, "title"); if (title != null) { writer.write("<legend>" + title + "</legend>\n"); } } public void encodeEnd(FacesContext context, UIComponent component) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.write("</fieldset>"); } }
[ "sangee1229@gmail.com" ]
sangee1229@gmail.com
98d0120b83c1c03a03a681ef50785998dfd568c0
60954c937d612f69b1515afd3bed66ed3269648a
/modules/flowable-form-engine/src/main/java/org/flowable/form/engine/impl/interceptor/CommandInvoker.java
0b1c9d8b56a09ce9cc0e4ad6f408a86d6d0ef515
[ "Apache-2.0" ]
permissive
theanuradha/flowable-engine
df47dd3bf83244c4dd13912db0f602051a3fa894
bfbfcf74a63188bf1710f9c0ce454271d14bcc6e
refs/heads/master
2021-01-01T04:14:23.828073
2017-07-13T14:14:01
2017-07-13T14:14:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,498
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.flowable.form.engine.impl.interceptor; import org.flowable.engine.common.impl.interceptor.CommandConfig; import org.flowable.form.engine.impl.context.Context; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author Joram Barrez */ public class CommandInvoker extends AbstractCommandInterceptor { private static final Logger LOGGER = LoggerFactory.getLogger(CommandInvoker.class); @Override public <T> T execute(final CommandConfig config, final Command<T> command) { final CommandContext commandContext = Context.getCommandContext(); T result = command.execute(commandContext); return result; } @Override public CommandInterceptor getNext() { return null; } @Override public void setNext(CommandInterceptor next) { throw new UnsupportedOperationException("CommandInvoker must be the last interceptor in the chain"); } }
[ "tijs.rademakers@gmail.com" ]
tijs.rademakers@gmail.com
4aee646f77e7cd5712a91281ede292947ede9b85
87d7a4d676e13d1126d07b456f3cda79f806679f
/src/org/usfirst/frc/team2850/robot/PixyException.java
14d84f30a9e40044f33637d4804269e4c37226d0
[]
no_license
AllSparks2848/PixyCamTest
f73dac18f42acd21f98486bf85207214b87dc130
a14a0a3d35c94b0df505778fe8877d4b8d75bda8
refs/heads/master
2021-01-12T01:25:09.519148
2017-01-09T01:23:41
2017-01-09T01:23:41
78,382,931
0
0
null
null
null
null
UTF-8
Java
false
false
151
java
package org.usfirst.frc.team2850.robot; public class PixyException extends Exception { public PixyException(String message){ super(message); } }
[ "18187@jcpstudents.org" ]
18187@jcpstudents.org
be15178ac12a44ce34cfb68b0fe7eb7ed37e0027
53e1530d418dcda795cd140db4d736a65695f37b
/IdeaProjects/src/part2/chapter19/ScanMixed.java
17be87ee56d1e225dcae2ca7b57a7b5206e4a2cd
[]
no_license
Zed180881/Zed_repo
a03bac736e3c61c0bea61b2f81624c4bc604870b
6e9499e7ec3cfa9dc11f9d7a92221522c56b5f61
refs/heads/master
2020-04-05T18:57:47.596468
2016-11-02T07:51:30
2016-11-02T07:51:30
52,864,144
0
0
null
null
null
null
UTF-8
Java
false
false
1,116
java
package part1.chapter19; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.Scanner; class ScanMixed { public static void main(String[] args) throws IOException { int i; double d; boolean b; String str; FileWriter fout = new FileWriter("test.txt"); fout.write("Testing Scanner 10 12,2 one true two false"); fout.close(); FileReader fin = new FileReader("test.txt"); Scanner src = new Scanner(fin); while (src.hasNext()) { if (src.hasNextInt()) { i = src.nextInt(); System.out.println("int: " + i); } else if (src.hasNextDouble()) { d = src.nextDouble(); System.out.println("double: " + d); } else if (src.hasNextBoolean()) { b = src.nextBoolean(); System.out.println("boolean: " + b); } else { str = src.next(); System.out.println("String: " + str); } } src.close(); } }
[ "zed180881@gmail.com" ]
zed180881@gmail.com
facd1ea68c15a65f7362f29a16eb2d5c8c075abc
c8417895a7b071e7b2cc07a6791357c5bffc7889
/com/google/android/gms/games/multiplayer/realtime/RealTimeSocket.java
124a405af0aa0c000a910c12ffce65176f3e98ee
[]
no_license
HansaTharuka/Explore
70a610cac38469cddf2dc87c9f67dcd9a94f8d1a
b71eb84c57fb28b687ce6df4a69e14a3dcaf8458
refs/heads/master
2021-01-24T11:27:25.524180
2018-02-27T06:33:37
2018-02-27T06:33:37
123,083,071
0
0
null
null
null
null
UTF-8
Java
false
false
790
java
package com.google.android.gms.games.multiplayer.realtime; import android.os.ParcelFileDescriptor; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @Deprecated public abstract interface RealTimeSocket { public abstract void close() throws IOException; public abstract InputStream getInputStream() throws IOException; public abstract OutputStream getOutputStream() throws IOException; public abstract ParcelFileDescriptor getParcelFileDescriptor() throws IOException; public abstract boolean isClosed(); } /* Location: D:\Testing\hacking\dex2jar-0.0.9.15\dex2jar-0.0.9.15\classes_dex2jar.jar * Qualified Name: com.google.android.gms.games.multiplayer.realtime.RealTimeSocket * JD-Core Version: 0.6.0 */
[ "hansatharukarcg3@gmail.com" ]
hansatharukarcg3@gmail.com
f2ca0f8338021773f8dbffc87ceb18bbe296d7e1
b56ed993ab4aa89a3fc833ce4ec77018c23b9611
/imani-bill-pay-domain/src/main/java/com/imani/bill/pay/domain/payment/plaid/PlaidItemDetail.java
ebbecbf9a595e04b01c872650eba93e7413e2842
[]
no_license
ImaniWorld/imani-bill-pay
54bb80564ea69226e6b6373c4b57c8b84dcc8ddd
afaaca60c3305a0fa9ff40680959560609cc3224
refs/heads/master
2022-01-23T08:02:08.518760
2021-11-25T06:43:45
2021-11-25T06:43:45
211,552,592
0
1
null
2022-01-21T23:30:48
2019-09-28T19:37:31
Java
UTF-8
Java
false
false
1,689
java
package com.imani.bill.pay.domain.payment.plaid; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.commons.lang3.builder.ToStringBuilder; /** * @author manyce400 */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class PlaidItemDetail { @JsonProperty("item") private PlaidItem plaidItem; @JsonProperty("request_id") protected String requestID; @JsonProperty("status") public Status status; public PlaidItemDetail() { } public PlaidItem getPlaidItem() { return plaidItem; } public void setPlaidItem(PlaidItem plaidItem) { this.plaidItem = plaidItem; } public String getRequestID() { return requestID; } public void setRequestID(String requestID) { this.requestID = requestID; } public Status getStatus() { return status; } public void setStatus(Status status) { this.status = status; } @Override public String toString() { return new ToStringBuilder(this) .append("plaidItemInfo", plaidItem) .append("requestID", requestID) .append("status", status) .toString(); } public static class Status { private String lastWebhook; public Status() { } public String getLastWebhook() { return lastWebhook; } public void setLastWebhook(String lastWebhook) { this.lastWebhook = lastWebhook; } } }
[ "fallon12" ]
fallon12
d05a8f0c32ca8a9f84dfe04a99407c570bac2765
692a7b9325014682d72bd41ad0af2921a86cf12e
/iZhejiang/src/org/jsoup/parser/TokeniserState$51.java
d30dae2a9328f1706000a7172c67d505d98b1af5
[]
no_license
syanle/WiFi
f76fbd9086236f8a005762c1c65001951affefb6
d58fb3d9ae4143cbe92f6f893248e7ad788d3856
refs/heads/master
2021-01-20T18:39:13.181843
2015-10-29T12:38:57
2015-10-29T12:38:57
45,156,955
0
0
null
null
null
null
UTF-8
Java
false
false
1,224
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package org.jsoup.parser; // Referenced classes of package org.jsoup.parser: // TokeniserState, CharacterReader, Tokeniser static final class it> extends TokeniserState { void read(Tokeniser tokeniser, CharacterReader characterreader) { switch (characterreader.consume()) { default: tokeniser.error(this); tokeniser.transition(BeforeDoctypeName); return; case 9: // '\t' case 10: // '\n' case 12: // '\f' case 13: // '\r' case 32: // ' ' tokeniser.transition(BeforeDoctypeName); return; case 65535: tokeniser.eofError(this); // fall through case 62: // '>' tokeniser.error(this); break; } tokeniser.createDoctypePending(); tokeniser.doctypePending.eQuirks = true; tokeniser.emitDoctypePending(); tokeniser.transition(Data); } (String s, int i) { super(s, i, null); } }
[ "arehigh@gmail.com" ]
arehigh@gmail.com
98f6c64723271ce05f305ef6dd4fe62ca86b8fb7
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.1.jar/classes.jar/com/tencent/widget/XMultiListAdapter.java
33a6bf27c4817f737e22733d13a8e1b1ed368e04
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
899
java
package com.tencent.widget; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import java.util.List; public class XMultiListAdapter extends BaseAdapter implements XListAdapter { private List a; public XMultiListAdapter(List paramList) { this.a = paramList; } public int getCount() { return this.a.size(); } public Object getItem(int paramInt) { return null; } public long getItemId(int paramInt) { return paramInt; } public View getView(int paramInt, View paramView, ViewGroup paramViewGroup) { return (View)this.a.get(paramInt); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.1.jar\classes.jar * Qualified Name: com.tencent.widget.XMultiListAdapter * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
3bf934eb5d7a360b558e3bc483596b29bcb056ca
f0721cfa623b8a2a4cf47e922545e509aadf0f83
/src/com/bernard/beaconportal/activities/ColorPickerPreference.java
25620c18a8f0e603c86a59b97d1dcfbe4641ae27
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
theduffster/beacon_portal_android
592e83a9f0a4f7a059dee3fc8a690867c1136d4f
18ddded76b78e619a5cb2fbe5bd47f20ba9d241c
refs/heads/master
2022-12-29T15:21:34.864417
2020-10-21T07:35:12
2020-10-21T07:35:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,581
java
package com.bernard.beaconportal.activities; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.Color; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import android.preference.Preference; import android.util.AttributeSet; import android.view.View; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; /** * A preference type that allows a user to choose a time * * @author Sergey Margaritov */ public class ColorPickerPreference extends Preference implements Preference.OnPreferenceClickListener, ColorPickerDialogTabs.OnColorChangedListener { View mView; ColorPickerDialogTabs mDialog; LinearLayout widgetFrameView; private int mValue = Color.BLACK; private float mDensity = 0; private boolean mAlphaSliderEnabled = false; private EditText mEditText; public ColorPickerPreference(Context context) { super(context); init(context, null); } public ColorPickerPreference(Context context, AttributeSet attrs) { super(context, attrs); init(context, attrs); } public ColorPickerPreference(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(context, attrs); } @Override protected Object onGetDefaultValue(TypedArray a, int index) { return a.getInt(index, Color.BLACK); } @Override protected void onSetInitialValue(boolean restoreValue, Object defaultValue) { onColorChanged(restoreValue ? getPersistedInt(mValue) : (Integer) defaultValue); } private void init(Context context, AttributeSet attrs) { mDensity = getContext().getResources().getDisplayMetrics().density; setOnPreferenceClickListener(this); if (attrs != null) { mAlphaSliderEnabled = attrs.getAttributeBooleanValue(null, "alphaSlider", false); } } @Override protected void onBindView(View view) { mView = view; super.onBindView(view); widgetFrameView = ((LinearLayout) view .findViewById(android.R.id.widget_frame)); setPreviewColor(); } private void setPreviewColor() { if (mView == null) return; ImageView iView = new ImageView(getContext()); LinearLayout widgetFrameView = ((LinearLayout) mView .findViewById(android.R.id.widget_frame)); if (widgetFrameView == null) return; widgetFrameView.setVisibility(View.VISIBLE); widgetFrameView.setPadding(widgetFrameView.getPaddingLeft(), widgetFrameView.getPaddingTop(), (int) (mDensity * 8), widgetFrameView.getPaddingBottom()); // remove already create preview image int count = widgetFrameView.getChildCount(); if (count > 0) { widgetFrameView.removeViews(0, count); } widgetFrameView.addView(iView); widgetFrameView.setMinimumWidth(0); iView.setBackgroundDrawable(new AlphaPatternDrawable( (int) (5 * mDensity))); iView.setImageBitmap(getPreviewBitmap()); } private Bitmap getPreviewBitmap() { int d = (int) (mDensity * 31); // 30dip int color = mValue; Bitmap bm = Bitmap.createBitmap(d, d, Config.ARGB_8888); int w = bm.getWidth(); int h = bm.getHeight(); int c = color; for (int i = 0; i < w; i++) { for (int j = i; j < h; j++) { c = (i <= 1 || j <= 1 || i >= w - 2 || j >= h - 2) ? Color.GRAY : color; bm.setPixel(i, j, c); if (i != j) { bm.setPixel(j, i, c); } } } return bm; } @Override public void onColorChanged(int color) { if (isPersistent()) { persistInt(color); } mValue = color; setPreviewColor(); try { getOnPreferenceChangeListener().onPreferenceChange(this, color); } catch (NullPointerException e) { } try { mEditText.setText(Integer.toString(color, 16)); } catch (NullPointerException e) { } } @Override public boolean onPreferenceClick(Preference preference) { showDialog(null); return false; } protected void showDialog(Bundle state) { mDialog = new ColorPickerDialogTabs(getContext(), mValue); mDialog.setOnColorChangedListener(this); if (mAlphaSliderEnabled) { mDialog.setAlphaSliderVisible(true); } if (state != null) { mDialog.onRestoreInstanceState(state); } mDialog.show(); } /** * Toggle Alpha Slider visibility (by default it's disabled) * * @param enable */ public void setAlphaSliderEnabled(boolean enable) { mAlphaSliderEnabled = enable; } /** * For custom purposes. Not used by ColorPickerPreferrence * * set color preview value from outside * * @author kufikugel */ public void setNewPreviewColor(int color) { onColorChanged(color); } /** * For custom purposes. Not used by ColorPickerPreferrence * * @param color * @author Unknown */ public static String convertToARGB(int color) { String alpha = Integer.toHexString(Color.alpha(color)); String red = Integer.toHexString(Color.red(color)); String green = Integer.toHexString(Color.green(color)); String blue = Integer.toHexString(Color.blue(color)); if (alpha.length() == 1) { alpha = "0" + alpha; } if (red.length() == 1) { red = "0" + red; } if (green.length() == 1) { green = "0" + green; } if (blue.length() == 1) { blue = "0" + blue; } return "#" + alpha + red + green + blue; } /** * For custom purposes. Not used by ColorPickerPreferrence * * @param argb * @throws NumberFormatException * @author Unknown */ public static int convertToColorInt(String argb) throws NumberFormatException { if (argb.startsWith("#")) { argb = argb.replace("#", ""); } int alpha = -1, red = -1, green = -1, blue = -1; if (argb.length() == 8) { alpha = Integer.parseInt(argb.substring(0, 2), 16); red = Integer.parseInt(argb.substring(2, 4), 16); green = Integer.parseInt(argb.substring(4, 6), 16); blue = Integer.parseInt(argb.substring(6, 8), 16); } else if (argb.length() == 6) { alpha = 255; red = Integer.parseInt(argb.substring(0, 2), 16); green = Integer.parseInt(argb.substring(2, 4), 16); blue = Integer.parseInt(argb.substring(4, 6), 16); } return Color.argb(alpha, red, green, blue); } @Override protected Parcelable onSaveInstanceState() { final Parcelable superState = super.onSaveInstanceState(); if (mDialog == null || !mDialog.isShowing()) { return superState; } final SavedState myState = new SavedState(superState); myState.dialogBundle = mDialog.onSaveInstanceState(); return myState; } @Override protected void onRestoreInstanceState(Parcelable state) { if (state == null || !(state instanceof SavedState)) { // Didn't save state for us in onSaveInstanceState super.onRestoreInstanceState(state); return; } SavedState myState = (SavedState) state; super.onRestoreInstanceState(myState.getSuperState()); showDialog(myState.dialogBundle); } private static class SavedState extends BaseSavedState { Bundle dialogBundle; public SavedState(Parcel source) { super(source); dialogBundle = source.readBundle(); } @Override public void writeToParcel(Parcel dest, int flags) { super.writeToParcel(dest, flags); dest.writeBundle(dialogBundle); } public SavedState(Parcelable superState) { super(superState); } @SuppressWarnings("unused") public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<SavedState>() { @Override public SavedState createFromParcel(Parcel in) { return new SavedState(in); } @Override public SavedState[] newArray(int size) { return new SavedState[size]; } }; } }
[ "lincolnbernard7@gmail.com" ]
lincolnbernard7@gmail.com
7ad52ddede47dd386a5280b3bca40d4839991d2f
0e32606fe90b6ab3b94e42e0ffeb3836457dae0e
/src/test/java/net/openhft/chronicle/queue/CountingJDBCResult.java
00931310d2f8933dd63c46cf48fccac9be622451
[ "Apache-2.0" ]
permissive
yunsungbae/Chronicle-Queue
81b08e71b881476faf3681d6eba70994cc421f5e
8b0c6b3c80feae53b3c7b1149cd39dbaefdc59ab
refs/heads/master
2021-01-21T19:27:37.213496
2017-05-20T10:48:55
2017-05-20T10:48:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,788
java
/* * Copyright 2016 higherfrequencytrading.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.openhft.chronicle.queue; import net.openhft.chronicle.core.Jvm; import java.util.List; import java.util.concurrent.atomic.AtomicLong; /** * Created by Peter on 18/06/2016. */ class CountingJDBCResult implements JDBCResult { private final AtomicLong queries; private final AtomicLong updates; public CountingJDBCResult(AtomicLong queries, AtomicLong updates) { this.queries = queries; this.updates = updates; } @Override public void queryResult(List<String> columns, List<List<Object>> rows, String query, Object... args) { System.out.println("query " + query + " returned " + columns); for (List<Object> row : rows) { System.out.println("\t" + row); } queries.incrementAndGet(); } @Override public void queryThrown(Throwable t, String query, Object... args) { throw Jvm.rethrow(t); } @Override public void updateResult(long count, String update, Object... args) { updates.incrementAndGet(); } @Override public void updateThrown(Throwable t, String update, Object... args) { throw Jvm.rethrow(t); } }
[ "peter.lawrey@higherfrequencytrading.com" ]
peter.lawrey@higherfrequencytrading.com
3e37e7a2b23ff6157e636e98f2730f8febf44efb
81eb1e9c7ba1b2c45611d82e06cb2fc147b90e45
/src/main/java/com/linjingc/cxfdemo/consume/CxfClient.java
5c33cfcf71be32a895be290609199779237d6c2d
[]
no_license
AsummerCat/cxf-demo
ec3ce57cf30c778887dddff69694c2315b63a0c0
6c85191289cb499c79dfa195b151177acd9afd21
refs/heads/master
2020-09-05T15:14:37.027148
2019-11-07T05:54:42
2019-11-07T05:54:42
220,141,174
0
0
null
null
null
null
UTF-8
Java
false
false
1,917
java
package com.linjingc.cxfdemo.consume; import com.linjingc.cxfdemo.webservice.IssueService; import org.apache.cxf.endpoint.Client; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; public class CxfClient { public static void main(String[] args) { cl2(); } /** * 方式1.代理类工厂的方式,需要拿到对方的接口 */ public static void cl1() { try { // 接口地址 String address = "http://localhost:8080/services/IssueService?wsdl"; // 代理工厂 JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean(); // 设置代理地址 jaxWsProxyFactoryBean.setAddress(address); // 设置接口类型 jaxWsProxyFactoryBean.setServiceClass(IssueService.class); //添加用户名密码拦截器 jaxWsProxyFactoryBean.getOutInterceptors().add(new LoginInterceptor("root","admin")); // 创建一个代理接口实现 IssueService cs = (IssueService) jaxWsProxyFactoryBean.create(); // 数据准备 String userName = "测试名成功1"; // 调用代理接口的方法调用并返回结果 String result = cs.hello(userName); System.out.println("返回结果:" + result); } catch (Exception e) { e.printStackTrace(); } } /** * 动态调用方式 */ public static void cl2() { // 创建动态客户端 JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); Client client = dcf.createClient("http://localhost:8080/services/IssueService?wsdl"); // 需要密码的情况需要加上用户名和密码 client.getOutInterceptors().add(new LoginInterceptor("root", "admin")); try { // invoke("方法名",参数1,参数2,参数3....); Object[] objects = client.invoke("hello", "测试名成功2"); System.out.println("返回数据:" + objects[0]); } catch (java.lang.Exception e) { e.printStackTrace(); } } }
[ "583188551@qq.com" ]
583188551@qq.com
990a8022d493e1ff2e2d0075b3af693a78f9ff69
732182a102a07211f7c1106a1b8f409323e607e0
/gsd/beans/map/msg/AttackResult.java
da454512dae29ee2cb6567c44a8359157424a84e
[]
no_license
BanyLee/QYZ_Server
a67df7e7b4ec021d0aaa41cfc7f3bd8c7f1af3da
0eeb0eb70e9e9a1a06306ba4f08267af142957de
refs/heads/master
2021-09-13T22:32:27.563172
2018-05-05T09:20:55
2018-05-05T09:20:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,026
java
package map.msg; import com.goldhuman.Common.Marshal.Marshal; import com.goldhuman.Common.Marshal.OctetsStream; import com.goldhuman.Common.Marshal.MarshalException; public class AttackResult implements Marshal , Comparable<AttackResult>{ public long defencerid; public byte ismiss; public byte iscrit; public byte isexcellent; public byte islucky; public int attack; public int hp; public AttackResult() { } public AttackResult(long _defencerid_, byte _ismiss_, byte _iscrit_, byte _isexcellent_, byte _islucky_, int _attack_, int _hp_) { this.defencerid = _defencerid_; this.ismiss = _ismiss_; this.iscrit = _iscrit_; this.isexcellent = _isexcellent_; this.islucky = _islucky_; this.attack = _attack_; this.hp = _hp_; } public final boolean _validator_() { return true; } public OctetsStream marshal(OctetsStream _os_) { _os_.marshal(defencerid); _os_.marshal(ismiss); _os_.marshal(iscrit); _os_.marshal(isexcellent); _os_.marshal(islucky); _os_.marshal(attack); _os_.marshal(hp); return _os_; } public OctetsStream unmarshal(OctetsStream _os_) throws MarshalException { defencerid = _os_.unmarshal_long(); ismiss = _os_.unmarshal_byte(); iscrit = _os_.unmarshal_byte(); isexcellent = _os_.unmarshal_byte(); islucky = _os_.unmarshal_byte(); attack = _os_.unmarshal_int(); hp = _os_.unmarshal_int(); return _os_; } public boolean equals(Object _o1_) { if (_o1_ == this) return true; if (_o1_ instanceof AttackResult) { AttackResult _o_ = (AttackResult)_o1_; if (defencerid != _o_.defencerid) return false; if (ismiss != _o_.ismiss) return false; if (iscrit != _o_.iscrit) return false; if (isexcellent != _o_.isexcellent) return false; if (islucky != _o_.islucky) return false; if (attack != _o_.attack) return false; if (hp != _o_.hp) return false; return true; } return false; } public int hashCode() { int _h_ = 0; _h_ += (int)defencerid; _h_ += (int)ismiss; _h_ += (int)iscrit; _h_ += (int)isexcellent; _h_ += (int)islucky; _h_ += attack; _h_ += hp; return _h_; } public String toString() { StringBuilder _sb_ = new StringBuilder(); _sb_.append("("); _sb_.append(defencerid).append(","); _sb_.append(ismiss).append(","); _sb_.append(iscrit).append(","); _sb_.append(isexcellent).append(","); _sb_.append(islucky).append(","); _sb_.append(attack).append(","); _sb_.append(hp).append(","); _sb_.append(")"); return _sb_.toString(); } public int compareTo(AttackResult _o_) { if (_o_ == this) return 0; int _c_ = 0; _c_ = Long.signum(defencerid - _o_.defencerid); if (0 != _c_) return _c_; _c_ = ismiss - _o_.ismiss; if (0 != _c_) return _c_; _c_ = iscrit - _o_.iscrit; if (0 != _c_) return _c_; _c_ = isexcellent - _o_.isexcellent; if (0 != _c_) return _c_; _c_ = islucky - _o_.islucky; if (0 != _c_) return _c_; _c_ = attack - _o_.attack; if (0 != _c_) return _c_; _c_ = hp - _o_.hp; if (0 != _c_) return _c_; return _c_; } }
[ "hadowhadow@gmail.com" ]
hadowhadow@gmail.com
90dfc9548d3cc0b4762b68d62e7c93c81fb195fb
97b46ff38b675d934948ff3731cf1607a1cc0fc9
/Server/java/pk/elfo/gameserver/fence/ExColosseumFenceInfoPacket.java
f3e1c94e114d868ef71b3ca5f8a3b982a46a52de
[]
no_license
l2brutal/pk-elfo_H5
a6703d734111e687ad2f1b2ebae769e071a911a4
766fa2a92cb3dcde5da6e68a7f3d41603b9c037e
refs/heads/master
2020-12-28T13:33:46.142303
2016-01-20T09:53:10
2016-01-20T09:53:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
792
java
package pk.elfo.gameserver.fence; import pk.elfo.gameserver.network.serverpackets.L2GameServerPacket; public class ExColosseumFenceInfoPacket extends L2GameServerPacket { private final int _type; private final L2FenceInstance _activeChar; private final int _width; private final int _height; public ExColosseumFenceInfoPacket(L2FenceInstance activeChar) { _activeChar = activeChar; _type = activeChar.getType(); _width = activeChar.getWidth(); _height = activeChar.getHeight(); } @Override protected void writeImpl() { writeC(0xfe); writeH(0x03); writeD(_activeChar.getObjectId()); writeD(_type); writeD(_activeChar.getX()); writeD(_activeChar.getY()); writeD(_activeChar.getZ()); writeD(_width); writeD(_height); } }
[ "PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba" ]
PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba
9e2fdcbc49c2fb4e1fccc1633e3bf2c3dd85897b
e774de0a5e1a542f1edd33280315a17c973bd047
/kitty-common/src/main/java/com/cxytiandi/kitty/common/alarm/AlarmTypeEnum.java
848e90c6d76c13bdd8e11f2b250e01f08d548925
[]
no_license
yaoqi/kitty
bb46c2b2bd94e9c3cc491abcf3749320fa69bf16
b30f8012675233011ffc676a997af32e32fd0d7b
refs/heads/master
2022-12-31T08:30:49.508385
2020-10-27T04:59:44
2020-10-27T04:59:44
302,558,856
0
1
null
2020-10-27T04:59:45
2020-10-09T06:56:29
Java
UTF-8
Java
false
false
573
java
package com.cxytiandi.kitty.common.alarm; /** * 告警类型 * * @作者 尹吉欢 * @个人微信 jihuan900 * @微信公众号 猿天地 * @GitHub https://github.com/yinjihuan * @作者介绍 http://cxytiandi.com/about * @时间 2020-05-26 21:19 */ public enum AlarmTypeEnum { /** * 钉钉 */ DING_TALK("DingTalk"), /** * 外部系统 */ EXTERNAL_SYSTEM("ExternalSystem"); AlarmTypeEnum(String type) { this.type = type; }; private String type; public String getType() { return type; } }
[ "jihuan.yin@ipiaoniu.com" ]
jihuan.yin@ipiaoniu.com
0430a452eb96dab047f314e0b67875ee90304b48
070fed1046c89c95108d08e5d66f285c7eb8bc4e
/src/com/leetcode/medium/CheckKnightTourConfiguration.java
8d7682f7d5c04e12c987bbeedef7d482860dfba3
[]
no_license
Nayanava/algorithms_in_java
275c556794c8f0337fb6f6b56317ac47c0402956
e9470c04db62326a4105f6dc2415894b3afcd928
refs/heads/master
2023-04-27T19:15:51.336857
2023-04-25T11:13:49
2023-04-25T11:13:49
216,827,669
0
0
null
null
null
null
UTF-8
Java
false
false
1,552
java
package com.leetcode.medium; /** * @author nayanava */ import java.io.*; import java.util.LinkedList; import java.util.Queue; public class CheckKnightTourConfiguration { private int[] row = {-2, -2, 2, 2, 1, 1, -1, -1}; private int[] col = {-1, 1, -1, 1, -2, 2, -2, 2}; public boolean checkValidGrid(int[][] grid) { if(grid[0][0] != 0) { return false; } Queue<int[]> q = new LinkedList<>(); q.offer(new int[]{0, 0}); int next = 0; while(!q.isEmpty()) { int[] position = q.poll(); next += 1; boolean hasValidMove = false; for(int i = 0; i < 8; i++) { int nextRow = position[0] + row[i]; int nextCol = position[1] + col[i]; if(isValidPosition(nextRow, nextCol, grid, next)) { hasValidMove = true; q.offer(new int[] {nextRow, nextCol}); break; } } if(!hasValidMove) { return false; } } return true; } private boolean isValidPosition(int row, int col, int[][] grid, int next) { return row >= 0 && row < grid.length && col >= 0 && col < grid[0].length && grid[row][col] == next; } public static void main(String[] args) { int[][] mat = {{0,11,16,5,20},{17,4,19,10,15},{12,1,8,21,6},{3,18,23,14,9},{24,13,2,7,22}}; System.out.println(new CheckKnightTourConfiguration().checkValidGrid(mat)); } }
[ "nayanava.de01@gmail.com" ]
nayanava.de01@gmail.com
0c5a5250025efbfd5122a6cb2f43a5b8b02c0e1e
5c23d6703e3dbfae406315a8fe9dee997e6ec8b6
/jhs-loan-service/src/main/java/com/jhh/jhs/loan/entity/HaierPayVo.java
3da949f7ad7ebe752f28e148470439dbee1697c2
[]
no_license
soldiers1989/loan-uhs
1dc4e766fce56ca21bc34e5a5b060eaf7116a8b0
77b06a67651898c4f1734e6c323becd0df639c22
refs/heads/master
2020-03-28T09:27:29.670311
2018-06-12T07:53:52
2018-06-12T07:53:52
148,038,503
0
1
null
null
null
null
UTF-8
Java
false
false
1,384
java
package com.jhh.jhs.loan.entity; import lombok.Getter; import lombok.Setter; import lombok.ToString; /** * 海尔代扣请求参数 */ @Setter @Getter @ToString public class HaierPayVo { /** *平台(商户)订单号 */ private String out_trade_no; /** *银行卡账户名 */ private String bank_account_name; /** * 银行卡号 */ private String bank_card_no; /** * 银行编码 */ private String bank_code; /** * 银行名称 */ private String bank_name; /** * 交易金额 */ private String amount; /** * 币种 */ // private String currency; /** * 代扣授权号 */ // private String authorize_no; /** * 入款快捷通会员标识类型 */ // private String payee_identity_type; /** * 出款账号 */ private String payer_identity; /** * 分润账号集 */ // private String royalty_info; /** * 业务产品码10221-付款到卡 */ private String biz_product_code; /** * 支付产品码14-付款到银行卡(对私) 15-付款到银行卡(对私) */ private String pay_product_code; /** * 手机号码 */ // private String phone_num; /** * 服务器异步通知地址 */ private String notify_url; }
[ "xingmin@jinhuhang.com.cn" ]
xingmin@jinhuhang.com.cn
0afd0faecda4d0b421501728ce957297f09a7c39
75c4712ae3f946db0c9196ee8307748231487e4b
/src/main/java/com/alipay/api/domain/AdPlan.java
9b8247c5597be733963b6580a5492aa57af806a7
[ "Apache-2.0" ]
permissive
yuanbaoMarvin/alipay-sdk-java-all
70a72a969f464d79c79d09af8b6b01fa177ac1be
25f3003d820dbd0b73739d8e32a6093468d9ed92
refs/heads/master
2023-06-03T16:54:25.138471
2021-06-25T14:48:21
2021-06-25T14:48:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,193
java
package com.alipay.api.domain; import java.util.Date; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 计划单元详情 * * @author auto create * @since 1.0, 2018-09-18 21:52:42 */ public class AdPlan extends AlipayObject { private static final long serialVersionUID = 4258537573739644443L; /** * 注册用户返回的用户ID */ @ApiField("ad_user_id") private Long adUserId; /** * 广告投放预算,单位:分 */ @ApiField("budget") private Long budget; /** * 投放计划结束时间 */ @ApiField("end_date") private Date endDate; /** * 计划中所属单元列表 */ @ApiField("group_list") private AdGroup groupList; /** * 广告计划ID */ @ApiField("plan_id") private Long planId; /** * 广告计划名称 */ @ApiField("plan_name") private String planName; /** * 计划保量 */ @ApiField("quantity") private Long quantity; /** * 投放计划开始时间 */ @ApiField("start_date") private Date startDate; public Long getAdUserId() { return this.adUserId; } public void setAdUserId(Long adUserId) { this.adUserId = adUserId; } public Long getBudget() { return this.budget; } public void setBudget(Long budget) { this.budget = budget; } public Date getEndDate() { return this.endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } public AdGroup getGroupList() { return this.groupList; } public void setGroupList(AdGroup groupList) { this.groupList = groupList; } public Long getPlanId() { return this.planId; } public void setPlanId(Long planId) { this.planId = planId; } public String getPlanName() { return this.planName; } public void setPlanName(String planName) { this.planName = planName; } public Long getQuantity() { return this.quantity; } public void setQuantity(Long quantity) { this.quantity = quantity; } public Date getStartDate() { return this.startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
f1f717bf50b3d806ee0bcd6405d801ee49d92462
0b56b437df7e51ef6d0a9c754bf33c61b41f00f9
/platform-manager-system-service/src/main/java/com/cms/service/manager/company/subCompanyServiceImpl.java
3c58b2d3214a95c2d9df9d83af4c5461610b4afa
[]
no_license
szdksconan/cms
5374d827f61ebf062f8e7bb3f4c0a791c9b601f7
a1a4e2459d88b2ccfc3e3e09a64d7b8822927ae2
refs/heads/master
2021-01-25T06:30:19.078300
2017-06-07T02:28:52
2017-06-07T02:28:52
93,583,136
0
0
null
null
null
null
UTF-8
Java
false
false
1,990
java
package com.cms.service.manager.company; import com.alibaba.fastjson.JSONObject; import com.cms.iservice.manager.company.subCompanyService; import com.cms.model.manager.Tree; import com.cms.model.manager.subCompanyBean; import com.cms.dao.manager.company.subCompanyDao; import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; import java.util.List; public class subCompanyServiceImpl implements subCompanyService { @Autowired private subCompanyDao subCompanyDao; public subCompanyBean getInfo(subCompanyBean bean) { return this.subCompanyDao.getInfo(bean); } public List<subCompanyBean> treeGrid() { return this.subCompanyDao.dataGrid(); } public void add(subCompanyBean subCompanyBean)throws Exception { this.subCompanyDao.add(subCompanyBean); } public void delete(Long id) throws Exception { JSONObject obj = new JSONObject(); obj.put("id", id); obj.put("subcompanyId", id); if (this.subCompanyDao.getRelationDataRole(obj).size()>0){ throw new Exception("不能删除此网点,因为它还在被使用!"); } this.subCompanyDao.delete(obj); } public subCompanyBean get(Long id) { JSONObject obj = new JSONObject(); obj.put("id", id); return this.subCompanyDao.get(id); } public void update(subCompanyBean subCompanyBean)throws Exception { this.subCompanyDao.update(subCompanyBean); } public List<Tree> tree() { List<subCompanyBean> beanList = this.subCompanyDao.dataGrid(); return this.buildTree(beanList); } /** * 树类型转换 * @param beanList * @return */ private List<Tree> buildTree(List<subCompanyBean> beanList){ List<Tree> treeList = new ArrayList<Tree>(); if (beanList != null && beanList.size() != 0){ for (subCompanyBean bean : beanList){ Tree tree = new Tree(); tree.setId(bean.getId()); if (bean.getPid()!=null) { tree.setPid(bean.getPid()); } tree.setText(bean.getName()); treeList.add(tree); } } return treeList; } }
[ "szdksconan@hotmail.com" ]
szdksconan@hotmail.com
282e6958404697911ca80442ff7d5a5c5440c2a7
d31e9bc9b78f6ec36ec23779276e9365aa2b52e1
/zhy-frame-demo/zhy-demo-profile/src/main/java/com/zhy/frame/profile/entity/Address.java
bfed6d13d36079a25511965d20d5c2ee672f8720
[]
no_license
radtek/zhy-frame-parent
f5f04b1392f1429a079281336d266692645aa2f5
05d5a0bb64fec915e027078313163822d849476c
refs/heads/master
2022-12-27T22:27:12.682705
2020-07-27T02:58:46
2020-07-27T02:58:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
670
java
package com.zhy.frame.profile.entity;/** * 描述: * 包名:com.zhy.mysql.subdb.entity * 版本信息: 版本1.0 * 日期:2019/9/10 * Copyright XXXXXX科技有限公司 */ import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; import lombok.Data; import java.util.Date; /** * @describe: * @author: lvmoney/XXXXXX科技有限公司 * @version:v1.0 2019/9/10 15:29 */ @Data @TableName("t_address") public class Address extends Model<Address> { private String id; private String code; private String name; private String pid; private Integer type; private Integer lit; }
[ "xmangl1990728" ]
xmangl1990728
da874cfb36a0242cd7becd490a1817f8dde29805
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-baas/src/main/java/com/aliyuncs/baas/transform/v20181221/DescribeAntChainAccountsV2ResponseUnmarshaller.java
5ee011a4973b47d0f745d329912fcb1b5fce0daf
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
3,644
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.baas.transform.v20181221; import java.util.ArrayList; import java.util.List; import com.aliyuncs.baas.model.v20181221.DescribeAntChainAccountsV2Response; import com.aliyuncs.baas.model.v20181221.DescribeAntChainAccountsV2Response.Result; import com.aliyuncs.baas.model.v20181221.DescribeAntChainAccountsV2Response.Result.AccountsItem; import com.aliyuncs.baas.model.v20181221.DescribeAntChainAccountsV2Response.Result.Pagination; import com.aliyuncs.transform.UnmarshallerContext; public class DescribeAntChainAccountsV2ResponseUnmarshaller { public static DescribeAntChainAccountsV2Response unmarshall(DescribeAntChainAccountsV2Response describeAntChainAccountsV2Response, UnmarshallerContext _ctx) { describeAntChainAccountsV2Response.setRequestId(_ctx.stringValue("DescribeAntChainAccountsV2Response.RequestId")); describeAntChainAccountsV2Response.setHttpStatusCode(_ctx.stringValue("DescribeAntChainAccountsV2Response.HttpStatusCode")); describeAntChainAccountsV2Response.setSuccess(_ctx.booleanValue("DescribeAntChainAccountsV2Response.Success")); describeAntChainAccountsV2Response.setResultMessage(_ctx.stringValue("DescribeAntChainAccountsV2Response.ResultMessage")); describeAntChainAccountsV2Response.setCode(_ctx.stringValue("DescribeAntChainAccountsV2Response.Code")); describeAntChainAccountsV2Response.setMessage(_ctx.stringValue("DescribeAntChainAccountsV2Response.Message")); describeAntChainAccountsV2Response.setResultCode(_ctx.stringValue("DescribeAntChainAccountsV2Response.ResultCode")); Result result = new Result(); Pagination pagination = new Pagination(); pagination.setPageSize(_ctx.integerValue("DescribeAntChainAccountsV2Response.Result.Pagination.PageSize")); pagination.setPageNumber(_ctx.integerValue("DescribeAntChainAccountsV2Response.Result.Pagination.PageNumber")); pagination.setTotalCount(_ctx.integerValue("DescribeAntChainAccountsV2Response.Result.Pagination.TotalCount")); result.setPagination(pagination); List<AccountsItem> accounts = new ArrayList<AccountsItem>(); for (int i = 0; i < _ctx.lengthValue("DescribeAntChainAccountsV2Response.Result.Accounts.Length"); i++) { AccountsItem accountsItem = new AccountsItem(); accountsItem.setAccountPublicKey(_ctx.stringValue("DescribeAntChainAccountsV2Response.Result.Accounts["+ i +"].AccountPublicKey")); accountsItem.setAccount(_ctx.stringValue("DescribeAntChainAccountsV2Response.Result.Accounts["+ i +"].Account")); accountsItem.setAccountRecoveryKey(_ctx.stringValue("DescribeAntChainAccountsV2Response.Result.Accounts["+ i +"].AccountRecoveryKey")); accountsItem.setAccountStatus(_ctx.stringValue("DescribeAntChainAccountsV2Response.Result.Accounts["+ i +"].AccountStatus")); accountsItem.setAntChainId(_ctx.stringValue("DescribeAntChainAccountsV2Response.Result.Accounts["+ i +"].AntChainId")); accounts.add(accountsItem); } result.setAccounts(accounts); describeAntChainAccountsV2Response.setResult(result); return describeAntChainAccountsV2Response; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
3191dd5bb38d1fbd649c89077fd02635b68491ad
58df55b0daff8c1892c00369f02bf4bf41804576
/src/cvq.java
51fc006ab14c97e54da9882afa32d677273cadd9
[]
no_license
gafesinremedio/com.google.android.gm
0b0689f869a2a1161535b19c77b4b520af295174
278118754ea2a262fd3b5960ef9780c658b1ce7b
refs/heads/master
2020-05-04T15:52:52.660697
2016-07-21T03:39:17
2016-07-21T03:39:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
407
java
import android.os.Bundle; public final class cvq extends cvp { private final Bundle a; public cvq(String[] paramArrayOfString, int paramInt, Bundle paramBundle) { super(paramArrayOfString, paramInt); a = paramBundle; } public final Bundle getExtras() { return a; } } /* Location: * Qualified Name: cvq * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
293ba90a164158d4d2b4818a97c28bf47b17e485
e9466a0d2020c5293b48ca615a98d59500fca730
/generatedCode/digitalbuildings-RDF4J-java/src/main/java/www/google/com/digitalbuildings/_0_0_1/subfields/Alarm.java
4385734542f5ea0b44bcaddfaf4c117638f9dd7b
[]
no_license
charbull/OLGA-GeneratedCode-DigitalBuildingsOntology
fa9dafd4111f80b171810cebc9385d5171b3ec56
bf7018f4dd621f5463b3da67da41783caba3a4fb
refs/heads/master
2022-11-22T07:55:00.842988
2020-07-20T21:38:04
2020-07-20T21:38:04
281,220,093
1
0
null
2020-07-20T21:38:06
2020-07-20T20:33:52
Java
UTF-8
Java
false
false
1,167
java
package www.google.com.digitalbuildings._0_0_1.subfields; import digitalbuildings.global.util.GLOBAL; import org.eclipse.rdf4j.model.IRI; import org.eclipse.rdf4j.model.vocabulary.RDF; import java.util.HashSet; import java.util.Set; import java.util.stream.Collectors; /** * Class Alarm * Signal that an alarm is present. */ @SuppressWarnings("serial") public class Alarm extends www.google.com.digitalbuildings._0_0_1.subfields.Measurement_descriptor implements IAlarm{ IRI newInstance; public Alarm(String namespace, String instanceId) { super(namespace, instanceId); newInstance = GLOBAL.factory.createIRI(namespace, instanceId); GLOBAL.model.add(this, RDF.TYPE, GLOBAL.factory.createIRI("http://www.google.com/digitalbuildings/0.0.1/subfields#Alarm")); } public IRI iri() { return newInstance; } public static Set<IAlarm> getAllAlarmsObjectsCreated(){ Set<IAlarm> objects = new HashSet<>(); objects = GLOBAL.model.filter(null, RDF.TYPE, GLOBAL.factory .createIRI("http://www.google.com/digitalbuildings/0.0.1/subfields#Alarm")).subjects().stream() .map(mapper->(IAlarm)mapper) .collect(Collectors.toSet()); return objects; } }
[ "charbel.kaed@outlook.com" ]
charbel.kaed@outlook.com
a03b2495f765247ab1b9f37cbafc3d980bee6dd4
fd49852c3426acf214b390c33927b5a30aeb0e0a
/aosp/javalib/android/content/pm/ApplicationInfoProto.java
0002fe87a2df7235d6e3a9407945ab6ae6621bcd
[]
no_license
HanChangHun/MobilePlus-Prototype
fb72a49d4caa04bce6edb4bc060123c238a6a94e
3047c44a0a2859bf597870b9bf295cf321358de7
refs/heads/main
2023-06-10T19:51:23.186241
2021-06-26T08:28:58
2021-06-26T08:28:58
333,411,414
0
0
null
null
null
null
UTF-8
Java
false
false
3,003
java
package android.content.pm; public final class ApplicationInfoProto { public static final long CLASS_LOADER_NAME = 1138166333454L; public static final long DATA_DIR = 1138166333453L; public static final long DETAIL = 1146756268049L; public static final long FLAGS = 1120986464261L; public static final long PACKAGE = 1146756268033L; public static final long PERMISSION = 1138166333442L; public static final long PRIVATE_FLAGS = 1120986464262L; public static final long PROCESS_NAME = 1138166333443L; public static final long PUBLIC_SOURCE_DIR = 1138166333449L; public static final long RESOURCE_DIRS = 2237677961228L; public static final long SOURCE_DIR = 1138166333448L; public static final long SPLIT_CLASS_LOADER_NAMES = 2237677961231L; public static final long SPLIT_PUBLIC_SOURCE_DIRS = 2237677961227L; public static final long SPLIT_SOURCE_DIRS = 2237677961226L; public static final long THEME = 1120986464263L; public static final long UID = 1120986464260L; public static final long VERSION = 1146756268048L; public final class Detail { public static final long CATEGORY = 1120986464274L; public static final long CLASS_NAME = 1138166333441L; public static final long COMPATIBLE_WIDTH_LIMIT_DP = 1120986464260L; public static final long CONTENT = 1138166333455L; public static final long CREDENTIAL_PROTECTED_DATA_DIR = 1138166333449L; public static final long DESCRIPTION_RES = 1120986464268L; public static final long DEVICE_PROTECTED_DATA_DIR = 1138166333448L; public static final long ENABLE_GWP_ASAN = 1120986464275L; public static final long IS_FULL_BACKUP = 1133871366160L; public static final long LARGEST_WIDTH_LIMIT_DP = 1120986464261L; public static final long MANAGE_SPACE_ACTIVITY_NAME = 1138166333451L; public static final long NETWORK_SECURITY_CONFIG_RES = 1120986464273L; public static final long REQUIRES_SMALLEST_WIDTH_DP = 1120986464259L; public static final long SEINFO = 1138166333446L; public static final long SEINFO_USER = 1138166333447L; public static final long SHARED_LIBRARY_FILES = 2237677961226L; public static final long SUPPORTS_RTL = 1133871366158L; public static final long TASK_AFFINITY = 1138166333442L; public static final long UI_OPTIONS = 1120986464269L; } public final class Version { public static final long ENABLED = 1133871366145L; public static final long MIN_SDK_VERSION = 1120986464258L; public static final long TARGET_SANDBOX_VERSION = 1120986464261L; public static final long TARGET_SDK_VERSION = 1120986464259L; public static final long VERSION_CODE = 1120986464260L; } } /* Location: /home/chun/Desktop/temp/!/android/content/pm/ApplicationInfoProto.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "ehwjs1914@naver.com" ]
ehwjs1914@naver.com
f1032a1a002530865a44c2441553250b25ace454
06805c72d9c96f5fbe5ebb80610c236100b48b75
/Mage.Client/src/main/java/mage/client/chat/ChatPanelSeparated.java
bce6a7b7a1f014e2611848826976e1edc33c931e
[]
no_license
kodemage/mage
0e716f6068e8cf574b0acd934616983f7700c791
1fcd26fc60b55597d0d20658308b7128e10806af
refs/heads/master
2020-12-03T06:43:01.791506
2016-04-25T22:59:03
2016-04-25T22:59:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,738
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ package mage.client.chat; import java.awt.Font; import static mage.client.chat.ChatPanelBasic.TIMESTAMP_COLOR; import mage.client.components.ColorPane; import mage.client.util.GUISizeHelper; import mage.view.ChatMessage; import org.mage.card.arcane.ManaSymbols; /** * * @author LevelX2 */ public class ChatPanelSeparated extends ChatPanelBasic { private ColorPane systemMessagesPane = null; /** * Display message in the chat. Use different colors for timestamp, username * and message. * * @param username message sender * @param message message itself * @param time timestamp * @param messageType * @param color Preferred color. Not used. */ @Override public void receiveMessage(String username, String message, String time, ChatMessage.MessageType messageType, ChatMessage.MessageColor color) { switch (messageType) { case TALK: case WHISPER: case USER_INFO: super.receiveMessage(username, message, time, messageType, color); return; } StringBuilder text = new StringBuilder(); if (time != null) { text.append(getColoredText(TIMESTAMP_COLOR, time + ": ")); } String userColor; String textColor; String userSeparator = " "; switch (messageType) { case STATUS: // a message to all chat user textColor = STATUS_COLOR; userColor = STATUS_COLOR; break; case USER_INFO: // a personal message textColor = USER_INFO_COLOR; userColor = USER_INFO_COLOR; break; default: if (parentChatRef != null) { userColor = parentChatRef.session.getUserName().equals(username) ? MY_COLOR : OPPONENT_COLOR; } else { userColor = session.getUserName().equals(username) ? MY_COLOR : OPPONENT_COLOR; } textColor = MESSAGE_COLOR; userSeparator = ": "; } if (color.equals(ChatMessage.MessageColor.ORANGE)) { textColor = "Orange"; } if (color.equals(ChatMessage.MessageColor.YELLOW)) { textColor = "Yellow"; } if (username != null && !username.isEmpty()) { text.append(getColoredText(userColor, username + userSeparator)); } text.append(getColoredText(textColor, ManaSymbols.replaceSymbolsWithHTML(message, ManaSymbols.Type.CHAT))); this.systemMessagesPane.append(text.toString()); } public ColorPane getSystemMessagesPane() { return systemMessagesPane; } public void setSystemMessagesPane(ColorPane systemMessagesPane) { this.systemMessagesPane = systemMessagesPane; changeGUISize(GUISizeHelper.chatFont); } @Override public void changeGUISize(Font font) { if (systemMessagesPane != null) { systemMessagesPane.setFont(font); } super.changeGUISize(font); } }
[ "fenhl@fenhl.net" ]
fenhl@fenhl.net
b0e3693e74032037b6d335f7dc844ff1043ea473
6c7e279a45b37d597297f999d5ee0c5adde8a29e
/src/main/java/com/alipay/api/response/AlipayOpenPublicQrcodeCreateResponse.java
bcece8aa7e69da2bbea81b3f8f2ad3eea999d871
[]
no_license
tomowork/alipay-sdk-java
a09fffb8a48c41561b36b903c87bdf5e881451f6
387489e4a326c27a7b9fb6d38ee0b33aa1a3568f
refs/heads/master
2021-01-18T03:55:00.944718
2017-03-22T03:52:16
2017-03-22T03:59:16
85,776,800
1
2
null
2017-03-22T03:59:18
2017-03-22T02:37:45
Java
UTF-8
Java
false
false
946
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.public.qrcode.create response. * * @author auto create * @since 1.0, 2016-12-08 11:59:38 */ public class AlipayOpenPublicQrcodeCreateResponse extends AlipayResponse { private static final long serialVersionUID = 6652776663576256461L; /** * 二维码图片地址,可跳转到实际图片 */ @ApiField("code_img") private String codeImg; /** * 二维码有效时间,单位(秒)。永久码暂时忽略该信息 */ @ApiField("expire_second") private String expireSecond; public void setCodeImg(String codeImg) { this.codeImg = codeImg; } public String getCodeImg( ) { return this.codeImg; } public void setExpireSecond(String expireSecond) { this.expireSecond = expireSecond; } public String getExpireSecond( ) { return this.expireSecond; } }
[ "zlei.huang@tomowork.com" ]
zlei.huang@tomowork.com
bbc4d74ded8abd6a0306bc3790dc5f992f9b8a31
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/console/p845a/C9253j.java
a15de19d8edbd4d4c07b47fa669c68e97325be8e
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,352
java
package com.tencent.p177mm.console.p845a; import android.content.Context; import android.graphics.Typeface; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.widget.TextView; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.p177mm.C25738R; import com.tencent.p177mm.loader.BuildConfig; import com.tencent.p177mm.p612ui.base.C30379h; import com.tencent.p177mm.plugin.websearch.api.C46400aa; import com.tencent.p177mm.pluginsdk.cmd.C44041a; import com.tencent.p177mm.pluginsdk.cmd.C44042b; import com.tencent.p177mm.protocal.C7243d; import com.tencent.p177mm.sdk.platformtools.C4990ab; import com.tencent.p177mm.sdk.platformtools.C5046bo; import com.tencent.p177mm.sdk.platformtools.C5049br; import com.tencent.p177mm.sdk.platformtools.C5058f; import com.tencent.p177mm.sdk.platformtools.C5059g; import com.tencent.smtt.sdk.WebView; import java.util.Map; /* renamed from: com.tencent.mm.console.a.j */ public final class C9253j implements C44041a { static { AppMethodBeat.m2504i(16143); C44042b.m79163a(new C9253j(), "//version"); AppMethodBeat.m2505o(16143); } public static void init() { } /* renamed from: a */ public final boolean mo7165a(Context context, String[] strArr, String str) { int i; AppMethodBeat.m2504i(16142); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(String.format("[ver ] %s %08X\n", new Object[]{C5059g.m7673d(context, C7243d.vxo, true), Integer.valueOf(C7243d.vxo)})); stringBuilder.append(C5058f.aZm()); stringBuilder.append(String.format("[cid ] %d\n", new Object[]{Integer.valueOf(C5059g.cdf)})); stringBuilder.append(String.format("[s.ver] %d\n", new Object[]{Integer.valueOf(C46400aa.m87305HV(0))})); stringBuilder.append(String.format("[r.ver] %s\n", new Object[]{BuildConfig.CLIENT_VERSION})); if (C5058f.EX_DEVICE_LOGIN) { try { Map z = C5049br.m7595z(C5046bo.convertStreamToString(context.getAssets().open("merged_features.xml")), "merged"); if (z != null) { i = 0; while (true) { if (((String) z.get(".merged.feature" + (i > 0 ? String.valueOf(i) : ""))) == null) { break; } stringBuilder.append(String.format("[feature#%02d] %s\n", new Object[]{Integer.valueOf(i), (String) z.get(".merged.feature" + (i > 0 ? String.valueOf(i) : ""))})); i++; } } } catch (Exception e) { C4990ab.printErrStackTrace("MicroMsg.Version", e, "", new Object[0]); } } View textView = new TextView(context); textView.setText(stringBuilder); textView.setGravity(19); textView.setTextSize(1, 10.0f); textView.setLayoutParams(new LayoutParams(-1, -2)); textView.setTextColor(WebView.NIGHT_MODE_COLOR); textView.setTypeface(Typeface.MONOSPACE); i = context.getResources().getDimensionPixelSize(C25738R.dimen.f9948l5); textView.setPadding(i, i, i, i); C30379h.m48435a(context, null, textView, null); AppMethodBeat.m2505o(16142); return true; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
43ee2ad027124ea4ad88bb64bc89a1452ba3e28c
7717eab4e88aebea7c3bf1501f692a89c8e2edb3
/src/main/scala/com/builtbroken/mc/prefab/gui/components/CallbackGuiArray.java
6bfa30126dca270e657ec03271f354eb2b8ebd9e
[]
no_license
VoltzEngine-Project/Prefabs
9c35f605a9aeb4e101fd77e8d914ce76d222504f
23af8fe25acca8600e21b7f78866b038c5961b06
refs/heads/master
2021-01-18T16:43:03.518566
2018-06-30T04:42:44
2018-06-30T04:42:44
86,757,351
0
0
null
null
null
null
UTF-8
Java
false
false
1,078
java
package com.builtbroken.mc.prefab.gui.components; import com.builtbroken.mc.prefab.gui.GuiButton2; /** * @see <a href="https://github.com/BuiltBrokenModding/VoltzEngine/blob/development/license.md">License</a> for what you can and can't do with the code. * Created by Dark(DarkGuardsman, Robert) on 4/25/2017. */ public abstract class CallbackGuiArray { public String getEntryName(int index) { return "Entry[" + index + "]"; } public boolean isEnabled(int index) { return true; } public void onPressed(int index) { } protected GuiComponent newEntry(int index, int buttonID, int x, int y) { return new GuiButton2(buttonID, x, y, getEntryWidth(), getEntryHeight(), "Entry[" + index + "]"); } protected int getEntryWidth() { return 100; } protected int getEntryHeight() { return 20; } public abstract int getSize(); public void updateEntry(int index, GuiComponent buttonEntry) { buttonEntry.displayString = getEntryName(index); } }
[ "rseifert.phone@gmail.com" ]
rseifert.phone@gmail.com
17c900042796b37deb0d091f11e9bd29222dc500
f6ed03cd319e2e404364630441d0080fef36ae45
/src/br/com/caelum/area/Retangulo.java
3a74526b0c1d2d2b4648ecf06749ebb49cbd9bd4
[]
no_license
raelAndrade/Projeto-OOP
1ca9490ed44da9fd80b5dbbc7565bee3f289fa7c
14b6db5daac5492840bb82a5df0455a9a4f59730
refs/heads/master
2020-03-29T10:06:30.786236
2018-10-11T12:42:35
2018-10-11T12:42:35
149,789,541
0
0
null
null
null
null
UTF-8
Java
false
false
301
java
package br.com.caelum.area; public class Retangulo implements AreaCalculavel { private int largura; private int altura; public Retangulo(int largura, int altura) { this.largura = largura; this.altura = altura; } public double calculaArea() { return this.largura * this.altura; } }
[ "israelg.andrade@bol.com.br" ]
israelg.andrade@bol.com.br
12425343039939638be56bb93239ed968503dbd5
6f1f7f941bc461430b1f323736d9fd66a3c890b4
/src/main/java/info/julang/modulesystem/prescanning/ImportStatement.java
bfe7437bd567cbc8626d972ba21c6620720767aa
[]
no_license
JulianWei/JSE
6b1d08e3b2fd048516d1b826826546a7fa5ac52a
b1391713380d777b7b2281621bca51583a5cca60
refs/heads/master
2022-06-23T12:37:24.293591
2020-05-08T22:33:16
2020-05-08T22:33:16
262,236,461
0
0
null
2020-05-08T05:37:29
2020-05-08T05:37:28
null
UTF-8
Java
false
false
2,325
java
/* MIT License Copyright (c) 2017 Ming Zhou 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 info.julang.modulesystem.prescanning; import info.julang.langspec.ast.JulianParser.Import_statementContext; import info.julang.modulesystem.RequirementInfo; import info.julang.parser.AstInfo; import org.antlr.v4.runtime.tree.TerminalNode; /** * Read the script file and parse the continuous "<code>import ...;</code>" statements. * <p/> * There are two possible syntaxes for import statement, <p/> * either<pre> * <code>import a.b.c;</code></pre> * or <pre> * <code>import a.b.c as xyz;</code></pre> * * @author Ming Zhou */ public class ImportStatement implements PrescanStatement { private AstInfo<Import_statementContext> ainfo; public ImportStatement(AstInfo<Import_statementContext> ainfo){ this.ainfo = ainfo; } // Starts right after the import keyword. @Override public void prescan(RawScriptInfo info) { Import_statementContext importContext = ainfo.getAST(); String fname = importContext.composite_id().getText(); String alias = null; TerminalNode aliasNode = importContext.IDENTIFIER(); if (aliasNode != null) { alias = aliasNode.getText(); } if(!"System".equals(fname)){ info.addRequirement(new RequirementInfo(fname, alias)); } } }
[ "zhoux738@umn.edu" ]
zhoux738@umn.edu
9760fb3bf82210b4b4766e9d800fe656fc9d0d56
4438e0d6d65b9fd8c782d5e13363f3990747fb60
/mobile-dto/src/main/java/com/cencosud/mobile/dto/users/EcommerceSoporteVentaDTO.java
510dff0ddd050421fbffcb293f1b4bf8471f8030
[]
no_license
cencosudweb/mobile
82452af7da189ed6f81637f8ebabea0dbd241b4a
37a3a514b48d09b9dc93e90987715d979e5414b6
refs/heads/master
2021-09-01T21:41:24.713624
2017-12-28T19:34:28
2017-12-28T19:34:28
115,652,291
0
0
null
null
null
null
UTF-8
Java
false
false
4,408
java
/** *@name EcommerceSoporteVentaDTO.java * *@version 1.0 * *@date 07-03-2017 * *@author EA7129 * *@copyright Cencosud. All rights reserved. */ package com.cencosud.mobile.dto.users; import java.io.Serializable; import org.apache.commons.lang.builder.ToStringBuilder; /** * * @description Clase EcommerceSoporteVentaDTO * */ public class EcommerceSoporteVentaDTO implements Serializable { private static final long serialVersionUID = 5468480017252581493L; private Long id; private String numOrden; private int codDesp; private String fecTranTsql; private int numCtlTsl; private int numTerTsl; private int numTraTsql; private int pxq; private int sku; private int loloca; private int estOrden; private int tipoEstadoOc; private int tipVta; private int tipoPag; private int tipoEstado; private int tipoRelacion; public EcommerceSoporteVentaDTO(){} public EcommerceSoporteVentaDTO(Long id){ this.id = id; } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } /** * @return the id */ public Long getId() { return id; } /** * @param id the id to set */ public void setId(Long id) { this.id = id; } /** * @return the numOrden */ public String getNumOrden() { return numOrden; } /** * @param numOrden the numOrden to set */ public void setNumOrden(String numOrden) { this.numOrden = numOrden; } /** * @return the codDesp */ public int getCodDesp() { return codDesp; } /** * @param codDesp the codDesp to set */ public void setCodDesp(int codDesp) { this.codDesp = codDesp; } /** * @return the fecTranTsql */ public String getFecTranTsql() { return fecTranTsql; } /** * @param fecTranTsql the fecTranTsql to set */ public void setFecTranTsql(String fecTranTsql) { this.fecTranTsql = fecTranTsql; } /** * @return the numCtlTsl */ public int getNumCtlTsl() { return numCtlTsl; } /** * @param numCtlTsl the numCtlTsl to set */ public void setNumCtlTsl(int numCtlTsl) { this.numCtlTsl = numCtlTsl; } /** * @return the numTerTsl */ public int getNumTerTsl() { return numTerTsl; } /** * @param numTerTsl the numTerTsl to set */ public void setNumTerTsl(int numTerTsl) { this.numTerTsl = numTerTsl; } /** * @return the numTraTsql */ public int getNumTraTsql() { return numTraTsql; } /** * @param numTraTsql the numTraTsql to set */ public void setNumTraTsql(int numTraTsql) { this.numTraTsql = numTraTsql; } /** * @return the pxq */ public int getPxq() { return pxq; } /** * @param pxq the pxq to set */ public void setPxq(int pxq) { this.pxq = pxq; } /** * @return the sku */ public int getSku() { return sku; } /** * @param sku the sku to set */ public void setSku(int sku) { this.sku = sku; } /** * @return the canVend */ public int getLoloca() { return loloca; } /** * @param canVend the canVend to set */ public void setLoloca(int loloca) { this.loloca = loloca; } /** * @return the estOrden */ public int getEstOrden() { return estOrden; } /** * @param estOrden the estOrden to set */ public void setEstOrden(int estOrden) { this.estOrden = estOrden; } /** * @return the subEstoc */ public int getTipoEstadoOc() { return tipoEstadoOc; } /** * @param subEstoc the subEstoc to set */ public void settTipoEstadoOc(int tipoEstadoOc) { this.tipoEstadoOc = tipoEstadoOc; } /** * @return the tipVta */ public int getTipVta() { return tipVta; } /** * @param tipVta the tipVta to set */ public void setTipVta(int tipVta) { this.tipVta = tipVta; } /** * @return the tipoPag */ public int getTipoPag() { return tipoPag; } /** * @param tipoPag the tipoPag to set */ public void setTipoPag(int tipoPag) { this.tipoPag = tipoPag; } /** * @return the tipoEstado */ public int getTipoEstado() { return tipoEstado; } /** * @param tipoEstado the tipoEstado to set */ public void setTipoEstado(int tipoEstado) { this.tipoEstado = tipoEstado; } /** * @return the tipoRelacion */ public int getTipoRelacion() { return tipoRelacion; } /** * @param tipoRelacion the tipoRelacion to set */ public void setTipoRelacion(int tipoRelacion) { this.tipoRelacion = tipoRelacion; } }
[ "cencosudweb.panel@gmail.com" ]
cencosudweb.panel@gmail.com
dfe6773eedc1720fdcc18af696ebcdef54120cd5
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/openzipkin--zipkin/59f867e6bd28697d003040464c1c5cabb6063ecd/after/ZipkinCassandraStorageAutoConfigurationTest.java
cad2c0ae097c25c009102264bd694a72468fcfa8
[]
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
2,900
java
/** * Copyright 2015-2016 The OpenZipkin Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package zipkin.autoconfigure.storage.cassandra; import org.junit.After; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import zipkin.storage.cassandra.CassandraStorage; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.boot.test.util.EnvironmentTestUtils.addEnvironment; public class ZipkinCassandraStorageAutoConfigurationTest { @Rule public ExpectedException thrown = ExpectedException.none(); AnnotationConfigApplicationContext context; @After public void close() { if (context != null) { context.close(); } } @Test public void doesntProvidesStorageComponent_whenStorageTypeNotCassandra() { context = new AnnotationConfigApplicationContext(); addEnvironment(context, "zipkin.storage.type:elasticsearch"); context.register(PropertyPlaceholderAutoConfiguration.class, ZipkinCassandraStorageAutoConfiguration.class); context.refresh(); thrown.expect(NoSuchBeanDefinitionException.class); context.getBean(CassandraStorage.class); } @Test public void providesStorageComponent_whenStorageTypeCassandra() { context = new AnnotationConfigApplicationContext(); addEnvironment(context, "zipkin.storage.type:cassandra"); context.register(PropertyPlaceholderAutoConfiguration.class, ZipkinCassandraStorageAutoConfiguration.class); context.refresh(); assertThat(context.getBean(CassandraStorage.class)).isNotNull(); } @Test public void canOverridesProperty_contactPoints() { context = new AnnotationConfigApplicationContext(); addEnvironment(context, "zipkin.storage.type:cassandra", "zipkin.storage.cassandra.contact-points:host1,host2" // note snake-case supported ); context.register(PropertyPlaceholderAutoConfiguration.class, ZipkinCassandraStorageAutoConfiguration.class); context.refresh(); assertThat(context.getBean(ZipkinCassandraStorageProperties.class).getContactPoints()) .isEqualTo("host1,host2"); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
e2114de9715a007a4d496554f5196c015789b9a9
4f1e14110fd89d882ead616b7ad0e62d09426bb1
/src/main/java/jvm/oom/JavaHeapSpaceDemo.java
c684e582b5a6ae3fda7dd7a91cb8af71384edd3b
[]
no_license
yankj12/yan-java-deep
d17a3592bfd3b08e05e440e656d43b9b35fcb1a9
9000a7387c487623742e80446a30bdf91801c6ff
refs/heads/master
2021-06-05T12:25:18.787044
2021-03-13T11:12:43
2021-03-13T11:12:43
23,537,905
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
package jvm.oom; /** * * * * JVM参数:-Xmx12m * * * @author Yan * */ public class JavaHeapSpaceDemo { static final int SIZE = 2 * 1024 * 1024; public static void main(String[] a) { int[] i = new int[SIZE]; } }
[ "yankj12@163.com" ]
yankj12@163.com
4e447f49f02f718d781366263525d2ef91d1dc8b
82262cdae859ded0f82346ed04ff0f407b18ea6f
/366pai/zeus-core/core-service/src/main/java/com/_360pai/core/dao/assistant/TPlatformArticleDao.java
4aeb1cb76607f157668880fae5c6323ce62623d7
[]
no_license
dwifdji/real-project
75ec32805f97c6d0d8f0935f7f92902f9509a993
9ddf66dfe0493915b22132781ef121a8d4661ff8
refs/heads/master
2020-12-27T14:01:37.365982
2019-07-26T10:07:27
2019-07-26T10:07:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
552
java
package com._360pai.core.dao.assistant; import com._360pai.core.condition.assistant.TPlatformArticleCondition; import com._360pai.core.model.assistant.TPlatformArticle; import com._360pai.arch.core.abs.BaseDao; /** * <p>TPlatformArticle的基础操作Dao</p> * @ClassName: TPlatformArticleDao * @Description: TPlatformArticle基础操作的Dao * @author Generator * @date 2018年09月25日 10时05分28秒 */ public interface TPlatformArticleDao extends BaseDao<TPlatformArticle,TPlatformArticleCondition>{ int addViewCount(Integer id); }
[ "15538068782@163.com" ]
15538068782@163.com
1becea9f7ef91382da981d539eaff5ebbe366dd2
95a8c2994c14cc756a72dac2fdde680d7923e1e0
/stado/src/org/postgresql/driver/ds/jdbc4/AbstractJdbc4SimpleDataSource.java
255196ee414f33fd4eb963b791f69507a8b6176c
[]
no_license
AlvinPeng/stado_study
8f46da97462ad633f5cf0eb3ea2cdec44b08a2c5
91f4ba7806158340e076ef219ebad1bb740e2189
refs/heads/master
2021-01-23T03:59:04.762167
2019-01-21T02:29:39
2019-01-21T02:29:39
11,657,757
0
0
null
null
null
null
UTF-8
Java
false
false
1,564
java
/***************************************************************************** * Copyright (C) 2008 EnterpriseDB Corporation. * Copyright (C) 2011 Stado Global Development Group. * * This file is part of Stado. * * Stado 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. * * Stado 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 Stado. If not, see <http://www.gnu.org/licenses/>. * * You can find Stado at http://www.stado.us * ****************************************************************************/ package org.postgresql.driver.ds.jdbc4; import java.sql.SQLException; import org.postgresql.driver.ds.jdbc23.AbstractJdbc23SimpleDataSource; public abstract class AbstractJdbc4SimpleDataSource extends AbstractJdbc23SimpleDataSource { public boolean isWrapperFor(Class<?> iface) throws SQLException { throw org.postgresql.driver.Driver.notImplemented(this.getClass(), "isWrapperFor(Class<?>)"); } public <T> T unwrap(Class<T> iface) throws SQLException { throw org.postgresql.driver.Driver.notImplemented(this.getClass(), "unwrap(Class<T>)"); } }
[ "pengalvin@yahoo.com" ]
pengalvin@yahoo.com
5d5d85e0d8c0cac8f981b17a27cdbc90896a6be5
c4352bde96e74d997be29e31517aa5f1f54e9795
/JavaDB_Frameworks/10_Workshop_Bank/ColonialCouncilBank/src/main/java/app/ccb/services/EmployeeServiceImpl.java
7faa10d87a49dc7d9e2ad303feaab04bdbc27acb
[]
no_license
chmitkov/SoftUni
b0f4ec10bb89a7dc350c063a02a3535ef9e901b4
52fd6f85718e07ff492c67d8166ed5cfaf5a58ff
refs/heads/master
2022-11-29T01:06:51.947775
2019-10-12T12:29:03
2019-10-12T12:29:03
138,323,012
1
0
null
2022-11-24T09:42:25
2018-06-22T16:09:50
Java
UTF-8
Java
false
false
4,674
java
package app.ccb.services; import app.ccb.domain.dtos.EmployeeImportDto; import app.ccb.domain.entities.Branch; import app.ccb.domain.entities.Client; import app.ccb.domain.entities.Employee; import app.ccb.repositories.BranchRepository; import app.ccb.repositories.EmployeeRepository; import app.ccb.util.FileUtil; import app.ccb.util.ValidationUtil; import com.google.gson.Gson; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.io.IOException; import java.time.LocalDate; import java.util.List; @Service public class EmployeeServiceImpl implements EmployeeService { private final static String EMPLOYEE_JSON_FILE_PATH = "C:\\Users\\4o4o9\\Desktop\\ColonialCouncilBank-skeleton\\ColonialCouncilBank\\src\\main\\resources\\files\\json\\employees.json"; private final EmployeeRepository employeeRepository; private final BranchRepository branchRepository; private final FileUtil fileUtil; private final Gson gson; private final ValidationUtil validationUtil; private final ModelMapper modelMapper; @Autowired public EmployeeServiceImpl(EmployeeRepository employeeRepository, BranchRepository branchRepository, FileUtil fileUtil, Gson gson, ValidationUtil validationUtil, ModelMapper modelMapper) { this.employeeRepository = employeeRepository; this.branchRepository = branchRepository; this.fileUtil = fileUtil; this.gson = gson; this.validationUtil = validationUtil; this.modelMapper = modelMapper; } @Override public Boolean employeesAreImported() { return this.employeeRepository.count() != 0; } @Override public String readEmployeesJsonFile() throws IOException { return this.fileUtil.readFile(EMPLOYEE_JSON_FILE_PATH); } @Override public String importEmployees(String employees) { StringBuilder importResults = new StringBuilder(); EmployeeImportDto[] employeeImportDtos = this.gson.fromJson( employees, EmployeeImportDto[].class); for (EmployeeImportDto employeeImportDto : employeeImportDtos) { if (!this.validationUtil.isValid(employeeImportDto)) { importResults.append("Error: Incorrect Data!") .append(System.lineSeparator()); continue; } Branch branchEntity = this.branchRepository.findAllByName( employeeImportDto.getBranchName()).orElse(null); if (branchEntity == null) { importResults.append("Error: Incorrect Data!") .append(System.lineSeparator()); continue; } Employee employeeEntity = this.modelMapper.map( employeeImportDto, Employee.class); String[] names = employeeImportDto.getFullName().split(" "); employeeEntity.setFirstName(names[0]); employeeEntity.setLastName(names[1]); employeeEntity.setStartedOn(LocalDate.parse( employeeImportDto.getStartedOn())); employeeEntity.setBranch(branchEntity); this.employeeRepository.saveAndFlush(employeeEntity); importResults.append(String.format("Successfully imported Employee – %s", employeeImportDto.getFullName())) .append(System.lineSeparator()); } return importResults.toString().trim(); } @Override public String exportTopEmployees() { StringBuilder exportEmployees = new StringBuilder(); List<Employee> topEmployees = this.employeeRepository.findAllWithClients(); for (Employee currentEmployee : topEmployees) { exportEmployees.append(String.format("Full name: %s %s", currentEmployee.getFirstName(), currentEmployee.getLastName())) .append(System.lineSeparator()) .append(String.format("Salary: %.2f", currentEmployee.getSalary())) .append(System.lineSeparator()) .append(String.format("Started On: %s", currentEmployee.getStartedOn())) .append(System.lineSeparator()) .append("Clients:").append(System.lineSeparator()); for (Client client : currentEmployee.getClients()) { exportEmployees.append(String.format(" %s", client.getFullName())) .append(System.lineSeparator()); } } return exportEmployees.toString().trim(); } }
[ "ch.mitkov@gmail.com" ]
ch.mitkov@gmail.com
9e0460f7a8d96b7bbd980d8b6013ce7cf8aceb57
c1a9357cf34cb93fe1828a43d6782bcefa211804
/source_code/TDD/jbehave-core-jbehave-3.9/jbehave-spring/src/main/java/org/jbehave/core/configuration/spring/SpringAnnotationBuilder.java
12d55aacb135d34fa31194e94d77ac273d73655f
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Hessah/Quality-Metrics-of-Test-suites-for-TDD-Applications
d5bd48b1c1965229f8249dcfc53a10869bb9bbb0
d7abc677685ab0bc11ae9bc41dd2554bceaf18a8
refs/heads/master
2020-05-29T22:38:33.553795
2014-12-22T23:55:02
2014-12-22T23:55:02
24,071,022
2
0
null
null
null
null
UTF-8
Java
false
false
4,442
java
package org.jbehave.core.configuration.spring; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.jbehave.core.annotations.spring.UsingSpring; import org.jbehave.core.configuration.AnnotationBuilder; import org.jbehave.core.configuration.AnnotationFinder; import org.jbehave.core.configuration.AnnotationMonitor; import org.jbehave.core.configuration.AnnotationRequired; import org.jbehave.core.configuration.Configuration; import org.jbehave.core.steps.CompositeStepsFactory; import org.jbehave.core.steps.InjectableStepsFactory; import org.jbehave.core.steps.ParameterConverters; import org.jbehave.core.steps.ParameterConverters.ParameterConverter; import org.jbehave.core.steps.spring.SpringApplicationContextFactory; import org.jbehave.core.steps.spring.SpringStepsFactory; import org.springframework.context.ApplicationContext; /** * Extends {@link AnnotationBuilder} to provide Spring-based dependency * injection if {@link UsingSpring} annotation is present. * * @author Cristiano Gavião * @author Mauro Talevi */ public class SpringAnnotationBuilder extends AnnotationBuilder { private ApplicationContext context; public SpringAnnotationBuilder(Class<?> annotatedClass) { super(annotatedClass); } public SpringAnnotationBuilder(Class<?> annotatedClass, AnnotationMonitor annotationMonitor) { super(annotatedClass, annotationMonitor); } @Override public Configuration buildConfiguration() throws AnnotationRequired { if (annotationFinder().isAnnotationPresent(UsingSpring.class)) { List<String> resources = annotationFinder() .getAnnotatedValues(UsingSpring.class, String.class, "resources"); if (resources.size() > 0) { try { context = createApplicationContext(annotatedClass().getClassLoader(), resources); } catch (Exception e) { annotationMonitor().elementCreationFailed(ApplicationContext.class, e); } } } else { annotationMonitor().annotationNotFound(UsingSpring.class, annotatedClass()); } return super.buildConfiguration(); } @Override public InjectableStepsFactory buildStepsFactory(Configuration configuration) { InjectableStepsFactory factoryUsingSteps = super.buildStepsFactory(configuration); if (context != null) { return new CompositeStepsFactory(new SpringStepsFactory(configuration, context), factoryUsingSteps); } return factoryUsingSteps; } @Override protected ParameterConverters parameterConverters(AnnotationFinder annotationFinder) { ParameterConverters converters = super.parameterConverters(annotationFinder); if (context != null) { return converters.addConverters(getBeansOfType(context, ParameterConverter.class)); } return converters; } private List<ParameterConverter> getBeansOfType(ApplicationContext context, Class<ParameterConverter> type) { Map<String, ParameterConverter> beansOfType = context.getBeansOfType(type); List<ParameterConverter> converters = new ArrayList<ParameterConverter>(); for (ParameterConverter converter : beansOfType.values()) { converters.add(converter); } return converters; } @Override protected <T, V extends T> T instanceOf(Class<T> type, Class<V> ofClass) { if (context != null) { if (!type.equals(Object.class)) { if (context.getBeansOfType(type).size() > 0) { return context.getBeansOfType(type).values().iterator().next(); } } else { if (context.getBeansOfType(ofClass).size() > 0) { return context.getBeansOfType(ofClass).values().iterator().next(); } } } return super.instanceOf(type, ofClass); } protected ApplicationContext createApplicationContext(ClassLoader classLoader, List<String> resources) { if (context != null) { return context; } return new SpringApplicationContextFactory(classLoader, resources.toArray(new String[resources.size()])) .createApplicationContext(); } protected ApplicationContext applicationContext() { return context; } }
[ "hesaah@gmail.com" ]
hesaah@gmail.com
0af5ef5aebd45491173218bb3b51e9e237b416e1
804825d9b8041948ed775d4f37d425e1f117ba4b
/zoyibean/src/org/zoyi/po/UchomeSpacefield.java
70e30cfd32b463834aa50599716c54603fc300a1
[]
no_license
BGCX261/zoyijavabean-svn-to-git
c6459ea382d1b4a6d27568641801f59bc8a4ed31
1b4ae8e1de4ca8aeb14cc5da32a26edd5bdd8ab3
refs/heads/master
2021-01-01T19:33:51.782198
2015-08-25T15:52:38
2015-08-25T15:52:38
41,600,155
0
0
null
null
null
null
UTF-8
Java
false
false
5,574
java
package org.zoyi.po; /** * UchomeSpacefield entity. @author MyEclipse Persistence Tools */ public class UchomeSpacefield implements java.io.Serializable { // Fields private Integer uid; private Short sex; private String email; private String newemail; private Short emailcheck; private String mobile; private String qq; private String msn; private String msnrobot; private Short msncstatus; private String videopic; private Short birthyear; private Short birthmonth; private Short birthday; private String blood; private Short marry; private String birthprovince; private String birthcity; private String resideprovince; private String residecity; private String note; private String spacenote; private String authstr; private String theme; private Short nocss; private Short menunum; private String css; private String privacy; private String friend; private String feedfriend; private String sendmail; private Short magicstar; private Integer magicexpire; private String timeoffset; // Constructors /** default constructor */ public UchomeSpacefield() { } // Property accessors public Integer getUid() { return this.uid; } public void setUid(Integer uid) { this.uid = uid; } public Short getSex() { return this.sex; } public void setSex(Short sex) { this.sex = sex; } public String getEmail() { return this.email; } public void setEmail(String email) { this.email = email; } public String getNewemail() { return this.newemail; } public void setNewemail(String newemail) { this.newemail = newemail; } public Short getEmailcheck() { return this.emailcheck; } public void setEmailcheck(Short emailcheck) { this.emailcheck = emailcheck; } public String getMobile() { return this.mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getQq() { return this.qq; } public void setQq(String qq) { this.qq = qq; } public String getMsn() { return this.msn; } public void setMsn(String msn) { this.msn = msn; } public String getMsnrobot() { return this.msnrobot; } public void setMsnrobot(String msnrobot) { this.msnrobot = msnrobot; } public Short getMsncstatus() { return this.msncstatus; } public void setMsncstatus(Short msncstatus) { this.msncstatus = msncstatus; } public String getVideopic() { return this.videopic; } public void setVideopic(String videopic) { this.videopic = videopic; } public Short getBirthyear() { return this.birthyear; } public void setBirthyear(Short birthyear) { this.birthyear = birthyear; } public Short getBirthmonth() { return this.birthmonth; } public void setBirthmonth(Short birthmonth) { this.birthmonth = birthmonth; } public Short getBirthday() { return this.birthday; } public void setBirthday(Short birthday) { this.birthday = birthday; } public String getBlood() { return this.blood; } public void setBlood(String blood) { this.blood = blood; } public Short getMarry() { return this.marry; } public void setMarry(Short marry) { this.marry = marry; } public String getBirthprovince() { return this.birthprovince; } public void setBirthprovince(String birthprovince) { this.birthprovince = birthprovince; } public String getBirthcity() { return this.birthcity; } public void setBirthcity(String birthcity) { this.birthcity = birthcity; } public String getResideprovince() { return this.resideprovince; } public void setResideprovince(String resideprovince) { this.resideprovince = resideprovince; } public String getResidecity() { return this.residecity; } public void setResidecity(String residecity) { this.residecity = residecity; } public String getNote() { return this.note; } public void setNote(String note) { this.note = note; } public String getSpacenote() { return this.spacenote; } public void setSpacenote(String spacenote) { this.spacenote = spacenote; } public String getAuthstr() { return this.authstr; } public void setAuthstr(String authstr) { this.authstr = authstr; } public String getTheme() { return this.theme; } public void setTheme(String theme) { this.theme = theme; } public Short getNocss() { return this.nocss; } public void setNocss(Short nocss) { this.nocss = nocss; } public Short getMenunum() { return this.menunum; } public void setMenunum(Short menunum) { this.menunum = menunum; } public String getCss() { return this.css; } public void setCss(String css) { this.css = css; } public String getPrivacy() { return this.privacy; } public void setPrivacy(String privacy) { this.privacy = privacy; } public String getFriend() { return this.friend; } public void setFriend(String friend) { this.friend = friend; } public String getFeedfriend() { return this.feedfriend; } public void setFeedfriend(String feedfriend) { this.feedfriend = feedfriend; } public String getSendmail() { return this.sendmail; } public void setSendmail(String sendmail) { this.sendmail = sendmail; } public Short getMagicstar() { return this.magicstar; } public void setMagicstar(Short magicstar) { this.magicstar = magicstar; } public Integer getMagicexpire() { return this.magicexpire; } public void setMagicexpire(Integer magicexpire) { this.magicexpire = magicexpire; } public String getTimeoffset() { return this.timeoffset; } public void setTimeoffset(String timeoffset) { this.timeoffset = timeoffset; } }
[ "you@example.com" ]
you@example.com
46ddfc22c3bafdb77b4343dd3486e3949ec1a596
e4e49f2566007b1725c647cc7d6aebfe17ec3b3f
/kie-api/src/main/java/org/kie/builder/KnowledgeBuilderConfiguration.java
27a8bd1126e97671c572d6175eb52945ae5b6639
[ "Apache-2.0" ]
permissive
matnil/droolsjbpm-knowledge
3485805b20afff991cc7e26b411d922b152edf83
85f152495038a73ac695ba6d7d2f2c710ed2e24b
refs/heads/master
2020-12-25T00:50:18.771665
2012-11-10T22:09:23
2012-11-10T22:09:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,206
java
/* * Copyright 2010 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kie.builder; import org.kie.PropertiesConfiguration; import org.kie.builder.conf.KnowledgeBuilderOptionsConfiguration; /** * <p> * This class configures the knowledge package builder and compiler. * Dialects and their DialectConfigurations are handled by the DialectRegistry * Normally you will not need to look at this class, unless you want to override the defaults. * </p> * * <p> * This class will automatically load default values from a number of places, accumulating properties from each location. * This list of locations, in given priority is: * System properties, home directory, working directory, META-INF/ of optionally provided classLoader * META-INF/ of Thread.currentThread().getContextClassLoader() and META-INF/ of ClassLoader.getSystemClassLoader() * </p> * * <p> * So if you want to set a default configuration value for all your new KnowledgeBuilder, you can simply set the property as * a System property. * </p> * * <p> * This class is not thread safe and it also contains state. After the KnowledgeBuilder is created, it makes the configuration * immutable and there is no way to make it mutable again. This is to avoid inconsistent behaviour inside KnowledgeBuilder. * </p> * * <p> * <ul> * <li>drools.dialect.default = &lt;String&gt;</li> * <li>drools.accumulate.function.&lt;function name&gt; = &lt;qualified class&gt;</li> * <li>drools.evaluator.<ident> = &lt;qualified class&gt;</li> * <li>drools.dump.dir = &lt;String&gt;</li> * <li>drools.parser.processStringEscapes = &lt;true|false&gt;</li> * </ul> * </p> * * <p> * Two dialects are supported, Java and MVEL. Java is the default dialect.<br/> * The Java dialect supports the following configurations: * <ul> * <li>drools.dialect.java.compiler = &lt;ECLIPSE|JANINO&gt;</li> * <li>drools.dialect.java.lngLevel = &lt;1.5|1.6&gt;</li> * </ul> * * And MVEL supports the following configurations: * <ul> * <li>drools.dialect.mvel.strict = &lt;true|false&gt;</li> * </ul> * </p> * * <p> * So for example if we wanted to create a new KnowledgeBuilder that used Janino as the default compiler we would do the following:<br/> * <pre> * KnowledgeBuilderConfiguration config = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(); * config.setProperty("drools.dialect.java.compiler", "JANINO"); * KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder( config ); * </pre> * </p> * * <p> * Remember the KnowledgeBuilderConfiguration could have taken a Properties instance with that setting in it at constructor time, * or it could also discover from a disk based properties file too. * </p> * * <p> * Available pre-configured Accumulate functions are: * <ul> * <li>drools.accumulate.function.average = org.drools.base.accumulators.AverageAccumulateFunction</li> * <li>drools.accumulate.function.max = org.drools.base.accumulators.MaxAccumulateFunction</li> * <li>drools.accumulate.function.min = org.drools.base.accumulators.MinAccumulateFunction</li> * <li>drools.accumulate.function.count = org.drools.base.accumulators.CountAccumulateFunction</li> * <li>drools.accumulate.function.sum = org.drools.base.accumulators.SumAccumulateFunction</li> * <li>drools.accumulate.function.collectSet = org.drools.base.accumulators.CollectSetAccumulateFunction</li> * <li>drools.accumulate.function.collectList = org.drools.base.accumulators.CollectListAccumulateFunction</li> * </ul> * </p> */ public interface KnowledgeBuilderConfiguration extends PropertiesConfiguration, KnowledgeBuilderOptionsConfiguration { }
[ "ed.tirelli@gmail.com" ]
ed.tirelli@gmail.com
424498cc7e344e236a76798cb79927b103709a71
108dc17e407b69c4e0fe29801de3d0d919e00ea6
/com.carrotgarden.m2e/com.carrotgarden.m2e.scr/com.carrotgarden.m2e.scr.testing/src/main/java/root00/branch10/DummyComp_07a.java
76b29a43e89aa77437957331946cb6ad943e21ce
[ "BSD-3-Clause" ]
permissive
barchart/carrot-eclipse
c017013e4913a1ba9b1f651778026be329802809
50f4433c0996646fd96593cabecaeeb1de798426
refs/heads/master
2023-08-31T05:54:26.725744
2013-06-23T21:18:15
2013-06-23T21:18:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,250
java
/** * Copyright (C) 2010-2012 Andrei Pozolotin <Andrei.Pozolotin@gmail.com> * * All rights reserved. Licensed under the OSI BSD License. * * http://www.opensource.org/licenses/bsd-license.php */ package root00.branch10; import java.util.concurrent.Executor; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Property; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.osgi.service.component.annotations.ReferencePolicy; ////////// // should ignore runnable @Component public class DummyComp_07a implements Cloneable, Runnable { @Property static final String VALUE= "hello"; @Reference(name = "1133") void bind(final Executor executor) { } void unbind(final Executor executor) { } @Reference(name = "1133-more") void addExec(final Executor executor) { } void removeExec(final Executor executor) { } @Reference(name = "113311", policy=ReferencePolicy.DYNAMIC, cardinality=ReferenceCardinality.MULTIPLE) void bind(final Runnable tasker) { } void unbind(final Runnable tasker) { } // @Override public void run() { // TODO Auto-generated method stub } } ///////////////
[ "Andrei.Pozolotin@gmail.com" ]
Andrei.Pozolotin@gmail.com
562a5c8e2459619c31fcb21736a9dc26810a1827
b76142a0c876415e8034bb9dfa969b22825c1b1c
/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/CalendarEventsEndpointConfiguration.java
8cb34b88a6145cae89db1caf3eb1f29595924d65
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown" ]
permissive
poornan/camel
a9cdeff47cbf579097b32ecf42f9786cc0968409
4bae5af8db82dc4d464efebb40050f09bef6796e
refs/heads/master
2023-07-03T01:43:53.786042
2020-09-02T08:59:11
2020-09-02T08:59:36
292,244,670
0
0
Apache-2.0
2020-09-02T09:53:10
2020-09-02T09:53:09
null
UTF-8
Java
false
false
1,937
java
/* * Camel EndpointConfiguration generated by camel-api-component-maven-plugin */ package org.apache.camel.component.google.calendar; import org.apache.camel.spi.Configurer; import org.apache.camel.spi.UriParam; import org.apache.camel.spi.UriParams; /** * Camel EndpointConfiguration for com.google.api.services.calendar.Calendar$Events */ @UriParams(apiName = "events") @Configurer public final class CalendarEventsEndpointConfiguration extends GoogleCalendarConfiguration { @UriParam private String calendarId; @UriParam private com.google.api.services.calendar.model.Event content; @UriParam private com.google.api.services.calendar.model.Channel contentChannel; @UriParam private String destination; @UriParam private String eventId; @UriParam private String text; public String getCalendarId() { return calendarId; } public void setCalendarId(String calendarId) { this.calendarId = calendarId; } public com.google.api.services.calendar.model.Event getContent() { return content; } public void setContent(com.google.api.services.calendar.model.Event content) { this.content = content; } public com.google.api.services.calendar.model.Channel getContentChannel() { return contentChannel; } public void setContentChannel(com.google.api.services.calendar.model.Channel contentChannel) { this.contentChannel = contentChannel; } public String getDestination() { return destination; } public void setDestination(String destination) { this.destination = destination; } public String getEventId() { return eventId; } public void setEventId(String eventId) { this.eventId = eventId; } public String getText() { return text; } public void setText(String text) { this.text = text; } }
[ "claus.ibsen@gmail.com" ]
claus.ibsen@gmail.com
2af090f8510853a16165b824ca11fcd014d0ad44
8e1c3506e5ef30a3d1816c7fbfda199bc4475cb0
/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/codesystems/ConditionQuestionnairePurposeEnumFactory.java
ac2addef54c3170752c7680668097c9e6dc6ced7
[ "Apache-2.0" ]
permissive
jasmdk/org.hl7.fhir.core
4fc585c9f86c995e717336b4190939a9e58e3adb
fea455fbe4539145de5bf734e1737777eb9715e3
refs/heads/master
2020-09-20T08:05:57.475986
2019-11-26T07:57:28
2019-11-26T07:57:28
224,413,181
0
0
Apache-2.0
2019-11-27T11:17:00
2019-11-27T11:16:59
null
UTF-8
Java
false
false
3,562
java
package org.hl7.fhir.r5.model.codesystems; /* * #%L * org.hl7.fhir.r5 * %% * Copyright (C) 2014 - 2019 Health Level 7 * %% * 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. * #L% */ /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 import org.hl7.fhir.r5.model.EnumFactory; public class ConditionQuestionnairePurposeEnumFactory implements EnumFactory<ConditionQuestionnairePurpose> { public ConditionQuestionnairePurpose fromCode(String codeString) throws IllegalArgumentException { if (codeString == null || "".equals(codeString)) return null; if ("preadmit".equals(codeString)) return ConditionQuestionnairePurpose.PREADMIT; if ("diff-diagnosis".equals(codeString)) return ConditionQuestionnairePurpose.DIFFDIAGNOSIS; if ("outcome".equals(codeString)) return ConditionQuestionnairePurpose.OUTCOME; throw new IllegalArgumentException("Unknown ConditionQuestionnairePurpose code '"+codeString+"'"); } public String toCode(ConditionQuestionnairePurpose code) { if (code == ConditionQuestionnairePurpose.PREADMIT) return "preadmit"; if (code == ConditionQuestionnairePurpose.DIFFDIAGNOSIS) return "diff-diagnosis"; if (code == ConditionQuestionnairePurpose.OUTCOME) return "outcome"; return "?"; } public String toSystem(ConditionQuestionnairePurpose code) { return code.getSystem(); } }
[ "grahameg@gmail.com" ]
grahameg@gmail.com
12bfa37e97acdc0c3b9a823c1be826233a013c4e
6bee990a582271908f0d3e7f31c3f32589a39092
/app/src/main/java/cn/com/zhihetech/online/core/view/SheetBottomView.java
c0b9c01eb351ff5b897279ef49c54d7d39eea68c
[]
no_license
qq524007127/online_android
1f600a139892723630f223788dc412eeae0cbd68
9f325494f64b29dc156e71e818ab5224e35b57ea
refs/heads/master
2020-12-07T17:08:26.573892
2016-06-01T07:31:24
2016-06-01T07:31:24
49,698,410
2
0
null
null
null
null
UTF-8
Java
false
false
2,088
java
package cn.com.zhihetech.online.core.view; import android.content.Context; import android.graphics.drawable.BitmapDrawable; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.PopupWindow; import cn.com.zhihetech.online.R; /** * Created by ShenYunjie on 2016/1/25. */ public abstract class SheetBottomView extends PopupWindow { protected Context mContext; protected OnShowListener onShowListener; public SheetBottomView(Context context) { super(context); this.mContext = context; initParams(); } private void initParams() { setWidth(ViewGroup.LayoutParams.MATCH_PARENT); setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); setFocusable(true); setOutsideTouchable(true); setBackgroundDrawable(new BitmapDrawable()); setAnimationStyle(R.style.PopWindowStyle); } @Override public void dismiss() { setActivityAlpha(1f); super.dismiss(); } /** * 从底部弹出 * * @param parentView */ public void show(View parentView) { setActivityAlpha(0.5f); if (onShowListener != null) { onShowListener.onShow(); } showAtLocation(parentView, Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, 0); } /** * 设置Activity的背景透明度 * * @param bgAlpha */ protected void setActivityAlpha(float bgAlpha) { if (!(mContext instanceof android.app.Activity)) { return; } android.app.Activity activity = activity = (android.app.Activity) mContext; WindowManager.LayoutParams lp = activity.getWindow().getAttributes(); lp.alpha = bgAlpha; activity.getWindow().setAttributes(lp); } public void setOnShowListener(OnShowListener onShowListener) { this.onShowListener = onShowListener; } /** * SheetBottomView显示回调 */ public interface OnShowListener { void onShow(); } }
[ "524007127" ]
524007127
2c66cfa1f061b4a8f2779014dd36e2ae9017e822
9c65284a0069cf6d0e3bf19919fc229fd74789ba
/gt_front_server/src/main/java/com/gt/dao/FotcInstitutionsinfoDAO.java
696f6e16e5f1790394bc5ae225b6bb8e7b94d102
[]
no_license
moguli/powex
95aa2699b6fbf92aef6ab7b5203864148af29467
56348db54db9456234010e5a20f9f8a09d234c64
refs/heads/master
2022-12-28T03:52:59.442332
2019-09-08T10:04:25
2019-09-08T10:04:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,357
java
package com.gt.dao; import java.util.List; import org.hibernate.Query; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Repository; import com.gt.dao.comm.HibernateDaoSupport; import com.gt.entity.FotcInstitutionsinfo; @Repository public class FotcInstitutionsinfoDAO extends HibernateDaoSupport{ private static final Logger log = LoggerFactory.getLogger(FotcInstitutionsinfoDAO.class); public FotcInstitutionsinfo findById(int id) { log.debug("getting Fotcinstitutionsinfo instance with id: " + id); try { FotcInstitutionsinfo instance = (FotcInstitutionsinfo) getSession().get( "com.gt.entity.FotcInstitutionsinfo", id); return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } } public void save(FotcInstitutionsinfo fotcinstitutionsinfo) { log.debug("saving FotcInstitutionsinfo instance"); try { getSession().saveOrUpdate(fotcinstitutionsinfo); log.debug("save successful"); } catch (RuntimeException re) { log.error("save failed", re); throw re; } } public List<FotcInstitutionsinfo> list(int firstResult, int maxResults, String filter,boolean isFY) { List<FotcInstitutionsinfo> list = null; log.debug("finding FotcInstitutionsinfo instance with filter"); try { String queryString = "from FotcInstitutionsinfo "+filter; Query queryObject = getSession().createQuery(queryString); queryObject.setCacheable(true); if(isFY){ queryObject.setFirstResult(firstResult); queryObject.setMaxResults(maxResults); } list = queryObject.list(); } catch (RuntimeException re) { log.error("find FotcInstitutionsinfo by filter name failed", re); throw re; } return list; } public FotcInstitutionsinfo findByUserId(Integer userId) { log.debug("finding all Fotcorder instances"); try { String queryString = "from FotcInstitutionsinfo where fuser.fid=:userId and institutions_status = 1"; Query queryObject = getSession().createQuery(queryString); queryObject.setParameter("userId", userId); List<FotcInstitutionsinfo> list = queryObject.list(); if(list.size() > 0) { return list.get(0); } } catch (RuntimeException re) { log.error("find all failed", re); throw re; } return null; } }
[ "185428479@qq.com" ]
185428479@qq.com
7796176daa2593321426b2af79739b4a6e807dce
0e967bca3f1a713dc7bc839e0476e880026e2f95
/gen/org/elixir_lang/psi/ElixirHeredocLine.java
8c6fcd47cf59850d9cc5af319a32b6772948b5cb
[ "Apache-2.0" ]
permissive
anirudh24seven/intellij-elixir
de7264ca732cd88a8a9b5f575e4bc32257131f8d
b619834ed605b2e468afbf0b8c0c2ab61b24a6dc
refs/heads/master
2023-09-01T17:03:37.085720
2023-06-21T09:49:13
2023-07-08T03:26:49
203,091,251
0
0
NOASSERTION
2019-08-19T03:23:41
2019-08-19T03:23:41
null
UTF-8
Java
false
true
563
java
// This is a generated file. Not intended for manual editing. package org.elixir_lang.psi; import java.util.List; import org.jetbrains.annotations.*; import com.intellij.psi.PsiElement; import com.ericsson.otp.erlang.OtpErlangObject; public interface ElixirHeredocLine extends HeredocLine { @Nullable ElixirEscapedEOL getEscapedEOL(); @NotNull ElixirHeredocLineBody getHeredocLineBody(); @NotNull ElixirHeredocLinePrefix getHeredocLinePrefix(); Body getBody(); @NotNull OtpErlangObject quote(@NotNull Heredoc heredoc, int prefixLength); }
[ "Kronic.Deth@gmail.com" ]
Kronic.Deth@gmail.com
4d69bac1715bffafe8914824d046552fb2dc9573
a0071a9c08916968d429f9db2ed8730cac42f2d7
/src/main/java/br/gov/caixa/arqrefservices/dominio/serpro/consultarVinculoMargemPorCPF/ConsumidorConsultarVinculoMargemPorCPF.java
1a2f8773976fb172507188077d2d98b1c338e02e
[]
no_license
MaurilioDeveloper/arqref
a62ea7fe009941077d3778131f7cddc9d5162ea4
7f186fc3fc769e1b30d16e6339688f29b41d828a
refs/heads/master
2020-03-22T14:57:59.419703
2018-07-09T02:04:59
2018-07-09T02:04:59
140,218,663
0
0
null
null
null
null
UTF-8
Java
false
false
2,595
java
package br.gov.caixa.arqrefservices.dominio.serpro.consultarVinculoMargemPorCPF; import java.io.IOException; import br.gov.caixa.arqrefcore.jaxb.conversor.ConverterXML; import br.gov.caixa.arqrefservices.dominio.serpro.consultarMargemPorCPF.ConsultarMargemPorCPFRET; import br.gov.caixa.arqrefservices.dominio.serpro.consultarMargemPorCPF.ConsultarMargemPorCPFSaidaTO; import br.gov.caixa.arqrefservices.soap.Codificacao; import br.gov.caixa.arqrefservices.soap.ExcecaoSOAP; import br.gov.caixa.arqrefservices.soap.RetornoErro; import br.gov.caixa.arqrefservices.soap.SOAPCorpo; import br.gov.caixa.arqrefservices.soap.WSConsumidor; public class ConsumidorConsultarVinculoMargemPorCPF extends WSConsumidor{ private String xmlREQ; public ConsumidorConsultarVinculoMargemPorCPF(String URL, ConsultarVinculoMargemPorCPFDadosREQ dadosREQ) { super(URL); ConsultarVinculoMargemPorCPFREQ servicoSOAP = new ConsultarVinculoMargemPorCPFREQ(); SOAPCorpo<ConsultarVinculoMargemPorCPFDadosREQ> corpoSOAP = new SOAPCorpo<ConsultarVinculoMargemPorCPFDadosREQ>(); servicoSOAP.setBody(corpoSOAP); corpoSOAP.setDados(dadosREQ); this.xmlREQ = ConverterXML.convertToXml(servicoSOAP, ConsultarVinculoMargemPorCPFREQ.class); } public ConsultarVinculoMargemPorCPFSaidaTO executarServico() throws IOException, ExcecaoSOAP { String retorno = executar(xmlREQ); retorno = Codificacao.removerISO88591(retorno); //Verifica se ocorreu erro no envelope if (detectaErroEnvSERPRO(retorno)) { RetornoErro erro = new RetornoErro(); erro.setCdRetCode("9999"); erro.setDsRetCode(retorno); throw new ExcecaoSOAP(erro); } //LENDO O ENVELOPE ConsultarVinculoMargemPorCPFRET soapRet = ConverterXML.converterXmlSemSanitizacao( retorno, ConsultarVinculoMargemPorCPFRET.class); //Obtem o XML de retorno dentro do envelope SOAP String resposta = soapRet.getBody().getDados().getRetorno(); //Verifica se ocorreu erro no conteudo if (detectaErroConteudoSERPRO(resposta)) { RetornoErro erro = new RetornoErro(); erro.setCdRetCode("9999"); erro.setDsRetCode(resposta); throw new ExcecaoSOAP(erro); } //LENDO O CONTEUDO //Converte os dados do corpo do envelope para o objeto de retorno ConsultarVinculoMargemPorCPFSaidaTO ret = ConverterXML .converterXmlSemSanitizacao(resposta, ConsultarVinculoMargemPorCPFSaidaTO.class); return ret; } /** * Verifica se a resposta eh de erro ou sucesso. * * @param resposta * @return */ private boolean detectaErro(String resposta) { return resposta.indexOf("cd_ret_code") > -1; } }
[ "marlonspinf@gmail.com" ]
marlonspinf@gmail.com
d9ea850158c33672689e19743e48c27ac72c7ef4
c8e934b6f99222a10e067a3fab34f39f10f8ea7e
/com/squareup/okhttp/Dns.java
0144d1111cbea0e8371ac6f77cf4902fae776f21
[]
no_license
ZPERO/Secret-Dungeon-Finder-Tool
19efef8ebe044d48215cdaeaac6384cf44ee35b9
c3c97e320a81b9073dbb5b99f200e99d8f4b26cc
refs/heads/master
2020-12-19T08:54:26.313637
2020-01-22T23:00:08
2020-01-22T23:00:08
235,683,952
0
0
null
null
null
null
UTF-8
Java
false
false
604
java
package com.squareup.okhttp; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; import java.util.List; public abstract interface Dns { public static final Dns SYSTEM = new Dns() { public List lookup(String paramAnonymousString) throws UnknownHostException { if (paramAnonymousString != null) { return Arrays.asList(InetAddress.getAllByName(paramAnonymousString)); } throw new UnknownHostException("hostname == null"); } }; public abstract List lookup(String paramString) throws UnknownHostException; }
[ "el.luisito217@gmail.com" ]
el.luisito217@gmail.com
1a6da69840b74df0ff9489eaebd2103830df429c
4379b7763949615f3539a976420b4a939b288b92
/address-space-controller/src/test/java/io/enmasse/controller/CreateControllerTest.java
1434c5da816ed7a969d916c848ac503ca2f268c6
[ "Apache-2.0" ]
permissive
ertanden/enmasse
f3a19b4b2999ff51a973efd03b4832e28504700f
81e40101e35ea5d9f42b5f44497bec170c646b85
refs/heads/master
2020-03-17T20:42:34.812385
2018-05-18T08:32:52
2018-05-18T08:37:00
133,925,255
0
0
null
null
null
null
UTF-8
Java
false
false
2,096
java
/* * Copyright 2017-2018, EnMasse authors. * License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). */ package io.enmasse.controller; import io.enmasse.address.model.AddressSpace; import io.enmasse.api.common.SchemaProvider; import io.enmasse.controller.common.Kubernetes; import io.enmasse.k8s.api.EventLogger; import org.junit.Test; import org.mockito.ArgumentCaptor; import java.util.Collections; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.*; public class CreateControllerTest { @Test public void testAddressSpaceCreate() throws Exception { Kubernetes kubernetes = mock(Kubernetes.class); when(kubernetes.withNamespace(any())).thenReturn(kubernetes); when(kubernetes.hasService(any())).thenReturn(false); when(kubernetes.getNamespace()).thenReturn("otherspace"); AddressSpace addressSpace = new AddressSpace.Builder() .setName("myspace") .setNamespace("mynamespace") .setType("type1") .setPlan("myplan") .build(); EventLogger eventLogger = mock(EventLogger.class); InfraResourceFactory mockResourceFactory = mock(InfraResourceFactory.class); when(mockResourceFactory.createResourceList(eq(addressSpace))).thenReturn(Collections.emptyList()); SchemaProvider testSchema = new TestSchemaProvider(); CreateController createController = new CreateController(kubernetes, testSchema, mockResourceFactory, "test", eventLogger); createController.handle(addressSpace); ArgumentCaptor<AddressSpace> addressSpaceArgumentCaptor = ArgumentCaptor.forClass(AddressSpace.class); verify(kubernetes).createNamespace(addressSpaceArgumentCaptor.capture()); AddressSpace value = addressSpaceArgumentCaptor.getValue(); assertThat(value.getName(), is("myspace")); assertThat(value.getNamespace(), is("mynamespace")); } }
[ "lulf@pvv.ntnu.no" ]
lulf@pvv.ntnu.no
13cdbb66b4faedd23f005861d3d917a000abb236
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/5/org/joda/time/field/PreciseDurationDateTimeField_PreciseDurationDateTimeField_48.java
235af193c43fe7820d52f6b2a00730f9c8a346e1
[]
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,001
java
org joda time field precis datetim field precis unit durat field precis durat date time field precisedurationdatetimefield thread safe immut subclass author brian neill o'neil precis durat date time field precisedurationdatetimefield base date time field basedatetimefield constructor param type field type param unit precis unit durat dai illeg argument except illegalargumentexcept durat field imprecis illeg argument except illegalargumentexcept unit millisecond precis durat date time field precisedurationdatetimefield date time field type datetimefieldtyp type durat field durationfield unit type unit precis isprecis illeg argument except illegalargumentexcept unit durat field precis unit milli iunitmilli unit unit milli getunitmilli unit milli iunitmilli illeg argument except illegalargumentexcept unit millisecond unit field iunitfield unit
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
82b5b6a9da6f98aea4d0a601f2aa86b3727eddc8
882e77219bce59ae57cbad7e9606507b34eebfcf
/mi2s_10_miui12/src/main/java/com/android/server/backup/BackupPasswordManager.java
8f4d95c95d6fac8993f5dd03eb364b597e7cd10b
[]
no_license
CrackerCat/XiaomiFramework
17a12c1752296fa1a52f61b83ecf165f328f4523
0b7952df317dac02ebd1feea7507afb789cef2e3
refs/heads/master
2022-06-12T03:30:33.285593
2020-05-06T11:30:54
2020-05-06T11:30:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,249
java
package com.android.server.backup; import android.content.Context; import android.util.Slog; import com.android.server.backup.utils.DataStreamCodec; import com.android.server.backup.utils.DataStreamFileCodec; import com.android.server.backup.utils.PasswordUtils; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; import java.io.IOException; import java.security.SecureRandom; public final class BackupPasswordManager { private static final int BACKUP_PW_FILE_VERSION = 2; private static final boolean DEBUG = false; private static final int DEFAULT_PW_FILE_VERSION = 1; private static final String PASSWORD_HASH_FILE_NAME = "pwhash"; private static final String PASSWORD_VERSION_FILE_NAME = "pwversion"; public static final String PBKDF_CURRENT = "PBKDF2WithHmacSHA1"; public static final String PBKDF_FALLBACK = "PBKDF2WithHmacSHA1And8bit"; private static final String TAG = "BackupPasswordManager"; private final File mBaseStateDir; private final Context mContext; private String mPasswordHash; private byte[] mPasswordSalt; private int mPasswordVersion; private final SecureRandom mRng; BackupPasswordManager(Context context, File baseStateDir, SecureRandom secureRandom) { this.mContext = context; this.mRng = secureRandom; this.mBaseStateDir = baseStateDir; loadStateFromFilesystem(); } /* access modifiers changed from: package-private */ public boolean hasBackupPassword() { this.mContext.enforceCallingOrSelfPermission("android.permission.BACKUP", "hasBackupPassword"); String str = this.mPasswordHash; return str != null && str.length() > 0; } /* access modifiers changed from: package-private */ public boolean backupPasswordMatches(String password) { if (!hasBackupPassword() || passwordMatchesSaved(password)) { return true; } return false; } /* access modifiers changed from: package-private */ public boolean setBackupPassword(String currentPassword, String newPassword) { this.mContext.enforceCallingOrSelfPermission("android.permission.BACKUP", "setBackupPassword"); if (!passwordMatchesSaved(currentPassword)) { return false; } try { getPasswordVersionFileCodec().serialize(2); this.mPasswordVersion = 2; if (newPassword == null || newPassword.isEmpty()) { return clearPassword(); } try { byte[] salt = randomSalt(); String newPwHash = PasswordUtils.buildPasswordHash(PBKDF_CURRENT, newPassword, salt, 10000); getPasswordHashFileCodec().serialize(new BackupPasswordHash(newPwHash, salt)); this.mPasswordHash = newPwHash; this.mPasswordSalt = salt; return true; } catch (IOException e) { Slog.e(TAG, "Unable to set backup password"); return false; } } catch (IOException e2) { Slog.e(TAG, "Unable to write backup pw version; password not changed"); return false; } } private boolean usePbkdf2Fallback() { return this.mPasswordVersion < 2; } private boolean clearPassword() { File passwordHashFile = getPasswordHashFile(); if (!passwordHashFile.exists() || passwordHashFile.delete()) { this.mPasswordHash = null; this.mPasswordSalt = null; return true; } Slog.e(TAG, "Unable to clear backup password"); return false; } private void loadStateFromFilesystem() { try { this.mPasswordVersion = getPasswordVersionFileCodec().deserialize().intValue(); } catch (IOException e) { Slog.e(TAG, "Unable to read backup pw version"); this.mPasswordVersion = 1; } try { BackupPasswordHash hash = getPasswordHashFileCodec().deserialize(); this.mPasswordHash = hash.hash; this.mPasswordSalt = hash.salt; } catch (IOException e2) { Slog.e(TAG, "Unable to read saved backup pw hash"); } } private boolean passwordMatchesSaved(String candidatePassword) { return passwordMatchesSaved(PBKDF_CURRENT, candidatePassword) || (usePbkdf2Fallback() && passwordMatchesSaved(PBKDF_FALLBACK, candidatePassword)); } private boolean passwordMatchesSaved(String algorithm, String candidatePassword) { if (this.mPasswordHash == null) { if (candidatePassword == null || candidatePassword.equals("")) { return true; } return false; } else if (candidatePassword == null || candidatePassword.length() == 0) { return false; } else { return this.mPasswordHash.equalsIgnoreCase(PasswordUtils.buildPasswordHash(algorithm, candidatePassword, this.mPasswordSalt, 10000)); } } private byte[] randomSalt() { byte[] array = new byte[(512 / 8)]; this.mRng.nextBytes(array); return array; } private DataStreamFileCodec<Integer> getPasswordVersionFileCodec() { return new DataStreamFileCodec<>(new File(this.mBaseStateDir, PASSWORD_VERSION_FILE_NAME), new PasswordVersionFileCodec()); } private DataStreamFileCodec<BackupPasswordHash> getPasswordHashFileCodec() { return new DataStreamFileCodec<>(getPasswordHashFile(), new PasswordHashFileCodec()); } private File getPasswordHashFile() { return new File(this.mBaseStateDir, PASSWORD_HASH_FILE_NAME); } private static final class BackupPasswordHash { public String hash; public byte[] salt; BackupPasswordHash(String hash2, byte[] salt2) { this.hash = hash2; this.salt = salt2; } } private static final class PasswordVersionFileCodec implements DataStreamCodec<Integer> { private PasswordVersionFileCodec() { } public void serialize(Integer integer, DataOutputStream dataOutputStream) throws IOException { dataOutputStream.write(integer.intValue()); } public Integer deserialize(DataInputStream dataInputStream) throws IOException { return Integer.valueOf(dataInputStream.readInt()); } } private static final class PasswordHashFileCodec implements DataStreamCodec<BackupPasswordHash> { private PasswordHashFileCodec() { } public void serialize(BackupPasswordHash backupPasswordHash, DataOutputStream dataOutputStream) throws IOException { dataOutputStream.writeInt(backupPasswordHash.salt.length); dataOutputStream.write(backupPasswordHash.salt); dataOutputStream.writeUTF(backupPasswordHash.hash); } public BackupPasswordHash deserialize(DataInputStream dataInputStream) throws IOException { byte[] salt = new byte[dataInputStream.readInt()]; dataInputStream.readFully(salt); return new BackupPasswordHash(dataInputStream.readUTF(), salt); } } }
[ "sanbo.xyz@gmail.com" ]
sanbo.xyz@gmail.com
536ecad9767e0633d5671195f2b77b0b0cb77336
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/sas-20181203/src/main/java/com/aliyun/sas20181203/models/InstallPmAgentResponse.java
992d515be6f15e2eb37df701cc48d3a76f181024
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,357
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sas20181203.models; import com.aliyun.tea.*; public class InstallPmAgentResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public InstallPmAgentResponseBody body; public static InstallPmAgentResponse build(java.util.Map<String, ?> map) throws Exception { InstallPmAgentResponse self = new InstallPmAgentResponse(); return TeaModel.build(map, self); } public InstallPmAgentResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public InstallPmAgentResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public InstallPmAgentResponse setBody(InstallPmAgentResponseBody body) { this.body = body; return this; } public InstallPmAgentResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
42a513a5ae637311a71033a558636346c0697471
2d5c2433f5a058a7f0baec6d8e4234cecca1ea18
/app/src/main/java/com/seventhmoon/tennisscoreboard/Service/FileImportService.java
61a3c0ee952cd6419980d06a4642e857a9d9e061
[]
no_license
kotzen1023/TennisScoreBoard
970225811324d7d87e257c95658629b2f67ae61f
5431bdce39291045f00cf9148aed0847d0310a37
refs/heads/master
2021-01-11T09:40:09.430247
2019-03-15T03:05:01
2019-03-15T03:05:01
77,594,670
0
0
null
null
null
null
UTF-8
Java
false
false
5,196
java
package com.seventhmoon.tennisscoreboard.Service; import android.app.IntentService; import android.content.Intent; import android.media.MediaExtractor; import android.media.MediaFormat; import android.util.Log; import com.seventhmoon.tennisscoreboard.Data.Constants; import java.io.File; import java.io.IOException; import static com.seventhmoon.tennisscoreboard.Data.FileOperation.importFileToSelect; public class FileImportService extends IntentService { private static final String TAG = FileImportService.class.getName(); private String dest_file_name; public FileImportService() { super("FileImportService"); } @Override public void onCreate() { super.onCreate(); Log.d(TAG, "onCreate()"); } @Override protected void onHandleIntent(Intent intent) { Log.i(TAG, "Handle"); String filePath = intent.getStringExtra("FILEPATH"); dest_file_name = intent.getStringExtra("DEST_FILE_PATH"); Log.e(TAG, "filePath = "+filePath+" dest = "+dest_file_name); if (intent.getAction() != null) { if (intent.getAction().equals(Constants.ACTION.IMPORT_FILE_ACTION)) { Log.i(TAG, "GET_SEARCHLIST_ACTION"); } //clear add list //addSongList.clear(); check(filePath); } } @Override public void onDestroy() { super.onDestroy(); Log.d(TAG, "onDestroy()"); Intent intent = new Intent(Constants.ACTION.IMPORT_FILE_COMPLETE); sendBroadcast(intent); } public String getAudioInfo(String filePath) { Log.e(TAG, "<getAudioInfo>"); String infoMsg = null; //boolean hasFrameRate = false; MediaExtractor mex = new MediaExtractor(); try { mex.setDataSource(filePath);// the adresss location of the sound on sdcard. } catch (IOException e) { e.printStackTrace(); } File file = new File(filePath); Log.d(TAG, "file name: "+file.getName()); if (mex != null) { try { MediaFormat mf = mex.getTrackFormat(0); Log.d(TAG, "file: "+file.getName()+" mf = "+mf.toString()); infoMsg = mf.getString(MediaFormat.KEY_MIME); Log.d(TAG, "type: "+infoMsg); if (infoMsg.contains("audio")) { Log.d(TAG, "duration(us): " + mf.getLong(MediaFormat.KEY_DURATION)); Log.d(TAG, "channel: " + mf.getInteger(MediaFormat.KEY_CHANNEL_COUNT)); if (mf.toString().contains("channel-mask")) { Log.d(TAG, "channel mask: " + mf.getInteger(MediaFormat.KEY_CHANNEL_MASK)); } if (mf.toString().contains("aac-profile")) { Log.d(TAG, "aac profile: " + mf.getInteger(MediaFormat.KEY_AAC_PROFILE)); } Log.d(TAG, "sample rate: " + mf.getInteger(MediaFormat.KEY_SAMPLE_RATE)); if (infoMsg != null && infoMsg.contains("mp4a")) { Log.e(TAG, "match m4a file, import this file!"); importFileToSelect(filePath, dest_file_name); /*Song song = new Song(); song.setName(file.getName()); song.setPath(file.getAbsolutePath()); //song.setDuration((int)(mf.getLong(MediaFormat.KEY_DURATION)/1000)); song.setDuration_u(mf.getLong(MediaFormat.KEY_DURATION)); song.setChannel((byte) mf.getInteger(MediaFormat.KEY_CHANNEL_COUNT)); song.setSample_rate(mf.getInteger(MediaFormat.KEY_SAMPLE_RATE)); song.setMark_a(0); song.setMark_b((int) (mf.getLong(MediaFormat.KEY_DURATION) / 1000)); addSongList.add(song);*/ } } else { Log.e(TAG, "Unknown type"); } } catch (IllegalArgumentException e) { e.printStackTrace(); } } else { Log.d(TAG, "file: "+file.getName()+" not support"); } Log.e(TAG, "</getAudioInfo>"); return infoMsg; } /*public void checkFileAndDuration(File file) { getAudioInfo(file.getAbsolutePath()); }*/ private void check(String filePath) { File file = new File(filePath); if (file.exists() && file.isFile()) { Log.e(TAG, " <File>"); getAudioInfo(file.getAbsolutePath()); } else { Log.e(TAG, "Unknown error(2)"); } Log.e(TAG, " <search>"); } /*public void checkFiles() { Log.e(TAG, "<searchFiles>"); for (int i=0; i<searchList.size(); i++) { File file = new File(searchList.get(i)); search(file); } //Intent newNotifyIntent = new Intent(Constants.ACTION.ADD_SONG_LIST_COMPLETE); //sendBroadcast(newNotifyIntent); Log.e(TAG, "<searchFiles>"); }*/ }
[ "kotzen1023@gmail.com" ]
kotzen1023@gmail.com
c0ee5e734f39ffa3b9bccd3f3a99cfbf31261523
e90c65930465411530d5373b32d340feb6a974ed
/src/com/wangyao2221/codewars/test/KataTest.java
fd8943b5a127ef36f1743bada01d3dd801b9627a
[]
no_license
eric-sun123/Competitive-Coding
a2fd516e8035d7ff436684cebfc1e1af4cf0cd0f
453c3998e63c0723a8156c35f5f5afb70da506ef
refs/heads/master
2023-01-05T13:57:15.831354
2019-07-03T14:08:55
2019-07-03T14:08:55
309,566,583
0
1
null
null
null
null
UTF-8
Java
false
false
724
java
package com.wangyao2221.codewars.test; import com.wangyao2221.codewars.Kata; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * Created by Javatlacati on 01/03/2017. */ public class KataTest { @Test public void findShort() throws Exception { assertEquals(3, Kata.findShort("bitcoin take over the world maybe who knows perhaps")); assertEquals(3, Kata.findShort("turns out random test cases are easier than writing out basic ones")); } @Test public void sampleTest() { assertEquals("128.114.17.104", Kata.longToIP(2154959208L)); assertEquals("0.0.0.0", Kata.longToIP(0)); assertEquals("128.32.10.1", Kata.longToIP(2149583361L)); } }
[ "wangyao2221@163.com" ]
wangyao2221@163.com
bec753953851045a043aed768bb75544a83919aa
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_26050.java
666b64176f136501b9cb55aff82f18ccfe01669d
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
private void refactorInternalApplyMethods(MethodTree tree,SuggestedFix.Builder fixBuilder,Tree param,String mappedFunction){ getMappingForApply(mappedFunction).ifPresent(apply -> { tree.accept(new TreeScanner<Void,Void>(){ @Override public Void visitMethodInvocation( MethodInvocationTree callTree, Void unused){ if (getSymbol(callTree).name.contentEquals("apply")) { Symbol receiverSym=getSymbol(getReceiver(callTree)); if (receiverSym != null && receiverSym.equals(ASTHelpers.getSymbol(param))) { fixBuilder.replace(callTree.getMethodSelect(),receiverSym.name + "." + apply); } } return super.visitMethodInvocation(callTree,unused); } } ,null); } ); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
ddafcc0bca0d25e0b36403f3ebe100c4ea19d57b
4312b6700b25aff663eb6ed1d002c6b2dfea0eb3
/src/test/java/org/zj/framework/core/config/GlobalSettingTest.java
6b87eb4f77b770a5b6d2dac08320580d894b394f
[]
no_license
zhujiancom/Frypan
74299672ec92c811d01c8aeae7352183f9319d89
f88f653d4a637a0b4efd3134c3ddc18e91aed27d
refs/heads/master
2020-06-05T10:02:51.097839
2014-11-10T09:03:40
2014-11-10T09:03:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,263
java
/** * */ package org.zj.framework.core.config; import org.junit.Before; import org.junit.Test; import org.zj.framework.core.config.GlobalSettings; /** * @Description * @author zj * @Date 2014年10月13日 * */ public class GlobalSettingTest{ /** * @Function * @throws java.lang.Exception * @author zj * @Date 2014年8月5日 */ @Before public void setUp() throws Exception{} @Test public void test(){ GlobalSettings setting = GlobalSettings.getInstance(); System.out.println(setting.isTimerEnabled()); try { Thread.sleep(10000); System.out.println(setting.isTimerEnabled()); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Test public void testGetLocale(){ GlobalSettings setting = GlobalSettings.getInstance(); System.out.println(setting.getDefaultLocale()); } @Test public void testGetReloadInterval(){ GlobalSettings setting = GlobalSettings.getInstance(); System.out.println(setting.getMessageReloadInterval()); } @Test public void testPropertyResourcesNames(){ GlobalSettings setting = GlobalSettings.getInstance(); System.out.println(setting.getPropertyResourcesNames()[0]); } }
[ "eric87com@gmail.com" ]
eric87com@gmail.com
b4b61148ca561d6c57d06ef49071af6747e04077
20591524b55c1ce671fd325cbe41bd9958fc6bbd
/service-consumer/src/main/java/com/rongdu/loans/enums/DWDServiceEnums.java
8d2e876ae1cfa624a88ded00b22ffb45d5ad730a
[]
no_license
ybak/loans-suniu
7659387eab42612fce7c0fa80181f2a2106db6e1
b8ab9bfa5ad8be38dc42c0e02b73179b11a491d5
refs/heads/master
2021-03-24T01:00:17.702884
2019-09-25T15:28:35
2019-09-25T15:28:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,234
java
package com.rongdu.loans.enums; /** * @version V1.0 * @Title: DWDServiceEnums.java * @Package com.rongdu.loans.enums * @Description: TODO(用一句话描述该文件做什么) * @author: yuanxianchu * @date 2018年10月30日 */ public enum DWDServiceEnums { DWD_APPROVEFEEDBACK("api.audit.result","RSA","1.0","大王贷推送审批结论接口"), DWD_ORDERFEEDBACK("api.order.status","RSA","1.0","大王贷推送订单状态接口"), DWD_BINDCARDFEEDBACK("api.bank.result","RSA","1.0","大王贷推送绑卡结果接口"), DWD_PUSHREPAYMENT("api.payment.plan","RSA","1.0","大王贷推送还款计划接口"), DWD_REPAYFEEDBACK("api.payment.status","RSA","1.0","大王贷推送还款状态接口"), DWD_FINDFILE("api.resource.findfile", "RSA", "1.0", "大王贷查询文件接口"), DWD_CHARGE("api.charge.data", "RSA", "1.0", "大王贷查询运营商接口"); /** * 接口名 */ private String method; /** * 加密方法 */ private String signType; /** * 接口版本 */ private String version; /** * 接口描述 */ private String desc; DWDServiceEnums(String method, String signType, String version, String desc) { this.method = method; this.signType = signType; this.version = version; this.desc = desc; } /** * @Description: 根据接口名获取枚举 */ public static DWDServiceEnums get(String method) { for (DWDServiceEnums p : DWDServiceEnums.values()) { if (p.getMethod().equals(method)) { return p; } } return null; } public String getMethod() { return method; } public void setMethod(String method) { this.method = method; } public String getSignType() { return signType; } public void setSignType(String signType) { this.signType = signType; } public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } }
[ "tiramisuy18@163.com" ]
tiramisuy18@163.com
8a99f5f48f316e1e83baddaec81063facdebcbc6
4dd22e45d6216df9cd3b64317f6af953f53677b7
/LMS/src/main/java/com/ulearning/ulms/scorm/action/ImportCourseAction.java
b42c5431ffa9d1370b93faef2705c518a1603ea7
[]
no_license
tianpeijun198371/flowerpp
1325344032912301aaacd74327f24e45c32efa1e
169d3117ee844594cb84b2114e3fd165475f4231
refs/heads/master
2020-04-05T23:41:48.254793
2008-02-16T18:03:08
2008-02-16T18:03:08
40,278,397
0
0
null
null
null
null
UTF-8
Java
false
false
8,059
java
/** * ImportCourseAction.java. * User: fengch Date: 2004-7-28 * * Copyright (c) 2000-2004.Huaxia Dadi Distance Learning Services Co.,Ltd. * All rights reserved. */ package com.ulearning.ulms.scorm.action; import com.ulearning.ulms.core.util.Config; import com.ulearning.ulms.scorm.model.ScormModel; import com.ulearning.ulms.scorm.util.ScormConstants; import com.ulearning.ulms.util.log.LogUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.upload.FormFile; import org.apache.struts.webapp.upload.UploadAction; import org.apache.struts.webapp.upload.UploadForm; import java.io.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ImportCourseAction extends UploadAction { protected static Log logger = LogFactory.getLog(ImportCourseAction.class); public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { executeUpload(mapping, form, request, response); //this shouldn't happen in this example return mapping.findForward("success"); } private void executeUpload(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (form instanceof UploadForm) { //this line is here for when the input page is upload-utf8.jsp, //it sets the correct character encoding for the response String encoding = request.getCharacterEncoding(); if ((encoding != null) && (encoding.equalsIgnoreCase("utf-8"))) { response.setContentType("text/html; charset=utf-8"); } UploadForm theForm = (UploadForm) form; //retrieve the text data String text = theForm.getTheText(); //retrieve the query string value String queryValue = theForm.getQueryParam(); //retrieve the file representation FormFile file = theForm.getTheFile(); //retrieve the file name String fileName = file.getFileName(); //retrieve the content type String contentType = file.getContentType(); //retrieve the file size String size = (file.getFileSize() + " bytes"); String data = null; logger.info("[ImportCourseAction]executeUpload--text0=" + text); logger.info("[ImportCourseAction]executeUpload--queryValue0=" + queryValue); logger.info("[ImportCourseAction]executeUpload--fileName0=" + fileName); logger.info("[ImportCourseAction]executeUpload--contentType0=" + contentType); logger.info("[ImportCourseAction]executeUpload--size0=" + size); logger.info( "[ImportCourseAction]executeUpload--theForm.getFilePath()0=" + theForm.getFilePath()); String sessionID = request.getSession().getId(); String uploadDir = ScormConstants.ImportRoot + "temp" + File.separator + sessionID + File.separator; java.io.File theUploadDir = new java.io.File(uploadDir); // The course directory should not exist yet if (!theUploadDir.isDirectory()) { theUploadDir.mkdirs(); } try { //retrieve the file data ByteArrayOutputStream baos = new ByteArrayOutputStream(); InputStream stream = file.getInputStream(); //write the file to the file specified OutputStream bos = new FileOutputStream(uploadDir + fileName); int bytesRead = 0; byte[] buffer = new byte[8192]; while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) { bos.write(buffer, 0, bytesRead); } bos.close(); data = "The file has been written to \"" + uploadDir + "\""; //close the stream stream.close(); } catch (FileNotFoundException fnfe) { fnfe.printStackTrace(); return; } catch (IOException ioe) { ioe.printStackTrace(); return; } ScormModel sm = (ScormModel) form; //place the data into the request for retrieval from display.jsp request.setAttribute("ScormModel", sm); request.setAttribute("text", text); request.setAttribute("uploadDir", uploadDir); request.setAttribute("uploadFile", uploadDir + fileName); request.setAttribute("fileName", fileName); request.setAttribute("contentType", contentType); request.setAttribute("size", size); request.setAttribute("data", data); logger.info("[ImportCourseAction]executeUpload--sm.getName=" + sm.getName()); logger.info("[ImportCourseAction]executeUpload--sm.getRelationID=" + sm.getRelationID()); logger.info("[ImportCourseAction]executeUpload--text=" + text); logger.info("[ImportCourseAction]executeUpload--queryValue=" + queryValue); logger.info("[ImportCourseAction]executeUpload--fileName=" + fileName); logger.info("[ImportCourseAction]executeUpload--uploadFile=" + (uploadDir + fileName)); logger.info("[ImportCourseAction]executeUpload--contentType=" + contentType); logger.info("[ImportCourseAction]executeUpload--size=" + size); logger.info("[ImportCourseAction]executeUpload--data=" + data); logger.info( "[ImportCourseAction]executeUpload--theForm.getFilePath()=" + theForm.getFilePath()); //destroy the temporary file created file.destroy(); } } }
[ "flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626" ]
flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626
595178fdf077f00025f690b724302e3723c068fa
b935d2bd70a0f02de400dd22135d4858375a28c2
/src/main/java/com/github/appreciated/demo/helper/view/other/CodeExampleView.java
d2a62e011436b10909a02f44d3bbeec4c974c0e5
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
appreciated/demo-helper-view
24887fa3e0f8b3fe790aa827cabca5a9a492012a
907128b252f93c6c4ebb445e773c00fb149ea557
refs/heads/master
2023-04-28T22:55:59.396677
2021-08-30T16:27:33
2021-08-30T16:27:33
126,352,627
2
1
Apache-2.0
2023-04-14T17:53:49
2018-03-22T15:03:57
Java
UTF-8
Java
false
false
1,172
java
package com.github.appreciated.demo.helper.view.other; import com.github.appreciated.demo.helper.entity.CodeExample; import com.vaadin.flow.component.ClickNotifier; import com.vaadin.flow.component.HasSize; import com.vaadin.flow.component.html.Label; import com.vaadin.flow.component.icon.VaadinIcon; import com.vaadin.flow.component.notification.Notification; import com.vaadin.flow.component.orderedlayout.HorizontalLayout; public class CodeExampleView extends CodeExampleViewContent implements HasSize, ClickNotifier<CodeExampleView> { public CodeExampleView(CodeExample example) { super(example); setWidth("100%"); setClipboard(example.getCode()); addClickListener(clickEvent -> { HorizontalLayout hl = new HorizontalLayout(VaadinIcon.INFO.create(), new Label("Code has been copied to clipboard")); Notification notification = new Notification(hl); notification.setDuration(3000); notification.setPosition(Notification.Position.BOTTOM_END); notification.getElement().getStyle().set("background", "red"); notification.setOpened(true); }); } }
[ "GoebelJohannes@gmx.net" ]
GoebelJohannes@gmx.net
85cad64bd65a602bc7f16e8bc3805f0b9159dd54
bcd7c93f89adac49a8ddbe699f19e798d3507b63
/spring-boot-rabbitmq-direct/src/main/java/com/guido/model/Fruit.java
7ef48d9b6aa3d2905f3264df39ebe75428973fe6
[]
no_license
gui-gui-maker/MyFrame
3b37d7770617fb4438c4f97d79e58421a970000b
b03b38a26d591f16dca07cf2b3d24f129c5833ef
refs/heads/master
2022-12-23T11:53:16.105726
2019-10-31T06:23:00
2019-10-31T06:23:00
218,462,486
1
0
null
2022-12-16T07:18:22
2019-10-30T06:56:36
Java
UTF-8
Java
false
false
315
java
package com.guido.model; public class Fruit { private String name; private String color; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } }
[ "guidoz@163.com" ]
guidoz@163.com
e32fbc28651a88243ab17c9707c5903df218b0e6
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/com/google/android/gms/common/api/internal/zar.java
07c2745ac3388199cffb65999244bcbede4563ae
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
389
java
package com.google.android.gms.common.api.internal; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.Api; import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks; public interface zar extends ConnectionCallbacks { /* renamed from: a */ void mo27488a(ConnectionResult connectionResult, Api<?> api, boolean z); }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
b618c99ab3b32d140f6856afb2ccad60322c5399
7fa49925ed7c8517c65d9f9543621d08309bc2cf
/sources\kotlinx\coroutines\channels\BroadcastKt$broadcast$1.java
26ac964e1216a0832456f22793be1a003c06a361
[]
no_license
abtt-decompiled/abtracetogether_1.0.0.apk_disassembled
c8717a47f384fb7e8da076e48abe1e4ef8500837
d81b0ee1490911104ab36056d220be7fe3a19e1c
refs/heads/master
2022-06-24T02:51:29.783727
2020-05-08T21:05:20
2020-05-08T21:05:20
262,426,826
2
1
null
null
null
null
UTF-8
Java
false
false
5,250
java
package kotlinx.coroutines.channels; import kotlin.Metadata; import kotlin.ResultKt; import kotlin.Unit; import kotlin.coroutines.Continuation; import kotlin.coroutines.intrinsics.IntrinsicsKt; import kotlin.coroutines.jvm.internal.DebugMetadata; import kotlin.coroutines.jvm.internal.SuspendLambda; import kotlin.jvm.functions.Function2; import kotlin.jvm.internal.Intrinsics; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u0003HŠ@¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"<anonymous>", "", "E", "Lkotlinx/coroutines/channels/ProducerScope;", "invoke", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"}, k = 3, mv = {1, 1, 15}) @DebugMetadata(c = "kotlinx.coroutines.channels.BroadcastKt$broadcast$1", f = "Broadcast.kt", i = {0, 1, 1}, l = {29, 30}, m = "invokeSuspend", n = {"$this$broadcast", "$this$broadcast", "e"}, s = {"L$0", "L$0", "L$1"}) /* compiled from: Broadcast.kt */ final class BroadcastKt$broadcast$1 extends SuspendLambda implements Function2<ProducerScope<? super E>, Continuation<? super Unit>, Object> { final /* synthetic */ ReceiveChannel $this_broadcast; Object L$0; Object L$1; Object L$2; int label; private ProducerScope p$; BroadcastKt$broadcast$1(ReceiveChannel receiveChannel, Continuation continuation) { this.$this_broadcast = receiveChannel; super(2, continuation); } public final Continuation<Unit> create(Object obj, Continuation<?> continuation) { Intrinsics.checkParameterIsNotNull(continuation, "completion"); BroadcastKt$broadcast$1 broadcastKt$broadcast$1 = new BroadcastKt$broadcast$1(this.$this_broadcast, continuation); broadcastKt$broadcast$1.p$ = (ProducerScope) obj; return broadcastKt$broadcast$1; } public final Object invoke(Object obj, Object obj2) { return ((BroadcastKt$broadcast$1) create(obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE); } /* JADX WARNING: Removed duplicated region for block: B:13:0x0049 */ /* JADX WARNING: Removed duplicated region for block: B:16:0x0055 */ public final Object invokeSuspend(Object obj) { ChannelIterator channelIterator; ProducerScope producerScope; BroadcastKt$broadcast$1 broadcastKt$broadcast$1; Object hasNext; Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED(); int i = this.label; if (i == 0) { ResultKt.throwOnFailure(obj); producerScope = this.p$; channelIterator = this.$this_broadcast.iterator(); } else if (i == 1) { channelIterator = (ChannelIterator) this.L$1; ProducerScope producerScope2 = (ProducerScope) this.L$0; ResultKt.throwOnFailure(obj); BroadcastKt$broadcast$1 broadcastKt$broadcast$12 = this; if (!((Boolean) obj).booleanValue()) { Object next = channelIterator.next(); broadcastKt$broadcast$12.L$0 = producerScope2; broadcastKt$broadcast$12.L$1 = next; broadcastKt$broadcast$12.L$2 = channelIterator; broadcastKt$broadcast$12.label = 2; if (producerScope2.send(next, broadcastKt$broadcast$12) == coroutine_suspended) { return coroutine_suspended; } producerScope = producerScope2; broadcastKt$broadcast$1 = broadcastKt$broadcast$12; broadcastKt$broadcast$1.L$0 = producerScope; broadcastKt$broadcast$1.L$1 = channelIterator; broadcastKt$broadcast$1.label = 1; hasNext = channelIterator.hasNext(broadcastKt$broadcast$1); if (hasNext != coroutine_suspended) { return coroutine_suspended; } BroadcastKt$broadcast$1 broadcastKt$broadcast$13 = broadcastKt$broadcast$1; producerScope2 = producerScope; obj = hasNext; broadcastKt$broadcast$12 = broadcastKt$broadcast$13; if (!((Boolean) obj).booleanValue()) { } return coroutine_suspended; return coroutine_suspended; } return Unit.INSTANCE; } else if (i == 2) { channelIterator = (ChannelIterator) this.L$2; ProducerScope producerScope3 = (ProducerScope) this.L$0; ResultKt.throwOnFailure(obj); producerScope = producerScope3; } else { throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } broadcastKt$broadcast$1 = this; broadcastKt$broadcast$1.L$0 = producerScope; broadcastKt$broadcast$1.L$1 = channelIterator; broadcastKt$broadcast$1.label = 1; hasNext = channelIterator.hasNext(broadcastKt$broadcast$1); if (hasNext != coroutine_suspended) { } return coroutine_suspended; } }
[ "patrick.f.king+abtt@gmail.com" ]
patrick.f.king+abtt@gmail.com
c904da8f025be5d04892830b06806a23b575fda9
4fd27664bf0240d8bd784c097c543d86da847a91
/rheem-platforms/rheem-jdbc-template/src/main/java/org/qcri/rheem/jdbc/operators/JdbcProjectionOperator.java
6e8ad28178c94af4abcb089902ccefc85ef69366
[ "Apache-2.0" ]
permissive
harrygav/rheem
0e00c98f5f0e4f265d86f15221c627e98656db60
c9a399b21aaf5bc764dea5b968f9ce8b3f293e93
refs/heads/master
2023-02-24T09:23:52.312062
2020-12-22T12:46:44
2020-12-22T12:46:44
274,949,600
0
0
Apache-2.0
2020-09-08T19:31:15
2020-06-25T15:20:36
Java
UTF-8
Java
false
false
2,484
java
package org.qcri.rheem.jdbc.operators; import org.qcri.rheem.basic.data.Record; import org.qcri.rheem.basic.function.ProjectionDescriptor; import org.qcri.rheem.basic.operators.MapOperator; import org.qcri.rheem.core.api.Configuration; import org.qcri.rheem.core.optimizer.costs.LoadProfileEstimator; import org.qcri.rheem.core.optimizer.costs.LoadProfileEstimators; import org.qcri.rheem.core.types.DataSetType; import org.qcri.rheem.jdbc.compiler.FunctionCompiler; import java.sql.Connection; import java.util.Optional; /** * Projects the fields of {@link Record}s. */ public abstract class JdbcProjectionOperator extends MapOperator<Record, Record> implements JdbcExecutionOperator { public JdbcProjectionOperator(String... fieldNames) { super( new ProjectionDescriptor<>(Record.class, Record.class, fieldNames), DataSetType.createDefault(Record.class), DataSetType.createDefault(Record.class) ); } public JdbcProjectionOperator(ProjectionDescriptor<Record, Record> functionDescriptor) { super(functionDescriptor); } /** * Copies an instance (exclusive of broadcasts). * * @param that that should be copied */ public JdbcProjectionOperator(MapOperator<Record, Record> that) { super(that); if (!(that.getFunctionDescriptor() instanceof ProjectionDescriptor)) { throw new IllegalArgumentException("Can only copy from MapOperators with ProjectionDescriptors."); } } @Override public String createSqlClause(Connection connection, FunctionCompiler compiler) { return String.join(", ", this.getFunctionDescriptor().getFieldNames()); } @Override public ProjectionDescriptor<Record, Record> getFunctionDescriptor() { return (ProjectionDescriptor<Record, Record>) super.getFunctionDescriptor(); } @Override public String getLoadProfileEstimatorConfigurationKey() { return String.format("rheem.%s.projection.load", this.getPlatform().getPlatformId()); } @Override public Optional<LoadProfileEstimator> createLoadProfileEstimator(Configuration configuration) { final Optional<LoadProfileEstimator> optEstimator = JdbcExecutionOperator.super.createLoadProfileEstimator(configuration); LoadProfileEstimators.nestUdfEstimator(optEstimator, this.functionDescriptor, configuration); return optEstimator; } }
[ "sebastian.kruse@hpi.de" ]
sebastian.kruse@hpi.de
01e2667bf4014e8d8a68f470a186048ec305be14
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_de2beb9ad553bb498612757843455065f3fe7a19/Inventory/16_de2beb9ad553bb498612757843455065f3fe7a19_Inventory_t.java
528697fdc63135696f5c207e1de82dd905af3de6
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,642
java
import java.util.HashMap; import java.util.Map.Entry; import org.newdawn.slick.Color; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.Input; import org.newdawn.slick.geom.Rectangle; import com.google.gson.JsonElement; /** * A class that handles the players inventory. * * @author Bobby Henley * @version 1 */ public class Inventory implements Menu { private int width = 550, height = 400, selectX, selectY = 80; private int INV_OFFSET_X = width/2 - 30, INV_OFFSET_Y = height/2 - 30; private int lastDelta; private long curTime = 0; private Rectangle selectionReticle; private boolean visible; private HashMap<String, Integer> playerStats; private Player ply; private GameConfig invMenu; private ItemDictionary itemDictionary; public Inventory(Player p, ItemDictionary id) { ply = p; playerStats = p.getStats(); invMenu = new GameConfig("./loc/inventorytext.json"); itemDictionary = id; selectionReticle = new Rectangle(selectX, selectY, 25, 25); } @Override public void setVisible(boolean b) { visible = b; } @Override public boolean isOpen() { return visible; } @Override public void draw(Graphics g) { if(visible) { g.setColor(Color.black); g.fillRect(ply.getX() - INV_OFFSET_X, ply.getY() - INV_OFFSET_Y, width, height); for(int i = 0; i < 320; i+=32) { for(int j = 0; j < height - 80; j+=32) { g.setColor(Color.white); g.drawRect(i + ply.getX() - INV_OFFSET_X, (j + 80) + ply.getY() - INV_OFFSET_Y, 32, 32); } } //puts items on top of each other. int count = 0; for(int x = 0; x < ply.getPlayerItems().size(); x++) { for(int y = 0; y < ply.getPlayerItems().size(); y++) { g.drawImage(itemDictionary.getScaledImageByName(32, ply.getPlayerItems().get(count).getName()), (x*32) + ply.getX() - INV_OFFSET_X, ((y*32) + 80) + ply.getY() - INV_OFFSET_Y); } count++; } /*int countX = 0; int countY = 0; for(int x = 0; x < ply.getPlayerItems().size(); x++) { g.drawImage(itemDictionary.getScaledImageByName(32, ply.getPlayerItems().get(x).getName()), countX + ply.getX() - INV_OFFSET_X, (countY + 80) + ply.getY() - INV_OFFSET_Y); countX+=32; if(countX >= 10*32) { countX = 0; countY+=32; } //selectX = x*32; //selectY = (x*32) - 80; int tempX = countX -32; int tempY = selectY-80; System.out.println("Counts : (" +tempX+", "+countY+")"); System.out.println("Reticle : (" +selectX+", "+selectY+")"); if(selectX == countX - 32 && (selectY-80)== countY) { g.drawString(ply.getPlayerItems().get(x).getName(), selectX + ply.getX() - INV_OFFSET_X + 10, selectY + ply.getY() - INV_OFFSET_Y -32); } }*/ g.draw(selectionReticle); selectionReticle.setX(selectX + ply.getX() - INV_OFFSET_X + 4); selectionReticle.setY(selectY + ply.getY() - INV_OFFSET_Y + 4); // "" + ply.getStat( /*for (Entry<String, JsonElement> ele : invMenu.getObject().entrySet()) { g.drawString(ele.getValue().getAsString().replace("%n", ele.getKey().split("#(.*)")[0]), 50, 50); }*/ g.drawString(invMenu.getValueAsString("#title"), 320/2 - 40 + ply.getX() - INV_OFFSET_X, 10 + ply.getY() - INV_OFFSET_Y); g.drawString(invMenu.getValueAsString("#stat"), (width - 130) + ply.getX() - INV_OFFSET_X, 10 + ply.getY() - INV_OFFSET_Y); g.drawRect(ply.getX() - INV_OFFSET_X, ply.getY() - INV_OFFSET_Y, width, height); } } public void update(GameContainer container) { if (!visible) { if (container.getInput().isKeyPressed(Input.KEY_I)) { this.setVisible(true); ply.isFrozen(true); } } else { if (container.getTime() - curTime <= 150) { return; } if (container.getInput().isKeyPressed(Input.KEY_I)) { this.setVisible(false); ply.isFrozen(false); } else if (container.getInput().isKeyDown(Input.KEY_UP)) { if(selectY < 80 + 32) { selectY = 80 + 32; } selectY-=32; curTime = container.getTime(); } else if (container.getInput().isKeyDown(Input.KEY_DOWN)) { if(selectY > (8*32) + 80) { selectY = (8*32) + 80; } selectY+=32; curTime = container.getTime(); } else if (container.getInput().isKeyDown(Input.KEY_LEFT)) { if(selectX < 32) { selectX = 32; } selectX-=32; curTime = container.getTime(); } else if (container.getInput().isKeyDown(Input.KEY_RIGHT)) { if(selectX > (8*32)) { selectX = (8*32); } selectX+=32; curTime = container.getTime(); } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e922f2c8eab518102450f9022349559b96e5e832
003a6ee01d39c3d5e7d3e57f0bac56bc411d2bd5
/MGGolf2.2/MalengaGolfLibrary/src/main/java/com/boha/malengagolf/library/data/PhotoUploadDTO.java
99ea670ac07ca27e0cbbcaa4a787ab3b71af76d2
[]
no_license
malengatiger/TigerGolf004
e9ee4c7b88f384907670971b7e21d5f66a22e096
16c7e5afa26711bf2aab70fc9685cca983d9a2c7
refs/heads/master
2021-01-18T23:43:35.285638
2016-06-08T13:07:47
2016-06-08T13:07:47
54,854,472
0
0
null
null
null
null
UTF-8
Java
false
false
3,023
java
package com.boha.malengagolf.library.data; import com.orm.SugarRecord; import java.io.Serializable; /** * Created by aubreyM on 2014/04/20. */ public class PhotoUploadDTO extends SugarRecord implements Serializable { private Integer photoUploadID; private Long dateTaken; private String url, filePath; private Long dateUploaded; private Integer tournamentID; private Integer playerID, golfGroupID, administratorID, scorerID; private String golfGroupName, adminName, playerName,scorerName, tourName; public String getGolfGroupName() { return golfGroupName; } public void setGolfGroupName(String golfGroupName) { this.golfGroupName = golfGroupName; } public String getAdminName() { return adminName; } public void setAdminName(String adminName) { this.adminName = adminName; } public String getPlayerName() { return playerName; } public void setPlayerName(String playerName) { this.playerName = playerName; } public String getScorerName() { return scorerName; } public void setScorerName(String scorerName) { this.scorerName = scorerName; } public String getTourName() { return tourName; } public void setTourName(String tourName) { this.tourName = tourName; } public String getFilePath() { return filePath; } public void setFilePath(String filePath) { this.filePath = filePath; } public Integer getPhotoUploadID() { return photoUploadID; } public void setPhotoUploadID(Integer photoUploadID) { this.photoUploadID = photoUploadID; } public Long getDateTaken() { return dateTaken; } public void setDateTaken(Long dateTaken) { this.dateTaken = dateTaken; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public Long getDateUploaded() { return dateUploaded; } public void setDateUploaded(Long dateUploaded) { this.dateUploaded = dateUploaded; } public Integer getTournamentID() { return tournamentID; } public void setTournamentID(Integer tournamentID) { this.tournamentID = tournamentID; } public Integer getPlayerID() { return playerID; } public void setPlayerID(Integer playerID) { this.playerID = playerID; } public Integer getGolfGroupID() { return golfGroupID; } public void setGolfGroupID(Integer golfGroupID) { this.golfGroupID = golfGroupID; } public Integer getAdministratorID() { return administratorID; } public void setAdministratorID(Integer administratorID) { this.administratorID = administratorID; } public Integer getScorerID() { return scorerID; } public void setScorerID(Integer scorerID) { this.scorerID = scorerID; } }
[ "malengatiger@gmail.com" ]
malengatiger@gmail.com
183f1aa8d5b764721b0f8f9c8bf3e0d7054e3749
1aa82ec4ab1b89e92a06dcfb1dfd1e46305a9896
/activemq-example/activemq-producer/src/main/java/com/activemq/configqueue/ConfigQueue.java
894d30ff887afe9e257b94ae4aa58dfa60d90871
[]
no_license
MrYangPan/itstudy-mq-example
f4bfc6d0b17fb363e8298b508e3bca59832dcff1
c193dba896da4c80b25e16f33449e488f5b97d1e
refs/heads/master
2020-04-06T08:28:58.706124
2018-11-13T02:15:06
2018-11-13T02:15:06
157,306,144
0
0
null
null
null
null
UTF-8
Java
false
false
756
java
package com.activemq.configqueue; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; import javax.jms.Queue; import javax.jms.Topic; /** * Created by Mr.PanYang on 2018/11/1. */ @Component public class ConfigQueue { @Value("${my_queue}") private String myQueue; //将队列注入到spring容器中 @Bean public Queue queue() { return new ActiveMQQueue(myQueue); } @Value("${my_topic}") private String myTopic; @Bean public Topic topic() { return new ActiveMQTopic(myTopic); } }
[ "1280043826@qq.com" ]
1280043826@qq.com
0cb5aa1aa4528436995f84df8b143a1787253253
c4638fb5cd103f3727a9f34c48fcce2d781ace4f
/src/main/java/com/wondersgroup/human/repository/ofcflow/RecruitPostDAO.java
5fc1320a797d7d8f9a34ad01a37d33f9aadd11f7
[]
no_license
elang3000/human
78befe2a4ed6b99abba5ba6a6350c98c00182159
74a7c764a287c513422edb3d30827c2b1ca6290f
refs/heads/master
2020-04-04T09:31:40.587628
2019-01-10T09:33:17
2019-01-10T09:33:17
155,821,905
0
0
null
null
null
null
UTF-8
Java
false
false
937
java
/** * Copyright © 2018 . All rights reserved.万达信息股份有限公司 * * 文件名: RecruitEmployPlanDAO.java * 工程名: human * 包名: com.wondersgroup.human.repository.ofcflow * 描述: TODO * 创建人: wangzhanfei * 创建时间: 2018年5月28日 上午10:42:18 * 版本号: V1.0 * 修改人:wangzhanfei * 修改时间:2018年5月28日 上午10:42:18 * 修改任务号 * 修改内容:TODO */ package com.wondersgroup.human.repository.ofcflow; import com.wondersgroup.framework.core.dao.GenericRepository; import com.wondersgroup.human.bo.ofcflow.RecruitPost; /** * @ClassName: RecruitEmployPlanDAO * @Description: TODO * @author: wangzhanfei * @date: 2018年5月28日 上午10:42:18 * @version [版本号, YYYY-MM-DD] * @see       [相关类/方法] * @since     [产品/模块版本] */ public interface RecruitPostDAO extends GenericRepository<RecruitPost>{ }
[ "40287742+elang3000@users.noreply.github.com" ]
40287742+elang3000@users.noreply.github.com
ff7ec6186283c81aaec45017ed67273cd1ce7b38
6d044a52125ab410963aa7bfa59fd6b2de5c67e1
/src/main/java/org/eel/kitchen/jsonschema/format/FormatSpecifier.java
36e1d28b9ba4a9302f8691d55e54e61a8f347034
[]
no_license
csciuto/json-schema-validator
5f9d84ea27c1dc08d7a117455920ff8d0ceba924
5af6ce26d8111f869d9f385b3114f9145c4c44eb
refs/heads/master
2021-01-15T23:21:09.120523
2012-08-17T08:30:55
2012-08-17T08:30:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,235
java
/* * Copyright (c) 2012, Francis Galiegue <fgaliegue@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the Lesser 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 * Lesser GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.eel.kitchen.jsonschema.format; import com.fasterxml.jackson.databind.JsonNode; import org.eel.kitchen.jsonschema.util.NodeType; import java.util.EnumSet; import java.util.List; /** * Base class for a format specifier * * <p>The {@code format} keyword is part of draft v3, but gone in draft v4. * Its argument is always a string, and this string is called a "specifier". * The draft defines specifiers for recognizing URIs, phone numbers, * different date formats, and so on -- and even CSS 2.1 colors and styles * (not supported). * </p> * * <p>The spec allows for custom specifiers to be added. This implementation, * however, does not support it.</p> * * <p>Note that JSON instances of a type different than recognized by a * specifier validate successfully (ie, a numeric instance will always * validate for a {@code regex} format specifier since this specifier can * only validate text nodes).</p> */ public abstract class FormatSpecifier { /** * Type of values this specifier can validate */ private final EnumSet<NodeType> typeSet; /** * Protected constructor * * <p>Its arguments are the node types recognized by the specifier. Only * one specifier recognizes more than one type: {@code utc-millisec} (it * can validate both numbers and integers). * </p> * * @param first first type * @param other other types, if any */ protected FormatSpecifier(final NodeType first, final NodeType... other) { typeSet = EnumSet.of(first, other); } /** * Main validation function * * <p>This function only checks whether the value is of a type recognized * by this specifier. If so, it call {@link #checkValue(List, JsonNode)}. * </p> * * @param messages the list of messages to fill * @param value the value to validate */ public final void validate(final List<String> messages, final JsonNode value) { if (!typeSet.contains(NodeType.getNodeType(value))) return; checkValue(messages, value); } /** * Abstract method implemented by all specifiers * * <p>It is only called if the value type is one expected by the * specifier, see {@link #validate(List, JsonNode)}.</p> * * @param messages the list of messages to fill * @param value the value to validate */ abstract void checkValue(final List<String> messages, final JsonNode value); }
[ "fgaliegue@gmail.com" ]
fgaliegue@gmail.com
13afd0fa78389814065bec40f01684060e2a9ebc
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_214/Testnull_21328.java
3ebdd2f0c946c4f011017194a245d0f29c1f262c
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_214; import static org.junit.Assert.*; public class Testnull_21328 { private final Productionnull_21328 production = new Productionnull_21328("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
234ecb49bc0cd23969eb9fd15b59f8b42ad9b52c
dd17d429daf7bb9c1f66fd48a03269df5e535447
/bit/algorithm/recall/Introduction.java
3002e4f2b9941251b848b277793c8e03141a7f79
[]
no_license
wangzilong2019/Algorithm
6e1b3f549c13ae171fa79f5899169e320cbbdcb1
43af25ae1c167e7ebe1d1be461eca57b52e93ab6
refs/heads/master
2022-12-01T19:17:21.206767
2022-11-23T13:33:19
2022-11-23T13:33:19
233,599,797
1
0
null
null
null
null
UTF-8
Java
false
false
331
java
package bit.algorithm.recall; public class Introduction { //深度优先遍历 public void DFS(/*当前这一步的处理逻辑*/) { //1、判断边界、是否已经一条道走到黑了:向上回退 //2、尝试当下的每一种可能 //3、确定一种可能之后,继续下一步 } }
[ "1428075063@qq.com" ]
1428075063@qq.com
2fc8e54b6c017deff2550867dce87c4bb6469029
973774793623d1ed6eb08a387d6e3ed83b55bc3a
/Web/road-manage-web/src/com/dearcom/queue/service/QueueCardService.java
15b6a9b02ac5b621f77eb3c5807bf1c76df0a256
[]
no_license
weimengtsgit/RoadManage
09e5ca6ed6b2889e41e33589f053d53c9a580159
ad862593367c6fa18182f5cbd308eaed5942c78f
refs/heads/master
2020-04-27T17:13:53.505778
2015-04-09T03:28:32
2015-04-09T03:28:32
33,536,409
0
0
null
null
null
null
UTF-8
Java
false
false
3,734
java
package com.dearcom.queue.service; import java.math.BigInteger; import java.util.List; import javax.annotation.Resource; import com.dearcom.customer.service.MessageService; import com.dearcom.queue.entity.QueueCard; import com.dearcom.queue.entity.QueueConfigShop; import org.base4j.orm.hibernate.BaseDao; import org.base4j.orm.hibernate.BaseService; import org.ever4j.main.constant.Constant; import org.ever4j.main.tags.EnumValuePojo; import org.ever4j.utils.SessionUtil; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service @Transactional public class QueueCardService extends BaseService<QueueCard> { @Resource private MessageService messageService; @Resource private QueueConfigShopService queueConfigShopService; @Override @Resource(name="queueCardDao") public void setBaseDao(BaseDao<QueueCard> baseDao){ this.baseDao = baseDao; } /** * 排号提醒 * @param id * @param cardType */ public void call(Integer shopId, Integer cardType) { List<EnumValuePojo> calls = SessionUtil.getEnumValues("call_times_config"); if(calls!=null){ for (int i = 0; i < calls.size(); i++) { EnumValuePojo call = calls.get(i); QueueCard qc = this.getCardByIndex(Integer.parseInt(call.getEnumKey()), shopId, cardType); QueueConfigShop config = queueConfigShopService.findHql("from QueueConfigShop c where c.shop.id=? and c.type=?", shopId,cardType); String sendType = config.getCallType().toString(); String customerName = qc.getName(); String shopName = qc.getShop().getName(); String cardNo = qc.getCardNo().toString(); // 等待人数 BigInteger waitCount = (BigInteger) this.uniqueResult("select count(1) from com_queue_card as card where card.shop_id=? and card.card_type=? and card.status=0", config.getShop().getId(),config.getType()); // 等待时间 Integer waitTime = config.getInterval()*waitCount.intValue(); String msgContent = Constant.configMap.get("queueCallMessage_content"); msgContent = msgContent.replace("#{shopName}", shopName); msgContent = msgContent.replace("#{cardNo}", cardNo); msgContent = msgContent.replace("#{customerName}", customerName); msgContent = msgContent.replace("#{waitCount}", waitCount.toString()); msgContent = msgContent.replace("#{waitTime}", waitTime.toString()); byte type = 2; String customerId = qc.getCustomer().getId().toString(); String phone = qc.getPhone(); String msgTitle =Constant.configMap.get("queueCallMessage_title"); msgTitle = msgTitle.replace("#{shopName}", shopName); msgTitle = msgTitle.replace("#{customerName}", customerName); if("1".equals(sendType)){ messageService.sendSMS(msgContent,type,customerId,phone); }else if("2".equals(sendType)){ messageService.sendMessage(msgTitle,msgContent,type,customerId); }else if("3".equals(sendType)){ messageService.sendMessage(msgTitle,msgContent,type,customerId); messageService.sendSMS(msgContent,type,customerId,phone); } this.executeBySql("update com_queue_card set call_times = (call_times + 1) where id=?",qc.getId()); } } } /** * 根据排号的索引查找排号卡 * @param i * @param shopId * @param cardType * @return */ public QueueCard getCardByIndex(int i, Integer shopId, Integer cardType) { Integer nextId = (Integer) this.uniqueResult("select id from com_queue_card as card where card.shop_id=? and card.card_type=? and card.status=0 order by card_no limit 1", shopId,cardType); QueueCard card = null; if(nextId!=null){ card = this.find(nextId); } return card; } }
[ "weimengts@163.com" ]
weimengts@163.com
e18a11ed663935a8ac17cec5fa458560b4327daf
c35894bc2cc7d38d01295d81baee76a7dce10b20
/Ch09_Generics/src/p06/wildcard/WildCardExample.java
e4ec2be219224818468e3bf8b13b67e4d7a5d679
[]
no_license
jongtix/JAVA_jongtix
93e5c289ed3e514cd481373988f18904b8c698cf
4f9f29456ac3956a34d05428c9bf7df14bb7b718
refs/heads/master
2021-08-29T23:14:02.840808
2017-12-15T07:43:22
2017-12-15T07:43:22
107,648,776
0
0
null
null
null
null
UTF-8
Java
false
false
1,920
java
package p06.wildcard; import java.util.Arrays; /** * wildcard(?) * */ public class WildCardExample { public static void registercourse(Course<?> course) { System.out.println(course.getName() + " 수강생 : " + Arrays.toString(course.getStudents())); // 배열을 출력할 수 있는 문자열로 변환 } public static void registercourseStudent(Course<? extends Student> course) { System.out.println(course.getName() + " 수강생 : " + Arrays.toString(course.getStudents())); } public static void registercourseWorker(Course<? super Worker> course) { System.out.println(course.getName() + " 수강생 : " + Arrays.toString(course.getStudents())); } public static void main(String[] args) { Course<Person> personCourse = new Course<>("일반과정", 5); personCourse.add(new Person("일반인")); personCourse.add(new Worker("직장인")); personCourse.add(new Student("학생")); personCourse.add(new HighStudent("고등학생")); Course<Worker> workerCourse = new Course<>("직장인과정", 5); workerCourse.add(new Worker("직장인")); Course<Student> studentCourse = new Course<>("학생과정", 5); studentCourse.add(new Student("학생")); studentCourse.add(new HighStudent("고등학생")); Course<HighStudent> highStudentCourse = new Course<>("고등학생과정", 5); highStudentCourse.add(new HighStudent("고등학생")); // 출력 registercourse(personCourse); registercourse(workerCourse); registercourse(studentCourse); registercourse(highStudentCourse); System.out.println(); // registercourseStudent(personCourse); // registercourseStudent(workerCourse); registercourseStudent(studentCourse); registercourseStudent(highStudentCourse); System.out.println(); registercourseWorker(personCourse); registercourseWorker(workerCourse); // registercourseWorker(studentCourse); // registercourseWorker(highStudentCourse); } }
[ "jong1145@naver.com" ]
jong1145@naver.com
df2eed1747d73a54e4be30506f88d011f6f4d1db
620a39fe25cc5fbd0ed09218b62ccbea75863cda
/wfj_front/src/shop/front/store/action/PlatformPromotionAction.java
c145d9374e28c8652a3c2b6963e48c6498cfe0b0
[]
no_license
hukeling/wfj
f9d2a1dc731292acfc67b1371f0f6933b0af1d17
0aed879a73b1349d74948efd74dadd97616d8fb8
refs/heads/master
2021-01-16T18:34:47.111453
2017-08-12T07:48:58
2017-08-12T07:48:58
100,095,588
0
0
null
null
null
null
UTF-8
Java
false
false
7,352
java
package shop.front.store.action; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; import promotion.pojo.PlatformPromotion; import promotion.service.IPlatformPromotionService; import promotion.service.IStoreApplyPromotionService; import shop.customer.pojo.Customer; import shop.product.pojo.ProductType; import shop.product.service.IProductTypeService; import shop.store.pojo.ShopInfo; import shop.store.service.IShopInfoService; import util.action.BaseAction; import util.pojo.PageHelper; /** * PlatformPromotionAction - 前台促销活动Action类 * ============================================================================ * 版权所有 2010-2013 XXXX软件有限公司,并保留所有权利。 * 官方网站:http://www.shopjsp.com * ============================================================================ * @author 孟琦瑞 */ public class PlatformPromotionAction extends BaseAction { private static final long serialVersionUID = 1L; private IPlatformPromotionService platformPromotionService;//促销活动service private IStoreApplyPromotionService storeApplyPromotionService;//店铺申请促销service private IProductTypeService productTypeService;//商品分类service private IShopInfoService shopInfoService;//店铺service private List<PlatformPromotion> platformPromotionList = new ArrayList<PlatformPromotion>();//促销活动List @SuppressWarnings("unchecked") private List<Map> storeApplyPromotionList = new ArrayList<Map>();//参加促销的商品list @SuppressWarnings("unchecked") private List<Map> noHasProductList = new ArrayList<Map>();//没有参加促销的商品list private String shopInfoId;//店铺id private String promotionId;//促销活动id private String pageIndex="1";//参加促销商品的当前页 private String pageIndex2="1";//没有参加促销商品的当前页 private PageHelper pageHelper2=new PageHelper();//没有参加促销商品的分页对象 private Integer pageSize=10;//分页-每一页显示的个数 //促销活动列表 public String gotoPlatformPromotionListPage(){ Date nowDate = new Date();//创建当前时间 用于比较促销活动是否过期 SimpleDateFormat fm = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String format = fm.format(nowDate);//格式化后的时间 int totalRecordCount=platformPromotionService.getCount(" where o.isPass=1 and UNIX_TIMESTAMP(o.endTime) > UNIX_TIMESTAMP('"+format+"') order by o.createTime "); pageHelper.setPageInfo(pageSize, totalRecordCount,currentPage); platformPromotionList=platformPromotionService.findListByPageHelper(null, pageHelper, " where o.isPass=1 and UNIX_TIMESTAMP(o.endTime) > UNIX_TIMESTAMP('"+format+"') order by o.createTime "); return SUCCESS; } //店铺申请参加促销活动 @SuppressWarnings("unchecked") public String gotoStoreApplyPromotionListPage(){ Customer customer = (Customer) session.getAttribute("customer"); if(null!=customer){ ShopInfo si=(ShopInfo) shopInfoService.getObjectByParams(" where o.customerId="+customer.getCustomerId()); if(null !=si){//判断店铺是否存在 shopInfoId =String.valueOf(si.getShopInfoId());//用于查找该店铺的商品 String hql="SELECT c.productName as productName,c.productTypeId as productTypeId,f.promotionState as promotionState,c.logoImg as logoImg FROM ShopInfo a,ProductInfo c,StoreApplyPromotion f WHERE a.shopInfoId="+shopInfoId+" AND a.shopInfoId=c.shopInfoId AND c.isPutSale=2 and c.isPass=1 AND c.productId=f.productId and f.promotionId="+promotionId+" AND f.promotionState IN (0,1,3) "; List<Map> totalList=storeApplyPromotionService.findListMapByHql(hql); int totalRecordCount=totalList.size(); pageHelper.setPageInfo(pageSize, totalRecordCount,currentPage); List<Map> list = storeApplyPromotionService.findListMapPage(hql, pageHelper); for(Map<String, Object> map:list){ String sortName="";//分类名称 ProductType pt =(ProductType) productTypeService.getObjectById(map.get("productTypeId").toString()); sortName+=pt.getSortName(); map.put("sortName", sortName); storeApplyPromotionList.add(map); } //得到没有参加该活动的商品 String hql2="SELECT c.productId as productId, c.productName as productName,c.logoImg as logoImg FROM ShopInfo a,ProductInfo c WHERE a.shopInfoId="+shopInfoId+" AND a.shopInfoId=c.shopInfoId AND c.isPutSale=2 and c.isPass=1 and c.productId not in (SELECT f.productId from StoreApplyPromotion f where f.shopInfoId="+shopInfoId+" and f.promotionId="+promotionId+" and f.promotionState in (0,1,3) )"; List<Map> totalList2=storeApplyPromotionService.findListMapByHql(hql2); int totalRecordCount2=totalList2.size(); pageHelper2.setPageInfo(pageSize, totalRecordCount2, Integer.parseInt(pageIndex2)); noHasProductList=storeApplyPromotionService.findListMapPage(hql2, pageHelper2); } } return SUCCESS; } public void setPlatformPromotionService( IPlatformPromotionService platformPromotionService) { this.platformPromotionService = platformPromotionService; } public List<PlatformPromotion> getPlatformPromotionList() { return platformPromotionList; } public void setPlatformPromotionList( List<PlatformPromotion> platformPromotionList) { this.platformPromotionList = platformPromotionList; } public String getShopInfoId() { return shopInfoId; } public void setShopInfoId(String shopInfoId) { this.shopInfoId = shopInfoId; } public String getPromotionId() { return promotionId; } public void setPromotionId(String promotionId) { this.promotionId = promotionId; } public void setStoreApplyPromotionService( IStoreApplyPromotionService storeApplyPromotionService) { this.storeApplyPromotionService = storeApplyPromotionService; } public void setProductTypeService(IProductTypeService productTypeService) { this.productTypeService = productTypeService; } @SuppressWarnings("unchecked") public void setStoreApplyPromotionList(List<Map> storeApplyPromotionList) { this.storeApplyPromotionList = storeApplyPromotionList; } @SuppressWarnings("unchecked") public List<Map> getStoreApplyPromotionList() { return storeApplyPromotionList; } @SuppressWarnings("unchecked") public List<Map> getNoHasProductList() { return noHasProductList; } @SuppressWarnings("unchecked") public void setNoHasProductList(List<Map> noHasProductList) { this.noHasProductList = noHasProductList; } public String getPageIndex() { return pageIndex; } public void setPageIndex(String pageIndex) { this.pageIndex = pageIndex; } public Integer getPageSize() { return pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; } public String getPageIndex2() { return pageIndex2; } public void setPageIndex2(String pageIndex2) { this.pageIndex2 = pageIndex2; } public PageHelper getPageHelper2() { return pageHelper2; } public void setPageHelper2(PageHelper pageHelper2) { this.pageHelper2 = pageHelper2; } public void setShopInfoService(IShopInfoService shopInfoService) { this.shopInfoService = shopInfoService; } }
[ "hukelingwork@163.com" ]
hukelingwork@163.com
a9253657b4adef3ada9f650d71ad305cb151adcd
c19cc78880298eae676af0e1fc510884cba40b05
/src/sim/workload/stealth/slowfail/KeysReplicaSlowFailTest.java
0895a13eeddc50c98e8367e656e726827f0a319d
[ "BSD-2-Clause" ]
permissive
bramp/p2psim
40283349144147c8bbd43615c7776e90e271531c
b73a3576a55da19428c297e84bd4bdb3dcb32790
refs/heads/master
2023-05-03T16:32:06.793655
2013-04-18T21:15:00
2013-04-18T21:15:00
7,320,705
4
1
null
null
null
null
UTF-8
Java
false
false
980
java
package sim.workload.stealth.slowfail; import sim.events.Events; import sim.math.Exponential; import sim.workload.stealth.Default; public class KeysReplicaSlowFailTest extends Default { public KeysReplicaSlowFailTest(String[] arglist) throws Exception { super(arglist); int count = Integer.parseInt(arglist[0]); double ratio = Double.parseDouble(arglist[1]); double fail = Double.parseDouble(arglist[2]); int normal = (int) (count * ratio); if (normal == 0) return; // The / Normal * Normal is needed due to Int rounding int stealth = ((count - normal) / normal) * normal; setupStealth(count, ratio); // 1000 puts, k = 3 generateRandomPuts(1000,3); // 10000 gets, exponentially distributed interval with 6 minute mean generateRandomGets(new Exponential(360000),10000); slowFailNormalFromStart((int)(fail*normal), Events.getLastTime()); slowFailStealthFromStart((int)(fail*stealth), Events.getLastTime()); } }
[ "me@bramp.net" ]
me@bramp.net
99a388591883f84550b998b5b02cbb57bb81d581
c1bb1bb5ffeb28f21e3854c3e3e5ebf6d3894c21
/09-迭代组合-IteratorComposite/src/cn/vincent/menu/HouseMenu.java
8cf126b47f2271c1f9c667947eccc8312c336e95
[]
no_license
wsws0521/IDEA-Vincent-HeadFirst-Pattern
bcbfefec4d570d81c860246f465e41e77a48935f
15648b92953b771e2ee8da6668ca768980499964
refs/heads/master
2023-08-18T00:07:53.887294
2023-07-23T04:26:11
2023-07-23T04:26:11
245,391,249
0
0
null
null
null
null
GB18030
Java
false
false
971
java
package cn.vincent.menu; import java.util.ArrayList; import cn.vincent.iterator.HouseMenuIterator; import cn.vincent.iterator.Iterator; import cn.vincent.pojo.MenuItem; public class HouseMenu { ArrayList<MenuItem> menuItems; public HouseMenu() { menuItems = new ArrayList<MenuItem>(); addItem("家庭·香蕉", "家庭·香蕉描述", true, 12.99); addItem("家庭·苹果酱", "家庭·苹果酱描述", true, 13.02); addItem("家庭·牛肉", "家庭·牛肉描述", false, 16.87); addItem("家庭·猪肉", "家庭·猪肉描述", false, 15.23); // 继续加入其他项目 } public void addItem(String name, String description, boolean vegetarian, double price) { MenuItem menuItem = new MenuItem(name, description, vegetarian, price); menuItems.add(menuItem); } public ArrayList<MenuItem> getMenuItems() { return menuItems; } // 使用迭代器改写 public Iterator createrIterator() { return new HouseMenuIterator(menuItems); } }
[ "623540439@qq.com" ]
623540439@qq.com
99011735d43948e0412704c68f3803f4110f737a
b7d00d4cce06fd692aa3b45d9fd269b61c7b4421
/ajah-http/src/main/java/com/ajah/http/cache/HttpCache.java
5919d7192afb2eb9dc330d8e7e76158c9a93c12f
[ "Apache-2.0" ]
permissive
efsavage/ajah
6aeb210230b91e43418909df7ceae23a3aa72be0
8d6c0233061a185194c742c58b6b4158210dc23d
refs/heads/master
2022-10-04T13:15:34.548378
2020-02-12T03:18:15
2020-02-12T03:18:15
1,445,299
2
2
Apache-2.0
2022-09-01T22:57:08
2011-03-06T04:00:15
Java
UTF-8
Java
false
false
2,944
java
/* * Copyright 2012-2015 Eric F. Savage, code@efsavage.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.ajah.http.cache; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import com.ajah.http.Http; import com.ajah.http.err.HttpException; import com.ajah.http.err.NotFoundException; import com.ajah.http.err.UnexpectedResponseCode; /** * Interface for a caching wrapper of {@link Http} fetches. * * @author <a href="http://efsavage.com">Eric F. Savage</a>, <a * href="mailto:code@efsavage.com">code@efsavage.com</a>. */ public interface HttpCache { /** * Attempts to find a cached response of a URI. If not found, fetches the * URI and caches the response. * * @param uri * The URI to fetch * @return The response of the URI, either from cache or from a fresh * request. * @throws IOException * If the URI could not be fetched. * @throws NotFoundException * If the URI is 404 * @throws UnexpectedResponseCode * If the URI returns a response code that {@link Http} cannot * not handle. * * @see com.ajah.http.cache.HttpCache#getBytes(java.net.URI) */ byte[] getBytes(final URI uri) throws IOException, HttpException; /** * Attempts to find a cached response of a URI. If not found, fetches the * URI and caches the response. * * @param uri * The URI to fetch * @return The response of the URI, either from cache or from a fresh * request. * @throws IOException * If the URI could not be fetched. * @throws NotFoundException * @throws UnexpectedResponseCode * * @see com.ajah.http.cache.HttpCache#getBytes(java.net.URI) */ String get(final URI uri) throws IOException, HttpException; /** * Attempts to find a cached response of a URI. If not found, fetches the * URI and caches the response. * * @param uri * The URI to fetch * @return The response of the URI, either from cache or from a fresh * request. * @throws IOException * If the URI could not be fetched. * @throws NotFoundException * @throws UnexpectedResponseCode * @throws URISyntaxException * * @see com.ajah.http.cache.HttpCache#getBytes(java.net.URI) */ byte[] getBytes(final String uri) throws IOException, HttpException, URISyntaxException; }
[ "code@efsavage.com" ]
code@efsavage.com
4362c033ec339141921923043dcbd005c79d6843
18d1beb72b46d4fa43df8d6dca89b3f663260fb5
/app/src/main/java/com/yzb/serial/activity/BaseActivity.java
4b1626837a7034fbf623ee0e2c08aa3b64093d49
[]
no_license
yzbbanban/serial
930b18ddb7c697eaad22487fadc883563cf0ddc9
f24e6a17bfb2a0aeced0bb3047c856b0cb3fa7de
refs/heads/master
2020-03-29T13:39:01.622959
2019-03-29T00:13:48
2019-03-29T00:13:48
149,974,468
0
0
null
null
null
null
UTF-8
Java
false
false
6,208
java
package com.yzb.serial.activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.annotation.LayoutRes; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.MenuItem; import android.view.View; import android.view.WindowManager; import android.widget.TextView; import android.widget.Toast; import com.yzb.serial.R; import com.yzb.serial.util.ToolbarHelper; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Created by brander on 2017/9/20. */ public class BaseActivity extends AppCompatActivity implements View.OnClickListener { private ToolbarHelper mToolBarHelper; public Toolbar toolbar; public TextView tv_center; public TextView tv_right; protected void initView() { } protected void initData() { } protected void initListener() { } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); } @Override public void setContentView(@LayoutRes int layoutResID) { mToolBarHelper = new ToolbarHelper(this, layoutResID); toolbar = mToolBarHelper.getToolBar(); toolbar.setTitle(""); tv_center = mToolBarHelper.getTvCenter(); tv_right = mToolBarHelper.getTvRight(); tv_right.setOnClickListener(this); //返回帧布局视图 setContentView(mToolBarHelper.getContentView()); setSupportActionBar(toolbar);//把toolbar设置到activity中 onCreateCustomToolBar(toolbar); } public void onCreateCustomToolBar(Toolbar toolbar) { //插入toolbar视图的内容的起始点与结束点 toolbar.setContentInsetsRelative(0, 0); } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { finish(); return true; } return super.onOptionsItemSelected(item); } public static void logInfo(Class cls, String message) { Log.i(cls.getName(), message); } @Override public void onClick(View view) { } private Toast _MyToast = null; protected static final int MSG_SHOW_WAIT = 1; protected static final int MSG_HIDE_WAIT = 2; protected static final int MSG_SHOW_TIP = 3; protected static final int MSG_USER_BEG = 100; ProgressDialog waitDialog = null; private Handler handler = new Handler() { @Override public void handleMessage(Message msg) { msgProcess(msg); } }; protected void showWaitDialog(String title, String info) { if (waitDialog != null) { waitDialog.dismiss(); waitDialog = null; } waitDialog = ProgressDialog.show(this, title, info); } protected void hideWaitDialog() { if (waitDialog != null) { waitDialog.dismiss(); waitDialog = null; } } protected void msgProcess(Message msg) { switch (msg.what) { case MSG_SHOW_WAIT: showWaitDialog(null, (String) msg.obj); break; case MSG_HIDE_WAIT: hideWaitDialog(); break; case MSG_SHOW_TIP: doShowTip((String) msg.obj); break; default: break; } } protected void sendMessage(int what, Object obj) { handler.sendMessage(handler.obtainMessage(what, obj)); } /** * 气泡提示 * * @param msg */ protected void ShowTip(String msg) { sendMessage(MSG_SHOW_TIP, msg); } private void doShowTip(String msg) { if (_MyToast == null) { _MyToast = Toast.makeText(BaseActivity.this, msg, Toast.LENGTH_SHORT); } else { _MyToast.setText(msg); } _MyToast.show(); } /** * 显示提示消息 * * @param msg * @param listener */ protected void ShowMsg(String msg, DialogInterface.OnClickListener listener) { new AlertDialog.Builder(this) .setIcon(android.R.drawable.ic_dialog_info).setTitle("Tooltip") .setMessage(msg) .setPositiveButton(getString(R.string.str_ok), listener) .create().show(); } protected void ShowConfim(String msg, DialogInterface.OnClickListener okListener, DialogInterface.OnClickListener cancelListener) { new AlertDialog.Builder(BaseActivity.this) .setTitle(getString(R.string.str_confirm)) .setMessage(msg) .setPositiveButton(getString(R.string.str_ok), okListener) .setNegativeButton(getString(R.string.str_cancel), cancelListener).show(); } public boolean CheckHexInput(String strInput) { boolean rt = false; Pattern p = Pattern.compile("^[a-f,A-F,0-9]*$"); Matcher m = p.matcher(strInput); rt = m.matches(); return rt; } /** * 获取版本号 * * @return 当前应用的版本号 */ public String getVersion() { try { PackageManager manager = this.getPackageManager(); PackageInfo info = manager.getPackageInfo(this.getPackageName(), 0); String version = info.versionName; return version; } catch (Exception e) { return null; } } private long lastClickTime; protected synchronized boolean isFastClick() { long time = System.currentTimeMillis(); if (time - lastClickTime < 500) { return true; } lastClickTime = time; return false; } }
[ "yzbbanban@live.com" ]
yzbbanban@live.com
ba4146ebe4d5095892f16a897197cd09cfa57aa4
0cd0a325f38c339e9300ab5529628318c6ea3537
/src/main/java/io/github/util/spring/SpringReplaceCallBack.java
12c00680ead63929ace15293bc819d4ca982286d
[ "MIT" ]
permissive
MaAnShanGuider/bootplus
2667c030b96bda3ca757572687f8dfe15478fdb6
247d5f6c209be1a5cf10cd0fa18e1d8cc63cf55d
refs/heads/master
2022-12-10T01:33:28.426129
2020-08-24T09:33:26
2020-08-24T09:33:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,145
java
package io.github.util.spring; import io.github.util.RegexUtil; import io.github.util.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.util.Assert; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Spring字符串替换回调接口实现(支持SpEL表达式) * TODO 目前只支持单个配置文件解析 * * @author Created by 思伟 on 2020/7/29 */ @Slf4j public class SpringReplaceCallBack implements RegexUtil.ReplaceCallBack { /** * 是否启用日志 */ private boolean logEnabled = true; /** * 数据集合 */ private Map<?, ?> dataMap; /** * 唯一构造函数 * * @param dataMap Map */ public SpringReplaceCallBack(Map<?, ?> dataMap) { this(true, dataMap); } public SpringReplaceCallBack(boolean logEnabled, Map<?, ?> dataMap) { Assert.notNull(dataMap, "dataMap must not be null"); this.logEnabled = logEnabled; this.dataMap = dataMap; } /** * Spring SpEL表达式匹配正则 */ public static final String SP_EL_REGEX = "\\$\\{(\\w+(\\.\\w+)*)(\\:(\\w+))?\\}"; /** * 替换正则表达式对象 * 测试发现-如果是普通main方法调用,获取的对象为null,暂时改为类属性(有待改进) */ public final Pattern PATTERN = Pattern.compile(SP_EL_REGEX); @Override public Pattern getPattern() { return PATTERN; } @Override public String replace(String text, int index, Matcher matcher) { if (logEnabled && log.isDebugEnabled()) { log.debug("开始解析SpEL表达式:{}", text); } // 从第一个分组()开始取 final String matcherGroup = matcher.group(1); String defaultStr = null; try { // 允许默认值(暂时支持英文) e.g. ${application.name:zhousiwei}-task- defaultStr = StringUtils.defaultString(matcher.group(4), matcherGroup); } catch (Exception e) { } // Map嵌套解析 String value = getMapValue(this.dataMap, matcherGroup); // 支持多层嵌套解析 value = RegexUtil.replaceAll(value, this); return StringUtils.defaultString(value, defaultStr); } /** * 从Map中读取出具体的属性值(支持Map里面嵌多个Map) * * @param map Map * @param key 参数key * @return String */ protected String getMapValue(Map<?, ?> map, String key) { if (map == null || map.isEmpty()) { return key; } // 如果存在key直接返回 if (null != map.get(key)) { return StringUtils.toString(map.get(key)); } String[] keySplit = key.split("\\."); Object o = map.get(keySplit[0]); if (o == null) { return null; } if (keySplit.length > 1) { // 递归解析 return getMapValue((HashMap) o, key.substring(keySplit[0].length() + 1)); } return StringUtils.toString(map.get(key)); } }
[ "2434387555@qq.com" ]
2434387555@qq.com
e328ab180365aaa328bdbe7f35172b4962a4f542
2e73b95396d56462165f004d2e223e46dc0bfa0b
/server/src/test/java/org/uiautomation/ios/e2e/uicatalogapp/UIATextViewTest.java
b333f4e468473d0cc14c313485e1701f38b87c00
[ "Apache-2.0" ]
permissive
isabella232/ios-driver
6f352df125f3a0d7cc9ea67225a6c02bcc49baa1
fae793f664cfea279ff3c493d41a5468cd210921
refs/heads/dev
2023-03-07T19:09:25.280571
2013-06-14T20:43:08
2013-06-14T20:43:08
310,348,529
0
0
Apache-2.0
2021-02-24T06:54:15
2020-11-05T15:56:18
null
UTF-8
Java
false
false
2,628
java
package org.uiautomation.ios.e2e.uicatalogapp; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import org.uiautomation.ios.BaseIOSDriverTest; import org.uiautomation.ios.SampleApps; import org.uiautomation.ios.UIAModels.UIAElement; import org.uiautomation.ios.UIAModels.UIATableCell; import org.uiautomation.ios.UIAModels.UIATextView; import org.uiautomation.ios.UIAModels.predicate.AndCriteria; import org.uiautomation.ios.UIAModels.predicate.Criteria; import org.uiautomation.ios.UIAModels.predicate.NameCriteria; import org.uiautomation.ios.UIAModels.predicate.TypeCriteria; import org.uiautomation.ios.client.uiamodels.impl.RemoteIOSDriver; import org.uiautomation.ios.communication.WebDriverLikeCommand; public class UIATextViewTest extends BaseIOSDriverTest { private RemoteIOSDriver driver; private UIATextView textview; @BeforeClass public void startDriver() { driver = getDriver(SampleApps.uiCatalogCap()); textview = getTextView(); } @AfterClass public void stopDriver() { if (driver != null) { driver.quit(); } } private UIATextView getTextView() { String name = "TextView, Use of UITextField"; Criteria c1 = new TypeCriteria(UIATableCell.class); Criteria c2 = new NameCriteria(name); Criteria c = new AndCriteria(c1, c2); UIAElement element = driver.findElement(c); element.tap(); Criteria fieldC = new TypeCriteria(UIATextView.class); UIATextView res = (UIATextView) driver.findElement(fieldC); return res; } @Test public void capital() { driver.setConfiguration(WebDriverLikeCommand.SET_VALUE, "nativeEvents", true); String v = "ABC"; textview.clear(); textview.setValue(v); Assert.assertEquals(textview.getValue(), v); } @Test public void newLinesAndTabs() { driver.setConfiguration(WebDriverLikeCommand.SET_VALUE, "nativeEvents", false); String v = "ABC\nLine 2\t col3\nthanks,\nFrançois"; textview.clear(); textview.setValue(v); Assert.assertEquals(textview.getValue(), v); } @Test public void slash() { driver.setConfiguration(WebDriverLikeCommand.SET_VALUE, "nativeEvents", true); String v = "A\\B "; textview.clear(); textview.setValue(v); Assert.assertEquals(textview.getValue(), v); } @Test public void shalom() { driver.setConfiguration(WebDriverLikeCommand.SET_VALUE, "nativeEvents", false); String v = "שָׁלוֹם"; textview.clear(); textview.setValue(v); Assert.assertEquals(textview.getValue(), v); } }
[ "francois.reynaud@gmail.com" ]
francois.reynaud@gmail.com
b32ade29eefb7c636576192d058828cf8fd221b6
67249ea888f86ba5e133018a17d1c35993eeb1d2
/src/main/java/com/ziyu/jvm/ch03/AttributeEnum.java
c38c108ffd4901788442ba44059e21a8e66350d5
[]
no_license
ZheBigFish/myjvm
7515a3db5653a3771707df9949707ff1a583c118
13105d7da590118d133b97c806d83a518793444c
refs/heads/master
2022-12-22T04:56:54.224858
2020-05-16T08:10:29
2020-05-16T08:10:29
231,883,089
1
0
null
2022-12-16T05:06:36
2020-01-05T07:28:34
Java
UTF-8
Java
false
false
1,927
java
package com.ziyu.jvm.ch03; public enum AttributeEnum { // Five attributes are critical to correct interpretation of the class file by the Java Virtual Machine: ConstantValue("ConstantValue"), Code("Code"), StackMapTable("StackMapTable"), Exceptions("Exceptions"), BootstrapMethods("BootstrapMethods"), // Twelve attributes are critical to correct interpretation of the class file by the class libraries of the Java SE platform: InnerClasses("InnerClasses"), EnclosingMethod("EnclosingMethod"), Synthetic("Synthetic"), Signature("Signature"), RuntimeVisibleAnnotations("RuntimeVisibleAnnotations"), RuntimeInvisibleAnnotations("RuntimeInvisibleAnnotations"), RuntimeVisibleParameterAnnotations("RuntimeVisibleParameterAnnotations"), RuntimeInvisibleParameterAnnotations("RuntimeInvisibleParameterAnnotations"), RuntimeVisibleTypeAnnotations("RuntimeVisibleTypeAnnotations"), RuntimeInvisibleTypeAnnotations("RuntimeInvisibleTypeAnnotations"), AnnotationDefault("AnnotationDefault"), MethodParameters("MethodParameters"), // Six attributes are not critical to correct interpretation of the class file by either the Java Virtual Machine or the class libraries of the Java SE platform, but are useful for tools: SourceFile("SourceFile"), SourceDebugExtension("SourceDebugExtension"), LineNumberTable("LineNumberTable"), LocalVariableTable("LocalVariableTable"), LocalVariableTypeTable("LocalVariableTypeTable"), Deprecated("Deprecated"), ; String value; AttributeEnum(String value) { this.value = value; } public String getValue() { return value; } public static AttributeEnum of(String value) { for (AttributeEnum constantPoolInfoEnum : AttributeEnum.values()) { if (constantPoolInfoEnum.value.equals(value)) { return constantPoolInfoEnum; } } return null; } }
[ "762349436@qq.com" ]
762349436@qq.com
d07f629ee53be3b67dd8fcedfffc582056e15c59
a0b3e77790630ac4de591c9105e2b1d4e3bd9c8f
/jrap-core/src/main/java/com/jingrui/jrap/extensible/base/DtoExtensionManager.java
699611a2d1f48085a23b66f9d032f8657f0d4b08
[]
no_license
IvanStephenYuan/JRAP_Lease
799c0b1a88fecb0b7d4b9ab73f8da9b47ce19fdb
4b4b08d4c23e9181718374eb77676095d3a298dc
refs/heads/master
2022-12-23T07:54:57.213203
2019-06-11T07:43:48
2019-06-11T07:43:48
174,286,707
3
5
null
2022-12-16T09:43:59
2019-03-07T06:39:02
JavaScript
UTF-8
Java
false
false
8,034
java
/* * Copyright ZheJiang JingRui Co.,Ltd. */ package com.jingrui.jrap.extensible.base; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import javax.xml.parsers.ParserConfigurationException; import org.apache.commons.lang.StringUtils; import org.apache.ibatis.javassist.CannotCompileException; import org.apache.ibatis.javassist.ClassClassPath; import org.apache.ibatis.javassist.ClassPool; import org.apache.ibatis.javassist.CtClass; import org.apache.ibatis.javassist.CtMethod; import org.apache.ibatis.javassist.Modifier; import org.apache.ibatis.javassist.NotFoundException; import org.apache.ibatis.javassist.bytecode.AnnotationsAttribute; import org.apache.ibatis.javassist.bytecode.AttributeInfo; import org.apache.ibatis.javassist.bytecode.ConstPool; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.xml.sax.SAXException; import com.jingrui.jrap.system.dto.BaseDTO; /** * @author shengyang.zhou@jingrui.com */ public class DtoExtensionManager { private static Map<String, List<DtoExtension>> dtoExtensionMap = new HashMap<>(); static { ClassPool.getDefault().insertClassPath(new ClassClassPath(BaseDTO.class)); } private static Logger logger = LoggerFactory.getLogger(DtoExtensionManager.class); public static void scanExtendConfig() throws Exception { PathMatchingResourcePatternResolver patternResolver = new PathMatchingResourcePatternResolver(); Resource[] configs = patternResolver.getResources("classpath*:/extension/**/*.extend.xml"); ClassPool classPool = ClassPool.getDefault(); for (Resource resource : configs) { logger.debug("find dto extend config:{}", resource); List<DtoExtension> dtoExtensionList = parseConfig(resource.getInputStream()); for (DtoExtension dtoExtension : dtoExtensionList) { List<DtoExtension> extensionList = dtoExtensionMap.get(dtoExtension.getTarget()); if (extensionList == null) { extensionList = new ArrayList<>(); dtoExtensionMap.put(dtoExtension.getTarget(), extensionList); } extensionList.add(dtoExtension); } } Map<String, CtClass> ctClassMap = new HashMap<>(); dtoExtensionMap.forEach((dto, extensionList) -> { logger.debug("process dto extending : {} , {} extensions", dto, extensionList.size()); try { CtClass ctClass = ctClassMap.get(dto); //1. get ctclass once if (ctClass == null) { ctClass = classPool.getCtClass(dto); ctClassMap.put(dto, ctClass); } ConstPool constPool = ctClass.getClassFile2().getConstPool(); Set<String> existsMethods = new HashSet<>(); //2. and do extends multi times for (DtoExtension dtoExtension : extensionList) { logger.debug("+ interface {} -> {}", dtoExtension.getExtension(), dto); CtClass ctClass2 = classPool.getCtClass(dtoExtension.getExtension()); CtMethod[] newMethod = ctClass2.getMethods(); for (CtMethod nm : newMethod) { if (nm.getDeclaringClass() != ctClass2) continue; logger.debug("+ method {} -> {}", nm.getName(), dto); CtMethod methodCopy = new CtMethod(nm.getReturnType(), nm.getName(), nm.getParameterTypes(), ctClass); List<AttributeInfo> attributes = nm.getMethodInfo().getAttributes(); for (AttributeInfo ai : attributes) { if (ai instanceof AnnotationsAttribute) { // byte[] info = ai.get(); // ((AnnotationsAttribute) ai).getAnnotations()[0]. // AnnotationsAttribute ai2 = new AnnotationsAttribute(constPool, ai.getName()); // ai2.setAnnotations(((AnnotationsAttribute) ai).getAnnotations()); methodCopy.getMethodInfo().addAttribute(ai); } } // CtMethod methodCopy=CtMethod.make(nm.getMethodInfo(),ctClass2); String name = methodCopy.getName(); String attributeName = StringUtils.uncapitalize(name.substring(3)); existsMethods.add(methodCopy.getName()); if (name.startsWith("set") && methodCopy.getParameterTypes().length == 1) { methodCopy.setBody("innerSet(\"" + attributeName + "\",$1);"); } else if (name.startsWith("get") && methodCopy.getParameterTypes().length == 0) { methodCopy.setBody("return (" + methodCopy.getReturnType().getName() + ")innerGet(\"" + attributeName + "\");"); } methodCopy.setModifiers(Modifier.PUBLIC); ctClass.addMethod(methodCopy); } for (ExtendedField extendedField : dtoExtension.getExtendedFields()) { addSetterGetter(ctClass, extendedField, existsMethods); } ctClass.addInterface(ctClass2); } } catch (Exception e) { throw new RuntimeException(e); } }); // 前面可能会有多次修改,最后统一生成 class ctClassMap.forEach((k, v) -> { try { logger.debug("create class:" + k); v.toClass(); } catch (CannotCompileException e) { e.printStackTrace(); } }); } private static void addSetterGetter(CtClass ctClass, ExtendedField extendedField, Set<String> existsMethods) throws NotFoundException, CannotCompileException { CtClass type = ClassPool.getDefault().get(extendedField.getJavaType()); String getterName = "get" + StringUtils.capitalize(extendedField.getFieldName()); if (!existsMethods.contains(getterName)) { logger.debug("+ getter for {} -> {}", extendedField.getFieldName(), ctClass.getName()); CtMethod getter = new CtMethod(type, getterName, new CtClass[0], ctClass); getter.setBody( "return (" + extendedField.getJavaType() + ")innerGet(\"" + extendedField.getFieldName() + "\");"); ctClass.addMethod(getter); existsMethods.add(getterName); } String setterName = "set" + StringUtils.capitalize(extendedField.getFieldName()); if (!existsMethods.contains(setterName)) { logger.debug("+ setter for {} -> {}", extendedField.getFieldName(), ctClass.getName()); CtMethod setter = new CtMethod(CtClass.voidType, setterName, new CtClass[] { type }, ctClass); setter.setBody("innerSet(\"" + extendedField.getFieldName() + "\",$1);"); ctClass.addMethod(setter); existsMethods.add(setterName); } } private static List<DtoExtension> parseConfig(InputStream inputStream) throws ParserConfigurationException, IOException, SAXException { try (InputStream ignore = inputStream) { return new ExtensionConfigParser().parse(inputStream); } } public static List<DtoExtension> getExtensionConfig(Class clazz) { return dtoExtensionMap.get(clazz.getName()); } }
[ "Ivan.Stphen.Y@gmail.com" ]
Ivan.Stphen.Y@gmail.com
58cbb6e1365c1ebe1e6073c353e5e93c48e8ac53
0630ca4eed5e192aac7bde32aa24d8e08fd9106e
/design-patterns/src/main/java/single/lazy/InnerLazySingleton.java
7827d86ee83bc6e5f65765d5bd8540f38f7c884c
[ "Apache-2.0" ]
permissive
yhuihu/Java-Study
17f472446084dd06600818eeeb32d398fa8f0664
a083c59eff7447f6b1fc4b357c89abc3d9fb3352
refs/heads/master
2023-09-01T04:16:37.850752
2023-08-17T15:38:55
2023-08-17T15:38:55
210,804,814
0
0
Apache-2.0
2023-06-04T15:09:03
2019-09-25T09:19:50
Java
UTF-8
Java
false
false
454
java
package single.lazy; /** * @author Tiger * @date 2020-03-08 * @see single.lazy **/ public class InnerLazySingleton { private InnerLazySingleton() { } private volatile static InnerLazySingleton single = null; private static class LazyHolder { private static final InnerLazySingleton INSTANCE = new InnerLazySingleton(); } public static InnerLazySingleton getInstance() { return LazyHolder.INSTANCE; } }
[ "35516186+yhuihu@users.noreply.github.com" ]
35516186+yhuihu@users.noreply.github.com
651983e5c7a3539606cafe1a7d1355ac92fdeec4
0acd35d4396f883108873a58be9895d3befacf2e
/config/src/test/java/org/springframework/security/config/annotation/method/configuration/NamespaceGlobalMethodSecurityExpressionHandlerTests.java
2344159fdca155a84b0907e5543c56d28e1cee48
[ "Apache-2.0" ]
permissive
ziponia/spring-security
9ff2acf5e01060215fc0c7a1b02652c6ac27b69c
5eadcba7d1aafa6cc76ed652e9bc03eb99f42539
refs/heads/main
2023-03-21T04:13:02.432491
2022-05-31T22:28:28
2022-06-01T15:00:08
205,779,551
2
0
Apache-2.0
2019-09-02T04:57:28
2019-09-02T04:57:28
null
UTF-8
Java
false
false
3,821
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.security.config.annotation.method.configuration; import java.io.Serializable; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.access.PermissionEvaluator; import org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler; import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler; import org.springframework.security.config.test.SpringTestContext; import org.springframework.security.config.test.SpringTestContextExtension; import org.springframework.security.core.Authentication; import org.springframework.security.test.context.annotation.SecurityTestExecutionListeners; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.junit.jupiter.SpringExtension; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; /** * @author Rob Winch * @author Josh Cummings */ @ExtendWith({ SpringExtension.class, SpringTestContextExtension.class }) @SecurityTestExecutionListeners public class NamespaceGlobalMethodSecurityExpressionHandlerTests { public final SpringTestContext spring = new SpringTestContext(this); @Autowired(required = false) private MethodSecurityService service; @Test @WithMockUser public void methodSecurityWhenUsingCustomPermissionEvaluatorThenPreAuthorizesAccordingly() { this.spring.register(CustomAccessDecisionManagerConfig.class, MethodSecurityServiceConfig.class).autowire(); assertThat(this.service.hasPermission("granted")).isNull(); assertThatExceptionOfType(AccessDeniedException.class).isThrownBy(() -> this.service.hasPermission("denied")); } @Test @WithMockUser public void methodSecurityWhenUsingCustomPermissionEvaluatorThenPostAuthorizesAccordingly() { this.spring.register(CustomAccessDecisionManagerConfig.class, MethodSecurityServiceConfig.class).autowire(); assertThat(this.service.postHasPermission("granted")).isNull(); assertThatExceptionOfType(AccessDeniedException.class) .isThrownBy(() -> this.service.postHasPermission("denied")); } @EnableGlobalMethodSecurity(prePostEnabled = true) public static class CustomAccessDecisionManagerConfig extends GlobalMethodSecurityConfiguration { @Override protected MethodSecurityExpressionHandler createExpressionHandler() { DefaultMethodSecurityExpressionHandler expressionHandler = new DefaultMethodSecurityExpressionHandler(); expressionHandler.setPermissionEvaluator(new PermissionEvaluator() { @Override public boolean hasPermission(Authentication authentication, Object targetDomainObject, Object permission) { return "granted".equals(targetDomainObject); } @Override public boolean hasPermission(Authentication authentication, Serializable targetId, String targetType, Object permission) { throw new UnsupportedOperationException(); } }); return expressionHandler; } } }
[ "rwinch@users.noreply.github.com" ]
rwinch@users.noreply.github.com
3b339830e14a8a98602835c2b5d1f39de8759373
ab3b72de30ea81bc1d41cd4cd3fb80ba35ad879f
/starfish-common/src/main/java/priv/starfish/common/helper/ProxyConfigHelper.java
dd0cd58294f66096b4d4528da45a7e56580422aa
[]
no_license
Jstarfish/starfish
f81f147d7a93432c6aa77e5d34eb7d12b4312b89
2c15e33c5d158d333d21f68b98cc161d2afa7cd3
refs/heads/master
2022-12-21T12:05:08.900276
2019-09-04T06:52:07
2019-09-04T06:52:07
126,459,466
0
1
null
2022-12-16T04:52:51
2018-03-23T09:01:56
Java
UTF-8
Java
false
false
2,281
java
package priv.starfish.common.helper; import java.io.IOException; import java.util.Properties; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.mysql.jdbc.StringUtils; /** * ProxyConfigSetter <br/> * 设置http 和 socket 代理服务器 by Hu Changwei, 2013.05.27 */ public final class ProxyConfigHelper { private static final Log logger = LogFactory.getLog(ProxyConfigHelper.class); // private ProxyConfigHelper() { } private final static String defaultConfigFile = "conf/proxy.properties"; public static boolean config() { return config(null); } public static boolean config(String configFile) { try { if (StringUtils.isNullOrEmpty(configFile)) { configFile = defaultConfigFile; } Properties proxyConfig = new Properties(); proxyConfig.load(ProxyConfigHelper.class.getClassLoader().getResourceAsStream(configFile)); // http proxy boolean httpProxySet = Boolean.parseBoolean(proxyConfig.getProperty("httpProxySet", "false")); if (httpProxySet) { System.getProperties().put("httpProxySet", true); System.getProperties().put("httpProxyHost", proxyConfig.getProperty("httpProxyHost")); System.getProperties().put("httpProxyPort", Integer.parseInt(proxyConfig.getProperty("httpProxyPort"))); } // socket proxy boolean socksProxySet = Boolean.parseBoolean(proxyConfig.getProperty("socksProxySet", "false")); if (socksProxySet) { System.getProperties().put("socksProxySet", true); System.getProperties().put("socksProxyHost", proxyConfig.getProperty("socksProxyHost")); System.getProperties().put("socksProxyPort", Integer.parseInt(proxyConfig.getProperty("socksProxyPort"))); } // ftp proxy boolean ftpProxySet = Boolean.parseBoolean(proxyConfig.getProperty("ftpProxySet", "false")); if (ftpProxySet) { System.getProperties().put("ftpProxySet", true); System.getProperties().put("ftpProxyHost", proxyConfig.getProperty("ftpProxyHost")); System.getProperties().put("ftpProxyPort", Integer.parseInt(proxyConfig.getProperty("ftpProxyPort"))); } logger.debug("ProxyConfigHelper : config finished."); return true; } catch (IOException e) { logger.error("ProxyConfigHelper : " + e.getMessage()); return false; } } }
[ "jstarfish@126.com" ]
jstarfish@126.com
70ed4ddf4a997d24e02e113ce6fe7dbe9c863b7f
b26d0ac0846fc13080dbe3c65380cc7247945754
/src/main/java/imports/aws/Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader.java
c28c65f64b6ebffdfb69a1e029dee801060c7a30
[]
no_license
nvkk-devops/cdktf-java-aws
1431404f53df8de517f814508fedbc5810b7bce5
429019d87fc45ab198af816d8289dfe1290cd251
refs/heads/main
2023-03-23T22:43:36.539365
2021-03-11T05:17:09
2021-03-11T05:17:09
346,586,402
0
0
null
null
null
null
UTF-8
Java
false
false
4,916
java
package imports.aws; @javax.annotation.Generated(value = "jsii-pacmak/1.24.0 (build b722f66)", date = "2021-03-10T09:47:03.239Z") @software.amazon.jsii.Jsii(module = imports.aws.$Module.class, fqn = "aws.Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader") @software.amazon.jsii.Jsii.Proxy(Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader.Jsii$Proxy.class) public interface Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader extends software.amazon.jsii.JsiiSerializable { @org.jetbrains.annotations.NotNull java.lang.String getName(); /** * @return a {@link Builder} of {@link Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader} */ static Builder builder() { return new Builder(); } /** * A builder for {@link Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader} */ public static final class Builder implements software.amazon.jsii.Builder<Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader> { private java.lang.String name; /** * Sets the value of {@link Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader#getName} * @param name the value to be set. This parameter is required. * @return {@code this} */ public Builder name(java.lang.String name) { this.name = name; return this; } /** * Builds the configured instance. * @return a new instance of {@link Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader} * @throws NullPointerException if any required attribute was not provided */ @Override public Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader build() { return new Jsii$Proxy(name); } } /** * An implementation for {@link Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader} */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader { private final java.lang.String name; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final java.lang.String name) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.name = java.util.Objects.requireNonNull(name, "name is required"); } @Override public final java.lang.String getName() { return this.name; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("name", om.valueToTree(this.getName())); final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("aws.Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader.Jsii$Proxy that = (Wafv2WebAclRuleStatementRegexPatternSetReferenceStatementFieldToMatchSingleHeader.Jsii$Proxy) o; return this.name.equals(that.name); } @Override public final int hashCode() { int result = this.name.hashCode(); return result; } } }
[ "venkata.nidumukkala@emirates.com" ]
venkata.nidumukkala@emirates.com
fcf579658121348781121229d57406823c8e4325
819a2656acb3ee806696c094efd0c4dbce1b7d7c
/1. Java/day14/InputStreamExample2.java
1820e3c5ae896d19de7fa51e9633580c8b421ab2
[]
no_license
hojinWoo/eduagain
620a3cecbff576eef0af3f1a69aeea654f6fdb26
e72312246a00d3e65f5658a2171d6dfee074c8e8
refs/heads/master
2021-07-23T15:28:43.915751
2018-11-21T03:49:27
2018-11-21T03:49:27
144,929,745
0
2
null
null
null
null
UTF-8
Java
false
false
1,567
java
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import javax.swing.JOptionPane; public class InputStreamExample2 { static final String path = "c:/KOSTA187/설치프로그램1/epp500_0651_64bit.exe"; public static void main(String[] args) { InputStream in = null; File file = new File(path); if (!(file.exists())) { JOptionPane.showMessageDialog(null, "파일이 없음"); return ; } try { in = new FileInputStream(path); // 추상이라 new 안됨(InputStream으로는) System.out.println(in.available()); // 몇개의 바이트가 들어있는지 // byte[] (버퍼) 단위로 입력 byte[] buffer = new byte[4*1024]; // int count = in.read(buffer); /* System.out.println(count); for (byte b : buffer) { //진짜 데이터 System.out.println(b); } */ //파일의 끝은 -1 int count = 0; // int totalCount =0; while ((count = in.read(buffer))!=-1) { System.out.println(count); // totalCount += count; } //totalCount 쓸 필요 없이 file.length 쓰면 됨 System.out.println(in.available()); System.out.println(file.length() + "바이트 파일 다 읽었음"); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); }finally { try { if(in != null) in.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }
[ "dnghwls7@ajou.ac.kr" ]
dnghwls7@ajou.ac.kr
079fcc36c89d097c357d409a2063a990aecba302
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/median/af81ffd4bc47e4f84cbf87051d82d15af14833eaba6c57ae82fc503a67eb939f3e6552182124605c38a77a6774f41fac2cc95082320ba5e29d303277c098c4ae/004/mutations/218/median_af81ffd4_004.java
8111cb04d6c3f399d14563ed521dbbbca12739f5
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,657
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class median_af81ffd4_004 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { median_af81ffd4_004 mainClass = new median_af81ffd4_004 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { DoubleObj first = new DoubleObj (), second = new DoubleObj (), third = new DoubleObj (); DoubleObj median = new DoubleObj (); DoubleObj comp_fir = new DoubleObj (), comp_sec = new DoubleObj (), comp_thi = new DoubleObj (); output += (String.format ("Please enter 3 numbers separated by spaces > ")); first.value = scanner.nextDouble (); second.value = scanner.nextDouble (); third.value = scanner.nextDouble (); median.value = (Math.abs (first.value) + Math.abs (second.value) + Math.abs (third.value)) / 3; comp_fir.value = Math.abs (first.value - median.value); comp_sec.value = Math.abs (second.value - median.value); if (true) return ; comp_thi.value = Math.abs (third.value - median.value); if (comp_fir.value < comp_sec.value && comp_fir.value < comp_thi.value) { output += (String.format ("%.0f is the median\n", first.value)); } else if (comp_sec.value < comp_fir.value && comp_sec.value < comp_thi.value) { output += (String.format ("%.0f is the median\n", second.value)); } else if (comp_thi.value < comp_fir.value && comp_thi.value < comp_sec.value) { output += (String.format ("%.0f is the median\n", third.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
8ef1c9217af32e20eb3f5118808c5c3421b8182b
f9e2110d9405476e40b1ea36a94aec45a9dc851d
/src/main/java/com/sen/design/pattern/template/PeanutBeanSoya.java
99a337135569983948140549562380ebb26202c4
[]
no_license
sumforest/design-pattern
b4eec127eff50a208e57efcbeb2849aa52994a62
1f09e0edd90b65860d1e694f2167fd4b6d5eaddf
refs/heads/master
2023-06-08T11:22:05.194180
2023-06-01T10:40:03
2023-06-01T10:40:03
221,487,151
0
0
null
null
null
null
UTF-8
Java
false
false
279
java
package com.sen.design.pattern.template; /** * @Auther: Sen * @Date: 2019/11/16 16:44 * @Description: */ public class PeanutBeanSoya extends SoyaMike { @Override protected void addMaterial() { System.out.println("第二步:加入上好的花生"); } }
[ "12345678" ]
12345678
b1ee0bade8b24bd9082374c5cf8fc2b52a1e514d
74e94b19b8a9748558bbaa2b86d4e7c6db835e2f
/core/redirector/src/com/comcast/redirector/core/engine/IRedirector.java
1b92a019242d0106142a9689e00ac79e0c057992
[ "Apache-2.0" ]
permissive
Comcast/redirector
b236567e2bae687e0189c2cdc45731dd8c055a1a
6770fe01383bc7ea110c7c8e14c137212ebc0ba1
refs/heads/master
2021-03-27T20:48:38.988332
2019-09-26T08:39:18
2019-09-26T08:39:18
80,451,996
10
13
Apache-2.0
2019-09-26T08:39:19
2017-01-30T18:50:31
Java
UTF-8
Java
false
false
1,158
java
/** * Copyright 2017 Comcast Cable Communications Management, LLC * * 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. * * @author Alexander Binkovsky (abinkovski@productengine.com) */ package com.comcast.redirector.core.engine; import com.comcast.redirector.common.InstanceInfo; import com.comcast.redirector.ruleengine.model.ServerGroup; import java.io.Closeable; import java.util.Map; public interface IRedirector extends Closeable { InstanceInfo redirect(Map<String, String> context); ServerGroup redirectServerGroup(ServerGroup serverGroup, Map<String, String> context); void suspendPolling(); void restartPollingIfSuspended(); }
[ "mailtojp@gmail.com" ]
mailtojp@gmail.com
12ddef0fefcea347d60a8ebf359ec63e11e76d4b
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/HyperSQL/HyperSQL3499.java
6f44e1dad8585228ff5c579704c79fd6e0ed0747
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
361
java
public Object[] getSingleRowValues(Session session) { Result r = getResult(session, 2); int size = r.getNavigator().getSize(); if (size == 0) { return null; } else if (size == 1) { return r.getSingleRowData(); } else { throw Error.error(ErrorCode.X_21000); } }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
b3c175667ad60641fdb09b94cf1876835027a754
6a08f139bf1c988740dfa0e311d17711ba123d01
/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java
ef7c43cf99d2cb24c041192410d0dd2e24748ac6
[ "NAIST-2003", "LicenseRef-scancode-unicode", "ICU", "BSD-3-Clause", "LicenseRef-scancode-public-domain" ]
permissive
IceCruelStuff/badlion-src
61e5b927e75ed5b895cb2fff2c2b95668468c7f7
18e0579874b8b55fd765be9c60f2b17d4766d504
refs/heads/master
2022-12-31T00:30:26.246407
2020-06-30T16:50:49
2020-06-30T16:50:49
297,207,115
0
0
NOASSERTION
2020-10-15T06:27:58
2020-09-21T02:23:57
null
UTF-8
Java
false
false
7,536
java
package org.apache.logging.log4j.core.net; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Hashtable; import java.util.Map; import java.util.Map.Entry; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.core.config.plugins.Plugin; import org.apache.logging.log4j.core.helpers.Integers; import org.apache.logging.log4j.core.net.Advertiser; import org.apache.logging.log4j.status.StatusLogger; @Plugin( name = "multicastdns", category = "Core", elementType = "advertiser", printObject = false ) public class MulticastDNSAdvertiser implements Advertiser { protected static final Logger LOGGER = StatusLogger.getLogger(); private static Object jmDNS = initializeJMDNS(); private static Class jmDNSClass; private static Class serviceInfoClass; public Object advertise(Map properties) { Map<String, String> truncatedProperties = new HashMap(); for(Entry<String, String> entry : properties.entrySet()) { if(((String)entry.getKey()).length() <= 255 && ((String)entry.getValue()).length() <= 255) { truncatedProperties.put(entry.getKey(), entry.getValue()); } } String protocol = (String)truncatedProperties.get("protocol"); String zone = "._log4j._" + (protocol != null?protocol:"tcp") + ".local."; String portString = (String)truncatedProperties.get("port"); int port = Integers.parseInt(portString, 4555); String name = (String)truncatedProperties.get("name"); if(jmDNS != null) { boolean isVersion3 = false; try { jmDNSClass.getMethod("create", (Class[])null); isVersion3 = true; } catch (NoSuchMethodException var14) { ; } Object serviceInfo; if(isVersion3) { serviceInfo = this.buildServiceInfoVersion3(zone, port, name, truncatedProperties); } else { serviceInfo = this.buildServiceInfoVersion1(zone, port, name, truncatedProperties); } try { Method method = jmDNSClass.getMethod("registerService", new Class[]{serviceInfoClass}); method.invoke(jmDNS, new Object[]{serviceInfo}); } catch (IllegalAccessException var11) { LOGGER.warn((String)"Unable to invoke registerService method", (Throwable)var11); } catch (NoSuchMethodException var12) { LOGGER.warn((String)"No registerService method", (Throwable)var12); } catch (InvocationTargetException var13) { LOGGER.warn((String)"Unable to invoke registerService method", (Throwable)var13); } return serviceInfo; } else { LOGGER.warn("JMDNS not available - will not advertise ZeroConf support"); return null; } } public void unadvertise(Object serviceInfo) { if(jmDNS != null) { try { Method method = jmDNSClass.getMethod("unregisterService", new Class[]{serviceInfoClass}); method.invoke(jmDNS, new Object[]{serviceInfo}); } catch (IllegalAccessException var3) { LOGGER.warn((String)"Unable to invoke unregisterService method", (Throwable)var3); } catch (NoSuchMethodException var4) { LOGGER.warn((String)"No unregisterService method", (Throwable)var4); } catch (InvocationTargetException var5) { LOGGER.warn((String)"Unable to invoke unregisterService method", (Throwable)var5); } } } private static Object createJmDNSVersion1() { try { return jmDNSClass.newInstance(); } catch (InstantiationException var1) { LOGGER.warn((String)"Unable to instantiate JMDNS", (Throwable)var1); } catch (IllegalAccessException var2) { LOGGER.warn((String)"Unable to instantiate JMDNS", (Throwable)var2); } return null; } private static Object createJmDNSVersion3() { try { Method jmDNSCreateMethod = jmDNSClass.getMethod("create", (Class[])null); return jmDNSCreateMethod.invoke((Object)null, (Object[])null); } catch (IllegalAccessException var1) { LOGGER.warn((String)"Unable to instantiate jmdns class", (Throwable)var1); } catch (NoSuchMethodException var2) { LOGGER.warn((String)"Unable to access constructor", (Throwable)var2); } catch (InvocationTargetException var3) { LOGGER.warn((String)"Unable to call constructor", (Throwable)var3); } return null; } private Object buildServiceInfoVersion1(String zone, int port, String name, Map properties) { Hashtable<String, String> hashtableProperties = new Hashtable(properties); try { Class<?>[] args = new Class[]{String.class, String.class, Integer.TYPE, Integer.TYPE, Integer.TYPE, Hashtable.class}; Constructor<?> constructor = serviceInfoClass.getConstructor(args); Object[] values = new Object[]{zone, name, Integer.valueOf(port), Integer.valueOf(0), Integer.valueOf(0), hashtableProperties}; return constructor.newInstance(values); } catch (IllegalAccessException var9) { LOGGER.warn((String)"Unable to construct ServiceInfo instance", (Throwable)var9); } catch (NoSuchMethodException var10) { LOGGER.warn((String)"Unable to get ServiceInfo constructor", (Throwable)var10); } catch (InstantiationException var11) { LOGGER.warn((String)"Unable to construct ServiceInfo instance", (Throwable)var11); } catch (InvocationTargetException var12) { LOGGER.warn((String)"Unable to construct ServiceInfo instance", (Throwable)var12); } return null; } private Object buildServiceInfoVersion3(String zone, int port, String name, Map properties) { try { Class<?>[] args = new Class[]{String.class, String.class, Integer.TYPE, Integer.TYPE, Integer.TYPE, Map.class}; Method serviceInfoCreateMethod = serviceInfoClass.getMethod("create", args); Object[] values = new Object[]{zone, name, Integer.valueOf(port), Integer.valueOf(0), Integer.valueOf(0), properties}; return serviceInfoCreateMethod.invoke((Object)null, values); } catch (IllegalAccessException var8) { LOGGER.warn((String)"Unable to invoke create method", (Throwable)var8); } catch (NoSuchMethodException var9) { LOGGER.warn((String)"Unable to find create method", (Throwable)var9); } catch (InvocationTargetException var10) { LOGGER.warn((String)"Unable to invoke create method", (Throwable)var10); } return null; } private static Object initializeJMDNS() { try { jmDNSClass = Class.forName("javax.jmdns.JmDNS"); serviceInfoClass = Class.forName("javax.jmdns.ServiceInfo"); boolean isVersion3 = false; try { jmDNSClass.getMethod("create", (Class[])null); isVersion3 = true; } catch (NoSuchMethodException var2) { ; } if(isVersion3) { return createJmDNSVersion3(); } return createJmDNSVersion1(); } catch (ClassNotFoundException var3) { LOGGER.warn((String)"JmDNS or serviceInfo class not found", (Throwable)var3); } catch (ExceptionInInitializerError var4) { LOGGER.warn((String)"JmDNS or serviceInfo class not found", (Throwable)var4); } return null; } }
[ "50463419+routerabfrage@users.noreply.github.com" ]
50463419+routerabfrage@users.noreply.github.com
17d0956e5a0b2bde9a09c94e09813cb9405fc690
c188408c9ec0425666250b45734f8b4c9644a946
/open-sphere-base/mantle/src/main/java/io/opensphere/mantle/transformer/impl/worker/ElementTransfomerMappedDataRetriever.java
18e9aab482a4315bf455d871c211766c9c825c89
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
rkausch/opensphere-desktop
ef8067eb03197c758e3af40ebe49e182a450cc02
c871c4364b3456685411fddd22414fd40ce65699
refs/heads/snapshot_5.2.7
2023-04-13T21:00:00.575303
2020-07-29T17:56:10
2020-07-29T17:56:10
360,594,280
0
0
Apache-2.0
2021-04-22T17:40:38
2021-04-22T16:58:41
null
UTF-8
Java
false
false
4,220
java
package io.opensphere.mantle.transformer.impl.worker; import java.util.List; import gnu.trove.map.hash.TLongObjectHashMap; import io.opensphere.core.Toolbox; import io.opensphere.core.model.time.TimeSpan; import io.opensphere.mantle.data.DataTypeInfo; import io.opensphere.mantle.data.cache.CacheEntryView; import io.opensphere.mantle.data.cache.CacheIdQuery; import io.opensphere.mantle.data.cache.CacheQueryException; import io.opensphere.mantle.data.cache.QueryAccessConstraint; import io.opensphere.mantle.data.element.MetaDataProvider; import io.opensphere.mantle.data.element.VisualizationState; import io.opensphere.mantle.data.element.impl.MDILinkedMetaDataProvider; import io.opensphere.mantle.data.geom.MapGeometrySupport; import io.opensphere.mantle.util.MantleToolboxUtils; /** * The Class ElementTransfomerDataRetriever. */ public class ElementTransfomerMappedDataRetriever extends AbstractElementTransfomerDataRetriever { /** The Id to element data map. */ private final TLongObjectHashMap<ElementData> myIdToElementDataMap; /** * Instantiates a new element transfomer data retriever. * * @param tb the tb * @param dti the dti * @param idsOfInterest the ids of interest * @param retrieveVS the retrieve vs * @param retrieveTSs the retrieve t ss * @param retrieveMDPs the retrieve md ps * @param retrieveMGS the retrieve mgs */ public ElementTransfomerMappedDataRetriever(Toolbox tb, DataTypeInfo dti, List<Long> idsOfInterest, boolean retrieveVS, boolean retrieveTSs, boolean retrieveMDPs, boolean retrieveMGS) { super(tb, dti, idsOfInterest, retrieveVS, retrieveTSs, retrieveMDPs, retrieveMGS); myIdToElementDataMap = new TLongObjectHashMap<>(idsOfInterest.size()); } /** * Clear. */ public void clear() { myIdToElementDataMap.clear(); } /** * Gets the data for the given id, after retrieval. * * @param id the id * @return the data */ public ElementData getData(long id) { return myIdToElementDataMap.get(id); } /** * Retrieve data. */ @Override public void retrieveData() { myIdToElementDataMap.clear(); MantleToolboxUtils.getMantleToolbox(getToolbox()).getDataElementCache().query(new RetrieveCacheIdQuery()); } /** * The Class RetrieveCacheIdQuery. */ private class RetrieveCacheIdQuery extends CacheIdQuery { /** * Instantiates a new retrieve cache id query. */ public RetrieveCacheIdQuery() { super(getIdsOfInterest(), new QueryAccessConstraint(false, isRetrieveVS(), false, isRetrieveMDPs(), isRetrieveMGSs())); } @Override public void finalizeQuery() { } @Override public void notFound(Long id) { myIdToElementDataMap.put(id.longValue(), new ElementData(id, null, null, null, null)); } @Override public void process(Long id, CacheEntryView entry) throws CacheQueryException { VisualizationState vs = null; MetaDataProvider mdp = null; MapGeometrySupport mgs = null; TimeSpan ts = null; if (isRetrieveTSs()) { ts = entry.getTime(); } if (isRetrieveMDPs() && entry.getLoadedElementData() != null && entry.getLoadedElementData().getMetaData() != null) { mdp = MDILinkedMetaDataProvider.createImmutableBackedMetaDataProvider(getDTI().getMetaDataInfo(), entry.getLoadedElementData().getMetaData()); } if (isRetrieveMGSs()) { mgs = entry.getLoadedElementData().getMapGeometrySupport(); } if (isRetrieveVS()) { vs = entry.getVisState(); } myIdToElementDataMap.put(id.longValue(), new ElementData(id, ts, vs, mdp, mgs)); } } }
[ "kauschr@opensphere.io" ]
kauschr@opensphere.io
eea6df24863bfeb38c73393d7007c31d2cd3089a
c3218f922b0720b982bde6c6199e7a079ba90fa5
/basic_learns/java_basic/개인OOP/완성/calendar/Schedule.java
2ca521a63715277993b24d967b98c37a883fdd2a
[]
no_license
dlawhdals999/old_archive
3aff78d00e4a0e33b57651a2aeaca3687481de2a
8d9761ad9d08338dfd37d49f089439805eaa1e31
refs/heads/master
2021-10-12T04:00:12.388321
2017-09-15T02:28:44
2019-02-01T14:30:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
361
java
package calendar; import java.io.Serializable; import java.util.List; public class Schedule implements Serializable{ private String date; private List<String> list; public Schedule(String date, List<String> list){ this.date = date; this.list = list; } public String getDate(){ return date; } public List<String> getList(){ return list; } }
[ "zaccoding725@gmail.com" ]
zaccoding725@gmail.com
525ad702acc8e10f31f34b88624b767466fd0ffc
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5652388522229760_0/java/Zygmunth/Main.java
9088960ce815389d3d9bacbb351bda8d5a902fa4
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
1,434
java
package me; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.math.BigInteger; import java.text.MessageFormat; import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) throws IOException { File file = new File("/Users/prv/IdeaProjects/CodeJam/in.txt"); FileWriter out = new FileWriter("/Users/prv/IdeaProjects/CodeJam/out.txt"); Scanner scanner = new Scanner(file); int caseCount = scanner.nextInt(); for (int i = 0; i < caseCount; i++) { BigInteger m = scanner.nextBigInteger(); BigInteger res = findAnswer(m); if (res != null) { out.write(MessageFormat.format("Case #{0,number,#}: {1,number,#}\n", i+1,res.longValueExact())); } else { out.write(MessageFormat.format("Case #{0,number,#}: INSOMNIA\n", i+1)); } } out.close(); } private static BigInteger findAnswer(BigInteger m) { BigInteger res = null; if (!m.equals(BigInteger.ZERO)) { Set<Integer> digits = new HashSet<>(); BigInteger n = BigInteger.ZERO; do { n = n.add(m); n.toString().chars().forEach(digits::add); } while (digits.size() != 10); res = n; } return res; } }
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
82b0d3501ec9128a8c3487b96fc4aa1995cfd44e
bd9d3ca2abac11c45a281075f7c5af9302d76644
/base-dist-shop-portal/src/main/java/com/towcent/dist/shop/portal/mall/vo/input/PayOrderCheckPayStatusIn.java
dfd3ad0a2d2870edf4950bee345310496d53a78c
[]
no_license
towcentTeam01/base-dist-shop
bf39c06541864949a7b981e07da67e8bad0df003
1f9f952f4afc14eb05e7d77e43b14c6adc84ba42
refs/heads/master
2020-04-08T18:18:10.585396
2018-11-29T06:57:49
2018-11-29T06:57:49
159,602,760
0
0
null
null
null
null
UTF-8
Java
false
false
514
java
package com.towcent.dist.shop.portal.mall.vo.input; import org.hibernate.validator.constraints.NotBlank; import javax.validation.constraints.NotNull; import com.towcent.dist.shop.portal.common.vo.BaseParam; import lombok.Data; /** * 2.4.3 检查订单状态 * @author huangtao * @version 0.0.1 */ @Data public class PayOrderCheckPayStatusIn extends BaseParam { private static final long serialVersionUID = 1L; @NotNull(message = "orderId不能为空.") private Integer orderId; // 订单Id }
[ "taohuanga@163.com" ]
taohuanga@163.com
7b5cbed9391251842897af20232c58c7a69f7181
ff13863ee629fe4c32799c69268e54c6ca29a68a
/study-generator/src/main/java/com/study/generator/action/config/AbstractGeneratorConfig.java
7f70adf76b272d632d8d2ffeaf6b6beb9868f6eb
[]
no_license
kitonGao/study-class
54cc527d8ddf5cbbe62c387472b391d59246d27f
bbb598b2408b10f08bfc30b27f043ba921e5feb6
refs/heads/master
2022-10-19T05:03:54.247596
2020-01-21T09:19:38
2020-01-21T09:19:38
235,055,360
0
0
null
2022-10-12T20:36:20
2020-01-20T08:41:58
Java
UTF-8
Java
false
false
3,387
java
package com.study.generator.action.config; import com.baomidou.mybatisplus.generator.AutoGenerator; import com.baomidou.mybatisplus.generator.config.DataSourceConfig; import com.baomidou.mybatisplus.generator.config.GlobalConfig; import com.baomidou.mybatisplus.generator.config.PackageConfig; import com.baomidou.mybatisplus.generator.config.StrategyConfig; import com.baomidou.mybatisplus.generator.config.po.TableInfo; import com.study.core.util.FileUtil; import com.study.generator.engine.SimpleTemplateEngine; import com.study.generator.engine.base.StudyTemplateEngine; import com.study.generator.engine.config.ContextConfig; import com.study.generator.engine.config.SqlConfig; import java.io.File; import java.util.List; /** * 代码生成器抽象配置 */ public abstract class AbstractGeneratorConfig { /*mybatis-plus 代码生成器配置*/ GlobalConfig globalConfig = new GlobalConfig(); DataSourceConfig dataSourceConfig = new DataSourceConfig(); StrategyConfig strategyConfig = new StrategyConfig(); PackageConfig packageConfig = new PackageConfig(); TableInfo tableInfo = null; /*Study 代码生成器配置*/ ContextConfig contextConfig = new ContextConfig(); SqlConfig sqlConfig = new SqlConfig(); protected abstract void config(); public void init() { config(); packageConfig.setService(contextConfig.getProPackage() + ".modular." + contextConfig.getModuleName() + ".service"); packageConfig.setServiceImpl(contextConfig.getProPackage() + ".modular." + contextConfig.getModuleName() + ".service.impl"); //controller没用掉,生成之后会自动删掉 packageConfig.setController("TTT"); if (!contextConfig.getEntitySwitch()) { packageConfig.setEntity("TTT"); } if (!contextConfig.getDaoSwitch()) { packageConfig.setMapper("TTT"); packageConfig.setXml("TTT"); } if (!contextConfig.getServiceSwitch()) { packageConfig.setService("TTT"); packageConfig.setServiceImpl("TTT"); } } /** * 删除不必要的代码 */ public void destory() { String outputDir = globalConfig.getOutputDir() + "/TTT"; FileUtil.deleteDir(new File(outputDir)); } public AbstractGeneratorConfig() { } public void doMpGeneration() { init(); AutoGenerator autoGenerator = new AutoGenerator(); autoGenerator.setGlobalConfig(globalConfig); autoGenerator.setDataSource(dataSourceConfig); autoGenerator.setStrategy(strategyConfig); autoGenerator.setPackageInfo(packageConfig); autoGenerator.execute(); destory(); //获取table信息,用于guns代码生成 List<TableInfo> tableInfoList = autoGenerator.getConfig().getTableInfoList(); if (tableInfoList != null && tableInfoList.size() > 0) { this.tableInfo = tableInfoList.get(0); } } public void doGunsGeneration() { StudyTemplateEngine GunsTemplateEngine = new SimpleTemplateEngine(); GunsTemplateEngine.setContextConfig(contextConfig); sqlConfig.setConnection(dataSourceConfig.getConn()); GunsTemplateEngine.setSqlConfig(sqlConfig); GunsTemplateEngine.setTableInfo(tableInfo); GunsTemplateEngine.start(); } }
[ "15822985265@163.com" ]
15822985265@163.com
00f0bc75c77db0ce7ac098909cd6d986770f07d5
d43a41079529348ffb737c5f0b2dcd9a14573ec7
/Java-Web-Basics/Exam-model/jsp/src/main/java/mishMash/domain/entities/BaseEntity.java
b4639d81c8689fab1a74889b8ecd11653afbec4c
[ "MIT" ]
permissive
IvayloIV/Java
4688071e052c1a11179306f6464492286fbf0a88
00952f83f43ea8d8b300fcc762c2dae458dc5860
refs/heads/master
2022-12-04T01:13:20.175961
2022-09-28T21:11:38
2022-09-28T21:11:38
192,743,500
0
1
MIT
2022-11-24T09:54:29
2019-06-19T14:00:10
Java
UTF-8
Java
false
false
652
java
package mishMash.domain.entities; import org.hibernate.annotations.GenericGenerator; import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.MappedSuperclass; @MappedSuperclass public abstract class BaseEntity { @Id @GeneratedValue(generator = "uuid-string") @GenericGenerator(name = "uuid-string", strategy = "org.hibernate.id.UUIDGenerator") @Column(name = "id", nullable = false, unique = true, updatable = false) private String id; public String getId() { return id; } public void setId(String id) { this.id = id; } }
[ "ivvo98@abv.bg" ]
ivvo98@abv.bg
fb375c76eca5b8abfe83c8a2b135c14ef2794ac7
283d45e5f6d6fb481493a561bb6494ac26d0c06e
/MMS2/src/com/naver/DeleteCommand.java
2e4fe2dd12fc3dd2b83cfbf0d72b810e060a19bf
[]
no_license
jingoon/JavaHome
c9a15fdb9e971854b9c94251811ed355b008584f
40ae0413e7e4fd3aea55401a45fc9d3c99376ff7
refs/heads/main
2023-02-12T10:36:11.787443
2021-01-13T00:10:50
2021-01-13T00:10:50
304,361,080
1
0
null
2020-10-15T15:33:47
2020-10-15T14:58:54
null
UHC
Java
false
false
474
java
package com.naver; import java.util.Scanner; public class DeleteCommand implements Command { @Override public void execute(Scanner sc) { System.out.println("회원 삭제를 시작합니다."); System.out.println("아이디를 입력하세요."); String mid = sc.nextLine(); MemberDTO dto = new MemberDTO(mid, null, null, null); MemberDAO dao = new MemberDAO(); dao.delete(dto); } @Override public String toString() { return "삭제"; } }
[ "parkman108@gmail.com" ]
parkman108@gmail.com