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
1d9a2e3fe0df4aa2c6706a4ce1c2105da5d3174d
4e1c86f91f38bc039b2d6fd605327824dd08c26d
/cz.mzk.recordmanager.server/src/test/java/cz/mzk/recordmanager/server/oai/dao/DedupRecordDAOTest.java
d231b2ed8d8005ea098f8a7b198d9ffc747818da
[]
no_license
paulusova/RecordManager2
78df7dfe35ca119162212664fe392fcc84559610
827edbdd34565c739461770070a42426ff0dd5a8
refs/heads/master
2021-01-21T02:21:45.085793
2015-11-04T08:51:42
2015-11-04T08:51:42
45,531,874
0
0
null
2015-11-04T10:32:14
2015-11-04T10:32:14
null
UTF-8
Java
false
false
470
java
package cz.mzk.recordmanager.server.oai.dao; import org.springframework.beans.factory.annotation.Autowired; import org.testng.annotations.Test; import cz.mzk.recordmanager.server.AbstractTest; import cz.mzk.recordmanager.server.model.DedupRecord; public class DedupRecordDAOTest extends AbstractTest { @Autowired private DedupRecordDAO dedupRecordDao; @Test public void test() { DedupRecord record = new DedupRecord(); dedupRecordDao.persist(record); } }
[ "xrosecky@gmail.com" ]
xrosecky@gmail.com
efcb2c088d63a79d5be395a47790784b2dc63853
7bb07f40c5a62e300ae4e83bf789e5aa1f1b70f7
/core/tags/1.5.1/1.3.1/src/com/vividsolutions/jump/workbench/ui/plugin/analysis/SpatialJoinPlugIn.java
d097a22ecd268f313069d1f89d7b924ea69f93a2
[]
no_license
abcijkxyz/jump-pilot
a193ebf9cfb3f082a467c0cfbe0858d4e249d420
3b6989a88e5c8e00cd55c3148f00a7bf747574c7
refs/heads/master
2022-12-18T15:22:44.594948
2020-09-23T10:46:11
2020-09-23T10:46:11
297,995,218
0
0
null
2020-09-23T15:27:25
2020-09-23T14:23:54
null
UTF-8
Java
false
false
7,808
java
/* * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI * for visualizing and manipulating spatial features with geometry and attributes. * * Copyright (C) 2003 Vivid Solutions * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * For more information, contact: * * Vivid Solutions * Suite #1A * 2328 Government Street * Victoria BC V8T 5G5 * Canada * * (250)385-6040 * www.vividsolutions.com */ package com.vividsolutions.jump.workbench.ui.plugin.analysis; import java.util.*; import java.awt.event.*; import javax.swing.*; import com.vividsolutions.jump.I18N; import com.vividsolutions.jump.feature.*; import com.vividsolutions.jump.task.*; import com.vividsolutions.jump.workbench.WorkbenchContext; import com.vividsolutions.jump.workbench.model.*; import com.vividsolutions.jump.workbench.plugin.*; import com.vividsolutions.jump.workbench.plugin.util.*; import com.vividsolutions.jump.workbench.ui.*; import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller; /** * Queries a layer by a spatial predicate. */ public class SpatialJoinPlugIn extends AbstractPlugIn implements ThreadedPlugIn { private Layer srcLayerA; private Layer srcLayerB; private JTextField paramField; private Collection functionNames; private MultiInputDialog dialog; private String funcNameToRun; private GeometryPredicate functionToRun = null; private boolean exceptionThrown = false; private double[] params = new double[2]; public SpatialJoinPlugIn() { functionNames = GeometryPredicate.getNames(); } private String categoryName = StandardCategoryNames.RESULT; public String getName(){ //-- exchanged plugin with SIGLE plugin //return I18N.get("ui.plugin.analysis.SpatialJoinPlugIn.Spatial-Join"); return I18N.get("org.openjump.sigle.plugin.SpatialJoinPlugIn.Transfer-Attributes"); } public void setCategoryName(String value) { categoryName = value; } public void initialize(PlugInContext context) throws Exception { FeatureInstaller featureInstaller = new FeatureInstaller(context.getWorkbenchContext()); featureInstaller.addMainMenuItem( this, //exe new String[] {MenuNames.TOOLS, MenuNames.TOOLS_EDIT_ATTRIBUTES}, //menu path this.getName() + "...", //name methode .getName recieved by AbstractPlugIn false, //checkbox null, //icon createEnableCheck(context.getWorkbenchContext())); //enable check } public static MultiEnableCheck createEnableCheck(WorkbenchContext workbenchContext) { EnableCheckFactory checkFactory = new EnableCheckFactory(workbenchContext); return new MultiEnableCheck() .add(checkFactory.createWindowWithLayerNamePanelMustBeActiveCheck()) .add(checkFactory.createAtLeastNLayersMustExistCheck(2)); } public boolean execute(PlugInContext context) throws Exception { dialog = new MultiInputDialog(context.getWorkbenchFrame(), getName(), true); setDialogValues(dialog, context); GUIUtil.centreOnWindow(dialog); dialog.setVisible(true); if (! dialog.wasOKPressed()) { return false; } getDialogValues(dialog); return true; } public void run(TaskMonitor monitor, PlugInContext context) throws Exception { monitor.allowCancellationRequests(); // input-proofing if (functionToRun == null) return; if (srcLayerA == null) return; if (srcLayerB == null) return; monitor.report(I18N.get("ui.plugin.analysis.SpatialJoinPlugIn.Executing-join")+ " " + functionToRun.getName() + "..."); FeatureCollection srcAFC = srcLayerA.getFeatureCollectionWrapper(); FeatureCollection srcBFC = srcLayerB.getFeatureCollectionWrapper(); //-- [sstein 28.Mar.2008] reversed order of input (to be able to read from top to down the spatial relations) SpatialJoinExecuter executer = new SpatialJoinExecuter(srcBFC, srcAFC); FeatureCollection resultFC = executer.getResultFC(); executer.execute(monitor, functionToRun, params, resultFC); if (monitor.isCancelRequested()) return; String outputLayerName = I18N.get("ui.plugin.analysis.SpatialJoinPlugIn.Join")+ "-" + funcNameToRun; context.getLayerManager().addCategory(categoryName); context.addLayer(categoryName, outputLayerName, resultFC); if (exceptionThrown) { context.getWorkbenchFrame().warnUser("Errors found while executing query"); } } private final static String LAYER_A = GenericNames.LAYER_A + " (" + GenericNames.TARGET_LAYER + ")"; private final static String LAYER_B = GenericNames.LAYER_B + " (" + GenericNames.SOURCE_LAYER + ")"; private final static String PREDICATE = GenericNames.RELATION; private final static String PARAM = GenericNames.PARAMETER; private void setDialogValues(MultiInputDialog dialog, PlugInContext context) { //dialog.setSideBarImage(new ImageIcon(getClass().getResource("DiffSegments.png"))); //-- [sstein 31March2008] replaced sidebar description by better description use in SIGLE plugin /* dialog.setSideBarDescription( I18N.get("ui.plugin.analysis.SpatialJoinPlugIn.Joins-two-layers-on-a-given-spatial-relationship") + " (" + I18N.get("ui.plugin.analysis.SpatialJoinPlugIn.example") +")"); */ dialog.setSideBarDescription(I18N.get("org.openjump.sigle.plugin.SpatialJoinPlugIn.Transfers-the-attributes-of-Layer-B-to-Layer-A-using-a-spatial-criterion")); //Set initial layer values to the first and second layers in the layer list. //In #initialize we've already checked that the number of layers >= 1. [Jon Aquino] Layer initLayer1 = (srcLayerA == null)? context.getCandidateLayer(0) : srcLayerA; Layer initLayer2 = (srcLayerB == null)? context.getCandidateLayer(1) : srcLayerB; dialog.addLayerComboBox(LAYER_A, initLayer1, context.getLayerManager()); JComboBox functionComboBox = dialog.addComboBox(PREDICATE, funcNameToRun, functionNames, null); functionComboBox.addItemListener(new MethodItemListener()); paramField = dialog.addDoubleField(PARAM, params[0], 10); dialog.addLayerComboBox(LAYER_B, initLayer2, context.getLayerManager()); updateUIForFunction(funcNameToRun); } private void getDialogValues(MultiInputDialog dialog) { srcLayerA = dialog.getLayer(LAYER_A); srcLayerB = dialog.getLayer(LAYER_B); funcNameToRun = dialog.getText(PREDICATE); functionToRun = GeometryPredicate.getPredicate(funcNameToRun); params[0] = dialog.getDouble(PARAM); } private void updateUIForFunction(String funcName) { boolean paramUsed = false; GeometryPredicate func = GeometryPredicate.getPredicate(funcName); if (func != null) { paramUsed = func.getParameterCount() > 0; } paramField.setEnabled(paramUsed); // this has the effect of making the background gray (disabled) paramField.setOpaque(paramUsed); } private class MethodItemListener implements ItemListener { public void itemStateChanged(ItemEvent e) { updateUIForFunction((String) e.getItem()); } } }
[ "edso@d6f7b87f-2e33-0410-8384-f77abc8d64da" ]
edso@d6f7b87f-2e33-0410-8384-f77abc8d64da
32a2e1b9ea3d78556555e5c302983d8bc23fc62c
ebce1f3728823245d94b6a06e66a9c4e37801e7e
/src/main/java/com/scheible/es2020parser/util/JavaScriptTransformer.java
ba1b531ba36ce065acdff34fec3bc1d9b8c51f3a
[ "MIT" ]
permissive
janScheible/javascript-es2020-parser
268246f54fbc810be5517456d3d6d11f4e1b9263
7c2435eee07c9bb277eed5779abad71d69e588aa
refs/heads/master
2022-05-28T17:04:45.051354
2022-05-16T19:09:13
2022-05-16T19:09:13
250,891,067
0
0
MIT
2020-10-13T20:43:50
2020-03-28T20:51:48
ANTLR
UTF-8
Java
false
false
2,493
java
package com.scheible.es2020parser.util; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Function; import java.util.function.Supplier; /** * * @author sj */ public class JavaScriptTransformer { /** * Allows to transform all passed <code>Positionable</code> instances in the JavaScript source retrieved from * the <code>InputStream</code>. */ public static <T extends Positionable> String transform(final Supplier<InputStream> inputStreamSupplier, final Function<String, Set<T>> positionableSupplier, final Function<T, String> transformerFunction) throws IOException { final StringBuilder javaScriptSourceBuilder = new StringBuilder(); String line; int lineNumber = 0; final List<Integer> lineLengths = new ArrayList<>(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStreamSupplier.get(), UTF_8))) { while ((line = reader.readLine()) != null) { lineNumber++; lineLengths.add(line.length()); javaScriptSourceBuilder.append(line).append('\n'); } } final Map<Integer, List<T>> lineNumberSourcePositionMapping = new HashMap<>(); for (final T positionable : positionableSupplier.apply(javaScriptSourceBuilder.toString())) { lineNumberSourcePositionMapping .computeIfAbsent(positionable.getPosition().getLine(), key -> new ArrayList<>()).add(positionable); } int position = javaScriptSourceBuilder.length(); for (int i = lineLengths.size() - 1; i >= 0; i--) { final List<T> linePositionables = lineNumberSourcePositionMapping.get(lineNumber); if (linePositionables != null) { Collections.sort(linePositionables, (first, second) -> Integer.compare(second.getPosition().getStart(), first.getPosition().getStart())); for (final T positionable : linePositionables) { final int start = position - lineLengths.get(i) + positionable.getPosition().getStart() - 1; final int end = position - lineLengths.get(i) + positionable.getPosition().getEnd(); javaScriptSourceBuilder.replace(start, end, transformerFunction.apply(positionable)); } } position -= lineLengths.get(i) + 1; lineNumber--; } return javaScriptSourceBuilder.toString(); } }
[ "janScheible@users.noreply.github.com" ]
janScheible@users.noreply.github.com
5bbfc335ef0f826c96b95a6cbaff746dafb04f8a
de05085d86345bd3e1dc399cefbf714cfefca971
/src/priv/wzb/design_pattern/structural_pattern/bridgepattern/classic/ConcreteImplementor.java
20850973d62f00113c7d17b5d4e4bb24865027ea
[]
no_license
luoziling/Design_Pattern
97e432690cb54d32bb1645a96c2c4b2c81ae2dcf
a74d46be514aafd4a1ec9308e9aec3b108f441af
refs/heads/master
2022-08-09T04:55:35.275356
2021-12-22T09:31:06
2021-12-22T09:31:06
207,322,291
3
0
null
2022-07-15T21:10:05
2019-09-09T13:58:21
Java
UTF-8
Java
false
false
296
java
package priv.wzb.design_pattern.structural_pattern.bridgepattern.classic; /** * @author Satsuki * @time 2019/8/13 17:49 * @description: */ public class ConcreteImplementor implements Implementor { @Override public void operationImpl() { //具体业务方法的实现 } }
[ "767218875@qq.com" ]
767218875@qq.com
9181e5ce2c9549cfd70521a8214f3a2fb0058371
06d25e014eaaec5efc7ec058565f28945f851d3e
/nfsdb-examples/src/main/java/org/nfsdb/examples/reporting/DailyPriceAverageExample.java
a64534fc0418ddb2754ab4b2b12be249e377acaf
[]
no_license
gubanov/nfsdb
b8788c49e2b95c2b83fe698ad0f705dc991fde47
8d4010f04eb822d2b0ebc46ba3118b2b00f5c992
refs/heads/master
2021-01-15T16:46:45.775581
2015-09-06T21:29:56
2015-09-06T21:29:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,526
java
/******************************************************************************* * _ _ ___ ___ _ _ * | \| | __/ __| __| | |__ * | .` | _|\__ \/ _` | '_ \ * |_|\_|_| |___/\__,_|_.__/ * * Copyright (c) 2014-2015. The NFSdb project and its contributors. * * 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.nfsdb.examples.reporting; import com.nfsdb.Journal; import com.nfsdb.JournalWriter; import com.nfsdb.exceptions.JournalException; import com.nfsdb.factory.JournalFactory; import com.nfsdb.io.sink.StringSink; import com.nfsdb.printer.JournalPrinter; import com.nfsdb.printer.appender.StdOutAppender; import com.nfsdb.query.api.QueryAllBuilder; import com.nfsdb.utils.Dates; import com.nfsdb.utils.Files; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.nfsdb.examples.model.ModelConfiguration; import org.nfsdb.examples.model.Quote; import org.nfsdb.examples.support.QuoteGenerator; import java.io.File; import java.io.IOException; import java.util.concurrent.TimeUnit; public class DailyPriceAverageExample { @SuppressFBWarnings({"CC_CYCLOMATIC_COMPLEXITY"}) public static void main(String[] args) throws JournalException, IOException { if (args.length != 1) { System.out.println("Usage: " + DailyPriceAverageExample.class.getName() + " <path>"); System.exit(1); } String journalLocation = args[0]; try (JournalFactory factory = new JournalFactory(ModelConfiguration.CONFIG.build(journalLocation))) { // delete existing quote journal Files.delete(new File(factory.getConfiguration().getJournalBase(), Quote.class.getName())); int count = 10000000; long t = System.nanoTime(); // get some data in :) try (JournalWriter<Quote> w = factory.writer(Quote.class)) { QuoteGenerator.generateQuoteData(w, count, 90); } System.out.println("Created " + count + " records in " + TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - t) + "ms"); try (Journal<Quote> journal = factory.reader(Quote.class).select("ask", "timestamp")) { count = 0; t = System.nanoTime(); final String symbol = "BP.L"; // create query builder to search for all records with key (sym) = "BP.L" final QueryAllBuilder<Quote> builder = journal.query().all().withKeys(symbol); // state long previousDay = -1; double avgSum = 0; int avgCount = 0; StringSink sink = new StringSink(); try (JournalPrinter printer = new JournalPrinter()) { // tell printer the types of objects we'll be producing printer.types(String.class, String.class, double.class); // add fields to out output // in this example we are using scalar values, so we have same number of fields as there are types. // fields not declared here won't be printed. printer.v(0).h("Symbol").v(1).h("Date").v(2).h("avg(Ask)"); // tell printer the appender we want to use, appender is anything implementing Appender interface. printer.setAppender(StdOutAppender.INSTANCE); // print out header printer.header(); // out result set is all chronologically ordered quotes for symbol BP.L // so this loop leverages data order by printing out result when // day of year changes for (Quote q : builder.asResultSet().bufferedIterator()) { long thisDay = Dates.floorDD(q.getTimestamp()); if (thisDay != previousDay) { if (previousDay != -1) { Dates.formatDashYYYYMMDD(sink, previousDay); printer.out(symbol, sink.toString(), avgSum / avgCount); sink.clear(); } avgCount = 1; avgSum = q.getTimestamp(); previousDay = thisDay; } else { avgCount++; avgSum += q.getTimestamp(); } count++; } if (previousDay != -1) { Dates.formatDashYYYYMMDD(sink, previousDay); printer.out(symbol, sink.toString(), avgSum / avgCount); } } System.out.println("Read " + count + " records in " + TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - t) + "ms"); } } } }
[ "bluestreak@gmail.com" ]
bluestreak@gmail.com
102aece46fff7596dc2c210d765a3431be8bf94f
44c5ef884143b3f24ca616189edb40833a11ab0b
/src/main/java/WebApp/servlet/StaticServlet.java
7255923d25957a8d099d056b9c921842752d8313
[]
no_license
shahsevil/sevil_homework
1e0a2e140e1c4038298790b617bc1d8a4a5bc198
383c65769fc4b327c6f2e59d9f27a5663dc310c2
refs/heads/master
2023-06-23T22:37:41.955528
2020-04-20T09:26:28
2020-04-20T09:26:28
239,511,669
0
0
null
2023-06-13T22:55:19
2020-02-10T12:55:09
Java
UTF-8
Java
false
false
895
java
package WebApp.servlet; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; public class StaticServlet extends HttpServlet { private final String subPath; public StaticServlet(String subPath) { this.subPath = subPath; } @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String filename = req.getPathInfo(); String osFileLocation = "content"; Path path = Paths.get(osFileLocation, subPath, filename); try (OutputStream os = resp.getOutputStream()) { Files.copy(path, os); } } }
[ "you@example.com" ]
you@example.com
10df3121a12ca9cc011cf1fdf6c496c6ef02b7c7
7791973ca350994b734557803f91a3fd47ea1c02
/Arrays/ProductSubarray.java
9e42f12382f0c86033339c9350398c1fba8fb4cf
[]
no_license
gupta29470/Practice
4713ae02a5ab84c6783d711d53df227d9060604a
81676b21fbf0191f8ded836d19f0c280b4bda1cd
refs/heads/master
2023-07-03T15:52:49.832892
2021-08-17T08:49:05
2021-08-17T08:49:05
357,317,997
0
0
null
null
null
null
UTF-8
Java
false
false
3,130
java
import java.io.*; class ProductSubarray { // Utility functions to get minimum of two integers static int min(int x, int y) { return x < y ? x : y; } // Utility functions to get maximum of two integers static int max(int x, int y) { return x > y ? x : y; } /* Returns the product of max product subarray. Assumes that the given array always has a subarray with product more than 1 */ static int maxSubarrayProduct(int arr[]) { int n = arr.length; // max positive product ending at the current position int max_ending_here = 1; // min negative product ending at the current position int min_ending_here = 1; // Initialize overall max product int max_so_far = 1; int flag = 0; /* Traverse through the array. Following values are maintained after the ith iteration: max_ending_here is always 1 or some positive product ending with arr[i] min_ending_here is always 1 or some negative product ending with arr[i] */ for (int i = 0; i < n; i++) { /* If this element is positive, update max_ending_here. Update min_ending_here only if min_ending_here is negative */ if (arr[i] > 0) { max_ending_here = max_ending_here * arr[i]; min_ending_here = min(min_ending_here * arr[i], 1); flag = 1; } /* If this element is 0, then the maximum product cannot end here, make both max_ending_here and min_ending _here 0 Assumption: Output is alway greater than or equal to 1. */ else if (arr[i] == 0) { max_ending_here = 1; min_ending_here = 1; } /* If element is negative. This is tricky max_ending_here can either be 1 or positive. min_ending_here can either be 1 or negative. next min_ending_here will always be prev. max_ending_here * arr[i] next max_ending_here will be 1 if prev min_ending_here is 1, otherwise next max_ending_here will be prev min_ending_here * arr[i] */ else { int temp = max_ending_here; max_ending_here = max(min_ending_here * arr[i], 1); min_ending_here = temp * arr[i]; } // update max_so_far, if needed if (max_so_far < max_ending_here) max_so_far = max_ending_here; } if (flag == 0 && max_so_far == 1) return 0; return max_so_far; } public static void main(String[] args) { int arr[] = { 1, -2, -3, 0, 7, -8, -2 }; System.out.println("Maximum Sub array product is " + maxSubarrayProduct(arr)); } }
[ "gupta29470@gmail.com" ]
gupta29470@gmail.com
6a6832a8a81768256efb72ce602f5cbc5a3ad212
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
/services/core/java/com/android/server/pm/PackageVerificationResponse.java
a9aef6da6d4de34fe1634a84c15b073ac9239dc5
[ "Apache-2.0", "LicenseRef-scancode-unicode" ]
permissive
Ankits-lab/frameworks_base
8a63f39a79965c87a84e80550926327dcafb40b7
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
refs/heads/main
2023-02-06T03:57:44.893590
2020-11-14T09:13:40
2020-11-14T09:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
921
java
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server.pm; public class PackageVerificationResponse { public final int code; public final int callerUid; public PackageVerificationResponse(int code, int callerUid) { this.code = code; this.callerUid = callerUid; } }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
d0caa16fe88843a7ac4995994babe1fc37652516
2290a47fbbdef8cb893f8477e3230ec5a0cb225c
/src/test/java/de/javagl/common/ui/closeable/test/CloseablePanelTest.java
23875be8cd334a14665c248538f81a049330bc10
[ "MIT" ]
permissive
javagl/CommonUI
06bf903939eac2beee0a0e2a875c94117c617329
d19fd1858877b9a6979839e57b82e0d806455553
refs/heads/master
2022-11-30T14:08:38.715230
2022-11-26T14:33:09
2022-11-26T14:33:09
46,824,622
2
1
null
null
null
null
UTF-8
Java
false
false
2,035
java
package de.javagl.common.ui.closeable.test; import java.awt.Color; import java.awt.Component; import java.awt.GridLayout; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.SwingUtilities; import de.javagl.common.ui.closeable.CloseCallback; import de.javagl.common.ui.closeable.CloseablePanel; /** * Simple integration test for the {@link CloseablePanel} */ @SuppressWarnings("javadoc") public class CloseablePanelTest { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { createAndShowGUI(); } }); } private static void createAndShowGUI() { JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel container = new JPanel(new GridLayout(0,1)); CloseablePanel panel0 = new CloseablePanel( "Title 0", new JLabel("Panel 0")); panel0.setBackground(Color.RED); container.add(panel0); CloseablePanel panel1 = new CloseablePanel( new JLabel("Panel 1, without title")); panel1.setBackground(Color.GREEN); container.add(panel1); CloseCallback closeCallback = new CloseCallback() { @Override public boolean mayClose(Component componentInTab) { System.out.println("Checking whether panel may be closed..."); return false; } }; CloseablePanel panel2 = new CloseablePanel("Title 2", new JLabel("Panel 2, may not be closed"), closeCallback); panel2.setBackground(Color.YELLOW); container.add(panel2); f.getContentPane().add(container); f.setSize(400,200); f.setLocationRelativeTo(null); f.setVisible(true); } }
[ "javagl@javagl.de" ]
javagl@javagl.de
17fb77c5603f4aa5ccf830ef1e9b1baff2556ba5
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-cloudcallcenter/src/main/java/com/aliyuncs/cloudcallcenter/model/v20170705/QueryNumber400ListResponse.java
a9233b87c10957d413a2b343725e2e02a730b2b9
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
2,951
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.cloudcallcenter.model.v20170705; import java.util.List; import com.aliyuncs.AcsResponse; import com.aliyuncs.cloudcallcenter.transform.v20170705.QueryNumber400ListResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class QueryNumber400ListResponse extends AcsResponse { private String requestId; private Boolean success; private String code; private String message; private Integer httpStatusCode; private Data data; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } public String getCode() { return this.code; } public void setCode(String code) { this.code = code; } public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public Integer getHttpStatusCode() { return this.httpStatusCode; } public void setHttpStatusCode(Integer httpStatusCode) { this.httpStatusCode = httpStatusCode; } public Data getData() { return this.data; } public void setData(Data data) { this.data = data; } public static class Data { private Integer monthlyPrice; private List<Number> numbers; public Integer getMonthlyPrice() { return this.monthlyPrice; } public void setMonthlyPrice(Integer monthlyPrice) { this.monthlyPrice = monthlyPrice; } public List<Number> getNumbers() { return this.numbers; } public void setNumbers(List<Number> numbers) { this.numbers = numbers; } public static class Number { private String number; private String signature; public String getNumber() { return this.number; } public void setNumber(String number) { this.number = number; } public String getSignature() { return this.signature; } public void setSignature(String signature) { this.signature = signature; } } } @Override public QueryNumber400ListResponse getInstance(UnmarshallerContext context) { return QueryNumber400ListResponseUnmarshaller.unmarshall(this, context); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
4c614de65a4ad762764b2a281e20f6636d405548
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/ui/conversation/a/e.java
5fd26afb07b5265633c1fdfacffa2f233e38fcbe
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,884
java
package com.tencent.mm.ui.conversation.a; import android.content.Context; import com.facebook.appevents.AppEventsConstants; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.model.a.f; import com.tencent.mm.model.a.g; import com.tencent.mm.model.aw; import com.tencent.mm.model.b.b.b; import com.tencent.mm.model.bd; import com.tencent.mm.model.be; import com.tencent.mm.model.c; import com.tencent.mm.sdk.platformtools.ab; import com.tencent.mm.sdk.platformtools.bo; public final class e { public enum a { MAIN_FRAME_BANNER, CHATTING_RECOMMEND_BANNER, CHATTING_SECURITY_BANNER, NET_WARN_BANNER, OTHER_ONLINE_BANNER, FORCE_NOTIFY_BANNER, FACEBOOK_BANNER, AD_BANNER, ABTEST_BANNER, MASS_SEND_SIGHT_BANNER, TRY_NEW_INIT_BANNER, MAIN_FRAME_AND_ABTEST_BANNER, CHATTING_MONITORED_HINT; static { AppMethodBeat.o(34648); } } public static com.tencent.mm.pluginsdk.ui.b.a a(Context context, a aVar, Object[] objArr) { com.tencent.mm.pluginsdk.ui.b.a aVar2 = null; int i = 0; AppMethodBeat.i(34649); String obj; String obj2; switch (aVar) { case CHATTING_RECOMMEND_BANNER: if (objArr != null && objArr.length == 2) { obj = objArr[0] != null ? objArr[0].toString() : null; if (objArr[1] != null) { obj2 = objArr[1].toString(); } else { obj2 = null; } if (aw.ZK().Yk() == null) { ab.w("MicroMsg.BannerFactory", "recommend banner stg is null. this may be caused by account async init."); } if (aw.ZK().Yk() != null && (aw.ZK().Yk().oV(obj) || aw.ZK().Yk().oV(obj2))) { aVar2 = new f(context, obj, obj2); break; } } case CHATTING_SECURITY_BANNER: if (objArr != null && objArr.length == 3) { String obj3; boolean z; obj2 = objArr[0] != null ? objArr[0].toString() : null; if (objArr[1] != null) { obj3 = objArr[1].toString(); } else { obj3 = null; } if (objArr[2] == null || !(objArr[2] instanceof Boolean)) { z = false; } else { z = ((Boolean) objArr[2]).booleanValue(); } if ((aw.RK() && aw.ZK().Yl() != null && aw.ZK().Yl().oV(obj2)) || aw.ZK().Yl().oV(obj3)) { aVar2 = new g(context, obj2, obj3, z); break; } } break; case NET_WARN_BANNER: aVar2 = new o(context); break; case OTHER_ONLINE_BANNER: aVar2 = new p(context); break; case FORCE_NOTIFY_BANNER: aVar2 = new i(context); break; case FACEBOOK_BANNER: aVar2 = new h(context); break; case AD_BANNER: aVar2 = new a(context); break; case MAIN_FRAME_BANNER: be.ZV(); bd ZW = be.ZW(); if (ZW != null) { aVar2 = new l(context, ZW); break; } break; case ABTEST_BANNER: com.tencent.mm.model.a.e oP = g.aaK().oP("4"); if (oP != null) { obj = oP.value; if (!(bo.isNullOrNil(obj) || obj.equals(AppEventsConstants.EVENT_PARAM_VALUE_NO))) { Object obj4; if (!obj.equals("1")) { if (obj.equals("2")) { aw.ZK(); obj4 = c.Ry().get(328196, Boolean.FALSE); if (obj4 instanceof Boolean) { i = ((Boolean) obj4).booleanValue(); } if (i != 0) { ab.i("MicroMsg.BannerFactory", "[cpan] banner type upload contact has clicked."); break; } be.ZV(); if (be.ZY() != com.tencent.mm.model.be.a.SUCC) { aVar2 = new l(context, new bd(2, 1, "")); f.oT("4"); break; } ab.i("MicroMsg.BannerFactory", "already upload the Mobile"); break; } } aw.ZK(); obj4 = c.Ry().get(328195, Boolean.FALSE); if (obj4 instanceof Boolean) { i = ((Boolean) obj4).booleanValue(); } if (i != 0) { ab.i("MicroMsg.BannerFactory", "[cpan] banner type bind mobile has clicked."); break; } be.ZV(); com.tencent.mm.model.be.a ZY = be.ZY(); if (ZY != com.tencent.mm.model.be.a.SUCC && ZY != com.tencent.mm.model.be.a.SUCC_UNLOAD) { aVar2 = new l(context, new bd(1, 1, "")); f.oT("4"); break; } ab.i("MicroMsg.BannerFactory", "already Bind the Mobile"); break; } } break; case MASS_SEND_SIGHT_BANNER: aVar2 = new m(context); break; case TRY_NEW_INIT_BANNER: aVar2 = new q(context); break; case MAIN_FRAME_AND_ABTEST_BANNER: aVar2 = new k(context); break; case CHATTING_MONITORED_HINT: b bVar; if (objArr == null || objArr.length <= 0) { bVar = b.Main; } else { bVar = (b) objArr[0]; } aVar2 = new com.tencent.mm.ui.d.a(context, bVar); break; } AppMethodBeat.o(34649); return aVar2; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
bc615f6c500a34467c42d7b708b9c00045e6fcef
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/com/reddit/frontpage/ui/detail/BaseDetailScreen$$Lambda$17.java
45df3e1b0b4d2f4c85e8b921c7863530ed65d207
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
2,095
java
package com.reddit.frontpage.ui.detail; import android.support.v7.widget.RecyclerView.ViewHolder; import android.view.View; import android.view.View.OnClickListener; import com.reddit.datalibrary.frontpage.data.provider.CommentsProvider; import com.reddit.frontpage.ui.detail.comments.ReplyableTreeNode; final /* synthetic */ class BaseDetailScreen$$Lambda$17 implements OnClickListener { private final BaseDetailScreen f21142a; BaseDetailScreen$$Lambda$17(BaseDetailScreen baseDetailScreen) { this.f21142a = baseDetailScreen; } public final void onClick(View view) { view = this.f21142a; if (view.f39155H != null) { View findChildViewUnder = view.detailList.findChildViewUnder(0.0f, (float) (view.f39149B.getMeasuredHeight() + 1)); if (findChildViewUnder != null) { ReplyableTreeNode a; ViewHolder findContainingViewHolder = view.detailList.findContainingViewHolder(findChildViewUnder); if (findContainingViewHolder == null || (findChildViewUnder instanceof DetailListHeader)) { a = view.f39155H.a(0); } else { view.f39155H.a(view.f39154G.m30148d(findContainingViewHolder)); int d = view.f39154G.m30148d(findContainingViewHolder); CommentsProvider commentsProvider = view.f39155H; if (d < 0) { d = 0; } ReplyableTreeNode a2 = commentsProvider.a(d); commentsProvider = view.f39155H; for (d = commentsProvider.a.m23359a(a2) + 1; d < commentsProvider.a.f21186b.size() - 1; d++) { a = commentsProvider.a.m23360a(d); if (a.f21183b == 0) { break; } } a = null; } if (a != null) { view.m39124a(a.f21182a.b(), true, false); } } } } }
[ "mi.arevalo10@uniandes.edu.co" ]
mi.arevalo10@uniandes.edu.co
840cdb4f8cf787b321da09ac35cc6bca07903fd5
56319e53f4155b0f0ae4ab249b1d3249fc8ddd98
/apache-tomcat-8.0.39/converted/org/apache/tomcat/util/http/MainForTestRequestUtil_testNormalize20.java
97565507554143c4a0295bd89d0d8ad5d58ed557
[]
no_license
SnowOnion/J2mConvertedTestcases
2f904e2f2754f859f6125f248d3672eb1a70abd1
e74b0e4c08f12e5effeeb8581670156ace42640a
refs/heads/master
2021-01-11T19:01:42.207334
2017-01-19T12:22:22
2017-01-19T12:22:22
79,295,183
1
0
null
null
null
null
UTF-8
Java
false
false
409
java
package org.apache.tomcat.util.http; import org.apache.tomcat.util.http.TestRequestUtil; public class MainForTestRequestUtil_testNormalize20 { public static void main(String[] args) { try { TestRequestUtil objTestRequestUtil = new TestRequestUtil(); objTestRequestUtil.testNormalize20(); } catch (Throwable e) { e.printStackTrace(); } } }
[ "snowonionlee@gmail.com" ]
snowonionlee@gmail.com
b5ea5403547619dd16b46d3ee256c2138886980b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_d4ced07d6cccab769714daa37772892e8c5044e0/ResourceDescriptorImpl/1_d4ced07d6cccab769714daa37772892e8c5044e0_ResourceDescriptorImpl_t.java
a41cd9d5bd3d1aea5acd712a44b45080306df93f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,441
java
/******************************************************************************* * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.eclipse.emf.index.impl; import java.io.Serializable; import java.io.Serializable; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.eclipse.emf.index.ResourceDescriptor; /** * @author Jan Khnlein - Initial contribution and API */ public class ResourceDescriptorImpl implements ResourceDescriptor, Serializable { private static final long serialVersionUID = 4559062618979870492L; protected long indexingDate; protected String uri; protected Map<String, Serializable> userData; public ResourceDescriptorImpl(String uri, long indexingDate, Map<String, Serializable> userData) { this.uri = uri; this.indexingDate = indexingDate; if (userData != null) this.userData = Collections.unmodifiableMap(userData); } public long getIndexingDate() { return indexingDate; } public String getURI() { return uri; } public Map<String, Serializable> getUserData() { return userData; } public Serializable getUserData(String key) { return (userData == null) ? null : userData.get(key); } @Override public String toString() { return uri; } @Override public boolean equals(Object obj) { if (obj instanceof ResourceDescriptor) { ResourceDescriptor resourceDescriptor = (ResourceDescriptor) obj; return hashCode() == resourceDescriptor.hashCode() && uri.equals(resourceDescriptor.getURI()); } return false; } @Override public int hashCode() { return uri.hashCode(); } public boolean copyDetails(ResourceDescriptor resourceDesc) { Map<String, Serializable> newUserData = resourceDesc.getUserData(); if (newUserData != null) { if (!newUserData.equals(userData)) { userData = Collections.unmodifiableMap(new HashMap<String, Serializable>(newUserData)); return true; } } else if (userData != null) { userData = null; return true; } return false; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
347521620ddf6f0dd96d43fe6c8b4a4e4e31dbbc
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.browser-base/sources/defpackage/Kw1.java
07a17bd957417da09986c34dc3cc3114777fbb5a
[]
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
3,584
java
package defpackage; import android.content.Intent; import android.text.TextUtils; import java.util.List; import java.util.Map; import org.chromium.chrome.browser.ShortcutHelper; /* renamed from: Kw1 reason: default package */ /* compiled from: chromium-OculusBrowser.apk-stable-281887347 */ public abstract class Kw1 { /* JADX WARNING: Removed duplicated region for block: B:104:0x01db A[SYNTHETIC, Splitter:B:104:0x01db] */ /* JADX WARNING: Removed duplicated region for block: B:112:0x0206 */ /* JADX WARNING: Removed duplicated region for block: B:138:0x026f A[SYNTHETIC, Splitter:B:138:0x026f] */ /* JADX WARNING: Removed duplicated region for block: B:158:0x02bd */ /* JADX WARNING: Removed duplicated region for block: B:164:0x02d8 */ /* JADX WARNING: Removed duplicated region for block: B:172:0x031b */ /* JADX WARNING: Removed duplicated region for block: B:177:0x032a */ /* JADX WARNING: Removed duplicated region for block: B:188:0x0360 */ /* JADX WARNING: Removed duplicated region for block: B:189:0x0363 */ /* JADX WARNING: Removed duplicated region for block: B:192:0x0379 */ /* JADX WARNING: Removed duplicated region for block: B:193:0x0380 */ /* JADX WARNING: Removed duplicated region for block: B:228:0x0305 A[SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:34:0x0097 */ /* JADX WARNING: Removed duplicated region for block: B:62:0x0109 */ /* JADX WARNING: Removed duplicated region for block: B:63:0x0115 */ /* JADX WARNING: Removed duplicated region for block: B:66:0x013e */ /* JADX WARNING: Removed duplicated region for block: B:67:0x0144 */ /* JADX WARNING: Removed duplicated region for block: B:77:0x0181 */ /* JADX WARNING: Removed duplicated region for block: B:84:0x0198 */ /* JADX WARNING: Removed duplicated region for block: B:98:0x01c1 */ /* Code decompiled incorrectly, please refer to instructions dump. */ public static defpackage.AbstractC3767mk a(android.content.Intent r51, java.lang.String r52, java.lang.String r53, int r54, boolean r55, boolean r56, defpackage.C5938zT0 r57, java.lang.String r58) { /* // Method dump skipped, instructions count: 1106 */ throw new UnsupportedOperationException("Method not decompiled: defpackage.Kw1.a(android.content.Intent, java.lang.String, java.lang.String, int, boolean, boolean, zT0, java.lang.String):mk"); } public static AbstractC3767mk b(Intent intent, String str, String str2, Zx1 zx1, Zx1 zx12, String str3, String str4, int i, int i2, int i3, long j, long j2, int i4, boolean z, boolean z2, String str5, int i5, String str6, String str7, int i6, Map map, C1758ax1 ax1, boolean z3, boolean z4, C5938zT0 zt0, List list, int i7) { Integer num = null; if (str7 == null || str5 == null) { AbstractC1220Ua0.a("WebApkInfo", "Incomplete data provided: " + str7 + ", " + str5, new Object[0]); return null; } String str8 = TextUtils.isEmpty(str) ? str7 : str; String d = TextUtils.isEmpty(str2) ? ShortcutHelper.d(str7) : str2; String a2 = AbstractC2103cy1.a(str5); if (AbstractC2103cy1.b(j2)) { num = Integer.valueOf((int) j2); } Yx1 yx1 = new Yx1(a2, str8, d, zx1, str3, str4, i, i2, i3, num, i4, false, z, z3); Ew1 ew1 = new Ew1(str5, zx12, z2, i5, str6, str7, i6, map, ax1, z4, list, i7); boolean b = AbstractC2103cy1.b(j); return new C1932by1(intent, b ? (int) j : -1, b, zt0, yx1, ew1); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
da167e996eb5c66e405ec7ea5df576be42e4d0a0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/21/21_6e10ce3441f2b64afa72b1d730984c00a9fdc60c/TableModel/21_6e10ce3441f2b64afa72b1d730984c00a9fdc60c_TableModel_t.java
d347ee027d4ccd33b7b2462041f89e64f23f4689
[]
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,265
java
package scenegraph; import java.io.File; import java.io.IOException; import javax.media.opengl.GL; import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLException; import com.sun.opengl.cg.CgGL; import com.sun.opengl.util.texture.Texture; import com.sun.opengl.util.texture.TextureIO; public class TableModel extends SceneGraphNode { private GlassModel glass = null; private EiffelModel eiffel = null; private Texture tex = null; public TableModel(GLAutoDrawable drawable, float scale) { super(drawable, "models/table", scale); glass = new GlassModel(drawable, scale); // glass.setTranslation(0.8f, 0.832f, 0); this.addChild(glass); eiffel = new EiffelModel(drawable, scale); this.addChild(eiffel); this.init(drawable); this.setVertexShaderEnabled(false); this.setFragShaderEnabled(false); } @Override public void init(GLAutoDrawable drawable) {} @Override public void bindParameters() { // TODO Auto-generated method stub } @Override public void animate(GLAutoDrawable drawable) { // TODO Auto-generated method stub } @Override public void draw(GLAutoDrawable drawable) { drawable.getGL().glCallList(this.getObjectList()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
592908cb37025fd48b9ff9a561fb8bbecc4a26e7
10294e36832e897be5205024d429dcee7914d092
/impala/impala-core/src/org/impalaframework/config/LocationModificationStateHolder.java
231414fe338c36456b7b70c4144620b2d328d7d4
[]
no_license
realtimedespatch/impala
8c9241b038e3c0b57eabc0dbaadfbc48647fed08
85c05dbffa47efec6d95ee8565245497d95ffb2e
refs/heads/master
2022-05-16T08:29:22.430871
2022-03-21T16:35:56
2022-03-21T16:35:56
48,985,384
2
2
null
2016-01-04T08:54:47
2016-01-04T08:54:46
null
UTF-8
Java
false
false
3,193
java
/* * Copyright 2007-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.impalaframework.config; import java.io.File; import java.io.IOException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.core.io.Resource; import org.springframework.util.Assert; /** * Class with the responsibility for tracking whether a set of resources have been modified * @author Phil Zoio */ public class LocationModificationStateHolder { private Log log = LogFactory.getLog(LocationModificationStateHolder.class); private Resource[] locations; private long lastModified = 0L; private boolean returnOnFirstCheck = false; public boolean isModifiedSinceLastCheck() { Assert.notNull(locations, "locations cannot be null"); boolean load = false; long newLastModified = 0L; for (Resource resource : locations) { try { File file = resource.getFile(); long fileLastModified = file.lastModified(); newLastModified = Math.max(newLastModified, fileLastModified); if (log.isDebugEnabled()) log.debug("Last modified for resource " + file + ": " + fileLastModified); } catch (IOException e) { System.out.println("Unable to get last modified for resource " + resource); } } long oldLastModified = this.lastModified; long diff = newLastModified - oldLastModified; if (diff > 0) { if (oldLastModified == 0L) { load = returnOnFirstCheck; } else { load = true; } if (log.isDebugEnabled()) log.debug("File has been updated more recently - reloading. Old: " + oldLastModified + ", new: " + newLastModified); } this.lastModified = newLastModified; return load; } public void setLocation(Resource resourceLocation) { setLocations(new Resource[] { resourceLocation }); } public void setLocations(Resource[] resourceLocations) { this.locations = resourceLocations; } public void setLastModified(long lastModified) { this.lastModified = lastModified; } public void setReturnOnFirstCheck(boolean returnOnFirstCheck) { this.returnOnFirstCheck = returnOnFirstCheck; } public Resource[] getLocations() { return locations; } public long getLastModified() { return lastModified; } }
[ "philzoio@realsolve.co.uk" ]
philzoio@realsolve.co.uk
031995b50c07563f76a2a299c6da695c03d9e043
a741d82fb5ee0203161455353587ffcc902ef351
/aylson-admin/src/main/java/com/aylson/dc/partner/controller/CouponApplyController.java
9ef0283254e826bb261d2474c820e6181fb3afd6
[]
no_license
xiaofeifei321/aylson-parent
b48121272d5e92a1acc4b671ab7af63aa6c06b0b
3749a0f1ef45851b4aa513b324ef23a04e4421d3
refs/heads/master
2022-12-23T20:15:51.598455
2019-08-29T11:30:13
2019-08-29T11:30:13
204,696,341
0
0
null
null
null
null
UTF-8
Java
false
false
3,002
java
package com.aylson.dc.partner.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.aylson.core.frame.base.Page; import com.aylson.core.frame.controller.BaseController; import com.aylson.core.frame.domain.Result; import com.aylson.core.frame.domain.ResultCode; import com.aylson.dc.partner.search.CouponApplySearch; import com.aylson.dc.partner.service.CouponApplyService; import com.aylson.dc.partner.vo.CouponApplyVo; /** * 优惠券配置管理 * @author wwx * @since 2017-01 * @version v1.0 * */ @Controller @RequestMapping("/partner/couponApply") public class CouponApplyController extends BaseController { @Autowired private CouponApplyService couponApplyService; //优惠券配置服务 /** * 获取列表(分页) * @param couponApplySearch * @return */ @ResponseBody @RequestMapping(value = "/getPage", method = RequestMethod.GET) public Result getPage(CouponApplySearch couponApplySearch) { Result result = new Result(); Page<CouponApplyVo> page = this.couponApplyService.getPage(couponApplySearch); result.setOK(ResultCode.CODE_STATE_200, "操作成功", page); return result; } /** * 获取列表(不分页) * @param couponApplySearch * @return */ @ResponseBody @RequestMapping(value = "/getList", method = RequestMethod.GET) public Result getList(CouponApplySearch couponApplySearch) { Result result = new Result(); List<CouponApplyVo> list = this.couponApplyService.getList(couponApplySearch); result.setOK(ResultCode.CODE_STATE_200, "操作成功", list); return result; } /** * 获取列表(不分页) * @param couponApplySearch * @return */ @ResponseBody @RequestMapping(value = "/getById", method = RequestMethod.GET) public Result getById(Integer id) { Result result = new Result(); if(id == null){ result.setError(ResultCode.CODE_STATE_4006, "获取id失败,请稍后再试或者联系管理员!"); return result; } CouponApplyVo couponApplyVo = this.couponApplyService.getById(id); if(couponApplyVo == null){ result.setError(ResultCode.CODE_STATE_4006, "获取信息失败,请稍后再试或者联系管理员!"); }else{ result.setOK(ResultCode.CODE_STATE_200, "操作成功", couponApplyVo); } return result; } /** * 审核 * @param id * @param isPass * @return */ @RequestMapping(value = "/verify", method = RequestMethod.POST) @ResponseBody public Result verify(Integer id, Boolean isPass) { Result result = null; try { result = this.couponApplyService.verify(id, isPass); } catch (Exception e) { e.printStackTrace(); result.setError(ResultCode.CODE_STATE_500, e.getMessage()); } return result; } }
[ "874189630@qq.com" ]
874189630@qq.com
176bcfce2b6ed4c0fd03b72e033aca88b8635672
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app81/source/com/tencent/android/tpush/service/channel/b/i.java
b978dbe1e83ecc680805c754bf4eb32a1e25b784
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
1,242
java
package com.tencent.android.tpush.service.channel.b; public abstract class i extends f { protected short d; protected int e; protected long f; protected long g; protected short h; protected short i; protected short k; protected short l; protected short m; protected byte[] n = new byte[0]; static { if (!i.class.desiredAssertionStatus()) {} for (boolean bool = true;; bool = false) { o = bool; return; } } public i() {} public void a(short paramShort) { this.h = paramShort; } public void a(byte[] paramArrayOfByte) { this.n = paramArrayOfByte; } public void b(short paramShort) { this.k = paramShort; } public boolean e() { return (this.h & 0x80) != 0; } public short f() { return this.h; } public int g() { return this.e; } public short h() { return this.k; } public byte[] i() { return this.n; } public short j() { return this.m; } public String toString() { return getClass().getSimpleName() + "(p:" + this.k + "|v:" + this.l + "|r:" + this.g + "|s:" + this.e + "|c:" + Integer.toHexString(this.h) + "|r:" + this.m + "|l:" + this.f + ")"; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
4e188c3b01bbf1a5085c5dfdec00066b9cb40320
ef8f74b2e9437cf61c8f9b8de8a422d2a0b7f507
/src/main/java/com/wojciech/gaudnik/spock_test/SpockTestApplication.java
8f5054c460dc7d789a84ca744c157c5414f850ab
[]
no_license
wojciechGaudnik/spock_test
4eabe0d69a4e72a227596dcb542cd96de3fb0d89
6e6556333a7a73024cc7933dc56b18d2f4ef07a6
refs/heads/master
2022-12-23T12:47:24.617269
2020-10-04T20:24:37
2020-10-04T20:24:37
294,956,109
0
0
null
null
null
null
UTF-8
Java
false
false
405
java
package com.wojciech.gaudnik.spock_test; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cache.annotation.EnableCaching; @SpringBootApplication @EnableCaching public class SpockTestApplication { public static void main(String[] args) { SpringApplication.run(SpockTestApplication.class, args); } }
[ "wojciech.gaudnik@gmail.com" ]
wojciech.gaudnik@gmail.com
83ae45be4487a31c768f9268874278772f1d4037
71505060050f0a9f4e6478e1755280c2bbaccac9
/greenLight/src/main/java/com/suidifu/mq/producer/simple/SimpleTopicProducer.java
17b8c301d39a1e5e9b547522e3466743bad966c6
[]
no_license
soldiers1989/comsui
1f73003e7345946ef51af7d73ee3da593f6151ed
6f5c8a28fb1f58e0afc979a1dd5f2e43cbfa09cc
refs/heads/master
2020-03-27T19:25:33.560060
2018-07-06T06:21:05
2018-07-06T06:21:05
146,988,141
0
1
null
2018-09-01T10:11:31
2018-09-01T10:11:31
null
UTF-8
Java
false
false
548
java
package com.suidifu.mq.producer.simple; import java.util.List; import com.suidifu.mq.config.RabbitMqQueueConfig; import com.suidifu.mq.producer.producerworker.TopicProducer; /** * 例serviceName=table1.*,table2.*|table2.*,table4.*会产生2个队列, * topicProducer.rpc().routingKey("table2.update").sendAsync..会同时往2个队列发数据 * * @author lisf * */ public abstract class SimpleTopicProducer extends TopicProducer { @Override protected List<RabbitMqQueueConfig> topicConfigList() { return getTopicConfigList(); } }
[ "mwf5310@163.com" ]
mwf5310@163.com
4c035cc5db27b9686480c65d46d4dccfa11e277d
33185a0983c7cd0f80e577bdb042fe05465863d0
/src/main/java/uk/ac/ebi/jmzidml/model/mzidml/SpecificityRules.java
23a42a6f691c3de3df4f0b7ec27b0a477de73e5b
[]
no_license
PRIDE-Utilities/jmzIdentML
6f0fe5a80b720296761d8e90d12a69894ccc69cd
1a54a8184b6c7d55edd9ecaf0fc332dd9921a1a3
refs/heads/master
2022-09-13T02:19:09.523338
2022-08-26T15:52:10
2022-08-26T15:52:10
42,942,761
4
6
null
2022-08-26T15:52:11
2015-09-22T15:29:46
Java
UTF-8
Java
false
false
2,385
java
package uk.ac.ebi.jmzidml.model.mzidml; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import uk.ac.ebi.jmzidml.model.CvParamListCapable; import uk.ac.ebi.jmzidml.model.MzIdentMLObject; /** * The specificity rules of the searched modification including for example the probability of a modification's presence or peptide or protein termini. Standard fixed or variable status should be provided by the attribute fixedMod. * * <p>Java class for SpecificityRulesType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="SpecificityRulesType"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;element name="cvParam" type="{http://psidev.info/psi/pi/mzIdentML/1.1}CVParamType" maxOccurs="unbounded"/&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SpecificityRulesType", propOrder = { "cvParam" }) public class SpecificityRules extends MzIdentMLObject implements Serializable, CvParamListCapable { private final static long serialVersionUID = 100L; @XmlElement(required = true) protected List<CvParam> cvParam; /** * Gets the value of the cvParam property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the cvParam property. * * <p> * For example, to add a new item, do as follows: * <pre> * getCvParam().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link CvParam } * * */ public List<CvParam> getCvParam() { if (cvParam == null) { cvParam = new ArrayList<>(); } return this.cvParam; } }
[ "ypriverol@gmail.com" ]
ypriverol@gmail.com
795e13f2041ffa6de833717b00fa38d699fa60bf
fde1dd452fef4a08fbdb097dce90878b3f92f611
/src/mc/alk/arena/util/PermissionsUtil.java
7ae52b7472e4af54d93ecc383d73024ab6d97d5a
[]
no_license
ToxicDeath/BattleArena
3b1e25ffabbc7586449fd2a9f850acc35d22f766
03050fc2d1136b63998284c9a3eac9012763ee43
refs/heads/master
2021-01-18T09:33:10.408239
2012-10-22T16:11:10
2012-10-22T16:11:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,824
java
package mc.alk.arena.util; import mc.alk.arena.BattleArena; import mc.alk.arena.Defaults; import mc.alk.arena.objects.ArenaPlayer; import org.bukkit.entity.Player; public class PermissionsUtil { static final int ticks = 2; public static void givePlayerInventoryPerms(ArenaPlayer p){ givePlayerInventoryPerms(p.getPlayer()); } public static void givePlayerInventoryPerms(Player p){ if (BattleArena.getSelf().isEnabled()){ if (Defaults.PLUGIN_MULTI_INV){ /// Give the multiinv permission node to ignore this player p.getPlayer().addAttachment(BattleArena.getSelf(), Defaults.MULTI_INV_IGNORE_NODE, true, ticks);} if (Defaults.PLUGIN_MULITVERSE_CORE){ /// Give the multiverse-core permission node to ignore this player p.getPlayer().addAttachment(BattleArena.getSelf(), Defaults.MULTIVERSE_CORE_IGNORE_NODE, true, ticks);} if (Defaults.PLUGIN_MULITVERSE_INV){ /// Give the multiverse-inventories permission node to ignore this player p.getPlayer().addAttachment(BattleArena.getSelf(), Defaults.MULTIVERSE_INV_IGNORE_NODE, true, ticks);} } } /// TODO CLEANUP OR REMOVE public static void setWorldGuardBypassPerms(ArenaPlayer p, String world, boolean newState) { //// final String perm = +world; // boolean state = p.getPlayer().hasPermission(perm); // if (state != newState){ // p.getPlayer().addAttachment(BattleArena.getSelf(), perm, newState); // } } public static int getPriority(Player player) { if (player.hasPermission("arena.priority.lowest")){ return 1000;} else if (player.hasPermission("arena.priority.low")){ return 900;} else if (player.hasPermission("arena.priority.normal")){ return 800;} else if (player.hasPermission("arena.priority.high")){ return 700;} else if (player.hasPermission("arena.priority.highest")){ return 600;} return 1000; } }
[ "alkarin.v@gmail.com" ]
alkarin.v@gmail.com
7b9fa8ca1f2e369c0bf058695003af211c9e3a3e
559ea64c50ae629202d0a9a55e9a3d87e9ef2072
/com/ifoer/expedition/BluetoothOrder/StatisticHelper.java
c953b67ede41a83f397b25c8c09617ddbb3dce3c
[]
no_license
CrazyWolf2014/VehicleBus
07872bf3ab60756e956c75a2b9d8f71cd84e2bc9
450150fc3f4c7d5d7230e8012786e426f3ff1149
refs/heads/master
2021-01-03T07:59:26.796624
2016-06-10T22:04:02
2016-06-10T22:04:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
997
java
package com.ifoer.expedition.BluetoothOrder; public class StatisticHelper { int bytesPerSecond; int deltaBytes; long deltaTimeInMillis; int restTimeInSeconds; public void calcResults(long restBytes, int deltaBytes, long startTime, long endTime) { this.deltaTimeInMillis = endTime - startTime; if (this.deltaTimeInMillis != 0) { this.bytesPerSecond = (int) (((long) (deltaBytes * 1000)) / this.deltaTimeInMillis); this.restTimeInSeconds = (int) (restBytes / ((long) this.bytesPerSecond)); return; } this.bytesPerSecond = 60; this.restTimeInSeconds = 60; } public int getRestSeconds() { return this.restTimeInSeconds % 60; } public int getRestMinutes() { return this.restTimeInSeconds / 60; } public int getRestHours() { return this.restTimeInSeconds / 3600; } public int getTransmissionSpeed() { return this.bytesPerSecond; } }
[ "ahhmedd16@hotmail.com" ]
ahhmedd16@hotmail.com
345258e1d46b9ddc27bcf16fae32160c290d7269
4480db5f737c02ab52f72a8c1acd9180afd624ee
/net/minecraft/server/NetworkMasterThread.java
b937979bbfe7af4a04932ca95e4b593a3b453d0c
[]
no_license
CollinJ/mc-dev
61850bb8ae68e57b5bef35f847ba5979ce2b66df
3dcb2867b9995dba1f06ec51ffaa31c2f61ee5c1
refs/heads/master
2020-12-25T07:16:56.461543
2011-01-27T03:20:05
2011-01-27T03:20:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
803
java
package net.minecraft.server; class NetworkMasterThread extends Thread { final NetworkManager a; /* synthetic field */ NetworkMasterThread(NetworkManager networkmanager) { super(); a = networkmanager; } public void run() { try { Thread.sleep(5000L); if (NetworkManager.e(a).isAlive()) { try { NetworkManager.e(a).stop(); } catch (Throwable throwable) {} } if (NetworkManager.f(a).isAlive()) { try { NetworkManager.f(a).stop(); } catch (Throwable throwable1) {} } } catch (InterruptedException interruptedexception) { interruptedexception.printStackTrace(); } } }
[ "erikbroes@grum.nl" ]
erikbroes@grum.nl
9839d857d4f9d931dbf47c3190d990a441d031f1
96083219d9ec1a9963e5b134ba080f726119b65f
/src/android/media/AudioPatch.java
51da9437953f6eadc2701feefa977b1ef5aee42b
[]
no_license
rajatgupta1998/packages_apps_MusicFX
484d91e01b1a9d2107c4664889ada957430a3607
914cb57a93b5811dd84349d55228aed7beb2bfbe
refs/heads/master
2020-04-22T00:14:16.192475
2019-02-22T17:23:18
2019-02-22T17:23:18
169,972,135
0
0
null
null
null
null
UTF-8
Java
false
false
2,429
java
/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.media; /** * An AudioPatch describes a connection between audio sources and audio sinks. * An audio source can be an output mix (playback AudioBus) or an input device (microphone). * An audio sink can be an output device (speaker) or an input mix (capture AudioBus). * An AudioPatch is created by AudioManager.createAudioPatch() and released by * AudioManager.releaseAudioPatch() * It contains the list of source and sink AudioPortConfig showing audio port configurations * being connected. * * @hide */ public class AudioPatch { private final AudioHandle mHandle; private final AudioPortConfig[] mSources; private final AudioPortConfig[] mSinks; AudioPatch(AudioHandle patchHandle, AudioPortConfig[] sources, AudioPortConfig[] sinks) { mHandle = patchHandle; mSources = sources; mSinks = sinks; } /** * Retrieve the list of sources of this audio patch. */ public AudioPortConfig[] sources() { return mSources; } /** * Retreive the list of sinks of this audio patch. */ public AudioPortConfig[] sinks() { return mSinks; } /** * Get the system unique patch ID. */ public int id() { return mHandle.id(); } @Override public String toString() { StringBuilder s = new StringBuilder(); s.append("mHandle: "); s.append(mHandle.toString()); s.append(" mSources: {"); for (AudioPortConfig source : mSources) { s.append(source.toString()); s.append(", "); } s.append("} mSinks: {"); for (AudioPortConfig sink : mSinks) { s.append(sink.toString()); s.append(", "); } s.append("}"); return s.toString(); } }
[ "azaidi@live.nl" ]
azaidi@live.nl
319a0b53686a141a24990086c6e421987c7c884b
f3e6a4e6010f76be40e80fa18392ec004507f9f7
/bojha/test/ht/MeMomTest.java
f8530a0e70d7875a024cdfa2f6de4ee7a4a66779
[]
no_license
Fawzy1/allgo
be1008e003e39e32a6f76e3c5fb145c16e6a6fec
3516e52541884f767dc590e3544f1e5291b25d5e
refs/heads/master
2021-01-19T23:24:48.757555
2016-03-08T16:55:21
2016-03-08T16:55:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,117
java
package ht; import org.junit.Assert; import org.junit.Test; public class MeMomTest { @Test public void testSeating() { MeMom me = new MeMom(); MeMom.Bus bus = me.new Bus(new String[]{"3 2","1","2","1 2"}); bus.process(); Assert.assertNotNull(bus); bus.printOccupancy(); String seatingArrangement = bus.printFinalSeats(); System.out.println(seatingArrangement); Assert.assertEquals("1 3", seatingArrangement); Assert.assertTrue("1 3".equals(seatingArrangement)); bus = me.new Bus(new String[]{"3 2","1","3","1 2 3"}); bus.process(); Assert.assertNotNull(bus); bus.printOccupancy(); seatingArrangement = bus.printFinalSeats(); System.out.println(seatingArrangement); Assert.assertEquals("1 3 2", seatingArrangement); Assert.assertTrue("1 3 2".equals(seatingArrangement)); bus = me.new Bus(new String[]{"3 2","3","3","1 2 3"}); bus.process(); Assert.assertNotNull(bus); bus.printOccupancy(); seatingArrangement = bus.printFinalSeats(); System.out.println(seatingArrangement); Assert.assertEquals("3 1 2", seatingArrangement); Assert.assertTrue("3 1 2".equals(seatingArrangement)); bus = me.new Bus(new String[]{"3 2","2","3","1 2 3"}); bus.process(); Assert.assertNotNull(bus); bus.printOccupancy(); seatingArrangement = bus.printFinalSeats(); System.out.println(seatingArrangement); Assert.assertEquals("2 1 3", seatingArrangement); Assert.assertTrue("2 1 3".equals(seatingArrangement)); bus = me.new Bus(new String[]{"5 5","5","3","1 3 5"}); bus.process(); Assert.assertNotNull(bus); bus.printOccupancy(); seatingArrangement = bus.printFinalSeats(); System.out.println(seatingArrangement); Assert.assertEquals("5 3 4", seatingArrangement); Assert.assertTrue("5 3 4".equals(seatingArrangement)); bus = me.new Bus(new String[]{"5 5","1","3","1 3 5"}); bus.process(); Assert.assertNotNull(bus); bus.printOccupancy(); seatingArrangement = bus.printFinalSeats(); System.out.println(seatingArrangement); Assert.assertEquals("1 3 4", seatingArrangement); Assert.assertTrue("1 3 4".equals(seatingArrangement)); bus = me.new Bus(new String[]{"5 5","3","3","1 3 5"}); bus.process(); Assert.assertNotNull(bus); bus.printOccupancy(); seatingArrangement = bus.printFinalSeats(); System.out.println(seatingArrangement); Assert.assertEquals("3 5 4", seatingArrangement); Assert.assertTrue("3 5 4".equals(seatingArrangement)); bus = me.new Bus(new String[]{"5 5","2","3","1 3 5"}); bus.process(); Assert.assertNotNull(bus); bus.printOccupancy(); seatingArrangement = bus.printFinalSeats(); System.out.println(seatingArrangement); Assert.assertEquals("2 1 4", seatingArrangement); Assert.assertTrue("2 1 4".equals(seatingArrangement)); bus = me.new Bus(new String[]{"20000 5","2","3","1 2 3"}); bus.process(); Assert.assertNotNull(bus); // bus.printOccupancy(); seatingArrangement = bus.printFinalSeats(); System.out.println(seatingArrangement); // Assert.assertEquals("2 1 4", seatingArrangement); // Assert.assertTrue("2 1 4".equals(seatingArrangement)); } }
[ "debmalya.jash@gmail.com" ]
debmalya.jash@gmail.com
947e4f4516585e3e39864f7a69959ae95dada54b
c54062a41a990c192c3eadbb9807e9132530de23
/solutions/lambdacomparator/src/main/java/lambdacomparator/cloud/Clouds.java
bc2bac79b2280c209e38b184641c80b3f6d91bea
[]
no_license
Training360/strukturavalto-java-public
0d76a9dedd7f0a0a435961229a64023931ec43c7
82d9b3c54437dd7c74284f06f9a6647ec62796e3
refs/heads/master
2022-07-27T15:07:57.915484
2021-12-01T08:57:06
2021-12-01T08:57:06
306,286,820
13
115
null
null
null
null
UTF-8
Java
false
false
939
java
package lambdacomparator.cloud; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; public class Clouds { public CloudStorage alphabeticallyFirst(List<CloudStorage> storages) { return Collections.min(storages, Comparator.comparing(CloudStorage::getProvider, String::compareToIgnoreCase)); } public CloudStorage bestPriceForShortestPeriod(List<CloudStorage> storages) { return Collections.min(storages, Comparator.comparing(CloudStorage::getPeriod, Comparator.nullsFirst(Comparator.comparingInt(PayPeriod::getLength))).thenComparingDouble(CloudStorage::getPrice)); } public List<CloudStorage> worstOffers(List<CloudStorage> storages) { List<CloudStorage> copyStorages = new ArrayList<>(storages); copyStorages.sort(Comparator.reverseOrder()); return copyStorages.subList(0, Math.min(copyStorages.size(), 3)); } }
[ "viczian.istvan@gmail.com" ]
viczian.istvan@gmail.com
39f4cbf3c9c4f9fb1a84e7da57be25df6a81b311
42e94aa09fe8d979f77449e08c67fa7175a3e6eb
/src/net/s7.java
58f981ee697fda1461db5a4be21e63667940442f
[ "Unlicense" ]
permissive
HausemasterIssue/novoline
6fa90b89d5ebf6b7ae8f1d1404a80a057593ea91
9146c4add3aa518d9aa40560158e50be1b076cf0
refs/heads/main
2023-09-05T00:20:17.943347
2021-11-26T02:35:25
2021-11-26T02:35:25
432,312,803
1
0
Unlicense
2021-11-26T22:12:46
2021-11-26T22:12:45
null
UTF-8
Java
false
false
1,187
java
package net; import com.google.gson.JsonElement; import net.aK7; import net.aRY; import net.aRp; import net.acE; import viaversion.viaversion.api.PacketWrapper; import viaversion.viaversion.api.Via; import viaversion.viaversion.api.remapper.PacketHandler; import viaversion.viaversion.api.type.Type; import viaversion.viaversion.protocols.protocol1_12to1_11_1.ChatItemRewriter; import viaversion.viaversion.protocols.protocol1_12to1_11_1.TranslateRewriter; class s7 implements PacketHandler { final aK7 a; s7(aK7 var1) { this.a = var1; } public void handle(PacketWrapper var1) throws Exception { acE[] var2 = aRp.a(); if(Via.getConfig().is1_12NBTArrayFix()) { try { JsonElement var3 = (JsonElement)aRY.i.transform((PacketWrapper)null, ((JsonElement)var1.passthrough(Type.COMPONENT)).toString()); TranslateRewriter.toClient(var3, var1.user()); ChatItemRewriter.toClient(var3, var1.user()); var1.set(Type.COMPONENT, 0, var3); } catch (Exception var4) { var4.printStackTrace(); } } } private static Exception a(Exception var0) { return var0; } }
[ "91408199+jeremypelletier@users.noreply.github.com" ]
91408199+jeremypelletier@users.noreply.github.com
c0425ef733e2af96c9702ef78c621b95a6c9e0eb
e65bd894902324fd9d3ce076aee7db9519d160f9
/commons/business-commons/src/main/java/xyz/yhhu/financial/exception/BusinessException.java
96786a05ec2b0640f374c1185542fdebdca5dc4d
[]
no_license
yhuihu/financial
7128e6ad5577d18990735c2f4dc4825992800299
80d7939322f06f4fb7a37fc3bb65f81d625807bf
refs/heads/master
2022-12-20T00:34:54.755099
2020-09-12T03:31:57
2020-09-12T03:31:57
291,265,682
0
0
null
null
null
null
UTF-8
Java
false
false
589
java
package xyz.yhhu.financial.exception; /** * @author Tiger * @date 2020-06-17 * @see xyz.yhhu.financial.exception **/ public class BusinessException extends RuntimeException { private static final long serialVersionUID = -5691472265585910797L; private Integer code; public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } public BusinessException() { } public BusinessException(ExceptionStatus status) { super(status.getMessage()); this.code = status.getCode(); } }
[ "35516186+yhuihu@users.noreply.github.com" ]
35516186+yhuihu@users.noreply.github.com
a9b9cc6c39a6022001075c28837b72032e18cf1c
6c75bc3f0b09f3d01765f973020b0b2a5af35deb
/sdk_framework/src/main/java/com/enjoy/sdk/framework/view/dialog/BounceEnter/BounceRightEnter.java
a910ca180ed4dfcf3347c1f5991d05f399a91369
[]
no_license
luckkiss/enjoySDK
40d15593b2e31fedcdb7ca18e58381469bbc1037
7ccd4bd4a13ecf7a4376ebe0dc0ef41c7ee67c81
refs/heads/main
2023-08-31T12:34:59.553328
2021-11-08T10:28:00
2021-11-08T10:28:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
636
java
package com.enjoy.sdk.framework.view.dialog.BounceEnter; import android.animation.ObjectAnimator; import android.util.DisplayMetrics; import android.view.View; import com.enjoy.sdk.framework.view.dialog.animation.BaseAnimatorSet; public class BounceRightEnter extends BaseAnimatorSet { public BounceRightEnter() { duration = 500; } @Override public void setAnimation(View view) { DisplayMetrics dm = view.getContext().getResources().getDisplayMetrics(); animatorSet.playTogether(ObjectAnimator.ofFloat(view, "alpha", 0, 1, 1, 1),// ObjectAnimator.ofFloat(view, "translationX", 250 * dm.density, -30, 10, 0)); } }
[ "1628103949@qq.com" ]
1628103949@qq.com
5b84702c5173da3e2e8de2c8525733c55777498c
8f85fedb1f052b2eeb960387f65915350ba75830
/net.certware.argument.aml/src/net/certware/argument/aml/QuestionRelationships.java
eec75c0135eb3067e8c3de71ce07308c300decf7
[ "Apache-2.0" ]
permissive
mrbcuda/CertWare
bc3dd18ff803978d84143c26bfc7e3f74bd0c6aa
67ff7f9dc00a2298bfcb574e2acf056f7b7786b2
refs/heads/master
2021-01-17T21:26:34.643174
2013-08-06T22:01:30
2013-08-06T22:01:30
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
2,049
java
/** * AML metamodel copyright © 2000-2005 SRI International. * Implementation into plugin copyright © 2010-2011 United States Government as represented by the Administrator for The National Aeronautics and Space Administration. All Rights Reserved. * */ package net.certware.argument.aml; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Question Relationships</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link net.certware.argument.aml.QuestionRelationships#getDependent <em>Dependent</em>}</li> * </ul> * </p> * * @see net.certware.argument.aml.AmlPackage#getQuestionRelationships() * @model extendedMetaData="name='questionRelationships_._type' kind='elementOnly'" * @generated */ public interface QuestionRelationships extends EObject { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ String copyright = "AML metamodel copyright © 2000-2005 SRI International.\nImplementation into plugin copyright © 2010-2011 United States Government as represented by the Administrator for The National Aeronautics and Space Administration. All Rights Reserved. \n"; //$NON-NLS-1$ /** * Returns the value of the '<em><b>Dependent</b></em>' containment reference list. * The list contents are of type {@link net.certware.argument.aml.Dependent}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Dependent</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Dependent</em>' containment reference list. * @see net.certware.argument.aml.AmlPackage#getQuestionRelationships_Dependent() * @model containment="true" * extendedMetaData="kind='element' name='dependent' namespace='##targetNamespace'" * @generated */ EList<Dependent> getDependent(); } // QuestionRelationships
[ "mrbarry@kestreltechnology.com" ]
mrbarry@kestreltechnology.com
a6d924643ec0610c0bc21b2a558c9a27fa70010a
77736eef58a2a105ffcd15d30e9beb81226f6398
/array_study/array_study/ArrayTest.java
70237b39bab2db80fc57440ad5461e3640fd1feb
[]
no_license
apaqi/javabase_wpx
e6a1d07a17ef52d081b7060e4aac144ed899ff44
e1c7c129d214968ce919812d3deabd38c98775dd
refs/heads/master
2020-03-18T20:31:37.422651
2018-05-29T00:31:22
2018-05-29T00:31:22
135,221,454
0
0
null
null
null
null
GB18030
Java
false
false
530
java
package array_study; import java.util.Arrays; public class ArrayTest { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int[][] array2 = new int[1][]; System.out.println("Result:"+Arrays.deepToString(array2)); //方式一:申明数组 int[] a = new int[3]; //方式二:聚集初始化,只能在声明的地方赋值 int b[] = {1,2,3,4}; //方式二:动态聚集初始化,可以在任何地方赋值 int[] c; c = new int[]{1,2,3}; } }
[ "wangpeixuan00@126.com" ]
wangpeixuan00@126.com
fec695ba4883d7a867c9ed841c9a50de9be6bc4e
0108eebefe99ad22beb5e267ea2515f2523203f2
/app/src/main/java/com/sanwenyu/stemplate/ui/zone/bean/User.java
2c315ce4e5dedeb1f5eadf13ced4c38275465a90
[]
no_license
sanwenyulm/STemplate
5439164236600e73db8e53fa517aa2516e8f3b58
4217233dd9ef80ef0e29fed5607c5363ee7d468f
refs/heads/master
2022-04-01T12:33:43.189389
2020-01-28T12:55:29
2020-01-28T12:55:29
236,731,108
0
0
null
null
null
null
UTF-8
Java
false
false
1,662
java
package com.sanwenyu.stemplate.ui.zone.bean; import android.os.Parcel; import android.os.Parcelable; /** * des:发说说者实体类 * Created by xsf * on 2016.07.11:11 */ public class User implements Parcelable { private String id; private String name; private String headUrl; private boolean isOpen=false; public User(String id, String name, String headUrl){ this.id = id; this.name = name; this.headUrl = headUrl; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getHeadUrl() { return headUrl; } public void setHeadUrl(String headUrl) { this.headUrl = headUrl; } public boolean isOpen() { return isOpen; } public void setOpen(boolean open) { isOpen = open; } @Override public String toString() { return "id = " + id + "; name = " + name + "; headUrl = " + headUrl; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.id); dest.writeString(this.name); dest.writeString(this.headUrl); dest.writeByte(isOpen ? (byte) 1 : (byte) 0); } protected User(Parcel in) { this.id = in.readString(); this.name = in.readString(); this.headUrl = in.readString(); this.isOpen = in.readByte() != 0; } public static final Creator<User> CREATOR = new Creator<User>() { @Override public User createFromParcel(Parcel source) { return new User(source); } @Override public User[] newArray(int size) { return new User[size]; } }; }
[ "you@example.com" ]
you@example.com
1a71c481c3131e1226d46c5d6932c1b4cfceb2c4
77499ab233b7766e14fffac6ffa698e7cd8650a3
/OSATE-AADL2_projects/osate.tests/src/aadl2/tests/StructuralFeatureTest.java
050e6fc0a2033dd4b5a3feeea07c2e5950009659
[ "MIT" ]
permissive
carduswork/SmartFireAlarm
a15fb2857810742521c6976466f5fdea54143b8b
6085b3998d106cd030974f887ae1f428bdd5d3cd
refs/heads/master
2022-01-09T14:52:42.523976
2019-06-22T06:55:47
2019-06-22T06:55:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,368
java
/** */ package aadl2.tests; import aadl2.StructuralFeature; /** * <!-- begin-user-doc --> * A test case for the model object '<em><b>Structural Feature</b></em>'. * <!-- end-user-doc --> * <p> * The following features are tested: * <ul> * <li>{@link aadl2.ClassifierFeature#getFeaturingClassifier() <em>Featuring Classifier</em>}</li> * </ul> * </p> * @generated */ public abstract class StructuralFeatureTest extends RefinableElementTest { /** * Constructs a new Structural Feature test case with the given name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public StructuralFeatureTest(String name) { super(name); } /** * Returns the fixture for this Structural Feature test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected StructuralFeature getFixture() { return (StructuralFeature)fixture; } /** * Tests the '{@link aadl2.ClassifierFeature#getFeaturingClassifier() <em>Featuring Classifier</em>}' feature getter. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see aadl2.ClassifierFeature#getFeaturingClassifier() * @generated */ public void testGetFeaturingClassifier() { // TODO: implement this feature getter test method // Ensure that you remove @generated or mark it @generated NOT fail(); } } //StructuralFeatureTest
[ "renangreca@gmail.com" ]
renangreca@gmail.com
b6551aac9bacd260f7f43e6c62a67d365705e274
7c46a44f1930b7817fb6d26223a78785e1b4d779
/store/src/java/com/zimbra/cs/redolog/logger/LogWriter.java
4f339b93ae574b5421be733589730b53ec06ceb3
[]
no_license
Zimbra/zm-mailbox
20355a191c7174b1eb74461a6400b0329907fb02
8ef6538e789391813b65d3420097f43fbd2e2bf3
refs/heads/develop
2023-07-20T15:07:30.305312
2023-07-03T06:44:00
2023-07-06T10:09:53
85,609,847
67
128
null
2023-09-14T10:12:10
2017-03-20T18:07:01
Java
UTF-8
Java
false
false
4,219
java
/* * ***** BEGIN LICENSE BLOCK ***** * Zimbra Collaboration Suite Server * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2013, 2014, 2016 Synacor, Inc. * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software Foundation, * version 2 of the License. * * 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 <https://www.gnu.org/licenses/>. * ***** END LICENSE BLOCK ***** */ /* * Created on 2004. 7. 22. * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments */ package com.zimbra.cs.redolog.logger; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.LinkedHashMap; import com.zimbra.cs.redolog.op.RedoableOp; /** * @author jhahm * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public interface LogWriter { /** * Opens the log. * @throws IOException */ public void open() throws IOException; /** * Closes the log. * @throws IOException */ public void close() throws IOException; /** * Logs an entry. * @param op entry being logged * @param data the data stream; must not be null; * while it is possible to compute data from op, only what * is passed in as data gets logged * @param synchronous if true, method doesn't return until log entry * has been written to disk safely, or has been * securely stored in an equivalent manner depending * on the logger implementation * @throws IOException */ public void log(RedoableOp op, InputStream data, boolean synchronous) throws IOException; /** * Make sure all writes are committed to disk, or whatever the log * destination medium is. This is mainly useful only when we need to * make sure the commit record is on disk, because fsync of commit record * is deferred until the logging of the next redo record for performance * reasons. * @throws IOException */ public void flush() throws IOException; /** * Returns the current size of the log. Used for rollover tracking. * @return */ public long getSize(); /** * Returns the time of the log creation. * @return */ public long getCreateTime(); /** * Returns the time of the last entry logged. * @return */ public long getLastLogTime(); /** * Whether the current log is empty, i.e. has no entries logged. * @return * @throws IOException */ public boolean isEmpty() throws IOException; /** * Whether the underlying logfile exists. * @return */ public boolean exists(); /** * Returns the absolute pathname for the underlying logfile. * @return */ public String getAbsolutePath(); /** * Renames the underlying logfile. * @param dest * @return true if and only if the renaming succeeded; false otherwise */ public boolean renameTo(File dest); /** * Deletes the underlying logfile. The logger should be closed first * if open. * @return true if and only if the deletion succeeded; false otherwise */ public boolean delete(); /** * Performs log rollover. * @param activeOps map of pending transactions; these should be logged * at the beginning of new log file * @return java.io.File object for rolled over logfile * @throws IOException */ public File rollover(LinkedHashMap /*<TxnId, RedoableOp>*/ activeOps) throws IOException; /** * Returns the sequence number of redolog. Only file-based log writers * will return a meaningful number. Others return 0. * @return * @throws IOException */ public long getSequence(); }
[ "shriram.vishwanathan@synacor.com" ]
shriram.vishwanathan@synacor.com
9623f3514b427835c8e2c0a4d192cb5fb688d7dd
34c3dbe64f7f09a68c72d1a1f191fe6a302c25cb
/August2019/capstone-project/suchana/suchana-api/src/main/java/com/vastika/training/capstone/suchanaapi/controllers/AuthorController.java
542c17b25b74a04a94e75cd316ea3b5d72a54677
[]
no_license
YogenRaii/fullstack-training
f3cced6e404f3a1777259d8d688647ae7f6921fd
7bc7872a88ef4990a39efc8073864e167bdf587c
refs/heads/master
2023-03-10T03:09:44.104238
2023-01-27T04:07:37
2023-01-27T04:07:37
196,441,398
1
3
null
2023-03-01T08:03:31
2019-07-11T17:50:11
Java
UTF-8
Java
false
false
3,900
java
package com.vastika.training.capstone.suchanaapi.controllers; import com.vastika.training.capstone.suchanaapi.exceptions.SuchanaDataException; import com.vastika.training.capstone.suchanaapi.models.Article; import com.vastika.training.capstone.suchanaapi.models.User; import com.vastika.training.capstone.suchanaapi.models.dtos.CreateUserRequest; import com.vastika.training.capstone.suchanaapi.models.types.RoleType; import com.vastika.training.capstone.suchanaapi.services.ArticleService; import com.vastika.training.capstone.suchanaapi.services.UserService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; import sun.nio.cs.US_ASCII; import javax.validation.Valid; import java.time.LocalDateTime; import java.util.List; @Slf4j @RestController public class AuthorController { @Autowired private UserService userService; @Autowired private ArticleService articleService; @Autowired private BCryptPasswordEncoder passwordEncoder; @RequestMapping("/authors") public ResponseEntity<List<User>> findAll() { return new ResponseEntity<>(this.userService.findAll(), HttpStatus.OK); } @RequestMapping(value = "/authors/{id}", method = RequestMethod.PUT) public ResponseEntity<User> updateAuthor(@RequestBody User user, @PathVariable("id") int id) { log.info("updateAuthor() -> {}", id); user.setId(id); return new ResponseEntity<>(this.userService.update(user), HttpStatus.OK); } @RequestMapping(value = "/authors", method = RequestMethod.POST) public ResponseEntity<User> createAuthor(@Valid @RequestBody CreateUserRequest user, BindingResult result) { log.info("createAuthor() -> {}", user); if (result.hasErrors()) { throw new SuchanaDataException("Invalid Payload!", result.getFieldErrors()); } User userToCreate = new User(); userToCreate.setArticles(null); userToCreate.setFirstName(user.getFirstName()); userToCreate.setLastName(user.getLastName()); userToCreate.setUsername(user.getUsername()); userToCreate.setPassword(passwordEncoder.encode(user.getPassword())); userToCreate.setDateCreated(LocalDateTime.now()); userToCreate.setRole(RoleType.ROLE_AUTHOR); userToCreate.setCategories(user.getCategories()); return new ResponseEntity<>(this.userService.createAuthor(userToCreate), HttpStatus.CREATED); } // /api/v1/users/{id}/accounts @PostMapping("/authors/{id}/articles") public ResponseEntity<Article> createArticle(@Valid @RequestBody Article article, BindingResult result, @PathVariable("id") int authorId) { log.info("createArticle() -> authorId: {}", authorId); if (result.hasErrors()) { throw new SuchanaDataException("Invalid Payload!", result.getFieldErrors()); } article.setPublishDate(LocalDateTime.now()); User user = this.userService.findById(authorId); article.setUser(user); Article saved = this.articleService.save(article); log.info("Article saved -> id: {}", saved.getId()); return new ResponseEntity<>(saved, HttpStatus.CREATED); } @GetMapping("/authors/{id}/articles") public ResponseEntity<List<Article>> getArticlesByAuthor(@PathVariable("id") int authorId) { return new ResponseEntity<>(this.articleService.findByAuthorId(authorId), HttpStatus.OK); } }
[ "yogen.rai.992@gmail.com" ]
yogen.rai.992@gmail.com
b7efda24f02f462e2f54b2490cf6bd3dc7c189b1
c1308d37420a6e1b71376208377bd983ef26b328
/src/main/java/cn/ncut/service/system/sequence/impl/SequenceServiceImpl.java
f506322bb7c68cedcf4d53c3f33be706f8d46def
[]
no_license
ncut-database-lab/dccm
ad830af13f1f99b43e4049f9286d6848a071a3cf
f8d5e523dee0363a735fe226a1e7d1c599504de5
refs/heads/master
2018-10-05T20:38:13.478844
2018-06-17T13:54:53
2018-06-17T13:54:53
117,047,610
1
1
null
2018-01-11T03:55:54
2018-01-11T03:55:54
null
UTF-8
Java
false
false
748
java
package cn.ncut.service.system.sequence.impl; import javax.annotation.Resource; import org.springframework.stereotype.Service; import cn.ncut.dao.DaoSupport; import cn.ncut.entity.Sequence; import cn.ncut.service.system.sequence.SequenceService; @Service("sequenceService") public class SequenceServiceImpl implements SequenceService{ @Resource(name = "daoSupport") private DaoSupport dao; //查找一条记录 @Override public Sequence getSequenceByType(String type) throws Exception { return (Sequence) dao.findForObject("SequenceMapper.getSequenceByType",type); } //修改一条记录 @Override public void updateSequence(Sequence sequence) throws Exception { dao.update("SequenceMapper.updateSequence", sequence); } }
[ "690074384@qq.com" ]
690074384@qq.com
a2f77a321ad3bcf3f326d2287608751e1d827aba
9bfd6349899f737a397ebba27b40986baf5f3d8d
/minitheatre-cdi/src/main/java/org/jboss/errai/demo/mobile/client/local/OrientationDetector.java
cb13e089a61f5becca6d648edbf19a5d968498aa
[]
no_license
csadilek/j1-demos
81c8089647e646406ec4efbf4e23038546107fa6
dc82a5a2476ff4f9a35959ab0ff874972677bd25
refs/heads/master
2021-01-19T12:31:06.305821
2013-05-29T15:35:00
2013-05-29T15:35:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,616
java
package org.jboss.errai.demo.mobile.client.local; import javax.enterprise.event.Event; import org.jboss.errai.demo.mobile.client.shared.OrientationEvent; public abstract class OrientationDetector { /** * Don't try to fire a CDI OrientationEvent event more than once every 250ms. * <p> * TODO we should remove this once the bus supports coalescing events! */ private long minEventInterval = 175; /** * The time we last fired an OrientationEvent. * <p> * TODO we should remove this once the bus supports coalescing events! */ private long lastEventFireTime; protected Event<OrientationEvent> orientationEventSource; /** * Should be set by the main application when the username is set or updated. */ private String clientId = "Anonymous"; /** * Stops the periodic firing of CDI OrientationEvents. If this detector was * already in the stopped state, calling this method has no effect. */ public abstract void stopFiringOrientationEvents(); /** * Starts the periodic firing of CDI OrientationEvents. If this detector was * already in the started state, calling this method has no effect. */ public abstract void startFiringOrientationEvents(); /** * Fires an {@link OrientationEvent} with the given parameters. This method is * meant to be called by the browser-specific logic that detects the device * orientation. */ protected void fireOrientationEvent(double x, double y, double z) { long now = System.currentTimeMillis(); if (now - lastEventFireTime < minEventInterval) { return; } lastEventFireTime = now; orientationEventSource.fire(new OrientationEvent(clientId, x, y, z)); } /** * The provider class that creates the detector calls this method to give us a * means of firing the event. */ void setOrientationEventSource(Event<OrientationEvent> orientationEventSource) { this.orientationEventSource = orientationEventSource; } /** * Sets the client ID (user name) that should be included with all orientation * events fired. * * @param clientId The client ID to use. Not null. */ public void setClientId(String clientId) { if (clientId == null) throw new NullPointerException(); this.clientId = clientId; } /** * Returns true if this detector can be started. Some detectors (for example, * PhoneGap) need to wait for subsystems to start before they can begin firing * orientation events. * <p> * TODO: we won't need this when client code can participate in Errai VoteForInit. */ public abstract boolean isReady(); }
[ "jfuerth@gmail.com" ]
jfuerth@gmail.com
032f73296a58b3555731cca130fc914de583dd32
167584594f25a20447694a038c902a368f8939a1
/ArrayChallenges/MaxValue/src/com/BryceLooyenga/MaxValue/MaxValue.java
be008668e901707001b90b3f3545178ecfdc29a1
[]
no_license
banthony79/JavaPracticeV2
3748406b7a73e3d993e33a121c6e0c5588f2ed79
ea76036b95c1cedf36c2e98a31cf19af06f5dfe3
refs/heads/master
2023-03-15T22:23:13.677691
2021-03-10T03:03:51
2021-03-10T03:03:51
328,844,720
0
0
null
null
null
null
UTF-8
Java
false
false
997
java
package com.BryceLooyenga.MaxValue; import java.util.Scanner; public class MaxValue { public static Scanner scanner = new Scanner(System.in); public static int[] getIntegers(int number) { int[] numArray = new int[number]; System.out.println("Please enter " + number + " numbers"); for (int i = 0; i < numArray.length; i++) { numArray[i] = scanner.nextInt(); } return numArray; } public static int returnMax(int [] array) { int maxNumber = array[0]; for (int i = 0; i < array.length; i++) { if (array[i] > maxNumber) { maxNumber = array[i]; } } return maxNumber; } public static void main(String[] args) { System.out.println(returnMax(getIntegers(4))); } } /* public static int maxValue(int[] array) { for (int i = 0; i < array.length; i++) { if (array[i] < array[i + 1]) { } } //} }*/
[ "blooyeng@gmail.com" ]
blooyeng@gmail.com
96c89a253a1cacbe20f9f6da48d691794529023c
970791c62e43177f15504d4a36a12f93cf336c72
/tutorial.src/extra/jdbc/basics/RetrieveWarnings.java
e2060228952bc3515cc15de2d9a21332c295340b
[]
no_license
ywendy/JavaLearn
ab36ed915d90e55c06d2dc63d8465ba5787794f8
208645e37b7b583131a61204f911e77c3282115a
refs/heads/master
2021-05-26T19:48:34.295026
2013-03-06T17:22:17
2013-03-06T17:22:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,057
java
package extra.jdbc.basics; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Statement; public class RetrieveWarnings { public static void main(String[] args) { Connection con = DriverManagerConnection.getConnection(); Statement stmt = null ; ResultSet rs = null; try{ stmt = con.createStatement(); rs = stmt.executeQuery("select COF_NAME from COFFEES"); while (rs.next()) { String coffeeName = rs.getString("COF_NAME"); System.out.println("Coffees available at the Coffee Break: "); System.out.println(" " + coffeeName); SQLWarning warning = stmt.getWarnings(); if (warning != null) { System.out.println("\n---Warning---\n"); while (warning != null) { System.out.println("Message: " + warning.getMessage()); System.out.println("SQLState: " + warning.getSQLState()); System.out.print("Vendor error code: "); System.out.println(warning.getErrorCode()); System.out.println(""); warning = warning.getNextWarning(); } } SQLWarning warn = rs.getWarnings(); if (warn != null) { System.out.println("\n---Warning---\n"); while (warn != null) { System.out.println("Message: " + warn.getMessage()); System.out.println("SQLState: " + warn.getSQLState()); System.out.print("Vendor error code: "); System.out.println(warn.getErrorCode()); System.out.println(""); warn = warn.getNextWarning(); } } } } catch(SQLException ex) { System.out.println("\n--- SQLException caught ---\n"); while (ex != null) { System.out.println("Message: " + ex.getMessage ()); System.out.println("SQLState: " + ex.getSQLState ()); System.out.println("ErrorCode: " + ex.getErrorCode ()); ex = ex.getNextException(); System.out.println(""); } } catch(Exception e){ e.printStackTrace(); } finally{ DriverManagerConnection.close(con, stmt, rs); } } }
[ "jxfzywm@163.com" ]
jxfzywm@163.com
38723ea7a17cca70cdbcd0dbb66453754a527227
7caa31be4d8be2f8ebd15a02b9e212685d7d06e8
/src/main/java/org/trams/hello/bean/jpa/UserPsychologicalFileEntity.java
edceef8eaa549fda7518b180d98c6dd310f5ba2a
[]
no_license
minajsaaa/hello_counselor
60b6d14f8061dacfdffa44a09892a778a6f4c024
869460f8279025c97a39e98324a28191e957b006
refs/heads/master
2023-05-26T05:19:23.079457
2017-12-25T09:51:10
2017-12-25T09:51:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,366
java
/* * Created on 12 Apr 2017 ( Time 16:10:42 ) * Generated by Telosys Tools Generator ( version 2.1.1 ) */ // This Bean has a basic Primary Key (not composite) package org.trams.hello.bean.jpa; import java.io.Serializable; //import javax.validation.constraints.* ; //import org.hibernate.validator.constraints.* ; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; /** * Persistent class for entity stored in table "user_psychological_file" * * @author Telosys Tools Generator * */ @Entity @Table(name="user_psychological_file", catalog="hello" ) // Define named queries here @NamedQueries ( { @NamedQuery ( name="UserPsychologicalFileEntity.countAll", query="SELECT COUNT(x) FROM UserPsychologicalFileEntity x" ) } ) @DynamicInsert @DynamicUpdate public class UserPsychologicalFileEntity implements Serializable { private static final long serialVersionUID = 1L; //---------------------------------------------------------------------- // ENTITY PRIMARY KEY ( BASED ON A SINGLE FIELD ) //---------------------------------------------------------------------- @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="id", nullable=false) private Integer id ; //---------------------------------------------------------------------- // ENTITY DATA FIELDS //---------------------------------------------------------------------- @Column(name="file_name", length=500) private String fileName ; @Column(name="file_url", length=500) private String fileUrl ; @Temporal(TemporalType.TIMESTAMP) @Column(name="create_date") private Date createDate ; @Temporal(TemporalType.TIMESTAMP) @Column(name="update_date") private Date updateDate ; // "userPsychologicalId" (column "user_psychological_id") is not defined by itself because used as FK in a link //---------------------------------------------------------------------- // ENTITY LINKS ( RELATIONSHIP ) //---------------------------------------------------------------------- @ManyToOne @JoinColumn(name="user_psychological_id", referencedColumnName="id") private UserPsychologicalEntity userPsychological; //---------------------------------------------------------------------- // CONSTRUCTOR(S) //---------------------------------------------------------------------- public UserPsychologicalFileEntity() { super(); } //---------------------------------------------------------------------- // GETTER & SETTER FOR THE KEY FIELD //---------------------------------------------------------------------- public void setId( Integer id ) { this.id = id ; } public Integer getId() { return this.id; } //---------------------------------------------------------------------- // GETTERS & SETTERS FOR FIELDS //---------------------------------------------------------------------- //--- DATABASE MAPPING : file_name ( VARCHAR ) public void setFileName( String fileName ) { this.fileName = fileName; } public String getFileName() { return this.fileName; } //--- DATABASE MAPPING : file_url ( VARCHAR ) public void setFileUrl( String fileUrl ) { this.fileUrl = fileUrl; } public String getFileUrl() { return this.fileUrl; } //--- DATABASE MAPPING : create_date ( DATETIME ) public void setCreateDate( Date createDate ) { this.createDate = createDate; } public Date getCreateDate() { return this.createDate; } //--- DATABASE MAPPING : update_date ( DATETIME ) public void setUpdateDate( Date updateDate ) { this.updateDate = updateDate; } public Date getUpdateDate() { return this.updateDate; } //---------------------------------------------------------------------- // GETTERS & SETTERS FOR LINKS //---------------------------------------------------------------------- public void setUserPsychological( UserPsychologicalEntity userPsychological ) { this.userPsychological = userPsychological; } public UserPsychologicalEntity getUserPsychological() { return this.userPsychological; } //---------------------------------------------------------------------- // toString METHOD //---------------------------------------------------------------------- public String toString() { StringBuffer sb = new StringBuffer(); sb.append("["); sb.append(id); sb.append("]:"); sb.append(fileName); sb.append("|"); sb.append(fileUrl); sb.append("|"); sb.append(createDate); sb.append("|"); sb.append(updateDate); return sb.toString(); } }
[ "kennyphong2811@gmail.com" ]
kennyphong2811@gmail.com
9ab74ef5c220fb59237f2166f988c971359df4b7
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project435/src/main/java/org/gradle/test/performance/largejavamultiproject/project435/p2175/Production43512.java
3c3255015e2c4f385a4d9ccd541a42e30d80fc3e
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,971
java
package org.gradle.test.performance.largejavamultiproject.project435.p2175; public class Production43512 { private Production43503 property0; public Production43503 getProperty0() { return property0; } public void setProperty0(Production43503 value) { property0 = value; } private Production43507 property1; public Production43507 getProperty1() { return property1; } public void setProperty1(Production43507 value) { property1 = value; } private Production43511 property2; public Production43511 getProperty2() { return property2; } public void setProperty2(Production43511 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
0b8f42a15d0ba9b0a33db18cf41a74f12fd8b3cd
4ef431684e518b07288e8b8bdebbcfbe35f364e4
/fld/tas-tests/test-core/src/main/java/com/ca/apm/systemtest/fld/role/GeolocationLoadRole.java
7a067be7e0f9d07bc16b5658bb39e2a36e6cd2bc
[]
no_license
Sarojkswain/APMAutomation
a37c59aade283b079284cb0a8d3cbbf79f3480e3
15659ce9a0030c2e9e5b992040e05311fff713be
refs/heads/master
2020-03-30T00:43:23.925740
2018-09-27T23:42:04
2018-09-27T23:42:04
150,540,177
0
0
null
null
null
null
UTF-8
Java
false
false
6,476
java
package com.ca.apm.systemtest.fld.role; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.aether.artifact.DefaultArtifact; import com.ca.apm.automation.action.flow.commandline.RunCommandFlowContext; import com.ca.apm.automation.action.flow.utility.FileModifierFlow; import com.ca.apm.automation.action.flow.utility.FileModifierFlowContext; import com.ca.apm.automation.action.flow.utility.GenericFlow; import com.ca.apm.automation.action.flow.utility.GenericFlowContext; import com.ca.tas.builder.BuilderBase; import com.ca.tas.client.IAutomationAgentClient; import com.ca.tas.resolver.ITasResolver; import com.ca.tas.role.AbstractRole; /** * Geo Location Load Script for EM FLD. This role should be added to any of the * one FLD TIM machine. So that the btstat files are generated and placed in * tim/out/data/btstats folder. * * Usage: new GeolocationLoadRole.LinuxBuilder(ROLE_ID, * tasResolver).dbHost("flddb01") * .dbPort(5432).dbAdmin("admin").dbPassword("quality") * .dbName("cemdb").build(); * * @author banra06@ca.com */ public class GeolocationLoadRole extends AbstractRole { private String installDir; private ITasResolver tasResolver; public static final String GEOLOCATION_START_LOAD = "geoloadStart"; public static final String GEOLOCATION_STOP_LOAD = "geoloadStop"; private static final String COMMAND = "yum"; private String dbHost; private int dbPort; private String dbAdmin; private String dbPassword; private String dbName; protected GeolocationLoadRole(Builder builder) { super(builder.roleId, builder.getEnvProperties()); this.tasResolver = builder.tasResolver; this.installDir = builder.installDir; this.dbHost = builder.dbHost; this.dbPort = builder.dbPort; this.dbAdmin = builder.dbAdmin; this.dbPassword = builder.dbPassword; this.dbName = builder.dbName; } @Override public void deploy(IAutomationAgentClient aaClient) { getArtifacts(aaClient); updateDBHostName(aaClient); installYumPackages(aaClient); createStartPython(aaClient); createKillPython(aaClient); } private void updateDBHostName(IAutomationAgentClient aaClient) { Map<String, String> updateArgs = new HashMap<String, String>(); updateArgs.put("flddb01", dbHost); updateArgs.put("5432", Integer.toString(dbPort)); updateArgs.put("uid='admin'", "uid='" + dbAdmin + "'"); updateArgs.put("pwd='quality'", "pwd='" + dbPassword + "'"); updateArgs.put("cemdb", dbName); FileModifierFlowContext updateHost = new FileModifierFlowContext.Builder() .replace(installDir + "demo.py", updateArgs).build(); runFlow(aaClient, FileModifierFlow.class, updateHost); } private void installYumPackages(IAutomationAgentClient aaClient) { List<String> arguments = new ArrayList<>(); arguments.add("install"); arguments.add("-y"); arguments.add("pyodbc.x86_64"); arguments.add("python-psycopg2.x86_64"); RunCommandFlowContext runCmdFlowContext = new RunCommandFlowContext.Builder( COMMAND).args(arguments).build(); runCommandFlow(aaClient, runCmdFlowContext); } private void createKillPython(IAutomationAgentClient aaClient) { Collection<String> createSHFile = Arrays .asList("kill $(ps aux | grep '[p]ython2.6 demo.py' | awk '{print $2}')"); FileModifierFlowContext killSh = new FileModifierFlowContext.Builder() .create(installDir + "/killGeo.sh", createSHFile).build(); runFlow(aaClient, FileModifierFlow.class, killSh); } private void getArtifacts(IAutomationAgentClient aaClient) { URL url = tasResolver.getArtifactUrl(new DefaultArtifact( "com.ca.apm.binaries", "fld", "fld", "tar.gz", "1.0")); GenericFlowContext getAgentContext = new GenericFlowContext.Builder() .artifactUrl(url).destination(installDir).build(); runFlow(aaClient, GenericFlow.class, getAgentContext); } private void createStartPython(IAutomationAgentClient aaClient) { Collection<String> createSHFile = Arrays.asList("cd " + installDir, "nohup /usr/bin/python2.6 demo.py > out.log 2>&1 &"); FileModifierFlowContext kickoffSH = new FileModifierFlowContext.Builder() .create(installDir + "/runGeo.sh", createSHFile).build(); runFlow(aaClient, FileModifierFlow.class, kickoffSH); } public static class LinuxBuilder extends Builder { public LinuxBuilder(String roleId, ITasResolver tasResolver) { super(roleId, tasResolver); } } public static class Builder extends BuilderBase<Builder, GeolocationLoadRole> { private final String roleId; private final ITasResolver tasResolver; protected String installDir = "/opt/geolocation/"; protected String dbHost = "localhost"; protected int dbPort = 5432; protected String dbAdmin = "admin"; protected String dbPassword = "quality"; protected String dbName = "cemdb"; public Builder(String roleId, ITasResolver tasResolver) { this.roleId = roleId; this.tasResolver = tasResolver; } @Override public GeolocationLoadRole build() { // TODO Auto-generated method stub startGeoLoad(); stopGeoLoad(); return getInstance(); } @Override protected GeolocationLoadRole getInstance() { // TODO Auto-generated method stub return new GeolocationLoadRole(this); } @Override protected Builder builder() { // TODO Auto-generated method stub return this; } public Builder installDir(String installDir) { this.installDir = installDir; return builder(); } public Builder dbHost(String dbHost) { this.dbHost = dbHost; return builder(); } public Builder dbPort(int dbPort) { this.dbPort = dbPort; return builder(); } public Builder dbAdmin(String dbAdmin) { this.dbAdmin = dbAdmin; return builder(); } public Builder dbName(String dbName) { this.dbName = dbName; return builder(); } public Builder dbPassword(String dbPassword) { this.dbPassword = dbPassword; return builder(); } private void startGeoLoad() { RunCommandFlowContext runCmdFlowContext = new RunCommandFlowContext.Builder( "runGeo.sh").workDir(installDir).build(); getEnvProperties().add(GEOLOCATION_START_LOAD, runCmdFlowContext); } private void stopGeoLoad() { RunCommandFlowContext runCmdFlowContext = new RunCommandFlowContext.Builder( "killGeo.sh").workDir(installDir).build(); getEnvProperties().add(GEOLOCATION_STOP_LOAD, runCmdFlowContext); } } }
[ "sarojkswain@gmail.com" ]
sarojkswain@gmail.com
f83cf64325ed7c14f4d3ed35e9990f670b16d1ee
ca97a7318b16c29dfbe81ab621afd1718fa48ad1
/netty-rpc-demo/springboot-websocket/src/main/java/cn/v5cn/springboot/websocket/handler/SendToOneHandler.java
bd32397ca704aa657b7606f81e4a99fdf001db54
[]
no_license
zyw/springcloud-common
61994a9a91d0403098f4118ceaedf093afdc06e2
3c5dbe33844c1009e7ed625a93199effd21f1f20
refs/heads/master
2022-05-20T21:41:50.984381
2022-05-19T01:16:18
2022-05-19T01:16:18
200,951,573
1
2
null
2020-07-02T00:09:19
2019-08-07T01:47:37
Java
UTF-8
Java
false
false
1,222
java
package cn.v5cn.springboot.websocket.handler; import cn.v5cn.springboot.websocket.message.SendResponse; import cn.v5cn.springboot.websocket.message.SendToOneRequest; import cn.v5cn.springboot.websocket.message.SendToUserRequest; import cn.v5cn.springboot.websocket.util.WebSocketUtil; import org.springframework.stereotype.Component; import org.springframework.web.socket.WebSocketSession; @Component public class SendToOneHandler implements MessageHandler<SendToOneRequest> { @Override public void execute(WebSocketSession session, SendToOneRequest message) { // 这里,假装直接成功 SendResponse response = new SendResponse(); response.setMsgId(message.getMsgId()); response.setCode(0); WebSocketUtil.send(session, SendResponse.TYPE, response); // 创建转发的消息 SendToUserRequest toUserRequest = new SendToUserRequest(); toUserRequest.setMsgId(message.getMsgId()); toUserRequest.setContent(message.getContent()); //发送消息 WebSocketUtil.send(message.getToUser(), SendToUserRequest.TYPE, toUserRequest); } @Override public String getType() { return SendToOneRequest.TYPE; } }
[ "zyw090111@163.com" ]
zyw090111@163.com
8efbba3a533dbac7b6efd47f4ad624e8cc29564a
de3eb812d5d91cbc5b81e852fc32e25e8dcca05f
/tags/3.0.0-r2079/CruxWidgets/src/br/com/sysmap/crux/widgets/client/dynatabs/Tab.java
e9fbee8e2cdda003025f84045fc37f3ecb79a969
[]
no_license
svn2github/crux-framework
7dd52a951587d4635112987301c88db23325c427
58bcb4821752b405a209cfc21fb83e3bf528727b
refs/heads/master
2016-09-06T13:33:41.975737
2015-01-22T08:03:25
2015-01-22T08:03:25
13,135,398
0
0
null
null
null
null
ISO-8859-2
Java
false
false
2,594
java
/* * Copyright 2009 Sysmap Solutions Software e Consultoria Ltda. * * 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 br.com.sysmap.crux.widgets.client.dynatabs; import br.com.sysmap.crux.widgets.client.event.focusblur.BeforeBlurHandler; import br.com.sysmap.crux.widgets.client.event.focusblur.BeforeFocusEvent; import br.com.sysmap.crux.widgets.client.event.focusblur.BeforeFocusHandler; import br.com.sysmap.crux.widgets.client.event.focusblur.HasBeforeFocusAndBeforeBlurHandlers; import com.google.gwt.event.shared.HandlerRegistration; /** * TODO - Gessé - Comment * * @author Gessé S. F. Dafé */ public class Tab extends AbstractTab implements HasBeforeFocusAndBeforeBlurHandlers { private FlapPanel flapPanel; private boolean closeable; private int insertionIndex; private String label; /** * Constructor * * @param id * @param label * @param url * @param closeable * @param reloadIfExists */ Tab(String id, String label, String url, boolean closeable, int insertionIndex, FlapPanel flapPanel) { super(id, url); this.label = label; this.insertionIndex = insertionIndex; this.flapPanel = flapPanel; this.closeable = closeable; } /** * @param label the label to set */ public void setLabel(String label) { this.label = label; this.flapPanel.getFlapController().setTabTitle(label); } /** * @return the label */ public String getLabel() { return label; } public HandlerRegistration addBeforeFocusHandler(BeforeFocusHandler handler) { return addHandler(handler, BeforeFocusEvent.getType()); } public HandlerRegistration addBeforeBlurHandler(BeforeBlurHandler handler) { return flapPanel.addBeforeBlurHandler(handler); } /** * @return the insertionIndex */ int getIndex() { return insertionIndex; } /** * @return the flapPanel */ FlapPanel getFlapPanel() { return flapPanel; } /** * @return the closeable */ boolean isCloseable() { return closeable; } }
[ "tr_bustamante@yahoo.com.br@a5d2bbaa-053c-11de-b17c-0f1ef23b492c" ]
tr_bustamante@yahoo.com.br@a5d2bbaa-053c-11de-b17c-0f1ef23b492c
edebea40ebb77eca3deb5713fbd47a458a63419d
c37d0d069fff859767d0f9a5fa9ca860e96d9339
/src/tools/android/java/com/google/devtools/build/android/desugar/langmodel/LangModelHelper.java
9d50b466c03b5ffb3b8f061d6c2cd49e13b560a5
[ "Apache-2.0" ]
permissive
Squadrick/bazel
e759241ce3de4038bc42303250237ac4ba8ad9e5
5a8219ada648bae84d9d342c3dff67a5b6b14be2
refs/heads/master
2020-11-28T12:44:35.135463
2019-12-23T19:25:39
2019-12-23T19:26:30
229,814,062
1
0
Apache-2.0
2019-12-23T19:50:40
2019-12-23T19:50:40
null
UTF-8
Java
false
false
5,136
java
/* * Copyright 2019 The Bazel Authors. 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.devtools.build.android.desugar.langmodel; import static com.google.devtools.build.android.desugar.langmodel.LangModelConstants.NEST_COMPANION_CLASS_SIMPLE_NAME; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; /** A utility class for the desguaring of nest-based access control classes. */ public final class LangModelHelper { /** * Returns the internal name of the nest host class for a given class. * * <p>e.g. The nest host of a/b/C$D is a/b/C */ public static String nestHost(String classInternalName) { int index = classInternalName.indexOf('$'); return index > 0 ? classInternalName.substring(0, index) : classInternalName; } /** * Returns the internal name of the nest companion class for a given class. * * <p>e.g. The nest host of a/b/C$D is a/b/C$NestCC */ public static String nestCompanion(String classInternalName) { return nestHost(classInternalName) + '$' + NEST_COMPANION_CLASS_SIMPLE_NAME; } /** * Adjust the operation code for dup and pop operations by type size. The method supplements * {@link org.objectweb.asm.Type#getOpcode(int)}. */ public static int getTypeSizeAlignedOpcode(int baseOpcode, Type type) { if (baseOpcode == Opcodes.DUP || baseOpcode == Opcodes.DUP2) { switch (type.getSize()) { case 1: return Opcodes.DUP; case 2: return Opcodes.DUP2; default: // fall out: Impossible Condition throw new AssertionError( String.format("Impossible size (%d) for type (%s)", type.getSize(), type)); } } else if (baseOpcode == Opcodes.DUP_X1 || baseOpcode == Opcodes.DUP_X2) { switch (type.getSize()) { case 1: return Opcodes.DUP_X1; case 2: return Opcodes.DUP_X2; default: // fall out: Impossible Condition throw new AssertionError( String.format("Impossible size (%d) for type (%s)", type.getSize(), type)); } } else if (baseOpcode == Opcodes.DUP2_X1 || baseOpcode == Opcodes.DUP2_X2) { switch (type.getSize()) { case 1: return Opcodes.DUP2_X1; case 2: return Opcodes.DUP2_X2; default: // fall out: Impossible Condition throw new AssertionError( String.format("Impossible size (%d) for type (%s)", type.getSize(), type)); } } else if (baseOpcode == Opcodes.POP || baseOpcode == Opcodes.POP2) { switch (type.getSize()) { case 1: return Opcodes.POP; case 2: return Opcodes.POP2; default: // fall out: Impossible Condition throw new AssertionError( String.format("Impossible size (%d) for type (%s)", type.getSize(), type)); } } else { throw new UnsupportedOperationException( String.format( "Unsupported Opcode Adjustment: Type: %s of base opcode: %d", type, baseOpcode)); } } /** * A checker on whether the give class is eligible as an inner class by its class internal name. * * <p>Note: The reliable source of truth is to check the InnerClasses attribute. However, the * attribute may have not been visited yet. */ public static boolean isEligibleAsInnerClass(String className) { return className.contains("$"); } /** * Whether the referenced class member is a in-nest distinct class access within the given * enclosing method. */ public static boolean isCrossMateRefInNest( ClassMemberKey referencedMember, MethodKey enclosingMethod) { String enclosingClassName = enclosingMethod.owner(); String referencedMemberName = referencedMember.owner(); return (isEligibleAsInnerClass(enclosingClassName) || isEligibleAsInnerClass(referencedMemberName)) && !referencedMemberName.equals(enclosingClassName); } /** Emits efficient instructions for a given integer push operation. */ public static void visitPushInstr(MethodVisitor mv, final int value) { if (value >= -1 && value <= 5) { mv.visitInsn(Opcodes.ICONST_0 + value); } else if (value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE) { mv.visitIntInsn(Opcodes.BIPUSH, value); } else if (value >= Short.MIN_VALUE && value <= Short.MAX_VALUE) { mv.visitIntInsn(Opcodes.SIPUSH, value); } else { mv.visitLdcInsn(value); } } private LangModelHelper() {} }
[ "copybara-worker@google.com" ]
copybara-worker@google.com
26023f5f643ef6476a47aac0cd1829a583ea87c6
8fd949df48f3c3226fea690132a7218b92a86869
/alex-admin/src/main/java/com/alex/alexadmin/mq/DemoQueueConsumer.java
25340373ae4a94daed1f4efcca580949ac0b19bc
[]
no_license
AlexhahahaDrag/kitty-learn
e555c09d1e3f4e2f477e339a7178820ba48fca25
e2581800412956d7990c213906b7746e10e06e1e
refs/heads/master
2022-02-20T04:30:16.085884
2019-12-15T08:52:35
2019-12-15T08:52:35
227,044,010
0
0
null
2022-02-09T22:21:01
2019-12-10T06:21:32
Java
UTF-8
Java
false
false
537
java
package com.alex.alexadmin.mq; import org.springframework.amqp.rabbit.annotation.RabbitHandler; import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.stereotype.Component; @Component @RabbitListener(queues = "demoQueue") public class DemoQueueConsumer { /** *消息消费 * @RabbitHandler代表此方法为接受到消息后的处理方法 */ @RabbitHandler public void received(String msg) { System.out.println("[demoQueue] received message:" + msg); } }
[ "734663446@qq.com" ]
734663446@qq.com
3d9e8fcdbd03a153d0324e8f45d5f403631c1f50
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21_ReducedClassCount/applicationModule/src/test/java/applicationModulepackageJava1/Foo244Test.java
1ec0e07a6dbc6666aeb4b459d64573ceb13af38d
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
package applicationModulepackageJava1; import org.junit.Test; public class Foo244Test { @Test public void testFoo0() { new Foo244().foo0(); } @Test public void testFoo1() { new Foo244().foo1(); } @Test public void testFoo2() { new Foo244().foo2(); } @Test public void testFoo3() { new Foo244().foo3(); } @Test public void testFoo4() { new Foo244().foo4(); } @Test public void testFoo5() { new Foo244().foo5(); } @Test public void testFoo6() { new Foo244().foo6(); } @Test public void testFoo7() { new Foo244().foo7(); } @Test public void testFoo8() { new Foo244().foo8(); } @Test public void testFoo9() { new Foo244().foo9(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
6409e12b1c53625bef82178c151e3d1a1fd9c720
04d13742c89a404661cdac8bdb93a2e7225661aa
/api/src/main/java/com/yuyh/inject/ViewInjector.java
e8d708052650012ea13d9b7c62822da51990f894
[]
no_license
smuyyh/ProcessorDemo
92d09742bcdc9434a9e6e4af2ce3d8a4a00f30e7
615a6a69b694940fef059613e566f09f6a4095b2
refs/heads/master
2021-01-19T18:28:53.470386
2017-08-24T05:01:54
2017-08-24T05:01:54
101,140,697
0
0
null
null
null
null
UTF-8
Java
false
false
152
java
package com.yuyh.inject; /** * @author yuyuhang. * @since 2017/8/22. */ public interface ViewInjector<T> { void inject(T t, Object source); }
[ "352091626@qq.com" ]
352091626@qq.com
084062c414ff1f30df52ec10a092c8c340482c5f
764ce39c1bad590bf7839b4e175539eecbb9584a
/tis-console/src/main/java/com/alibaba/citrus/turbine/Context.java
65e0c8a5ab523e4e941230194e22cce704498eb2
[ "MIT" ]
permissive
GSIL-Monitor/tis-neptune
9b758ec5f6e977d353ce66c7c625537dfb1253e2
28f4d1dc3d4ada256457837ead3249e4addac7c2
refs/heads/master
2020-04-17T11:13:35.969979
2019-01-19T09:55:00
2019-01-19T09:55:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,518
java
/* * The MIT License * * Copyright (c) 2018-2022, qinglangtech Ltd * * 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.alibaba.citrus.turbine; import java.util.Set; /* * * @author 百岁(baisui@qlangtech.com) * @date 2019年1月17日 */ public interface Context { public boolean containsKey(String key); public Object get(String key); public Set<String> keySet(); public void put(String key, Object value); public void remove(String key); }
[ "baisui@2dfire.com" ]
baisui@2dfire.com
2df1aa0c07ab2437588f1df48018ac62f4df1055
504d74691a788976f07b792d521da0b5b51d8dfe
/optimise/src/optimise/geters.java
6385c74c810e4ba7403ca559107eea1296696dcf
[]
no_license
hemanth-431/My-JAVA-Codes
e8286d43fa51041e9fffeff4c66b287b9bf38115
96aafbcfd4a0c8603b79055c5d5bc1e6ce4baf80
refs/heads/master
2023-06-18T01:19:28.337254
2021-07-14T17:35:29
2021-07-14T17:35:29
386,028,031
0
0
null
null
null
null
UTF-8
Java
false
false
1,400
java
package optimise; import java.util.Scanner; class hi { Scanner in=new Scanner(System.in); private int age; private String id; private String location; private String name; public int getAge() { return age; } public void setAge(int age) { System.out.println("Enter age"); age=in.nextInt(); this.age = age; } public String getId() { return id; } public void setId(String id) { System.out.println("Enter id"); id=in.nextLine(); this.id = id; } public String getLocation() { return location; } public void setLocation(String location) { System.out.println("Enter location"); location=in.nextLine(); this.location = location; } public String getName() { return name; } public void setName(String name) { System.out.println("Enter name"); name=in.nextLine(); this.name = name; } } public class geters { public static void main(String[] args) { hi obj=new hi(); obj.setAge(0); obj.setId("34"); obj.setName(null); obj.setLocation(null); System.out.println(obj.getName()); System.out.println(obj.getAge()); System.out.println(obj.getId()); System.out.println(obj.getLocation()); } }
[ "bandlavhemanth@gmail.com" ]
bandlavhemanth@gmail.com
58b4f1219eae28f0ce6eb873bcd9c3fe0b07b885
47bee068ddb9dacfff94d08341f604ebe97f9fef
/src/main/java/com/smlsnnshn/Lessons/day24_25_26_27_28_29_arrays/Task_90.java
e3a329fe447581055f0c7db7cbecce47c3b40762
[]
no_license
ismailsinansahin/JavaLessons
55686229d946390a52383f5d80e1053f411286e7
768cb63e22462e7c2eef709102df5d19d9c98568
refs/heads/master
2023-07-18T23:10:31.302133
2021-09-14T20:56:35
2021-09-14T20:56:35
360,487,169
2
0
null
null
null
null
UTF-8
Java
false
false
464
java
package com.smlsnnshn.Lessons.day24_25_26_27_28_29_arrays; public class Task_90 { public static void main(String[] args) { String[] cars = {"Toyota", "Honda", "Nissan", "BMW", "Mercedes"}; boolean flag = false; for (int i=0 ; i < cars.length ; i++) { if (cars[i].equals("Honda")) { flag = true; break; } } if (flag) { System.out.println("I found it!"); }else { System.out.println("Not found it!"); } } }
[ "ismailsinansahin@gmail.com" ]
ismailsinansahin@gmail.com
e4d2aad408e70639e9a1478a2038735ea815eff1
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XWIKI-13942-1-17-Single_Objective_GGA-WeightedSum-BasicBlockCoverage/org/xwiki/model/internal/reference/ExplicitStringEntityReferenceResolver_ESTest.java
a30d03083878e6ba8f8c398b0bd1981ec45ef9be
[ "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
2,128
java
/* * This file was automatically generated by EvoSuite * Sun May 17 17:14:19 UTC 2020 */ package org.xwiki.model.internal.reference; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.evosuite.runtime.javaee.injection.Injector; import org.junit.runner.RunWith; import org.xwiki.model.EntityType; import org.xwiki.model.internal.reference.AbstractStringEntityReferenceResolver; import org.xwiki.model.internal.reference.ExplicitStringEntityReferenceResolver; import org.xwiki.model.internal.reference.SymbolScheme; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ExplicitStringEntityReferenceResolver_ESTest extends ExplicitStringEntityReferenceResolver_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { ExplicitStringEntityReferenceResolver explicitStringEntityReferenceResolver0 = new ExplicitStringEntityReferenceResolver(); SymbolScheme symbolScheme0 = mock(SymbolScheme.class, new ViolatedAssumptionAnswer()); Injector.inject(explicitStringEntityReferenceResolver0, (Class<?>) AbstractStringEntityReferenceResolver.class, "symbolScheme", (Object) symbolScheme0); Injector.validateBean(explicitStringEntityReferenceResolver0, (Class<?>) ExplicitStringEntityReferenceResolver.class); EntityType entityType0 = EntityType.ATTACHMENT; Object[] objectArray0 = new Object[6]; objectArray0[0] = (Object) entityType0; objectArray0[1] = (Object) explicitStringEntityReferenceResolver0; objectArray0[2] = (Object) explicitStringEntityReferenceResolver0; objectArray0[3] = (Object) symbolScheme0; objectArray0[4] = objectArray0[3]; objectArray0[5] = (Object) symbolScheme0; // Undeclared exception! explicitStringEntityReferenceResolver0.resolveDefaultReference(entityType0, objectArray0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2b7850ff4eec93715f363b3d3a113df55d10aa88
d1b078f07f4699ff308c04b47b93a8a28d8b39a3
/quarkus-workshop-super-heroes/extensions/extension-fault-injector/deployment/src/main/java/io/quarkus/workshop/superheroes/quack/deployment/QuackProcessor.java
f57631affb27bb611b1871c860a33a3972ff048a
[ "Apache-2.0" ]
permissive
bbvahackathon/quarkus-workshops
dcc7f45ca7523e5b429c4b87f1294d556335e20d
eee54afb85ca9361feb5bb3414a2125263fecb57
refs/heads/master
2023-01-23T19:15:05.899464
2020-11-23T11:21:34
2020-11-23T11:21:34
312,293,958
1
0
Apache-2.0
2020-11-16T14:20:49
2020-11-12T14:01:57
Java
UTF-8
Java
false
false
1,283
java
package io.quarkus.workshop.superheroes.quack.deployment; import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.FeatureBuildItem; import io.quarkus.vertx.http.deployment.VertxWebRouterBuildItem; import io.quarkus.workshop.superheroes.quack.runtime.FaultInjectorRecorder; import io.quarkus.workshop.superheroes.quack.runtime.QuackConfig; /** * The Quack /. Fault injector processor. */ public class QuackProcessor { /** * Configures the fault injection and registers the route. * * @param feature to produce a feature build item * @param recorder the recorder executing the initialization * @param config the config * @param router the router on which the faults are going to be injected */ @BuildStep @Record(ExecutionTime.RUNTIME_INIT) void initialize(BuildProducer<FeatureBuildItem> feature, FaultInjectorRecorder recorder, QuackConfig config, VertxWebRouterBuildItem router) { feature.produce(new FeatureBuildItem("quack")); recorder.configure(config, router.getRouter()); } }
[ "clement.escoffier@gmail.com" ]
clement.escoffier@gmail.com
eef5a19f7eb6c314a77197fd4c93b3d15964f077
08b8d598fbae8332c1766ab021020928aeb08872
/src/gcom/gui/cadastro/localidade/ResultadoPesquisaSetorComercialActionForm.java
734fb4ac6c2bb4963d06b1454ed72fc1189fd92a
[]
no_license
Procenge/GSAN-CAGEPA
53bf9bab01ae8116d08cfee7f0044d3be6f2de07
dfe64f3088a1357d2381e9f4280011d1da299433
refs/heads/master
2020-05-18T17:24:51.407985
2015-05-18T23:08:21
2015-05-18T23:08:21
25,368,185
3
1
null
null
null
null
WINDOWS-1252
Java
false
false
3,978
java
/* * Copyright (C) 2007-2007 the GSAN – Sistema Integrado de Gestão de Serviços de Saneamento * * This file is part of GSAN, an integrated service management system for Sanitation * * GSAN 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 2 of the License. * * GSAN is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA */ /* * GSAN – Sistema Integrado de Gestão de Serviços de Saneamento * Copyright (C) <2007> * Adriano Britto Siqueira * Alexandre Santos Cabral * Ana Carolina Alves Breda * Ana Maria Andrade Cavalcante * Aryed Lins de Araújo * Bruno Leonardo Rodrigues Barros * Carlos Elmano Rodrigues Ferreira * Cláudio de Andrade Lira * Denys Guimarães Guenes Tavares * Eduardo Breckenfeld da Rosa Borges * Fabíola Gomes de Araújo * Flávio Leonardo Cavalcanti Cordeiro * Francisco do Nascimento Júnior * Homero Sampaio Cavalcanti * Ivan Sérgio da Silva Júnior * José Edmar de Siqueira * José Thiago Tenório Lopes * Kássia Regina Silvestre de Albuquerque * Leonardo Luiz Vieira da Silva * Márcio Roberto Batista da Silva * Maria de Fátima Sampaio Leite * Micaela Maria Coelho de Araújo * Nelson Mendonça de Carvalho * Newton Morais e Silva * Pedro Alexandre Santos da Silva Filho * Rafael Corrêa Lima e Silva * Rafael Francisco Pinto * Rafael Koury Monteiro * Rafael Palermo de Araújo * Raphael Veras Rossiter * Roberto Sobreira Barbalho * Rodrigo Avellar Silveira * Rosana Carvalho Barbosa * Sávio Luiz de Andrade Cavalcante * Tai Mu Shih * Thiago Augusto Souza do Nascimento * Tiago Moreno Rodrigues * Vivianne Barbosa Sousa * * Este programa é software livre; você pode redistribuí-lo e/ou * modificá-lo sob os termos de Licença Pública Geral GNU, conforme * publicada pela Free Software Foundation; versão 2 da * Licença. * Este programa é distribuído na expectativa de ser útil, mas SEM * QUALQUER GARANTIA; sem mesmo a garantia implícita de * COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM * PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais * detalhes. * Você deve ter recebido uma cópia da Licença Pública Geral GNU * junto com este programa; se não, escreva para Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307, USA. */ package gcom.gui.cadastro.localidade; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class ResultadoPesquisaSetorComercialActionForm extends ActionForm { private static final long serialVersionUID = 1L; private String Button; private String auxiliar; private String[] setorComercialID; public String getButton(){ return Button; } public void setButton(String Button){ this.Button = Button; } public String getAuxiliar(){ return auxiliar; } public void setAuxiliar(String auxiliar){ this.auxiliar = auxiliar; } public String[] getSetorComercialID(){ return setorComercialID; } public void setSetorComercialID(String[] setorComercialID){ this.setorComercialID = setorComercialID; } public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest){ /** @todo: finish this method, this is just the skeleton. */ return null; } public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest){ } }
[ "Yara.Souza@procenge.com.br" ]
Yara.Souza@procenge.com.br
2f885c0127fe244ab84e23b8112192ea2c131081
23f27a4609c6125a7308117fe0ae9e4e9578ffa4
/src/main/java/duelistmod/actions/unique/DeskbotSevenAction.java
f69576e9890ad6b32e33a7c429b3543c16f7eac8
[ "Unlicense" ]
permissive
ascriptmaster/StS-DuelistMod
269b078b074b4a76828d86d98cf03c7446510995
251c29117779f0e75c3424263e669b720f35ed1a
refs/heads/master
2023-05-26T09:23:07.510791
2021-04-05T05:07:42
2021-04-05T05:14:42
226,347,190
0
0
Unlicense
2019-12-06T14:30:34
2019-12-06T14:30:33
null
UTF-8
Java
false
false
2,046
java
package duelistmod.actions.unique; import com.megacrit.cardcrawl.actions.AbstractGameAction; import com.megacrit.cardcrawl.actions.utility.WaitAction; import com.megacrit.cardcrawl.cards.DamageInfo; import com.megacrit.cardcrawl.dungeons.AbstractDungeon; import com.megacrit.cardcrawl.monsters.AbstractMonster; import com.megacrit.cardcrawl.powers.ArtifactPower; import com.megacrit.cardcrawl.vfx.combat.FlashAtkImgEffect; public class DeskbotSevenAction extends AbstractGameAction { private DamageInfo info; public DeskbotSevenAction(final AbstractMonster target, final DamageInfo info) { this.setValues(target, this.info = info); this.actionType = ActionType.DAMAGE; this.attackEffect = AttackEffect.SLASH_VERTICAL; this.duration = 0.01f; } @Override public void update() { if (this.target == null) { this.isDone = true; return; } if (AbstractDungeon.player.hasPower(ArtifactPower.POWER_ID)) { if (this.duration == 0.01f && this.target != null && this.target.currentHealth > 0) { if (this.info.type != DamageInfo.DamageType.THORNS && this.info.owner.isDying) { this.isDone = true; return; } AbstractDungeon.effectList.add(new FlashAtkImgEffect(this.target.hb.cX, this.target.hb.cY, this.attackEffect)); } this.tickDuration(); if (this.isDone && this.target != null && this.target.currentHealth > 0) { for (int i = 0; i < AbstractDungeon.player.getPower(ArtifactPower.POWER_ID).amount; i++) { this.target.damage(this.info); } if (AbstractDungeon.getCurrRoom().monsters.areMonstersBasicallyDead()) { AbstractDungeon.actionManager.clearPostCombatActions(); } this.addToTop(new WaitAction(0.1f)); } } else { this.isDone = true; } } }
[ "nyoxidetwitter@gmail.com" ]
nyoxidetwitter@gmail.com
cd5c5ecdcb38074468c990813e1bcb225cf95948
eb2f2cf1be4f79b2c0e7c1d48e9a9cea14e95299
/nepxion-cots/src/com/nepxion/cots/twaver/gis/TGisOverview.java
50224ace957f0846829974a39757d73da53f942e
[ "Apache-2.0" ]
permissive
Nepxion/Marvel
83e3b26762d807a4685faabfaa0f3aedd3e30a87
51bb477ccbff64067981bd92efcdb9b7b01c6f5f
refs/heads/master
2021-08-16T21:00:03.336975
2021-07-08T23:14:51
2021-07-08T23:14:51
57,598,034
11
2
null
null
null
null
UTF-8
Java
false
false
2,579
java
package com.nepxion.cots.twaver.gis; /** * <p>Title: Nepxion Cots For TWaver</p> * <p>Description: Nepxion Cots Repository</p> * <p>Copyright: Copyright (c) 2010</p> * <p>Company: Nepxion</p> * <p>Announcement: It depends on the commercial software of TWaver, the repository only references the trial version.</p> * <p>If you want to use Nepxion Cots, please contact with Serva Corporation to buy the genuine version.</p> * @author Neptune * @email 1394997@qq.com * @version 1.0 */ import java.awt.Dimension; import javax.swing.Icon; import twaver.gis.gadget.GisOverviewPanel; import com.nepxion.swing.tween.VisibilityTweener; public class TGisOverview extends GisOverviewPanel { private VisibilityTweener visibilityTweener; public TGisOverview(TGisGraph gisGraph, Dimension size) { this(gisGraph, "", size, new Dimension(0, 0), null); } public TGisOverview(TGisGraph gisGraph, Dimension size, Icon icon) { this(gisGraph, "", size, icon); } public TGisOverview(TGisGraph gisGraph, Dimension size, Dimension location) { this(gisGraph, "", size, location); } public TGisOverview(TGisGraph gisGraph, String title, Dimension size) { this(gisGraph, title, size, new Dimension(0, 0), null); } public TGisOverview(TGisGraph gisGraph, String title, Dimension size, Icon icon) { this(gisGraph, title, size, new Dimension(0, 0), icon); } public TGisOverview(TGisGraph gisGraph, String title, Dimension size, Dimension location) { this(gisGraph, title, size, location, null); } public TGisOverview(TGisGraph gisGraph, String title, Dimension size, Dimension location, Icon icon) { super(gisGraph); visibilityTweener = new VisibilityTweener(this, 1, 1); setTitle(title); setSize(size); setLocation(location.width, location.height); setFrameIcon(icon); } public VisibilityTweener getVisibilityTweener() { return visibilityTweener; } public void tween(boolean visibleTweening) { visibilityTweener.tween(visibleTweening); } public void setTweeningDimension(Dimension dimension) { visibilityTweener.setDimension(dimension); } public void setHorizontalTweening(boolean horizontalTweening) { visibilityTweener.setHorizontalTweening(horizontalTweening); } public void setVerticalTweening(boolean verticalTweening) { visibilityTweener.setVerticalTweening(verticalTweening); } public void setFrameInterval(int frameInterval) { visibilityTweener.setFrameInterval(frameInterval); } public void setFrameCount(int frameCount) { visibilityTweener.setFrameCount(frameCount); } }
[ "1394997@qq.com" ]
1394997@qq.com
5b2846e7405aacc35d8f5c29341ff5d0588ce2e7
715d7e5f3f83aa2ac3209401ee6ca4b2975a6d7d
/jtwig-functions/src/main/java/com/lyncode/jtwig/functions/internal/list/Merge.java
d8aee01852df6cd9d53f0a3e9fd141b7fad6a286
[ "Apache-2.0" ]
permissive
msn0/jtwig
c769a76a7282c982dc87ffc0dba60009c18a8994
6c6d4e4b43552fafc4a616605b2c46fd0e5d5f54
refs/heads/master
2023-06-09T19:59:12.748027
2013-12-25T21:47:03
2013-12-25T21:47:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,464
java
/** * Copyright 2012 Lyncode * * 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.lyncode.jtwig.functions.internal.list; import com.lyncode.jtwig.functions.Function; import com.lyncode.jtwig.functions.exceptions.FunctionException; import java.util.*; public class Merge implements Function { @Override public Object execute(Object... arguments) throws FunctionException { if (arguments.length < 2) throw new FunctionException("Invalid number of arguments. Expecting at least two arguments."); if (arguments[0] instanceof Iterable) return mergeList(arguments); else if (arguments[0] instanceof Map) return mergeMap(arguments); else if (arguments[0].getClass().isArray()) return mergeArray(arguments); else throw new FunctionException("Invalid arguments. Expecting lists, arrays or maps values."); } private Object mergeArray(Object... arguments) { List<Object> result = new ArrayList<Object>(); for (Object obj : arguments) { if (obj == null) continue; Object[] list = (Object[]) obj; for (Object value : list) { result.add(value); } } return result.toArray(); } private Object mergeMap(Object... arguments) { Map<Object, Object> result; if (arguments[0] instanceof TreeMap) result = new TreeMap<Object, Object>(); else result = new HashMap<Object, Object>(); for (Object obj : arguments) { if (obj == null) continue; result.putAll((Map) obj); } return result; } private Object mergeList(Object... arguments) { List<Object> result = new ArrayList<Object>(); for (Object obj : arguments) { if (obj == null) continue; result.addAll((List) obj); } return result; } }
[ "jmelo@lyncode.com" ]
jmelo@lyncode.com
2ef41c340d09530fe74991d3d56ec36789ef5492
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.horizon-Horizon/sources/com/facebook/acra/LogCatCollector.java
d2334f40743e87afd05a47e5d91bc4219c3f2367
[]
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
5,689
java
package com.facebook.acra; import X.AnonymousClass0NO; import android.content.Context; import android.util.Base64; import com.facebook.acra.config.AcraReportingConfig; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.zip.GZIPOutputStream; import javax.annotation.Nullable; public class LogCatCollector { public static final String COMPRESS_NEWLINE = "\\n"; public static final String NEWLINE = "\n"; public static final String TAG = "LogCatCollector"; public static final String UTF_8_ENCODING = "UTF-8"; /* JADX WARNING: Removed duplicated region for block: B:19:0x0082 */ /* JADX WARNING: Removed duplicated region for block: B:23:? A[RETURN, SYNTHETIC] */ @javax.annotation.Nullable /* Code decompiled incorrectly, please refer to instructions dump. */ public static java.lang.String collectLogCatBySpawningOtherProcess(java.lang.String[] r6, @javax.annotation.Nullable java.lang.String r7, java.lang.String r8) { /* // Method dump skipped, instructions count: 135 */ throw new UnsupportedOperationException("Method not decompiled: com.facebook.acra.LogCatCollector.collectLogCatBySpawningOtherProcess(java.lang.String[], java.lang.String, java.lang.String):java.lang.String"); } @Nullable public static String compressBase64(String str) { if (!(str == null || str.length() == 0)) { try { byte[] bytes = str.getBytes("UTF-8"); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(byteArrayOutputStream); gZIPOutputStream.write(bytes); gZIPOutputStream.close(); return Base64.encodeToString(byteArrayOutputStream.toByteArray(), 2); } catch (IOException e) { AnonymousClass0NO.A0H(TAG, e, "Failed to compress string"); } } return null; } @Nullable public static String getLogcatFileContent(String str) { File file = new File(str); StringBuilder sb = new StringBuilder(); try { try { BufferedReader bufferedReader = new BufferedReader(new FileReader(file)); while (true) { String readLine = bufferedReader.readLine(); if (readLine == null) { break; } sb.append(readLine); sb.append('\n'); } bufferedReader.close(); } catch (IOException e) { AnonymousClass0NO.A0H(TAG, e, "Could not close LogcatInterceptor buffer reader"); } } catch (FileNotFoundException e2) { AnonymousClass0NO.A0H(TAG, e2, "Could not find LogcatInterceptor file"); } return sb.toString(); } /* JADX WARNING: Code restructure failed: missing block: B:16:0x0033, code lost: if (r0 == null) goto L_0x0035; */ @javax.annotation.Nullable /* Code decompiled incorrectly, please refer to instructions dump. */ public static java.lang.String collectLogCat(android.content.Context r3, com.facebook.acra.config.AcraReportingConfig r4, @javax.annotation.Nullable java.lang.String r5, @javax.annotation.Nullable java.lang.String r6, boolean r7, boolean r8, boolean r9) { /* r2 = 0 if (r8 != 0) goto L_0x001d java.lang.String r0 = "acraconfig_logcat_interceptor_after_crash_enabled" boolean r0 = X.AnonymousClass0OS.A01(r3, r0) if (r0 == 0) goto L_0x001d if (r5 == 0) goto L_0x0015 java.lang.String r0 = "main" boolean r0 = r5.equals(r0) if (r0 == 0) goto L_0x001d L_0x0015: if (r6 == 0) goto L_0x001d java.lang.String r0 = getLogcatFileContent(r6) if (r0 != 0) goto L_0x0039 L_0x001d: java.lang.String r1 = "acraconfig_avoid_spawn_process_to_collect_logcat" r0 = 0 int r1 = X.AnonymousClass0OS.A00(r3, r1, r0) r0 = 1 if (r1 == r0) goto L_0x0035 java.lang.String[] r1 = r4.logcatArguments(r9) if (r7 == 0) goto L_0x0036 java.lang.String r0 = "\\n" L_0x002f: java.lang.String r0 = collectLogCatBySpawningOtherProcess(r1, r5, r0) if (r0 != 0) goto L_0x0039 L_0x0035: return r2 L_0x0036: java.lang.String r0 = "\n" goto L_0x002f L_0x0039: if (r7 == 0) goto L_0x003f java.lang.String r0 = compressBase64(r0) L_0x003f: return r0 */ throw new UnsupportedOperationException("Method not decompiled: com.facebook.acra.LogCatCollector.collectLogCat(android.content.Context, com.facebook.acra.config.AcraReportingConfig, java.lang.String, java.lang.String, boolean, boolean, boolean):java.lang.String"); } @Nullable public static String collectLogCat(Context context, AcraReportingConfig acraReportingConfig, @Nullable String str, boolean z) { return collectLogCat(context, acraReportingConfig, str, null, z, false, false); } @Nullable public static String collectLogCat(Context context, AcraReportingConfig acraReportingConfig, String str, boolean z, boolean z2) { return collectLogCat(context, acraReportingConfig, str, null, z, z2, false); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
cb459b374b895aa9d2333091011e34fb58090a3f
fc5d5b69fc8a9c25ce7fbfa493a9bdc45b289846
/src/main/java/com/pzy/controller/SellerController.java
b8f8f90453b1be2db62a5d297e8a6a64b051f355
[]
no_license
zhaoyang0501/ydb
d9e0bc4b177dae06d57cc41869440ac6e7005ca4
ff1bc7d0dc187d7b2d95d0989c9442131549454f
refs/heads/master
2021-01-21T12:58:31.661271
2016-03-29T12:19:57
2016-03-29T12:19:57
53,505,630
0
0
null
null
null
null
UTF-8
Java
false
false
3,231
java
package com.pzy.controller; import java.text.ParseException; import java.util.Date; import java.util.HashMap; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.pzy.entity.Seller; import com.pzy.service.SellerService; /*** * 用户管理 * @author panchaoyang *qq 263608237 */ @Controller @RequestMapping("/admin/seller") public class SellerController { @Autowired private SellerService sellerService; @RequestMapping("index") public String index(Model model) { return "admin/seller/index"; } @RequestMapping(value = "/list", method = RequestMethod.POST) @ResponseBody public Map<String, Object> list( @RequestParam(value = "sEcho", defaultValue = "1") int sEcho, @RequestParam(value = "iDisplayStart", defaultValue = "0") int iDisplayStart, @RequestParam(value = "iDisplayLength", defaultValue = "10") int iDisplayLength, String sellername ) throws ParseException { int pageNumber = (int) (iDisplayStart / iDisplayLength) + 1; int pageSize = iDisplayLength; Page<Seller> sellers = sellerService.findAll(pageNumber, pageSize, sellername); Map<String, Object> map = new HashMap<String, Object>(); map.put("aaData", sellers.getContent()); map.put("iTotalRecords", sellers.getTotalElements()); map.put("iTotalDisplayRecords", sellers.getTotalElements()); map.put("sEcho", sEcho); return map; } @RequestMapping(value = "/save", method = RequestMethod.POST) @ResponseBody public Map<String, Object> save(Seller seller) { seller.setCreateDate(new Date()); sellerService.save(seller); Map<String, Object> map = new HashMap<String, Object>(); map.put("state", "success"); map.put("msg", "保存成功"); return map; } @RequestMapping(value = "/update") @ResponseBody public Map<String, Object> update(Seller seller) { sellerService.save(seller); Map<String, Object> map = new HashMap<String, Object>(); map.put("state", "success"); map.put("msg", "保存成功"); return map; } @RequestMapping(value = "/delete/{id}") @ResponseBody public Map<String, Object> delete(@PathVariable Long id) { Map<String, Object> map = new HashMap<String, Object>(); try { sellerService.delete(id); map.put("state", "success"); map.put("msg", "删除成功"); } catch (Exception e) { map.put("state", "error"); map.put("msg", "删除失败,外键约束"); } return map; } @RequestMapping(value = "/get/{id}") @ResponseBody public Map<String, Object> get(@PathVariable Long id ) { Map<String, Object> map = new HashMap<String, Object>(); map.put("object", sellerService.find(id)); map.put("state", "success"); map.put("msg", "成功"); return map; } }
[ "zhaoyang0501@126.com" ]
zhaoyang0501@126.com
0014fdff2e41a4e8b1757cf63a5ee4a8f6f52afc
54e217b86da5a29e5410919b474f8fc532a663c6
/src/main/java/com/anorng/bank/serviceImpl/SecurityServiceImpl.java
c1d4dc688b7ac1b3045b656d721c6d83b5d558d8
[]
no_license
LX1993728/BankSecurity_verdsion1
da18c93f04f07888efeb93972257fa6f7549cbd3
cb0ed4103ee9ea721b88a89a1ab821201954c7db
refs/heads/master
2021-05-11T17:40:06.336431
2018-01-17T07:24:56
2018-01-17T07:24:56
117,800,120
0
1
null
null
null
null
UTF-8
Java
false
false
3,534
java
package com.anorng.bank.serviceImpl; import java.util.Date; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import javax.persistence.TypedQuery; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.alibaba.fastjson.JSON; import com.anorng.bank.core.config.Global; import com.anorng.bank.core.utils.Page; import com.anorng.bank.entity.Link; import com.anorng.bank.entity.SecurityCompany; import com.anorng.bank.entity.SecurityUser; import com.anorng.bank.service.SecurityService; @Service @Transactional public class SecurityServiceImpl implements SecurityService { private final Logger log = LoggerFactory.getLogger(SecurityServiceImpl.class); @PersistenceContext private EntityManager em; @Override public Page<SecurityCompany> queryCompanyByPage(Integer p) { // 数据的总条数 Long totalSize = (Long) em.createNamedQuery("querySecurityCompanyCount").getSingleResult(); TypedQuery<SecurityCompany> query = em.createNamedQuery("querySecurityCompany", SecurityCompany.class); // 当前要查询的下标位置 Integer offset = (p - 1) * Global.pageSize; query.setFirstResult(offset); query.setMaxResults(Global.pageSize); List<SecurityCompany> resultList = query.getResultList(); Page<SecurityCompany> page = new Page<>(p, Global.pageSize, totalSize.intValue()); page.setItems(resultList); log.info("分页证券公司信息={}", JSON.toJSONString(page)); return page; } @Override public Boolean disOrEnableSecurity(Long id, Boolean isEnable) { SecurityCompany company = em.find(SecurityCompany.class, id); if (company == null) { return false; } company.setStatus(isEnable ? SecurityCompany.STATUS.UP : SecurityCompany.STATUS.DOWN); em.persist(company); return true; } @Override public Boolean saveLinkBySecurityUser(Long id, Link link) { SecurityUser securityUser = em.find(SecurityUser.class, id); if (securityUser == null) { return false; } SecurityCompany securityCompany = securityUser.getSecurityCompany(); link.setStatus(Link.STATUS.DISABLE); link.setCreateTime(new Date()); link.setSecurityCompany(securityCompany); securityCompany.getLinks().add(link); em.persist(securityCompany); return true; } @Override public SecurityUser getSecurityUserById(Long id) { return em.find(SecurityUser.class, id); } @Override public List<Link> findLinksofCompanyByUserId(Long id) { SecurityUser securityUser = em.find(SecurityUser.class, id); TypedQuery<Link> query = em.createQuery( "SELECT new Link(url,status,id) FROM Link l WHERE :sUser member of l.securityCompany.securityUsers", Link.class); query.setParameter("sUser", securityUser); return query.getResultList(); } @Override public Link findLinkById(Long id) { return em.find(Link.class, id); } @Override public void delZX(Link link) { em.remove(link); } @Override public Boolean isZXRelatedToCompany(Long id) { SecurityCompany company = em.find(SecurityCompany.class, id); Query query = em.createQuery( "SELECT COUNT(c) FROM Certificate c WHERE EXISTS (SELECT l FROM Link l WHERE l MEMBER OF c.links AND EXISTS (SELECT cp FROM SecurityCompany cp WHERE l MEMBER OF cp.links AND cp =:company))"); query.setParameter("company", company); Long count = (Long) query.getSingleResult(); return count > 0 ? true : false; } }
[ "2652790899@qq.com" ]
2652790899@qq.com
fa02c61f0e303bc4c1d6f36bd0a2852fd892469f
ad106803ae6b0795f8a4d7e6760db034a1eb30ae
/redis-cluster/src/main/java/com/victor/cache/aop/RedisCacheAspect.java
2a6c8cdf6123d99db583d579c9d89beef52f2d88
[]
no_license
smileszx/distribute-locks
59009df2dc455b2ad2a15a9650a401a813a2b4f8
5fe0ba8a2d16ea9cc2f437d183ef8df96576b266
refs/heads/master
2022-07-03T11:05:44.669426
2019-10-06T14:39:56
2019-10-06T14:39:56
210,149,786
0
0
null
2022-06-21T01:56:55
2019-09-22T13:12:58
Java
UTF-8
Java
false
false
3,311
java
package com.victor.cache.aop; import com.alibaba.fastjson.JSON; import java.lang.reflect.Method; import com.victor.cache.annotation.RedisCache; import com.victor.cache.redis.JedisService; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.Signature; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; /** * 面向切面编程 * 暂时注释,2019-09-29 */ //@Aspect //@Component public class RedisCacheAspect { private static final Logger LOGGER = LoggerFactory.getLogger(RedisCacheAspect.class); @Autowired private JedisService jedisService; /** * 切点 */ @Pointcut("execution(public * com.victor.cache.service..*.find*(..))") public void webAspect(){} @Around("webAspect()") public Object redisCache(ProceedingJoinPoint pjp) throws Throwable { //得到类名、方法名和参数 String redisResult = ""; String className = pjp.getTarget().getClass().getName(); String methodName = pjp.getSignature().getName(); Object[] args = pjp.getArgs(); //根据类名,方法名和参数生成key // String key = genKey(className,methodName,args); String key = String.join(":", "redis-cluster", args.toString()); LOGGER.info("生成的key[{}]",key); //得到被代理的方法 Signature signature = pjp.getSignature(); if(!(signature instanceof MethodSignature)){ throw new IllegalArgumentException(); } MethodSignature methodSignature = (MethodSignature) signature; Method method = pjp.getTarget().getClass().getMethod(methodSignature.getName(),methodSignature.getParameterTypes()); //得到被代理的方法上的注解 Class modelType = method.getAnnotation(RedisCache.class).type(); int cacheTime = method.getAnnotation(RedisCache.class).cacheTime(); Object result = null; if(!jedisService.exists(key)) { LOGGER.info("缓存未命中"); //缓存不存在,则调用原方法,并将结果放入缓存中 result = pjp.proceed(args); redisResult = JSON.toJSONString(result); jedisService.set(key,redisResult,cacheTime); } else{ //缓存命中 LOGGER.info("缓存命中"); redisResult = jedisService.get(key); //得到被代理方法的返回值类型 Class returnType = method.getReturnType(); result = JSON.parseObject(redisResult,returnType); } return result; } /** * @Description: 生成key */ private String genKey(String className, String methodName, Object[] args) { StringBuilder sb = new StringBuilder("SpringBoot:"); sb.append(className); sb.append("_"); sb.append(methodName); sb.append("_"); for (Object object: args) { LOGGER.info("obj:"+object); if(object!=null) { sb.append(object+""); sb.append("_"); } } return sb.toString(); } }
[ "smile.szx@outlook.com" ]
smile.szx@outlook.com
a5669b2f36936014ee1fd0a9d88cee6610469cb3
5781d38136f767ec24caa0ad9906218fad108594
/grib/src/main/java/ucar/nc2/grib/grib2/Grib2Collection.java
7ce8051de6862c990aba187f5a1f2fee446fe13f
[]
no_license
geomatico/thredds
d0b3298e9d2f89b28d5de5f0a509a98aa2f27b2e
8aa40ed816adb40dd5ff12966ed2a9da2dd44e65
refs/heads/master
2021-01-17T13:48:08.277948
2012-01-25T21:30:31
2012-01-25T21:30:31
3,067,861
0
0
null
null
null
null
UTF-8
Java
false
false
6,386
java
/* * Copyright (c) 1998 - 2011. University Corporation for Atmospheric Research/Unidata * Portions of this software were developed by the Unidata Program at the * University Corporation for Atmospheric Research. * * Access and use of this software shall impose the following obligations * and understandings on the user. The user is granted the right, without * any fee or cost, to use, copy, modify, alter, enhance and distribute * this software, and any derivative works thereof, and its supporting * documentation for any purpose whatsoever, provided that this entire * notice appears in all copies of the software, derivative works and * supporting documentation. Further, UCAR requests that the user credit * UCAR/Unidata in any publications that result from the use of this * software or in any product that includes this software. The names UCAR * and/or Unidata, however, may not be used in any advertising or publicity * to endorse or promote any products or commercial entity unless specific * written permission is obtained from UCAR/Unidata. The user also * understands that UCAR/Unidata is not obligated to provide the user with * any support, consulting, training or assistance of any kind with regard * to the use, operation and performance of this software nor to provide * the user with any updates, revisions, new versions or "bug fixes." * * THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "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 UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. */ package ucar.nc2.grib.grib2; import thredds.inventory.CollectionManager; import thredds.inventory.DatasetCollectionMFiles; import ucar.nc2.NetcdfFile; import ucar.nc2.dataset.NetcdfDataset; import ucar.nc2.grib.GribCollection; import ucar.unidata.io.RandomAccessFile; import java.io.File; import java.io.IOException; import java.util.Formatter; /** * Grib2 specific part of GribCollection * * @author John * @since 9/5/11 */ public class Grib2Collection extends ucar.nc2.grib.GribCollection { public Grib2Collection(String name, File directory) { super(name, directory); } public ucar.nc2.dataset.NetcdfDataset getNetcdfDataset(String groupName, String filename) throws IOException { GroupHcs want = findGroup(groupName); if (want == null) return null; if (filename == null) { // LOOK thread-safety : sharing this, raf Grib2Iosp iosp = new Grib2Iosp(want); NetcdfFile ncfile = new MyNetcdfFile(iosp, null, getIndexFile().getPath(), null); return new NetcdfDataset(ncfile); } else { for (String file : filenames) { // LOOK linear lookup if (file.endsWith(filename)) { Formatter f = new Formatter(); GribCollection gc = Grib2CollectionBuilder.createFromSingleFile(new File(file), CollectionManager.Force.nocheck,f); // LOOK thread-safety : creating ncx Grib2Iosp iosp = new Grib2Iosp(gc); NetcdfFile ncfile = new MyNetcdfFile(iosp, null, getIndexFile().getPath(), null); return new NetcdfDataset(ncfile); } } return null; } } public ucar.nc2.dt.GridDataset getGridDataset(String groupName, String filename) throws IOException { GroupHcs want = findGroup(groupName); if (want == null) return null; if (filename == null) { // LOOK thread-safety : sharing this, raf Grib2Iosp iosp = new Grib2Iosp(want); NetcdfFile ncfile = new MyNetcdfFile(iosp, null, getIndexFile().getPath(), null); NetcdfDataset ncd = new NetcdfDataset(ncfile); return new ucar.nc2.dt.grid.GridDataset(ncd); // LOOK - replace with custom GridDataset?? } else { for (String file : filenames) { // LOOK linear lookup if (file.endsWith(filename)) { Formatter f = new Formatter(); GribCollection gc = Grib2CollectionBuilder.createFromSingleFile(new File(file), CollectionManager.Force.nocheck,f); // LOOK thread-safety : creating ncx Grib2Iosp iosp = new Grib2Iosp(gc); NetcdfFile ncfile = new MyNetcdfFile(iosp, null, getIndexFile().getPath(), null); NetcdfDataset ncd = new NetcdfDataset(ncfile); return new ucar.nc2.dt.grid.GridDataset(ncd); // LOOK - replace with custom GridDataset?? } } return null; } } /////////////////////////////////////////////////////////////////////////////// static public void make(String name, String spec) throws IOException { long start = System.currentTimeMillis(); Formatter f = new Formatter(); CollectionManager dcm = new DatasetCollectionMFiles(name, spec, f); File idxFile = new File( dcm.getRoot(), name); boolean ok = Grib2CollectionBuilder.writeIndexFile(idxFile, dcm, f); System.out.printf("GribCollectionBuilder.writeIndexFile ok = %s%n", ok); long took = System.currentTimeMillis() - start; System.out.printf("%s%n", f); System.out.printf("That took %d msecs%n", took); } public static void main(String[] args) throws IOException { for (int i=0; i<args.length; i++) { String arg = args[i]; if (arg.equalsIgnoreCase("-help")) { System.out.printf("usage: ucar.nc2.grib.GribCollection [-make name collSpec] [-read filename]%n"); break; } if (arg.equalsIgnoreCase("-make")) { make(args[i+1], args[i+2]); break; } else if (arg.equalsIgnoreCase("-read")) { File f = new File(args[i+1]); RandomAccessFile raf = new RandomAccessFile(f.getPath(), "r"); GribCollection gc = Grib2CollectionBuilder.createFromIndex(f.getName(), f.getParentFile(), raf); gc.showIndex(new Formatter(System.out)); break; } } // "G:/nomads/timeseries/200808/.*grb2$" // readIndex2("G:/nomads/timeseries/200808/GaussLatLon-576X1152.ncx"); } }
[ "caron@unidata.ucar.edu" ]
caron@unidata.ucar.edu
a65c05b128556ae72132e97c3b4a46773a42c39b
698a37b38cb074168b2b6d9999dda64e74b8f234
/src/main/java/app/Quartz/QuartzConfiguration.java
edcd9f0beab8e2473d03e2720904f90c43c6f606
[]
no_license
XDwuzhishan/MobileCampus
4c424ec57a20ffdd3eb407d56065de47b354613d
fc54d86076c5b77b43565d3c263688e8c309034e
refs/heads/master
2021-01-25T04:10:10.773883
2017-08-20T14:54:23
2017-08-20T14:54:23
93,403,575
0
0
null
null
null
null
UTF-8
Java
false
false
5,134
java
package app.Quartz; import app.Quartz.jobs.SpiderJobCourse; import app.Quartz.jobs.SpiderJobDynamicNews; import app.Quartz.jobs.SpiderJobLoginInfo; import app.Quartz.jobs.SpiderJobNotice; import org.quartz.CronTrigger; import org.quartz.JobDetail; import org.quartz.spi.JobFactory; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.quartz.CronTriggerFactoryBean; import org.springframework.scheduling.quartz.JobDetailFactoryBean; import org.springframework.scheduling.quartz.SchedulerFactoryBean; /** * Created by xdcao on 2017/7/25. */ @Configuration public class QuartzConfiguration { // TODO: 2017/7/30 登录后的信息爬虫存在问题,只能第一次生效 @Bean public JobFactory jobFactory(ApplicationContext applicationContext){ AutowiringSpringBeanJobFactory jobFactory=new AutowiringSpringBeanJobFactory(); jobFactory.setApplicationContext(applicationContext); return jobFactory; } //课程表爬虫任务 @Bean(name = "SpiderJobCourse") public JobDetailFactoryBean spiderJobCourseDetail(){ JobDetailFactoryBean factoryBean=new JobDetailFactoryBean(); factoryBean.setJobClass(SpiderJobCourse.class); factoryBean.setDurability(false); return factoryBean; } //课程表爬虫触发器 @Bean(name = "SpiderJobCourseTrigger") public CronTriggerFactoryBean spiderJobCourseTrigger(@Qualifier("SpiderJobCourse") JobDetail jobDetail){ CronTriggerFactoryBean factoryBean=new CronTriggerFactoryBean(); factoryBean.setJobDetail(jobDetail); factoryBean.setStartDelay(0L); factoryBean.setCronExpression("0 0 10 * * ?"); return factoryBean; } //登陆后的通知信息 @Bean(name = "SpiderJobLoginInfo") public JobDetailFactoryBean spiderJobLoginInfoDetail(){ JobDetailFactoryBean factoryBean=new JobDetailFactoryBean(); factoryBean.setJobClass(SpiderJobLoginInfo.class); factoryBean.setDurability(false); return factoryBean; } //登录后通知信息触发器 @Bean(name = "SpiderJobLoginInfoTrigger") public CronTriggerFactoryBean spiderJobLoginInfoTrigger(@Qualifier("SpiderJobLoginInfo") JobDetail jobDetail){ CronTriggerFactoryBean factoryBean=new CronTriggerFactoryBean(); factoryBean.setJobDetail(jobDetail); factoryBean.setStartDelay(0L); factoryBean.setCronExpression("0 01 10 * * ?"); return factoryBean; } //最新动态任务 @Bean(name = "SpiderJobDynamicNews") public JobDetailFactoryBean spiderJobDynamicNewsDetail(){ JobDetailFactoryBean factoryBean=new JobDetailFactoryBean(); factoryBean.setJobClass(SpiderJobDynamicNews.class); factoryBean.setDurability(false); return factoryBean; } //最新动态触发器 @Bean(name = "SpiderJobDynamicNewsTrigger") public CronTriggerFactoryBean spiderJobDynamicNewsTrigger(@Qualifier("SpiderJobDynamicNews") JobDetail jobDetail){ CronTriggerFactoryBean factoryBean=new CronTriggerFactoryBean(); factoryBean.setJobDetail(jobDetail); factoryBean.setStartDelay(0L); factoryBean.setCronExpression("0 02 10 * * ?"); return factoryBean; } //首页通知任务 @Bean(name = "SpiderJobNotice") public JobDetailFactoryBean spiderJobNoticeDetail(){ JobDetailFactoryBean factoryBean=new JobDetailFactoryBean(); factoryBean.setJobClass(SpiderJobNotice.class); factoryBean.setDurability(false); return factoryBean; } //首页通知触发器 @Bean(name = "SpiderJobNoticeTrigger") public CronTriggerFactoryBean spiderJobNoticeTrigger(@Qualifier("SpiderJobNotice") JobDetail jobDetail){ CronTriggerFactoryBean factoryBean=new CronTriggerFactoryBean(); factoryBean.setJobDetail(jobDetail); factoryBean.setStartDelay(0L); factoryBean.setCronExpression("0 03 10 * * ?"); return factoryBean; } @Bean public SchedulerFactoryBean schedulerFactoryBean(JobFactory jobFactory, @Qualifier("SpiderJobCourseTrigger")CronTrigger courseCronTrigger, @Qualifier("SpiderJobLoginInfoTrigger") CronTrigger loginInfoCronTrigger, @Qualifier("SpiderJobDynamicNewsTrigger") CronTrigger dynamicNewsTrigger, @Qualifier("SpiderJobNoticeTrigger") CronTrigger noticeTrigger){ SchedulerFactoryBean factoryBean=new SchedulerFactoryBean(); factoryBean.setOverwriteExistingJobs(true); factoryBean.setJobFactory(jobFactory); factoryBean.setStartupDelay(0); factoryBean.setTriggers(loginInfoCronTrigger,dynamicNewsTrigger,noticeTrigger); return factoryBean; } }
[ "705083979@qq.com" ]
705083979@qq.com
31b03d00d6898971017a21e48147313c28750e01
d5a96ed0ac1bde7de88679783a8566fa6f60d45c
/src/YearsAlive.java
7ec3c3a1c2df9ae9f5b83f6a9c46cae430a2534f
[]
no_license
League-Level0-Student/level-0-module-3-honeybiscuit15
04c0fc5eb6897438b3eabfef4540187f8296b6db
67ae16da4ddd23cd2041b77f11605c682e41110f
refs/heads/master
2021-05-02T07:50:17.659766
2018-04-13T00:01:50
2018-04-13T00:01:50
120,839,741
0
0
null
null
null
null
UTF-8
Java
false
false
158
java
public class YearsAlive { public static void main(String[] args) { for (int i = 2002; i <= 2018; i++) { System.out.println(i); } } }
[ "leaguestudent@administrator-Inspiron-15-3552" ]
leaguestudent@administrator-Inspiron-15-3552
61a8d676e39746a2fd643abeaa7d2564bc760f63
d65a33196a495aa0001b89e321d02fae23721eb6
/quickcall-admin/src/main/java/com/calf/cn/getui/advancedpushmessage/GetUserTagsDemo.java
4f92455459a8056ee7e49df26e52f8d3e74aa3dc
[]
no_license
zihanbobo/Repository
5c168307848d2639fef7649d4121f37c498a2e7c
db9e91931899f5ef3e5af07722ecee0aa9fb1d02
refs/heads/master
2021-10-10T08:58:19.052522
2018-11-28T13:22:10
2018-11-28T13:22:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
797
java
package com.calf.cn.getui.advancedpushmessage; import com.gexin.rp.sdk.base.IPushResult; import com.gexin.rp.sdk.http.IGtPush; public class GetUserTagsDemo { static String appId = "TxzlIyCcfS9KuENjjP4ux1"; static String appKey = "rAnoicfrNX7915IxPocAL2"; static String masterSecret = "KFDNBNKAVj9bgykwvqgeA5"; static String CID = "e605a0db5ce3cca9b76b012978064940"; static String host = "http://sdk.open.api.igexin.com/apiex.htm"; public static void main(String[] args) throws Exception { getUserTags(); } public static void getUserTags() { IGtPush push = new IGtPush(host, appKey, masterSecret); IPushResult result = push.getUserTags(appId, CID); System.out.println(result.getResponse().toString()); } }
[ "liyingtang@xiaoniu.com" ]
liyingtang@xiaoniu.com
e61f674181b98d060f467024112fa7c93c0998c7
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14227-3-12-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/plugin/activitystream/internal/RecordableEventMigrator_ESTest.java
e1e4636802b103c6f8b17240fad23665720b8599
[]
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
597
java
/* * This file was automatically generated by EvoSuite * Mon Jan 20 11:10:20 UTC 2020 */ package com.xpn.xwiki.plugin.activitystream.internal; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class RecordableEventMigrator_ESTest extends RecordableEventMigrator_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
23ca2af3cab0ef98b41a285280404e82a390d275
6f36fc4a0f9c680553f8dd64c5df55c403f8f2ed
/src/main/java/it/csi/siac/siacbilser/business/service/allegatoatto/ConvalidaAllegatoAttoPerElenchiMultiploAsyncService.java
b56bd1452a928b03417ba29e5e5b52e80f9a718a
[]
no_license
unica-open/siacbilser
b46b19fd382f119ec19e4e842c6a46f9a97254e2
7de24065c365564b71378ce9da320b0546474130
refs/heads/master
2021-01-06T13:25:34.712460
2020-03-04T08:44:26
2020-03-04T08:44:26
241,339,144
0
0
null
null
null
null
UTF-8
Java
false
false
2,183
java
/* *SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte *SPDX-License-Identifier: EUPL-1.2 */ package it.csi.siac.siacbilser.business.service.allegatoatto; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import it.csi.siac.siacbilser.business.service.base.AsyncBaseService; import it.csi.siac.siaccommonser.business.service.base.exception.ServiceParamError; import it.csi.siac.siaccorser.frontend.webservice.msg.AsyncServiceRequestWrapper; import it.csi.siac.siaccorser.frontend.webservice.msg.AsyncServiceResponse; import it.csi.siac.siacfin2ser.frontend.webservice.msg.ConvalidaAllegatoAttoPerElenchiMultiplo; import it.csi.siac.siacfin2ser.frontend.webservice.msg.ConvalidaAllegatoAttoPerElenchiMultiploResponse; /** * @author elisa * */ @Service @Scope(BeanDefinition.SCOPE_PROTOTYPE) public class ConvalidaAllegatoAttoPerElenchiMultiploAsyncService extends AsyncBaseService<ConvalidaAllegatoAttoPerElenchiMultiplo, ConvalidaAllegatoAttoPerElenchiMultiploResponse, AsyncServiceRequestWrapper<ConvalidaAllegatoAttoPerElenchiMultiplo>, ConvalidaAllegatoAttoPerElenchiMultiploAsyncResponseHandler, ConvalidaAllegatoAttoPerElenchiMultiploService> { @Override protected void checkServiceParam() throws ServiceParamError { service.checkServiceParam(); res.addErrori(service.getServiceResponse().getErrori()); } @Override @Transactional public AsyncServiceResponse executeService(AsyncServiceRequestWrapper<ConvalidaAllegatoAttoPerElenchiMultiplo> serviceRequest) { return super.executeService(serviceRequest); } @Override protected void preStartService() { final String methodName = "preStartService"; log.debug(methodName, "Operazione asincrona in procinto di avviarsi..."); } @Override protected void postStartService() { // TODO Auto-generated method stub } @Override protected boolean mayRequireElaborationOnDedicatedQueue() { // TODO verificare return false; } }
[ "barbara.malano@csi.it" ]
barbara.malano@csi.it
34adda631ad531c38a5b41de26c344b9000fcde9
fa32414cd8cb03a7dc3ef7d85242ee7914a2f45f
/app/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java
5afdd78400d5d4910efebf8088933247622ea9ed
[]
no_license
SeniorZhai/Mob
75c594488c4ce815a1f432eb4deacb8e6f697afe
cac498f0b95d7ec6b8da1275b49728578b64ef01
refs/heads/master
2016-08-12T12:49:57.527237
2016-03-10T06:57:09
2016-03-10T06:57:09
53,562,752
4
2
null
null
null
null
UTF-8
Java
false
false
3,131
java
package com.google.android.gms.common.api; import com.google.android.gms.iid.InstanceID; import org.apache.http.protocol.HttpRequestExecutor; public class CommonStatusCodes { public static final int API_NOT_AVAILABLE = 17; public static final int CANCELED = 16; public static final int DEVELOPER_ERROR = 10; public static final int ERROR = 13; public static final int INTERNAL_ERROR = 8; public static final int INTERRUPTED = 14; public static final int INVALID_ACCOUNT = 5; public static final int LICENSE_CHECK_FAILED = 11; public static final int NETWORK_ERROR = 7; public static final int RESOLUTION_REQUIRED = 6; public static final int SERVICE_DISABLED = 3; public static final int SERVICE_INVALID = 9; public static final int SERVICE_MISSING = 1; public static final int SERVICE_VERSION_UPDATE_REQUIRED = 2; public static final int SIGN_IN_REQUIRED = 4; public static final int SUCCESS = 0; public static final int SUCCESS_CACHE = -1; public static final int TIMEOUT = 15; public static String getStatusCodeString(int statusCode) { switch (statusCode) { case SUCCESS_CACHE /*-1*/: return "SUCCESS_CACHE"; case SUCCESS /*0*/: return "SUCCESS"; case SERVICE_MISSING /*1*/: return "SERVICE_MISSING"; case SERVICE_VERSION_UPDATE_REQUIRED /*2*/: return "SERVICE_VERSION_UPDATE_REQUIRED"; case SERVICE_DISABLED /*3*/: return "SERVICE_DISABLED"; case SIGN_IN_REQUIRED /*4*/: return "SIGN_IN_REQUIRED"; case INVALID_ACCOUNT /*5*/: return "INVALID_ACCOUNT"; case RESOLUTION_REQUIRED /*6*/: return "RESOLUTION_REQUIRED"; case NETWORK_ERROR /*7*/: return "NETWORK_ERROR"; case INTERNAL_ERROR /*8*/: return "INTERNAL_ERROR"; case SERVICE_INVALID /*9*/: return "SERVICE_INVALID"; case DEVELOPER_ERROR /*10*/: return "DEVELOPER_ERROR"; case LICENSE_CHECK_FAILED /*11*/: return "LICENSE_CHECK_FAILED"; case ERROR /*13*/: return "ERROR_OPERATION_FAILED"; case INTERRUPTED /*14*/: return "INTERRUPTED"; case TIMEOUT /*15*/: return InstanceID.ERROR_TIMEOUT; case CANCELED /*16*/: return "CANCELED"; case HttpRequestExecutor.DEFAULT_WAIT_FOR_CONTINUE /*3000*/: return "AUTH_API_INVALID_CREDENTIALS"; case 3001: return "AUTH_API_ACCESS_FORBIDDEN"; case 3002: return "AUTH_API_CLIENT_ERROR"; case 3003: return "AUTH_API_SERVER_ERROR"; case 3004: return "AUTH_TOKEN_ERROR"; case 3005: return "AUTH_URL_RESOLUTION"; default: return "unknown status code: " + statusCode; } } }
[ "370985116@qq.com" ]
370985116@qq.com
d4febbdebf6ff3807144e63944a68429e8d70069
805b2a791ec842e5afdd33bb47ac677b67741f78
/Mage.Sets/src/mage/sets/magic2013/FirewingPhoenix.java
fc7f0158e2a97f3ea986fd1f53f1425432df000b
[]
no_license
klayhamn/mage
0d2d3e33f909b4052b0dfa58ce857fbe2fad680a
5444b2a53beca160db2dfdda0fad50e03a7f5b12
refs/heads/master
2021-01-12T19:19:48.247505
2015-08-04T20:25:16
2015-08-04T20:25:16
39,703,242
2
0
null
2015-07-25T21:17:43
2015-07-25T21:17:42
null
UTF-8
Java
false
false
3,014
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ package mage.sets.magic2013; import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; /** * * @author North */ public class FirewingPhoenix extends CardImpl { public FirewingPhoenix(UUID ownerId) { super(ownerId, 131, "Firewing Phoenix", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.expansionSetCode = "M13"; this.subtype.add("Phoenix"); this.power = new MageInt(4); this.toughness = new MageInt(2); // Flying this.addAbility(FlyingAbility.getInstance()); // {1}{R}{R}{R}: Return Firewing Phoenix from your graveyard to your hand. this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{1}{R}{R}{R}"))); } public FirewingPhoenix(final FirewingPhoenix card) { super(card); } @Override public FirewingPhoenix copy() { return new FirewingPhoenix(this); } }
[ "robyter@gmail" ]
robyter@gmail
018a66362ad57bc92764c0f1f115229fe58e73a1
37fdc74bbf8220b4efa3a209a0398dde51f1d57b
/src/main/java/cn/com/rebirth/search/core/script/ScriptException.java
37082a6de7a056e377ceb7793da5c62331f855d9
[]
no_license
dowsam/rebirth-search-core
4c39e7f1b30c78e4dd97380b82af235c72161ee4
ab615cd8e74f318c20137c0f0dd7d740cd0a6bec
refs/heads/master
2016-09-09T18:35:33.145132
2012-09-05T05:58:55
2012-09-05T05:58:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
804
java
/* * Copyright (c) 2005-2012 www.china-cti.com All rights reserved * Info:rebirth-search-core ScriptException.java 2012-7-6 14:29:40 l.xue.nong$$ */ package cn.com.rebirth.search.core.script; import cn.com.rebirth.commons.exception.RebirthException; /** * The Class ScriptException. * * @author l.xue.nong */ public class ScriptException extends RebirthException { /** The Constant serialVersionUID. */ private static final long serialVersionUID = 6982865530748411149L; /** * Instantiates a new script exception. * * @param msg the msg */ public ScriptException(String msg) { super(msg); } /** * Instantiates a new script exception. * * @param msg the msg * @param cause the cause */ public ScriptException(String msg, Throwable cause) { super(msg, cause); } }
[ "l.xue.nong@gmail.com" ]
l.xue.nong@gmail.com
0555436218b70428f49c33aecdf6d5da24b5846a
91a178ecf86b2b23313e04d37d42e542dbbc8124
/src/main/java/booternetes/nativex/KubernetesHints.java
3841b444e5e973d8dca0882297eef661e1ad1be5
[ "Apache-2.0" ]
permissive
ahmedbelli/spring-native-kubernetes
8aaa90134b08e52ebeee323b7714bc14f02089d6
e8cfbeb2db9e6c6f1787dcc6832bd16e39e82d7c
refs/heads/main
2023-04-06T06:36:09.193387
2021-04-18T07:16:25
2021-04-18T07:16:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,222
java
package booternetes.nativex; import org.springframework.nativex.hint.AccessBits; import org.springframework.nativex.hint.TypeHint; import org.springframework.nativex.type.AccessDescriptor; import org.springframework.nativex.type.HintDeclaration; import org.springframework.nativex.type.NativeConfiguration; import org.springframework.nativex.type.TypeSystem; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; /** * These hints are inspired by <a href="https://github.com/scratches/spring-controller"> * Dr. Dave Syer's sample Kubernetes controller</a> and the configuration therein. * <p> * These types work <a href="https://github.com/kubernetes-client/java">in conjunction * with the autoconfiguration provided by the official Kubernetes Java client</a>, most of * which is code-generated from Swagger. This support automatically registers any * code-generated types that have {@link io.swagger.annotations.ApiModel} on it, limiting * the registration to the code-generated types in the {@link io.kubernetes} package. * <p> * This hints class also registers options required to use this with a HTTPS API endpoints * with custom character sets. * * @author Josh Long * @author Dave Syer */ @TypeHint(typeNames = { "io.kubernetes.client.util.Watch$Response" }, access = AccessBits.ALL) @TypeHint(typeNames = { "io.kubernetes.client.util.generic.GenericKubernetesApi$StatusPatch" }, access = AccessBits.ALL) @TypeHint(typeNames = { "io.kubernetes.client.custom.Quantity$QuantityAdapter" }, access = AccessBits.ALL) @TypeHint(typeNames = { "io.kubernetes.client.extended.controller.Controller" }, access = AccessBits.ALL) @TypeHint(typeNames = { "io.kubernetes.client.informer.cache.ProcessorListener" }, access = AccessBits.ALL) @TypeHint(typeNames = { "io.kubernetes.client.custom.IntOrString" }, access = AccessBits.ALL) @TypeHint(typeNames = { "io.kubernetes.client.custom.IntOrString$IntOrStringAdapter" }, access = AccessBits.ALL) public class KubernetesHints implements NativeConfiguration { @Override public List<HintDeclaration> computeHints(TypeSystem typeSystem) { List<String> models = typeSystem.findTypesAnnotated("Lio/swagger/annotations/ApiModel;", true); List<String> adapters = typeSystem.findTypesAnnotated("Lcom/google/gson/annotations/JsonAdapter;", true); List<String> rl = new ArrayList<String>(); rl.addAll(adapters); rl.addAll(models); List<HintDeclaration> ops = Stream .of("-H:+AddAllCharsets", "--enable-all-security-services", "--enable-https", "--enable-http") .map(op -> { HintDeclaration hd = new HintDeclaration(); hd.addOption(op); return hd; }).collect(Collectors.toList()); List<HintDeclaration> reflection = new HashSet<>(rl).stream().filter(clzz -> clzz.startsWith("io/kubernetes")) .map(clazzName -> { HintDeclaration hd = new HintDeclaration(); hd.addDependantType(clazzName.replace("/", "."), new AccessDescriptor(AccessBits.ALL)); return hd; }).collect(Collectors.toList()); List<HintDeclaration> merge = new ArrayList<>(); merge.addAll(ops); merge.addAll(reflection); return merge; } }
[ "josh@joshlong.com" ]
josh@joshlong.com
1e6c437cc74687b4ce5c9d4b7b67d56f4eb9b6cf
d2f39db0e322697a3b8f816df47646b9524e5e86
/src/main/java/com/crud/bets/domain/detail/SlipSettleDetails.java
d06f8907812f7378912364a51efac7dacc5c6424
[]
no_license
KrzysiekPrzybylski/Sports-Betting
26a306dcbc4ae453c0cda267d3e77c7e65d61f21
76b29af31511a230eaeb3a071816ba80b3451183
refs/heads/master
2023-07-01T12:15:14.397353
2021-08-03T17:21:00
2021-08-03T17:21:00
387,822,900
0
0
null
null
null
null
UTF-8
Java
false
false
641
java
package com.crud.bets.domain.detail; import com.crud.bets.domain.Slip; import com.sun.istack.NotNull; import lombok.Builder; import lombok.Data; import javax.persistence.*; import java.math.BigDecimal; import java.time.LocalDateTime; @Data @Entity @Builder public class SlipSettleDetails { @NotNull @Id @GeneratedValue private long id; @NotNull private LocalDateTime dateTime; @NotNull private BigDecimal stake; @NotNull private BigDecimal odds; @NotNull private boolean winning; @NotNull @OneToOne(fetch = FetchType.LAZY) @JoinColumn(name = "SLIP_ID") private Slip slip; }
[ "krzy.przybylski@gmail.com" ]
krzy.przybylski@gmail.com
7bc6677f8ae27cf751c22befaa2ae6601d88cfe8
538414f61a305cf84e00cbd0f2c154e4fa99ccb7
/build/javasqlc/src/org/openbravo/erpCommon/utility/reporting/printing/ToolsData.java
8e75d46e0f67bf5a4a2f1cfb71a066615b832b2c
[]
no_license
q3neeko/openz
4024d007ef2f1094faad8a8c17db8147e689d0f3
050ae0ba7b54ba9276a2fa85ecf5b2ec33954859
refs/heads/master
2020-03-29T21:44:56.783387
2018-09-26T14:34:00
2018-09-26T14:34:00
150,385,120
0
1
null
null
null
null
UTF-8
Java
false
false
3,369
java
//Sqlc generated V1.O00-1 package org.openbravo.erpCommon.utility.reporting.printing; import java.sql.*; import org.apache.log4j.Logger; import javax.servlet.ServletException; import org.openbravo.data.FieldProvider; import org.openbravo.database.ConnectionProvider; import org.openbravo.data.UtilSql; import org.openbravo.data.FResponse; class ToolsData implements FieldProvider { static Logger log4j = Logger.getLogger(ToolsData.class); private String InitRecordNumber="0"; public String adTableId; public String getInitRecordNumber() { return InitRecordNumber; } public String getField(String fieldName) { if (fieldName.equalsIgnoreCase("ad_table_id") || fieldName.equals("adTableId")) return adTableId; else { log4j.debug("Field does not exist: " + fieldName); return null; } } public static String getTableId(ConnectionProvider connectionProvider, String tableName) throws ServletException { String strSql = ""; strSql = strSql + " select" + " ad_table.ad_table_id" + " from" + " ad_table" + " where" + " LOWER(ad_table.tablename) = LOWER(?)"; ResultSet result; String strReturn = null; PreparedStatement st = null; int iParameter = 0; try { st = connectionProvider.getPreparedStatement(strSql); iParameter++; UtilSql.setValue(st, iParameter, 12, null, tableName); result = st.executeQuery(); if(result.next()) { strReturn = UtilSql.getValue(result, "ad_table_id"); } result.close(); } catch(SQLException e){ log4j.error("SQL error in query: " + strSql + "Exception:"+ e); throw new ServletException("@CODE=" + e.getSQLState() + "@" + e.getMessage()); } catch(Exception ex){ log4j.error("Exception in query: " + strSql + "Exception:"+ ex); throw new ServletException("@CODE=@" + ex.getMessage()); } finally { try { connectionProvider.releasePreparedStatement(st); } catch(Exception ignore){ ignore.printStackTrace(); } } return(strReturn); } public static String isMultiLanguage(ConnectionProvider connectionProvider, String clientId) throws ServletException { String strSql = ""; strSql = strSql + " select ismultilingualdocument" + " from ad_client " + " where" + " ad_client_id=?"; ResultSet result; String strReturn = null; PreparedStatement st = null; int iParameter = 0; try { st = connectionProvider.getPreparedStatement(strSql); iParameter++; UtilSql.setValue(st, iParameter, 12, null, clientId); result = st.executeQuery(); if(result.next()) { strReturn = UtilSql.getValue(result, "ismultilingualdocument"); } result.close(); } catch(SQLException e){ log4j.error("SQL error in query: " + strSql + "Exception:"+ e); throw new ServletException("@CODE=" + e.getSQLState() + "@" + e.getMessage()); } catch(Exception ex){ log4j.error("Exception in query: " + strSql + "Exception:"+ ex); throw new ServletException("@CODE=@" + ex.getMessage()); } finally { try { connectionProvider.releasePreparedStatement(st); } catch(Exception ignore){ ignore.printStackTrace(); } } return(strReturn); } }
[ "neeko@gmx.de" ]
neeko@gmx.de
d9d4921a88dc8501e2885030cd2c4f7152c1bff1
b1239455146a9964e218c0a326dfa3d96bd33e20
/Backend/src/main/java/com/unep/wcmc/foodnutrition/security/SecurityConfig.java
01564f6d3a413ea25a258b53046c80fc820868a8
[]
no_license
unepwcmc/Food-Nutrition
a83cfba571b5007378e431482da26285eaa0bcea
82aa4ccd8dc90d9e6e960e1a7fcfa23972af7240
refs/heads/master
2021-01-24T17:50:48.507566
2016-04-07T13:33:24
2016-04-07T13:33:24
51,439,245
1
0
null
null
null
null
UTF-8
Java
false
false
4,359
java
package com.unep.wcmc.foodnutrition.security; import com.unep.wcmc.foodnutrition.security.token.TokenProvider; import com.unep.wcmc.foodnutrition.security.token.XAuthTokenConfigurer; import com.unep.wcmc.foodnutrition.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.data.web.config.EnableSpringDataWebSupport; import org.springframework.http.HttpMethod; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.web.access.AccessDeniedHandlerImpl; import org.springframework.security.web.access.channel.ChannelProcessingFilter; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import org.springframework.security.web.util.matcher.AntPathRequestMatcher; /** * Configuration responsible for setting all authorized requests as well as login service * */ @Order(1) @Configuration @EnableWebSecurity @EnableSpringDataWebSupport @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private UserService userService; @Autowired private TokenProvider tokenProvider; @Autowired private Http401UnauthorizedEntryPoint authenticationEntryPoint; public SecurityConfig() { super(true); } @Override protected void configure(HttpSecurity httpSecurity) throws Exception { // Security filters httpSecurity.addFilterBefore(new CORSFilter(), ChannelProcessingFilter.class); httpSecurity.addFilterBefore(new LoginFilter("/login", tokenProvider, userService, authenticationManager()), UsernamePasswordAuthenticationFilter.class); // Security configuration httpSecurity.exceptionHandling() .accessDeniedHandler(new AccessDeniedHandlerImpl()) .authenticationEntryPoint(authenticationEntryPoint) .and().csrf().disable().headers().frameOptions().disable() .and().headers().cacheControl().disable() .and().anonymous() .and().servletApi() .and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and().authorizeRequests() .antMatchers(HttpMethod.POST, "/login").denyAll() .and().apply(securityConfigurerAdapter()); // Logout process LogoutHandler logoutHandler = new LogoutHandler(tokenProvider); httpSecurity.logout() .logoutRequestMatcher(new AntPathRequestMatcher("/logout", "POST")) .logoutSuccessHandler(logoutHandler) .addLogoutHandler(logoutHandler); } @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userService).passwordEncoder(passwordEncoder()); } @Bean @Override public AuthenticationManager authenticationManagerBean() throws Exception { return super.authenticationManagerBean(); } @Override protected UserDetailsService userDetailsService() { return userService; } @Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } private XAuthTokenConfigurer securityConfigurerAdapter() { return new XAuthTokenConfigurer(tokenProvider); } }
[ "rcandidosilva@gmail.com" ]
rcandidosilva@gmail.com
7be0663c0b31bb25242c8904372cf3e99ac02687
0c11613c21ebe12f48d6cebb6339887e10e72219
/rmidemo/src/main/java/com/ggd543/rmi/impl/FlightImpl.java
8f854f20e289623554406c5ee781bfb3e59c4083
[]
no_license
mustang2247/demo
a3347a2994448086814383c67757f659208368cd
35598ed0a3900afc759420b7100a7d310db2597d
refs/heads/master
2021-05-09T17:28:22.631386
2014-06-10T12:03:26
2014-06-10T12:03:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,077
java
package com.ggd543.rmi.impl; import com.ggd543.rmi.Flight; import java.io.Serializable; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; import java.util.Date; /** * Created by IntelliJ IDEA. * User: Administrator * Date: 11-9-11 * Time: 下午7:34 * To change this template use File | Settings | File Templates. */ public class FlightImpl implements Flight , Serializable { private String flightNumber; private Date flightDate; private String originCity; private String destCity; @Override public String toString(){ return "flightNumber: "+flightNumber+" flightDate: "+flightDate+" originCity: "+originCity+" destCity: "+destCity; } @Override public boolean equals(Object o){ if (o instanceof FlightImpl){ FlightImpl that = (FlightImpl) o; return that.flightNumber.equals(this.flightNumber); }else{ return false; } } public FlightImpl(String flightNumber) throws RemoteException{ this.flightNumber = flightNumber; // UnicastRemoteObject.exportObject(this,0); } @Override public String getFlightNumber() throws RemoteException { return this.flightNumber; } @Override public void setFlightNumber(String num) throws RemoteException { this.flightNumber = num; } @Override public String getOriginCity() throws RemoteException { return this.originCity; } @Override public void setOriginCity(String city) throws RemoteException { this.originCity = city; } @Override public String getDestCity() throws RemoteException { return this.destCity; } @Override public void setDestCity(String city) throws RemoteException { this.destCity = city; } @Override public Date getFlightDate() throws RemoteException { return this.flightDate; } @Override public void setFlightDate(Date date) throws RemoteException { this.flightDate = date; } }
[ "ggd543@gmail.com" ]
ggd543@gmail.com
82c1915dbcbccd0111e86d4512cb47859d38d747
39bef83f3a903f49344b907870feb10a3302e6e4
/Android Studio Projects/bf.io.openshop/src/android/support/v4/view/ViewCompat$ScrollIndicators.java
79a9861c5f2788c91b5d8566c7bb8279d3451d1c
[]
no_license
Killaker/Android
456acf38bc79030aff7610f5b7f5c1334a49f334
52a1a709a80778ec11b42dfe9dc1a4e755593812
refs/heads/master
2021-08-19T06:20:26.551947
2017-11-24T22:27:19
2017-11-24T22:27:19
111,960,738
0
0
null
null
null
null
UTF-8
Java
false
false
140
java
package android.support.v4.view; import java.lang.annotation.*; @Retention(RetentionPolicy.SOURCE) public @interface ScrollIndicators { }
[ "ema1986ct@gmail.com" ]
ema1986ct@gmail.com
fb8c960d9edafcbc17029cf72d7d9a3a510e2a70
58bc2346e334d015961bcb0bf3b65125ce407e8b
/allDocsReader/src/main/java/com/zapps/docsReaderModule/system/beans/CalloutView/CalloutManager.java
e123379bba20b9aa7dcb1572ecd83a7d12e25222
[]
no_license
ZeeshanHayat2020/HtmlViewer
e7eeeb0adc40dd9fed7aa1128d15fdee5718c652
17b81bf0c33d271982dd86eef5f9891c709c0b31
refs/heads/master
2023-04-25T23:18:38.293648
2021-06-09T10:47:08
2021-06-09T10:47:08
350,306,988
0
0
null
null
null
null
UTF-8
Java
false
false
2,178
java
package com.zapps.docsReaderModule.system.beans.CalloutView; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import com.zapps.docsReaderModule.common.PaintKit; import com.zapps.docsReaderModule.constant.MainConstant; import com.zapps.docsReaderModule.system.IControl; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class CalloutManager { private int alpha = 0xFF; private int color = Color.RED; private int width = 10; private int mode = MainConstant.DRAWMODE_NORMAL; private IControl control; private HashMap<Integer, List<PathInfo>> mPathMap; public CalloutManager(IControl control) { this.control = control; mPathMap = new HashMap<Integer, List<PathInfo>>(); } public void drawPath(Canvas canvas, int index, float zoom) { canvas.scale(zoom, zoom); List<PathInfo> pathList = mPathMap.get(index); Paint paint = PaintKit.instance().getPaint(); if (pathList != null) { for (int i = 0; i < pathList.size(); i++) { PathInfo pathInfo = pathList.get(i); paint.setStrokeWidth(pathInfo.width); paint.setColor(pathInfo.color); canvas.drawPath(pathInfo.path, paint); } } } public boolean isPathEmpty() { return mPathMap.size() == 0; } public boolean isPathEmpty(int index) { return mPathMap.get(index) == null; } public List<PathInfo> getPath(int index, boolean assignPath) { if (assignPath && mPathMap.get(index) == null) { mPathMap.put(index, new ArrayList<PathInfo>()); } return mPathMap.get(index); } public int getAlpha() { return alpha; } public void setAlpha(int alpha) { this.alpha = alpha; } public int getColor() { return color; } public void setColor(int color) { this.color = color; } public int getWidth() { return width; } public void setWidth(int width) { this.width = width; } public void setDrawingMode(int mode) { if (mode < MainConstant.DRAWMODE_NORMAL || mode > MainConstant.DRAWMODE_CALLOUTERASE) { return; } this.mode = mode; } public int getDrawingMode() { return mode; } public void dispose() { mPathMap.clear(); mPathMap = null; control = null; } }
[ "zeeshanhayat61@gmail.com" ]
zeeshanhayat61@gmail.com
293970c59af4865b7fc089cd84997c79c8e27e3b
447520f40e82a060368a0802a391697bc00be96f
/apks/comparison_androart/ro.btrl.pay/source/o/EL.java
5f8a02c9db9d529f65233c3c3e56193082bff107
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
383
java
package o; public class EL { public String cardHolderName; public String cvv; public String expirationDate; public String pan; public EL(String paramString1, String paramString2, String paramString3, String paramString4) { this.cardHolderName = paramString1; this.cvv = paramString2; this.expirationDate = paramString3; this.pan = paramString4; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
3be96f6eb68e9938df6300891e721cf09701c8cc
c94f888541c0c430331110818ed7f3d6b27b788a
/rms/java/src/main/java/com/antgroup/antchain/openapi/rms/models/UpdateStackGeneratedconfigResponse.java
a815317a43e6a2b417c2d2ac6bde03946f68dcc7
[ "MIT", "Apache-2.0" ]
permissive
alipay/antchain-openapi-prod-sdk
48534eb78878bd708a0c05f2fe280ba9c41d09ad
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
refs/heads/master
2023-09-03T07:12:04.166131
2023-09-01T08:56:15
2023-09-01T08:56:15
275,521,177
9
10
MIT
2021-03-25T02:35:20
2020-06-28T06:22:14
PHP
UTF-8
Java
false
false
1,412
java
// This file is auto-generated, don't edit it. Thanks. package com.antgroup.antchain.openapi.rms.models; import com.aliyun.tea.*; public class UpdateStackGeneratedconfigResponse extends TeaModel { // 请求唯一ID,用于链路跟踪和问题排查 @NameInMap("req_msg_id") public String reqMsgId; // 结果码,一般OK表示调用成功 @NameInMap("result_code") public String resultCode; // 异常信息的文本描述 @NameInMap("result_msg") public String resultMsg; public static UpdateStackGeneratedconfigResponse build(java.util.Map<String, ?> map) throws Exception { UpdateStackGeneratedconfigResponse self = new UpdateStackGeneratedconfigResponse(); return TeaModel.build(map, self); } public UpdateStackGeneratedconfigResponse setReqMsgId(String reqMsgId) { this.reqMsgId = reqMsgId; return this; } public String getReqMsgId() { return this.reqMsgId; } public UpdateStackGeneratedconfigResponse setResultCode(String resultCode) { this.resultCode = resultCode; return this; } public String getResultCode() { return this.resultCode; } public UpdateStackGeneratedconfigResponse setResultMsg(String resultMsg) { this.resultMsg = resultMsg; return this; } public String getResultMsg() { return this.resultMsg; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
ac5bd87576172997d0e0526afd1555a73ab967d0
d320858fd9f9c420050491750b6871d1cb4646e2
/mapstruct-nested-bean-mappings/src/main/java/org/mapstruct/example/mapper/FishTankMapperExpression.java
17389c3a33205eae01f3a54b4ae2185679c424e6
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
chenxingxing6/mapstruct-examples
a811619992ca8bb89bcc3d74b066b1f570b726fa
362a43dff818c35614a5fe5cc216845e1faff77f
refs/heads/master
2020-05-17T18:31:57.529811
2019-03-23T08:11:40
2019-03-23T08:11:40
183,886,691
1
0
NOASSERTION
2019-04-28T09:27:12
2019-04-28T09:27:11
null
UTF-8
Java
false
false
1,616
java
/** * Copyright 2012-2017 Gunnar Morling (http://www.gunnarmorling.de/) * and/or other contributors as indicated by the @authors tag. See the * copyright.txt file in the distribution for a full listing of all * contributors. * * 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.mapstruct.example.mapper; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.example.dto.FishTankDto; import org.mapstruct.example.model.FishTank; import org.mapstruct.factory.Mappers; /** * * @author Sjaak Derksen */ @Mapper public interface FishTankMapperExpression { FishTankMapperExpression INSTANCE = Mappers.getMapper( FishTankMapperExpression.class ); @Mapping(target = "fish.kind", source = "fish.type") @Mapping(target = "fish.name", expression = "java(\"Jaws\")") @Mapping(target = "plant", ignore = true ) @Mapping(target = "ornament", ignore = true ) @Mapping(target = "material", ignore = true) @Mapping(target = "quality.report.organisation.name", expression = "java(\"Dunno\")" ) FishTankDto map(FishTank source); }
[ "filip.hrisafov@gmail.com" ]
filip.hrisafov@gmail.com
354e5db0f89e10f169c25d1669dec1eb16d78a30
08be78ee28957fe393bea727228fbe13e5c00df1
/modules/rule/modules/data/src/main/java/com/rule/data/engine/functions/time/MONTH.java
d0d84121f81592c077daa6910737df98b3cf42e8
[]
no_license
javachengwc/java-apply
432259eadfca88c6f3f2b80aae8e1e8a93df5159
98a45c716f18657f0e4181d0c125a73feb402b16
refs/heads/master
2023-08-22T12:30:05.708710
2023-08-15T08:21:15
2023-08-15T08:21:15
54,971,501
10
4
null
2022-12-16T11:03:56
2016-03-29T11:50:21
Java
UTF-8
Java
false
false
869
java
package com.rule.data.engine.functions.time; import com.rule.data.engine.functions.Function; import com.rule.data.util.DataUtil; import com.rule.data.exception.RengineException; import com.rule.data.model.vo.CalInfo; import com.rule.data.exception.CalculateException; import com.rule.data.engine.excel.NumberPool; import java.util.Calendar; public final class MONTH extends Function { public static final String NAME = MONTH.class.getSimpleName(); @Override public Object eval(CalInfo calInfo, Object[] args) throws RengineException, CalculateException { if (args.length > 0) { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(DataUtil.getNumberValue(args[0]).longValue() * 1000); return new Long((calendar.get(Calendar.MONTH) + 1)); } return NumberPool.LONG_0; } }
[ "chengwenchao@cd.tuan800.com" ]
chengwenchao@cd.tuan800.com
57e7e86233c470cc8d36447e55db6f27aa061dd1
0aba3ca0c2da8626bed808155a854858f93b80e0
/services/dds/src/main/java/com/huaweicloud/sdk/dds/v3/model/QuerySessionResponse.java
85592c7f08ca508f0327336a29c3072faacaf85d
[ "Apache-2.0" ]
permissive
LanYus/huaweicloud-sdk-java-v3
5b51e0953f5b1a8a5d38bccbaa7389222a8c0ea7
761a9c43c0ea287a927707891c529389e43e8280
refs/heads/master
2023-05-31T15:46:06.772578
2021-06-10T12:06:03
2021-06-10T12:06:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,679
java
package com.huaweicloud.sdk.dds.v3.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.util.function.Consumer; import java.util.Objects; /** * 会话详细信息列表。 */ public class QuerySessionResponse { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="id") private String id; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="active") private Boolean active; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="operation") private String operation; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="type") private String type; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="cost_time") private String costTime; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="plan_summary") private String planSummary; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="host") private String host; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="client") private String client; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="description") private String description; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="namespace") private String namespace; public QuerySessionResponse withId(String id) { this.id = id; return this; } /** * 会话ID。 * @return id */ public String getId() { return id; } public void setId(String id) { this.id = id; } public QuerySessionResponse withActive(Boolean active) { this.active = active; return this; } /** * 当前会话是否活跃。 取值为“true”,表示活跃。 取值为“false”,表示不活跃。 * @return active */ public Boolean getActive() { return active; } public void setActive(Boolean active) { this.active = active; } public QuerySessionResponse withOperation(String operation) { this.operation = operation; return this; } /** * 操作。 * @return operation */ public String getOperation() { return operation; } public void setOperation(String operation) { this.operation = operation; } public QuerySessionResponse withType(String type) { this.type = type; return this; } /** * 操作类型。 * @return type */ public String getType() { return type; } public void setType(String type) { this.type = type; } public QuerySessionResponse withCostTime(String costTime) { this.costTime = costTime; return this; } /** * 运行时间,单位为 ms。 * @return costTime */ public String getCostTime() { return costTime; } public void setCostTime(String costTime) { this.costTime = costTime; } public QuerySessionResponse withPlanSummary(String planSummary) { this.planSummary = planSummary; return this; } /** * 执行计划描述。 * @return planSummary */ public String getPlanSummary() { return planSummary; } public void setPlanSummary(String planSummary) { this.planSummary = planSummary; } public QuerySessionResponse withHost(String host) { this.host = host; return this; } /** * 主机。 * @return host */ public String getHost() { return host; } public void setHost(String host) { this.host = host; } public QuerySessionResponse withClient(String client) { this.client = client; return this; } /** * 客户端地址。 * @return client */ public String getClient() { return client; } public void setClient(String client) { this.client = client; } public QuerySessionResponse withDescription(String description) { this.description = description; return this; } /** * 连接描述。 * @return description */ public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public QuerySessionResponse withNamespace(String namespace) { this.namespace = namespace; return this; } /** * 命名空间。 * @return namespace */ public String getNamespace() { return namespace; } public void setNamespace(String namespace) { this.namespace = namespace; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } QuerySessionResponse querySessionResponse = (QuerySessionResponse) o; return Objects.equals(this.id, querySessionResponse.id) && Objects.equals(this.active, querySessionResponse.active) && Objects.equals(this.operation, querySessionResponse.operation) && Objects.equals(this.type, querySessionResponse.type) && Objects.equals(this.costTime, querySessionResponse.costTime) && Objects.equals(this.planSummary, querySessionResponse.planSummary) && Objects.equals(this.host, querySessionResponse.host) && Objects.equals(this.client, querySessionResponse.client) && Objects.equals(this.description, querySessionResponse.description) && Objects.equals(this.namespace, querySessionResponse.namespace); } @Override public int hashCode() { return Objects.hash(id, active, operation, type, costTime, planSummary, host, client, description, namespace); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QuerySessionResponse {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" costTime: ").append(toIndentedString(costTime)).append("\n"); sb.append(" planSummary: ").append(toIndentedString(planSummary)).append("\n"); sb.append(" host: ").append(toIndentedString(host)).append("\n"); sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "wuchen25@huawei.com" ]
wuchen25@huawei.com
b9242ae70b270d937a2cd1431077c4aa9a8b2f09
5cc01dec9ec1c6dde262d56d42c40dd8acfe2010
/PTSCMC/src/java/com/venus/mc/process/equipment/acceptancetest/AcceptanceTestFormAction.java
18dc6daa05245867245a452cad6bed29e10377ab
[]
no_license
phuongtu1983/mc
6defa0c94a02e2ff5ce9886ee87a219396d54ac0
0966390950a911e9fdb75484701bdede381a3042
refs/heads/master
2020-03-11T11:50:15.387384
2018-04-18T00:42:25
2018-04-18T00:42:25
129,980,464
0
0
null
null
null
null
UTF-8
Java
false
false
4,936
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.venus.mc.process.equipment.acceptancetest; import com.venus.core.util.DateUtil; import com.venus.core.util.StringUtil; import com.venus.mc.bean.AcceptanceTestBean; import com.venus.mc.bean.EmployeeBean; import com.venus.mc.core.SpineAction; import com.venus.mc.dao.AcceptanceTestDAO; import com.venus.mc.dao.EmployeeDAO; import com.venus.mc.util.Constants; import com.venus.mc.util.MCUtil; import com.venus.mc.util.PermissionUtil; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.commons.validator.GenericValidator; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.util.LabelValueBean; /** * * @author mai vinh loc */ public class AcceptanceTestFormAction extends SpineAction { /** * This is the action called from the Struts framework. * @param mapping The ActionMapping used to select this instance. * @param form The optional ActionForm bean for this request. * @param request The HTTP Request we are processing. * @param response The HTTP Response we are processing. * @throws java.lang.Exception * @return */ @Override public boolean doAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { HttpSession session = request.getSession(); AcceptanceTestFormBean formBean = null; AcceptanceTestBean bean = null; String atId = request.getParameter("atId"); Integer id = (Integer) session.getAttribute("id"); //session.removeAttribute("id"); if (id != null) { atId = id + ""; } if (!GenericValidator.isBlankOrNull(atId)) { AcceptanceTestDAO requestDAO = new AcceptanceTestDAO(); try { bean = requestDAO.getAcceptanceTest(Integer.parseInt(atId)); if (bean != null) { formBean = new AcceptanceTestFormBean(bean); } } catch (Exception ex) { } } if (formBean == null) { formBean = new AcceptanceTestFormBean(); formBean.setCreatedEmp(MCUtil.getMemberID(session)); formBean.setCreatedDate(DateUtil.today("dd/MM/yyyy")); formBean.setTestDate(DateUtil.today("dd/MM/yyyy")); } request.setAttribute(Constants.ACCEPTANCETEST, formBean); //Employee EmployeeDAO employeeDAO = new EmployeeDAO(); ArrayList employeeList = null; try { employeeList = employeeDAO.getEmployees(); } catch (Exception ex) { } ArrayList arrEmployee = new ArrayList(); LabelValueBean value; value = new LabelValueBean(); value.setLabel(MCUtil.getBundleString("message.employee.select")); value.setValue("0"); arrEmployee.add(value); for (int i = 0; i < employeeList.size(); i++) { EmployeeBean employee = (EmployeeBean) employeeList.get(i); value = new LabelValueBean(); value.setLabel(String.valueOf(StringUtil.decodeString(employee.getFullname()))); value.setValue(String.valueOf(employee.getEmpId())); arrEmployee.add(value); } request.setAttribute(Constants.EMPLOYEE_LIST, arrEmployee); ArrayList arrStatus = new ArrayList(); value = new LabelValueBean(); value.setLabel(MCUtil.getBundleString("message.result.select")); value.setValue("0"); arrStatus.add(value); value = new LabelValueBean(); value.setLabel(MCUtil.getBundleString("message.acceptancetest.result1")); value.setValue(AcceptanceTestBean.RESULT1 + ""); arrStatus.add(value); value = new LabelValueBean(); value.setLabel(MCUtil.getBundleString("message.acceptancetest.result2")); value.setValue(AcceptanceTestBean.RESULT2 + ""); arrStatus.add(value); request.setAttribute(Constants.RESULT_LIST, arrStatus); ArrayList srList; AcceptanceTestDAO requestDAO = new AcceptanceTestDAO(); try { srList = requestDAO.getSrListOfOrg(MCUtil.getOrganizationID(session)); srList.add(0, new LabelValueBean(MCUtil.getBundleString("message.surveyreport.select"), "0")); request.setAttribute(Constants.SURVEYREPORT_LIST, srList); } catch (Exception ex) { } return true; } @Override protected String getFunction() { return PermissionUtil.FUNC_VIEW + ";" + PermissionUtil.FUNC_EDIT; } @Override protected int getPermit() { return PermissionUtil.PER_EQUIPMENT_SURVEYREPORT; } }
[ "phuongtu1983@gmail.com" ]
phuongtu1983@gmail.com
8a84f8e2a58dac88c8c2f3845b61efe56597bbef
9a6bbc16b35db8783d2d7fe0a845e92102e881a9
/src/gov/nbcs/rp/common/tree/TreeNode.java
3c922caacb90277ffc29cc0fc0720aa48bb966ba
[]
no_license
mingcheong/RollPrj
7608e05ba21056d2110245213a507f9c533fe935
a3db125f146f743573a5b808b0ba5fd0006b743f
refs/heads/master
2020-05-20T03:12:48.430634
2012-12-31T00:34:48
2012-12-31T00:34:48
null
0
0
null
null
null
null
GB18030
Java
false
false
6,654
java
package gov.nbcs.rp.common.tree; import gov.nbcs.rp.common.MyMap; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; /** * <p> * Title: 树结点的实现类,方法说明见@see com.jsxcsoft.common.tree.Node * </p> * <p> * Description: * </p> * <p> * Copyright: Copyright (c) 2005 * </p> * <p> * Company: 浙江易桥 * </p> * * @author 局端财政开发 * @version 1.0 */ public class TreeNode implements Node, Cloneable { Map attributes; Object value; int level = 0; /** * 子树集合 */ ArrayList children; /** * 父结点 */ Node parent; private int height = -1; private int width = 0; private Map levelNodes = new HashMap(); private Set levelNodesExist = new HashSet(); private Object id; private Object sortValue; private String text; TreeNode(Object id, String text, Object sortValue, Object value, Map attributes) { this.value = value; this.attributes = attributes; this.id = id; this.sortValue = sortValue; this.text = text; } TreeNode(Map attributes) { this(null, null, null, null, attributes); } public Iterator getAttributeNames() { return attributes.keySet().iterator(); } public Node search(Node node, String attrName, String attrValue) { Set v = new HashSet(1); search(node, v, attrName, attrValue); if (v.size() > 0) { return (Node) v.iterator().next(); } else { return node; } } private void search(Node node, Set result, String attrName, String attrValue) { if (matchAttr(node, attrName, attrValue)) { result.add(node); return; } for (int i = 0; i < node.getChildrenCount(); i++) { search(node.getChildAt(i), result, attrName, attrValue); } } protected boolean matchAttr(Node node, String attrName, String attrValue) { return ((attrName != null) && (attrValue != null)) && ((TreeNode) node).attributes.containsKey(attrName) && ((TreeNode) node).attributes.get(attrName).equals(attrValue); } public void append(Node node) { if (children == null) { children = new ArrayList(); } ((TreeNode) node).parent = this; adjustChildLevel((TreeNode) node); children.add(node); } public Object getAttribute(Object key) { return attributes == null ? null : attributes.get(key); } public Map getAttributes() { return this.attributes; } public void setAttribute(Object name, Object value) { if (attributes == null) { attributes = new MyMap(); } attributes.put(name, value); } public Object getValue() { return this.value; } public void setValue(Object value) { this.value = value; } public int getNodeType() { return parent == null ? Node.ROOT : (((children != null) && (children .size() > 0)) ? Node.BRANCH : Node.LEAF); } public int getChildrenCount() { return children == null ? 0 : children.size(); } public Node getChildAt(int i) { return (Node) this.children.get(i); } public Node getParent() { return this.parent; } public int getLevel() { return level; } public Object clone() { Node cloned = new TreeNode(this.id, this.text, this.sortValue, this.value, this.attributes); for (int i = 0; i < getChildrenCount(); i++) { cloned.append((Node) getChildAt(i).clone()); } return cloned; } public boolean equals(Object o) { if (!(o instanceof TreeNode)) { return false; } TreeNode node = (TreeNode) o; boolean b = (((this.value == null) && (node.value == null)) || ((this.value != null) && this.value .equals(node.value))) && (o instanceof TreeNode); if (!b) { return b; } if (attributes != null) { for (Iterator it = node.attributes.keySet().iterator(); it .hasNext();) { String key = it.next().toString(); String value = node.attributes.get(key).toString(); b = b && matchAttr(this, key, value); } } return b; } public int getHeight() { doHeightStatistic(this); return height; } protected void doHeightStatistic(Node node) { int currentLevel = node.getLevel(); addLevelNode(currentLevel, node); if ((node.getChildrenCount() == 0) && (currentLevel > height)) { if (node != this) { height = currentLevel; } } else { for (int i = 0; i < node.getChildrenCount(); i++) { doHeightStatistic(node.getChildAt(i)); } } } protected void addLevelNode(int level, Node node) { Integer key = new Integer(level); List nodeList = null; if (this.levelNodes.containsKey(key)) { nodeList = (List) levelNodes.get(key); } else { nodeList = new ArrayList(); } if (!levelNodesExist.contains(node)) { nodeList.add(node); levelNodesExist.add(node); } levelNodes.put(key, nodeList); } protected void doWidthStatistic(Node node) { if (node.getNodeType() == Node.LEAF) { width++; } else { for (int i = 0; i < node.getChildrenCount(); i++) { doWidthStatistic(node.getChildAt(i)); } } } public int getWidth() { width = 0; doWidthStatistic(this); return width; } public Node[][] toArray() { levelNodes.clear(); levelNodesExist.clear(); doHeightStatistic(this); Node[][] nodes = new Node[levelNodes.size()][]; for (int i = 0; i < nodes.length; i++) { List list = (List) levelNodes.get(new Integer(i)); if (list != null) { nodes[i] = new Node[list.size()]; System.arraycopy(list.toArray(), 0, nodes[i], 0, nodes[i].length); } } return nodes; } public void insert(Node child, int i) { if (this.children == null) { children = new ArrayList(); } ((TreeNode) child).parent = this; adjustChildLevel((TreeNode) child); children.add(i, child); } public int indexOf(Node child) { return this.children == null ? -1 : children.indexOf(child); } protected void adjustChildLevel(TreeNode node) { node.level = ((TreeNode) node.parent).level + 1; for (int i = 0; i < node.getChildrenCount(); i++) { adjustChildLevel((TreeNode) node.getChildAt(i)); } } public Object getIdentifier() { // TODO Auto-generated method stub return this.id; } public Object getSortByValue() { // TODO Auto-generated method stub return this.sortValue; } public String getText() { return this.text; } public void setText(String text) { this.text = text; } public String toString() { return getText(); } public boolean deleteSubNode(Node node) { if (node == null) { return false; } int iCount = getChildrenCount(); if (iCount <= 0) { return false; } for (int i = 0; i < iCount; i++) { if (getChildAt(i) == node) { children.remove(i); return true; } } return false; } }
[ "mingcheong83@gmail.com" ]
mingcheong83@gmail.com
d50ddb54402001463a7de6fadb58b242a4702a5e
258de8e8d556901959831bbdc3878af2d8933997
/utopia-service/utopia-piclisten/utopia-piclisten-impl/src/main/java/com/voxlearning/utopia/service/piclisten/impl/service/AsyncPiclistenCacheServiceImpl.java
8b3d64427b1e96f6a79ddb4459ec00a145b1bae1
[]
no_license
Explorer1092/vox
d40168b44ccd523748647742ec376fdc2b22160f
701160b0417e5a3f1b942269b0e7e2fd768f4b8e
refs/heads/master
2020-05-14T20:13:02.531549
2019-04-17T06:54:06
2019-04-17T06:54:06
181,923,482
0
4
null
2019-04-17T15:53:25
2019-04-17T15:53:25
null
UTF-8
Java
false
false
4,844
java
package com.voxlearning.utopia.service.piclisten.impl.service; import com.voxlearning.alps.annotation.cache.CacheSystem; import com.voxlearning.alps.annotation.remote.ExposeService; import com.voxlearning.alps.annotation.remote.ExposeServices; import com.voxlearning.alps.annotation.remote.ServiceVersion; import com.voxlearning.alps.api.concurrent.AlpsFuture; import com.voxlearning.alps.cache.redis.command.IRedisCommands; import com.voxlearning.alps.cache.redis.command.RedisCommandsBuilder; import com.voxlearning.alps.lang.util.SpringContainerSupport; import com.voxlearning.alps.remote.core.support.ValueWrapperFuture; import com.voxlearning.alps.spi.cache.CacheBuilder; import com.voxlearning.alps.spi.cache.UtopiaCache; import com.voxlearning.utopia.api.constant.SelfStudyType; import com.voxlearning.utopia.service.piclisten.api.AsyncPiclistenCacheService; import com.voxlearning.utopia.service.piclisten.consumer.cache.manager.*; import lombok.Getter; import javax.inject.Named; import java.util.Date; @Named("com.voxlearning.utopia.service.vendor.impl.service.AsyncVendorCacheServiceImpl") @ExposeServices({ @ExposeService(interfaceClass = AsyncPiclistenCacheService.class, version = @ServiceVersion(version = "2017.05.16")), @ExposeService(interfaceClass = AsyncPiclistenCacheService.class, version = @ServiceVersion(version = "2017.12.04")) }) @Getter public class AsyncPiclistenCacheServiceImpl extends SpringContainerSupport implements AsyncPiclistenCacheService { private CParentSelfStudyBookCacheManager parentSelfStudyBookCacheManager; private ParentShareTextReadLimitCacheManager parentShareTextReadLimitCacheManager; private StudentGrindEarDayRecordCacheManager studentGrindEarDayRecordCacheManager; private FollowReadDayReadCacheManager followReadDayReadCacheManager; private PicListenReportCacheManager picListenReportCacheManager; private FollowReadShareLikeRankCacheManager followReadShareLikeRankCacheManager; @Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); UtopiaCache unflushable = CacheSystem.CBS.getCache("unflushable"); parentSelfStudyBookCacheManager = new CParentSelfStudyBookCacheManager(unflushable); parentShareTextReadLimitCacheManager = new ParentShareTextReadLimitCacheManager(unflushable); studentGrindEarDayRecordCacheManager = new StudentGrindEarDayRecordCacheManager(unflushable); UtopiaCache persistence = CacheSystem.CBS.getCache("persistence"); followReadDayReadCacheManager = new FollowReadDayReadCacheManager(persistence); CacheBuilder cacheBuilder = CacheSystem.RDS.getCacheBuilder(); RedisCommandsBuilder instance = RedisCommandsBuilder.getInstance(); UtopiaCache parentAppCache = cacheBuilder.getCache("parent-app"); IRedisCommands parentAppRedisCommands = instance.getRedisCommands("parent-app"); picListenReportCacheManager = new PicListenReportCacheManager(parentAppCache, parentAppRedisCommands); followReadShareLikeRankCacheManager = new FollowReadShareLikeRankCacheManager(parentAppCache, parentAppRedisCommands); } @Override public AlpsFuture<Boolean> CParentSelfStudyBookCacheManager_setParentSeflStudyBook(Long parentId, SelfStudyType selfStudyType, String bookId) { Boolean b = parentSelfStudyBookCacheManager.setParentSeflStudyBook(parentId, selfStudyType, bookId); return new ValueWrapperFuture<>(b); } @Override public AlpsFuture<String> CParentSelfStudyBookCacheManager_getParentSelfStudyBook(Long parentId, SelfStudyType selfStudyType) { String s = parentSelfStudyBookCacheManager.getParentSelfStudyBook(parentId, selfStudyType); return new ValueWrapperFuture<>(s); } @Override public AlpsFuture<Long> ParentShareTextReadLimitCacheManager_incr(Long parentId, String paragraphId, Long delta) { Long l = parentShareTextReadLimitCacheManager.incr(parentId, paragraphId, delta); return new ValueWrapperFuture<>(l); } @Override public AlpsFuture<Long> ParentShareTextReadLimitCacheManager_get(Long parentId, String paragraphId) { Long l = parentShareTextReadLimitCacheManager.get(parentId, paragraphId); return new ValueWrapperFuture<>(l); } @Override public AlpsFuture<Boolean> StudentGrindEarDayRecordCacheManager_hasRecord(Long studentId, Date date) { Boolean b = studentGrindEarDayRecordCacheManager.hasRecord(studentId, date); return new ValueWrapperFuture<>(b); } @Override public AlpsFuture<Boolean> StudentGrindEarDayRecordCacheManager_todayRecord(Long studentId, Date date) { studentGrindEarDayRecordCacheManager.todayRecord(studentId, date); return new ValueWrapperFuture<>(true); } }
[ "wangahai@300.cn" ]
wangahai@300.cn
daa2e52bc9f1dfaeb4ad5326e6a2557cc6b81b96
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/third-party/other/external-module-0369/src/java/external_module_0369/a/Foo0.java
f4069685ba2bab25d3b1db0df775befd017a70af
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,304
java
package external_module_0369.a; import javax.net.ssl.*; import javax.rmi.ssl.*; import java.awt.datatransfer.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see javax.management.Attribute * @see javax.naming.directory.DirContext * @see javax.net.ssl.ExtendedSSLSession */ @SuppressWarnings("all") public abstract class Foo0<S> implements external_module_0369.a.IFoo0<S> { javax.rmi.ssl.SslRMIClientSocketFactory f0 = null; java.awt.datatransfer.DataFlavor f1 = null; java.beans.beancontext.BeanContext f2 = null; public S element; public static Foo0 instance; public static Foo0 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return null; } public String getName() { return element.toString(); } public void setName(String string) { return; } public S get() { return element; } public void set(Object element) { this.element = (S)element; } public S call() throws Exception { return (S)getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
5f16e9ae1b66ff001fc8d2c4ecc7bd93651e2764
d383d855e48ee2f5da65791f4052533eca339369
/src/test/java/com/alibaba/druid/bvt/filter/wall/sqlserver/SQLServerWallTest_5.java
4b5a175c71c681e6fc7baba5d8b3153297ebc5db
[ "Apache-2.0" ]
permissive
liuxing7954/druid-source
0e2dc0b1a2f498045b8689d6431764f4f4525070
fc27b5ac4695dc42e1daa62db012adda7c217d36
refs/heads/master
2022-12-21T14:53:26.923986
2020-02-29T07:15:15
2020-02-29T07:15:15
243,908,145
1
1
NOASSERTION
2022-12-16T09:54:44
2020-02-29T05:07:04
Java
UTF-8
Java
false
false
1,395
java
/* * Copyright 1999-2018 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.druid.bvt.filter.wall.sqlserver; import junit.framework.TestCase; import org.junit.Assert; import com.alibaba.druid.wall.WallProvider; import com.alibaba.druid.wall.spi.SQLServerWallProvider; /** * SQLServerWallTest * * @author RaymondXiu * @version 1.0, 2012-3-18 * @see */ public class SQLServerWallTest_5 extends TestCase { public void test_true() throws Exception { WallProvider provider = new SQLServerWallProvider(); provider.getConfig().setSelectHavingAlwayTrueCheck(true); Assert.assertFalse(provider.checkValid(// "delete t where LEN(HOST_NAME()) > 0")); Assert.assertEquals(1, provider.getTableStats().size()); Assert.assertTrue(provider.getTableStats().containsKey("t")); } }
[ "jixiaoyi@apexsoft.com.cn" ]
jixiaoyi@apexsoft.com.cn
c9e7f3232cd6e8876e57cadc365a936f7848966f
e70eb4b70b484e1f9f00019f4cbf32488f38d40d
/src/org/refactoringminer/rm2/analysis/EntityMatcher.java
c8be1d15dd70d59d0d507e63c5cc9b1234506b78
[]
no_license
MatinMan/RefactoringMiner
3d4033c53cfcbbca4a23ed0153faa8d0346f4cc5
6d2895ca96ec71394a2bff4d1b6f12eeccddc01e
refs/heads/master
2020-04-08T14:31:20.874512
2016-05-18T14:01:49
2016-05-18T14:01:49
60,316,879
1
0
null
2016-06-03T03:53:19
2016-06-03T03:53:18
null
UTF-8
Java
false
false
5,661
java
package org.refactoringminer.rm2.analysis; import java.util.ArrayList; import java.util.Collections; import org.refactoringminer.rm2.model.RelationshipType; import org.refactoringminer.rm2.model.SDEntity; import org.refactoringminer.rm2.model.SDModel; public class EntityMatcher<T extends SDEntity> { private final ArrayList<Criterion<T>> criteria = new ArrayList<Criterion<T>>(); private final ArrayList<SimilarityIndex<? super T>> similarityIndexes = new ArrayList<SimilarityIndex<? super T>>(); public EntityMatcher<T> addCriterion(Criterion<T> criterion) { this.criteria.add(criterion); return this; } public EntityMatcher<T> using(SimilarityIndex<? super T> similarity) { this.similarityIndexes.add(similarity); return this; } protected int getPriority(SDModel m, T entityBefore, T entityAfter) { return 0; } // protected double similarity(SDModel m, T entityBefore, T entityAfter) { // return entityBefore.sourceCode().similarity(entityAfter.sourceCode()); // } public void match(SDModel m, Iterable<T> unmatchedBefore, Iterable<T> unmatchedAfter) { ArrayList<MatchCandidate<T>> candidates = new ArrayList<MatchCandidate<T>>(); for (T eBefore : unmatchedBefore) { for (T eAfter : unmatchedAfter) { for (int i = 0; i < criteria.size(); i++) { Criterion<T> matcher = criteria.get(i); if (matcher.canMatch(m, eBefore, eAfter)) { double maxSim = 0.0; double averageSim = 0.0; for (SimilarityIndex<? super T> index : similarityIndexes) { double sim = index.similarity(eBefore, eAfter); averageSim += sim; maxSim = Math.max(sim, maxSim); } averageSim = averageSim / similarityIndexes.size(); if (maxSim >= matcher.threshold) { candidates.add(new MatchCandidate<T>(eBefore, eAfter, matcher, getPriority(m, eBefore, eAfter), i, averageSim)); } break; } } } } Collections.sort(candidates); for (MatchCandidate<T> candidate : candidates) { T entityBefore = candidate.before; T entityAfter = candidate.after; RelationshipType relationshipType = candidate.criterion.relationshipType; if (m.addRelationship(relationshipType, entityBefore, entityAfter, 1)) { candidate.criterion.onMatch(m, entityBefore, entityAfter); } // if (beforeMatch == null && afterMatch == null) { // } else { // if (beforeMatch == null && relationshipType.isMultisource() && afterMatch.getType() == relationshipType) { // m.addRelationship(relationshipType, true, typeBefore, typeAfter, 1); // } // if (afterMatch == null && relationshipType.isMultitarget() && beforeMatch.getType() == relationshipType) { // m.addRelationship(relationshipType, true, typeBefore, typeAfter, 1); // } // } // if (!m.isMatched(typeBefore) && !m.isMatched(typeAfter)) { // m.matchEntities(typeBefore, typeAfter); // // } } } public static class Criterion<T extends SDEntity> { private final double threshold; private final RelationshipType relationshipType; public Criterion(RelationshipType relType, double threshold) { this.relationshipType = relType; this.threshold = threshold; } public RelationshipType getRelationshipType() { return relationshipType; } protected boolean canMatch(SDModel m, T entityBefore, T entityAfter) { return true; } protected void onMatch(SDModel m, T entityBefore, T entityAfter) { // override } } private static class MatchCandidate<T extends SDEntity> implements Comparable<MatchCandidate<T>> { private final T before; private final T after; private final Criterion<T> criterion; private final int mainPriority; private final int matcherPriority; private final double contentSimilarity; public MatchCandidate(T before, T after, Criterion<T> criterion, int mainPriority, int matcherPriority, double similarity) { this.before = before; this.after = after; this.criterion = criterion; this.mainPriority = mainPriority; this.matcherPriority = matcherPriority; this.contentSimilarity = similarity; } @Override public int compareTo(MatchCandidate<T> o) { int c = Integer.compare(mainPriority, o.mainPriority); if (c != 0) return c; c = Integer.compare(matcherPriority, o.matcherPriority); if (c != 0) return c; return -Double.compare(contentSimilarity, o.contentSimilarity); } @Override public String toString() { return "b: " + before + ", a:" + after + ", sim:" + contentSimilarity; } } }
[ "danilofes@gmail.com" ]
danilofes@gmail.com
3927450f0f3702d41a084c19c35ca3b702fe1ce7
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/xalan/2.4/org/apache/xml/utils/BoolStack.java
bb8df0b620b97a18fb4c275bb4ab37bbbafb0316
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
3,578
java
package org.apache.xml.utils; import java.util.EmptyStackException; /** * <meta name="usage" content="internal"/> * Simple stack for boolean values. */ public final class BoolStack implements Cloneable { /** Array of boolean values */ private boolean m_values[]; /** Array size allocated */ private int m_allocatedSize; /** Index into the array of booleans */ private int m_index; /** * Default constructor. Note that the default * block size is very small, for small lists. */ public BoolStack() { this(32); } /** * Construct a IntVector, using the given block size. * * @param size array size to allocate */ public BoolStack(int size) { m_allocatedSize = size; m_values = new boolean[size]; m_index = -1; } /** * Get the length of the list. * * @return Current length of the list */ public final int size() { return m_index + 1; } /** * Pushes an item onto the top of this stack. * * * @param val the boolean to be pushed onto this stack. * @return the <code>item</code> argument. */ public final boolean push(boolean val) { if (m_index == m_allocatedSize - 1) grow(); return (m_values[++m_index] = val); } /** * Removes the object at the top of this stack and returns that * object as the value of this function. * * @return The object at the top of this stack. * @throws EmptyStackException if this stack is empty. */ public final boolean pop() { return m_values[m_index--]; } /** * Removes the object at the top of this stack and returns the * next object at the top as the value of this function. * * * @return Next object to the top or false if none there */ public final boolean popAndTop() { m_index--; return (m_index >= 0) ? m_values[m_index] : false; } /** * Set the item at the top of this stack * * * @param b Object to set at the top of this stack */ public final void setTop(boolean b) { m_values[m_index] = b; } /** * Looks at the object at the top of this stack without removing it * from the stack. * * @return the object at the top of this stack. * @throws EmptyStackException if this stack is empty. */ public final boolean peek() { return m_values[m_index]; } /** * Looks at the object at the top of this stack without removing it * from the stack. If the stack is empty, it returns false. * * @return the object at the top of this stack. */ public final boolean peekOrFalse() { return (m_index > -1) ? m_values[m_index] : false; } /** * Looks at the object at the top of this stack without removing it * from the stack. If the stack is empty, it returns true. * * @return the object at the top of this stack. */ public final boolean peekOrTrue() { return (m_index > -1) ? m_values[m_index] : true; } /** * Tests if this stack is empty. * * @return <code>true</code> if this stack is empty; * <code>false</code> otherwise. */ public boolean isEmpty() { return (m_index == -1); } /** * Grows the size of the stack * */ private void grow() { m_allocatedSize *= 2; boolean newVector[] = new boolean[m_allocatedSize]; System.arraycopy(m_values, 0, newVector, 0, m_index + 1); m_values = newVector; } public Object clone() throws CloneNotSupportedException { return super.clone(); } }
[ "hvdthong@github.com" ]
hvdthong@github.com
d80394857d746c4e5a045cf88e8935f4e9fe4d81
3e519985adc42b000f3888b9ba00e59bfe6ccee9
/mall_system/src/main/java/com/ningpai/system/util/StockWarnSpec.java
61a4ae910076937e0538dad8e46339901b1e3ded
[]
no_license
zhenchai/mall
8475077cf7a5fe5208510a3408502143667e9f17
c6fa070691bd62c53dbaa0b467bcb389bc66a373
refs/heads/master
2020-04-13T10:10:49.514859
2018-11-18T10:45:42
2018-11-18T10:45:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
969
java
/* * Copyright 2013 NINGPAI, Inc.All rights reserved. * NINGPAI PROPRIETARY / CONFIDENTIAL.USE is subject to licence terms. */ package com.ningpai.system.util; /** * 货品规格 * @author jiping * @since 2015年8月21日 下午7:37:54 * @version 0.0.1 */ public class StockWarnSpec { //货品的id private Long id; //货品规格 private String specname; /*货品值**/ private String specvalue; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getSpecname() { return specname; } public void setSpecname(String specname) { this.specname = specname; } public String getSpecvalue() { return specvalue; } public void setSpecvalue(String specvalue) { this.specvalue = specvalue; } }
[ "wdpxl@sina.com" ]
wdpxl@sina.com
4bf291f7ad304396d85c8909d405d7301754d236
59999d306075d381015f84b7be31cbbf2b509000
/src/main/java/designpattern/proxy/dynamicproxy/Client.java
b0dac7aa5882eb81d202a54d9e8d71b3bfdfea77
[]
no_license
LuckyShawn/studyDemo
dfee6f7bc97e2890a7db683ec22e9522eaa048d9
1c1c4f9e48d44bd50d178f4ee0371b94bd17c8da
refs/heads/master
2022-08-16T04:18:45.777236
2022-08-05T07:46:51
2022-08-05T07:46:51
164,975,245
1
0
null
2022-06-17T03:37:26
2019-01-10T02:32:18
JavaScript
UTF-8
Java
false
false
571
java
package designpattern.proxy.dynamicproxy; import java.lang.reflect.Proxy; /** * @Description 动态创建代理类调用明星唱歌方法 * @Author shawn * @create 2019/3/6 0006 */ public class Client { public static void main(String[] args){ Star star = new RealStar(); StarHandler starHandler = new StarHandler(star); //通过类加载器,明星接口,动态代理处理器 Star proxy = (Star) Proxy.newProxyInstance(ClassLoader.getSystemClassLoader(), new Class[]{Star.class}, starHandler); proxy.sing(); } }
[ "LuckyShawn@foxmail.com" ]
LuckyShawn@foxmail.com
baecc4f30815af50254f839214394a0cfcc85885
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/com/reddit/datalibrary/frontpage/service/api/UploadService$$Lambda$0.java
e8bdeb04bcffd48ec689138cbc0b73d889251f68
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
586
java
package com.reddit.datalibrary.frontpage.service.api; import java.util.concurrent.Callable; final /* synthetic */ class UploadService$$Lambda$0 implements Callable { private final UploadService arg$1; private final String arg$2; private final String arg$3; UploadService$$Lambda$0(UploadService uploadService, String str, String str2) { this.arg$1 = uploadService; this.arg$2 = str; this.arg$3 = str2; } public final Object call() { return this.arg$1.lambda$getFileUploadLease$0$UploadService(this.arg$2, this.arg$3); } }
[ "mi.arevalo10@uniandes.edu.co" ]
mi.arevalo10@uniandes.edu.co
b940e66e2eb43f2561b362490176c666a00bf233
ea6e3c324cf36d9b59a14598bb619a7a8f14329e
/addons/jobs/automatiko-jobs-api/src/main/java/io/automatiko/engine/jobs/api/Job.java
db800fc76d86528777712a284da781a8d68522a6
[ "Apache-2.0" ]
permissive
automatiko-io/automatiko-engine
9eaf3a8f5945e645ca704aa317c97c32ea4011da
af7e315d73895798b8b8bdd0fa5d7fcce64d289d
refs/heads/main
2023-08-24T21:25:17.045726
2023-08-16T08:20:56
2023-08-16T08:41:53
332,492,696
60
7
Apache-2.0
2023-09-14T00:44:40
2021-01-24T16:06:36
Java
UTF-8
Java
false
false
5,264
java
package io.automatiko.engine.jobs.api; import java.time.ZonedDateTime; import java.util.Objects; import java.util.StringJoiner; /** * Job describes the actual entity that should be scheduled and executed upon * given expiration time. The job requires following information * <ul> * <li>id - unique UUID based identifier</li> * <li>expirationTime - the time when this job should be executed</li> * <li>callbackEndpoint - the callback endpoint (http/https) that will be * invoked upon expiration</li> * </ul> * * On top of that there are additional meta data that points the job to the * owner - such as process instance. * <ul> * <li>processInstanceId - process instance that owns the job</li> * <li>rootProcessInstanceId - root process instance that the job is part of - * is owned as one of the subprocesses of the root process instance</li> * <li>processId - process id of the process instance owning the job</li> * <li>rootProcessId - root process id of the process instance that owns the * job</li> * </ul> */ public class Job { private String id; private ZonedDateTime expirationTime; private Integer priority; private String callbackEndpoint; private String processInstanceId; private String rootProcessInstanceId; private String processId; private String rootProcessId; private Long repeatInterval; private Integer repeatLimit; public Job() { } @SuppressWarnings("squid:S00107") public Job(String id, ZonedDateTime expirationTime, Integer priority, String callbackEndpoint, String processInstanceId, String rootProcessInstanceId, String processId, String rootProcessId, Long repeatInterval, Integer repeatLimit) { this.id = id; this.expirationTime = expirationTime; this.priority = priority; this.callbackEndpoint = callbackEndpoint; this.processInstanceId = processInstanceId; this.rootProcessInstanceId = rootProcessInstanceId; this.processId = processId; this.rootProcessId = rootProcessId; this.repeatInterval = repeatInterval; this.repeatLimit = repeatLimit; } public String getId() { return id; } public void setId(String id) { this.id = id; } public ZonedDateTime getExpirationTime() { return expirationTime; } public void setExpirationTime(ZonedDateTime expirationTime) { this.expirationTime = expirationTime; } public Integer getPriority() { return priority; } public void setPriority(Integer priority) { this.priority = priority; } public String getCallbackEndpoint() { return callbackEndpoint; } public void setCallbackEndpoint(String callbackEndpoint) { this.callbackEndpoint = callbackEndpoint; } public String getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootProcessInstanceId = rootProcessInstanceId; } public String getProcessId() { return processId; } public void setProcessId(String processId) { this.processId = processId; } public String getRootProcessId() { return rootProcessId; } public void setRootProcessId(String rootProcessId) { this.rootProcessId = rootProcessId; } public Long getRepeatInterval() { return repeatInterval; } public void setRepeatInterval(Long repeatInterval) { this.repeatInterval = repeatInterval; } public Integer getRepeatLimit() { return repeatLimit; } public void setRepeatLimit(Integer repeatLimit) { this.repeatLimit = repeatLimit; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Job)) { return false; } Job job = (Job) o; return Objects.equals(getId(), job.getId()) && Objects.equals(getExpirationTime(), job.getExpirationTime()) && Objects.equals(getPriority(), job.getPriority()) && Objects.equals(getCallbackEndpoint(), job.getCallbackEndpoint()) && Objects.equals(getProcessInstanceId(), job.getProcessInstanceId()) && Objects.equals(getRootProcessInstanceId(), job.getRootProcessInstanceId()) && Objects.equals(getProcessId(), job.getProcessId()) && Objects.equals(getRootProcessId(), job.getRootProcessId()) && Objects.equals(getRepeatLimit(), job.getRepeatLimit()) && Objects.equals(getRepeatInterval(), job.getRepeatInterval()); } @Override public int hashCode() { return Objects.hash(getId(), getExpirationTime(), getPriority(), getCallbackEndpoint(), getProcessInstanceId(), getRootProcessInstanceId(), getProcessId(), getRootProcessId(), getRepeatLimit(), getRepeatInterval()); } @Override public String toString() { return new StringJoiner(", ", Job.class.getSimpleName() + "[", "]").add("id='" + id + "'") .add("expirationTime=" + expirationTime).add("priority=" + priority) .add("callbackEndpoint='" + callbackEndpoint + "'").add("processInstanceId='" + processInstanceId + "'") .add("rootProcessInstanceId='" + rootProcessInstanceId + "'").add("processId='" + processId + "'") .add("rootProcessId='" + rootProcessId + "'").add("repeatInterval=" + repeatInterval) .add("repeatLimit=" + repeatLimit).toString(); } }
[ "swiderski.maciej@gmail.com" ]
swiderski.maciej@gmail.com
51fb3e2f8341bff321d0fdfac68eea655b28b51c
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
/database/src/main/java/adila/db/fji13_isw13f.java
e5f7ea43ce35c8609fef13817eee53e970826d31
[ "MIT" ]
permissive
karim/adila
8b0b6ba56d83f3f29f6354a2964377e6197761c4
00f262f6d5352b9d535ae54a2023e4a807449faa
refs/heads/master
2021-01-18T22:52:51.508129
2016-11-13T13:08:04
2016-11-13T13:08:04
45,054,909
3
1
null
null
null
null
UTF-8
Java
false
false
227
java
// This file is automatically generated. package adila.db; /* * Fujitsu ARROWS Z ISW13F * * DEVICE: FJI13 * MODEL: ISW13F */ final class fji13_isw13f { public static final String DATA = "Fujitsu|ARROWS Z ISW13F|"; }
[ "keldeeb@gmail.com" ]
keldeeb@gmail.com
43ec633598eeb96cf6746623f2612e7260f12e78
94d0ae644f53f76dabf71d6c29e2b5dfe7698a11
/luban-portal/src/main/java/com/luban/portal/component/trade/alipay/model/hb/PosTradeInfo.java
d97eac933daf7e91fe1d370c94a4d0590d008df3
[]
no_license
Amselx/mall-dcs
c71576c87285c663b08e62647d08c974e3fb6598
3a06d9f4a12dcf736112b38b69d523d3746af1b5
refs/heads/master
2023-05-03T01:54:26.068740
2021-05-14T01:28:39
2021-05-14T01:28:39
367,217,183
0
0
null
null
null
null
UTF-8
Java
false
false
1,326
java
package com.luban.portal.component.trade.alipay.model.hb; public class PosTradeInfo implements TradeInfo { private HbStatus status; private String time; private int timeConsume; private PosTradeInfo() { // no public constructor. } public static PosTradeInfo newInstance(HbStatus status, String time, int timeConsume) { PosTradeInfo info = new PosTradeInfo(); if (timeConsume > 99 || timeConsume < 0) { timeConsume = 99; } info.setTimeConsume(timeConsume); info.setStatus(status); info.setTime(time); return info; } @Override public String toString() { return new StringBuilder(status.name()) .append(time) .append(String.format("%02d", timeConsume)) .toString(); } @Override public HbStatus getStatus() { return status; } public void setStatus(HbStatus status) { this.status = status; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } @Override public double getTimeConsume() { return (double) timeConsume; } public void setTimeConsume(int timeConsume) { this.timeConsume = timeConsume; } }
[ "123" ]
123
4e2f71ff2ced4e4ad47d526689d8c0e32d075d0c
75a8892e4be8c81cbebc07153d53ccc379528287
/capitulo2/Exemplo_DoWhile.java
830e542fe7ff2f018fdb28f1820068bffeabdc55
[]
no_license
lfbessegato/Estudos-Java
da2d50c5965eae6b804306fef0457885341f7ac1
d358a777feb967147c125bf10cf302a1e9b96e43
refs/heads/master
2020-08-07T02:04:22.877913
2019-10-06T22:26:50
2019-10-06T22:26:50
213,252,991
1
0
null
null
null
null
UTF-8
Java
false
false
518
java
package course.capitulo2; import java.util.Locale; import java.util.Scanner; public class Exemplo_DoWhile { public static void main(String[] args) { Locale.setDefault(Locale.US); Scanner sc = new Scanner(System.in); char resp; do { System.out.print("Enter a number: "); double n = sc.nextDouble(); double sq = Math.sqrt(n); System.out.printf("Square root = %.3f%n", sq); System.out.print("Repeat <y/n>? "); resp = sc.next().charAt(0); } while (resp != 'n'); sc.close(); } }
[ "lfrbessegato@gmail.com" ]
lfrbessegato@gmail.com
371dd4d0392310ecedce2389450eb03fecb57be9
1c9589d4e3bc1523ba1e745a2155433e4bd4b85c
/src/com/javarush/test/level10/lesson04/task05/Solution.java
65d1ca4c267fdc63bf615f74247dda52da99e72b
[]
no_license
Adeptius/JavaRushHomeWork
230a7dfd48b063bf7e62d5b50e7fc3f4b529fc0a
ee587724a7d579463d5deb5211b8e2f4bf902fdb
refs/heads/master
2020-05-22T06:42:56.780076
2019-09-12T15:43:25
2019-09-12T15:43:25
65,140,116
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
package com.javarush.test.level10.lesson04.task05; /* Задача №5 на преобразование целых типов Расставьте правильно операторы приведения типа, чтобы получился ответ: c=256 int a = (byte)44; int b = (byte)300; short c = (byte)(b - a); */ public class Solution { public static void main(String[] args) { int a = (byte)44; int b = 300; short c = (short) (b - a); System.out.println(c); } }
[ "adeptius@gmail.com" ]
adeptius@gmail.com
c5d2b3931e9d3c8c048d667ff938add103f0a94c
9186ed673d998368c715bd95accd02cda4880342
/src/main/java/org/gwtproject/event/dom/client/ScrollEvent.java
3ff31731f6d03926d958ff20c38468ce389f3555
[ "Apache-2.0" ]
permissive
TDesjardins/gwt-event-dom
82056f5fa6582f8cb853705416953dec2c8fb468
d86b8762218335ee0f56308d6d95a969df872e86
refs/heads/master
2020-11-30T16:39:48.863625
2019-10-17T20:09:07
2019-10-17T20:09:07
230,444,381
0
0
Apache-2.0
2019-12-27T12:57:58
2019-12-27T12:57:58
null
UTF-8
Java
false
false
1,579
java
/* * Copyright 2018 The GWT Project Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.gwtproject.event.dom.client; import org.gwtproject.dom.client.BrowserEvents; /** Represents a native scroll event. */ public class ScrollEvent extends DomEvent<ScrollHandler> { /** Event type for scroll events. Represents the meta-data associated with this event. */ private static final Type<ScrollHandler> TYPE = new Type<>(BrowserEvents.SCROLL, new ScrollEvent()); /** * Protected constructor, use {@link * DomEvent#fireNativeEvent(org.gwtproject.dom.client.NativeEvent, * org.gwtproject.event.shared.HasHandlers)} to fire scroll events. */ protected ScrollEvent() {} /** * Gets the event type associated with scroll events. * * @return the handler type */ public static Type<ScrollHandler> getType() { return TYPE; } @Override public final Type<ScrollHandler> getAssociatedType() { return TYPE; } @Override protected void dispatch(ScrollHandler handler) { handler.onScroll(this); } }
[ "frank.hossfeld@googlemail.com" ]
frank.hossfeld@googlemail.com