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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
41c9c821b62b04c83eda823661c118d8de0ed364 | 24fec8593856302f73cc1463e96532b67c3d6a4d | /mcp/temp/src/minecraft/net/minecraft/inventory/InventoryBasic.java | 58198dc8901d4f904137131b7ebaab8d0fa894f6 | [
"BSD-3-Clause"
] | permissive | theorbtwo/visual-sound | 3cf8fc540728c334e66a39fdf921038c37db2cba | af76f171eddf6759097ea3445a55f18cdf4a86af | refs/heads/master | 2021-01-23T11:48:03.750673 | 2013-06-20T17:20:08 | 2013-06-20T17:20:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,934 | java | package net.minecraft.inventory;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInvBasic;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
public class InventoryBasic implements IInventory {
private String field_70483_a;
private int field_70481_b;
private ItemStack[] field_70482_c;
private List field_70480_d;
private boolean field_94051_e;
public InventoryBasic(String p_i9018_1_, boolean p_i9018_2_, int p_i9018_3_) {
this.field_70483_a = p_i9018_1_;
this.field_94051_e = p_i9018_2_;
this.field_70481_b = p_i9018_3_;
this.field_70482_c = new ItemStack[p_i9018_3_];
}
public ItemStack func_70301_a(int p_70301_1_) {
return this.field_70482_c[p_70301_1_];
}
public ItemStack func_70298_a(int p_70298_1_, int p_70298_2_) {
if(this.field_70482_c[p_70298_1_] != null) {
ItemStack var3;
if(this.field_70482_c[p_70298_1_].field_77994_a <= p_70298_2_) {
var3 = this.field_70482_c[p_70298_1_];
this.field_70482_c[p_70298_1_] = null;
this.func_70296_d();
return var3;
} else {
var3 = this.field_70482_c[p_70298_1_].func_77979_a(p_70298_2_);
if(this.field_70482_c[p_70298_1_].field_77994_a == 0) {
this.field_70482_c[p_70298_1_] = null;
}
this.func_70296_d();
return var3;
}
} else {
return null;
}
}
public ItemStack func_70304_b(int p_70304_1_) {
if(this.field_70482_c[p_70304_1_] != null) {
ItemStack var2 = this.field_70482_c[p_70304_1_];
this.field_70482_c[p_70304_1_] = null;
return var2;
} else {
return null;
}
}
public void func_70299_a(int p_70299_1_, ItemStack p_70299_2_) {
this.field_70482_c[p_70299_1_] = p_70299_2_;
if(p_70299_2_ != null && p_70299_2_.field_77994_a > this.func_70297_j_()) {
p_70299_2_.field_77994_a = this.func_70297_j_();
}
this.func_70296_d();
}
public int func_70302_i_() {
return this.field_70481_b;
}
public String func_70303_b() {
return this.field_70483_a;
}
public boolean func_94042_c() {
return this.field_94051_e;
}
public int func_70297_j_() {
return 64;
}
public void func_70296_d() {
if(this.field_70480_d != null) {
for(int var1 = 0; var1 < this.field_70480_d.size(); ++var1) {
((IInvBasic)this.field_70480_d.get(var1)).func_76316_a(this);
}
}
}
public boolean func_70300_a(EntityPlayer p_70300_1_) {
return true;
}
public void func_70295_k_() {}
public void func_70305_f() {}
public boolean func_94041_b(int p_94041_1_, ItemStack p_94041_2_) {
return true;
}
}
| [
"james@mastros.biz"
] | james@mastros.biz |
229bbe4e841278a55b25e74a17eeead4296c1616 | 52b948436b826df8164565ffe69e73a92eb92cda | /Tests/RGTTests/bears/patches/SzFMV2018-Tavasz-AutomatedCar_351742666-351759763/Arja/241/patch/Dashboard.java | eee4fb5509dfe4b4ebfae815bcc30c65f25725fa | [] | no_license | tdurieux/ODSExperiment | 910365f1388bc684e9916f46f407d36226a2b70b | 3881ef06d6b8d5efb751860811def973cb0220eb | refs/heads/main | 2023-07-05T21:30:30.099605 | 2021-08-18T15:56:56 | 2021-08-18T15:56:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,844 | java | package hu.oe.nik.szfmv.visualization;
import hu.oe.nik.szfmv.automatedcar.bus.packets.input.ReadOnlyInputPacket;
import javax.swing.*;
import java.awt.*;
/**
* Dashboard shows the state of the ego car, thus helps in debugging.
*/
public class Dashboard extends JPanel {
private final int width = 250;
private final int height = 700;
private final int dashboardBoundsX = 770;
private final int dashboardBoundsY = 0;
private final int backgroundColor = 0x888888;
private final int progressBarsPanelX = 25;
private final int progressBarsPanelY = 400;
private final int progressBarsPanelWidth = 200;
private final int progressBarsPanelHeight = 100;
private final JPanel progressBarsPanel = new JPanel();
private final JLabel gasLabel = new JLabel();
private final JProgressBar gasProgressBar = new JProgressBar();
private final JLabel breakLabel = new JLabel();
private final JProgressBar breakProgressBar = new JProgressBar();
private final int speedMeterX = 10;
private final int speedMeterY = 50;
private final int tachoMeterX = 130;
private final int tachoMeterY = 50;
private final int meterHeight = 100;
private final int meterWidth = 100;
private int speedAngle;
private int rpmAngle;
/**
* Initialize the dashboard
*/
public Dashboard() {
initializeDashboard();
}
/**
* Update the displayed values
* @param inputPacket Contains all the required values coming from input.
*/
public void updateDisplayedValues(ReadOnlyInputPacket inputPacket) {
gasProgressBar.setValue(inputPacket.getGasPedalPosition());
breakProgressBar.setValue(inputPacket.getBreakPedalPosition());
speedAngle = calculateSpeedometer(0);
rpmAngle = calculateTachometer(0);
}
/**
* Initializes the dashboard components
*/
private void initializeDashboard() {
// Not using any layout manager, but fixed coordinates
setLayout(null);
setBackground(new Color(backgroundColor));
setBounds(dashboardBoundsX, dashboardBoundsY, width, height);
initializeProgressBars();
}
/**
* Initializes the progress bars on the dashboard
*/
private void initializeProgressBars() {
progressBarsPanel.setBackground(new Color(backgroundColor));
progressBarsPanel.setBounds(
progressBarsPanelX,
progressBarsPanelY,
progressBarsPanelWidth,
progressBarsPanelHeight);
gasLabel.setText("gas pedal");
breakLabel.setText("break pedal");
gasProgressBar.setStringPainted(true);
breakProgressBar.setStringPainted(true);
add(progressBarsPanel);
progressBarsPanel.add(gasLabel);
progressBarsPanel.add(gasProgressBar);
progressBarsPanel.add(breakLabel);
progressBarsPanel.add(breakProgressBar);
}
/**
* Drawing the Speedometer and the Tachometer.
*
* @param g {@link Graphics} object that can draw to the canvas
*/
protected void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(Color.BLACK);
g.drawOval(speedMeterX, speedMeterY, meterWidth, meterHeight);
g.drawOval(tachoMeterX, tachoMeterY, meterWidth, meterHeight);
g.setColor(Color.RED);
g.fillArc(speedMeterX, speedMeterY, meterWidth, meterHeight, speedAngle, 2);
g.fillArc(tachoMeterX, tachoMeterY, meterWidth, meterHeight, rpmAngle, 2);
}
/**
* Map the RPM to a displayable value for the gauge.
*
* @param rpm The unmapped input value of the Tachometer's visual display.
*
* @return The mapped value between [-75, 255] interval.
*/
private int calculateTachometer(int rpm) {
final int minRpmValue = 0;
breakLabel.setText("break pedal");
final int maxRpmValue = 10000;
final int minRpmMeter = -75;
final int maxRpmMeter = 255;
int newrpm = maxRpmValue - rpm;
return (newrpm - minRpmValue) * (maxRpmMeter - minRpmMeter) / (maxRpmValue - minRpmValue) + minRpmMeter;
}
/**
* Map the Speed to a displayable value for the gauge.
*
* @param speed The unmapped input value of the Speedometer's visual display.
*
* @return The mapped value between [-75, 255] interval.
*/
private int calculateSpeedometer(int speed) {
final int minSpeedValue = 0;
final int maxSpeedValue = 500;
final int minSpeedMeter = -75;
final int maxSpeedMeter = 255;
int newspeed = maxSpeedValue - speed;
return (newspeed - minSpeedValue) * (maxSpeedMeter - minSpeedMeter)
/ (maxSpeedValue - minSpeedValue) + minSpeedMeter;
}
}
| [
"he_ye_90s@hotmail.com"
] | he_ye_90s@hotmail.com |
55b9db77b07fd33036db3bc467a294a0dd647998 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /single-large-project/src/main/java/org/gradle/test/performancenull_365/Productionnull_36497.java | 487be40701025cec382a5945f4ee9c28e4f93898 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 588 | java | package org.gradle.test.performancenull_365;
public class Productionnull_36497 {
private final String property;
public Productionnull_36497(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
e528f5d4f3bea444d94c6ffec8ad205768955104 | f69314e1d04f5d3e7d5ed7c843f223908e7bdd02 | /src/Resources/Encapsulations_Test.java | d11c7db4dd6df64afca503307a9fb5079f00b244 | [] | no_license | elifturan/Spring2020B18_Java | a7f8be6f4a48166a19739632e3109412ec5d260d | 3026d10775c026bf5f81e5f9645379bd39007e56 | refs/heads/master | 2022-11-10T16:43:52.046417 | 2020-06-29T19:42:45 | 2020-06-29T19:42:45 | 281,134,822 | 1 | 0 | null | 2020-07-20T14:11:17 | 2020-07-20T14:11:17 | null | UTF-8 | Java | false | false | 460 | java | package Resources;
import day40_Encapsulation.Encapsulation;
public class Encapsulations_Test {
public static void main(String[] args) {
Encapsulation obj = new Encapsulation();
// Encapsulations_Test obj2 = new Encapsulations_Test();
// obj2.SSN =1000;
// System.out.println( obj.SSN );
System.out.println( obj.getSSN() ); //0
obj.setSSN(123);
System.out.println( obj.getSSN() );
}
}
| [
"github@cybertekschool.com"
] | github@cybertekschool.com |
b12658e7f6942d9dbc16e46d48ed6a025084ec14 | 5597d65a8476ad8fef6fe3621823e475baa5539d | /app/src/main/java/com/app/elixir/brewz_rock_cafe/utils/CircularTextView.java | df2a47dafc46419a3e433669b8b7254ecf17e475 | [] | no_license | Ravikumawat1990/Brewz_Rock_Cafe | 970ee2bf0eb418c11f35d98a241c66a7845d4441 | 2eb98262b951fe40b27d7e59d389f803b2c7f96e | refs/heads/master | 2020-12-02T22:04:15.865255 | 2017-07-03T06:16:45 | 2017-07-03T06:16:45 | 96,076,244 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,836 | java | package com.app.elixir.brewz_rock_cafe.utils;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.TextView;
/**
* Created by Elixir on 12-Aug-2016.
*/
public class CircularTextView extends TextView
{
private float strokeWidth;
int strokeColor,solidColor;
public CircularTextView(Context context) {
super(context);
}
public CircularTextView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public CircularTextView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public void draw(Canvas canvas) {
Paint circlePaint = new Paint();
circlePaint.setColor(solidColor);
circlePaint.setFlags(Paint.ANTI_ALIAS_FLAG);
Paint strokePaint = new Paint();
strokePaint.setColor(strokeColor);
strokePaint.setFlags(Paint.ANTI_ALIAS_FLAG);
int h = this.getHeight();
int w = this.getWidth();
int diameter = ((h > w) ? h : w);
int radius = diameter/2;
this.setHeight(diameter);
this.setWidth(diameter);
canvas.drawCircle(diameter / 2 , diameter / 2, radius, strokePaint);
canvas.drawCircle(diameter / 2, diameter / 2, radius-strokeWidth, circlePaint);
super.draw(canvas);
}
public void setStrokeWidth(int dp)
{
float scale = getContext().getResources().getDisplayMetrics().density;
strokeWidth = dp*scale;
}
public void setStrokeColor(String color)
{
strokeColor = Color.parseColor(color);
}
public void setSolidColor(String color)
{
solidColor = Color.parseColor(color);
}
} | [
"kravi@elixirinfo.com"
] | kravi@elixirinfo.com |
b3fcf55906650ce160bb1dc02a811d730f143057 | a91c1012c7b0057e81a4bd0c701f760d7f9f48ce | /src/polyglot/translate/ext/BranchToExt_c.java | f553776ce1bd5364abe7736f6587fbe27f3faf91 | [] | no_license | pl-eco/CSNewDesign | 20dfaa37157ee5e36c6dda35beafda048d6dc5c9 | e92e7ed4a3d157d73c79de24b1520af28609f3d5 | refs/heads/master | 2021-01-18T14:22:40.497953 | 2014-08-26T04:58:08 | 2014-08-26T04:58:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 421 | java | package polyglot.translate.ext;
import polyglot.ast.Branch;
import polyglot.ast.Node;
import polyglot.translate.ExtensionRewriter;
import polyglot.types.SemanticException;
public class BranchToExt_c extends ToExt_c {
@Override
public Node toExt(ExtensionRewriter rw) throws SemanticException {
Branch n = (Branch) node();
return rw.to_nf().Branch(n.position(), n.kind(), n.labelNode());
}
}
| [
"Zhuht.dm@gmail.com"
] | Zhuht.dm@gmail.com |
aeb2ccaafc91603ddb9a73a7af0558d8eb8e1453 | cde96a127091b580e9095f796f0e0f68825d847d | /Solace Client/net/minecraft/src/ICrafting.java | e1e3a24251c2301058e4e29c53dfa35d38c592d2 | [] | no_license | MobbyGFX96/Solace | f4afd48cb3fa42c0b376f0b27f2bacbfc0c34b5d | 76c7fb5306431a9c93215d27cefce00607e7364e | refs/heads/master | 2021-01-18T15:22:07.592385 | 2013-04-17T01:02:01 | 2013-04-17T01:02:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 835 | java | package net.minecraft.src;
import java.util.List;
public interface ICrafting {
void sendContainerAndContentsToPlayer(Container var1, List var2);
/**
* Sends the contents of an inventory slot to the client-side Container. This doesn't have to match the actual
* contents of that slot. Args: Container, slot number, slot contents
*/
void sendSlotContents(Container var1, int var2, ItemStack var3);
/**
* Sends two ints to the client-side Container. Used for furnace burning time, smelting progress, brewing progress,
* and enchanting level. Normally the first int identifies which variable to update, and the second contains the new
* value. Both are truncated to shorts in non-local SMP.
*/
void sendProgressBarUpdate(Container var1, int var2, int var3);
}
| [
"MobbyGFX96@hotmail.co.uk"
] | MobbyGFX96@hotmail.co.uk |
c7efbacfef4a200b463f4f88dafe9b35e6b4896c | 1d5ab8ee741f4d28370db12f1e725ddcfb14ae29 | /garden/livetribe-slp/tags/2.1.0/core/src/test/java/org/livetribe/slp/spi/msg/AttributeListExtensionTest.java | c990cf972196df04dfa445ec0a91755621ece9d9 | [
"Apache-2.0"
] | permissive | codehaus/livetribe | 5dfec6bef4c5a5687ed8edc5a8e80e1622a41f7a | 9742f427717f321d7a2101d5f62f4394b00a0362 | refs/heads/master | 2023-07-20T01:31:46.001231 | 2011-06-23T07:35:06 | 2011-06-23T07:35:06 | 36,526,523 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,541 | java | /*
* Copyright 2006-2008 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.livetribe.slp.spi.msg;
import org.livetribe.slp.Attributes;
import org.testng.annotations.Test;
/**
* @version $Rev: 157 $ $Date: 2006-06-05 23:29:25 +0200 (Mon, 05 Jun 2006) $
*/
public class AttributeListExtensionTest
{
@Test
public void testAttributeListExtension() throws Exception
{
AttributeListExtension original = new AttributeListExtension();
original.setURL("service:foo:bar://baz");
Attributes originalAttributes = Attributes.from("(attr=value)");
original.setAttributes(originalAttributes);
// TODO: test auth blocks
byte[] bytes = original.serialize();
AttributeListExtension deserialized = (AttributeListExtension)Extension.deserialize(bytes);
assert original.getURL().equals(deserialized.getURL());
assert originalAttributes.equals(deserialized.getAttributes());
// TODO: test auth blocks
}
}
| [
"maguro@6db1a190-aa03-0410-869d-8543fcd43261"
] | maguro@6db1a190-aa03-0410-869d-8543fcd43261 |
e3acb84002629cc98fff49568300f87cf1dd7815 | 2c47ddc21791d091509d89c6534a83f547beeb7b | /src/main/java/net/openhft/chronicle/wire/RawText.java | 9063711d0e156c2248b99a7bbe7d25fc35dca537 | [
"Apache-2.0"
] | permissive | alexdcarl/Chronicle-Wire | 1382cae53e818fa6dd76f5c12c09c47b4de509cb | c1bf9c556faf2fcaf0e319680c06f19873c046f6 | refs/heads/master | 2020-06-14T04:43:53.612312 | 2019-06-26T04:25:36 | 2019-06-26T04:25:36 | 194,903,410 | 1 | 0 | NOASSERTION | 2019-07-02T17:02:10 | 2019-07-02T17:02:10 | null | UTF-8 | Java | false | false | 156 | java | package net.openhft.chronicle.wire;
class RawText {
String text;
public RawText(CharSequence text) {
this.text = text.toString();
}
}
| [
"peter.lawrey@higherfrequencytrading.com"
] | peter.lawrey@higherfrequencytrading.com |
d795fe5e73f10ab42a372a366bda0f43bba5d707 | 1ce518b09521578e26e79a1beef350e7485ced8c | /source/app/src/main/java/com/google/mygson/internal/b.java | 080129e8de0c87ccb46ba2750778918752338ac5 | [] | no_license | yash2710/AndroidStudioProjects | 7180eb25e0f83d3f14db2713cd46cd89e927db20 | e8ba4f5c00664f9084f6154f69f314c374551e51 | refs/heads/master | 2021-01-10T01:15:07.615329 | 2016-04-03T09:19:01 | 2016-04-03T09:19:01 | 55,338,306 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,673 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.mygson.internal;
import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Arrays;
final class b
implements Serializable, ParameterizedType
{
private final Type a;
private final Type b;
private final Type c[];
public transient b(Type type, Type type1, Type atype[])
{
boolean flag = true;
int i = 0;
super();
Type type2;
if (type1 instanceof Class)
{
Class class1 = (Class)type1;
boolean flag1;
if (type != null || class1.getEnclosingClass() == null)
{
flag1 = flag;
} else
{
flag1 = false;
}
.Gson.Preconditions.checkArgument(flag1);
if (type != null && class1.getEnclosingClass() == null)
{
flag = false;
}
.Gson.Preconditions.checkArgument(flag);
}
if (type == null)
{
type2 = null;
} else
{
type2 = .Gson.Types.canonicalize(type);
}
a = type2;
b = .Gson.Types.canonicalize(type1);
for (c = (Type[])atype.clone(); i < c.length; i++)
{
.Gson.Preconditions.checkNotNull(c[i]);
.Gson.Types.a(c[i]);
c[i] = .Gson.Types.canonicalize(c[i]);
}
}
public final boolean equals(Object obj)
{
return (obj instanceof ParameterizedType) && .Gson.Types.equals(this, (ParameterizedType)obj);
}
public final Type[] getActualTypeArguments()
{
return (Type[])c.clone();
}
public final Type getOwnerType()
{
return a;
}
public final Type getRawType()
{
return b;
}
public final int hashCode()
{
return Arrays.hashCode(c) ^ b.hashCode() ^ .Gson.Types.a(a);
}
public final String toString()
{
StringBuilder stringbuilder = new StringBuilder(30 * (1 + c.length));
stringbuilder.append(.Gson.Types.typeToString(b));
if (c.length == 0)
{
return stringbuilder.toString();
}
stringbuilder.append("<").append(.Gson.Types.typeToString(c[0]));
for (int i = 1; i < c.length; i++)
{
stringbuilder.append(", ").append(.Gson.Types.typeToString(c[i]));
}
return stringbuilder.append(">").toString();
}
}
| [
"13bce123@nirmauni.ac.in"
] | 13bce123@nirmauni.ac.in |
cd66560345e5718cda3c10fbff78781669862d42 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/30/30_651728c9e2f37295329d3b44feb3db5e05e72514/ServiceFallbackIteration/30_651728c9e2f37295329d3b44feb3db5e05e72514_ServiceFallbackIteration_t.java | 1dc428a98f46a791f4a798103bba08e36556d2fc | [] | 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 | 3,480 | java | /*
* Licensed to Aduna under one or more contributor license agreements.
* See the NOTICE.txt file distributed with this work for additional
* information regarding copyright ownership.
*
* Aduna licenses this file to you under the terms of the Aduna BSD
* License (the "License"); you may not use this file except in compliance
* with the License. See the LICENSE.txt file distributed with this work
* for the full License.
*
* 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.openrdf.query.algebra.evaluation.federation;
import java.util.Collection;
import info.aduna.iteration.CloseableIteration;
import info.aduna.iteration.SingletonIteration;
import org.openrdf.query.BindingSet;
import org.openrdf.query.QueryEvaluationException;
import org.openrdf.query.algebra.Service;
import org.openrdf.query.algebra.evaluation.federation.FederatedService.QueryType;
import org.openrdf.query.algebra.evaluation.iterator.SilentIteration;
import org.openrdf.query.impl.EmptyBindingSet;
/**
* Fallback join handler, if the block join can not be performed, e.g. because
* the BINDINGS clause is not supported by the endpoint. Gets a materialized
* collection of bindings as input, and has to evaluate the join.
*
* @author Andreas Schwarte
*/
public class ServiceFallbackIteration extends JoinExecutorBase<BindingSet> {
protected final Service service;
protected final String preparedQuery;
protected final FederatedService federatedService;
protected final Collection<BindingSet> bindings;
public ServiceFallbackIteration(Service service, String preparedQuery, Collection<BindingSet> bindings,
FederatedService federatedService)
throws QueryEvaluationException
{
super(null, null, EmptyBindingSet.getInstance());
this.service = service;
this.preparedQuery = preparedQuery;
this.bindings = bindings;
this.federatedService = federatedService;
run();
}
@Override
protected void handleBindings()
throws Exception
{
// NOTE: we do not have to care about SILENT services, as this
// iteration by itself is wrapped in a silentiteration
// handle each prepared query individually and add the result to this
// iteration
for (BindingSet b : bindings) {
try {
CloseableIteration<BindingSet, QueryEvaluationException> result = federatedService.evaluate(
preparedQuery, b, service.getBaseURI(), QueryType.SELECT, service);
result = service.isSilent() ? new SilentIteration(result) : result;
addResult(result);
}
catch (QueryEvaluationException e) {
// suppress exceptions if silent
if (service.isSilent()) {
addResult(new SingletonIteration<BindingSet, QueryEvaluationException>(b));
} else {
throw e;
}
}
catch (RuntimeException e) {
// suppress special exceptions (e.g. UndeclaredThrowable with wrapped
// QueryEval) if silent
if (service.isSilent()) {
addResult(new SingletonIteration<BindingSet, QueryEvaluationException>(b));
}
else {
throw e;
}
}
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
61a35b11021004c005373c9606e3114d963236b7 | c19be92e400cc19979920db0cde5846766841b27 | /com/divergent/generic/GenericUsed7.java | 5611ba5664c1c63d61bcde1d54ba0b05f16e5bf9 | [] | no_license | prateekpatel-divergent/lambda-generic-multithreadingpractice | ee29cc4be475c57ba9949f76a4de3b90fe9f104f | 3e8c092be433321a35a3ba0f65ba9ea8df5db00b | refs/heads/master | 2023-04-05T19:08:32.755694 | 2021-04-20T04:21:15 | 2021-04-20T04:21:15 | 359,681,953 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 597 | java | package com.divergent.generic;
import java.util.ArrayList;
import java.util.List;
public class GenericUsed7 {
private static Double add(List<? extends Number> num) {
double sum = 0.0;
for(Number number : num) {
sum = sum + number.doubleValue();
}
return sum;
}
public static void main(String[] args) {
List<Integer> list = new ArrayList<>();
list.add(10);
list.add(20);
System.out.println("displaying the sum : "+add(list));
List<Double> list1 = new ArrayList<>();
list1.add(30.0);
list1.add(40.0);
System.out.println("Displaying the sum : "+add(list1));
}
}
| [
"prateek.patel@divergentsl.com"
] | prateek.patel@divergentsl.com |
91492bcb89a5cdb4d019c97f3e9137bb35402997 | 6c07762b53597858e243d9f5d3449ecbaf5dc801 | /UBL2.1/src/oasis/names/specification/ubl/schema/xsd/commonbasiccomponents_2/ActualDespatchTimeType.java | 465861318f369d1830c4176602d929f9b34c82d4 | [] | no_license | edwinrjrc/RHCProy2.1 | 9823806a62bb754a870cd7f5fa84d1bc482fbde2 | 4aa28e21f0d499a71f18bb8d1b2b06a3a5bef22a | refs/heads/master | 2020-03-28T22:19:08.113338 | 2019-06-23T04:36:52 | 2019-06-23T04:36:52 | 149,223,588 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Java | false | false | 1,335 | java | //
// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802
// Visite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen.
// Generado el: 2018.09.09 a las 12:31:18 PM COT
//
package oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import oasis.names.specification.ubl.schema.xsd.unqualifieddatatypes_2.TimeType;
/**
* <p>Clase Java para ActualDespatchTimeType complex type.
*
* <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
*
* <pre>
* <complexType name="ActualDespatchTimeType">
* <simpleContent>
* <extension base="<urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2>TimeType">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ActualDespatchTimeType")
public class ActualDespatchTimeType
extends TimeType
{
}
| [
"edwinrjrc@gmail.com"
] | edwinrjrc@gmail.com |
e956aec0d9e5fffce3ce2339b2ebfd4b500fbd4e | 0b2a63566e2e6090a3b0726a77409351bb48eb64 | /GYproject-biz-base/src/main/java/cc/dfsoft/project/biz/base/inspection/dto/PressureQueryReq.java | 078ae547367729f59e10768dd5ab96e27d96dc8d | [] | no_license | zhangnengxian/GYPROJECT | 5f7eda062430beb8046943d4fa73da1b1f55a172 | 673471b661a88370137028056b0a5191de6fcec2 | refs/heads/master | 2021-08-17T05:48:20.815738 | 2020-12-08T10:01:06 | 2020-12-08T10:01:06 | 231,201,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 365 | java | package cc.dfsoft.project.biz.base.inspection.dto;
import cc.dfsoft.uexpress.common.dto.PageSortReq;
/**
* 试压记录查询dto
* @author Administrator
*
*/
public class PressureQueryReq extends PageSortReq{
private String pcId;//工程报验单id
public String getPcId() {
return pcId;
}
public void setPcId(String pcId) {
this.pcId = pcId;
}
}
| [
"1655658911@qq.com"
] | 1655658911@qq.com |
cc552220c3f65066e0c089d49514203dd382b191 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/orientechnologies--orientdb/fdfe7807f885c8897c29246004c02d186e8cd888/after/OEmbeddedDatabaseInstanceFactory.java | 7cb2e78eb2086caa0b4a8f92266bcb2ab9a5c059 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 434 | java | package com.orientechnologies.orient.core.db;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded;
import com.orientechnologies.orient.core.storage.OStorage;
/**
* Created by tglman on 30/03/17.
*/
public interface OEmbeddedDatabaseInstanceFactory {
ODatabaseDocumentEmbedded newInstance(OStorage storage);
ODatabaseDocumentEmbedded newPoolInstance(ODatabasePoolInternal pool, OStorage storage);
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
e8db15f93196e08c5633766f28ab905fc30aff8b | 5f4afbc92a72bd847b8aa9ae95f9be9d706ad7d8 | /esuizhen-service/esuizhen-research-system/src/main/java/com/esuizhen/cloudservice/research/service/result/DoctorService.java | 14e7097d57c5cdd988247baa4639a684143177fc | [] | no_license | 331491512/esz | dfc13ba9e142ab1cbacc92cd0bf1b55fec2a05a1 | 8edd10a74b75d36d3963d2ae64602d02ba548b43 | refs/heads/master | 2021-04-06T20:31:45.968785 | 2018-03-16T02:56:36 | 2018-03-16T02:56:36 | 125,451,748 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,204 | java | package com.esuizhen.cloudservice.research.service.result;
import com.esuizhen.cloudservice.research.bean.TProjectSubcenterDetailInfo;
import com.westangel.common.bean.Doctor;
import com.westangel.common.excption.ParameterCannotBeNullException;
/**
* <p>Title:DoctorService</p>
* <p>Description:专题对应医生基本信息的操作-业务层</p>
* @author YYCHEN
* @date 2016年10月20日 上午11:13:58
*/
public interface DoctorService {
/**
* <p>Title:createDoctor</p>
* <p>Description:使用分中心信息创建一个医生基本信息和医生账号</p>
* @author YYCHEN
* @date 2016年10月20日 上午11:15:37
* @param projectSubcenterDetailInfo
* @return
* @throws ParameterCannotBeNullException
*/
Doctor createDoctor(TProjectSubcenterDetailInfo projectSubcenterDetailInfo) throws ParameterCannotBeNullException;
/**
* <p>Title:supplyDoctorInfo</p>
* <p>Description:使用分中心医生信息补充库中医生信息</p>
* @author YYCHEN
* @date 2016年10月29日 下午3:55:04
* @param doctor
* @param projectSubcenterDetailInfo
* @return
*/
boolean supplyDoctorInfo(Doctor doctor, TProjectSubcenterDetailInfo projectSubcenterDetailInfo);
}
| [
"zhuguo@qgs-china.com"
] | zhuguo@qgs-china.com |
174a9834005e689b62ec32581880c131d5a06e13 | 84e156edb40800866b625d3541119e970acad1e1 | /bitcamp-java-application4-server/v58_1/src/main/java/com/eomcs/lms/servlet/LogoutServlet.java | 4e7741a885c0ca00ad52b7588cbc6056ff04b096 | [] | no_license | Hecklebot/bitcamp-java-20190527 | c063803b02015ca0a45ef590b3d5ca1c25201285 | c22f695c788ab8da21f7148aa09ec477c57b2a50 | refs/heads/master | 2020-06-13T20:15:46.420583 | 2019-10-21T08:12:55 | 2019-10-21T08:12:55 | 194,775,337 | 2 | 0 | null | 2020-04-30T11:58:11 | 2019-07-02T02:41:01 | Java | UTF-8 | Java | false | false | 645 | java | package com.eomcs.lms.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/auth/logout")
public class LogoutServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
request.getSession().invalidate();
request.setAttribute("viewUrl", "redirect:login");
}
}
| [
"iuehakdrk@gmail.com"
] | iuehakdrk@gmail.com |
fcf79760e2bc5f4dae1780682babd92e16a62d24 | 24643916cd1515911b7837ce81ebd17b0890cc81 | /frameworks/base/tests/net/src/mediatek/net/libcore/external/bouncycastle/jce/provider/DSABase.java | 4a1b60f93db11592d018016d800ed3489d318df4 | [
"Apache-2.0"
] | permissive | touxiong88/92_mediatek | 3a0d61109deb2fa77f79ecb790d0d3fdd693e5fd | 5e96a7bb778fd9d9b335825584664e0c8b5ff2c7 | refs/heads/master | 2020-05-02T10:20:49.365871 | 2019-04-25T09:12:56 | 2019-04-25T09:12:56 | 177,894,636 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,252 | java | /* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
* the prior written permission of MediaTek inc. and/or its licensors, any
* reproduction, modification, use or disclosure of MediaTek Software, and
* information contained herein, in whole or in part, shall be strictly
* prohibited.
*
* MediaTek Inc. (C) 2010. All rights reserved.
*
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
* ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
* RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
* INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
* TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
* RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
* OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
* SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
* RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
* ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
* RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
* MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
* CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* The following software/firmware and/or related documentation ("MediaTek
* Software") have been modified by MediaTek Inc. All revisions are subject to
* any receiver's applicable license agreements with MediaTek Inc.
*/
package org.bouncycastle.jce.provider;
import java.math.BigInteger;
import java.security.SignatureException;
import java.security.SignatureSpi;
import java.security.PrivateKey;
import java.security.InvalidKeyException;
import java.security.spec.AlgorithmParameterSpec;
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.asn1.x509.X509ObjectIdentifiers;
import org.bouncycastle.crypto.DSA;
import org.bouncycastle.crypto.Digest;
public abstract class DSABase
extends SignatureSpi
implements PKCSObjectIdentifiers, X509ObjectIdentifiers
{
protected Digest digest;
protected DSA signer;
protected DSAEncoder encoder;
protected DSABase(
Digest digest,
DSA signer,
DSAEncoder encoder)
{
this.digest = digest;
this.signer = signer;
this.encoder = encoder;
}
protected void engineInitSign(
PrivateKey privateKey)
throws InvalidKeyException
{
engineInitSign(privateKey, null);
}
protected void engineUpdate(
byte b)
throws SignatureException
{
digest.update(b);
}
protected void engineUpdate(
byte[] b,
int off,
int len)
throws SignatureException
{
digest.update(b, off, len);
}
protected byte[] engineSign()
throws SignatureException
{
byte[] hash = new byte[digest.getDigestSize()];
digest.doFinal(hash, 0);
try
{
BigInteger[] sig = signer.generateSignature(hash);
return encoder.encode(sig[0], sig[1]);
}
catch (Exception e)
{
throw new SignatureException(e.toString());
}
}
protected boolean engineVerify(
byte[] sigBytes)
throws SignatureException
{
byte[] hash = new byte[digest.getDigestSize()];
digest.doFinal(hash, 0);
BigInteger[] sig;
try
{
sig = encoder.decode(sigBytes);
}
catch (Exception e)
{
throw new SignatureException("error decoding signature bytes.");
}
return signer.verifySignature(hash, sig[0], sig[1]);
}
protected void engineSetParameter(
AlgorithmParameterSpec params)
{
throw new UnsupportedOperationException("engineSetParameter unsupported");
}
/**
* @deprecated replaced with <a href = "#engineSetParameter(java.security.spec.AlgorithmParameterSpec)">
*/
protected void engineSetParameter(
String param,
Object value)
{
throw new UnsupportedOperationException("engineSetParameter unsupported");
}
/**
* @deprecated
*/
protected Object engineGetParameter(
String param)
{
throw new UnsupportedOperationException("engineSetParameter unsupported");
}
}
| [
"sunhouzan@163.com"
] | sunhouzan@163.com |
06f31f432aca7da8bb0cfdcfda2dee177b75b61f | 0aadd6dc67960f6f33cd92b569898383c634cd72 | /src/test/resources/apache-ofbiz-16.11.03/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentLoaderConfig.java | 810d2c957e76b0c7a68c1c67d52e9108f1bd7278 | [
"Apache-2.0",
"LicenseRef-scancode-unknown",
"MIT",
"CC-BY-2.5",
"EPL-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | yuri0x7c1/ofbiz-explorer | 94e4ef2518648becf3e218b7079e7b8f3a07ac25 | e21819bd95c77b7160a051fa34582a6db6b8b75a | refs/heads/master | 2021-10-21T14:30:54.756147 | 2020-12-08T19:11:36 | 2020-12-08T19:11:36 | 91,610,572 | 1 | 1 | Apache-2.0 | 2021-04-19T14:53:44 | 2017-05-17T18:59:32 | Java | UTF-8 | Java | false | false | 5,361 | java | /*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*******************************************************************************/
package org.apache.ofbiz.base.component;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.ofbiz.base.util.UtilGenerics;
import org.apache.ofbiz.base.util.UtilURL;
import org.apache.ofbiz.base.util.UtilXml;
import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
/**
* ComponentLoaderConfig - Component Loader configuration
*
*/
public class ComponentLoaderConfig {
public static final String module = ComponentLoaderConfig.class.getName();
public static final String COMPONENT_LOAD_XML_FILENAME = "component-load.xml";
public static final int SINGLE_COMPONENT = 0;
public static final int COMPONENT_DIRECTORY = 1;
private static final AtomicReference<List<ComponentDef>> componentDefsRef = new AtomicReference<List<ComponentDef>>(null);
public static List<ComponentDef> getRootComponents(String configFile) throws ComponentException {
List<ComponentDef> existingInstance = componentDefsRef.get();
if (existingInstance == null) {
if (configFile == null) {
configFile = COMPONENT_LOAD_XML_FILENAME;
}
URL xmlUrl = UtilURL.fromResource(configFile);
List<ComponentDef> newInstance = getComponentsFromConfig(xmlUrl);
if (componentDefsRef.compareAndSet(existingInstance, newInstance)) {
existingInstance = newInstance;
} else {
existingInstance = componentDefsRef.get();
}
}
return existingInstance;
}
public static List<ComponentDef> getComponentsFromConfig(URL configUrl) throws ComponentException {
if (configUrl == null) {
throw new IllegalArgumentException("configUrl cannot be null");
}
Document document = null;
try {
document = UtilXml.readXmlDocument(configUrl, true);
} catch (SAXException e) {
throw new ComponentException("Error reading the component config file: " + configUrl, e);
} catch (ParserConfigurationException e) {
throw new ComponentException("Error reading the component config file: " + configUrl, e);
} catch (IOException e) {
throw new ComponentException("Error reading the component config file: " + configUrl, e);
}
Element root = document.getDocumentElement();
List<? extends Element> toLoad = UtilXml.childElementList(root);
List<ComponentDef> componentsFromConfig = null;
if (!toLoad.isEmpty()) {
componentsFromConfig = new ArrayList<ComponentDef>(toLoad.size());
Map<String, ? extends Object> systemProps = UtilGenerics.<String, Object> checkMap(System.getProperties());
for (Element element : toLoad) {
String nodeName = element.getNodeName();
String name = null;
String location = null;
int type = SINGLE_COMPONENT;
if ("load-component".equals(nodeName)) {
name = element.getAttribute("component-name");
location = FlexibleStringExpander.expandString(element.getAttribute("component-location"), systemProps);
} else if ("load-components".equals(nodeName)) {
location = FlexibleStringExpander.expandString(element.getAttribute("parent-directory"), systemProps);
type = COMPONENT_DIRECTORY;
} else {
throw new ComponentException("Invalid element '" + nodeName + "' found in component config file " + configUrl);
}
componentsFromConfig.add(new ComponentDef(name, location, type));
}
}
return Collections.unmodifiableList(componentsFromConfig);
}
public static class ComponentDef {
public String name;
public final String location;
public final int type;
private ComponentDef(String name, String location, int type) {
this.name = name;
this.location = location;
this.type = type;
}
}
}
| [
"yuri0x7c1@gmail.com"
] | yuri0x7c1@gmail.com |
c879e5bf5c313625f1742484617cef1ff66c3759 | bfce795e0247940f7aba55b3f4a2676444c87da3 | /guido-agent-oss/src/main/java/oss/guido/ch/qos/logback/access/sift/SiftingJoranConfigurator.java | 03032c2c6f8142a0c86a7b68b932d69295d40221 | [] | no_license | ManuelPivotal/guido | 3de7c08046075a99a7f115df2f5cd4ff63fc1392 | 094af774f2881bc798653143c5d19941493b53c9 | refs/heads/master | 2021-01-12T17:51:33.572529 | 2016-11-25T16:37:39 | 2016-11-25T16:37:39 | 71,653,381 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,640 | java | /**
* Logback: the reliable, generic, fast and flexible logging framework.
* Copyright (C) 1999-2015, QOS.ch. All rights reserved.
*
* This program and the accompanying materials are dual-licensed under
* either the terms of the Eclipse Public License v1.0 as published by
* the Eclipse Foundation
*
* or (per the licensee's choosing)
*
* under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation.
*/
package oss.guido.ch.qos.logback.access.sift;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import oss.guido.ch.qos.logback.access.spi.IAccessEvent;
import oss.guido.ch.qos.logback.core.Appender;
import oss.guido.ch.qos.logback.core.joran.action.ActionConst;
import oss.guido.ch.qos.logback.core.joran.action.AppenderAction;
import oss.guido.ch.qos.logback.core.joran.spi.ElementPath;
import oss.guido.ch.qos.logback.core.joran.spi.ElementSelector;
import oss.guido.ch.qos.logback.core.joran.spi.RuleStore;
import oss.guido.ch.qos.logback.core.sift.SiftingJoranConfiguratorBase;
public class SiftingJoranConfigurator extends
SiftingJoranConfiguratorBase<IAccessEvent> {
SiftingJoranConfigurator(String key, String value, Map<String, String> parentPropertyMap) {
super(key, value, parentPropertyMap);
}
@Override
protected ElementPath initialElementPath() {
return new ElementPath("configuration");
}
@Override
protected void addInstanceRules(RuleStore rs) {
rs.addRule(new ElementSelector("configuration/appender"), new AppenderAction());
}
@Override
protected void buildInterpreter() {
super.buildInterpreter();
Map<String, Object> omap = interpreter.getInterpretationContext()
.getObjectMap();
omap.put(ActionConst.APPENDER_BAG, new HashMap());
omap.put(ActionConst.FILTER_CHAIN_BAG, new HashMap());
Map<String, String> propertiesMap = new HashMap<String, String>();
propertiesMap.putAll(parentPropertyMap);
propertiesMap.put(key, value);
interpreter.setInterpretationContextPropertiesMap(propertiesMap);
}
@SuppressWarnings("unchecked")
@Override
public Appender<IAccessEvent> getAppender() {
Map<String, Object> omap = interpreter.getInterpretationContext()
.getObjectMap();
HashMap appenderMap = (HashMap) omap.get(ActionConst.APPENDER_BAG);
oneAndOnlyOneCheck(appenderMap);
Collection values = appenderMap.values();
if(values.size() == 0) {
return null;
}
return (Appender<IAccessEvent>) values.iterator().next();
}
}
| [
"mmeyer@pivotal.io"
] | mmeyer@pivotal.io |
36bfafe832c91c548bcf71d7e46c5f482388298a | 71007018bfae36117fd2f779dbe6e6d7bb9bde9c | /src/test/java/com/magento/test/dao/CatalogruleProductReplicaDaoTestIt.java | e0d2473878fcae1f1f8791bb03cf479cd97c1846 | [] | no_license | gmai2006/magentotest | 819201760b720a90d55ef853be964651ace125ac | ca67d16d6280ddaefbf57fa1129b6ae7bd80408f | refs/heads/main | 2023-09-03T05:14:27.788984 | 2021-10-17T06:25:09 | 2021-10-17T06:25:09 | 418,040,494 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,812 | java | /**
* %% Copyright (C) 2021 DataScience 9 LLC %% Licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing permissions and
* limitations under the License. #L%
*
* <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or
* function or changes please update the templates then submit the template through our web
* interface.
*/
package com.magento.test.dao;
import java.nio.charset.Charset;
import java.util.Arrays;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Arrays;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import com.magento.test.entity.CatalogruleProductReplica;
import com.magento.test.entity.CatalogruleProductReplicaId;
import com.magento.test.utils.FileUtils;
import com.magento.test.utils.ByteArrayToBase64TypeAdapter;
public class CatalogruleProductReplicaDaoTestIt {
static final String inputFile = "CatalogruleProductReplica.json";
static CatalogruleProductReplicaDao dao;
static Gson gson =
new GsonBuilder()
.registerTypeHierarchyAdapter(byte[].class, new ByteArrayToBase64TypeAdapter())
.setDateFormat("yyyy-MM-dd HH:mm:ss.S")
.create();
private CatalogruleProductReplica[] records;
/** Run when the class is loaded. */
@BeforeClass
public static void beforeClass() {
EntityManagerFactory factory = Persistence.createEntityManagerFactory("testpersistence");
JpaDao jpa = new StandaloneJpaDao(factory.createEntityManager());
dao = new DefaultCatalogruleProductReplicaDao(jpa);
}
/** Run before the test. */
@Before
public void before() {
try {
String json = FileUtils.readFileFromResource2String(inputFile, Charset.defaultCharset());
records = gson.fromJson(json, CatalogruleProductReplica[].class);
json = null;
Arrays.stream(records).skip(1).forEach(o -> dao.create(o));
} catch (IOException ex) {
ex.printStackTrace();
}
}
@After
public void after() {
records = null;
}
@Test
public void testSelect() {
final CatalogruleProductReplicaId id =
new CatalogruleProductReplicaId(
this.records[1].getRuleId(),
this.records[1].getRuleProductId(),
this.records[1].getProductId(),
this.records[1].getToTime(),
this.records[1].getFromTime(),
this.records[1].getCustomerGroupId(),
this.records[1].getSortOrder(),
this.records[1].getWebsiteId());
CatalogruleProductReplica testResult = dao.find(id);
assertNotNull("expect result", testResult);
org.junit.Assert.assertEquals(
"expect equals actionOperator ",
this.records[1].getActionOperator(),
testResult.getActionOperator());
org.junit.Assert.assertEquals(
"expect equals actionAmount ",
this.records[1].getActionAmount(),
testResult.getActionAmount());
org.junit.Assert.assertTrue(
"expect equals actionStop ", this.records[1].getActionStop() == testResult.getActionStop());
}
}
| [
"gmai2006@gmail.com"
] | gmai2006@gmail.com |
70b7d1834b81c0d353d2125a0524bd34ac3adb33 | 72e39f1a0fc41a80575b206e3cc03f76e6bf69e2 | /tesla/tesla-idea-plugin/src/com/xiaomi/youpin/tesla/ip/component/VersionComponent.java | bba4fa8dbbfd8603fef5534f64877e02b7f5d7f6 | [
"Apache-2.0"
] | permissive | JDmajia/mone | d4a4cf235c2f567d78e1ef0bb44f707bd850314a | 42c39e00c0a348bc6fc8de9e63f0e81966f21f73 | refs/heads/master | 2023-03-27T04:36:47.919914 | 2021-03-29T03:14:37 | 2021-03-29T03:14:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,288 | java | /*
* Copyright 2020 Xiaomi
*
* 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.xiaomi.youpin.tesla.ip.component;
import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.project.Project;
import com.xiaomi.youpin.tesla.ip.ui.VersionUi;
/**
* @author goodjava@qq.com
*/
public class VersionComponent implements ApplicationComponent {
@Override
public String getComponentName() {
return "VersionComponent";
}
public void show(Project project) {
VersionUi dialog = new VersionUi();
dialog.setSize(600, 200);
dialog.setLocationRelativeTo(null);
dialog.setVisible(true);
dialog.setResizable(false);
dialog.requestFocus();
}
}
| [
"goodjava@163.com"
] | goodjava@163.com |
bc5e58830490abc98dac4fa5e051fe9a4d8681c7 | 32b72e1dc8b6ee1be2e80bb70a03a021c83db550 | /ast_results/cernekee_ics-openconnect/app/src/main/java/app/openconnect/core/VPNLogItem.java | 5402280e0bc1428c93f6537c9932fd488d231817 | [] | no_license | cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning | d90c41a17e88fcd99d543124eeb6e93f9133cb4a | 0564143d92f8024ff5fa6b659c2baebf827582b1 | refs/heads/master | 2020-07-13T13:53:40.297493 | 2019-01-11T11:51:18 | 2019-01-11T11:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,409 | java | // isComment
package app.openconnect.core;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import android.content.Context;
public class isClassOrIsInterface implements Serializable {
private static final long isVariable = isStringConstant;
private long isVariable = isNameExpr.isMethod();
private String isVariable;
@SuppressWarnings("isStringConstant")
private int isVariable;
public isConstructor(int isParameter, String isParameter) {
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
}
public String isMethod(Context isParameter, String isParameter) {
String isVariable = "isStringConstant";
if (!isNameExpr.isMethod("isStringConstant")) {
Date isVariable = new Date(isNameExpr);
java.text.DateFormat isVariable;
if (isNameExpr.isMethod("isStringConstant")) {
isNameExpr = new SimpleDateFormat("isStringConstant", isNameExpr.isMethod());
} else {
isNameExpr = new SimpleDateFormat("isStringConstant", isNameExpr.isMethod());
}
isNameExpr = isNameExpr.isMethod(isNameExpr) + "isStringConstant";
}
return isNameExpr + isNameExpr;
}
public String isMethod() {
return isMethod(null, "isStringConstant");
}
}
| [
"matheus@melsolucoes.net"
] | matheus@melsolucoes.net |
cadd5f683ace5801ffcff0f409916e35833acf36 | 0f5b39c105ba2e702557f92f6ae81b26ba435d4f | /src/main/java/org/apache/naming/NamingContextEnumeration.java | e689feb348ac786e315521567ed8002e5778024a | [
"Apache-2.0"
] | permissive | frpascua/Tomcat-7 | 31d26447722856f5127cb001bfb49e603d606109 | e51fcf57d338eb8d74e638c5a384acd594009b89 | refs/heads/master | 2023-04-01T23:21:35.882186 | 2017-02-19T08:33:16 | 2017-02-19T08:33:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,242 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.naming;
import javax.naming.NameClassPair;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import java.util.Iterator;
/**
* Naming enumeration implementation.
*
* @author Remy Maucherat
*/
public class NamingContextEnumeration
implements NamingEnumeration<NameClassPair> {
// ----------------------------------------------------------- Constructors
/**
* Underlying enumeration.
*/
protected Iterator<NamingEntry> iterator;
// -------------------------------------------------------------- Variables
public NamingContextEnumeration(Iterator<NamingEntry> entries) {
iterator = entries;
}
// --------------------------------------------------------- Public Methods
/**
* Retrieves the next element in the enumeration.
*/
@Override
public NameClassPair next()
throws NamingException {
return nextElement();
}
/**
* Determines whether there are any more elements in the enumeration.
*/
@Override
public boolean hasMore()
throws NamingException {
return iterator.hasNext();
}
/**
* Closes this enumeration.
*/
@Override
public void close()
throws NamingException {
}
@Override
public boolean hasMoreElements() {
return iterator.hasNext();
}
@Override
public NameClassPair nextElement() {
NamingEntry entry = iterator.next();
return new NameClassPair(entry.name, entry.value.getClass().getName());
}
}
| [
"britrock@163.com"
] | britrock@163.com |
919db94bc6787a319cca235c3bf43ba806ddcb49 | 78cb4074abb9b8fa3321384d27e9f4171cf49c85 | /src/main/java/com/github/ddth/progress/impl/InprocessProgressManager.java | 2522b1266428c19cee37832af94cdd4bbdc544af | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | DDTH/ddth-progress | ed619f4bf5886762212f34cd741367e9827f0991 | 414f601cbbac69417a6e75da65b97ebcb495d7e0 | refs/heads/master | 2021-01-10T20:29:08.269043 | 2014-11-07T21:18:57 | 2014-11-07T21:18:57 | 23,548,545 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,531 | java | package com.github.ddth.progress.impl;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import com.github.ddth.progress.IProgressManager;
import com.github.ddth.progress.ProgressRecord;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
/**
* In-memory implementation of {@link IProgressManager}.
*
* @author Thanh Nguyen <btnguyen2k@gmail.com>
* @since 0.1.0
*/
public class InprocessProgressManager extends AbstractProgressManager {
private final AtomicLong counter = new AtomicLong(0);
private final Cache<String, ProgressRecord> progressCache = CacheBuilder.newBuilder()
.expireAfterAccess(3600, TimeUnit.SECONDS).build();
/**
* {@inheritDoc}
*/
@Override
public ProgressRecord create() {
String id = Long.toHexString(counter.incrementAndGet()).toLowerCase();
ProgressRecord record = new ProgressRecord();
record.id(id);
progressCache.put(id, record);
return record;
}
/**
* {@inheritDoc}
*/
@Override
public ProgressRecord update(ProgressRecord record) {
String id = record.id();
progressCache.put(id, record);
return record;
}
/**
* {@inheritDoc}
*/
@Override
public ProgressRecord get(String id) {
return progressCache.getIfPresent(id);
}
/**
* {@inheritDoc}
*/
@Override
public void remove(String id) {
progressCache.invalidate(id);
}
}
| [
"btnguyen2k@gmail.com"
] | btnguyen2k@gmail.com |
49773c0a617a4cdc80815c20ff2dd113ebe18f73 | 192ec7880ba7d82d8161f2de1f0d8adcf50874e0 | /modeshape-boot/modeshape-jcr-rest-boot/src/main/java/com/bpwizard/wcm/repo/rest/jcr/model/WorkflowStage.java | 6742be0afa4e6d34e565666d62102ec268d5accc | [] | no_license | FrankLi999/wcm-bpm | 932a3f41f9716897bcbf1fd654910276133b109b | 7b9bea30798701c99bd2096e2011cb7a7a35924a | refs/heads/master | 2023-07-27T19:28:36.410402 | 2021-03-29T02:49:50 | 2021-03-29T02:49:50 | 136,976,607 | 2 | 1 | null | 2023-07-17T00:26:38 | 2018-06-11T20:19:08 | JavaScript | UTF-8 | Java | false | false | 1,062 | java | package com.bpwizard.wcm.repo.rest.jcr.model;
import java.util.Arrays;
public class WorkflowStage {
private int order;
private String name;
private WorkflowAction entryActions[];
private WorkflowAction exitActions[];
public int getOrder() {
return order;
}
public void setOrder(int order) {
this.order = order;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public WorkflowAction[] getEntryActions() {
return entryActions;
}
public void setEntryActions(WorkflowAction[] entryActions) {
this.entryActions = entryActions;
}
public WorkflowAction[] getExitActions() {
return exitActions;
}
public void setExitActions(WorkflowAction[] exitActions) {
this.exitActions = exitActions;
}
@Override
public String toString() {
return "WorkflowStage [order=" + order + ", name=" + name + ", entryActions=" + Arrays.toString(entryActions)
+ ", exitActions=" + Arrays.toString(exitActions) + ", toString()=" + super.toString() + "]";
}
}
| [
"frank.x.li@gmail.com"
] | frank.x.li@gmail.com |
142ecb37ce0fe1ff3a1703ea4faab640df5e028f | 90eb7a131e5b3dc79e2d1e1baeed171684ef6a22 | /sources/p298d/p299a/p300a/p301a/p303y0/p400j/p401b/p402e0/C7319d.java | 46b16f76636aab398aca047a65ccd2bec0f29f6d | [] | no_license | shalviraj/greenlens | 1c6608dca75ec204e85fba3171995628d2ee8961 | fe9f9b5a3ef4a18f91e12d3925e09745c51bf081 | refs/heads/main | 2023-04-20T13:50:14.619773 | 2021-04-26T15:45:11 | 2021-04-26T15:45:11 | 361,799,768 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 589 | java | package p298d.p299a.p300a.p301a.p303y0.p400j.p401b.p402e0;
import java.io.InputStream;
import p298d.p344x.p346c.C6888i;
/* renamed from: d.a.a.a.y0.j.b.e0.d */
public final class C7319d {
/* renamed from: a */
public final InputStream mo24945a(String str) {
C6888i.m12438e(str, "path");
ClassLoader classLoader = C7319d.class.getClassLoader();
InputStream resourceAsStream = classLoader == null ? null : classLoader.getResourceAsStream(str);
return resourceAsStream == null ? ClassLoader.getSystemResourceAsStream(str) : resourceAsStream;
}
}
| [
"73280944+shalviraj@users.noreply.github.com"
] | 73280944+shalviraj@users.noreply.github.com |
b035b3639f9f95b7e2719249ab2dbe7d59e7d11e | 7c1a70d7c314c67930b09131ded68da5a5a698a5 | /src/com/kan/base/service/impl/workflow/WorkflowActualServiceImpl.java | 4b266601beedde8bab554c038f894339f19714cf | [] | no_license | sunwenjie/hris_pro | 8d21c8e2955438086d3bbbacaad7511b3423b3a0 | dfd2a598604f4dc98d5e6e57671e3d479974610c | refs/heads/master | 2020-12-02T22:17:10.263131 | 2017-07-03T12:36:41 | 2017-07-03T12:36:41 | 96,108,657 | 1 | 0 | null | null | null | null | GB18030 | Java | false | false | 5,135 | java | package com.kan.base.service.impl.workflow;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import com.kan.base.core.ContextService;
import com.kan.base.dao.inf.workflow.WorkflowActualDao;
import com.kan.base.domain.BaseVO;
import com.kan.base.domain.workflow.WorkflowActualVO;
import com.kan.base.page.PagedListHolder;
import com.kan.base.service.inf.workflow.WorkflowActualService;
import com.kan.base.util.KANException;
public class WorkflowActualServiceImpl extends ContextService implements WorkflowActualService
{
@Override
public PagedListHolder getWorkflowActualVOsByCondition( final PagedListHolder pagedListHolder, final boolean isPaged ) throws KANException
{
final WorkflowActualVO workflowActual = ( WorkflowActualVO ) pagedListHolder.getObject();
final WorkflowActualDao workflowActualateDao = ( WorkflowActualDao ) getDao();
pagedListHolder.setHolderSize( workflowActualateDao.countWorkflowActualVOsByCondition( workflowActual ) );
if ( isPaged )
{
pagedListHolder.getSource().addAll( workflowActualateDao.getWorkflowActualVOsByCondition( workflowActual, new RowBounds( pagedListHolder.getPage()
* pagedListHolder.getPageSize() + 1, pagedListHolder.getPageSize() ) ) );
}
else
{
pagedListHolder.getSource().addAll( workflowActualateDao.getWorkflowActualVOsByCondition( workflowActual ) );
}
return pagedListHolder;
}
@Override
public List< Object > getNotFinishWorkflowActualVOsByPositionIds( final String positionIds[] ) throws KANException
{
Map< String, Object > searchMap = new HashMap< String, Object >();
searchMap.put( "status", "1" );// 开始状态的工作流
searchMap.put( "auditType", "1" );// 审批类型 1:内部职位ID
searchMap.put( "auditTargetIds", positionIds );// 检查的职位
searchMap.put( "actualStepStatuses", new String[] { "1", "2" } );
final WorkflowActualDao workflowActualateDao = ( WorkflowActualDao ) getDao();
return workflowActualateDao.getWorkflowActualVOByMap( searchMap );
}
@Override
public WorkflowActualVO getWorkflowActualVOByWorkflowId( final String workflowId ) throws KANException
{
return ( ( WorkflowActualDao ) getDao() ).getWorkflowActualVOByWorkflowId( workflowId );
}
@Override
public int updateWorkflowActual( final WorkflowActualVO workflowModuleVO ) throws KANException
{
return ( ( WorkflowActualDao ) getDao() ).updateWorkflowActual( workflowModuleVO );
}
@Override
public int insertWorkflowActual( final WorkflowActualVO workflowModuleVO ) throws KANException
{
return ( ( WorkflowActualDao ) getDao() ).insertWorkflowActual( workflowModuleVO );
}
@Override
public void deleteWorkflowActual( final WorkflowActualVO... workflowModuleVOs ) throws KANException
{
if ( workflowModuleVOs != null && workflowModuleVOs.length > 0 )
{
try
{
WorkflowActualDao dao = ( WorkflowActualDao ) getDao();
startTransaction();
for ( WorkflowActualVO workflowModuleVO : workflowModuleVOs )
{
WorkflowActualVO workflowModule = dao.getWorkflowActualVOByWorkflowId( workflowModuleVO.getWorkflowId() );
workflowModule.setDeleted( BaseVO.FALSE );
workflowModule.setModifyBy( workflowModuleVO.getModifyBy() );
workflowModule.setModifyDate( new Date() );
dao.updateWorkflowActual( workflowModule );
}
commitTransaction();
}
catch ( Exception e )
{
rollbackTransaction();
throw new KANException( e );
}
}
}
@Override
public void deleteWorkflowActualByWorkflowId( final String modifyUserId, final String... workflowIds ) throws KANException
{
if ( workflowIds != null && workflowIds.length > 0 )
{
try
{
WorkflowActualDao dao = ( WorkflowActualDao ) getDao();
startTransaction();
for ( String workflowId : workflowIds )
{
WorkflowActualVO workflowModule = dao.getWorkflowActualVOByWorkflowId( workflowId );
workflowModule.setDeleted( BaseVO.FALSE );
workflowModule.setModifyBy( modifyUserId );
workflowModule.setModifyDate( new Date() );
dao.updateWorkflowActual( workflowModule );
}
commitTransaction();
}
catch ( Exception e )
{
rollbackTransaction();
throw new KANException( e );
}
}
}
@Override
public int countWorkflowActualVOsByCondition( WorkflowActualVO workflowActualVO ) throws KANException
{
return ( ( WorkflowActualDao ) getDao() ).countWorkflowActualVOsByCondition( workflowActualVO );
}
}
| [
"wenjie.sun@i-click.com"
] | wenjie.sun@i-click.com |
0b2bf2372e0b457e3195fdf0a14770f3fc1e4f0c | ce29ae639da37c571cbbeac622b5d4ec67fcc58c | /fe/src/main/java/com/cloudera/impala/analysis/CreateTableDataSrcStmt.java | c00fb34266f7dd78c564cd1b3c715321fbb225ec | [
"Apache-2.0"
] | permissive | dayutianfei/impala-Q | 703de4a0f6581401734b27b1f947ac1db718cb2e | 46af5ff8bf3e80999620db7bf0c9ffc93c8e5950 | refs/heads/master | 2021-01-10T11:54:57.584647 | 2016-02-17T15:39:09 | 2016-02-17T15:39:09 | 48,152,335 | 0 | 1 | null | 2016-03-09T17:02:07 | 2015-12-17T04:29:58 | C++ | UTF-8 | Java | false | false | 4,158 | java | // Copyright 2014 Cloudera Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.cloudera.impala.analysis;
import static com.cloudera.impala.catalog.DataSourceTable.TBL_PROP_API_VER;
import static com.cloudera.impala.catalog.DataSourceTable.TBL_PROP_CLASS;
import static com.cloudera.impala.catalog.DataSourceTable.TBL_PROP_DATA_SRC_NAME;
import static com.cloudera.impala.catalog.DataSourceTable.TBL_PROP_INIT_STRING;
import static com.cloudera.impala.catalog.DataSourceTable.TBL_PROP_LOCATION;
import java.util.List;
import java.util.Map;
import com.cloudera.impala.authorization.Privilege;
import com.cloudera.impala.catalog.DataSource;
import com.cloudera.impala.catalog.DataSourceTable;
import com.cloudera.impala.catalog.RowFormat;
import com.cloudera.impala.common.AnalysisException;
import com.cloudera.impala.thrift.THdfsFileFormat;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
/**
* Represents a CREATE TABLE statement for external data sources. Such tables
* reference an external data source (created with a CREATE DATA SOURCE statement)
* and the properties of that source are stored in the table properties because
* the metastore does not store the data sources themselves.
*/
public class CreateTableDataSrcStmt extends CreateTableStmt {
public CreateTableDataSrcStmt(TableName tableName, List<ColumnDesc> columnDefs,
String dataSourceName, String initString, String comment, boolean ifNotExists) {
super(tableName, columnDefs, Lists.<ColumnDesc>newArrayList(), false, comment,
RowFormat.DEFAULT_ROW_FORMAT, THdfsFileFormat.TEXT, null, null, ifNotExists,
createInitialTableProperties(dataSourceName, initString),
Maps.<String, String>newHashMap());
}
/**
* Creates the initial map of table properties containing the name of the data
* source and the table init string.
*/
private static Map<String, String> createInitialTableProperties(
String dataSourceName, String initString) {
Preconditions.checkNotNull(dataSourceName);
Map<String, String> tableProperties = Maps.newHashMap();
tableProperties.put(TBL_PROP_DATA_SRC_NAME, dataSourceName.toLowerCase());
tableProperties.put(TBL_PROP_INIT_STRING, Strings.nullToEmpty(initString));
return tableProperties;
}
@Override
public void analyze(Analyzer analyzer) throws AnalysisException {
super.analyze(analyzer);
String dataSourceName = getTblProperties().get(TBL_PROP_DATA_SRC_NAME);
DataSource dataSource = analyzer.getCatalog().getDataSource(dataSourceName);
if (dataSource == null) {
throw new AnalysisException("Data source does not exist: " + dataSourceName);
}
for (ColumnDesc col: getColumnDefs()) {
if (!DataSourceTable.isSupportedColumnType(col.getType())) {
throw new AnalysisException("Tables produced by an external data source do " +
"not support the column type: " + col.getType());
}
}
// Add table properties from the DataSource catalog object now that we have access
// to the catalog. These are stored in the table metadata because DataSource catalog
// objects are not currently persisted.
String location = dataSource.getLocation();
getTblProperties().put(TBL_PROP_LOCATION, location);
getTblProperties().put(TBL_PROP_CLASS, dataSource.getClassName());
getTblProperties().put(TBL_PROP_API_VER, dataSource.getApiVersion());
new HdfsUri(location).analyze(analyzer, Privilege.ALL);
// TODO: check class exists and implements API version
}
}
| [
"dayutianfei@gmail.com"
] | dayutianfei@gmail.com |
19981a301e0c242ddbfd01dcd7edb72a5c85567e | f2e9603b216e21d34f25d8f2ff38e092dc6cbcdf | /6.SpringContainer/src/main/java/com/denglitong/event/MailSendEvent.java | 7a497c409f22140f8dcf2aaa27dfb70a53aa9c7a | [] | no_license | denglitong/proficient_in_4x_spring | 2da474277ca9bc7d4ea744249a3d57007b52bfa6 | d37eaac9db1fa3d167692bd9828f84ee379947f2 | refs/heads/master | 2023-06-16T07:09:12.860008 | 2021-07-11T09:02:01 | 2021-07-11T09:02:01 | 372,717,780 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 536 | java | package com.denglitong.event;
import org.springframework.context.ApplicationContext;
import org.springframework.context.event.ApplicationContextEvent;
/**
* @author litong.deng@foxmail.com
* @date 2021/6/7
*/
public class MailSendEvent extends ApplicationContextEvent {
private String to;
public MailSendEvent(ApplicationContext source, String to) {
super(source);
this.to = to;
}
public String getTo() {
return to;
}
public void setTo(String to) {
this.to = to;
}
}
| [
"litong.deng@foxmail.com"
] | litong.deng@foxmail.com |
a30c483e96151b7ab21cfab317fc35e2e8afc3d3 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13141-4-22-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/XWiki_ESTest.java | 000baa70b8199f9520b8a799a0015136c3e80897 | [] | 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 | 530 | java | /*
* This file was automatically generated by EvoSuite
* Mon Jan 20 00:18:10 UTC 2020
*/
package com.xpn.xwiki;
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 XWiki_ESTest extends XWiki_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
03af8f686f332506e4cb877b9d6c412060c39c9b | 2bc2eadc9b0f70d6d1286ef474902466988a880f | /tags/mule-2.0.2.20080813/modules/spring-config/src/main/java/org/mule/config/spring/factories/AbstractEndpointFactoryBean.java | edf9c7a8cf09235a487b35dde509ba535093508a | [] | no_license | OrgSmells/codehaus-mule-git | 085434a4b7781a5def2b9b4e37396081eaeba394 | f8584627c7acb13efdf3276396015439ea6a0721 | refs/heads/master | 2022-12-24T07:33:30.190368 | 2020-02-27T19:10:29 | 2020-02-27T19:10:29 | 243,593,543 | 0 | 0 | null | 2022-12-15T23:30:00 | 2020-02-27T18:56:48 | null | UTF-8 | Java | false | false | 1,573 | java | /*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.config.spring.factories;
import org.mule.api.endpoint.EndpointException;
import org.mule.api.lifecycle.Initialisable;
import org.mule.api.lifecycle.InitialisationException;
import org.mule.endpoint.EndpointURIEndpointBuilder;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.FactoryBean;
/**
* Abstract spring FactoryBean used to creating endpoints via spring.
*/
public abstract class AbstractEndpointFactoryBean extends EndpointURIEndpointBuilder
implements FactoryBean, Initialisable
{
protected final Log logger = LogFactory.getLog(getClass());
public AbstractEndpointFactoryBean(EndpointURIEndpointBuilder global) throws EndpointException
{
super(global);
}
public AbstractEndpointFactoryBean()
{
super();
}
public Object getObject() throws Exception
{
return doGetObject();
}
public boolean isSingleton()
{
return true;
}
public void initialise() throws InitialisationException
{
// subclasses may override this method
}
protected abstract Object doGetObject() throws Exception;
}
| [
"dirk.olmes@bf997673-6b11-0410-b953-e057580c5b09"
] | dirk.olmes@bf997673-6b11-0410-b953-e057580c5b09 |
131540b98cf6c920eb044659bace76e2d6a817f9 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-481-63-21-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/security/authorization/DefaultAuthorExecutor_ESTest_scaffolding.java | 491773940e76b885b9bc6905dfae83a60cf59ffc | [] | 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 | 471 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Apr 08 16:29:56 UTC 2020
*/
package com.xpn.xwiki.internal.security.authorization;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class DefaultAuthorExecutor_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
411da6aa520f2b7b6d7f2149cf3b72088293163c | 3a59bd4f3c7841a60444bb5af6c859dd2fe7b355 | /sources/com/facebook/imagepipeline/platform/KitKatPurgeableDecoder.java | 9ba1bf97028b67f2bda8dcce99d1cc98dff5a997 | [] | no_license | sengeiou/KnowAndGo-android-thunkable | 65ac6882af9b52aac4f5a4999e095eaae4da3c7f | 39e809d0bbbe9a743253bed99b8209679ad449c9 | refs/heads/master | 2023-01-01T02:20:01.680570 | 2020-10-22T04:35:27 | 2020-10-22T04:35:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,752 | java | package com.facebook.imagepipeline.platform;
import android.annotation.TargetApi;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import com.facebook.common.internal.DoNotStrip;
import com.facebook.common.internal.Preconditions;
import com.facebook.common.memory.PooledByteBuffer;
import com.facebook.common.references.CloseableReference;
import com.facebook.imagepipeline.memory.FlexByteArrayPool;
import com.facebook.imagepipeline.nativecode.DalvikPurgeableDecoder;
import javax.annotation.concurrent.ThreadSafe;
@TargetApi(19)
@DoNotStrip
@ThreadSafe
public class KitKatPurgeableDecoder extends DalvikPurgeableDecoder {
private final FlexByteArrayPool mFlexByteArrayPool;
@DoNotStrip
public KitKatPurgeableDecoder(FlexByteArrayPool flexByteArrayPool) {
this.mFlexByteArrayPool = flexByteArrayPool;
}
/* access modifiers changed from: protected */
public Bitmap decodeByteArrayAsPurgeable(CloseableReference<PooledByteBuffer> closeableReference, BitmapFactory.Options options) {
PooledByteBuffer pooledByteBuffer = closeableReference.get();
int size = pooledByteBuffer.size();
CloseableReference<byte[]> closeableReference2 = this.mFlexByteArrayPool.get(size);
try {
byte[] bArr = closeableReference2.get();
pooledByteBuffer.read(0, bArr, 0, size);
return (Bitmap) Preconditions.checkNotNull(BitmapFactory.decodeByteArray(bArr, 0, size, options), "BitmapFactory returned null");
} finally {
CloseableReference.closeSafely((CloseableReference<?>) closeableReference2);
}
}
/* access modifiers changed from: protected */
public Bitmap decodeJPEGByteArrayAsPurgeable(CloseableReference<PooledByteBuffer> closeableReference, int i, BitmapFactory.Options options) {
byte[] bArr = endsWithEOI(closeableReference, i) ? null : EOI;
PooledByteBuffer pooledByteBuffer = closeableReference.get();
Preconditions.checkArgument(i <= pooledByteBuffer.size());
int i2 = i + 2;
CloseableReference<byte[]> closeableReference2 = this.mFlexByteArrayPool.get(i2);
try {
byte[] bArr2 = closeableReference2.get();
pooledByteBuffer.read(0, bArr2, 0, i);
if (bArr != null) {
putEOI(bArr2, i);
i = i2;
}
return (Bitmap) Preconditions.checkNotNull(BitmapFactory.decodeByteArray(bArr2, 0, i, options), "BitmapFactory returned null");
} finally {
CloseableReference.closeSafely((CloseableReference<?>) closeableReference2);
}
}
private static void putEOI(byte[] bArr, int i) {
bArr[i] = -1;
bArr[i + 1] = -39;
}
}
| [
"joshuahj.tsao@gmail.com"
] | joshuahj.tsao@gmail.com |
2f3cb05564d6dc9459fc75e564e266fb751c59cc | 34b662f2682ae9632060c2069c8b83916d6eecbd | /cn/jpush/android/api/PushNotificationBuilder.java | ea9d71f93e96ffcdc42f94755ab6e142e2df3c2c | [] | no_license | mattshapiro/fc40 | 632c4df2d7e117100705325544fc709cd38bb0a9 | b47ee545260d3e0de66dd05a973b457a3c03f5cf | refs/heads/master | 2021-01-19T00:25:32.311567 | 2015-03-07T00:48:51 | 2015-03-07T00:48:51 | 31,795,769 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 459 | java | package cn.jpush.android.api;
import android.app.Notification;
import java.util.Map;
public abstract interface PushNotificationBuilder
{
public abstract Notification a(String paramString, Map<String, String> paramMap);
public abstract String a();
}
/* Location: /Users/mattshapiro/Downloads/dex2jar/com.dji.smartphone.downloader-dex2jar.jar
* Qualified Name: cn.jpush.android.api.PushNotificationBuilder
* JD-Core Version: 0.6.2
*/ | [
"typorrhea@gmail.com"
] | typorrhea@gmail.com |
e405544127f6d836f28328caf03acc45a1ff9c0f | df13db4cabfaf130613ee7a3ca64bb1a5b7f44a3 | /src/main/java/com/moonsworth/lunar/mixin/client/item/MixinItemPickaxe.java | c7e990c0475c30a8d8718f230340699834b66b9f | [] | no_license | 1onely-lucas/LunarClient | 8425ba152e388023fdbba6889af132e32e207921 | aa2e05705c43bb0481b16036a97b874a9b6de24b | refs/heads/main | 2023-08-04T20:19:28.563743 | 2021-09-24T18:13:19 | 2021-09-24T18:13:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 336 | java | package com.moonsworth.lunar.mixin.client.item;
import com.moonsworth.lunar.bridge.minecraft.item.ItemPickaxeBridge;
import net.minecraft.item.ItemPickaxe;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(ItemPickaxe.class)
public abstract class MixinItemPickaxe implements ItemPickaxeBridge {
public MixinItemPickaxe() {
}
}
| [
"decenciesmc@gmail.com"
] | decenciesmc@gmail.com |
2d76440ac06f3b5d9d23adc4445c9c94ab7ef406 | 128eb90ce7b21a7ce621524dfad2402e5e32a1e8 | /laravel-converted/src/main/java/com/project/convertedCode/servlets/vendor/egulias/email_validator/EmailValidator/Validation/servlet_RFCValidation_php.java | c97b99e33eaf623204c105e1554e47ed0856d5b3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | RuntimeConverter/RuntimeConverterLaravelJava | 657b4c73085b4e34fe4404a53277e056cf9094ba | 7ae848744fbcd993122347ffac853925ea4ea3b9 | refs/heads/master | 2020-04-12T17:22:30.345589 | 2018-12-22T10:32:34 | 2018-12-22T10:32:34 | 162,642,356 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,207 | java | package com.project.convertedCode.servlets.vendor.egulias.email_validator.EmailValidator.Validation;
import com.runtimeconverter.runtime.includes.RuntimeIncludable;
import com.runtimeconverter.runtime.includes.RuntimeConverterServlet;
import com.runtimeconverter.runtime.RuntimeEnv;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.annotation.WebServlet;
@WebServlet("/vendor/egulias/email-validator/EmailValidator/Validation/RFCValidation.php")
public class servlet_RFCValidation_php extends RuntimeConverterServlet {
protected final RuntimeIncludable getInclude() {
return com.project
.convertedCode
.includes
.vendor
.egulias
.email_validator
.EmailValidator
.Validation
.file_RFCValidation_php
.instance;
}
protected final RuntimeEnv getRuntimeEnv(
String httpRequestType, HttpServletRequest req, HttpServletResponse resp) {
return new com.project.convertedCode.main.ConvertedProjectRuntimeEnv(
req, resp, this.getInclude());
}
}
| [
"git@runtimeconverter.com"
] | git@runtimeconverter.com |
8c67e39be38ee10248e90fc246e690506c359fdf | 193b8d717401a1ad0ae0a0d1395f10b6c610b0af | /iaf-war/src/main/java/newland/iaf/base/model/FundFlow.java | d814e6ebe343efc08626e56ae75c9a76ba8a83b4 | [] | no_license | itowne/iaf-app | da0760834a0cd0dce81b3a12ddeff0599d9583ff | adafd3e326ea8c4de8d128c12d37dae6f4aa2fdf | refs/heads/master | 2020-04-26T03:24:56.668477 | 2015-08-30T15:47:19 | 2015-08-30T15:47:19 | 41,633,543 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,105 | java | package newland.iaf.base.model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
import newland.iaf.base.model.dict.FundFlowStat;
import newland.iaf.base.model.dict.FundFlowType;
import newland.iaf.base.model.dict.GateWayType;
import org.hibernate.annotations.Index;
@Entity
@Table(name = "t_fund_flow", uniqueConstraints = { @UniqueConstraint(columnNames = "trace_no") })
@org.hibernate.annotations.Table(appliesTo = "t_fund_flow", indexes = {
@Index(name = "idx_fund_flow1", columnNames = { "oth_sys_no" }),
@Index(name = "idx_fund_flow2", columnNames = { "type", "status" })
})
public class FundFlow implements Serializable {
/**
*
*/
private static final long serialVersionUID = -2611974256279128560L;
@Id
@TableGenerator(name = "i_fund_flow", initialValue = 100, allocationSize = 100)
@GeneratedValue(strategy = GenerationType.TABLE, generator = "i_fund_flow")
@Column(name = "i_fund_flow")
private Long ifundFlow;
/**
* 流水号
*/
@Column (name = "trace_no", length = 16, nullable = false)
private String traceNo;
/**
* 机构代号
*/
@Column (name = "i_inst", nullable = false)
private Long iinst;
/**
* 机构代码
*/
@Column (name = "inst_id", length = 20)
private String instId;
/**
* 机构名称
*/
@Column (name = "inst_name", length = 100)
private String instName;
/**
* 商户代号
*/
@Column (name = "i_merch", nullable = false)
private Long imerch;
/**
* 商户代码
*/
@Column (name = "merch_id", length = 20)
private String merchId;
/**
* 商户名称
*/
@Column (name = "merch_name", length = 100)
private String merchName;
/**
* 资金类型
*/
@Enumerated
@Column (name = "type", nullable = false)
private FundFlowType type;
/**
* 订单代号
*/
@Column (name = "i_loan_ord", nullable = false)
private Long iloanOrd;
/**
* 订单代码
*/
@Column (name = "loan_ord_id", length = 12, nullable = false)
private String loanOrdId;
/**
* 计划代号
*/
@Column (name = "i_loanord_plan")
private Long iloanOrdPlan;
/**
* 计划期号
*/
@Column (name = "period")
private Integer period;
/**
* 交易金额
*/
@Column (name = "amount", nullable = false)
private BigDecimal amount;
/**
* 总还款额
*/
@Column (name = "capital", nullable = false)
private BigDecimal capital;
@Transient
private BigDecimal wanyuanCapital;
/**
* 对方系统流水号
*/
@Column (name = "oth_sys_no", length = 32)
private String otherSysTraceNo;
/**
* 生成日期
*/
@Column (name = "gen_time", nullable = false)
private Date genTime;
/**
* 更新日期
*/
@Column (name = "upd_time", nullable = false)
private Date updTime;
/**
* 备注
*/
@Column (name = "memo", length = 50)
private String memo;
/**
* 对账备注
*/
@Column(name="check_Memo")
private String checkMemo;
/**
* 流水状态
*/
@Enumerated
@Column (name = "status", nullable = false)
private FundFlowStat status;
@Transient
private BigDecimal wanyuanAmount;
/**
* 版本号
*/
@Version
@Column (name = "version")
private Integer version;
@Enumerated
@Column (name = "trans_type")
private GateWayType transType;
@Column (name = "recive_acct_no", length = 50)
private String reciveAcctNo;
@Column (name = "recive_acct_name", length = 100)
private String reciveAcctName;
@Column (name = "recive_bank_name", length = 200)
private String reiciveBankName;
@Column (name = "recive_bank_code", length = 20)
private String reciveBankCode;
public Long getIfundFlow() {
return ifundFlow;
}
public void setIfundFlow(Long ifundFlow) {
this.ifundFlow = ifundFlow;
}
public String getTraceNo() {
return traceNo;
}
public void setTraceNo(String traceNo) {
this.traceNo = traceNo;
}
public Long getIinst() {
return iinst;
}
public void setIinst(Long iinst) {
this.iinst = iinst;
}
public String getInstId() {
return instId;
}
public void setInstId(String instId) {
this.instId = instId;
}
public Long getImerch() {
return imerch;
}
public void setImerch(Long imerch) {
this.imerch = imerch;
}
public String getMerchId() {
return merchId;
}
public void setMerchId(String merchId) {
this.merchId = merchId;
}
public FundFlowType getType() {
return type;
}
public void setType(FundFlowType type) {
this.type = type;
}
public Long getIloanOrd() {
return iloanOrd;
}
public void setIloanOrd(Long iloanOrd) {
this.iloanOrd = iloanOrd;
}
public String getLoanOrdId() {
return loanOrdId;
}
public void setLoanOrdId(String loanOrdId) {
this.loanOrdId = loanOrdId;
}
public Long getIloanOrdPlan() {
return iloanOrdPlan;
}
public void setIloanOrdPlan(Long iloanOrdPlan) {
this.iloanOrdPlan = iloanOrdPlan;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public String getOtherSysTraceNo() {
return otherSysTraceNo;
}
public void setOtherSysTraceNo(String otherSysTraceNo) {
this.otherSysTraceNo = otherSysTraceNo;
}
public Date getGenTime() {
return genTime;
}
public void setGenTime(Date genTime) {
this.genTime = genTime;
}
public Date getUpdTime() {
return updTime;
}
public void setUpdTime(Date updTime) {
this.updTime = updTime;
}
public FundFlowStat getStatus() {
return status;
}
public void setStatus(FundFlowStat stat) {
this.status = stat;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public String getInstName() {
return instName;
}
public void setInstName(String instName) {
this.instName = instName;
}
public String getMerchName() {
return merchName;
}
public void setMerchName(String merchName) {
this.merchName = merchName;
}
public BigDecimal getCapital() {
return capital;
}
public void setCapital(BigDecimal capital) {
this.capital = capital;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public GateWayType getTransType() {
return transType;
}
public void setTransType(GateWayType transType) {
this.transType = transType;
}
public String getReciveAcctNo() {
return reciveAcctNo;
}
public void setReciveAcctNo(String reciveAcctNo) {
this.reciveAcctNo = reciveAcctNo;
}
public String getReciveAcctName() {
return reciveAcctName;
}
public void setReciveAcctName(String reciveAcctName) {
this.reciveAcctName = reciveAcctName;
}
public String getReiciveBankName() {
return reiciveBankName;
}
public void setReiciveBankName(String reiciveBankName) {
this.reiciveBankName = reiciveBankName;
}
public String getReciveBankCode() {
return reciveBankCode;
}
public void setReciveBankCode(String reciveBankCode) {
this.reciveBankCode = reciveBankCode;
}
public BigDecimal getWanyuanAmount() {
return amount.divide(new BigDecimal(10000),1,BigDecimal.ROUND_HALF_UP).setScale(1);
}
public String getCheckMemo() {
return checkMemo;
}
public void setCheckMemo(String checkMemo) {
this.checkMemo = checkMemo;
}
public BigDecimal getWanyuanCapital() {
return capital.divide(new BigDecimal(10000),1,BigDecimal.ROUND_UNNECESSARY).setScale(1);
}
}
| [
"17525543@qq.com"
] | 17525543@qq.com |
2276a1f5ce3e38fc5c1249a75223db6466a17ae1 | 56b6c82ac3f51d9e93606a456d962114f0e4c446 | /app/src/main/java/yc/com/english_study/base/widget/MainToolBar.java | d6198f7e44d268a7658a1bef9e7cef58d76856e8 | [
"MIT"
] | permissive | YangChengTeam/english_study | c7599e2fde8ad12624254827753cccdb3158d37a | 4d62f06204a6b700af2cb4295cccc24bf0d17b0e | refs/heads/master | 2022-02-22T15:39:40.504692 | 2022-02-11T06:13:23 | 2022-02-11T06:13:23 | 183,552,825 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 502 | java | package yc.com.english_study.base.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;
import butterknife.BindView;
import yc.com.english_study.R;
/**
* Created by wanglin on 2018/10/24 17:45.
*/
public class MainToolBar extends BaseToolBar {
public MainToolBar(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public int getLayoutId() {
return R.layout.main_toolbar_view;
}
}
| [
"2037097758@qq.com"
] | 2037097758@qq.com |
2d06e655543c73c408d761f534f013cb23d23c5b | 4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849 | /aliyun-java-sdk-vcs/src/main/java/com/aliyuncs/vcs/model/v20200515/CreateDeviceResponse.java | 308709add0e43a26915b72e115e2fdaecfe913c1 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-java-sdk | a263fa08e261f12d45586d1b3ad8a6609bba0e91 | e19239808ad2298d32dda77db29a6d809e4f7add | refs/heads/master | 2023-09-03T12:28:09.765286 | 2023-09-01T09:03:00 | 2023-09-01T09:03:00 | 39,555,898 | 1,542 | 1,317 | NOASSERTION | 2023-09-14T07:27:05 | 2015-07-23T08:41:13 | Java | UTF-8 | Java | false | false | 3,423 | 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.vcs.model.v20200515;
import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.vcs.transform.v20200515.CreateDeviceResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class CreateDeviceResponse extends AcsResponse {
private String requestId;
private String code;
private String message;
private Data data;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
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 Data getData() {
return this.data;
}
public void setData(Data data) {
this.data = data;
}
public static class Data {
private String serverId;
private String serverIp;
private String serverRealm;
private String serverPort;
private String deviceId;
private String password;
private List<SubDeviceInfoItem> subDeviceInfo;
public String getServerId() {
return this.serverId;
}
public void setServerId(String serverId) {
this.serverId = serverId;
}
public String getServerIp() {
return this.serverIp;
}
public void setServerIp(String serverIp) {
this.serverIp = serverIp;
}
public String getServerRealm() {
return this.serverRealm;
}
public void setServerRealm(String serverRealm) {
this.serverRealm = serverRealm;
}
public String getServerPort() {
return this.serverPort;
}
public void setServerPort(String serverPort) {
this.serverPort = serverPort;
}
public String getDeviceId() {
return this.deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public List<SubDeviceInfoItem> getSubDeviceInfo() {
return this.subDeviceInfo;
}
public void setSubDeviceInfo(List<SubDeviceInfoItem> subDeviceInfo) {
this.subDeviceInfo = subDeviceInfo;
}
public static class SubDeviceInfoItem {
private String subDeviceId;
public String getSubDeviceId() {
return this.subDeviceId;
}
public void setSubDeviceId(String subDeviceId) {
this.subDeviceId = subDeviceId;
}
}
}
@Override
public CreateDeviceResponse getInstance(UnmarshallerContext context) {
return CreateDeviceResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
311eddfcb7b711db2a17a408b4ba46b1899cd21c | 3b1854e87628325ee5e6ccbd6800df041082c275 | /tanaar_171207/src/main/java/glidedisanfang/tyq/com/tanaar_171207/util_Jar/DeviceUtils.java | d14f8f1c5a9226c3ec4e56dcce59b25c2d24c469 | [] | no_license | tanyinqing/MyCamara | 3b159320a950fc73627896be886df615d76a64d6 | 10e4d7a4571a1294c9dc37b078484284f503aab6 | refs/heads/master | 2020-03-29T08:23:59.790880 | 2018-09-21T04:44:48 | 2018-09-21T04:44:48 | 130,452,350 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,281 | java | package glidedisanfang.tyq.com.tanaar_171207.util_Jar;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.PowerManager;
import android.provider.Settings;
import java.io.File;
import java.net.NetworkInterface;
import java.util.Collections;
import java.util.List;
/**
* <pre>
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/1
* desc : 设备相关工具类
* </pre>
*/
public final class DeviceUtils {
private DeviceUtils() {
throw new UnsupportedOperationException("u can't instantiate me...");
}
/**
* 判断设备是否root
*
* @return the boolean{@code true}: 是<br>{@code false}: 否
*/
public static boolean isDeviceRooted() {
String su = "su";
String[] locations = {"/system/bin/", "/system/xbin/", "/sbin/", "/system/sd/xbin/", "/system/bin/failsafe/",
"/data/local/xbin/", "/data/local/bin/", "/data/local/"};
for (String location : locations) {
if (new File(location + su).exists()) {
return true;
}
}
return false;
}
/**
* 获取设备系统版本号
*
* @return 设备系统版本号
*/
public static int getSDKVersion() {
return Build.VERSION.SDK_INT;
}
/**
* 获取设备AndroidID
*
* @return AndroidID
*/
@SuppressLint("HardwareIds")
public static String getAndroidID() {
return Settings.Secure.getString(Utils.getContext().getContentResolver(), Settings.Secure.ANDROID_ID);
}
/**
* 获取设备MAC地址
* <p>需添加权限 {@code <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>}</p>
* <p>需添加权限 {@code <uses-permission android:name="android.permission.INTERNET"/>}</p>
*
* @return MAC地址
*/
public static String getMacAddress() {
String macAddress = getMacAddressByWifiInfo();
if (!"02:00:00:00:00:00".equals(macAddress)) {
return macAddress;
}
macAddress = getMacAddressByNetworkInterface();
if (!"02:00:00:00:00:00".equals(macAddress)) {
return macAddress;
}
macAddress = getMacAddressByFile();
if (!"02:00:00:00:00:00".equals(macAddress)) {
return macAddress;
}
return "please open wifi";
}
/**
* 获取设备MAC地址
* <p>需添加权限 {@code <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>}</p>
*
* @return MAC地址
*/
@SuppressLint("HardwareIds")
private static String getMacAddressByWifiInfo() {
try {
@SuppressLint("WifiManagerLeak")
WifiManager wifi = (WifiManager) Utils.getContext().getSystemService(Context.WIFI_SERVICE);
if (wifi != null) {
WifiInfo info = wifi.getConnectionInfo();
if (info != null) return info.getMacAddress();
}
} catch (Exception e) {
e.printStackTrace();
}
return "02:00:00:00:00:00";
}
/**
* 获取设备MAC地址
* <p>需添加权限 {@code <uses-permission android:name="android.permission.INTERNET"/>}</p>
*
* @return MAC地址
*/
private static String getMacAddressByNetworkInterface() {
try {
List<NetworkInterface> nis = Collections.list(NetworkInterface.getNetworkInterfaces());
for (NetworkInterface ni : nis) {
if (!ni.getName().equalsIgnoreCase("wlan0")) continue;
byte[] macBytes = ni.getHardwareAddress();
if (macBytes != null && macBytes.length > 0) {
StringBuilder res1 = new StringBuilder();
for (byte b : macBytes) {
res1.append(String.format("%02x:", b));
}
return res1.deleteCharAt(res1.length() - 1).toString();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return "02:00:00:00:00:00";
}
/**
* 获取设备MAC地址
*
* @return MAC地址
*/
private static String getMacAddressByFile() {
ShellUtils.CommandResult result = ShellUtils.execCmd("getprop wifi.interface", false);
if (result.result == 0) {
String name = result.successMsg;
if (name != null) {
result = ShellUtils.execCmd("cat /sys/class/net/" + name + "/address", false);
if (result.result == 0) {
if (result.successMsg != null) {
return result.successMsg;
}
}
}
}
return "02:00:00:00:00:00";
}
/**
* 获取设备厂商
* <p>如Xiaomi</p>
*
* @return 设备厂商
*/
public static String getManufacturer() {
return Build.MANUFACTURER;
}
/**
* 获取设备型号
* <p>如MI2SC</p>
*
* @return 设备型号
*/
public static String getModel() {
String model = Build.MODEL;
if (model != null) {
model = model.trim().replaceAll("\\s*", "");
} else {
model = "";
}
return model;
}
/**
* 关机
* <p>需要root权限或者系统权限 {@code <android:sharedUserId="android.uid.system"/>}</p>
*/
public static void shutdown() {
ShellUtils.execCmd("reboot -p", true);
Intent intent = new Intent("android.intent.action.ACTION_REQUEST_SHUTDOWN");
intent.putExtra("android.intent.extra.KEY_CONFIRM", false);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Utils.getContext().startActivity(intent);
}
/**
* 重启
* <p>需要root权限或者系统权限 {@code <android:sharedUserId="android.uid.system"/>}</p>
*
*/
public static void reboot() {
ShellUtils.execCmd("reboot", true);
Intent intent = new Intent(Intent.ACTION_REBOOT);
intent.putExtra("nowait", 1);
intent.putExtra("interval", 1);
intent.putExtra("window", 0);
Utils.getContext().sendBroadcast(intent);
}
/**
* 重启
* <p>需系统权限 {@code <android:sharedUserId="android.uid.system"/>}</p>
*
* @param reason 传递给内核来请求特殊的引导模式,如"recovery"
*/
public static void reboot(final String reason) {
PowerManager mPowerManager = (PowerManager) Utils.getContext().getSystemService(Context.POWER_SERVICE);
try {
mPowerManager.reboot(reason);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 重启到recovery
* <p>需要root权限</p>
*/
public static void reboot2Recovery() {
ShellUtils.execCmd("reboot recovery", true);
}
/**
* 重启到bootloader
* <p>需要root权限</p>
*/
public static void reboot2Bootloader() {
ShellUtils.execCmd("reboot bootloader", true);
}
}
| [
"289367447@qq.com"
] | 289367447@qq.com |
34e9da912e38bae5d0fa5063d43af4c8302bd45c | 34eb46670a820c9ae41233116278befca571fb00 | /app/src/main/java/com/example/mayank/rock_paper_scissor/Meena.java | f9e9d513b0c7282cfb11820327213994d63d8e35 | [] | no_license | mayankShukla17/HomeDeliverySalonApp | 2da8053daa028114e1868fdd8e9e6b1675568365 | ff3417bb835a9d58faec1fde119438ad3865f7f7 | refs/heads/master | 2022-11-10T15:04:35.858353 | 2020-06-28T10:32:56 | 2020-06-28T10:32:56 | 275,560,293 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 962 | java | package com.example.mayank.rock_paper_scissor;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ViewFlipper;
public class Meena extends AppCompatActivity {
Animation Fadein,Fadeout;
ViewFlipper viewFlipper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_meena);
viewFlipper=(ViewFlipper)findViewById(R.id.viewFlipper);
Fadein= AnimationUtils.loadAnimation(this,R.anim.slidein);
Fadeout= AnimationUtils.loadAnimation(this,R.anim.slideout);
viewFlipper.setInAnimation(Fadein);
viewFlipper.setOutAnimation(Fadeout);
viewFlipper.setAutoStart(true);
viewFlipper.setFlipInterval(3000);
viewFlipper.startFlipping();
}
}
| [
"mayankgonda@gmail.com"
] | mayankgonda@gmail.com |
e673fb550e8bf36c54ae728570fc393615ced726 | 9d9189ad81b77b72bb817eaefdf6b4565bcac0ad | /src/classifiers/KNN.java | 6f6d493eb6f71b9753085d9054eb75afe6293894 | [] | no_license | sergioceron/JBigMining | f4fc0128eb8bde96bffb878455a95bf38313cbb5 | ac875abc58cdc559570ebddcf7abfe4796da58c5 | refs/heads/master | 2020-12-03T07:54:53.299812 | 2015-05-20T05:15:15 | 2015-05-20T05:15:15 | 35,796,812 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,580 | java | package classifiers;
import core.Dataset;
import core.PRObject;
import core.interfaces.IClassifier;
import java.util.ArrayList;
import java.util.List;
/**
* Created by sergio on 17/05/15.
*/
public class KNN implements IClassifier {
private int k;
private Dataset training;
public KNN() {
this.k = 1;
}
public KNN( int k ) {
this.k = k;
}
public void train( Dataset training ) {
this.training = training;
}
public String classify( PRObject obj ) {
if( training.size() > 0 ) {
Dataset nearest = KNearest.findNeighbors( training, obj, k );
// TODO: change to hashmap, cuz ArrayList's are not ordered list
List<String> classLabels = new ArrayList<String>();
List<Integer> counts = new ArrayList<Integer>();
for( PRObject neighbor : nearest ) {
int idx = classLabels.indexOf( neighbor.getClassLabel() );
if( idx == -1 ) {
classLabels.add( neighbor.getClassLabel() );
idx = classLabels.indexOf( neighbor.getClassLabel() );
counts.add( 1 );
} else {
counts.set( idx, counts.get( idx ) + 1 );
}
}
int maxIndex = 0;
for( int i = 1; i < counts.size(); i++ )
if( counts.get( i ) > counts.get( maxIndex ) ) {
maxIndex = i;
}
return classLabels.get( maxIndex );
} else
return "";
}
}
| [
"sceronf@gmail.com"
] | sceronf@gmail.com |
fdedafeba99d66ae746ab8420d0bce96a1bf7970 | a3f138ffcfec82512716be5f74642eec8d4643c5 | /src/cn/jcloud/srm/common/msg/MsgResult.java | a8697271fdd923358bdf3450a77d2d7f88de99d5 | [] | no_license | jiangwei19920723/axis2 | 0afd99c141bd9edf51c85d243f628d1ff3a677e1 | 081a0e96fcdb2514325ab331580a88926c46608a | refs/heads/master | 2020-03-09T04:27:49.509853 | 2018-04-09T07:21:09 | 2018-04-09T07:21:09 | 128,588,358 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,307 | java | package cn.jcloud.srm.common.msg;
/**
* @author 蒋维
* @date 创建时间:2017年9月12日 下午2:06:36
* @version 1.0
* @parameter
* @since
* @return
*/
public class MsgResult {
private char ztype;//消息类型: S 成功,E 错误
private String zmessage;//消息文本
private String freeUse1;
private String freeUse2;
private String freeUse3;
private String freeUse4;
private String freeUse5;
public char getZtype() {
return ztype;
}
public void setZtype(char ztype) {
this.ztype = ztype;
}
public String getZmessage() {
return zmessage;
}
public void setZmessage(String zmessage) {
this.zmessage = zmessage;
}
public String getFreeUse1() {
return freeUse1;
}
public void setFreeUse1(String freeUse1) {
this.freeUse1 = freeUse1;
}
public String getFreeUse2() {
return freeUse2;
}
public void setFreeUse2(String freeUse2) {
this.freeUse2 = freeUse2;
}
public String getFreeUse3() {
return freeUse3;
}
public void setFreeUse3(String freeUse3) {
this.freeUse3 = freeUse3;
}
public String getFreeUse4() {
return freeUse4;
}
public void setFreeUse4(String freeUse4) {
this.freeUse4 = freeUse4;
}
public String getFreeUse5() {
return freeUse5;
}
public void setFreeUse5(String freeUse5) {
this.freeUse5 = freeUse5;
}
}
| [
"719212089@qq.com"
] | 719212089@qq.com |
acee1fdeee3055cef01f341730b730462ea23f23 | 69cb5ec62e23a38440adb26b9e3ebff0ade42f2b | /zoom-dao/src/test/java/org/zoomdev/zoom/dao/entities/ErrorCannotFindField.java | a255ad7fdaee66e32e68bdd2da49c7dfecc44781 | [
"ISC",
"MIT"
] | permissive | zoom-framework/zoom | a941aa06dcf87a61590494898e4d58252c0f52b1 | ad5d6cee4aaef9bfb089af246106145ff0176040 | refs/heads/master | 2022-08-03T16:06:25.520593 | 2019-07-03T22:06:28 | 2019-07-03T22:06:28 | 157,067,525 | 1 | 0 | MIT | 2022-06-21T00:52:06 | 2018-11-11T10:08:57 | Java | UTF-8 | Java | false | false | 444 | java | package org.zoomdev.zoom.dao.entities;
import org.zoomdev.zoom.dao.annotations.Join;
import org.zoomdev.zoom.dao.annotations.Link;
import org.zoomdev.zoom.dao.annotations.Table;
@Link({@Join(table = "type", on = "tpId=typeId")})
@Table("product")
public class ErrorCannotFindField {
public String getTest() {
return test;
}
public void setTest(String test) {
this.test = test;
}
private String test;
}
| [
"jzoom8112@gmail.com"
] | jzoom8112@gmail.com |
69f9350f0983299ec4b0831d8a909bbca0d934ae | 689cdf772da9f871beee7099ab21cd244005bfb2 | /classes/com/d/a/c/at.java | fd8155c3737e38f981b7082ba8b979ab9690df6d | [] | no_license | waterwitness/dazhihui | 9353fd5e22821cb5026921ce22d02ca53af381dc | ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3 | refs/heads/master | 2020-05-29T08:54:50.751842 | 2016-10-08T08:09:46 | 2016-10-08T08:09:46 | 70,314,359 | 2 | 4 | null | null | null | null | UTF-8 | Java | false | false | 321 | java | package com.d.a.c;
public class at
extends Exception
{
public at(String paramString, Throwable paramThrowable)
{
super(paramString, paramThrowable);
}
}
/* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\d\a\c\at.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"1776098770@qq.com"
] | 1776098770@qq.com |
bbf148f9a835111efd45f5d5b5960aee88a6c97b | fff8d45864fdca7f43e6d65acbe4c1f469531877 | /erp_desktop_all/src_tesoreria/com/bydan/erp/tesoreria/presentation/web/jsf/sessionbean/report/RemesasTransitoSessionBeanAdditional.java | 58a4c97c7a933cce1ac62323e06816c3e32bc357 | [
"Apache-2.0"
] | permissive | jarocho105/pre2 | 26b04cc91ff1dd645a6ac83966a74768f040f418 | f032fc63741b6deecdfee490e23dfa9ef1f42b4f | refs/heads/master | 2020-09-27T16:16:52.921372 | 2016-09-01T04:34:56 | 2016-09-01T04:34:56 | 67,095,806 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 903 | java |
/*
*ADVERTENCIA : Este programa esta protegido por la ley de derechos de autor.
*La reproducci?n o distribuci?n il?cita de este programa o de cualquiera de
*sus partes esta penado por la ley con severas sanciones civiles y penales,
*y ser?n objeto de todas las sanciones legales que correspondan.
*/
package com.bydan.erp.tesoreria.presentation.web.jsf.sessionbean.report;
import java.util.List;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.ArrayList;
import java.io.Serializable;
import java.util.Date;
import com.bydan.framework.erp.business.entity.DatoGeneral;
import com.bydan.framework.erp.business.entity.GeneralEntitySessionBean;
@SuppressWarnings("unused")
public class RemesasTransitoSessionBeanAdditional extends GeneralEntitySessionBean {
public RemesasTransitoSessionBeanAdditional () {
}
} | [
"byrondanilo10@hotmail.com"
] | byrondanilo10@hotmail.com |
3140f603292b743d75fb7fc6808f5f8fdb26464c | c0fe21b86f141256c85ab82c6ff3acc56b73d3db | /cps/src/main/java/com/jdcloud/sdk/service/cps/model/AssignIpv6GatewayRequest.java | 035731dda4c58da97ab83c3eb37f7d38a8b4e1b1 | [
"Apache-2.0"
] | permissive | jdcloud-api/jdcloud-sdk-java | 3fec9cf552693520f07b43a1e445954de60e34a0 | bcebe28306c4ccc5b2b793e1a5848b0aac21b910 | refs/heads/master | 2023-07-25T07:03:36.682248 | 2023-07-25T06:54:39 | 2023-07-25T06:54:39 | 126,275,669 | 47 | 61 | Apache-2.0 | 2023-09-07T08:41:24 | 2018-03-22T03:41:41 | Java | UTF-8 | Java | false | false | 4,064 | java | /*
* Copyright 2018 JDCLOUD.COM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:#www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Cloud-Physical-Server
* 云物理服务器私有网络操作相关的接口
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.cps.model;
import com.jdcloud.sdk.annotation.Required;
import com.jdcloud.sdk.service.JdcloudRequest;
/**
* 申请开通IPv6网关
*/
public class AssignIpv6GatewayRequest extends JdcloudRequest implements java.io.Serializable {
private static final long serialVersionUID = 1L;
/**
* 由客户端生成,用于保证请求的幂等性,长度不能超过36个字符;<br/>
如果多个请求使用了相同的clientToken,只会执行第一个请求,之后的请求直接返回第一个请求的结果<br/>
*/
private String clientToken;
/**
* 地域ID,可调用接口(describeRegiones)获取云物理服务器支持的地域
* Required:true
*/
@Required
private String regionId;
/**
* 私有网络ID
* Required:true
*/
@Required
private String vpcId;
/**
* get 由客户端生成,用于保证请求的幂等性,长度不能超过36个字符;<br/>
如果多个请求使用了相同的clientToken,只会执行第一个请求,之后的请求直接返回第一个请求的结果<br/>
*
* @return
*/
public String getClientToken() {
return clientToken;
}
/**
* set 由客户端生成,用于保证请求的幂等性,长度不能超过36个字符;<br/>
如果多个请求使用了相同的clientToken,只会执行第一个请求,之后的请求直接返回第一个请求的结果<br/>
*
* @param clientToken
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
* get 地域ID,可调用接口(describeRegiones)获取云物理服务器支持的地域
*
* @return
*/
public String getRegionId() {
return regionId;
}
/**
* set 地域ID,可调用接口(describeRegiones)获取云物理服务器支持的地域
*
* @param regionId
*/
public void setRegionId(String regionId) {
this.regionId = regionId;
}
/**
* get 私有网络ID
*
* @return
*/
public String getVpcId() {
return vpcId;
}
/**
* set 私有网络ID
*
* @param vpcId
*/
public void setVpcId(String vpcId) {
this.vpcId = vpcId;
}
/**
* set 由客户端生成,用于保证请求的幂等性,长度不能超过36个字符;<br/>
如果多个请求使用了相同的clientToken,只会执行第一个请求,之后的请求直接返回第一个请求的结果<br/>
*
* @param clientToken
*/
public AssignIpv6GatewayRequest clientToken(String clientToken) {
this.clientToken = clientToken;
return this;
}
/**
* set 地域ID,可调用接口(describeRegiones)获取云物理服务器支持的地域
*
* @param regionId
*/
public AssignIpv6GatewayRequest regionId(String regionId) {
this.regionId = regionId;
return this;
}
/**
* set 私有网络ID
*
* @param vpcId
*/
public AssignIpv6GatewayRequest vpcId(String vpcId) {
this.vpcId = vpcId;
return this;
}
} | [
"tancong@jd.com"
] | tancong@jd.com |
ab79e8138670fbc76a81904043b7f45260a74241 | 7329676ad6da522bc5c144e8f6f66df0e994d950 | /Project2/src/center.java | 9a6283708afb23ac125d7430b0d68657eb461c6f | [] | no_license | alrha486/SIST | 76b53b5a0a5716948217b87f2bcc31a983a68500 | ddd2b405909aa86b7abaf68bb0caae71b3ddf7f0 | refs/heads/master | 2020-03-26T21:32:58.719883 | 2018-09-12T05:39:34 | 2018-09-12T05:39:34 | 145,394,090 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 279 | java |
public class center {
public static void main(String[] args) {
PhoneFee [] pf = new PhoneFee[100];
Input input = new Input(pf);
int count = input.input();
Calc calc = new Calc(pf,count);
calc.calc();
// System.out.println(pf[0].getName());
// input.input();
}
}
| [
"alrha486@naver.com"
] | alrha486@naver.com |
51375405f17dfcd826d5ec3fffe28b77d89821b8 | 98e53f3932ecce2a232d0c314527efe49f62e827 | /org.rcfaces.jfreechart/src/org/rcfaces/jfreechart/renderer/ChartContentModel.java | b8d0528aceb74ac500856a7a86a6fed1829f0650 | [] | no_license | Vedana/rcfaces-2 | f053a4ebb8bbadd02455d89a5f1cb870deade6da | 4112cfe1117c4bfcaf42f67fe5af32a84cf52d41 | refs/heads/master | 2020-04-02T15:03:08.653984 | 2014-04-18T09:36:54 | 2014-04-18T09:36:54 | 11,175,963 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,995 | java | /*
* $Id: ChartContentModel.java,v 1.1 2011/04/12 09:26:25 oeuillot Exp $
*/
package org.rcfaces.jfreechart.renderer;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import javax.faces.FacesException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jfree.ui.Drawable;
import org.rcfaces.core.image.ImageContentModel;
/**
*
* @author Olivier Oeuillot (latest modification by $Author: oeuillot $)
* @version $Revision: 1.1 $ $Date: 2011/04/12 09:26:25 $
*/
public class ChartContentModel extends ImageContentModel {
private static final Log LOG = LogFactory.getLog(ChartContentModel.class);
@Override
protected BufferedImage getBufferedImage() {
GenerationChartInformation chartInformation = (GenerationChartInformation) generationInformation;
BufferedImage bufferedImage = new BufferedImage(chartInformation
.getImageWidth(), chartInformation.getImageHeight(),
BufferedImage.TYPE_INT_RGB);
Drawable drawable = chartInformation.getDrawable();
if (drawable == null) {
throw new FacesException("Drawable is NULL !");
}
if (LOG.isDebugEnabled()) {
LOG.debug("Start generating jfreechart '" + drawable + "'");
}
long t = System.currentTimeMillis();
Graphics2D g = bufferedImage.createGraphics();
try {
drawable.draw(g, new Rectangle(0, 0, bufferedImage.getWidth(),
bufferedImage.getHeight()));
} catch (Throwable th) {
LOG.error("Can not draw chart", th);
throw new FacesException("Can not draw chart", th);
} finally {
g.dispose();
}
t = System.currentTimeMillis() - t;
if (LOG.isDebugEnabled()) {
LOG.debug("Jfreechart generated '" + drawable + "' (" + t + " ms)");
}
return bufferedImage;
}
}
| [
"jbmeslin@vedana.com"
] | jbmeslin@vedana.com |
f2e7a8c715a09ddce74201f9baa0981aa543539c | 8c22de5cfc90a8e56a8bae5cac71d9d199b252f5 | /rabbitmq-api/src/main/java/com/bfxy/rabbitmq/api/dlx/Consumer.java | 5c659e299af06b77f0278889ee15ebd4368d610c | [] | no_license | LXZ314157/coding-262 | 4b2d8f8086a3f753e4fbd812158092e4461f9196 | 613cbce1d5866833ad94d5fbf835243889bd7c26 | refs/heads/master | 2022-06-23T19:06:08.559346 | 2020-02-24T10:23:54 | 2020-02-24T10:23:54 | 243,477,259 | 1 | 0 | null | 2022-06-17T02:59:40 | 2020-02-27T09:12:23 | Java | UTF-8 | Java | false | false | 1,561 | java | package com.bfxy.rabbitmq.api.dlx;
import java.util.HashMap;
import java.util.Map;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.QueueingConsumer;
import com.rabbitmq.client.QueueingConsumer.Delivery;
public class Consumer {
public static void main(String[] args) throws Exception {
ConnectionFactory connectionFactory = new ConnectionFactory();
connectionFactory.setHost("localhost");
connectionFactory.setPort(5672);
connectionFactory.setVirtualHost("/");
Connection connection = connectionFactory.newConnection();
Channel channel = connection.createChannel();
// 这就是一个普通的交换机 和 队列 以及路由
String exchangeName = "test_dlx_exchange";
String routingKey = "dlx.#";
String queueName = "test_dlx_queue";
channel.exchangeDeclare(exchangeName, "topic", true, false, null);
Map<String, Object> agruments = new HashMap<String, Object>();
agruments.put("x-dead-letter-exchange", "dlx.exchange");
//这个agruments属性,要设置到声明队列上
channel.queueDeclare(queueName, true, false, false, agruments);
channel.queueBind(queueName, exchangeName, routingKey);
//要进行死信队列的声明:
channel.exchangeDeclare("dlx.exchange", "topic", true, false, null);
channel.queueDeclare("dlx.queue", true, false, false, null);
channel.queueBind("dlx.queue", "dlx.exchange", "#");
channel.basicConsume(queueName, true, new MyConsumer(channel));
}
}
| [
"1510878954@qq.com"
] | 1510878954@qq.com |
7579bef68f760307c9eeac76a0d5d1bce6dd4608 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mapsdk/internal/pl$1.java | 4ede84d729504207176740945ce507c1873b02cb | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 242 | java | package com.tencent.mapsdk.internal;
final class pl$1 {}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: com.tencent.mapsdk.internal.pl.1
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
6f7b37c0c176eeb60ad22c2bdedef3afc6836148 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/71/org/apache/commons/math/optimization/SimpleVectorialPointChecker_SimpleVectorialPointChecker_50.java | d1e042d4ed97a448d80cf765f4c90670c449297a | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 617 | java |
org apach common math optim
simpl implement link vectori converg checker vectorialconvergencecheck
point coordin
converg consid reach rel
differ point coordin smaller threshold
absolut differ point coordin
smaller threshold
version revis date
simpl vectori point checker simplevectorialpointcheck vectori converg checker vectorialconvergencecheck
build instanc threshold
simpl vectori point checker simplevectorialpointcheck
rel threshold relativethreshold default rel threshold
absolut threshold absolutethreshold default absolut threshold
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
ba1cb972469c5f537b75dcc355e54d944ab1c238 | 8be75850ec7823a92bc86b5488487813cbdb7214 | /StepView/src/main/java/com/czy/stepview/stepview/VerticalStepView.java | 304c088b39afff295a7f7176b895092ede6ba6d0 | [] | no_license | shihyu/AndroidDemo | 5f60e783b1d56f02e71734300177fff1d424689c | be0c073e7b40efff0ce85e9e7a945fa18a071160 | refs/heads/master | 2020-03-28T17:51:11.816591 | 2016-12-16T12:01:08 | 2016-12-16T12:01:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,560 | java | package com.czy.stepview.stepview;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import com.czy.stepview.R;
/**
* Created by chenzhiyong on 2016/10/29.
*/
public class VerticalStepView extends ViewGroup {
private static final String TAG = "VerticalStepView";
public VerticalStepView(Context context) {
super(context);
init(context, null);
}
public VerticalStepView(Context context, AttributeSet attrs) {
super(context, attrs);
init(context, attrs);
}
public VerticalStepView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context, attrs);
}
private BaseStepViewAdapter mAdapter;
private Context mContext;
private Drawable mCompleteDrawable;
private Drawable mDoingDrawable;
private int drawableWidth;
private int mLineColor;
private int mItemDieviderHeight;
private int mDrawablePaddingItemVal;
private Paint mLinePaint;
private void init(Context context, AttributeSet attrs) {
mCompleteDrawable = context.getResources().getDrawable(R.drawable.icon_point_light);
mDoingDrawable = context.getResources().getDrawable(R.drawable.icon_point);
mLineColor = Color.BLACK;
drawableWidth = mDoingDrawable.getIntrinsicWidth();
mItemDieviderHeight = 3 * 20;
mDrawablePaddingItemVal = 3 * 20;
mLinePaint = new Paint();
mLinePaint.setColor(mLineColor);
mLinePaint.setStyle(Paint.Style.FILL);
mLinePaint.setStrokeWidth(2);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
int contentWidth = widthSize - getPaddingLeft() - getPaddingRight() - drawableWidth - mDrawablePaddingItemVal;
int childMeasureWidthSpec = MeasureSpec.makeMeasureSpec(contentWidth, MeasureSpec.AT_MOST);
int childMeasureHeightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
int allItemHeight = 0;
for (int i = 0; i < getChildCount(); i++) {
getChildAt(i).measure(childMeasureWidthSpec, childMeasureHeightSpec);
if (i != getChildCount() - 1) {
allItemHeight = allItemHeight + getChildAt(i).getMeasuredHeight() + mItemDieviderHeight;
} else {
allItemHeight += getChildAt(i).getMeasuredHeight();
}
}
int viewHeight = allItemHeight + getPaddingBottom() + getPaddingTop();
setMeasuredDimension(widthSize, viewHeight);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
int lineLeft = getPaddingLeft() + drawableWidth / 2;
int lineRight = lineLeft;
int lineTop = getPaddingTop();
int lineBottom = getHeight() - getPaddingBottom();
if (getChildCount() > 0) {
lineBottom = getHeight() - getChildAt(getChildCount() - 1).getMeasuredHeight() - getPaddingBottom();
}
canvas.drawLine(lineLeft
, lineTop
, lineRight
, lineBottom
, mLinePaint);
int top = getPaddingTop();
for (int i = 0; i < getChildCount(); i++) {
int drawableLeft = getPaddingLeft();
int drawableRight = getPaddingLeft() + drawableWidth;
int drawableTop = top + 9;
int drawableBottom = drawableTop + drawableWidth;
if (i == 0) {
mDoingDrawable.setBounds(drawableLeft, drawableTop, drawableRight, drawableBottom);
mDoingDrawable.draw(canvas);
} else {
mCompleteDrawable.setBounds(drawableLeft, drawableTop, drawableRight, drawableBottom);
mCompleteDrawable.draw(canvas);
}
View view = getChildAt(i);
if (i != getChildCount() - 1) {
top = top + view.getMeasuredHeight() + mItemDieviderHeight;
}
}
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
int layoutLeft = l + getPaddingLeft() + mDoingDrawable.getIntrinsicWidth() + mDrawablePaddingItemVal;
int layoutRight = b - getPaddingRight();
int layoutTop = t + getPaddingTop();
int layoutBottom;
for (int i = 0; i < getChildCount(); i++) {
View view = getChildAt(i);
layoutBottom = layoutTop + view.getMeasuredHeight();
view.layout(layoutLeft, layoutTop, layoutRight, layoutBottom);
layoutTop = layoutBottom;
if (i != getChildCount() - 1) {
layoutTop += mItemDieviderHeight;
}
}
}
public void setAdapter(@NonNull BaseStepViewAdapter adapter) {
mAdapter = adapter;
handleAdapter(adapter);
requestLayout();
}
private void handleAdapter(@NonNull BaseStepViewAdapter adapter) {
for (int i = 0; i < adapter.getCount(); i++) {
addView(adapter.getViewHolder(i).itemView);
}
}
static class ViewHolder {
View itemView;
public ViewHolder(View view) {
itemView = view;
}
}
}
| [
"chen.zhiyong@zuimeia.biz"
] | chen.zhiyong@zuimeia.biz |
32bcac091c74a591fe043b278a9e8b531f125380 | 68871cfeaf37c12fd2e3608180d6ebd1689e9fec | /gen/com/numhero/client/model/datacargo/invoice/ConvertToInvoiceRequest_FieldSerializer.java | ff5f2ffb79cc4e9bfc835df57d172cbb7e1348e9 | [] | no_license | uberto/netnumero | 5e0170ed14d3f343f5eba651b73a6c82f8ec5d0e | 18c462fed7a046281f88edcf3b47fcc61dedcbf6 | refs/heads/master | 2021-04-06T19:29:13.461683 | 2017-03-10T10:03:07 | 2017-03-10T10:03:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,104 | java | package com.numhero.client.model.datacargo.invoice;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.client.rpc.SerializationStreamReader;
import com.google.gwt.user.client.rpc.SerializationStreamWriter;
import com.google.gwt.user.client.rpc.impl.ReflectionHelper;
@SuppressWarnings("deprecation")
public class ConvertToInvoiceRequest_FieldSerializer implements com.google.gwt.user.client.rpc.impl.TypeHandler {
public static void deserialize(SerializationStreamReader streamReader, com.numhero.client.model.datacargo.invoice.ConvertToInvoiceRequest instance) throws SerializationException {
com.numhero.shared.datacargo.BulkActionRequest_FieldSerializer.deserialize(streamReader, instance);
}
public static com.numhero.client.model.datacargo.invoice.ConvertToInvoiceRequest instantiate(SerializationStreamReader streamReader) throws SerializationException {
return new com.numhero.client.model.datacargo.invoice.ConvertToInvoiceRequest();
}
public static void serialize(SerializationStreamWriter streamWriter, com.numhero.client.model.datacargo.invoice.ConvertToInvoiceRequest instance) throws SerializationException {
com.numhero.shared.datacargo.BulkActionRequest_FieldSerializer.serialize(streamWriter, instance);
}
public Object create(SerializationStreamReader reader) throws SerializationException {
return com.numhero.client.model.datacargo.invoice.ConvertToInvoiceRequest_FieldSerializer.instantiate(reader);
}
public void deserial(SerializationStreamReader reader, Object object) throws SerializationException {
com.numhero.client.model.datacargo.invoice.ConvertToInvoiceRequest_FieldSerializer.deserialize(reader, (com.numhero.client.model.datacargo.invoice.ConvertToInvoiceRequest)object);
}
public void serial(SerializationStreamWriter writer, Object object) throws SerializationException {
com.numhero.client.model.datacargo.invoice.ConvertToInvoiceRequest_FieldSerializer.serialize(writer, (com.numhero.client.model.datacargo.invoice.ConvertToInvoiceRequest)object);
}
}
| [
"antonio.signore@gmail.com"
] | antonio.signore@gmail.com |
9f824d9b76f5a352e6952b5255a8b837ab992955 | 58b5cfd2b100c213e6384cc27dced05d17a2bef8 | /hogwarts-core/src/main/java/hogwarts/domain/dark/Horcrux.java | 5a8d27739fb8e6f994617bf62b7cb8ce973a7cab | [] | no_license | Arnauld/hogwarts | 780ede15f07d85111f1575dd3debc72178b2253a | df1db99df9a93dec23ac56385a0518d6738d6215 | refs/heads/master | 2016-09-10T00:11:13.867419 | 2012-01-24T18:19:57 | 2012-01-24T18:19:57 | 3,130,129 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 568 | java | package hogwarts.domain.dark;
/**
* A Horcrux is a powerful object in which a Dark wizard or
* witch has hidden a fragment of his or her soul for the
* purpose of attaining immortality.[1].
*
* Creating one Horcrux gives one the ability to resurrect
* oneself if the body is destroyed; the more horcruxes one
* creates, the closer one is to true immortality.
* Creating multiple Horcruxes is suggested to be costly to
* the creator, by both diminishing their humanity and even
* physically disfiguring them.
*/
public class Horcrux {
}
| [
"arnauld.loyer@gmail.com"
] | arnauld.loyer@gmail.com |
4fb97292c89cab068f430bff8a09ada92369bce7 | 2d840a44ecc779999afddd972ae5b0b72cdb98ae | /Chatter/src/com/inspireafrica/chatter/InboxFragment.java | 8369f37356b9c6b4cf320ab136cb78cd6fc3287a | [] | no_license | walteranyika/android_apps | fcca883ef6c979da0f16f7ad990ca8e5273b0bc6 | 84d87c25021e54e4324b27f3b2112f99fced5853 | refs/heads/master | 2021-01-10T01:35:09.129241 | 2015-11-11T12:08:25 | 2015-11-11T12:08:25 | 45,979,414 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 464 | java | package com.inspireafrica.chatter;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class InboxFragment extends ListFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_inbox,container, false);
return rootView;
}
}
| [
"walteranyika@gmail.com"
] | walteranyika@gmail.com |
b54788fa4a9b9c7df799903dbab04ef5a263d106 | 706dae6cc6526064622d4f5557471427441e5c5e | /src/test/java/com/anbo/juja/patterns/abstractFactory_13/classic/ConcreteProductB1Test.java | 91474e00aebf5097ac52f4f741494c947163737b | [] | no_license | Anton-Bondar/Design-patterns-JUJA-examples- | 414edabfd8c4148640de7de8d01f809b01c3c17c | 9e3d628f7e45c0106514f8f459ea30fffed702d5 | refs/heads/master | 2021-10-09T04:45:42.372993 | 2018-12-21T12:09:00 | 2018-12-21T12:11:14 | 121,509,668 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 474 | java | package com.anbo.juja.patterns.abstractFactory_13.classic;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* Created by oleksandr.baglai on 11.11.2015.
*/
public class ConcreteProductB1Test {
@Test
public void shouldProcess() {
// given
Product1 product = new ConcreteProductB1();
// when
String result = product.process("data");
// then
assertEquals("changedB: data", result);
}
}
| [
"AntonBondar2013@gmail.com"
] | AntonBondar2013@gmail.com |
e69b9cfe62a6b4ee326b519bb575d7886a1bbf4c | 582a3f197a7886344a3cdb74d45cf06b6e062817 | /JavaRushTasks/2.JavaCore/src/com/javarush/task/task17/task1710/Solution.java | 34e3ed72e1362644da2cd9e22f090b57835bcd99 | [] | no_license | sfill70/JavaRushTasks | 66a15073945b5efd271bbbaa1d08df8b2d1185f2 | f5763c59989d82b85b2c00ebfbaceae80c30337e | refs/heads/master | 2021-09-14T18:47:04.840991 | 2018-05-17T13:56:16 | 2018-05-17T13:56:16 | 115,197,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,522 | java | package com.javarush.task.task17.task1710;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
/*
CRUD
*/
public class Solution {
public static List<Person> allPeople = new ArrayList<Person>();
static {
allPeople.add(Person.createMale("Иванов Иван", new Date())); //сегодня родился id=0
allPeople.add(Person.createMale("Петров Петр", new Date())); //сегодня родился id=1
}
public static void main(String[] args) {
if (args[0].equals("-c"))
{
if (args[2].equals("м"))
{
try {
Date data = new SimpleDateFormat("dd/MM/yyyy", Locale.ENGLISH).parse(args[3]);
allPeople.add(Person.createMale(args[1], data ));
}
catch (ParseException e) {
e.printStackTrace();
}
} else if (args[2].equals("ж"))
{
try {
Date data = new SimpleDateFormat("dd/MM/yyyy", Locale.ENGLISH).parse(args[3]);
allPeople.add(Person.createFemale(args[1], data ));
}
catch (ParseException e) {
e.printStackTrace();
}
}
System.out.println(allPeople.size()-1);
} else if (args[0].equals("-u"))
{
allPeople.get(Integer.parseInt(args[1])).setName(args[2]);
if (args[3].equals("м"))
{
allPeople.get(Integer.parseInt(args[1])).setSex(Sex.MALE);
} else if (args[3].equals("ж"))
{
allPeople.get(Integer.parseInt(args[1])).setSex(Sex.FEMALE);
}
try {
SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy", Locale.ENGLISH);
Date date = new Date();
date = format.parse(args[4]);
allPeople.get(Integer.parseInt(args[1])).setBirthDay(date);
} catch (ParseException e) {
e.printStackTrace();
}
} else if (args[0].equals("-d"))
{
int i = Integer.parseInt(args[1]);
allPeople.get(i).setBirthDay(null);
allPeople.get(i).setSex(null);
allPeople.get(i).setName(null);
} else if (args[0].equals("-i"))
{
String out = "";
out += allPeople.get(Integer.parseInt(args[1])).getName() +" ";
out += ((allPeople.get(Integer.parseInt(args[1])).getSex() == Sex.MALE) ? "м" : "ж") + " ";
out += new SimpleDateFormat("dd-MMM-yyyy", Locale.ENGLISH).format(allPeople.get(Integer.parseInt(args[1])).getBirthDay());
System.out.println(out);
}
/*
SimpleDateFormat format0 = new SimpleDateFormat("dd/MM/yyyy", Locale.ENGLISH);
String dat = "17/02/2001";
try {
// Date date =new Date();
Date date = format0.parse(dat);
System.out.println(format0.format(date) +" "+ date.toString()+ " "+date.getClass());
} catch (ParseException e) {
e.printStackTrace();
}
SimpleDateFormat format1 = new SimpleDateFormat("dd-MMM-yyyy", Locale.ENGLISH);
System.out.println(format1.format(allPeople.get(0).getBirthDay()));*/
//start here - начни тут
}
}
| [
"sergfill70@yandex.ru"
] | sergfill70@yandex.ru |
bd92cd2c3983f28ab93f591312aa0920ecb3f897 | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava15/Foo409.java | 8cd42493205323f66eb7ceb0626e007dca6b8ba2 | [] | 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 | 348 | java | package applicationModulepackageJava15;
public class Foo409 {
public void foo0() {
new applicationModulepackageJava15.Foo408().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
a31e79ead4871b29a3197aa7ec7c5383650977ce | 771d625fdd70250f8903c6672c39f4f2b23d7770 | /src/io/pello/codewars/numberpalindrome/NumberPalindromeTest.java | 03e2d34d972e91722e3e46588f0947fb5e5db248 | [] | no_license | pxai/codewars | 26a2f12de7feade8ca42ad67350d98343141b810 | 7a009376402baee63d2b9cb5411675ddcce87bb7 | refs/heads/master | 2021-04-28T17:00:57.546587 | 2018-06-14T07:16:17 | 2018-06-14T07:16:17 | 121,844,839 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 494 | java | package io.pello.codewars.numberpalindrome;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class NumberPalindromeTest {
@Test
void testIsPalindrome() {
assertTrue(NumberPalindrome.isPalindrome(12321));
assertTrue(NumberPalindrome.isPalindrome(1221));
}
@Test
void testIsNotPalindrome() {
assertFalse(NumberPalindrome.isPalindrome(-12321));
assertFalse(NumberPalindrome.isPalindrome(13321));
}
}
| [
"pello_altadill@cuatrovientos.org"
] | pello_altadill@cuatrovientos.org |
494e7a0b97361a9e794a39fb909ce9e436a758b6 | 3fe8e5db53dc425afdb24303f2f6926cade14f04 | /user/ezt_hall/src/main/java/xutils/bitmap/callback/BitmapSetter.java | 918fbfaffe5ef279f605514bf8d8995971e8a128 | [] | no_license | llorch19/ezt_user_code | 087a9474a301d8d8fef7bd1172d6c836373c2faf | ee82f4bfbbd14c81976be1275dcd4fc49f6b1753 | refs/heads/master | 2021-06-01T09:40:19.437831 | 2016-08-10T02:33:35 | 2016-08-10T02:33:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 393 | java | package xutils.bitmap.callback;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.view.View;
/**
* Author: wyouflf
* Date: 13-11-1
* Time: 下午11:05
*/
public interface BitmapSetter<T extends View> {
void setBitmap(T container, Bitmap bitmap);
void setDrawable(T container, Drawable drawable);
Drawable getDrawable(T container);
}
| [
"liangxing@eztcn.com"
] | liangxing@eztcn.com |
f62abcb6dd7c63d5114b05bd107bb221c742845b | 9122cf28169b2d053a26e5d5cefacda018fb95b9 | /algorithm/divide-conquer/src/main/java/com/wfs/devideConqur/PainterPartitionProblem.java | 182a1ec196da8fd5feb15dece4accbafd9858051 | [] | no_license | siddhantaws/DataStructure-Algorithm | 661f8ab75bcb2d5c68616b1e71a25e459b6a797a | cbd5398f24e075320eedcb7a83807954509e9467 | refs/heads/master | 2023-04-08T03:32:31.791195 | 2023-03-19T13:26:42 | 2023-03-19T13:26:42 | 88,467,251 | 1 | 1 | null | 2022-05-16T17:39:19 | 2017-04-17T04:13:41 | Java | UTF-8 | Java | false | false | 1,862 | java | package com.wfs.devideConqur;
public class PainterPartitionProblem {
private int arr[];
private int k ;
public PainterPartitionProblem(int[] arr , int k ) {
this.arr = arr;
this.k=k;
}
private int getMax()
{
int max = Integer.MIN_VALUE;
for (int i = 0; i < arr.length; i++)
if (arr[i] > max)
max = arr[i];
return max;
}
private int getSum()
{
int total = 0;
for (int i = 0; i < arr.length; i++)
total += arr[i];
return total;
}
// find minimum required painters for given maxlen
// which is the maximum length a painter can paint
int numberOfPainters(int maxLen)
{
int total = 0, numPainters = 1;
for (int i = 0; i < arr.length; i++) {
total += arr[i];
if (total > maxLen) {
// for next count
total = arr[i];
numPainters++;
}
}
return numPainters;
}
public int partition()
{
int lo = getMax();
int hi = getSum();
while (lo < hi) {
int mid = lo + (hi - lo) / 2;
int requiredPainters = numberOfPainters(mid);
// find better optimum in lower half here mid is included because we may not get anything better
if (requiredPainters <= k)
hi = mid;
else// find better optimum in upper half here mid is excluded because it gives required Painters > k, which is invalid
lo = mid + 1;
}
// required
return lo;
}
public static void main(String[] args) {
PainterPartitionProblem problem =new PainterPartitionProblem(new int[]{ 1, 2, 3, 4, 5, 6, 7, 8, 9 } , 3);
System.out.println(problem.partition());
}
}
| [
"siddhantaws@gmail.com"
] | siddhantaws@gmail.com |
1d6c492fade67473b74f170bbdb0dec298838ea1 | e94283089810516f048bd58590036c88588112cb | /src/S2256MinimumAverageDifference.java | 25cd54faf03dfa449ba5f4227616c7277a77a59a | [] | no_license | camelcc/leetcode | e0839e6267ebda5eef57da065d4adaefecb4b557 | d982b9e71bc475a599df45d66cf2b78cf017594d | refs/heads/master | 2022-07-19T06:24:49.148849 | 2022-07-10T07:00:34 | 2022-07-10T07:00:34 | 135,386,923 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 586 | java | public class S2256MinimumAverageDifference {
public int minimumAverageDifference(int[] nums) {
long post = 0;
for (int n : nums) {
post += n;
}
int res = 0;
long diff = Long.MAX_VALUE, prev = 0;
for (int i = 0; i < nums.length; i++) {
prev += nums[i];
post -= nums[i];
long d = Math.abs(prev/(i+1)- (i == nums.length -1 ? 0 : (post/(nums.length-i-1))));
if (d < diff) {
diff = d;
res = i;
}
}
return res;
}
}
| [
"camel.young@gmail.com"
] | camel.young@gmail.com |
116d69f78f3b224376a9c12c23e95114d2ee5cf3 | 6468b385716a5ea8ca6971187687e2361c69b6cd | /plugins/org.jkiss.dbeaver.ext.mssql/src/org/jkiss/dbeaver/ext/mssql/model/SQLServerProcedureParameter.java | 998477faebac4ecc1a05ee379b75253fc0d2c850 | [
"Apache-2.0",
"EPL-2.0"
] | permissive | ouguan/dbeaver | 49e72648c1523845f67a0d486cf6133a3ffd0402 | 40d871e92190d80dcebfe9c400fd36d0c4f261dd | refs/heads/master | 2020-04-11T20:48:53.444362 | 2019-02-25T08:38:23 | 2019-02-25T08:38:23 | 162,083,780 | 0 | 0 | Apache-2.0 | 2018-12-17T06:17:57 | 2018-12-17T06:17:57 | null | UTF-8 | Java | false | false | 5,254 | java | /*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.ext.mssql.model;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.DBPDataKind;
import org.jkiss.dbeaver.model.DBUtils;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet;
import org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils;
import org.jkiss.dbeaver.model.meta.Property;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSAttributeBase;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.dbeaver.model.struct.rdb.DBSProcedureParameter;
import org.jkiss.dbeaver.model.struct.rdb.DBSProcedureParameterKind;
/**
* SQLServerProcedureParameter
*/
public class SQLServerProcedureParameter implements DBSProcedureParameter, DBSAttributeBase, DBSObject {
private SQLServerProcedure procedure;
private String paramName;
private int ordinalPosition;
private SQLServerDataType dataType;
private int maxLength;
private int scale;
private int precision;
private DBSProcedureParameterKind parameterKind;
private boolean nullable;
private String defaultValue;
public SQLServerProcedureParameter(
DBRProgressMonitor monitor,
SQLServerProcedure procedure,
JDBCResultSet dbResult)
throws DBException
{
this.procedure = procedure;
this.paramName = JDBCUtils.safeGetString(dbResult, "name");
this.ordinalPosition = JDBCUtils.safeGetInt(dbResult, "parameter_id");
int typeID = JDBCUtils.safeGetInt(dbResult, "user_type_id");
this.dataType = procedure.getContainer().getDatabase().getDataTypeByUserTypeId(monitor, typeID);
boolean isOutput = JDBCUtils.safeGetInt(dbResult, "is_output") != 0;
boolean isCursor = JDBCUtils.safeGetInt(dbResult, "is_cursor_ref") != 0;
boolean readonly = JDBCUtils.safeGetInt(dbResult, "is_readonly") != 0;
this.parameterKind = isCursor ? DBSProcedureParameterKind.RESULTSET :
(isOutput ? DBSProcedureParameterKind.OUT :
(readonly ? DBSProcedureParameterKind.IN : DBSProcedureParameterKind.INOUT));
this.maxLength = JDBCUtils.safeGetInt(dbResult, "max_length");
this.scale = JDBCUtils.safeGetInt(dbResult, "scale");
this.precision = JDBCUtils.safeGetInt(dbResult, "precision");
if (JDBCUtils.safeGetInt(dbResult, "has_default_value") != 0) {
defaultValue = JDBCUtils.safeGetString(dbResult, "default_value");
}
nullable = JDBCUtils.safeGetInt(dbResult, "is_nullable") != 0;
}
@NotNull
@Override
public SQLServerDataSource getDataSource() {
return procedure.getDataSource();
}
@Nullable
@Override
public String getDescription() {
return null;
}
@Override
public SQLServerProcedure getParentObject() {
return procedure;
}
@Override
public boolean isPersisted() {
return true;
}
@NotNull
@Override
@Property(viewable = true, order = 1)
public String getName() {
return paramName;
}
@NotNull
@Override
@Property(viewable = true, order = 2)
public SQLServerDataType getParameterType() {
return dataType;
}
@NotNull
@Override
@Property(viewable = true, order = 3)
public DBSProcedureParameterKind getParameterKind() {
return parameterKind;
}
@Override
@Property(viewable = true, order = 4)
public int getOrdinalPosition() {
return ordinalPosition;
}
@Override
public boolean isRequired() {
return !nullable;
}
@Override
public boolean isAutoGenerated() {
return false;
}
@Override
public String getTypeName() {
return dataType.getTypeName();
}
@Override
public String getFullTypeName() {
return DBUtils.getFullTypeName(this);
}
@Override
public int getTypeID() {
return dataType.getTypeID();
}
@Override
public DBPDataKind getDataKind() {
return dataType.getDataKind();
}
@Override
public Integer getScale() {
return scale;
}
@Override
public Integer getPrecision() {
return precision;
}
@Override
public long getMaxLength() {
return maxLength;
}
@Property(viewable = true, order = 5)
public String getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
}
| [
"serge@jkiss.org"
] | serge@jkiss.org |
8d2c38a89239dffc39b335baf38b4fa16b1bce9c | 89f31c179d5a1650c1f482f4543bf596d34eb85c | /artifact/josceleton/connection-impl/tags/connection-impl-0.4/src/test/java/net/sf/josceleton/connection/impl/osc/OscMessageTransformerTestFactory.java | 0eb5ccedf01adb611901513b3e2c43ffbd419f10 | [] | no_license | christophpickl/josceleton | 65aa145e0287ff2f2bd2705dda6c5aa63db060ad | 090d1a62d2d2658fc5a3581197307e04a11317c8 | refs/heads/master | 2016-09-13T08:20:21.821361 | 2011-04-15T21:39:53 | 2011-04-15T21:39:53 | 56,807,708 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,366 | java | package net.sf.josceleton.connection.impl.osc;
import net.sf.josceleton.connection.impl.service.user.UserStore;
import net.sf.josceleton.core.api.entity.Coordinate;
import net.sf.josceleton.core.api.entity.User;
import net.sf.josceleton.core.api.entity.UserState;
import net.sf.josceleton.core.api.entity.joint.Joint;
import net.sf.josceleton.core.api.entity.message.JointMessage;
import net.sf.josceleton.core.api.entity.message.UserMessage;
import net.sf.josceleton.core.impl.entity.FactoryFacade;
import org.jmock.Expectations;
import org.jmock.Mockery;
/**
* impl will invoke:
*
* 1. user = userStore.lookupUserForJoint/UserMessage(osceletonUserId);
* 2. coord (optional) = this.factory.createCoordinate(x, y, z);
* 3. msg = this.factory.createJoint/UserMessage(user, ...);
*
* @since 0.3
*/
public class OscMessageTransformerTestFactory {
public final OscMessageTransformer newUserTransformer(
final Mockery mockery,
final UserStore userStore,
final Integer userId,
final UserState userState,
final UserMessage actualMessage
) {
final float[] jointCoordinates = null;
final Joint joint = null;
final JointMessage jointMessage = null;
return this.newGenericTransformer(
mockery, userStore, userId, jointMessage, jointCoordinates, joint, actualMessage, userState
);
}
public final OscMessageTransformer newJointTransformer(
final Mockery mockery,
final UserStore userStore,
final float[] actualCoordinates,
final Joint actualJoint,
final Integer userId,
final JointMessage actualMessage
) {
final UserState userState = null;
final UserMessage userMessage = null;
return this.newGenericTransformer(
mockery, userStore, userId, actualMessage, actualCoordinates, actualJoint,
userMessage, userState
);
}
private /* private */ OscMessageTransformer newGenericTransformer(
final Mockery mockery, final UserStore userStore, final Integer userId,
final JointMessage jointMessage, final float[] coordinates, final Joint joint,
final UserMessage userMessage, final UserState userState
) {
final boolean isForJointMessage = null != joint; // != jointMessage != coordinates
final FactoryFacade factory = mockery.mock(FactoryFacade.class);
final User user = mockery.mock(User.class);
mockery.checking(new Expectations() { { // ************ mock user lookup
if(isForJointMessage == true) { oneOf(userStore).lookupUserForJointMessage(userId);
} else { oneOf(userStore).lookupUserForUserMessage(userId, userState); }
will(returnValue(user));
}});
final Coordinate coordinate; // ************ mock coordinate creation
if(isForJointMessage == true) {
coordinate = mockery.mock(Coordinate.class);
mockery.checking(new Expectations() { {
oneOf(factory).createCoordinate(coordinates[0], coordinates[1], coordinates[2]);
will(returnValue(coordinate));
}});
} else { coordinate = null; /* not used */ }
mockery.checking(new Expectations() { { // ************ mock message creation
final Object actualMessage;
if(isForJointMessage == true) {
oneOf(factory).createJointMessage(user, joint, coordinate);
actualMessage = jointMessage;
} else { oneOf(factory).createUserMessage(user, userState); actualMessage = userMessage; }
will(returnValue(actualMessage));
}});
return new OscMessageTransformerImpl(factory);
}
}
| [
"christoph.pickl@gmail.com"
] | christoph.pickl@gmail.com |
303468889d4359408991c30cf4a312019e5ab285 | 80ba58eb2136dfb15e861dbc5b45a7270255d576 | /lesson2/rectangles/test.java | ce5cadc10324ab8ea59a572765675c00832c37a7 | [] | no_license | reczuprik/Udacity-Java-Programming | 96533c0aa7b269169c18c676f804b58abae60598 | df442840f4d8bec2d4aa6cd6b9b4e59174a761ce | refs/heads/master | 2020-04-02T05:53:17.496895 | 2019-01-17T17:58:05 | 2019-01-17T17:58:05 | 154,113,419 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 225 | java | public class test{
public static void Main (String[] args)
{
System.out.println("42+7");
System.out.println(42+7);
System.out.print("Hello");
System.out.println("World");
}
}
| [
"you@example.com"
] | you@example.com |
fad2d5c8468162b4bb47a2457577e7612ac306c3 | 32f38cd53372ba374c6dab6cc27af78f0a1b0190 | /app/src/main/java/com/autonavi/minimap/route/sharebike/net/request/RideStateRequest.java | 0fa7c0b121b2f97ddafb00887a7fbe0cd0d02da2 | [] | no_license | shuixi2013/AmapCode | 9ea7aefb42e0413f348f238f0721c93245f4eac6 | 1a3a8d4dddfcc5439df8df570000cca12b15186a | refs/heads/master | 2023-06-06T23:08:57.391040 | 2019-08-29T04:36:02 | 2019-08-29T04:36:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,055 | java | package com.autonavi.minimap.route.sharebike.net.request;
import com.amap.bundle.aosservice.response.AosByteResponse;
import com.amap.bundle.aosservice.response.AosResponseCallback;
import com.autonavi.minimap.bicycle.BicycleRequestHolder;
import com.autonavi.minimap.bicycle.param.ShareBikeRideStateRequest;
import com.autonavi.minimap.route.sharebike.net.parser.BaseResponser;
import com.autonavi.minimap.route.sharebike.net.parser.RideStateResponser;
import com.autonavi.minimap.route.sharebike.net.request.BaseRequest.a;
public class RideStateRequest extends BaseRequest {
public RideStateRequest(ShareBikeRideStateRequest shareBikeRideStateRequest, a aVar) {
super(shareBikeRideStateRequest, aVar);
}
public Class<? extends BaseResponser> getResponsorClass() {
return RideStateResponser.class;
}
public void send(AosResponseCallback<AosByteResponse> aosResponseCallback) {
BicycleRequestHolder.getInstance().sendShareBikeRideState((ShareBikeRideStateRequest) this.mParam, aosResponseCallback);
}
}
| [
"hubert.yang@nf-3.com"
] | hubert.yang@nf-3.com |
1e877e4f6224e46a7e1ca79d9efd05241c98d6e3 | ea1c976b26b3918a567aa2e4545724fed36b14ae | /app/src/main/java/com/example/shadow/heartrecreation/utils/zxing/decode/DecodeFormatManager.java | 2ed40de0b70f74a34fceabcfaf9bea6692a87188 | [] | no_license | ljx123456/Bixin | a1f56fdd5cfc35a27490b96265814e412eb18a96 | 3e0f4c6f402514b936b2cfdb11f5e326fd5dc7b5 | refs/heads/master | 2021-05-18T11:04:39.668370 | 2020-03-30T07:45:42 | 2020-03-30T07:45:42 | 251,219,799 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,330 | java | /*
* Copyright (C) 2010 ZXing 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 com.example.shadow.heartrecreation.utils.zxing.decode;
import android.content.Intent;
import android.net.Uri;
import com.example.shadow.heartrecreation.utils.zxing.android.Intents;
import com.google.zxing.BarcodeFormat;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
public final class DecodeFormatManager {
private static final Pattern COMMA_PATTERN = Pattern.compile(",");
public static final Set<BarcodeFormat> PRODUCT_FORMATS;
static final Set<BarcodeFormat> INDUSTRIAL_FORMATS;
private static final Set<BarcodeFormat> ONE_D_FORMATS;
static final Set<BarcodeFormat> QR_CODE_FORMATS = EnumSet.of(BarcodeFormat.QR_CODE);
static final Set<BarcodeFormat> DATA_MATRIX_FORMATS = EnumSet.of(BarcodeFormat.DATA_MATRIX);
static final Set<BarcodeFormat> AZTEC_FORMATS = EnumSet.of(BarcodeFormat.AZTEC);
static final Set<BarcodeFormat> PDF417_FORMATS = EnumSet.of(BarcodeFormat.PDF_417);
static {
PRODUCT_FORMATS = EnumSet.of(BarcodeFormat.UPC_A,
BarcodeFormat.UPC_E,
BarcodeFormat.EAN_13,
BarcodeFormat.EAN_8,
BarcodeFormat.RSS_14,
BarcodeFormat.RSS_EXPANDED);
INDUSTRIAL_FORMATS = EnumSet.of(BarcodeFormat.CODE_39,
BarcodeFormat.CODE_93,
BarcodeFormat.CODE_128,
BarcodeFormat.ITF,
BarcodeFormat.CODABAR);
ONE_D_FORMATS = EnumSet.copyOf(PRODUCT_FORMATS);
ONE_D_FORMATS.addAll(INDUSTRIAL_FORMATS);
}
private static final Map<String,Set<BarcodeFormat>> FORMATS_FOR_MODE;
static {
FORMATS_FOR_MODE = new HashMap<String,Set<BarcodeFormat>>();
FORMATS_FOR_MODE.put(Intents.Scan.ONE_D_MODE, ONE_D_FORMATS);
FORMATS_FOR_MODE.put(Intents.Scan.PRODUCT_MODE, PRODUCT_FORMATS);
FORMATS_FOR_MODE.put(Intents.Scan.QR_CODE_MODE, QR_CODE_FORMATS);
FORMATS_FOR_MODE.put(Intents.Scan.DATA_MATRIX_MODE, DATA_MATRIX_FORMATS);
FORMATS_FOR_MODE.put(Intents.Scan.AZTEC_MODE, AZTEC_FORMATS);
FORMATS_FOR_MODE.put(Intents.Scan.PDF417_MODE, PDF417_FORMATS);
}
private DecodeFormatManager() {}
public static Set<BarcodeFormat> parseDecodeFormats(Intent intent) {
Iterable<String> scanFormats = null;
CharSequence scanFormatsString = intent.getStringExtra(Intents.Scan.FORMATS);
if (scanFormatsString != null) {
scanFormats = Arrays.asList(COMMA_PATTERN.split(scanFormatsString));
}
return parseDecodeFormats(scanFormats, intent.getStringExtra(Intents.Scan.MODE));
}
public static Set<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null){
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
private static Set<BarcodeFormat> parseDecodeFormats(Iterable<String> scanFormats, String decodeMode) {
if (scanFormats != null) {
Set<BarcodeFormat> formats = EnumSet.noneOf(BarcodeFormat.class);
try {
for (String format : scanFormats) {
formats.add(BarcodeFormat.valueOf(format));
}
return formats;
} catch (IllegalArgumentException iae) {
// ignore it then
}
}
if (decodeMode != null) {
return FORMATS_FOR_MODE.get(decodeMode);
}
return null;
}
}
| [
"911015964@qq.com"
] | 911015964@qq.com |
b181d8f5e26a3481be799a977586dbcd24bb5684 | 26d5fc28121097e504ca96a8cdd7481e549670b2 | /citygml4j-xml/src/main/java/org/citygml4j/xml/adapter/deprecated/core/ExternalObjectAdapter.java | 12c4a2ed94907d317a6a9c0dec33b073a85023fa | [
"Apache-2.0"
] | permissive | citygml4j/citygml4j | 915ab53e7a19583e50868f43ae7d1dbe14c8add2 | afb785a00dde1ea5682b0d45c5dc3b18f8282710 | refs/heads/master | 2023-08-03T01:30:10.412587 | 2023-07-30T08:45:12 | 2023-07-30T08:45:12 | 14,438,505 | 112 | 47 | Apache-2.0 | 2023-07-07T19:56:49 | 2013-11-16T00:12:55 | Java | UTF-8 | Java | false | false | 2,942 | java | /*
* citygml4j - The Open Source Java API for CityGML
* https://github.com/citygml4j
*
* Copyright 2013-2023 Claus Nagel <claus.nagel@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.citygml4j.xml.adapter.deprecated.core;
import org.citygml4j.core.model.deprecated.core.ExternalObject;
import org.citygml4j.core.util.CityGMLConstants;
import org.citygml4j.xml.adapter.CityGMLSerializerHelper;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.builder.ObjectBuilder;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.serializer.ObjectSerializer;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import javax.xml.namespace.QName;
public class ExternalObjectAdapter implements ObjectBuilder<ExternalObject>, ObjectSerializer<ExternalObject> {
@Override
public ExternalObject createObject(QName name, Object parent) throws ObjectBuildException {
return new ExternalObject();
}
@Override
public void buildChildObject(ExternalObject object, QName name, Attributes attributes, XMLReader reader) throws ObjectBuildException, XMLReadException {
if (CityGMLConstants.CITYGML_2_0_CORE_NAMESPACE.equals(name.getNamespaceURI())
|| CityGMLConstants.CITYGML_1_0_CORE_NAMESPACE.equals(name.getNamespaceURI())) {
switch (name.getLocalPart()) {
case "name":
reader.getTextContent().ifPresent(object::setName);
break;
case "uri":
reader.getTextContent().ifPresent(object::setURI);
break;
}
}
}
@Override
public void writeChildElements(ExternalObject object, Namespaces namespaces, XMLWriter writer) throws ObjectSerializeException, XMLWriteException {
String coreNamespace = CityGMLSerializerHelper.getCoreNamespace(namespaces);
if (object.isSetName())
writer.writeElement(Element.of(coreNamespace, "name").addTextContent(object.getName()));
else if (object.isSetURI())
writer.writeElement(Element.of(coreNamespace, "uri").addTextContent(object.getURI()));
}
}
| [
"cnagel@virtualcitysystems.de"
] | cnagel@virtualcitysystems.de |
4b13dfa4288eb309b2914466d7428777eced9cb1 | 5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1 | /Code Snippet Repository/Spring/Spring5520.java | 7fa7b782851e544f50f891618a15d690437dbf68 | [] | no_license | saber13812002/DeepCRM | 3336a244d4852a364800af3181e03e868cf6f9f5 | be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9 | refs/heads/master | 2023-03-16T00:08:06.473699 | 2018-04-18T05:29:50 | 2018-04-18T05:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 552 | java | @Test
public void testGetFilename() {
assertEquals(null, StringUtils.getFilename(null));
assertEquals("", StringUtils.getFilename(""));
assertEquals("myfile", StringUtils.getFilename("myfile"));
assertEquals("myfile", StringUtils.getFilename("mypath/myfile"));
assertEquals("myfile.", StringUtils.getFilename("myfile."));
assertEquals("myfile.", StringUtils.getFilename("mypath/myfile."));
assertEquals("myfile.txt", StringUtils.getFilename("myfile.txt"));
assertEquals("myfile.txt", StringUtils.getFilename("mypath/myfile.txt"));
}
| [
"Qing.Mi@my.cityu.edu.hk"
] | Qing.Mi@my.cityu.edu.hk |
b736e7a8f2aec8fea8f03c7ca3242eda0fb410f1 | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-ws/results/MOCKITO-9b-2-8-Single_Objective_GGA-WeightedSum/org/mockito/internal/invocation/InvocationImpl_ESTest.java | c5d371bcbefcc156ed77790c58bf2b4671fe6e73 | [
"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 | 566 | java | /*
* This file was automatically generated by EvoSuite
* Tue Mar 31 13:46:32 UTC 2020
*/
package org.mockito.internal.invocation;
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 InvocationImpl_ESTest extends InvocationImpl_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
40044db7f9431cd61f36d87e20e4785784bcbc0b | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MOCKITO-7b-6-17-MOEAD-WeightedSum:TestLen:CallDiversity/org/mockito/internal/handler/NullResultGuardian_ESTest_scaffolding.java | e5cb61ae46859946eb0d0f538cb2781c5de43c07 | [] | 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 | 451 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Apr 08 12:17:23 UTC 2020
*/
package org.mockito.internal.handler;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class NullResultGuardian_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
12eb8e5817620e09fdcede34f9b774a487476765 | 622259e01d8555d552ddeba045fafe6624d80312 | /edu.harvard.i2b2.eclipse.plugins.analysis/gensrc/edu/harvard/i2b2/crcxmljaxb/datavo/psm/query/QueryMasterType.java | c3677107f528cc66a7204a5b6381c81d4633a2ce | [] | no_license | kmullins/i2b2-workbench-old | 93c8e7a3ec7fc70b68c4ce0ae9f2f2c5101f5774 | 8144b0b62924fa8a0e4076bf9672033bdff3b1ff | refs/heads/master | 2021-05-30T01:06:11.258874 | 2015-11-05T18:00:58 | 2015-11-05T18:00:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,829 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1.2-b01-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.07.21 at 10:39:12 AM EDT
//
package edu.harvard.i2b2.crcxmljaxb.datavo.psm.query;
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 javax.xml.datatype.XMLGregorianCalendar;
/**
* <p>Java class for query_masterType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="query_masterType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="query_master_id" type="{http://www.i2b2.org/xsd/cell/crc/psm/1.1/}query_master_idType"/>
* <element name="name" type="{http://www.i2b2.org/xsd/cell/crc/psm/1.1/}nameType"/>
* <element name="user_id" type="{http://www.i2b2.org/xsd/cell/crc/psm/1.1/}user_idType"/>
* <element name="group_id" type="{http://www.i2b2.org/xsd/cell/crc/psm/1.1/}group_idType"/>
* <element name="master_type_cd" type="{http://www.i2b2.org/xsd/cell/crc/psm/1.1/}master_cdType"/>
* <element name="create_date" type="{http://www.i2b2.org/xsd/cell/crc/psm/1.1/}create_dateType"/>
* <element name="delete_date" type="{http://www.i2b2.org/xsd/cell/crc/psm/1.1/}delete_dateType"/>
* <element name="request_xml" type="{http://www.i2b2.org/xsd/cell/crc/psm/1.1/}request_xmlType"/>
* <element name="generated_sql" type="{http://www.i2b2.org/xsd/cell/crc/psm/1.1/}generated_sqlType"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "query_masterType", propOrder = {
"queryMasterId",
"name",
"userId",
"groupId",
"masterTypeCd",
"createDate",
"deleteDate",
"requestXml",
"generatedSql"
})
public class QueryMasterType {
@XmlElement(name = "query_master_id", required = true)
protected String queryMasterId;
@XmlElement(required = true)
protected String name;
@XmlElement(name = "user_id", required = true)
protected String userId;
@XmlElement(name = "group_id", required = true)
protected String groupId;
@XmlElement(name = "master_type_cd", required = true)
protected String masterTypeCd;
@XmlElement(name = "create_date", required = true)
protected XMLGregorianCalendar createDate;
@XmlElement(name = "delete_date", required = true)
protected XMLGregorianCalendar deleteDate;
@XmlElement(name = "request_xml", required = true)
protected RequestXmlType requestXml;
@XmlElement(name = "generated_sql", required = true)
protected String generatedSql;
/**
* Gets the value of the queryMasterId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getQueryMasterId() {
return queryMasterId;
}
/**
* Sets the value of the queryMasterId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setQueryMasterId(String value) {
this.queryMasterId = value;
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the userId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUserId() {
return userId;
}
/**
* Sets the value of the userId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUserId(String value) {
this.userId = value;
}
/**
* Gets the value of the groupId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getGroupId() {
return groupId;
}
/**
* Sets the value of the groupId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setGroupId(String value) {
this.groupId = value;
}
/**
* Gets the value of the masterTypeCd property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMasterTypeCd() {
return masterTypeCd;
}
/**
* Sets the value of the masterTypeCd property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMasterTypeCd(String value) {
this.masterTypeCd = value;
}
/**
* Gets the value of the createDate property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getCreateDate() {
return createDate;
}
/**
* Sets the value of the createDate property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setCreateDate(XMLGregorianCalendar value) {
this.createDate = value;
}
/**
* Gets the value of the deleteDate property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getDeleteDate() {
return deleteDate;
}
/**
* Sets the value of the deleteDate property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setDeleteDate(XMLGregorianCalendar value) {
this.deleteDate = value;
}
/**
* Gets the value of the requestXml property.
*
* @return
* possible object is
* {@link RequestXmlType }
*
*/
public RequestXmlType getRequestXml() {
return requestXml;
}
/**
* Sets the value of the requestXml property.
*
* @param value
* allowed object is
* {@link RequestXmlType }
*
*/
public void setRequestXml(RequestXmlType value) {
this.requestXml = value;
}
/**
* Gets the value of the generatedSql property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getGeneratedSql() {
return generatedSql;
}
/**
* Sets the value of the generatedSql property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setGeneratedSql(String value) {
this.generatedSql = value;
}
}
| [
"Janice@phs000774.partners.org"
] | Janice@phs000774.partners.org |
2aa68c1d5fbceb338281e890c1b55e2a5bef1e36 | 9dfb07095844525a9d1b5a3e5de3cb840486c12b | /MinecraftServer/src/net/minecraft/util/registry/RegistryNamespacedDefaultedByKey.java | 82e759fa2514ab9dba14949fe65ffc85fc666101 | [] | no_license | ilYYYa/ModdedMinecraftServer | 0ae1870e6ba9d388afb8fd6e866ca6a62f96a628 | 7b8143a11f848bf6411917e3d9c60b0289234a3f | refs/heads/master | 2020-12-24T20:10:30.533606 | 2017-04-03T15:32:15 | 2017-04-03T15:32:15 | 86,241,373 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,176 | java | package net.minecraft.util.registry;
import java.util.Random;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.apache.commons.lang3.Validate;
public class RegistryNamespacedDefaultedByKey<K, V> extends RegistryNamespaced<K, V>
{
/** The key of the default value. */
private final K defaultValueKey;
/**
* The default value for this registry, retrurned in the place of a null value.
*/
private V defaultValue;
public RegistryNamespacedDefaultedByKey(K defaultValueKeyIn)
{
this.defaultValueKey = defaultValueKeyIn;
}
public void register(int id, K key, V value)
{
if (this.defaultValueKey.equals(key))
{
this.defaultValue = value;
}
super.register(id, key, value);
}
/**
* validates that this registry's key is non-null
*/
public void validateKey()
{
Validate.notNull(this.defaultValue, "Missing default of DefaultedMappedRegistry: " + this.defaultValueKey, new Object[0]);
}
/**
* Gets the integer ID we use to identify the given object.
*/
public int getIDForObject(V value)
{
int i = super.getIDForObject(value);
return i == -1 ? super.getIDForObject(this.defaultValue) : i;
}
@Nonnull
/**
* Gets the name we use to identify the given object.
*/
public K getNameForObject(V value)
{
K k = super.getNameForObject(value);
return (K)(k == null ? this.defaultValueKey : k);
}
@Nonnull
public V getObject(@Nullable K name)
{
V v = super.getObject(name);
return (V)(v == null ? this.defaultValue : v);
}
@Nonnull
/**
* Gets the object identified by the given ID.
*/
public V getObjectById(int id)
{
V v = super.getObjectById(id);
return (V)(v == null ? this.defaultValue : v);
}
@Nonnull
public V getRandomObject(Random random)
{
V v = super.getRandomObject(random);
return (V)(v == null ? this.defaultValue : v);
}
}
| [
"ilyyya.777@gmail.com"
] | ilyyya.777@gmail.com |
ec77326dc05d99287fbe57ef2a9bd203207892f3 | ac82c09fd704b2288cef8342bde6d66f200eeb0d | /projects/OG-Engine/src/main/java/com/opengamma/engine/marketdata/historical/HistoricalShockMarketDataProviderFactory.java | bad1fef72bb0bcc86baea9d4cd86fef85e5717df | [
"Apache-2.0"
] | permissive | cobaltblueocean/OG-Platform | 88f1a6a94f76d7f589fb8fbacb3f26502835d7bb | 9b78891139503d8c6aecdeadc4d583b23a0cc0f2 | refs/heads/master | 2021-08-26T00:44:27.315546 | 2018-02-23T20:12:08 | 2018-02-23T20:12:08 | 241,467,299 | 0 | 2 | Apache-2.0 | 2021-08-02T17:20:41 | 2020-02-18T21:05:35 | Java | UTF-8 | Java | false | false | 2,041 | java | /**
* Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.engine.marketdata.historical;
import java.util.Objects;
import com.opengamma.engine.marketdata.MarketDataProvider;
import com.opengamma.engine.marketdata.MarketDataProviderFactory;
import com.opengamma.engine.marketdata.resolver.MarketDataProviderResolver;
import com.opengamma.engine.marketdata.spec.HistoricalShockMarketDataSpecification;
import com.opengamma.engine.marketdata.spec.MarketDataSpecification;
import com.opengamma.livedata.UserPrincipal;
import com.opengamma.util.ArgumentChecker;
/**
* Factory for creating instances of {@link HistoricalShockMarketDataProvider}.
*/
public class HistoricalShockMarketDataProviderFactory implements MarketDataProviderFactory {
private final MarketDataProviderResolver _resolver;
public HistoricalShockMarketDataProviderFactory(MarketDataProviderResolver resolver) {
ArgumentChecker.notNull(resolver, "resolver");
_resolver = resolver;
}
@Override
public HistoricalShockMarketDataProvider create(UserPrincipal user, MarketDataSpecification marketDataSpec) {
if (!(marketDataSpec instanceof HistoricalShockMarketDataSpecification)) {
throw new IllegalArgumentException("Market data spec must be a HistoricalShockMarketDataSpecification: " + marketDataSpec);
}
HistoricalShockMarketDataSpecification shockSpec = (HistoricalShockMarketDataSpecification) marketDataSpec;
MarketDataProvider provider1 = resolve(user, shockSpec.getHistoricalSpecification1());
MarketDataProvider provider2 = resolve(user, shockSpec.getHistoricalSpecification2());
MarketDataProvider baseProvider = resolve(user, shockSpec.getBaseSpecification());
return new HistoricalShockMarketDataProvider(provider1, provider2, baseProvider);
}
private MarketDataProvider resolve(UserPrincipal user, MarketDataSpecification spec) {
return Objects.requireNonNull(_resolver.resolve(user, spec));
}
}
| [
"cobaltblue.ocean@gmail.com"
] | cobaltblue.ocean@gmail.com |
4dd4097b1a6686713a35f58310a22fb8d119e370 | b228e3f0a67b254edb80100a32514550fb9b8255 | /app/src/main/java/com/yl/baiduren/view/MyGridView.java | a8f9c3c5e30161cba0d0cb8fa9a8cb301a382d0f | [] | no_license | sunbeibei111466/baiduren | f02ec2a5f7b3aac367eb48512889c1463b7fc302 | 776970d98b9393ee5542bf2585aa247cc280610c | refs/heads/master | 2020-03-13T12:06:08.685955 | 2018-05-17T09:22:17 | 2018-05-17T09:22:17 | 131,112,483 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 779 | java | package com.yl.baiduren.view;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;
/**
* Created by sunbeibei on 2017/12/6.
*/
public class MyGridView extends GridView {
public MyGridView(Context context) {
super(context);
}
public MyGridView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyGridView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
}
| [
"930184501@qq.com"
] | 930184501@qq.com |
cc0fd89598b2c26686c1b698fccded0e7b7876f6 | 21c20052c68b2d8ab52000dc5032b808d3fd4127 | /src/Ch4_Factory/FactoryMethod/Stores/NYPizzaStore.java | 28dfae5938718ffedec6a4232feaaaf8909a6ac0 | [] | no_license | foryourselfand/oreilly_patterns | 1dd8551dc52b770d654b581586f386b2fe9093ab | bf46813c3a7b960630326fde5b2f769f6bfddeae | refs/heads/master | 2020-04-04T12:24:19.203648 | 2019-09-12T20:47:24 | 2019-09-12T20:47:24 | 155,925,179 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 882 | java | package Ch4_Factory.FactoryMethod.Stores;
import Ch4_Factory.FactoryMethod.Pizzas.NY.NYStyleCheesePizza;
import Ch4_Factory.FactoryMethod.Pizzas.NY.NYStyleClamPizza;
import Ch4_Factory.FactoryMethod.Pizzas.NY.NYStylePepperoniPizza;
import Ch4_Factory.FactoryMethod.Pizzas.NY.NYStyleVeggiePizza;
import Ch4_Factory.FactoryMethod.Pizzas.Pizza;
import Ch4_Factory.FactoryMethod.PizzaType;
public class NYPizzaStore extends PizzaStore {
public Pizza createPizza(PizzaType pizzaType) {
switch (pizzaType) {
case CHEESE:
return new NYStyleCheesePizza();
case VEGGIE:
return new NYStyleVeggiePizza();
case CLAM:
return new NYStyleClamPizza();
case PEPPERONI:
return new NYStylePepperoniPizza();
default:
return null;
}
}
} | [
"foryourselfand@gmail.com"
] | foryourselfand@gmail.com |
efd225622af284809b7242738d6e87a020497786 | 78c990f287df4886edc0db7094a8c2f77eb16461 | /icetone-core/src/main/java/icetone/effects/FadeOutEffect.java | 509a4a1b7c37e5846beb594cc9aa8fa963e60d0e | [
"BSD-2-Clause",
"LicenseRef-scancode-other-permissive"
] | permissive | Scrappers-glitch/icetone | a91a104571fba25cacc421ef1c3e774de6769a53 | 1684c2a6da1b1228ddcabafbbbee56286ccc4adb | refs/heads/master | 2022-01-08T10:53:47.263080 | 2019-06-27T11:10:54 | 2019-06-27T11:10:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 801 | java | package icetone.effects;
public class FadeOutEffect extends Effect implements AlphaEffect {
private float alpha;
public FadeOutEffect(float duration) {
this.duration = duration;
setCallHide(true);
}
@Override
public IEffect setEffectManager(EffectManager effectManager) {
super.setEffectManager(effectManager);
alpha = element.getLocalAlpha();
return this;
}
@Override
public boolean isConflict(IEffect effect) {
return super.isConflict(effect) || effect instanceof AlphaEffect;
}
@Override
public void update(float tpf) {
if (!init) {
disableShaderEffect();
init = true;
}
element.setLocalAlpha(1f - pass * alpha);
updatePass(tpf);
}
@Override
protected void onDeactivate() {
if (reset) {
element.setLocalAlpha(alpha);
}
destroyOrHide();
}
}
| [
"rockfire.redmoon@gmail.com"
] | rockfire.redmoon@gmail.com |
2423b3999aa0305c765c7337942cacc43d0765b6 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/29/29_45c8328936be0da9a5d8e092ed63af465f10403e/BaseGameActivity/29_45c8328936be0da9a5d8e092ed63af465f10403e_BaseGameActivity_t.java | 9576a7ebcb11eebfec620a6b825c879bbf9b212e | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,998 | java | package cz.robyer.gw_example.activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Toast;
import cz.robyer.gamework.game.GameEvent;
import cz.robyer.gamework.game.GameEventListener;
import cz.robyer.gamework.game.GameStatus;
import cz.robyer.gw_example.R;
import cz.robyer.gw_example.game.GameService;
/**
* This is base activity for all game activities.
* @author Robert Psel
*/
public abstract class BaseGameActivity extends BaseActivity implements GameEventListener {
private static final String TAG = BaseGameActivity.class.getSimpleName();
/** Helper for quitting activity by second press of 'back' */
protected boolean backClicked = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
checkGameRunning();
}
@Override
protected void onResume() {
super.onResume();
checkGameRunning();
overridePendingTransition(0,0); // disable animations
/** Register listening to game events */
if (GameService.isRunning())
getGame().registerListener(this);
// reset 'back' clicked helper
backClicked = false;
}
@Override
protected void onPause() {
super.onPause();
/** Unregister listening to game events */
if (GameService.isRunning())
getGame().unregisterListener(this);
}
/**
* If {@link GameService} is not running then finish this activity and start MainActivity.
*/
protected void checkGameRunning() {
if (!GameService.isRunning()) {
Log.w(TAG, "Game is not running, quitting activity");
Intent intent = new Intent(this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
finish();
} else if (getGame().getStatus() == GameStatus.GAME_LOST) {
showGameWinLoseDialog(false);
} else if (getGame().getStatus() == GameStatus.GAME_WON) {
showGameWinLoseDialog(true);
}
}
/*@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.game_menu, menu);
return true;
}*/
/**
* Init buttons bar and handlers for buttons.
*/
protected void initButtons() {
final OnClickListener listener = new OnClickListener() {
@Override
public void onClick(View v) {
Log.d("BaseGameActivity", "onClick buttons bar");
Class<?> cls = null;
if (v.getId() == R.id.btn_map)
cls = GameMapActivity.class;
else if (v.getId() == R.id.btn_messages)
cls = GameMessagesActivity.class;
else if (v.getId() == R.id.btn_tasks)
cls = GameObjectivesActivity.class;
else if (v.getId() == R.id.btn_inventory)
cls = GameInventoryActivity.class;
else if (v.getId() == R.id.btn_tools)
cls = GameToolsActivity.class;
// ignore unknown buttons and link to same activity
if (cls == null || cls == this.getClass())
return;
Intent intent = new Intent(BaseGameActivity.this, cls);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(intent);
}
};
View buttons = findViewById(R.id.buttonsbar);
if (buttons != null) {
buttons.findViewById(R.id.btn_map).setOnClickListener(listener);
buttons.findViewById(R.id.btn_messages).setOnClickListener(listener);
buttons.findViewById(R.id.btn_tasks).setOnClickListener(listener);
buttons.findViewById(R.id.btn_inventory).setOnClickListener(listener);
buttons.findViewById(R.id.btn_tools).setOnClickListener(listener);
}
}
/* (non-Javadoc)
* @see cz.robyer.gw_example.game.GameEventListener#receiveEvent(cz.robyer.gw_example.game.GameEvent)
*/
@Override
public void receiveEvent(final GameEvent event) {
switch (event.type) {
case GAME_LOSE:
showGameWinLoseDialog(false);
break;
case GAME_WIN:
showGameWinLoseDialog(true);
break;
}
}
private void showGameWinLoseDialog(boolean won) {
String title = "Game";
if (GameService.isRunning())
title = getGame().getScenario().getInfo().title;
AlertDialog ad = new AlertDialog.Builder(BaseGameActivity.this).create();
ad.setCancelable(false);
ad.setTitle(title);
ad.setMessage(won ? "Congratulations, you WON!" : "You just LOST this game!");
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
// Stop game service
stopService(new Intent(BaseGameActivity.this, GameService.class));
// Show main activity
Intent startMain = new Intent(BaseGameActivity.this, MainActivity.class);
startMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
}
});
ad.show();
}
/**
* Shortcut for getting instance of {@link GameService}.
* @return instance
*/
protected GameService getGame() {
return (GameService)GameService.getInstance();
}
/**
* Quit application on second 'back' press.
*/
@Override
public void onBackPressed() {
if (!backClicked) {
backClicked = true;
Toast.makeText(getApplicationContext(), R.string.press_back_again_to_quit, Toast.LENGTH_LONG).show();
return;
}
// Stop game service
Intent intent = new Intent(this, GameService.class);
stopService(intent);
// Start main activity
Intent startMain = new Intent(this, MainActivity.class);
startMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
//super.onBackPressed();
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
e70da665a709d5a80acd254db67671cc0ae02444 | b396b6889333861b26ddc636d1cb4d6305fd507a | /spring-case/transaction-demo/src/main/java/cn/van/transaction/demo/mapper/UserInfoMapper.java | a146af9e50d88cab5eced98b753f8eb1a34968d0 | [
"Apache-2.0",
"MIT"
] | permissive | java-fkd/Frame-Home | 88ce389571d00c1121d27afe0c9d99e5fcb8bc84 | e9a7123dd1776bcd30da7ede56d556eee0babec2 | refs/heads/master | 2023-08-18T20:36:08.834646 | 2021-09-17T08:16:31 | 2021-09-17T08:16:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 199 | java | package cn.van.transaction.demo.mapper;
import cn.van.transaction.demo.entity.UserInfoDO;
public interface UserInfoMapper {
int deleteUser(Long userId);
int deleteUserInfo(Long userId);
} | [
"1251787298@qq.com"
] | 1251787298@qq.com |
558dbb58ef6dda860cabe1a74d2aea2f26d55edb | 706dae6cc6526064622d4f5557471427441e5c5e | /src/test/java/com/anbo/juja/patterns/iterator_05/sample/LinkedListTest.java | 2cfd379b28e89d42de2193fb723c18641d449826 | [] | no_license | Anton-Bondar/Design-patterns-JUJA-examples- | 414edabfd8c4148640de7de8d01f809b01c3c17c | 9e3d628f7e45c0106514f8f459ea30fffed702d5 | refs/heads/master | 2021-10-09T04:45:42.372993 | 2018-12-21T12:09:00 | 2018-12-21T12:11:14 | 121,509,668 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 256 | java | package com.anbo.juja.patterns.iterator_05.sample;
/**
* Created by oleksandr.baglai on 16.09.2015.
*/
public class LinkedListTest extends ListTest {
@Override
protected List<String> getList() {
return new LinkedList<String>();
}
}
| [
"AntonBondar2013@gmail.com"
] | AntonBondar2013@gmail.com |
e0324e6622b4f0a4dc3dbbae569333a37e915ce5 | d81fd75783d56945382c1382b5f7b6004fe5c309 | /vendor/bonitasoft/bonita-connectors/5.7.2/database/src/main/java/org/bonitasoft/connectors/database/teradata/TeradataRoleResolver.java | 7c0fd8c96d25fd1a4ab6de6c85c40a748633b29c | [] | no_license | sirpentagon/bpm-infufsm | 51fc76013d60e109550aab1998ca3b44ba7e5bb0 | bbcff4ef2d7b4383b41ed37a1e7387c5bbefc6dd | refs/heads/master | 2021-01-25T13:11:48.217742 | 2014-04-28T17:06:02 | 2014-04-28T17:06:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,206 | java | /**
* Copyright (C) 2010 BonitaSoft S.A.
* BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
* 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.0 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.bonitasoft.connectors.database.teradata;
import org.bonitasoft.connectors.database.SimpleRemoteDatabaseRoleResolver;
/**
*
* @author Matthieu Chaffotte
*
*/
public class TeradataRoleResolver extends SimpleRemoteDatabaseRoleResolver {
@Override
public String getDriver() {
return "com.ncr.teradata.TeraDriver";
}
@Override
public String getUrl() {
return "jdbc:teradata://" + getHostName() + "/" + getDatabase();
}
}
| [
"andrea@inf.ufsm.br"
] | andrea@inf.ufsm.br |
56032783486bad39b6378dc23876d31977145f19 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/abc083/B/4798343.java | 463abd128dcb71039bf0bc20df3ac3f380f73575 | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Java | false | false | 670 | java | import java.util.*;
class Main {
public static int findSumOfDigits (int n){
int sum = 0;
while(n>0){
sum += n%10;
n = n/10;
}
return sum;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int A = Integer.parseInt(sc.next());
int B = Integer.parseInt(sc.next());
int total = 0;
for(int i = 1;i<=N;i++){
int sum = findSumOfDigits(i);
if(A<=sum&&sum<=B){
total = total + i;
}
}
System.out.print(total);
}
} | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
07aaef7bbd3d0cd28e48724108e203e2f2685f48 | 0252a04e5a388e1f12229b2541589bf655084828 | /src/leetCode/problems/_623_Add_One_Row_to_Tree/Solution.java | acfbcdf6065307d99d150be27c77625a4c5f103f | [] | no_license | alanHarper123/LeetCode | bd60e4e0a2ba278f648b504bfdd928ca22403506 | 312b86a6f1e7adccb7a1f100b664cd9272a85473 | refs/heads/master | 2021-06-25T15:31:38.069169 | 2021-01-19T12:56:43 | 2021-01-19T12:56:43 | 193,816,741 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 914 | java | package leetCode.problems._623_Add_One_Row_to_Tree;
import leetCode.problems.commonUtil.TreeNode;
public class Solution {
int targetLevel;
public TreeNode addOneRow(TreeNode root, int v, int d) {
if(d==1) {
TreeNode node = new TreeNode(v);
node.left = root;
return node;
}
targetLevel = d-1;
//root != null;
addOneRowUtil(root, v, 1);
return root;
}
private void addOneRowUtil(TreeNode root, int v, int d) {
if(d==targetLevel) {
TreeNode left = new TreeNode(v);
left.left = root.left;
root.left = left;
TreeNode right = new TreeNode(v);
right.right = root.right;
root.right = right;
}else if(d<targetLevel) {
if(root.left!=null)
addOneRowUtil(root.left, v, d+1);
if(root.right!=null)
addOneRowUtil(root.right, v, d+1);
}
}
}
| [
"1531508001@qq.com"
] | 1531508001@qq.com |
77fd2e5b965059dabb2f8edec847fdc3ad357eb3 | 40a6d17d2fd7bd7f800d5562d8bb9a76fb571ab4 | /pxlab/src/main/java/de/pxlab/pxl/display/MediaPlayerStop.java | f809fca700459c37f7cff0eb8ba2ab598a730d03 | [
"MIT"
] | permissive | manuelgentile/pxlab | cb6970e2782af16feb1f8bf8e71465ebc48aa683 | c8d29347d36c3e758bac4115999fc88143c84f87 | refs/heads/master | 2021-01-13T02:26:40.208893 | 2012-08-08T13:49:53 | 2012-08-08T13:49:53 | 5,121,970 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,096 | java | package de.pxlab.pxl.display;
import de.pxlab.pxl.*;
/**
* Stop a currently running media player.
*
* @author H. Irtel
* @version 0.1.1
*/
public class MediaPlayerStop extends MediaPlayer {
public MediaPlayerStop() {
setTitleAndTopic("Stop a media player", MEDIA_DSP | EXP);
Timer.set(new ExParValueConstant("de.pxlab.pxl.TimerCodes.NO_TIMER"));
}
protected void computeGeometry() {
// check4MediaTimer();
}
public void show(java.awt.Graphics g) {
// System.out.println("MediaPlayerSync.show(Graphics): " +
// staticMediaPlayer);
}
public void show() {
// System.out.println("MediaPlayerSync.show(): " + staticMediaPlayer);
}
/** Here is where the music plays. */
public void showGroup() {
staticMediaPlayer.stop();
RuntimeRegistry.remove(mpKey);
// staticMediaPlayer.dispose();
}
/**
* This method is not used for non-graphic display objects.
*/
public void showGroup(java.awt.Graphics g) {
// System.out.println("MediaPlayerSync.showGroup(Graphics): " +
// staticMediaPlayer);
showGroup();
}
}
| [
"manuelgentile@gmail.com"
] | manuelgentile@gmail.com |
bdedf2376ff522846ab148a5ef8e1242dd82cd57 | 9254e7279570ac8ef687c416a79bb472146e9b35 | /rds-20140815/src/main/java/com/aliyun/rds20140815/models/DescribeAvailableCrossRegionResponseBody.java | 9f6ccd3e92dc92a66593622a292761d81b49096c | [
"Apache-2.0"
] | permissive | lquterqtd/alibabacloud-java-sdk | 3eaa17276dd28004dae6f87e763e13eb90c30032 | 3e5dca8c36398469e10cdaaa34c314ae0bb640b4 | refs/heads/master | 2023-08-12T13:56:26.379027 | 2021-10-19T07:22:15 | 2021-10-19T07:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,876 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.rds20140815.models;
import com.aliyun.tea.*;
public class DescribeAvailableCrossRegionResponseBody extends TeaModel {
@NameInMap("RequestId")
public String requestId;
@NameInMap("Regions")
public DescribeAvailableCrossRegionResponseBodyRegions regions;
public static DescribeAvailableCrossRegionResponseBody build(java.util.Map<String, ?> map) throws Exception {
DescribeAvailableCrossRegionResponseBody self = new DescribeAvailableCrossRegionResponseBody();
return TeaModel.build(map, self);
}
public DescribeAvailableCrossRegionResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public DescribeAvailableCrossRegionResponseBody setRegions(DescribeAvailableCrossRegionResponseBodyRegions regions) {
this.regions = regions;
return this;
}
public DescribeAvailableCrossRegionResponseBodyRegions getRegions() {
return this.regions;
}
public static class DescribeAvailableCrossRegionResponseBodyRegions extends TeaModel {
@NameInMap("Region")
public java.util.List<String> region;
public static DescribeAvailableCrossRegionResponseBodyRegions build(java.util.Map<String, ?> map) throws Exception {
DescribeAvailableCrossRegionResponseBodyRegions self = new DescribeAvailableCrossRegionResponseBodyRegions();
return TeaModel.build(map, self);
}
public DescribeAvailableCrossRegionResponseBodyRegions setRegion(java.util.List<String> region) {
this.region = region;
return this;
}
public java.util.List<String> getRegion() {
return this.region;
}
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
d5fd1a7bba1ba7029e764cf9a0abec99e99e9a34 | 642cb4ce82e92729e69447ea26086d57d0266296 | /sdks/java/http_client/v1/src/test/java/org/openapitools/client/model/V1OperationCondTest.java | 972f542806cae6e2b07bb2d259cdc96e005c936d | [
"Apache-2.0"
] | permissive | vamsikavuru/polyaxon | 243c91b2a2998260f6b21e864b02347629c4867f | f1695c98f320c2e5c9fdf72e7f7885954df755a9 | refs/heads/master | 2022-08-24T05:22:04.806006 | 2020-05-28T14:50:54 | 2020-05-28T15:04:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,085 | java | // Copyright 2018-2020 Polyaxon, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*
* Polyaxon SDKs and REST API specification.
* Polyaxon SDKs and REST API specification.
*
* The version of the OpenAPI document: 1.0.92
* Contact: contact@polyaxon.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.openapitools.client.model.V1IoCond;
import org.openapitools.client.model.V1StatusCond;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for V1OperationCond
*/
public class V1OperationCondTest {
private final V1OperationCond model = new V1OperationCond();
/**
* Model tests for V1OperationCond
*/
@Test
public void testV1OperationCond() {
// TODO: test V1OperationCond
}
/**
* Test the property 'ioConidtion'
*/
@Test
public void ioConidtionTest() {
// TODO: test ioConidtion
}
/**
* Test the property 'statusCondition'
*/
@Test
public void statusConditionTest() {
// TODO: test statusCondition
}
}
| [
"mouradmourafiq@gmail.com"
] | mouradmourafiq@gmail.com |
6839dbe1a44f8aa0d0adf3299cb1a92ffbcc873d | 969208d133ffc7119401f4fe03c21414e33fc54c | /Everything/src/main/java/dao/FileOperatorDAO.java | 767758323c784144401b387ac8d831ffaeabcb4a | [] | no_license | kangwubin/XATU_JavaEE | e7b23248e0baff54e06bf5fc135b959b711bf8f3 | b2b770496552c120b25126559599b3484ccadcfa | refs/heads/master | 2022-12-11T11:42:00.895448 | 2020-05-25T14:16:16 | 2020-05-25T14:16:34 | 224,195,169 | 0 | 0 | null | 2022-12-06T00:45:44 | 2019-11-26T13:09:28 | Java | UTF-8 | Java | false | false | 8,009 | java | package dao;
import app.FileMeta;
import util.DBUtil;
import util.Pinyin4Until;
import java.io.File;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
/**
* Description:
*
* @author: KangWuBin
* @Date: 2020/1/12
* @Time: 9:21
*/
public class FileOperatorDAO {
/*插入*/
public static void insert(FileMeta localMeta) {
//1.获取数据库连接
Connection connection = null;
PreparedStatement statement = null;
try {
try {
connection = DBUtil.getConnection();
String sql = "insert into file_meta" +
"(name, path, is_directory, pinyin, pinyin_first, size, last_modified)" +
"values (?,?,?,?,?,?,?)";
//2.获取操作命令对象
statement = connection.prepareStatement(sql);
//填充占位符
statement.setString(1, localMeta.getName());
statement.setString(2, localMeta.getPath());
statement.setBoolean(3, localMeta.getDirectory());
String pinyin = null;
String pinyin_first = null;
System.out.println("insert:" + localMeta.getName());
//包含中文字符时,需要保存全拼和拼音首字符
if (Pinyin4Until.containsChinese(localMeta.getName())) {
String[] pinyins = Pinyin4Until.get(localMeta.getName());
pinyin = pinyins[0];
pinyin_first = pinyins[1];
}
statement.setString(4, pinyin);
statement.setString(5, pinyin_first);
statement.setLong(6, localMeta.getSize());
statement.setTimestamp(7, new Timestamp(localMeta.getLastModified()));
//3.执行sql语句
System.out.println("insert:" + localMeta.getName() + localMeta.getPath());
statement.executeUpdate();
} finally {
DBUtil.close(connection, statement);
}
} catch (SQLException e) {
e.printStackTrace();
}
}
/*查询操作*/
public static List<FileMeta> query(String dirpath) {
Connection connection = null;
PreparedStatement statement = null;
ResultSet resultSet = null;
List<FileMeta> metas = new ArrayList<>();
try {
connection = DBUtil.getConnection();
String sql = "select name,path,size,last_modified, is_directory " +
"from file_meta where path=?";
System.out.println(sql);
statement = connection.prepareStatement(sql);
statement.setString(1, dirpath);
resultSet = statement.executeQuery();
while (resultSet.next()) {
String name = resultSet.getString("name");
String path = resultSet.getString("path");
boolean is_directory = resultSet.getBoolean("is_directory");
long size = resultSet.getLong("size");
long last_modified = resultSet.getLong("last_modified");
// System.out.println(name);
FileMeta meta = new FileMeta(name, path, size, last_modified, is_directory);
System.out.println("query:" + meta.getName() + meta.getPath());
metas.add(meta);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
DBUtil.close(connection, statement, resultSet);
}
return metas;
}
/*删除*/
public static void delete(FileMeta meta) {
//1.获取数据库连接
Connection connection = null;
PreparedStatement statement = null;
try {
connection = DBUtil.getConnection();
//在JDBC里操作事务
connection.setAutoCommit(false);
String sql = "delete from file_meta where name=?" +
"and path=? and is_directory=?";
//2.获取操作命令对象
statement = connection.prepareStatement(sql);
//填充占位符
statement.setString(1, meta.getName());
statement.setString(2, meta.getPath());
statement.setBoolean(3, meta.getDirectory());
String pinyin = null;
//3.执行sql语句
statement.executeUpdate();
//删除子文件夹
if (meta.getDirectory()) {
sql = "delete from file_meta where path=? or path like ?";
statement = connection.prepareStatement(sql);
String path = meta.getPath() + File.separator + meta.getName();
statement.setString(1, path);
statement.setString(2, path + File.separator + "%");
/*statement.setString(1, meta.getPath() + File.separator +
meta.getName() + File.separator + "%");*/
System.out.println("delete like:" + meta.getPath() + File.separator + meta.getName());
statement.executeUpdate();
}
System.out.println("delete:" + meta.getName() + meta.getPath());
connection.commit();
} catch (SQLException e) {
e.printStackTrace();
if (connection != null) {
try {
connection.rollback();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
} finally {
DBUtil.close(connection, statement);
}
}
/* path=""
* */
public static List<FileMeta> search(String dir, String text) {
Connection connection = null;
PreparedStatement statement = null;
ResultSet resultSet = null;
List<FileMeta> metas = new ArrayList<>();
try {
connection = DBUtil.getConnection();
boolean empty = dir == null || dir.trim().length() == 0;
String sql = "select name,path,size,last_modified, is_directory" +
" from file_meta where name like ? or pinyin like ? " +
" or pinyin_first like ? "
+ (empty ?
"" : "and (path=? or path like ?)");
System.out.println(sql);
statement = connection.prepareStatement(sql);
statement.setString(1, "%" + text + "%");
statement.setString(2, "%" + text + "%");
statement.setString(3, "%" + text + "%");
if (!empty) {
statement.setString(4, dir);
statement.setString(5, dir + File.separator + "%");
}
// statement.setString(2, text + File.separator + "%");
System.out.println("search path=" + dir + "," + "text=" + text);
resultSet = statement.executeQuery();
while (resultSet.next()) {
String name = resultSet.getString("name");
String path = resultSet.getString("path");
boolean is_directory = resultSet.getBoolean("is_directory");
long size = resultSet.getLong("size");
long last_modified = resultSet.getLong("last_modified");
// System.out.println(name);
FileMeta meta = new FileMeta(name, path, size, last_modified, is_directory);
System.out.println("query:" + meta.getName() + meta.getPath());
metas.add(meta);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
DBUtil.close(connection, statement, resultSet);
}
return metas;
}
//测试
public static void main(String[] args) {
// System.out.println(query("F:\\【比特科技书籍推荐】Java研发方向"));
// delete(new FileMeta("【比特科技推荐】Head First Java 中文版.pdf", "F:\\", 4528245L, 0L, false));
}
}
| [
"2624656980@qq.com"
] | 2624656980@qq.com |
8a4759d323304edfeb1c70663e7f95158b572fa3 | 770a03f95f512a532511029889d24195d3ec4363 | /order-service/src/main/java/com/cerner/hexagonal/architecture/demo/order/domain/model/Order.java | 2745febedc4395979de2aca3b5dabc0662966bb4 | [
"Apache-2.0"
] | permissive | bogdansolga/hexagonal-architecture-demo | 5eaa7c865bce4d995b2e00b55534e73ff58bc4d3 | 05db68b1ca663b5c79e2877469308e35a03bf181 | refs/heads/master | 2022-04-30T16:30:26.836370 | 2019-08-03T19:10:08 | 2019-08-03T19:10:08 | 200,390,456 | 0 | 0 | Apache-2.0 | 2022-03-31T18:52:21 | 2019-08-03T15:21:17 | Java | UTF-8 | Java | false | false | 1,916 | java | package com.cerner.hexagonal.architecture.demo.order.domain.model;
import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;
@Entity
public class Order implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@Column(name = "customer_id", length = 10)
private long customerId;
@Column(name = "total", length = 10)
private double total;
@Column(name = "creation_date", length = 10)
private LocalDateTime creationDate;
public Order(final long customerId, final double total) {
this.customerId = customerId;
this.total = total;
this.creationDate = LocalDateTime.now();
}
// required by JPA
protected Order() {
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public long getCustomerId() {
return customerId;
}
public void setCustomerId(long customerId) {
this.customerId = customerId;
}
public double getTotal() {
return total;
}
public void setTotal(double total) {
this.total = total;
}
public LocalDateTime getCreationDate() {
return creationDate;
}
public void setCreationDate(LocalDateTime creationDate) {
this.creationDate = creationDate;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Order order = (Order) o;
return id == order.id &&
customerId == order.customerId &&
Double.compare(order.total, total) == 0 &&
Objects.equals(creationDate, order.creationDate);
}
@Override
public int hashCode() {
return Objects.hash(id, customerId, total, creationDate);
}
}
| [
"bogdan.solga@gmail.com"
] | bogdan.solga@gmail.com |
9b19a25b50d70f9134dd56dd3c80a3bddbca15bf | eab084584e34ec065cd115139c346180e651c1c2 | /src/test/java/v1/t100/T118Test.java | e36dd1f86b7b9bf68566268513f0d8c3b7081f86 | [] | no_license | zhouyuan93/leetcode | 5396bd3a01ed0f127553e1e175bb1f725d1c7919 | cc247bc990ad4d5aa802fc7a18a38dd46ed40a7b | refs/heads/master | 2023-05-11T19:11:09.322348 | 2023-05-05T09:12:53 | 2023-05-05T09:12:53 | 197,735,845 | 0 | 0 | null | 2020-04-05T09:17:34 | 2019-07-19T08:38:17 | Java | UTF-8 | Java | false | false | 559 | java | package v1.t100;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import v1.t100.T118;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
class T118Test {
private T118 t;
@BeforeEach
void setUp() {
t = new T118();
}
@Test
void test_1() {
List<List<Integer>> actual = t.generate(5);
String actualStr = actual.toString();
String exceptStr = "[[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]]";
assertEquals(exceptStr,actualStr);
}
} | [
"492407250@qq.com"
] | 492407250@qq.com |
8d867beb9cf1b215b6d88d55c90d2ec80a5a4adb | 84e064c973c0cc0d23ce7d491d5b047314fa53e5 | /latest9.5/hej/net/sf/saxon/expr/CollationMap.java | d404f6293032a50933e4fca6ca8a2908f8271faa | [] | no_license | orbeon/saxon-he | 83fedc08151405b5226839115df609375a183446 | 250c5839e31eec97c90c5c942ee2753117d5aa02 | refs/heads/master | 2022-12-30T03:30:31.383330 | 2020-10-16T15:21:05 | 2020-10-16T15:21:05 | 304,712,257 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,264 | java | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2013 Saxonica Limited.
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
package net.sf.saxon.expr;
import net.sf.saxon.Configuration;
import net.sf.saxon.expr.sort.CodepointCollator;
import net.sf.saxon.lib.NamespaceConstant;
import net.sf.saxon.lib.StringCollator;
import java.io.Serializable;
import java.util.HashMap;
/**
* This object maps collation URIs to collations. Logically this function is part of the static
* context, but it is often needed dynamically, so it is defined as a separate component that can
* safely be retained at run-time.
*/
public class CollationMap implements Serializable {
private Configuration config;
private String defaultCollationName;
private HashMap<String, StringCollator> map;
/**
* Create a collation map
* @param config the Saxon configuration
*/
public CollationMap(Configuration config) {
CollationMap old = config.getCollationMap();
this.config = config;
this.defaultCollationName = NamespaceConstant.CODEPOINT_COLLATION_URI;
}
/**
* Create a copy of a collation map
* @param in the collation map to be copied
*/
public CollationMap(CollationMap in) {
if (in.map != null) {
map = new HashMap<String, StringCollator>(in.map);
}
config = in.config;
defaultCollationName = in.defaultCollationName;
}
/**
* Set the name of the default collation
* @param name the default collation name (should be a URI, but this is not enforced)
* @throws NullPointerException if the supplied name is null
*/
public void setDefaultCollationName(/*@Nullable*/ String name) {
if (name == null) {
throw new NullPointerException("defaultCollationName");
}
defaultCollationName = name;
}
/**
* Get the name of the default collation
* @return the default collation name (should be a URI, but this is not enforced)
*/
public String getDefaultCollationName() {
return defaultCollationName;
}
/**
* Get the default collation
* @return the default collation, as a StringCollator
*/
public StringCollator getDefaultCollation() {
return getNamedCollation(defaultCollationName);
}
/**
* Register a named collation
* @param absoluteURI the name of the collation. This should be an absolute URI, but
* this is not enforced
* @param collator the StringCollator that implements the collating rules
*/
public void setNamedCollation(String absoluteURI, StringCollator collator) {
if (map == null) {
map = new HashMap<String, StringCollator>();
}
map.put(absoluteURI, collator);
}
/**
* Get the collation with a given collation name. If the collation name has
* not been registered in this CollationMap, the CollationURIResolver registered
* with the Configuration is called. If this cannot resolve the collation name,
* it should return null.
* @param name the collation name (should be an absolute URI)
* @return the StringCollator with this name if known, or null if not known
*/
public StringCollator getNamedCollation(String name) {
if (name.equals(NamespaceConstant.CODEPOINT_COLLATION_URI)) {
return CodepointCollator.getInstance();
}
if (map != null) {
StringCollator c = map.get(name);
if (c != null) {
return c;
}
}
return config.getCollationURIResolver().resolve(name, null, config);
}
}
| [
"oneil@saxonica.com"
] | oneil@saxonica.com |
f3ee1ef0d737fd8b442e198ae84ce18dac9925c5 | 06fea11d2964134cc8bd10488fbc704853869e88 | /HwajungHS/src/hwajunghighschool/deb/kim/SplashActivity.java | b95727091eb6b480bf0c383c4292d4274da35d3b | [
"Apache-2.0"
] | permissive | linukzz/new-android-projects | 6efcf1a92b1c5e588eca7e54b9232fe71546553d | 338fb0c9a2a7edeca58b9ec3d2acd5e8aff16379 | refs/heads/master | 2021-05-13T22:45:54.397856 | 2018-04-04T13:54:21 | 2018-04-04T13:54:21 | 116,495,157 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 1,711 | java | package hwajunghighschool.deb.kim;
import hwajunghighschool.deb.kim.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.LinearLayout;
public class SplashActivity extends Activity {
int splashSceneNumber;
LinearLayout splashLayout;
Handler mHandler;
boolean isClick;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash1);
// TODO Auto-generated method stub
// xml 소스 참조
splashLayout = (LinearLayout) findViewById(R.id.splashLayout);
// 처음화면 0
splashSceneNumber = 0;
// 클릭 이벤트가 있었는지 확인
isClick = true;
mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (splashSceneNumber) {
case 0:
// 두번째 화면
splashSceneNumber = 1;
splashLayout.setBackgroundDrawable(getResources()
.getDrawable(R.drawable.df_splash_2));
mHandler.sendEmptyMessage(splashSceneNumber);
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
startActivity(intent);
SplashActivity.this.finish();
break;
}
}
};
mHandler.sendEmptyMessageDelayed(3, 2000);}
public void hn_splashOnclick(View v) {
switch (splashSceneNumber) {
case 0:
splashSceneNumber = 0;
isClick = false;
mHandler.sendEmptyMessage(splashSceneNumber);
break;
case 1:
splashSceneNumber = 2;
mHandler.sendEmptyMessage(splashSceneNumber);
break;
}
}
}
| [
"private87172@gmail.com"
] | private87172@gmail.com |
13772fd141ac56e559d846dbd9c8bca0c3a5d677 | 11b0276c33e947d06524789e5f73fd117ed8974a | /src/creational/abstractFactory/cokeAndPepsiExample/abstractFactory/CokeFactory.java | 006644dfcfa72bc6d26db92cf75fb566b6a7132a | [] | no_license | vimcmd/patterns | fcce309a5b6d0c90983e51991e47010975ce5e86 | 2eab0fbf8a2d94faed265a40d2b701347709c24e | refs/heads/master | 2021-01-10T01:26:54.947682 | 2016-03-01T10:47:24 | 2016-03-01T10:47:24 | 52,722,258 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 357 | java | package creational.abstractFactory.cokeAndPepsiExample.abstractFactory;
public class CokeFactory implements IFactory
{
public IBottle createBottle()
{
return new CokeBottle();
}
public ILabel createLabel()
{
return new CokeLabel();
}
public IWater createWater()
{
return new CokeWater();
}
}
| [
"vim.cmd@gmail.com"
] | vim.cmd@gmail.com |
24b3a36100efd6a949b25209322b007a38aec59f | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/7/7_ea8f6d0f2e5d61ab57734d554818b5aad97294ca/Compiler/7_ea8f6d0f2e5d61ab57734d554818b5aad97294ca_Compiler_s.java | 3f5a6d5d5290bd6c0e59714337feaf2ea7d85fb0 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,067 | java | package illarion.compile;
import illarion.compile.impl.Compile;
import org.apache.commons.cli.*;
import javax.annotation.Nonnull;
import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.EnumMap;
import java.util.Map;
/**
* This the the main class for the compiler. It determines the kind of compiler required for the set file and performs
* the compiling operation.
*
* @author Martin Karing <nitram@illarion.org>
*/
public class Compiler {
private static Map<CompilerType, Path> storagePaths;
public static void main(final String[] args) {
Options options = new Options();
final Option npcDir = new Option("n", "npc-dir", true, "The place where the compiled NPC files are stored.");
npcDir.setArgs(1);
npcDir.setArgName("directory");
npcDir.setRequired(false);
options.addOption(npcDir);
final Option questDir = new Option("q", "quest-dir", true,
"The place where the compiled Quest files are " + "stored.");
questDir.setArgs(1);
questDir.setArgName("directory");
questDir.setRequired(false);
options.addOption(questDir);
CommandLineParser parser = new GnuParser();
try {
CommandLine cmd = parser.parse(options, args);
storagePaths = new EnumMap<>(CompilerType.class);
String npcPath = cmd.getOptionValue('n');
if (npcPath != null) {
storagePaths.put(CompilerType.easyNPC, Paths.get(npcPath));
}
String questPath = cmd.getOptionValue('q');
if (questPath != null) {
storagePaths.put(CompilerType.easyQuest, Paths.get(questPath));
}
String[] files = cmd.getArgs();
for (String file : files) {
Path path = Paths.get(file);
if (Files.isDirectory(path)) {
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
FileVisitResult result = super.visitFile(file, attrs);
if (result == FileVisitResult.CONTINUE) {
processPath(file);
return FileVisitResult.CONTINUE;
}
return result;
}
});
} else {
processPath(path);
}
}
} catch (final ParseException e) {
final HelpFormatter helpFormatter = new HelpFormatter();
helpFormatter.printHelp("java -jar compiler.jar [Options] File", options);
System.exit(-1);
} catch (final IOException e) {
System.err.println(e.getLocalizedMessage());
System.exit(-1);
}
}
private static void processPath(@Nonnull final Path path) throws IOException {
if (Files.isDirectory(path)) {
return;
}
int compileResult = 1;
for (CompilerType type : CompilerType.values()) {
if (type.isValidFile(path)) {
Compile compile = type.getImplementation();
if (path.isAbsolute()) {
if (storagePaths.containsKey(type)) {
compile.setTargetDir(storagePaths.get(type));
} else {
compile.setTargetDir(path.getParent());
}
} else {
if (storagePaths.containsKey(type)) {
Path parent = path.getParent();
if (parent == null) {
compile.setTargetDir(storagePaths.get(type));
} else {
compile.setTargetDir(storagePaths.get(type).resolve(parent));
}
} else {
Path parent = path.getParent();
if (parent == null) {
compile.setTargetDir(path.toAbsolutePath().getParent());
} else {
compile.setTargetDir(parent);
}
}
}
compileResult = compile.compileFile(path.toAbsolutePath());
if (compileResult == 0) {
break;
}
}
}
switch (compileResult) {
case 1:
System.out.println("Skipped file: " + path.getFileName());
break;
case 0:
return;
default:
System.exit(compileResult);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
6a840189733d55c7719c2dcd63d20ec0e91bfa60 | f4f0e987a6279febffc6cfe9bfb33d1423404a27 | /src/main/java/LeetCode/Simulation/LRUCache.java | 5fc6075944093f01c4ae3244a3c8ec4b6275608c | [] | no_license | mabyoung/JavaPractice | b152d5309e602ba19e4c3988db70ba4d90c4cd72 | e28338e671fd3711b32062a95e8169f26687d284 | refs/heads/master | 2022-10-19T22:32:23.778861 | 2022-10-17T11:55:58 | 2022-10-17T11:55:58 | 144,514,249 | 0 | 0 | null | 2022-09-01T23:11:18 | 2018-08-13T01:21:53 | Java | UTF-8 | Java | false | false | 2,522 | java | package LeetCode.Simulation;
import java.util.*;
public class LRUCache {
class DLinkedNode {
int key;
int value;
DLinkedNode prev;
DLinkedNode next;
DLinkedNode() {
}
DLinkedNode(int key, int value) {
this.key = key;
this.value = value;
}
}
private Map<Integer, DLinkedNode> cache = new HashMap<>();
private int capacity;
private int size = 0;
private DLinkedNode head;
private DLinkedNode tail;
public LRUCache(int capacity) {
this.capacity = capacity;
head = new DLinkedNode();
tail = new DLinkedNode();
head.next = tail;
tail.prev = head;
}
public int get(int key) {
if (!cache.containsKey(key)) {
return -1;
}
DLinkedNode target = cache.get(key);
target.prev.next = target.next;
target.next.prev = target.prev;
target.next = head.next;
head.next.prev = target;
head.next = target;
target.prev = head;
return target.value;
}
public void put(int key, int value) {
if (!cache.containsKey(key)) {
DLinkedNode newNode = new DLinkedNode(key, value);
cache.put(key, newNode);
newNode.next = head.next;
newNode.next.prev = newNode;
head.next = newNode;
newNode.prev = head;
size++;
if (size > capacity) {
cache.remove(tail.prev.key);
tail.prev.prev.next = tail;
tail.prev = tail.prev.prev;
size--;
}
} else {
DLinkedNode target = cache.get(key);
target.value = value;
target.prev.next = target.next;
target.next.prev = target.prev;
target.next = head.next;
target.next.prev = target;
head.next = target;
target.prev = head;
}
}
public static void main(String[] args) {
LRUCache lruCache = new LRUCache(2);
lruCache.put(1, 1);
lruCache.put(2, 2);
System.out.println(lruCache.get(1));
lruCache.put(3, 3);
System.out.println(lruCache.get(2));
lruCache.put(4, 4);
System.out.println(lruCache.get(1));
System.out.println(lruCache.get(3));
System.out.println(lruCache.get(4));
}
}
| [
"349763010@qq.com"
] | 349763010@qq.com |
03bb805a41acd0b8d903332cfc141d39cb6cbccd | a90b947e3d817844604ca13aa9b21bad53d34a83 | /src/main/com/cloudstong/platform/third/bpm/service/BpmNodeMessageService.java | abd137777a1362334b11296bbb011e6e1e5b2dff | [] | no_license | duanlp/yunplatform | 460bcc89a0de67d8221ebf28517f995f8f3cae41 | f274bd9da90c375b6b8117ef20daf481f0563797 | refs/heads/master | 2021-05-07T03:57:15.693668 | 2017-09-11T10:28:21 | 2017-09-11T10:28:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,439 | java | package com.cloudstong.platform.third.bpm.service;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.cloudstong.platform.core.util.UniqueIdUtil;
import com.cloudstong.platform.third.bpm.dao.BpmNodeMessageDao;
import com.cloudstong.platform.third.bpm.dao.MessageDao;
import com.cloudstong.platform.third.bpm.model.BpmNodeMessage;
import com.cloudstong.platform.third.bpm.model.Message;
@Service
public class BpmNodeMessageService {
@Resource
private BpmNodeMessageDao dao;
@Resource
private MessageDao messageDao;
public List<BpmNodeMessage> getByActDefId(String actDefId) {
return dao.getByActDefId(actDefId);
}
public List<BpmNodeMessage> getListByActDefIdNodeId(String actDefId, String nodeId) {
return dao.getMessageByActDefIdNodeId(actDefId, nodeId);
}
public void saveAndEdit(String actDefId, String nodeId, List<Message> messages) throws Exception {
messageDao.delByActdefidAndNodeid(actDefId, nodeId);
dao.delByActDefIdAndNodeId(actDefId, nodeId);
BpmNodeMessage bpmMessage = new BpmNodeMessage();
bpmMessage.setActDefId(actDefId);
bpmMessage.setNodeId(nodeId);
for (Message message : messages) {
bpmMessage.setId(Long.valueOf(UniqueIdUtil.genId()));
bpmMessage.setMessageId(Long.valueOf(UniqueIdUtil.genId()));
message.setMessageId(bpmMessage.getMessageId());
dao.save(bpmMessage);
messageDao.save(message);
}
}
} | [
"wangzhiyun999@163.com"
] | wangzhiyun999@163.com |
16bce6bb2bd2f0c786219a75caee99f22d575149 | c9b8db6ceff0be3420542d0067854dea1a1e7b12 | /web/KoreanAir/src/main/java/com/ke/css/cimp/ffm/ffm6/Rule_SYSTEM_IDENTIFIER.java | 95a5e7ad7ab08f2fc28fc250e94b66c1971303ca | [
"Apache-2.0"
] | permissive | ganzijo/portfolio | 12ae1531bd0f4d554c1fcfa7d68953d1c79cdf9a | a31834b23308be7b3a992451ab8140bef5a61728 | refs/heads/master | 2021-04-15T09:25:07.189213 | 2018-03-22T12:11:00 | 2018-03-22T12:11:00 | 126,326,291 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,210 | java | package com.ke.css.cimp.ffm.ffm6;
/* -----------------------------------------------------------------------------
* Rule_SYSTEM_IDENTIFIER.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.5
* Produced : Fri Feb 23 10:56:35 KST 2018
*
* -----------------------------------------------------------------------------
*/
import java.util.ArrayList;
final public class Rule_SYSTEM_IDENTIFIER extends Rule
{
public Rule_SYSTEM_IDENTIFIER(String spelling, ArrayList<Rule> rules)
{
super(spelling, rules);
}
public Object accept(Visitor visitor)
{
return visitor.visit(this);
}
public static Rule_SYSTEM_IDENTIFIER parse(ParserContext context)
{
context.push("SYSTEM_IDENTIFIER");
boolean parsed = true;
int s0 = context.index;
ParserAlternative a0 = new ParserAlternative(s0);
ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>();
parsed = false;
{
int s1 = context.index;
ParserAlternative a1 = new ParserAlternative(s1);
parsed = true;
if (parsed)
{
boolean f1 = true;
@SuppressWarnings("unused")
int c1 = 0;
for (int i1 = 0; i1 < 2 && f1; i1++)
{
Rule rule = Rule_Typ_Alpha.parse(context);
if ((f1 = rule != null))
{
a1.add(rule, context.index);
c1++;
}
}
parsed = true;
}
if (parsed)
{
as1.add(a1);
}
context.index = s1;
}
ParserAlternative b = ParserAlternative.getBest(as1);
parsed = b != null;
if (parsed)
{
a0.add(b.rules, b.end);
context.index = b.end;
}
Rule rule = null;
if (parsed)
{
rule = new Rule_SYSTEM_IDENTIFIER(context.text.substring(a0.start, a0.end), a0.rules);
}
else
{
context.index = s0;
}
context.pop("SYSTEM_IDENTIFIER", parsed);
return (Rule_SYSTEM_IDENTIFIER)rule;
}
}
/* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
| [
"whdnfka111@gmail.com"
] | whdnfka111@gmail.com |
4cf29c9b28db8bc2b25219eb470a4f0ce1289809 | a5d01febfd8d45a61f815b6f5ed447e25fad4959 | /Source Code/5.5.1/sources/com/iqoption/d/hy.java | a744467e797064f72125012a5aa74cb156018ccc | [] | no_license | kkagill/Decompiler-IQ-Option | 7fe5911f90ed2490687f5d216cb2940f07b57194 | c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6 | refs/heads/master | 2020-09-14T20:44:49.115289 | 2019-11-04T06:58:55 | 2019-11-04T06:58:55 | 223,236,327 | 1 | 0 | null | 2019-11-21T18:17:17 | 2019-11-21T18:17:16 | null | UTF-8 | Java | false | false | 1,750 | java | package com.iqoption.d;
import android.databinding.DataBindingComponent;
import android.databinding.ViewDataBinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.LinearLayout;
/* compiled from: DialogClosedDealsHeaderListDoBindingImpl */
public class hy extends hx {
@Nullable
private static final IncludedLayouts awU = null;
@Nullable
private static final SparseIntArray awV = null;
private long awW;
@NonNull
private final LinearLayout axx;
protected boolean onFieldChange(int i, Object obj, int i2) {
return false;
}
public boolean setVariable(int i, @Nullable Object obj) {
return true;
}
public hy(@Nullable DataBindingComponent dataBindingComponent, @NonNull View view) {
this(dataBindingComponent, view, ViewDataBinding.mapBindings(dataBindingComponent, view, 1, awU, awV));
}
private hy(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
super(dataBindingComponent, view, 0);
this.awW = -1;
this.axx = (LinearLayout) objArr[0];
this.axx.setTag(null);
setRootTag(view);
invalidateAll();
}
public void invalidateAll() {
synchronized (this) {
this.awW = 1;
}
requestRebind();
}
public boolean hasPendingBindings() {
synchronized (this) {
if (this.awW != 0) {
return true;
}
return false;
}
}
protected void executeBindings() {
synchronized (this) {
long j = this.awW;
this.awW = 0;
}
}
}
| [
"yihsun1992@gmail.com"
] | yihsun1992@gmail.com |
a80554c84566573b94ac765ce03c63fbc52aa161 | 4db24524ac96aca7b8d90599ac8e817e204a86b1 | /4a/src/M4A.java | bd6dbeb070572ca91f586f84c3f0c5ade20b233c | [] | no_license | khovanskiy/codeforces | 0032f9a3c4e9f1078e1f489d2eba55fe0531f168 | 67d45e3742aca44648ce482618d88e9451b2a238 | refs/heads/master | 2021-01-15T23:28:21.907745 | 2019-04-01T21:20:53 | 2019-04-01T21:20:53 | 99,934,736 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 314 | java | import java.util.Scanner;
public class M4A {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int w = in.nextInt();
if (w % 2 == 0 && w > 2) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
| [
"victor.khovanskiy@gmail.com"
] | victor.khovanskiy@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.