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
ba03e3a7ce13c1aea86b7491c42d91095ebeb498
c8bf1df473f0a1cf5d4bd58e697570a6803790a6
/codegen/src/main/java/org/exolab/castor/builder/conflictresolution/WarningViaDialogClassNameCRStrategy.java
e1273f5e95d00437eacf6de330d783f8409103a0
[]
no_license
j-white/hacked-castor
0adbe590c359fa5567856ea89e61541507800d76
6cd86a43f892643d15cfb089d34fc25cf49b6a69
refs/heads/master
2021-01-20T16:55:33.166799
2017-02-24T14:04:16
2017-02-24T14:04:16
82,838,036
0
1
null
2017-02-23T21:35:39
2017-02-22T18:20:40
Java
UTF-8
Java
false
false
7,318
java
/* * Copyright 2006 Werner Guttmann, Ralf Joachim * * 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.exolab.castor.builder.conflictresolution; import java.util.Enumeration; import org.exolab.castor.builder.SGStateInfo; import org.exolab.castor.builder.binding.XPathHelper; import org.exolab.castor.builder.info.ClassInfo; import org.exolab.castor.util.dialog.ConsoleDialog; import org.exolab.castor.xml.schema.Annotated; import org.exolab.castor.xml.schema.SchemaNames; import org.exolab.javasource.JClass; /** * An implementation of {@link ClassNameCRStrategy} that reports any conflict * notifications to a console dialog, asking the user whether to stop code * generation (as the conflict is not acceptable), or whether to proceed by * overwriting an already existing class. * * @author <a href="mailto:werner DOT guttmann AT gmx DOT net">Werner Guttmann</a> * @since 1.1 */ public final class WarningViaDialogClassNameCRStrategy extends BaseClassNameCRStrategy implements ClassNameCRStrategy { /** * Name of this strategy. */ public static final String NAME = "warnViaConsoleDialog"; /** * The {@link ConsoleDialog} instance to use for output. */ private ConsoleDialog _dialog; /** * Creates an instance of this name conflict resolution strategy, that will * use the specified {@link ConsoleDialog} instance to emit warnings to the * user and ask about an approach to deal with them. */ public WarningViaDialogClassNameCRStrategy() { // Nothing to do. } /** * Handle a class name conflict between newClassInfo and conflict. * * @param state SourceGeneration state * @param newClassInfo ClassInfo for the new class * @param conflict JClass for the existing class * @return the provided source generator state, as modified by the strategy * @see org.exolab.castor.builder.conflictresolution.ClassNameCRStrategy * #dealWithClassNameConflict(org.exolab.castor.builder.SGStateInfo, * org.exolab.castor.builder.info.ClassInfo, * org.exolab.javasource.JClass) */ public SGStateInfo dealWithClassNameConflict(final SGStateInfo state, final ClassInfo newClassInfo, final JClass conflict) { if (!state.getSuppressNonFatalWarnings()) { // -- if the ClassInfo are equal, we can just return ClassInfo oldClassInfo = state.resolve(conflict); if (oldClassInfo == newClassInfo) { return state; } // -- Find the Schema structures that are conflicting Annotated a1 = null; Annotated a2 = null; // Loop until we exhaust the Enumeration or until we have found both Enumeration enumeration = state.keys(); while (enumeration.hasMoreElements() && (a1 == null || a2 == null)) { Object key = enumeration.nextElement(); if (!(key instanceof Annotated)) { continue; } ClassInfo cInfo = state.resolve(key); if (newClassInfo == cInfo) { a1 = (Annotated) key; } else if (oldClassInfo == cInfo) { a2 = (Annotated) key; } } StringBuffer error = new StringBuffer(); error.append("Warning: A class name generation conflict has occured between "); if (a1 != null) { error.append(SchemaNames.getStructureName(a1)); error.append(" '"); error.append(XPathHelper.getSchemaLocation(a1)); } else { error.append(newClassInfo.getNodeTypeName()); error.append(" '"); error.append(newClassInfo.getNodeName()); } error.append("' and "); if (a2 != null) { error.append(SchemaNames.getStructureName(a2)); error.append(" '"); error.append(XPathHelper.getSchemaLocation(a2)); } else { error.append(oldClassInfo.getNodeTypeName()); error.append(" '"); error.append(oldClassInfo.getNodeName()); } error.append("'. Please use a Binding file to solve this problem."); error.append("Continue anyway [not recommended] "); char ch = _dialog .confirm(error.toString(), "yn", "y = yes, n = no"); if (ch == 'n') { state.setStatusCode(SGStateInfo.STOP_STATUS); } } return state; } /** * Returns the name of the strategy. * @return the name of the strategy. * @see org.exolab.castor.builder.conflictresolution.ClassNameCRStrategy#getName() */ public String getName() { return NAME; } /** * Sets the console dialog to use with this strategy. * * @param dialog the console dialog to use with this strategy. * @see org.exolab.castor.builder.conflictresolution.ClassNameCRStrategy# * setConsoleDialog(org.exolab.castor.util.dialog.ConsoleDialog) */ public void setConsoleDialog(final ConsoleDialog dialog) { this._dialog = dialog; } /** * Presents the user with a console dialog, asking for confirmation whether * an existing file should be overwritten (or not). * * @param filename the filename to potentially overwrite. * @return whether or not the file should be overwritten. * * @see org.exolab.castor.builder.conflictresolution.ClassNameCRStrategy * #dealWithFileOverwrite(java.lang.String, boolean) */ public boolean dealWithFileOverwrite(final String filename) { boolean allowPrinting = true; String message = filename + " already exists. overwrite"; char ch = _dialog.confirm(message, "yna", "y = yes, n = no, a = all"); switch (ch) { case 'a': getSingleClassGenerator().setPromptForOverwrite(false); allowPrinting = true; break; case 'y': allowPrinting = true; break; default: allowPrinting = false; break; } return allowPrinting; } /** * Returns the {@link ConsoleDialog} instance in use. * @return the {@link ConsoleDialog} used for output/feedback gathering. */ protected ConsoleDialog getConsoleDialog() { return this._dialog; } }
[ "jesse@opennms.org" ]
jesse@opennms.org
089d9aea6b8099dbc3ff64dcb94e22bbf2f0b42b
62e3f2e7c08c6e005c63f51bbfa61a637b45ac20
/B-Genius_AdFree/app/src/main/java/com/google/android/gms/ads/internal/overlay/o.java
f799aa3d7334f24a4e968b2aa0ae0ad2b0ae3747
[]
no_license
prasad-ankit/B-Genius
669df9d9f3746e34c3e12261e1a55cf5c59dd1c6
1139ec152b743e30ec0af54fe1f746b57b0152bf
refs/heads/master
2021-01-22T21:00:04.735938
2016-05-20T19:03:46
2016-05-20T19:03:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,095
java
package com.google.android.gms.ads.internal.overlay; import android.content.Context; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.view.ViewParent; import com.google.android.gms.b.is; public final class o { public final int a; public final ViewGroup.LayoutParams b; public final ViewGroup c; public final Context d; public o(is paramis) { this.b = paramis.getLayoutParams(); ViewParent localViewParent = paramis.getParent(); this.d = paramis.g(); if ((localViewParent != null) && ((localViewParent instanceof ViewGroup))) { this.c = ((ViewGroup)localViewParent); this.a = this.c.indexOfChild(paramis.b()); this.c.removeView(paramis.b()); paramis.a(true); return; } throw new m("Could not get the parent of the WebView for an overlay."); } } /* Location: C:\Users\KSHITIZ GUPTA\Downloads\apktool-install-windws\dex2jar-0.0.9.15\dex2jar-0.0.9.15\classes_dex2jar.jar * Qualified Name: com.google.android.gms.ads.internal.overlay.o * JD-Core Version: 0.6.0 */
[ "kshitiz1208@gmail.com" ]
kshitiz1208@gmail.com
6321bf3ffe87720af5573b88f69e2b81fd7457a9
edfb435ee89eec4875d6405e2de7afac3b2bc648
/tags/selenium-2.20.0/java/client/src/org/openqa/selenium/lift/find/XPathFinder.java
53287775e6528201ceedc5b8a33704e5b1033e80
[ "Apache-2.0" ]
permissive
Escobita/selenium
6c1c78fcf0fb71604e7b07a3259517048e584037
f4173df37a79ab6dd6ae3f1489ae0cd6cc7db6f1
refs/heads/master
2021-01-23T21:01:17.948880
2012-12-06T22:47:50
2012-12-06T22:47:50
8,271,631
1
0
null
null
null
null
UTF-8
Java
false
false
1,337
java
/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.find; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.hamcrest.Description; import java.util.Collection; /** * A {@link Finder} for elements using XPath expressions */ public class XPathFinder extends BaseFinder<WebElement, WebDriver> { private final String xpath; public XPathFinder(String xpath) { this.xpath = xpath; } @Override protected Collection<WebElement> extractFrom(WebDriver context) { return context.findElements(By.xpath(xpath)); } @Override protected void describeTargetTo(Description description) { description.appendText("XPath "); description.appendText(xpath); } }
[ "simon.m.stewart@07704840-8298-11de-bf8c-fd130f914ac9" ]
simon.m.stewart@07704840-8298-11de-bf8c-fd130f914ac9
b25478319dd596cf123a23c5ba5c4487e1b0ff92
311b4d8fb2e566002254df70e54a92a35554a1b4
/src/main/java/io/kaicode/elasticvc/domain/DomainEntity.java
f13d41c51ffc4054ad4018ea4ced952dff5978c6
[]
no_license
xiashuijun/elasticvc
5b54ef692a1f9ba9888e21ea425f9b8db58630e2
1bd7f881d45de40560ee35d94a5d5805903e4e2b
refs/heads/master
2021-01-20T07:15:49.089479
2017-08-23T21:56:45
2017-08-23T21:56:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
467
java
package io.kaicode.elasticvc.domain; import com.fasterxml.jackson.annotation.JsonIgnore; public abstract class DomainEntity<C> extends Entity { @JsonIgnore private boolean changed; public abstract String getId(); public abstract boolean isComponentChanged(C existingComponent); public void setChanged(boolean changed) { this.changed = changed; } public void markChanged() { setChanged(true); } public boolean isChanged() { return changed; } }
[ "kaikewley@gmail.com" ]
kaikewley@gmail.com
c2d3875855a5554511962c63e8878179e26ee59b
25cab8b40490573c4270fd076395ce099b84371a
/src/main/java/com/github/lindenb/jvarkit/tools/misc/VcfTail.java
c95c0e46e2543fc46706653d4e8fa8150b49a459
[ "MIT" ]
permissive
ssivilich/jvarkit
385a6c196fa871e21eca420b36a94d200892619b
5bf5e55768acffd5fa87dd682dc47e4c3e7fdd4b
refs/heads/master
2021-01-22T16:54:18.800985
2015-12-14T17:23:03
2015-12-14T17:23:03
47,995,461
1
0
null
2015-12-14T19:08:54
2015-12-14T19:08:52
null
UTF-8
Java
false
false
2,939
java
/* The MIT License (MIT) Copyright (c) 2014 Pierre Lindenbaum Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. History: * 2015 : moving to knime * 2014 : creation */ package com.github.lindenb.jvarkit.tools.misc; import java.io.IOException; import java.util.Collection; import java.util.LinkedList; import htsjdk.samtools.util.CloserUtil; import htsjdk.variant.variantcontext.VariantContext; import htsjdk.variant.variantcontext.writer.VariantContextWriter; import htsjdk.variant.vcf.VCFHeader; import com.github.lindenb.jvarkit.util.picard.SAMSequenceDictionaryProgress; import com.github.lindenb.jvarkit.util.vcf.VcfIterator; public class VcfTail extends AbstractVcfTail { public VcfTail() { } @Override public Collection<Throwable> initializeKnime() { if(this.count<0) return wrapException("bad value for count "+this.count); return super.initializeKnime(); } @Override protected Collection<Throwable> doVcfToVcf(String inputName, VcfIterator in, VariantContextWriter out) throws IOException { try { final VCFHeader header=in.getHeader(); final VCFHeader h2= addMetaData(new VCFHeader(header)); final SAMSequenceDictionaryProgress progess=new SAMSequenceDictionaryProgress(header); out.writeHeader(h2); final LinkedList<VariantContext> L=new LinkedList<VariantContext>(); while(in.hasNext() && L.size()< this.count && !out.checkError()) { L.add(progess.watch(in.next())); } while(in.hasNext()) { L.add(progess.watch(in.next())); L.removeFirst(); } for(VariantContext ctx:L) { out.add(ctx); } progess.finish(); return RETURN_OK; } finally { CloserUtil.close(out); out=null; } } @Override protected Collection<Throwable> call(String inputName) throws Exception { return doVcfToVcf(inputName); } public static void main(String[] args) { new VcfTail().instanceMainWithExit(args); } }
[ "plindenbaum@yahoo.fr" ]
plindenbaum@yahoo.fr
f879bcca8b8ad892ac04fc0832ba28875d85e964
a7d1be14d77fa4dbe363d8b1faf167ae29024968
/sources/src/main/java/net/minecraft/server/NBTBase.java
d10c22edcb92a34a7d65341aacfbcb58d627b058
[]
no_license
Weefle/Torch
efd9bc492c107c8c957170ac5462632f80311ba1
c5f5646f92f21c427d065d153406dd3f33e1b725
refs/heads/master
2021-01-20T14:43:19.973672
2017-05-07T16:36:35
2017-05-07T16:36:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,358
java
package net.minecraft.server; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; public abstract class NBTBase { public static final String[] a = new String[] { "END", "BYTE", "SHORT", "INT", "LONG", "FLOAT", "DOUBLE", "BYTE[]", "STRING", "LIST", "COMPOUND", "INT[]"}; abstract void write(DataOutput dataoutput) throws IOException; abstract void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException; @Override public abstract String toString(); public abstract byte getTypeId(); protected static java.util.concurrent.ConcurrentHashMap<String, String> storedStrings = new java.util.concurrent.ConcurrentHashMap<String, String>(16, 0.75f, 2); public static String getStoredString(String name, boolean store) { String cachedString = storedStrings.get(name); if(cachedString == null) { if(store) storedStrings.put(name, name); cachedString = name; } return cachedString; } protected NBTBase() {} protected static NBTBase createTag(byte b0) { switch (b0) { case 0: return new NBTTagEnd(); case 1: return new NBTTagByte(); case 2: return new NBTTagShort(); case 3: return new NBTTagInt(); case 4: return new NBTTagLong(); case 5: return new NBTTagFloat(); case 6: return new NBTTagDouble(); case 7: return new NBTTagByteArray(); case 8: return new NBTTagString(); case 9: return new NBTTagList(); case 10: return new NBTTagCompound(); case 11: return new NBTTagIntArray(); default: return null; } } @Override public abstract NBTBase clone(); public boolean isEmpty() { return false; } @Override public boolean equals(Object object) { if (!(object instanceof NBTBase)) { return false; } else { NBTBase nbtbase = (NBTBase) object; return this.getTypeId() == nbtbase.getTypeId(); } } @Override public int hashCode() { return this.getTypeId(); } protected String c_() { return this.toString(); } }
[ "i@omc.hk" ]
i@omc.hk
27679cdde21d23f1994e9ff1bdeb3ffb63a3fd8a
280f407df0b7d3c80eea26552491ba256eac4761
/src/test/java/org/assertj/core/internal/maps/Maps_assertDoesNotContainValue_Test.java
ad57e169f691142c70929e73a5d9358c06fa8d8b
[ "Apache-2.0" ]
permissive
szpak-forks/assertj-core
37be458d067dff9a84d57effd3036de2e4ded1cc
94a2fbbc2b689445a02613e36b5178cac06ecd5f
refs/heads/master
2021-06-21T00:24:00.993909
2014-12-22T10:05:20
2014-12-22T10:12:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,557
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. * * Copyright 2012-2014 the original author or authors. */ package org.assertj.core.internal.maps; import static org.assertj.core.data.MapEntry.entry; import static org.assertj.core.error.ShouldNotContainValue.shouldNotContainValue; import static org.assertj.core.test.Maps.mapOf; import static org.assertj.core.test.TestData.someInfo; import static org.assertj.core.test.TestFailures.failBecauseExpectedAssertionErrorWasNotThrown; import static org.assertj.core.util.FailureMessages.actualIsNull; import static org.mockito.Mockito.verify; import java.util.Map; import org.assertj.core.api.AssertionInfo; import org.assertj.core.internal.Maps; import org.assertj.core.internal.MapsBaseTest; import org.junit.Before; import org.junit.Test; /** * Tests for <code>{@link Maps#assertDoesNotContainValue(AssertionInfo, Map, Object)}</code>. * * @author Nicolas François * @author Joel Costigliola */ public class Maps_assertDoesNotContainValue_Test extends MapsBaseTest { @SuppressWarnings("unchecked") @Override @Before public void setUp() { super.setUp(); actual = (Map<String, String>) mapOf(entry("name", "Yoda"), entry("color", "green")); } @Test public void should_pass_if_actual_contains_given_value() { maps.assertDoesNotContainValue(someInfo(), actual, "veryOld"); } @Test public void should_fail_if_actual_is_null() { thrown.expectAssertionError(actualIsNull()); maps.assertDoesNotContainValue(someInfo(), null, "veryOld"); } @Test public void should_success_if_value_is_null() { maps.assertDoesNotContainValue(someInfo(), actual, null); } @Test public void should_fail_if_actual_does_not_contain_value() { AssertionInfo info = someInfo(); String value = "Yoda"; try { maps.assertDoesNotContainValue(info, actual, value); } catch (AssertionError e) { verify(failures).failure(info, shouldNotContainValue(actual, value)); return; } failBecauseExpectedAssertionErrorWasNotThrown(); } }
[ "joel.costigliola@gmail.com" ]
joel.costigliola@gmail.com
121001b6ff2c6f83f496703bed382f792dfaa4c3
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/java/je-6.4.25/test/com/sleepycat/je/rep/ReplicationGroupTest.java
5996a8926a86492bd0012e315aa3472c62a4f549
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
714
java
package com.sleepycat.je.rep; import static org.hamcrest.core.AnyOf.anyOf; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThat; import static com.sleepycat.je.rep.ReplicatedEnvironment.State.MASTER; import java.util.Set; import org.junit.Test; import com.sleepycat.je.rep.impl.RepTestBase; import com.sleepycat.je.rep.monitor.Monitor; import com.sleepycat.je.rep.monitor.MonitorConfig; import com.sleepycat.je.rep.utilint.RepTestUtils; import com.sleepycat.je.rep.utilint.RepTestUtils.RepEnvInfo; public class ReplicationGroupTest extends RepTestBase
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
be0d4eefc9570487e439299e308593832c5f5ae7
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_7114.java
27133fb505aa47b13e866bfecebe59e134556ade
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
151
java
package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_7114 { }
[ "sebastien.lesaint@gmail.com" ]
sebastien.lesaint@gmail.com
35d68325abd3f87ed242185854cc7a319e37e6ff
31d41174d056e5d7bd926e773b3d2a7edd107aea
/src/main/java/com/sztouyun/advertisingsystem/viewmodel/adProfitShare/BaseStoreProfitStreamViewModel.java
2203813b166303e9f876d4bee6b5e7b84e9432f2
[]
no_license
foxbabe/ads
76ed0bb60ca93c9bb2ef0feec4dfdf60adf8a6bb
713d8abd599830180ad37dbc07892dae470e07e5
refs/heads/master
2020-04-07T07:57:31.790305
2018-11-08T03:06:26
2018-11-08T03:06:26
158,195,619
1
0
null
2018-11-19T09:31:47
2018-11-19T09:31:46
null
UTF-8
Java
false
false
7,435
java
package com.sztouyun.advertisingsystem.viewmodel.adProfitShare; import com.fasterxml.jackson.annotation.JsonFormat; import com.sztouyun.advertisingsystem.common.Constant; import com.sztouyun.advertisingsystem.model.common.ComparisonTypeEnum; import com.sztouyun.advertisingsystem.model.common.UnitEnum; import com.sztouyun.advertisingsystem.utils.EnumUtils; import com.sztouyun.advertisingsystem.utils.NumberFormatUtil; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.Date; /** * 收益流水(返回) * @author guangpu.yan * @create 2018-01-11 9:43 **/ @ApiModel public class BaseStoreProfitStreamViewModel { @ApiModelProperty(value = "收益流水id") private String id; @ApiModelProperty(value = "门店id") private String storeId; @ApiModelProperty(value = "门店名称") private String storeName; @ApiModelProperty(value = "日期") @JsonFormat(pattern = "yyyy年MM月dd日", timezone = "GMT+8") private Date profitDate; @ApiModelProperty(value = "开机是否达标") private boolean openingTimeStandardIs; @ApiModelProperty(value = "订单是否达标") private boolean orderStandardIs; @ApiModelProperty(value = "开机时长") private Double openingTime = 0D; @ApiModelProperty(value = "开店天数是否达标") private boolean storeCreatedTimeStandardIs; @ApiModelProperty(value = "当天月平均订单数") private Double orderNum; @ApiModelProperty(value = "开机标准值") private Double openingTimeStandard; @ApiModelProperty(value = "月平均订单标准值") private Double orderStandard; @ApiModelProperty(value = "开机时长单位") private Integer openingTimeUnit; @ApiModelProperty(value = "开机时长单位") private String openingTimeUnitName; @ApiModelProperty(value = "订单数量单位") private Integer orderUnit; @ApiModelProperty(value = "订单数量单位") private String orderUnitName; @ApiModelProperty(value = "开机时长比较类型") private Integer openingTimeComparisonType; @ApiModelProperty(value = "开机时长比较类型") private String openingTimeComparisonTypeName; @ApiModelProperty(value = "订单数量比较类型") private Integer orderComparisonType; @ApiModelProperty(value = "订单数量比较类型") private String orderComparisonTypeName; @ApiModelProperty(value = "是否结算") private Boolean settled; @ApiModelProperty(value = "分成金额") private Double shareAmount; @ApiModelProperty(value = "开店时间, 按照格式 **小时**分钟 显示") private String openingTimeConvert; public String getOpeningTimeConvert() { return openingTimeConvert; } public void setOpeningTimeConvert(String openingTimeConvert) { this.openingTimeConvert = openingTimeConvert; } public String getStoreId() { return storeId; } public void setStoreId(String storeId) { this.storeId = storeId; } public Date getProfitDate() { return profitDate; } public void setProfitDate(Date profitDate) { this.profitDate = profitDate; } public boolean isOpeningTimeStandardIs() { return openingTimeStandardIs; } public void setOpeningTimeStandardIs(boolean openingTimeStandardIs) { this.openingTimeStandardIs = openingTimeStandardIs; } public boolean isOrderStandardIs() { return orderStandardIs; } public void setOrderStandardIs(boolean orderStandardIs) { this.orderStandardIs = orderStandardIs; } public Double getOpeningTime() { return openingTime; } public void setOpeningTime(Double openingTime) { this.openingTime = openingTime; } public Double getOrderNum() { return orderNum; } public void setOrderNum(Double orderNum) { this.orderNum = orderNum; } public Double getOpeningTimeStandard() { return openingTimeStandard; } public void setOpeningTimeStandard(Double openingTimeStandard) { this.openingTimeStandard = openingTimeStandard; } public Double getOrderStandard() { return orderStandard; } public void setOrderStandard(Double orderStandard) { this.orderStandard = orderStandard; } public Integer getOpeningTimeUnit() { return openingTimeUnit; } public void setOpeningTimeUnit(Integer openingTimeUnit) { this.openingTimeUnit = openingTimeUnit; } public Integer getOrderUnit() { return orderUnit; } public void setOrderUnit(Integer orderUnit) { this.orderUnit = orderUnit; } public Integer getOpeningTimeComparisonType() { return openingTimeComparisonType; } public void setOpeningTimeComparisonType(Integer openingTimeComparisonType) { this.openingTimeComparisonType = openingTimeComparisonType; } public Integer getOrderComparisonType() { return orderComparisonType; } public void setOrderComparisonType(Integer orderComparisonType) { this.orderComparisonType = orderComparisonType; } public String getOpeningTimeUnitName() { return openingTimeUnit==null?null:EnumUtils.toEnum(this.openingTimeUnit, UnitEnum.class).getDisplayName(); } public void setOpeningTimeUnitName(String openingTimeUnitName) { this.openingTimeUnitName = openingTimeUnitName; } public String getOrderUnitName() { return orderUnit==null?null:EnumUtils.toEnum(this.orderUnit, UnitEnum.class).getDisplayName(); } public void setOrderUnitName(String orderUnitName) { this.orderUnitName = orderUnitName; } public String getOpeningTimeComparisonTypeName() { return openingTimeComparisonType==null?null:EnumUtils.toEnum(this.openingTimeComparisonType, ComparisonTypeEnum.class).getDisplayName(); } public void setOpeningTimeComparisonTypeName(String openingTimeComparisonTypeName) { this.openingTimeComparisonTypeName = openingTimeComparisonTypeName; } public String getOrderComparisonTypeName() { return orderComparisonType==null?null:EnumUtils.toEnum(this.orderComparisonType, ComparisonTypeEnum.class).getDisplayName(); } public void setOrderComparisonTypeName(String orderComparisonTypeName) { this.orderComparisonTypeName = orderComparisonTypeName; } public String getStoreName() { return storeName; } public void setStoreName(String storeName) { this.storeName = storeName; } public String getId() { return id; } public void setId(String id) { this.id = id; } public Boolean getSettled() { return settled; } public void setSettled(Boolean settled) { this.settled = settled; } public boolean isStoreCreatedTimeStandardIs() { return storeCreatedTimeStandardIs; } public void setStoreCreatedTimeStandardIs(boolean storeCreatedTimeStandardIs) { this.storeCreatedTimeStandardIs = storeCreatedTimeStandardIs; } public String getShareAmount() { return NumberFormatUtil.format(shareAmount, Constant.SCALE_TWO); } public void setShareAmount(Double shareAmount) { this.shareAmount = shareAmount; } }
[ "lihf@sina.cn" ]
lihf@sina.cn
a385d2935414b35bf2d9609b9032cdbfd1a42cc5
f932bc7baf8cfcdbd3764d70927d90f18fc1e32c
/agent/core/src/test/java/org/glowroot/agent/weaving/targets/GenericMiscImpl.java
55898bdac4cf9a67938c14eae657cc23370b3e75
[ "Apache-2.0" ]
permissive
chakra-coder/glowroot
e459ee825e0d55dbaede9e526b558236d3357504
1aad8e83013c48c77814eac7b42d711cae2e8751
refs/heads/master
2021-06-04T04:22:43.452703
2016-09-08T07:10:20
2016-09-08T07:10:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
885
java
/* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.glowroot.agent.weaving.targets; public class GenericMiscImpl implements GenericMisc<String> { @Override public void execute1(String str) {} @Override public void execute2(String obj) {} @Override public void execute2(Number obj) {} }
[ "trask.stalnaker@gmail.com" ]
trask.stalnaker@gmail.com
85557c65783b6d0c257affd8386f809c845e4c4f
b93d57689aaffb81272234a194d159c3b8a6d304
/gulimall-member/src/main/java/com/lloyvet/gulimall/member/entity/MemberEntity.java
e071c857012f05a4aaa81a05327905991a7250f5
[]
no_license
lloyvet/gulimall
2dc70f4bde5aa7eefa10d88e245e20e2516adba9
bc3f70d3583cb009e60efc68420beb5e904e3ad1
refs/heads/master
2023-01-02T13:17:10.705695
2020-10-27T16:19:29
2020-10-27T16:19:29
299,475,874
0
0
null
null
null
null
UTF-8
Java
false
false
1,330
java
package com.lloyvet.gulimall.member.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.util.Date; import lombok.Data; /** * 会员 * * @author lloyvet * @email 1924143976@qq.com * @date 2020-10-08 10:55:07 */ @Data @TableName("ums_member") public class MemberEntity implements Serializable { private static final long serialVersionUID = 1L; /** * id */ @TableId private Long id; /** * 会员等级id */ private Long levelId; /** * 用户名 */ private String username; /** * 密码 */ private String password; /** * 昵称 */ private String nickname; /** * 手机号码 */ private String mobile; /** * 邮箱 */ private String email; /** * 头像 */ private String header; /** * 性别 */ private Integer gender; /** * 生日 */ private Date birth; /** * 所在城市 */ private String city; /** * 职业 */ private String job; /** * 个性签名 */ private String sign; /** * 用户来源 */ private Integer sourceType; /** * 积分 */ private Integer integration; /** * 成长值 */ private Integer growth; /** * 启用状态 */ private Integer status; /** * 注册时间 */ private Date createTime; }
[ "1924143976@qq.com" ]
1924143976@qq.com
fd8c3e01bfe85b967ea54615153e9e6495a22567
22c44e037b9a9450c1e697d5ec27f9a128e07c30
/app/src/main/java/xinlan/com/AiAoBi/adapter/RecAdapter.java
7f16b9103eedcc43509d4e18e69eba603622521c
[]
no_license
Superingxz/AiAoBi
6f96016ea2f8d33ea4ddc64f9e66e33bf308312a
623881643e5b32b56adbaf67fe4a21461d0c02df
refs/heads/master
2021-01-13T16:24:11.967488
2017-03-06T08:17:15
2017-03-06T08:17:15
79,703,494
0
0
null
null
null
null
UTF-8
Java
false
false
1,572
java
package xinlan.com.AiAoBi.adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import java.util.List; import xinlan.com.AiAoBi.R; import xinlan.com.AiAoBi.home.enity.MyUnderclerkInfo; /** * Created by Administrator on 2016/10/11. */ public class RecAdapter extends RecyclerView.Adapter<RecAdapter.MyViewHodler> { private Context context; private List<MyUnderclerkInfo> list; public RecAdapter(Context context, List list) { this.context = context; this.list=list; } @Override public MyViewHodler onCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.from(context).inflate(R.layout.rec_adapter, parent, false); return new MyViewHodler(view); } @Override public void onBindViewHolder(MyViewHodler holder, int position) { holder.name.setText(list.get(position).getName()); holder.msg.setText(list.get(position).getMsg()); } @Override public int getItemCount() { return list.size(); } class MyViewHodler extends RecyclerView.ViewHolder{ private TextView name; private TextView msg; public MyViewHodler(View itemView) { super(itemView); msg= (TextView) itemView.findViewById(R.id.recadapter_msg); name= (TextView) itemView.findViewById(R.id.recadapter_name); } } }
[ "549856098@qq.com" ]
549856098@qq.com
c67ec5ff359d0e5abe5380d83bf2cea140b3a914
d0f2e170d8b8c14339ccdbd9f6caedc7f5521849
/src/main/java/com/puc/tcc/vendas/repository/ProdutoRepository.java
fec87fe9d624444b2ac21ca22b3746a607eabe52
[]
no_license
matheustf/tcc-vendas
7e566ed2147a744ae2e09bdba06e5485cf4e7356
557960b5a8cbcf746dd4f46b34170236463f2ed5
refs/heads/master
2020-03-24T11:43:33.815287
2018-10-16T12:51:27
2018-10-16T12:51:27
142,693,561
0
1
null
null
null
null
UTF-8
Java
false
false
1,556
java
package com.puc.tcc.vendas.repository; import java.util.List; import java.util.Optional; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import com.puc.tcc.vendas.entity.Produto; @Repository public interface ProdutoRepository extends CrudRepository<Produto, Long> { public Optional<Produto> findById(Long id); public Optional<Produto> findByCodigoDoProduto(String codigo); @Query( value = "SELECT p.* from Produto p where p.aprovado=1", nativeQuery = true) public List<Produto> findProdutosDisponiveis(); //@Query( "SELECT * from Produto p where p.codigoDoProduto in :codigosDosProdutos") //public List<Produto> bucarProdutosPorCodigo(@Param("codigosDosProdutos") List<String> codigosDosProdutos); List<Produto> findByCodigoDoProdutoIn(List<String> codigosDosProdutos); @Query( value = "SELECT p.* from Produto p where p.codigoDoFornecedor=:codigoDoFornecedor", nativeQuery = true) List<Produto> buscarProdutosDoFornecedor(String codigoDoFornecedor); @Query( value = "SELECT p.* from Produto p where p.disponivelNoEstoque = 0 and p.codigoDoFornecedor=:codigoDoFornecedor", nativeQuery = true) List<Produto> buscarProdutosDoFornecedorIndisponiveis(String codigoDoFornecedor); @Query( value = "SELECT p.* from Produto p where p.disponivelNoEstoque = 1 and p.codigoDoFornecedor=:codigoDoFornecedor", nativeQuery = true) List<Produto> buscarProdutosDoFornecedorDisponiveis(String codigoDoFornecedor); }
[ "teles.matheus@hotmail.com" ]
teles.matheus@hotmail.com
aea77df1afa35d96006d90aca5c060c52fa7874d
941cb164c35d531de510e4aa95872711d3405e39
/app/src/main/java/sinia/com/baihangeducation/release/view/ISendReleaseJobView.java
9ff6fc70e504502d6bd021776e13870201979a41
[]
no_license
lenka123123/jy
f81220d6f80cca4fde5872b4e3cb992abb5171b8
2a2fc5d675ec01fd45a3950f1adeb9bcea081c7a
refs/heads/master
2020-03-28T00:50:19.854060
2018-11-30T06:15:47
2018-11-30T06:15:47
147,453,961
1
0
null
null
null
null
UTF-8
Java
false
false
2,868
java
package sinia.com.baihangeducation.release.view; import com.example.framwork.base.BaseView; public interface ISendReleaseJobView extends BaseView { /** * 职位类别:1、全职,2、兼职 * @return */ String getReleaseType(); /** * 职位类型编号 多个英文逗号分隔 * @return */ String getJobTypeIds(); /** * 职位标签编号 多个英文逗号分隔 * @return */ String getTagIds(); /** * 所属行业 * @return */ String getIndustryId(); /** * 职位名称 * @return */ String getReleaseTitle(); /** * 职位内容 * @return */ String getReleaseContent(); /** * 最低招聘人数 * @return */ String getNumLower(); /** * 最高招聘人数 * @return */ String getNumUpper(); /** * 薪资类型编号 * @return */ String getMoneyType(); /** * 最低工资( 仅全职传递 ) * @return */ String getMoneyLower(); /** * 最高工资( 仅全职传递 ) * @return */ String getMoneyUpper(); /** * 语言要求 * @return */ String getLanguage(); /** * 学历编号 * @return */ String getEducationId(); /** * 工作经验编号 * @return */ String getExperienceId(); /** * 性别编号 * @return */ String getSexId(); /** * 开始日期 ( 仅兼职传递 ) * @return */ String getDateStart(); /** * 结束日期 ( 仅兼职传递 ) * @return */ String getDateEnd(); /** * 工作开始时间 * @return */ String getTimeStart(); /** * 工作结束时间 * @return */ String getTimeEnd(); /** * 省份编号 * @return */ String getProvId(); /** * 市编号 * @return */ String getReleaseCityId(); /** * 区县编号 * @return */ String getDistId(); /** * 详细地址 * @return */ String getAddress(); /** * 联系人 * @return */ String getLinkPerson(); /** * 联系电话 * @return */ String getLinkPhone(); /** * 编辑专有键值 * @return */ String getEditID(); /** * 发布成功 */ void getReleaseSuccess(); void getReleaseFail(); String getAgeLower(); String getAgeUpper(); String getGender(); String getExp(); String getSalaryType(); String getJobType(); String getJobTag(); String getIsContinue(); String getTimeGroup(); String getLinkType(); String getContant(); String getIsInterview(); String getJobTime(); }
[ "13902276741@163.com" ]
13902276741@163.com
ad98486cdcbbbf98b872020c4200c0aa81088285
447a8a274c4be8b27fc442bcb181894d0dd7fa54
/bundles/sirix-core/src/main/java/org/sirix/node/DeweyIDMappingNode.java
696f3521e870697dd9e32b52e1c9e3041f1925da
[ "BSD-3-Clause" ]
permissive
clojj/sirix
c012c9776d78f63e3b4909212ecabe0534b5246c
23d3d4a312feb77a363f38b479daf6168641080b
refs/heads/master
2020-07-09T19:38:37.749873
2019-08-17T12:09:24
2019-08-17T12:09:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package org.sirix.node; import static com.google.common.base.Preconditions.checkNotNull; import org.sirix.node.delegates.NodeDelegate; /** * If a node is deleted, it will be encapsulated over this class. * * @author Sebastian Graf * */ public final class DeweyIDMappingNode extends AbstractForwardingNode { /** * Delegate for common data. */ private final NodeDelegate mDelegate; /** * Constructor. * * @param nodeDelegate node delegate */ public DeweyIDMappingNode(final NodeDelegate nodeDelegate) { mDelegate = checkNotNull(nodeDelegate); } @Override public Kind getKind() { return Kind.DEWEYIDMAPPING; } @Override protected NodeDelegate delegate() { return mDelegate; } }
[ "lichtenberger.johannes@gmail.com" ]
lichtenberger.johannes@gmail.com
023cc4bb6d9966ddd3bd3d8ee81c2076904267d4
7543eb6be4db4124084b6eac0b26131bcdfea563
/sources/com/google/android/gms/internal/zd.java
abf072a39e153dedc7e185d2289f4218fb8bc37b
[]
no_license
n0misain/6-1_source_from_JADX
bea3bc861ba84c62c27231e7bcff6df49e2f21c9
e0e00915f0b376e7c1d0c162bf7d6697153ce7b1
refs/heads/master
2022-07-19T05:28:02.911308
2020-05-17T00:12:26
2020-05-17T00:12:26
264,563,027
0
0
null
null
null
null
UTF-8
Java
false
false
7,841
java
package com.google.android.gms.internal; import android.util.Base64; import com.google.android.gms.tasks.Task; import com.google.android.gms.tasks.TaskCompletionSource; import com.google.firebase.database.DatabaseException; import com.google.firebase.database.DatabaseReference.CompletionListener; import io.fabric.sdk.android.services.common.CommonUtils; import io.fabric.sdk.android.services.network.HttpRequest; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; import java.security.MessageDigest; public final class zd { private static final char[] zzcjC = "0123456789abcdef".toCharArray(); public static void zzaF(boolean z) { zzb(z, ""); } public static za<Task<Void>, CompletionListener> zzb(CompletionListener completionListener) { if (completionListener != null) { return new za(null, completionListener); } TaskCompletionSource taskCompletionSource = new TaskCompletionSource(); return new za(taskCompletionSource.getTask(), new ze(taskCompletionSource)); } public static void zzb(boolean z, String str) { if (!z) { String str2 = "hardAssert failed: "; String valueOf = String.valueOf(str); throw new AssertionError(valueOf.length() != 0 ? str2.concat(valueOf) : new String(str2)); } } public static zb zzgX(String str) throws DatabaseException { try { int indexOf = str.indexOf("//"); if (indexOf == -1) { throw new URISyntaxException(str, "Invalid scheme specified"); } String valueOf; int indexOf2 = str.substring(indexOf + 2).indexOf("/"); if (indexOf2 != -1) { indexOf = (indexOf + 2) + indexOf2; String[] split = str.substring(indexOf).split("/"); StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < split.length; i++) { if (!split[i].equals("")) { stringBuilder.append("/"); stringBuilder.append(URLEncoder.encode(split[i], HttpRequest.CHARSET_UTF8)); } } String valueOf2 = String.valueOf(str.substring(0, indexOf)); valueOf = String.valueOf(stringBuilder.toString()); valueOf = valueOf.length() != 0 ? valueOf2.concat(valueOf) : new String(valueOf2); } else { valueOf = str; } URI uri = new URI(valueOf); valueOf = uri.getPath().replace("+", " "); zf.zzhc(valueOf); qr qrVar = new qr(valueOf); valueOf = uri.getScheme(); rx rxVar = new rx(); rxVar.host = uri.getHost().toLowerCase(); indexOf = uri.getPort(); if (indexOf != -1) { rxVar.secure = valueOf.equals("https"); valueOf = String.valueOf(rxVar.host); rxVar.host = new StringBuilder(String.valueOf(valueOf).length() + 12).append(valueOf).append(":").append(indexOf).toString(); } else { rxVar.secure = true; } rxVar.zzbxU = rxVar.host.split("\\.")[0].toLowerCase(); rxVar.zzceq = rxVar.host; zb zbVar = new zb(); zbVar.zzbZf = qrVar; zbVar.zzbYW = rxVar; return zbVar; } catch (Throwable e) { throw new DatabaseException("Invalid Firebase Database url specified", e); } catch (Throwable e2) { throw new DatabaseException("Failed to URLEncode the path", e2); } } public static String zzgY(String str) { try { MessageDigest instance = MessageDigest.getInstance(CommonUtils.SHA1_INSTANCE); instance.update(str.getBytes(HttpRequest.CHARSET_UTF8)); return Base64.encodeToString(instance.digest(), 2); } catch (Throwable e) { throw new RuntimeException("Missing SHA-1 MessageDigest provider.", e); } catch (UnsupportedEncodingException e2) { throw new RuntimeException("UTF-8 encoding is required for Firebase Database to run!"); } } public static String zzgZ(String str) { String replace = str.indexOf(92) != -1 ? str.replace("\\", "\\\\") : str; if (str.indexOf(34) != -1) { replace = replace.replace("\"", "\\\""); } return new StringBuilder(String.valueOf(replace).length() + 2).append("\"").append(replace).append("\"").toString(); } public static Integer zzha(String str) { int i = 1; int i2 = 0; if (str.length() > 11 || str.length() == 0) { return null; } if (str.charAt(0) != '-') { i = 0; } else if (str.length() == 1) { return null; } else { i2 = 1; } long j = 0; for (i2 = /* Method generation error in method: com.google.android.gms.internal.zd.zzha(java.lang.String):java.lang.Integer, dex: classes.dex jadx.core.utils.exceptions.CodegenException: Error generate insn: PHI: (r1_3 'i2' int) = (r1_2 'i2' int), (r1_0 'i2' int) binds: {(r1_2 'i2' int)=B:10:0x0023, (r1_0 'i2' int)=B:29:0x0066} in method: com.google.android.gms.internal.zd.zzha(java.lang.String):java.lang.Integer, dex: classes.dex at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:226) at jadx.core.codegen.RegionGen.makeLoop(RegionGen.java:184) at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:61) at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:87) at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:53) at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:87) at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:53) at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:87) at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:53) at jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:187) at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:320) at jadx.core.codegen.ClassGen.addMethods(ClassGen.java:257) at jadx.core.codegen.ClassGen.addClassBody(ClassGen.java:220) at jadx.core.codegen.ClassGen.addClassCode(ClassGen.java:110) at jadx.core.codegen.ClassGen.makeClass(ClassGen.java:75) at jadx.core.codegen.CodeGen.visit(CodeGen.java:12) at jadx.core.ProcessClass.process(ProcessClass.java:40) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200) at jadx.api.JadxDecompiler$$Lambda$8/574268151.run(Unknown Source) Caused by: jadx.core.utils.exceptions.CodegenException: PHI can be used only in fallback mode at jadx.core.codegen.InsnGen.fallbackOnlyInsn(InsnGen.java:537) at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:509) at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:220) ... 20 more */ public static int zzj(long j, long j2) { return j < j2 ? -1 : j == j2 ? 0 : 1; } public static String zzj(double d) { StringBuilder stringBuilder = new StringBuilder(16); long doubleToLongBits = Double.doubleToLongBits(d); for (int i = 7; i >= 0; i--) { int i2 = (int) ((doubleToLongBits >>> (i << 3)) & 255); int i3 = (i2 >> 4) & 15; i2 &= 15; stringBuilder.append(zzcjC[i3]); stringBuilder.append(zzcjC[i2]); } return stringBuilder.toString(); } public static int zzo(int i, int i2) { return i < i2 ? -1 : i == i2 ? 0 : 1; } }
[ "jaycrandell3@gmail.com" ]
jaycrandell3@gmail.com
b3b8ee5495befd67506cfb33a2cda61d34c0ae1b
d7f50b57dfd5fa6b8b9514af43af601f66351d09
/core-api/src/main/java/org/apache/directory/server/core/api/event/ExpressionEvaluator.java
9a360a43c30172b813e65d378ecbce67c8a904f7
[ "OLDAP-2.8", "LicenseRef-scancode-jdbm-1.00", "MIT", "Apache-2.0", "EPL-1.0", "LicenseRef-scancode-ietf", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.1-only", "ANTLR-PD", "LicenseRef-scancode-unknown" ]
permissive
apache/directory-server
5c2b0e916c0c52b0a27b5e28aced98fd923715a2
6f1e16fe919307a8d6048c993ee26cb1796a8fbc
refs/heads/master
2023-09-06T00:32:42.101837
2023-09-05T05:01:12
2023-09-05T05:01:12
206,437
125
97
Apache-2.0
2023-09-12T06:10:21
2009-05-21T02:25:07
Java
UTF-8
Java
false
false
4,657
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.directory.server.core.api.event; import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.exception.LdapInvalidSearchFilterException; import org.apache.directory.api.ldap.model.filter.AndNode; import org.apache.directory.api.ldap.model.filter.BranchNode; import org.apache.directory.api.ldap.model.filter.ExprNode; import org.apache.directory.api.ldap.model.filter.NotNode; import org.apache.directory.api.ldap.model.filter.OrNode; import org.apache.directory.api.ldap.model.name.Dn; import org.apache.directory.api.ldap.model.schema.SchemaManager; import org.apache.directory.server.i18n.I18n; /** * Top level filter expression evaluator implementation. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ public class ExpressionEvaluator implements Evaluator { /** Leaf Evaluator flyweight use for leaf filter assertions */ private LeafEvaluator leafEvaluator; // ------------------------------------------------------------------------ // C O N S T R U C T O R S // ------------------------------------------------------------------------ /** * Creates a top level Evaluator where leaves are delegated to a leaf node * evaluator which is already provided. * * @param leafEvaluator handles leaf node evaluation. */ public ExpressionEvaluator( LeafEvaluator leafEvaluator ) { this.leafEvaluator = leafEvaluator; } /** * Creates a top level Evaluator where leaves are delegated to a leaf node * evaluator which will be created. * * @param schemaManager The server schemaManager */ public ExpressionEvaluator( SchemaManager schemaManager ) { SubstringEvaluator substringEvaluator = null; substringEvaluator = new SubstringEvaluator(); leafEvaluator = new LeafEvaluator( substringEvaluator ); } /** * Gets the leaf evaluator used by this top level expression evaluator. * * @return the leaf evaluator used by this top level expression evaluator */ public LeafEvaluator getLeafEvaluator() { return leafEvaluator; } // ------------------------------------------------------------------------ // Evaluator.evaluate() implementation // ------------------------------------------------------------------------ /** * {@inheritDoc} */ public boolean evaluate( ExprNode node, Dn dn, Entry entry ) throws LdapException { if ( node.isLeaf() ) { return leafEvaluator.evaluate( node, dn, entry ); } BranchNode bnode = ( BranchNode ) node; if ( bnode instanceof OrNode ) { for ( ExprNode child : bnode.getChildren() ) { if ( evaluate( child, dn, entry ) ) { return true; } } return false; } else if ( bnode instanceof AndNode ) { for ( ExprNode child : bnode.getChildren() ) { boolean res = evaluate( child, dn, entry ); if ( !res ) { return false; } } return true; } else if ( bnode instanceof NotNode ) { if ( null != bnode.getFirstChild() ) { return !evaluate( bnode.getFirstChild(), dn, entry ); } throw new LdapInvalidSearchFilterException( I18n.err( I18n.ERR_243, node ) ); } else { throw new LdapInvalidSearchFilterException( I18n.err( I18n.ERR_244, bnode ) ); } } }
[ "elecharny@apache.org" ]
elecharny@apache.org
71c7fc5fa4613ffbc435685e8867128c6752f338
df36cd0012f69cbb6effe05144ddb768738d811c
/src/main/java/com/vladsch/md/nav/parser/MdLexer.java
721c01cfa5f7edda8544ada436f8d466443041b1
[ "Apache-2.0" ]
permissive
xfin-dragontamer/idea-multimarkdown
a5fe00f32ca8be88fbc337d3a8c0e7dd1ff47ebd
f18cec21960d7f508b5e27ad47e8e3fdd8d3475a
refs/heads/master
2022-12-23T07:42:26.551044
2020-09-24T15:33:10
2020-09-24T15:33:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,269
java
// Copyright (c) 2015-2020 Vladimir Schneider <vladimir.schneider@gmail.com> Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.vladsch.md.nav.parser; import com.intellij.lexer.Lexer; import com.intellij.lexer.LexerPosition; import com.intellij.lexer.RestartableLexer; import com.intellij.lexer.TokenIterator; import com.intellij.openapi.diagnostic.Logger; import com.intellij.psi.tree.IElementType; import com.vladsch.md.nav.parser.ast.MdASTNode; import com.vladsch.md.nav.settings.MdRenderingProfile; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.HashSet; import static com.intellij.openapi.diagnostic.Logger.getInstance; import static com.vladsch.md.nav.psi.util.MdTypes.BULLET_LIST; import static com.vladsch.md.nav.psi.util.MdTypes.DEFINITION_LIST; import static com.vladsch.md.nav.psi.util.MdTypes.ORDERED_LIST; public class MdLexer extends Lexer implements RestartableLexer { private static final Logger LOG = getInstance("com.vladsch.md.nav.parser"); protected MdLexemeProcessor myLexemeProcessor = null; protected LexerData lexerData = null; protected final @NotNull MdRenderingProfile renderingProfile; protected HashSet<Integer> myFileLevelLexemeStarts = null; public LexerData getLexerData() { return lexerData; } public MdLexer(final @NotNull MdRenderingProfile renderingProfile) { super(); this.renderingProfile = renderingProfile; } protected void logStackTrace() { StackTraceElement[] traceElements = Thread.currentThread().getStackTrace(); for (StackTraceElement traceElement : traceElements) { if (LOG.isDebugEnabled()) LOG.debug(traceElement.getMethodName() + " at " + traceElement.getFileName() + ":" + traceElement.getLineNumber()); } } @Override public int getStartState() { return 0; } @Override public boolean isRestartableState(final int state) { return state == 0; } @Override public void start(@NotNull final CharSequence buffer, final int startOffset, final int endOffset, final int initialState, final TokenIterator tokenIterator) { start(buffer, startOffset, endOffset, initialState); } @Override public void start(@NotNull CharSequence buffer, int startOffset, int endOffset, int initialState) { LexerToken[] lexerTokens = null; if (buffer.length() > 0) { lexerData = MdLexParserManager.parseMarkdown(renderingProfile, buffer.subSequence(startOffset, endOffset)); lexerTokens = lexerData.lexerTokens; } myLexemeProcessor = new MdLexemeProcessor(buffer, lexerTokens, startOffset, endOffset, initialState); myFileLevelLexemeStarts = null; } // this is only valid when parsing the whole file, for reparse highly depends on restart being respected which it is not // the IDE assumes that all needed information is stored in state boolean isFileLevelOffset(int lexemeStart) { if (lexerData != null) { if (myFileLevelLexemeStarts == null) { // compute file level lexeme start offsets myFileLevelLexemeStarts = new HashSet<>(); // add all root level starts for (MdASTNode astNode : lexerData.rootNode.getChildren()) { myFileLevelLexemeStarts.add(astNode.getStartOffset()); // cannot work all the time, first item of a list can be significant for indentation purposes. // Only real top level items can be re-parsed without preceding text but this makes files with long // lists too slow. // as an alternative can check if item matches first item's indentation level then it can also be started from without // affecting indentation of other items IElementType type = astNode.getElementType(); if (type == BULLET_LIST || type == ORDERED_LIST || type == DEFINITION_LIST) { // these are holders of items so pass through first children int firstItemIndent = -1; for (MdASTNode itemNode : astNode.getChildren()) { int startOffset = itemNode.getStartOffset(); int itemStart = myLexemeProcessor.getLineColumn(startOffset); if (firstItemIndent == -1 || firstItemIndent == itemStart || type == DEFINITION_LIST) { // this is either the first item or has the same indentation, we can start parsing from it firstItemIndent = itemStart; myFileLevelLexemeStarts.add(startOffset); } } } } } return myFileLevelLexemeStarts.contains(lexemeStart); } return true; } @Override public int getState() { LexerToken lexerToken = myLexemeProcessor.getLexerToken(); // here we need to return 0 in low bit when the file can be re-parsed from this point, ie. file level elements return (lexerToken != null && isFileLevelOffset(lexerToken.getRange().getStart()) ? 0 : 1); } @Nullable @Override public IElementType getTokenType() { LexerToken lexerToken = myLexemeProcessor.getLexerToken(); return lexerToken != null ? lexerToken.getElementType() : null; } @Override public int getTokenStart() { LexerToken lexerToken = myLexemeProcessor.getLexerToken(); return lexerToken != null ? lexerToken.getRange().getStart() + myLexemeProcessor.getStartOffset() : myLexemeProcessor.getEndOffset(); } @Override public int getTokenEnd() { LexerToken lexerToken = myLexemeProcessor.getLexerToken(); return lexerToken != null ? lexerToken.getRange().getEnd() + myLexemeProcessor.getStartOffset() : myLexemeProcessor.getEndOffset(); } @Override public void advance() { myLexemeProcessor.advance(); } static class MarkdownLexerPosition implements LexerPosition { protected int offset; protected int state; MarkdownLexerPosition(int offset, int state) { this.offset = offset; this.state = state; } @Override public int getOffset() { return offset; } @Override public int getState() { return state; } } @NotNull @Override public LexerPosition getCurrentPosition() { return new MarkdownLexerPosition(myLexemeProcessor.getCurrentOffset(), myLexemeProcessor.getLexemeIndex()); } @Override public void restore(@NotNull LexerPosition lexerPosition) { myLexemeProcessor.restore(lexerPosition); } @NotNull @Override public CharSequence getBufferSequence() { return myLexemeProcessor.getBuffer(); } @Override public int getBufferEnd() { return myLexemeProcessor.getBufferEnd(); } }
[ "vladimir.schneider@gmail.com" ]
vladimir.schneider@gmail.com
8d6108e7404376f5c31b2c5905dd7fec6a186078
f7fa3c6cdeaf745ead0311b85580b2b72eeb6879
/java/JAXWS/samples/com/vmware/vim25/DvsUpdateTagNetworkRuleAction.java
27a5fadd8d2f4087c32aa73a5dc58fa71edfc269
[ "Apache-2.0" ]
permissive
jdgwartney/vsphere-ws
5b1a299c70c69a15f6503dd251231adcdbca27e1
2e0badf1e2aab3d6ed3899d324712f34b9393c33
refs/heads/master
2020-05-02T05:56:04.741421
2014-12-27T22:55:05
2014-12-27T22:55:05
28,548,247
1
1
null
null
null
null
UTF-8
Java
false
false
2,113
java
package com.vmware.vim25; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for DvsUpdateTagNetworkRuleAction complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="DvsUpdateTagNetworkRuleAction"> * &lt;complexContent> * &lt;extension base="{urn:vim25}DvsNetworkRuleAction"> * &lt;sequence> * &lt;element name="qosTag" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="dscpTag" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DvsUpdateTagNetworkRuleAction", propOrder = { "qosTag", "dscpTag" }) public class DvsUpdateTagNetworkRuleAction extends DvsNetworkRuleAction { protected Integer qosTag; protected Integer dscpTag; /** * Gets the value of the qosTag property. * * @return * possible object is * {@link Integer } * */ public Integer getQosTag() { return qosTag; } /** * Sets the value of the qosTag property. * * @param value * allowed object is * {@link Integer } * */ public void setQosTag(Integer value) { this.qosTag = value; } /** * Gets the value of the dscpTag property. * * @return * possible object is * {@link Integer } * */ public Integer getDscpTag() { return dscpTag; } /** * Sets the value of the dscpTag property. * * @param value * allowed object is * {@link Integer } * */ public void setDscpTag(Integer value) { this.dscpTag = value; } }
[ "davidg@boundary.com" ]
davidg@boundary.com
df4e4eea230869937f18ee5502a9f365cf74e93e
96342d1091241ac93d2d59366b873c8fedce8137
/java/com/l2jolivia/gameserver/network/clientpackets/RequestUnEquipItem.java
ef64aade79740a48b1941f658a32278d7df3403a
[]
no_license
soultobe/L2JOlivia_EpicEdition
c97ac7d232e429fa6f91d21bb9360cf347c7ee33
6f9b3de9f63d70fa2e281b49d139738e02d97cd6
refs/heads/master
2021-01-10T03:42:04.091432
2016-03-09T06:55:59
2016-03-09T06:55:59
53,468,281
0
1
null
null
null
null
UTF-8
Java
false
false
4,074
java
/* * This file is part of the L2J Olivia project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jolivia.gameserver.network.clientpackets; import java.util.Arrays; import com.l2jolivia.Config; import com.l2jolivia.gameserver.model.PcCondOverride; import com.l2jolivia.gameserver.model.actor.instance.L2PcInstance; import com.l2jolivia.gameserver.model.items.L2EtcItem; import com.l2jolivia.gameserver.model.items.L2Item; import com.l2jolivia.gameserver.model.items.instance.L2ItemInstance; import com.l2jolivia.gameserver.network.SystemMessageId; import com.l2jolivia.gameserver.network.serverpackets.InventoryUpdate; import com.l2jolivia.gameserver.network.serverpackets.SystemMessage; /** * @author Zoey76 */ public class RequestUnEquipItem extends L2GameClientPacket { private static final String _C__16_REQUESTUNEQUIPITEM = "[C] 16 RequestUnequipItem"; private int _slot; /** * Packet type id 0x16 format: cd */ @Override protected void readImpl() { _slot = readD(); } @Override protected void runImpl() { if (Config.DEBUG) { _log.fine("Request unequip slot " + _slot); } final L2PcInstance activeChar = getClient().getActiveChar(); if (activeChar == null) { return; } final L2ItemInstance item = activeChar.getInventory().getPaperdollItemByL2ItemId(_slot); // Wear-items are not to be unequipped. if (item == null) { return; } // The English system message say weapon, but it's applied to any equipped item. if (activeChar.isAttackingNow() || activeChar.isCastingNow() || activeChar.isCastingSimultaneouslyNow()) { activeChar.sendPacket(SystemMessageId.YOU_CANNOT_CHANGE_WEAPONS_DURING_AN_ATTACK); return; } // Arrows and bolts. if ((_slot == L2Item.SLOT_L_HAND) && (item.getItem() instanceof L2EtcItem)) { return; } // Prevent of unequipping a cursed weapon. if ((_slot == L2Item.SLOT_LR_HAND) && (activeChar.isCursedWeaponEquipped() || activeChar.isCombatFlagEquipped())) { return; } // Prevent player from unequipping items in special conditions. if (activeChar.isStunned() || activeChar.isSleeping() || activeChar.isParalyzed() || activeChar.isAlikeDead()) { return; } if (!activeChar.getInventory().canManipulateWithItemId(item.getId())) { activeChar.sendPacket(SystemMessageId.THAT_ITEM_CANNOT_BE_TAKEN_OFF); return; } if (item.isWeapon() && item.getWeaponItem().isForceEquip() && !activeChar.canOverrideCond(PcCondOverride.ITEM_CONDITIONS)) { activeChar.sendPacket(SystemMessageId.THAT_ITEM_CANNOT_BE_TAKEN_OFF); return; } final L2ItemInstance[] unequipped = activeChar.getInventory().unEquipItemInBodySlotAndRecord(_slot); activeChar.broadcastUserInfo(); // This can be 0 if the user pressed the right mouse button twice very fast. if (unequipped.length > 0) { SystemMessage sm = null; if (unequipped[0].getEnchantLevel() > 0) { sm = SystemMessage.getSystemMessage(SystemMessageId.THE_EQUIPMENT_S1_S2_HAS_BEEN_REMOVED); sm.addInt(unequipped[0].getEnchantLevel()); } else { sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_BEEN_UNEQUIPPED); } sm.addItemName(unequipped[0]); activeChar.sendPacket(sm); final InventoryUpdate iu = new InventoryUpdate(); iu.addItems(Arrays.asList(unequipped)); activeChar.sendPacket(iu); } } @Override public String getType() { return _C__16_REQUESTUNEQUIPITEM; } }
[ "kim@tsnet-j.co.jp" ]
kim@tsnet-j.co.jp
b481483fe2326b8a52ce36235d33dabd0b93a477
c9522abc8c4ffe8a91d042be4b8cf7aebc6e9c5f
/example/src/main/java/com/h6ah4i/android/example/advrecyclerview/launcher/LauncherButtonsAdapter.java
e3fbef026fb423e9ab3733666ed07bc82feaa48b
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
yaoxiangshangzou/android-advancedrecyclerview
71e634e51b94933fa72ca0cf009e9872e867a2aa
eff551b7bef11577d8dcd2756ed198f2967956b1
refs/heads/master
2020-03-20T04:12:50.216446
2018-06-13T07:18:49
2018-06-13T07:18:49
137,175,025
0
0
Apache-2.0
2018-06-13T06:54:50
2018-06-13T06:54:50
null
UTF-8
Java
false
false
3,213
java
/* * Copyright (C) 2015 Haruki Hasegawa * * 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.h6ah4i.android.example.advrecyclerview.launcher; import android.app.Activity; import android.content.Intent; import android.support.annotation.StringRes; import android.support.v4.app.Fragment; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import com.h6ah4i.android.example.advrecyclerview.R; import com.h6ah4i.android.widget.advrecyclerview.utils.RecyclerViewAdapterUtils; import java.util.ArrayList; import java.util.List; public class LauncherButtonsAdapter extends RecyclerView.Adapter<LauncherButtonsAdapter.ViewHolder> implements View.OnClickListener { private static class LauncherItem { private final Class<? extends Activity> mActivityClass; @StringRes private final int mTextRes; public LauncherItem(Class<? extends Activity> activityClass, @StringRes int textRes) { mActivityClass = activityClass; mTextRes = textRes; } } private Fragment mFragment; private List<LauncherItem> mItems; public LauncherButtonsAdapter(Fragment fragment) { mFragment = fragment; mItems = new ArrayList<>(); } public void put(Class<? extends Activity> activityClass, @StringRes int textRes) { mItems.add(new LauncherItem(activityClass, textRes)); } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.recycler_view_item_launcher_button, parent, false); ViewHolder holder = new ViewHolder(v); holder.mButton.setOnClickListener(this); return holder; } @Override public void onBindViewHolder(ViewHolder holder, int position) { LauncherItem item = mItems.get(position); holder.mButton.setText(item.mTextRes); } @Override public int getItemCount() { return mItems.size(); } @Override public void onClick(View v) { ViewHolder viewHolder = (ViewHolder) RecyclerViewAdapterUtils.getViewHolder(v); int position = viewHolder.getAdapterPosition(); Intent intent = new Intent(v.getContext(), mItems.get(position).mActivityClass); mFragment.startActivity(intent); } static class ViewHolder extends RecyclerView.ViewHolder { Button mButton; public ViewHolder(View itemView) { super(itemView); mButton = (Button) itemView; } } }
[ "h6a.h4i.0@gmail.com" ]
h6a.h4i.0@gmail.com
a8a05d97348b6876da700c7242f97d5c3a104262
a2fb7fbcfeb184c9a0104b4b29475a76ec1f6372
/distributed-commandbus/src/test/java/org/axonframework/commandhandling/distributed/jgroups/JGroupsConnectorFactoryBeanTest.java
4867c76cc15bd0c23cd791e63694b66f77b3f527
[ "Apache-2.0" ]
permissive
nivance/AxonFramework
a89da7988aa78a6be67cd683884c71324eab14c9
e18e6d8bd7047fcf7d19f3c3531dd94e9b0a1137
refs/heads/master
2021-01-17T22:49:03.595937
2013-04-23T16:47:47
2013-04-23T16:47:47
9,713,050
1
0
null
null
null
null
UTF-8
Java
false
false
4,744
java
/* * Copyright (c) 2010-2012. Axon Framework * * 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.axonframework.commandhandling.distributed.jgroups; import org.axonframework.commandhandling.CommandBus; import org.axonframework.commandhandling.SimpleCommandBus; import org.axonframework.serializer.Serializer; import org.axonframework.serializer.xml.XStreamSerializer; import org.jgroups.JChannel; import org.junit.*; import org.junit.runner.*; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import org.springframework.context.ApplicationContext; import static org.junit.Assert.*; import static org.mockito.Matchers.isA; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.*; import static org.mockito.Mockito.same; import static org.powermock.api.mockito.PowerMockito.verifyNew; import static org.powermock.api.mockito.PowerMockito.whenNew; /** * @author Allard Buijze */ @RunWith(PowerMockRunner.class) @PrepareForTest({JGroupsConnectorFactoryBean.class, JChannel.class, JGroupsConnector.class}) public class JGroupsConnectorFactoryBeanTest { private JGroupsConnectorFactoryBean testSubject; private ApplicationContext mockApplicationContext; private JChannel mockChannel; private JGroupsConnector mockConnector; @Before public void setUp() throws Exception { mockApplicationContext = mock(ApplicationContext.class); mockChannel = mock(JChannel.class); mockConnector = mock(JGroupsConnector.class); when(mockApplicationContext.getBean(Serializer.class)).thenReturn(new XStreamSerializer()); whenNew(JChannel.class).withParameterTypes(String.class).withArguments(isA(String.class)) .thenReturn(mockChannel); whenNew(JGroupsConnector.class) .withArguments(isA(JChannel.class), isA(String.class), isA(CommandBus.class), isA(Serializer.class)) .thenReturn(mockConnector); testSubject = new JGroupsConnectorFactoryBean(); testSubject.setBeanName("beanName"); testSubject.setApplicationContext(mockApplicationContext); } @Test public void testCreateWithDefaultValues() throws Exception { testSubject.afterPropertiesSet(); testSubject.start(); testSubject.getObject(); verifyNew(JChannel.class).withArguments("tcp_mcast.xml"); verifyNew(JGroupsConnector.class).withArguments(eq(mockChannel), eq("beanName"), isA( SimpleCommandBus.class), isA(Serializer.class)); verify(mockConnector).connect(100); verify(mockChannel, never()).close(); testSubject.stop(new Runnable() { @Override public void run() { } }); verify(mockChannel).close(); } @Test public void testCreateWithSpecifiedValues() throws Exception { testSubject.setClusterName("ClusterName"); testSubject.setConfiguration("custom.xml"); testSubject.setLoadFactor(200); XStreamSerializer serializer = new XStreamSerializer(); testSubject.setSerializer(serializer); SimpleCommandBus localSegment = new SimpleCommandBus(); testSubject.setLocalSegment(localSegment); testSubject.afterPropertiesSet(); testSubject.start(); testSubject.getObject(); verifyNew(JChannel.class).withArguments("custom.xml"); verifyNew(JGroupsConnector.class).withArguments(eq(mockChannel), eq("ClusterName"), same(localSegment), same(serializer)); verify(mockApplicationContext, never()).getBean(Serializer.class); verify(mockConnector).connect(200); verify(mockChannel, never()).close(); testSubject.stop(new Runnable() { @Override public void run() { } }); verify(mockChannel).close(); } @Test public void testSimpleProperties() { assertEquals(Integer.MAX_VALUE, testSubject.getPhase()); testSubject.setPhase(100); assertEquals(100, testSubject.getPhase()); assertTrue(testSubject.isAutoStartup()); } }
[ "buijze@gmail.com" ]
buijze@gmail.com
364c133b8867fa5872a24a8fd72eb95abd62baa6
d235bb71e4aac2459d59c92482e2f57bef20a99e
/learning-core/src/main/java/com/tomgs/core/filter/demo5/ExecutorDemo.java
7d62cb845c05d1548cfdce9205f9bf818be1a7f1
[]
no_license
tincopper/tomgs-java
58809690760de7d87c76e4575702e2a7dd7a5a0a
45308b4cea41332ad8a48c5a0691ad660699c8ae
refs/heads/master
2023-09-01T04:05:54.883998
2023-08-23T06:30:47
2023-08-23T06:30:47
178,701,500
2
0
null
2022-06-17T02:07:22
2019-03-31T14:48:16
Java
UTF-8
Java
false
false
271
java
package com.tomgs.core.filter.demo5; /** * * * @author tomgs * @version 2019/6/19 1.0 */ public class ExecutorDemo extends AbstractExecutor<String> { @Override protected void execute(String s) { System.out.println("ExecutorDemo: " + s); } }
[ "136082619@qq.com" ]
136082619@qq.com
12a18385346f79afd93c467c919a509a7d7621f9
4a4de6803fd3de666d17463b2e75947eca88d03f
/src/main/java/com/couchbase/connector/elasticsearch/ElasticsearchHelper.java
1f8317356ab041571f1a0d8f50ac663587e48a27
[ "Apache-2.0" ]
permissive
mashhur/couchbase-elasticsearch-connector
b57e1ab77a60b0b275471bc0337870649219ae55
878f40daaced51f646608abc71057bbbb1114787
refs/heads/master
2020-03-19T03:05:05.970038
2019-01-30T04:20:34
2019-01-30T04:20:34
135,693,262
3
1
null
null
null
null
UTF-8
Java
false
false
7,364
java
/* * Copyright 2018 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.couchbase.connector.elasticsearch; import com.codahale.metrics.Gauge; import com.couchbase.client.core.logging.RedactableArgument; import com.couchbase.client.java.util.features.Version; import com.couchbase.connector.config.common.TrustStoreConfig; import com.couchbase.connector.config.es.ElasticsearchConfig; import com.couchbase.connector.util.ThrowableHelper; import com.google.common.collect.Iterables; import org.apache.http.ConnectionClosedException; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.ssl.SSLContexts; import org.elasticsearch.action.bulk.BulkItemResponse; import org.elasticsearch.action.main.MainResponse; import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.common.unit.TimeValue; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.net.ssl.SSLContext; import java.io.IOException; import java.net.ConnectException; import java.security.KeyManagementException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.function.Supplier; import java.util.regex.Matcher; import java.util.regex.Pattern; import static com.couchbase.connector.elasticsearch.io.MoreBackoffPolicies.truncatedExponentialBackoff; import static java.util.concurrent.TimeUnit.MILLISECONDS; public class ElasticsearchHelper { private static final Logger LOGGER = LoggerFactory.getLogger(ElasticsearchHelper.class); private ElasticsearchHelper() { throw new AssertionError("not instantiable"); } private static final Pattern ES_ERROR_TYPE_PATTERN = Pattern.compile("\\[type=(.+?),"); public static Optional<String> getElasticsearchExceptionType(BulkItemResponse.Failure failure) { final Matcher m = ES_ERROR_TYPE_PATTERN.matcher(failure.getMessage()); if (!m.find()) { return Optional.empty(); } return Optional.of(m.group(1)); } @SuppressWarnings("unchecked") public static Gauge<String> registerElasticsearchVersionGauge(RestHighLevelClient esClient) { return Metrics.gauge("elasticsearchVersion", () -> () -> { final MainResponse info = getServerInfo(esClient); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Elasticsearch info: {}", formatServerInfo(info)); } return info.getVersion().toString(); }); } private static MainResponse getServerInfo(RestHighLevelClient esClient) { try { return esClient.info(); } catch (IOException e) { throw new RuntimeException(e); } } private static String formatServerInfo(MainResponse r) { Map<String, Object> esInfo = new LinkedHashMap<>(); esInfo.put("version", r.getVersion().toString()); esInfo.put("build", r.getBuild()); esInfo.put("available", r.isAvailable()); esInfo.put("clusterName", RedactableArgument.system(r.getClusterName())); esInfo.put("clusterUuid", RedactableArgument.system(r.getClusterUuid())); esInfo.put("nodeName", RedactableArgument.system(r.getNodeName())); return esInfo.toString(); } public static Version waitForElasticsearchAndRequireVersion(RestHighLevelClient esClient, Version required, Version recommended) throws InterruptedException { final Iterator<TimeValue> retryDelays = truncatedExponentialBackoff( TimeValue.timeValueSeconds(1), TimeValue.timeValueMinutes(1)).iterator(); while (true) { try { org.elasticsearch.Version esVersion = esClient.info().getVersion(); final Version version = new Version(esVersion.major, esVersion.minor, esVersion.revision); if (version.compareTo(required) < 0) { throw new RuntimeException("Elasticsearch version " + required + " or later required; actual version is " + version); } if (version.compareTo(recommended) < 0) { LOGGER.warn("Elasticsearch version " + version + " is lower than recommended version " + recommended + "."); } return version; } catch (Exception e) { final TimeValue delay = retryDelays.next(); LOGGER.debug("Failed to get Elasticsearch version", e); LOGGER.warn("Elasticsearch connection failure, couldn't get version. Retrying in {}", delay); if (ThrowableHelper.hasCause(e, ConnectionClosedException.class)) { LOGGER.warn(" Troubleshooting tip: If the Elasticsearch connection failure persists," + " and if Elasticsearch is configured to require TLS/SSL, then make sure the connector is also configured to use secure connections."); } else if (!ThrowableHelper.hasCause(e, ConnectException.class)) { LOGGER.warn("Here's the root cause of the connection failure", e); } MILLISECONDS.sleep(delay.millis()); } } } public static RestHighLevelClient newElasticsearchClient(ElasticsearchConfig elasticsearchConfig, TrustStoreConfig trustStoreConfig) throws KeyStoreException, NoSuchAlgorithmException, KeyManagementException { return newElasticsearchClient( elasticsearchConfig.hosts(), elasticsearchConfig.username(), elasticsearchConfig.password(), elasticsearchConfig.secureConnection(), trustStoreConfig); } public static RestHighLevelClient newElasticsearchClient(List<HttpHost> hosts, String username, String password, boolean secureConnection, Supplier<KeyStore> trustStore) throws KeyStoreException, NoSuchAlgorithmException, KeyManagementException { final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password)); final SSLContext sslContext = !secureConnection ? null : SSLContexts.custom().loadTrustMaterial(trustStore.get(), null).build(); final RestClientBuilder builder = RestClient.builder(Iterables.toArray(hosts, HttpHost.class)) .setHttpClientConfigCallback(httpClientBuilder -> httpClientBuilder .setSSLContext(sslContext) .setDefaultCredentialsProvider(credentialsProvider)) .setFailureListener(new RestClient.FailureListener() { @Override public void onFailure(HttpHost host) { Metrics.elasticsearchHostOffline().mark(); } }); return new RestHighLevelClient(builder); } }
[ "david.nault@couchbase.com" ]
david.nault@couchbase.com
fcbae85df85f04969691fe9c9be9bba7d1e6db8a
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a170/A170620Test.java
77304c2d12117e2fbc2eb2e9a9b880039467817e
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a170; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A170620Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
57368bf1f32a67f894bf754483c601ead5968f2e
becfc02168247c141747ef5a52ce10dc581ab0bc
/action-root/action-beans/src/main/java/cn/gyyx/action/beans/jswswxsign/UserScore.java
9cfffd34935567fb537fe665cb31934133d2cb6c
[]
no_license
wangqingxian/springBoot
629d71200f2f62466ac6590924d49bd490601276
0efcd6ed29816c31f2843a24d9d6dc5d1c7f98d2
refs/heads/master
2020-04-22T02:42:01.757523
2017-06-08T10:56:51
2017-06-08T10:56:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,472
java
/**------------------------------------------------------------------------- * 版权所有:北京光宇在线科技有限责任公司 -------------------------------------------------------------------------*/ package cn.gyyx.action.beans.jswswxsign; import java.util.Date; /** * 作 者:成龙 * 联系方式:chenglong@gyyx.cn * 创建时间: 2016年5月13日 下午6:32:00 * 描 述: 绝世武神微信签到功能-用户积分表 */ public class UserScore { private Integer code;//主键 private String openId;//用户ID private Integer curIntergral;//当前积分 private Integer lastMonthIntergral;//当前积分 private Date jobLastUpdateTime;//job 最后更新积分时间 public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } public String getOpenId() { return openId; } public void setOpenId(String openId) { this.openId = openId; } public Integer getCurIntergral() { return curIntergral; } public void setCurIntergral(Integer curIntergral) { this.curIntergral = curIntergral; } public Integer getLastMonthIntergral() { return lastMonthIntergral; } public void setLastMonthIntergral(Integer lastMonthIntergral) { this.lastMonthIntergral = lastMonthIntergral; } public Date getJobLastUpdateTime() { return jobLastUpdateTime; } public void setJobLastUpdateTime(Date jobLastUpdateTime) { this.jobLastUpdateTime = jobLastUpdateTime; } }
[ "lihu@gyyx.cn" ]
lihu@gyyx.cn
a9a1562980d22d01df563ebbdfe43dcdd6140150
b97bc0706448623a59a7f11d07e4a151173b7378
/src/main/java/radian/tcmis/server7/client/ford/servlets/FordLoadChoices.java
9e4a51c2cf3c3c18b833d778407a75af49500198
[]
no_license
zafrul-ust/tcmISDev
576a93e2cbb35a8ffd275fdbdd73c1f9161040b5
71418732e5465bb52a0079c7e7e7cec423a1d3ed
refs/heads/master
2022-12-21T15:46:19.801950
2020-02-07T21:22:50
2020-02-07T21:22:50
241,601,201
0
0
null
2022-12-13T19:29:34
2020-02-19T11:08:43
Java
UTF-8
Java
false
false
968
java
package radian.tcmis.server7.client.ford.servlets; import radian.tcmis.server7.share.helpers.*; import radian.tcmis.server7.share.servlets.*; import radian.tcmis.server7.client.ford.dbObjs.*; import radian.tcmis.server7.client.ford.helpers.*; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class FordLoadChoices extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { FordTcmISDBModel db = null; try { db = new FordTcmISDBModel("Ford",(String)request.getHeader("logon-version")); LoadChoices obj = new LoadChoices((ServerResourceBundle) new FordServerResourceBundle(),db); obj.doPost(request,response); } catch (Exception e){ e.printStackTrace(); } finally { db.close(); } } }
[ "julio.rivero@wescoair.com" ]
julio.rivero@wescoair.com
5d1f3a91f8876200a6a95d3223f6ce0d65d385b1
accf6a38581424ef91833968a276d7a0aec5e631
/src/com/hotent/platform/model/bpm/BpmCommonWsParams.java
deee5cf88c7093225fe8a9e147a3aac93d66de32
[]
no_license
abgronie/bpm
d79ddf1c00863be45f764d054ebb2cf1dfaa85a3
6323a3180597307d8ccdd51d265750064fcef477
refs/heads/master
2020-12-04T02:38:21.080704
2019-04-11T08:35:26
2019-04-11T08:35:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,461
java
package com.hotent.platform.model.bpm; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import com.hotent.core.model.BaseModel; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.EqualsBuilder; /** * 对象功能:通用webservice调用参数 Model对象 * 开发公司:广州宏天软件有限公司 * 开发人员:ray * 创建时间:2013-10-17 10:09:20 */ @XmlRootElement(name="commonWsParams") @XmlAccessorType(XmlAccessType.NONE) public class BpmCommonWsParams extends BaseModel { /** * 参数类型(字符串) */ public final static Integer PARAM_TYPE_STRING = 1; /** * 参数类型(数字) */ public final static Integer PARAM_TYPE_NUMBER = 2; /** * 参数类型(列表) */ public final static Integer PARAM_TYPE_LIST = 3; /** * 参数类型(日期) */ public final static Integer PARAM_TYPE_DATE = 4; // 主键 @XmlElement protected Long id; // webservice设置ID @XmlElement protected Long setid; // 参数名 @XmlElement protected String name; // 参数类型 @XmlElement protected Integer paramType; // 参数说明 @XmlElement protected String description; public void setId(Long id) { this.id = id; } /** * 返回 主键 * @return */ public Long getId() { return this.id; } public void setSetid(Long setid) { this.setid = setid; } /** * 返回 webservice设置ID * @return */ public Long getSetid() { return this.setid; } public void setName(String name) { this.name = name; } /** * 返回 参数名 * @return */ public String getName() { return this.name; } public void setParamType(Integer paramType) { this.paramType = paramType; } /** * 返回 参数类型 * @return */ public Integer getParamType() { return this.paramType; } public void setDescription(String description) { this.description = description; } /** * 返回 参数说明 * @return */ public String getDescription() { return this.description; } /** * @see java.lang.Object#equals(Object) */ public boolean equals(Object object) { if (!(object instanceof BpmCommonWsParams)) { return false; } BpmCommonWsParams rhs = (BpmCommonWsParams) object; return new EqualsBuilder() .append(this.id, rhs.id) .append(this.setid, rhs.setid) .append(this.name, rhs.name) .append(this.paramType, rhs.paramType) .append(this.description, rhs.description) .isEquals(); } /** * @see java.lang.Object#hashCode() */ public int hashCode() { return new HashCodeBuilder(-82280557, -700257973) .append(this.id) .append(this.setid) .append(this.name) .append(this.paramType) .append(this.description) .toHashCode(); } /** * @see java.lang.Object#toString() */ public String toString() { return new ToStringBuilder(this) .append("id", this.id) .append("setid", this.setid) .append("name", this.name) .append("paramType", this.paramType) .append("description", this.description) .toString(); } }
[ "2500391980@qq.com" ]
2500391980@qq.com
5e12c09cb772d1414350d500c1a404521ae14dff
eadbd6ba5a2d5c960ffa9788f5f7e79eeb98384d
/src/com/google/android/m4b/maps/ay/ah$a.java
6ebec78e0fe43b524e04cadbf7bdc4d9a31cd7cd
[]
no_license
marcoucou/com.tinder
37edc3b9fb22496258f3a8670e6349ce5b1d8993
c68f08f7cacf76bf7f103016754eb87b1c0ac30d
refs/heads/master
2022-04-18T23:01:15.638983
2020-04-14T18:04:10
2020-04-14T18:04:10
255,685,521
0
0
null
2020-04-14T18:00:06
2020-04-14T18:00:05
null
UTF-8
Java
false
false
1,380
java
package com.google.android.m4b.maps.ay; import com.google.android.m4b.maps.bh.i; import javax.microedition.khronos.opengles.GL10; final class ah$a extends ah.i { private final boolean D; private ah$a(a parama) { super(parama, (byte)0); D = a.a(parama); } public final int a(int paramInt, i parami) { int i; if (D) { i = paramInt; if (parami != i.b) {} } else { if ((parami != i.e) && (parami != i.d)) { break label34; } i = 0; } label34: do { do { return i; i = paramInt; } while (parami == i.a); i = paramInt; } while (parami == i.c); return paramInt & 0xE5F9; } public final void a(GL10 paramGL10) { paramGL10.glColor4f(0.0F, 0.0F, 0.0F, 0.3F); } public final boolean e() { return true; } public final boolean f() { return true; } static final class a extends ah.i.a { private boolean a = false; private a(int paramInt) { super((byte)0); } final a a(boolean paramBoolean) { a = true; return this; } final ah a() { return new ah.a(this, (byte)0); } } } /* Location: * Qualified Name: com.google.android.m4b.maps.ay.ah.a * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
9a68020a78f07bcbf1a058afa1d8014098e47f0e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_8e41ec21a9c9a1abe73a672ade5d2a2f1f20463a/PackagingUtil/3_8e41ec21a9c9a1abe73a672ade5d2a2f1f20463a_PackagingUtil_s.java
ea005a49ef334939429714066cf8360f1f119dab
[]
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
5,302
java
/* * Copyright 2009 JBoss, a divison Red Hat, 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.jboss.errai.bus.server.service.metadata; import org.reflections.vfs.Vfs; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.UUID; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; /** * A set of utilities for processing a {@link org.jboss.errai.bus.server.service.metadata.DeploymentContext} * * @author: Heiko Braun <hbraun@redhat.com> * @date: Aug 9, 2010 */ public class PackagingUtil { private static Logger log = LoggerFactory.getLogger(PackagingUtil.class); public static File identifyDeployment(URL url) { String actualFilePath = url.getPath(); String nestedPath = ""; if (actualFilePath.startsWith("file:")) { actualFilePath = actualFilePath.substring(5); } int nestedSeperator = actualFilePath.indexOf('!'); if (nestedSeperator != -1) { actualFilePath = actualFilePath.substring(0, nestedSeperator); nestedPath = actualFilePath.substring(nestedSeperator + 1); if (nestedPath.equals("/")) { nestedPath = ""; } } if (nestedPath.length() != 0) { throw new RuntimeException("cannot access nested resource: " + actualFilePath); } log.info("identifying deployment type for uri: " + actualFilePath); return findActualDeploymentFile(new File(actualFilePath)); } private static URL toUrl(String s) { try { return new URL(s); } catch (MalformedURLException e) { throw new RuntimeException("Invalid URL " + s, e); } } static File findActualDeploymentFile(File start) { int pivotPoint; String rootPath = start.getPath(); do { start = new File(rootPath); rootPath = rootPath.substring(0, (pivotPoint = rootPath.lastIndexOf("/")) < 0 ? 0 : pivotPoint); } while (!start.exists() && pivotPoint > 0); return start; } static void process(DeploymentContext ctx) { for (URL url : ctx.getConfigUrls()) { File file = PackagingUtil.identifyDeployment(url); /** * several config urls may derive from the same archive * don't process them twice */ if (!ctx.hasProcessed(file)) { ctx.markProcessed(file); PackagingUtil.processNestedZip(file, ctx); } } } private static void processNestedZip(File file, DeploymentContext ctx) { try { if (file.getName().matches(".+\\.(ear|war|sar)$") && !file.isDirectory()) // process only certain deployment types { if (file.getName().endsWith(".war")) ctx.getSubContexts().put(file.getName(), file); // WEB-INF/classes ZipInputStream zipFile = new ZipInputStream(new FileInputStream(file)); ZipEntry zipEntry = null; try { while ((zipEntry = zipFile.getNextEntry()) != null) { if (zipEntry.getName().matches(".+\\.(zip|jar|war)$")) // expand nested zip archives { if (!ctx.getSubContexts().containsKey(zipEntry.getName())) { File tmpUnZip = expandZipEntry(zipFile, zipEntry, ctx); ctx.getSubContexts().put(zipEntry.getName(), tmpUnZip); processNestedZip(tmpUnZip, ctx); } } } } finally { zipFile.close(); } } } catch (Exception e) { throw new RuntimeException("Failed to process nested zip", e); } } protected static File expandZipEntry(ZipInputStream stream, ZipEntry entry, DeploymentContext ctx) { String tmpUUID = "erraiBootstrap_" + UUID.randomUUID().toString().replaceAll("\\-", "_"); String tmpDir = System.getProperty("java.io.tmpdir") + "/" + tmpUUID; int idx = entry.getName().lastIndexOf('/'); String tmpFileName = tmpDir + "/" + entry.getName().substring(idx == -1 ? 0 : idx); try { File tmpDirFile = new File(tmpDir); tmpDirFile.mkdirs(); ctx.markTmpFile(tmpDirFile); File newFile = new File(tmpFileName); FileOutputStream outStream = new FileOutputStream(newFile); byte[] buf = new byte[1024]; int read; while ((read = stream.read(buf)) != -1) { outStream.write(buf, 0, read); } outStream.flush(); outStream.close(); newFile.getParentFile(); return newFile; } catch (Exception e) { throw new RuntimeException("Error reading from stream", e); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c716718d85af2795b43691db2e9b8b316eddc6ae
add66f062ba1143c97335233e346bcc33d901d98
/src/day57_Exceptions/Quiz.java
a2eab7c4cb733bf925e201d09fbaca064706d255
[]
no_license
hakanorak21/Summer2019JavaPractice
e42a6fbfe81abf87bd0581ad0a4d323415f4ec1b
319a959f891ff870de1e1e718b0521deb22c2753
refs/heads/master
2020-07-22T10:57:49.812355
2020-05-25T18:46:51
2020-05-25T18:46:51
207,175,176
0
0
null
null
null
null
UTF-8
Java
false
false
2,227
java
package day57_Exceptions; public class Quiz { public static void main(String[] args) { /* //Question 1 1. Polymporphism: Objects share behaviors with other objects. 2. Inheritance: A subclass can inherit from a superclass. //Question 2 No instance methods in interface. Also, no constructors. Public and abstract keywords are given implicitly. (Even if we don't write them, our code will still run). Interface can have only abstract, static, and default methods. //Question 3 Only public static final variables in interface. No object from interface. //Question 4: See below //Question 5 Reference type decides which methods to be called. (First rule of polymorphism) Rule 2: Object type decides on the definition of the method. //Question 6 Encapsulation: private access-modifier for data hiding //Question 7 Selenium //Question 8 navigate().forward(); //Question 9 WebElement element = driver.findElement(By.name("button")); ==> Returns an element with a name attribute with the value of button. //Question 10: See below //Question 11 8 locators in Selenium //Question 12: See below Sub class cannot be reference type of a super class //Question 13 No protected access-modifier at an implementation method. (Because the overridden abstract method is public.) */ } } //Question 4 interface Fatih{ void readBooks(); abstract void watchTV(); } abstract class Omer implements Fatih{ @Override public void readBooks() { System.out.println("Omer is reading"); } } class Oleksander extends Omer{ @Override public void watchTV() { System.out.println("Oleksander is watching TV"); } } //Question 10 //Make passportNo read only class Employee{ //public int passportNo; private int passportNo; public int getPassportNo() { return passportNo; } } //Question 12 class parent{ } class child extends parent{ public static void main(String[] args) { parent obj = new child(); //Up casting //child obj2 = new parent(); //child class cannot be //reference type of parent object parent obj3 = new parent(); child obj2 = (child)obj3; //Down casting } }
[ "hakanorak21@yahoo.com" ]
hakanorak21@yahoo.com
10898e4b40ae506688545e15481175a746b4944f
f2d642015a93e22ac19922df4032b5ab7a9dfde3
/src/org/byramhills/apcs/fruit/PoisonBerry.java
a5837ff6c64f93ea05346ae2c5abad0b4a4b4aaf
[]
no_license
gregcarlin/InheritanceExamples
9764c9d4ac4b4daac27edcd336fd1848d88a465d
661099b49a5eff29483932817607ac9bb4a39aa2
refs/heads/master
2021-05-27T11:02:07.336350
2014-10-27T20:52:49
2014-10-27T20:52:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
297
java
package org.byramhills.apcs.fruit; import java.awt.Color; public class PoisonBerry extends Fruit { public boolean isEdible() { return false; } public Color getColor() { return Color.RED; } public boolean isPeelable() { return false; } }
[ "gregthegeek@optonline.net" ]
gregthegeek@optonline.net
d7c25bc60f0cd7db305d9b7fb73000d65e1dc517
8a596d37b9d7d0b4f340845516e3758999e13cf7
/log4j2-elasticsearch2-bulkprocessor/src/test/java/org/appenders/log4j2/elasticsearch/bulkprocessor/BulkProcessorFactoryTest.java
35565f1766a1d9168ac040c1e5575d2232e4a99a
[ "Apache-2.0" ]
permissive
rfoltyns/log4j2-elasticsearch
906cb3838305ace9a676e1157feafab278abfc54
1ebe4c30daf2474bfaa2e046d4e2617cd312119a
refs/heads/master
2022-11-21T17:47:34.259237
2022-11-14T22:17:32
2022-11-14T22:25:24
89,024,696
173
56
Apache-2.0
2022-10-05T07:32:24
2017-04-21T21:23:12
Java
UTF-8
Java
false
false
4,704
java
package org.appenders.log4j2.elasticsearch.bulkprocessor; /*- * #%L * log4j2-elasticsearch * %% * Copyright (C) 2018 Rafal Foltynski * %% * 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% */ import org.appenders.log4j2.elasticsearch.Auth; import org.appenders.log4j2.elasticsearch.BatchEmitterFactory; import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.bulk.BulkResponse; import org.junit.jupiter.api.Test; import java.util.Collection; import java.util.Random; import java.util.function.Function; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; public class BulkProcessorFactoryTest { @Test public void acceptsBulkProcessorObjectFactory() { // given BulkProcessorFactory emitterFactory = new BulkProcessorFactory(); // when boolean result = emitterFactory.accepts(BulkProcessorObjectFactory.class); // then assertTrue(result); } @Test public void acceptsExtendingClientObjectFactories() { // given BulkProcessorFactory emitterFactory = new BulkProcessorFactory(); // when boolean result = emitterFactory.accepts(ExtendedBulkProcessorObjectFactory.class); // then assertTrue(result); } @Test public void bulkExecutionListenerExecutesFailoverHandlerWhenResponseHasFailures() { // given Function<BulkRequest, Boolean> failureHandler = mock(Function.class); BulkProcessorFactory.BulkExecutionListener listener = new BulkProcessorFactory.BulkExecutionListener(failureHandler); BulkRequest request = mock(BulkRequest.class); BulkResponse response = mock(BulkResponse.class); when(response.hasFailures()).thenReturn(true); // when listener.afterBulk(0, request, response); // then verify(failureHandler, times(1)).apply(eq(request)); } @Test public void bulkExecutionListenerDoesntExecuteFailoverHandlerWhenResponseDoesntHaveFailures() { // given Function<BulkRequest, Boolean> failureHandler = mock(Function.class); BulkProcessorFactory.BulkExecutionListener listener = new BulkProcessorFactory.BulkExecutionListener(failureHandler); BulkRequest request = mock(BulkRequest.class); BulkResponse response = mock(BulkResponse.class); when(response.hasFailures()).thenReturn(false); // when listener.afterBulk(0, request, response); // then verify(failureHandler, times(0)).apply(any()); } @Test public void loadingOrderCanBeOverriddenWithProperty() { // given BulkProcessorFactory factory = new BulkProcessorFactory(); int expectedLoadingOrder = new Random().nextInt(100) + 1; System.setProperty("appenders." + BulkProcessorFactory.class.getSimpleName() + ".loadingOrder", Integer.toString(expectedLoadingOrder)); // when int loadingOrder = factory.loadingOrder(); // then assertEquals(expectedLoadingOrder, loadingOrder); } @Test public void defaultLoadingOrderIsReturnedIfPropertyNotSet() { // given int expectedLoadingOrder = BatchEmitterFactory.DEFAULT_LOADING_ORDER + 10; BulkProcessorFactory factory = new BulkProcessorFactory(); System.clearProperty("appenders." + BulkProcessorFactory.class.getSimpleName() + ".loadingOrder"); // when int loadingOrder = factory.loadingOrder(); // then assertEquals(expectedLoadingOrder, loadingOrder); } public static class ExtendedBulkProcessorObjectFactory extends BulkProcessorObjectFactory { protected ExtendedBulkProcessorObjectFactory(Collection<String> serverUris, Auth auth) { super(serverUris, auth); } } }
[ "r.foltynski@gmail.com" ]
r.foltynski@gmail.com
e961eb12beb8d71dd3c8f6cb95b686fc54afa4e1
8a1ad2db585eb0e04b468fae569ab465dee35198
/source/ceylon99/out/Ex25Java.java
38f26f91dc92489d6824fdc353b8cae972c45f47
[]
no_license
mariusneo/ceylon99
9aa7d5a8845be6220218bbfc48ce940784ce6204
2bda72a3a727e8022d4fadb004aeaa7c72ba6c30
refs/heads/master
2021-01-17T07:41:44.887375
2013-04-04T12:55:00
2013-04-04T12:55:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
784
java
package ceylon99.out; public class Ex25Java { private String name; private int age; public Ex25Java(String name, int age) { this.name = name; this.age = age; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Ex25Java other = (Ex25Java) obj; if (age != other.age) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; return true; } public static void main(String[] args) { Ex25Java stef = new Ex25Java("stef", 0x22); Ex25Java stef2 = new Ex25Java("stef", 0x22); System.out.println(stef == stef2); System.out.println(stef.equals(stef2)); } }
[ "stef@epardaud.fr" ]
stef@epardaud.fr
45d9fad0798be83666f1a184b2aefee214ed6bb3
1ed0e7930d6027aa893e1ecd4c5bba79484b7c95
/gacha/source/java/com/igaworks/adbrix/goods/GoodsConstant.java
e9df58e58eaf268365ab6190afa96a511645dc06
[]
no_license
AnKoushinist/hikaru-bottakuri-slot
36f1821e355a76865057a81221ce2c6f873f04e5
7ed60c6d53086243002785538076478c82616802
refs/heads/master
2021-01-20T05:47:00.966573
2017-08-26T06:58:25
2017-08-26T06:58:25
101,468,394
0
1
null
null
null
null
UTF-8
Java
false
false
396
java
package com.igaworks.adbrix.goods; import java.util.ArrayList; import java.util.List; public class GoodsConstant { public static final List<String> anipangApps = new ArrayList(); static { anipangApps.add("706625845"); anipangApps.add("898085542"); anipangApps.add("910301959"); anipangApps.add("926471399"); anipangApps.add("27784409"); } }
[ "09f713c@sigaint.org" ]
09f713c@sigaint.org
19209a157e437caeb788414cc0e52d203443a62e
27ceb9728f25f76150e775845c002e901211c7c7
/Student Grading System/.history/src/Entities/StudentGrade_20210519215339.java
0c155b9c2f07130b48d6efecb8b4d8b0a2520734
[]
no_license
cormacmattimoe/SoftwareQualityAssuranceFinalCa
bd1f4f64fef3396e4dfdfac199d1876311841596
7d4d9e8b9d36b28e77b319d4e5061da93233a442
refs/heads/master
2023-05-06T11:50:58.072870
2021-05-21T09:04:55
2021-05-21T09:04:55
368,800,636
0
0
null
2021-05-21T09:04:56
2021-05-19T08:40:30
Java
UTF-8
Java
false
false
1,521
java
package Entities; import java.util.ArrayList; // Student is been described as having a name and list of modules // related to them public class StudentGrade { private String studentName; private int grade; ArrayList<Criterion> criteria = new ArrayList<Criterion>(); public StudentGrade() { } public ArrayList<StudentGrade> getStudetGrades() { return criteria; } public String getStudentName() { return studentName; } public void setStudentName(String studentName) { this.studentName = studentName; } public int getGrade() { return grade; } public void setGrade(int grade) { this.grade = grade; } //Method to create a list of the StudentGrdaes for each criterion in the rubic public ArrayList<Integer> getListOfGrades() { //List to represent the values of each studentgrade of criterion ArrayList<Integer> grades = new ArrayList<Integer>(); //Loop to go through ecah criterion in the rubric for(Criterion cri : this.criteria) { // int value = cri.getCriteriaName(); // grades.add(value); } //return the repsonse values return grades; } public int getGradesSum() { int sum = 0; for(int x : this.getListOfGrades()) { sum+= x; } return sum; } @Override public String toString() { return "Student{" + "studentName ='" + studentName + '\'' + ", Modules =" + grade + '}'; } }
[ "cormacmattimoe98@gmail.com" ]
cormacmattimoe98@gmail.com
5af45758ac5e7b4ce181a3467bd49bbc2ee5bdd2
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Math-3/org.apache.commons.math3.util.MathArrays/BBC-F0-opt-20/tests/10/org/apache/commons/math3/util/MathArrays_ESTest_scaffolding.java
8964132c8b2486f1c331767efd207abf4decb43b
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
6,575
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 19 15:25:03 GMT 2021 */ package org.apache.commons.math3.util; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class MathArrays_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math3.util.MathArrays"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MathArrays_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math3.util.Precision", "org.apache.commons.math3.exception.util.ExceptionContextProvider", "org.apache.commons.math3.util.MathArrays", "org.apache.commons.math3.util.MathArrays$1", "org.apache.commons.math3.util.MathArrays$2", "org.apache.commons.math3.util.MathArrays$3", "org.apache.commons.math3.exception.util.ArgUtils", "org.apache.commons.math3.exception.MathArithmeticException", "org.apache.commons.math3.util.MathArrays$OrderDirection", "org.apache.commons.math3.exception.NumberIsTooSmallException", "org.apache.commons.math3.exception.NotPositiveException", "org.apache.commons.math3.exception.MathInternalError", "org.apache.commons.math3.exception.MathIllegalStateException", "org.apache.commons.math3.exception.NonMonotonicSequenceException", "org.apache.commons.math3.exception.MathIllegalArgumentException", "org.apache.commons.math3.util.MathUtils", "org.apache.commons.math3.exception.MathIllegalNumberException", "org.apache.commons.math3.util.Pair", "org.apache.commons.math3.exception.util.LocalizedFormats", "org.apache.commons.math3.util.FastMath", "org.apache.commons.math3.exception.DimensionMismatchException", "org.apache.commons.math3.FieldElement", "org.apache.commons.math3.exception.util.Localizable", "org.apache.commons.math3.exception.NotStrictlyPositiveException", "org.apache.commons.math3.exception.util.ExceptionContext", "org.apache.commons.math3.exception.NullArgumentException", "org.apache.commons.math3.exception.NoDataException", "org.apache.commons.math3.Field", "org.apache.commons.math3.exception.NotFiniteNumberException" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("org.apache.commons.math3.Field", false, MathArrays_ESTest_scaffolding.class.getClassLoader())); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MathArrays_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.math3.util.MathArrays", "org.apache.commons.math3.util.MathArrays$OrderDirection", "org.apache.commons.math3.util.MathArrays$1", "org.apache.commons.math3.util.MathArrays$2", "org.apache.commons.math3.util.MathArrays$3", "org.apache.commons.math3.exception.util.LocalizedFormats", "org.apache.commons.math3.util.MathUtils", "org.apache.commons.math3.util.FastMath", "org.apache.commons.math3.util.Pair", "org.apache.commons.math3.exception.MathIllegalArgumentException", "org.apache.commons.math3.exception.MathIllegalNumberException", "org.apache.commons.math3.exception.NumberIsTooSmallException", "org.apache.commons.math3.exception.NotPositiveException", "org.apache.commons.math3.exception.util.ExceptionContext", "org.apache.commons.math3.exception.util.ArgUtils", "org.apache.commons.math3.util.Precision", "org.apache.commons.math3.exception.DimensionMismatchException", "org.apache.commons.math3.exception.NonMonotonicSequenceException", "org.apache.commons.math3.exception.NotStrictlyPositiveException", "org.apache.commons.math3.exception.NullArgumentException", "org.apache.commons.math3.exception.NoDataException", "org.apache.commons.math3.exception.MathArithmeticException" ); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
cb024ae86e42dd0159fc32eb295b5675e4253d5f
bc794d54ef1311d95d0c479962eb506180873375
/keren_sms/smsgateway/src/main/java/com/keren/smsgateway/modem/athandler/ATHandler_Siemens_MC35i_FD.java
a228473c5381d312fabb9d058db7d9fdbc037674
[]
no_license
Teratech2018/Teratech
d1abb0f71a797181630d581cf5600c50e40c9663
612f1baf9636034cfa5d33a91e44bbf3a3f0a0cb
refs/heads/master
2021-04-28T05:31:38.081955
2019-04-01T08:35:34
2019-04-01T08:35:34
122,177,253
0
0
null
null
null
null
UTF-8
Java
false
false
1,855
java
// SMSLib for Java v3 // A Java API library for sending and receiving SMS via a GSM modem // or other supported gateways. // Web Site: http://www.smslib.org // // Copyright (C) 2002-2009, Thanasis Delenikas, Athens/GREECE. // SMSLib is distributed under the terms of the Apache License version 2.0 // // 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.keren.smsgateway.modem.athandler; import com.keren.smsgateway.model.TimeoutException; import com.keren.smsgateway.modem.ModemGateway; import java.io.IOException; import org.smslib.GatewayException; public class ATHandler_Siemens_MC35i_FD extends ATHandler_Siemens_MC35i { public ATHandler_Siemens_MC35i_FD(ModemGateway myGateway) { super(myGateway); } @Override public void sync() throws IOException, InterruptedException { getModemDriver().write("AT&F\r"); Thread.sleep(getGateway().getService().getSettings().AT_WAIT); } @Override public void reset() throws TimeoutException, GatewayException, IOException, InterruptedException { getModemDriver().write("\u001b"); Thread.sleep(getGateway().getService().getSettings().AT_WAIT); getModemDriver().write("+++"); Thread.sleep(getGateway().getService().getSettings().AT_WAIT); getModemDriver().write("AT&F"); Thread.sleep(getGateway().getService().getSettings().AT_WAIT); getModemDriver().clearBuffer(); } }
[ "bekondo_dieu@yahoo.fr" ]
bekondo_dieu@yahoo.fr
9e14e263b472fa4146c9c24679d428951934635e
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-58b-4-9-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/math/optimization/direct/BaseAbstractVectorialOptimizer_ESTest.java
97c385792307e09165fa348552f4ea7de83d2574
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
610
java
/* * This file was automatically generated by EvoSuite * Mon Apr 06 07:07:34 UTC 2020 */ package org.apache.commons.math.optimization.direct; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class BaseAbstractVectorialOptimizer_ESTest extends BaseAbstractVectorialOptimizer_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a70d0b86e42f075c341d12816513c11d6bb9416b
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/Shopkick_com.shopkick.app/javafiles/androidx/work/Operation$1.java
c928a7bcd534af12fea2d747c4c1b5740cb4ec2a
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
283
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package androidx.work; // Referenced classes of package androidx.work: // Operation static class Operation$1 { }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
cf2e80c968e3f0d3700987a17eb292c66ff15c77
a2df6764e9f4350e0d9184efadb6c92c40d40212
/aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/model/v20190815/DeleteLinkeBahamutCloudtenantResponse.java
a07ba2fe1436cb32cc0d2a85252e3f934744cdea
[ "Apache-2.0" ]
permissive
warriorsZXX/aliyun-openapi-java-sdk
567840c4bdd438d43be6bd21edde86585cd6274a
f8fd2b81a5f2cd46b1e31974ff6a7afed111a245
refs/heads/master
2022-12-06T15:45:20.418475
2020-08-20T08:37:31
2020-08-26T06:17:49
290,450,773
1
0
NOASSERTION
2020-08-26T09:15:48
2020-08-26T09:15:47
null
UTF-8
Java
false
false
2,914
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.sofa.model.v20190815; import com.aliyuncs.AcsResponse; import com.aliyuncs.sofa.transform.v20190815.DeleteLinkeBahamutCloudtenantResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class DeleteLinkeBahamutCloudtenantResponse extends AcsResponse { private String requestId; private String resultCode; private String resultMessage; private String errorMessage; private String errorMsgParamsMap; private String message; private Long responseStatusCode; private Boolean result; private Boolean success; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getResultCode() { return this.resultCode; } public void setResultCode(String resultCode) { this.resultCode = resultCode; } public String getResultMessage() { return this.resultMessage; } public void setResultMessage(String resultMessage) { this.resultMessage = resultMessage; } public String getErrorMessage() { return this.errorMessage; } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } public String getErrorMsgParamsMap() { return this.errorMsgParamsMap; } public void setErrorMsgParamsMap(String errorMsgParamsMap) { this.errorMsgParamsMap = errorMsgParamsMap; } public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public Long getResponseStatusCode() { return this.responseStatusCode; } public void setResponseStatusCode(Long responseStatusCode) { this.responseStatusCode = responseStatusCode; } public Boolean getResult() { return this.result; } public void setResult(Boolean result) { this.result = result; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } @Override public DeleteLinkeBahamutCloudtenantResponse getInstance(UnmarshallerContext context) { return DeleteLinkeBahamutCloudtenantResponseUnmarshaller.unmarshall(this, context); } @Override public boolean checkShowJsonItemName() { return false; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
57adf9eb7eaa27d97260b525da6ab5c7a4e9da9f
855862d70f4eb1f0bb5643c41f5bd1e48f5c73b0
/src/main/java/org/opendaylight/yang/gen/v1/urn/etsi/osm/yang/nsr/rev170208/NsOperationalStatus.java
d62937d115f395bc32904e31cb2aebd581744bfc
[]
no_license
openslice/io.openslice.sol005nbi.osm10
547c407ce2fd0d39753bce6ad24df1fa7144fe21
7ce7638d8ebba962fe0329e0a181b7d54d464ca7
refs/heads/develop
2023-08-31T05:46:54.627867
2023-08-25T07:02:41
2023-08-25T07:02:41
403,761,611
0
1
null
2023-08-25T07:02:42
2021-09-06T21:22:06
Java
UTF-8
Java
false
false
2,622
java
package org.opendaylight.yang.gen.v1.urn.etsi.osm.yang.nsr.rev170208; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap.Builder; import java.lang.Integer; import java.lang.Override; import java.lang.String; import java.util.Map; import java.util.Objects; import java.util.Optional; import org.opendaylight.yangtools.yang.binding.Enumeration; public enum NsOperationalStatus implements Enumeration { Init(0, "init"), VlInitPhase(1, "vl-init-phase"), VnfInitPhase(2, "vnf-init-phase"), Running(3, "running"), Terminate(4, "terminate"), VnfTerminatePhase(5, "vnf-terminate-phase"), VlTerminatePhase(6, "vl-terminate-phase"), Terminated(7, "terminated"), Failed(8, "failed"), ScalingOut(9, "scaling-out"), ScalingIn(10, "scaling-in"), VlInstantiate(11, "vl-instantiate"), VlTerminate(12, "vl-terminate") ; private static final Map<String, NsOperationalStatus> NAME_MAP; private static final Map<Integer, NsOperationalStatus> VALUE_MAP; static { final Builder<String, NsOperationalStatus> nb = ImmutableMap.builder(); final Builder<Integer, NsOperationalStatus> vb = ImmutableMap.builder(); for (NsOperationalStatus enumItem : NsOperationalStatus.values()) { vb.put(enumItem.value, enumItem); nb.put(enumItem.name, enumItem); } NAME_MAP = nb.build(); VALUE_MAP = vb.build(); } private final String name; private final int value; private NsOperationalStatus(int value, String name) { this.value = value; this.name = name; } @Override public String getName() { return name; } @Override public int getIntValue() { return value; } /** * Return the enumeration member whose {@link #getName()} matches specified value. * * @param name YANG assigned name * @return corresponding NsOperationalStatus item, if present * @throws NullPointerException if name is null */ public static Optional<NsOperationalStatus> forName(String name) { return Optional.ofNullable(NAME_MAP.get(Objects.requireNonNull(name))); } /** * Return the enumeration member whose {@link #getIntValue()} matches specified value. * * @param intValue integer value * @return corresponding NsOperationalStatus item, or null if no such item exists */ public static NsOperationalStatus forValue(int intValue) { return VALUE_MAP.get(intValue); } }
[ "ioannischatzis@gmail.com" ]
ioannischatzis@gmail.com
281a3bd4051d4e4fc3a39a59cf25e003b8db9a6d
7e2370f2f2e7f3def35a50010f71d0301114e418
/RainWater.java
6183109df72adfdf6c189b507b24d0de5369cbe3
[]
no_license
sourcerose/CSE203X
5dd32e361e4efa42ab451fb8a98c39eb41305a35
d049e34bc30926270612cb5c92db2b408cbe0a71
refs/heads/master
2021-09-23T13:57:45.820994
2018-09-23T17:13:32
2018-09-23T17:13:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
923
java
import java.util.Arrays; public class RainWater { public static void main(String[] args) { int[] b = {5, 4, 2, 3, 4, 6}; int[] LR = getLeftToRight(b); System.out.println(Arrays.toString(LR)); int[] RL = getRightToLeft(b); System.out.println(Arrays.toString(RL)); int water = 0; for (int i = 0; i < b.length; i++) { water += Math.min(LR[i], RL[i]) - b[i]; } System.out.println("Water = " + water); } public static int[] getLeftToRight(int[] b) { int[] LR = new int[b.length]; int max = b[0]; for (int i = 0; i < LR.length; i++) { max = Math.max(max, b[i]); // if (b[i] > max) max = b[i]; LR[i] = max; } return LR; } public static int[] getRightToLeft(int[] b) { int[] RL = new int[b.length]; int max = b[b.length - 1]; for (int i = b.length - 1; i >= 0; i--) { max = Math.max(max, b[i]); // if (b[i] > max) max = b[i]; RL[i] = max; } return RL; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
1d02729027fc0e78e5ab61a0655af5ba06bf73fa
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13372-20-14-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/job/history/internal/ReplayJob_ESTest.java
2409265f4fb160ec8a9272c278da1d2c9e5e24bc
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
565
java
/* * This file was automatically generated by EvoSuite * Thu Apr 02 00:50:16 UTC 2020 */ package org.xwiki.extension.job.history.internal; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ReplayJob_ESTest extends ReplayJob_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
84668afd20ed0ce20123e1fc2fd5b133b804f821
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/main/java/org/gradle/test/performancenull_65/Productionnull_6462.java
cbacb61e8451b61dd1c9630b0de5a67d85d375c9
[]
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
585
java
package org.gradle.test.performancenull_65; public class Productionnull_6462 { private final String property; public Productionnull_6462(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
be68a5452a5937ea78315cf946d30bd1311ed50d
29acc5b6a535dfbff7c625f5513871ba55554dd2
/aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/transform/TopicRuleJsonMarshaller.java
fb842daf8bccf6358d9cf893fc3da326a6596445
[ "JSON", "Apache-2.0" ]
permissive
joecastro/aws-sdk-java
b2d25f6a503110d156853836b49390d2889c4177
fdbff1d42a73081035fa7b0f172b9b5c30edf41f
refs/heads/master
2021-01-21T16:52:46.982971
2016-01-11T22:55:28
2016-01-11T22:55:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,329
java
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.iot.model.transform; import static com.amazonaws.util.StringUtils.UTF8; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.OutputStreamWriter; import java.io.StringWriter; import java.io.Writer; import java.util.Map; import java.util.List; import com.amazonaws.AmazonClientException; import com.amazonaws.services.iot.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.util.BinaryUtils; import com.amazonaws.util.StringUtils; import com.amazonaws.util.StringInputStream; import com.amazonaws.util.json.*; /** * TopicRuleMarshaller */ public class TopicRuleJsonMarshaller { /** * Marshall the given parameter object, and output to a JSONWriter */ public void marshall(TopicRule topicRule, JSONWriter jsonWriter) { if (topicRule == null) { throw new AmazonClientException( "Invalid argument passed to marshall(...)"); } try { jsonWriter.object(); if (topicRule.getRuleName() != null) { jsonWriter.key("ruleName").value(topicRule.getRuleName()); } if (topicRule.getSql() != null) { jsonWriter.key("sql").value(topicRule.getSql()); } if (topicRule.getDescription() != null) { jsonWriter.key("description").value(topicRule.getDescription()); } if (topicRule.getCreatedAt() != null) { jsonWriter.key("createdAt").value(topicRule.getCreatedAt()); } java.util.List<Action> actionsList = topicRule.getActions(); if (actionsList != null) { jsonWriter.key("actions"); jsonWriter.array(); for (Action actionsListValue : actionsList) { if (actionsListValue != null) { ActionJsonMarshaller.getInstance().marshall( actionsListValue, jsonWriter); } } jsonWriter.endArray(); } if (topicRule.getRuleDisabled() != null) { jsonWriter.key("ruleDisabled").value( topicRule.getRuleDisabled()); } jsonWriter.endObject(); } catch (Throwable t) { throw new AmazonClientException( "Unable to marshall request to JSON: " + t.getMessage(), t); } } private static TopicRuleJsonMarshaller instance; public static TopicRuleJsonMarshaller getInstance() { if (instance == null) instance = new TopicRuleJsonMarshaller(); return instance; } }
[ "aws@amazon.com" ]
aws@amazon.com
a049e0f7f71b7c2ce9360a498b4c42acb8d2cc26
9f127cd00455d665f6cea0897cbf4c8f5db6e8c3
/DaWae/chapter4/section1/Exercise26.java
08a3422d7a92f159ba9871d2dd24e7824aca1321
[ "MIT" ]
permissive
NoticeMeDan/algo-exercises
9d1a218270dd47872bcc48d2ed1847a62b0a30eb
c97c4a61b19c1e75dae5f6c815bf12bbd22e1e7d
refs/heads/master
2021-09-13T11:47:51.979263
2018-04-29T10:36:25
2018-04-29T10:36:25
119,688,592
2
1
null
null
null
null
UTF-8
Java
false
false
4,368
java
package chapter4.section1; import chapter1.section3.Stack; import edu.princeton.cs.algs4.StdIn; import edu.princeton.cs.algs4.StdOut; import java.util.Iterator; /** * Created by Rene Argento on 19/09/17. */ //Arguments example: "/Users/rene/Desktop/Algorithms/Books/Algorithms, 4th ed. - Exercises/Data/movies.txt" / "Bacon, Kevin" @SuppressWarnings("unchecked") public class Exercise26 { private class DegreesOfSeparationDFS { private class DepthFirstPathsIterative { private boolean[] visited; private int[] edgeTo; private final int source; public DepthFirstPathsIterative(Graph graph, int source) { visited = new boolean[graph.vertices()]; edgeTo = new int[graph.vertices()]; this.source = source; depthFirstSearchIterative(graph, source); } private void depthFirstSearchIterative(Graph graph, int sourceVertex) { Stack<Integer> stack = new Stack<>(); stack.push(sourceVertex); visited[sourceVertex] = true; // Used to be able to iterate over each adjacency list, keeping track of which // vertex in each adjacency list needs to be explored next Iterator<Integer>[] adjacentIterators = (Iterator<Integer>[]) new Iterator[graph.vertices()]; for (int vertexId = 0; vertexId < adjacentIterators.length; vertexId++) { if(graph.getAdjacencyList()[vertexId] != null) { adjacentIterators[vertexId] = graph.getAdjacencyList()[vertexId].iterator(); } } while (!stack.isEmpty()) { int currentVertex = stack.peek(); if(adjacentIterators[currentVertex].hasNext()) { int neighbor = adjacentIterators[currentVertex].next(); if(!visited[neighbor]) { stack.push(neighbor); visited[neighbor] = true; edgeTo[neighbor] = currentVertex; } } else { stack.pop(); } } } public boolean hasPathTo(int vertex) { return visited[vertex]; } public Iterable<Integer> pathTo(int vertex) { if(!hasPathTo(vertex)) { return null; } Stack<Integer> path = new Stack<>(); for(int currentVertex = vertex; currentVertex != source; currentVertex = edgeTo[currentVertex]) { path.push(currentVertex); } path.push(source); return path; } } private void degreesOfSeparationDFS(String fileName, String separator, String sourcePerformer) { SymbolGraph symbolGraph = new SymbolGraph(fileName, separator); Graph graph = symbolGraph.graph(); if(!symbolGraph.contains(sourcePerformer)) { StdOut.println(sourcePerformer + " not in database."); return; } int sourceVertex = symbolGraph.index(sourcePerformer); DepthFirstPathsIterative depthFirstPathsIterative = new DepthFirstPathsIterative(graph, sourceVertex); while (!StdIn.isEmpty()) { String sink = StdIn.readLine(); if(symbolGraph.contains(sink)) { int destinationVertex = symbolGraph.index(sink); if(depthFirstPathsIterative.hasPathTo(destinationVertex)) { for(int vertexInPath : depthFirstPathsIterative.pathTo(destinationVertex)) { StdOut.println(" " + symbolGraph.name(vertexInPath)); } } else { StdOut.println("Not connected"); } } else { StdOut.println("Not in database."); } } } } public static void main(String[] args) { new Exercise26().new DegreesOfSeparationDFS().degreesOfSeparationDFS(args[0], args[1], args[2]); } }
[ "im.arnild@gmail.com" ]
im.arnild@gmail.com
82da05c9f8bfcee5ce67bfb23a0c3c505e801c54
da6f2ec1ab0c3ef5a219e5c02aa01eba53476135
/src/org/opensha/commons/hpc/mpj/taskDispatch/AsyncPostBatchHook.java
a0e425d386944c576bf1a92ff190bd77a54f6e4f
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
opensha/opensha-svn-archive
79850243faa31bdfe5f11e36c84ad33a481e0eca
77203dab6745320a5130fda85978ebe1a4e097c8
refs/heads/master
2023-04-28T09:16:13.758589
2021-05-21T16:36:37
2021-05-21T16:36:37
349,556,483
0
0
null
null
null
null
UTF-8
Java
false
false
1,407
java
package org.opensha.commons.hpc.mpj.taskDispatch; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import org.opensha.commons.util.ExceptionUtils; import com.google.common.base.Preconditions; public abstract class AsyncPostBatchHook implements PostBatchHook { private ExecutorService exec; private List<Future<?>> futures; public AsyncPostBatchHook(int threads) { Preconditions.checkState(threads > 0); if (threads == 1) exec = Executors.newSingleThreadExecutor(); else exec = Executors.newFixedThreadPool(threads); } public void batchProcessed(int[] batch, int processIndex) { ProcessHookRunnable run = new ProcessHookRunnable(batch, processIndex); futures.add(exec.submit(run)); } private class ProcessHookRunnable implements Runnable { private int[] batch; private int processIndex; public ProcessHookRunnable(int[] batch, int processIndex) { this.batch = batch; this.processIndex = processIndex; } @Override public void run() { batchProcessedAsync(batch, processIndex); } } public void shutdown() { exec.shutdown(); for (Future<?> f : futures) { try { f.get(); } catch (Exception e) { ExceptionUtils.throwAsRuntimeException(e); } } } protected abstract void batchProcessedAsync(int[] batch, int processIndex); }
[ "kmilner@usc.edu" ]
kmilner@usc.edu
a001f82ff9bccce76cbd5ffb406bf95901191737
a939adea223836501a8d7d260dbadfcc43c0ce84
/src/main/java/superiterable/StreamSchool.java
5260147e238d3ecfd60bb78720708d2086916045
[]
no_license
studanshu/sf-tt-monad-stream
2c9791617a4fd743ccc50f89a174a1b84adc4c4e
1b7fd700f76d8b962fab168af6e741a67dc8b704
refs/heads/master
2020-04-16T00:12:25.391205
2019-01-10T19:58:17
2019-01-10T19:58:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,327
java
package superiterable; import student.Student; import java.util.Arrays; import java.util.List; import java.util.stream.IntStream; import java.util.stream.Stream; public class StreamSchool { public static void main(String[] args) { List<Student> roster = Arrays.asList( Student.ofNameGpaCourses("Fred", 2.2, "Math", "Physics"), Student.ofNameGpaCourses("Jim", 3.2, "Art"), Student.ofNameGpaCourses("Sheila", 3.7, "Math", "Physics", "Quantum Mechanics") ); // Monad, fundamental operation is flatMap roster.stream() .forEach(System.out::println); roster.stream() .filter(s -> s.getGpa() > 3) .flatMap(s -> s.getCourses().stream()) .forEach(System.out::println); Stream<Student> ss = roster.stream(); ss.filter(s -> s.getCourses().size() < 3) .forEach(s -> System.out.println(">> " + s)); // ss.forEach(System.out::println); Arrays.asList("Fred", "Jim", "Sheila").stream() .filter(s -> s.length() > 3) .map(s -> s.length()) .forEach(System.out::println); IntStream.iterate(1, x -> x + 1) .forEach(System.out::println); } }
[ "simon@dancingcloudservices.com" ]
simon@dancingcloudservices.com
5dfe7ee0e9033c211624f9387dd29ac79861a4d4
b046824d2ae46cee9ec151114dfd7f07dd64790c
/src/main/java/com/intellif/core/init/ServiceBuilder.java
1755c6547fe62f2a831d3ea1deb9922f77313dfc
[]
no_license
leetox/core-init
bc9353a318281ebb824c6833ead409fbd08f71fb
330f4d8c84894eae72854ce9c6b4e5f98763df4c
refs/heads/master
2021-02-28T10:11:10.492468
2018-06-24T03:53:52
2018-06-24T03:53:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,544
java
package com.intellif.core.init; import java.io.File; import java.util.List; public class ServiceBuilder { private CoreConfig coreConfig; private String servicePage; public ServiceBuilder(CoreConfig config){ coreConfig = config; if(config.getServicePage()!=null){ servicePage = config.getServicePage(); }else{ servicePage = config.getParentPacke()+".service"; } } public void create(){ List<String> classNames = coreConfig.lisAllClassName(); if(classNames!=null){ for(String className:classNames){ String servicePath = coreConfig.getServiceRealPath(); String serviceName = "I"+className+"Service"; File path = new File(servicePath); File path2 =null; if(coreConfig.getServicePath()==null) { path2 = new File(servicePath + "//impl"); }else{ path2 = new File(coreConfig.getServiecImplRealPath()); } if(!path.exists()) { path.mkdirs(); } if(!path2.exists()){ path2.mkdirs(); } File file = new File(servicePath+"//"+serviceName+".java"); if(file.exists()) continue; StringBuilder sb = new StringBuilder("package "+servicePage+";").append(PathConfig.newLine())// .append("import "+coreConfig.getCorePage()+".*;").append(PathConfig.newLine())// .append("import "+coreConfig.getDomainPage()+"."+className+";").append(PathConfig.newLine())// .append(coreConfig.getAuthor())// .append("public interface "+serviceName+" extends IService<"+className+">{").append(PathConfig.newLine())// .append("}");// ; PathConfig.copyToFile(file,sb.toString()); String serviceImplPath = servicePath+"//impl"; String serviceImplName = className+"ServiceImpl"; file = new File(serviceImplPath+"//"+serviceImplName+".java"); sb = new StringBuilder("package "+servicePage+".impl;").append(PathConfig.newLine())// .append("import "+coreConfig.getCorePage()+".*;").append(PathConfig.newLine())// .append("import "+coreConfig.getDomainPage()+"."+className+";").append(PathConfig.newLine())// .append("import "+coreConfig.getDaoPage()+"."+className+"Dao;").append(PathConfig.newLine())// .append("import org.springframework.stereotype.Service;").append(PathConfig.newLine())// .append("import "+servicePage+"."+serviceName+";").append(PathConfig.newLine())// .append(coreConfig.getAuthor())// .append("@Service").append(PathConfig.newLine())// .append("public class "+serviceImplName+" extends ServiceImpl<"+className+"Dao,"+className+"> implements "+serviceName+"{").append(PathConfig.newLine())// .append("}"); PathConfig.copyToFile(file,sb.toString()); System.out.println(">>>>>>>>>>>>>>>>>>>>>>生成 "+serviceImplName+" 完成"); } } System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>service层代码生成完成>>>>>>>>>>>>>>>>>>>"); } }
[ "yin.chong@intellif.com" ]
yin.chong@intellif.com
1523d66cb2e27a94df3607d77098b7e0478998f2
0205999a193bf670cd9d6e5b37e342b75f4e15b8
/spring-web/src/main/java/org/springframework/web/accept/FixedContentNegotiationStrategy.java
4505ed16f9f6e4333e58c45dcd81c99ab699dbf1
[ "Apache-2.0" ]
permissive
leaderli/spring-source
18aa9a8c7c5e22d6faa6167e999ff88ffa211ba0
0edd75b2cedb00ad1357e7455a4fe9474b3284da
refs/heads/master
2022-02-18T16:34:19.625966
2022-01-29T08:56:48
2022-01-29T08:56:48
204,468,286
0
0
null
null
null
null
UTF-8
Java
false
false
2,200
java
/* * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.accept; import org.springframework.http.MediaType; import org.springframework.util.Assert; import org.springframework.web.context.request.NativeWebRequest; import java.util.Collections; import java.util.List; /** * A {@code ContentNegotiationStrategy} that returns a fixed content type. * * @author Rossen Stoyanchev * @since 3.2 */ public class FixedContentNegotiationStrategy implements ContentNegotiationStrategy { private final List<MediaType> contentTypes; /** * Constructor with a single default {@code MediaType}. */ public FixedContentNegotiationStrategy(MediaType contentType) { this(Collections.singletonList(contentType)); } /** * Constructor with an ordered List of default {@code MediaType}'s to return * for use in applications that support a variety of content types. * <p>Consider appending {@link MediaType#ALL} at the end if destinations * are present which do not support any of the other default media types. * * @since 5.0 */ public FixedContentNegotiationStrategy(List<MediaType> contentTypes) { Assert.notNull(contentTypes, "'contentTypes' must not be null"); this.contentTypes = Collections.unmodifiableList(contentTypes); } /** * Return the configured list of media types. */ public List<MediaType> getContentTypes() { return this.contentTypes; } @Override public List<MediaType> resolveMediaTypes(NativeWebRequest request) { return this.contentTypes; } }
[ "429243408@qq.com" ]
429243408@qq.com
c73cf350cd825ce297c3fed4bbd245369a8970ae
a887f244c0d4e1f70119de0d5f101ebed03fac82
/app/src/main/java/com/colpencil/secondhandcar/Views/Imples/Mine/CarTypeView.java
e455314f488ad72337f667955844be8e90f9cf36
[]
no_license
zsj6102/sc
3725d0d4475088b4b9879a9acc2a822b9eff36bf
4f2c9b72f8dde72bec06bde63eb5f47e404211a6
refs/heads/master
2020-12-02T19:44:55.317270
2017-08-10T01:15:45
2017-08-10T01:15:45
96,383,979
0
0
null
null
null
null
UTF-8
Java
false
false
853
java
package com.colpencil.secondhandcar.Views.Imples.Mine; import com.colpencil.secondhandcar.Bean.Response.CarResult; import com.colpencil.secondhandcar.Bean.Response.CarResultRes; import com.colpencil.secondhandcar.Bean.Response.CarType; import com.colpencil.secondhandcar.Bean.Response.MineSub; import com.colpencil.secondhandcar.Bean.Result; import com.colpencil.secondhandcar.Bean.ResultInfo; import com.property.colpencil.colpencilandroidlibrary.ControlerBase.MVP.ColpencilBaseView; /** * Created by Administrator on 2017/5/11. */ public interface CarTypeView extends ColpencilBaseView { void carType(Result<CarType> resultInfo); void typeError(String message); void addSunscribe(MineSub mineSub); void addError(String message); void searchResult(ResultInfo<CarResultRes> result); void resultError(String message); }
[ "610257110@qq.com" ]
610257110@qq.com
672df5693cc9c276982505b2a4a6c2dd88a37eb0
9d6457039922c7fa3cff0040785ca14478ca6228
/android/app/src/debug/java/com/fluffily_28895/ReactNativeFlipper.java
a88f8429c4f4540739781df59ed397db07ef59d3
[]
no_license
crowdbotics-apps/fluffily-28895
c9eb9ca822113890d79ef3af7dac8bdf1f2e7395
9991f5c69535674444ddd7a7b5a712f0f2a61154
refs/heads/master
2023-06-22T23:39:06.653274
2021-07-16T19:53:51
2021-07-16T19:53:51
386,747,981
0
0
null
null
null
null
UTF-8
Java
false
false
3,269
java
/** * Copyright (c) Facebook, Inc. and its affiliates. * * <p>This source code is licensed under the MIT license found in the LICENSE file in the root * directory of this source tree. */ package com.fluffily_28895; import android.content.Context; import com.facebook.flipper.android.AndroidFlipperClient; import com.facebook.flipper.android.utils.FlipperUtils; import com.facebook.flipper.core.FlipperClient; import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; import com.facebook.flipper.plugins.inspector.DescriptorMapping; import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; import com.facebook.flipper.plugins.react.ReactFlipperPlugin; import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.ReactContext; import com.facebook.react.modules.network.NetworkingModule; import okhttp3.OkHttpClient; public class ReactNativeFlipper { public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { if (FlipperUtils.shouldEnableFlipper(context)) { final FlipperClient client = AndroidFlipperClient.getInstance(context); client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); client.addPlugin(new ReactFlipperPlugin()); client.addPlugin(new DatabasesFlipperPlugin(context)); client.addPlugin(new SharedPreferencesFlipperPlugin(context)); client.addPlugin(CrashReporterPlugin.getInstance()); NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); NetworkingModule.setCustomClientBuilder( new NetworkingModule.CustomClientBuilder() { @Override public void apply(OkHttpClient.Builder builder) { builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); } }); client.addPlugin(networkFlipperPlugin); client.start(); // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized // Hence we run if after all native modules have been initialized ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); if (reactContext == null) { reactInstanceManager.addReactInstanceEventListener( new ReactInstanceManager.ReactInstanceEventListener() { @Override public void onReactContextInitialized(ReactContext reactContext) { reactInstanceManager.removeReactInstanceEventListener(this); reactContext.runOnNativeModulesQueueThread( new Runnable() { @Override public void run() { client.addPlugin(new FrescoFlipperPlugin()); } }); } }); } else { client.addPlugin(new FrescoFlipperPlugin()); } } } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
4b16e688e4459176d58fe7d69f619c23c2ae87e2
e8f59c915068c3fe4971761ea88ab169b916c63f
/magazine-ms_computing/src/main/java/com/alvesjefs/magazine/dto/CategoryDTO.java
02f17f27d5bb1c4be270744c43693062aa2e4fd2
[]
no_license
jefsAlves/magazine-black
83bc34002a012322b3d35262cc8685ecd13394d3
863b80775c0659235af119bd06ed8da3fb7dad9a
refs/heads/main
2023-02-25T23:43:22.523643
2021-01-26T17:15:58
2021-01-26T17:15:58
332,529,685
0
0
null
null
null
null
UTF-8
Java
false
false
1,287
java
package com.alvesjefs.magazine.dto; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import java.util.stream.Collectors; import com.alvesjefs.magazine.domain.Category; public class CategoryDTO implements Serializable { private static final long serialVersionUID = 1L; private Long id; private String name; private Integer categoryNumber; private Set<ProductsDTO> products = new HashSet<>(); public CategoryDTO() { } public CategoryDTO(Long id, String name, Integer categoryNumber) { this.id = id; this.name = name; this.categoryNumber = categoryNumber; } public CategoryDTO(Category category) { id = category.getId(); name = category.getName(); categoryNumber = category.getCategoryNumber(); products = category.getProducts().stream().map(x -> new ProductsDTO(x)).collect(Collectors.toSet()); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getCategoryNumber() { return categoryNumber; } public void setCategoryNumber(Integer categoryNumber) { this.categoryNumber = categoryNumber; } public Set<ProductsDTO> getProducts() { return products; } }
[ "jeffersonalmeida16@outlook.com" ]
jeffersonalmeida16@outlook.com
fe9c360574ba5704ec989fd0459da40cbff3234d
4589a9b3563e39d49039aa846fea25d9dbc10a8a
/src/destination_version/factorymethod/FactoryTest.java
285e933060e65988925173b1a1fa9d2ddb8aa040
[]
no_license
moocstudent/DesignPattern1
3769f733484e963110f65a6b75e5293cd1ec76ef
b728ea7c82e96960fac20baab0f3dc6f80336ea2
refs/heads/master
2022-03-06T13:07:06.189716
2019-12-07T15:08:16
2019-12-07T15:08:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package destination_version.factorymethod; /** * ��������Բ��ͣ�http://blog.csdn.net/zhangerqing * email:xtfggef@gmail.com * ΢����http://weibo.com/xtfggef * @author egg */ public class FactoryTest { public static void main(String[] args) { Sender sender = SendFactory.produceMail(); sender.Send(); } }
[ "deadzq@qq.com" ]
deadzq@qq.com
cbeb61cc647ec7d568e33aa877cdad429e557e7c
67208f78c62e30f2bb3f976294d259029d9cf4b0
/aspi-spring-boot-model/src/main/java/com/github/shuaidd/aspi/model/merchant/LabelDimensions.java
f7d6f9b270f2e91c70d03684c3f69bd7c836da7e
[ "MIT" ]
permissive
shuaidd/amazon-partner-api
214fdb74ee152080f544dbfefdbebb37bdb3dfd0
08133f13d0182876ac3c0257115a8fba5af71172
refs/heads/main
2022-07-29T07:28:39.757828
2022-01-24T04:52:40
2022-01-24T04:52:40
447,858,885
3
2
null
null
null
null
UTF-8
Java
false
false
2,927
java
/* * Selling Partner API for Merchant Fulfillment * The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services. * * OpenAPI spec version: v0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.github.shuaidd.aspi.model.merchant; import com.google.gson.annotations.SerializedName; import java.math.BigDecimal; import java.util.Objects; /** * Dimensions for printing a shipping label. */ public class LabelDimensions { @SerializedName("Length") private BigDecimal length = null; @SerializedName("Width") private BigDecimal width = null; @SerializedName("Unit") private UnitOfLength unit = null; public LabelDimensions length(BigDecimal length) { this.length = length; return this; } /** * The length dimension. * @return length **/ public BigDecimal getLength() { return length; } public void setLength(BigDecimal length) { this.length = length; } public LabelDimensions width(BigDecimal width) { this.width = width; return this; } /** * The width dimension. * @return width **/ public BigDecimal getWidth() { return width; } public void setWidth(BigDecimal width) { this.width = width; } public LabelDimensions unit(UnitOfLength unit) { this.unit = unit; return this; } /** * The unit of measurement. * @return unit **/ public UnitOfLength getUnit() { return unit; } public void setUnit(UnitOfLength unit) { this.unit = unit; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } LabelDimensions labelDimensions = (LabelDimensions) o; return Objects.equals(this.length, labelDimensions.length) && Objects.equals(this.width, labelDimensions.width) && Objects.equals(this.unit, labelDimensions.unit); } @Override public int hashCode() { return Objects.hash(length, width, unit); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LabelDimensions {\n"); sb.append(" length: ").append(toIndentedString(length)).append("\n"); sb.append(" width: ").append(toIndentedString(width)).append("\n"); sb.append(" unit: ").append(toIndentedString(unit)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "ddshuai@shinyway.com.cn" ]
ddshuai@shinyway.com.cn
21f46743fa90db85b2259e2b67f5d28337ac71a4
ac11084d828b9e1170f40fc5319f550c8d8c9802
/app/src/main/java/nbsidb/nearbyshops/org/EditProfileAdmin/EditProfileAdmin.java
f9f1bef459db9aa1fe0ab7aeb6261cd1eccf093d
[]
no_license
SumeetMoray/Nearby-Shops-GIDB-app-Deprecated
2717c1a10781f42f508f506ce0da5095bf2471c2
1ea4303458e835a0443f943c2a268bcb1052f123
refs/heads/master
2022-04-03T02:22:47.121450
2020-02-14T14:14:42
2020-02-14T14:14:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
982
java
package nbsidb.nearbyshops.org.EditProfileAdmin; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import nbsidb.nearbyshops.org.R; public class EditProfileAdmin extends AppCompatActivity { public static final String TAG_FRAGMENT_EDIT = "fragment_edit"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_edit_admin); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); if(getSupportFragmentManager().findFragmentByTag(TAG_FRAGMENT_EDIT)==null) { getSupportFragmentManager() .beginTransaction() .add(R.id.fragment_container,new EditAdminFragment(),TAG_FRAGMENT_EDIT) .commit(); } } }
[ "sumeet.0587@gmail.com" ]
sumeet.0587@gmail.com
c1548a0150a87cad5981ba2acf306bedb7070e7e
f3d7b495fd46c5ac99701188545d2bd9a2b7f502
/serviceuri/com/rc/openapi/serviceuri/GetReturnsInfoService.java
5c8f063b20881f6423dd0516b4f347bf9b39beed
[]
no_license
AdorkDean/111_yao_app_mobile
408067a16d6a6a219b93d37531c58236a93eae49
37bbc9f86977f4c5a803223fc85d022c36228807
refs/heads/master
2020-03-12T19:27:51.592084
2016-12-03T10:11:40
2016-12-03T10:11:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,971
java
package com.rc.openapi.serviceuri; import java.io.IOException; import java.math.BigDecimal; import java.sql.SQLException; import java.sql.Timestamp; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.json.JSONObject; import org.apache.log4j.Logger; import org.springframework.util.StringUtils; import com.rc.openapi.model.Product1Vo; import com.rc.openapi.model.ReturnsVO; import com.rc.openapi.service.impl.OpenSqlManageImpl; import com.rc.openapi.service.impl.TMemberManagerImpl; import com.rc.openapi.util.ConstantUtil; /** * 查看售后详情 * */ public class GetReturnsInfoService extends BaseURIService { private static final long serialVersionUID = 1110296124974369342L; private final Logger log = Logger.getLogger(getClass()); public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } @SuppressWarnings("unchecked") public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String sessionid = request.getParameter("sessionId");// 用户Id Map map = new HashMap(); String statusCode = null; if(StringUtils.hasText(sessionid)){ TMemberManagerImpl tmembermanager = (TMemberManagerImpl) getSpringBean("tmembermanager"); try { Long userId = tmembermanager.getMemberId(sessionid); if(0<userId){ String orderId = request.getParameter("orderId");// 订单Id String retuId = request.getParameter("retuId");// 售后单Id OpenSqlManageImpl om = (OpenSqlManageImpl) getSpringBean("opensqlmanage"); map.put("retId", Long.parseLong(retuId)); Object obj = om.selectForObjectByMap(map, "t_return.selectReturnsByRetId"); List list = om.selectForListByMap(map, "t_return.selectReturnsProductByRetId"); map.clear(); map.put("orderId", Long.parseLong(orderId)); Object obj1 = om.selectForObjectByMap(map, "t_return.selectReturnsOrderByOrderId"); ReturnsVO robj = dataGroup(obj, list, obj1); map.clear(); map.put("obj", robj); statusCode="1"; }else { statusCode="2"; } } catch (SQLException e) { statusCode="0"; e.printStackTrace(); } }else { statusCode="0"; } map.put("statusCode", statusCode); JSONObject json4 = JSONObject.fromObject(map); ConstantUtil.reJSON(json4.toString(), request, response); } private ReturnsVO dataGroup(Object obj,List list,Object obj1){ Map<String,Object> map = (Map<String,Object>)obj; Map<String,Object> map1 = (Map<String,Object>)obj1; ReturnsVO robj = new ReturnsVO(); String aname = (String) map1.get("area_name"); String anamess = (String) map1.get("address"); robj.setArea(aname+" "+anamess); robj.setConsignee((String)map1.get("consignee")); robj.setPhone((String)map1.get("phone")); robj.setOsn((String)map.get("osn")); robj.setRsn((String)map.get("rsn")); DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Timestamp odate = (Timestamp) map.get("odate"); robj.setoDate(sdf.format(odate)); Timestamp rdate = (Timestamp) map.get("rdate"); robj.setrDate(sdf.format(rdate)); robj.setPaymentMethodName((String)map.get("payment_method_name")); Integer sta = (Integer) map.get("status"); if(sta==1){ robj.setLogisticsInfo("1"); String linfo = (String)map.get("logistics_company")+","+(String)map.get("express_no"); if(!linfo.contains("null")){ robj.setLogisticsInfo("2"); } }else { String linfo = (String)map.get("logistics_company")+","+(String)map.get("express_no"); if(linfo.contains("null")){ robj.setLogisticsInfo(""); }else { robj.setLogisticsInfo(linfo); } } robj.setStatus(sta.toString()); robj.setRemarks((String)map.get("remarks")); robj.setDescription((String)map.get("description")); List<Product1Vo> plist = new ArrayList<Product1Vo>(); BigDecimal priceSum = new BigDecimal("0"); for (Object object : list) { Product1Vo pobj = new Product1Vo(); Map<String,Object> maplist = (Map<String,Object>)object; long pid = (Long)maplist.get("product"); pobj.setpId(pid+""); pobj.setImage((String)maplist.get("img")); pobj.setName((String)maplist.get("name")); Integer qua = (Integer) maplist.get("quantity"); pobj.setQuantity(qua.toString()); BigDecimal bd = (BigDecimal) maplist.get("price"); if(null==bd){ pobj.setPrice("待确认"); }else { pobj.setPrice(bd.toString()); priceSum = priceSum.add(bd).multiply(new BigDecimal(""+qua)); } plist.add(pobj); } robj.setPlist(plist); if(!priceSum.equals(new BigDecimal("0"))){ robj.setPriceSum(priceSum.toString()); }else { robj.setPriceSum("待确认"); } return robj; } }
[ "tzmarlon@163.com" ]
tzmarlon@163.com
fad0c7a12ad5fd47b240be2b7d5d24da59de8ce1
7b9265383e208dc0939521cf3357d4627bca0e3a
/src/test/java/io/github/kettlecode/jhiphstersample/config/WebConfigurerTestController.java
0bea93195022b62c64b4a69812ecf339b339f870
[]
no_license
zhengzhejun/jhipster-sample-application
a5b8a3c30ec9800a3df4f0cc6aa4a72fe86c9759
02e34fecf4f4e2ca1b0e5a08628ff7e1f42c30e0
refs/heads/master
2020-04-23T14:32:35.466260
2019-02-18T07:26:32
2019-02-18T07:26:32
171,235,296
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
package io.github.kettlecode.jhiphstersample.config; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class WebConfigurerTestController { @GetMapping("/api/test-cors") public void testCorsOnApiPath() { } @GetMapping("/test/test-cors") public void testCorsOnOtherPath() { } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
e44957ec4c82aeec6741a0de9b1d7f016cf90276
c98fff0fea11a7f0cf4cf93e02bea449c09284be
/src/main/java/softuni/webproject/web/views/models/schedule/AddTreatmentControllerModel.java
1854801db78492b5931b8f2e034876bbb6017db2
[]
no_license
ganchevdimitarg/WebProject
9d242020935faa1de6621a20bab49f5306569fc2
cdc33c98c5b0bfa6f2b9205fd859be6fcce7e929
refs/heads/master
2020-09-07T13:56:53.996676
2019-12-15T08:04:14
2019-12-15T08:04:14
220,802,336
0
0
null
null
null
null
UTF-8
Java
false
false
293
java
package softuni.webproject.web.views.models.schedule; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor public class AddTreatmentControllerModel { private String id; private String medicine; private String disease; }
[ "ganchevdimitargeorgiev" ]
ganchevdimitargeorgiev
b241c0628ce6479efb1da9dcbe27f76dc14c52bb
2cbde65fa8f85232bc953dccdb7c4c1beb892c19
/src/com/adibrata/smartdealer/action/amendment/assetreplacement/request/AssetReplacementRequestAction.java
b542939ac754f28bd2bbc5ce46a7f9d7c6dc35c5
[]
no_license
AdibrataCompany/Smile
c02f1489222e27f570eed64d901abb10139b14d6
09238a30b9fd0fccc19882ddba02401ff47738d6
refs/heads/master
2021-01-10T18:23:47.256061
2015-09-27T03:57:57
2015-11-01T04:08:53
39,287,257
1
1
null
2015-07-24T07:37:05
2015-07-18T05:00:35
HTML
UTF-8
Java
false
false
3,571
java
package com.adibrata.smartdealer.action.amendment.assetreplacement.request; import com.adibrata.smartdealer.action.BaseAction; import com.adibrata.smartdealer.model.Office; import com.adibrata.smartdealer.model.Partner; import com.opensymphony.xwork2.Preparable; public class AssetReplacementRequestAction extends BaseAction implements Preparable { /** * */ private static final long serialVersionUID = 1L; private String mode; private String searchcriteria; private String searchvalue; private Long id; Partner partner; Office office; private int pageNumber; private String message; public AssetReplacementRequestAction() throws Exception { // TODO Auto-generated constructor stub this.partner = new Partner(); this.office = new Office(); this.partner.setPartnerCode(BaseAction.sesPartnerCode()); this.office.setId(BaseAction.sesOfficeId()); } @Override public void prepare() throws Exception { // TODO Auto-generated method stub } @Override public String execute() throws Exception { return this.mode; } /** * @return the mode */ public String getMode() { return this.mode; } /** * @param mode * the mode to set */ public void setMode(final String mode) { this.mode = mode; } /** * @return the searchcriteria */ public String getSearchcriteria() { return this.searchcriteria; } /** * @param searchcriteria * the searchcriteria to set */ public void setSearchcriteria(final String searchcriteria) { this.searchcriteria = searchcriteria; } /** * @return the searchvalue */ public String getSearchvalue() { return this.searchvalue; } /** * @param searchvalue * the searchvalue to set */ public void setSearchvalue(final String searchvalue) { this.searchvalue = searchvalue; } /** * @return the id */ public Long getId() { return this.id; } /** * @param id * the id to set */ public void setId(final Long id) { this.id = id; } /** * @return the partner */ public Partner getPartner() { return this.partner; } /** * @param partner * the partner to set */ public void setPartner(final Partner partner) { this.partner = partner; } /** * @return the office */ public Office getOffice() { return this.office; } /** * @param office * the office to set */ public void setOffice(final Office office) { this.office = office; } /** * @return the pageNumber */ public int getPageNumber() { return this.pageNumber; } /** * @param pageNumber * the pageNumber to set */ public void setPageNumber(final int pageNumber) { this.pageNumber = pageNumber; } /** * @return the message */ public String getMessage() { return this.message; } /** * @param message * the message to set */ public void setMessage(final String message) { this.message = message; } /** * @return the serialversionuid */ public static long getSerialversionuid() { return serialVersionUID; } }
[ "henry.sudarma@adibrata.co.id" ]
henry.sudarma@adibrata.co.id
558dd5ed99ac0a07c992a02f9e0377c4f006329b
77b2dfeec8e504da2039bf11edfc4d9f3484348c
/src/org/sgpro/signalmaster/ContactUs.java
67a59ed555a4f5f2a83ce50bf07c12b38b8fcec3
[]
no_license
lujx1024/robotServer
a653775e62dae56477c9466ac6244fb6dd4baae1
34e231250861c1c7f74aae82b8560ff981e9d6ab
refs/heads/master
2020-03-22T23:40:28.256321
2018-07-13T08:59:18
2018-07-13T08:59:18
140,822,860
0
0
null
null
null
null
UTF-8
Java
false
false
2,144
java
package org.sgpro.signalmaster; import java.sql.CallableStatement; import java.sql.Connection; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import org.apache.log4j.Logger; import org.sgpro.db.HibSf; import config.Log4jInit; /** */ @Path("/contact_us") public class ContactUs extends HttpServlet { static Logger logger = Logger.getLogger(ContactUs.class.getName()); /** * */ private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public ContactUs() { super(); // TODO Auto-generated constructor stub } @Context private HttpServletRequest request; @Context private HttpServletResponse response; @POST @Produces(MediaType.APPLICATION_JSON) public String contactUs( @FormParam("email") String email ,@FormParam("subject") String subject ,@FormParam("content") String content ,@FormParam("name") String name ,@FormParam("authcode") String authCode ) throws Throwable { Result r = Result.success(); try { response.addHeader("Access-Control-Allow-Origin" , "*"); Connection c = HibSf.getConnection(); CallableStatement call = c.prepareCall("exec SP_SAVE_USER_FEEDBACK ?, ?, ?, ?"); int argCount = 1; call.setString(argCount++, name); call.setString(argCount++, email); call.setString(argCount++, subject); call.setString(argCount++, content); call.execute(); logger.info(email + ":" + subject + ":" + name + ":" + authCode + ":" + r.toString()); } catch (Throwable th) { r = Result.unknowException(th); th.printStackTrace(); } return r.toString(); } }
[ "lujx_1024@163.com" ]
lujx_1024@163.com
9ec9c908951296a8cc985827a7da63f576fd13df
eb8a97f5a919e45fb17441a079f80cb3dd4b751b
/app/src/main/java/com/cvnavi/logistics/i51eyun/app/activity/driver/home/statistics/DriverMileageLastThreeDayFragment.java
6baff2551c9f56dcdc2523a94d0311f5924ab776
[]
no_license
ChenJun1/I51EY
46b3e5417fce5df3b945cd65731e6908d392157c
cf10d8f93665cddda4a111cae34dbb1b05a33414
refs/heads/master
2020-12-01T06:07:32.464735
2016-08-31T02:15:16
2016-08-31T02:15:16
66,893,987
0
0
null
null
null
null
UTF-8
Java
false
false
5,103
java
package com.cvnavi.logistics.i51eyun.app.activity.driver.home.statistics; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import com.cvnavi.logistics.i51eyun.app.BaseFragment; import com.cvnavi.logistics.i51eyun.app.R; import com.cvnavi.logistics.i51eyun.app.activity.driver.home.location.DriverCarTreeListActivity; import com.cvnavi.logistics.i51eyun.app.bean.model.mCarInfo; import com.cvnavi.logistics.i51eyun.app.callback.driver.home.location.LocationChooseCarCallback; import com.cvnavi.logistics.i51eyun.app.callback.manager.LocationChooseCarCallBackManager; import com.cvnavi.logistics.i51eyun.app.utils.DateUtil; import com.cvnavi.logistics.i51eyun.app.utils.DialogUtils; import com.cvnavi.logistics.i51eyun.app.widget.dialog.custom.DateTimeTwoPickDialog; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; /** * 版权所有势航网络e * Created by ${chuzy} on 2016/7/1. */ public class DriverMileageLastThreeDayFragment extends BaseFragment implements LocationChooseCarCallback { @BindView(R.id.CarStartTime_et) EditText CarStartTimeEt; @BindView(R.id.CarEndTime_et) EditText CarEndTimeEt; @BindView(R.id.ChooseCar_et) EditText ChooseCarEt; @BindView(R.id.query_btn) Button queryBtn; private String carCodeKey; public static DriverMileageLastThreeDayFragment getInstance() { return new DriverMileageLastThreeDayFragment(); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LocationChooseCarCallBackManager.newStance().add(this); } @Override public void onDestroy() { LocationChooseCarCallBackManager.newStance().remove(this); super.onDestroy(); } @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_mileage_statics_last_day, container, false); ButterKnife.bind(this, view); initView(); return view; } private void initView() { CarStartTimeEt.setText(DateUtil.getBeforeDayNsTime(3,DateUtil.FORMAT_YMDHM)); CarEndTimeEt.setText(DateUtil.getCurDateStr(DateUtil.FORMAT_YMDHM)); } @OnClick({R.id.CarStartTime_et, R.id.CarEndTime_et, R.id.ChooseCar_et, R.id.query_btn}) public void onClick(View view) { switch (view.getId()) { case R.id.CarStartTime_et: DateTimeTwoPickDialog dateTimeTwoPickDialog = new DateTimeTwoPickDialog(CarStartTimeEt.getText().toString()); dateTimeTwoPickDialog.dateTimePicKDialog(getActivity(), CarStartTimeEt, null); break; case R.id.CarEndTime_et: dateTimeTwoPickDialog = new DateTimeTwoPickDialog(CarEndTimeEt.getText().toString()); dateTimeTwoPickDialog.dateTimePicKDialog(getActivity(), CarEndTimeEt, null); break; case R.id.ChooseCar_et: Intent intent = new Intent(getActivity(), DriverCarTreeListActivity.class); startActivity(intent); break; case R.id.query_btn: verification(); break; } } private void verification() { if (TextUtils.isEmpty(CarStartTimeEt.getText())) { DialogUtils.showNormalToast("请选择开始时间!"); return; } if (TextUtils.isEmpty(CarEndTimeEt.getText())) { DialogUtils.showNormalToast("请选择结束时间!"); return; } if (DateUtil.compareDate(CarStartTimeEt.getText().toString(), CarEndTimeEt.getText().toString())) { DialogUtils.showNormalToast("开始时间不能大于结束时间"); return; } if (DateUtil.compareDateNDays(CarStartTimeEt.getText().toString(), CarEndTimeEt.getText().toString(), DateUtil.FORMAT_YMDHM, 90) == 2) { DialogUtils.showNormalToast("只能查询最近90天的数据"); return; } if (TextUtils.isEmpty(ChooseCarEt.getText())) { DialogUtils.showNormalToast("请选择车辆!"); return; } DriverMileageSearchDeatilActivity.startActivity(getActivity(), CarStartTimeEt.getText().toString(), CarEndTimeEt.getText().toString(), carCodeKey); } @Override public void OnMonitorLoadCarCode(mCarInfo mCarInfo) { if (mCarInfo != null) { ChooseCarEt.setText(mCarInfo.CarCode); carCodeKey = mCarInfo.CarCode_Key; } } @Override public void OnHistorLoadCarCode(mCarInfo mCarInfo) { if (mCarInfo != null) { ChooseCarEt.setText(mCarInfo.CarCode); carCodeKey = mCarInfo.CarCode_Key; } } }
[ "791954958@qq.com" ]
791954958@qq.com
dc5516301a3ac863b9d99700a434013f40a97cb7
66e13bf7a6639cb37fd6d6160945d37119fe6df4
/Java/02.DB/02.SpringData/11.SpringDataIntro/Ex/src/main/java/com/spring/intro/homework/services/impl/BookServiceImpl.java
4fd401090f48c9c6fe4916336dafc3cb5580bb39
[]
no_license
MeGaDeTH91/SoftUni
5fd10e55ba3a1700345fec720beac5dc2cd9d18d
a5e50c77d6efe6deddb9be0bdfb87373692aa668
refs/heads/master
2023-01-25T05:01:15.172521
2021-12-18T22:22:46
2021-12-18T22:22:46
121,627,540
5
3
null
2023-01-11T22:01:03
2018-02-15T12:31:23
C#
UTF-8
Java
false
false
4,116
java
package com.spring.intro.homework.services.impl; import com.spring.intro.homework.models.entity.Author; import com.spring.intro.homework.models.entity.Book; import com.spring.intro.homework.models.entity.Category; import com.spring.intro.homework.models.enumerations.AgeRestriction; import com.spring.intro.homework.models.enumerations.EditionType; import com.spring.intro.homework.repositories.BookRepository; import com.spring.intro.homework.services.interfaces.AuthorService; import com.spring.intro.homework.services.interfaces.BookService; import com.spring.intro.homework.services.interfaces.CategoryService; import org.springframework.stereotype.Service; import java.io.IOException; import java.math.BigDecimal; import java.nio.file.Files; import java.nio.file.Path; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Arrays; import java.util.List; import java.util.Set; import java.util.stream.Collectors; @Service public class BookServiceImpl implements BookService { private static final String BOOKS_FILE_PATH = "src/main/resources/files/books.txt"; private final BookRepository bookRepository; private final AuthorService authorService; private final CategoryService categoryService; public BookServiceImpl(BookRepository bookRepository, AuthorService authorService, CategoryService categoryService) { this.bookRepository = bookRepository; this.authorService = authorService; this.categoryService = categoryService; } @Override public void seedBooks() throws IOException { if(bookRepository.count() < 1) { Files.readAllLines(Path.of(BOOKS_FILE_PATH)) .stream() .filter(book -> !book.isEmpty()) .forEach(row -> { String[] rowTokens = row.split("\\s+"); Book book = createBookFromTokens(rowTokens); bookRepository.save(book); }); } } @Override public List<String> findAllBooksBeforeYear(int year) { return bookRepository.findAllByReleaseDateBefore(LocalDate.of(year, 1, 1)).stream().map(book -> { Author author = book.getAuthor(); if(author.getFirstName() != null) { return String.format("%s %s", author.getFirstName(), author.getLastName()); } else { return author.getLastName(); } }) .distinct() .collect(Collectors.toList()); } @Override public List<Book> findAllBooksAfterYear(int year) { return bookRepository.findAllByReleaseDateAfter(LocalDate.of(year, 12, 31)); } @Override public List<String> getBooksByAuthorFirstNameAndLastName(String firstName, String lastName) { return bookRepository .findAllByAuthor_FirstNameAndAuthor_LastNameOrderByReleaseDateDescTitleAsc(firstName, lastName) .stream().map(book -> String.format("%s, release date: %s, copies: %d", book.getTitle(), book.getReleaseDate().toString(), book.getCopies())) .collect(Collectors.toList()); } private Book createBookFromTokens(String[] data) { Author author = authorService.getRandomAuthor(); EditionType editionType = EditionType.values()[Integer.parseInt(data[0])]; LocalDate releaseDate = LocalDate.parse(data[1], DateTimeFormatter.ofPattern("d/M/yyyy")); int copies = Integer.parseInt(data[2]); BigDecimal price = new BigDecimal(data[3]); AgeRestriction ageRestriction = AgeRestriction .values()[Integer.parseInt(data[4])]; String title = Arrays.stream(data) .skip(5) .collect(Collectors.joining(" ")); Set<Category> categories = categoryService.getRandomCategories(); return new Book(title, editionType, price, copies, releaseDate, ageRestriction, author, categories); } }
[ "martin_taskov@yahoo.com" ]
martin_taskov@yahoo.com
78d5f653e50dac90553a5016b38272ad61720faf
118fc29c737d40950a9dadabb02710a8f6f24534
/java/de/sanandrew/mods/turretmod/util/upgrade/TUpgradeHealth.java
88109348bac5b86a134e76ff37ca208b283cde7c
[]
no_license
Searge-DP/TurretModRebirth
b0a72532fcb4870081d8612074009a869797511b
e98b4b344552ac9270474251c54d6f8027c1a7b7
refs/heads/master
2020-04-01T14:48:01.507016
2015-09-11T08:52:55
2015-09-11T08:52:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,787
java
/** * **************************************************************************************************************** * Authors: SanAndreasP * Copyright: SanAndreasP * License: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International * http://creativecommons.org/licenses/by-nc-sa/4.0/ * ***************************************************************************************************************** */ package de.sanandrew.mods.turretmod.util.upgrade; import de.sanandrew.core.manpack.util.EnumAttrModifierOperation; import de.sanandrew.mods.turretmod.api.Turret; import de.sanandrew.mods.turretmod.api.TurretUpgrade; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import java.util.UUID; public abstract class TUpgradeHealth extends TurretUpgradeBase { private final AttributeModifier modifier; private final int upgLevel; private TUpgradeHealth(String upgName, String texture, UUID attribUUID, int level) { this(upgName, texture, attribUUID, level, null); } private TUpgradeHealth(String upgName, String texture, UUID attribUUID, int level, TurretUpgrade dependsOn) { super(upgName, texture, dependsOn); this.modifier = new AttributeModifier(attribUUID, String.format("healthUpg_%d", level), 0.25D, EnumAttrModifierOperation.ADD_PERC_VAL_TO_SUM.ordinal()); this.upgLevel = level; } @Override public final void onApply(Turret turret) { if( !turret.getEntity().worldObj.isRemote ) { turret.getEntity().getEntityAttribute(SharedMonsterAttributes.maxHealth).applyModifier(modifier); turret.getEntity().setHealth(this.incrHealth(turret.getEntity())); } } @Override public final void onRemove(Turret turret) { turret.getEntity().setHealth(this.decrHealth(turret.getEntity())); turret.getEntity().getEntityAttribute(SharedMonsterAttributes.maxHealth).removeModifier(modifier); } private float incrHealth(EntityLiving living) { float modifierRemover = 1.0F + (float) modifier.getAmount() * (this.upgLevel - 1); float modifierAdd = 1.0F + (float) modifier.getAmount() * this.upgLevel; return (living.getHealth() / modifierRemover) * modifierAdd; } private float decrHealth(EntityLiving living) { float modifierRemover = 1.0F + (float) modifier.getAmount() * (this.upgLevel - 1); float modifierAdd = 1.0F + (float) modifier.getAmount() * this.upgLevel; return (living.getHealth() / modifierAdd) * modifierRemover; } public static class TUpgradeHealthI extends TUpgradeHealth { public TUpgradeHealthI() { super("healthUpgradeI", "upgrades/health_i", UUID.fromString("84BF0C8F-A5E8-429F-A7ED-DEE503CA4505"), 1); } } public static class TUpgradeHealthII extends TUpgradeHealth { public TUpgradeHealthII(TurretUpgrade dependant) { super("healthUpgradeII", "upgrades/health_ii", UUID.fromString("704FA08B-F49A-4A69-86E9-FFAD639868C9"), 2, dependant); } } public static class TUpgradeHealthIII extends TUpgradeHealth { public TUpgradeHealthIII(TurretUpgrade dependant) { super("healthUpgradeIII", "upgrades/health_iii", UUID.fromString("E1C7BBB8-ACE8-413D-B7EA-D95C7FF5285F"), 3, dependant); } } public static class TUpgradeHealthIV extends TUpgradeHealth { public TUpgradeHealthIV(TurretUpgrade dependant) { super("healthUpgradeIV", "upgrades/health_iv", UUID.fromString("E4D37B7F-81DD-439E-B359-539E76F01B71"), 4, dependant); } } }
[ "1294@live.de" ]
1294@live.de
c392d79d5f6e988a1ea687e28a1254f491e025e0
ae8cf403bc231f8035f77070f4fac10bc0400121
/src/main/java/com/wejet/channel/web/rest/vm/ManagedUserVM.java
08323f8a6b97c8f896532b40a7a9ff105bf4b467
[]
no_license
Levin-Li/wejet-application
bdf4eb54c5a9a7daec4ab41f2ca5280a755e4400
08aec1ceba8ab5b54cedd5f202168c8000e72e50
refs/heads/master
2020-05-03T14:50:53.544576
2019-03-31T13:07:00
2019-03-31T13:07:00
178,689,291
0
0
null
null
null
null
UTF-8
Java
false
false
840
java
package com.wejet.channel.web.rest.vm; import com.wejet.channel.service.dto.UserDTO; import javax.validation.constraints.Size; /** * View Model extending the UserDTO, which is meant to be used in the user management UI. */ public class ManagedUserVM extends UserDTO { public static final int PASSWORD_MIN_LENGTH = 4; public static final int PASSWORD_MAX_LENGTH = 100; @Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH) private String password; public ManagedUserVM() { // Empty constructor needed for Jackson. } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public String toString() { return "ManagedUserVM{" + "} " + super.toString(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
89b79b923d2cf98dd273f584d0712a3772bbac5c
7dc02565b237f6342268d37c0551fbc7bcc93690
/scouter.common/src/scouter/lang/step/StepEnum.java
fcf26be3d908988fe8c2f9771084182ca234c990
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
Hanium-RealTimeScouter/Hanium-Scouter
b9de08c2735d62d0341b67c1d355c97615088d03
695ee6e0cd5b50270b71057a29b01902dcf3fcce
refs/heads/master
2020-12-30T13:08:41.951502
2017-08-19T06:49:43
2017-08-19T06:49:43
91,330,797
3
2
null
null
null
null
UTF-8
Java
false
false
2,875
java
/* * Copyright 2015 the original author or authors. * @https://github.com/scouter-project/scouter * * 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 scouter.lang.step; import java.io.IOException; public class StepEnum { public final static byte METHOD = 1; public final static byte METHOD2 = 10; public final static byte SQL = 2; public final static byte SQL2 = 8; public final static byte SQL3 = 16; public final static byte MESSAGE = 3; public final static byte SOCKET = 5; public final static byte APICALL = 6; public final static byte APICALL2 = 15; public static final byte THREAD_SUBMIT = 7; public final static byte HASHED_MESSAGE = 9; public final static byte PARAMETERIZED_MESSAGE = 17; public final static byte DUMP = 12; public final static byte DISPATCH = 13; public final static byte THREAD_CALL_POSSIBLE = 14; public final static byte METHOD_SUM = 11; public final static byte SQL_SUM = 21; public final static byte MESSAGE_SUM = 31; public static final byte SOCKET_SUM = 42; public static final byte APICALL_SUM = 43; public final static byte CONTROL = 99; public static Step create(byte type) throws IOException { switch (type) { case MESSAGE: return new MessageStep(); case METHOD: return new MethodStep(); case METHOD2: return new MethodStep2(); case SQL: return new SqlStep(); case SQL2: return new SqlStep2(); case SQL3: return new SqlStep3(); case SOCKET: return new SocketStep(); case APICALL: return new ApiCallStep(); case APICALL2: return new ApiCallStep2(); case THREAD_SUBMIT: return new ThreadSubmitStep(); case HASHED_MESSAGE: return new HashedMessageStep(); case PARAMETERIZED_MESSAGE: return new ParameterizedMessageStep(); case DUMP: return new DumpStep(); case DISPATCH: return new DispatchStep(); case THREAD_CALL_POSSIBLE: return new ThreadCallPossibleStep(); case MESSAGE_SUM: return new MessageSum(); case METHOD_SUM: return new MethodSum(); case SQL_SUM: return new SqlSum(); case SOCKET_SUM: return new SocketSum(); case APICALL_SUM: return new ApiCallSum(); case CONTROL: return new StepControl(); default: throw new RuntimeException("unknown profile type=" + type); } } public static void main(String[] args) { System.out.println(SQL); } }
[ "occidere@naver.com" ]
occidere@naver.com
742f8cd0724a1b0e3603946f0d6d1f8f331165d3
5a7dac5759e0e840ce1ad8e990284dae11860770
/pebble-locker-android/pebblelocker/src/main/java/com/lukekorth/pebblelocker/models/AndroidWearDevices.java
f4e7a87cc2ae54b39d6550a97667d2e2056e1d81
[ "MIT" ]
permissive
jiasonwang/pebble-locker
f495d2dfb159e2cafef3813304e9453285208a4b
6ca45698293d83bf8efc425a06e377423e03a223
refs/heads/master
2021-01-18T08:19:31.354641
2014-08-18T15:39:51
2014-08-18T15:39:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,885
java
package com.lukekorth.pebblelocker.models; import com.activeandroid.Model; import com.activeandroid.annotation.Column; import com.activeandroid.annotation.Table; import com.activeandroid.query.Select; import com.google.android.gms.wearable.Node; import java.util.List; @Table(name = "AndroidWearDevices") public class AndroidWearDevices extends Model { @Column(name = "name") public String name; @Column(name = "deviceId") public String deviceId; @Column(name = "connected") public boolean connected; @Column(name = "trusted") public boolean trusted; public AndroidWearDevices() { super(); } public static List<AndroidWearDevices> getDevices() { return new Select() .from(AndroidWearDevices.class) .execute(); } public static boolean isTrustedDeviceConnected() { return new Select() .from(AndroidWearDevices.class) .where("connected = ?", true) .where("trusted = ?", true) .exists(); } public static void setDeviceConnected(Node node, boolean connected) { AndroidWearDevices persistedDevice = new Select() .from(AndroidWearDevices.class) .where("deviceId = ?", node.getId()) .executeSingle(); if (persistedDevice == null) { persistedDevice = new AndroidWearDevices(); persistedDevice.name = node.getDisplayName(); persistedDevice.deviceId = node.getId(); persistedDevice.trusted = false; } persistedDevice.connected = connected; persistedDevice.save(); } public static String getConnectionStatus() { if (AndroidWearDevices.isTrustedDeviceConnected()) { return "Android Wear Connected"; } return null; } }
[ "luke@lukekorth.com" ]
luke@lukekorth.com
b297d692b2fca288f3c0e14a0fc83c5606592097
c474b03758be154e43758220e47b3403eb7fc1fc
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/tinder/recs/usecase/CanUserRewind_Factory.java
9c1bee1709ae1129cb7fef98f55e41eabcb8474e
[]
no_license
EstebanDalelR/tinderAnalysis
f80fe1f43b3b9dba283b5db1781189a0dd592c24
941e2c634c40e5dbf5585c6876ef33f2a578b65c
refs/heads/master
2020-04-04T09:03:32.659099
2018-11-23T20:41:28
2018-11-23T20:41:28
155,805,042
0
0
null
2018-11-18T16:02:45
2018-11-02T02:44:34
null
UTF-8
Java
false
false
1,423
java
package com.tinder.recs.usecase; import com.tinder.recs.domain.usecase.ObserveRewindsAvailable; import com.tinder.tinderplus.p428a.C15193i; import dagger.internal.Factory; import javax.inject.Provider; public final class CanUserRewind_Factory implements Factory<CanUserRewind> { private final Provider<ObserveRewindsAvailable> observeRewindsAvailableProvider; private final Provider<C15193i> tinderPlusInteractorProvider; public CanUserRewind_Factory(Provider<ObserveRewindsAvailable> provider, Provider<C15193i> provider2) { this.observeRewindsAvailableProvider = provider; this.tinderPlusInteractorProvider = provider2; } public CanUserRewind get() { return provideInstance(this.observeRewindsAvailableProvider, this.tinderPlusInteractorProvider); } public static CanUserRewind provideInstance(Provider<ObserveRewindsAvailable> provider, Provider<C15193i> provider2) { return new CanUserRewind((ObserveRewindsAvailable) provider.get(), (C15193i) provider2.get()); } public static CanUserRewind_Factory create(Provider<ObserveRewindsAvailable> provider, Provider<C15193i> provider2) { return new CanUserRewind_Factory(provider, provider2); } public static CanUserRewind newCanUserRewind(ObserveRewindsAvailable observeRewindsAvailable, C15193i c15193i) { return new CanUserRewind(observeRewindsAvailable, c15193i); } }
[ "jdguzmans@hotmail.com" ]
jdguzmans@hotmail.com
effce3e4f628a0c2f4d8e21b5a4803262cdb1696
499ff3045d7e3f7aecd0a114589e804018a8df42
/nalu-processor/src/test/resources/com/github/nalukit/nalu/processor/controllerCreator/controllerCreatorOkWithTwoParameter02/Component05.java
4f3ed7d757a342af88a60e161f9e76f288805df7
[ "Apache-2.0" ]
permissive
hpehl/nalu
e6a00d1a2b4669929d9a0ab1489f581dd85c7c08
059820f9f8b4b091d08bf3b4cd6d240dc7d86aca
refs/heads/master
2020-08-02T08:05:00.570544
2020-01-03T14:53:20
2020-01-03T14:53:20
211,283,233
0
0
Apache-2.0
2019-09-27T09:23:35
2019-09-27T09:23:33
null
UTF-8
Java
false
false
1,016
java
/* * Copyright (c) 2018 - 2019 - Frank Hossfeld * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.github.nalukit.nalu.processor.controllerCreator.controllerCreatorOkWithTwoParameter02; import com.github.nalukit.nalu.client.component.AbstractComponent; public class Component05 extends AbstractComponent<IComponent05.Controller, String> implements IComponent05 { public Component05() { } @Override public void render() { initElement("Component05"); } }
[ "frank.hossfeld@googlemail.com" ]
frank.hossfeld@googlemail.com
d7abbdf85f813cbc27dc3038b68c4dbd177d88b7
b2798203491dc0a490f611cc7325f657633e5ca0
/app/src/main/java/com/bc/wechat/activity/AddFriendsFinalActivity.java
3e92ed9f6da529af842c44bd4ff42a2577fd351a
[]
no_license
betterwgo/wechat-1
7537b4b1337503579b834a2abb96b27a39a21734
42dbd34fa11dcf10db1b5c6353f441359ab4ec64
refs/heads/master
2020-08-10T17:48:56.237736
2019-03-04T03:01:18
2019-03-04T03:01:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,553
java
package com.bc.wechat.activity; import android.app.ProgressDialog; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.FragmentActivity; import android.text.Selection; import android.text.Spannable; import android.view.View; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.android.volley.NetworkError; import com.android.volley.Response; import com.android.volley.VolleyError; import com.bc.wechat.R; import com.bc.wechat.cons.Constant; import com.bc.wechat.utils.PreferencesUtil; import com.bc.wechat.utils.VolleyUtil; import java.util.HashMap; import java.util.Map; public class AddFriendsFinalActivity extends FragmentActivity { private EditText mReasonEt; private TextView mSendTv; private VolleyUtil volleyUtil; ProgressDialog dialog; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_add_friends_final); PreferencesUtil.getInstance().init(this); volleyUtil = VolleyUtil.getInstance(this); dialog = new ProgressDialog(AddFriendsFinalActivity.this); initView(); } private void initView() { mReasonEt = findViewById(R.id.et_reason); mSendTv = findViewById(R.id.tv_send); String nickName = PreferencesUtil.getInstance().getUserNickName(); mReasonEt.setText("我是" + nickName); // 光标移至最后 CharSequence charSequence = mReasonEt.getText(); if (charSequence instanceof Spannable) { Spannable spanText = (Spannable) charSequence; Selection.setSelection(spanText, charSequence.length()); } final String fromUserId = PreferencesUtil.getInstance().getUserId(); final String toUserId = getIntent().getStringExtra("userId"); final String applyRemark = mReasonEt.getText().toString().trim(); mSendTv.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { dialog.setMessage("正在发送..."); dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); dialog.show(); addFriendApply(fromUserId, toUserId, applyRemark); } }); } public void back(View view) { finish(); } private void addFriendApply(String fromUserId, String toUserId, String applyRemark) { String url = Constant.BASE_URL + "friendApplies"; Map<String, String> paramMap = new HashMap<>(); paramMap.put("fromUserId", fromUserId); paramMap.put("toUserId", toUserId); paramMap.put("applyRemark", applyRemark); volleyUtil.httpPostRequest(url, paramMap, new Response.Listener<String>() { @Override public void onResponse(String response) { Toast.makeText(AddFriendsFinalActivity.this, "已发送", Toast.LENGTH_SHORT).show(); finish(); dialog.dismiss(); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError volleyError) { if (volleyError instanceof NetworkError) { Toast.makeText(AddFriendsFinalActivity.this, R.string.network_unavailable, Toast.LENGTH_SHORT).show(); return; } dialog.dismiss(); } }); } }
[ "812809680@qq.com" ]
812809680@qq.com
b85c782635b367ce4a54064e37f611f946bb710e
c43a7c80b3f98d6681c74d6f5ed23f94b95bff69
/src/main/java/com/sc/hm/vmxd/data/listener/DataInitNotificationListener.java
cb1fcee97914d8e5efc00d9291171c440946fbf3
[]
no_license
sudiptasish/jvm-monitor
05dbdf025bc4446117f1df51e1693f075194a800
93163314e0becda89a2b9846dcfbc923def586d5
refs/heads/master
2021-03-03T14:55:35.588209
2020-03-16T17:42:15
2020-03-16T17:42:15
245,968,603
0
0
null
null
null
null
UTF-8
Java
false
false
491
java
package com.sc.hm.vmxd.data.listener; /** * Notification listener that will emit evennt once a repository is initialized. * * @author Sudiptasish Chanda */ public interface DataInitNotificationListener { /** * A listener which is used to emit notification upon * successful initialization of a repository. * * @param notification * @param handback */ public void dataInitialized(DataNotification notification, Object handback); }
[ "sudiptasish.chanda@aexp.com" ]
sudiptasish.chanda@aexp.com
429e65988342e3d07f6169007d721174a883425f
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/alibaba--druid/d3a4a1a4893d6131e1e69ebba5eef49c45a03d94/after/SQLCreateViewStatement.java
47d8b94b71aa188f58a4d95bd2b277b3d7b57f41
[]
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
8,072
java
/* * Copyright 1999-2017 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.druid.sql.ast.statement; import java.util.ArrayList; import java.util.List; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.SQLName; import com.alibaba.druid.sql.ast.SQLObjectImpl; import com.alibaba.druid.sql.ast.SQLStatementImpl; import com.alibaba.druid.sql.ast.expr.SQLCharExpr; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; import com.alibaba.druid.sql.ast.expr.SQLLiteralExpr; import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr; import com.alibaba.druid.sql.visitor.SQLASTVisitor; public class SQLCreateViewStatement extends SQLStatementImpl implements SQLCreateStatement { private boolean orReplace = false; private boolean force = false; // protected SQLName name; protected SQLSelect subQuery; protected boolean ifNotExists = false; protected String algorithm; protected SQLName definer; protected String sqlSecurity; protected SQLExprTableSource tableSource; protected final List<SQLTableElement> columns = new ArrayList<SQLTableElement>(); private boolean withCheckOption; private boolean withCascaded; private boolean withLocal; private boolean withReadOnly; private SQLLiteralExpr comment; public SQLCreateViewStatement(){ } public SQLCreateViewStatement(String dbType){ super(dbType); } public String computeName() { if (tableSource == null) { return null; } SQLExpr expr = tableSource.getExpr(); if (expr instanceof SQLName) { String name = ((SQLName) expr).getSimpleName(); return SQLUtils.normalize(name); } return null; } public String getSchema() { SQLName name = getName(); if (name == null) { return null; } if (name instanceof SQLPropertyExpr) { return ((SQLPropertyExpr) name).getOwnernName(); } return null; } public boolean isOrReplace() { return orReplace; } public void setOrReplace(boolean orReplace) { this.orReplace = orReplace; } public SQLName getName() { if (tableSource == null) { return null; } return (SQLName) tableSource.getExpr(); } public void setName(SQLName name) { this.setTableSource(new SQLExprTableSource(name)); } public void setName(String name) { this.setName(new SQLIdentifierExpr(name)); } public SQLExprTableSource getTableSource() { return tableSource; } public void setTableSource(SQLExprTableSource tableSource) { if (tableSource != null) { tableSource.setParent(this); } this.tableSource = tableSource; } public boolean isWithCheckOption() { return withCheckOption; } public void setWithCheckOption(boolean withCheckOption) { this.withCheckOption = withCheckOption; } public boolean isWithCascaded() { return withCascaded; } public void setWithCascaded(boolean withCascaded) { this.withCascaded = withCascaded; } public boolean isWithLocal() { return withLocal; } public void setWithLocal(boolean withLocal) { this.withLocal = withLocal; } public boolean isWithReadOnly() { return withReadOnly; } public void setWithReadOnly(boolean withReadOnly) { this.withReadOnly = withReadOnly; } public SQLSelect getSubQuery() { return subQuery; } public void setSubQuery(SQLSelect subQuery) { if (subQuery != null) { subQuery.setParent(this); } this.subQuery = subQuery; } public List<SQLTableElement> getColumns() { return columns; } public void addColumn(SQLTableElement column) { if (column != null) { column.setParent(this); } this.columns.add(column); } public boolean isIfNotExists() { return ifNotExists; } public void setIfNotExists(boolean ifNotExists) { this.ifNotExists = ifNotExists; } public SQLLiteralExpr getComment() { return comment; } public void setComment(SQLLiteralExpr comment) { if (comment != null) { comment.setParent(this); } this.comment = comment; } public String getAlgorithm() { return algorithm; } public void setAlgorithm(String algorithm) { this.algorithm = algorithm; } public SQLName getDefiner() { return definer; } public void setDefiner(SQLName definer) { if (definer != null) { definer.setParent(this); } this.definer = definer; } public String getSqlSecurity() { return sqlSecurity; } public void setSqlSecurity(String sqlSecurity) { this.sqlSecurity = sqlSecurity; } public boolean isForce() { return force; } public void setForce(boolean force) { this.force = force; } @Override protected void accept0(SQLASTVisitor visitor) { if (visitor.visit(this)) { acceptChild(visitor, this.tableSource); acceptChild(visitor, this.columns); acceptChild(visitor, this.comment); acceptChild(visitor, this.subQuery); } visitor.endVisit(this); } public static enum Level { CASCADED, LOCAL } public static class Column extends SQLObjectImpl { private SQLExpr expr; private SQLCharExpr comment; public SQLExpr getExpr() { return expr; } public void setExpr(SQLExpr expr) { if (expr != null) { expr.setParent(this); } this.expr = expr; } public SQLCharExpr getComment() { return comment; } public void setComment(SQLCharExpr comment) { if (comment != null) { comment.setParent(this); } this.comment = comment; } @Override protected void accept0(SQLASTVisitor visitor) { if (visitor.visit(this)) { acceptChild(visitor, expr); acceptChild(visitor, comment); } } } public SQLCreateViewStatement clone() { SQLCreateViewStatement x = new SQLCreateViewStatement(); x.orReplace = orReplace; x.force = force; if (subQuery != null) { x.setSubQuery(subQuery.clone()); } x.ifNotExists = ifNotExists; x.algorithm = algorithm; if (definer != null) { x.setDefiner(definer.clone()); } x.sqlSecurity = sqlSecurity; if (tableSource != null) { x.setTableSource(tableSource.clone()); } for (SQLTableElement column : columns) { SQLTableElement column2 = column.clone(); column2.setParent(x); x.columns.add(column2); } x.withCheckOption = withCheckOption; x.withCascaded = withCascaded; x.withLocal = withLocal; x.withReadOnly = withReadOnly; if (comment != null) { x.setComment(comment.clone()); } return x; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
2361b32fdc7caf9cb6509943c3c02565f3f9c68d
447520f40e82a060368a0802a391697bc00be96f
/apks/comparison_qark/at.spardat.bcrmobile/classes_dex2jar/net/hockeyapp/android/d/e.java
9054569aaa55d203b78540c1ae1592920d64d756
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
2,168
java
package net.hockeyapp.android.d; import android.annotation.SuppressLint; import android.app.Activity; import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build.VERSION; import java.lang.ref.WeakReference; import java.util.regex.Matcher; import java.util.regex.Pattern; public final class e { private static final Pattern a = Pattern.compile("[0-9a-f]+", 2); @SuppressLint({"NewApi"}) public static Boolean a() { try { if ((Build.VERSION.SDK_INT >= 11) && (b("android.app.Fragment"))) {} for (boolean bool = true;; bool = false) { Boolean localBoolean = Boolean.valueOf(bool); return localBoolean; } return Boolean.valueOf(false); } catch (NoClassDefFoundError localNoClassDefFoundError) {} } public static Boolean a(WeakReference<Activity> paramWeakReference) { Activity localActivity = (Activity)paramWeakReference.get(); if (localActivity != null) { Configuration localConfiguration = localActivity.getResources().getConfiguration(); if (((0xF & localConfiguration.screenLayout) == 3) || ((0xF & localConfiguration.screenLayout) == 4)) {} for (boolean bool = true;; bool = false) { return Boolean.valueOf(bool); } } return Boolean.valueOf(false); } public static String a(String paramString) { if (paramString == null) { throw new IllegalArgumentException("App ID must not be null."); } String str = paramString.trim(); Matcher localMatcher = a.matcher(str); if (str.length() != 32) { throw new IllegalArgumentException("App ID length must be 32 characters."); } if (!localMatcher.matches()) { throw new IllegalArgumentException("App ID must match regex pattern /[0-9a-f]+/i"); } return str; } private static boolean b(String paramString) { try { Class localClass = Class.forName(paramString); boolean bool = false; if (localClass != null) { bool = true; } return bool; } catch (ClassNotFoundException localClassNotFoundException) {} return false; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
6720b9446849063d7c7d26bef3bf228c62932ed0
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/tencentmap/mapsdk/a/bo$b.java
7d085917a3786e71bf4f899e0c279fc167e7eced
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
578
java
package com.tencent.tencentmap.mapsdk.a; import com.tencent.matrix.trace.core.AppMethodBeat; public enum bo$b { static { AppMethodBeat.i(100849); a = new b("LEFT_TOP", 0); b = new b("RIGHT_TOP", 1); c = new b("RIGHT_BOTTOM", 2); d = new b("LEFT_BOTTOM", 3); e = new b[] { a, b, c, d }; AppMethodBeat.o(100849); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes7-dex2jar.jar * Qualified Name: com.tencent.tencentmap.mapsdk.a.bo.b * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
8c53569e16b34ac80f92a4a824071207be585e61
13b1a9c0fabe07827aded184d506675b69129deb
/models/User.java
e208d0e9cc8b5dc2dbf6c866d4db8fe960c1b37c
[]
no_license
CoderHub-Twitter/CoderHub
5810af11d140bd0f95b7239c69750eabcd406e87
d45a085472429e02c26b47f38191db827cdfb574
refs/heads/master
2021-05-17T17:39:25.097988
2020-10-27T10:08:46
2020-10-27T10:08:46
250,900,414
0
0
null
null
null
null
UTF-8
Java
false
false
488
java
package models; public class User { private String email; private String password; public User() { super(); } public User(String email, String password) { super(); this.email = email; this.password = password; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
5b095619288b779fed0fc12e4a21e2e679caacff
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
/src/main/java/com/alipay/api/response/KoubeiCateringPosSpecQueryResponse.java
338bd18cbea8013b8d1f4cc20338525366f0fc3b
[ "Apache-2.0" ]
permissive
cc-shifo/alipay-sdk-java-all
38b23cf946b73768981fdeee792e3dae568da48c
938d6850e63160e867d35317a4a00ed7ba078257
refs/heads/master
2022-12-22T14:06:26.961978
2020-09-23T04:00:10
2020-09-23T04:00:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
794
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.SpecEntity; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.catering.pos.spec.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiCateringPosSpecQueryResponse extends AlipayResponse { private static final long serialVersionUID = 8831329874531679651L; /** * 规格列表 */ @ApiListField("specs") @ApiField("spec_entity") private List<SpecEntity> specs; public void setSpecs(List<SpecEntity> specs) { this.specs = specs; } public List<SpecEntity> getSpecs( ) { return this.specs; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ef0e1f6e06d14488fb5cdbd2b40617eb0e899942
696ce7d6d916dd36912d5660e4921af7d793d80c
/Smartlight/smartLight/SourceCodes/SmartLight/app/src/main/java/com/vithamastech/smartlight/interfaces/API.java
ff8738c6cfd7570c3ea8f6ac4e4c3c1ff4ae6d0f
[]
no_license
VinayTShetty/GeoFence_Project_End
c669ff89cc355e1772353317c8d6e7bac9ac3361
7e178f207c9183bcd42ec24e339bf414a6df9e71
refs/heads/main
2023-06-04T13:54:32.836943
2021-06-26T02:27:59
2021-06-26T02:27:59
380,394,802
0
0
null
null
null
null
UTF-8
Java
false
false
2,864
java
package com.vithamastech.smartlight.interfaces; import com.vithamastech.smartlight.Vo.VoAddDeviceData; import com.vithamastech.smartlight.Vo.VoAddGroupData; import com.vithamastech.smartlight.Vo.VoDeviceTypeList; import com.vithamastech.smartlight.Vo.YoutubeVideosRespData; import com.vithamastech.smartlight.Vo.VoLoginData; import com.vithamastech.smartlight.Vo.VoLogout; import com.vithamastech.smartlight.Vo.VoServerDeviceList; import com.vithamastech.smartlight.Vo.VoServerGroupList; import java.util.Map; import retrofit2.Call; import retrofit2.http.FieldMap; import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.POST; /** * Created by Jaydeep on 27-02-2017. */ public interface API { /* Retrofit API Call Methods */ @FormUrlEncoded @POST("login") Call<VoLoginData> userLoginAPI(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("signup") Call<VoLoginData> userRegisterAPI(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("check_mobile_number") Call<VoLoginData> checkUserAlreadyRegistered(@FieldMap Map<String, String> mHashMap); // @FormUrlEncoded // @POST("change_password") // Call<VoLogout> changeUserPassword(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("check_user_details") Call<VoLogout> authenticateUserCheck(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("set_reset_password") Call<VoLogout> userChangePasswordAPI(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("logout") Call<VoLogout> userLogoutAPI(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("save_device") Call<VoAddDeviceData> addDeviceAPI(@FieldMap Map<String, String> mHashMap); // @FormUrlEncoded // @POST("update_device") // Call<VoAddDeviceData> updateDeviceAPI(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("get_all_device") Call<VoServerDeviceList> getAllDeviceListAPI(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("get_device_type") Call<VoDeviceTypeList> getDeviceTypeListAPI(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("delete_everything") Call<VoLogout> resetAllDeviceAPI(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("save_group") // there are two method of save group Call<VoAddGroupData> addGroupAPI(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("save_group") Call<String> addGroupAPIWithStringResponse(@FieldMap Map<String, String> mHashMap); @FormUrlEncoded @POST("get_all_group") Call<VoServerGroupList> getAllGroupListAPI(@FieldMap Map<String, String> mHashMap); @GET("smartlight/api/video") Call<YoutubeVideosRespData> getYouTubeVideos(); }
[ "vinay@succorfish.com" ]
vinay@succorfish.com
202cba4cf5afada718f0b647fe4a3e600010efdb
ff907478f65e5ee314b1418d5be326973cb796f8
/T4IR_Naklini_PJT/Naklini/src/main/java/org/tensorflow/demo/Yolo/YoloMainActivity.java
5d8ba6ed329943a93071845d4788bda4bf68f9d6
[]
no_license
sonic247897/fishingApp-project
05e7254eb65d2ff5a7f491519af7bdd2f3db3f22
39851f9213129404e145d79958d90c3df2a16aed
refs/heads/master
2021-05-23T10:26:29.908993
2020-05-05T17:09:48
2020-05-05T17:09:48
253,241,745
0
0
null
null
null
null
UTF-8
Java
false
false
896
java
package org.tensorflow.demo.Yolo; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import androidx.appcompat.app.AppCompatActivity; import org.tensorflow.demo.DetectorActivity; import org.tensorflow.demo.R; public class YoloMainActivity extends AppCompatActivity { Button btn1 ; DetectorActivity detectorActivity; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); btn1 = (Button) findViewById(R.id.btn1); btn1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(YoloMainActivity.this, DetectorActivity.class); startActivity(intent); } }); } }
[ "sonic247897@gmail.com" ]
sonic247897@gmail.com
e54134ea53c40bb744b567c420eec31592f1241e
5d6c374a2518d469d674a1327d21d8e0cf2b54f7
/modules/plugin/jdbc/jdbc-sqlserver/src/test/java/org/geotools/data/sqlserver/SQLServerDataStoreTest.java
e308762ba1d03d802836354b9caa7e0613a32239
[]
no_license
HGitMaster/geotools-osgi
648ebd9343db99a1e2688d9aefad857f6521898d
09f6e327fb797c7e0451e3629794a3db2c55c32b
refs/heads/osgi
2021-01-19T08:33:56.014532
2014-03-19T18:04:03
2014-03-19T18:04:03
4,750,321
3
0
null
2014-03-19T13:50:54
2012-06-22T11:21:01
Java
UTF-8
Java
false
false
976
java
/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2002-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotools.data.sqlserver; import org.geotools.jdbc.JDBCDataStoreTest; import org.geotools.jdbc.JDBCTestSetup; public class SQLServerDataStoreTest extends JDBCDataStoreTest { @Override protected JDBCTestSetup createTestSetup() { return new SQLServerTestSetup(); } }
[ "devnull@localhost" ]
devnull@localhost
3b572e4b73426421dd024b4f48a36fb4bf5aa3d6
a0c7d127d08afcca3c77279d94462106e679f0b5
/src/LC98_ValidateBinarySearchTree.java
870ec21f07a1cf3c9469085b4e87403ab62aff9a
[]
no_license
zhangchengyao/LC
0c22f2131dd9d3ef485a09f1aa44b58d15895fdb
b86525792a42d69a0d4bfd2ff023da2e612e820b
refs/heads/master
2021-07-13T21:07:06.306844
2021-06-05T22:35:09
2021-06-05T22:35:09
124,514,335
2
0
null
null
null
null
UTF-8
Java
false
false
618
java
public class LC98_ValidateBinarySearchTree { class TreeNode{ int val; TreeNode left; TreeNode right; TreeNode(int x){ val = x; } } public boolean isValidBST(TreeNode root) { return isValidBST(root, null, null); } private boolean isValidBST(TreeNode root, Integer low, Integer high){ if(root==null) return true; if((low==null || root.val>low) && (high==null || root.val<high)){ return isValidBST(root.left, (Integer)low, root.val) && isValidBST(root.right, root.val, (Integer)high); } else return false; } }
[ "tc2002618@126.com" ]
tc2002618@126.com
531c096f9134926ee4b6a8a163705f7133a5502d
01dc693c1509a09326bbb022d76bef169464ac24
/app/src/main/java/com/example/amr/udacity_app/Adapters/ListReviewsAdapter.java
e2a43bd081f7cbc70eafcbfe1488496c24334a97
[]
no_license
AmrAbdelhameed/Udacity_App
cd58a511cea0df662963734fd3092bc60d4ac956
ce7ea4eaa122edecf0063476b222840660098fe9
refs/heads/master
2020-06-16T14:46:36.415653
2017-09-17T01:25:44
2017-09-17T01:25:44
75,090,829
0
0
null
null
null
null
UTF-8
Java
false
false
1,645
java
package com.example.amr.udacity_app.Adapters; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import com.example.amr.udacity_app.Models.ListReviews; import com.example.amr.udacity_app.R; import java.util.ArrayList; public class ListReviewsAdapter extends ArrayAdapter<ListReviews> { ArrayList<ListReviews> Reviewlist; LayoutInflater vi; int Resource; ViewHolder holder; public ListReviewsAdapter(Context context, int resource, ArrayList<ListReviews> objects) { super(context, resource, objects); vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); Resource = resource; Reviewlist = objects; } @Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { holder = new ViewHolder(); v = vi.inflate(Resource, null); holder.author_review = (TextView) v.findViewById(R.id.reviews_); holder.content_review = (TextView) v.findViewById(R.id.tvName3); v.setTag(holder); } else { holder = (ViewHolder) v.getTag(); } holder.author_review.setText("A movie review by " + Reviewlist.get(position).getauthor()); holder.content_review.setText(Reviewlist.get(position).getcontent()); return v; } static class ViewHolder { public TextView author_review; public TextView content_review; } }
[ "amrabdelhameedfcis123@gmail.com" ]
amrabdelhameedfcis123@gmail.com
03f3b8044d11c16d7016842676c776b5bafe1610
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
/app/src/main/java/anet/channel/C0111b.java
fc031e1fc43638729c8219add27819c402bebc1d
[]
no_license
rcoolboy/guilvN
3817397da465c34fcee82c0ca8c39f7292bcc7e1
c779a8e2e5fd458d62503dc1344aa2185101f0f0
refs/heads/master
2023-05-31T10:04:41.992499
2021-07-07T09:58:05
2021-07-07T09:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,768
java
package anet.channel; import android.text.TextUtils; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /* renamed from: anet.channel.b */ public class C0111b { /* renamed from: a */ public Map<String, Integer> f109a = new HashMap(); /* renamed from: b */ public Map<String, SessionInfo> f110b = new ConcurrentHashMap(); /* renamed from: a */ public void mo3413a(SessionInfo sessionInfo) { if (sessionInfo == null) { throw new NullPointerException("info is null"); } else if (!TextUtils.isEmpty(sessionInfo.host)) { this.f110b.put(sessionInfo.host, sessionInfo); } else { throw new IllegalArgumentException("host cannot be null or empty"); } } /* renamed from: b */ public SessionInfo mo3415b(String str) { return this.f110b.get(str); } /* renamed from: c */ public int mo3416c(String str) { Integer num; synchronized (this.f109a) { num = this.f109a.get(str); } if (num == null) { return -1; } return num.intValue(); } /* renamed from: a */ public SessionInfo mo3411a(String str) { return this.f110b.remove(str); } /* renamed from: a */ public Collection<SessionInfo> mo3412a() { return this.f110b.values(); } /* renamed from: a */ public void mo3414a(String str, int i) { if (!TextUtils.isEmpty(str)) { synchronized (this.f109a) { this.f109a.put(str, Integer.valueOf(i)); } return; } throw new IllegalArgumentException("host cannot be null or empty"); } }
[ "593746220@qq.com" ]
593746220@qq.com
13f8ab2ff04c01fb6f6aa631940ca57714ebc846
47798511441d7b091a394986afd1f72e8f9ff7ab
/src/main/java/com/alipay/api/domain/Appinfos.java
451fdbfb7db295a0eb4c9ae6a5c1aad5271bbaa2
[ "Apache-2.0" ]
permissive
yihukurama/alipay-sdk-java-all
c53d898371032ed5f296b679fd62335511e4a310
0bf19c486251505b559863998b41636d53c13d41
refs/heads/master
2022-07-01T09:33:14.557065
2020-05-07T11:20:51
2020-05-07T11:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,012
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 飞猪返回小程序内容 * * @author auto create * @since 1.0, 2020-03-20 10:31:37 */ public class Appinfos extends AlipayObject { private static final long serialVersionUID = 8816454977827416888L; /** * 小程序名称 */ @ApiField("app_name") private String appName; /** * 小程序类型 */ @ApiField("app_type") private Long appType; /** * 小程序id */ @ApiField("mini_app_id") private Long miniAppId; public String getAppName() { return this.appName; } public void setAppName(String appName) { this.appName = appName; } public Long getAppType() { return this.appType; } public void setAppType(Long appType) { this.appType = appType; } public Long getMiniAppId() { return this.miniAppId; } public void setMiniAppId(Long miniAppId) { this.miniAppId = miniAppId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
270777a2d551b5f2d4a410a8665174f875210f6f
57ab5b743b2918c963b5acc1ce7d7c52c27c6ee0
/src/main/java/com/rhb/turtle/api/ResponseEnum.java
17aec3522d1b5f93030e87a55c2b53842dfc08d8
[]
no_license
dofoyo/turtle
34d95d32dc0c567c249b771f343fa7dbb01dcf7e
dcf02c9ff79222723779de7fab6ff5ca72cb2f46
refs/heads/master
2022-09-12T08:35:29.361077
2020-01-04T03:30:58
2020-01-04T03:30:58
170,220,182
0
0
null
2022-09-01T23:02:43
2019-02-11T23:38:08
Java
UTF-8
Java
false
false
6,220
java
package com.rhb.turtle.api; public enum ResponseEnum { ERROR("5","错误"), SUCCESS("2","成功"); private String msg; private String code; private ResponseEnum(String msg, String code) { this.msg = msg; this.code = code; } public String getMsg() { return msg; } public String getCode() { return code; } /** * 200 - 服务器成功返回网页 404 - 请求的网页不存在 503 - 服务不可用 详细分解: 1xx(临时响应) 表示临时响应并需要请求者继续执行操作的状态代码。 代码 说明 100 (继续) 请求者应当继续提出请求。服务器返回此代码表示已收到请求的第一部分,正在等待其余部分。 101 (切换协议) 请求者已要求服务器切换协议,服务器已确认并准备切换。 2xx (成功) 表示成功处理了请求的状态代码。 代码 说明 200 (成功) 服务器已成功处理了请求。通常,这表示服务器提供了请求的网页。 201 (已创建) 请求成功并且服务器创建了新的资源。 202 (已接受) 服务器已接受请求,但尚未处理。 203 (非授权信息) 服务器已成功处理了请求,但返回的信息可能来自另一来源。 204 (无内容) 服务器成功处理了请求,但没有返回任何内容。 205 (重置内容) 服务器成功处理了请求,但没有返回任何内容。 206 (部分内容) 服务器成功处理了部分 GET 请求。 3xx (重定向) 表示要完成请求,需要进一步操作。 通常,这些状态代码用来重定向。 代码 说明 300 (多种选择) 针对请求,服务器可执行多种操作。服务器可根据请求者 (user agent) 选择一项操作,或提供操作列表供请求者选择。 301 (永久移动) 请求的网页已永久移动到新位置。服务器返回此响应(对 GET 或 HEAD 请求的响应)时,会自动将请求者转到新位置。 302 (临时移动) 服务器目前从不同位置的网页响应请求,但请求者应继续使用原有位置来进行以后的请求。 303 (查看其他位置) 请求者应当对不同的位置使用单独的 GET 请求来检索响应时,服务器返回此代码。 304 (未修改) 自从上次请求后,请求的网页未修改过。服务器返回此响应时,不会返回网页内容。 305 (使用代理) 请求者只能使用代理访问请求的网页。如果服务器返回此响应,还表示请求者应使用代理。 307 (临时重定向) 服务器目前从不同位置的网页响应请求,但请求者应继续使用原有位置来进行以后的请求。 4xx(请求错误) 这些状态代码表示请求可能出错,妨碍了服务器的处理。 代码 说明 400 (错误请求) 服务器不理解请求的语法。 401 (未授权) 请求要求身份验证。 对于需要登录的网页,服务器可能返回此响应。 403 (禁止) 服务器拒绝请求。 404 (未找到) 服务器找不到请求的网页。 405 (方法禁用) 禁用请求中指定的方法。 406 (不接受) 无法使用请求的内容特性响应请求的网页。 407 (需要代理授权) 此状态代码与 401(未授权)类似,但指定请求者应当授权使用代理。 408 (请求超时) 服务器等候请求时发生超时。 409 (冲突) 服务器在完成请求时发生冲突。服务器必须在响应中包含有关冲突的信息。 410 (已删除) 如果请求的资源已永久删除,服务器就会返回此响应。 411 (需要有效长度) 服务器不接受不含有效内容长度标头字段的请求。 412 (未满足前提条件) 服务器未满足请求者在请求中设置的其中一个前提条件。 413 (请求实体过大) 服务器无法处理请求,因为请求实体过大,超出服务器的处理能力。 414 (请求的 URI 过长) 请求的 URI(通常为网址)过长,服务器无法处理。 415 (不支持的媒体类型) 请求的格式不受请求页面的支持。 416 (请求范围不符合要求) 如果页面无法提供请求的范围,则服务器会返回此状态代码。 417 (未满足期望值) 服务器未满足"期望"请求标头字段的要求。 5xx(服务器错误) 这些状态代码表示服务器在尝试处理请求时发生内部错误。 这些错误可能是服务器本身的错误,而不是请求出错。 代码 说明 500 (服务器内部错误) 服务器遇到错误,无法完成请求。 501 (尚未实施) 服务器不具备完成请求的功能。例如,服务器无法识别请求方法时可能会返回此代码。 502 (错误网关) 服务器作为网关或代理,从上游服务器收到无效响应。 503 (服务不可用) 服务器目前无法使用(由于超载或停机维护)。通常,这只是暂时状态。 504 (网关超时) 服务器作为网关或代理,但是没有及时从上游服务器收到请求。 505 (HTTP 版本不受支持) 服务器不支持请求中所用的 HTTP 协议版本。 HttpWatch状态码Result is 200 - 服务器成功返回网页,客户端请求已成功。 302 - 对象临时移动。服务器目前从不同位置的网页响应请求,但请求者应继续使用原有位置来进行以后的请求。 304 - 属于重定向。自上次请求后,请求的网页未修改过。服务器返回此响应时,不会返回网页内容。 401 - 未授权。请求要求身份验证。 对于需要登录的网页,服务器可能返回此响应。 404 - 未找到。服务器找不到请求的网页。 2xx - 成功。表示服务器成功地接受了客户端请求。 3xx - 重定向。表示要完成请求,需要进一步操作。客户端浏览器必须采取更多操作来实现请求。例如,浏览器可能不得不请求服务器上的不同的页面,或通过代理服务器重复该请求。 4xx - 请求错误。这些状态代码表示请求可能出错,妨碍了服务器的处理。 5xx - 服务器错误。表示服务器在尝试处理请求时发生内部错误。 这些错误可能是服务器本身的错误,而不是请求出错。 */ }
[ "dofoyo@sina.cn" ]
dofoyo@sina.cn
aa7df2d61dde410eca63299ec9e71f1da88aeee6
a1c1a30f36bcfe456e697bd619b63fa12da0741f
/src/com/meizhuo/etips/ui/base/BaseNotification.java
bcb58649a1eb5ba659d651c19fb03e8f0c709041
[ "MIT" ]
permissive
kongoldwant/ETips
6a17295dd78ac94a88604d15a91066698aa6cbfa
3f21f69bf81d74c94a3bbe9753708f86ae7fc64d
refs/heads/master
2020-12-11T05:39:17.217312
2015-03-08T12:54:38
2015-03-08T12:54:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,195
java
package com.meizhuo.etips.ui.base; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationCompat.Builder; import com.meizhuo.etips.activities.R; /** * <strong>2.0后推荐使用这个</strong></br> * Notification轻量封装,常用的都在这里了</br> * How to use ?</br> 1.先创建对象,默认是ETips icon,可以自动取消(点击后显示Intent然后消失),震动 and * 铃声,setSmallIcon(null);setVibrate(new long[0])</br> * 2.call : setContenText() / setContentIntent() </br> * 3.call : 必须的 setNotificationID() (虽然有默认值)</br> * 4.call : show();</br> * * <strong>since 2.0</strong> * @author Jayin Ton * */ public class BaseNotification extends NotificationCompat.Builder { private Context context; private int NotificationID = 0x0000f4; public BaseNotification(Context context) { super(context); this.context = context; this.setContentTitle("ETips") .setSmallIcon( R.drawable.icon_small) .setAutoCancel(true) .setVibrate(new long[] { 100, 300, 500, 300 }) .setSound( Uri.parse("android.resource://" + context.getPackageName() + "/" + R.raw.msg_notification)); this.setContentIntent(PendingIntent.getActivity(context, 0, new Intent(), 0)); //Android 2.3.5必须添加一个ContentIntent? } /** * 显示Notification */ public void show() { NotificationManager manager = (NotificationManager) context .getSystemService(Context.NOTIFICATION_SERVICE); manager.notify(NotificationID, this.build()); } /** * 取消显示当前的Notification */ public void cancle() { ((NotificationManager) context .getSystemService(Context.NOTIFICATION_SERVICE)) .cancel(NotificationID); } /** * 设置Notification ID * * @param id */ public void setNotificationID(int id) { this.NotificationID = id; } /** * 设置点击时的Intent */ @Override public Builder setContentIntent(PendingIntent intent) { return super.setContentIntent(intent); } /** * 设置通知消失时的Intent */ @Override public Builder setDeleteIntent(PendingIntent intent) { return super.setDeleteIntent(intent); } @Override public Builder setAutoCancel(boolean autoCancel) { return super.setAutoCancel(autoCancel); } @Override public Builder setContentText(CharSequence text) { return super.setContentText(text); } @Override public Builder setContentTitle(CharSequence title) { return super.setContentTitle(title); } @Override public Builder setSmallIcon(int icon) { return super.setSmallIcon(icon); } @Override public Builder setTicker(CharSequence tickerText) { return super.setTicker(tickerText); } @Override public Builder setVibrate(long[] pattern) { return super.setVibrate(pattern); } @Override public Builder setWhen(long when) { return super.setWhen(when); } }
[ "tonjayin@gmail.com" ]
tonjayin@gmail.com
85c24c32595bc872eae13a1a67c2eb482bc84dd1
6a876694dc5276b9cc41e43c3445a5e792766c57
/src/main/java/org/three/two/exercises/Exercise21.java
9d7d80a1700e88303593601ed231d6e0503dc337
[]
no_license
zchengi/Algorithm
9bcfdefdf5d8852be624d49ffb82fa3f0190d5f4
7276aed9934147acc02a52ac06fd83bd85822deb
refs/heads/master
2021-09-18T15:20:26.974991
2018-07-16T09:24:21
2018-07-16T09:24:21
107,095,799
0
0
null
2017-10-17T03:31:08
2017-10-16T07:54:51
Java
UTF-8
Java
false
false
4,167
java
package org.three.two.exercises; import edu.princeton.cs.algs4.StdRandom; import org.tool.ArrayGenerator; /** * 3.2.21 为二叉查找树添加一个randomKey()方法来在和树高成正比的时间内从符号表中随机返回一个键。 * * @author cheng * 2018/2/26 20:08 */ public class Exercise21 { private static class BST<Key extends Comparable<Key>, Value> { private Node root; private class Node { private Key key; private Value value; private Node left, right; private int size; public Node(Key key, Value value, int size) { this.key = key; this.value = value; this.size = size; } } public void put(Key key, Value value) { if (key == null) throw new IllegalArgumentException("Called put() with a null key!"); root = put(root, key, value); } private Node put(Node x, Key key, Value value) { if (x == null) return new Node(key, value, 1); int cmp = key.compareTo(x.key); if (cmp < 0) x.left = put(x.left, key, value); else if (cmp > 0) x.right = put(x.right, key, value); else x.value = value; x.size = 1 + size(x.left) + size(x.right); return x; } public Value get(Key key) { return get(root, key); } private Value get(Node x, Key key) { if (key == null) throw new IllegalArgumentException("Called get() with a null key!"); if (x == null) return null; int cmp = key.compareTo(x.key); if (cmp < 0) return get(x.left, key); else if (cmp > 0) return get(x.right, key); else return x.value; } public int rank(Key key) { if (key == null) throw new IllegalArgumentException("Called rank() with a null key!"); return rank(key, root); } private int rank(Key key, Node x) { if (x == null) return 0; int cmp = key.compareTo(x.key); if (cmp < 0) return rank(key, x.left); if (cmp > 0) return 1 + size(x.left) + rank(key, x.right); else return size(x.left); } public boolean contains(Key key) { if (key == null) throw new IllegalArgumentException("Called contains() with a null key!"); return get(key) != null; } public int size() { return size(root); } private int size(Node x) { if (x == null) return 0; else return x.size; } public int size(Key lo, Key hi) { if (lo == null) throw new IllegalArgumentException("First argument to size() is null!"); if (hi == null) throw new IllegalArgumentException("Second argument to size() is null!"); if (lo.compareTo(hi) > 0) return 0; if (contains(hi)) return 1 + rank(hi) - rank(lo); else return rank(hi) - rank(lo); } private Key randomKey() { if (root == null) return null; int h = (int) (Math.log(size()) / Math.log(2)); Node node = root; int steps = StdRandom.uniform(h + 1); while (steps-- > 0) { boolean left = StdRandom.bernoulli(); if (left) { if (node.left == null) return node.key; node = node.left; } else { if (node.right == null) return node.key; node = node.right; } } return node.key; } } public static void main(String[] args) { String[] alps = ArrayGenerator.Alphbets.random(30); BST<String, Integer> bst = new BST<>(); for (int i = 0; i < alps.length; i++) { bst.put(alps[i], i); } // 随机抽取 for (int i = 0; i < 10; i++) { String key = bst.randomKey(); System.out.println(key + " " + bst.get(key)); } } }
[ "792702352@qq.com" ]
792702352@qq.com
380c79a7fda452dc5f54b7b9db5ab7bedddb479a
498dd2daff74247c83a698135e4fe728de93585a
/clients/google-api-services-ml/v1/1.29.2/com/google/api/services/ml/v1/CloudMachineLearningEngineRequest.java
88f7d855dd76c3c6c91a658f86a6af6430b2f473
[ "Apache-2.0" ]
permissive
googleapis/google-api-java-client-services
0e2d474988d9b692c2404d444c248ea57b1f453d
eb359dd2ad555431c5bc7deaeafca11af08eee43
refs/heads/main
2023-08-23T00:17:30.601626
2023-08-20T02:16:12
2023-08-20T02:16:12
147,399,159
545
390
Apache-2.0
2023-09-14T02:14:14
2018-09-04T19:11:33
null
UTF-8
Java
false
false
8,140
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.ml.v1; /** * CloudMachineLearningEngine request. * * @since 1.3 */ @SuppressWarnings("javadoc") public abstract class CloudMachineLearningEngineRequest<T> extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest<T> { /** * @param client Google client * @param method HTTP Method * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" * the base path from the base URL will be stripped out. The URI template can also be a * full URL. URI template expansion is done using * {@link com.google.api.client.http.UriTemplate#expand(String, String, Object, boolean)} * @param content A POJO that can be serialized into JSON or {@code null} for none * @param responseClass response class to parse into */ public CloudMachineLearningEngineRequest( CloudMachineLearningEngine client, String method, String uriTemplate, Object content, Class<T> responseClass) { super( client, method, uriTemplate, content, responseClass); } /** V1 error format. */ @com.google.api.client.util.Key("$.xgafv") private java.lang.String $Xgafv; /** * V1 error format. */ public java.lang.String get$Xgafv() { return $Xgafv; } /** V1 error format. */ public CloudMachineLearningEngineRequest<T> set$Xgafv(java.lang.String $Xgafv) { this.$Xgafv = $Xgafv; return this; } /** OAuth access token. */ @com.google.api.client.util.Key("access_token") private java.lang.String accessToken; /** * OAuth access token. */ public java.lang.String getAccessToken() { return accessToken; } /** OAuth access token. */ public CloudMachineLearningEngineRequest<T> setAccessToken(java.lang.String accessToken) { this.accessToken = accessToken; return this; } /** Data format for response. */ @com.google.api.client.util.Key private java.lang.String alt; /** * Data format for response. [default: json] */ public java.lang.String getAlt() { return alt; } /** Data format for response. */ public CloudMachineLearningEngineRequest<T> setAlt(java.lang.String alt) { this.alt = alt; return this; } /** JSONP */ @com.google.api.client.util.Key private java.lang.String callback; /** * JSONP */ public java.lang.String getCallback() { return callback; } /** JSONP */ public CloudMachineLearningEngineRequest<T> setCallback(java.lang.String callback) { this.callback = callback; return this; } /** Selector specifying which fields to include in a partial response. */ @com.google.api.client.util.Key private java.lang.String fields; /** * Selector specifying which fields to include in a partial response. */ public java.lang.String getFields() { return fields; } /** Selector specifying which fields to include in a partial response. */ public CloudMachineLearningEngineRequest<T> setFields(java.lang.String fields) { this.fields = fields; return this; } /** * API key. Your API key identifies your project and provides you with API access, quota, and * reports. Required unless you provide an OAuth 2.0 token. */ @com.google.api.client.util.Key private java.lang.String key; /** * API key. Your API key identifies your project and provides you with API access, quota, and * reports. Required unless you provide an OAuth 2.0 token. */ public java.lang.String getKey() { return key; } /** * API key. Your API key identifies your project and provides you with API access, quota, and * reports. Required unless you provide an OAuth 2.0 token. */ public CloudMachineLearningEngineRequest<T> setKey(java.lang.String key) { this.key = key; return this; } /** OAuth 2.0 token for the current user. */ @com.google.api.client.util.Key("oauth_token") private java.lang.String oauthToken; /** * OAuth 2.0 token for the current user. */ public java.lang.String getOauthToken() { return oauthToken; } /** OAuth 2.0 token for the current user. */ public CloudMachineLearningEngineRequest<T> setOauthToken(java.lang.String oauthToken) { this.oauthToken = oauthToken; return this; } /** Returns response with indentations and line breaks. */ @com.google.api.client.util.Key private java.lang.Boolean prettyPrint; /** * Returns response with indentations and line breaks. [default: true] */ public java.lang.Boolean getPrettyPrint() { return prettyPrint; } /** Returns response with indentations and line breaks. */ public CloudMachineLearningEngineRequest<T> setPrettyPrint(java.lang.Boolean prettyPrint) { this.prettyPrint = prettyPrint; return this; } /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string * assigned to a user, but should not exceed 40 characters. */ @com.google.api.client.util.Key private java.lang.String quotaUser; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string * assigned to a user, but should not exceed 40 characters. */ public java.lang.String getQuotaUser() { return quotaUser; } /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string * assigned to a user, but should not exceed 40 characters. */ public CloudMachineLearningEngineRequest<T> setQuotaUser(java.lang.String quotaUser) { this.quotaUser = quotaUser; return this; } /** Legacy upload protocol for media (e.g. "media", "multipart"). */ @com.google.api.client.util.Key private java.lang.String uploadType; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ public java.lang.String getUploadType() { return uploadType; } /** Legacy upload protocol for media (e.g. "media", "multipart"). */ public CloudMachineLearningEngineRequest<T> setUploadType(java.lang.String uploadType) { this.uploadType = uploadType; return this; } /** Upload protocol for media (e.g. "raw", "multipart"). */ @com.google.api.client.util.Key("upload_protocol") private java.lang.String uploadProtocol; /** * Upload protocol for media (e.g. "raw", "multipart"). */ public java.lang.String getUploadProtocol() { return uploadProtocol; } /** Upload protocol for media (e.g. "raw", "multipart"). */ public CloudMachineLearningEngineRequest<T> setUploadProtocol(java.lang.String uploadProtocol) { this.uploadProtocol = uploadProtocol; return this; } @Override public final CloudMachineLearningEngine getAbstractGoogleClient() { return (CloudMachineLearningEngine) super.getAbstractGoogleClient(); } @Override public CloudMachineLearningEngineRequest<T> setDisableGZipContent(boolean disableGZipContent) { return (CloudMachineLearningEngineRequest<T>) super.setDisableGZipContent(disableGZipContent); } @Override public CloudMachineLearningEngineRequest<T> setRequestHeaders(com.google.api.client.http.HttpHeaders headers) { return (CloudMachineLearningEngineRequest<T>) super.setRequestHeaders(headers); } @Override public CloudMachineLearningEngineRequest<T> set(String parameterName, Object value) { return (CloudMachineLearningEngineRequest<T>) super.set(parameterName, value); } }
[ "chingor@google.com" ]
chingor@google.com
ee52b5d6a104f33874326f54cf9064f0a3d81172
221950c62474182112723d904422028ba75fc5bc
/app/src/main/java/com/chanjin/musicplayer/http/ApiService.java
2e2d6ead4a0631d33b13b8aa34a6dc24a1f18e90
[]
no_license
chanjin5219/GuapiMusic
f0c5ae6ede13c9bf647f8e327c131480f37a0017
11bb050c95367d715e4cb943d72c0e54079a539f
refs/heads/master
2020-03-25T23:29:07.561658
2018-08-10T11:33:48
2018-08-10T11:33:58
144,277,044
0
0
null
null
null
null
UTF-8
Java
false
false
1,383
java
package com.chanjin.musicplayer.http; import com.chanjin.musicplayer.bean.Lrc; import com.chanjin.musicplayer.bean.MusicLink; import com.chanjin.musicplayer.bean.OnLineMusicList; import com.chanjin.musicplayer.bean.SearchMusic; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Headers; import retrofit2.http.Query; import retrofit2.http.Url; /** * Created by chanjin on 2017/8/23. */ public interface ApiService { String BASE_URL_BEHIND = "v1/restserver/ting"; @GET(BASE_URL_BEHIND) @Headers("User-Agent:Firefox/25.0") Call<OnLineMusicList> getOnLineMusicList(@Query("type")String type, @Query("size") String size, @Query("offset") String offset, @Query("method") String method); @GET(BASE_URL_BEHIND) @Headers("User-Agent:Firefox/25.0") Call<MusicLink> getMusicLink(@Query("songid")String songId, @Query("method") String method); @GET @Headers("User-Agent:Firefox/25.0") Call<ResponseBody> download(@Url String url); @GET(BASE_URL_BEHIND) @Headers("User-Agent:Firefox/25.0") Call<SearchMusic> getSearchMusic(@Query("method") String method, @Query("query")String keyword); @GET(BASE_URL_BEHIND) @Headers("User-Agent:Firefox/25.0") Call<Lrc> getLrc(@Query("method") String method, @Query("songid")String id); }
[ "email@example.com" ]
email@example.com
859b73a16db143b5cd993b7d10cbe85acf0792ac
977d5af8d832b9a8a1cb01352ec75b88dcca10fb
/kieker-common/src-gen/kieker/common/record/remotecontrol/AddParameterValueEventFactory.java
6ff79986c07aeb6bb68f939a1cc65cb71b756775
[ "Apache-2.0" ]
permissive
Zachpocalypse/kieker
14fdced218c605d95ae40d674af62dae4386957d
64c8a74422643362da92bb107ae94f892fa2cbf9
refs/heads/master
2023-04-08T19:10:56.067115
2020-03-06T10:18:45
2020-03-06T10:18:45
257,434,588
0
0
Apache-2.0
2020-04-21T00:02:40
2020-04-21T00:02:39
null
UTF-8
Java
false
false
1,608
java
/*************************************************************************** * Copyright 2019 Kieker Project (http://kieker-monitoring.net) * * 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 kieker.common.record.remotecontrol; import kieker.common.exception.RecordInstantiationException; import kieker.common.record.factory.IRecordFactory; import kieker.common.record.io.IValueDeserializer; /** * @author Reiner Jung * * @since 1.15 */ public final class AddParameterValueEventFactory implements IRecordFactory<AddParameterValueEvent> { @Override public AddParameterValueEvent create(final IValueDeserializer deserializer) throws RecordInstantiationException { return new AddParameterValueEvent(deserializer); } @Override public String[] getValueNames() { return AddParameterValueEvent.VALUE_NAMES; // NOPMD } @Override public Class<?>[] getValueTypes() { return AddParameterValueEvent.TYPES; // NOPMD } public int getRecordSizeInBytes() { return AddParameterValueEvent.SIZE; } }
[ "reiner.jung@email.uni-kiel.de" ]
reiner.jung@email.uni-kiel.de
22bcd9f8e0e648777f422a297cec16760c53c1dd
c77b61046e1b706bb58b045ce532d973df6bfc05
/DemoTest/src/com/bruce/demo/collection/SimpleHashMap.java
96f31d483c2d201c68caff1ca3cf62007e5825ac
[]
no_license
BruceYuan1993/thinking-in-java
2df212c3c8f84f56275d9ab335831a50023df798
283c87baf533d2abd0cb582ea322de838b5d3bf2
refs/heads/master
2020-06-20T14:59:35.149880
2019-07-16T08:57:44
2019-07-16T08:57:44
197,157,772
0
0
null
null
null
null
UTF-8
Java
false
false
1,678
java
package com.bruce.demo.collection; import java.util.AbstractMap; import java.util.HashSet; import java.util.LinkedList; import java.util.ListIterator; import java.util.Set; import com.bruce.demo.collection.EntrySet.MyEntry; @SuppressWarnings("unchecked") public class SimpleHashMap<K,V> extends AbstractMap<K, V> { static final int SIZE = 997; LinkedList<MyEntry<K, V>>[] bucket = new LinkedList[SIZE]; @Override public V get(Object key) { // TODO Auto-generated method stub int index = Math.abs(key.hashCode()) % size(); if (bucket[index] != null) { for (MyEntry<K, V> entry : bucket[index]) { if (entry.getKey().equals(key)){ return entry.getValue(); } } } return null; } @Override public V put(K key, V value) { // TODO Auto-generated method stub V oldValue = null; int index = Math.abs(key.hashCode()) % SIZE; if (bucket[index] == null){ bucket[index] = new LinkedList<MyEntry<K,V>>(); } LinkedList<MyEntry<K,V>> list = bucket[index]; boolean found = false; MyEntry<K, V> entry = new MyEntry<K, V>(key, value); ListIterator<MyEntry<K, V>> it = list.listIterator(); while (it.hasNext()) { MyEntry<K, V> ipair = it.next(); if(ipair.getKey().equals(key)){ oldValue = ipair.getValue(); it.set(entry); found = true; break; } } if (!found){ list.add(entry); } return oldValue; } @Override public Set<Entry<K, V>> entrySet() { // TODO Auto-generated method stub Set<Entry<K, V>> set = new HashSet<Entry<K,V>>(); for (LinkedList<MyEntry<K, V>> b : bucket) { if (b == null) continue; for (MyEntry<K, V> m : b){ set.add(m); } } return set; } }
[ "bruceyuan@augmentum.com.cn" ]
bruceyuan@augmentum.com.cn
8f16649f11b8cf46044bbae9a20c847108cd1bfc
e9e9693a79cd71d22fc82881e49b81bed9e54fbb
/app/src/main/java/com/example/administrator/picturesearch/component/xrecyclerview/WrapAdapter.java
8479d92edd1840cfcd666833edd18b8f695c07f7
[]
no_license
kiefer0815/picturesearch
75e1b18e872608324e126081ea8145b32d361383
03b8969c216216683e64caf14861f1d295f7ca2e
refs/heads/master
2020-03-18T11:21:01.758354
2018-05-24T07:17:49
2018-05-24T07:17:49
134,665,724
0
0
null
null
null
null
UTF-8
Java
false
false
5,659
java
package com.example.administrator.picturesearch.component.xrecyclerview; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLayoutManager; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; /** * Created by yangcai on 2016/1/28. */ public class WrapAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private static final int TYPE_REFRESH_HEADER = -5; private static final int TYPE_HEADER = -4; private static final int TYPE_NORMAL = 0; private static final int TYPE_FOOTER = -3; private RecyclerView.Adapter adapter; private SparseArray<View> mHeaderViews; private SparseArray<View> mFootViews; private int headerPosition = 1; public WrapAdapter(SparseArray<View> headerViews, SparseArray<View> footViews, RecyclerView.Adapter adapter) { this.adapter = adapter; this.mHeaderViews = headerViews; this.mFootViews = footViews; } @Override public void onAttachedToRecyclerView(RecyclerView recyclerView) { super.onAttachedToRecyclerView(recyclerView); RecyclerView.LayoutManager manager = recyclerView.getLayoutManager(); if (manager instanceof GridLayoutManager) { final GridLayoutManager gridManager = ((GridLayoutManager) manager); gridManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { @Override public int getSpanSize(int position) { return (isHeader(position) || isFooter(position)) ? gridManager.getSpanCount() : 1; } }); } } @Override public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) { super.onViewAttachedToWindow(holder); ViewGroup.LayoutParams lp = holder.itemView.getLayoutParams(); if (lp != null && lp instanceof StaggeredGridLayoutManager.LayoutParams && (isHeader(holder.getLayoutPosition()) || isFooter(holder.getLayoutPosition()))) { StaggeredGridLayoutManager.LayoutParams p = (StaggeredGridLayoutManager.LayoutParams) lp; p.setFullSpan(true); } } public boolean isHeader(int position) { return position >= 0 && position < mHeaderViews.size(); } public boolean isFooter(int position) { return position < getItemCount() && position >= getItemCount() - mFootViews.size(); } public boolean isRefreshHeader(int position) { return position == 0; } public int getHeadersCount() { return mHeaderViews.size(); } public int getFootersCount() { return mFootViews.size(); } @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == TYPE_REFRESH_HEADER) { return new SimpleViewHolder(mHeaderViews.get(0)); } else if (viewType == TYPE_HEADER) { return new SimpleViewHolder(mHeaderViews.get(headerPosition++)); } else if (viewType == TYPE_FOOTER) { return new SimpleViewHolder(mFootViews.get(0)); } return adapter.onCreateViewHolder(parent, viewType); } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (isHeader(position)) { return; } int adjPosition = position - getHeadersCount(); int adapterCount; if (adapter != null) { adapterCount = adapter.getItemCount(); if (adjPosition < adapterCount) { adapter.onBindViewHolder(holder, adjPosition); return; } } } @Override public int getItemCount() { if (adapter != null) { return getHeadersCount() + getFootersCount() + adapter.getItemCount(); } else { return getHeadersCount() + getFootersCount(); } } @Override public int getItemViewType(int position) { if (isRefreshHeader(position)) { return TYPE_REFRESH_HEADER; } if (isHeader(position)) { return TYPE_HEADER; } if (isFooter(position)) { return TYPE_FOOTER; } int adjPosition = position - getHeadersCount(); int adapterCount; if (adapter != null) { adapterCount = adapter.getItemCount(); if (adjPosition < adapterCount) { return adapter.getItemViewType(adjPosition); } } return TYPE_NORMAL; } @Override public long getItemId(int position) { if (adapter != null && position >= getHeadersCount()) { int adjPosition = position - getHeadersCount(); int adapterCount = adapter.getItemCount(); if (adjPosition < adapterCount) { return adapter.getItemId(adjPosition); } } return -1; } @Override public void unregisterAdapterDataObserver(RecyclerView.AdapterDataObserver observer) { if (adapter != null) { adapter.unregisterAdapterDataObserver(observer); } } @Override public void registerAdapterDataObserver(RecyclerView.AdapterDataObserver observer) { if (adapter != null) { adapter.registerAdapterDataObserver(observer); } } private class SimpleViewHolder extends RecyclerView.ViewHolder { public SimpleViewHolder(View itemView) { super(itemView); } } }
[ "xiezhanghuan@ruoshui.me" ]
xiezhanghuan@ruoshui.me
a79d3945f9a790c7741d2f58fe0baf87b6a8f0d9
8e1adbf6ab6784f9ba7dfe49e720a297ace972a7
/src/main/java/eu/mihosoft/ext/velocity/legacy/exception/TemplateInitException.java
6e5a3149c7736e8b644f268e25e9f36a8143f4e2
[ "Apache-2.0" ]
permissive
miho/velocity-legacy
1b8e4752099cb03b5b4ee651a116104ad301392c
18fa349539c99a50036b7be87113dee353ef70d9
refs/heads/master
2020-09-24T21:01:27.979201
2019-12-04T13:41:34
2019-12-04T13:41:34
225,843,071
0
0
null
null
null
null
UTF-8
Java
false
false
2,656
java
package eu.mihosoft.ext.velocity.legacy.exception; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import eu.mihosoft.ext.velocity.legacy.runtime.parser.ParseException; /** * Exception generated to indicate parse errors caught during * directive initialization (e.g. wrong number of arguments) * * @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a> * @version $Id: TemplateInitException.java 685685 2008-08-13 21:43:27Z nbubna $ * @since 1.5 */ public class TemplateInitException extends VelocityException implements ExtendedParseException { private final String templateName; private final int col; private final int line; /** * Version Id for serializable */ private static final long serialVersionUID = -4985224672336070621L; public TemplateInitException(final String msg, final String templateName, final int col, final int line) { super(msg); this.templateName = templateName; this.col = col; this.line = line; } public TemplateInitException(final String msg, ParseException parseException, final String templateName, final int col, final int line) { super(msg,parseException); this.templateName = templateName; this.col = col; this.line = line; } /** * Returns the Template name where this exception occured. * @return the template name */ public String getTemplateName() { return templateName; } /** * Returns the line number where this exception occured. * @return the line number */ public int getLineNumber() { return line; } /** * Returns the column number where this exception occured. * @return the line number */ public int getColumnNumber() { return col; } }
[ "info@michaelhoffer.de" ]
info@michaelhoffer.de
5024629c30d82ff4e42cb05f9fe35865775ac421
eac1838f9790b3074739b207e025d4fdbcb3a8d6
/src/main/java/com/bae/App.java
b5e452930a1a15f907749925ebe2751eb993b0a4
[]
no_license
ayshamarty/SaturdayAPISession
1f8be96709d4c094fd3bfb94c2bcb6b743236b6e
21b86d2a3eb4f2ce30f3ca77b308a68cd7e55247
refs/heads/master
2022-03-22T06:40:17.345029
2019-06-08T11:58:51
2019-06-08T11:58:51
190,875,735
0
0
null
2022-02-09T23:56:13
2019-06-08T10:39:33
Java
UTF-8
Java
false
false
669
java
package com.bae; import com.bae.domain.Account; import com.bae.domain.Task; import com.bae.repository.AccountRepositoryDB; public class App { public static void main(String[] args) { // ideally you would do this all in a test so as not to cloud up the main - this is just for the learning process Account a = new Account(); a.setName("Danny"); Task t = new Task(); t.setTodo("Work"); a.getTaskSet().add(t); AccountRepositoryDB db = new AccountRepositoryDB(); //call the method in AccountRepositoryDB to persist this table db.create(a); //call the update method to change the ID to the setName db.update(17, "Aysha"); } }
[ "you@example.com" ]
you@example.com
1794e752ef13be40981a65b72d3be2c3aa2bed2f
9fde32c83336a7b8066087afd6f753521d1f7cf3
/JDK1.8Examples/src/jdk1_6examples/threads/deadlocks/DeadlockingCodeSynchronized.java
dcf552411bbdef5c68c37aef7aa5afa6545b972b
[]
no_license
ruivale/Java
6443c9be67044ac82f366d24a8a1175881edc26a
cbe659deda1e933c4b1db469ac08168bc08ff201
refs/heads/master
2023-04-10T21:35:41.071469
2023-03-28T15:43:35
2023-03-28T15:43:35
68,197,319
0
0
null
null
null
null
UTF-8
Java
false
false
567
java
package jdk1_6examples.threads.deadlocks; /** * <p>Classname: </p> * * <p>Description: Java 6, aka JDK1.6, examples ...</p> * * <p>Copyright: Copyright (c) 2006</p> * * <p>Company: ENT, S.A.</p> * * @author rUI vALE - rui dot vale at ent dot efacec dot pt * @version 1.0 */ public class DeadlockingCodeSynchronized implements DeadlockingCode { private final Object lock = new Object(); public synchronized void f() { synchronized (lock) { // do something } } public void g() { synchronized (lock) { f(); } } }
[ "ruivale@gmail.com" ]
ruivale@gmail.com
b2ced0524502a3d49f86968dfda3168603d631c6
a647c20a87db7ff34d2038fc418328a3b870a881
/user/Sign.java
2a2263111ddd261b0a4ded1a7a9e2b3d900a9127
[]
no_license
2790386747/mygit
f62900131eb188862411c6c63638d878e1254357
f37eb8ca8a50acf653353e36ead772cc8d4068b7
refs/heads/master
2020-07-23T21:46:13.451268
2020-01-09T10:42:54
2020-01-09T10:42:54
207,714,929
0
0
null
null
null
null
UTF-8
Java
false
false
222
java
package user; public class Sign implements Runnable{ private Storage st; private char num; Sign(Storage st){ this.st=st; } public void run(){ while(true){ st.put(num++); } } }
[ "you@example.com" ]
you@example.com
18ca382838502b84fcf9f415914ad778af822905
8f85fedb1f052b2eeb960387f65915350ba75830
/net.certware.argument.gsn.edit/src-gen/net/certware/argument/gsn/parts/ContextPropertiesEditionPart.java
71831193e94dff5e7b071741e660db31e414c7da
[ "Apache-2.0" ]
permissive
mrbcuda/CertWare
bc3dd18ff803978d84143c26bfc7e3f74bd0c6aa
67ff7f9dc00a2298bfcb574e2acf056f7b7786b2
refs/heads/master
2021-01-17T21:26:34.643174
2013-08-06T22:01:30
2013-08-06T22:01:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,251
java
/** * Generated with Acceleo */ package net.certware.argument.gsn.parts; // Start of user code for imports import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings; import org.eclipse.jface.viewers.ViewerFilter; // End of user code /** * * */ public interface ContextPropertiesEditionPart { /** * @return the identifier * */ public String getIdentifier(); /** * Defines a new identifier * @param newValue the new identifier to set * */ public void setIdentifier(String newValue); /** * @return the description * */ public String getDescription(); /** * Defines a new description * @param newValue the new description to set * */ public void setDescription(String newValue); /** * @return the content * */ public String getContent(); /** * Defines a new content * @param newValue the new content to set * */ public void setContent(String newValue); /** * Init the isTagged * @param current the current value * @param containgFeature the feature where to navigate if necessary * @param feature the feature to manage */ public void initIsTagged(ReferencesTableSettings settings); /** * Update the isTagged * @param newValue the isTagged to update * */ public void updateIsTagged(); /** * Adds the given filter to the isTagged edition editor. * * @param filter * a viewer filter * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter) * */ public void addFilterToIsTagged(ViewerFilter filter); /** * Adds the given filter to the isTagged edition editor. * * @param filter * a viewer filter * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter) * */ public void addBusinessFilterToIsTagged(ViewerFilter filter); /** * @return true if the given element is contained inside the isTagged table * */ public boolean isContainedInIsTaggedTable(EObject element); /** * Returns the internationalized title text. * * @return the internationalized title text. * */ public String getTitle(); // Start of user code for additional methods // End of user code }
[ "mrbarry@kestreltechnology.com" ]
mrbarry@kestreltechnology.com
e6fbb4c34b901ce25934743d9165bbd0641efa21
ac09a467d9981f67d346d1a9035d98f234ce38d5
/leetcode/src/main/java/org/leetcode/contests/weekly/w0295/A.java
8226d14d0ce61e83e179f3555c35a89e82c2ed73
[]
no_license
AlexKokoz/leetcode
03c9749c97c846c4018295008095ac86ae4951ee
9449593df72d86dadc4c470f1f9698e066632859
refs/heads/master
2023-02-23T13:56:38.978851
2023-02-12T21:21:54
2023-02-12T21:21:54
232,152,255
0
0
null
null
null
null
UTF-8
Java
false
false
543
java
package org.leetcode.contests.weekly.w0295; /** * * EASY * * @author Alexandros Kokozidis * */ public class A { public int rearrangeCharacters(String s, String target) { int ans = 0; int[] count = new int[26]; for (char c : s.toCharArray()) { count[c - 'a']++; } boolean ok = true; outer: while (ok) { ok = false; for (int i = 0; i < target.length(); i++) { if (count[target.charAt(i) - 'a'] == 0) continue outer; count[target.charAt(i) - 'a']--; } ans++; ok = true; } return ans; } }
[ "alexandros.kokozidis@gmail.com" ]
alexandros.kokozidis@gmail.com
42b0aa5cffa12258ce113eb5c735bd3a6ce88d89
893a7d8299a6cf2fef057449808ad578a116a868
/src/com/cisoft/action/CommodityBrandAction.java
ea61a074719080ceb3866859bd1dff31660cd612
[]
no_license
liuguicheng/CisoftOnline
1c32f2a4e7ef3cccba76c0a2f0345244f8763730
fc517c287e07f3bb610c4df6284c182cb2aacbc5
refs/heads/master
2021-01-13T10:21:24.758189
2016-10-28T08:14:54
2016-10-28T08:14:54
72,187,847
0
0
null
null
null
null
UTF-8
Java
false
false
4,119
java
package com.cisoft.action; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.List; import javax.annotation.Resource; import org.apache.struts2.ServletActionContext; import com.cisoft.model.CommodityBrand; import com.cisoft.service.CommodityBrandService; import com.cisoft.utils.Until; import com.opensymphony.xwork2.ModelDriven; /** * 商品品牌 * @author lgc * */ public class CommodityBrandAction extends Pages<CommodityBrand> implements ModelDriven<CommodityBrand>{ private CommodityBrand cbrand=new CommodityBrand(); public CommodityBrand getModel() { // TODO Auto-generated method stub return cbrand; } @Resource CommodityBrandService commoditybrandService; private String result=""; public String getResult() { return result; } public String getList(){ pageResponse.setRows(commoditybrandService.findbrandlist()); pageResponse.setTotal(0); return "list"; } public String save(){ if(fileProductPicFileName!=null){ // 存储缩略图 String imageFileName = new Date().getTime() + getExtention(fileProductPicFileName); //获取tomcat路径 // cfurl=ServletActionContext.getServletContext().getRealPath("/commdityimg")+"/"+imageFileName;//存放地址 String cfurl =Until.pathstr()+"property/"+ imageFileName; File newfile = new File(cfurl); copy(fileProductPic, newfile); cbrand.setCb_imgurl(cfurl); } if(cbrand.getCb_id()==0){ cbrand.setCb_scbs(1); result="添加成功"; }else{ result="修改成功"; } commoditybrandService.save(cbrand); return "save"; } public String addView(){ List<CommodityBrand> cs=this.commoditybrandService.findbrandlist(); ServletActionContext.getContext().put("cbrand", cs); return "addView"; } public String editView(){ List<CommodityBrand> cs=this.commoditybrandService.findbrandlist(); ServletActionContext.getContext().put("cbrand", cs); cbrand=commoditybrandService.findById(cbrand); ServletActionContext.getContext().getValueStack().push(cbrand); return "editView"; } //修改信息 public String updatepwd(){ CommodityBrand cbrandinfo =commoditybrandService.findById(cbrand); commoditybrandService.save(cbrandinfo); result="修改成功"; return "updatepwd"; } /* * Backups/OperateLog/Publish */ public String delete(){ List<CommodityBrand> cblist=commoditybrandService.findbrandlistby(cbrand); if(cblist.size()>0){ result="你选择的属于父类,不能删除"; return "delete"; } CommodityBrand cbrandinfo =commoditybrandService.findById(cbrand); cbrandinfo.setCb_scbs(0); commoditybrandService.save(cbrandinfo); result="删除成功"; return "delete"; } private File fileProductPic; private String fileProductPicFileName; public File getFileProductPic() { return fileProductPic; } public void setFileProductPic(File fileProductPic) { this.fileProductPic = fileProductPic; } public String getFileProductPicFileName() { return fileProductPicFileName; } public void setFileProductPicFileName(String fileProductPicFileName) { this.fileProductPicFileName = fileProductPicFileName; } private static final int BUFFER_SIZE = 16 * 1024; /** * 上传商品缩略图 */ private static void copy(File src, File dst) { try { InputStream in = null; OutputStream out = null; try { in = new BufferedInputStream(new FileInputStream(src), BUFFER_SIZE); out = new BufferedOutputStream(new FileOutputStream(dst), BUFFER_SIZE); byte[] buffer = new byte[BUFFER_SIZE]; while (in.read(buffer) > 0) { out.write(buffer); } } finally { if (null != in) { in.close(); } if (null != out) { out.close(); } } } catch (Exception e) { e.printStackTrace(); } } private static String getExtention(String fileName) { int pos = fileName.lastIndexOf("."); return fileName.substring(pos); } }
[ "282303392@qq.com" ]
282303392@qq.com