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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
44046412d942d70f9ba0ea9b8de9dc230c8baf0a
|
0d042b2b4a1ca43a20ef377a3b8b780f42006bb9
|
/jgnash-fx/src/main/java/jgnash/uifx/controllers/MainToolBarController.java
|
990daa8e7719a91a9dddfc312646c1b44bcb56e2
|
[] |
no_license
|
leeschumacher/jgnash
|
cdec24327f30cda109ad34567ffd23e987352067
|
38ec81dcb9bdea81ace9977491e175e5b855be02
|
refs/heads/master
| 2021-01-15T07:53:21.329504
| 2014-12-14T14:36:09
| 2014-12-14T14:36:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,821
|
java
|
/*
* jGnash, a personal finance application
* Copyright (C) 2001-2014 Craig Cavanaugh
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package jgnash.uifx.controllers;
import java.net.URL;
import java.util.ResourceBundle;
import jgnash.engine.Engine;
import jgnash.engine.EngineFactory;
import jgnash.engine.message.Message;
import jgnash.engine.message.MessageBus;
import jgnash.engine.message.MessageChannel;
import jgnash.engine.message.MessageListener;
import jgnash.uifx.StaticUIMethods;
import jgnash.uifx.tasks.CloseFileTask;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import org.controlsfx.glyphfont.FontAwesome;
import org.controlsfx.glyphfont.GlyphFont;
import org.controlsfx.glyphfont.GlyphFontRegistry;
/**
* @author Craig Cavanaugh
*/
public class MainToolBarController implements Initializable, MessageListener {
@FXML
public Button closeButton;
@FXML
public Button updateCurrencies;
@FXML
Button updateSecurities;
@FXML
Button openButton;
@Override
public void initialize(final URL location, final ResourceBundle resources) {
final GlyphFont fontAwesome = GlyphFontRegistry.font("FontAwesome");
closeButton.setGraphic(fontAwesome.create(FontAwesome.Glyph.TIMES));
openButton.setGraphic(fontAwesome.create(FontAwesome.Glyph.FOLDER_OPEN));
updateSecurities.setGraphic(fontAwesome.create(FontAwesome.Glyph.CLOUD_DOWNLOAD));
updateCurrencies.setGraphic(fontAwesome.create(FontAwesome.Glyph.CLOUD_DOWNLOAD));
MessageBus.getInstance().registerListener(this, MessageChannel.SYSTEM);
}
@FXML
protected void handleOpenAction(final ActionEvent event) {
StaticUIMethods.showOpenDialog();
}
@FXML
public void handleCloseAction(ActionEvent actionEvent) {
if (EngineFactory.getEngine(EngineFactory.DEFAULT) != null) {
CloseFileTask.initiateShutdown();
}
}
@Override
public void messagePosted(final Message event) {
Platform.runLater(() -> {
switch (event.getEvent()) {
case FILE_NEW_SUCCESS:
case FILE_LOAD_SUCCESS:
updateSecurities.setDisable(false);
updateCurrencies.setDisable(false);
break;
case FILE_CLOSING:
case FILE_LOAD_FAILED:
updateSecurities.setDisable(true);
updateCurrencies.setDisable(true);
break;
default:
break;
}
});
}
@FXML
void handleSecuritiesUpdateAction(final ActionEvent actionEvent) {
final Engine engine = EngineFactory.getEngine(EngineFactory.DEFAULT);
if (engine != null) {
engine.startSecuritiesUpdate(0);
}
}
@FXML
public void handleCurrenciesUpdateAction(ActionEvent actionEvent) {
final Engine engine = EngineFactory.getEngine(EngineFactory.DEFAULT);
if (engine != null) {
engine.startExchangeRateUpdate(0);
}
}
}
|
[
"jgnash.devel@gmail.com"
] |
jgnash.devel@gmail.com
|
af082dafcf17786e58439efaaa153ac0e4e8eb06
|
0d7220b4a680f220e04ecad46d51b6532d90bf64
|
/dev/nuker/pyro/faR.java
|
d4622c0e9873b6e9c5ca9abae6b7d52a58c97689
|
[] |
no_license
|
HelpMopDog/PyroClient-Deobf
|
d2816bd39de7a792748e52e7b1de611b9fe07473
|
23cdef6fed8ae19025757c076f2147fbb9816802
|
refs/heads/main
| 2023-08-28T01:57:25.423834
| 2021-10-23T03:16:53
| 2021-10-23T03:16:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,855
|
java
|
/**
* Obfuscator: Binsecure Decompiler: FernFlower
* De-obfuscated by Gopro336
*/
package dev.nuker.pyro;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Lambda;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
public class faR extends Lambda implements Function0 {
// $FF: renamed from: c int
public int field_57;
// $FF: renamed from: c net.minecraft.client.renderer.BufferBuilder
public BufferBuilder field_58;
// $FF: renamed from: c net.minecraft.client.gui.ScaledResolution
public ScaledResolution field_59;
// $FF: renamed from: c net.minecraft.client.renderer.Tessellator
public Tessellator field_60;
public Object invoke() {
this.method_96();
return Unit.INSTANCE;
}
public faR(int var1, BufferBuilder var2, ScaledResolution var3, Tessellator var4) {
this.field_57 = var1;
this.field_58 = var2;
this.field_59 = var3;
this.field_60 = var4;
super(0);
}
// $FF: renamed from: c () void
public void method_96() {
int var1 = 0;
for(int var2 = this.field_57; var1 < var2; ++var1) {
this.field_58.begin(7, DefaultVertexFormats.POSITION_TEX);
this.field_58.pos(0.0D, (double)this.field_59.getScaledHeight(), -90.0D).tex(0.0D, 1.0D).endVertex();
this.field_58.pos((double)this.field_59.getScaledWidth(), (double)this.field_59.getScaledHeight(), -90.0D).tex(1.0D, 1.0D).endVertex();
this.field_58.pos((double)this.field_59.getScaledWidth(), 0.0D, -90.0D).tex(1.0D, 0.0D).endVertex();
this.field_58.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).endVertex();
this.field_60.draw();
}
}
}
|
[
"63124240+Gopro336@users.noreply.github.com"
] |
63124240+Gopro336@users.noreply.github.com
|
56452d904e0c6be2da4862ac7a5e0afeac07aafc
|
c71856e5634fcf93e7a08508c8a5270ff0f346bb
|
/java/com/hmdzl/spspd/items/food/Honey.java
|
91d38bbe82117696530a48c8d207f2f6d7abc8cc
|
[] |
no_license
|
hmdzl001/SPS-PD
|
3c97581f46fd20d89ebfcfc02016883e2ed53b4f
|
32c5549700634f1a92dd8f7fec9e2731026d03c0
|
refs/heads/master
| 2023-08-17T04:50:22.543027
| 2023-08-12T01:45:10
| 2023-08-12T01:45:10
| 88,491,986
| 43
| 19
| null | 2019-09-03T19:52:33
| 2017-04-17T09:15:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,608
|
java
|
/*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.hmdzl.spspd.items.food;
import com.hmdzl.spspd.actors.hero.Hero;
import com.hmdzl.spspd.sprites.ItemSpriteSheet;
import com.watabou.utils.Random;
public class Honey extends Food {
{
//name = "Honey";
image = ItemSpriteSheet.POTION_HONEY;
energy = 50;
hornValue = 0;
}
@Override
public void execute(Hero hero, String action) {
super.execute(hero, action);
if (action.equals(AC_EAT)) {
hero.TRUE_HT = hero.TRUE_HT + (Random.Int(5, 10));
hero.updateHT(true);
//hero.HP = hero.HP+Math.min(((hero.TRUE_HT-hero.HP)/2), hero.TRUE_HT-hero.HP);
//Buff.detach(hero, Poison.class);
//Buff.detach(hero, Cripple.class);
//Buff.detach(hero, STRdown.class);
//Buff.detach(hero, Bleeding.class);
//hero.sprite.emitter().start(Speck.factory(Speck.HEALING), 0.4f, 4);
}
}
@Override
public int price() {
return 500 * quantity;
}
}
|
[
"295754791@qq.com"
] |
295754791@qq.com
|
d3704d62842aefc80c69e61eadaa51efd9791213
|
a20b603f2d97b0996d8cc2493423119627e1f251
|
/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentModelMetadataOrBuilder.java
|
5fc98c762e29ee5b6932f41c3f5d7d6340f8c167
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
pmakani/java-automl
|
0e0d76bda28064fe4d150a3408e5c146353de9cc
|
fd7a70299148bce6649271d2589b1986d21fbe83
|
refs/heads/master
| 2020-09-13T18:43:42.887317
| 2019-12-19T21:21:07
| 2019-12-19T21:21:07
| 222,871,891
| 0
| 0
|
NOASSERTION
| 2019-11-20T06:59:23
| 2019-11-20T06:59:22
| null |
UTF-8
|
Java
| false
| false
| 948
|
java
|
/*
* Copyright 2019 Google 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/automl/v1/text.proto
package com.google.cloud.automl.v1;
public interface TextSentimentModelMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.automl.v1.TextSentimentModelMetadata)
com.google.protobuf.MessageOrBuilder {}
|
[
"chingor@google.com"
] |
chingor@google.com
|
1c72444e6b225f8948336461cc148f2b7dc9d000
|
db2cd2a4803e546d35d5df2a75b7deb09ffadc01
|
/nemo-tfl-common/src/main/java/com/novacroft/nemo/tfl/common/data_service/impl/PayAsYouGoItemDataServiceImpl.java
|
df6f7feee0bc03ce0c33801254bf594071fb8ee7
|
[] |
no_license
|
balamurugan678/nemo
|
66d0d6f7062e340ca8c559346e163565c2628814
|
1319daafa5dc25409ae1a1872b1ba9b14e5a297e
|
refs/heads/master
| 2021-01-19T17:47:22.002884
| 2015-06-18T12:03:43
| 2015-06-18T12:03:43
| 37,656,983
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,159
|
java
|
package com.novacroft.nemo.tfl.common.data_service.impl;
import com.novacroft.nemo.common.data_service.BaseDataServiceImpl;
import com.novacroft.nemo.tfl.common.converter.impl.PayAsYouGoItemConverterImpl;
import com.novacroft.nemo.tfl.common.data_access.PayAsYouGoItemDAO;
import com.novacroft.nemo.tfl.common.data_service.PayAsYouGoItemDataService;
import com.novacroft.nemo.tfl.common.domain.PayAsYouGoItem;
import com.novacroft.nemo.tfl.common.transfer.PayAsYouGoItemDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* Pay as you go item data service implementation
*/
@Service(value = "payAsYouGoItemDataService")
@Transactional(readOnly = true)
public class PayAsYouGoItemDataServiceImpl extends BaseDataServiceImpl<PayAsYouGoItem, PayAsYouGoItemDTO>
implements PayAsYouGoItemDataService {
@Autowired
public void setDao(PayAsYouGoItemDAO dao) {
this.dao = dao;
}
@Autowired
public void setConverter(PayAsYouGoItemConverterImpl converter) {
this.converter = converter;
}
@Override
public PayAsYouGoItem getNewEntity() {
return new PayAsYouGoItem();
}
@Override
public PayAsYouGoItemDTO findByCartIdAndCardId(Long cartId, Long cardId) {
if (cartId != null && cardId != null) {
PayAsYouGoItem payAsYouGoItem = new PayAsYouGoItem();
payAsYouGoItem.setCardId(cardId);
payAsYouGoItem = dao.findByExampleUniqueResult(payAsYouGoItem);
if (payAsYouGoItem != null) {
return converter.convertEntityToDto(payAsYouGoItem);
}
}
return null;
}
@Override
public List<PayAsYouGoItemDTO> findByCustomerOrderId(Long customerOrderId) {
PayAsYouGoItem payAsYouGoItem = new PayAsYouGoItem();
payAsYouGoItem.setOrderId(customerOrderId);
List<PayAsYouGoItem> items = dao.findByExample(payAsYouGoItem);
return convert(items);
}
}
|
[
"balamurugan678@yahoo.co.in"
] |
balamurugan678@yahoo.co.in
|
c2affd23d81dc7195674049cde772878392b4722
|
352163a8f69f64bc87a9e14471c947e51bd6b27d
|
/bin/platform/ext/core/testsrc/de/hybris/platform/servicelayer/event/ConfiguredTestListener1.java
|
ddbf8c4e90520d52eaf3cf69a63365e289d23243
|
[] |
no_license
|
GTNDYanagisawa/merchandise
|
2ad5209480d5dc7d946a442479cfd60649137109
|
e9773338d63d4f053954d396835ac25ef71039d3
|
refs/heads/master
| 2021-01-22T20:45:31.217238
| 2015-05-20T06:23:45
| 2015-05-20T06:23:45
| 35,868,211
| 3
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 534
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2013 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.servicelayer.event;
public class ConfiguredTestListener1 extends ConfiguredTestListener
{
//noop
}
|
[
"yanagisawa@gotandadenshi.jp"
] |
yanagisawa@gotandadenshi.jp
|
ea95e93ca2d5cc770a95a8057a383f3f3765e26c
|
07567d1b051d679c203d63b7feaa3429f4599862
|
/RCL/org.gemoc.rover.rcl.semantics/xtend-gen/org/gemoc/rover/rcl/semantics/StringValueAspect.java
|
cfe6981eccacd04d82b30b41525904c6ba85a8df
|
[] |
no_license
|
tdegueul/gemoc-pirover
|
1bce59c253de235a2a594f5b2ea96c1632100099
|
b786281099b0cc76f292a0a7f9218c4b8e02cae8
|
refs/heads/master
| 2020-04-05T13:00:34.008010
| 2017-10-10T14:15:57
| 2017-10-10T14:15:57
| 95,002,463
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,253
|
java
|
package org.gemoc.rover.rcl.semantics;
import fr.inria.diverse.k3.al.annotationprocessor.Aspect;
import org.gemoc.rover.rcl.semantics.StringValueAspectStringValueAspectProperties;
import rcl.StringValue;
@Aspect(className = StringValue.class)
@SuppressWarnings("all")
public class StringValueAspect {
public static String getStringValue(final StringValue _self) {
final org.gemoc.rover.rcl.semantics.StringValueAspectStringValueAspectProperties _self_ = org.gemoc.rover.rcl.semantics.StringValueAspectStringValueAspectContext.getSelf(_self);
Object result = null;
if (_self instanceof rcl.MessageQuery){
result = org.gemoc.rover.rcl.semantics.MessageQueryAspect.getStringValue((rcl.MessageQuery)_self);
} else if (_self instanceof rcl.StringValue){
result = org.gemoc.rover.rcl.semantics.StringValueAspect._privk3_getStringValue(_self_, (rcl.StringValue)_self);
} else { throw new IllegalArgumentException("Unhandled parameter types: " + java.util.Arrays.<Object>asList(_self).toString()); };
return (java.lang.String)result;
}
protected static String _privk3_getStringValue(final StringValueAspectStringValueAspectProperties _self_, final StringValue _self) {
return _self.getSValue();
}
}
|
[
"degueule@cwi.nl"
] |
degueule@cwi.nl
|
ea6a1d0e7c3c15e27e31fbeb0addc69040932b63
|
d55b6bb9a2c7cf798a33909db81d7b47f80373aa
|
/src/game/entidades/Tiro.java
|
84fde7e82aaf973c40c433d81dea38f0c182c194
|
[] |
no_license
|
RanyellHenrique/GameJPlay
|
487f79ad996234440df5c25991ea2ed53d2ccc1b
|
ad3d40c1543c4df5b55d97b7e5bc5ccef81666ff
|
refs/heads/master
| 2021-05-23T17:09:07.411235
| 2020-05-28T18:14:09
| 2020-05-28T18:14:09
| 253,394,915
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,042
|
java
|
package game.entidades;
import jplay.Sprite;
public class Tiro extends Sprite {
public static final int LEFT = 1, RIGHT = 2, STOP = 3, UP = 4, DOWN = 5;
protected static final int VELOCIDADE_TIRO = 1;
protected int caminho = STOP;
protected boolean movendo = false;
protected int direcao = 3;
public Tiro(double x, double y, int caminho) {
super("src/resouces/sprites/flecha.png", 12);
this.caminho = caminho;
this.x = x;
this.y = y;
}
public void mover() {
if(caminho == LEFT) {
this.x -= VELOCIDADE_TIRO;
if(direcao != 1)
setSequence(3, 6);
movendo = true;
}
if(caminho == RIGHT) {
this.x += VELOCIDADE_TIRO;
if(direcao != 2)
setSequence(6, 9);
movendo = true;
}
if(caminho == UP) {
this.y -= VELOCIDADE_TIRO;
if(direcao != 4)
setSequence(9, 12);
movendo = true;
}
if(caminho == DOWN || caminho == STOP) {
this.y += VELOCIDADE_TIRO;
if(direcao != 5)
setSequence(0, 3);
movendo = true;
}
if(movendo) {
update();
movendo = false;
}
}
}
|
[
"ranyellhenrique@gmail.com"
] |
ranyellhenrique@gmail.com
|
759f73c10b850c658e5286d106b97e29fffe16ce
|
7f8911ca170a2a974576a0d44125e733eeca3b0c
|
/admin-portal/sms-server/src/main/java/com/tng/portal/sms/server/entity/Sms.java
|
20771b5060bf9dcf900f6e75640e362efe632090
|
[] |
no_license
|
jianfengEric/testcase3
|
019afb24e28a8019e1bc4f3b22239be8fe48aa77
|
f7f98e281fd12d413f4c923172e96f86ccb6d34b
|
refs/heads/master
| 2020-04-28T08:53:01.617761
| 2019-04-01T03:12:24
| 2019-04-01T03:12:24
| 175,145,884
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,236
|
java
|
package com.tng.portal.sms.server.entity;
import javax.persistence.Column;
import javax.persistence.Id;
/**
* Created by Jimmy on 2018/7/19.
*/
//@Entity
public class Sms {
@Id
private Long id;
@Column(name = "reference_id")
private String jobReferenceId;
@Column(name = "sender_account_id")
private String senderAccountId;
@Column(name = "create_date")
private String createDate;
@Column(name = "mobile_number")
private String mobileNumber;
@Column(name = "status")
private String status;
@Column(name = "sms_provider_id")
private String providerId;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getJobReferenceId() {
return jobReferenceId;
}
public void setJobReferenceId(String jobReferenceId) {
this.jobReferenceId = jobReferenceId;
}
public String getSenderAccountId() {
return senderAccountId;
}
public void setSenderAccountId(String senderAccountId) {
this.senderAccountId = senderAccountId;
}
public String getCreateDate() {
return createDate;
}
public void setCreateDate(String createDate) {
this.createDate = createDate;
}
public String getMobileNumber() {
return mobileNumber;
}
public void setMobileNumber(String mobileNumber) {
this.mobileNumber = mobileNumber;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getProviderId() {
return providerId;
}
public void setProviderId(String providerId) {
this.providerId = providerId;
}
@Override
public String toString() {
return "Sms{" +
"id=" + id +
", jobReferenceId='" + jobReferenceId + '\'' +
", senderAccountId='" + senderAccountId + '\'' +
", createDate='" + createDate + '\'' +
", mobileNumber='" + mobileNumber + '\'' +
", status='" + status + '\'' +
", providerId='" + providerId + '\'' +
'}';
}
}
|
[
"eric.lu@sinodynamic.com"
] |
eric.lu@sinodynamic.com
|
b2e5c9821398452502101b2d1613b1d8086f24ce
|
bceba483c2d1831f0262931b7fc72d5c75954e18
|
/src/qubed/corelogic/VERIFICATIONEXTENSION.java
|
1a3babcdba05acca8a0afbcd1ff43c8f85e1735a
|
[] |
no_license
|
Nigel-Qubed/credit-services
|
6e2acfdb936ab831a986fabeb6cefa74f03c672c
|
21402c6d4328c93387fd8baf0efd8972442d2174
|
refs/heads/master
| 2022-12-01T02:36:57.495363
| 2020-08-10T17:26:07
| 2020-08-10T17:26:07
| 285,552,565
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,453
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// 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: 2020.08.05 at 04:46:29 AM CAT
//
package qubed.corelogic;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for VERIFICATION_EXTENSION complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="VERIFICATION_EXTENSION">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="MISMO" type="{http://www.mismo.org/residential/2009/schemas}MISMO_BASE" minOccurs="0"/>
* <element name="OTHER" type="{http://www.mismo.org/residential/2009/schemas}OTHER_BASE" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VERIFICATION_EXTENSION", propOrder = {
"mismo",
"other"
})
public class VERIFICATIONEXTENSION {
@XmlElement(name = "MISMO")
protected MISMOBASE mismo;
@XmlElement(name = "OTHER")
protected OTHERBASE other;
/**
* Gets the value of the mismo property.
*
* @return
* possible object is
* {@link MISMOBASE }
*
*/
public MISMOBASE getMISMO() {
return mismo;
}
/**
* Sets the value of the mismo property.
*
* @param value
* allowed object is
* {@link MISMOBASE }
*
*/
public void setMISMO(MISMOBASE value) {
this.mismo = value;
}
/**
* Gets the value of the other property.
*
* @return
* possible object is
* {@link OTHERBASE }
*
*/
public OTHERBASE getOTHER() {
return other;
}
/**
* Sets the value of the other property.
*
* @param value
* allowed object is
* {@link OTHERBASE }
*
*/
public void setOTHER(OTHERBASE value) {
this.other = value;
}
}
|
[
"vectorcrael@yahoo.com"
] |
vectorcrael@yahoo.com
|
3dcbcbfd3bf357714715815f7083a752e655dee0
|
cac52d34455a08b3fb882d0a58e0b3b72206e935
|
/backend/web/src/main/java/ru/trendtech/repositories/OrderPaymentRepository.java
|
8f98d264ae54e99a74e55435cb73b94545cd6e6b
|
[] |
no_license
|
MrFractal/taxisto
|
75f72238ab4ce3c14f6e559098653ae53756fbaa
|
195863dc17f5c6147c578b5695c1bc34ef9702a5
|
refs/heads/master
| 2021-01-10T16:25:28.332080
| 2016-02-17T12:10:01
| 2016-02-17T12:10:01
| 51,916,660
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,105
|
java
|
package ru.trendtech.repositories;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
import ru.trendtech.domain.courier.Order;
import ru.trendtech.domain.courier.OrderPayment;
import ru.trendtech.domain.courier.PaymentState;
import java.util.List;
/**
* Created by petr on 14.09.2015.
*/
@Repository
public interface OrderPaymentRepository extends PagingAndSortingRepository<OrderPayment, Long> {
List<OrderPayment> findByOrder(Order order);
List<OrderPayment> findByOrderAndPaymentState(Order order, PaymentState paymentState);
List<OrderPayment> findByOrderAndPaymentStateIn(Order order, List<PaymentState> paymentStateList);
List<OrderPayment> findByOrderOrderByTimeOfRequestingDesc(Order order, Pageable pageable);
OrderPayment findByTransactionId(String transactionId);
@Query("select op from OrderPayment op where op.id = ?1")
OrderPayment getOrderPaymentById(long orderPaymentId);
}
|
[
"fr@bekker.com.ua"
] |
fr@bekker.com.ua
|
ed0b68059432f21980228b5aeb9e8cd343d8b5ba
|
6883c617e4439b8fa5497373f5c24152d843a1ba
|
/src/main/java/com/lothrazar/cyclicmagic/block/trash/ContainerTrash.java
|
8b45b3231135a40ef42469922ebaa7f0a334a75e
|
[
"MIT"
] |
permissive
|
sandtechnology/Cyclic
|
b84c8ba00d9d3ec099bb15c24069e2289bd62844
|
a668cfe42db63c0c2d660d3e6abebc21ac7a50b4
|
refs/heads/develop
| 2021-08-18T00:01:12.701994
| 2019-12-31T05:30:04
| 2019-12-31T05:30:04
| 131,421,090
| 0
| 0
|
MIT
| 2019-06-09T10:32:57
| 2018-04-28T15:25:17
|
Java
|
UTF-8
|
Java
| false
| false
| 3,762
|
java
|
/*******************************************************************************
* The MIT License (MIT)
*
* Copyright (C) 2014-2018 Sam Bassett (aka Lothrazar)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
******************************************************************************/
package com.lothrazar.cyclicmagic.block.trash;
import com.lothrazar.cyclicmagic.gui.container.ContainerBaseMachine;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IContainerListener;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class ContainerTrash extends ContainerBaseMachine {
// tutorial used: http://www.minecraftforge.net/wiki/Containers_and_GUIs
public static final int SLOTX_START = 84;
public static final int SLOTY = 40;
public ContainerTrash(InventoryPlayer inventoryPlayer, TileEntityTrash te) {
super(te);
addSlotToContainer(new Slot(tile, 0, SLOTX_START, SLOTY));
for (int i = 1; i < 8; i++)
addSlotToContainer(new Slot(tile, i, 333, 333));
bindPlayerInventory(inventoryPlayer);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot) {
ItemStack stack = ItemStack.EMPTY;
Slot slotObject = inventorySlots.get(slot);
// null checks and checks if the item can be stacked (maxStackSize > 1)
if (slotObject != null && slotObject.getHasStack()) {
ItemStack stackInSlot = slotObject.getStack();
stack = stackInSlot.copy();
// merges the item into player inventory since its in the tileEntity
if (slot == 0) {
if (!this.mergeItemStack(stackInSlot, tile.getSizeInventory(), 36 + tile.getSizeInventory(), true)) {
return ItemStack.EMPTY;
}
}
// places it into the tileEntity is possible since its in the player
// inventory
else if (!this.mergeItemStack(stackInSlot, 0, tile.getSizeInventory(), false)) {
return ItemStack.EMPTY;
}
if (stackInSlot.getCount() == 0) {
slotObject.putStack(ItemStack.EMPTY);
}
else {
slotObject.onSlotChanged();
}
if (stackInSlot.getCount() == stack.getCount()) {
return ItemStack.EMPTY;
}
slotObject.onTake(player, stackInSlot);
}
return stack;
}
@Override
@SideOnly(Side.CLIENT)
public void updateProgressBar(int id, int data) {
this.tile.setField(id, data);
}
@Override
public void addListener(IContainerListener listener) {
super.addListener(listener);
listener.sendAllWindowProperties(this, this.tile);
}
}
|
[
"samson.bassett@gmail.com"
] |
samson.bassett@gmail.com
|
ee561f095f56dc22e36b3298c168c93fe3b6cc2a
|
d4bf818fb304449a7e703d679daf19d6b3035ee5
|
/src/main/java/com/appCrawler/pagePro/apkDetails/Cmgame_Detail.java
|
165629a7c4ee977ab0ed0b887bad66d3bf62d834
|
[] |
no_license
|
muyundefeng/SpringLearning
|
11524d754c97bf20f18c5810556b084200d4da70
|
15821700372be76d33ca943c38c76d7117c489d2
|
refs/heads/master
| 2020-04-06T05:01:16.391956
| 2016-10-25T02:58:02
| 2016-10-25T02:58:02
| 57,977,720
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,690
|
java
|
package com.appCrawler.pagePro.apkDetails;
import java.util.List;
import org.slf4j.LoggerFactory;
import us.codecraft.webmagic.Apk;
import us.codecraft.webmagic.Page;
public class Cmgame_Detail {
private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(Cmgame_Detail.class);
public static Apk getApkDetail(Page page){
Apk apk = null;
String appName = null; //app名字
String appDetailUrl = null; //具体页面url
String appDownloadUrl = null; //app下载地址
String osPlatform = null ; //运行平台
String appVersion = null; //app版本
String appSize = null; //app大小
String appUpdateDate = null; //更新日期
String appType = null; //下载的文件类型 apk?zip?rar?
String appVenderName = null; //app开发者 APK这个类中尚未添加
String appDownloadedTime=null; //app的下载次数
String appDescription = null; //app的详细描述
List<String> appScrenshot = null; //app的屏幕截图
String appTag = null; //app的应用标签
String appCategory = null; //app的应用类别
appDetailUrl=page.getUrl().toString();
appName=page.getHtml().xpath("//div[@class='andgm_info']/h1/text()").toString();
appDownloadedTime=page.getHtml().xpath("//div[@class='andgm_info']/p/span/text()").toString();
appCategory=page.getHtml().xpath("//div[@class='andgm_info']/ul/li[1]/text()").toString();
appCategory=extraInfo(appCategory);
appUpdateDate=page.getHtml().xpath("//div[@class='andgm_info']/ul/li[3]/text()").toString();
appUpdateDate=extraInfo(appUpdateDate);
appSize=page.getHtml().xpath("//div[@class='andgm_info']/ul/li[5]/text()").toString();
appSize=extraInfo(appSize);
osPlatform=page.getHtml().xpath("//div[@class='andgm_info']/ul/li[7]/text()").toString();
osPlatform=extraInfo(osPlatform);
appVenderName=page.getHtml().xpath("//div[@class='andgm_info']/ul/li[8]/text()").toString();
appVenderName=extraInfo(appVenderName);
appDownloadUrl=page.getHtml().xpath("//div[@class='andgm_down']/a/@href").toString();
appScrenshot=page.getHtml().xpath("//div[@id='bookslide-main']/ul/li/img/@src").all();
appDescription=page.getHtml().xpath("//div[@class='andgm_article']/text()").toString();
if(appName != null && appDownloadUrl != null){
apk = new Apk(appName,appDetailUrl,appDownloadUrl,osPlatform ,appVersion,appSize,appUpdateDate,appType,null);
// Apk(String appName,String appMetaUrl,String appDownloadUrl,String osPlatform ,
// String appVersion,String appSize,String appTsChannel, String appType,String cookie){
apk.setAppDownloadTimes(appDownloadedTime);
apk.setAppVenderName(appVenderName);
apk.setAppTag(appTag);
apk.setAppScreenshot(appScrenshot);
apk.setAppDescription(appDescription);
apk.setAppCategory(appCategory);
System.out.println("appName="+appName);
System.out.println("appDetailUrl="+appDetailUrl);
System.out.println("appDownloadUrl="+appDownloadUrl);
System.out.println("osPlatform="+osPlatform);
System.out.println("appVersion="+appVersion);
System.out.println("appSize="+appSize);
System.out.println("appUpdateDate="+appUpdateDate);
System.out.println("appType="+appType);
System.out.println("appVenderName="+appVenderName);
System.out.println("appDownloadedTime="+appDownloadedTime);
System.out.println("appDescription="+appDescription);
System.out.println("appTag="+appTag);
System.out.println("appScrenshot="+appScrenshot);
System.out.println("appCategory="+appCategory);
}
return apk;
}
private static String extraInfo(String str)
{
if(str!=null)
{
return str.split(":")[1];
}
else{
return null;
}
}
}
|
[
"2533604335@qq.com"
] |
2533604335@qq.com
|
d9ca07f228dda7e13840cebeeac96d792753223a
|
8db197e68943abefd9a026a2721365ddfdac6dd1
|
/app/src/main/java/cj/studio/netos/module/NetflowModule.java
|
25afaaaaf49c03598905846af35cbd2b1227d493
|
[] |
no_license
|
carocean/cj.studio.netos.single-activity.android
|
e2f55583e50b17d58343ee0ded1b24d25bb8ffad
|
7e2cb9a3b527c71f7eede3bdbdf904f37ee5e0a4
|
refs/heads/master
| 2020-03-31T01:42:13.457943
| 2018-10-06T00:39:01
| 2018-10-06T00:39:01
| 151,791,732
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,806
|
java
|
package cj.studio.netos.module;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import cj.studio.netos.R;
import cj.studio.netos.framework.Frame;
import cj.studio.netos.framework.IAxon;
import cj.studio.netos.framework.IModule;
import cj.studio.netos.framework.INavigation;
import cj.studio.netos.framework.IServiceProvider;
import cj.studio.netos.framework.IViewport;
import cj.studio.netos.framework.IWidget;
import cj.studio.netos.framework.view.CJBottomNavigationView;
public class NetflowModule extends Fragment implements IModule {
private List initData() {
List mDatas = new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,1,2,3,4,5,6));
return mDatas;
}
@Override
public boolean isBottomNavigationViewVisibility() {
return true;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view= inflater.inflate(R.layout.module_netflow, container, false);
RecyclerView mRecyclerView = (RecyclerView) view.findViewById(R.id.channels_recycler);
mRecyclerView.setAdapter(new MyRecyclerAdapter(this.getContext(), initData()));
// LinearLayoutManager layoutManager = new LinearLayoutManager(view.getContext());
// layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
// mRecyclerView.setLayoutManager(layoutManager);
Log.i("-------",mRecyclerView.getAdapter().getItemCount()+"");
return view;
}
@Override
public void input(Frame frame, IServiceProvider site) {
IAxon axon= site.getService(IAxon.class);
Frame f=new Frame("test /test/ netos/1.0");
axon.output("netos.mpusher",f);
}
@Override
public IWidget widget(String navigateable) {
return null;
}
@Override
public String name() {
return "netflow";
}
@Override
public int viewport() {
return R.layout.viewport_module;
}
@Override
public void onViewport(IViewport viewport, Activity on, IServiceProvider site) {
viewport.setToolbarInfo("网流",true, on);
}
@Override
public CJBottomNavigationView.OnCheckedChangeListener onResetNavigationMenu(CJBottomNavigationView bottomNavigationView, Activity on) {
return null;
}
@Override
public boolean onToolbarMenuInstall(MenuInflater menuInflater, Menu menu) {
return true;
}
@Override
public boolean onToolbarMenuSelected(MenuItem item, IServiceProvider site) {
INavigation navigation= site.getService("$.workbench.navigation");
switch (item.getItemId()) {
case android.R.id.home:
navigation.navigate("desktop");
break;
}
return true;
}
public class MyRecyclerAdapter extends RecyclerView.Adapter<MyRecyclerAdapter.MyHolder> {
private Context mContext;
private List<Integer> mDatas;
public MyRecyclerAdapter(Context context, List<Integer> datas) {
super();
this.mContext = context;
this.mDatas = datas;
}
@Override
public int getItemCount() {
// TODO Auto-generated method stub
return mDatas.size();
}
@Override
// 填充onCreateViewHolder方法返回的holder中的控件
public void onBindViewHolder(MyHolder holder, int position) {
// TODO Auto-generated method stub
holder.textView.setText(mDatas.get(position)+"--");
}
@Override
// 重写onCreateViewHolder方法,返回一个自定义的ViewHolder
public MyHolder onCreateViewHolder(ViewGroup arg0, int arg1) {
// 填充布局
View view = LayoutInflater.from(mContext).inflate(R.layout.item_netflow, null);
MyHolder holder = new MyHolder(view);
return holder;
}
// 定义内部类继承ViewHolder
class MyHolder extends RecyclerView.ViewHolder {
private TextView textView;
public MyHolder(View view) {
super(view);
textView = (TextView) view.findViewById(R.id.test_textView);
}
}
}
}
|
[
"11"
] |
11
|
66df3a3b1bb92dfe666fc0ab2cff0a59bc0c05bd
|
f486586fc03e683cc02a0f982cd745a691ec5da6
|
/src/main/java/com/mrporter/pomangam/client/repositories/payment/PaymentJpaRepository.java
|
8c49e1f7dcb0bd62900b591e0a538b812cbaf38d
|
[] |
no_license
|
cholnh/pomangam-api
|
718d9d632da1833f654e562beb7b9e17f358a167
|
16a3970eeb1272767205c5bd05d9c3b5117f65a2
|
refs/heads/master
| 2023-04-02T20:46:49.730663
| 2021-04-14T12:49:06
| 2021-04-14T12:49:06
| 183,766,106
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 872
|
java
|
//package com.mrporter.pomangam.client.repositories.payment;
//
//import com.mrporter.pomangam.client.domains.payment.Payment;
//import org.springframework.data.jpa.repository.JpaRepository;
//import org.springframework.data.jpa.repository.support.QuerydslRepositorySupport;
//import org.springframework.data.rest.core.annotation.RepositoryRestResource;
//import org.springframework.transaction.annotation.Transactional;
//
//
//@RepositoryRestResource(exported = false)
//public interface PaymentJpaRepository extends JpaRepository<Payment, Long>, PaymentCustomRepository {
//
//}
//
//interface PaymentCustomRepository {
//
//}
//
//@Transactional(readOnly = true)
//class PaymentCustomRepositoryImpl extends QuerydslRepositorySupport implements PaymentCustomRepository {
//
// public PaymentCustomRepositoryImpl() {
// super(Payment.class);
// }
//
//
//}
|
[
"cholnh1@naver.com"
] |
cholnh1@naver.com
|
d1529aac7dd9c02efa571c4d2f9090e3583ff2e5
|
d40a93f0ed571bd661851b7ff14410095d41e35d
|
/src/test/java/fr/crowdfunding/jhipster/web/rest/TestUtil.java
|
078c6e04136c52033aa3ac3c158766fde6035f73
|
[] |
no_license
|
Farid-lgs/crowdfundingjhipster
|
bcc8d268a0f3443fd2843cd8f5864a5be38279f0
|
d7dda42ec7f5464e317f101f3b32f1f63444fca2
|
refs/heads/main
| 2023-09-03T18:42:27.537846
| 2021-10-21T13:00:33
| 2021-10-21T13:00:33
| 401,262,750
| 0
| 1
| null | 2021-10-12T06:58:53
| 2021-08-30T08:00:03
|
Java
|
UTF-8
|
Java
| false
| false
| 7,887
|
java
|
package fr.crowdfunding.jhipster.web.rest;
import static org.assertj.core.api.Assertions.assertThat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.ZonedDateTime;
import java.time.format.DateTimeParseException;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeDiagnosingMatcher;
import org.hamcrest.TypeSafeMatcher;
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
import org.springframework.format.support.DefaultFormattingConversionService;
import org.springframework.format.support.FormattingConversionService;
/**
* Utility class for testing REST controllers.
*/
public final class TestUtil {
private static final ObjectMapper mapper = createObjectMapper();
private static ObjectMapper createObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS, false);
mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
mapper.registerModule(new JavaTimeModule());
return mapper;
}
/**
* Convert an object to JSON byte array.
*
* @param object the object to convert.
* @return the JSON byte array.
* @throws IOException
*/
public static byte[] convertObjectToJsonBytes(Object object) throws IOException {
return mapper.writeValueAsBytes(object);
}
/**
* Create a byte array with a specific size filled with specified data.
*
* @param size the size of the byte array.
* @param data the data to put in the byte array.
* @return the JSON byte array.
*/
public static byte[] createByteArray(int size, String data) {
byte[] byteArray = new byte[size];
for (int i = 0; i < size; i++) {
byteArray[i] = Byte.parseByte(data, 2);
}
return byteArray;
}
/**
* A matcher that tests that the examined string represents the same instant as the reference datetime.
*/
public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher<String> {
private final ZonedDateTime date;
public ZonedDateTimeMatcher(ZonedDateTime date) {
this.date = date;
}
@Override
protected boolean matchesSafely(String item, Description mismatchDescription) {
try {
if (!date.isEqual(ZonedDateTime.parse(item))) {
mismatchDescription.appendText("was ").appendValue(item);
return false;
}
return true;
} catch (DateTimeParseException e) {
mismatchDescription.appendText("was ").appendValue(item).appendText(", which could not be parsed as a ZonedDateTime");
return false;
}
}
@Override
public void describeTo(Description description) {
description.appendText("a String representing the same Instant as ").appendValue(date);
}
}
/**
* Creates a matcher that matches when the examined string represents the same instant as the reference datetime.
*
* @param date the reference datetime against which the examined string is checked.
*/
public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) {
return new ZonedDateTimeMatcher(date);
}
/**
* A matcher that tests that the examined number represents the same value - it can be Long, Double, etc - as the reference BigDecimal.
*/
public static class NumberMatcher extends TypeSafeMatcher<Number> {
final BigDecimal value;
public NumberMatcher(BigDecimal value) {
this.value = value;
}
@Override
public void describeTo(Description description) {
description.appendText("a numeric value is ").appendValue(value);
}
@Override
protected boolean matchesSafely(Number item) {
BigDecimal bigDecimal = asDecimal(item);
return bigDecimal != null && value.compareTo(bigDecimal) == 0;
}
private static BigDecimal asDecimal(Number item) {
if (item == null) {
return null;
}
if (item instanceof BigDecimal) {
return (BigDecimal) item;
} else if (item instanceof Long) {
return BigDecimal.valueOf((Long) item);
} else if (item instanceof Integer) {
return BigDecimal.valueOf((Integer) item);
} else if (item instanceof Double) {
return BigDecimal.valueOf((Double) item);
} else if (item instanceof Float) {
return BigDecimal.valueOf((Float) item);
} else {
return BigDecimal.valueOf(item.doubleValue());
}
}
}
/**
* Creates a matcher that matches when the examined number represents the same value as the reference BigDecimal.
*
* @param number the reference BigDecimal against which the examined number is checked.
*/
public static NumberMatcher sameNumber(BigDecimal number) {
return new NumberMatcher(number);
}
/**
* Verifies the equals/hashcode contract on the domain object.
*/
public static <T> void equalsVerifier(Class<T> clazz) throws Exception {
T domainObject1 = clazz.getConstructor().newInstance();
assertThat(domainObject1.toString()).isNotNull();
assertThat(domainObject1).isEqualTo(domainObject1);
assertThat(domainObject1).hasSameHashCodeAs(domainObject1);
// Test with an instance of another class
Object testOtherObject = new Object();
assertThat(domainObject1).isNotEqualTo(testOtherObject);
assertThat(domainObject1).isNotEqualTo(null);
// Test with an instance of the same class
T domainObject2 = clazz.getConstructor().newInstance();
assertThat(domainObject1).isNotEqualTo(domainObject2);
// HashCodes are equals because the objects are not persisted yet
assertThat(domainObject1).hasSameHashCodeAs(domainObject2);
}
/**
* Create a {@link FormattingConversionService} which use ISO date format, instead of the localized one.
* @return the {@link FormattingConversionService}.
*/
public static FormattingConversionService createFormattingConversionService() {
DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService();
DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
registrar.setUseIsoFormat(true);
registrar.registerFormatters(dfcs);
return dfcs;
}
/**
* Makes a an executes a query to the EntityManager finding all stored objects.
* @param <T> The type of objects to be searched
* @param em The instance of the EntityManager
* @param clss The class type to be searched
* @return A list of all found objects
*/
public static <T> List<T> findAll(EntityManager em, Class<T> clss) {
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<T> cq = cb.createQuery(clss);
Root<T> rootEntry = cq.from(clss);
CriteriaQuery<T> all = cq.select(rootEntry);
TypedQuery<T> allQuery = em.createQuery(all);
return allQuery.getResultList();
}
private TestUtil() {}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
87d4b41950582ceeede00cf6d017b96c4b3dd777
|
43a7a8a3a8e0bd59640ed4970990fc9bbb845730
|
/martus-client/source/org/martus/client/swingui/jfx/generic/FxModalDirectoryChooser.java
|
aaef059cba86c3a03a2921b864cedd284e029778
|
[] |
no_license
|
benetech/Martus-Project
|
c992d1b847e1091085407f31bb61b34060f24c13
|
b454387d8ecdd3245cd17ead06184a4cdd3c7234
|
refs/heads/master
| 2021-01-17T11:34:31.482994
| 2017-09-27T18:14:11
| 2017-09-27T18:14:11
| 49,678,622
| 17
| 13
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,840
|
java
|
/*
The Martus(tm) free, social justice documentation and
monitoring software. Copyright (C) 2014, Beneficent
Technology, Inc. (Benetech).
Martus is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version with the additions and exceptions described in the
accompanying Martus license file entitled "license.txt".
It is distributed WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, including warranties of fitness of purpose or
merchantability. See the accompanying Martus License and
GPL license for more details on the required license terms
for this software.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
package org.martus.client.swingui.jfx.generic;
import java.io.File;
import javafx.stage.DirectoryChooser;
public class FxModalDirectoryChooser
{
public FxModalDirectoryChooser(PureFxStage parentStageToUse)
{
if (parentStageToUse == null)
throw new RuntimeException("Cannot display modal file chooser without a parent stage");
parentStage = parentStageToUse;
directoryChooser = new DirectoryChooser();
}
public File showDialog()
{
return getDirectoryChooser().showDialog(parentStage.getActualStage());
}
public void setTitle(String windowTitle)
{
getDirectoryChooser().setTitle(windowTitle);
}
public void setInitialDirectory(File initialDir)
{
getDirectoryChooser().setInitialDirectory(initialDir);
}
private DirectoryChooser getDirectoryChooser()
{
return directoryChooser;
}
private PureFxStage parentStage;
private DirectoryChooser directoryChooser;
}
|
[
"charlesl@benetech.org"
] |
charlesl@benetech.org
|
7a905d1f8076616d4dc85173f987568e231096ed
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14263-122-9-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/resource/servlet/RoutingFilter_ESTest_scaffolding.java
|
393f182a11edee32644cd2a6cd5031723d983454
|
[] |
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
| 444
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 02:02:57 UTC 2020
*/
package org.xwiki.resource.servlet;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class RoutingFilter_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
785099458f87f19c37bf56b31bc87a9c3f829b8f
|
d5b61bf303298938a6675428abe17e0f69d9bdea
|
/app/src/main/java/com/example/x_smartcity_s/bean/GetParkingHistory.java
|
a1bcb23682531c5ca7dd140b62e20aae2649b2db
|
[] |
no_license
|
XGKerwin/X_SmartCity_S
|
2dad41fff21d49b2c75b004ff51f12018c59d307
|
5295fc607a2cc58d5d8b80ecd62bc50cfe91f948
|
refs/heads/master
| 2023-03-25T20:11:32.579560
| 2021-03-09T08:19:17
| 2021-03-09T08:19:17
| 342,076,314
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,329
|
java
|
package com.example.x_smartcity_s.bean;
/**
* author : 关鑫
* Github : XGKerwin
* date : 2021/2/23 15:26
*/
public class GetParkingHistory {
/**
* id : 1
* carNum : 鲁N98001
* charge : 6
* inTime : 2020-09-30 12:56:04
* outTime : 2020-09-30 14:56:16
* parkingid : 1
*/
private int id;
private String carNum;
private String charge;
private String inTime;
private String outTime;
private String parkingid;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getCarNum() {
return carNum;
}
public void setCarNum(String carNum) {
this.carNum = carNum;
}
public String getCharge() {
return charge;
}
public void setCharge(String charge) {
this.charge = charge;
}
public String getInTime() {
return inTime;
}
public void setInTime(String inTime) {
this.inTime = inTime;
}
public String getOutTime() {
return outTime;
}
public void setOutTime(String outTime) {
this.outTime = outTime;
}
public String getParkingid() {
return parkingid;
}
public void setParkingid(String parkingid) {
this.parkingid = parkingid;
}
}
|
[
"1064936282@qq.com"
] |
1064936282@qq.com
|
1b878b46e6de73de6879b8c5ef7b015517d65eb3
|
7d1dac83258923b44f02faeb049bd6f4e9b90d17
|
/src/main/java/com/dtflys/redistart/controls/item/RedisDatabaseItem.java
|
87bebf8aa8301aa6c3a9a44d75dd65c81aaa12da
|
[] |
no_license
|
mySingleLive/redistart
|
b8679238fd2a39050521591ee8675ff8dd28eb04
|
74ef4c3cc9f8f08e7745a3552bc7cf3258e50f36
|
refs/heads/master
| 2022-06-25T14:35:03.014702
| 2021-11-09T13:44:01
| 2021-11-09T13:44:01
| 247,682,262
| 1
| 0
| null | 2022-06-17T03:00:17
| 2020-03-16T11:13:27
|
Java
|
UTF-8
|
Java
| false
| false
| 850
|
java
|
package com.dtflys.redistart.controls.item;
import com.dtflys.redistart.model.database.RedisDatabase;
import javafx.scene.control.TreeView;
public class RedisDatabaseItem extends RSBaseTreeItem {
private final RedisDatabase database;
public RedisDatabaseItem(RedisDatabase database) {
super(displayName(database), RSItemType.REDIS_DATABASE);
this.database = database;
}
public static String displayName(RedisDatabase database) {
return database.getName() + " (" + database.getSize() + ")";
}
@Override
public void doAction(TreeView treeView) {
System.out.println("Open Database: " + database.getIndex());
if (!database.isOpened()) {
database.openDatabase();
}
}
public RSItemStatus getItemStatus() {
return RSItemStatus.CLOSED;
}
}
|
[
"jun.gong@thebeastshop.com"
] |
jun.gong@thebeastshop.com
|
b6555fcd3d4cd7df337de8b5f844ec3126e7d41c
|
0676038f4c3aad211c0de9897013ce4cfdec74fb
|
/ByteShif.java
|
c9757dd9bde6dc24816b8f7135b2f00f7a18c901
|
[] |
no_license
|
Nisha556/Java_Operators
|
5c03682c2ba83296a8d6bf7d910ce7b1a0f1f964
|
75bd90fe8cb0790ac7fdd8bc1ea40575a74d82f2
|
refs/heads/master
| 2022-11-08T04:33:27.835199
| 2020-06-29T07:36:00
| 2020-06-29T07:36:00
| 275,761,641
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 234
|
java
|
package Operator;
class ByteShift {
public static void main(String args[]) {
byte a = 64, b;
int i;
i = a << 2;
b = (byte) (a << 2);
System.out.println("Original value of a: " + a);
System.out.println("i and b: " + i + " " + b);
}
}
|
[
"shandilyanisha1@gmail.com"
] |
shandilyanisha1@gmail.com
|
ab48b9371efaf6940172491d7b60babb0a9b684d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_6480991bde32511ac361c9cf1b9c3c0a4132eed3/NativeFunctionTest/14_6480991bde32511ac361c9cf1b9c3c0a4132eed3_NativeFunctionTest_t.java
|
5e4cc70e4e511407a10527904aeb3bddf84dd09f
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,760
|
java
|
/*
* Copyright (c) 2002-2009 Gargoyle Software 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.gargoylesoftware.htmlunit.javascript;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.gargoylesoftware.htmlunit.BrowserRunner;
import com.gargoylesoftware.htmlunit.WebDriverTestCase;
import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts;
import com.gargoylesoftware.htmlunit.BrowserRunner.Browser;
import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented;
/**
* Function is a native JavaScript object and therefore provided by Rhino but some tests are needed here
* to be sure that we have the expected results (for instance "bind" is an EcmaScript 5 method that is not
* available in FF2 or FF3).
*
* @version $Revision$
* @author Marc Guillemot
* @author Ahmed Ashour
*/
@RunWith(BrowserRunner.class)
public class NativeFunctionTest extends WebDriverTestCase {
/**
* @throws Exception if the test fails
*/
@Test
@NotYetImplemented(Browser.IE8)
@Alerts(FF = { "apply: function", "arguments: object", "bind: undefined", "call: function", "constructor: function",
"toSource: function", "toString: function" },
IE = { "apply: function", "arguments: object", "bind: undefined", "call: function", "constructor: function",
"toSource: function", "toString: function" },
IE8 = { "apply: function", "arguments: object", "bind: undefined", "call: function", "constructor: function",
"toSource: undefined", "toString: function" })
public void methods() throws Exception {
final String html = "<html><head><title>foo</title><script>\n"
+ "function doTest() {\n"
+ " var o = function() {};\n"
+ " var props = ['apply', 'arguments', 'bind', 'call', 'constructor', 'toSource', 'toString'];\n"
+ " for (var i=0; i<props.length; ++i) {\n"
+ " var p = props[i];\n"
+ " alert(p + ': ' + typeof(o[p]));\n"
+ " }\n"
+ "}\n"
+ "</script></head><body onload='doTest()'>\n"
+ "</body></html>";
loadPageWithAlerts2(html);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
826a8f2d15431f8c189fc17fdddf9683300fd896
|
280ce9155107a41d88167818054fca9bceda796b
|
/jre_emul/android/platform/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/support/DoNothingParser.java
|
49dc308878c1ba5f0df95e4e836acfeae6015819
|
[
"Classpath-exception-2.0",
"GPL-2.0-only",
"Apache-2.0",
"SunPro",
"W3C",
"LicenseRef-scancode-generic-cla",
"W3C-19980720",
"ICU",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"APSL-1.0",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"GPL-1.0-or-later",
"LicenseRef-scancode-generic-exception",
"LicenseRef-scancode-red-hat-attribution",
"CPL-1.0",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-copyleft",
"NAIST-2003",
"GPL-2.0-or-later",
"APSL-2.0",
"LicenseRef-scancode-oracle-openjdk-exception-2.0"
] |
permissive
|
google/j2objc
|
bd4796cdf77459abe816ff0db6e2709c1666627c
|
57b9229f5c6fb9e710609d93ca49eda9fa08c0e8
|
refs/heads/master
| 2023-08-28T16:26:05.842475
| 2023-08-26T03:30:58
| 2023-08-26T03:32:25
| 16,389,681
| 5,053
| 1,041
|
Apache-2.0
| 2023-09-14T20:32:57
| 2014-01-30T20:19:56
|
Java
|
UTF-8
|
Java
| false
| false
| 1,467
|
java
|
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.tests.org.xml.sax.support;
import org.xml.sax.DTDHandler;
import org.xml.sax.DocumentHandler;
import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
import org.xml.sax.Parser;
import java.util.Locale;
/**
* A SAX Parser that does nothing, but can be instantiated properly.
*/
@SuppressWarnings("deprecation")
public class DoNothingParser implements Parser {
public void parse(InputSource source) {
}
public void parse(String systemId) {
}
public void setDocumentHandler(DocumentHandler handler) {
}
public void setDTDHandler(DTDHandler handler) {
}
public void setEntityResolver(EntityResolver resolver) {
}
public void setErrorHandler(ErrorHandler handler) {
}
public void setLocale(Locale locale) {
}
}
|
[
"tball@google.com"
] |
tball@google.com
|
495c4b799bf140d4f6b46f4957ccf208b983a356
|
600df3590cce1fe49b9a96e9ca5b5242884a2a70
|
/chrome/android/java/src/org/chromium/chrome/browser/ntp/NativePageFactory.java
|
987e40c070d5c4f1a10712bfb97ceb492cc22674
|
[
"BSD-3-Clause"
] |
permissive
|
metux/chromium-suckless
|
efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a
|
72a05af97787001756bae2511b7985e61498c965
|
refs/heads/orig
| 2022-12-04T23:53:58.681218
| 2017-04-30T10:59:06
| 2017-04-30T23:35:58
| 89,884,931
| 5
| 3
|
BSD-3-Clause
| 2022-11-23T20:52:53
| 2017-05-01T00:09:08
| null |
UTF-8
|
Java
| false
| false
| 6,508
|
java
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.ntp;
import android.app.Activity;
import android.net.Uri;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.NativePage;
import org.chromium.chrome.browser.UrlConstants;
import org.chromium.chrome.browser.bookmarks.BookmarkPage;
import org.chromium.chrome.browser.download.DownloadPage;
import org.chromium.chrome.browser.physicalweb.PhysicalWebDiagnosticsPage;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
/**
* Creates NativePage objects to show chrome-native:// URLs using the native Android view system.
*/
public class NativePageFactory {
public static final String CHROME_NATIVE_SCHEME = "chrome-native";
private static NativePageBuilder sNativePageBuilder = new NativePageBuilder();
@VisibleForTesting
static class NativePageBuilder {
protected NativePage buildNewTabPage(ChromeActivity activity, Tab tab,
TabModelSelector tabModelSelector) {
if (tab.isIncognito()) {
return new IncognitoNewTabPage(activity);
} else {
return new NewTabPage(activity, tab, tabModelSelector);
}
}
protected NativePage buildBookmarksPage(Activity activity, Tab tab) {
return new BookmarkPage(activity, tab);
}
protected NativePage buildDownloadsPage(Activity activity, Tab tab) {
return new DownloadPage(activity, tab);
}
protected NativePage buildRecentTabsPage(Activity activity, Tab tab) {
RecentTabsManager recentTabsManager =
new RecentTabsManager(tab, tab.getProfile(), activity);
return new RecentTabsPage(activity, recentTabsManager);
}
protected NativePage buildPhysicalWebDiagnosticsPage(Activity activity, Tab tab) {
return new PhysicalWebDiagnosticsPage(activity, tab);
}
}
enum NativePageType {
NONE, CANDIDATE, NTP, BOOKMARKS, RECENT_TABS, PHYSICAL_WEB, DOWNLOADS,
}
private static NativePageType nativePageType(String url, NativePage candidatePage,
boolean isIncognito) {
if (url == null) return NativePageType.NONE;
Uri uri = Uri.parse(url);
if (!CHROME_NATIVE_SCHEME.equals(uri.getScheme())) {
return NativePageType.NONE;
}
String host = uri.getHost();
if (candidatePage != null && candidatePage.getHost().equals(host)) {
return NativePageType.CANDIDATE;
}
if (UrlConstants.NTP_HOST.equals(host)) {
return NativePageType.NTP;
} else if (UrlConstants.BOOKMARKS_HOST.equals(host)) {
return NativePageType.BOOKMARKS;
} else if (UrlConstants.DOWNLOADS_HOST.equals(host)) {
return NativePageType.DOWNLOADS;
} else if (UrlConstants.RECENT_TABS_HOST.equals(host) && !isIncognito) {
return NativePageType.RECENT_TABS;
} else if (UrlConstants.PHYSICAL_WEB_HOST.equals(host)) {
if (ChromeFeatureList.isEnabled("PhysicalWeb")) {
return NativePageType.PHYSICAL_WEB;
} else {
return NativePageType.NONE;
}
} else {
return NativePageType.NONE;
}
}
/**
* Returns a NativePage for displaying the given URL if the URL is a valid chrome-native URL,
* or null otherwise. If candidatePage is non-null and corresponds to the URL, it will be
* returned. Otherwise, a new NativePage will be constructed.
*
* @param url The URL to be handled.
* @param candidatePage A NativePage to be reused if it matches the url, or null.
* @param tab The Tab that will show the page.
* @param tabModelSelector The TabModelSelector containing the tab.
* @param activity The activity used to create the views for the page.
* @return A NativePage showing the specified url or null.
*/
public static NativePage createNativePageForURL(String url, NativePage candidatePage,
Tab tab, TabModelSelector tabModelSelector, ChromeActivity activity) {
return createNativePageForURL(url, candidatePage, tab, tabModelSelector, activity,
tab.isIncognito());
}
@VisibleForTesting
static NativePage createNativePageForURL(String url, NativePage candidatePage,
Tab tab, TabModelSelector tabModelSelector, ChromeActivity activity,
boolean isIncognito) {
NativePage page;
switch (nativePageType(url, candidatePage, isIncognito)) {
case NONE:
return null;
case CANDIDATE:
page = candidatePage;
break;
case NTP:
page = sNativePageBuilder.buildNewTabPage(activity, tab, tabModelSelector);
break;
case BOOKMARKS:
page = sNativePageBuilder.buildBookmarksPage(activity, tab);
break;
case DOWNLOADS:
page = sNativePageBuilder.buildDownloadsPage(activity, tab);
break;
case RECENT_TABS:
page = sNativePageBuilder.buildRecentTabsPage(activity, tab);
break;
case PHYSICAL_WEB:
page = sNativePageBuilder.buildPhysicalWebDiagnosticsPage(activity, tab);
break;
default:
assert false;
return null;
}
page.updateForUrl(url);
return page;
}
/**
* Returns whether the URL would navigate to a native page.
*
* @param url The URL to be checked.
* @param isIncognito Whether the page will be displayed in incognito mode.
* @return Whether the host and the scheme of the passed in URL matches one of the supported
* native pages.
*/
public static boolean isNativePageUrl(String url, boolean isIncognito) {
return nativePageType(url, null, isIncognito) != NativePageType.NONE;
}
@VisibleForTesting
static void setNativePageBuilderForTesting(NativePageBuilder builder) {
sNativePageBuilder = builder;
}
}
|
[
"enrico.weigelt@gr13.net"
] |
enrico.weigelt@gr13.net
|
612671876297002800699b11bf7d2b3bac583302
|
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
|
/DrJava/rev3734-3788/right-branch-3788/src/edu/rice/cs/drjava/config/ClassPathOption.java
|
a49d18ff3e369e75b2c2f00b3e20b32a736bac28
|
[] |
no_license
|
joliebig/featurehouse_fstmerge_examples
|
af1b963537839d13e834f829cf51f8ad5e6ffe76
|
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
|
refs/heads/master
| 2016-09-05T10:24:50.974902
| 2013-03-28T16:28:47
| 2013-03-28T16:28:47
| 9,080,611
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 688
|
java
|
package edu.rice.cs.drjava.config;
import java.io.File;
import java.util.Vector;
class ClassPathOption {
private String warning =
"WARNING: Configurability interface only supports path separators of at most one character";
public VectorOption<File> evaluate(String optionName) {
String ps = System.getProperty("path.separator");
if (ps.length() > 1) {
System.out.println(warning);
System.out.println("using '" + ps.charAt(0) + "' for delimiter.");
}
FileOption fop = new FileOption("",FileOption.NULL_FILE);
char delim = ps.charAt(0);
return new VectorOption<File>(optionName,fop,"",delim,"",new Vector<File>());
}
}
|
[
"joliebig@fim.uni-passau.de"
] |
joliebig@fim.uni-passau.de
|
c1eb42f9a5dda7e802840256436df88e1233b43c
|
832c756923d48ace3f338b27ae9dc8327058d088
|
/src/contest/ioi/IOI_2009_POI.java
|
b1760720fe7327ab8c1f7a29e2beaeeff6511433
|
[
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
luchy0120/competitive-programming
|
1331bd53698c4b05b57a31d90eecc31c167019bd
|
d0dfc8f3f3a74219ecf16520d6021de04a2bc9f6
|
refs/heads/master
| 2020-05-04T15:18:06.150736
| 2018-11-07T04:15:26
| 2018-11-07T04:15:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,775
|
java
|
package contest.ioi;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class IOI_2009_POI {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static StringTokenizer st;
public static void main (String[] args) throws IOException {
int con = readInt();
int tasks = readInt();
int pID = readInt() - 1;
int[] points = new int[tasks];
boolean[][] cons = new boolean[con][tasks];
int[][] conScore = new int[con][tasks];// 0 is score, 1 is numOfProblems
// solved
for (int x = 0; x < con; x++) {
for (int y = 0; y < tasks; y++) {
cons[x][y] = readInt() == 1 ? true : false;
conScore[x][1] += cons[x][y] ? 1 : 0;
points[y] += cons[x][y] ? 0 : 1;
}
}
int place = 1;
for (int x = 0; x < con; x++) {
for (int y = 0; y < tasks; y++) {
if (cons[x][y])
conScore[x][0] += points[y];
}
}
for (int x = 0; x < con; x++) {
if (x == pID)
continue;
if (conScore[x][0] > conScore[pID][0])
place++;
else if (conScore[x][0] == conScore[pID][0]) {
if (conScore[x][1] > conScore[pID][1])
place++;
else if (conScore[x][1] == conScore[pID][1] && x < pID)
place++;
}
}
System.out.println(conScore[pID][0] + " " + place);
}
static String next () throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine().trim());
return st.nextToken();
}
static long readLong () throws IOException {
return Long.parseLong(next());
}
static int readInt () throws IOException {
return Integer.parseInt(next());
}
}
|
[
"jeffrey.xiao1998@gmail.com"
] |
jeffrey.xiao1998@gmail.com
|
b157aaaf23c27cac75b8dc41f5654ad8e1a9a47e
|
757360b8d8a36a2c1eecc6e14a8f53fab1092fda
|
/android/service/autofill/DateValueSanitizer.java
|
c32a01504df35721737dd0c1952b1d9b3ea092c6
|
[] |
no_license
|
haigendong/AndroidDictionary
|
d51ef266f4684c40986286a70511a7648c1b4e33
|
be0c7a4508d8055d915404273339610bbf53e3fa
|
refs/heads/master
| 2022-04-13T14:36:53.280469
| 2020-03-26T20:21:41
| 2020-03-26T20:21:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,398
|
java
|
/* */ package android.service.autofill;
/* */
/* */ import android.icu.text.DateFormat;
/* */ import android.os.Parcel;
/* */ import android.os.Parcelable;
/* */ import androidx.annotation.RecentlyNonNull;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public final class DateValueSanitizer
/* */ implements Sanitizer, Parcelable
/* */ {
/* */ public DateValueSanitizer(@RecentlyNonNull DateFormat dateFormat) {
/* 45 */ throw new RuntimeException("Stub!");
/* */ } public String toString() {
/* 47 */ throw new RuntimeException("Stub!");
/* */ } public int describeContents() {
/* 49 */ throw new RuntimeException("Stub!");
/* */ } public void writeToParcel(Parcel parcel, int flags) {
/* 51 */ throw new RuntimeException("Stub!");
/* */ }
/* */
/* 54 */ public static final Parcelable.Creator<DateValueSanitizer> CREATOR = null;
/* */ }
/* Location: M:\learn_android\android.jar!\android\service\autofill\DateValueSanitizer.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"13377875645@163.com"
] |
13377875645@163.com
|
0a775ad07142dd702a8509d83360665b29b59b92
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/20/org/apache/commons/math3/linear/AbstractRealMatrix_preMultiply_718.java
|
15b9a30a0855dacfb6efdc26e09b38caaf5bec87
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,753
|
java
|
org apach common math3 linear
basic implement real matrix realmatrix method underli storag
method implement link entri getentri access
matrix element deriv provid faster implement
version
abstract real matrix abstractrealmatrix
inherit doc inheritdoc
real vector realvector pre multipli premultipli real vector realvector dimens mismatch except dimensionmismatchexcept
arrai real vector arrayrealvector pre multipli premultipli arrai real vector arrayrealvector data ref getdataref
class cast except classcastexcept cce
row nrow row dimens getrowdimens
col ncol column dimens getcolumndimens
dimens getdimens row nrow
dimens mismatch except dimensionmismatchexcept dimens getdimens row nrow
col ncol
col col col ncol col
sum
row nrow
sum entri getentri col entri getentri
col sum
arrai real vector arrayrealvector
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
44de0eeca008d289223cefd547532e023f27b94a
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/record/b/s.java
|
598dfc625ddc1535354b23612cc0a30fd798f2b6
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,871
|
java
|
package com.tencent.mm.plugin.record.b;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ai.h;
import com.tencent.mm.ai.h.b;
import com.tencent.mm.ai.i;
import com.tencent.mm.kernel.g;
import com.tencent.mm.model.aw;
import com.tencent.mm.model.c;
import com.tencent.mm.sdk.platformtools.SensorController;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ah;
import com.tencent.mm.sdk.platformtools.aj;
import com.tencent.mm.sdk.platformtools.bf;
import com.tencent.mm.sdk.platformtools.bo;
import java.util.LinkedList;
import java.util.List;
public final class s implements com.tencent.mm.ai.h.a, b, com.tencent.mm.sdk.platformtools.SensorController.a {
public static SensorController mfW;
private int cAO;
public List<a> callbacks = new LinkedList();
public h mfO = ((i) g.K(i.class)).BT();
private boolean mfP = true;
private boolean mfQ;
private boolean mfR = false;
private bf mfS;
long mfT = -1;
public String path;
public interface a {
void VJ(String str);
void onFinish();
}
public s() {
AppMethodBeat.i(24180);
aw.ZK();
Boolean bool = (Boolean) c.Ry().get(26, Boolean.FALSE);
this.mfQ = bool.booleanValue();
this.mfP = !bool.booleanValue();
if (this.mfO != null) {
this.mfO.a((com.tencent.mm.ai.h.a) this);
this.mfO.a((b) this);
if (com.tencent.mm.compatible.b.g.KK().KV() || com.tencent.mm.compatible.b.g.KK().KP()) {
this.mfO.bo(false);
} else {
this.mfO.bo(this.mfP);
}
} else {
ab.w("MicroMsg.RecordVoiceHelper", "get voice player fail, it is null");
}
if (mfW == null) {
mfW = new SensorController(ah.getContext());
}
if (this.mfS == null) {
this.mfS = new bf(ah.getContext());
}
AppMethodBeat.o(24180);
}
public final boolean startPlay(String str, int i) {
AppMethodBeat.i(24181);
if (this.mfO == null) {
ab.w("MicroMsg.RecordVoiceHelper", "start play error, path %s, voiceType %d, player is null", str, Integer.valueOf(i));
AppMethodBeat.o(24181);
return false;
}
this.mfO.stop();
for (a VJ : this.callbacks) {
VJ.VJ(str);
}
if (!(mfW == null || mfW.aGA)) {
mfW.a(this);
if (this.mfS.aj(new Runnable() {
public final void run() {
AppMethodBeat.i(24179);
s.this.mfT = bo.yz();
AppMethodBeat.o(24179);
}
})) {
this.mfT = 0;
} else {
this.mfT = -1;
}
}
this.path = str;
this.cAO = i;
if (bo.isNullOrNil(str) || !this.mfO.a(str, this.mfP, true, i)) {
AppMethodBeat.o(24181);
return false;
}
aj.amA("keep_app_silent");
AppMethodBeat.o(24181);
return true;
}
public final boolean buH() {
AppMethodBeat.i(24182);
if (this.mfO == null) {
ab.w("MicroMsg.RecordVoiceHelper", "check is play, but player is null");
AppMethodBeat.o(24182);
return false;
}
boolean isPlaying = this.mfO.isPlaying();
AppMethodBeat.o(24182);
return isPlaying;
}
public final void stopPlay() {
AppMethodBeat.i(24183);
ab.d("MicroMsg.RecordVoiceHelper", "stop play");
aj.amB("keep_app_silent");
if (this.mfO != null) {
this.mfO.stop();
}
buK();
AppMethodBeat.o(24183);
}
public final void onError() {
AppMethodBeat.i(24184);
ab.d("MicroMsg.RecordVoiceHelper", "on error, do stop play");
stopPlay();
for (a onFinish : this.callbacks) {
onFinish.onFinish();
}
AppMethodBeat.o(24184);
}
public final void EA() {
AppMethodBeat.i(24185);
ab.d("MicroMsg.RecordVoiceHelper", "on completion, do stop play");
stopPlay();
for (a onFinish : this.callbacks) {
onFinish.onFinish();
}
AppMethodBeat.o(24185);
}
public final void buK() {
AppMethodBeat.i(24186);
if (mfW != null) {
mfW.dps();
}
if (this.mfS != null) {
this.mfS.dpt();
}
AppMethodBeat.o(24186);
}
public final void he(boolean z) {
boolean z2 = true;
AppMethodBeat.i(24187);
if (bo.isNullOrNil(this.path)) {
AppMethodBeat.o(24187);
} else if (this.mfR) {
if (z) {
z2 = false;
}
this.mfR = z2;
AppMethodBeat.o(24187);
} else if (z || this.mfT == -1 || bo.az(this.mfT) <= 400) {
this.mfR = false;
if (this.mfO != null && this.mfO.Ex()) {
AppMethodBeat.o(24187);
} else if (this.mfQ) {
if (this.mfO != null) {
this.mfO.bo(false);
}
this.mfP = false;
AppMethodBeat.o(24187);
} else if (this.mfO == null || this.mfO.isPlaying()) {
if (this.mfO != null) {
this.mfO.bo(z);
}
this.mfP = z;
if (!z) {
startPlay(this.path, this.cAO);
}
AppMethodBeat.o(24187);
} else {
this.mfO.bo(true);
this.mfP = true;
AppMethodBeat.o(24187);
}
} else {
this.mfR = true;
AppMethodBeat.o(24187);
}
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
5399b8a1b6f00576ce739a6099fbd9ba3a55aff1
|
d58ad9e48850bd9b70949b801cdc325217168010
|
/SeleniumAndJunitSamples/src/test/java/com/edn/selenium/samples/UsuariosPage.java
|
b52ff4e0c74ac1656a7a06e5728052c89a9ce2d1
|
[] |
no_license
|
edneyRoldao/testWithJava
|
9b5e8225fcaa92322a65e0d7ee8c9eb464347ed5
|
610d588d15e3b016d0c2e06f2c2fd94afc5e2a57
|
refs/heads/master
| 2020-12-03T00:08:49.140157
| 2017-07-13T22:49:14
| 2017-07-13T22:49:14
| 95,993,059
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 650
|
java
|
package com.edn.selenium.samples;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
public class UsuariosPage {
private WebDriver driver;
public UsuariosPage(WebDriver driver) {
this.driver = driver;
driver.get("http://localhost:8080/usuarios");
}
public void visita() {
driver.get("http://localhost:8080/usuarios");
}
public UsuarioPage novo() {
driver.findElement(By.linkText("Novo Usuário")).click();
return new UsuarioPage(driver);
}
public boolean existeNaLista(String nome, String email) {
String content = driver.getPageSource();
return content.contains(nome) && content.contains(email);
}
}
|
[
"edneyroldao@gmail.com"
] |
edneyroldao@gmail.com
|
217b87f4e845adee3297e46f0c8612a988cd1f1c
|
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
|
/project463/src/test/java/org/gradle/test/performance/largejavamultiproject/project463/p2315/Test46312.java
|
883f99db9734f9f3d0166e01342692cffa20faa7
|
[] |
no_license
|
big-guy/largeJavaMultiProject
|
405cc7f55301e1fd87cee5878a165ec5d4a071aa
|
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
|
refs/heads/main
| 2023-03-17T10:59:53.226128
| 2021-03-04T01:01:39
| 2021-03-04T01:01:39
| 344,307,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,182
|
java
|
package org.gradle.test.performance.largejavamultiproject.project463.p2315;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test46312 {
Production46312 objectUnderTest = new Production46312();
@Test
public void testProperty0() {
Production46303 value = new Production46303();
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
Production46307 value = new Production46307();
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
Production46311 value = new Production46311();
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
}
|
[
"sterling.greene@gmail.com"
] |
sterling.greene@gmail.com
|
73fe976c227ba01c40552abb63060c9f0d2dc4d9
|
73340dd6cbcd855ddd0294d1bf40f1c173b956ed
|
/mmo-identity/identity-api/src/main/java/af/asr/identity/api/v1/domain/Permission.java
|
715a1d09987c3cfd90f2d77778023e4bd8307398
|
[] |
no_license
|
mohbadar/mmo-backoffice
|
00f5cc72048f777a121e2b26923024f741b8c7a5
|
eb55863762d3cce4a04502ed458813027da6cec9
|
refs/heads/master
| 2022-11-19T13:58:30.545140
| 2021-02-20T04:36:59
| 2021-02-20T04:36:59
| 222,090,501
| 4
| 2
| null | 2022-11-16T01:21:20
| 2019-11-16T11:38:59
|
Java
|
UTF-8
|
Java
| false
| false
| 2,110
|
java
|
package af.asr.identity.api.v1.domain;
import java.util.Objects;
import java.util.Set;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import af.asr.vault.api.domain.AllowedOperation;
import org.hibernate.validator.constraints.NotBlank;
@SuppressWarnings({"WeakerAccess", "unused"})
public class Permission {
@NotBlank
private String permittableEndpointGroupIdentifier;
@NotNull
@Valid
private Set<AllowedOperation> allowedOperations;
public Permission() {
}
public Permission(String permittableEndpointGroupIdentifier, Set<AllowedOperation> allowedOperations) {
this.permittableEndpointGroupIdentifier = permittableEndpointGroupIdentifier;
this.allowedOperations = allowedOperations;
}
public String getPermittableEndpointGroupIdentifier() {
return permittableEndpointGroupIdentifier;
}
public void setPermittableEndpointGroupIdentifier(String permittableEndpointGroupIdentifier) {
this.permittableEndpointGroupIdentifier = permittableEndpointGroupIdentifier;
}
public Set<AllowedOperation> getAllowedOperations() {
return allowedOperations;
}
public void setAllowedOperations(Set<AllowedOperation> allowedOperations) {
this.allowedOperations = allowedOperations;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Permission that = (Permission) o;
return Objects.equals(permittableEndpointGroupIdentifier, that.permittableEndpointGroupIdentifier) &&
Objects.equals(allowedOperations, that.allowedOperations);
}
@Override
public int hashCode() {
return Objects.hash(permittableEndpointGroupIdentifier, allowedOperations);
}
@Override
public String toString() {
return "Permission{" +
"permittableEndpointGroupIdentifier='" + permittableEndpointGroupIdentifier + '\'' +
", allowedOperations=" + allowedOperations +
'}';
}
}
|
[
"mohammadbadarhashimi@gmail.com"
] |
mohammadbadarhashimi@gmail.com
|
f0a04a8f0745ff6d9c4318680bb6f08dfbabe79c
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12798-108-8-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest_scaffolding.java
|
45d25d3c8b5243560e4a5512fde83b4e3edb9316
|
[] |
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
| 453
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Apr 07 03:03:12 UTC 2020
*/
package org.xwiki.velocity.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class DefaultVelocityEngine_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
ceba033a8e6aca570c42490fe729e6fc51d281ba
|
dda538ead3298ee2bcbccb25b30a2fb1fb8bf1a5
|
/src/com/company/_6_Command/_7_Party/Commands/StereoOnCommand.java
|
4e48233aa1b95b5cb4db48564e5f520780cd4ce7
|
[] |
no_license
|
NikoBolt/Design-Patterns
|
4800a434fac29e8426b05bccb0b72c18c9c31153
|
cc5c701693972fcc3e2371a484c77f93e97d1feb
|
refs/heads/master
| 2023-02-06T02:57:24.477257
| 2020-12-27T19:39:01
| 2020-12-27T19:39:01
| 292,805,079
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 479
|
java
|
package com.company._6_Command._7_Party.Commands;
import com.company._6_Command._7_Party.Obj.Stereo;
public class StereoOnCommand implements Command {
Stereo stereo;
public StereoOnCommand(Stereo stereo) {
this.stereo = stereo;
}
@Override
public void execute() {
stereo.on();
}
@Override
public void undo() {
stereo.off();
}
@Override
public String toString() {
return "StereoOnCommand";
}
}
|
[
"docnikbolt@gmail.com"
] |
docnikbolt@gmail.com
|
821d5ba452c4078b9a44b78fc056e024c990f2a6
|
09e03ba73062c62c1d3389cdecb94f68430cd82d
|
/base/config/src/main/java/org/artifactory/descriptor/repo/VcsGitConfiguration.java
|
2120f93089461f6b7ea26825e07de5fbf2452acf
|
[
"Apache-2.0"
] |
permissive
|
alancnet/artifactory
|
1ee6183301b581e60f67691d7fa025b0fb44b118
|
7ac3ea76471a00543eaf60e82b554d8edd894c0f
|
refs/heads/master
| 2021-01-10T14:58:53.769805
| 2015-10-07T16:46:14
| 2015-10-07T16:46:14
| 43,829,862
| 3
| 6
| null | 2016-03-09T18:30:58
| 2015-10-07T16:38:51
|
Java
|
UTF-8
|
Java
| false
| false
| 2,102
|
java
|
package org.artifactory.descriptor.repo;
import org.apache.commons.lang.StringUtils;
import org.artifactory.descriptor.Descriptor;
import org.artifactory.descriptor.repo.vcs.VcsGitProvider;
import org.artifactory.descriptor.repo.vcs.VcsUrlBuilder;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import java.text.MessageFormat;
/**
* @author Yoav Luft
*/
@XmlType(name = "VcsGitType", propOrder = {"provider", "downloadUrl"})
public class VcsGitConfiguration implements Descriptor {
@XmlElement(name = "provider")
private VcsGitProvider provider = VcsGitProvider.GITHUB;
@XmlElement(name = "downloadUrl")
private String downloadUrl;
public VcsGitConfiguration() {
}
public VcsGitProvider getProvider() {
return provider;
}
public void setProvider(VcsGitProvider provider) {
this.provider = provider;
}
public String getDownloadUrl() {
return downloadUrl;
}
public void setDownloadUrl(String downloadUrl) {
this.downloadUrl = downloadUrl;
}
/**
* Constructs ResourceDownloadUrl
*
* @param user git user
* @param repository git repository
* @param file a file to download
* @param version content branch/tag
*
* @return ResourceDownloadUrl
*/
public String buildResourceDownloadUrl(String user, String repository, String file, String version) {
return VcsUrlBuilder.resourceDownloadUrl(provider, user, repository, file, version);
}
/**
* Constructs RepositoryDownloadUrl
*
* @param gitOrg git user
* @param gitRepo git repository
* @param version content branch/tag
* @param fileExt file ext
*
* @return RepositoryDownloadUrl
*/
public String buildRepositoryDownloadUrl(String gitOrg, String gitRepo, String version, String fileExt) {
String url = StringUtils.isNotBlank(downloadUrl) ? downloadUrl : provider.getRepositoryDownloadUrl();
return VcsUrlBuilder.repositoryDownloadUrl(url, gitOrg, gitRepo, version, fileExt);
}
}
|
[
"github@alanc.net"
] |
github@alanc.net
|
ffbc5f9c7cb87879b47708ac09499b52c353535f
|
eb9c3dac0dca0ecd184df14b1fda62e61cc8c7d7
|
/google/monitoring/dashboard/v1/google-cloud-monitoring-dashboard-v1-java/proto-google-cloud-monitoring-dashboard-v1-java/src/main/java/com/google/monitoring/dashboard/v1/WidgetProto.java
|
f05d2c7cf5892a23b8b1e22af87eb376431786e3
|
[
"Apache-2.0"
] |
permissive
|
Tryweirder/googleapis-gen
|
2e5daf46574c3af3d448f1177eaebe809100c346
|
45d8e9377379f9d1d4e166e80415a8c1737f284d
|
refs/heads/master
| 2023-04-05T06:30:04.726589
| 2021-04-13T23:35:20
| 2021-04-13T23:35:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 3,804
|
java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/monitoring/dashboard/v1/widget.proto
package com.google.monitoring.dashboard.v1;
public final class WidgetProto {
private WidgetProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_monitoring_dashboard_v1_Widget_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_monitoring_dashboard_v1_Widget_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n+google/monitoring/dashboard/v1/widget." +
"proto\022\036google.monitoring.dashboard.v1\032\037g" +
"oogle/api/field_behavior.proto\032.google/m" +
"onitoring/dashboard/v1/scorecard.proto\032)" +
"google/monitoring/dashboard/v1/text.prot" +
"o\032,google/monitoring/dashboard/v1/xychar" +
"t.proto\032\033google/protobuf/empty.proto\"\203\002\n" +
"\006Widget\022\022\n\005title\030\001 \001(\tB\003\340A\001\022;\n\010xy_chart\030" +
"\002 \001(\0132\'.google.monitoring.dashboard.v1.X" +
"yChartH\000\022>\n\tscorecard\030\003 \001(\0132).google.mon" +
"itoring.dashboard.v1.ScorecardH\000\0224\n\004text" +
"\030\004 \001(\0132$.google.monitoring.dashboard.v1." +
"TextH\000\022\'\n\005blank\030\005 \001(\0132\026.google.protobuf." +
"EmptyH\000B\t\n\007contentB\247\001\n\"com.google.monito" +
"ring.dashboard.v1B\013WidgetProtoP\001ZGgoogle" +
".golang.org/genproto/googleapis/monitori" +
"ng/dashboard/v1;dashboard\352\002(Google::Clou" +
"d::Monitoring::Dashboard::V1b\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.FieldBehaviorProto.getDescriptor(),
com.google.monitoring.dashboard.v1.ScorecardProto.getDescriptor(),
com.google.monitoring.dashboard.v1.TextProto.getDescriptor(),
com.google.monitoring.dashboard.v1.XyChartProto.getDescriptor(),
com.google.protobuf.EmptyProto.getDescriptor(),
});
internal_static_google_monitoring_dashboard_v1_Widget_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_google_monitoring_dashboard_v1_Widget_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_monitoring_dashboard_v1_Widget_descriptor,
new java.lang.String[] { "Title", "XyChart", "Scorecard", "Text", "Blank", "Content", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
com.google.api.FieldBehaviorProto.getDescriptor();
com.google.monitoring.dashboard.v1.ScorecardProto.getDescriptor();
com.google.monitoring.dashboard.v1.TextProto.getDescriptor();
com.google.monitoring.dashboard.v1.XyChartProto.getDescriptor();
com.google.protobuf.EmptyProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
|
[
"bazel-bot-development[bot]@users.noreply.github.com"
] |
bazel-bot-development[bot]@users.noreply.github.com
|
5daa982c1785f340434f44e7430b12d2d310f595
|
aa4acdba351926db6b17ac000a3765ee7534df0c
|
/pss-simulator/data-saving-layer/src/main/scala/pss/saving/anonymization_result/AnonymizationResultSavable.java
|
a6f56986e16c2d7e66662a3ff08e869df10f668b
|
[] |
no_license
|
nafeezabrar/pss-without-as
|
7579e28de6024e31bf0bd843ccc6fbe12508e01f
|
97c821da725ddc6e63612dacb67a7736b2aa4c5c
|
refs/heads/main
| 2023-01-07T09:21:58.157210
| 2020-11-09T14:58:23
| 2020-11-09T14:58:23
| 311,345,524
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 250
|
java
|
package pss.saving.anonymization_result;
import pss.result.anonymization.AnonymizationResult;
import java.util.List;
public interface AnonymizationResultSavable {
void saveAnonymizationResult(List<AnonymizationResult> anonymizationResults);
}
|
[
"ishmumkhan@gmail.com"
] |
ishmumkhan@gmail.com
|
721db8099cdea3d896f19b3ad41710fb24d3ae10
|
f0568343ecd32379a6a2d598bda93fa419847584
|
/modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201306/AdRuleDateErrorReason.java
|
3239124bbf85d5c3e477702ea007bfabb0fd0cd6
|
[
"Apache-2.0"
] |
permissive
|
frankzwang/googleads-java-lib
|
bd098b7b61622bd50352ccca815c4de15c45a545
|
0cf942d2558754589a12b4d9daa5902d7499e43f
|
refs/heads/master
| 2021-01-20T23:20:53.380875
| 2014-07-02T19:14:30
| 2014-07-02T19:14:30
| 21,526,492
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,600
|
java
|
/**
* AdRuleDateErrorReason.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.dfp.axis.v201306;
public class AdRuleDateErrorReason implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected AdRuleDateErrorReason(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _START_DATE_TIME_IS_IN_PAST = "START_DATE_TIME_IS_IN_PAST";
public static final java.lang.String _END_DATE_TIME_IS_IN_PAST = "END_DATE_TIME_IS_IN_PAST";
public static final java.lang.String _END_DATE_TIME_NOT_AFTER_START_TIME = "END_DATE_TIME_NOT_AFTER_START_TIME";
public static final java.lang.String _END_DATE_TIME_TOO_LATE = "END_DATE_TIME_TOO_LATE";
public static final java.lang.String _UNKNOWN = "UNKNOWN";
public static final AdRuleDateErrorReason START_DATE_TIME_IS_IN_PAST = new AdRuleDateErrorReason(_START_DATE_TIME_IS_IN_PAST);
public static final AdRuleDateErrorReason END_DATE_TIME_IS_IN_PAST = new AdRuleDateErrorReason(_END_DATE_TIME_IS_IN_PAST);
public static final AdRuleDateErrorReason END_DATE_TIME_NOT_AFTER_START_TIME = new AdRuleDateErrorReason(_END_DATE_TIME_NOT_AFTER_START_TIME);
public static final AdRuleDateErrorReason END_DATE_TIME_TOO_LATE = new AdRuleDateErrorReason(_END_DATE_TIME_TOO_LATE);
public static final AdRuleDateErrorReason UNKNOWN = new AdRuleDateErrorReason(_UNKNOWN);
public java.lang.String getValue() { return _value_;}
public static AdRuleDateErrorReason fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
AdRuleDateErrorReason enumeration = (AdRuleDateErrorReason)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static AdRuleDateErrorReason fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumSerializer(
_javaType, _xmlType);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(AdRuleDateErrorReason.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201306", "AdRuleDateError.Reason"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
d21d788ad2514c4c678eac6373f324af47d6a0bd
|
34bcf41c98b60da861b2d90c332a0a879815a6c2
|
/src/main/java/com/etermax/spacehorse/core/catalog/resource/response/SpecialOfferInAppDefinitionResponse.java
|
22c88e0b1ff96c996070948d360a496a5f250efe
|
[] |
no_license
|
damianciocca/horse-api
|
af3c15ad749b81541cffa62f68824fe0df69b2f2
|
2f8df8a50081a2c2ad2dc57d15932776d93c3f2e
|
refs/heads/master
| 2020-03-19T21:22:45.733348
| 2018-06-11T14:32:13
| 2018-06-11T14:32:13
| 136,938,331
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,280
|
java
|
package com.etermax.spacehorse.core.catalog.resource.response;
import com.etermax.spacehorse.core.catalog.model.MarketType;
import com.etermax.spacehorse.core.catalog.model.specialoffer.SpecialOfferInAppDefinition;
import com.fasterxml.jackson.annotation.JsonProperty;
public class SpecialOfferInAppDefinitionResponse {
@JsonProperty("Id")
private String id;
@JsonProperty("ItemId")
private String shopItemId;
@JsonProperty("Market")
private MarketType marketType;
@JsonProperty("InAppId")
private String productId;
@JsonProperty("InAppPriceInUsdCents")
private int inAppPriceInUsdCents;
public SpecialOfferInAppDefinitionResponse() {
}
public SpecialOfferInAppDefinitionResponse(SpecialOfferInAppDefinition definition) {
this.id = definition.getId();
this.shopItemId = definition.getItemId();
this.marketType = definition.getMarketType();
this.productId = definition.getProductId();
this.inAppPriceInUsdCents = definition.getInAppPriceInUsdCents();
}
public String getId() {
return id;
}
public MarketType getMarketType() {
return marketType;
}
public String getProductId() {
return productId;
}
public String getShopItemId() {
return shopItemId;
}
public int getInAppPriceInUsdCents() {
return inAppPriceInUsdCents;
}
}
|
[
"damian.ciocca@etermax.com"
] |
damian.ciocca@etermax.com
|
6153e5999c980616286ad0c0503ff0bdb790fdbd
|
08bdd164c174d24e69be25bf952322b84573f216
|
/opencores/client/foundation classes/j2sdk-1_4_2-src-scsl/hotspot/src/share/vm/agent/sun/jvm/hotspot/debugger/win32/coff/DLLCharacteristics.java
|
b8c5de124efeba3d54915ece02cc8be75b8300c9
|
[] |
no_license
|
hagyhang/myforthprocessor
|
1861dcabcf2aeccf0ab49791f510863d97d89a77
|
210083fe71c39fa5d92f1f1acb62392a7f77aa9e
|
refs/heads/master
| 2021-05-28T01:42:50.538428
| 2014-07-17T14:14:33
| 2014-07-17T14:14:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 880
|
java
|
/*
* @(#)DLLCharacteristics.java 1.3 03/01/23 11:32:57
*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package sun.jvm.hotspot.debugger.win32.coff;
/** Constants enumerating characteristics of a DLL; see {@link
sun.jvm.hotspot.debugger.win32.coff.OptionalHeaderWindowsSpecificFields#getDLLCharacteristics}.
(Some of the descriptions are taken directly from Microsoft's
documentation and are copyrighted by Microsoft.) */
public interface DLLCharacteristics {
/** Do not bind image */
public short IMAGE_DLLCHARACTERISTICS_NO_BIND = (short) 0x0800;
/** Driver is a WDM Driver */
public short IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = (short) 0x2000;
/** Image is Terminal Server aware */
public short IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = (short) 0x8000;
}
|
[
"blue@cmd.nu"
] |
blue@cmd.nu
|
106e38861dc45f50cc0a5e5a3fab00de488b98ac
|
e0b2f184a198ebffff23b2f24461a1f74daceb1f
|
/app/src/main/java/com/maple/bugly/view/activity/AboutActivity.java
|
dbee20e8c6002e329aef73a95f08256e3a06e80e
|
[] |
no_license
|
gaoguanqi/Bugly2020
|
0cdac78f91b8793fb76d3cf152d0169bb732aacc
|
7d9d193b980dae1df21ed5e91541f3314b3135c4
|
refs/heads/master
| 2022-11-20T02:40:39.069838
| 2020-07-31T06:53:52
| 2020-07-31T06:53:52
| 283,458,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,089
|
java
|
package com.maple.bugly.view.activity;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.blankj.utilcode.util.TimeUtils;
import com.maple.bugly.R;
import com.maple.bugly.app.base.BaseActivity;
import com.maple.bugly.view.adapter.AboutAdapter;
import com.scwang.smart.refresh.footer.ClassicsFooter;
import com.scwang.smart.refresh.header.ClassicsHeader;
import com.scwang.smart.refresh.layout.api.RefreshLayout;
import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
import java.util.ArrayList;
import java.util.List;
public class AboutActivity extends BaseActivity {
private RefreshLayout refreshLayout;
private RecyclerView rvAbout;
private AboutAdapter mAdapter;
private List<String> mData;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
refreshLayout = (RefreshLayout)findViewById(R.id.refreshLayout);
rvAbout = findViewById(R.id.rv_about);
rvAbout.setLayoutManager(new LinearLayoutManager(this));
refreshLayout.setRefreshHeader(new ClassicsHeader(this));
refreshLayout.setRefreshFooter(new ClassicsFooter(this));
refreshLayout.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh(RefreshLayout refreshlayout) {
onRefreshData();
}
});
refreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
@Override
public void onLoadMore(RefreshLayout refreshlayout) {
onLoadMoreData();
}
});
mAdapter = new AboutAdapter(this);
rvAbout.setAdapter(mAdapter);
mData = new ArrayList<>();
for (int i = 0; i < 10; i++) {
mData.add(String.valueOf(i) +"----"+TimeUtils.getNowString());
}
mAdapter.setList(mData);
}
private void onRefreshData() {
mData.clear();
for (int i = 0; i < 10; i++) {
mData.add(String.valueOf(i) +"----"+TimeUtils.getNowString());
}
mAdapter.notifyDataSetChanged();
onFinishRefresh();
}
private void onLoadMoreData() {
int size = mData.size();
for (int i = size; i < size + 10; i++) {
mData.add(String.valueOf(i) +"----"+TimeUtils.getNowString());
}
mAdapter.notifyDataSetChanged();
onFinishLoadMore();
}
private void onFinishRefresh(){
if(refreshLayout != null && refreshLayout.isRefreshing()){
refreshLayout.finishRefresh(500/*,false*/);//传入false表示刷新失败
}
}
private void onFinishLoadMore(){
if(refreshLayout != null && refreshLayout.isLoading()){
refreshLayout.finishLoadMore(500/*,false*/);//传入false表示加载失败
}
}
}
|
[
"307590625@qq.com"
] |
307590625@qq.com
|
8f104713063743c5707b4806b36ac509fed6d67a
|
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
|
/SCT2/tags/Before_Expression_refactoring/test-plugins/org.yakindu.sct.simulation.core.sexec.test/test-gen/org/yakindu/sct/simulation/core/sexec/test/InternalEventLifeCycleTest.java
|
c79a98aaf0513ade10d905a5ba849561d9f18b67
|
[] |
no_license
|
huybuidac20593/yakindu
|
377fb9100d7db6f4bb33a3caa78776c4a4b03773
|
304fb02b9c166f340f521f5e4c41d970268f28e9
|
refs/heads/master
| 2021-05-29T14:46:43.225721
| 2015-05-28T11:54:07
| 2015-05-28T11:54:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,928
|
java
|
/**
* Copyright (c) 2013 committers of YAKINDU and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* committers of YAKINDU - initial API and implementation
*/
package org.yakindu.sct.simulation.core.sexec.test;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.yakindu.sct.model.sexec.ExecutionFlow;
import org.yakindu.sct.model.sexec.interpreter.test.util.AbstractExecutionFlowTest;
import org.yakindu.sct.model.sexec.interpreter.test.util.SExecInjectionProvider;
import org.yakindu.sct.test.models.SCTUnitTestModels;
import com.google.inject.Inject;
import static org.junit.Assert.assertTrue;
/**
* Unit TestCase for InternalEventLifeCycle
*/
@SuppressWarnings("all")
@RunWith(XtextRunner.class)
@InjectWith(SExecInjectionProvider.class)
public class InternalEventLifeCycleTest extends AbstractExecutionFlowTest {
@Inject
private SCTUnitTestModels models;
@Before
public void setup() throws Exception {
ExecutionFlow flow = models
.loadExecutionFlowFromResource("InternalEventLifeCycle.sct");
initInterpreter(flow);
}
@Test
public void InternalEventLifeCycleTest() throws Exception {
interpreter.enter();
assertTrue(isActive("A"));
assertTrue(isActive("C"));
raiseEvent("e");
interpreter.runCycle();
assertTrue(isActive("A"));
assertTrue(isActive("D"));
interpreter.runCycle();
assertTrue(isActive("A"));
assertTrue(isActive("D"));
raiseEvent("f");
interpreter.runCycle();
assertTrue(isActive("A"));
assertTrue(isActive("C"));
interpreter.runCycle();
assertTrue(isActive("A"));
assertTrue(isActive("C"));
}
}
|
[
"A.Muelder@gmail.com"
] |
A.Muelder@gmail.com
|
387cc88c7d4d74ddbaa35730614f4e59ee86a4c9
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/mapstruct/validation/193/Annotation.java
|
ec59ac78827e5782fce1856753b54561381f32d4
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,137
|
java
|
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.internal.model;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import org.mapstruct.ap.internal.model.common. ModelElement;
import org.mapstruct.ap.internal.model.common.Type;
/**
* Represents a Java 5 annotation.
*
* @author Gunnar Morling
*/
public class Annotation extends ModelElement {
private final Type type;
/**
* List of annotation attributes. Quite simplistic, but it's sufficient for now.
*/
private List<String> properties;
public Annotation(Type type) {
this( type, Collections.<String>emptyList() );
}
public Annotation(Type type, List<String> properties) {
this.type = type;
this.properties = properties;
}
public Type getType() {
return type;
}
@Override
public Set<Type> getImportTypes() {
return Collections.singleton( type );
}
public List<String> getProperties() {
return properties;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
1dad8296bb2d3b3a45f02cd22175488abe24e42e
|
d981992de3b7ae7ac0d598867ebf892ef9772d6a
|
/src/main/java/shift/mceconomy3/MCEconomy3.java
|
fea34c9eed521cdaf0157974b2a2598d7214af89
|
[] |
no_license
|
shift02/MCEconomy3
|
72a8efbee3186dbfc515c00ba4d81e7f3b4bcfc0
|
aa67ab2944bafcd421a2306b594223891d83cf2c
|
refs/heads/master
| 2021-01-20T17:15:16.673920
| 2018-03-31T02:09:51
| 2018-03-31T02:09:51
| 61,975,132
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,258
|
java
|
package shift.mceconomy3;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import shift.mceconomy3.api.MCEconomyAPI;
import shift.mceconomy3.api.money.CapabilityMoneyStorage;
import shift.mceconomy3.api.shop.ProductBase;
import shift.mceconomy3.api.shop.ShopBase;
import shift.mceconomy3.event.CommonEventManager;
import shift.mceconomy3.event.MPManager;
import shift.mceconomy3.gui.HUDMP;
import shift.mceconomy3.item.MCEItems;
import shift.mceconomy3.packet.PacketHandler;
import shift.mceconomy3.proxy.CommonProxy;
import shift.mceconomy3.purchase.PurchaseManager;
@Mod(modid = MCEconomy3.MODID, version = MCEconomy3.VERSION, dependencies = MCEconomy3.DEPENDENCY, updateJSON = MCEconomy3.UPDATE_JSON)
public class MCEconomy3 {
public static final String MODID = "mceconomy3";
public static final String VERSION = "1.1.2";
public static final String UPDATE_JSON = "https://shift02.github.io/MCEconomy3/Update.json";
public static final String DEPENDENCY = "";//"before:SextiarySector";
@Mod.Instance(MCEconomy3.MODID)
public static MCEconomy3 instance;
@SidedProxy(clientSide = "shift.mceconomy3.proxy.ClientProxy", serverSide = "shift.mceconomy3.proxy.CommonProxy")
public static CommonProxy proxy;
public static ShopBase testShop;
public static int testShopID;
public static boolean shopTest = false;
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
MCEconomyAPI.MODID = MCEconomy3.MODID;
Config.ConfigRead(event);
MinecraftForge.EVENT_BUS.register(new CommonEventManager());
CapabilityMPHandler.register();
CapabilityMoneyStorage.register();
if (event.getSide().isClient()) {
MinecraftForge.EVENT_BUS.register(new HUDMP());
}
PacketHandler.init(event);
MCEconomyAPI.MPManager = MPManager.getInstance();
MCEconomyAPI.SOUND_MANAGER = new MCESoundManager();
MCEconomyAPI.SHOP_MANAGER = new ShopManager();
MCEconomyAPI.PURCHA_SEREGISTRY = PurchaseManager.purchaseRegistry;
MCEconomyAPI.registerPurchaseItem();
PurchaseManager.setPurchaseItems(event.getAsmData());
}
@EventHandler
public void init(FMLInitializationEvent event) {
MCEItems.initItem();
testShop = new ShopBase("test");
testShopID = MCEconomyAPI.registerShop(testShop);
testShop.addProduct(new ProductBase(new ItemStack(Items.APPLE), 500));
testShop.addProduct(new ProductBase(new ItemStack(Items.STICK), 500));
NetworkRegistry.INSTANCE.registerGuiHandler(this, new MCEGuiHandler());
}
@EventHandler
public void init(FMLPostInitializationEvent event) {
PurchaseManager.registryPurchaseItems();
}
}
|
[
"shift02ss@gmail.com"
] |
shift02ss@gmail.com
|
5203c045ecea99c0cb3614ce7f3676dcd72d6fe2
|
6635387159b685ab34f9c927b878734bd6040e7e
|
/src/ol.java
|
bfa9f1782ea42e6ebb47f77906587aef95ecad39
|
[] |
no_license
|
RepoForks/com.snapchat.android
|
987dd3d4a72c2f43bc52f5dea9d55bfb190966e2
|
6e28a32ad495cf14f87e512dd0be700f5186b4c6
|
refs/heads/master
| 2021-05-05T10:36:16.396377
| 2015-07-16T16:46:26
| 2015-07-16T16:46:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 149
|
java
|
public final class ol
extends Exception
{}
/* Location:
* Qualified Name: ol
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
c2561e83770f66b8c42c8db188cd57bac6012f2f
|
d7c5121237c705b5847e374974b39f47fae13e10
|
/airspan.netspan/src/main/java/Netspan/NBI_17_0/Backhaul/ErrorCodes.java
|
da6bb345d29671bd0d6f167fed2055911aac0b1d
|
[] |
no_license
|
AirspanNetworks/SWITModules
|
8ae768e0b864fa57dcb17168d015f6585d4455aa
|
7089a4b6456621a3abd601cc4592d4b52a948b57
|
refs/heads/master
| 2022-11-24T11:20:29.041478
| 2020-08-09T07:20:03
| 2020-08-09T07:20:03
| 184,545,627
| 1
| 0
| null | 2022-11-16T12:35:12
| 2019-05-02T08:21:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,530
|
java
|
package Netspan.NBI_17_0.Backhaul;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ErrorCodes.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="ErrorCodes">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="OK"/>
* <enumeration value="NotAuthorized"/>
* <enumeration value="NotLicensed"/>
* <enumeration value="InvalidParameters"/>
* <enumeration value="Error"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "ErrorCodes")
@XmlEnum
public enum ErrorCodes {
OK("OK"),
@XmlEnumValue("NotAuthorized")
NOT_AUTHORIZED("NotAuthorized"),
@XmlEnumValue("NotLicensed")
NOT_LICENSED("NotLicensed"),
@XmlEnumValue("InvalidParameters")
INVALID_PARAMETERS("InvalidParameters"),
@XmlEnumValue("Error")
ERROR("Error");
private final String value;
ErrorCodes(String v) {
value = v;
}
public String value() {
return value;
}
public static ErrorCodes fromValue(String v) {
for (ErrorCodes c: ErrorCodes.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"dshalom@airspan.com"
] |
dshalom@airspan.com
|
a822bdca0e471580b8d5d11ce392f3800c228f19
|
e8fc320e35fd8442b8a68b77db9ca55fb411a567
|
/tmp/java/AlteracaoDeFaturamento.java
|
9319a813e2143a9472d646c1da8a84a0d1cc9eba
|
[] |
no_license
|
pedroalmir/regressionTestingPriorization
|
0500b477ba9005e61204b62d09488824c5fbf0db
|
62372a83fa8b7c062cb861225bda750d655401fa
|
refs/heads/master
| 2020-04-06T04:22:35.207449
| 2013-11-04T21:31:39
| 2013-11-04T21:31:39
| null | 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 5,698
|
java
|
package br.com.infowaypi.ecarebc.service.financeiro;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import br.com.infowaypi.ecarebc.associados.Prestador;
import br.com.infowaypi.ecarebc.constantes.Constantes;
import br.com.infowaypi.ecarebc.financeiro.faturamento.AlteracaoFaturamento;
import br.com.infowaypi.ecarebc.financeiro.faturamento.Faturamento;
import br.com.infowaypi.ecarebc.financeiro.faturamento.retencao.Retencao;
import br.com.infowaypi.molecular.ImplDAO;
import br.com.infowaypi.molecular.SearchAgent;
import br.com.infowaypi.molecular.parameter.Equals;
import br.com.infowaypi.msr.exceptions.ValidateException;
import br.com.infowaypi.msr.user.UsuarioInterface;
import br.com.infowaypi.msr.utils.Utils;
public class AlteracaoDeFaturamento extends FinanceiroService{
public Faturamento buscarFaturamento(String competencia, Prestador prestador) throws ValidateException {
if(prestador == null)
throw new ValidateException("O prestador deve ser informado.");
if(Utils.isStringVazia(competencia))
throw new ValidateException("A competência deve ser informada.");
Date competenciaEscolhida = getCompetencia(competencia);
Faturamento faturamento = searchFaturamento(prestador, competenciaEscolhida);
if(faturamento == null)
throw new ValidateException("Faturamento não encontrado ou já está fechado!");
faturamento.getAlteracoesFaturamento().size();
return faturamento;
}
private Faturamento searchFaturamento(Prestador prestador, Date competencia) throws ValidateException{
SearchAgent sa = getSearchAgent();
sa.addParameter(new Equals("prestador", prestador));
sa.addParameter(new Equals("competencia", competencia));
sa.addParameter(new Equals("status", Constantes.FATURAMENTO_ABERTO));
List<Faturamento> faturamentos = sa.list(Faturamento.class);
if (faturamentos.size() == 0)
throw new ValidateException("Esse prestador não teve faturamento este mês");
return faturamentos.get(0);
}
public Faturamento alterarDeducao(Faturamento faturamento, Retencao retencao, String valorDeducao) throws Exception {
if (faturamento == null)
throw new ValidateException("Faturamento inválido.");
if (retencao == null)
throw new ValidateException("Retenção inválida.");
if (!Utils.isStringVazia(valorDeducao)) {
for(Retencao retencaoAtual : faturamento.getRetencoes()){
if(retencaoAtual.getIdRetencao().equals(retencao.getIdRetencao()))
retencaoAtual.setValorDeducao(new BigDecimal(Utils.createFloat(valorDeducao)));
ImplDAO.save(retencaoAtual);
}
//faturamento.processarRetencoes();
ImplDAO.save(faturamento);
}
return faturamento;
}
public Faturamento alterarValor(Faturamento faturamento, BigDecimal valorIncremento, BigDecimal valorDecremento, String motivo, UsuarioInterface usuario) throws Exception {
if (faturamento == null)
throw new ValidateException("Faturamento inválido.");
if(valorIncremento == null)
valorIncremento = BigDecimal.ZERO;
if(valorDecremento == null)
valorDecremento = BigDecimal.ZERO;
BigDecimal saldo = valorIncremento.subtract(valorDecremento);
BigDecimal novoValorBruto = faturamento.getValorBruto().add(saldo);
BigDecimal novoValorLiquido = faturamento.getValorLiquido().add(saldo);
if(novoValorBruto.compareTo(BigDecimal.ZERO) < 0)
throw new ValidateException("Valores inválidos. O Valor Bruto não pode ficar negativo.");
// if(novoValorLiquido.compareTo(BigDecimal.ZERO) < 0)
// throw new ValidateException("Valores inválidos. O Valor Liquido não pode ficar negativo.");
if (!Utils.isStringVazia(motivo)) {
AlteracaoFaturamento alteracaoFaturamento = new AlteracaoFaturamento();
alteracaoFaturamento.setValorIncremento(valorIncremento);
alteracaoFaturamento.setValorDecremento(valorDecremento);
alteracaoFaturamento.setMotivo(motivo);
alteracaoFaturamento.setData(new Date());
alteracaoFaturamento.setStatus(AlteracaoFaturamento.STATUS_ATIVO);
faturamento.getAlteracoesFaturamento().add(alteracaoFaturamento);
alteracaoFaturamento.setFaturamento(faturamento);
alteracaoFaturamento.setUsuario(usuario);
faturamento.setValorBruto(novoValorBruto);
//faturamento.processarRetencoes();
}
else{
throw new ValidateException("Preencha o motivo");
}
return faturamento;
}
public Faturamento conferirDados(Faturamento faturamento) throws Exception{
ImplDAO.save(faturamento);
return faturamento;
}
public void finalizar(Faturamento faturamento){}
// private void recalcularRentencoes(Faturamento faturamento){
//
// Integer tipoDePessoa = faturamento.getPrestador().isPessoaFisica() ? AbstractImposto.PESSOA_FISICA : AbstractImposto.PESSOA_JURIDICA;
//
// BigDecimal valorBase = MoneyCalculation.rounded(faturamento.getValorBruto().add(faturamento.getValorOutros()));
// BigDecimal valorBruto = MoneyCalculation.rounded(faturamento.getValorBruto().add(faturamento.getValorOutros()));
//
// SearchAgent sa = new SearchAgent();
// ImpostoInterface impostoINSS = (ImpostoInterface) sa.list(Inss.class).get(0);
// ImpostoInterface impostoISS = (ImpostoInterface) sa.list(Iss.class).get(0);
// ImpostoInterface impostoDeRenda = (ImpostoInterface) sa.list(ImpostoDeRenda.class).get(0);
//
// for (Retencao retencao : faturamento.getRetencoes()) {
// retencao.setValorBaseDoCalculo(valorBruto);
// retencao.
//// if(retencao.getDescricao().equals(impostoISS.getDescricao())){
//// retencao.
//// }else if(retencao.getDescricao().equals(impostoINSS.getDescricao())){
////
//// }else if(retencao.getDescricao().equals(impostoDeRenda.getDescricao())){
////
//// }
// }
//
// }
}
|
[
"petrus.cc@gmail.com"
] |
petrus.cc@gmail.com
|
fe9cbb639db230ae52f6365ccc316fee7a0a03ca
|
2a296b66a4ea39ec8eea58bd06bf2f1db1e022ff
|
/src/main/java/indi/twc/test/utils/SendRunnable.java
|
1a231b030306089afc67ad8ee778d70684b86aeb
|
[] |
no_license
|
SkyScraperTwc/JavaBase
|
650e1a6e962093d8152fc94470f541a48bec5cb4
|
df8bd55076d00712486a74f098cfa9fc62004453
|
refs/heads/master
| 2021-05-07T23:00:29.959044
| 2018-04-02T09:24:13
| 2018-04-02T09:24:13
| 107,376,580
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 697
|
java
|
package indi.twc.test.utils;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
public class SendRunnable implements Runnable {
private DataOutputStream dos;
public SendRunnable(DataOutputStream dos) {
this.dos = dos;
}
@Override
public void run() {
while (true) {
BufferedReader bufReader = new BufferedReader(new InputStreamReader(System.in));
try {
String msgToSend = bufReader.readLine();
dos.writeUTF(msgToSend);
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
|
[
"543145646@qq.com"
] |
543145646@qq.com
|
668742babb7a073c438515d7838a8c2449d46577
|
2088303ad9939663f5f8180f316b0319a54bc1a6
|
/src/main/java/com/lottery/lottype/xjssc/Xjssc26.java
|
7a48ec7e8266e80d50e2b17d8b27c9ca039d4bd0
|
[] |
no_license
|
lichaoliu/lottery
|
f8afc33ccc70dd5da19c620250d14814df766095
|
7796650e5b851c90fce7fd0a56f994f613078e10
|
refs/heads/master
| 2022-12-23T05:30:22.666503
| 2019-06-10T13:46:38
| 2019-06-10T13:46:38
| 141,867,129
| 7
| 1
| null | 2022-12-16T10:52:50
| 2018-07-22T04:59:44
|
Java
|
UTF-8
|
Java
| false
| false
| 2,948
|
java
|
package com.lottery.lottype.xjssc;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import com.lottery.common.contains.ErrorCode;
import com.lottery.common.contains.lottery.LotteryDrawPrizeAwarder;
import com.lottery.common.exception.LotteryException;
import com.lottery.lottype.SplitedLot;
public class Xjssc26 extends XjsscX{
@Override
public String caculatePrizeLevel(String betcode, String wincode,
int oneAmount) {
String winten = getDDPrize(Integer.parseInt(wincode.split(",")[3]));
String winge = getDDPrize(Integer.parseInt(wincode.split(",")[4]));
StringBuilder prize = new StringBuilder();
String[] bettens = betcode.replace("^", "").split("-")[1].split(";")[0].split(",");
String[] betges = betcode.replace("^", "").split("-")[1].split(";")[1].split(",");
for(String betten:bettens) {
for(String betge:betges) {
if(winten.contains(betten)&&winge.contains(betge)) {
prize.append(LotteryDrawPrizeAwarder.XJSSC_DD.value).append(",");
}
}
}
if(prize.toString().endsWith(",")) {
prize = prize.deleteCharAt(prize.length()-1);
}
return prize.toString();
}
@Override
public long getSingleBetAmount(String betcode, BigDecimal beishu,
int oneAmount) {
if(!betcode.matches(OTHER_DD)) {
throw new LotteryException(ErrorCode.betamount_error, ErrorCode.betamount_error.memo);
}
long zhushu = 1L;
for(String code:betcode.split("\\-")[1].replace("^", "").split(";")) {
zhushu = zhushu * code.split(",").length;
if(isBetcodeDuplication(code)) {
throw new LotteryException(ErrorCode.betamount_error, ErrorCode.betamount_error.memo);
}
}
return zhushu*200*beishu.longValue();
}
@Override
public List<SplitedLot> splitByType(String betcode, int lotmulti,
int oneAmount) {
List<SplitedLot> list = new ArrayList<SplitedLot>();
List<SplitedLot> zhumaList = transform(betcode,lotmulti);
for(SplitedLot splitedLot:zhumaList) {
if(!SplitedLot.isToBeSplitFC(splitedLot.getLotMulti(),splitedLot.getAmt())) {
list.add(splitedLot);
}else {
list.addAll(SplitedLot.splitToPermissionMulti(splitedLot.getBetcode(), splitedLot.getLotMulti(), 50,lotterytype));
}
}
for(SplitedLot s:list) {
s.setAmt(getSingleBetAmount(s.getBetcode(), new BigDecimal(s.getLotMulti()), 200));
}
return list;
}
private List<SplitedLot> transform(String betcode,int lotmulti) {
List<SplitedLot> list = new ArrayList<SplitedLot>();
String[] qians = betcode.replace("^", "").split("-")[1].split(";")[0].split(",");
String[] hous = betcode.replace("^", "").split("-")[1].split(";")[1].split(",");
for(String qian:qians) {
for(String hou:hous) {
SplitedLot lot = new SplitedLot(lotterytype);
lot.setBetcode("101426-"+qian+";"+hou+"^");
lot.setLotMulti(lotmulti);
lot.setAmt(getSingleBetAmount(lot.getBetcode(), new BigDecimal(lotmulti), 200));
list.add(lot);
}
}
return list;
}
}
|
[
"1147149597@qq.com"
] |
1147149597@qq.com
|
ea84ca1f8022555c58de54e5f34d7c6eb43146ab
|
04fd715987e5b20bf766348dc0c51a5fd928d78c
|
/src/main/java/com/futengwl/service/impl/CouponServiceImpl.java
|
6baf9bf2e7d2e6eab91e193ed57e5d0de87ace6a
|
[] |
no_license
|
JackMou/ftshop
|
d5ea5ca86e2179322f2bbf050615b02261c7d717
|
7285d9a5e5f7f687c70aff8611cb9e86c652564a
|
refs/heads/master
| 2020-03-30T03:53:43.160258
| 2018-09-07T08:12:07
| 2018-09-07T08:15:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,178
|
java
|
/*
* Copyright 2008-2018 futengwl.com. All rights reserved.
* Support: http://www.futengwl.com
* License: http://www.futengwl.com/license
* FileId: gRCz1kn/Pj1Jb6/KQGHcu+ClqSAqTUaO
*/
package com.futengwl.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import groovy.lang.Binding;
import groovy.lang.GroovyShell;
import com.futengwl.Page;
import com.futengwl.Pageable;
import com.futengwl.dao.CouponDao;
import com.futengwl.entity.Coupon;
import com.futengwl.entity.Store;
import com.futengwl.service.CouponService;
/**
* Service - 优惠券
*
* @author FTSHOP Team
* @version 6.0
*/
@Service
public class CouponServiceImpl extends BaseServiceImpl<Coupon, Long> implements CouponService {
/**
* 价格表达式变量
*/
private static final List<Map<String, Object>> PRICE_EXPRESSION_VARIABLES = new ArrayList<>();
@Inject
private CouponDao couponDao;
static {
Map<String, Object> variable0 = new HashMap<>();
Map<String, Object> variable1 = new HashMap<>();
Map<String, Object> variable2 = new HashMap<>();
variable0.put("quantity", 99);
variable0.put("price", new BigDecimal("99"));
variable1.put("quantity", 99);
variable1.put("price", new BigDecimal("9.9"));
variable2.put("quantity", 99);
variable2.put("price", new BigDecimal("0.99"));
PRICE_EXPRESSION_VARIABLES.add(variable0);
PRICE_EXPRESSION_VARIABLES.add(variable1);
PRICE_EXPRESSION_VARIABLES.add(variable2);
}
@Override
@Transactional(readOnly = true)
public boolean isValidPriceExpression(String priceExpression) {
Assert.hasText(priceExpression, "[Assertion failed] - priceExpression must have text; it must not be null, empty, or blank");
for (Map<String, Object> variable : PRICE_EXPRESSION_VARIABLES) {
try {
Binding binding = new Binding();
for (Map.Entry<String, Object> entry : variable.entrySet()) {
binding.setVariable(entry.getKey(), entry.getValue());
}
GroovyShell groovyShell = new GroovyShell(binding);
Object result = groovyShell.evaluate(priceExpression);
new BigDecimal(String.valueOf(result));
} catch (Exception e) {
return false;
}
}
return true;
}
@Override
@Transactional(readOnly = true)
public List<Coupon> findList(Store store) {
return couponDao.findList(store, null, null, null);
}
@Override
@Transactional(readOnly = true)
public List<Coupon> findList(Store store, Boolean isEnabled, Boolean isExchange, Boolean hasExpired) {
return couponDao.findList(store, isEnabled, isExchange, hasExpired);
}
@Override
@Transactional(readOnly = true)
public Page<Coupon> findPage(Boolean isEnabled, Boolean isExchange, Boolean hasExpired, Pageable pageable) {
return couponDao.findPage(isEnabled, isExchange, hasExpired, pageable);
}
@Override
@Transactional(readOnly = true)
public Page<Coupon> findPage(Store store, Pageable pageable) {
return couponDao.findPage(store, pageable);
}
}
|
[
"40753518+SniperCoco@users.noreply.github.com"
] |
40753518+SniperCoco@users.noreply.github.com
|
580872c5a60f2fb59d591edb2b40279ef2833e38
|
3a647f9636ca1bb63e8b3905633f5b5d7b78aa49
|
/src/main/java/org/sdrc/udise/domain/StudentSchoolMapping.java
|
7f302feeecf2045e1528979761317767910f3f5c
|
[] |
no_license
|
SDRC-India/TMSUP
|
a819da798ddd8ef2eddfe12dd6f58a8f242a230c
|
b92ccaf9328975ffa178b17b38f46a6b09ed8231
|
refs/heads/master
| 2021-08-07T03:33:15.857497
| 2017-11-07T12:47:41
| 2017-11-07T12:47:41
| 109,827,307
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,505
|
java
|
package org.sdrc.udise.domain;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author Harsh Pratyush (harsh@sdrc.co.in)
*
*/
@Entity
@Table(name = "student_school_mapping")
public class StudentSchoolMapping implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@Column(name = "child_school_mapping_id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer childSchooleMappingID;
@Column(name = "is_latest")
private boolean isLatest;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "student_id_fk", nullable = false, unique = true)
private StudentsDetails studentDetails;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "from_school_id_fk", nullable = false)
private SchoolDetails fromSchoolDetails;
@ManyToOne(optional = true, fetch = FetchType.LAZY)
@JoinColumn(name = "linked_school_id_fk", nullable = true)
private SchoolDetails linkedSchoolDetails;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "academic_year_id_fk")
private AcademicYear academicYear;
// Added by azar
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "other_state_id_fk", nullable = true)
private MasterArea otherState;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "other_district_id_fk", nullable = true)
private MasterArea otherDistrict;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "enroll_type_id_fk")
private TypeDetail enrollType;
@Column(name="other_state_school_name",nullable=true)
private String otherStateSchoolName;
@Column(name = "created_by")
private String createdBy;
@Column(name="created_datetime")
@Temporal(TemporalType.TIMESTAMP)
private Date createDateTime;
@Column(name="updated_datetime")
@Temporal(TemporalType.TIMESTAMP)
private Date updateDateTime;
// End of added data by azar
// getter setters
public AcademicYear getAcademicYear() {
return academicYear;
}
public void setAcademicYear(AcademicYear academicYear) {
this.academicYear = academicYear;
}
public Integer getChildSchooleMappingID() {
return childSchooleMappingID;
}
public void setChildSchooleMappingID(Integer childSchooleMappingID) {
this.childSchooleMappingID = childSchooleMappingID;
}
public boolean isLatest() {
return isLatest;
}
public void setLatest(boolean isLatest) {
this.isLatest = isLatest;
}
public StudentsDetails getStudentDetails() {
return studentDetails;
}
public void setStudentDetails(StudentsDetails studentDetails) {
this.studentDetails = studentDetails;
}
public SchoolDetails getFromSchoolDetails() {
return fromSchoolDetails;
}
public void setFromSchoolDetails(SchoolDetails fromSchoolDetails) {
this.fromSchoolDetails = fromSchoolDetails;
}
public SchoolDetails getLinkedSchoolDetails() {
return linkedSchoolDetails;
}
public void setLinkedSchoolDetails(SchoolDetails linkedSchoolDetails) {
this.linkedSchoolDetails = linkedSchoolDetails;
}
public MasterArea getOtherState() {
return otherState;
}
public void setOtherState(MasterArea otherState) {
this.otherState = otherState;
}
public MasterArea getOtherDistrict() {
return otherDistrict;
}
public void setOtherDistrict(MasterArea otherDistrict) {
this.otherDistrict = otherDistrict;
}
public TypeDetail getEnrollType() {
return enrollType;
}
public void setEnrollType(TypeDetail enrollType) {
this.enrollType = enrollType;
}
public String getOtherStateSchoolName() {
return otherStateSchoolName;
}
public void setOtherStateSchoolName(String otherStateSchoolName) {
this.otherStateSchoolName = otherStateSchoolName;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Date getCreateDateTime() {
return createDateTime;
}
public void setCreateDateTime(Date createDateTime) {
this.createDateTime = createDateTime;
}
public Date getUpdateDateTime() {
return updateDateTime;
}
public void setUpdateDateTime(Date updateDateTime) {
this.updateDateTime = updateDateTime;
}
}
|
[
"ratikanta@sdrc.co.in"
] |
ratikanta@sdrc.co.in
|
fd5194046dace9333fc740ed155892e45334d486
|
929abc13e3ff6294748a27c4ff053905d31e54c0
|
/src/main/java/com/example/demo/Test.java
|
8d56be39b80b18583a606f237d026f480b6e7dbe
|
[] |
no_license
|
arshamsedaghatbin/spring-exception-handling
|
31a9a27c9429fea075f0b52afcfd08f020e814f6
|
d2b6f8e00bd44ff70635a0733c527028c81820a2
|
refs/heads/master
| 2020-04-01T20:02:05.444105
| 2018-10-18T07:55:35
| 2018-10-18T07:55:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 205
|
java
|
package com.example.demo;
public class Test {
private String test;
public String getTest() {
return test;
}
public void setTest(String test) {
this.test = test;
}
}
|
[
"arsham.sedaghatbin@gmail.com"
] |
arsham.sedaghatbin@gmail.com
|
6030fec79f7f4fd35cf94801920c266929f683c4
|
217b6ca03aae468cbae64b519237044cd3178b33
|
/olyo/src/net/java/sip/communicator/impl/protocol/rss/RssStatusEnum.java
|
7c7518b8c831336c67d9bc1b5a9f668b7777c5d6
|
[] |
no_license
|
lilichun/olyo
|
41778e668784ca2fa179c65a67d99f3b94fdbb45
|
b3237b7d62808a5b1d059a8dd426508e6e4af0b9
|
refs/heads/master
| 2021-01-22T07:27:30.658459
| 2008-06-19T09:57:36
| 2008-06-19T09:57:36
| 32,123,461
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,014
|
java
|
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.protocol.rss;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
import java.io.*;
/**
* An implementation of <tt>PresenceStatus</tt> that enumerates all states that
* a Rss contact can fall into.
*
* @author Jean-Albert Vescovo
*/
public class RssStatusEnum
extends PresenceStatus
{
private static final Logger logger
= Logger.getLogger(RssStatusEnum.class);
/**
* Indicates an Offline status or status with 0 connectivity.
*/
public static final RssStatusEnum OFFLINE
= new RssStatusEnum(
0
, "Offline"
, loadIcon("resources/images/protocol/rss/rss-offline.png"));
/**
* The Online status. Indicate that the user is able and willing to
* communicate.
*/
public static final RssStatusEnum ONLINE
= new RssStatusEnum(
65
, "Online"
, loadIcon("resources/images/protocol/rss/rss-online.png"));
/**
* Initialize the list of supported status states.
*/
private static List supportedStatusSet = new LinkedList();
static
{
supportedStatusSet.add(OFFLINE);
supportedStatusSet.add(ONLINE);
}
/**
* Creates an instance of <tt>RssPresneceStatus</tt> with the
* specified parameters.
* @param status the connectivity level of the new presence status instance
* @param statusName the name of the presence status.
* @param statusIcon the icon associated with this status
*/
private RssStatusEnum(int status,
String statusName,
byte[] statusIcon)
{
super(status, statusName, statusIcon);
}
/**
* Returns an iterator over all status instances supproted by the rss
* provider.
* @return an <tt>Iterator</tt> over all status instances supported by the
* rss provider.
*/
static Iterator supportedStatusSet()
{
return supportedStatusSet.iterator();
}
/**
* Loads an image from a given image path.
* @param imagePath The path to the image resource.
* @return The image extracted from the resource at the specified path.
*/
public static byte[] loadIcon(String imagePath)
{
InputStream is = RssStatusEnum.class.getClassLoader()
.getResourceAsStream(imagePath);
byte[] icon = null;
try
{
icon = new byte[is.available()];
is.read(icon);
}
catch (IOException exc)
{
logger.error("Failed to load icon: " + imagePath, exc);
}
return icon;
}
}
|
[
"dongfengyu20032045@1a5f2d27-d927-0410-a143-5778ce1304a0"
] |
dongfengyu20032045@1a5f2d27-d927-0410-a143-5778ce1304a0
|
84721033cba0ea14a12af4b16fba995923a719aa
|
a32f7ca6c0a9947c425e3b49a930814ccbba02ca
|
/servlets/data-access/src/edu/mum/cs/cs472/lab11/config/AppConfig.java
|
f6d3c7a3e5d977e2ab8b58daed44a9ca1e32b750
|
[] |
no_license
|
paulatumwine/WAP
|
a66976ded31c62f1ce33924526e2a698c1fc5da5
|
81b1c2af48a329b6663ae3c73ede084f8b4e0fc7
|
refs/heads/master
| 2020-09-05T11:57:36.839913
| 2019-11-18T00:36:43
| 2019-11-18T00:37:27
| 220,096,624
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 791
|
java
|
package edu.mum.cs.cs472.lab11.config;
public class AppConfig {
private String DBUrl;
private String DBUsername;
private String DBPwd;
public AppConfig() {
}
public AppConfig(String DBUrl, String DBUsername, String DBPwd) {
this.DBUrl = DBUrl;
this.DBUsername = DBUsername;
this.DBPwd = DBPwd;
}
public String getDBUrl() {
return DBUrl;
}
public void setDBUrl(String DBUrl) {
this.DBUrl = DBUrl;
}
public String getDBUsername() {
return DBUsername;
}
public void setDBUsername(String DBUsername) {
this.DBUsername = DBUsername;
}
public String getDBPwd() {
return DBPwd;
}
public void setDBPwd(String DBPwd) {
this.DBPwd = DBPwd;
}
}
|
[
"paulatumwine@gmail.com"
] |
paulatumwine@gmail.com
|
89c7564c34a3d3ce3aede8697aa23105c1b33975
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_7b6e965b90bbc21e45f27bf1b7e862dab4257297/UserInit/9_7b6e965b90bbc21e45f27bf1b7e862dab4257297_UserInit_s.java
|
72d3dd55f058de802e751d90b29e8cb8baf62590
|
[] |
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
| 940
|
java
|
package org.gwtapp.extension.user.server.test;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
public abstract class UserInit {
protected static EntityManagerFactory emf;
protected static EntityManager em;
protected EntityTransaction tx;
@BeforeClass
public static void setUp() {
emf = Persistence.createEntityManagerFactory("derbyPU");
em = emf.createEntityManager();
}
@Before
public void openTx() {
tx = em.getTransaction();
tx.begin();
}
@After
public void closeTx() {
if (tx.isActive()) {
tx.commit();
}
}
@AfterClass
public static void tearDown() {
em.close();
emf.close();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
edc6a92c24e686de7b100ab5c33513f01cf6b8ca
|
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
|
/sources/com/facebook/internal/DialogPresenter.java
|
3b4447ac46109f1f99b87270c9eadcd17a77aa8f
|
[] |
no_license
|
jasonnth/AirCode
|
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
|
d37db1baa493fca56f390c4205faf5c9bbe36604
|
refs/heads/master
| 2020-07-03T08:35:24.902940
| 2019-08-12T03:34:56
| 2019-08-12T03:34:56
| 201,842,970
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,999
|
java
|
package com.facebook.internal;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import com.facebook.FacebookActivity;
import com.facebook.FacebookException;
import com.facebook.FacebookSdk;
import com.facebook.appevents.AppEventsLogger;
import com.facebook.internal.FetchedAppSettings.DialogFeatureConfig;
import com.facebook.internal.NativeProtocol.ProtocolVersionQueryResult;
public class DialogPresenter {
public interface ParameterProvider {
Bundle getLegacyParameters();
Bundle getParameters();
}
public static void setupAppCallForCannotShowError(AppCall appCall) {
setupAppCallForValidationError(appCall, new FacebookException("Unable to show the provided content via the web or the installed version of the Facebook app. Some dialogs are only supported starting API 14."));
}
public static void setupAppCallForValidationError(AppCall appCall, FacebookException validationError) {
setupAppCallForErrorResult(appCall, validationError);
}
public static void present(AppCall appCall, Activity activity) {
activity.startActivityForResult(appCall.getRequestIntent(), appCall.getRequestCode());
appCall.setPending();
}
public static void present(AppCall appCall, FragmentWrapper fragmentWrapper) {
fragmentWrapper.startActivityForResult(appCall.getRequestIntent(), appCall.getRequestCode());
appCall.setPending();
}
public static boolean canPresentNativeDialogWithFeature(DialogFeature feature) {
return getProtocolVersionForNativeDialog(feature).getProtocolVersion() != -1;
}
public static boolean canPresentWebFallbackDialogWithFeature(DialogFeature feature) {
return getDialogWebFallbackUri(feature) != null;
}
public static void setupAppCallForErrorResult(AppCall appCall, FacebookException exception) {
if (exception != null) {
Validate.hasFacebookActivity(FacebookSdk.getApplicationContext());
Intent errorResultIntent = new Intent();
errorResultIntent.setClass(FacebookSdk.getApplicationContext(), FacebookActivity.class);
errorResultIntent.setAction(FacebookActivity.PASS_THROUGH_CANCEL_ACTION);
NativeProtocol.setupProtocolRequestIntent(errorResultIntent, appCall.getCallId().toString(), null, NativeProtocol.getLatestKnownVersion(), NativeProtocol.createBundleForException(exception));
appCall.setRequestIntent(errorResultIntent);
}
}
public static void setupAppCallForWebDialog(AppCall appCall, String actionName, Bundle parameters) {
Validate.hasFacebookActivity(FacebookSdk.getApplicationContext());
Validate.hasInternetPermissions(FacebookSdk.getApplicationContext());
Bundle intentParameters = new Bundle();
intentParameters.putString("action", actionName);
intentParameters.putBundle(NativeProtocol.WEB_DIALOG_PARAMS, parameters);
Intent webDialogIntent = new Intent();
NativeProtocol.setupProtocolRequestIntent(webDialogIntent, appCall.getCallId().toString(), actionName, NativeProtocol.getLatestKnownVersion(), intentParameters);
webDialogIntent.setClass(FacebookSdk.getApplicationContext(), FacebookActivity.class);
webDialogIntent.setAction(FacebookDialogFragment.TAG);
appCall.setRequestIntent(webDialogIntent);
}
public static void setupAppCallForWebFallbackDialog(AppCall appCall, Bundle parameters, DialogFeature feature) {
Uri fallbackUrl;
Validate.hasFacebookActivity(FacebookSdk.getApplicationContext());
Validate.hasInternetPermissions(FacebookSdk.getApplicationContext());
String featureName = feature.name();
Uri fallbackUrl2 = getDialogWebFallbackUri(feature);
if (fallbackUrl2 == null) {
throw new FacebookException("Unable to fetch the Url for the DialogFeature : '" + featureName + "'");
}
Bundle webParams = ServerProtocol.getQueryParamsForPlatformActivityIntentWebFallback(appCall.getCallId().toString(), NativeProtocol.getLatestKnownVersion(), parameters);
if (webParams == null) {
throw new FacebookException("Unable to fetch the app's key-hash");
}
if (fallbackUrl2.isRelative()) {
fallbackUrl = Utility.buildUri(ServerProtocol.getDialogAuthority(), fallbackUrl2.toString(), webParams);
} else {
fallbackUrl = Utility.buildUri(fallbackUrl2.getAuthority(), fallbackUrl2.getPath(), webParams);
}
Bundle intentParameters = new Bundle();
intentParameters.putString("url", fallbackUrl.toString());
intentParameters.putBoolean(NativeProtocol.WEB_DIALOG_IS_FALLBACK, true);
Intent webDialogIntent = new Intent();
NativeProtocol.setupProtocolRequestIntent(webDialogIntent, appCall.getCallId().toString(), feature.getAction(), NativeProtocol.getLatestKnownVersion(), intentParameters);
webDialogIntent.setClass(FacebookSdk.getApplicationContext(), FacebookActivity.class);
webDialogIntent.setAction(FacebookDialogFragment.TAG);
appCall.setRequestIntent(webDialogIntent);
}
public static void setupAppCallForNativeDialog(AppCall appCall, ParameterProvider parameterProvider, DialogFeature feature) {
Bundle params;
Context context = FacebookSdk.getApplicationContext();
String action = feature.getAction();
ProtocolVersionQueryResult protocolVersionResult = getProtocolVersionForNativeDialog(feature);
int protocolVersion = protocolVersionResult.getProtocolVersion();
if (protocolVersion == -1) {
throw new FacebookException("Cannot present this dialog. This likely means that the Facebook app is not installed.");
}
if (NativeProtocol.isVersionCompatibleWithBucketedIntent(protocolVersion)) {
params = parameterProvider.getParameters();
} else {
params = parameterProvider.getLegacyParameters();
}
if (params == null) {
params = new Bundle();
}
Intent intent = NativeProtocol.createPlatformActivityIntent(context, appCall.getCallId().toString(), action, protocolVersionResult, params);
if (intent == null) {
throw new FacebookException("Unable to create Intent; this likely means theFacebook app is not installed.");
}
appCall.setRequestIntent(intent);
}
private static Uri getDialogWebFallbackUri(DialogFeature feature) {
String featureName = feature.name();
DialogFeatureConfig config = FetchedAppSettings.getDialogFeatureConfig(FacebookSdk.getApplicationId(), feature.getAction(), featureName);
if (config != null) {
return config.getFallbackUrl();
}
return null;
}
public static ProtocolVersionQueryResult getProtocolVersionForNativeDialog(DialogFeature feature) {
String applicationId = FacebookSdk.getApplicationId();
String action = feature.getAction();
return NativeProtocol.getLatestAvailableProtocolVersionForAction(action, getVersionSpecForFeature(applicationId, action, feature));
}
private static int[] getVersionSpecForFeature(String applicationId, String actionName, DialogFeature feature) {
DialogFeatureConfig config = FetchedAppSettings.getDialogFeatureConfig(applicationId, actionName, feature.name());
if (config != null) {
return config.getVersionSpec();
}
return new int[]{feature.getMinVersion()};
}
public static void logDialogActivity(Context context, String eventName, String outcome) {
AppEventsLogger logger = AppEventsLogger.newLogger(context);
Bundle parameters = new Bundle();
parameters.putString(AnalyticsEvents.PARAMETER_DIALOG_OUTCOME, outcome);
logger.logSdkEvent(eventName, null, parameters);
}
}
|
[
"thanhhuu2apc@gmail.com"
] |
thanhhuu2apc@gmail.com
|
544a371bd7fc47b8981ead9a0446742593568922
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2012-05-19/seasar2-2.4.46/s2jdbc-gen/s2jdbc-gen/src/main/java/org/seasar/extension/jdbc/gen/internal/version/wrapper/DdlVersionDirectoryWrapper.java
|
2577d3e2657d1279ed8507d7d060831f3fe6933e
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,717
|
java
|
/*
* Copyright 2004-2012 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.extension.jdbc.gen.internal.version.wrapper;
import org.seasar.extension.jdbc.gen.event.GenDdlListener;
import org.seasar.extension.jdbc.gen.version.DdlVersionDirectory;
import org.seasar.extension.jdbc.gen.version.ManagedFile;
/**
* {@link DdlVersionDirectory}のラッパーです。
*
* @author taedium
*/
public class DdlVersionDirectoryWrapper extends ManagedFileWrapper implements
DdlVersionDirectory {
/**
* インスタンスを構築します。
*
* @param target
* ラップの対象
* @param genDdlListener
* リスナー
* @param currentVersionDir
* 現バージョンに対応するディレクトリ
* @param nextVersionDir
* 次バージョンに対応するディレクトリを
*/
public DdlVersionDirectoryWrapper(DdlVersionDirectory target,
GenDdlListener genDdlListener,
DdlVersionDirectory currentVersionDir,
DdlVersionDirectory nextVersionDir) {
super(target, genDdlListener, currentVersionDir, nextVersionDir);
}
public ManagedFile getCreateDirectory() {
ManagedFile dir = getDirectory().getCreateDirectory();
return new ManagedFileWrapper(this, dir, genDdlListener,
currentVersionDir, nextVersionDir);
}
public ManagedFile getDropDirectory() {
ManagedFile dir = getDirectory().getDropDirectory();
return new ManagedFileWrapper(this, dir, genDdlListener,
currentVersionDir, nextVersionDir);
}
public int getVersionNo() {
return getDirectory().getVersionNo();
}
public boolean isFirstVersion() {
return getDirectory().isFirstVersion();
}
/**
* バージョンディレクトリを返します。
*
* @return バージョンディレクトリ
*/
protected DdlVersionDirectory getDirectory() {
return DdlVersionDirectory.class.cast(target);
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
db548385ad9146df116d55eff20c1769700f0aa5
|
d1674febf65d261128f449da9bfcc5615b825aaf
|
/src/main/java/io/jalaj/application/security/AuthoritiesConstants.java
|
78b3ed16b4eee999150f41a541e730a6f2ac56d4
|
[] |
no_license
|
trustjalaj/SampleApiGatway
|
34e1a22047bcdb2cc6f076c4d163ff01df9ecb2d
|
5bccfe26e8f45633a7a6941f4eb7354a20a1d873
|
refs/heads/master
| 2021-07-04T11:59:09.567939
| 2019-03-29T03:52:43
| 2019-03-29T03:52:43
| 178,328,772
| 0
| 1
| null | 2020-09-18T12:24:28
| 2019-03-29T03:52:35
|
Java
|
UTF-8
|
Java
| false
| false
| 350
|
java
|
package io.jalaj.application.security;
/**
* Constants for Spring Security authorities.
*/
public final class AuthoritiesConstants {
public static final String ADMIN = "ROLE_ADMIN";
public static final String USER = "ROLE_USER";
public static final String ANONYMOUS = "ROLE_ANONYMOUS";
private AuthoritiesConstants() {
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
f01dabebc87091a980f03e41e8e5e90bc69dbe7f
|
128da67f3c15563a41b6adec87f62bf501d98f84
|
/com/emt/proteus/duchampopt/spcfix_1651.java
|
4580843735c6f9edba389be84778f56e117168dc
|
[] |
no_license
|
Creeper20428/PRT-S
|
60ff3bea6455c705457bcfcc30823d22f08340a4
|
4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6
|
refs/heads/master
| 2020-03-26T03:59:25.725508
| 2018-08-12T16:05:47
| 2018-08-12T16:05:47
| 73,244,383
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,545
|
java
|
/* */ package com.emt.proteus.duchampopt;
/* */
/* */ import com.emt.proteus.runtime.api.Env;
/* */ import com.emt.proteus.runtime.api.Frame;
/* */ import com.emt.proteus.runtime.api.Function;
/* */ import com.emt.proteus.runtime.api.ImplementedFunction;
/* */
/* */ public final class spcfix_1651 extends ImplementedFunction
/* */ {
/* */ public static final int FNID = Integer.MAX_VALUE;
/* 11 */ public static final Function _instance = new spcfix_1651();
/* 12 */ public final Function resolve() { return _instance; }
/* */
/* 14 */ public spcfix_1651() { super("spcfix_1651", 4, false); }
/* */
/* */ public int execute(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
/* */ {
/* 18 */ call(paramInt1, paramInt2, paramInt3, paramInt4);
/* 19 */ return 0;
/* */ }
/* */
/* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4)
/* */ {
/* 24 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 25 */ paramInt4 += 2;
/* 26 */ paramInt3--;
/* 27 */ int j = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 28 */ paramInt4 += 2;
/* 29 */ paramInt3--;
/* 30 */ int k = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 31 */ paramInt4 += 2;
/* 32 */ paramInt3--;
/* 33 */ int m = paramFrame.getI32(paramArrayOfInt[paramInt4]);
/* 34 */ paramInt4 += 2;
/* 35 */ paramInt3--;
/* 36 */ call(i, j, k, m);
/* 37 */ return paramInt4;
/* */ }
/* */
/* */
/* */ public static void call(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
/* */ {
/* 43 */ int i = 0;
/* */
/* */
/* */
/* */ try
/* */ {
/* 49 */ if (paramInt3 < 72)
/* */ {
/* 51 */ paramInt1 = 71 - paramInt1;
/* 52 */ i = 0;
/* */
/* */ for (;;)
/* */ {
/* 56 */ com.emt.proteus.runtime.api.MainMemory.setI8(paramInt4 + paramInt2 * 72 + (paramInt3 + i), (byte)0);
/* 57 */ i += 1;
/* 58 */ if (i == paramInt1) {
/* */ break;
/* */ }
/* */ }
/* */ }
/* */ return;
/* */ }
/* */ finally {}
/* */ }
/* */ }
/* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/spcfix_1651.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"kimjoey79@gmail.com"
] |
kimjoey79@gmail.com
|
f9022021eabea20d340846ebc0f9439a943aebac
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/ybonnel_TransportsRennes/TransportsBordeaux/src/fr/ybo/transportsbordeaux/adapters/widget/FavoriAdapterForWidget1.java
|
8d40ef2063ef4fd70c8687c7886bc4872bac6ebb
|
[] |
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
| 3,061
|
java
|
// isComment
package fr.ybo.transportsbordeaux.adapters.widget;
import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import fr.ybo.transportsbordeaux.R;
import fr.ybo.transportscommun.donnees.modele.ArretFavori;
import fr.ybo.transportscommun.util.IconeLigne;
public class isClassOrIsInterface extends BaseAdapter {
private final LayoutInflater isVariable;
private final List<ArretFavori> isVariable;
private Integer isVariable = null;
public ArretFavori isMethod() {
if (isNameExpr == null) {
return null;
}
return isNameExpr.isMethod(isNameExpr);
}
public void isMethod(Integer isParameter) {
this.isFieldAccessExpr = isNameExpr;
}
public isConstructor(Context isParameter, List<ArretFavori> isParameter) {
// isComment
isNameExpr = isNameExpr.isMethod(isNameExpr);
this.isFieldAccessExpr = isNameExpr;
}
public int isMethod() {
return isNameExpr.isMethod();
}
public ArretFavori isMethod(int isParameter) {
return isNameExpr.isMethod(isNameExpr);
}
public long isMethod(int isParameter) {
return isNameExpr;
}
static class isClassOrIsInterface {
ImageView isVariable;
TextView isVariable;
TextView isVariable;
CheckBox isVariable;
}
public View isMethod(final int isParameter, View isParameter, ViewGroup isParameter) {
View isVariable = isNameExpr;
FavoriAdapterForWidget1.ViewHolder isVariable;
if (isNameExpr == null) {
isNameExpr = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, null);
isNameExpr = new FavoriAdapterForWidget1.ViewHolder();
isNameExpr.isFieldAccessExpr = (ImageView) isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr);
isNameExpr.isFieldAccessExpr = (TextView) isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr);
isNameExpr.isFieldAccessExpr = (TextView) isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr);
isNameExpr.isFieldAccessExpr = (CheckBox) isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr);
isNameExpr.isMethod(isNameExpr);
} else {
isNameExpr = (FavoriAdapterForWidget1.ViewHolder) isNameExpr.isMethod();
}
ArretFavori isVariable = isNameExpr.isMethod(isNameExpr);
isNameExpr.isFieldAccessExpr.isMethod(isNameExpr.isFieldAccessExpr);
isNameExpr.isFieldAccessExpr.isMethod(isNameExpr.isFieldAccessExpr);
isNameExpr.isFieldAccessExpr.isMethod(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr));
isNameExpr.isFieldAccessExpr.isMethod(isNameExpr.isMethod(isNameExpr).isMethod(isNameExpr));
return isNameExpr;
}
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
1db178932eac3bed32f15169e5c54705260aa71a
|
3ac0f80d4307f20d883d4e2a5ac231988526cebd
|
/ulewo-common/src/main/java/com/ulewo/mapper/BaseMapper.java
|
32d83ca35739f475976e3bd8935ccfdbe2424736
|
[] |
no_license
|
cjwk/ulewo
|
db6ab3e901051607fcfd98a3f3a81093815a3b4a
|
c6f5512fc91df2688f260b4cfe16fe25d5c73f64
|
refs/heads/master
| 2020-01-23T21:47:37.259050
| 2016-08-12T06:44:28
| 2016-08-12T06:44:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 231
|
java
|
package com.ulewo.mapper;
import java.util.List;
public interface BaseMapper<T,Q> {
public void insert(T t);
public void update(T t);
public List<T> selectList(Q q);
public Integer selectCount(Q q);
}
|
[
"Administrator@windows10.microdone.cn"
] |
Administrator@windows10.microdone.cn
|
8ab636373d0da6a970b80890c0304ef8a3493926
|
79d081703d7516e474be2da97ee6419a5320b6ff
|
/src/everyday/removeDuplicates/Solution2.java
|
787653d4c9c5a893de9e842b5e7bb985fa8d59d0
|
[] |
no_license
|
ITrover/Algorithm
|
e22494ca4c3b2e41907cc606256dcbd1d173886d
|
efa4eecc7e02754078d284269556657814cb167c
|
refs/heads/master
| 2022-05-26T01:48:28.956693
| 2022-04-01T11:58:24
| 2022-04-01T11:58:24
| 226,656,770
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 661
|
java
|
package everyday.removeDuplicates;
/**
* @author itrover
* 1047. 删除字符串中的所有相邻重复项 https://leetcode-cn.com/problems/remove-all-adjacent-duplicates-in-string
* 栈
*/
class Solution2 {
public String removeDuplicates(String S) {
StringBuilder stack = new StringBuilder();
int top = -1;
for (int i = 0; i < S.length(); i++) {
if (top >= 0 && stack.charAt(top) == S.charAt(i)) {
stack.deleteCharAt(top);
top--;
} else {
stack.append(S.charAt(i));
top++;
}
}
return stack.toString();
}
}
|
[
"1172610139@qq.com"
] |
1172610139@qq.com
|
34df564e95b887307fa9b511d00c1ee76e20f1dc
|
124df74bce796598d224c4380c60c8e95756f761
|
/hydro/ohd.rax_apps/src/ohd/hseb/raxbase/util/CursorController.java
|
75a382f0c12fea04044953bcc8549aa5ca0727e5
|
[] |
no_license
|
Mapoet/AWIPS-Test
|
19059bbd401573950995c8cc442ddd45588e6c9f
|
43c5a7cc360b3cbec2ae94cb58594fe247253621
|
refs/heads/master
| 2020-04-17T03:35:57.762513
| 2017-02-06T17:17:58
| 2017-02-06T17:17:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,019
|
java
|
package ohd.hseb.raxbase.util;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public final class CursorController
{
public final static Cursor busyCursor = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
public final static Cursor defaultCursor = Cursor.getDefaultCursor();
private CursorController(){}
public static ActionListener createListener( final Component component, final ActionListener mainActionListener)
{
ActionListener actionListener = new ActionListener()
{
public void actionPerformed(ActionEvent ae)
{
try
{
component.setCursor(busyCursor);
mainActionListener.actionPerformed(ae);
}
finally
{
component.setCursor(defaultCursor);
}
}
};
return actionListener;
}
}
|
[
"joshua.t.love@saic.com"
] |
joshua.t.love@saic.com
|
75e032e03b846b43ef4cc80083c5be553937983d
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/plugin/sns/ui/widget/b.java
|
fcdc4f3f11113db0ae58742f0542eae58fd9c85b
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,348
|
java
|
package com.tencent.mm.plugin.sns.ui.widget;
import android.content.Context;
import android.content.res.Resources;
import android.text.TextUtils.TruncateAt;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.WindowManager;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ah;
public final class b
{
private static b rMR;
private com.tencent.mm.kiss.widget.textview.a.a rMO = null;
private int rMP = 0;
static
{
AppMethodBeat.i(40478);
rMR = new b();
AppMethodBeat.o(40478);
}
public static b cvx()
{
return rMR;
}
public final com.tencent.mm.kiss.widget.textview.a.a getTextViewConfig()
{
AppMethodBeat.i(40476);
int i = com.tencent.mm.bz.a.fromDPToPix(ah.getContext(), (int)(15.0F * com.tencent.mm.bz.a.dm(ah.getContext())));
if ((this.rMO == null) || ((int)this.rMO.eOg != i))
this.rMO = com.tencent.mm.kiss.widget.textview.a.b.ST().ad(i).jV(ah.getContext().getResources().getColor(2131690474)).jU(16).a(TextUtils.TruncateAt.END).eNR;
com.tencent.mm.kiss.widget.textview.a.a locala = this.rMO;
AppMethodBeat.o(40476);
return locala;
}
public final int getViewWidth()
{
AppMethodBeat.i(40477);
if (this.rMP <= 0)
{
DisplayMetrics localDisplayMetrics = new DisplayMetrics();
((WindowManager)ah.getContext().getSystemService("window")).getDefaultDisplay().getMetrics(localDisplayMetrics);
int i = localDisplayMetrics.widthPixels;
int j = (int)(ah.getResources().getDimension(2131427812) + ah.getResources().getDimension(2131427812));
int k = (int)ah.getResources().getDimension(2131428676);
m = (int)ah.getResources().getDimension(2131427812);
this.rMP = (i - k - j - m);
ab.i("MicroMsg.SnsCommentPreloadTextViewConfig", "screenWidth " + i + " textViewWidth " + this.rMP + " padding: " + j + " marginLeft: " + k + " thisviewPadding: " + m);
}
int m = this.rMP;
AppMethodBeat.o(40477);
return m;
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes6-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.sns.ui.widget.b
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
bce743addd42fbc313b4b74a6593e375d9023e78
|
fcfcfccc2db5cc08c2e634c0bdd055fe1fd2699c
|
/entity/pyx-entity-tests/src/test/java/com/pyx4j/entity/test/shared/domain/format/StringCollectionItem.java
|
3765b27eb53a4598639b1c61faf8d1d4e0315334
|
[] |
no_license
|
michaellif/pyx4j
|
45ae006e8785e5a245a619ad9b43d5c9946a86d4
|
cc8699d5d70ba618ec812b963e338d4bbe39df20
|
refs/heads/master
| 2020-03-26T06:10:36.655951
| 2016-04-29T05:25:25
| 2016-04-29T05:25:25
| 144,593,106
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 949
|
java
|
/*
* Pyx4j framework
* Copyright (C) 2008-2015 pyx4j.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.
*
* Created on Dec 14, 2015
* @author vlads
*/
package com.pyx4j.entity.test.shared.domain.format;
import com.pyx4j.entity.annotations.ToString;
import com.pyx4j.entity.core.IEntity;
import com.pyx4j.entity.core.IPrimitive;
public interface StringCollectionItem extends IEntity {
@ToString
IPrimitive<String> name();
}
|
[
"vlads@propertyvista.com"
] |
vlads@propertyvista.com
|
fad32ad4f311474c400de33d125e24b2598f69a7
|
b511684052910867af4c32068042b5c7a9d92908
|
/LBS_2019-master/project/Idea1/racedetect-src/src/racedetect/cz/vutbr/fit/racedetector/RDVariable.java
|
611d23e40029f58fa64206457af2abe047722115
|
[] |
no_license
|
hchuphal/Chalmers_GU
|
5e000e8346e669754a1ae675a65b04d5daa81645
|
68831e266a599fd429dbdf254f9ace7ce0a0c30a
|
refs/heads/master
| 2023-01-19T14:29:20.006127
| 2019-12-01T00:00:53
| 2019-12-01T00:00:53
| 225,082,667
| 1
| 0
| null | 2023-01-09T12:05:50
| 2019-11-30T23:29:22
|
Java
|
UTF-8
|
Java
| false
| false
| 2,554
|
java
|
package cz.vutbr.fit.racedetector;
import java.util.concurrent.atomic.*;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.Semaphore;
import java.lang.ref.WeakReference;
/**
* This class is used for keeping information about program variable.
*
*
* @author Zdenek
*
*/
/*
* SYNCHRONIZATION - inner state is given by: status, raceDetected, owner
* suggestedLocks, candidateLocks
*
* synchronization is done by right locking
*/
abstract public class RDVariable {
/* ---------------------------------------------------------- */
/*
* race detection flag - true means that Race over this variable has been
* detected
*/
/* guardedBy statusLock */
protected volatile boolean raceDetected = false;
/*
* omit flag - mark variable as do not analyse it
*/
/* guardedBy statusLock */
protected volatile boolean varOmited = false;
/*
* noise flag - mark variable as the one to cause a race on
*/
/* guardedBy statusLock */
protected volatile boolean varNoiseInject = false;
/* Healing ------------------------------------------------------- */
/* temporary lock for healing purpose */
public ReentrantLock raceAvoidLock = null;
/* temporary lock for healing purpose */
public Semaphore raceAvoidSemaphore = null;
/*
* thread which performs healing operation over this variable - 0 = nobody
* is healing
*/
/* guardedBy Atomic operations in HealingOT* */
public AtomicInteger healedByThreads = null;
/**
* Which variable is in the atomicity section.
*/
public final String varName;
/**
* Reference to a target program object. This weak reference is used for
* object identification - e.g. for human readable warnings.
*
*/
public final WeakReference<Object> instance;
/**
* Constructor
*
*/
RDVariable(Object inst, String name) {
instance = new WeakReference<Object>(inst);
varName = name;
}
/**
* Turn the healing on.
*/
public synchronized void prepareHealing() {
// prepare healing
if (RaceDetector.HEALING_METHOD == RaceDetector.HealingMethod.NEWMUTEX){
if (raceAvoidLock == null)
raceAvoidLock = new ReentrantLock();
}
if (RaceDetector.HEALING_METHOD == RaceDetector.HealingMethod.SEMAPHORE){
if (raceAvoidSemaphore == null)
raceAvoidSemaphore = new Semaphore(1);
}
if ((RaceDetector.HEALING_METHOD == RaceDetector.HealingMethod.OTYIELD) ||
(RaceDetector.HEALING_METHOD == RaceDetector.HealingMethod.OTWAIT)){
if (healedByThreads == null)
healedByThreads = new AtomicInteger(0);
}
}
}
|
[
"himanshu.chuphal07@gmail.com"
] |
himanshu.chuphal07@gmail.com
|
3524aeb1fc2e7951d8f3638e05b7eb36d1f6e452
|
e49bef1b36c879b1f0366cb80ab5a3ae745aabd3
|
/sources/androidx/core/graphics/TypefaceCompatApi24Impl.java
|
2d419cea223f7eaa25b5b9df17b947e39d6e83ac
|
[] |
no_license
|
mathias-mike/EplStars
|
2e154f6ac0bee3cd1c9bafd7e6ce9bd47ce9bf67
|
7c7b86b6c892d974567f62c92793e76edd0d09d7
|
refs/heads/master
| 2023-07-23T11:16:33.160876
| 2021-09-02T10:07:51
| 2021-09-02T10:07:51
| 124,019,552
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,528
|
java
|
package androidx.core.graphics;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.CancellationSignal;
import android.util.Log;
import androidx.collection.SimpleArrayMap;
import androidx.core.content.res.FontResourcesParserCompat;
import androidx.core.provider.FontsContractCompat;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import java.util.List;
class TypefaceCompatApi24Impl extends TypefaceCompatBaseImpl {
private static final String ADD_FONT_WEIGHT_STYLE_METHOD = "addFontWeightStyle";
private static final String CREATE_FROM_FAMILIES_WITH_DEFAULT_METHOD = "createFromFamiliesWithDefault";
private static final String FONT_FAMILY_CLASS = "android.graphics.FontFamily";
private static final String TAG = "TypefaceCompatApi24Impl";
private static final Method sAddFontWeightStyle;
private static final Method sCreateFromFamiliesWithDefault;
private static final Class<?> sFontFamily;
private static final Constructor<?> sFontFamilyCtor;
TypefaceCompatApi24Impl() {
}
static {
Method addFontMethod;
Constructor<?> fontFamilyCtor;
Method createFromFamiliesWithDefaultMethod;
Class<?> fontFamilyClass;
try {
fontFamilyClass = Class.forName(FONT_FAMILY_CLASS);
fontFamilyCtor = fontFamilyClass.getConstructor(new Class[0]);
addFontMethod = fontFamilyClass.getMethod(ADD_FONT_WEIGHT_STYLE_METHOD, new Class[]{ByteBuffer.class, Integer.TYPE, List.class, Integer.TYPE, Boolean.TYPE});
createFromFamiliesWithDefaultMethod = Typeface.class.getMethod(CREATE_FROM_FAMILIES_WITH_DEFAULT_METHOD, new Class[]{Array.newInstance(fontFamilyClass, 1).getClass()});
} catch (ClassNotFoundException | NoSuchMethodException e) {
Log.e(TAG, e.getClass().getName(), e);
fontFamilyCtor = null;
addFontMethod = null;
fontFamilyClass = null;
createFromFamiliesWithDefaultMethod = null;
}
sFontFamilyCtor = fontFamilyCtor;
sFontFamily = fontFamilyClass;
sAddFontWeightStyle = addFontMethod;
sCreateFromFamiliesWithDefault = createFromFamiliesWithDefaultMethod;
}
public static boolean isUsable() {
if (sAddFontWeightStyle == null) {
Log.w(TAG, "Unable to collect necessary private methods.Fallback to legacy implementation.");
}
return sAddFontWeightStyle != null;
}
private static Object newFamily() {
try {
return sFontFamilyCtor.newInstance(new Object[0]);
} catch (IllegalAccessException | InstantiationException | InvocationTargetException e) {
return null;
}
}
private static boolean addFontWeightStyle(Object family, ByteBuffer buffer, int ttcIndex, int weight, boolean style) {
try {
return ((Boolean) sAddFontWeightStyle.invoke(family, new Object[]{buffer, Integer.valueOf(ttcIndex), null, Integer.valueOf(weight), Boolean.valueOf(style)})).booleanValue();
} catch (IllegalAccessException | InvocationTargetException e) {
return false;
}
}
private static Typeface createFromFamiliesWithDefault(Object family) {
try {
Object familyArray = Array.newInstance(sFontFamily, 1);
Array.set(familyArray, 0, family);
return (Typeface) sCreateFromFamiliesWithDefault.invoke((Object) null, new Object[]{familyArray});
} catch (IllegalAccessException | InvocationTargetException e) {
return null;
}
}
public Typeface createFromFontInfo(Context context, CancellationSignal cancellationSignal, FontsContractCompat.FontInfo[] fonts, int style) {
Object family = newFamily();
if (family == null) {
return null;
}
SimpleArrayMap<Uri, ByteBuffer> bufferCache = new SimpleArrayMap<>();
for (FontsContractCompat.FontInfo font : fonts) {
Uri uri = font.getUri();
ByteBuffer buffer = bufferCache.get(uri);
if (buffer == null) {
buffer = TypefaceCompatUtil.mmap(context, cancellationSignal, uri);
bufferCache.put(uri, buffer);
}
if (buffer == null || !addFontWeightStyle(family, buffer, font.getTtcIndex(), font.getWeight(), font.isItalic())) {
return null;
}
}
Typeface typeface = createFromFamiliesWithDefault(family);
if (typeface == null) {
return null;
}
return Typeface.create(typeface, style);
}
public Typeface createFromFontFamilyFilesResourceEntry(Context context, FontResourcesParserCompat.FontFamilyFilesResourceEntry entry, Resources resources, int style) {
Object family = newFamily();
if (family == null) {
return null;
}
for (FontResourcesParserCompat.FontFileResourceEntry e : entry.getEntries()) {
ByteBuffer buffer = TypefaceCompatUtil.copyToDirectBuffer(context, resources, e.getResourceId());
if (buffer == null || !addFontWeightStyle(family, buffer, e.getTtcIndex(), e.getWeight(), e.isItalic())) {
return null;
}
}
return createFromFamiliesWithDefault(family);
}
}
|
[
"leesanmoj@gmail.com"
] |
leesanmoj@gmail.com
|
8c1190fb6ba353480099fde04a8768dbfc50e0c3
|
f140118cd3f1b4a79159154087e7896960ca0c88
|
/core/target/java/org/apache/spark/storage/DiskBlockManagerSuite.java
|
2103456ccb2da766a84830a3e2a9567493a6b329
|
[] |
no_license
|
loisZ/miaomiaomiao
|
d45dc779355e2280fe6f505d959b5e5c475f9b9c
|
6236255e4062d1788d7a212fa49af1849965f22c
|
refs/heads/master
| 2021-08-24T09:22:41.648169
| 2017-12-09T00:56:41
| 2017-12-09T00:56:41
| 111,349,685
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,097
|
java
|
package org.apache.spark.storage;
public class DiskBlockManagerSuite extends org.scalatest.FunSuite implements org.scalatest.BeforeAndAfterEach, org.scalatest.BeforeAndAfterAll {
public DiskBlockManagerSuite () { throw new RuntimeException(); }
private org.apache.spark.SparkConf testConf () { throw new RuntimeException(); }
private java.io.File rootDir0 () { throw new RuntimeException(); }
private java.io.File rootDir1 () { throw new RuntimeException(); }
private java.lang.String rootDirs () { throw new RuntimeException(); }
public org.apache.spark.storage.BlockManager blockManager () { throw new RuntimeException(); }
public org.apache.spark.storage.DiskBlockManager diskBlockManager () { throw new RuntimeException(); }
public void beforeAll () { throw new RuntimeException(); }
public void afterAll () { throw new RuntimeException(); }
public void beforeEach () { throw new RuntimeException(); }
public void afterEach () { throw new RuntimeException(); }
public void writeToFile (java.io.File file, int numBytes) { throw new RuntimeException(); }
}
|
[
"283802073@qq.com"
] |
283802073@qq.com
|
cc9fa210e5e6afe0b0a5d052e3a95fac32b44ed8
|
3542fea39a504b964e3fc67f71165f84fcb2c684
|
/src/main/java/com/wishhust/lock/Test.java
|
089c305f3136c354b3ed1b05e0eff2234f3ff72a
|
[] |
no_license
|
pallcard/learn-java
|
af73d539dbfdf1f718c7c0c4833ebd031765e138
|
6b3e7e2d26ce779a7bdcf3240ee7ae53cb764adf
|
refs/heads/master
| 2022-06-25T04:34:32.942927
| 2020-08-26T15:02:09
| 2020-08-26T15:02:09
| 228,840,443
| 0
| 0
| null | 2022-06-17T02:48:09
| 2019-12-18T12:57:14
|
Java
|
UTF-8
|
Java
| false
| false
| 343
|
java
|
package com.wishhust.lock;
import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
/**
* Created by liuke on 2020/1/10 14:46
*/
public class Test {
public static void main(String[] args) {
FutureTask<String> stringFutureTask = new FutureTask<>(() -> "hello");
new Thread(stringFutureTask).start();
}
}
|
[
"18162327131@163.com"
] |
18162327131@163.com
|
31e7a68f163200e82c679f8df2e5efa5792e5080
|
8a787e93fea9c334122441717f15bd2f772e3843
|
/odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/text/TextModificationTimeElement.java
|
328ade9a2c83bf3593fcbd0afe756a3f92b53201
|
[
"BSD-3-Clause",
"MIT",
"W3C",
"LicenseRef-scancode-proprietary-license",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
apache/odftoolkit
|
296ea9335bfdd78aa94829c915a6e9c24e5b5166
|
99975f3be40fc1c428167a3db7a9a63038acfa9f
|
refs/heads/trunk
| 2023-07-02T16:30:24.946067
| 2018-10-02T11:11:40
| 2018-10-02T11:11:40
| 5,212,656
| 39
| 45
|
Apache-2.0
| 2018-04-11T11:57:17
| 2012-07-28T07:00:12
|
Java
|
UTF-8
|
Java
| false
| false
| 5,779
|
java
|
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
*
* Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
*
* Use is subject to license terms.
*
* 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. You can also
* obtain a copy of the License at http://odftoolkit.org/docs/license.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*
************************************************************************/
/*
* This file is automatically generated.
* Don't edit manually.
*/
package org.odftoolkit.odfdom.dom.element.text;
import org.odftoolkit.odfdom.pkg.OdfElement;
import org.odftoolkit.odfdom.pkg.ElementVisitor;
import org.odftoolkit.odfdom.pkg.OdfFileDom;
import org.odftoolkit.odfdom.pkg.OdfName;
import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
import org.odftoolkit.odfdom.dom.DefaultElementVisitor;
import org.odftoolkit.odfdom.dom.attribute.style.StyleDataStyleNameAttribute;
import org.odftoolkit.odfdom.dom.attribute.text.TextFixedAttribute;
import org.odftoolkit.odfdom.dom.attribute.text.TextTimeValueAttribute;
/**
* DOM implementation of OpenDocument element {@odf.element text:modification-time}.
*
*/
public class TextModificationTimeElement extends OdfElement {
public static final OdfName ELEMENT_NAME = OdfName.newName(OdfDocumentNamespace.TEXT, "modification-time");
/**
* Create the instance of <code>TextModificationTimeElement</code>
*
* @param ownerDoc The type is <code>OdfFileDom</code>
*/
public TextModificationTimeElement(OdfFileDom ownerDoc) {
super(ownerDoc, ELEMENT_NAME);
}
/**
* Get the element name
*
* @return return <code>OdfName</code> the name of element {@odf.element text:modification-time}.
*/
public OdfName getOdfName() {
return ELEMENT_NAME;
}
/**
* Receives the value of the ODFDOM attribute representation <code>StyleDataStyleNameAttribute</code> , See {@odf.attribute style:data-style-name}
*
* @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
*/
public String getStyleDataStyleNameAttribute() {
StyleDataStyleNameAttribute attr = (StyleDataStyleNameAttribute) getOdfAttribute(OdfDocumentNamespace.STYLE, "data-style-name");
if (attr != null) {
return String.valueOf(attr.getValue());
}
return null;
}
/**
* Sets the value of ODFDOM attribute representation <code>StyleDataStyleNameAttribute</code> , See {@odf.attribute style:data-style-name}
*
* @param styleDataStyleNameValue The type is <code>String</code>
*/
public void setStyleDataStyleNameAttribute(String styleDataStyleNameValue) {
StyleDataStyleNameAttribute attr = new StyleDataStyleNameAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(styleDataStyleNameValue);
}
/**
* Receives the value of the ODFDOM attribute representation <code>TextFixedAttribute</code> , See {@odf.attribute text:fixed}
*
* @return - the <code>Boolean</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
*/
public Boolean getTextFixedAttribute() {
TextFixedAttribute attr = (TextFixedAttribute) getOdfAttribute(OdfDocumentNamespace.TEXT, "fixed");
if (attr != null) {
return Boolean.valueOf(attr.booleanValue());
}
return null;
}
/**
* Sets the value of ODFDOM attribute representation <code>TextFixedAttribute</code> , See {@odf.attribute text:fixed}
*
* @param textFixedValue The type is <code>Boolean</code>
*/
public void setTextFixedAttribute(Boolean textFixedValue) {
TextFixedAttribute attr = new TextFixedAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setBooleanValue(textFixedValue.booleanValue());
}
/**
* Receives the value of the ODFDOM attribute representation <code>TextTimeValueAttribute</code> , See {@odf.attribute text:time-value}
*
* @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
*/
public String getTextTimeValueAttribute() {
TextTimeValueAttribute attr = (TextTimeValueAttribute) getOdfAttribute(OdfDocumentNamespace.TEXT, "time-value");
if (attr != null) {
return String.valueOf(attr.getValue());
}
return null;
}
/**
* Sets the value of ODFDOM attribute representation <code>TextTimeValueAttribute</code> , See {@odf.attribute text:time-value}
*
* @param textTimeValueValue The type is <code>String</code>
*/
public void setTextTimeValueAttribute(String textTimeValueValue) {
TextTimeValueAttribute attr = new TextTimeValueAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(textTimeValueValue);
}
@Override
public void accept(ElementVisitor visitor) {
if (visitor instanceof DefaultElementVisitor) {
DefaultElementVisitor defaultVisitor = (DefaultElementVisitor) visitor;
defaultVisitor.visit(this);
} else {
visitor.visit(this);
}
}
/**
* Add text content. Only elements which are allowed to have text content offer this method.
*/
public void newTextNode(String content) {
if (content != null && !content.equals("")) {
this.appendChild(this.getOwnerDocument().createTextNode(content));
}
}
}
|
[
"dev-null@apache.org"
] |
dev-null@apache.org
|
62d4b9bde245870617677dfc1a03149821a1633b
|
34182a13cd6291fc4657546e196c6447553b5eb0
|
/corejava/corejava_1/src/main/java/com/xubh02/first/TestDataType.java
|
ccba998f124681096b044851b646e5367a4672fc
|
[] |
no_license
|
786991884/sxnd-study
|
9bf3d417879680f94b012867ef71ba880a19e4fc
|
8c1f8e8823c077f095dc4be0c89522b6f0eb1457
|
refs/heads/master
| 2021-01-12T08:49:59.493518
| 2018-04-03T09:17:54
| 2018-04-03T09:17:54
| 76,701,131
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 822
|
java
|
package com.xubh02.first;
//测试整数类型:byte,short,int,long。以及进制之间的转换问题
public class TestDataType {
public static void main(String[] args) {
int a = 10;
int a2 = 010;
int a3 = 0xf;
// byte b = 200;
// System.out.println(b);
System.out.println(a);
System.out.println(a2);
System.out.println(a3);
System.out.println(Integer.toBinaryString(a));
System.out.println(Integer.toOctalString(a));
System.out.println(Integer.toHexString(a));
int a5 = 10;
long a6 = 200;
byte b2 = 100; //如果数据的大小没有超过byte/short/char的表述范围,则可以自动转型。
long a7 = 11123213232L;
long l = 3;
long l2 = l + 3; //L问题
}
}
|
[
"786991884@qq.com"
] |
786991884@qq.com
|
de1fca3c54ca42ea25f70840eb142a9ae9af22f4
|
3be62916b8378daf715846691265ca1d425ebb82
|
/src/us/parr/bookish/model/SubSubSection.java
|
c159038927ef9a473288faedd1e8a1f93abeec12
|
[
"MIT"
] |
permissive
|
pythonpeixun/bookish
|
1e86c430428cacd216f9f880d22731a86fb45e55
|
4acca1256187e6aa045b5a8aea9df77fc76cd0fb
|
refs/heads/master
| 2020-03-13T21:44:00.987050
| 2018-04-16T00:17:20
| 2018-04-16T00:17:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 551
|
java
|
package us.parr.bookish.model;
import us.parr.bookish.model.entity.EntityDef;
import java.util.List;
public class SubSubSection extends SubSection {
public SubSubSection(EntityDef def,
String title,
String anchor,
List<OutputModelObject> elements)
{
super(def, title, anchor, elements, null);
}
@Override
public String getAnchor() {
if ( anchor!=null ) return anchor;
return "sec"+
parent.parent.sectionNumber+"."+
parent.sectionNumber+"."+
sectionNumber;
}
}
|
[
"parrt@cs.usfca.edu"
] |
parrt@cs.usfca.edu
|
3d381866c319a09e3c1a00945a73058c246a6b1b
|
fb41c04a4ead3b79625d0eb30ca85f0fd1c2d4c9
|
/main/boofcv-recognition/src/main/java/boofcv/factory/fiducial/ConfigHammingChessboard.java
|
21a561e3d4c6531e5263da6e6657c81f47b234c6
|
[
"Apache-2.0",
"LicenseRef-scancode-takuya-ooura"
] |
permissive
|
thhart/BoofCV
|
899dcf1b4302bb9464520c36a9e54c6fe35969c7
|
43f25488673dc27590544330323c676f61c1a17a
|
refs/heads/SNAPSHOT
| 2023-08-18T10:19:50.269999
| 2023-07-15T23:13:25
| 2023-07-15T23:13:25
| 90,468,259
| 0
| 0
|
Apache-2.0
| 2018-10-26T08:47:44
| 2017-05-06T14:24:01
|
Java
|
UTF-8
|
Java
| false
| false
| 3,197
|
java
|
/*
* Copyright (c) 2021, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.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 boofcv.factory.fiducial;
import boofcv.misc.BoofMiscOps;
import boofcv.struct.Configuration;
/**
* Defines the calibration pattern based on {@link ConfigHammingMarker hamming checkerboard fiducials} where square
* markers are embedded inside a chessboard/checkerboard pattern. Calibration features come from the inner chessboard
* pattern. Charuco is a member of this family.
*
* @author Peter Abeles
*/
public class ConfigHammingChessboard implements Configuration {
/** Number of squares tall the grid is */
public int numRows = -1;
/** Number of squares wide the grid is */
public int numCols = -1;
/** The first marker will have this ID */
public int markerOffset = 0;
/** Describes the markers are drawn inside the chessboard pattern */
public ConfigHammingMarker markers;
/** How much smaller the marker is relative to the chessboard squares */
public double markerScale = 0.7;
/** Size of a square in document units */
public double squareSize = 1.0;
/** If an even pattern then the top-left will always be a black square */
public boolean chessboardEven = true;
public ConfigHammingChessboard( ConfigHammingMarker markers ) {
this.markers = markers;
}
public ConfigHammingChessboard() {
markers = ConfigHammingMarker.loadDictionary(HammingDictionary.ARUCO_MIP_25h7);
}
@Override public void checkValidity() {
BoofMiscOps.checkTrue(numRows > 0);
BoofMiscOps.checkTrue(numCols > 0);
BoofMiscOps.checkTrue(markerOffset >= 0);
markers.checkValidity();
BoofMiscOps.checkTrue(markerScale > 0);
BoofMiscOps.checkTrue(squareSize > 0);
}
public ConfigHammingChessboard setTo( ConfigHammingChessboard src ) {
this.numRows = src.numRows;
this.numCols = src.numCols;
this.markerOffset = src.markerOffset;
this.markers.setTo(src.markers);
this.markerScale = src.markerScale;
this.squareSize = src.squareSize;
this.chessboardEven = src.chessboardEven;
return this;
}
public double getMarkerWidth() {
return squareSize*numCols;
}
public double getMarkerHeight() {
return squareSize*numRows;
}
/**
* Create from a pre-defined dictionary
*/
public static ConfigHammingChessboard create( HammingDictionary dictionary,
int rows, int cols, double squareSize ) {
ConfigHammingMarker configDictionary = ConfigHammingMarker.loadDictionary(dictionary);
var config = new ConfigHammingChessboard(configDictionary);
config.numRows = rows;
config.numCols = cols;
config.squareSize = squareSize;
return config;
}
}
|
[
"peter.abeles@gmail.com"
] |
peter.abeles@gmail.com
|
9641a20ff261c7bece156a09569534223f7a4725
|
028cbe18b4e5c347f664c592cbc7f56729b74060
|
/v2/servlet-api/src/jakarta-servletapi-5/jsr154/src/share/javax/servlet/SingleThreadModel.java
|
0bd0087499478ca55343415283d44273d007c3f1
|
[
"Apache-2.0"
] |
permissive
|
dmatej/Glassfish-SVN-Patched
|
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
|
269e29ba90db6d9c38271f7acd2affcacf2416f1
|
refs/heads/master
| 2021-05-28T12:55:06.267463
| 2014-11-11T04:21:44
| 2014-11-11T04:21:44
| 23,610,469
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,227
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
*
* Portions Copyright Apache Software Foundation.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can obtain
* a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
* or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
* Sun designates this particular file as subject to the "Classpath" exception
* as provided by Sun in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the License
* Header, with the fields enclosed by brackets [] replaced by your own
* identifying information: "Portions Copyrighted [year]
* [name of copyright owner]"
*
* Contributor(s):
*
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package javax.servlet;
/**
* Ensures that servlets handle
* only one request at a time. This interface has no methods.
*
* <p>If a servlet implements this interface, you are <i>guaranteed</i>
* that no two threads will execute concurrently in the
* servlet's <code>service</code> method. The servlet container
* can make this guarantee by synchronizing access to a single
* instance of the servlet, or by maintaining a pool of servlet
* instances and dispatching each new request to a free servlet.
*
* <p>Note that SingleThreadModel does not solve all thread safety
* issues. For example, session attributes and static variables can
* still be accessed by multiple requests on multiple threads
* at the same time, even when SingleThreadModel servlets are used.
* It is recommended that a developer take other means to resolve
* those issues instead of implementing this interface, such as
* avoiding the usage of an instance variable or synchronizing
* the block of the code accessing those resources.
* This interface is deprecated in Servlet API version 2.4.
*
*
* @author Various
*
* @deprecated As of Java Servlet API 2.4, with no direct
* replacement.
*/
public interface SingleThreadModel {
}
|
[
"kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] |
kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
|
a4ee0ea2476f4135ef07ef0bf3badf141baf5a71
|
74a53525e0cdad6b2f2f30ed6eb5ad56842b5292
|
/app/src/main/java/org/aswing/flyfish/awml/ComDefinition.java
|
772f6bc736474f2a780536b2d2fa8706af79e758
|
[] |
no_license
|
Leoxinghai/Citiville
|
28ed8b29323ebe124b581f6fa73dea491abbe01f
|
e788cef3c52d5ff8bbd38155573533c7c06c4475
|
refs/heads/master
| 2021-01-18T17:27:02.763391
| 2017-03-31T09:19:12
| 2017-03-31T09:19:12
| 86,801,515
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,712
|
java
|
package org.aswing.flyfish.awml;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.Display;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.Window;
import android.view.WindowManager;
import android.graphics.*;
import com.xiyu.util.Array;
import com.xiyu.util.Dictionary;
import org.aswing.*;
public class ComDefinition extends AbsAggDefinition
{
private boolean container ;
public ComDefinition (Object param1 ,ComDefinition param2 )
{
super(param1, param2);
AbsAggDefinition _loc_3 =this ;
while (_loc_3 != null)
{
if (_loc_3.getClass() == Container)
{
this.container = true;
break;
}
_loc_3 = _loc_3.getSuperDefinition();
}
return;
}//end
public boolean isContainer ()
{
return this.container;
}//end
public String toString ()
{
return "ComDefintion.get(name:" + getName() + ")";
}//end
}
|
[
"leoxinghai@hotmail.com"
] |
leoxinghai@hotmail.com
|
6267ee24d88dbd18275130d0952b0c4bcd44026b
|
85e1a5259fc6501ffb53b691e8a7891762727e56
|
/SNDBLibrary/src/main/java/com/sn/db/utils/DatabaseUtil.java
|
b7ed741c404dfb0d96a685c79ac85f63700d3877
|
[] |
no_license
|
sengeiou/New_And_WellGo
|
32f30c509c03868bb9e5469811a7e9861ced90c1
|
80791b64d3127de5a0acc847f18b46462859028e
|
refs/heads/master
| 2023-08-16T22:11:04.393563
| 2021-10-11T18:26:42
| 2021-10-11T18:26:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,503
|
java
|
package com.sn.db.utils;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import com.j256.ormlite.support.ConnectionSource;
import com.j256.ormlite.table.DatabaseTable;
import com.j256.ormlite.table.TableUtils;
import java.util.Arrays;
/**
* 作者:东芝(2018/2/27).
* 功能:数据库
*/
public class DatabaseUtil {
/**
* 数据库表操作类型
*/
public enum TYPE {
/**
* 表新增字段
*/
FIELD_ADD,
/**
* 表删除字段
*/
FIELD_DELETE,
/**
* 删除重新创建
*/
TABLE_DELETE_AND_RECREATE
}
/**
* 升级表,增加字段
*
* @param db
* @param clazz
*/
public static <T> void upgradeTable(SQLiteDatabase db, ConnectionSource cs, Class<T> clazz, TYPE type) {
if (type == TYPE.TABLE_DELETE_AND_RECREATE) {
try {
TableUtils.dropTable(cs, clazz, true);
TableUtils.createTable(cs, clazz);
} catch (Exception e) {
e.printStackTrace();
}
return;
}
String tableName = extractTableName(clazz);
db.beginTransaction();
try {
//Rename table
String tempTableName = tableName + "_temp";
String sql = "ALTER TABLE " + tableName + " RENAME TO " + tempTableName;
//ALTER TABLE DeviceConfigBean RENAME TO DeviceConfigBean_temp
db.execSQL(sql);
//Create table
// try {
// sql = TableUtils.getCreateTableStatements(cs, clazz).get(0);
// db.execSQL(sql);
// } catch (Exception e) {
// e.printStackTrace();
TableUtils.createTable(cs, clazz);
// }
//Load data
String columns;
if (type == TYPE.FIELD_ADD) {
columns = Arrays.toString(getColumnNames(db, tempTableName)).replace("[", "").replace("]", "");
} else if (type == TYPE.FIELD_DELETE) {
columns = Arrays.toString(getColumnNames(db, tableName)).replace("[", "").replace("]", "");
} else {
throw new IllegalArgumentException("OPERATION_TYPE error");
}
sql = "INSERT INTO " + tableName +
" (" + columns + ") " +
" SELECT " + columns + " FROM " + tempTableName;
db.execSQL(sql);
//Drop temp table
sql = "DROP TABLE IF EXISTS " + tempTableName;
db.execSQL(sql);
db.setTransactionSuccessful();
} catch (Exception e) {
e.printStackTrace();
} finally {
db.endTransaction();
}
}
/**
* 获取表名(ormlite DatabaseTableConfig.java)
*
* @param clazz
* @param <T>
* @return
*/
private static <T> String extractTableName(Class<T> clazz) {
DatabaseTable databaseTable = clazz.getAnnotation(DatabaseTable.class);
String name = null;
if (databaseTable != null && databaseTable.tableName().length() > 0) {
name = databaseTable.tableName();
}
if (name == null) {
// if the name isn't specified, it is the class name lowercased
name = clazz.getSimpleName().toLowerCase();
}
return name;
}
/**
* 获取表的列名
*
* @param db
* @param tableName
* @return
*/
private static String[] getColumnNames(SQLiteDatabase db, String tableName) {
String[] columnNames = null;
Cursor cursor = null;
try {
cursor = db.rawQuery("PRAGMA table_info(" + tableName + ")", null);
if (cursor != null) {
int columnIndex = cursor.getColumnIndex("name");
if (columnIndex == -1) {
return null;
}
int index = 0;
columnNames = new String[cursor.getCount()];
for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
columnNames[index] = cursor.getString(columnIndex);
index++;
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
if (cursor != null) {
cursor.close();
}
}
return columnNames;
}
}
|
[
"758378737@qq.com"
] |
758378737@qq.com
|
5994cc92408d0bbbc33d562dac765d97cfd04e0a
|
be25b2c018dbacd8147a8fbfbc66f257b050ea1f
|
/languages/languageDesign/generator/test/inputLang/source_gen/jetbrains/mps/transformation/test/inputLang/behavior/InputRootWithStatementList_BehaviorDescriptor.java
|
5e1a135984b8fa8c0f132097b2c38ae9e2ac45ae
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
blutkind/MPS
|
f5bef8c27c3cb65940ba74a5d1942fdab35ee096
|
cac72cce91d98dec40bbadf7a049ed9dbbc18231
|
refs/heads/master
| 2020-04-08T01:22:10.782234
| 2011-12-09T20:58:07
| 2011-12-09T20:58:07
| 2,950,220
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 838
|
java
|
package jetbrains.mps.transformation.test.inputLang.behavior;
/*Generated by MPS */
import jetbrains.mps.lang.core.behavior.BaseConcept_BehaviorDescriptor;
import jetbrains.mps.lang.core.behavior.INamedConcept_BehaviorDescriptor;
import jetbrains.mps.smodel.SNode;
import jetbrains.mps.lang.core.behavior.INamedConcept_Behavior;
public class InputRootWithStatementList_BehaviorDescriptor extends BaseConcept_BehaviorDescriptor implements INamedConcept_BehaviorDescriptor {
public InputRootWithStatementList_BehaviorDescriptor() {
}
public String virtual_getFqName_1213877404258(SNode thisNode) {
return INamedConcept_Behavior.virtual_getFqName_1213877404258(thisNode);
}
@Override
public String getConceptFqName() {
return "jetbrains.mps.transformation.test.inputLang.structure.InputRootWithStatementList";
}
}
|
[
"Timur.Abishev@jetbrains.com"
] |
Timur.Abishev@jetbrains.com
|
03f1284936712b6a9a7bb02b9acc315a1a423ff3
|
da1a4eab3f0747c415a67135685166a08c6bb324
|
/mall-services/order/src/main/java/com/hand/hmall/mapper/HmallMstChannelMapper.java
|
4681d30c8206893b47b07984d734107b69ac97f7
|
[] |
no_license
|
newbigTech/mk
|
ee3ea627c4ec8fca9b9f0c8166733c516e1554aa
|
6bc5f34ce3ac35096596ddce8519f1bf4f4c9bab
|
refs/heads/master
| 2020-03-30T06:39:57.542743
| 2018-04-01T08:53:10
| 2018-04-01T08:53:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 529
|
java
|
package com.hand.hmall.mapper;
import com.hand.hmall.model.HmallMstChannel;
import tk.mybatis.mapper.common.Mapper;
/**
* @author 梅新养
* @name:HmallMstChannelMapper
* @Description:渠道信息信息查询Mapper
* @version 1.0
* @date 2017/5/24 14:39
*/
public interface HmallMstChannelMapper extends Mapper<HmallMstChannel> {
/**
* 根据渠道编码查询渠道信息
*
* @param channelCode 渠道编码
* @return
*/
HmallMstChannel selectChannelByChannelCode(String channelCode);
}
|
[
"changbing.quan@hand-china.com"
] |
changbing.quan@hand-china.com
|
6556a70785ee0a127ea778678dd7482498d070ee
|
71250500dcbced1e8a6a128fa369eee65be7e401
|
/library/zoomlibrary/src/main/java/uk/co/senab/photoview/gestures/CupcakeGestureDetector.java
|
3f905b2d09b0576bb018bcc66764e1f7dd2256af
|
[
"Apache-2.0"
] |
permissive
|
akaxk/CloudReader
|
8b1e48d70f680a146ef31862d0c586e362b7dccd
|
865281fda853dd1f789dd2bf0dbf055bf5777df7
|
refs/heads/master
| 2020-04-15T15:20:36.681636
| 2019-01-07T19:47:34
| 2019-01-07T19:47:34
| 164,792,112
| 1
| 0
|
Apache-2.0
| 2019-01-09T05:09:10
| 2019-01-09T05:09:09
| null |
UTF-8
|
Java
| false
| false
| 4,983
|
java
|
/*******************************************************************************
* Copyright 2011, 2012 Chris Banes.
*
* 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 uk.co.senab.photoview.gestures;
import android.content.Context;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.ViewConfiguration;
import uk.co.senab.photoview.log.LogManager;
public class CupcakeGestureDetector implements GestureDetector {
protected OnGestureListener mListener;
private static final String LOG_TAG = "CupcakeGestureDetector";
float mLastTouchX;
float mLastTouchY;
final float mTouchSlop;
final float mMinimumVelocity;
@Override
public void setOnGestureListener(OnGestureListener listener) {
this.mListener = listener;
}
public CupcakeGestureDetector(Context context) {
final ViewConfiguration configuration = ViewConfiguration.get(context);
mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
mTouchSlop = configuration.getScaledTouchSlop();
}
private VelocityTracker mVelocityTracker;
private boolean mIsDragging;
float getActiveX(MotionEvent ev) {
return ev.getX();
}
float getActiveY(MotionEvent ev) {
return ev.getY();
}
@Override
public boolean isScaling() {
return false;
}
@Override
public boolean isDragging() {
return mIsDragging;
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
switch (ev.getAction()) {
case MotionEvent.ACTION_DOWN: {
mVelocityTracker = VelocityTracker.obtain();
if (null != mVelocityTracker) {
mVelocityTracker.addMovement(ev);
} else {
LogManager.getLogger().i(LOG_TAG, "Velocity tracker is null");
}
mLastTouchX = getActiveX(ev);
mLastTouchY = getActiveY(ev);
mIsDragging = false;
break;
}
case MotionEvent.ACTION_MOVE: {
final float x = getActiveX(ev);
final float y = getActiveY(ev);
final float dx = x - mLastTouchX, dy = y - mLastTouchY;
if (!mIsDragging) {
// Use Pythagoras to see if drag length is larger than
// touch slop
mIsDragging = Math.sqrt((dx * dx) + (dy * dy)) >= mTouchSlop;
}
if (mIsDragging) {
mListener.onDrag(dx, dy);
mLastTouchX = x;
mLastTouchY = y;
if (null != mVelocityTracker) {
mVelocityTracker.addMovement(ev);
}
}
break;
}
case MotionEvent.ACTION_CANCEL: {
// Recycle Velocity Tracker
if (null != mVelocityTracker) {
mVelocityTracker.recycle();
mVelocityTracker = null;
}
break;
}
case MotionEvent.ACTION_UP: {
if (mIsDragging) {
if (null != mVelocityTracker) {
mLastTouchX = getActiveX(ev);
mLastTouchY = getActiveY(ev);
// Compute velocity within the last 1000ms
mVelocityTracker.addMovement(ev);
mVelocityTracker.computeCurrentVelocity(1000);
final float vX = mVelocityTracker.getXVelocity(), vY = mVelocityTracker
.getYVelocity();
// If the velocity is greater than minVelocity, call
// listener
if (Math.max(Math.abs(vX), Math.abs(vY)) >= mMinimumVelocity) {
mListener.onFling(mLastTouchX, mLastTouchY, -vX,
-vY);
}
}
}
// Recycle Velocity Tracker
if (null != mVelocityTracker) {
mVelocityTracker.recycle();
mVelocityTracker = null;
}
break;
}
}
return true;
}
}
|
[
"770413277@qq.com"
] |
770413277@qq.com
|
d53d096bc2bf5fb5603e4de87bedaefb95a0295d
|
ab57957344f35d3139fb17ed9edf0e64e6732b02
|
/zenoss-connector-api/src/main/java/org/zenoss/client/api/JobService.java
|
a4e99ed5f05c403c237d0651b58063aac07f597a
|
[] |
no_license
|
q-o-ap/fog-projects
|
f97be5ab7268c3e7c92956a517ac6e3cf149f543
|
4ef436fec5e64bcf9b84a1371d9749a8fea5fd88
|
refs/heads/master
| 2021-05-28T07:31:27.120658
| 2015-03-06T13:43:47
| 2015-03-06T13:43:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 354
|
java
|
package org.zenoss.client.api;
import org.zenoss.client.common.ApplicationException;
public interface JobService extends ZenossService{
/**
* Return user job status based on uuid
*
* @param uuid
* @return
* @throws ApplicationException
*/
public String userjobs(String uuid) throws ApplicationException;
}
|
[
"gowtham@assistanz.com"
] |
gowtham@assistanz.com
|
4b824649adf7f82eff3460d6a729afdb440cf310
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/dbeaver/2018/12/HexStatusLine.java
|
e7ea9008f15ce7fb6bbc85a6cf33e8e1c6d01ae8
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 7,140
|
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.ui.editors.binary;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.jkiss.dbeaver.ui.editors.binary.internal.BinaryEditorMessages;
/**
* Status line component of the editor. Displays the current position and the insert/overwrite status.
*/
public class HexStatusLine extends Composite {
private static final String TEXT_INSERT = BinaryEditorMessages.editor_binary_hex_status_line_text_insert;
private static final String TEXT_OVERWRITE = BinaryEditorMessages.editor_binary_hex_status_line_text_ovewrite;
private Label position = null;
private Label value = null;
private Label insertMode = null;
/**
* Create a status line part
*
* @param parent parent in the widget hierarchy
* @param style not used
* @param withLeftSeparator so it can be put besides other status items (for plugin)
*/
public HexStatusLine(Composite parent, int style, boolean withLeftSeparator)
{
super(parent, style);
initialize(withLeftSeparator);
}
private void initialize(boolean withSeparator)
{
GridLayout statusLayout = new GridLayout();
statusLayout.numColumns = withSeparator ? 6 : 5;
statusLayout.marginHeight = 0;
setLayout(statusLayout);
if (withSeparator) {
GridData separator1GridData = new GridData();
separator1GridData.grabExcessVerticalSpace = true;
separator1GridData.verticalAlignment = SWT.FILL;
Label separator1 = new Label(this, SWT.SEPARATOR);
separator1.setLayoutData(separator1GridData);
}
GC gc = new GC(this);
FontMetrics fontMetrics = gc.getFontMetrics();
position = new Label(this, SWT.SHADOW_NONE);
GridData gridData1 = new GridData(/*SWT.DEFAULT*/
(11 + 10 + 12 + 3 + 10 + 12) * fontMetrics.getAverageCharWidth(),
SWT.DEFAULT);
position.setLayoutData(gridData1);
GridData separator23GridData = new GridData();
separator23GridData.grabExcessVerticalSpace = true;
separator23GridData.verticalAlignment = SWT.FILL;
Label separator2 = new Label(this, SWT.SEPARATOR);
separator2.setLayoutData(separator23GridData);
value = new Label(this, SWT.SHADOW_NONE);
GridData gridData2 = new GridData(/*SWT.DEFAULT*/
(7 + 3 + 9 + 2 + 9 + 8 + 6) * fontMetrics.getAverageCharWidth(), SWT.DEFAULT);
value.setLayoutData(gridData2);
// From Eclipse 3.1's GridData javadoc:
// NOTE: Do not reuse GridData objects. Every control in a Composite that is managed by a
// GridLayout must have a unique GridData
GridData separator3GridData = new GridData();
separator3GridData.grabExcessVerticalSpace = true;
separator3GridData.verticalAlignment = SWT.FILL;
Label separator3 = new Label(this, SWT.SEPARATOR);
separator3.setLayoutData(separator3GridData);
insertMode = new Label(this, SWT.SHADOW_NONE);
GridData gridData3 = new GridData(/*SWT.DEFAULT*/
(TEXT_OVERWRITE.length() + 2) * fontMetrics.getAverageCharWidth(),
SWT.DEFAULT);
insertMode.setLayoutData(gridData3);
gc.dispose();
}
/**
* Update the insert mode status. Can be "Insert" or "Overwrite"
*
* @param insert true will display "Insert"
*/
public void updateInsertModeText(boolean insert)
{
if (isDisposed() || insertMode.isDisposed()) return;
insertMode.setText(insert ? TEXT_INSERT : TEXT_OVERWRITE);
}
/**
* Update the position status and value.
*/
public void updatePositionValueText(long pos, byte val)
{
updatePositionText(pos);
updateValueText(val);
}
/**
* Update the selection status and value.
*/
public void updateSelectionValueText(long[] sel, byte val)
{
updateSelectionText(sel);
updateValueText(val);
}
/**
* Update the position status. Displays its decimal and hex value.
*/
public void updatePositionText(long pos)
{
if (isDisposed() || position.isDisposed()) return;
String posText = BinaryEditorMessages.editor_binary_hex_status_line_offset + pos + " (dec) = " + Long.toHexString(pos) + " (binary)"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
// String posText = String.format("Offset: %1$d (dec) = %1$X (binary)", pos);
position.setText(posText);
//position.pack(true);
}
/**
* Update the value. Displays its decimal, hex and binary value
*
* @param val value to display
*/
public void updateValueText(byte val)
{
if (isDisposed() || position.isDisposed()) return;
String valBinText = "0000000" + Long.toBinaryString(val); //$NON-NLS-1$
String valText = BinaryEditorMessages.editor_binary_hex_status_line_value + val + " (dec) = " + Integer.toHexString(0x0ff & val) + " (binary) = " + //$NON-NLS-2$ //$NON-NLS-3$
valBinText.substring(valBinText.length() - 8) + " (bin)"; //$NON-NLS-1$
// String valText = String.format("Value: %1$d (dec) = %1$X (binary) = %2$s (bin)", val, valBinText.substring(valBinText.length()-8));
value.setText(valText);
//value.pack(true);
}
/**
* Update the selection status. Displays its decimal and hex values for start and end selection
*
* @param sel selection array to display: [0] = start, [1] = end
*/
public void updateSelectionText(long[] sel)
{
if (isDisposed() || position.isDisposed()) return;
String selText = BinaryEditorMessages.editor_binary_hex_status_line_selection + sel[0] + " (0x" + Long.toHexString(sel[0]) + ") - " + sel[1] + //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
" (0x" + Long.toHexString(sel[1]) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
// String selText = String.format("Selection: %1$d (0x%1$X) - %2$d (0x%2$X)", sel[0], sel[1]);
position.setText(selText);
//position.pack(true);
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
0e2b414741ba0fafaccffb34afc90c7f1b20a450
|
8d275de8a0ef91c38ec614e451b7f60d309f4cd3
|
/wms-feeds/src/main/java/com/amazonaws/mws/jaxb/entity/VolumeRateUnitOfMeasure.java
|
ca72b2186d62941d3f498c6d4878671954bacf8b
|
[] |
no_license
|
owengoodluck/JavaLib2
|
3d6ed543a3d94dad89c221c3be324baf7f8a3bf9
|
c1e5576729c826929da3a60017d1faf6ca56b706
|
refs/heads/master
| 2021-01-10T05:19:53.303106
| 2016-02-25T14:02:21
| 2016-02-25T14:02:21
| 51,063,234
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,457
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// 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.10.29 at 10:21:45 PM CST
//
package com.amazonaws.mws.jaxb.entity;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for VolumeRateUnitOfMeasure.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="VolumeRateUnitOfMeasure">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="milliliters per second"/>
* <enumeration value="centiliters per second"/>
* <enumeration value="liters per second"/>
* <enumeration value="milliliters per minute"/>
* <enumeration value="liters per minute"/>
* <enumeration value="microliters per second"/>
* <enumeration value="nanoliters per second"/>
* <enumeration value="picoliters per second"/>
* <enumeration value="microliters per minute"/>
* <enumeration value="nanoliters per minute"/>
* <enumeration value="picoliters per minute"/>
* <enumeration value="gallons_per_day"/>
* <enumeration value="liters_per_day"/>
* <enumeration value="liters"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "VolumeRateUnitOfMeasure")
@XmlEnum
public enum VolumeRateUnitOfMeasure {
@XmlEnumValue("milliliters per second")
MILLILITERS_PER_SECOND("milliliters per second"),
@XmlEnumValue("centiliters per second")
CENTILITERS_PER_SECOND("centiliters per second"),
@XmlEnumValue("liters per second")
LITERS_PER_SECOND("liters per second"),
@XmlEnumValue("milliliters per minute")
MILLILITERS_PER_MINUTE("milliliters per minute"),
@XmlEnumValue("liters per minute")
LITERS_PER_MINUTE("liters per minute"),
@XmlEnumValue("microliters per second")
MICROLITERS_PER_SECOND("microliters per second"),
@XmlEnumValue("nanoliters per second")
NANOLITERS_PER_SECOND("nanoliters per second"),
@XmlEnumValue("picoliters per second")
PICOLITERS_PER_SECOND("picoliters per second"),
@XmlEnumValue("microliters per minute")
MICROLITERS_PER_MINUTE("microliters per minute"),
@XmlEnumValue("nanoliters per minute")
NANOLITERS_PER_MINUTE("nanoliters per minute"),
@XmlEnumValue("picoliters per minute")
PICOLITERS_PER_MINUTE("picoliters per minute"),
@XmlEnumValue("gallons_per_day")
GALLONS_PER_DAY("gallons_per_day"),
@XmlEnumValue("liters_per_day")
LITERS_PER_DAY("liters_per_day"),
@XmlEnumValue("liters")
LITERS("liters");
private final String value;
VolumeRateUnitOfMeasure(String v) {
value = v;
}
public String value() {
return value;
}
public static VolumeRateUnitOfMeasure fromValue(String v) {
for (VolumeRateUnitOfMeasure c: VolumeRateUnitOfMeasure.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"owen.goodluck@gmail.com"
] |
owen.goodluck@gmail.com
|
e5606aec794abefd797500d9743af966239bde4a
|
d38c371db4bb293a08db468793a82f22ea658108
|
/src/main/java/net/eduard/essentials/command/ReportCommand.java
|
969f1f532f9101cec70ecec40d376964c5e82762
|
[
"MIT"
] |
permissive
|
EduardMaster/EduEssentials
|
a994c9b132a53e3f60666d9f68cc064dae634798
|
54e0d8c6b72d8d68510ff524f7f56fa66a033b97
|
refs/heads/master
| 2022-05-10T16:43:14.461614
| 2022-05-04T20:00:19
| 2022-05-04T20:00:19
| 172,132,752
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,156
|
java
|
package net.eduard.essentials.command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import net.eduard.api.lib.modules.Mine;
import net.eduard.api.lib.manager.CommandManager;
import org.jetbrains.annotations.NotNull;
public class ReportCommand extends CommandManager {
public String message = "§6O jogador §e$target §6foi reportado por §a$sender §6motido: §c$reason";
public ReportCommand() {
super("report","reportar");
}
@Override
public void command(@NotNull CommandSender sender, @NotNull String[] args) {
if (args.length <= 1) {
sendUsage(sender);
return;
}
if (Mine.existsPlayer(sender, args[0])) {
Player target = Mine.getPlayer(args[0]);
StringBuilder builder = new StringBuilder();
for (int i = 1; i < args.length; i++) {
builder.append(args[i] + " ");
}
broadcast(message.replace("$target", target.getDisplayName())
.replace("$sender", sender.getName())
.replace("$reason", builder.toString()));
}
}
}
|
[
"eduardkiller@hotmail.com"
] |
eduardkiller@hotmail.com
|
f2936ef4dbec7498f8a5292313961bbe23cf9213
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XRENDERING-418-34-2-Single_Objective_GGA-WeightedSum/org/xwiki/rendering/wikimodel/xhtml/XhtmlParser_ESTest.java
|
3499c51eaf998c3b33ccb3d968c3f02d81629f35
|
[
"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
| 564
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Mar 31 04:23:00 UTC 2020
*/
package org.xwiki.rendering.wikimodel.xhtml;
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 XhtmlParser_ESTest extends XhtmlParser_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
d8d3a2edab106f31c23aae6d96b8c99b9454fd8b
|
c66cf9f61b5fa6e01478639d647323868300ad10
|
/taisf-service/src/main/java/com/taisf/services/supplier/proxy/SupplierPackageServiceProxy.java
|
9ceab1d2339a52701a4537ff03be2fa70002037c
|
[] |
no_license
|
dingfangwen/taisf
|
c4a427f3489d550013d72c1f22fc9ed1513122db
|
761ed130eedac07655804ca4b3ef7facc4476ca3
|
refs/heads/master
| 2023-01-05T00:18:32.604709
| 2020-11-09T10:13:38
| 2020-11-09T10:13:38
| 311,294,001
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,674
|
java
|
package com.taisf.services.supplier.proxy;
import com.jk.framework.base.entity.DataTransferObject;
import com.jk.framework.base.page.PagingResult;
import com.jk.framework.base.utils.Check;
import com.jk.framework.base.utils.JsonEntityTransform;
import com.jk.framework.log.utils.LogUtil;
import com.taisf.services.supplier.api.SupplierPackageService;
import com.taisf.services.supplier.dao.SupplierPackageDao;
import com.taisf.services.supplier.dto.SupplierProductRequest;
import com.taisf.services.supplier.entity.SupplierPackageEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* <p>获取版本更新信息</p>
* <p/>
* <PRE>
* <BR> 修改记录
* <BR>-----------------------------------------------
* <BR> 修改日期 修改人 修改内容
* </PRE>
*
* @author afi on on 2017/3/27.
* @version 1.0
* @since 1.0
*/
@Component("supplier.supplierPackageServiceProxy")
public class SupplierPackageServiceProxy {
private static final Logger LOGGER = LoggerFactory.getLogger(SupplierPackageServiceProxy.class);
@Resource(name = "supplier.supplierPackageDao")
private SupplierPackageDao supplierPackageDao;
// /**
// * @author:zhangzhengguang
// * @date:2017/10/13
// * @description:分页查询套餐信息
// **/
// @Override
// public DataTransferObject<PagingResult<SupplierPackageEntity>> pageListSupplierProduct(SupplierProductRequest supplierProductRequest) {
// DataTransferObject<PagingResult<SupplierPackageEntity>> dto = new DataTransferObject();
// try {
// PagingResult<SupplierPackageEntity> pagingResult = supplierPackageDao.pageListSupplierProduct(supplierProductRequest);
// dto.setData(pagingResult);
// } catch (Exception e) {
// LogUtil.error(LOGGER, "【分页查询套餐信息失败】par:{},error:{}", JsonEntityTransform.Object2Json(supplierProductRequest), e);
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setMsg("分页查询套餐信息失败");
// return dto;
// }
// return dto;
// }
//
// /**
// * @author:zhangzhengguang
// * @date:2017/10/13
// * @description:保存组合套餐信息
// **/
// @Override
// public DataTransferObject<Void> saveSupplierPackage(SupplierPackageEntity supplierPackageEntity) {
// DataTransferObject<Void> dto = new DataTransferObject();
// try {
// int num = supplierPackageDao.saveSupplierPackage(supplierPackageEntity);
// if (num != 1) {
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setErrorMsg("保存组合套餐信息失败");
// return dto;
// }
// } catch (Exception e) {
// LogUtil.error(LOGGER, "【保存组合套餐信息失败】par:{},error:{}", JsonEntityTransform.Object2Json(supplierPackageEntity), e);
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setMsg("保存组合套餐信息失败");
// return dto;
// }
// return dto;
// }
// /**
// * @author:zhangzhengguang
// * @date:2017/10/13
// * @description:删除组合套餐
// **/
// @Override
// public DataTransferObject<Void> deleteByPrimaryKey(Integer id) {
// DataTransferObject<Void> dto = new DataTransferObject();
// if (Check.NuNObj(id)) {
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setErrorMsg("参数错误");
// return dto;
// }
// try {
// int num = supplierPackageDao.deleteByPrimaryKey(id);
// if (num != 1) {
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setErrorMsg("删除组合套餐失败");
// return dto;
// }
// } catch (Exception e) {
// LogUtil.error(LOGGER, "【删除组合套餐失败】par:{},error:{}", id, e);
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setMsg("删除组合套餐失败");
// return dto;
// }
// return dto;
// }
// /**
// * @author:zhangzhengguang
// * @date:2017/10/13
// * @description:查询组合套餐信息根据ID
// **/
// @Override
// public DataTransferObject<SupplierPackageEntity> getSupplierPackageById(Integer id) {
// DataTransferObject<SupplierPackageEntity> dto = new DataTransferObject();
// if (Check.NuNObj(id)) {
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setErrorMsg("参数错误");
// return dto;
// }
// try {
// SupplierPackageEntity packageEntity = supplierPackageDao.getSupplierPackageById(id);
// if (Check.NuNObj(packageEntity)) {
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setErrorMsg("查询组合套餐信息根据ID失败");
// return dto;
// }
// dto.setData(packageEntity);
// } catch (Exception e) {
// LogUtil.error(LOGGER, "【查询组合套餐信息根据ID失败】par:{},error:{}", id, e);
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setMsg("查询组合套餐信息根据ID失败");
// return dto;
// }
// return dto;
// }
// /**
// * @author:zhangzhengguang
// * @date:2017/10/13
// * @description:修改组合套餐信息根据ID
// **/
// @Override
// public DataTransferObject<Void> updateSupplierPackage(SupplierPackageEntity supplierPackageEntity) {
// DataTransferObject<Void> dto = new DataTransferObject();
// if (Check.NuNObj(supplierPackageEntity)) {
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setErrorMsg("参数错误");
// return dto;
// }
// try {
// int num = supplierPackageDao.updateSupplierPackageById(supplierPackageEntity);
// if (num != 1) {
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setErrorMsg("修改组合套餐信息根据ID失败");
// return dto;
// }
// } catch (Exception e) {
// LogUtil.error(LOGGER, "【修改组合套餐信息根据ID失败】par:{},error:{}", JsonEntityTransform.Object2Json(supplierPackageEntity), e);
// dto.setErrCode(DataTransferObject.ERROR);
// dto.setMsg("修改组合套餐信息根据ID失败");
// return dto;
// }
// return dto;
// }
}
|
[
"dingwf2@ziroom.com"
] |
dingwf2@ziroom.com
|
08ae052d65c20c2fed96d3604dcabc74da4fa271
|
49fbe59e5dfe77cc51dac56decd554dd573b4791
|
/sparrow/src/main/java/com/sparrow/utility/HtmlUtility.java
|
228d5665c4d9fb0c03a5319faa0ebea8b2690821
|
[] |
no_license
|
sparrowzoo/sparrow-shell
|
de9da31967f45cbbe15885cd376d5c1d1e65ea4c
|
46738b407576bed02deca359f38075e7dc6d7e26
|
refs/heads/master
| 2023-07-21T21:00:13.386921
| 2023-07-19T15:30:12
| 2023-07-19T15:30:12
| 119,132,449
| 93
| 40
| null | 2023-07-08T03:48:14
| 2018-01-27T04:30:30
|
Java
|
UTF-8
|
Java
| false
| false
| 7,030
|
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 com.sparrow.utility;
import com.sparrow.constant.Regex;
import com.sparrow.protocol.constant.magic.Escaped;
import com.sparrow.protocol.constant.magic.Symbol;
import java.util.ArrayList;
import java.util.List;
public class HtmlUtility {
public static int getCountWithoutHtml(String sourceHTML) {
// 过滤多余的回车
sourceHTML = sourceHTML.replaceAll(Regex.TAG_BR, "<br/>");
// 过滤多余的空格
sourceHTML = sourceHTML.replaceAll(Regex.TAG_HTML_SPACE, " ");
// 字符数组
char[] chars = sourceHTML.toCharArray();
// 字符索引
int index = 0;
// 是否标签字符标记
boolean isHTMLTag = false;
// 当前字符
char currentChar;
int count = 0;
while (index < chars.length) {
currentChar = chars[index++];
// HTML标签开始
if (currentChar == '<') {
// 说明以下内容是标签部分
isHTMLTag = true;
}
// 标签部分
if (isHTMLTag) {
// HTML标签结束
if (currentChar == '>') {
// 当前标签结束
isHTMLTag = false;
}
// 正文部分
} else {
// 当前字符不是空
if (currentChar != '\n' && currentChar != '\r') {
count++;
}
}
}
return count;
}
public static String filterHTML(String sourceHTML) {
String result = filterHTML(sourceHTML, "</p><p>");
result = result.replaceAll("(<p>)+", "<p>");
result = result.replaceAll("(<\\/p>)+", "</p>");
result = result.replaceAll("(<p><\\/p>)*", "");
result = result.replaceAll("(<\\/p><p>)+", "</p><p>");
if (result.startsWith("</p><p>")) {
result = result.substring("</p><p>".length());
}
if (result.endsWith("</p><p>")) {
result = result.substring(0, result.length() - "</p><p>".length());
}
return result;
}
/**
* 过滤HTML字符中的html标记 包括img标签 要过滤掉html的转义字符
*
* @param sourceHTML
* @return
*/
public static String filterHTML(String sourceHTML, String splitTag) {
// 过滤多余的回车
sourceHTML = sourceHTML.replaceAll(Regex.TAG_BR, " ");
// 过滤转义字符
sourceHTML = sourceHTML.replaceAll(Regex.TAG_HTML_ESCAPE, "");
// 字符数组
char[] chars = sourceHTML.toCharArray();
// 字符索引
int index = 0;
// 是否标签字符标记
boolean isHTMLTag = false;
// 目录字符串
StringBuilder desc = new StringBuilder();
// 标签名
StringBuffer tagName = null;
// 标签队列
List<String> tagQueue = new ArrayList<String>();
// 当前字符
char currentChar;
// 段落标记
while (index < chars.length) {
currentChar = chars[index++];
// HTML标签开始
if (currentChar == '<') {
// 说明以下内容是标签部分
isHTMLTag = true;
// 新标签开始
tagName = new StringBuffer();
}
// 标签部分
if (isHTMLTag) {
tagName.append(currentChar);
// HTML标签结束
if (currentChar == '>') {
// 当前标签结束
isHTMLTag = false;
// 标签结束后加入标签队列
tagQueue.add(tagName.toString().trim());
}
// 正文部分
} else {
// 内容开始 检测标签队列
if (tagQueue.size() > 0) {
// 如果多个标签紧接着出现,则只分一段
for (String tag : tagQueue) {
// 是否为块标签
if (isBlockTag(tag)) {
desc.append(splitTag);
break;
}
}
// 内容开始标签队列清空
tagQueue.clear();
}
// 当前字符不是空
if (currentChar != '\n' && currentChar != '\r'
&& currentChar != ' ' && currentChar != '\t') {
desc.append(currentChar);
}
}
}
return desc.toString();
}
/**
* 是否块标签
*
* @param tagName
* @return
*/
public static boolean isBlockTag(String tagName) {
return RegexUtility.matches(tagName, Regex.TAG_BLOCK);
}
/**
* 防止XSS攻击 Cross Site Scripting
*
* @param html
* @return
*/
public static String encode(String html) {
char[] array = html.toCharArray();
StringBuilder sb = new StringBuilder();
for (char c : array) {
String s = c + Symbol.EMPTY;
switch (c) {
case '&':
s = Escaped.AND;
break;
case '<':
s = Escaped.LESS_THEN;
break;
case '>':
s = Escaped.GREAT_THEN;
break;
case '"':
s = Escaped.DOUBLE_QUOTES;
break;
//case ' ':
// s = " ";
//break;
default:
}
sb.append(s);
}
return sb.toString();
}
public static String decode(String html) {
html = html.replace(Escaped.AND, Symbol.AND);
html = html.replace(Escaped.LESS_THEN, Symbol.LESS_THEN);
html = html.replace(Escaped.GREAT_THEN, Symbol.GREATER_THAN);
html = html.replace(Escaped.DOUBLE_QUOTES, Symbol.DOUBLE_QUOTES);
html = html.replace(Escaped.NO_BREAK_SPACE, Symbol.BLANK);
return html;
}
}
|
[
"zh_harry@163.com"
] |
zh_harry@163.com
|
37ede02978568d327cd046cf04d433acfb875de6
|
a1f54c4fc08b70dfcde20dd3dc2e0b544850ceb9
|
/Setter/src/Ch_6/DatePartDemo.java
|
08ef1828cba36de4a2fd664a7523f683176b8caf
|
[] |
no_license
|
smith1984/java_src_tutorial
|
175d4f69e443084f82c48ab7457dcacfae3dfb23
|
50fd98e37d675f597074a6e53a9ef34824d5fcd4
|
refs/heads/master
| 2020-04-09T03:38:38.848665
| 2018-12-01T21:57:20
| 2018-12-01T21:57:20
| 159,990,788
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 336
|
java
|
package Ch_6;
import java.util.Date;
/**
* Created by ito on 21.03.17.
*/
public class DatePartDemo {
public static void main(String[] args) {
Date newDate = new Date();
DatePart datePart = new DatePart(newDate);
int month = datePart.getMonth();
System.out.println(month);
}
}
|
[
"smith150384@gmail.com"
] |
smith150384@gmail.com
|
bd3c9a0a9cfb4e22761ab330699eae318520d87f
|
c4bc9538712622b135c785120223d19f71d5b455
|
/src/com/shamim/question95/EmployeeTest.java
|
af6c5a86503523dfbd705296016bffb4433073d2
|
[] |
no_license
|
ShamimsJava/ocjp_exam
|
684324a6082e6e7597364e8183404400c32d167b
|
668c3a2b03d180e91233e1148ea3e59a2ad727f2
|
refs/heads/master
| 2020-03-11T09:09:18.988947
| 2018-04-27T03:30:19
| 2018-04-27T03:30:19
| 129,903,163
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 544
|
java
|
package com.shamim.question95;
class Person{
String name = "No name";
public Person(String name) {
this.name = name;
}
}
class Employee extends Person{
String empId = "000";
public Employee(String name, String empId) {
super(name);
this.empId = empId;
}
}
public class EmployeeTest {
public static void main(String[] args) {
//Employee e = new Employee("4321"); // compilation fail
Employee e = new Employee("Shamim", "000");
System.out.println(e.empId);
}
}
|
[
"shamimsjava@gmail.com"
] |
shamimsjava@gmail.com
|
3bfcbad081f9402d5cc3fd15166b88aa8f136fce
|
d3034d8c27d96144651827a7b1b5e80daf10fd6a
|
/amap-data-cp-theater/src/main/java/com/amap/data/save/meituan/MeiTuanApiRtitransfer.java
|
e8f657023ed1a140f4ee511c2d11f379b1e30b7e
|
[] |
no_license
|
javaxiaomangren/amap-data-cp
|
5274b724dca9d95f3c3c55c1fc765ebbfdb583c6
|
d3924a1765eb1e3d635338962c621fbd60e34223
|
refs/heads/master
| 2021-01-10T22:12:44.724500
| 2014-01-07T09:41:22
| 2014-01-07T09:41:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,000
|
java
|
/**
* 2013-5-23
*/
package com.amap.data.save.meituan;
import java.util.ArrayList;
import java.util.List;
import com.amap.data.base.FieldMap;
import com.amap.data.save.meituan.fieldMap.PicsMap;
import com.amap.data.save.meituan.fieldMap.UrlMap;
import com.amap.data.save.transfer.ApiRtitransfer;
import com.amap.data.save.tuan800.fieldMap.DiscountMap;
import com.amap.data.save.tuan800.fieldMap.RtiTimeMap;
import com.amap.data.save.tuan800.fieldMap.ShopsMap;
public class MeiTuanApiRtitransfer extends ApiRtitransfer {
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
protected List<FieldMap> specMap() {
List l = new ArrayList<FieldMap>();
l.add(new RtiTimeMap(templet));// 动态信息时间映射
l.add(new DiscountMap(templet));// 动态信息折扣映射
l.add(new PicsMap(templet));// 动态信息图片映射
l.add(new UrlMap(templet));// 动态信息info_wapurl和info_weburl映射
l.add(new ShopsMap(templet));
return l;
}
}
|
[
"yang.hua@YH-E5430.autonavi.com"
] |
yang.hua@YH-E5430.autonavi.com
|
cf7785947a6e0c16c14408a34c7fe140ed36d07f
|
327be1427daad81689a5aff5a3569f5a48783f67
|
/src/main/java/org/edec/utility/constants/RegisterConst.java
|
16c2c49f55f392a5669dc26cb583f2349b0635a5
|
[] |
no_license
|
luninok/curriculum
|
7e1a0ccee1ba71f382559543fd62a13ea724490a
|
80e84ec2eb88490260d278e8890a979a8e8d32eb
|
refs/heads/master
| 2021-07-11T08:11:48.644816
| 2018-12-12T08:02:44
| 2018-12-12T08:02:44
| 147,468,888
| 0
| 0
| null | 2019-02-05T03:54:08
| 2018-09-05T06:14:49
|
Java
|
UTF-8
|
Java
| false
| false
| 3,039
|
java
|
package org.edec.utility.constants;
/**
* Created by antonskripacev on 24.02.17.
*/
public class RegisterConst {
/**
* Основная ведомость
*/
public static final int TYPE_MAIN = 1;
/**
* Ведомость общей пересдачи
*/
public static final int TYPE_RETAKE_MAIN = 2;
/**
* Ведомость комиссии
*/
public static final int TYPE_COMMISSION = 3;
/**
* Ведомость индивидуальной пересдачи
*/
public static final int TYPE_RETAKE_INDIV = 4;
/**
* Основная ведомость (не подписанная)
*/
public static final int TYPE_MAIN_NOT_SIGNED = -1;
/**
* Ведомость общей пересдачи (не подписанная)
*/
public static final int TYPE_RETAKE_MAIN_NOT_SIGNED = -2;
/**
* Ведомость комиссии (не подписанная)
*/
public static final int TYPE_COMMISSION_NOT_SIGNED = -3;
/**
* Ведомость индивидуальной пересдачи (не подписанная)
*/
public static final int TYPE_RETAKE_INDIV_NOT_SIGNED = -4;
/**
* Статус - по умолчанию: 0.0.0
*/
public static final String STATUS_DEFAULT = "0.0.0";
/**
* Статус - новая ведомость: 2.0.0
*/
public static final String STATUS_NEW = "2.0.0";
/**
* Статус - распечатана в деканате: 2.1.0
*/
public static final String STATUS_PRINTED_BY_DEC = "2.1.0";
/**
* Статус - просмотренная: 2.2.0
*/
public static final String STATUS_VIEWED = "2.2.0";
/**
* Статус - просмотренная/распечатанная преподавателем: 2.3.0
*/
public static final String STATUS_VIEWED_OR_PRINTED_BY_TEACHER = "2.3.0";
/**
* Статус - оценка перезасчитана (заполнено системой): 1.5.0.
* Данный статус записывается при создании истории обучения
* у переводного/восстановленного студента при условии,
* что данный предмет он ранее сдал.
*/
public static final String STATUS_RATING_RESTATED_BY_SYSTEM = "1.5.0";
/**
* Статус - оценка перезасчитана: 1.5.1.
* Данный статус записывается при создании истории обучения
* у переводного/восстановленного студента при условии,
* что данный предмет он ранее сдал.
*/
public static final String STATUS_RATING_RESTATED = "1.5.1";
/**
* Статус - оценка утверждена: 1.3.1
*/
public static final String STATUS_CONFIRMED = "1.3.1";
}
|
[
"luninok@list.ru"
] |
luninok@list.ru
|
86cc90db9fa31b65a13041d6e54a14ef3fd12b75
|
38d5570960e6ace9cdc17586d67f4aa40fd0efc9
|
/wallet-biz/src/main/java/com/coezal/wallet/biz/service/TokenServiceImpl.java
|
1213ac104c2134a27ff243f47e1ee1b0668745b2
|
[] |
no_license
|
zzhkiller/wallet
|
93776b70dab913e77d9030951198a9376a7d97ae
|
ff9896cc5c1436c5431cbd13fa839b4d86ce38b5
|
refs/heads/wallet
| 2022-06-22T03:37:46.384058
| 2020-10-24T02:53:14
| 2020-10-24T02:53:14
| 237,967,467
| 1
| 0
| null | 2022-06-17T02:54:00
| 2020-02-03T13:08:32
|
Java
|
UTF-8
|
Java
| false
| false
| 1,008
|
java
|
package com.coezal.wallet.biz.service;
import com.coezal.wallet.api.bean.Token;
import com.coezal.wallet.dal.dao.TokenMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* Version 1.0
* Created by lll on 2019-09-25.
* Description
* copyright generalray4239@gmail.com
*/
@Service
public class TokenServiceImpl implements TokenService{
private final static Logger logger = LoggerFactory.getLogger("TokenServiceImpl");
@Resource
TokenMapper tokenMapper;
@Override
public Token getTokenInfoByTokenName(String tokenName) {
Token token = new Token();
token.setTokenSymbol(tokenName);
List<Token> tokenList = tokenMapper.select(token);
logger.info("getTokenInfoByTokenName===" + (tokenList == null ? "not find token" : tokenList.toString()));
if (tokenList != null && tokenList.size() >0) {
return tokenList.get(0);
}
return null;
}
}
|
[
"generalray4239@gmail.com"
] |
generalray4239@gmail.com
|
a1a159e60520cafb98d38a6f94f96802774464d1
|
ab30df4b1585692472d32a9cbcf6c8ae107dc9a7
|
/generated-test-cases/Optimization/7-run/MOSA_Optimization_ESTest.java
|
c7bdc3f14686cdf68779999093a0ecaf043129c1
|
[
"Apache-2.0"
] |
permissive
|
fpalomba/issta16-test-code-quality-matters
|
8d87b51ce1ca8305cf9ff67b2eb71899cbfb7d46
|
b18697fb7f3ed77a8875d39c6b81a1afa82d7245
|
refs/heads/master
| 2020-12-24T21:27:40.669676
| 2016-04-22T21:38:36
| 2016-04-22T21:38:36
| 56,882,946
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,720
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Dec 18 19:53:49 GMT 2015
*/
package weka.core;
import static org.junit.Assert.*;
import org.junit.Test;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.testdata.EvoSuiteFile;
import org.evosuite.runtime.testdata.EvoSuiteLocalAddress;
import org.evosuite.runtime.testdata.EvoSuiteRemoteAddress;
import org.evosuite.runtime.testdata.EvoSuiteURL;
import org.junit.runner.RunWith;
import weka.core.Optimization;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true)
public class Optimization_ESTest extends Optimization_ESTest_scaffolding {
//Test case number: 0
/*
* 8 covered goals:
* Goal 1. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I187 Branch 192 IFEQ L1136 - true
* Goal 2. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I203 Branch 193 IFLT L1138 - false
* Goal 3. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I223 Branch 194 IFLT L1141 - true
* Goal 4. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I223 Branch 194 IFLT L1141 - false
* Goal 5. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I232 Branch 195 IFNE L1142 - true
* Goal 6. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I232 Branch 195 IFNE L1142 - false
* Goal 7. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I251 Branch 196 IF_ICMPGE L1144 - true
* Goal 8. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I251 Branch 196 IF_ICMPGE L1144 - false
*/
@Test
public void test0() throws Throwable {
weka.core.matrix.Matrix matrix0 = new weka.core.matrix.Matrix(280, 280, 280);
double[] doubleArray0 = new double[6];
boolean[] booleanArray0 = new boolean[9];
booleanArray0[0] = true;
double[] doubleArray1 = Optimization.solveTriangle(matrix0, doubleArray0, false, booleanArray0);
assertArrayEquals(new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, doubleArray1, 0.01);
}
//Test case number: 1
/*
* 5 covered goals:
* Goal 1. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I28 Branch 184 IFEQ L1115 - true
* Goal 2. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I180 Branch 191 IFLT L1136 - true
* Goal 3. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I180 Branch 191 IFLT L1136 - false
* Goal 4. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I187 Branch 192 IFEQ L1136 - false
* Goal 5. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I203 Branch 193 IFLT L1138 - true
*/
@Test
public void test1() throws Throwable {
weka.core.matrix.Matrix matrix0 = new weka.core.matrix.Matrix(280, 280, 280);
double[] doubleArray0 = new double[1];
boolean[] booleanArray0 = new boolean[7];
booleanArray0[0] = true;
double[] doubleArray1 = Optimization.solveTriangle(matrix0, doubleArray0, false, booleanArray0);
assertArrayEquals(new double[] {0.0}, doubleArray1, 0.01);
}
//Test case number: 2
/*
* 1 covered goal:
* Goal 1. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I94 Branch 189 IFNE L1123 - true
*/
@Test
public void test2() throws Throwable {
weka.core.matrix.Matrix matrix0 = new weka.core.matrix.Matrix(269, 269, 269);
double[] doubleArray0 = new double[6];
boolean[] booleanArray0 = new boolean[5];
booleanArray0[4] = true;
// Undeclared exception!
try {
double[] doubleArray1 = Optimization.solveTriangle(matrix0, doubleArray0, true, booleanArray0);
fail("Expecting exception: ArrayIndexOutOfBoundsException");
} catch(ArrayIndexOutOfBoundsException e) {
//
// 5
//
}
}
//Test case number: 3
/*
* 4 covered goals:
* Goal 1. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I16 Branch 183 IFNONNULL L1112 - true
* Goal 2. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I40 Branch 185 IF_ICMPGE L1117 - true
* Goal 3. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I47 Branch 186 IFEQ L1117 - false
* Goal 4. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I64 Branch 187 IF_ICMPGE L1119 - true
*/
@Test
public void test3() throws Throwable {
weka.core.matrix.Matrix matrix0 = new weka.core.matrix.Matrix(269, 269, 269);
double[] doubleArray0 = new double[1];
boolean[] booleanArray0 = new boolean[5];
booleanArray0[0] = true;
double[] doubleArray1 = Optimization.solveTriangle(matrix0, doubleArray0, true, booleanArray0);
assertArrayEquals(new double[] {0.0}, doubleArray1, 0.01);
}
//Test case number: 4
/*
* 10 covered goals:
* Goal 1. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I16 Branch 183 IFNONNULL L1112 - false
* Goal 2. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I28 Branch 184 IFEQ L1115 - false
* Goal 3. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I40 Branch 185 IF_ICMPGE L1117 - false
* Goal 4. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I47 Branch 186 IFEQ L1117 - true
* Goal 5. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I64 Branch 187 IF_ICMPGE L1119 - false
* Goal 6. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I85 Branch 188 IF_ICMPGE L1122 - true
* Goal 7. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I85 Branch 188 IF_ICMPGE L1122 - false
* Goal 8. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I94 Branch 189 IFNE L1123 - false
* Goal 9. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I111 Branch 190 IF_ICMPGE L1125 - true
* Goal 10. weka.core.Optimization.solveTriangle(Lweka/core/matrix/Matrix;[DZ[Z)[D: I111 Branch 190 IF_ICMPGE L1125 - false
*/
@Test
public void test4() throws Throwable {
weka.core.matrix.Matrix matrix0 = new weka.core.matrix.Matrix(269, 267, 269);
double[] doubleArray0 = new double[6];
double[] doubleArray1 = Optimization.solveTriangle(matrix0, doubleArray0, true, (boolean[]) null);
assertArrayEquals(new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, doubleArray1, 0.01);
}
}
|
[
"fabio.palomba.89@gmail.com"
] |
fabio.palomba.89@gmail.com
|
ce2c4c5c3c91a2af88bf6909e9aa431160a05fb8
|
d883f3b07e5a19ff8c6eb9c3a4b03d9f910f27b2
|
/Model/DataModel/src/main/java/com/sandata/lab/data/model/jpub/model/AppFunEltT.java
|
70fade3ed3a86820760615b42f81a5431261b339
|
[] |
no_license
|
dev0psunleashed/Sandata_SampleDemo
|
ec2c1f79988e129a21c6ddf376ac572485843b04
|
a1818601c59b04e505e45e33a36e98a27a69bc39
|
refs/heads/master
| 2021-01-25T12:31:30.026326
| 2017-02-20T11:49:37
| 2017-02-20T11:49:37
| 82,551,409
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,195
|
java
|
package com.sandata.lab.data.model.jpub.model;
import java.sql.SQLException;
import java.sql.Connection;
import oracle.jdbc.OracleTypes;
import oracle.sql.ORAData;
import oracle.sql.ORADataFactory;
import oracle.sql.Datum;
import oracle.sql.STRUCT;
import oracle.jpub.runtime.MutableStruct;
public class AppFunEltT implements ORAData, ORADataFactory
{
public static final String _SQL_NAME = "METADATA.APP_FUN_ELT_T";
public static final int _SQL_TYPECODE = OracleTypes.STRUCT;
protected MutableStruct _struct;
protected static int[] _sqlType = { 2,91,91,2,2,2,2,12 };
protected static ORADataFactory[] _factory = new ORADataFactory[8];
protected static final AppFunEltT _AppFunEltTFactory = new AppFunEltT();
public static ORADataFactory getORADataFactory()
{ return _AppFunEltTFactory; }
/* constructors */
protected void _init_struct(boolean init)
{ if (init) _struct = new MutableStruct(new Object[8], _sqlType, _factory); }
public AppFunEltT()
{ _init_struct(true); }
public AppFunEltT(java.math.BigDecimal appFunEltSk, java.sql.Timestamp recCreateTmstp, java.sql.Timestamp recUpdateTmstp, java.math.BigDecimal appDataStrucSk, java.math.BigDecimal appDataContentSk, java.math.BigDecimal appFunSk, java.math.BigDecimal appModSk, String funEltName) throws SQLException
{ _init_struct(true);
setAppFunEltSk(appFunEltSk);
setRecCreateTmstp(recCreateTmstp);
setRecUpdateTmstp(recUpdateTmstp);
setAppDataStrucSk(appDataStrucSk);
setAppDataContentSk(appDataContentSk);
setAppFunSk(appFunSk);
setAppModSk(appModSk);
setFunEltName(funEltName);
}
/* ORAData interface */
public Datum toDatum(Connection c) throws SQLException
{
return _struct.toDatum(c, _SQL_NAME);
}
/* ORADataFactory interface */
public ORAData create(Datum d, int sqlType) throws SQLException
{ return create(null, d, sqlType); }
protected ORAData create(AppFunEltT o, Datum d, int sqlType) throws SQLException
{
if (d == null) return null;
if (o == null) o = new AppFunEltT();
o._struct = new MutableStruct((STRUCT) d, _sqlType, _factory);
return o;
}
/* accessor methods */
public java.math.BigDecimal getAppFunEltSk() throws SQLException
{ return (java.math.BigDecimal) _struct.getAttribute(0); }
public void setAppFunEltSk(java.math.BigDecimal appFunEltSk) throws SQLException
{ _struct.setAttribute(0, appFunEltSk); }
public java.sql.Timestamp getRecCreateTmstp() throws SQLException
{ return (java.sql.Timestamp) _struct.getAttribute(1); }
public void setRecCreateTmstp(java.sql.Timestamp recCreateTmstp) throws SQLException
{ _struct.setAttribute(1, recCreateTmstp); }
public java.sql.Timestamp getRecUpdateTmstp() throws SQLException
{ return (java.sql.Timestamp) _struct.getAttribute(2); }
public void setRecUpdateTmstp(java.sql.Timestamp recUpdateTmstp) throws SQLException
{ _struct.setAttribute(2, recUpdateTmstp); }
public java.math.BigDecimal getAppDataStrucSk() throws SQLException
{ return (java.math.BigDecimal) _struct.getAttribute(3); }
public void setAppDataStrucSk(java.math.BigDecimal appDataStrucSk) throws SQLException
{ _struct.setAttribute(3, appDataStrucSk); }
public java.math.BigDecimal getAppDataContentSk() throws SQLException
{ return (java.math.BigDecimal) _struct.getAttribute(4); }
public void setAppDataContentSk(java.math.BigDecimal appDataContentSk) throws SQLException
{ _struct.setAttribute(4, appDataContentSk); }
public java.math.BigDecimal getAppFunSk() throws SQLException
{ return (java.math.BigDecimal) _struct.getAttribute(5); }
public void setAppFunSk(java.math.BigDecimal appFunSk) throws SQLException
{ _struct.setAttribute(5, appFunSk); }
public java.math.BigDecimal getAppModSk() throws SQLException
{ return (java.math.BigDecimal) _struct.getAttribute(6); }
public void setAppModSk(java.math.BigDecimal appModSk) throws SQLException
{ _struct.setAttribute(6, appModSk); }
public String getFunEltName() throws SQLException
{ return (String) _struct.getAttribute(7); }
public void setFunEltName(String funEltName) throws SQLException
{ _struct.setAttribute(7, funEltName); }
}
|
[
"pradeep.ganesh@softcrylic.co.in"
] |
pradeep.ganesh@softcrylic.co.in
|
9b8cc92bb51dc46559d29cdf774097986f2eff9a
|
e1e5bd6b116e71a60040ec1e1642289217d527b0
|
/H5/L2Mythras/L2Mythras_2017_07_12/java/l2f/gameserver/network/serverpackets/GMViewWarehouseWithdrawList.java
|
c6c0890718e0b22ac25ffd21e14e15f4b9f30e86
|
[] |
no_license
|
serk123/L2jOpenSource
|
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
|
603e784e5f58f7fd07b01f6282218e8492f7090b
|
refs/heads/master
| 2023-03-18T01:51:23.867273
| 2020-04-23T10:44:41
| 2020-04-23T10:44:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 716
|
java
|
package l2f.gameserver.network.serverpackets;
import l2f.gameserver.model.Player;
import l2f.gameserver.model.items.ItemInstance;
public class GMViewWarehouseWithdrawList extends L2GameServerPacket
{
private final ItemInstance[] _items;
private String _charName;
private long _charAdena;
public GMViewWarehouseWithdrawList(Player cha)
{
_charName = cha.getName();
_charAdena = cha.getAdena();
_items = cha.getWarehouse().getItems();
}
@Override
protected final void writeImpl()
{
writeC(0x9b);
writeS(_charName);
writeQ(_charAdena);
writeH(_items.length);
for (ItemInstance temp : _items)
{
writeItemInfo(temp);
writeD(temp.getObjectId());
}
}
}
|
[
"64197706+L2jOpenSource@users.noreply.github.com"
] |
64197706+L2jOpenSource@users.noreply.github.com
|
dcc3779bb305dcfe3b2d95118eff4af6afc096ca
|
79dff859aa9e5f735fd38a60d42bd74bd7c7972f
|
/src/main/java/fst/tps/produitApi/rest/vo/ProduitVo.java
|
701f06ef4ee74197282dc294c8a32e268de58ec4
|
[] |
no_license
|
ocp-digital-factory/produit-api-base
|
7e6c9f086fcf75ad2277fde11b830b33a390213c
|
f81d48b35160149f33e485bead47aee3c23d7092
|
refs/heads/master
| 2020-06-10T17:10:15.703446
| 2019-06-25T10:21:37
| 2019-06-25T10:21:37
| 193,687,066
| 0
| 0
| null | 2019-06-25T10:31:32
| 2019-06-25T10:31:32
| null |
UTF-8
|
Java
| false
| false
| 1,086
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package fst.tps.produitApi.rest.vo;
import java.io.Serializable;
/**
*
* @author YOUNES
*/
public class ProduitVo implements Serializable {
private static final long serialVersionUID = 1L;
private String libelle;
private String reference;
private CategorieProduitVo categorieProduitVo;
public String getLibelle() {
return libelle;
}
public void setLibelle(String libelle) {
this.libelle = libelle;
}
public String getReference() {
return reference;
}
public void setReference(String reference) {
this.reference = reference;
}
public CategorieProduitVo getCategorieProduitVo() {
return categorieProduitVo;
}
public void setCategorieProduitVo(CategorieProduitVo categorieProduitVo) {
this.categorieProduitVo = categorieProduitVo;
}
}
|
[
"zouani.younes@gmail.com"
] |
zouani.younes@gmail.com
|
f0748dc9700ea2434f047946de9c5117cbbb8fce
|
39fdbaa47bc18dd76ccc40bccf18a21e3543ab9f
|
/modules/activiti-explorer/src/main/java/org/activiti/explorer/ui/management/crystalball/CrystalBallPage.java
|
60260193a175e889325b10dbb6f9591e12bd2394
|
[] |
no_license
|
jpjyxy/Activiti-activiti-5.16.4
|
b022494b8f40b817a54bb1cc9c7f6fa41dadb353
|
ff22517464d8f9d5cfb09551ad6c6cbecff93f69
|
refs/heads/master
| 2022-12-24T14:51:08.868694
| 2017-04-14T14:05:00
| 2017-04-14T14:05:00
| 191,682,921
| 0
| 0
| null | 2022-12-16T04:24:04
| 2019-06-13T03:15:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,805
|
java
|
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.explorer.ui.management.crystalball;
import org.activiti.explorer.ExplorerApp;
import org.activiti.explorer.I18nManager;
import org.activiti.explorer.ui.AbstractOneViewPage;
import org.activiti.explorer.ui.custom.ToolBar;
import org.activiti.explorer.ui.management.ManagementMenuBarFactory;
import com.vaadin.ui.AbstractSelect;
/**
* @author Tijs Rademakers
*/
public class CrystalBallPage extends AbstractOneViewPage
{
private static final long serialVersionUID = 1L;
protected I18nManager i18nManager;
protected String managementId;
public CrystalBallPage()
{
this.i18nManager = ExplorerApp.get().getI18nManager();
}
@Override
protected void initUi()
{
super.initUi();
setDetailComponent(new EventOverviewPanel());
}
@Override
protected ToolBar createMenuBar()
{
return ExplorerApp.get().getComponentFactory(ManagementMenuBarFactory.class).create();
}
@Override
protected AbstractSelect createSelectComponent()
{
return null;
}
@Override
public void refreshSelectNext()
{
}
@Override
public void selectElement(int index)
{
}
}
|
[
"905280842@qq.com"
] |
905280842@qq.com
|
a404c9d466ce859655aca83d3be4ed40cc528c75
|
1a132432388f4d8eee6fb9c74da8a88b99707c74
|
/src/main/java/com/belk/car/app/model/oma/ContactType.java
|
b345e95da111b01df592ada0e330c61956c0ee5f
|
[] |
no_license
|
Subbareddyg/CARS_new
|
7ed525e6f5470427e6343becd62e645e43558a6c
|
3024c932b54a7e0d808d887210b819bba2ccd1c1
|
refs/heads/master
| 2020-03-14T14:27:02.793772
| 2018-04-30T23:25:40
| 2018-04-30T23:25:40
| 131,653,774
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,144
|
java
|
package com.belk.car.app.model.oma;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.belk.car.app.model.BaseAuditableModel;
@Entity
@Table(name = "CONTACT_TYPE",uniqueConstraints = @UniqueConstraint(columnNames = "CONTACT_TYPE_CD"))
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, include="all")
public class ContactType extends BaseAuditableModel implements java.io.Serializable {
private static final long serialVersionUID = 2667713137037878558L;
private String contactTypeId;
private String contactTypeName;
private String contactTypeDesc;
private String statusCd;
@Id
@Column(name = "CONTACT_TYPE_CD", unique = true, nullable = false, precision = 12, scale = 0)
public String getContactTypeId() {
return contactTypeId;
}
public void setContactTypeId(String contactTypeId) {
this.contactTypeId = contactTypeId;
}
@Column(name = "NAME", nullable = false, length = 50)
public String getContactTypeName() {
return contactTypeName;
}
public void setContactTypeName(String contactTypeName) {
this.contactTypeName = contactTypeName;
}
@Column(name = "DESCR", nullable = false, length = 200)
public String getContactTypeDesc() {
return contactTypeDesc;
}
public void setContactTypeDesc(String contactTypeDesc) {
this.contactTypeDesc = contactTypeDesc;
}
@Column(name = "STATUS_CD", nullable = false, length = 20 )
public String getStatusCd() {
return statusCd;
}
public void setStatusCd(String statusCd) {
this.statusCd = statusCd;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
@Transient
public String toString(){
StringBuilder model=new StringBuilder("contactTypeId="+this.getContactTypeId());
model.append("\ncontactTypeName="+this.getContactTypeName());
model.append("\ncontactTypeDesc="+this.getContactTypeDesc());
return model.toString();
}
}
|
[
"subba_gunjikunta@belk.com"
] |
subba_gunjikunta@belk.com
|
afe4fc6d801fd940a8b6e16af0aeeb587249c001
|
df134b422960de6fb179f36ca97ab574b0f1d69f
|
/com/google/common/collect/AbstractSequentialIterator.java
|
3aae91c517d34fc61fabc39eb541f3a564f56227
|
[] |
no_license
|
TheShermanTanker/NMS-1.16.3
|
bbbdb9417009be4987872717e761fb064468bbb2
|
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
|
refs/heads/master
| 2022-12-29T15:32:24.411347
| 2020-10-08T11:56:16
| 2020-10-08T11:56:16
| 302,324,687
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,709
|
java
|
/* */ package com.google.common.collect;
/* */
/* */ import com.google.common.annotations.GwtCompatible;
/* */ import java.util.NoSuchElementException;
/* */ import javax.annotation.Nullable;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GwtCompatible
/* */ public abstract class AbstractSequentialIterator<T>
/* */ extends UnmodifiableIterator<T>
/* */ {
/* */ private T nextOrNull;
/* */
/* */ protected AbstractSequentialIterator(@Nullable T firstOrNull) {
/* 50 */ this.nextOrNull = firstOrNull;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ protected abstract T computeNext(T paramT);
/* */
/* */
/* */
/* */
/* */ public final boolean hasNext() {
/* 63 */ return (this.nextOrNull != null);
/* */ }
/* */
/* */
/* */ public final T next() {
/* 68 */ if (!hasNext()) {
/* 69 */ throw new NoSuchElementException();
/* */ }
/* */ try {
/* 72 */ return this.nextOrNull;
/* */ } finally {
/* 74 */ this.nextOrNull = computeNext(this.nextOrNull);
/* */ }
/* */ }
/* */ }
/* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\com\google\common\collect\AbstractSequentialIterator.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"tanksherman27@gmail.com"
] |
tanksherman27@gmail.com
|
d937ae357c87146b4ebce79f7c10556634f9525d
|
a80b14012b0b654f44895e3d454cccf23f695bdb
|
/shiro/src/main/java/com/innstack/lime/shiro/chapter8/web/filter/MyAccessControlFilter.java
|
4ee663bc0a84341909dc1f076958c3c08a76e558
|
[] |
no_license
|
azhi365/lime-java
|
7a9240cb5ce88aefeb57baeb1283872b549bcab9
|
11b326972d0a0b6bb010a4328f374a3249ee4520
|
refs/heads/master
| 2023-03-31T19:08:28.736443
| 2018-03-02T14:40:29
| 2018-03-02T14:40:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 778
|
java
|
package com.innstack.lime.shiro.chapter8.web.filter;
import org.apache.shiro.web.filter.AccessControlFilter;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
/**
* <p>User: Zhang Kaitao
* <p>Date: 14-2-3
* <p>Version: 1.0
*/
public class MyAccessControlFilter extends AccessControlFilter {
@Override
protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception {
System.out.println("access allowed");
return true;
}
@Override
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
System.out.println("访问拒绝也不自己处理,继续拦截器链的执行");
return true;
}
}
|
[
"yangzhi365@163.com"
] |
yangzhi365@163.com
|
b2a563d8f1e7affc308051ec570817cc3cc438cc
|
d9233ac6a97486391cd85ba13244b0a71b5002ee
|
/Crooks/src/java/web/MyProjServlet.java
|
5f30dcfbf7bd0f36d4adc5a1b9aa262a923108e7
|
[] |
no_license
|
amirsaleh-salehzadeh/Java-servlets
|
72781efd2141be68c58d8fde0917ece4758a7ad2
|
5ae7f2742981a8ef9c7284942881097876993796
|
refs/heads/master
| 2021-01-22T22:45:49.578694
| 2017-03-20T13:17:01
| 2017-03-20T13:17:01
| 85,579,483
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,916
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package web;
import bs.MyprojBS;
import common.Userparam;
import java.io.*;
import java.net.*;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.*;
import javax.servlet.http.*;
/**
*
* @author Amirsaleh
*/
public class MyProjServlet extends HttpServlet {
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
* @param request servlet request
* @param response servlet response
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
String whatToDo = request.getParameter("whatToDo");
MyprojBS bs = new MyprojBS();
HttpSession session = request.getSession(true);
if("register".equalsIgnoreCase(whatToDo)){
try {
Userparam uparam = new Userparam();
uparam.setName(request.getParameter("Name"));
uparam.setFamily(request.getParameter("Family"));
uparam.setUsername(request.getParameter("Username"));
uparam.setPassword(request.getParameter("Password"));
uparam.setEmail(request.getParameter("email"));
uparam.setPhone_number1(request.getParameter("phone_number"));
uparam.setAddress(request.getParameter("Address"));
bs.register(uparam);
response.sendRedirect("Login.jsp");
} finally {
out.close();
}
} else if ("login".equalsIgnoreCase(whatToDo)){
try {
Userparam curtuserFirst = new Userparam();
curtuserFirst.setUsername(request.getParameter("Username"));
curtuserFirst.setPassword(request.getParameter("Password"));
if("".equalsIgnoreCase(bs.checkUser(curtuserFirst).getUsername()) || bs.checkUser(curtuserFirst).getUsername()!=null) {
Userparam curtuser = bs.checkUser(curtuserFirst);
session.setAttribute("user", curtuser);
if("superAdmin".equalsIgnoreCase(curtuser.getRole())){
response.sendRedirect("Admin.jsp");
}else{
response.sendRedirect("shop.jsp");
}
}else{
response.sendRedirect("Login.jsp?alert=Invalid username or password");
}
} catch(Exception e) {
e.printStackTrace();
out.close();
}
} else if ("addRole".equalsIgnoreCase(whatToDo)){
try {
bs.addRole(request.getParameter("role"));
response.sendRedirect("Admin.jsp?alert=Role added successfully");
} catch (ClassNotFoundException ex) {
Logger.getLogger(MyProjServlet.class.getName()).log(Level.SEVERE, null, ex);
response.sendRedirect("Admin.jsp?alert=Role coudln't be add");
}
}else if ("allUsers".equalsIgnoreCase(whatToDo)){
try {
ArrayList<String> al = new ArrayList<String>();
ArrayList<Userparam> users = new ArrayList<Userparam>();
al = bs.allRoles();
users = bs.allUsers();
session.setAttribute("roles", al);
session.setAttribute("users", users);
String alert = "";
if(request.getParameter("alert")!=null){
alert = request.getParameter("alert");
}
response.sendRedirect("members.jsp?alert="+alert);
} catch (SQLException ex) {
Logger.getLogger(MyProjServlet.class.getName()).log(Level.SEVERE, null, ex);
} catch (ClassNotFoundException ex) {
Logger.getLogger(MyProjServlet.class.getName()).log(Level.SEVERE, null, ex);
}
}else if ("deleteUser".equalsIgnoreCase(whatToDo)){
String username = request.getParameter("userName");
if(bs.delete(username)){
response.sendRedirect("MyProjServlet?whatToDo=allUsers&alert=User deleted successfully");
} else {
response.sendRedirect("MyProjServlet?whatToDo=allUsers&alert=An error occured suring the delete process");
}
}else if ("updateUser".equalsIgnoreCase(whatToDo)){
String userRole = request.getParameter("role");
String username = request.getParameter("userName");
if(bs.update(username, userRole)){
response.sendRedirect("MyProjServlet?whatToDo=allUsers&alert=User updated successfully");
} else {
response.sendRedirect("MyProjServlet?whatToDo=allUsers&alert=An error occured suring the update process");
}
}else if ("searchByRole".equalsIgnoreCase(whatToDo) || "searchByUsername".equalsIgnoreCase(whatToDo)){
try {
String userRole = request.getParameter("role");
boolean isForRole = true;
if("searchByUsername".equalsIgnoreCase(whatToDo)){
isForRole = false;
userRole = request.getParameter("username");
}
ArrayList<String> al = new ArrayList<String>();
ArrayList<Userparam> users = new ArrayList<Userparam>();
al = bs.allRoles();
if(!"".equalsIgnoreCase(userRole)){
users = bs.searchForRole(userRole,isForRole);
} else {
users = bs.allUsers();
}
session.setAttribute("roles", al);
session.setAttribute("users", users);
response.sendRedirect("members.jsp");
} catch (ClassNotFoundException ex) {
Logger.getLogger(MyProjServlet.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(MyProjServlet.class.getName()).log(Level.SEVERE, null, ex);
}
} else if ("logout".equalsIgnoreCase(whatToDo)){
session.invalidate();
response.sendRedirect("main.html");
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
*/
public String getServletInfo() {
return "Short description";
}
// </editor-fold>
}
|
[
"salehzadeh@gmail.com"
] |
salehzadeh@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.