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
29b716b4fa495dced5bd10aa57bc229a725c384a
7ef2489727d8faa9a66fcfdc9005df35c9eed46d
/src/main/java/al/aurel/microservicesaga/config/LoggingConfiguration.java
b03cc9a0112d6fed202977c0c34bc6038f995619
[]
no_license
1Aurel1/jhipster-microservice-saga
908c8b9b1ec30c833643a07e4a98352691c09f67
4a2a92567539ecee7d66b02ce9c2ceaa98fdfde4
refs/heads/master
2022-12-22T02:26:03.508982
2020-09-30T13:32:11
2020-09-30T13:32:11
299,929,185
0
0
null
null
null
null
UTF-8
Java
false
false
2,556
java
package al.aurel.microservicesaga.config; import static io.github.jhipster.config.logging.LoggingUtils.*; import ch.qos.logback.classic.LoggerContext; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import io.github.jhipster.config.JHipsterProperties; import java.util.HashMap; import java.util.Map; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.info.BuildProperties; import org.springframework.cloud.consul.serviceregistry.ConsulRegistration; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.context.annotation.Configuration; /* * Configures the console and Logstash log appenders from the app properties */ @Configuration @RefreshScope public class LoggingConfiguration { public LoggingConfiguration( @Value("${spring.application.name}") String appName, @Value("${server.port}") String serverPort, JHipsterProperties jHipsterProperties, ObjectProvider<ConsulRegistration> consulRegistration, ObjectProvider<BuildProperties> buildProperties, ObjectMapper mapper ) throws JsonProcessingException { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); Map<String, String> map = new HashMap<>(); map.put("app_name", appName); map.put("app_port", serverPort); buildProperties.ifAvailable(it -> map.put("version", it.getVersion())); consulRegistration.ifAvailable(it -> map.put("instance_id", it.getInstanceId())); String customFields = mapper.writeValueAsString(map); JHipsterProperties.Logging loggingProperties = jHipsterProperties.getLogging(); JHipsterProperties.Logging.Logstash logstashProperties = loggingProperties.getLogstash(); if (loggingProperties.isUseJsonFormat()) { addJsonConsoleAppender(context, customFields); } if (logstashProperties.isEnabled()) { addLogstashTcpSocketAppender(context, customFields, logstashProperties); } if (loggingProperties.isUseJsonFormat() || logstashProperties.isEnabled()) { addContextListener(context, customFields, loggingProperties); } if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { setMetricsMarkerLogbackFilter(context, loggingProperties.isUseJsonFormat()); } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
d2b1a6bb91ea08c30b4dc83aff37b395d22016f1
04b1803adb6653ecb7cb827c4f4aa616afacf629
/components/test/android/browsertests_apk/src/org/chromium/components_browsertests_apk/ComponentsBrowserTestsApplication.java
585e32d6fd0b45bfbb62a4c0002d4d4f2b9747de
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
Java
false
false
1,462
java
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.components_browsertests_apk; import android.app.Application; import android.content.Context; import org.chromium.base.ApplicationStatus; import org.chromium.base.BuildConfig; import org.chromium.base.ContextUtils; import org.chromium.base.PathUtils; import org.chromium.base.multidex.ChromiumMultiDexInstaller; /** * A basic content_public.browser.tests {@link android.app.Application}. */ public class ComponentsBrowserTestsApplication extends Application { static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "components_shell"; @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); ContextUtils.initApplicationContext(this); // The test harness runs in the main process, and browser in :test_process. boolean isMainProcess = !ContextUtils.getProcessName().contains(":"); boolean isBrowserProcess = ContextUtils.getProcessName().contains(":test"); if (BuildConfig.IS_MULTIDEX_ENABLED && (isMainProcess || isBrowserProcess)) { ChromiumMultiDexInstaller.install(this); } if (isBrowserProcess) { PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); ApplicationStatus.initialize(this); } } }
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
5b17eae32afed50b1bfd7ebd766dffed69715793
66ce016df7e20caa30fab5f58f406950c07ba95e
/gen/pl/froger/servicebinding/R.java
710394b4424e8f4917aeb948be83952702a97369
[]
no_license
android4devs/ServiceBinding
7592806427f750d20db416eaadeb8be19057b09b
be5c1d8895a7f8df18e36cb06ccad4ca41938a3a
refs/heads/master
2016-08-06T19:05:09.707154
2011-08-05T09:12:14
2011-08-05T09:12:14
2,159,461
0
0
null
null
null
null
UTF-8
Java
false
false
1,044
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package pl.froger.servicebinding; public final class R { public static final class attr { } public static final class drawable { public static final int icon=0x7f020000; } public static final class id { public static final int btnSendCustomMessage=0x7f050004; public static final int btnShowServiceOperationCounter=0x7f050005; public static final int btnStartService=0x7f050001; public static final int btnStopService=0x7f050002; public static final int etCustomMessage=0x7f050003; public static final int tvServiceControl=0x7f050000; } public static final class layout { public static final int main=0x7f030000; } public static final class string { public static final int app_name=0x7f040001; public static final int hello=0x7f040000; } }
[ "froger.mcs@gmail.com" ]
froger.mcs@gmail.com
d2e628eaab146fc44f72f010d866501667a29186
0ba34c4a77b8994cffd3436240cd9a52751bf157
/core/core-math/src/main/java/org/openimaj/math/model/fit/residuals/AbstractResidualCalculator.java
127ad9385a5c6bacafe7cf316cf10114fbc59166
[ "BSD-3-Clause" ]
permissive
openimaj/openimaj
6df226a8a14d9a59aa5c9d2738c04fd1cdb379d8
545969f7a99c13bb5bd02c0a30f55013e4abca72
refs/heads/master
2023-08-01T20:38:57.916507
2022-02-09T09:57:12
2022-02-09T09:57:12
31,323,673
350
149
NOASSERTION
2023-06-14T22:29:01
2015-02-25T16:37:24
Java
UTF-8
Java
false
false
2,413
java
/** * Copyright (c) 2011, The University of Southampton and the individual contributors. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * * Neither the name of the University of Southampton nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.openimaj.math.model.fit.residuals; import java.util.List; import org.openimaj.math.model.Model; import org.openimaj.util.pair.IndependentPair; /** * @author Jonathon Hare (jsh2@ecs.soton.ac.uk) * * @param <I> * type of independent data * @param <D> * type of dependent data * @param <M> * type of model */ public abstract class AbstractResidualCalculator<I, D, M extends Model<I, D>> implements ResidualCalculator<I, D, M> { protected M model; @Override public void setModel(M model) { this.model = model; } @Override public void computeResiduals(List<? extends IndependentPair<I, D>> data, double[] errors) { for (int i = 0; i < data.size(); i++) { errors[i] = this.computeResidual(data.get(i)); } } }
[ "jsh2@ecs.soton.ac.uk" ]
jsh2@ecs.soton.ac.uk
d37aa10f37da0166597786e68e7cfe3f54f7ff12
647eef4da03aaaac9872c8b210e4fc24485e49dc
/TestMemory/admobapk/src/main/java/com/google/android/gms/ads/internal/overlay/ar.java
cb217950a00be05e3d5a209f18e8da0e249edd56
[]
no_license
AlbertSnow/git_workspace
f2d3c68a7b6e62f41c1edcd7744f110e2bf7f021
a0b2cd83cfa6576182f440a44d957a9b9a6bda2e
refs/heads/master
2021-01-22T17:57:16.169136
2016-12-05T15:59:46
2016-12-05T15:59:46
28,154,580
1
1
null
null
null
null
UTF-8
Java
false
false
509
java
package com.google.android.gms.ads.internal.overlay; import com.google.android.gms.ads.internal.webview.b; import java.util.Map; public abstract interface ar { public abstract void a(); public abstract void a(b paramb, Map paramMap); public abstract void b(); public abstract void c(); public abstract boolean d(); } /* Location: C:\Program Files\APK反编译\classes_dex2jar.jar * Qualified Name: com.google.android.gms.ads.internal.overlay.ar * JD-Core Version: 0.6.0 */
[ "zhaojialiang@conew.com" ]
zhaojialiang@conew.com
32a7463308ea8011feb282ff9e425f2a42e4d589
527c60fcb8e28738d2386c40a95ac7e44ef2d67b
/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/disk/HologramDatabase.java
ef904735458b8be238617c8d31ec42897d65180e
[]
no_license
KasperFranz/HolographicDisplays
28d4a4c01d83742c652a21d5c6f13a7fa6231a6e
c14357bfb78688a41d8e820ae223711934a12e29
refs/heads/master
2020-12-03T09:35:50.390056
2015-01-11T13:09:27
2015-01-11T13:09:27
29,087,206
0
0
null
2015-01-11T09:42:11
2015-01-11T09:42:11
Java
UTF-8
Java
false
false
5,230
java
package com.gmail.filoghost.holographicdisplays.disk; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Set; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.Plugin; import com.gmail.filoghost.holographicdisplays.HolographicDisplays; import com.gmail.filoghost.holographicdisplays.exception.HologramNotFoundException; import com.gmail.filoghost.holographicdisplays.exception.InvalidFormatException; import com.gmail.filoghost.holographicdisplays.exception.WorldNotFoundException; import com.gmail.filoghost.holographicdisplays.object.CraftHologram; import com.gmail.filoghost.holographicdisplays.object.NamedHologram; import com.gmail.filoghost.holographicdisplays.object.line.CraftHologramLine; import com.gmail.filoghost.holographicdisplays.object.line.CraftItemLine; import com.gmail.filoghost.holographicdisplays.object.line.CraftTextLine; import com.gmail.filoghost.holographicdisplays.util.ItemUtils; import com.gmail.filoghost.holographicdisplays.util.Utils; public class HologramDatabase { private static File file; private static FileConfiguration config; public static void loadYamlFile(Plugin plugin) { file = new File(plugin.getDataFolder(), "database.yml"); if (!file.exists()) { plugin.getDataFolder().mkdirs(); plugin.saveResource("database.yml", true); } config = YamlConfiguration.loadConfiguration(file); } public static NamedHologram loadHologram(String name) throws HologramNotFoundException, InvalidFormatException, WorldNotFoundException { ConfigurationSection configSection = config.getConfigurationSection(name); if (configSection == null) { throw new HologramNotFoundException(); } List<String> lines = configSection.getStringList("lines"); String locationString = configSection.getString("location"); if (lines == null || locationString == null || lines.size() == 0) { throw new HologramNotFoundException(); } Location loc = LocationSerializer.locationFromString(locationString); NamedHologram hologram = new NamedHologram(loc, name); for (int i = 0; i < lines.size(); i++) { hologram.getLinesUnsafe().add(readLineFromString(lines.get(i), hologram)); } return hologram; } public static CraftHologramLine readLineFromString(String rawText, CraftHologram hologram) { if (rawText.toLowerCase().startsWith("icon:")) { String iconMaterial = ItemUtils.stripSpacingChars(rawText.substring("icon:".length(), rawText.length())); short dataValue = 0; if (iconMaterial.contains(":")) { try { dataValue = (short) Integer.parseInt(iconMaterial.split(":")[1]); } catch (NumberFormatException e) { } iconMaterial = iconMaterial.split(":")[0]; } Material mat = ItemUtils.matchMaterial(iconMaterial); if (mat == null) { mat = Material.BEDROCK; } return new CraftItemLine(hologram, new ItemStack(mat, 1, dataValue)); } else { if (rawText.trim().equalsIgnoreCase("{empty}")) { return new CraftTextLine(hologram, ""); } else { return new CraftTextLine(hologram, StringConverter.toReadableFormat(rawText)); } } } public static String saveLineToString(CraftHologramLine line) { if (line instanceof CraftTextLine) { return StringConverter.toSaveableFormat(((CraftTextLine) line).getText()); } else if (line instanceof CraftItemLine) { CraftItemLine itemLine = (CraftItemLine) line; return "ICON: " + itemLine.getItemStack().getType().toString().replace("_", " ").toLowerCase() + (itemLine.getItemStack().getDurability() != 0 ? String.valueOf(itemLine.getItemStack().getDurability()) : ""); } else { return "Unknown"; } } public static void deleteHologram(String name) { config.set(name, null); } public static void saveHologram(NamedHologram hologram) { ConfigurationSection configSection = config.isConfigurationSection(hologram.getName()) ? config.getConfigurationSection(hologram.getName()) : config.createSection(hologram.getName()); configSection.set("location", LocationSerializer.locationToString(hologram.getLocation())); List<String> lines = Utils.newList(); for (CraftHologramLine line : hologram.getLinesUnsafe()) { lines.add(saveLineToString(line)); } configSection.set("lines", lines); } public static Set<String> getHolograms() { return config.getKeys(false); } public static boolean isExistingHologram(String name) { return config.isConfigurationSection(name); } public static void saveToDisk() throws IOException { if (config != null && file != null) { config.save(file); } } public static void trySaveToDisk() { try { saveToDisk(); } catch (IOException ex) { ex.printStackTrace(); HolographicDisplays.getInstance().getLogger().severe("Unable to save database.yml to disk!"); } } }
[ "filoghost@gmail.com" ]
filoghost@gmail.com
f5ce12e2450e2af1d956900149300362fe594ccb
caaffff72d43cc31a5de6746429d32c989685c7c
/net.jplugin.core.kernel/logkit/com/lh/org/apache/log/output/AbstractOutputTarget.java
68b36a8cd877fc02f511bff9060d361151fd9109
[]
no_license
iamlibo/jplugin
8c0ebf3328bdb90d7db80606d46453778c25f4f4
4f8b65dd285f986a3c54b701a25fabca3bba5ed9
refs/heads/master
2021-01-12T02:10:35.903062
2016-12-08T12:42:33
2016-12-08T12:42:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,949
java
/* * Copyright 1999-2004 The Apache Software Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. * * See the License for the specific language governing permissions and * limitations under the License. */ package com.lh.org.apache.log.output; import com.lh.org.apache.log.LogEvent; import com.lh.org.apache.log.format.Formatter; /** Abstract output target. * * Any new output target that is writing to a single connected * resource should extend this class directly or indirectly. * * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a> * @author Peter Donald */ public abstract class AbstractOutputTarget extends AbstractTarget { /** Formatter for target. */ private Formatter m_formatter; /** Parameterless constructor. */ public AbstractOutputTarget() { } /** * Creation of a new abstract output target instance. * @param formatter the formatter to apply */ public AbstractOutputTarget( final Formatter formatter ) { m_formatter = formatter; } /** Returns the Formatter. */ protected Formatter getFormatter() { return m_formatter; } /** * Abstract method to write data. * * @param data the data to be output */ protected void write( final String data ) { } /** * Process a log event. * @param event the event to process */ protected void doProcessEvent( LogEvent event ) { final String data = format( event ); write( data ); } /** * Startup log session. * */ protected synchronized void open() { if( !isOpen() ) { super.open(); writeHead(); } } /** * Shutdown target. * Attempting to write to target after close() will cause errors to be logged. * */ public synchronized void close() { if( isOpen() ) { writeTail(); super.close(); } } /** * Helper method to format an event into a string, using the formatter if available. * * @param event the LogEvent * @return the formatted string */ private String format( final LogEvent event ) { if( null != m_formatter ) { return m_formatter.format( event ); } else { return event.toString(); } } /** * Helper method to write out log head. * The head initiates a session of logging. */ private void writeHead() { if( !isOpen() ) { return; } final String head = getHead(); if( null != head ) { write( head ); } } /** * Helper method to write out log tail. * The tail completes a session of logging. */ private void writeTail() { if( !isOpen() ) { return; } final String tail = getTail(); if( null != tail ) { write( tail ); } } /** * Helper method to retrieve head for log session. * TODO: Extract from formatter * * @return the head string */ private String getHead() { return null; } /** * Helper method to retrieve tail for log session. * TODO: Extract from formatter * * @return the head string */ private String getTail() { return null; } }
[ "liuhang.163@163.com" ]
liuhang.163@163.com
a000cafd6833c809494d20c78d822054cf4ad193
b243bac3c719d72da100c1accdd95a5918ad9996
/app/src/main/java/cn/zhaoliang5156/monthmoni/base/net/HttpUtil.java
cb575954a5d3962cf6bbaa093612b18ab27b1988
[]
no_license
BruceAnda/MonthMoni
dea007f0c863f1ce697eaa4a7d6cbeeb9dc86ec6
2b50fa5e07cfad35b2a63d586cc563ba45e7873b
refs/heads/master
2020-05-18T05:11:43.651589
2019-04-30T08:43:43
2019-04-30T08:43:43
184,197,880
0
0
null
null
null
null
UTF-8
Java
false
false
305
java
package cn.zhaoliang5156.monthmoni.base.net; import java.util.Map; /** * Copyright (C), 2015-2019, 八维集团 * Author: zhaoliang * Date: 2019/4/27 7:57 PM * Description: */ public interface HttpUtil { void doHttp(int method, String url, Map<String, String> param, HttpCallback callback); }
[ "2668645098@qq.com" ]
2668645098@qq.com
9e8666cee8f8f1987963091cab1e1974f5d85cff
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/12/StoreUpgradeOnStartupTest.java
9f73568af8fb3f000a54e365f374fe8225a4f483
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
5,046
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package upgrade; import org.hamcrest.Matchers; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.RuleChain; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.Collections; import org.neo4j.consistency.checking.full.ConsistencyCheckIncompleteException; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.factory.GraphDatabaseSettings; import org.neo4j.helpers.Exceptions; import org.neo4j.io.fs.FileSystemAbstraction; import org.neo4j.io.pagecache.PageCache; import org.neo4j.kernel.impl.store.format.standard.StandardV2_3; import org.neo4j.kernel.impl.storemigration.MigrationTestUtils; import org.neo4j.kernel.impl.storemigration.StoreUpgrader; import org.neo4j.kernel.impl.storemigration.StoreVersionCheck; import org.neo4j.test.TestGraphDatabaseFactory; import org.neo4j.test.rule.PageCacheRule; import org.neo4j.test.rule.TestDirectory; import org.neo4j.test.rule.fs.DefaultFileSystemRule; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.neo4j.consistency.store.StoreAssertions.assertConsistentStore; import static org.neo4j.kernel.impl.storemigration.MigrationTestUtils.checkNeoStoreHasDefaultFormatVersion; import static org.neo4j.kernel.impl.storemigration.MigrationTestUtils.removeCheckPointFromTxLog; @RunWith( Parameterized.class ) public class StoreUpgradeOnStartupTest { private final TestDirectory testDir = TestDirectory.testDirectory(); private final PageCacheRule pageCacheRule = new PageCacheRule(); private final DefaultFileSystemRule fileSystemRule = new DefaultFileSystemRule(); @Rule public RuleChain ruleChain = RuleChain.outerRule( testDir ) .around( fileSystemRule ).around( pageCacheRule ); @Parameterized.Parameter( 0 ) public String version; private FileSystemAbstraction fileSystem; private File workingDirectory; private StoreVersionCheck check; @Parameterized.Parameters( name = "{0}" ) public static Collection<String> versions() { return Collections.singletonList( StandardV2_3.STORE_VERSION ); } @Before public void setup() throws IOException { fileSystem = fileSystemRule.get(); PageCache pageCache = pageCacheRule.getPageCache( fileSystem ); workingDirectory = testDir.directory( "working_" + version ); check = new StoreVersionCheck( pageCache ); File prepareDirectory = testDir.directory( "prepare_" + version ); MigrationTestUtils.prepareSampleLegacyDatabase( version, fileSystem, workingDirectory, prepareDirectory ); } @Test public void shouldUpgradeAutomaticallyOnDatabaseStartup() throws IOException, ConsistencyCheckIncompleteException { // when GraphDatabaseService database = createGraphDatabaseService(); database.shutdown(); // then assertTrue( "Some store files did not have the correct version", checkNeoStoreHasDefaultFormatVersion( check, workingDirectory ) ); assertConsistentStore( workingDirectory ); } @Test public void shouldAbortOnNonCleanlyShutdown() throws Throwable { // given removeCheckPointFromTxLog( fileSystem, workingDirectory ); try { // when GraphDatabaseService database = createGraphDatabaseService(); database.shutdown();// shutdown db in case test fails fail( "Should have been unable to start upgrade on old version" ); } catch ( RuntimeException e ) { // then assertThat( Exceptions.rootCause( e ), Matchers.instanceOf( StoreUpgrader.UnableToUpgradeException.class ) ); } } private GraphDatabaseService createGraphDatabaseService() { return new TestGraphDatabaseFactory() .newEmbeddedDatabaseBuilder( workingDirectory ) .setConfig( GraphDatabaseSettings.allow_upgrade, "true" ) .newGraphDatabase(); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
5dbaa97b86c0162ded2556753ef05abc90165ba1
33b33c378ed90f42d66e127c5d0d7cdfd5ea2ee8
/chukonu_spring_mvc_mybatis/src/main/java/com/yxy/chukonu/mybatis/util/UUIDUtil.java
2f825dfe7b045a8cd4d1cf191e7d7be3ab97ea0a
[ "Apache-2.0" ]
permissive
yexianyi/Chukonu
7924b83960ef6ef7e7788760cc8cd5d19c0402d4
de4c1b91aa98df91c7f70a7b6e7d6403e9bd28d8
refs/heads/master
2023-01-13T14:25:01.709803
2021-07-21T02:19:09
2021-07-21T02:19:09
23,989,907
0
2
Apache-2.0
2023-01-02T22:13:35
2014-09-13T08:50:00
CSS
UTF-8
Java
false
false
169
java
package com.yxy.chukonu.mybatis.util; import java.util.UUID; public final class UUIDUtil { public static String next(){ return UUID.randomUUID().toString() ; } }
[ "yexianyi@hotmail.com" ]
yexianyi@hotmail.com
30da438b40dc8af7cf21a0a5a7f25eebde95c9c6
78f7fd54a94c334ec56f27451688858662e1495e
/partyanalyst-service/trunk/src/main/java/com/itgrids/partyanalyst/dao/hibernate/NominatedPostStatusDAO.java
b95f53e94094729fb115d23e4f66995bae1b8e11
[]
no_license
hymanath/PA
2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef
d166bf434601f0fbe45af02064c94954f6326fd7
refs/heads/master
2021-09-12T09:06:37.814523
2018-04-13T20:13:59
2018-04-13T20:13:59
129,496,146
1
0
null
null
null
null
UTF-8
Java
false
false
899
java
package com.itgrids.partyanalyst.dao.hibernate; import java.util.List; import org.appfuse.dao.hibernate.GenericDaoHibernate; import org.hibernate.Query; import com.itgrids.partyanalyst.dao.INominatedPostStatusDAO; import com.itgrids.partyanalyst.model.NominatedPostStatus; public class NominatedPostStatusDAO extends GenericDaoHibernate<NominatedPostStatus, Long> implements INominatedPostStatusDAO{ public NominatedPostStatusDAO() { super(NominatedPostStatus.class); } public List<Long> getStatusIdsList(){ Query query = getSession().createQuery("select distinct model.nominatedPostStatusId from NominatedPostStatus model "); return query.list(); } public List<Object[]> getAllNominatedStatusList(){ Query query = getSession().createQuery("select model.nominatedPostStatusId,model.status from NominatedPostStatus model "); return query.list(); } }
[ "itgrids@b17b186f-d863-de11-8533-00e0815b4126" ]
itgrids@b17b186f-d863-de11-8533-00e0815b4126
237ab6033ebd3261ba86e0cb0e41999dd620b9dd
2b2fcb1902206ad0f207305b9268838504c3749b
/WakfuClientSources/srcx/class_10590_dtZ.java
11354f21e186be00ec41effe305cdea377f1e838
[]
no_license
shelsonjava/Synx
4fbcee964631f747efc9296477dee5a22826791a
0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d
refs/heads/master
2021-01-15T13:51:41.816571
2013-11-17T10:46:22
2013-11-17T10:46:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
339
java
import org.apache.log4j.Logger; public class dtZ { private static final Logger K = Logger.getLogger(dtZ.class); private final bMG gNb; public dtZ(bMG parambMG) { this.gNb = parambMG; } public void v(cew paramcew) { if (this.gNb.CD() == 0L) { paramcew.chv(); return; } paramcew.a(this.gNb); } }
[ "music_inme@hotmail.fr" ]
music_inme@hotmail.fr
4d82640c87ef4cfd858dfa0694d3c2ef5c7f38b6
fc4150290b10e2e331b55e54e628798eabaa47ad
/HAL/src/jkt/hms/medicalboard/dataservice/InstructionToCandidatesUpdateDataService.java
137ee11b4fa441a1376f387f9b95139289b1d438
[]
no_license
vadhwa11/newproject2
8e40bd4acfd4edc6b721eeca8636f8b7d589af2b
fc9bd770fdadf650f004323f85884dc143827f4d
refs/heads/master
2020-05-05T04:01:05.628775
2019-04-05T14:38:10
2019-04-05T14:38:10
179,694,408
0
0
null
null
null
null
UTF-8
Java
false
false
374
java
package jkt.hms.medicalboard.dataservice; import java.util.Map; public interface InstructionToCandidatesUpdateDataService { Map<String, Object> showInstructionToCandidatesUpdateJsp(int Id); boolean editInstructionToCandidatesUpdateToDatabase( Map<String, Object> generalMap); // connection method for print public Map<String, Object> getConnectionForReport(); }
[ "vadhwa11@gmail.com" ]
vadhwa11@gmail.com
bf3e7f330c0c137b6c5817269ce85aeb3ff0c12f
725b0c33af8b93b557657d2a927be1361256362b
/com/planet_ink/coffee_mud/WebMacros/AbilityCursesNext.java
a59d10588a4561b68baca44785fcfbfd555e7fe7
[ "Apache-2.0" ]
permissive
mcbrown87/CoffeeMud
7546434750d1ae0418ac2c76d27f872106d2df97
0d4403d466271fe5d75bfae8f33089632ac1ddd6
refs/heads/master
2020-12-30T19:23:07.758257
2014-06-25T00:01:20
2014-06-25T00:01:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,705
java
package com.planet_ink.coffee_mud.WebMacros; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import com.planet_ink.miniweb.interfaces.*; import java.util.*; /* Copyright 2000-2014 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class AbilityCursesNext extends StdWebMacro { @Override public String name() { return "AbilityCursesNext"; } @Override public String runMacro(HTTPRequest httpReq, String parm) { if(!CMProps.getBoolVar(CMProps.Bool.MUDSTARTED)) return " @break@"; final java.util.Map<String,String> parms=parseParms(parm); final String last=httpReq.getUrlParameter("ABILITY"); if(parms.containsKey("RESET")) { if(last!=null) httpReq.removeUrlParameter("ABILITY"); return ""; } String lastID=""; final String deityName=httpReq.getUrlParameter("DEITY"); Deity D=null; if((deityName!=null)&&(deityName.length()>0)) D=CMLib.map().getDeity(deityName); if(D==null) { if(parms.containsKey("EMPTYOK")) return "<!--EMPTY-->"; return " @break@"; } for(int a=0;a<D.numCurses();a++) { final Ability A=D.fetchCurse(a); if((last==null)||((last.length()>0)&&(last.equals(lastID))&&(!A.ID().equals(lastID)))) { httpReq.addFakeUrlParameter("ABILITY",A.ID()); return ""; } lastID=A.ID(); } httpReq.addFakeUrlParameter("ABILITY",""); if(parms.containsKey("EMPTYOK")) return "<!--EMPTY-->"; return " @break@"; } }
[ "bo@0d6f1817-ed0e-0410-87c9-987e46238f29" ]
bo@0d6f1817-ed0e-0410-87c9-987e46238f29
7b7bd6f59bb948a729152e7fea91741c079b6bad
8191bea395f0e97835735d1ab6e859db3a7f8a99
/com.antutu.ABenchMark_source_from_JADX/com/umeng/analytics/social/C4185b.java
bf54e12d8e26cead72015c752e96e9efb4661426
[]
no_license
msmtmsmt123/jadx-1
5e5aea319e094b5d09c66e0fdb31f10a3238346c
b9458bb1a49a8a7fba8b9f9a6fb6f54438ce03a2
refs/heads/master
2021-05-08T19:21:27.870459
2017-01-28T04:19:54
2017-01-28T04:19:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,128
java
package com.umeng.analytics.social; import android.util.Log; /* renamed from: com.umeng.analytics.social.b */ public class C4185b { public static void m17054a(String str, String str2) { if (C4188e.f14079v) { Log.i(str, str2); } } public static void m17055a(String str, String str2, Exception exception) { if (C4188e.f14079v) { Log.i(str, exception.toString() + ": [" + str2 + "]"); } } public static void m17056b(String str, String str2) { if (C4188e.f14079v) { Log.e(str, str2); } } public static void m17057b(String str, String str2, Exception exception) { if (C4188e.f14079v) { Log.e(str, exception.toString() + ": [" + str2 + "]"); for (StackTraceElement stackTraceElement : exception.getStackTrace()) { Log.e(str, " at\t " + stackTraceElement.toString()); } } } public static void m17058c(String str, String str2) { if (C4188e.f14079v) { Log.d(str, str2); } } public static void m17059c(String str, String str2, Exception exception) { if (C4188e.f14079v) { Log.d(str, exception.toString() + ": [" + str2 + "]"); } } public static void m17060d(String str, String str2) { if (C4188e.f14079v) { Log.v(str, str2); } } public static void m17061d(String str, String str2, Exception exception) { if (C4188e.f14079v) { Log.v(str, exception.toString() + ": [" + str2 + "]"); } } public static void m17062e(String str, String str2) { if (C4188e.f14079v) { Log.w(str, str2); } } public static void m17063e(String str, String str2, Exception exception) { if (C4188e.f14079v) { Log.w(str, exception.toString() + ": [" + str2 + "]"); for (StackTraceElement stackTraceElement : exception.getStackTrace()) { Log.w(str, " at\t " + stackTraceElement.toString()); } } } }
[ "eggfly@qq.com" ]
eggfly@qq.com
1d3cbb3c7cf43742c79abfcff6ca9616973f92e4
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
/SQuirrel_SQL/rev4007-5081/right-trunk-5081/test/src/net/sourceforge/squirrel_sql/fw/dialects/DB2DialectTest.java
b7d63193765382bc846bf33c752a1762a23e327b
[]
no_license
joliebig/featurehouse_fstmerge_examples
af1b963537839d13e834f829cf51f8ad5e6ffe76
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
refs/heads/master
2016-09-05T10:24:50.974902
2013-03-28T16:28:47
2013-03-28T16:28:47
9,080,611
3
2
null
null
null
null
UTF-8
Java
false
false
341
java
package net.sourceforge.squirrel_sql.fw.dialects; import org.junit.After; import org.junit.Before; public class DB2DialectTest extends AbstractDialectExtTest { @Before public void setUp() throws Exception { classUnderTest = new DB2DialectExt(); } @After public void tearDown() throws Exception { classUnderTest = null; } }
[ "joliebig@fim.uni-passau.de" ]
joliebig@fim.uni-passau.de
26587510626ac216149f41332e4efbf8508058ab
9208ba403c8902b1374444a895ef2438a029ed5c
/sources/org/fourthline/cling/transport/spi/SOAPActionProcessor.java
68e478a23a9fa9e7277d79101bfdaf2970909e40
[]
no_license
MewX/kantv-decompiled-v3.1.2
3e68b7046cebd8810e4f852601b1ee6a60d050a8
d70dfaedf66cdde267d99ad22d0089505a355aa1
refs/heads/main
2023-02-27T05:32:32.517948
2021-02-02T13:38:05
2021-02-02T13:44:31
335,299,807
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
package org.fourthline.cling.transport.spi; import org.fourthline.cling.model.UnsupportedDataException; import org.fourthline.cling.model.action.ActionInvocation; import org.fourthline.cling.model.message.control.ActionRequestMessage; import org.fourthline.cling.model.message.control.ActionResponseMessage; public interface SOAPActionProcessor { void readBody(ActionRequestMessage actionRequestMessage, ActionInvocation actionInvocation) throws UnsupportedDataException; void readBody(ActionResponseMessage actionResponseMessage, ActionInvocation actionInvocation) throws UnsupportedDataException; void writeBody(ActionRequestMessage actionRequestMessage, ActionInvocation actionInvocation) throws UnsupportedDataException; void writeBody(ActionResponseMessage actionResponseMessage, ActionInvocation actionInvocation) throws UnsupportedDataException; }
[ "xiayuanzhong@gmail.com" ]
xiayuanzhong@gmail.com
debe395bb2d63fed857f1ea0dfd2ebf24a89315f
8f3a6312d363063e697258a751abfe3f84aa1799
/src/main/java/com/tengu/sync/listener/message/BaseMessageListener.java
38fb36e5e304f77381899f4cf1e7bd48064f03a7
[]
no_license
Archidel/tengu-bot
754b7872179a5275cbe1abb780f65c5149ac4517
89ea54768d4fdf93a89ed273f8f4e417aca673d4
refs/heads/master
2023-08-24T03:06:34.630881
2021-09-28T21:23:05
2021-09-28T21:23:05
411,441,839
0
0
null
null
null
null
UTF-8
Java
false
false
1,100
java
package com.tengu.sync.listener.message; import discord4j.core.event.domain.message.MessageCreateEvent; import discord4j.core.object.entity.Guild; import discord4j.core.object.entity.Member; import discord4j.core.object.entity.channel.MessageChannel; public abstract class BaseMessageListener { public abstract String getCommand(); protected boolean isCommand(MessageCreateEvent event) { return getMessageContent(event).toLowerCase().contains(getCommand().toLowerCase()); } protected String removeCommandFromMessage(String message) { return message.replace(getCommand(), "").trim(); } protected Guild getCurrentGuild(MessageCreateEvent event) { return event.getGuild().block(); } protected Member getMember(MessageCreateEvent event) { return event.getMember().get(); } protected String getMessageContent(MessageCreateEvent event) { return event.getMessage().getContent(); } protected MessageChannel getChannel(MessageCreateEvent event) { return event.getMessage().getChannel().block(); } }
[ "you@example.com" ]
you@example.com
30d29f4d6cc352076a962cfcfb9588091c01cbc4
a3cd1a0224ba68542841777331e7344da299b966
/app/src/main/java/com/yushilei/commonapp/common/bean/BeanB.java
c0c5fa9ebd8684b17745632db7420390f2ccf23d
[]
no_license
yushilei1218/CommonApp
5611c8f16c422c82b0224769b1bb8cd0460c16f7
928b3fc064971aa12399a1c4c5f90657bc58ab1c
refs/heads/master
2021-06-26T14:30:59.321656
2018-03-22T00:48:42
2018-03-22T00:48:42
96,604,385
1
0
null
null
null
null
UTF-8
Java
false
false
193
java
package com.yushilei.commonapp.common.bean; /** * Created by shilei.yu on 2017/7/9. */ public class BeanB { public int age; public BeanB(int age) { this.age = age; } }
[ "shilei.yu@zhaopin.com.cn" ]
shilei.yu@zhaopin.com.cn
61704ea0ee0597c60e2fff5ef837f4184ab7b5d0
0f94e4b725456049c4080f6f9596a20e24fe9d3e
/src/main/java/com/udemy/backendninja/repository/CourseJpaRepository.java
e14e23f01f9a051048d898568080ab33a1e1a92b
[]
no_license
miguelon93/ProyectoSpringboot
ecec0d90ecae5a44f3ddc0689729fb9f7026e794
6e9c6fce7c48e382c9b670d552374e5086d2c974
refs/heads/main
2023-07-14T06:38:52.637318
2021-08-25T08:48:30
2021-08-25T08:48:30
397,562,973
0
0
null
null
null
null
UTF-8
Java
false
false
634
java
package com.udemy.backendninja.repository; import java.io.Serializable; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.udemy.backendninja.entity.Course; @Repository("courseJpaRepository") public interface CourseJpaRepository extends JpaRepository<Course, Serializable> { public abstract Course findByPrice(int price); public abstract Course findByPriceAndName(int price, String name); public abstract List<Course> findByNameOrderByHours(String name); public abstract Course findByNameOrPrice(String name, int price); }
[ "you@example.com" ]
you@example.com
6f9701e39d60159d6c3076c913a12a3cec1f3c27
c5f229e53a784d850279b2a8f033cadb779233fe
/src/ThinkingInJava/The21chapter/test2/test2.java
6ee234f8d876a776c9e555b2562df4808aa99cb8
[]
no_license
Git-zhoujunjie/JavaTest
6557e77fe3c1113b7fcb1d53f51d77a3b8d429f7
d7c7aec9c43ec48a092f4ec483bede4fc65cc0f9
refs/heads/master
2020-03-25T20:10:38.435784
2019-10-12T05:20:36
2019-10-12T05:20:36
144,119,343
0
0
null
null
null
null
UTF-8
Java
false
false
1,148
java
package ThinkingInJava.The21chapter.test2; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; class Fibonacci implements Runnable{ private static int count = 0; private final int id = count++; private int n=1; public Fibonacci(int n){ this.n = n; } public String arr(){ List<Integer> list = new ArrayList<Integer>(); list.add(1); list.add(1); for(int i=2;i<=n;i++){ list.add(list.get(i-2)+list.get(i-1)); } return list.toString(); } public void run(){ System.out.println(id + " "+arr()); Thread.yield(); } } public class test2 { public static void main(String[] args){ Random random = new Random(); for(int i=0;i<5;i++) { // Thread ts = new Thread(new Fibonacci(random.nextInt(15))); // ts.start(); ExecutorService exec = Executors.newCachedThreadPool(); exec.execute(new Fibonacci(random.nextInt(15))); exec.shutdown(); } } }
[ "1160529743@qq.com" ]
1160529743@qq.com
36904c08a0153a743f1107920d45080317a26b62
b66fa22f785d8ff9ac7f0c0f7778b2b71300af5f
/data_hub/src/main/java/cc/gukeer/syncdata/persistence/dao/A_ChangeStateTeachTaskMapper.java
98ba236f012b14028386b0f1126e1772954eb1a3
[]
no_license
sengeiou/learn_java
fdc1ba3add9fa7b868f589b4bff4359855517672
0bf43086d9b4d3ffdfc69f5f1ddac0e0050125fc
refs/heads/master
2023-05-01T07:51:13.187122
2021-04-07T11:04:22
2021-04-07T11:04:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,658
java
package cc.gukeer.syncdata.persistence.dao; import cc.gukeer.syncdata.persistence.entity.*; import java.util.List; public interface A_ChangeStateTeachTaskMapper { //教学周期信息表 change_state_teach_cycle int batchInsertCycle(List<ChangeStateCycle> list);//批量插入 //教室信息表 change_state_teach_class_room int batchInsertClassRoom(List<ChangeStateClassRoom> list); //课程管理信息表 change_state_teach_course_manage int batchInsertCourseManage(List<ChangeStateCourseManage> list); // 教室类型表 change_state_teach_room_type int batchInsertRoomType(List<ChangeStateClassRoomType> list); //教师授课安排信息表 change_state_teach_teach_class int batchInsertTeachManage(List<ChangeStateTeachMange> list); //课程表 change_state_teach_course int batchInsertCourse(List<ChangeStateCourse> list); //科目类型字典表 change_state_teach_course_type int batchInsertCourseType(List<ChangeStateCourseType> list); //标准课程信息表 change_state_teach_standard_course int batchInsertStandardCourse(List<ChangeStateStandardCourse> list); //班级日常课时表 change_state_teach_daily_hour int batchInsertDailyHour(List<ChangeStateDailyHour> list); //部门表 change_state_org_department int batchInsertDepartment(List<ChangeStateDepartment> list); //班级表 change_state_org_grade_class int batchInsertGradeClass(List<ChangeStateGrade> list); //家长表 change_state_user_patriarch int batchInsertParent(List<ChangeStatePatriarch> list); //教师班级关联表 change_state_ref_teacher_class int batchInsertRefTeacher(List<ChangeStateRefTeacher> list); //机构表 change_state_org_school int batchInsertSchool(List<ChangeStateSchool> list); //校区表 change_state_org_school_type int batchInsertSchoolType(List<ChangeStateSchoolType> list); //学段表 change_state_org_class_section int batchInsertSection(List<ChangeStateSection> list); //学生表 change_state_user_student int batchInsertStudent(List<ChangeStateStudent> list); //教职工表 change_state_user_teacher int batchInsertTeacher(List<ChangeStateTeacher> list); //职位表 change_state_org_title int batchInsertTitle(List<ChangeStateTitle> list); //用户表 change_state_sys_user int batchInsertUser(List<ChangeStateUser> list); //课节表change_state_course_node int batchInsertCourseNode(List<ChangeStateCourseNode> list); //课节表change_state_course_node_init int batchInsertCourseNodeInit(List<ChangeStateCourseNodeInit> list); }
[ "1211079133@qq.com" ]
1211079133@qq.com
44928e4eeb7a0c36082c6d9a996bede52704a3b3
0e3f1ace4ca773d2190f44bacc7f718d4c4a10ca
/Web Services/src/au/edu/unimelb/plantcell/servers/nectar/signalp/SignalPServicePortType.java
38645665327874066a02b9b429c41e075ef0c7bb
[ "Apache-2.0" ]
permissive
BioKNIME/plantcell
35cf74347e4447668f17e359c2e0574f99bb6a9d
c02c7d9cbc86ee26db86047dbb46dee1e2aae20e
refs/heads/master
2021-01-19T14:28:37.099349
2014-09-03T05:25:16
2014-09-03T05:25:16
88,166,799
0
0
null
null
null
null
UTF-8
Java
false
false
3,607
java
package au.edu.unimelb.plantcell.servers.nectar.signalp; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.6 in JDK 6 * Generated source version: 2.1 * */ @WebService(name = "SignalPServicePortType", targetNamespace = "http://nectar.plantcell.unimelb.edu.au") @XmlSeeAlso({ ObjectFactory.class }) public interface SignalPServicePortType { /** * * @param fasta * @param notmCutoff * @param length * @param eukPlusNeg * @param tmCutoff * @param bestOrNotm * @return * returns java.lang.String */ @WebMethod(action = "urn:submit") @WebResult(targetNamespace = "http://nectar.plantcell.unimelb.edu.au") @RequestWrapper(localName = "submit", targetNamespace = "http://nectar.plantcell.unimelb.edu.au", className = "au.edu.unimelb.plantcell.servers.nectar.signalp.Submit") @ResponseWrapper(localName = "submitResponse", targetNamespace = "http://nectar.plantcell.unimelb.edu.au", className = "au.edu.unimelb.plantcell.servers.nectar.signalp.SubmitResponse") public String submit( @WebParam(name = "fasta", targetNamespace = "http://nectar.plantcell.unimelb.edu.au") String fasta, @WebParam(name = "tm_cutoff", targetNamespace = "http://nectar.plantcell.unimelb.edu.au") Double tmCutoff, @WebParam(name = "notm_cutoff", targetNamespace = "http://nectar.plantcell.unimelb.edu.au") Double notmCutoff, @WebParam(name = "best_or_notm", targetNamespace = "http://nectar.plantcell.unimelb.edu.au") Boolean bestOrNotm, @WebParam(name = "length", targetNamespace = "http://nectar.plantcell.unimelb.edu.au") Integer length, @WebParam(name = "euk_plus_neg", targetNamespace = "http://nectar.plantcell.unimelb.edu.au") String eukPlusNeg); /** * * @param jobId * @return * returns java.lang.String */ @WebMethod(action = "urn:getStatus") @WebResult(targetNamespace = "http://nectar.plantcell.unimelb.edu.au") @RequestWrapper(localName = "getStatus", targetNamespace = "http://nectar.plantcell.unimelb.edu.au", className = "au.edu.unimelb.plantcell.servers.nectar.signalp.GetStatus") @ResponseWrapper(localName = "getStatusResponse", targetNamespace = "http://nectar.plantcell.unimelb.edu.au", className = "au.edu.unimelb.plantcell.servers.nectar.signalp.GetStatusResponse") public String getStatus( @WebParam(name = "job_id", targetNamespace = "http://nectar.plantcell.unimelb.edu.au") String jobId); /** * * @param jobId * @return * returns java.lang.String */ @WebMethod(action = "urn:getResult") @WebResult(targetNamespace = "http://nectar.plantcell.unimelb.edu.au") @RequestWrapper(localName = "getResult", targetNamespace = "http://nectar.plantcell.unimelb.edu.au", className = "au.edu.unimelb.plantcell.servers.nectar.signalp.GetResult") @ResponseWrapper(localName = "getResultResponse", targetNamespace = "http://nectar.plantcell.unimelb.edu.au", className = "au.edu.unimelb.plantcell.servers.nectar.signalp.GetResultResponse") public String getResult( @WebParam(name = "job_id", targetNamespace = "http://nectar.plantcell.unimelb.edu.au") String jobId); }
[ "pcbrc-enquiries@unimelb.edu.au@dddfb942-a9a2-2c26-f143-85623fb4cac2" ]
pcbrc-enquiries@unimelb.edu.au@dddfb942-a9a2-2c26-f143-85623fb4cac2
448b6d0e450229b23ec19af4b7e7143acc8adc7b
d6a624c60e3bb7c2b6aff2874b35abc3191f8260
/src/main/java/org/thymeleaf/processor/element/AbstractTextChildModifierElementProcessor.java
ed7d48aded6bc80a840476d7238189e452d41b96
[ "Apache-2.0" ]
permissive
oliverlietz/thymeleaf
82e94db557225759b9cd7aea9164e7595ddf7242
bd9324f7140e19da9e8ebc131bbfcfc44e4cf890
refs/heads/2.1-master
2021-01-22T19:55:18.746249
2017-03-30T21:38:43
2017-03-30T21:38:43
29,087,551
0
0
null
2015-01-11T09:57:48
2015-01-11T09:57:48
null
UTF-8
Java
false
false
2,172
java
/* * ============================================================================= * * Copyright (c) 2011-2014, The THYMELEAF team (http://www.thymeleaf.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ============================================================================= */ package org.thymeleaf.processor.element; import java.util.Collections; import java.util.List; import org.thymeleaf.Arguments; import org.thymeleaf.dom.Element; import org.thymeleaf.dom.Node; import org.thymeleaf.dom.Text; import org.thymeleaf.processor.IElementNameProcessorMatcher; /** * * @author Daniel Fern&aacute;ndez * * @since 1.0 * */ public abstract class AbstractTextChildModifierElementProcessor extends AbstractMarkupSubstitutionElementProcessor { protected AbstractTextChildModifierElementProcessor(final String elementName) { super(elementName); } protected AbstractTextChildModifierElementProcessor(final IElementNameProcessorMatcher matcher) { super(matcher); } @Override protected List<Node> getMarkupSubstitutes(final Arguments arguments, final Element element) { final String text = getText(arguments, element); final Text newNode = new Text(text == null? "" : text); // Setting this allows avoiding text inliners processing already generated text, // which in turn avoids code injection. newNode.setProcessable(false); return Collections.singletonList((Node)newNode); } protected abstract String getText(final Arguments arguments, final Element element); }
[ "daniel.fernandez@11thlabs.org" ]
daniel.fernandez@11thlabs.org
7dcc04f213112e6dfccf32e5893f28bc48eb8f0d
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes2/vez.java
84e36d69a9a1d6da7f408f72b361ddd1da99bbe5
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
983
java
import android.view.View; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.mobileqq.statistics.ReportController; import com.tencent.mobileqq.troop.activity.NearbyTroopsBaseView.INearbyTroopContext; import com.tencent.mobileqq.troop.activity.NearbyTroopsView; import com.tencent.widget.ExpandableListView; import com.tencent.widget.ExpandableListView.OnGroupClickListener; public class vez implements ExpandableListView.OnGroupClickListener { public vez(NearbyTroopsView paramNearbyTroopsView) { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } public boolean a(ExpandableListView paramExpandableListView, View paramView, int paramInt, long paramLong) { ReportController.b(this.a.a.a(), "P_CliOper", "Grp_nearby", "", "nearbygrp_list", "Clk_poi", 0, 0, "", "", "", ""); return false; } } /* Location: E:\apk\QQ_91\classes2-dex2jar.jar!\vez.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
31ac7b70a097b6468c69c6947be32a83deb0221b
3ac03f352656c22bea29bcedd8555965342d2c7e
/Personalizarea Preferintelor/Development/CustomizePreferences/src/customize_preferences/FrameInstanceHolder.java
a85ade5296a23a7366c4a35aee74eb57222dc730
[]
no_license
voicurobert/oldProjects
eadafb89c688ff7ad2dcffa8f165db604f9b8ef2
b38e88d33b32c33a10593e472375ce54640f65df
refs/heads/master
2022-04-01T07:51:35.406791
2020-01-29T17:46:06
2020-01-29T17:46:06
237,045,502
0
0
null
null
null
null
UTF-8
Java
false
false
3,224
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package customize_preferences; /** * Class that holds all the interfaces of this application in static attributes. <br> * Attributes : <br> * - instance : attribute that stores a FrameInstanceHolder object; <br> * - clientsFrame : attribute that stores a ClientsGUI object; <br> * - providerFrame : attribute that stores a ProviderGUI object; <br> * - addClientFrame : attribute that stores a AddClientGUI object; <br> - detailClientFrame : attribute that stores a DetailClientGUI object; <br> * @author Robert */ public class FrameInstanceHolder { public static FrameInstanceHolder instance = new FrameInstanceHolder(); private ClientsGUI clientsFrame = null; private ProviderGUI providerFrame = null; private AddClientGUI addClientFrame = null; private DetailClientGUI detailClientFrame = null; private SimpleKMeansGUI simpleKMeansFrame = null; /** * Empty constructor that instantiates a new FrameInstanceHolder object; */ public FrameInstanceHolder() { } /** * Setter method. <br> * @param clientsFrame a ClientsGUI object */ public void setClientsFrame(ClientsGUI clientsFrame) { this.clientsFrame = clientsFrame; } /** * Setter method. * @param addClientFrame a addClientGUI object */ public void setAddClientFrame(AddClientGUI addClientFrame) { this.addClientFrame = addClientFrame; } /** * Setter method * @param detailClientFrame a DetailClientGUI object; */ public void setDetailClientFrame(DetailClientGUI detailClientFrame) { this.detailClientFrame = detailClientFrame; } /** * Setter method * @param providerFrame a ProviderGUI object; */ public void setProviderFrame(ProviderGUI providerFrame) { this.providerFrame = providerFrame; } /** * Getter method * @return AddClientGui object or null; */ public AddClientGUI getAddClientFrame() { return addClientFrame; } /** * Getter method. * @return ClientsGUI object or null */ public ClientsGUI getClientsFrame() { return clientsFrame; } /** * Getter method. * @return DetailClientGUI object or null */ public DetailClientGUI getDetailClientFrame() { return detailClientFrame; } /** * Getter method * @return ProviderGUI or null; */ public ProviderGUI getProviderFrame() { return providerFrame; } /** * Setter method * @param simpleKMeansFrame the SimpleKMeansGUI object */ public void setSimpleKMeansFrame(SimpleKMeansGUI simpleKMeansFrame) { this.simpleKMeansFrame = simpleKMeansFrame; } /** * Getter method * @return the SimpleKMEansFrame object */ public SimpleKMeansGUI getSimpleKMeansFrame() { return simpleKMeansFrame; } }
[ "voicu.eduardrobert@gmail.com" ]
voicu.eduardrobert@gmail.com
70834264c834b27ac86349ed746ea4e9adcd43e0
b411493854996347634cdac5e9005ec90e03d763
/main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/extra/ExtraLanguageAppendable.java
991b906043e459b4b18ebfd461e4e7cb98fafb48
[ "Apache-2.0" ]
permissive
gb96/sarl
4c64b1ed306a655407d3c90565c409211045db25
a24d15e360d0e735ae1378275656ce320506adfc
refs/heads/master
2021-05-05T19:34:34.003924
2018-01-16T16:18:23
2018-01-16T16:18:23
117,787,214
0
0
null
2018-01-17T05:11:30
2018-01-17T05:11:30
null
UTF-8
Java
false
false
3,191
java
/* * $Id$ * * SARL is an general-purpose agent programming language. * More details on http://www.sarl.io * * Copyright (C) 2014-2017 the original authors 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 io.sarl.lang.compiler.extra; import java.util.List; import org.eclipse.xtext.common.types.JvmType; import org.eclipse.xtext.xbase.compiler.AbstractStringBuilderBasedAppendable; import org.eclipse.xtext.xbase.compiler.ImportManager; /** Appendable for extra languages. * * @author $Author: sgalland$ * @version $FullVersion$ * @mavengroupid $GroupId$ * @mavenartifactid $ArtifactId$ * @since 0.6 */ public class ExtraLanguageAppendable extends AbstractStringBuilderBasedAppendable { private final ImportManager importManager; /** Constructor. */ public ExtraLanguageAppendable() { this(null); } /** Constructor. * * @param indentation the indentation string. * @param lineSeparator the line separator string. */ public ExtraLanguageAppendable(String indentation, String lineSeparator) { this(indentation, lineSeparator, null); } /** Constructor. * * @param importManager the import manager. */ public ExtraLanguageAppendable(ImportManager importManager) { super(false); ImportManager im = importManager; if (im == null) { im = new ImportManager(true); } this.importManager = im; } /** Constructor. * * @param indentation the indentation string. * @param lineSeparator the line separator string. * @param importManager the import manager. */ public ExtraLanguageAppendable(String indentation, String lineSeparator, ImportManager importManager) { super(indentation, lineSeparator, false); ImportManager im = importManager; if (im == null) { im = new ImportManager(true); } this.importManager = im; } /** Replies the line separator. * * @return the line separator. */ @Override public String getLineSeparator() { // Change the visibility of the method. return super.getLineSeparator(); } @Override protected void appendType(final JvmType type, StringBuilder builder) { getImportManager().appendType(type, builder); } @Override protected void appendType(final Class<?> type, StringBuilder builder) { getImportManager().appendType(type, builder); } /** {@inheritDoc} * @deprecated no replacement. */ @Deprecated @Override public List<String> getImports() { return getImportManager().getImports(); } /** Replies the import manager. * * @return the import manager. */ public ImportManager getImportManager() { return this.importManager; } @Override public String toString() { return super.toString().trim(); } }
[ "galland@arakhne.org" ]
galland@arakhne.org
94cfb1a808cac4ba885dc7e9a061bd13cf085961
7d22f0b5e64961bddeb6dfcfc7843c1ef719c844
/src/main/java/springboot/vehicles/service/impl/ModelServiceImpl.java
98e88a651bab83f24a57b1ffbc8ec93fee9c7296
[]
no_license
yavor300/WestCompassDealerShop
7d2c39e0e823d63b5a82743898dac6a1c751460c
a99ec622e39667de2c68af2f444ea9a12512db30
refs/heads/master
2023-02-14T20:38:43.582282
2021-01-09T10:08:58
2021-01-09T10:08:58
326,511,669
0
0
null
null
null
null
UTF-8
Java
false
false
2,152
java
package springboot.vehicles.service.impl; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import springboot.vehicles.domain.entities.Brand; import springboot.vehicles.domain.entities.Model; import springboot.vehicles.domain.models.service.BrandServiceModel; import springboot.vehicles.domain.models.service.ModelServiceModel; import springboot.vehicles.repository.BrandRepository; import springboot.vehicles.repository.ModelRepository; import springboot.vehicles.service.BrandService; import springboot.vehicles.service.ModelService; import java.time.LocalDateTime; import java.util.Set; import java.util.stream.Collectors; @Service public class ModelServiceImpl implements ModelService { private final ModelRepository modelRepository; private final BrandRepository brandRepository; private final ModelMapper modelMapper; @Autowired public ModelServiceImpl(ModelRepository modelRepository, BrandService brandService, BrandRepository brandRepository, ModelMapper modelMapper) { this.modelRepository = modelRepository; this.brandRepository = brandRepository; this.modelMapper = modelMapper; } @Override public ModelServiceModel add(ModelServiceModel modelServiceModel, String brandName) { Brand brand = brandRepository.findByName(brandName).get(); modelServiceModel.setCreated(LocalDateTime.now()); modelServiceModel.setModified(LocalDateTime.now()); Model model = modelMapper.map(modelServiceModel, Model.class); model.setBrand(brand); return modelMapper.map(modelRepository.saveAndFlush(model), ModelServiceModel.class); } @Override public Set<ModelServiceModel> getAll() { return modelRepository.findAll() .stream() .map(m -> modelMapper.map(m, ModelServiceModel.class)) .collect(Collectors.toSet()); } @Override public ModelServiceModel getByName(String name) { return modelMapper.map(modelRepository.findByName(name), ModelServiceModel.class); } }
[ "yavor300@gmail.com" ]
yavor300@gmail.com
8f02b8a5c7cc335f3ecb3ce5d6ab09cfa28aabe8
3a79a1e1a290c621a6a3c53d102a5fcbdb40ee68
/elite-service/src/main/java/com/ledao/elite/core/service/sys/impl/SysOrganServiceImpl.java
6f6e4901ecedffe86b6e2b25780a1e43cd97a00d
[]
no_license
listenbehind/elite
8509f10c4aad4615479072cd34f06c938569240e
a3967ea21449f89b819cd8031484f3bf639a49ef
refs/heads/master
2023-03-15T23:00:33.580236
2018-02-28T09:11:11
2018-02-28T09:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,028
java
package com.ledao.elite.core.service.sys.impl; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.googlecode.genericdao.search.Search; import com.googlecode.genericdao.search.SearchResult; import com.ledao.elite.core.domain.sys.SysOrgan; import com.ledao.elite.core.exception.EliteServiceException; import com.ledao.elite.core.framework.base.Pager; import com.ledao.elite.core.framework.constant.ErrorCodeEnum; import com.ledao.elite.core.framework.constant.GlobalDefinedConstant; import com.ledao.elite.core.repository.sys.SysOrganRepository; import com.ledao.elite.core.service.BaseSerivceImpl; import com.ledao.elite.core.service.sys.SysOrganService; @Service public class SysOrganServiceImpl extends BaseSerivceImpl implements SysOrganService { @Resource private SysOrganRepository sysOrganRepository; @Override public SysOrgan create(SysOrgan obj) throws EliteServiceException { this.verifyParams(obj); int order=this.sysOrganRepository.querySysOrganMaxOrders(); obj.setStatus(GlobalDefinedConstant.System_Status.normal.name()); obj.setOrders(order); this.sysOrganRepository.save(obj); return obj; } @Override public SearchResult<SysOrgan> findSysOrganList(String name, String status, Long parentId, Long areaId, Pager pager) throws EliteServiceException { return this.sysOrganRepository.fuzzySearchSysOrgans(name, status, parentId, areaId, pager); } @Override public SysOrgan removeLogicById(Long id) throws EliteServiceException { this.verifyParams(id); SysOrgan obj = this.sysOrganRepository.find(id); if (obj == null) throw new EliteServiceException("单位信息不存在", ErrorCodeEnum.OBJECT_NOT_EXIST.code); obj.setStatus(GlobalDefinedConstant.System_Status.deleted.name()); return this.sysOrganRepository.save(obj) ? obj : null; } @Override public SysOrgan findSysOrganById(Long organId) throws EliteServiceException { this.verifyParams(organId); return this.sysOrganRepository.find(organId); } @Override public SysOrgan updateSysOrgan(long id, SysOrgan sysOrgan) throws EliteServiceException { this.verifyParams(sysOrgan); SysOrgan obj = this.sysOrganRepository.find(id); if (obj == null) throw new EliteServiceException("单位信息不存在", ErrorCodeEnum.OBJECT_NOT_EXIST.code); obj.setName(sysOrgan.getName()); obj.setIntro(sysOrgan.getIntro()); this.sysOrganRepository.save(obj); return obj; } @Override public List<SysOrgan> findSysOrganAll() throws EliteServiceException { Search search = new Search(); search.addFilterEqual("status", GlobalDefinedConstant.System_Status.normal.name()); search.addSort("orders", false); return this.sysOrganRepository.search(search); } @Override public SysOrgan findSysOrganByIdAndName(Long id, String name) throws EliteServiceException { Search search = new Search(); search.addFilterEqual("id", id); search.addFilterEqual("name", name); return this.sysOrganRepository.searchUnique(search); } }
[ "liuyuan_kobe@163.com" ]
liuyuan_kobe@163.com
d93c7388b88849663c05749418be917013f6c21e
6617a7091490a0f600de9a21a7748d0d2de3e2d3
/search/src/test/java/org/cucina/search/HasAttachmentsProjectionProviderTest.java
532a7c3a219c1432d60e7a159100a1c1d4796fdc
[ "Apache-2.0" ]
permissive
cucina/opencucina
f80ee908eb9d7138493b9f720aefe9270ad1a3c4
ac683668bf7b2fa6c31491c6eafbfb5c95b651eb
refs/heads/master
2021-05-15T02:00:45.714499
2018-03-09T06:37:41
2018-03-09T06:37:43
30,875,325
1
0
null
null
null
null
UTF-8
Java
false
false
938
java
package org.cucina.search; import org.cucina.search.query.SearchBean; import org.cucina.search.testassist.Foo; import org.junit.Test; import java.util.LinkedHashMap; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; /** * JAVADOC for Class Level * * @author $Author: $ * @version $Revision: $ */ public class HasAttachmentsProjectionProviderTest { /** * JAVADOC Method Level Comments */ @Test public void testProvide() { HasAttachmentsProjectionProvider provider = new HasAttachmentsProjectionProvider(); LinkedHashMap<String, String> aliasByType = new LinkedHashMap<String, String>(); aliasByType.put(Foo.TYPE, "foo"); SearchBean bean = new SearchBean(); bean.setAliasByType(aliasByType); provider.provide(Foo.TYPE, bean); assertEquals("Incorrect number projections", 1, bean.getProjections().size()); assertNotNull(bean.getProjection("hasAttachments")); } }
[ "viktor.levine@gmail.com" ]
viktor.levine@gmail.com
5c74031b6c74806dcd14e83228adc4a83700f7c1
9f2c80833b9e72636a747884ddd562cb728a7a2b
/app/src/main/java/bc/yxdc/com/ui/fragment/CouponMineFragment.java
b2542f1716e0795d2f0f65e66a398e41379a5a13
[]
no_license
gamekonglee/txdc
1bfa8b216123334f6dd0da39d4493964872d0453
8daca524021597a7035c6d3d2cff64939a5d90b4
refs/heads/master
2020-06-27T00:09:54.703830
2019-11-12T01:51:23
2019-11-12T01:51:23
199,793,938
0
0
null
null
null
null
UTF-8
Java
false
false
7,965
java
package bc.yxdc.com.ui.fragment; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import com.google.gson.Gson; import java.io.IOException; import java.util.ArrayList; import java.util.List; import app.txdc.shop.R; import bc.yxdc.com.adapter.BaseAdapterHelper; import bc.yxdc.com.adapter.QuickAdapter; import bc.yxdc.com.base.BaseFragment; import bc.yxdc.com.bean.CouponMineBean; import bc.yxdc.com.constant.Constance; import bc.yxdc.com.net.OkHttpUtils; import bc.yxdc.com.ui.activity.goods.SelectGoodsActivity; import bc.yxdc.com.ui.activity.user.LoginActivity; import bc.yxdc.com.utils.DateUtils; import bc.yxdc.com.utils.LogUtils; import bc.yxdc.com.utils.MyShare; import bc.yxdc.com.utils.MyToast; import bc.yxdc.com.view.TextViewPlus; import bocang.json.JSONArray; import bocang.json.JSONObject; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Response; /** * Created by gamekonglee on 2018/10/29. */ public class CouponMineFragment extends BaseFragment implements View.OnClickListener { private static final int TYPE_GET_COUPON = 2; private static final int TYPE_LIST = 0; private TextViewPlus tv_never_use; private TextViewPlus tv_has_use; private TextViewPlus tv_has_pass; private ListView lv_mine; private int p; private int type; private int store_id; private QuickAdapter<CouponMineBean> adapter; private List<CouponMineBean> couponMineBeans; private int currentP; private int current; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.frag_coupon_min,null); } @Override public void initUI() { tv_never_use = getView().findViewById(R.id.tv_never_use); tv_has_use = getView().findViewById(R.id.tv_has_use); tv_has_pass = getView().findViewById(R.id.tv_has_pass); lv_mine = getView().findViewById(R.id.lv_mine_coupons); tv_never_use.setOnClickListener(this); tv_has_use.setOnClickListener(this); tv_has_pass.setOnClickListener(this); p = 1; type = 0; store_id = 0; couponMineBeans = new ArrayList<>(); adapter = new QuickAdapter<CouponMineBean>(getActivity(),R.layout.item_counpon_mine) { @Override protected void convert(final BaseAdapterHelper helper, CouponMineBean item) { helper.setText(R.id.tv_money,item.getMoney()+""); helper.setText(R.id.tv_limit,"满"+item.getCondition()+"可用"); helper.setText(R.id.tv_name,item.getName()); helper.setText(R.id.tv_time, DateUtils.getStrTime02(item.getUse_start_time()+"")+"-"+DateUtils.getStrTime02(item.getUse_end_time()+"")); helper.setBackgroundRes(R.id.ll_bg,item.getStatus()==0?R.mipmap.content_wsy_left:R.mipmap.content_ygq_left); helper.setVisible(R.id.tv_use_now,item.getStatus()==0?true:false); helper.setOnClickListener(R.id.tv_use_now, new View.OnClickListener() { @Override public void onClick(View v) { current = helper.getPosition(); if(current==0){ startActivity(new Intent(getActivity(), SelectGoodsActivity.class)); getActivity().finish(); } // misson(TYPE_GET_COUPON, new Callback() { // @Override // public void onFailure(Call call, IOException e) { // // } // // @Override // public void onResponse(Call call, Response response) throws IOException { // // } // }); } }); } }; lv_mine.setAdapter(adapter); load(); } private void load() { misson(TYPE_LIST, new Callback() { @Override public void onFailure(Call call, IOException e) { } @Override public void onResponse(Call call, Response response) throws IOException { JSONObject res=new JSONObject(response.body().string()); if(res.getInt(Constance.status)==1){ LogUtils.logE("mine.",res.toString()); JSONArray array=res.getJSONArray(Constance.result); if(array!=null&&array.length()>0){ for(int i=0;i<array.length();i++){ couponMineBeans.add(new Gson().fromJson(array.getJSONObject(i).toString(),CouponMineBean.class)); } } getActivity().runOnUiThread(new Runnable() { @Override public void run() { adapter.replaceAll(couponMineBeans); } }); } } }); } @Override public void getData(int types, Callback callback) { String token= MyShare.get(getActivity()).getString(Constance.token); String user_id=MyShare.get(getActivity()).getString(Constance.user_id); if(TextUtils.isEmpty(token)||TextUtils.isEmpty(user_id)){ MyToast.show(getActivity(),"请先登录"); startActivity(new Intent(getActivity(), LoginActivity.class)); return; } if(types==TYPE_LIST){ OkHttpUtils.getCouponMineList(user_id,token,p,type,store_id,callback); }else if(types==TYPE_GET_COUPON){ // OkHttpUtils.getCoupon(couponMineBeans.get(current).getId(),callback); } } @Override protected void initData() { } @Override public void onClick(View v) { switch (v.getId()){ case R.id.tv_never_use: currentP = 0; break; case R.id.tv_has_use: currentP=1; break; case R.id.tv_has_pass: currentP=2; break; } refreshUI(); } private void refreshUI() { tv_never_use.setTextColor(getResources().getColor(R.color.tv_333333)); tv_has_pass.setTextColor(getResources().getColor(R.color.tv_333333)); tv_has_use.setTextColor(getResources().getColor(R.color.tv_333333)); Drawable drawable=getResources().getDrawable(R.drawable.bg_line); drawable.setBounds(0,0, drawable.getMinimumWidth(),drawable.getMinimumHeight()); tv_never_use.setCompoundDrawables(null,null,null,null); tv_has_use.setCompoundDrawables(null,null,null,null); tv_has_pass.setCompoundDrawables(null,null,null,null); switch (currentP){ case 0: tv_never_use.setTextColor(getResources().getColor(R.color.theme_red)); tv_never_use.setCompoundDrawables(null,null,null,drawable); break; case 1: tv_has_use.setTextColor(getResources().getColor(R.color.theme_red)); tv_has_use.setCompoundDrawables(null,null,null,drawable); break; case 2: tv_has_pass.setTextColor(getResources().getColor(R.color.theme_red)); tv_has_pass.setCompoundDrawables(null,null,null,drawable); break; } type=currentP; couponMineBeans=new ArrayList<>(); load(); } }
[ "451519474@qq.com" ]
451519474@qq.com
3ac4386ab84f5c5c2700b17b0d42eb63fd0dd0fb
4c051311b5ece6ff8991017e5f24c6ffdaf949fc
/src/main/java/com/wk/p3/greenmall/modules/oa/entity/OaNotifyRecord.java
1ec58e1620513f22783296f58ddb5d94a44a013f
[]
no_license
zhp834158133/GreenMall
d956993ebb02c41a9fd052cfcbad4fc4116232dc
073fd0d04ce49ea1e15bfcbec3d8c02b2d5c1a3e
refs/heads/master
2021-01-10T01:47:52.916159
2018-10-18T01:31:42
2018-10-18T01:31:42
52,052,982
1
0
null
null
null
null
UTF-8
Java
false
false
1,591
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.wk.p3.greenmall.modules.oa.entity; import org.hibernate.validator.constraints.Length; import com.wk.p3.greenmall.modules.sys.entity.User; import java.util.Date; import com.wk.p3.greenmall.common.persistence.DataEntity; /** * 通知通告记录Entity * @author ThinkGem * @version 2014-05-16 */ public class OaNotifyRecord extends DataEntity<OaNotifyRecord> { private static final long serialVersionUID = 1L; private OaNotify oaNotify; // 通知通告ID private User user; // 接受人 private String readFlag; // 阅读标记(0:未读;1:已读) private Date readDate; // 阅读时间 public OaNotifyRecord() { super(); } public OaNotifyRecord(String id){ super(id); } public OaNotifyRecord(OaNotify oaNotify){ this.oaNotify = oaNotify; } public OaNotify getOaNotify() { return oaNotify; } public void setOaNotify(OaNotify oaNotify) { this.oaNotify = oaNotify; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } @Length(min=0, max=1, message="阅读标记(0:未读;1:已读)长度必须介于 0 和 1 之间") public String getReadFlag() { return readFlag; } public void setReadFlag(String readFlag) { this.readFlag = readFlag; } public Date getReadDate() { return readDate; } public void setReadDate(Date readDate) { this.readDate = readDate; } }
[ "yefengmengluo@163.com" ]
yefengmengluo@163.com
1e30ae329388384ed8fcf8018e342035f87089ce
55889712a9adf03489f4b6402a48c1a854d70321
/ignite_pos_mm_v1_update_sv_sh_notify/src/com/ignite/pos/model/Credit.java
3dd9f36f06b79c796d2b5cd0fc7130fc0d56c8b1
[]
no_license
ignitemyanmar/POSAndroid
7b346b5a62a00d0db576cc739776ea80dd876a8f
9614177e73fe019d42afc283ed23877fccf8ab75
refs/heads/master
2021-05-01T09:30:56.967489
2015-06-08T04:30:23
2015-06-08T04:30:23
27,748,660
1
0
null
null
null
null
UTF-8
Java
false
false
1,424
java
package com.ignite.pos.model; public class Credit { private String creditCusName; private String creditDate; private String creditTotal; private String creditPayAmt; private String creditLeftToPayAmt; public Credit() { super(); // TODO Auto-generated constructor stub } public Credit(String creditCusName, String creditDate, String creditTotal, String creditPayAmt, String creditLeftToPayAmt) { super(); this.setCreditCusName(creditCusName); this.setCreditDate(creditDate); this.setCreditTotal(creditTotal); this.setCreditPayAmt(creditPayAmt); this.setCreditLeftToPayAmt(creditLeftToPayAmt); } public String getCreditCusName() { return creditCusName; } public void setCreditCusName(String creditCusName) { this.creditCusName = creditCusName; } public String getCreditDate() { return creditDate; } public void setCreditDate(String creditDate) { this.creditDate = creditDate; } public String getCreditTotal() { return creditTotal; } public void setCreditTotal(String creditTotal) { this.creditTotal = creditTotal; } public String getCreditPayAmt() { return creditPayAmt; } public void setCreditPayAmt(String creditPayAmt) { this.creditPayAmt = creditPayAmt; } public String getCreditLeftToPayAmt() { return creditLeftToPayAmt; } public void setCreditLeftToPayAmt(String creditLeftToPayAmt) { this.creditLeftToPayAmt = creditLeftToPayAmt; } }
[ "suwaiphyo1985@gmail.com" ]
suwaiphyo1985@gmail.com
e24f892b2aa9174475f399f0c59fcfd3b8d57059
65bdd0b55ac61030d6149e46b80bf447d178c2c9
/src/main/java/com/joker/wms/webapp/action/TbCarePeopleAction.java
e1e09668d6b178a4f4533e6a8931f69a720a1412
[]
no_license
JokerQZhang/wms
0c2720d67819f456355db811b210143f0c9f8cda
4a5e796078d595315fcc8803465e8d0741f5c8cf
refs/heads/master
2020-04-03T00:13:22.926245
2016-07-25T13:01:40
2016-07-25T13:01:40
60,617,013
0
0
null
null
null
null
UTF-8
Java
false
false
6,170
java
package com.joker.wms.webapp.action; import com.opensymphony.xwork2.Preparable; import com.joker.wms.service.EnumerationManager; import com.joker.wms.service.PartyGroupManager; import com.joker.wms.service.TbCarePeopleManager; import com.joker.wms.dao.SearchException; import com.joker.wms.model.TbCarePeople; import com.joker.wms.model.TbPeopleCare; import com.joker.wms.webapp.action.BaseAction; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; public class TbCarePeopleAction extends BaseAction implements Preparable { private TbCarePeopleManager tbCarePeopleManager; private List tbCarePeoples; private TbCarePeople tbCarePeople; private Long peopleId; private String query; private PartyGroupManager partyGroupManager; private EnumerationManager enumerationManager; private String selectedPeopleId; public String getSelectedPeopleId() { return selectedPeopleId; } public void setSelectedPeopleId(String selectedPeopleId) { this.selectedPeopleId = selectedPeopleId; } public void setEnumerationManager(EnumerationManager enumerationManager) { this.enumerationManager = enumerationManager; } public void setPartyGroupManager(PartyGroupManager partyGroupManager) { this.partyGroupManager = partyGroupManager; } public void setTbCarePeopleManager(TbCarePeopleManager tbCarePeopleManager) { this.tbCarePeopleManager = tbCarePeopleManager; } public List getTbCarePeoples() { return tbCarePeoples; } /** * Grab the entity from the database before populating with request parameters */ public void prepare() { if (getRequest().getMethod().equalsIgnoreCase("post")) { // prevent failures on new String tbCarePeopleId = getRequest().getParameter("tbCarePeople.peopleId"); if (tbCarePeopleId != null && !tbCarePeopleId.equals("")) { tbCarePeople = tbCarePeopleManager.get(new Long(tbCarePeopleId)); } } } public void setQ(String q) { this.query = q; } public String list() { try { Map condition = new HashMap(); tbCarePeoples = tbCarePeopleManager.search(condition, TbCarePeople.class, getPage()); } catch (SearchException se) { addActionError(se.getMessage()); tbCarePeoples = tbCarePeopleManager.getAll(getPage()); } if(query != null){ getRequest().setAttribute("showForm", "showData"); } return SUCCESS; } public void setPeopleId(Long peopleId) { this.peopleId = peopleId; } public TbCarePeople getTbCarePeople() { return tbCarePeople; } public void setTbCarePeople(TbCarePeople tbCarePeople) { this.tbCarePeople = tbCarePeople; } public String delete() { tbCarePeopleManager.remove(tbCarePeople.getPeopleId()); saveMessage(getText("tbCarePeople.deleted")); return SUCCESS; } public String edit() { Map<String,String> conditon = new HashMap<String,String>(); conditon.put("searchType", "partyGroupTree");//查询树形结构 conditon.put("parentId", "1"); conditon.put("partyRelationshipTypeId", "1"); List pgList = partyGroupManager.searchByCondition(conditon); if (peopleId != null) { tbCarePeople = tbCarePeopleManager.get(peopleId); } else { tbCarePeople = new TbCarePeople(); } getRequest().setAttribute("pgList", pgList); return SUCCESS; } public String save() throws Exception { if (cancel != null) { super.setJsonResult("取消保存"); return "jsonResult"; } if (delete != null) { tbCarePeopleManager.remove(tbCarePeople.getPeopleId()); super.setJsonResult("删除成功"); return "jsonResult"; } boolean isNew = (tbCarePeople.getPeopleId() == null); tbCarePeople = tbCarePeopleManager.save(tbCarePeople); String key = (isNew) ? "tbCarePeople.added" : "tbCarePeople.updated"; saveMessage(getText(key)); super.setJsonResult("保存成功"); return "jsonResult"; } /** * 设置前端的 民政优抚select类型 */ public void setYFTypes(){ List yftypes = enumerationManager.getYFTypes(); super.getRequest().setAttribute("yftypes", yftypes); } public String mzyfset(){ //setYFTypes(); return SUCCESS; } public String addPeopleYFType(){ setYFTypes(); String selectedPeopleName = getRequest().getParameter("selectedPeopleName"); getRequest().setAttribute("selectedPeopleName", selectedPeopleName); return SUCCESS; } public String peopleYFTypes(){ //查找给定的人员的优抚类型 if(selectedPeopleId!=null && !"".equals(selectedPeopleId)){ List peopleYFTypeList = tbCarePeopleManager.getYFTypeByPeopleId(selectedPeopleId); getRequest().setAttribute("peopleYFTypeList", peopleYFTypeList); } return SUCCESS; } public String savePeopleYFType(){ String careId = getRequest().getParameter("careId"); if(delete!=null && careId!=null && !"".equals(careId)){ //执行删除操作 TbPeopleCare tbPeopleCare = new TbPeopleCare(); tbPeopleCare.setCareId(Long.valueOf(careId)); tbCarePeopleManager.deleteObject(tbPeopleCare); } //保存成操作 String yfTypeId = getRequest().getParameter("yfTypeId"); if(selectedPeopleId!=null && !"".equals(selectedPeopleId) && yfTypeId!=null && !"".equals(yfTypeId)){ TbPeopleCare tbPeopleCare = new TbPeopleCare(); tbPeopleCare.setEnumId(Long.valueOf(yfTypeId)); tbPeopleCare.setPeopleId(Long.valueOf(selectedPeopleId)); tbPeopleCare.setCreatedTime(new Date()); tbPeopleCare.setCreatedByUser(getCurrentUser().getId()); try{ tbCarePeopleManager.saveObject(tbPeopleCare); }catch(Exception e){ e.printStackTrace(); } } super.setJsonResult("保存成功"); return "jsonResult"; } }
[ "383913397@qq.com" ]
383913397@qq.com
dc171bb5ea832f1b1cfa1404afffccb9e9523c57
98e5b3aec60935f6768cb4e2a24b21da0b528b6d
/collector/src/main/java/com/waben/stock/collector/service/DomainService.java
238d91498d6e13524a86be47ed90461a4e67a20c
[]
no_license
sunliang123/zhongbei-zhonghang-zhongzi-yidian
3eb95a77658d7ad9de1cdf9c3f85714ee007a871
54fed94b9784f5e392b4b9517cb5fe19c1b34443
refs/heads/master
2020-03-29T05:26:02.515289
2018-09-20T09:11:48
2018-09-20T09:11:48
149,582,090
1
5
null
null
null
null
UTF-8
Java
false
false
1,331
java
package com.waben.stock.collector.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.waben.stock.collector.dao.DomainDao; import com.waben.stock.collector.entity.Domain; /** * 应用 Service * * @author luomengan * */ @Service public class DomainService { @Autowired private DomainDao domainDao; public Domain getDomainInfo(Long id) { return domainDao.retrieveDomainById(id); } @Transactional public Domain addDomain(Domain domain) { return domainDao.createDomain(domain); } @Transactional public Domain modifyDomain(Domain domain) { return domainDao.updateDomain(domain); } @Transactional public void deleteDomain(Long id) { domainDao.deleteDomainById(id); } @Transactional public void deleteDomains(String ids) { if(ids != null) { String[] idArr= ids.split(","); for(String id : idArr) { if(!"".equals(id.trim())) { domainDao.deleteDomainById(Long.parseLong(id.trim())); } } } } public Page<Domain> domains(int page, int limit) { return domainDao.pageDomain(page, limit); } public List<Domain> list() { return domainDao.listDomain(); } }
[ "sunliang_s666@163.com" ]
sunliang_s666@163.com
ff8e5d33b8286d1fe70dd66d587c182de92dab8e
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/com/tencent/mm/ui/tools/MMGestureGallery$k.java
96542ccf28341f8b617798c42bfee8dedf83dc51
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,442
java
package com.tencent.mm.ui.tools; import android.os.Message; import com.tencent.mm.sdk.platformtools.ac; import com.tencent.mm.sdk.platformtools.v; import java.lang.ref.WeakReference; public final class MMGestureGallery$k extends ac { boolean lXv; WeakReference<MMGestureGallery> lhD; private long lhE; public MMGestureGallery$k(WeakReference<MMGestureGallery> paramWeakReference) { lhD = paramWeakReference; } public final void c(int paramInt, long paramLong1, long paramLong2) { lhE = paramLong2; sendEmptyMessageDelayed(paramInt, paramLong1); } public final void handleMessage(Message paramMessage) { super.handleMessage(paramMessage); removeMessages(what); final MMGestureGallery localMMGestureGallery; if (lhD != null) { localMMGestureGallery = (MMGestureGallery)lhD.get(); if (localMMGestureGallery != null) { if (what != 0) { break label95; } if ((MMGestureGallery.j(localMMGestureGallery) == 1) || (lXv)) { v.d("MicroMsg.MMGestureGallery", "single click over!"); if (MMGestureGallery.g(localMMGestureGallery) != null) { MMGestureGallery.c(localMMGestureGallery).post(new Runnable() { public final void run() { MMGestureGallery.g(localMMGestureGallery).YB(); } }); } } MMGestureGallery.a(localMMGestureGallery, 0); } } label95: do { return; if (what == 1) { if ((MMGestureGallery.I(localMMGestureGallery) != null) && (!MMGestureGallery.I(localMMGestureGallery).aUi())) { MMGestureGallery.I(localMMGestureGallery).play(); sendEmptyMessageDelayed(what, lhE); return; } MMGestureGallery.J(localMMGestureGallery); return; } removeMessages(2); } while (MMGestureGallery.K(localMMGestureGallery) == null); MMGestureGallery.c(localMMGestureGallery).post(new Runnable() { public final void run() { MMGestureGallery.K(localMMGestureGallery).akd(); } }); } public final void release() { removeMessages(0); removeMessages(1); removeMessages(2); } } /* Location: * Qualified Name: com.tencent.mm.ui.tools.MMGestureGallery.k * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
74b22c7d986d28b745bc68ea288eb7189f31a8cc
df134b422960de6fb179f36ca97ab574b0f1d69f
/org/apache/logging/log4j/core/layout/Encoder.java
48e8eb775d35beccae237d9f3226f24e118345b8
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
368
java
package org.apache.logging.log4j.core.layout; public interface Encoder<T> { void encode(T paramT, ByteBufferDestination paramByteBufferDestination); } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\org\apache\logging\log4j\core\layout\Encoder.class * Java compiler version: 7 (51.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
cb1867a0a3847f1985df19a52a4e77b2c83b06f9
ba48e5dc43badfa82a423a6dc4c6957faa0ceff0
/module_mine/src/main/java/com/xingshi/update_password/UpdatePasswordPresenter.java
04fa98c5bc90b16e5e5cb1bab85903ec447c089b
[]
no_license
sengeiou/wangyihai
048d6a880297c6605bde0bbc26857ef60463b3ac
5b21bb6b04015bfb2811b843a417d9b22fe836cb
refs/heads/master
2022-07-19T11:49:37.255494
2020-05-23T10:42:43
2020-05-23T10:42:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,870
java
package com.xingshi.update_password; import android.app.Activity; import android.content.Context; import android.widget.Toast; import com.alibaba.fastjson.JSON; import com.xingshi.bean.UserInfoBean; import com.xingshi.common.CommonResource; import com.xingshi.module_mine.R; import com.xingshi.mvp.BasePresenter; import com.xingshi.net.OnDataListener; import com.xingshi.net.OnMyCallBack; import com.xingshi.net.RetrofitUtil; import com.xingshi.utils.LogUtil; import com.xingshi.utils.MapUtil; import com.xingshi.utils.SPUtil; import java.util.Map; import io.reactivex.Observable; public class UpdatePasswordPresenter extends BasePresenter<UpdatePasswordView> { public UpdatePasswordPresenter(Context context) { super(context); } @Override protected void onViewDestroy() { } public void commit(String old, String first, String second, UserInfoBean bean) { if ("".equals(first) || "".equals(second)) { Toast.makeText(mContext, mContext.getResources().getString(R.string.password_cannot_empty), Toast.LENGTH_SHORT).show(); } else if (!first.equals(second)) { Toast.makeText(mContext, mContext.getResources().getString(R.string.password_no_same), Toast.LENGTH_SHORT).show(); } else if (first.length() < 6 || first.length() > 20) { Toast.makeText(mContext, "请输入6-20位字符", Toast.LENGTH_SHORT).show(); } else { if (bean.getPassword() == null || "".equals(bean.getPassword())) { bean.setPassword(first); bean.setNewPassword(second); String s = JSON.toJSONString(bean); Map map = MapUtil.getInstance().addParms("memberStr", s).build(); Observable observable = RetrofitUtil.getInstance().getApi(CommonResource.BASEURL_4001).postHead(CommonResource.REVISEPASSWORD, map, SPUtil.getToken()); RetrofitUtil.getInstance().toSubscribe(observable, new OnMyCallBack(new OnDataListener() { @Override public void onSuccess(String result, String msg) { LogUtil.e("修改密码:" + result); Toast.makeText(mContext, "修改成功", Toast.LENGTH_SHORT).show(); ((Activity) mContext).finish(); } @Override public void onError(String errorCode, String errorMsg) { LogUtil.e(errorCode + "------" + errorMsg); Toast.makeText(mContext, errorMsg, Toast.LENGTH_SHORT).show(); } })); } else { bean.setOldPassword(old); bean.setPassword(first); bean.setNewPassword(second); String s = JSON.toJSONString(bean); Map map = MapUtil.getInstance().addParms("memberStr", s).build(); Observable observable = RetrofitUtil.getInstance().getApi(CommonResource.BASEURL_4001).postHead(CommonResource.REVISEPASSWORD, map, SPUtil.getToken()); RetrofitUtil.getInstance().toSubscribe(observable, new OnMyCallBack(new OnDataListener() { @Override public void onSuccess(String result, String msg) { LogUtil.e("修改密码:" + result); Toast.makeText(mContext, "修改成功", Toast.LENGTH_SHORT).show(); ((Activity) mContext).finish(); } @Override public void onError(String errorCode, String errorMsg) { LogUtil.e(errorCode + "------" + errorMsg); Toast.makeText(mContext, errorMsg, Toast.LENGTH_SHORT).show(); } })); } } } }
[ "ellliot_zhang_z@163.com" ]
ellliot_zhang_z@163.com
bea770906585157aeac670093b9bd6da994b3b62
4b56bef1fd2b5834eb822b47b15159c67e11d30c
/src/test/java/com/jnape/palatable/lambda/functions/builtin/fn2/SlideTest.java
258e221b00d6794602e7e028d185cb05bb879008
[ "MIT" ]
permissive
palatable/lambda
ad204ef4ef4eefabf0be6ce18e1ea3692db99242
d360ae809f27670219523e8819b4c0e65a36dd94
refs/heads/master
2023-06-15T17:25:41.788833
2023-05-01T02:10:48
2023-05-01T02:10:48
16,262,958
923
109
MIT
2023-05-01T22:12:47
2014-01-26T22:09:10
Java
UTF-8
Java
false
false
2,240
java
package com.jnape.palatable.lambda.functions.builtin.fn2; import com.jnape.palatable.lambda.functions.Fn1; import com.jnape.palatable.traitor.annotations.TestTraits; import com.jnape.palatable.traitor.runners.Traits; import org.junit.Test; import org.junit.runner.RunWith; import testsupport.traits.EmptyIterableSupport; import testsupport.traits.FiniteIteration; import testsupport.traits.ImmutableIteration; import testsupport.traits.InfiniteIterableSupport; import testsupport.traits.Laziness; import static com.jnape.palatable.lambda.functions.builtin.fn2.Drop.drop; import static com.jnape.palatable.lambda.functions.builtin.fn2.Iterate.iterate; import static com.jnape.palatable.lambda.functions.builtin.fn2.Slide.slide; import static com.jnape.palatable.lambda.functions.builtin.fn2.Take.take; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static org.junit.Assert.assertThat; import static testsupport.matchers.IterableMatcher.isEmpty; import static testsupport.matchers.IterableMatcher.iterates; @RunWith(Traits.class) public class SlideTest { @TestTraits({ImmutableIteration.class, EmptyIterableSupport.class, FiniteIteration.class, InfiniteIterableSupport.class, Laziness.class}) public Fn1<Iterable<Object>, Iterable<Iterable<Object>>> testSubject() { return slide(2); } @Test public void slidesAcrossIterable() { assertThat(slide(1, asList(1, 2, 3)), iterates(singletonList(1), singletonList(2), singletonList(3))); assertThat(slide(2, asList(1, 2, 3)), iterates(asList(1, 2), asList(2, 3))); assertThat(slide(3, asList(1, 2, 3)), iterates(asList(1, 2, 3))); assertThat(slide(4, asList(1, 2, 3)), isEmpty()); } @Test(expected = IllegalArgumentException.class) public void kMustBeGreaterThan0() { slide(0, emptyList()); } @Test public void stackSafety() { int stackBlowingNumber = 50_000; Iterable<Iterable<Integer>> xss = slide(2, take(stackBlowingNumber, iterate(x -> x + 1, 1))); assertThat(drop(stackBlowingNumber - 2, xss), iterates(asList(49999, 50000))); } }
[ "jnape09@gmail.com" ]
jnape09@gmail.com
3547ae7f95cd387aaba96146d5f21862a0e50fcf
028cbe18b4e5c347f664c592cbc7f56729b74060
/external/modules/ant/1.6.5/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadServlet.java
f72857456d6845220dc7246ce06efc7a42a7f2ca
[ "Apache-1.1", "Apache-2.0", "BSD-2-Clause", "SAX-PD", "LicenseRef-scancode-unknown-license-reference", "W3C-19980720", "W3C" ]
permissive
dmatej/Glassfish-SVN-Patched
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
269e29ba90db6d9c38271f7acd2affcacf2416f1
refs/heads/master
2021-05-28T12:55:06.267463
2014-11-11T04:21:44
2014-11-11T04:21:44
23,610,469
1
0
null
null
null
null
UTF-8
Java
false
false
2,234
java
/* * Copyright 2001-2002,2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.tools.ant.taskdefs.optional.ide; import java.util.Vector; /** * A Remote Access to Tools Servlet to load a Project * from the Repository into the Workbench. The following * table describes the servlet parameters. * * <table> * <tr> * <td>Parameter</td> * <td>Description</td> * </tr> * <tr> * <td>project</td> * <td>The name of the Project you want to load into * the Workbench.</td> * </tr> * <tr> * <td>version</td> * <td>The version of the package you want to load into * the Workbench.</td> * </tr> * </table> * */ public class VAJLoadServlet extends VAJToolsServlet { // constants for servlet param names /** * the version param string */ public static final String VERSION_PARAM = "version"; /** * Respond to a request to load a project from the Repository * into the Workbench. */ protected void executeRequest() { String[] projectNames = getParamValues(PROJECT_NAME_PARAM); String[] versionNames = getParamValues(VERSION_PARAM); Vector projectDescriptions = new Vector(projectNames.length); for (int i = 0; i < projectNames.length && i < versionNames.length; i++) { VAJProjectDescription desc = new VAJProjectDescription(); desc.setName(projectNames[i]); desc.setVersion(versionNames[i]); projectDescriptions.addElement(desc); } util.loadProjects(projectDescriptions); } }
[ "snajper@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5" ]
snajper@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
b395b55b3a1ab7da6660bfe54e721d2e75a298b2
97c2cfd517cdf2a348a3fcb73e9687003f472201
/workspace/activemq-monitor/tags/activemq-monitor-1.1.1/src/main/java/activemq/ConnectionTask.java
f1e1b2c11f7d881bea116c631c9daaec1cef9fd8
[]
no_license
rsheftel/ratel
b1179fcc1ca55255d7b511a870a2b0b05b04b1a0
e1876f976c3e26012a5f39707275d52d77f329b8
refs/heads/master
2016-09-05T21:34:45.510667
2015-05-12T03:51:05
2015-05-12T03:51:05
32,461,975
0
0
null
null
null
null
UTF-8
Java
false
false
4,963
java
package activemq; import static activemq.ConnectionEventType.Connected; import static activemq.ConnectionEventType.Disconnected; import static activemq.ConnectionEventType.Stopped; import javax.jms.Connection; import javax.jms.ExceptionListener; import javax.jms.JMSException; import javax.jms.Session; import org.apache.activemq.ActiveMQConnectionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import util.AbstractObservable; import util.IObserver; /** * Create connections to ActiveMQ brokers * */ public class ConnectionTask extends AbstractObservable<IObserver<ConnectionEvent>, ConnectionEvent> implements Runnable, ExceptionListener { final Logger log = LoggerFactory.getLogger(this.getClass()); private String brokerUrl; private long statusCheckInterval; private long reconnectInterval; private boolean running; private long lastReconnectAttempt; private final Object lockObject; public long getLastConnectTime() { return lastConnectTime; } private long lastConnectTime; private Connection connection; private Session session; public ConnectionTask(String brokerUrl, Object lockObject) { this.lockObject = lockObject; this.brokerUrl = brokerUrl; this.statusCheckInterval = 10 * 1000l; this.reconnectInterval = 10 * 1000l; this.running = true; } public ConnectionTask(String brokerUrl) { this(brokerUrl, brokerUrl); } public long getReconnectInterval() { return reconnectInterval; } public boolean isConnected() { synchronized (lockObject) { return session != null; } } public Session getSession() { synchronized (lockObject) { return session; } } void connectAsTask() { Thread thread = new Thread(this); thread.start(); } void connect() { synchronized (lockObject) { lastReconnectAttempt = System.currentTimeMillis(); log.info("Attempting to connect"); try { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(brokerUrl); connection = factory.createConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); connection.setExceptionListener(this); connection.start(); lastConnectTime = System.currentTimeMillis(); log.info("Connected to broker"); setChanged(); notifyObservers(new ConnectionEvent(Connected, "Connected to broker")); lockObject.notifyAll(); } catch (JMSException e) { // ensure our locals are null log.error("Unable to connection to JMS broker " + brokerUrl, e); connection = null; session = null; } } } private boolean shouldReconnect() { return (!isConnected() && isTimeForReconnect()); } private boolean isTimeForReconnect() { boolean tmpCompare = lastReconnectAttempt + reconnectInterval < System.currentTimeMillis(); return tmpCompare; } private void sleep(long interval) { try { Thread.sleep(interval); } catch (InterruptedException e) { // We don't care if we are interrupted } } public void run() { while (running) { try { if (shouldReconnect()) { connect(); } else { sleep(statusCheckInterval); } } catch (Throwable e) { log.error("Caught exception in thread", e); } } } public void onException(JMSException e) { if (running) { log.error("Exception on JMS connection", e); } Connection badConnection = null; synchronized (lockObject) { badConnection = connection; connection = null; session = null; setChanged(); notifyObservers(new ConnectionEvent(Disconnected, e, "OnException Disconnected")); } try { badConnection.close(); } catch (JMSException e1) { if (running) { log.error("Error closing connection after exception", e1); } } } public void stop() { synchronized (lockObject) { running = false; session = null; if (connection != null) { try { connection.close(); } catch (JMSException e) { log.error("Error while closing connection", e); } connection = null; } } setChanged(); notifyObservers(new ConnectionEvent(Stopped, "Stopped")); } }
[ "rsheftel@gmail.com" ]
rsheftel@gmail.com
89a6a140a5dc174ae3c4d38e942956acadb670c1
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/MATH-1b-1-17-Single_Objective_GGA-WeightedSum-BasicBlockCoverage-opt/org/apache/commons/math3/fraction/BigFraction_ESTest_scaffolding.java
b2a789a0597b4c5ed1962579570040c796d358ff
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
3,625
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 26 21:05:16 UTC 2021 */ package org.apache.commons.math3.fraction; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class BigFraction_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.fraction.BigFraction"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); 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.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BigFraction_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math3.fraction.BigFractionField", "org.apache.commons.math3.exception.util.ExceptionContextProvider", "org.apache.commons.math3.fraction.BigFraction", "org.apache.commons.math3.exception.util.ArgUtils", "org.apache.commons.math3.exception.MathArithmeticException", "org.apache.commons.math3.exception.NumberIsTooSmallException", "org.apache.commons.math3.util.FastMath$ExpIntTable", "org.apache.commons.math3.util.FastMath$lnMant", "org.apache.commons.math3.exception.NotPositiveException", "org.apache.commons.math3.exception.MathIllegalStateException", "org.apache.commons.math3.util.FastMath$ExpFracTable", "org.apache.commons.math3.exception.MathIllegalArgumentException", "org.apache.commons.math3.util.MathUtils", "org.apache.commons.math3.exception.MathIllegalNumberException", "org.apache.commons.math3.exception.util.LocalizedFormats", "org.apache.commons.math3.exception.ZeroException", "org.apache.commons.math3.exception.ConvergenceException", "org.apache.commons.math3.util.FastMath", "org.apache.commons.math3.FieldElement", "org.apache.commons.math3.exception.util.Localizable", "org.apache.commons.math3.fraction.FractionConversionException", "org.apache.commons.math3.exception.util.ExceptionContext", "org.apache.commons.math3.util.ArithmeticUtils", "org.apache.commons.math3.exception.NullArgumentException", "org.apache.commons.math3.Field", "org.apache.commons.math3.exception.NotFiniteNumberException", "org.apache.commons.math3.util.FastMathLiteralArrays", "org.apache.commons.math3.fraction.BigFractionField$LazyHolder" ); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
f76aeff9eb02d6a6eb726d1a4cf442c26621490c
092c76fcc6c411ee77deef508e725c1b8277a2fe
/hybris/bin/ext-template/ycommercewebservices/web/src/de/hybris/platform/ycommercewebservices/xstream/JsonXStreamMarshallerFactory.java
834ae68a62cc22aaeda85c1cdd8d4e8a93992442
[ "MIT" ]
permissive
BaggaShivanshu2/hybris-bookstore-tutorial
4de5d667bae82851fe4743025d9cf0a4f03c5e65
699ab7fd8514ac56792cb911ee9c1578d58fc0e3
refs/heads/master
2022-11-28T12:15:32.049256
2020-08-05T11:29:14
2020-08-05T11:29:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,522
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.platform.ycommercewebservices.xstream; import java.io.Writer; import org.springframework.oxm.xstream.XStreamMarshaller; import com.thoughtworks.xstream.io.HierarchicalStreamWriter; import com.thoughtworks.xstream.io.json.JsonWriter; public class JsonXStreamMarshallerFactory extends XmlXStreamMarshallerFactory { private XStreamMarshaller jsonMarshallerInstance; @SuppressWarnings("PMD") @Override public void afterPropertiesSet() throws Exception { jsonMarshallerInstance = getObjectInternal(); } @SuppressWarnings("PMD") @Override public Object getObject() throws Exception { return jsonMarshallerInstance; } /** * creates a custom json writer which swallows top most root nodes */ @Override protected XStreamMarshaller createMarshaller() { final XStreamMarshaller marshaller = super.createMarshaller(); marshaller.setStreamDriver(new com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver() { @Override public HierarchicalStreamWriter createWriter(final Writer writer) { return new JsonWriter(writer, JsonWriter.DROP_ROOT_MODE); } }); return marshaller; } }
[ "xelilim@hotmail.com" ]
xelilim@hotmail.com
135822a0a708b8e0064ae58210605bda080fefc3
00914537758c49d5f8b07114cfb3487bdd2da98e
/wh_entity/src/main/java/com/wh/entity/logistics/WhLogistics.java
ce035ebc7dabfa02c9bee5fb0dfcd7d64e8ab8ab
[]
no_license
xybc1122/wh_web
d22258ede84448efb00e39a16a4f83c88aef48a0
ea87d396126ee890b6d018750426e87ae0a2a7f3
refs/heads/master
2022-10-23T19:55:59.110162
2019-07-07T10:52:14
2019-07-07T10:52:14
191,920,962
1
0
null
2022-10-12T20:28:05
2019-06-14T10:04:15
Java
UTF-8
Java
false
false
1,320
java
package com.wh.entity.logistics; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.wh.entity.parent.ParentConfTable; import java.io.Serializable; /** * <p> * 运输方式实体类 * </p> * * @author 陈恩惠 * @since 2019-07-02 */ public class WhLogistics extends ParentConfTable implements Serializable { private static final long serialVersionUID = 1L; @TableId(type = IdType.AUTO) private Long id; /** * 运输方式名 */ private String transport; /** * 状态 */ private String status; /** * 运输方式简码 */ private String code; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public static long getSerialVersionUID() { return serialVersionUID; } public String getTransport() { return transport; } public void setTransport(String transport) { this.transport = transport; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } }
[ "451597529@qq.com" ]
451597529@qq.com
871e3b78573141715dfcd54e47e5ba67ec91380c
3ec181de57f014603bb36b8d667a8223875f5ee8
/mone-login/mi-tpclogin/mi-tpclogin-sdk/src/main/java/com/xiaomi/mone/tpc/login/util/ConstUtil.java
aa3cd10d41bb8719e8551a40d54f39c74bc8c110
[ "Apache-2.0" ]
permissive
XiaoMi/mone
41af3b636ecabd7134b53a54c782ed59cec09b9e
576cea4e6cb54e5bb7c37328f1cb452cda32f953
refs/heads/master
2023-08-31T08:47:40.632419
2023-08-31T08:09:35
2023-08-31T08:09:35
331,844,632
1,148
152
Apache-2.0
2023-09-14T07:33:13
2021-01-22T05:20:18
Java
UTF-8
Java
false
false
1,594
java
package com.xiaomi.mone.tpc.login.util; public class ConstUtil { public static volatile String authTokenUrlVal = null; public final static String TPC_USER = "TPC_USER"; public final static String AUTH_TOKEN = "TPC_TOKEN"; public final static String authTokenUrl = "authTokenUrl"; public final static String ignoreUrl = "IGNORE_URL"; public final static String devMode = "devMode"; public final static String innerAuth = "innerAuth"; public static final String CAS_PUBLIC_KEY = "AEGIS_SDK_PUBLIC_KEY"; public static final String SYS_SIGN = "sysSign"; public static final String SYS_NAME = "sysName"; public static final String USER_TOKEN = "userToken"; public static final String REQ_TIME = "reqTime"; public static final String DATA_SIGN = "dataSign"; public static final String ACCOUNT = "account"; public static final String TTL_MILLS = "ttlMills"; public static final String USER_INFO_PATH = "userInfoPath"; public final static String PUBLIC_KEY_FILTER_INIT_PARAM_KEY = "AEGIS_SDK_PUBLIC_KEY"; public final static String HEADER_KEY_SIGN_VERIFY_IDENTITY = "X-Proxy-Midun"; /** * 数据签名+用户数据header key */ public final static String HEADER_KEY_SIGN_AND_USER_DATA = "x-proxy-userdetail"; public final static String hermesUrl = "hermesUrl"; public final static String hermesProjectName = "hermesProjectName"; public final static String openHermes = "openHermes"; public final static String loginUrl = "loginUrl"; public final static String logoutUrl = "logoutUrl"; }
[ "shanwenbang@xiaomi.com" ]
shanwenbang@xiaomi.com
2d895463eba7dc5063037868a77cedcc8f0fe3ca
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes5/com/tencent/mobileqq/emoticonview/EmoticonInfo.java
92843e7d912a0a00a442083dba0fd2584fc9ed0c
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,705
java
package com.tencent.mobileqq.emoticonview; import android.content.Context; import android.graphics.drawable.Drawable; import android.widget.EditText; import com.tencent.mobileqq.activity.aio.SessionInfo; import com.tencent.mobileqq.app.QQAppInterface; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.mobileqq.text.TextUtils; public class EmoticonInfo extends EmotionPanelData { public static final String c = "delete"; public static final String d = "setting"; public static final String e = "add"; public static final int f = 1; public static final String f = "push"; public static final int g = 2; public static final String g = "show_fav_menu"; public static final String h = "donothing"; public static final String i = "favEdit"; public static final String j = "funny_pic"; EmoticonCallback a; public String a; public String b; public int c; public int d; public int e; public EmoticonInfo() { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; this.c = -1; } public Drawable a(Context paramContext, float paramFloat) { return TextUtils.a(paramContext.getResources(), this.e); } public void a(QQAppInterface paramQQAppInterface, Context paramContext, EditText paramEditText, SessionInfo paramSessionInfo) {} public void a(EmoticonCallback paramEmoticonCallback) { this.a = paramEmoticonCallback; } public Drawable b(Context paramContext, float paramFloat) { return a(paramContext, paramFloat); } } /* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\com\tencent\mobileqq\emoticonview\EmoticonInfo.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
3dc64838319f7cc01e71f3d16b65d2791099bb64
cb762d4b0f0ea986d339759ba23327a5b6b67f64
/src/dao/com/joymain/jecs/am/dao/InwIntegrationDao.java
71c5cd1602451bb7c654d84b0941b78525769863
[ "Apache-2.0" ]
permissive
lshowbiz/agnt_ht
c7d68c72a1d5fa7cd0e424eabb9159d3552fe9dc
fd549de35cb12a2e3db1cd9750caf9ce6e93e057
refs/heads/master
2020-08-04T14:24:26.570794
2019-10-02T03:04:13
2019-10-02T03:04:13
212,160,437
0
0
null
null
null
null
UTF-8
Java
false
false
1,860
java
package com.joymain.jecs.am.dao; import java.util.List; import java.math.BigDecimal; import com.joymain.jecs.dao.Dao; import com.joymain.jecs.am.model.InwIntegration; import com.joymain.jecs.util.data.CommonRecord; import com.joymain.jecs.util.data.Pager; public interface InwIntegrationDao extends Dao { /** * Retrieves all of the inwIntegrations */ public List getInwIntegrations(InwIntegration inwIntegration); /** * Gets inwIntegration's information based on primary key. An * ObjectRetrievalFailureException Runtime Exception is thrown if * nothing is found. * * @param id the inwIntegration's id * @return inwIntegration populated inwIntegration object */ public InwIntegration getInwIntegration(final BigDecimal id); /** * 向创新共赢的创新积分表中添加数据 * @author gw 2013-09-05 * @param inwIntegration */ public void saveInwIntegration(InwIntegration inwIntegration); /** * Removes a inwIntegration from the database by id * @param id the inwIntegration's id */ public void removeInwIntegration(final BigDecimal id); //added for getInwIntegrationsByCrm public List getInwIntegrationsByCrm(CommonRecord crm, Pager pager); /** * 在增加创新积分前,先去数据库中查询.如果该条建议已经为会员增加了创新积分,那么不再为该会员添加创新积分 * @author 2013-09-13 * @param suggestionUserCode * @param suggestionid * @return InwIntegration */ public InwIntegration getInwIntegrationByParam(String suggestionUserCode,String suggestionid); /** * 在扣除积分之前,首先进行放重复提交的校验 * @author 2014-06-10 * @param uniqueCode * @return boolean */ public boolean getCheckExist(String uniqueCode); }
[ "727736571@qq.com" ]
727736571@qq.com
dd6626b8155d9d345ecc2abddcfa4ed9cdd38295
8eac9fe5030455cb9d1692d2136fa79046fa3350
/src/main/java/com/i4one/rewards/model/shopping/ShoppingPurchase.java
b34c6bced7d80aaaf1d4158b429cd6f7ecf017a9
[ "MIT" ]
permissive
badiozam/concord
1987190d9aac2fb89b990e561acab6a59275bd7b
343842aa69f25ff9917e51936eabe72999b81407
refs/heads/master
2022-12-24T06:29:32.881068
2020-07-01T19:26:05
2020-07-01T19:26:05
149,226,043
0
0
MIT
2022-12-16T09:44:00
2018-09-18T03:53:29
Java
UTF-8
Java
false
false
2,537
java
/* * MIT License * * Copyright (c) 2018 i4one Interactive, LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.i4one.rewards.model.shopping; import com.i4one.base.model.SiteGroupActivityType; import com.i4one.rewards.model.prize.BasePrizeWinningActivityType; import com.i4one.rewards.model.prize.Prize; import com.i4one.rewards.model.prize.PrizeWinningUsageType; /** * @author Hamid Badiozamani */ public class ShoppingPurchase extends BasePrizeWinningActivityType<ShoppingPurchaseRecord, ShoppingRecord, Shopping> implements PrizeWinningUsageType<ShoppingPurchaseRecord>,SiteGroupActivityType<ShoppingPurchaseRecord, Shopping> { static final long serialVersionUID = 42L; public ShoppingPurchase() { super(new ShoppingPurchaseRecord()); } protected ShoppingPurchase(ShoppingPurchaseRecord delegate) { super(delegate); } @Override protected void init() { super.init(); } @Override public void actualizeRelations() { super.actualizeRelations(); } @Override protected String uniqueKeyInternal() { return getDelegate().getItemid() + "-" + getDelegate().getUserid(); } public Shopping getShopping() { return getActionItem(); } public Shopping getShopping(boolean doLoad) { return getActionItem(doLoad); } public void setShopping(Shopping shopping) { setActionItem(shopping); } @Override public Prize getPrize() { return getShopping().getPrize(); } @Override protected Shopping newActionItem() { return new Shopping(); } }
[ "badiozam@yahoo.com" ]
badiozam@yahoo.com
8c7cf928c1c34b3f5911166b64aeb491641e0dbf
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_6139a6d534ff1d88d8683efc80363e815b75743e/UnifiedDiffTable/2_6139a6d534ff1d88d8683efc80363e815b75743e_UnifiedDiffTable_t.java
c1998c71613c440bfa8dd72c76dbf13a1a27855c
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,116
java
// Copyright 2008 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.gerrit.client.patches; import com.google.gerrit.client.data.PatchLine; import com.google.gerrit.client.reviewdb.PatchLineComment; import java.util.Iterator; import java.util.List; public class UnifiedDiffTable extends AbstractPatchContentTable { @Override protected void onCellDoubleClick(final int row, final int column) { if (column == 1 && getRowItem(row) instanceof PatchLine) { final PatchLine pl = (PatchLine) getRowItem(row); switch (pl.getType()) { case PRE_IMAGE: case CONTEXT: createCommentEditor(row + 1, column, pl.getOldLineNumber(), (short) 0); break; case POST_IMAGE: createCommentEditor(row + 1, column, pl.getOldLineNumber(), (short) 1); break; } } } @Override protected void onOpenItem(final Object item) { if (item instanceof PatchLine) { final PatchLine pl = (PatchLine) item; final int row = getCurrentRow(); switch (pl.getType()) { case PRE_IMAGE: case CONTEXT: createCommentEditor(row + 1, 1, pl.getOldLineNumber(), (short) 0); break; case POST_IMAGE: createCommentEditor(row + 1, 1, pl.getOldLineNumber(), (short) 1); break; } return; } super.onOpenItem(item); } @Override protected void bindDrafts(final List<PatchLineComment> drafts) { int row = 0; for (final PatchLineComment c : drafts) { while (row < table.getRowCount()) { if (getRowItem(row) instanceof PatchLine) { final PatchLine pl = (PatchLine) getRowItem(row); if (pl.getOldLineNumber() >= c.getLine()) { break; } } row++; } table.insertRow(row + 1); table.getCellFormatter().setStyleName(row + 1, 0, S_ICON_CELL); bindComment(row + 1, 1, c, true); } } public void display(final List<PatchLine> list) { initVersions(2); final StringBuilder nc = new StringBuilder(); for (final PatchLine pLine : list) { appendLine(nc, pLine); } resetHtml(nc.toString()); int row = 0; for (final PatchLine pLine : list) { setRowItem(row, pLine); row++; final List<PatchLineComment> comments = pLine.getComments(); if (comments != null) { for (final Iterator<PatchLineComment> ci = comments.iterator(); ci .hasNext();) { final PatchLineComment c = ci.next(); table.insertRow(row); table.getCellFormatter().setStyleName(row, 0, S_ICON_CELL); bindComment(row, 1, c, !ci.hasNext()); row++; } } } } private void appendLine(final StringBuilder nc, final PatchLine line) { nc.append("<tr>"); nc.append("<td class=\"" + S_ICON_CELL + "\">&nbsp;</td>"); nc.append("<td class=\"DiffText DiffText-"); nc.append(line.getType().name()); nc.append("\">"); if (!"".equals(line.getText())) { boolean showWhitespaceErrors = false; switch (line.getType()) { case POST_IMAGE: // Only show whitespace errors if the error was introduced. // showWhitespaceErrors = true; break; } nc.append(PatchUtil.lineToHTML(line.getText(), 0, showWhitespaceErrors)); } else { nc.append("&nbsp;"); } nc.append("</td>"); nc.append("</tr>"); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7c899274edd1030c53bbd236b2e6b4155960a169
803723f151a76bd95109ee19eb44bfa9ba5f27c0
/CodeGenerator/src/main/java/com/pkx/code/build/PojoBuilder.java
591cbe4f22d69325ea9fa2c0d9a8aa29f9da0fd0
[]
no_license
ichengqf/CodeGenerator
79320cd84146f1e63752bad9f8a15a0a4304c7bd
270920e30b4fe39b3381adfe45b487ba30afa610
refs/heads/master
2023-06-03T00:31:43.522282
2021-05-25T14:13:02
2021-05-25T14:13:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
502
java
package com.pkx.code.build; import java.util.Map; /**** * @Author: PKXING * @Description:Pojo构建 * @Date PKXING 19:13 *****/ public class PojoBuilder { /*** * 构建Pojo * @param dataModel */ public static void builder(Map<String,Object> dataModel){ // 生成Pojo层文件 BuilderFactory.builder(dataModel, "/template/pojo", "Pojo.java", TemplateBuilder.PACKAGE_POJO, ".java"); } }
[ "admin@example.com" ]
admin@example.com
f3f49d240470966d035a0ffe04920676d9535fa1
1ea74ff282bba8f1bf0985c45cf2cd71b271cef2
/Day_15/Notes/src/com/dragontalker/java8/CompareA.java
fe83302c8e0efbce92f3694116bd4d3c8764db95
[ "MIT" ]
permissive
Dragontalker/JavaEE-study-notes
85d6361d4e3fd90eeacb78d56bfcb1e0885678d1
b6c334f4539b2d2f377146334667e5129ce28dd8
refs/heads/main
2023-05-03T02:55:42.221241
2021-05-27T01:11:10
2021-05-27T01:11:10
363,492,612
1
0
null
null
null
null
UTF-8
Java
false
false
432
java
package com.dragontalker.java8; /* JDK8: 除了定义全局常量和抽象方法之外, 还可以定义静态方法、默认方法 */ public interface CompareA { public static void method1() { System.out.println("CompareA: 北京"); } public default void method2() { System.out.println("CompareA: 上海"); } default void method3() { System.out.println("CompareA: 深圳"); } }
[ "richard.yang.tong@gmail.com" ]
richard.yang.tong@gmail.com
71943c50ae12da6c34d0d2dfc2945aeb62f3edef
df134b422960de6fb179f36ca97ab574b0f1d69f
/net/minecraft/server/v1_16_R2/ArgumentMathOperation.java
bcdf98a28b56ec6b2a7ab5ced13dd4cb3c920a65
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
4,869
java
/* */ package net.minecraft.server.v1_16_R2; /* */ /* */ import com.mojang.brigadier.StringReader; /* */ import com.mojang.brigadier.arguments.ArgumentType; /* */ import com.mojang.brigadier.context.CommandContext; /* */ import com.mojang.brigadier.exceptions.CommandSyntaxException; /* */ import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; /* */ import com.mojang.brigadier.suggestion.Suggestions; /* */ import com.mojang.brigadier.suggestion.SuggestionsBuilder; /* */ import java.util.Arrays; /* */ import java.util.Collection; /* */ import java.util.concurrent.CompletableFuture; /* */ /* */ /* */ /* */ /* */ /* */ public class ArgumentMathOperation /* */ implements ArgumentType<ArgumentMathOperation.a> /* */ { /* 21 */ private static final Collection<String> a = Arrays.asList(new String[] { "=", ">", "<" }); /* 22 */ private static final SimpleCommandExceptionType b = new SimpleCommandExceptionType(new ChatMessage("arguments.operation.invalid")); /* 23 */ private static final SimpleCommandExceptionType c = new SimpleCommandExceptionType(new ChatMessage("arguments.operation.div0")); /* */ /* */ public static ArgumentMathOperation a() { /* 26 */ return new ArgumentMathOperation(); /* */ } /* */ /* */ public static a a(CommandContext<CommandListenerWrapper> var0, String var1) throws CommandSyntaxException { /* 30 */ return (a)var0.getArgument(var1, a.class); /* */ } /* */ /* */ /* */ public a parse(StringReader var0) throws CommandSyntaxException { /* 35 */ if (var0.canRead()) { /* 36 */ int var1 = var0.getCursor(); /* 37 */ while (var0.canRead() && var0.peek() != ' ') { /* 38 */ var0.skip(); /* */ } /* 40 */ return a(var0.getString().substring(var1, var0.getCursor())); /* */ } /* */ /* 43 */ throw b.create(); /* */ } /* */ /* */ /* */ public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> var0, SuggestionsBuilder var1) { /* 48 */ return ICompletionProvider.a(new String[] { "=", "+=", "-=", "*=", "/=", "%=", "<", ">", "><" }, var1); /* */ } /* */ /* */ /* */ public Collection<String> getExamples() { /* 53 */ return a; /* */ } /* */ /* */ private static a a(String var0) throws CommandSyntaxException { /* 57 */ if (var0.equals("><")) { /* 58 */ return (var0, var1) -> { /* */ int var2 = var0.getScore(); /* */ /* */ var0.setScore(var1.getScore()); /* */ var1.setScore(var2); /* */ }; /* */ } /* 65 */ return b(var0); /* */ } /* */ /* */ private static b b(String var0) throws CommandSyntaxException { /* 69 */ switch (var0) { /* */ case "=": /* 71 */ return (var0, var1) -> var1; /* */ case "+=": /* 73 */ return (var0, var1) -> var0 + var1; /* */ case "-=": /* 75 */ return (var0, var1) -> var0 - var1; /* */ case "*=": /* 77 */ return (var0, var1) -> var0 * var1; /* */ case "/=": /* 79 */ return (var0, var1) -> { /* */ if (var1 == 0) { /* */ throw c.create(); /* */ } /* */ return MathHelper.a(var0, var1); /* */ }; /* */ case "%=": /* 86 */ return (var0, var1) -> { /* */ if (var1 == 0) { /* */ throw c.create(); /* */ } /* */ return MathHelper.b(var0, var1); /* */ }; /* */ case "<": /* 93 */ return Math::min; /* */ case ">": /* 95 */ return Math::max; /* */ } /* 97 */ throw b.create(); /* */ } /* */ /* */ /* */ /* */ @FunctionalInterface /* */ static interface b /* */ extends a /* */ { /* */ int apply(int param1Int1, int param1Int2) throws CommandSyntaxException; /* */ /* */ /* */ /* */ default void apply(ScoreboardScore var0, ScoreboardScore var1) throws CommandSyntaxException { /* 111 */ var0.setScore(apply(var0.getScore(), var1.getScore())); /* */ } /* */ } /* */ /* */ @FunctionalInterface /* */ public static interface a { /* */ void apply(ScoreboardScore param1ScoreboardScore1, ScoreboardScore param1ScoreboardScore2) throws CommandSyntaxException; /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\net\minecraft\server\v1_16_R2\ArgumentMathOperation.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
b066164ef51d3382eda1caf34372ddc0fda758b0
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.ocms-OCMS/sources/com/facebook/secure/trustedapp/exception/CannotAttachCallerInfoException.java
8c543e9375ee2a4e294b56b4e9901e5fc827abdd
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
342
java
package com.facebook.secure.trustedapp.exception; public class CannotAttachCallerInfoException extends Exception { public CannotAttachCallerInfoException() { } public CannotAttachCallerInfoException(String str) { super(str); } public CannotAttachCallerInfoException(Exception exc) { super(exc); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
cd23c08761384cf83f972ec5251ed8ce40d2b782
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/LANG-36b-1-25-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/lang3/math/NumberUtils_ESTest.java
966d7414ebdc232afb1a5dae5f5ba9d4ec3b3c54
[]
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
1,012
java
/* * This file was automatically generated by EvoSuite * Mon Apr 06 06:11:52 UTC 2020 */ package org.apache.commons.lang3.math; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.apache.commons.lang3.math.NumberUtils; 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 NumberUtils_ESTest extends NumberUtils_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { try { NumberUtils.createNumber("A blank string is not a valid number"); fail("Expecting exception: NumberFormatException"); } catch(NumberFormatException e) { // // A blank string is not a valid number is not a valid number. // verifyException("org.apache.commons.lang3.math.NumberUtils", e); } } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
b608852c0208aebd9c1ce4f57d14db268cbff152
27a3ff066fc12515edc4f52cbf8be9dcef3f36cd
/src/gr/uom/java/xmi/UMLJavadoc.java
e324fdda224ba80e80f66c89db06ca0c38e0c9e6
[ "MIT" ]
permissive
quentinLeDilavrec/RefactoringMiner
281f993f7ccf35a1679fa89ac49adc10efe39844
c71324b9364126a76a1adc7dbd01db7c472aca05
refs/heads/master
2021-07-20T11:58:30.972072
2021-02-04T09:37:37
2021-02-04T09:37:37
240,780,307
0
0
MIT
2020-02-15T20:03:17
2020-02-15T20:03:16
null
UTF-8
Java
false
false
640
java
package gr.uom.java.xmi; import java.util.ArrayList; import java.util.List; public class UMLJavadoc { private List<UMLTagElement> tags; public UMLJavadoc() { this.tags = new ArrayList<UMLTagElement>(); } public void addTag(UMLTagElement tag) { tags.add(tag); } public List<UMLTagElement> getTags() { return tags; } public boolean contains(String s) { for(UMLTagElement tag : tags) { if(tag.contains(s)) { return true; } } return false; } public boolean containsIgnoreCase(String s) { for(UMLTagElement tag : tags) { if(tag.containsIgnoreCase(s)) { return true; } } return false; } }
[ "tsantalis@gmail.com" ]
tsantalis@gmail.com
e71cfa87b4bab3a63af7bdac44cccd7a3a309bd3
a3a54e8c694730ea5ae071cc198db50582ca7ab6
/Project/GiovaniUtils/src/com/giovani/utils/StringUtil.java
6a339f70edc901fea90c91b0b7085ef3410f765c
[]
no_license
zhhqiang9198/Giovani-resource
3f807c97f231a00b694a1bd8adaa7816aab90af4
aa30dcac2af0b34c6f14f55635199a9319ef3685
refs/heads/master
2021-10-18T17:15:22.759832
2019-01-16T10:01:20
2019-01-16T10:01:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
400
java
package com.giovani.utils; /** * 字符串工具 * * @author Giovani * @create: 2019/1/15 17:23 */ public class StringUtil { /** * 判断字符串是否为空 * * @param string * @return */ public static boolean isEmpty(String string) { if (string == null || string.length() <= 0) { return true; } return false; } }
[ "15219331778@163.com" ]
15219331778@163.com
ccf57c28fc70ad9e4455d4811be9d5045b210e57
ac108cb5f606cb5df0981d23cfd639345110a9b3
/APIJSON(Android)/APIJSON(AndroidStudio)/APIJSONApp/APIJSONLibrary/src/main/java/zuo/biao/apijson/APIJSONRequest.java
86c912561863fc0fdc30311ed82191a14205446b
[ "Apache-2.0" ]
permissive
yeyuguo/APIJSON
32ae222d39155640124f849aa149ad2af5653841
a68069e150eee0aff18fcd13edb9b8394360d014
refs/heads/master
2020-07-15T02:09:57.439928
2017-06-11T15:57:32
2017-06-11T15:57:32
94,301,596
2
0
null
2017-06-14T07:19:00
2017-06-14T07:19:00
null
UTF-8
Java
false
false
1,682
java
/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON) 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 zuo.biao.apijson; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /**请求方法对应的JSON结构 * @author Lemon */ @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface APIJSONRequest { /** * @return 允许的请求方法 */ RequestMethod[] method() default {}; /**@see {@link RequestMethod#POST_HEAD} * @return 该请求方法允许的结构 */ String POST_HEAD() default ""; /**@see {@link RequestMethod#POST_GET} * @return 该请求方法允许的结构 */ String POST_GET() default ""; /**@see {@link RequestMethod#POST} * @return 该请求方法允许的结构 */ String POST() default ""; /**@see {@link RequestMethod#PUT} * @return 该请求方法允许的结构 */ String PUT() default ""; /**@see {@link RequestMethod#DELETE} * @return 该请求方法允许的结构 */ String DELETE() default ""; }
[ "1184482681@qq.com" ]
1184482681@qq.com
30e075d3fd5010504fd7b2d5cdc4aac4b151f442
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/34/34_3b85a81f3b4add96dd240928f8ad50ff4a2156cb/NamespaceTester/34_3b85a81f3b4add96dd240928f8ad50ff4a2156cb_NamespaceTester_s.java
a820d43c6b822a9f88c7c076c705458f41769bb9
[]
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
848
java
package mikera.cljunit; import java.util.ArrayList; import java.util.Collection; import org.junit.runner.Description; import org.junit.runner.notification.RunNotifier; class NamespaceTester { public Description d; public String namespace; @SuppressWarnings("unused") public ArrayList<VarTester> children=new ArrayList<VarTester>(); public NamespaceTester(String ns) { this.namespace=ns; d= Description.createSuiteDescription(namespace); Collection<String> testVars=Clojure.getTestVars(namespace); for (String v:testVars) { VarTester vt=new VarTester(namespace,v); d.addChild(vt.getDescription()); children.add(vt); } } public Description getDescription() { return d; } public void runTest(RunNotifier n) { for (VarTester vt:children) { vt.runTest(n); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
053951b34a12e67e216110f4fb17c3aa7b6ffa64
90eac3c2fb0bb00d48148936aabe6d2e440c0181
/src/main/java/com/ciro/petshop/config/WebConfigurer.java
036962dfb5b28d9e9361e214f50fa382d76e3e98
[]
no_license
beta3000/pet-shop
a2f571eb23b1c0c21e2a197d162b0e4ebc1b4f6c
9d57e49c2a7a04437cd1549da28cf711b0faea5c
refs/heads/main
2023-04-14T18:42:24.333616
2021-04-22T13:08:15
2021-04-22T13:08:15
360,522,577
0
0
null
2021-04-22T13:25:52
2021-04-22T13:07:57
Java
UTF-8
Java
false
false
4,813
java
package com.ciro.petshop.config; import static java.net.URLDecoder.decode; import java.io.File; import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; import java.util.*; import javax.servlet.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.web.server.*; import org.springframework.boot.web.servlet.ServletContextInitializer; import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; import org.springframework.util.CollectionUtils; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter; import tech.jhipster.config.JHipsterConstants; import tech.jhipster.config.JHipsterProperties; import tech.jhipster.config.h2.H2ConfigurationHelper; /** * Configuration of web application with Servlet 3.0 APIs. */ @Configuration public class WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer<WebServerFactory> { private final Logger log = LoggerFactory.getLogger(WebConfigurer.class); private final Environment env; private final JHipsterProperties jHipsterProperties; public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) { this.env = env; this.jHipsterProperties = jHipsterProperties; } @Override public void onStartup(ServletContext servletContext) throws ServletException { if (env.getActiveProfiles().length != 0) { log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles()); } if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))) { initH2Console(servletContext); } log.info("Web application fully configured"); } /** * Customize the Servlet engine: Mime types, the document root, the cache. */ @Override public void customize(WebServerFactory server) { // When running in an IDE or with ./mvnw spring-boot:run, set location of the static web assets. setLocationForStaticAssets(server); } private void setLocationForStaticAssets(WebServerFactory server) { if (server instanceof ConfigurableServletWebServerFactory) { ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server; File root; String prefixPath = resolvePathPrefix(); root = new File(prefixPath + "target/classes/static/"); if (root.exists() && root.isDirectory()) { servletWebServer.setDocumentRoot(root); } } } /** * Resolve path prefix to static resources. */ private String resolvePathPrefix() { String fullExecutablePath; try { fullExecutablePath = decode(this.getClass().getResource("").getPath(), StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { /* try without decoding if this ever happens */ fullExecutablePath = this.getClass().getResource("").getPath(); } String rootPath = Paths.get(".").toUri().normalize().getPath(); String extractedPath = fullExecutablePath.replace(rootPath, ""); int extractionEndIndex = extractedPath.indexOf("target/"); if (extractionEndIndex <= 0) { return ""; } return extractedPath.substring(0, extractionEndIndex); } @Bean public CorsFilter corsFilter() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration config = jHipsterProperties.getCors(); if (!CollectionUtils.isEmpty(config.getAllowedOrigins())) { log.debug("Registering CORS filter"); source.registerCorsConfiguration("/api/**", config); source.registerCorsConfiguration("/management/**", config); source.registerCorsConfiguration("/v2/api-docs", config); source.registerCorsConfiguration("/v3/api-docs", config); source.registerCorsConfiguration("/swagger-resources", config); source.registerCorsConfiguration("/swagger-ui/**", config); } return new CorsFilter(source); } /** * Initializes H2 console. */ private void initH2Console(ServletContext servletContext) { log.debug("Initialize H2 console"); H2ConfigurationHelper.initH2Console(servletContext); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
84646ba3ee86248b223feeda50463bbc35c2380f
66aa34e2b03bf24da4c4fbf355d246b4f2a01844
/app/src/main/java/androidsqlite/com/fragmenttutorial/fragmentB.java
607e8c081914ab72a78dc5c338975af653c05acb
[]
no_license
Yazdani1/Android_Fragment
eb59c9f3eb2d97a94ec60986cc51b5ad995e8306
9519e3cf4cc72f47d07b1e6f9fbcda0ef80c95a9
refs/heads/master
2021-01-23T07:44:49.013181
2017-03-28T09:43:00
2017-03-28T09:43:00
86,442,382
0
0
null
null
null
null
UTF-8
Java
false
false
1,439
java
package androidsqlite.com.fragmenttutorial; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; public class fragmentB extends android.app.Fragment { EditText e1,e2; Button b1; TextView t1; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View viewm= inflater.inflate(R.layout.fragment_fragment_b, container, false); e1=(EditText)viewm.findViewById(R.id.edit_text1); e2=(EditText)viewm.findViewById(R.id.edit_text2); b1=(Button)viewm.findViewById(R.id.button1_fb); t1=(TextView)viewm.findViewById(R.id.result_f_xml); b1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mymethodsresult(); } }); return viewm; } public void mymethodsresult(){ String s1,s2,s3; s1=e1.getText().toString(); s2=e2.getText().toString(); s3=s1+s2; t1.setText(s3); Toast.makeText(this.getActivity(),s3,Toast.LENGTH_SHORT).show(); } }
[ "yaz4dani@gmail.com" ]
yaz4dani@gmail.com
67e6b2b658d19a7bfaa2dde6d8593f0757424c0b
8bca6164fc085936891cda5ff7b2341d3d7696c5
/bootstrap/gensrc/de/hybris/platform/cronjob/model/GenericCSVImportStepModel.java
80acfad61a450f7ea4e36979cbc78ad9887c8727
[]
no_license
rgonthina1/newplatform
28819d22ba48e48d4edebbf008a925cad0ebc828
1cdc70615ea4e86863703ca9a34231153f8ef373
refs/heads/master
2021-01-19T03:03:22.221074
2016-06-20T14:49:25
2016-06-20T14:49:25
61,548,232
1
0
null
null
null
null
UTF-8
Java
false
false
3,259
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at 20 Jun, 2016 7:36:24 PM --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * */ package de.hybris.platform.cronjob.model; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.cronjob.model.BatchJobModel; import de.hybris.platform.cronjob.model.MediaProcessorStepModel; import de.hybris.platform.servicelayer.model.ItemModelContext; /** * Generated model class for type GenericCSVImportStep first defined at extension processing. */ @SuppressWarnings("all") public class GenericCSVImportStepModel extends MediaProcessorStepModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "GenericCSVImportStep"; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public GenericCSVImportStepModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public GenericCSVImportStepModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _batchJob initial attribute declared by type <code>Step</code> at extension <code>processing</code> * @param _code initial attribute declared by type <code>Step</code> at extension <code>processing</code> * @param _sequenceNumber initial attribute declared by type <code>Step</code> at extension <code>processing</code> */ @Deprecated public GenericCSVImportStepModel(final BatchJobModel _batchJob, final String _code, final Integer _sequenceNumber) { super(); setBatchJob(_batchJob); setCode(_code); setSequenceNumber(_sequenceNumber); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _batchJob initial attribute declared by type <code>Step</code> at extension <code>processing</code> * @param _code initial attribute declared by type <code>Step</code> at extension <code>processing</code> * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> * @param _sequenceNumber initial attribute declared by type <code>Step</code> at extension <code>processing</code> */ @Deprecated public GenericCSVImportStepModel(final BatchJobModel _batchJob, final String _code, final ItemModel _owner, final Integer _sequenceNumber) { super(); setBatchJob(_batchJob); setCode(_code); setOwner(_owner); setSequenceNumber(_sequenceNumber); } }
[ "Kalpana" ]
Kalpana
844f6021c74d1dd0c42a8aab5b46a816c50655aa
da1b8097a29f89730ff6ce34e0192fcf4577919e
/src/main/java/br/mppe/mp/recadastro/repository/RacaCorRepository.java
c35252fca7669dda552995145aeeaaf4360c5a75
[]
no_license
acsn2/recadastro
d53ce5f7bdaf7b109328d2540d68a6c1e26b0206
bb2cb66ab329605bda28f6403110e91438b22c3b
refs/heads/master
2020-03-21T06:25:11.852812
2018-06-21T20:49:09
2018-06-21T20:49:09
138,218,276
0
0
null
2018-06-21T20:49:10
2018-06-21T20:26:35
Java
UTF-8
Java
false
false
366
java
package br.mppe.mp.recadastro.repository; import br.mppe.mp.recadastro.domain.RacaCor; import org.springframework.data.jpa.repository.*; import org.springframework.stereotype.Repository; /** * Spring Data repository for the RacaCor entity. */ @SuppressWarnings("unused") @Repository public interface RacaCorRepository extends JpaRepository<RacaCor, Long> { }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
39a386ffae3b6e254fb9f33f7dbba49b5cd28fae
608cf243607bfa7a2f4c91298463f2f199ae0ec1
/android/versioned-abis/expoview-abi38_0_0/src/main/java/abi38_0_0/org/unimodules/core/interfaces/services/KeepAwakeManager.java
6a4588ef98d9a5a883e21b38eceaedd58dd04936
[ "MIT", "BSD-3-Clause", "Apache-2.0" ]
permissive
kodeco835/symmetrical-happiness
ca79bd6c7cdd3f7258dec06ac306aae89692f62a
4f91cb07abef56118c35f893d9f5cc637b9310ef
refs/heads/master
2023-04-30T04:02:09.478971
2021-03-23T03:19:05
2021-03-23T03:19:05
350,565,410
0
1
MIT
2023-04-12T19:49:48
2021-03-23T03:18:02
Objective-C
UTF-8
Java
false
false
374
java
package abi38_0_0.org.unimodules.core.interfaces.services; import abi38_0_0.org.unimodules.core.errors.CurrentActivityNotFoundException; public interface KeepAwakeManager { void activate(String tag, Runnable done) throws CurrentActivityNotFoundException; void deactivate(String tag, Runnable done) throws CurrentActivityNotFoundException; boolean isActivated(); }
[ "81201147+kodeco835@users.noreply.github.com" ]
81201147+kodeco835@users.noreply.github.com
4633e6d10f64970af496e199b370f12e9bf3ce7c
d25f2b991537ed45e3ad4ff50acca8f6ea1ca7bb
/core/src/main/java/com/google/errorprone/bugpatterns/NonCanonicalStaticMemberImport.java
153b211ffa89ed67d3f19304631923f69ec7fd36
[ "Apache-2.0" ]
permissive
abbccdda/error-prone
9008a817c7f6449d89c777657150e3dd60633797
3678eea99ad2df90b4121c5ab499f77c155845c7
refs/heads/master
2021-01-13T09:42:37.096882
2016-10-11T00:17:51
2016-10-11T00:17:51
70,117,808
0
0
null
2016-10-06T02:55:06
2016-10-06T02:55:06
null
UTF-8
Java
false
false
2,017
java
/* * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.bugpatterns; import static com.google.errorprone.BugPattern.Category.JDK; import static com.google.errorprone.BugPattern.MaturityLevel.MATURE; import static com.google.errorprone.BugPattern.SeverityLevel.WARNING; import com.google.errorprone.BugPattern; import com.google.errorprone.VisitorState; import com.google.errorprone.bugpatterns.BugChecker.ImportTreeMatcher; import com.google.errorprone.bugpatterns.StaticImports.StaticImportInfo; import com.google.errorprone.fixes.SuggestedFix; import com.google.errorprone.matchers.Description; import com.sun.source.tree.ImportTree; /** * Members shouldn't be statically by their non-canonical name. * * @author cushon@google.com (Liam Miller-Cushon) */ @BugPattern( name = "NonCanonicalStaticMemberImport", summary = "Static import of member uses non-canonical name", category = JDK, severity = WARNING, maturity = MATURE ) public class NonCanonicalStaticMemberImport extends BugChecker implements ImportTreeMatcher { @Override public Description matchImport(ImportTree tree, VisitorState state) { StaticImportInfo importInfo = StaticImports.tryCreate(tree, state); if (importInfo == null || importInfo.isCanonical() || importInfo.members().isEmpty()) { return Description.NO_MATCH; } return describeMatch(tree, SuggestedFix.replace(tree, importInfo.importStatement())); } }
[ "cushon@google.com" ]
cushon@google.com
55bdba81d83e03722358b0ceb367c38a3435821c
af10e43252529568b7e83ee161165f52dc35bb0f
/platform/api-zuul-server/src/main/java/com/opencloud/gateway/zuul/server/filter/ZuulErrorFilter.java
138afd9a4772f7699bbf7ddf59233370f87451cd
[ "MIT" ]
permissive
footprintes/open-platform
e7bf80b41128b968846fa28d54d2b8a4b77c03d2
affac45dbac7aa03070eec31ca97c3ebf2dca03b
refs/heads/master
2022-04-10T17:31:03.201219
2020-04-03T04:58:28
2020-04-03T04:58:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,947
java
package com.opencloud.gateway.zuul.server.filter; import com.netflix.zuul.ZuulFilter; import com.netflix.zuul.context.RequestContext; import com.opencloud.common.exception.OpenGlobalExceptionHandler; import com.opencloud.common.model.ResultBody; import com.opencloud.common.utils.StringUtils; import com.opencloud.common.utils.WebUtils; import com.opencloud.gateway.zuul.server.service.AccessLogService; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.netflix.zuul.filters.support.FilterConstants; import org.springframework.http.HttpStatus; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * zuul错误过滤器 * * @author liuyadu */ @Slf4j public class ZuulErrorFilter extends ZuulFilter { private AccessLogService accessLogService; public ZuulErrorFilter(AccessLogService accessLogService) { this.accessLogService = accessLogService; } @Override public String filterType() { return FilterConstants.ERROR_TYPE; } @Override public int filterOrder() { return FilterConstants.SEND_ERROR_FILTER_ORDER; } @Override public boolean shouldFilter() { return true; } @Override public Object run() { // 代理错误日志记录 RequestContext ctx = RequestContext.getCurrentContext(); HttpServletRequest request = ctx.getRequest(); HttpServletResponse response = ctx.getResponse(); Exception exception = new Exception(ctx.getThrowable()); if (StringUtils.toBoolean(ctx.get("rateLimitExceeded"))) { exception = new Exception(HttpStatus.TOO_MANY_REQUESTS.name()); } accessLogService.sendLog(request, response, exception); ResultBody resultBody = OpenGlobalExceptionHandler.resolveException(exception, request.getRequestURI()); WebUtils.writeJson(response, resultBody); return null; } }
[ "futustar@qq.com" ]
futustar@qq.com
7a3aaafd268eab4eff3b4cefd25b31acb7887bb3
a8de1d47d42e07846543adb871a3c4ffbe5dff14
/Platform/src/main/java/net/sf/anathema/framework/repository/RepositoryFileResolver.java
77b58152300e9514e0004079fec9aa523f0e6a7f
[]
no_license
garchangel/anathema
0e85a5e2daa70f3c49878ccb6017d587516713fa
2298c2d214c38a86d339dccbf16a019cf2ed90d7
refs/heads/master
2021-01-17T05:31:44.866904
2013-10-10T19:51:47
2013-10-10T19:51:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,114
java
package net.sf.anathema.framework.repository; import net.sf.anathema.framework.item.IItemType; import net.sf.anathema.framework.item.IRepositoryConfiguration; import net.sf.anathema.lib.io.PathUtils; import java.io.File; import java.nio.file.Path; import java.util.Collection; public class RepositoryFileResolver implements IRepositoryFileResolver { private final File repositoryFile; public RepositoryFileResolver(File repositoryFile) { this.repositoryFile = repositoryFile; } @Override public File getMainFile(IRepositoryConfiguration configuration, String id) { if (configuration.isItemSavedToSingleFile()) { return getItemFile(configuration, id); } return getMainFile(getItemFolder(configuration, id), configuration); } @Override public File getMainFile(File folder, IRepositoryConfiguration configuration) { return new File(folder, configuration.getMainFileName() + configuration.getFileExtension()); } @Override public Collection<Path> listAllFiles(IRepositoryConfiguration configuration) { File folder = getExistingItemTypeFolder(configuration); String fileExtension = getExtension(configuration); return PathUtils.listAll(folder.toPath(), "*." + fileExtension); } @Override public File getFolder(IRepositoryConfiguration configuration) { return new File(repositoryFile, configuration.getFolderName()); } public File getItemFile(Item item) { IItemType type = item.getItemType(); String id = item.getId(); return getItemFile(type.getRepositoryConfiguration(), id); } public File getExistingItemTypeFolder(IRepositoryConfiguration configuration) { File typeFolder = getFolder(configuration); createNonExistentFolder(typeFolder); return typeFolder; } public File getExistingItemFolder(IItemType type, String id) { File itemFolder = getItemFolder(type.getRepositoryConfiguration(), id); createNonExistentFolder(itemFolder); return itemFolder; } public File getExistingItemFolder(Item item) { return getExistingItemFolder(item.getItemType(), item.getId()); } public File getExistingDataFolder(String folderName) { File folder = new File(repositoryFile, folderName); createNonExistentFolder(folder); return folder; } @SuppressWarnings("ResultOfMethodCallIgnored") private void createNonExistentFolder(File typeFolder) { if (!typeFolder.exists()) { typeFolder.mkdir(); } } private File getItemFile(IRepositoryConfiguration configuration, String id) { String extension = configuration.getFileExtension(); return new File(getExistingItemTypeFolder(configuration), id + extension); } private String getExtension(IRepositoryConfiguration configuration) { String fileExtension = configuration.getFileExtension(); if (fileExtension.startsWith(".")) { return fileExtension.substring(1); } return fileExtension; } private File getItemFolder(IRepositoryConfiguration configuration, String id) { File typeFolder = getExistingItemTypeFolder(configuration); return new File(typeFolder, id); } }
[ "ursreupke@gmail.com" ]
ursreupke@gmail.com
e1e5a5dd4d3f28ad10e084bb81d150678ac63cbb
f71a7ec87f7e90f8025a3079daced5dbf41aca9c
/sfop/src/main/java/com/shifeng/op/shop/controller/MerchantsSettledController.java
248e3be1fc7114313ff9abe5974e6dd843bea9f1
[]
no_license
luotianwen/yy
5ff456507e9ee3dc1a890c9bead4491d350f393d
083a05aac4271689419ee7457cd0727eb10a5847
refs/heads/master
2021-01-23T10:34:24.402548
2017-10-08T05:03:10
2017-10-08T05:03:10
102,618,007
1
3
null
null
null
null
UTF-8
Java
false
false
5,980
java
package com.shifeng.op.shop.controller; import com.shifeng.entity.shop.MerchantsSettled; import com.shifeng.op.entity.users.Users; import com.shifeng.op.shop.service.MerchantsSettledService; import com.shifeng.plugin.page.Page; import com.shifeng.provide.system.service.SystemService; import com.shifeng.util.Const; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import javax.servlet.http.HttpSession; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 入驻基本信息填写(s_merchants_settled)Controller * @author Win Zhong * @version Revision: 1.00 * Date: 2017-02-28 17:55:21 */ @Controller @RequestMapping(value="/merchantssettled") public class MerchantsSettledController{ @Resource(name="merchantssettledServiceImpl") private MerchantsSettledService merchantssettledServiceImpl; @Resource(name="systemService") private SystemService systemServiceImpl; /** * 列表页面 * @param mv * @return * @throws Exception */ @RequestMapping(value="/goMerchantsSettledList") public ModelAndView goMerchantsSettledList(ModelAndView mv) throws Exception{ mv.setViewName("shop/merchantssettledList"); return mv; } /** * 查询所有 * @param page * @param merchantssettled * @return * @throws Exception */ @RequestMapping(value="/findAllMerchantsSettled") @ResponseBody public Map<String,Object> findAllMerchantsSettled(Page page,MerchantsSettled merchantssettled) throws Exception{ if(merchantssettled==null){ merchantssettled = new MerchantsSettled(); } page.setT(merchantssettled); Map<String,Object> map = new HashMap<String,Object>(); List<MerchantsSettled> merchantssettleds = merchantssettledServiceImpl.findAllMerchantsSettled(page); map.put("merchantssettleds", merchantssettleds); map.put("page", page); return map; } /** * 跳转编辑页面 * @param mv * @param id * @return * @throws Exception */ @RequestMapping(value="/goMerchantsSettledEdit") @ResponseBody public ModelAndView goMerchantsSettledEdit(ModelAndView mv,String id) throws Exception{ mv.addObject("id", id); mv.setViewName("shop/merchantssettledEdit"); return mv; } /** * 跳转查看页面 * @param mv * @param id * @return * @throws Exception */ @RequestMapping(value="/goMerchantsSettledView") @ResponseBody public ModelAndView goMerchantsSettledView(ModelAndView mv,String id) throws Exception{ mv.addObject("id", id); mv.setViewName("shop/merchantssettledView"); return mv; } /** * 根据ID查询 * @param id * @return * @throws Exception */ @RequestMapping(value="/findMerchantsSettledById") @ResponseBody public Map<String,Object> findMerchantsSettledById(String id) throws Exception{ Map<String,Object> map = new HashMap<String,Object>(); MerchantsSettled merchantssettled = merchantssettledServiceImpl.findMerchantsSettledById(id); StringBuffer sb=new StringBuffer(""); if(!StringUtils.isEmpty(merchantssettled.getCompanyArea())){ String[] area=merchantssettled.getCompanyArea().split(","); sb.append(systemServiceImpl.getProvinceNameById(area[0])).append(" "); sb.append(systemServiceImpl.getCityNameByPid(area[1])).append(" "); sb.append(systemServiceImpl.getAreaNameByCid(area[2])); merchantssettled.setCompanyArea(sb.toString()); } if(!StringUtils.isEmpty(merchantssettled.getLocationBankbranch())){ sb=new StringBuffer(""); String[] area=merchantssettled.getLocationBankbranch().split(","); sb.append(systemServiceImpl.getProvinceNameById(area[0])).append(" "); sb.append(systemServiceImpl.getCityNameByPid(area[1])).append(" "); sb.append(systemServiceImpl.getAreaNameByCid(area[2])); merchantssettled.setLocationBankbranch(sb.toString()); } map.put("merchantssettled",merchantssettled); return map; } /** *审核通过 * @return * @throws Exception */ @RequestMapping(value="/passMerchantsSettled") @ResponseBody public Map<String,Object> passMerchantsSettled(int id,String note,HttpSession session) throws Exception{ Map<String,Object> map = new HashMap<String,Object>(); map.put(Const.RESPONSE_STATE, 500); Users user = (Users) session.getAttribute(Const.OP_SESSION_USER); try { merchantssettledServiceImpl.passMerchantsSettled(id,note,user); map.put(Const.RESPONSE_STATE, Const.RESPONSE_SUCCESS); } catch (Exception e) { e.printStackTrace(); map.put(Const.ERROR_INFO, "保存异常,请稍后重试!!!"); } return map; } /** * 驳回 * @return * @throws Exception */ @RequestMapping(value="/backMerchantsSettled") @ResponseBody public Map<String,Object> backMerchantsSettled(int id,String note,HttpSession session) throws Exception{ Map<String,Object> map = new HashMap<String,Object>(); map.put(Const.RESPONSE_STATE, 500); Users user = (Users) session.getAttribute(Const.OP_SESSION_USER); try { merchantssettledServiceImpl.backMerchantsSettled(id,note,user); map.put(Const.RESPONSE_STATE, Const.RESPONSE_SUCCESS); } catch (Exception e) { e.printStackTrace(); map.put(Const.ERROR_INFO, "保存异常,请稍后重试!!!"); } return map; } /** * 删除 * @param id * @return * @throws Exception */ @RequestMapping(value="/deleteMerchantsSettled") @ResponseBody public Map<String,Object> deleteMerchantsSettled(String id) throws Exception{ Map<String,Object> map = new HashMap<String,Object>(); map.put(Const.RESPONSE_STATE, 500); try { merchantssettledServiceImpl.deleteMerchantsSettled(id); map.put(Const.RESPONSE_STATE, Const.RESPONSE_SUCCESS); } catch (Exception e) { e.printStackTrace(); map.put(Const.ERROR_INFO, "保存异常,请稍后重试!!!"); } return map; } }
[ "tw l" ]
tw l
d2e89f6287dbe0c94c73ccc0aea7eb226b119b7e
31b7d2067274728a252574b2452e617e45a1c8fb
/icom-bean-info/icom/info/MimeConvertibleInfo.java
2856855462f8b1cf1f23396eb524fc02506a19e4
[]
no_license
ericschan/open-icom
c83ae2fa11dafb92c3210a32184deb5e110a5305
c4b15a2246d1b672a8225cbb21b75fdec7f66f22
refs/heads/master
2020-12-30T12:22:48.783144
2017-05-28T00:51:44
2017-05-28T00:51:44
91,422,338
0
0
null
null
null
null
UTF-8
Java
false
false
1,998
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER * * Copyright (c) 2010, Oracle Corporation All Rights Reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License ("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can obtain * a copy of the License at http://openjdk.java.net/legal/gplv2+ce.html. * See the License for the specific language governing permission and * limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at openICOM/bootstrap/legal/LICENSE.txt. * Oracle designates this particular file as subject to the "Classpath" exception * as provided by Oracle in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the License * Header, with the fields enclosed by brackets [ ] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]. * * Contributor(s): Oracle Corporation * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package icom.info; public interface MimeConvertibleInfo extends IdentifiableInfo { }
[ "eric.sn.chan@gmail.com" ]
eric.sn.chan@gmail.com
96068570f3c5e33fb08f2a54fe5d58bec92c021e
31a0206b5ad8166c66209fedca5f3d64b44612da
/sqlparser/src/main/java/com/provys/db/sqlparser/impl/ParsedBind.java
7fc5def573d0517e2e79cc0a2124fcba7bd6c3ad
[]
no_license
nebal77/provysdb
95d9af6476e1d3db5cf98758fd2f73850d43a6a5
6ea5cb53a4e00797cc63cd1feb5d0b09f1fd4316
refs/heads/master
2022-09-30T09:22:25.909760
2020-06-06T08:52:23
2020-06-06T08:52:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,907
java
package com.provys.db.sqlparser.impl; import com.google.errorprone.annotations.Immutable; import com.provys.db.query.elements.QueryConsumer; import com.provys.db.query.names.BindMap; import com.provys.db.query.names.BindVariable; import com.provys.db.sqlparser.SqlToken; import com.provys.db.sqlparser.SqlTokenType; import java.util.Collection; import java.util.List; import org.checkerframework.checker.nullness.qual.Nullable; @Immutable final class ParsedBind extends ParsedTokenBase { private final BindVariable bindVariable; ParsedBind(int line, int pos, BindVariable bindVariable) { super(line, pos); this.bindVariable = bindVariable; } ParsedBind(int line, int pos, String name) { this(line, pos, new BindVariable(name)); } BindVariable getBindVariable() { return bindVariable; } @Override public SqlTokenType getTokenType() { return SqlTokenType.BIND; } @Override public Collection<BindVariable> getBinds() { return List.of(bindVariable); } @Override public SqlToken mapBinds(BindMap bindMap) { return new ParsedBind(getLine(), getPos(), bindMap.get(bindVariable.getName())); } @Override public void apply(QueryConsumer consumer) { consumer.bind(bindVariable.getType(), bindVariable); } @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } ParsedBind that = (ParsedBind) o; return bindVariable.equals(that.bindVariable); } @Override public int hashCode() { int result = super.hashCode(); result = 31 * result + bindVariable.hashCode(); return result; } @Override public String toString() { return "ParsedBind{" + "bindVariable=" + bindVariable + ", " + super.toString() + '}'; } }
[ "michal.stehlik.cz@gmail.com" ]
michal.stehlik.cz@gmail.com
776d02826318dc16db81514911a7064bcad5b7d8
8dab0290bd9a8864579082af4391c71d6126a119
/src/main/java/ro/autoepc/rabbitmqmonitoring/repository/AuthorityRepository.java
55876005bb68993e299cd9112aa7ac0c455f99fe
[]
no_license
lovercoder/rabbitmq-monitoring
1d2306ee470e0eb9d336219df3d5d8a65ffdd23d
ebdca426d32fb36c0fa0bc1d3b268afe899e2f98
refs/heads/master
2020-04-12T14:33:00.559384
2018-07-24T21:44:30
2018-07-24T21:44:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
316
java
package ro.autoepc.rabbitmqmonitoring.repository; import ro.autoepc.rabbitmqmonitoring.domain.Authority; import org.springframework.data.jpa.repository.JpaRepository; /** * Spring Data JPA repository for the Authority entity. */ public interface AuthorityRepository extends JpaRepository<Authority, String> { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
163ce34e30bd415bd256cf48a2ea25b6acb77cef
4b5d5dc67970d34e7cb55040e849a9de9d77b612
/part5_javaweb_bbs/src/main/java/service/Test.java
3933b2b9198b470c989e9b540aeac409b3fadc74
[]
no_license
robin2017/cete28
9b74b36bda8139b59394e861b5ab0e446d7cfa2c
4fe0feb2e890eadceed8d9f858fc55ee8649d1d1
refs/heads/master
2021-09-12T14:28:41.993102
2018-04-17T16:03:06
2018-04-17T16:03:06
100,281,174
0
0
null
null
null
null
UTF-8
Java
false
false
199
java
package service; public class Test { /** * @param args */ public static void main(String[] args) { ProductService ps = new ProductService(); System.out.println(ps.getAll().size()); } }
[ "robin.seu@foxmail.com" ]
robin.seu@foxmail.com
c11bb44dbf993b16f8a6c29740db235eb323da59
24e470b99ffb690318885facf392b732f4b428c0
/design/src/main/java/parttern/strategy/example4/CooperateCustomerStrategy.java
1b1a3cc6ebb7bad0d655cda67becc4f34af234af
[]
no_license
siegluo/demo
3fe247ca450c4d1343944317f077fd20f5242fee
4a3eeec89bb5da95e94ed4db72f0812ee66d6dd4
refs/heads/master
2022-07-13T10:51:03.826126
2019-06-20T05:03:45
2019-06-20T05:03:45
142,255,539
76
10
null
2022-06-21T01:04:19
2018-07-25T06:13:10
Java
GB18030
Java
false
false
316
java
package parttern.strategy.example4; /** * 具体算法实现,为战略合作客户客户计算应报的价格 */ public class CooperateCustomerStrategy implements Strategy{ public double calcPrice(double goodsPrice) { System.out.println("对于战略合作客户,统一8折"); return goodsPrice*0.8; } }
[ "jie.luo@Ctrip.com" ]
jie.luo@Ctrip.com
656bd68afcd4542f455d1e9d90c52d6c87346a72
dcc33a63b1d5a39910c957ca79f76a253c4eaa45
/simpleJavaContainer/src/main/java/ch/trivadis/com/service/SimpleService.java
9920b0d8f8bdc3d68d020072220a2551730154c8
[ "Apache-2.0" ]
permissive
amoAHCP/demos-cloud-bootcamp
55f543afe8da001ba434af495d2431b90cc17652
4ba3ab2083375b78c0189fcbffcd98f16e0911f7
refs/heads/master
2021-06-12T03:29:48.906730
2017-02-23T11:31:02
2017-02-23T11:31:02
63,695,684
1
0
null
null
null
null
UTF-8
Java
false
false
210
java
package ch.trivadis.com.service; /** * Created by Andy Moncsek on 19.07.16. */ public class SimpleService { public static void main(String[] args) { System.out.println("Hello World"); } }
[ "amo.ahcp@gmail.com" ]
amo.ahcp@gmail.com
8d14a3842db528d8b55085c5de1c909f217e2eb5
0a5bb71fea67b66a8639f7c6bc7aa68f71cd8214
/ecrm-s/src/main/java/com/maven/service/impl/WorkingFlowConfigurationServiceImpl.java
8cbb5ea7a43f66d99597de67c714f7a01fedeb5d
[]
no_license
daxingyou/bw
4e4e100c1428153ccc54d5ded2119840c839841d
b7a3021fe13969510fbcf35b82982617c090e57d
refs/heads/master
2022-01-07T22:30:09.117772
2019-01-14T09:19:06
2019-01-14T09:19:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,888
java
package com.maven.service.impl; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.maven.base.dao.BaseDao; import com.maven.cache.SystemCache; import com.maven.constant.Constant; import com.maven.dao.WorkingFlowConfigurationDao; import com.maven.entity.WorkingFlowConfiguration; import com.maven.service.WorkingFlowConfigurationService; import com.maven.service.WorkingFlowObjectService; import com.maven.util.AttrCheckout; @Service public class WorkingFlowConfigurationServiceImpl extends BaseServiceImpl<WorkingFlowConfiguration> implements WorkingFlowConfigurationService{ @Autowired private WorkingFlowConfigurationDao workingFlowConfigurationDao; @Autowired private WorkingFlowObjectService workingFlowObjectService; @Override public BaseDao<WorkingFlowConfiguration> baseDao() { return workingFlowConfigurationDao; } @Override public Class<WorkingFlowConfiguration> getClazz() { return WorkingFlowConfiguration.class; } @Override public List<WorkingFlowConfiguration> queryRechargeWorkingFlow(Map<String, Object> object) throws Exception { object.put("flowtype", WorkingFlowConfiguration.Enum_flowtype.存款工作流.value); object.put("status", Constant.Enum_DataStatus.正常.value); return super.selectAll(AttrCheckout.checkout(object,false, new String[]{"enterprisecode","flowtype","status"})); } @Override public int queryRechargeWorkingFlowCount(Map<String, Object> object) throws Exception { object.put("flowtype", WorkingFlowConfiguration.Enum_flowtype.存款工作流.value); object.put("status", Constant.Enum_DataStatus.正常.value); return super.selectAllCount(AttrCheckout.checkout(object,false, new String[]{"enterprisecode","flowtype","status"})); } @Override public int addRechargeWorkingFlow(WorkingFlowConfiguration workflow) throws Exception { AttrCheckout.checkout(workflow, false, new String[]{"enterprisecode","handletime","enable","flowsort","flowthreshold"}); workflow.setFlowtype((short)WorkingFlowConfiguration.Enum_flowtype.存款工作流.value); this.updateSort(workflow); super.add(workflow); SystemCache.getInstance().getWorkflow().reload(workflow.getEnterprisecode()); return 1; } @Override public int editRechargeWorkingFlow(WorkingFlowConfiguration workflow) throws Exception { AttrCheckout.checkout(workflow, false,new String[]{"flowcode","enterprisecode"}); workflow.setFlowtype((short)WorkingFlowConfiguration.Enum_flowtype.存款工作流.value); this.updateSort(workflow); super.update(workflow); SystemCache.getInstance().getWorkflow().reload(workflow.getEnterprisecode()); return 1; } @Override public List<WorkingFlowConfiguration> queryWithdrawlWorkingFlow(Map<String, Object> object) throws Exception { object.put("flowtype", WorkingFlowConfiguration.Enum_flowtype.取款工作流.value); object.put("status", Constant.Enum_DataStatus.正常.value); return super.selectAll(AttrCheckout.checkout(object, false, new String[]{"enterprisecode","flowtype","status"})); } @Override public int queryWithdrawlWorkingFlowCount(Map<String, Object> object) throws Exception { object.put("flowtype", WorkingFlowConfiguration.Enum_flowtype.取款工作流.value); object.put("status", Constant.Enum_DataStatus.正常.value); return super.selectAllCount(AttrCheckout.checkout(object, false, new String[]{"enterprisecode","flowtype","status"})); } @Override public int addWithdrawlWorkingFlow(WorkingFlowConfiguration workflow) throws Exception { AttrCheckout.checkout(workflow, false, new String[]{"enterprisecode","handletime","enable","flowsort","flowthreshold"}); workflow.setFlowtype((short)WorkingFlowConfiguration.Enum_flowtype.取款工作流.value); this.updateSort(workflow); super.add(workflow); SystemCache.getInstance().getWorkflow().reload(workflow.getEnterprisecode()); return 1; } @Override public int editWithdrawlWorkingFlow(WorkingFlowConfiguration workflow) throws Exception { AttrCheckout.checkout(workflow, false,new String[]{"flowcode","enterprisecode"}); workflow.setFlowtype((short)WorkingFlowConfiguration.Enum_flowtype.取款工作流.value); this.updateSort(workflow); super.update(workflow); SystemCache.getInstance().getWorkflow().reload(workflow.getEnterprisecode()); return 1; } @Override public int delWorkingFlow(String flowcode,String enterprisecode) throws Exception{ Map<String,Object> object = new HashMap<String, Object>(); object.put("flowcode", flowcode); object.put("datastatus", Constant.Enum_DataStatus.删除.value); super.update(AttrCheckout.checkout(object,false, new String[]{"flowcode","datastatus"})); workingFlowObjectService.deleteObjectByFlowcode(flowcode); SystemCache.getInstance().getWorkflow().reload(enterprisecode); return 1; } /** * 查用户是否在存款或取款流程里面 */ @Override public int selectByEmployeecodeCount(String employeecode,String enterprisecode,WorkingFlowConfiguration.Enum_flowtype flowtype) throws Exception{ Map<String,Object> object = new HashMap<String, Object>(); object.put("enterprisecode", enterprisecode); object.put("flowtype", flowtype.value); object.put("status", Constant.Enum_DataStatus.正常.value); int count = 0; List<WorkingFlowConfiguration> list = super.selectAll(object); for (WorkingFlowConfiguration workingFlowConfiguration : list) { count += workingFlowObjectService.selectByEmployeecode(employeecode, workingFlowConfiguration.getFlowcode()); } return count; } private int updateSort(Object object) throws Exception{ AttrCheckout.checkout(object, false, new String[]{"enterprisecode","flowsort","flowtype"}); workingFlowConfigurationDao.updateSort(object); return 1; } }
[ "sunny@gmail.com" ]
sunny@gmail.com
1c6e55ab64993959dd36027a72fe2f630f6db61e
97a16cacae9dad45c7beb5877ea6e44aac80a297
/s2robot/src/main/java/org/seasar/robot/S2RobotContext.java
3491ac3259068a367eff98950f1b10262274ebb6
[]
no_license
seasarorg/s2robot
036d64f75ff95567f6794375d6cbeb84dea3f04e
d1e3e9e9fac9a0096676821c111bccfd24c144c0
refs/heads/master
2021-01-10T21:43:11.612640
2015-05-06T08:49:50
2015-05-06T08:49:50
13,318,211
1
0
null
null
null
null
UTF-8
Java
false
false
4,575
java
/* * Copyright 2004-2014 the Seasar Foundation and the Others. * * 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.seasar.robot; import java.util.Set; import org.seasar.robot.filter.UrlFilter; import org.seasar.robot.interval.IntervalController; import org.seasar.robot.rule.RuleManager; import org.seasar.robot.util.LruHashSet; /** * @author shinsuke * */ public class S2RobotContext { protected String sessionId; protected Integer activeThreadCount = 0; protected Object activeThreadCountLock = new Object(); protected volatile Long accessCount = 0L; // NOPMD protected Object accessCountLock = new Object(); protected volatile boolean running = false; // NOPMD protected UrlFilter urlFilter; protected RuleManager ruleManager; protected IntervalController intervalController; protected Set<String> robotTxtUrlSet = new LruHashSet<String>(10000); protected ThreadLocal<String[]> sitemapsLocal = new ThreadLocal<String[]>(); /** The number of a thread */ protected int numOfThread = 10; protected int maxThreadCheckCount = 20; /** a max depth for crawling. -1 is no depth check. */ protected int maxDepth = -1; /** a max count to access urls. 0 is no limit to access it. */ protected long maxAccessCount = 0; public String getSessionId() { return sessionId; } public void setSessionId(final String sessionId) { this.sessionId = sessionId; } public Integer getActiveThreadCount() { return activeThreadCount; } public void setActiveThreadCount(final Integer activeThreadCount) { this.activeThreadCount = activeThreadCount; } public Long getAccessCount() { return accessCount; } public void setAccessCount(final Long accessCount) { this.accessCount = accessCount; } public boolean isRunning() { return running; } public void setRunning(final boolean running) { this.running = running; } public UrlFilter getUrlFilter() { return urlFilter; } public void setUrlFilter(final UrlFilter urlFilter) { this.urlFilter = urlFilter; } public RuleManager getRuleManager() { return ruleManager; } public void setRuleManager(final RuleManager ruleManager) { this.ruleManager = ruleManager; } public IntervalController getIntervalController() { return intervalController; } public void setIntervalController( final IntervalController intervalController) { this.intervalController = intervalController; } public Set<String> getRobotTxtUrlSet() { return robotTxtUrlSet; } public void setRobotTxtUrlSet(final Set<String> robotTxtUrlSet) { this.robotTxtUrlSet = robotTxtUrlSet; } public Object getActiveThreadCountLock() { return activeThreadCountLock; } public Object getAccessCountLock() { return accessCountLock; } public int getNumOfThread() { return numOfThread; } public void setNumOfThread(final int numOfThread) { this.numOfThread = numOfThread; } public int getMaxThreadCheckCount() { return maxThreadCheckCount; } public void setMaxThreadCheckCount(final int maxThreadCheckCount) { this.maxThreadCheckCount = maxThreadCheckCount; } public int getMaxDepth() { return maxDepth; } public void setMaxDepth(final int maxDepth) { this.maxDepth = maxDepth; } public long getMaxAccessCount() { return maxAccessCount; } public void setMaxAccessCount(final long maxAccessCount) { this.maxAccessCount = maxAccessCount; } public void addSitemaps(final String[] sitemaps) { sitemapsLocal.set(sitemaps); } public String[] removeSitemaps() { final String[] sitemaps = sitemapsLocal.get(); if (sitemaps != null) { sitemapsLocal.remove(); } return sitemaps; } }
[ "shinsuke@yahoo.co.jp" ]
shinsuke@yahoo.co.jp
81e53405f62303c2b401668742369db85369ec36
9d640c8350122bc367bb67355f27ad1ddf731cf6
/javamodel/src/main/java/com/study/javamodel/javadesignmodel/bridgemodel/HighSpeed.java
7e412b3199cd66f7fc88f7d59f22f44a947bbc15
[]
no_license
fuLinHu/designModel
8cbd2260cdf62ecf9c2bf438ec01ddc70b9b7242
9358fd157a6373038a924a8501916cbf380dc986
refs/heads/master
2022-09-27T13:30:16.689895
2021-11-19T06:48:25
2021-11-19T06:48:25
165,197,804
0
0
null
2022-09-01T23:45:10
2019-01-11T07:18:51
HTML
UTF-8
Java
false
false
372
java
package com.study.javamodel.javadesignmodel.bridgemodel; /** * @className * @Description TODO * @Author 付林虎 * @Date 2020/8/3 19:49 * @Version V1.0 */ public class HighSpeed extends Bridge{ public HighSpeed(Car car) { super(car); } @Override public void run() { System.out.println("在高铁上"); car.run(); } }
[ "1205668006@qq.com" ]
1205668006@qq.com
4860368f5f6141db3bdc80049906ae23f889bb54
5edf88e2ac091ef261842a1d9b594c358f2e442c
/src/UN_EDIFACT/D96A/E1508.java
d369cd5b3166bb3217fa5b145610ed25c708ff87
[]
no_license
BohseOnkel63/EDIframe
63700caa7f87eb20cac9e1c4445d5b7d260564b3
7385de5c55518fb8ea1e5946529d91de69212601
refs/heads/master
2021-07-06T15:33:31.692744
2017-10-12T06:12:56
2017-10-12T06:12:56
35,657,733
0
0
null
null
null
null
UTF-8
Java
false
false
379
java
package UN_EDIFACT.D96A; import UN_EDIFACT.Element; /** * UN-EDIFACT D.96A * 1508 File name an..35 * Name assigned to a file. */ public class E1508 extends Element { public E1508() { this(null); } public E1508(String Content) { super("1508", "File name", "an..35", "Name assigned to a file.", ""); this.setContent(Content); } }
[ "ilkka.mannelin@iki.fi" ]
ilkka.mannelin@iki.fi
671b8f3b3f24bdd29fa1404026e93012eb6af6d8
60f0c4a399efcf4010de48af3dc2157f86757069
/ninja-types-generic/src/main/java/org/flowninja/types/net/ICMPCode.java
6bb9eac0ed1a7e051152ff72aaf1a686f44a925b
[ "Apache-2.0" ]
permissive
rbieniek/flow-ninja
9036e2eb84f709489478b8ada696efb788b983ab
dcc0e23514e455dfdce666093e2cac3772c7e7e5
refs/heads/master
2021-01-20T10:32:29.651045
2015-07-17T18:57:58
2015-07-17T18:57:58
31,513,255
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
/** * */ package org.flowninja.types.net; /** * @author rainer * */ public enum ICMPCode { UNASSIGNED, NO_CODE, // Type 3 - Destination unreachable NET_UNREACHABLE, HOST_UNREACABLE, PROTOCOL_UNREACHABLE, PORT_UNREACHABLE, FRAGMENTATION_NEEDED, SOURCE_ROUTE_FAILED, DESTINATION_NETWORK_UNKNWON, DESTINATION_HOST_UNKNOWN, SOURCE_HOST_ISOLATED, COMMUNICATION_DESTINATION_NETWORK_ADMINSTRATIVELY_PROHIBITED, COMMUNICATION_DESTINATION_HOST_ADMINSTRATIVELY_PROHIBITED, DESTINATION_NETWORK_UNREACHABLE, DESTINATION_HOST_UNREACHABLE, COMMUNICATION_ADMINSTRATIVELY_PROHIBITED, HOST_PRECEDENCE_VIOLATION, PRECEDENCE_CUTOFF, // Type 5 - Redirect REDIRECT_FOR_NETWORK, REDIRECT_FOR_HOST, REDIRECT_FOR_TOS_AND_NETWORK, REDIRECT_FOR_TOS_AND_HOST, // Type 6 - Alternate Host Address ALTERNATE_ADDRESS_FOR_HOST, // Type 9 - Router advertisement NORMAL_ROUTER_ADVERTISEMENT, DOES_NOT_ROUTE_COMMON_TRAFFIC, // Type 11 - Time exceeded TTL_EXCEED_IN_TRANSIT, REASSEMABLY_TIME_EXCEEDED, // Type 12 - Parameter problem POINTER_INDICATES_ERROR, MISSING_REQUIRED_OPTION, BAD_LENGTH, // Type 40 - Photuris BAD_SPI, AUTHENTICATION_FAILED, DECOMPRESSION_FAILED, DECRYPTION_FAILED, NEED_AUTHENTICATION, NEED_AUTHORIZATION }
[ "Rainer.Bieniek@web.de" ]
Rainer.Bieniek@web.de
7ecdbf04f7916054ca0d965a5243dd6a1f7c8685
bdcdcf52c63a1037786ac97fbb4da88a0682e0e8
/src/test/java/io/akeyless/client/model/GatewayMigrationSyncOutputTest.java
9c4720ce97d013e0ede433b90a5a54bb1cdc5d04
[ "Apache-2.0" ]
permissive
akeylesslabs/akeyless-java
6e37d9ec59d734f9b14e475ce0fa3e4a48fc99ea
cfb00a0e2e90ffc5c375b62297ec64373892097b
refs/heads/master
2023-08-03T15:06:06.802513
2023-07-30T11:59:23
2023-07-30T11:59:23
341,514,151
2
4
Apache-2.0
2023-07-11T08:57:17
2021-02-23T10:22:38
Java
UTF-8
Java
false
false
1,308
java
/* * Akeyless API * The purpose of this application is to provide access to Akeyless API. * * The version of the OpenAPI document: 2.0 * Contact: support@akeyless.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package io.akeyless.client.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for GatewayMigrationSyncOutput */ public class GatewayMigrationSyncOutputTest { private final GatewayMigrationSyncOutput model = new GatewayMigrationSyncOutput(); /** * Model tests for GatewayMigrationSyncOutput */ @Test public void testGatewayMigrationSyncOutput() { // TODO: test GatewayMigrationSyncOutput } /** * Test the property 'migrationName' */ @Test public void migrationNameTest() { // TODO: test migrationName } }
[ "github@akeyless.io" ]
github@akeyless.io
523c502b7b3bbdbb0aa99468a9c1c563ad902504
ceaf9fdd1e2b767c86bc0e3b055bd665c782ad98
/app/src/main/java/ke/co/besure/besure/activity/ReproHealthActivity.java
bf58569c93203434b009e189d7ad1a57303867a5
[]
no_license
johnotaalo/BesureV2
f354bfd15fa1ffd34bb43831d946e7f9a8a9c9d0
d1991a6e28de7d5b6c5044a5466bcb4b2797f3b7
refs/heads/master
2021-06-24T22:10:44.535448
2020-11-30T10:50:08
2020-11-30T10:50:08
155,746,205
0
0
null
null
null
null
UTF-8
Java
false
false
1,956
java
package ke.co.besure.besure.activity; import android.database.Cursor; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.webkit.WebView; import android.widget.TextView; import ke.co.besure.besure.Database.DB; import ke.co.besure.besure.R; import ke.co.besure.besure.model.ReproHealthResource; import ke.co.besure.besure.provider.ReproHealthProvider; public class ReproHealthActivity extends AppCompatActivity { WebView htmlContent; String section = ""; DB mDB; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_repro_health); mDB = new DB(this); section = getIntent().getStringExtra("section"); htmlContent = findViewById(R.id.htmlContent); initToolbar(); ReproHealthResource fact = getFact(); htmlContent.loadData(fact.getContent(), "text/html; charset=utf-8", "utf-8"); } private void initToolbar(){ Toolbar myToolbar = findViewById(R.id.my_toolbar); TextView title = myToolbar.findViewById(R.id.toolbar_title); // title.setText(""); myToolbar.setTitle(""); setSupportActionBar(myToolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); } private ReproHealthResource getFact(){ ReproHealthResource fact = new ReproHealthResource(); Cursor cursor = this.getContentResolver().query(ReproHealthProvider.CONTENT_URI, null, "section=?",new String[]{section}, null); if (cursor.moveToFirst()){ fact = new ReproHealthResource(cursor.getInt(cursor.getColumnIndex(DB.ID)), cursor.getString(cursor.getColumnIndex(mDB.SECTION_COLUMN)), cursor.getString(cursor.getColumnIndex(mDB.CONTENT_COLUMN))); } return fact; } }
[ "=" ]
=
da51ba5b70d5e3d3e124cad8446e9cb9a7b3a229
674b10a0a3e2628e177f676d297799e585fe0eb6
/src/main/java/com/google/android/material/bottomappbar/BottomAppBarTopEdgeTreatment.java
923a1d01855442e38f3bdf4b8ddaac1c5f324960
[]
no_license
Rune-Status/open-osrs-osrs-android
091792f375f1ea118da4ad341c07cb73f76b3e03
551b86ab331af94f66fe0dcb3adc8242bf3f472f
refs/heads/master
2020-08-08T03:32:10.802605
2019-10-08T15:50:18
2019-10-08T15:50:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,088
java
package com.google.android.material.bottomappbar; import com.google.android.material.shape.EdgeTreatment; import com.google.android.material.shape.ShapePath; public class BottomAppBarTopEdgeTreatment extends EdgeTreatment { private static final int ANGLE_LEFT = 180; private static final int ANGLE_UP = 270; private static final int ARC_HALF = 180; private static final int ARC_QUARTER = 90; private float cradleVerticalOffset; private float fabDiameter; private float fabMargin; private float horizontalOffset; private float roundedCornerRadius; public BottomAppBarTopEdgeTreatment(float arg1, float arg2, float arg3) { super(); this.fabMargin = arg1; this.roundedCornerRadius = arg2; this.cradleVerticalOffset = arg3; if(arg3 >= 0f) { this.horizontalOffset = 0f; return; } throw new IllegalArgumentException("cradleVerticalOffset must be positive."); } float getCradleVerticalOffset() { return this.cradleVerticalOffset; } public void getEdgePath(float arg21, float arg22, ShapePath arg23) { BottomAppBarTopEdgeTreatment v0 = this; float v1 = arg21; ShapePath v9 = arg23; if(v0.fabDiameter == 0f) { v9.lineTo(v1, 0f); return; } float v11 = 2f; float v12 = (v0.fabMargin * v11 + v0.fabDiameter) / v11; float v13 = arg22 * v0.roundedCornerRadius; float v14 = v1 / v11 + v0.horizontalOffset; float v15 = v0.cradleVerticalOffset * arg22 + (1f - arg22) * v12; if(v15 / v12 >= 1f) { v9.lineTo(v1, 0f); return; } float v2 = v12 + v13; float v3 = v15 + v13; v2 = ((float)Math.sqrt(((double)(v2 * v2 - v3 * v3)))); float v4 = v14 - v2; float v16 = v14 + v2; float v8 = ((float)Math.toDegrees(Math.atan(((double)(v2 / v3))))); float v17 = 90f - v8; v3 = v4 - v13; v9.lineTo(v3, 0f); float v18 = v13 * v11; arg23.addArc(v3, 0f, v4 + v13, v18, 270f, v8); arg23.addArc(v14 - v12, -v12 - v15, v14 + v12, v12 - v15, 180f - v17, v17 * v11 - 180f); arg23.addArc(v16 - v13, 0f, v16 + v13, v18, 270f - v8, v8); v9.lineTo(v1, 0f); } float getFabCradleMargin() { return this.fabMargin; } float getFabCradleRoundedCornerRadius() { return this.roundedCornerRadius; } float getFabDiameter() { return this.fabDiameter; } float getHorizontalOffset() { return this.horizontalOffset; } void setCradleVerticalOffset(float arg1) { this.cradleVerticalOffset = arg1; } void setFabCradleMargin(float arg1) { this.fabMargin = arg1; } void setFabCradleRoundedCornerRadius(float arg1) { this.roundedCornerRadius = arg1; } void setFabDiameter(float arg1) { this.fabDiameter = arg1; } void setHorizontalOffset(float arg1) { this.horizontalOffset = arg1; } }
[ "kslrtips@gmail.com" ]
kslrtips@gmail.com
857b9f429b4543f9aab71eec103aa89f3b65176f
456e5df877c8b7b786c8bbdee9066aa4480f92d3
/CoreNLP/src/edu/stanford/nlp/process/StripTagsProcessor.java
d0e5fa7f1e045cb07dd28887ad8f25a5c1e9f0b6
[]
no_license
matthewgarber/COSI_134_Final
763882c4b25fe6fe4192c4f3986b33931b6217d1
5dbadc01af73fc7068b0a156d383f6f126dae1e5
refs/heads/master
2021-01-12T06:59:42.702118
2016-12-19T20:13:39
2016-12-19T20:13:39
76,886,459
0
0
null
null
null
null
UTF-8
Java
false
false
4,658
java
package edu.stanford.nlp.process; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Set; import edu.stanford.nlp.ling.BasicDocument; import edu.stanford.nlp.ling.Document; import edu.stanford.nlp.ling.Word; import edu.stanford.nlp.util.Generics; /** * A <code>Processor</code> whose <code>process</code> method deletes all * SGML/XML/HTML tags (tokens starting with <code>&lt;</code> and ending * with <code>&gt;<code>. Optionally, newlines can be inserted after the * end of block-level tags to roughly simulate where continuous text was * broken up (this helps finding sentence boundaries for example). * * @author Christopher Manning * @author Sarah Spikes (sdspikes@cs.stanford.edu) (Templatization) * * @param <L> The type of the labels * @param <F> The type of the features */ public class StripTagsProcessor<L, F> extends AbstractListProcessor<Word, Word, L, F> { private static final Set<String> BLOCKTAGS = Generics.newHashSet(Arrays.asList( "blockquote", "br", "div", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "li", "ol", "p", "pre", "table", "tr", "ul")); /** * Block-level HTML tags that are rendered with surrounding line breaks. */ public static final Set<String> blockTags = BLOCKTAGS; /** * Whether to insert "\n" words after ending block tags. */ private boolean markLineBreaks; /** * Constructs a new StripTagsProcessor that doesn't mark line breaks. */ public StripTagsProcessor() { this(false); } /** * Constructs a new StripTagProcessor that marks line breaks as specified. */ public StripTagsProcessor(boolean markLineBreaks) { setMarkLineBreaks(markLineBreaks); } /** * Returns whether the output of the processor will contain newline words * ("\n") at the end of block-level tags. * * @return Whether the output of the processor will contain newline words * ("\n") at the end of block-level tags. */ public boolean getMarkLineBreaks() { return (markLineBreaks); } /** * Sets whether the output of the processor will contain newline words * ("\n") at the end of block-level tags. */ public void setMarkLineBreaks(boolean markLineBreaks) { this.markLineBreaks = markLineBreaks; } /** * Returns a new Document with the same meta-data as <tt>in</tt>, * and the same words except tags are stripped. */ public List<Word> process(List<? extends Word> in) { List<Word> out = new ArrayList<>(); boolean justInsertedNewline = false; // to prevent contiguous newlines for (Word w : in) { String ws = w.word(); if (ws.startsWith("<") && ws.endsWith(">")) { if (markLineBreaks && !justInsertedNewline) { // finds start and end of tag name (ignores brackets and /) // e.g. <p>, <br/>, or </table> // se s e s e int tagStartIndex = 1; while (tagStartIndex < ws.length() && !Character.isLetter(ws.charAt(tagStartIndex))) { tagStartIndex++; } if (tagStartIndex == ws.length()) { continue; // no tag text } int tagEndIndex = ws.length() - 1; while (tagEndIndex > tagStartIndex && !Character.isLetterOrDigit(ws.charAt(tagEndIndex))) { tagEndIndex--; } // looks up tag name in list of known block-level tags String tagName = ws.substring(tagStartIndex, tagEndIndex + 1).toLowerCase(); if (blockTags.contains(tagName)) { out.add(new Word("\n")); // mark newline for block-level tags justInsertedNewline = true; } } } else { out.add(w); // normal word justInsertedNewline = false; } } return out; } /** * For internal debugging purposes only. */ public static void main(String[] args) { new BasicDocument<String>(); Document<String, Word, Word> htmlDoc = BasicDocument.init("top text <h1>HEADING text</h1> this is <p>new paragraph<br>next line<br/>xhtml break etc."); System.out.println("Before:"); System.out.println(htmlDoc); Document<String, Word, Word> txtDoc = new StripTagsProcessor<String, Word>(true).processDocument(htmlDoc); System.out.println("After:"); System.out.println(txtDoc); Document<String, Word, List<Word>> sentences = new WordToSentenceProcessor<Word>().processDocument(txtDoc); System.out.println("Sentences:"); System.out.println(sentences); } }
[ "mgarber@brandeis.edu" ]
mgarber@brandeis.edu
318e57cfc4e7809c3fed0786731bec3d0b1a2ac0
e6ff41c620db6ca522291088de3a8ee9a4b40127
/NPJ/project/workspace1/DKS/src/examples/events/MySimpleDeliverEvent.java
aae8705f65c87ed229084c04586d312c9acfc012
[]
no_license
WinLAFS/kthsedsav
0df61c7ccc2de6720d880628a92673027e615f9a
e2d6347ac87502b40d394b380e2c9c302f6de5ef
refs/heads/master
2020-06-06T17:27:38.779205
2010-05-19T21:07:45
2010-05-19T21:07:45
35,384,630
0
0
null
null
null
null
UTF-8
Java
false
false
649
java
/* * Distributed K-ary System (DKS) * A Peer-to-Peer Middleware * Copyright (c) 2003-2007, all rights reserved * Royal Institute of Technology (KTH) * Swedish Institute of Computer Science (SICS) * * See the file DKSLICENSE.TXT included in this distribution for details. */ package examples.events; import dks.bcast.events.SimpleIntervalBroadcastDeliverEvent; /** * The <code>MySimpleDeliverEvent</code> class * * @author Roberto Roverso * @author Cosmin Arad * @version $Id: MySimpleDeliverEvent.java 294 2006-05-05 17:14:14Z alshishtawy $ */ public class MySimpleDeliverEvent extends SimpleIntervalBroadcastDeliverEvent { }
[ "shumanski@9a21e158-ce10-11de-8d2e-8bf2cb4fc7ae" ]
shumanski@9a21e158-ce10-11de-8d2e-8bf2cb4fc7ae
553e6eaed50a2616dc03340cc8aa88c9315603c6
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project39/src/test/java/org/gradle/test/performance39_1/Test39_80.java
2776086c341770d308f7806226655f8debef787b
[]
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
289
java
package org.gradle.test.performance39_1; import static org.junit.Assert.*; public class Test39_80 { private final Production39_80 production = new Production39_80("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
1eca0bf70fea0277b830669423ed7b832548aab1
26306cde939e087c487637d82d744e4e33cb8613
/search-mapper/src/main/java/org/hibernate/search/annotations/Fields.java
6748c98a83561cbcda96618de72adce9e514ee48
[ "LicenseRef-scancode-dco-1.1", "Apache-2.0" ]
permissive
jermarchand/infinispan
247196f1b348da55eb03d413082b42fbfead2570
cb510481d1bf6dd54018e63f87a0b0ba5db560bf
refs/heads/master
2023-01-04T04:20:41.189815
2020-09-29T15:22:39
2020-09-30T13:52:18
300,214,470
0
0
Apache-2.0
2020-10-01T09:02:59
2020-10-01T09:02:59
null
UTF-8
Java
false
false
865
java
/* * Hibernate Search, full-text search for your domain model * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.search.annotations; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Mark a property as indexable into different fields * Useful if the field is used for sorting and searching * * @author Emmanuel Bernard */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.FIELD}) @Documented public @interface Fields { /** * @return the {@link Field} annotations to use for the property */ Field[] value(); }
[ "tristan.tarrant@gmail.com" ]
tristan.tarrant@gmail.com
a21d8124bd221a553a7450af3bd4303ed2e03871
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_478/Testnull_47739.java
6a6fa0e67dc0cfbfbff418afb1351e1859f6424c
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_478; import static org.junit.Assert.*; public class Testnull_47739 { private final Productionnull_47739 production = new Productionnull_47739("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
75439de5a94e2a68fb52eca7d3375c3016748a43
5598faaaaa6b3d1d8502cbdaca903f9037d99600
/code_changes/Apache_projects/HADOOP-2095/7d941288e6a4a3a4e26cf09d37cfae9917363b28/ZlibFactory.java
90f4bb1a5ab00c7cc01fdb1a4bad23356aa31085
[]
no_license
SPEAR-SE/LogInBugReportsEmpirical_Data
94d1178346b4624ebe90cf515702fac86f8e2672
ab9603c66899b48b0b86bdf63ae7f7a604212b29
refs/heads/master
2022-12-18T02:07:18.084659
2020-09-09T16:49:34
2020-09-09T16:49:34
286,338,252
0
2
null
null
null
null
UTF-8
Java
false
false
3,831
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.hadoop.io.compress.zlib; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.compress.Compressor; import org.apache.hadoop.io.compress.Decompressor; import org.apache.hadoop.util.NativeCodeLoader; /** * A collection of factories to create the right * zlib/gzip compressor/decompressor instances. * */ public class ZlibFactory { private static final Log LOG = LogFactory.getLog("org.apache.hadoop.io.compress.zlib.ZlibFactory"); private static boolean nativeZlibLoaded = false; static { if (NativeCodeLoader.isNativeCodeLoaded()) { nativeZlibLoaded = ZlibCompressor.isNativeZlibLoaded() && ZlibDecompressor.isNativeZlibLoaded(); if (nativeZlibLoaded) { LOG.info("Successfully loaded & initialized native-zlib library"); } else { LOG.warn("Failed to load/initialize native-zlib library"); } } } /** * Check if native-zlib code is loaded & initialized correctly and * can be loaded for this job. * * @param conf configuration * @return <code>true</code> if native-zlib is loaded & initialized * and can be loaded for this job, else <code>false</code> */ public static boolean isNativeZlibLoaded(Configuration conf) { return nativeZlibLoaded && conf.getBoolean("hadoop.native.lib", true); } /** * Return the appropriate type of the zlib compressor. * * @param conf configuration * @return the appropriate type of the zlib compressor. */ public static Class<? extends Compressor> getZlibCompressorType(Configuration conf) { return (isNativeZlibLoaded(conf)) ? ZlibCompressor.class : BuiltInZlibDeflater.class; } /** * Return the appropriate implementation of the zlib compressor. * * @param conf configuration * @return the appropriate implementation of the zlib compressor. */ public static Compressor getZlibCompressor(Configuration conf) { return (isNativeZlibLoaded(conf)) ? new ZlibCompressor() : new BuiltInZlibDeflater(); } /** * Return the appropriate type of the zlib decompressor. * * @param conf configuration * @return the appropriate type of the zlib decompressor. */ public static Class<? extends Decompressor> getZlibDecompressorType(Configuration conf) { return (isNativeZlibLoaded(conf)) ? ZlibDecompressor.class : BuiltInZlibInflater.class; } /** * Return the appropriate implementation of the zlib decompressor. * * @param conf configuration * @return the appropriate implementation of the zlib decompressor. */ public static Decompressor getZlibDecompressor(Configuration conf) { return (isNativeZlibLoaded(conf)) ? new ZlibDecompressor() : new BuiltInZlibInflater(); } }
[ "archen94@gmail.com" ]
archen94@gmail.com
84e654dd79d3cf0afc19451bf8475ab7f8bbaa32
85fdcf0631ca2cc72ce6385c2bc2ac3c1aea4771
/temp/src/minecraft/argo/saj/JsonListener.java
1166e0103fa2393d8f6aa3d5b2cf42a8a11f9d3e
[]
no_license
lcycat/Cpsc410-Code-Trip
c3be6d8d0d12fd7c32af45b7e3b8cd169e0e28d4
cb7f76d0f98409af23b602d32c05229f5939dcfb
refs/heads/master
2020-12-24T14:45:41.058181
2014-11-21T06:54:49
2014-11-21T06:54:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
839
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode fieldsfirst package argo.saj; public interface JsonListener { public abstract void func_74656_b(); public abstract void func_74657_c(); public abstract void func_74652_d(); public abstract void func_74655_e(); public abstract void func_74651_f(); public abstract void func_74653_g(); public abstract void func_74648_a(String s); public abstract void func_74658_h(); public abstract void func_74647_c(String s); public abstract void func_74650_b(String s); public abstract void func_74654_i(); public abstract void func_74649_j(); public abstract void func_74646_k(); }
[ "kye.13@hotmail.com" ]
kye.13@hotmail.com
33b9ac7e29a84f3fe357d9e5a5ab1c5a73f6c448
2773af2136fb2c409ffa4cd93ea1605713ecfa7f
/src/uml/creational/singleton/SingletonDoubleCheck.java
34644553f6b8a18d5e722320fb6d5247771cc89e
[]
no_license
foureverhh/designPatterns
bf3ba5219701fdbe278ea5bed0926c734ade6e01
3da9878684a96fb054988f80f112fb47c68af5c0
refs/heads/master
2020-07-22T05:50:13.603190
2019-12-21T23:21:11
2019-12-21T23:21:11
207,092,079
0
0
null
null
null
null
UTF-8
Java
false
false
917
java
package uml.creational.singleton; public class SingletonDoubleCheck { private volatile static SingletonDoubleCheck instance = null; private SingletonDoubleCheck(){ System.out.println(this.getClass().getSimpleName() + " created " + instance); } public static SingletonDoubleCheck getInstance(){ if(instance == null){ synchronized (SingletonDoubleCheck.class){ if(instance == null){ try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } instance = new SingletonDoubleCheck(); } } } return instance; } public void showMyInfo(){ System.out.println("DoubleCheck instance is: " + this.getClass().getSimpleName() + " , " + instance); } }
[ "foureverhh@Yuanhengs-Air.localdomain" ]
foureverhh@Yuanhengs-Air.localdomain
193ec9395adec7d798e4cfff8921a0829a5f3b2a
2b0694f0563192e2d148d130164e94faf3b4e12f
/android_phone_developed_completely_lecture/ch06/ch06_savebrowseimage/src/net/blogjava/mobile/widget/FileBrowser.java
e43edd3fb6b1e0b963b753264d83a5c2a81ecc96
[]
no_license
bxh7425014/BookCode
4757956275cf540e9996b9064d981f6da75c9602
8996b36e689861d55662d15c5db8b0eb498c864b
refs/heads/master
2020-05-23T00:48:51.430340
2017-02-06T01:04:25
2017-02-06T01:04:25
84,735,079
9
3
null
null
null
null
UTF-8
Java
false
false
5,848
java
package net.blogjava.mobile.widget; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Stack; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.TextView; public class FileBrowser extends ListView implements android.widget.AdapterView.OnItemClickListener { private final String namespace = "http://mobile.blogjava.net"; private String sdcardDirectory; private List<File> fileList = new ArrayList<File>(); private Stack<String> dirStack = new Stack<String>(); private FileListAdapter fileListAdapter; private OnFileBrowserListener onFileBrowserListener; private int folderImageResId; private int otherFileImageResId; private Map<String, Integer> fileImageResIdMap = new HashMap<String, Integer>(); private boolean onlyFolder = false; public FileBrowser(Context context, AttributeSet attrs) { super(context, attrs); sdcardDirectory = android.os.Environment.getExternalStorageDirectory() .toString(); setOnItemClickListener(this); setBackgroundColor(android.graphics.Color.BLACK); folderImageResId = attrs.getAttributeResourceValue(namespace, "folderImage", 0); otherFileImageResId = attrs.getAttributeResourceValue(namespace, "otherFileImage", 0); onlyFolder = attrs.getAttributeBooleanValue(namespace, "onlyFolder", false); int index = 1; while (true) { String extName = attrs.getAttributeValue(namespace, "extName" + index); int fileImageResId = attrs.getAttributeResourceValue(namespace, "fileImage" + index, 0); if ("".equals(extName) || extName == null || fileImageResId == 0) { break; } fileImageResIdMap.put(extName, fileImageResId); index++; } dirStack.push(sdcardDirectory); addFiles(); fileListAdapter = new FileListAdapter(getContext()); setAdapter(fileListAdapter); } private void addFiles() { fileList.clear(); String currentPath = getCurrentPath(); File[] files = new File(currentPath).listFiles(); if (dirStack.size() > 1) fileList.add(null); for (File file : files) { if (onlyFolder) { if (file.isDirectory()) fileList.add(file); } else { fileList.add(file); } } } private String getCurrentPath() { String path = ""; for (String dir : dirStack) { path += dir + "/"; } path = path.substring(0, path.length() - 1); return path; } private String getExtName(String filename) { int position = filename.lastIndexOf("."); if (position >= 0) return filename.substring(position + 1); else return ""; } @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { if (fileList.get(position) == null) { dirStack.pop(); addFiles(); fileListAdapter.notifyDataSetChanged(); if (onFileBrowserListener != null) { onFileBrowserListener.onDirItemClick(getCurrentPath()); } } else if (fileList.get(position).isDirectory()) { dirStack.push(fileList.get(position).getName()); addFiles(); fileListAdapter.notifyDataSetChanged(); if (onFileBrowserListener != null) { onFileBrowserListener.onDirItemClick(getCurrentPath()); } } else { if (onFileBrowserListener != null) { String filename = getCurrentPath() + "/" + fileList.get(position).getName(); onFileBrowserListener.onFileItemClick(filename); } } } private class FileListAdapter extends BaseAdapter { private Context context; public FileListAdapter(Context context) { this.context = context; } @Override public int getCount() { return fileList.size(); } @Override public Object getItem(int position) { return fileList.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { LinearLayout fileLayout = new LinearLayout(context); fileLayout.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); fileLayout.setOrientation(LinearLayout.HORIZONTAL); fileLayout.setPadding(5, 10, 0, 10); ImageView ivFile = new ImageView(context); ivFile.setLayoutParams(new LayoutParams(48, 48)); TextView tvFile = new TextView(context); tvFile.setTextColor(android.graphics.Color.WHITE); tvFile.setTextAppearance(context, android.R.style.TextAppearance_Large); tvFile.setPadding(5, 5, 0, 0); if (fileList.get(position) == null) { if (folderImageResId > 0) ivFile.setImageResource(folderImageResId); tvFile.setText(". ."); } else if (fileList.get(position).isDirectory()) { if (folderImageResId > 0) ivFile.setImageResource(folderImageResId); tvFile.setText(fileList.get(position).getName()); } else { tvFile.setText(fileList.get(position).getName()); Integer resId = fileImageResIdMap.get(getExtName(fileList.get( position).getName())); int fileImageResId = 0; if (resId != null) { if (resId > 0) { fileImageResId = resId; } } if (fileImageResId > 0) ivFile.setImageResource(fileImageResId); else if (otherFileImageResId > 0) ivFile.setImageResource(otherFileImageResId); } tvFile.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); fileLayout.addView(ivFile); fileLayout.addView(tvFile); return fileLayout; } } public void setOnFileBrowserListener(OnFileBrowserListener listener) { this.onFileBrowserListener = listener; } }
[ "bxh7425014@163.com" ]
bxh7425014@163.com
d247d7e08b16e7d3999589a3d5bdd4f974ec21cb
ede52d4c90af3b91d4a7fdfb2f8e77c177639cfc
/zrx-web/.svn/pristine/0e/0e77e25d95b0d023dca5721e4d8aad28e745bb55.svn-base
a33517269c687692a40fc9bf6c1d1a56c010bd9d
[]
no_license
Arlene-Guo/zrx-hr
9cf8bd68146d9299d73c4702efd6fd43b8887b67
4c199cfb089bc88a066bb423adb3f00574fe5a33
refs/heads/master
2020-12-03T00:42:13.084890
2017-07-03T06:50:27
2017-07-03T06:50:27
96,065,062
0
2
null
null
null
null
UTF-8
Java
false
false
1,334
package com.zrx.hr.common.util.http; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndViewDefiningException; import org.springframework.web.servlet.View; public class RedirectUtils { protected RedirectUtils() { } public static void redirect(HttpServletRequest request, final String url) throws ModelAndViewDefiningException { View view = new View() { @Override public String getContentType() { return "text/html"; } @Override public void render(Map<String, ?> model, HttpServletRequest request, HttpServletResponse response) throws Exception { // 对于Ajax请求,发送401,由前端自行处理sso认证 if ("XMLHttpRequest".equals(request.getHeader("X-Requested-With"))) { response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); } else { response.setStatus(HttpServletResponse.SC_FOUND); response.setHeader("Location", url); } } }; throw new ModelAndViewDefiningException(new ModelAndView(view)); } }
[ "you@example.com" ]
you@example.com
e8879a4392e3de0750b911524ed367fa716ebfb9
1918ed55ad8c6b461b0dfd9496046fab77e2c879
/src/main/java/com/cloudera/cdp/iam/model/AddMachineUserToGroupResponse.java
bf7774e9f33089ef2725ea6ee3f466a056686bba
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
gynyc/cdp-sdk-java
70ee9caf8af9b11d47b3de2e886817d9bbd28258
62db48996cdf3a729b79fe2ef5d9b5e00c839448
refs/heads/master
2020-12-04T22:29:14.396789
2019-09-19T21:18:08
2019-09-19T21:18:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,087
java
/* * Copyright (c) 2018 Cloudera, Inc. All Rights Reserved. * * Portions Copyright (c) Copyright 2013-2018 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. * 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.cloudera.cdp.iam.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import com.cloudera.cdp.client.CdpResponse; /** * Response object for add machine user to group request. **/ @javax.annotation.Generated(value = "com.cloudera.cdp.client.codegen.CdpSDKJavaCodegen", date = "2019-09-19T14:17:02.933-07:00") public class AddMachineUserToGroupResponse extends CdpResponse { @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } return true; } @Override public int hashCode() { return Objects.hash( super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AddMachineUserToGroupResponse {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line except the first indented by 4 spaces. */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "dev-kitchen@cloudera.com" ]
dev-kitchen@cloudera.com
d4bc4fcf23e5d9de3730490c182a18ccdd319d75
a7c6e109f9f763729037619639c3b6baf4868811
/test/src/study/연습04_02.java
fa6e1eb6481c630ec53a40112a92ccddaf8ebe52
[]
no_license
KIMKMAN/ki
f443b41f3a05ef81ac353eef3b184bb1f914e389
2e17a40c21efd33aaf2b898b6658e5bb1c0d8fc0
refs/heads/master
2021-04-07T13:25:56.028814
2020-04-03T10:03:36
2020-04-03T10:03:36
248,679,792
0
0
null
null
null
null
UTF-8
Java
false
false
1,798
java
package study; import java.util.Scanner; public class 연습04_02 { public static void main(String[] args) { // 변수 a,b를 입력하여 키보드로 입력받고 // a가 b보다 크면은 "a가 더큼"으로 출력하고 // a가 b보다 작으면 "b가 더큼"으로 출력해라. // int a = 0; // Scanner input = new Scanner(System.in); // a = input.nextInt(); // int b = input.nextInt(); // // if(a>b) { // System.out.println("\""+a+"가 더큼\""); // }else if(a<b) { // System.out.println("\""+b+"가 더큼\"");// 출력값에 "를 하기위해 \"를 해주면 출력값에 " 표시 // } // System.out.println(); // // 크기가 5인 정수인 배열을 1로 초기화 하고 // // 배열을 전부 출력하라 // int []a = new int[5]; // int b = 3; // // //a[0]=1; 작은수는 중첩되서 사용할수있지만 큰수인경우에는 효율성이 떨어져 반복문을 사용한다. // for (int i = 0; i < 5; i++) { // a[i]=1; // } // // // for(int i =0; i<5; i++) { // System.out.println(a[i]); // } // System.out.println(); // 학생의 점수를 입력하고 점수를 받아서 총점과 평균을 구해라 // 국어 점수 80 , 영어 점수 80, 수학 점수 80 Scanner input = new Scanner(System.in); System.out.println("학생의 점수를 입력해주세요!"); int []score = new int[3]; int total =0; double avg = 0; for(int i=0; i<score.length; i++) { score[i]= input.nextInt(); total+=score[i]; } avg = (double)total / score.length; System.out.print("총점 " +total+ "평균" + avg); System.out.println(); } }
[ "Canon@DESKTOP-PL2F7PK" ]
Canon@DESKTOP-PL2F7PK
466fcae3534b9897c4642a82307e835ae95c0fad
212179dbd149247d02695a4efc89f1ece90e2e73
/app/src/main/java/com/hotbitmapgg/ohmybilibili/module/entry/GameCentreActivity.java
0b8747dca9b5ba44efb8d04602dd0e786d4bed8e
[ "Apache-2.0" ]
permissive
Forevas/OhMyBiliBili
6c17f0da455ee6b398ec4794ec58ffcfb7e5baa1
d1dbdd00f23a0c9eaf68e7fe16ba626dbc1bd21f
refs/heads/OhMyBiliBili
2021-01-17T22:56:03.648425
2016-12-06T06:34:22
2016-12-06T06:34:22
68,283,429
1
0
null
2016-12-05T10:41:08
2016-09-15T09:58:27
Java
UTF-8
Java
false
false
5,649
java
package com.hotbitmapgg.ohmybilibili.module.entry; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.view.View; import com.hotbitmapgg.ohmybilibili.R; import com.hotbitmapgg.ohmybilibili.adapter.GameCentreAdapter; import com.hotbitmapgg.ohmybilibili.base.RxAppCompatBaseActivity; import com.hotbitmapgg.ohmybilibili.entity.game.GameItem; import com.hotbitmapgg.ohmybilibili.widget.CircleProgressView; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; import butterknife.Bind; import rx.Observable; import rx.android.schedulers.AndroidSchedulers; /** * Created by hcc on 16/8/7 14:12 * 100332338@qq.com * <p/> * 游戏中心界面 */ public class GameCentreActivity extends RxAppCompatBaseActivity { @Bind(R.id.recycle) RecyclerView mRecycle; @Bind(R.id.toolbar) Toolbar mToolbar; @Bind(R.id.circle_progress) CircleProgressView mCircleProgressView; private int[] gameimages = new int[]{ R.drawable.game_1, R.drawable.game_2, R.drawable.game_3, R.drawable.game_4, R.drawable.game_5, R.drawable.game_6, R.drawable.game_7, R.drawable.game_8, R.drawable.game_9, R.drawable.game_10, R.drawable.game_11, R.drawable.game_12, }; private String[] gametexts = new String[]{ "命运-冠位指定(Fate/GO)", "少女前线", "苍之骑士团", "ICHU偶像进行曲", "幻游猎人", "阴阳师", "神代梦华谭", "少女咖啡枪", "大航海之路", "皇牌机娘", "妖刀少女异闻录", "螺旋境界线", }; private String[] gameDetails = new String[] { "Fate系列首款正版手游即将开启!", "战地誓约,守护羁绊", "王国的命运,就交到你手上了", "把我变成真正的偶像吧!", "即时冒险RPG手游《幻游猎人》预约开启!", "唯美如樱,百鬼物语", "想变成蝴蝶Σ(:0」∠)_", "少女×枪战", "目标是星辰大海", "二次元战机娘化游戏", "拔刀吧,少女!", "幻想之境,触手可及!", }; private String[] gamepaths = new String[]{ "http://fgo.biligame.com/dy/", "http://gf.biligame.com/", "http://czqst.biligame.com/", "http://ichu.biligame.com/", "http://hylr.biligame.com/yuyue/", "http://yys.biligame.com/", "http://sdmht.biligame.com/yuyue.html", "http://kfq.biligame.com/yuyue/", "http://dhh.biligame.com/", "http://hpjn.biligame.com/", "http://ydsnywl.biligame.com/", "http://lxjjx.biligame.com/yuyue/", }; private List<GameItem> games = new ArrayList<>(); @Override public int getLayoutId() { return R.layout.activity_game_center; } @Override public void initViews(Bundle savedInstanceState) { showProgress(); setGameFill(); } private void setGameFill() { Observable.timer(2000, TimeUnit.MILLISECONDS) .compose(this.bindToLifecycle()) .doOnSubscribe(this::showProgress) .observeOn(AndroidSchedulers.mainThread()) .subscribe(aLong -> { initData(); }); } @Override public void initToolBar() { mToolbar.setTitle("游戏中心"); setSupportActionBar(mToolbar); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) actionBar.setDisplayHomeAsUpEnabled(true); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: onBackPressed(); return true; } return super.onOptionsItemSelected(item); } private void initData() { GameItem mGameItem; for (int i = 0; i < gametexts.length; i++) { mGameItem = new GameItem(); mGameItem.imageRes = gameimages[i]; mGameItem.name = gametexts[i]; mGameItem.desc = gameDetails[i]; mGameItem.path = gamepaths[i]; games.add(mGameItem); } hideProgress(); } private void showProgress() { mCircleProgressView.setVisibility(View.VISIBLE); mCircleProgressView.spin(); mRecycle.setVisibility(View.GONE); } public void hideProgress() { mCircleProgressView.setVisibility(View.GONE); mCircleProgressView.stopSpinning(); mRecycle.setVisibility(View.VISIBLE); initRecyclerView(); } private void initRecyclerView() { mRecycle.setHasFixedSize(true); mRecycle.setLayoutManager(new LinearLayoutManager(GameCentreActivity.this)); GameCentreAdapter mAdapter = new GameCentreAdapter(mRecycle, games); mRecycle.setAdapter(mAdapter); } }
[ "100332338@qq.com" ]
100332338@qq.com
dfc3a59da267b900e70f84dcb6298930bc0ffa31
a766b636171735559c37020e0529e7cab7b7952e
/test/src/main/java/com/zhyen/test/widget/test_draw/TestDrawHistogram3.java
429af0ee379f3cec30882306ae2d96c48277c526
[]
no_license
fengxing1234/zhyen
07b8dbc151e9c35baefc8f6c179e3c80da9b19d9
718fc422adbd562fad43c5ed8c9e705e9629cc44
refs/heads/master
2021-06-28T18:39:31.486710
2021-06-11T06:07:59
2021-06-11T06:07:59
208,732,068
0
0
null
null
null
null
UTF-8
Java
false
false
2,416
java
package com.zhyen.test.widget.test_draw; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; import android.util.AttributeSet; import android.view.View; import androidx.annotation.Nullable; public class TestDrawHistogram3 extends View { private Paint paint; private Paint origin = new Paint(); private int[] heights = {0, 50, 70, 250, 400, 450, 200}; private String[] names = {"张一", "李二", "关三", "赵四", "王老五", "铜六", "韩七",}; private int originHeight = 600; private int originWidth = 900; private int itemWidth = 100; private int spec = 20; private int textTop = 50; public TestDrawHistogram3(Context context) { super(context); init(); } public TestDrawHistogram3(Context context, @Nullable AttributeSet attrs) { super(context, attrs); init(); } public TestDrawHistogram3(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(); } private void init() { paint = new Paint(); paint.setAntiAlias(true); paint.setColor(Color.GREEN); paint.setStrokeWidth(10); paint.setTextSize(40); origin.setAntiAlias(true); origin.setStrokeWidth(4); origin.setColor(Color.WHITE); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); //画背景 canvas.drawARGB(255, 139, 197, 186); //移动原点坐标 canvas.translate(canvas.getWidth() * 0.15f, canvas.getHeight() * 0.6f); //画坐标系 canvas.drawLine(0, 0, 0, -originHeight, origin); canvas.drawLine(0, 0, originWidth, 0, origin); float left = spec; for (int i = 0; i < heights.length; i++) { canvas.drawRect(new RectF(left, -heights[i], left + itemWidth, 0), paint); float textLeft = left + (itemWidth - textSize(names[i], paint).width()) / 2; canvas.drawText(names[i], textLeft, textTop, paint); left += itemWidth + spec; } } private Rect textSize(String text, Paint paint) { Rect rect = new Rect(); paint.getTextBounds(text, 0, text.length(), rect); return rect; } }
[ "f296016140@gmail.com" ]
f296016140@gmail.com
e8a33b913987ce766b203a8793b4407a6bf3f5ec
31b35db157f9131365793d1d466f43e5c8ccb4c6
/twitlogic-core/src/main/java/net/fortytwo/twitlogic/data/EdinburghAssociativeThesaurus.java
2550e2da06c11ccb635c8b6da842f14d52b0f0d7
[ "MIT" ]
permissive
neostoic/twitlogic
8d2c85ef46db188cce9ece34071abbae478f4fdd
803eef192aaa43aca7e3cf36d834c998185e8718
refs/heads/master
2020-12-25T12:57:30.023303
2011-10-08T20:55:07
2011-10-08T20:55:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,360
java
package net.fortytwo.twitlogic.data; import org.openrdf.rio.RDFFormat; import org.openrdf.rio.RDFHandlerException; import org.openrdf.rio.RDFWriter; import org.openrdf.rio.Rio; import java.io.BufferedReader; import java.io.File; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.OutputStream; import java.util.HashSet; /** * Program to convert the Edinburgh Associative Thesaurus into the N-Triples format. * See also: http://www.eat.rl.ac.uk/ * <p/> * User: josh * Date: Sep 13, 2009 * Time: 9:39:51 PM */ public class EdinburghAssociativeThesaurus extends FreeAssociationGenerator { public static void main(final String[] args) throws Exception { System.out.println("args:"); for (String s : args) { System.out.println("\t*) " + s); } if (2 != args.length) { showUsage(); } else { convertSRConciseFileToNTriples(new File(args[0]), new File(args[1])); } } private static void showUsage() { System.out.println("Usage: <EAT sr_concise> <ntriples output file>"); } private static void convertSRConciseFileToNTriples(final File srConciseFile, final File ntriplesFile) throws IOException, RDFHandlerException { DEFINED_WORDS = new HashSet<String>(); int associationCount = 0; OutputStream out = new FileOutputStream(ntriplesFile); try { RDFWriter writer = Rio.createWriter(RDFFormat.NTRIPLES, out); writer.startRDF(); try { BufferedReader b = new BufferedReader(new FileReader(srConciseFile)); try { String line; while (null != (line = b.readLine())) { if (0 == line.length()) { break; } String subjectWord = normalizeWord(line); // There should be an even number of lines in this file. line = b.readLine(); if (isNormalWord(subjectWord)) { String[] cells = line.trim().split("[|]"); int totalWeight = 0; for (int i = 1; i < cells.length; i += 2) { totalWeight += Integer.valueOf(cells[i]); } for (int i = 0; i < cells.length; i += 2) { String objectWord = cells[i]; float weight = Float.valueOf(cells[i + 1]) / totalWeight; associate(subjectWord, objectWord, weight, writer); associationCount++; } } else { System.err.println(subjectWord + " could not be normalized. No association created."); } } } finally { b.close(); } } finally { writer.endRDF(); } } finally { out.close(); } System.out.println("created " + associationCount + " associations"); } }
[ "josh@fortytwo.net" ]
josh@fortytwo.net
8afbb21a997df1855600c2cabfff072f523516d6
982cd39faf77c2f5a001dfa0f0ce31cb68906c3d
/src/main/java/org/jboss/remoting3/framework/spi/ServerVersionManager.java
18e8482935a4396e82341b06647c478e85b2fa97
[]
no_license
darranl/remoting-framework
f6f3364152e97f97fff243961572f661b58ff16a
01792fd46a55fbd2b4b5cb1b9fa547a295232b43
refs/heads/master
2021-01-02T22:32:10.949086
2013-01-01T17:43:58
2013-01-01T17:43:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,462
java
/* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.remoting3.framework.spi; import java.util.Map; import org.jboss.remoting3.Channel; /** * The VersionManager interface for the server side of proxy creation. * * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a> */ public interface ServerVersionManager<T> extends BaseVersionManager { T getServerConnection(final int version, final Channel channel, final Map<String, ?> environment); }
[ "darran.lofthouse@jboss.com" ]
darran.lofthouse@jboss.com
7008dd9f6c0e788b489b8eb5dea7f4e7600cdb90
000a4b227d970cdc6c8db192f4437698cb782721
/java/java-tests/testData/inspection/patternVariableCanBeUsed/beforeRecordPatternVariableNotExists.java
25560e62e7b4a59f9020fdcff904f14b9a577b06
[ "Apache-2.0" ]
permissive
trinhanhngoc/intellij-community
2eb2f66a2a3a9456e7a0c5e7be1eaba03c38815d
1d4a962cfda308a73e0a7ef75186aaa4b15d1e17
refs/heads/master
2022-11-03T21:50:47.859675
2022-10-19T16:39:57
2022-10-19T23:25:35
205,765,945
1
0
Apache-2.0
2019-09-02T02:55:15
2019-09-02T02:55:15
null
UTF-8
Java
false
false
237
java
// "Replace 'point' with pattern variable" "true" class X { void test(Object obj) { if (obj instanceof Point(double x, double y) && y == x) { Point point<caret> = (Point) obj; } } } record Point(double x, double y) { }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
46c1d61c6a7176dfebf15c02eccada03265e38bd
012e9bd5bfbc5ceca4e36af55a7ddf4fce98b403
/code/app/src/main/java/com/yzb/card/king/ui/luxury/view/ReplylistView.java
a69b4600c0e39469720e8d507b595507ef1965cb
[]
no_license
litliang/ms
a7152567c2f0e4d663efdda39503642edd33b4b6
d7483bc76d43e060906c47acc1bc2c3179838249
refs/heads/master
2021-09-01T23:51:50.934321
2017-12-29T07:30:49
2017-12-29T07:30:49
115,697,248
1
0
null
null
null
null
UTF-8
Java
false
false
440
java
package com.yzb.card.king.ui.luxury.view; /** * 功能:评论回复列表; * * @author:gengqiyun * @date: 2016/9/22 */ public interface ReplylistView { /** * @param event_tag 下拉或上拉; * @param data */ void onLoadVoteReplylistSucess(boolean event_tag, Object data); /** * 失败; * * @param failMsg 错误消息; */ void onLoadVoteReplylistFail(String failMsg); }
[ "864631546@qq.com" ]
864631546@qq.com
cb73d0e7c002f8f6143abdd68022f253723fca64
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_8dafe31993c26d94f6f680f958eadb2a07155036/Messages/2_8dafe31993c26d94f6f680f958eadb2a07155036_Messages_s.java
0361af50e228f8cf6fd4edb6178a5e99e44acb13
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,453
java
/* * Sonar Eclipse * Copyright (C) 2010-2012 SonarSource * dev@sonar.codehaus.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ package org.sonar.ide.eclipse.core.internal; import org.eclipse.osgi.util.NLS; public final class Messages extends NLS { private static final String BUNDLE_NAME = "org.sonar.ide.eclipse.internal.core.messages"; //$NON-NLS-1$ static { // load message values from bundle file NLS.initializeMessages(BUNDLE_NAME, Messages.class); } private Messages() { } public static String AnalyseProjectJob_title; public static String AnalyseProjectJob_task_analysing; public static String AnalyseProjectJob_sutask_sensor; public static String AnalyseProjectJob_sutask_decorator; }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com