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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9748f3be4e464bbb5823b0f436178d4c97851775 | a94028fb38fea8624a583d6d0cb5a92c8ed30f4e | /app/src/androidTest/java/com/example/anweshmishra/kotlinmultidotview/ExampleInstrumentedTest.java | 5779c472fa87a2b993564dcf1ec6f73e6d9755f2 | [] | no_license | Anwesh43/KoltinMultiDotView | e06126ee8b743c78d4a2fe1cc9d5c29776e3b71e | 01fddb71dfb85b74f4537511dfd114a577547eda | refs/heads/master | 2020-03-17T23:17:10.648344 | 2018-05-19T07:12:21 | 2018-05-19T07:12:21 | 134,038,360 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 787 | java | package com.example.anweshmishra.kotlinmultidotview;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.anweshmishra.kotlinmultidotview", appContext.getPackageName());
}
}
| [
"anweshthecool0@gmail.com"
] | anweshthecool0@gmail.com |
58a66859db886e76440c9612f1de63931b83e53f | 82cc2675fdc5db614416b73307d6c9580ecbfa0c | /eb-service/system-service/src/main/java/cn/comtom/system/main/user/entity/dbo/SysUser.java | 59fce596de4fe55ecf50f8be9b2feac7cfac6b01 | [] | no_license | hoafer/ct-ewbsv2.0 | 2206000c4d7c3aaa2225f9afae84a092a31ab447 | bb94522619a51c88ebedc0dad08e1fd7b8644a8c | refs/heads/master | 2022-11-12T08:41:26.050044 | 2020-03-20T09:05:36 | 2020-03-20T09:05:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,125 | java | package cn.comtom.system.main.user.entity.dbo;
import cn.comtom.system.fw.UUIdGenId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* @author guomao
* @Date 2018-10-29 8:54
*/
@Data
@Table(name = "sys_user")
public class SysUser implements Serializable {
/**
* 用户ID
*/
@Id
@KeySql(genId = UUIdGenId.class)
@Column(name="user_id")
private String userId;
@Column(name="account")
private String account;
@Column(name="password")
private String password;
@Column(name="user_name")
private String userName;
@Column(name="status")
private Integer status;
@Column(name="create_time")
private Date createTime;
@Column(name="creater_id")
private String createrId;
@ApiModelProperty(value = "盐值")
@Column(name="salt")
private String salt;
@Column(name="delete_flag")
private Boolean deleteFlag;
}
| [
"568656253@qq.com"
] | 568656253@qq.com |
429f745454920323f3725849fa6062be94339e03 | 0aae1697a2141152bf5aa8b9c61ca553b5520392 | /src/movement3/game/Wall.java | adae4cbda5315f36088b3337faafb8775d891791 | [] | no_license | mrLWachs/GameExampleCS30S | 4737fbeaaa2610626514263cb9b753044b56847a | 0181721d592961f7077a5c31e2e280d239843215 | refs/heads/master | 2020-11-26T17:15:41.745945 | 2020-01-14T18:17:56 | 2020-01-14T18:17:56 | 229,153,897 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 582 | java |
/** required package class namespace */
package movement3.game;
/** required imports */
import java.awt.Color;
import javax.swing.JLabel;
import movement3.tools.GameObject;
/**
* Wall.java - representation of a wall in pacman
*
* @author Mr. Wachs
* @since 15-May-2019
*/
public class Wall extends GameObject
{
/**
* Constructor for the class, sets class property data
*
* @param label the label associated with the image for the game object
*/
public Wall(JLabel label) {
super(label);
sprite.setColor(Color.blue);
}
}
| [
"mrLWachs@gmail.com"
] | mrLWachs@gmail.com |
ea8a8491788d01b5c44746812b3c0eaf934060f3 | 23d5894b723765b4200889da55aa05ec37e8ab69 | /sellingpartner-merchant-fulfillment-api/src/main/java/com/amazon/spapi/merchantfulfillment/model/LabelCustomization.java | 7fddce9a4f2d845128abc1f5f56bb5d6b6004c02 | [] | no_license | penghaiping/selling-partner-sdk | 420b5e2a48aa98189aa9e0d16514004377e53685 | 8a89d17b492f1fb1c319cc1fa5a7cc0a30abc8b9 | refs/heads/master | 2023-05-31T12:10:01.348630 | 2021-07-05T02:24:55 | 2021-07-05T02:24:55 | 322,236,368 | 19 | 8 | null | null | null | null | UTF-8 | Java | false | false | 3,556 | java | /*
* Selling Partner API for Merchant Fulfillment
* The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.
*
* OpenAPI spec version: v0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.amazon.spapi.merchantfulfillment.model;
import java.util.Objects;
import java.util.Arrays;
import com.amazon.spapi.merchantfulfillment.model.StandardIdForLabel;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Custom text for shipping labels.
*/
@ApiModel(description = "Custom text for shipping labels.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-12-15T20:46:23.921+08:00")
public class LabelCustomization {
@SerializedName("CustomTextForLabel")
private String customTextForLabel = null;
@SerializedName("StandardIdForLabel")
private StandardIdForLabel standardIdForLabel = null;
public LabelCustomization customTextForLabel(String customTextForLabel) {
this.customTextForLabel = customTextForLabel;
return this;
}
/**
* Get customTextForLabel
* @return customTextForLabel
**/
@ApiModelProperty(value = "")
public String getCustomTextForLabel() {
return customTextForLabel;
}
public void setCustomTextForLabel(String customTextForLabel) {
this.customTextForLabel = customTextForLabel;
}
public LabelCustomization standardIdForLabel(StandardIdForLabel standardIdForLabel) {
this.standardIdForLabel = standardIdForLabel;
return this;
}
/**
* Get standardIdForLabel
* @return standardIdForLabel
**/
@ApiModelProperty(value = "")
public StandardIdForLabel getStandardIdForLabel() {
return standardIdForLabel;
}
public void setStandardIdForLabel(StandardIdForLabel standardIdForLabel) {
this.standardIdForLabel = standardIdForLabel;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LabelCustomization labelCustomization = (LabelCustomization) o;
return Objects.equals(this.customTextForLabel, labelCustomization.customTextForLabel) &&
Objects.equals(this.standardIdForLabel, labelCustomization.standardIdForLabel);
}
@Override
public int hashCode() {
return Objects.hash(customTextForLabel, standardIdForLabel);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LabelCustomization {\n");
sb.append(" customTextForLabel: ").append(toIndentedString(customTextForLabel)).append("\n");
sb.append(" standardIdForLabel: ").append(toIndentedString(standardIdForLabel)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"penghp@pingpongx.com"
] | penghp@pingpongx.com |
a29bfc9f71c918467fe02ef9fedc55f4e2c9f764 | fba8af31d5d36d8a6cf0c341faed98b6cd5ec0cb | /src/main/java/com/alipay/api/response/KoubeiMarketingAdvertisingCreateResponse.java | 080d9e53730da66393c7bc4e9a9cbc59275e854d | [
"Apache-2.0"
] | permissive | planesweep/alipay-sdk-java-all | b60ea1437e3377582bd08c61f942018891ce7762 | 637edbcc5ed137c2b55064521f24b675c3080e37 | refs/heads/master | 2020-12-12T09:23:19.133661 | 2020-01-09T11:04:31 | 2020-01-09T11:04:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 629 | java | package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.marketing.advertising.create response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiMarketingAdvertisingCreateResponse extends AlipayResponse {
private static final long serialVersionUID = 5477351323372418625L;
/**
* 创建广告唯一标识
*/
@ApiField("ad_id")
private String adId;
public void setAdId(String adId) {
this.adId = adId;
}
public String getAdId( ) {
return this.adId;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
0a78466d2b07462c72f404fb79216113ee1367de | fba2092bf9c8df1fb6c053792c4932b6de017ceb | /wms/WEB-INF/src/jp/co/daifuku/wms/stock/rft/schedule/NstStartSCH.java | d41b84d7265acec5f9b32157dd0e4ec6dc499a52 | [] | no_license | FlashChenZhi/exercise | 419c55c40b2a353e098ce5695377158bd98975d3 | 51c5f76928e79a4b3e1f0d68fae66ba584681900 | refs/heads/master | 2020-04-04T03:23:44.912803 | 2018-11-01T12:36:21 | 2018-11-01T12:36:21 | 155,712,318 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,658 | java | // $Id: NstStartSCH.java 8041 2012-05-17 09:39:40Z nagao $
package jp.co.daifuku.wms.stock.rft.schedule;
/*
* Copyright(c) 2000-2011 DAIFUKU Co.,Ltd. All Rights Reserved.
*
* This software is the proprietary information of DAIFUKU Co.,Ltd.
* Use is subject to license terms.
*/
import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import jp.co.daifuku.busitune.rft.haisurf.da.AbstractHSScheduler;
import jp.co.daifuku.common.CommonException;
import jp.co.daifuku.common.ReadWriteException;
import jp.co.daifuku.common.text.StringUtil;
import jp.co.daifuku.foundation.common.Params;
import jp.co.daifuku.foundation.common.ScheduleParams;
import jp.co.daifuku.wms.base.common.AbstractSCH;
import jp.co.daifuku.wms.base.common.WmsMessageFormatter;
import jp.co.daifuku.wms.base.common.WmsParam;
import jp.co.daifuku.wms.base.rft.ResultConst;
import jp.co.daifuku.wms.base.util.DisplayUtil;
import jp.co.daifuku.wms.handler.Entity;
import jp.co.daifuku.wms.handler.SearchKey;
import jp.co.daifuku.wms.handler.db.AbstractDBFinder;
import jp.co.daifuku.wms.handler.db.BasicDatabaseFinder;
import jp.co.daifuku.wms.handler.field.FieldName;
import jp.co.daifuku.wms.stock.rft.schedule.NstStartSCHParams;
/**
*
* @version $Revision: 8041 $, $Date: 2012-05-17 18:39:40 +0900 (木, 17 5 2012) $
* @author HighTune.
* @author Last commit: $Author: nagao $
*/
public class NstStartSCH
extends AbstractHSScheduler
{
//------------------------------------------------------------
// fields (upper case only)
//------------------------------------------------------------
//------------------------------------------------------------
// class variables (prefix '$')
//------------------------------------------------------------
//------------------------------------------------------------
// instance variables (prefix '_')
//------------------------------------------------------------
//------------------------------------------------------------
// constructors
//------------------------------------------------------------
/**
* Constructor to create SCH object
* @param conn Database Connection
* @param parent Caller Class
* @param locale Browser Locale
*/
public NstStartSCH(Connection conn, Class parent, Locale locale)
{
super(conn, parent, locale);
}
//------------------------------------------------------------
// public methods
//------------------------------------------------------------
/**
* Receives data that was entered on the screen as parameter,
* and retrieves output data of the List Area from the database, and return it.<BR>
*
* @param p Receiving condition for display data saved in <CODE>ScheduleParams</CODE>.<BR>
* @return retrieved data saved in <CODE>Params</CODE> array.<BR>
* Returns 0 array if no applicable record was found.<BR>
* Displays up to the maximum number of display if the retrieved output exceeds the maximum.<BR>
* Retuns null if an error occurs in the middle of entering condition.<BR>
* @throws CommonException Reports if an unexpected exception occurs when checkging.
*/
public List<Params> query(ScheduleParams p)
throws CommonException
{
try
{
List<Params> outparams = new ArrayList<Params>();
return outparams;
}
finally
{
// close the db handler
}
}
//------------------------------------------------------------
// accessor methods
//------------------------------------------------------------
//------------------------------------------------------------
// package methods
//------------------------------------------------------------
//------------------------------------------------------------
// protected methods
//------------------------------------------------------------
//------------------------------------------------------------
// private methods
//------------------------------------------------------------
//------------------------------------------------------------
// utility methods
//------------------------------------------------------------
/**
* Returns current repository info for this class
* @return version
*/
public static String getVersion()
{
return "$Id: NstStartSCH.java 8041 2012-05-17 09:39:40Z nagao $";
}
}
//end of class
| [
"zhangming@worgsoft.com"
] | zhangming@worgsoft.com |
9c4101e5bf11a3c5a043975dec2e750e82c5ff49 | 4d41728f620d6be9916b3c8446da9e01da93fa4c | /src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java | 6cbb559b5dcd1f4c5e58d1ef4819fec8299634e1 | [] | no_license | TechCatOther/um_bukkit | a634f6ccf7142b2103a528bba1c82843c0bc4e44 | 836ed7a890b2cb04cd7847eff2c59d7a2f6d4d7b | refs/heads/master | 2020-03-22T03:13:57.898936 | 2018-07-02T09:20:00 | 2018-07-02T09:20:00 | 139,420,415 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 646 | java | package org.bukkit.craftbukkit.entity;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Snowball;
public class CraftSnowball extends CraftProjectile implements Snowball
{
public CraftSnowball(CraftServer server, net.minecraft.entity.projectile.EntitySnowball entity)
{
super(server, entity);
}
@Override
public net.minecraft.entity.projectile.EntitySnowball getHandle()
{
return (net.minecraft.entity.projectile.EntitySnowball) entity;
}
@Override
public String toString()
{
return "CraftSnowball";
}
public EntityType getType()
{
return EntityType.SNOWBALL;
}
}
| [
"alone.inbox@gmail.com"
] | alone.inbox@gmail.com |
db028aede004a87c71f03a454da0acac39741c93 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--kotlin/b3ec87f956505bd3e86405a07e1b0ad20694c727/after/FieldInfo.java | eba22997df09e7f559d5a378060dc2820dca9109 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,805 | java | /*
* Copyright 2010-2013 JetBrains s.r.o.
*
* 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.jetbrains.jet.codegen;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.asm4.Type;
import org.jetbrains.jet.codegen.state.JetTypeMapper;
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
import org.jetbrains.jet.lang.descriptors.ClassKind;
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
import org.jetbrains.jet.lang.resolve.java.JvmAbi;
public class FieldInfo {
private final Type fieldType;
private final Type ownerType;
private final String fieldName;
private FieldInfo(@NotNull Type ownerType, @NotNull Type fieldType, @NotNull String fieldName) {
this.ownerType = ownerType;
this.fieldType = fieldType;
this.fieldName = fieldName;
}
@NotNull
public Type getFieldType() {
return fieldType;
}
@NotNull
public Type getOwnerType() {
return ownerType;
}
@NotNull
public String getOwnerInternalName() {
return ownerType.getInternalName();
}
@NotNull
public String getFieldName() {
return fieldName;
}
@NotNull
public static FieldInfo createForSingleton(@NotNull ClassDescriptor fieldClassDescriptor, @NotNull JetTypeMapper typeMapper) {
ClassKind kind = fieldClassDescriptor.getKind();
if (kind != ClassKind.OBJECT && kind != ClassKind.CLASS_OBJECT && kind != ClassKind.ENUM_ENTRY) {
throw new UnsupportedOperationException();
}
Type fieldType = typeMapper.mapType(fieldClassDescriptor.getDefaultType());
ClassDescriptor ownerDescriptor = kind == ClassKind.OBJECT
? fieldClassDescriptor: DescriptorUtils.getParentOfType(fieldClassDescriptor, ClassDescriptor.class);
assert ownerDescriptor != null;
Type ownerType = typeMapper.mapType(ownerDescriptor.getDefaultType());
String fieldName = kind == ClassKind.ENUM_ENTRY
? fieldClassDescriptor.getName().getName()
: fieldClassDescriptor.getKind() == ClassKind.CLASS_OBJECT ? JvmAbi.CLASS_OBJECT_FIELD : JvmAbi.INSTANCE_FIELD;
return new FieldInfo(ownerType, fieldType, fieldName);
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
31d959629d553c8651d4e3fd467134f58435013d | 1d5ab8ee741f4d28370db12f1e725ddcfb14ae29 | /garden/livetribe-slp/tags/2.1.1/core/src/main/java/org/livetribe/slp/spi/da/TCPSrvRplyPerformer.java | bd7c9c074eea6b9451a195e39bec9fd10e717808 | [
"Apache-2.0"
] | permissive | codehaus/livetribe | 5dfec6bef4c5a5687ed8edc5a8e80e1622a41f7a | 9742f427717f321d7a2101d5f62f4394b00a0362 | refs/heads/master | 2023-07-20T01:31:46.001231 | 2011-06-23T07:35:06 | 2011-06-23T07:35:06 | 36,526,523 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,752 | java | /*
* Copyright 2007-2008 the original author or authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.livetribe.slp.spi.da;
import java.net.Socket;
import java.util.List;
import org.livetribe.slp.SLPError;
import org.livetribe.slp.ServiceInfo;
import org.livetribe.slp.settings.Settings;
import org.livetribe.slp.spi.SrvRplyPerformer;
import org.livetribe.slp.spi.msg.Message;
import org.livetribe.slp.spi.msg.SrvRply;
import org.livetribe.slp.spi.net.TCPConnector;
/**
* @version $Revision$ $Date$
*/
public class TCPSrvRplyPerformer extends SrvRplyPerformer
{
private final TCPConnector tcpConnector;
public TCPSrvRplyPerformer(TCPConnector tcpConnector, Settings settings)
{
this.tcpConnector = tcpConnector;
}
public void perform(Socket socket, Message message, List<? extends ServiceInfo> services)
{
SrvRply srvRply = newSrvRply(message, services);
byte[] bytes = srvRply.serialize();
tcpConnector.write(socket, bytes);
}
public void perform(Socket socket, Message message, SLPError error)
{
SrvRply srvRply = newSrvRply(message, error);
byte[] bytes = srvRply.serialize();
tcpConnector.write(socket, bytes);
}
}
| [
"maguro@6db1a190-aa03-0410-869d-8543fcd43261"
] | maguro@6db1a190-aa03-0410-869d-8543fcd43261 |
dc49c2958bd5741207e47ff5143b566323e465c3 | 0728b3aadf0b1091951de8f9755d587060ab10a0 | /designer/src/main/java/com/mqfdy/code/designer/dialogs/actions/TableViewerActionGroup.java | abd9ae87d2929e5fc775d1748854fb0a76f413cf | [] | no_license | tymydlxhdj/codegenerator | 3bcd85216d815364b64c59f1fa970b08fa38fd5e | da3e262579e06a36bb4b255e8870f5da5f4d2151 | refs/heads/master | 2020-03-22T21:18:33.386895 | 2020-02-27T05:39:34 | 2020-02-27T05:39:34 | 140,675,904 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,742 | java | package com.mqfdy.code.designer.dialogs.actions;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Table;
import org.eclipse.ui.actions.ActionGroup;
import com.mqfdy.code.designer.dialogs.ModelElementEditorDialog;
// TODO: Auto-generated Javadoc
/**
* The Class TableViewerActionGroup.
*
* @author mqfdy
*/
public class TableViewerActionGroup extends ActionGroup {
/** The tv. */
private TableViewer tv;
/** The type. */
// 类型 1为属性 2为操作
private int type;
/** The business class. */
private ModelElementEditorDialog businessClass;
/**
* Instantiates a new table viewer action group.
*
* @param tv
* the tv
* @param type
* the type
* @param businessClassEditorDialog
* the business class editor dialog
*/
public TableViewerActionGroup(TableViewer tv, int type,
ModelElementEditorDialog businessClassEditorDialog) {
this.tv = tv;
this.type = type;
this.businessClass = businessClassEditorDialog;
}
/**
* Fill context menu.
*
* @author mqfdy
* @param mgr
* the mgr
* @param ac
* the ac
* @Date 2018-09-03 09:00
*/
public void fillContextMenu(IMenuManager mgr, IAction ac) {
MenuManager menuManager = (MenuManager) mgr;
menuManager.removeAll();
menuManager.add(new CopyModelFromTableAction(tv));
menuManager.add(new PasteModelToTableAction(tv, type, businessClass));
menuManager.add(ac);
Table table = tv.getTable();
Menu menu = menuManager.createContextMenu(table);
table.setMenu(menu);
}
} | [
"mqfdyx0717@126.com"
] | mqfdyx0717@126.com |
dff54ed5fabc54d53e51833f304fe207af6d00db | 6ef4869c6bc2ce2e77b422242e347819f6a5f665 | /devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/hardware/radio/V1_0/HardwareConfigModem.java | b9ff6f72ca9c1fbb42c326a0c8b78b2819006106 | [] | no_license | hacking-android/frameworks | 40e40396bb2edacccabf8a920fa5722b021fb060 | 943f0b4d46f72532a419fb6171e40d1c93984c8e | refs/heads/master | 2020-07-03T19:32:28.876703 | 2019-08-13T03:31:06 | 2019-08-13T03:31:06 | 202,017,534 | 2 | 0 | null | 2019-08-13T03:33:19 | 2019-08-12T22:19:30 | Java | UTF-8 | Java | false | false | 4,293 | java | /*
* Decompiled with CFR 0.145.
*/
package android.hardware.radio.V1_0;
import android.os.HidlSupport;
import android.os.HwBlob;
import android.os.HwParcel;
import java.util.ArrayList;
import java.util.Objects;
public final class HardwareConfigModem {
public int maxData;
public int maxStandby;
public int maxVoice;
public int rat;
public int rilModel;
public static final ArrayList<HardwareConfigModem> readVectorFromParcel(HwParcel hwParcel) {
ArrayList<HardwareConfigModem> arrayList = new ArrayList<HardwareConfigModem>();
HwBlob hwBlob = hwParcel.readBuffer(16L);
int n = hwBlob.getInt32(8L);
hwBlob = hwParcel.readEmbeddedBuffer(n * 20, hwBlob.handle(), 0L, true);
arrayList.clear();
for (int i = 0; i < n; ++i) {
HardwareConfigModem hardwareConfigModem = new HardwareConfigModem();
hardwareConfigModem.readEmbeddedFromParcel(hwParcel, hwBlob, i * 20);
arrayList.add(hardwareConfigModem);
}
return arrayList;
}
public static final void writeVectorToParcel(HwParcel hwParcel, ArrayList<HardwareConfigModem> arrayList) {
HwBlob hwBlob = new HwBlob(16);
int n = arrayList.size();
hwBlob.putInt32(8L, n);
hwBlob.putBool(12L, false);
HwBlob hwBlob2 = new HwBlob(n * 20);
for (int i = 0; i < n; ++i) {
arrayList.get(i).writeEmbeddedToBlob(hwBlob2, i * 20);
}
hwBlob.putBlob(0L, hwBlob2);
hwParcel.writeBuffer(hwBlob);
}
public final boolean equals(Object object) {
if (this == object) {
return true;
}
if (object == null) {
return false;
}
if (object.getClass() != HardwareConfigModem.class) {
return false;
}
object = (HardwareConfigModem)object;
if (this.rilModel != ((HardwareConfigModem)object).rilModel) {
return false;
}
if (this.rat != ((HardwareConfigModem)object).rat) {
return false;
}
if (this.maxVoice != ((HardwareConfigModem)object).maxVoice) {
return false;
}
if (this.maxData != ((HardwareConfigModem)object).maxData) {
return false;
}
return this.maxStandby == ((HardwareConfigModem)object).maxStandby;
}
public final int hashCode() {
return Objects.hash(HidlSupport.deepHashCode(this.rilModel), HidlSupport.deepHashCode(this.rat), HidlSupport.deepHashCode(this.maxVoice), HidlSupport.deepHashCode(this.maxData), HidlSupport.deepHashCode(this.maxStandby));
}
public final void readEmbeddedFromParcel(HwParcel hwParcel, HwBlob hwBlob, long l) {
this.rilModel = hwBlob.getInt32(0L + l);
this.rat = hwBlob.getInt32(4L + l);
this.maxVoice = hwBlob.getInt32(8L + l);
this.maxData = hwBlob.getInt32(12L + l);
this.maxStandby = hwBlob.getInt32(16L + l);
}
public final void readFromParcel(HwParcel hwParcel) {
this.readEmbeddedFromParcel(hwParcel, hwParcel.readBuffer(20L), 0L);
}
public final String toString() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("{");
stringBuilder.append(".rilModel = ");
stringBuilder.append(this.rilModel);
stringBuilder.append(", .rat = ");
stringBuilder.append(this.rat);
stringBuilder.append(", .maxVoice = ");
stringBuilder.append(this.maxVoice);
stringBuilder.append(", .maxData = ");
stringBuilder.append(this.maxData);
stringBuilder.append(", .maxStandby = ");
stringBuilder.append(this.maxStandby);
stringBuilder.append("}");
return stringBuilder.toString();
}
public final void writeEmbeddedToBlob(HwBlob hwBlob, long l) {
hwBlob.putInt32(0L + l, this.rilModel);
hwBlob.putInt32(4L + l, this.rat);
hwBlob.putInt32(8L + l, this.maxVoice);
hwBlob.putInt32(12L + l, this.maxData);
hwBlob.putInt32(16L + l, this.maxStandby);
}
public final void writeToParcel(HwParcel hwParcel) {
HwBlob hwBlob = new HwBlob(20);
this.writeEmbeddedToBlob(hwBlob, 0L);
hwParcel.writeBuffer(hwBlob);
}
}
| [
"me@paulo.costa.nom.br"
] | me@paulo.costa.nom.br |
028eb4346db6e6695d7e2e8d2a69aef5fbe8030b | c748264ea5a467a1d8791de9ef594261e34927b5 | /bctk-common/src/main/java/ytk/util/JsonUtils.java | e10773f70a58ada2bb28a42c3223166412f01191 | [] | no_license | Brotherc/testSystem | 1984bedae28227aa2e896baa3a78f12877e688d6 | 5f91d14bd90badbd8d74e4e7e0b4a8037cd2da29 | refs/heads/master | 2021-05-06T23:02:49.294130 | 2018-02-23T13:54:16 | 2018-02-23T13:54:16 | 112,894,658 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,239 | java | package ytk.util;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* bc商城自定义响应结构
*/
public class JsonUtils {
// 定义jackson对象
private static final ObjectMapper MAPPER = new ObjectMapper();
/**
* 将对象转换成json字符串。
* <p>Title: pojoToJson</p>
* <p>Description: </p>
* @param data
* @return
*/
public static String objectToJson(Object data) {
try {
String string = MAPPER.writeValueAsString(data);
return string;
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return null;
}
/**
* 将json结果集转化为对象
*
* @param jsonData json数据
* @param clazz 对象中的object类型
* @return
*/
public static <T> T jsonToPojo(String jsonData, Class<T> beanType) {
try {
T t = MAPPER.readValue(jsonData, beanType);
return t;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 将json数据转换成pojo对象list
* <p>Title: jsonToList</p>
* <p>Description: </p>
* @param jsonData
* @param beanType
* @return
*/
public static <T>List<T> jsonToList(String jsonData, Class<T> beanType) {
JavaType javaType = MAPPER.getTypeFactory().constructParametricType(List.class, beanType);
try {
List<T> list = MAPPER.readValue(jsonData, javaType);
return list;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public static <K,V>Map<K,V> jsonToMap(String jsonData, Class<K> keyType,Class<V> valueType) {
JavaType javaType = MAPPER.getTypeFactory().constructParametricType(LinkedHashMap.class,keyType, valueType);
try {
Map<K,V> map = MAPPER.readValue(jsonData, javaType);
return map;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
| [
"1157730239@qq.com"
] | 1157730239@qq.com |
15d0c2d3b00da783d647717d38545ec2de176f91 | b9b7fb41ee1aecb89ae45c3af39c5cd104b8ad82 | /src/test/java/com/beit/ArchTest.java | d14ef44702e0a883056e9f7f5f374a59a06e26bc | [] | no_license | roudane1994/TestBeIt | 0bef720e48b7faa4a8f516a2236f5990305f5d50 | b3823184a5b30a5f933b98325a264a3c13dad241 | refs/heads/master | 2022-12-14T23:20:55.855264 | 2020-09-09T09:25:38 | 2020-09-09T09:25:38 | 294,055,733 | 0 | 0 | null | 2020-09-09T09:25:39 | 2020-09-09T08:49:03 | Java | UTF-8 | Java | false | false | 977 | java | package com.beit;
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
import com.tngtech.archunit.core.domain.JavaClasses;
import com.tngtech.archunit.core.importer.ClassFileImporter;
import com.tngtech.archunit.core.importer.ImportOption;
import org.junit.jupiter.api.Test;
class ArchTest {
@Test
void servicesAndRepositoriesShouldNotDependOnWebLayer() {
JavaClasses importedClasses = new ClassFileImporter()
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_TESTS)
.importPackages("com.beit");
noClasses()
.that()
.resideInAnyPackage("com.beit.service..")
.or()
.resideInAnyPackage("com.beit.repository..")
.should()
.dependOnClassesThat()
.resideInAnyPackage("..com.beit.web..")
.because("Services and repositories should not depend on web layer")
.check(importedClasses);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
80804ac18daec15cb73285fddf1ebe0ea5370774 | e3d5ffec1e7390d270b61d58fd0c12672ec89d6c | /app/src/main/java/com/forimm/Util/CustomInteraction.java | dfff8e27b3808eb1ab3ab28482c34502fe528ea3 | [] | no_license | qskeksq/AndroidProject_ForImm | f4d2ad811ec5a0575ff1c1b16a160628113b580d | 0436bd13935c78973d382cd16b97e00b0b1248b7 | refs/heads/master | 2021-09-04T11:29:01.344734 | 2018-01-18T09:06:45 | 2018-01-18T09:06:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 873 | java | package com.forimm.Util;
import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import com.forimm.R;
/**
* Created by Administrator on 2017-07-11.
*/
public class CustomInteraction extends LinearLayout {
public CustomInteraction(Context context) {
super(context);
init(context);
}
public CustomInteraction(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init(context);
}
public void init(Context context){
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.custom_intertactionbar2, this, false);
addView(view);
}
}
| [
"qskeksq@gmail.com"
] | qskeksq@gmail.com |
a7aec7df908a6efea7fbebf20923ee475704d5c6 | bbddeb279df2aededc825a7f5c772066814ab7ef | /app/src/main/java/com/echoesnet/eatandmeet/views/adapters/ClubOrderlListAdapter.java | 46a1dc784b73acc5d3dacffb3acff0e884aa1956 | [] | no_license | a35363507800/EatAndMeet | dfda19e0f761fa027ddcc40e2bb585a6b45a1a14 | a4dbc0c92be08f413ba9621c77d52e76244550f8 | refs/heads/master | 2020-03-31T12:35:37.136634 | 2018-10-10T01:25:58 | 2018-10-10T01:33:29 | 152,222,308 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,238 | java | package com.echoesnet.eatandmeet.views.adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.echoesnet.eatandmeet.R;
import com.echoesnet.eatandmeet.controllers.EamApplication;
import com.echoesnet.eatandmeet.models.bean.ClubOrderDetailBean;
import com.echoesnet.eatandmeet.utils.GlideApp;
import java.util.List;
/**
* Copyright (C) 2017 在线回声(天津)科技发展有限公司
* 在线回声完全享有此软件的著作权,违者必究
*
* @author Administrator
* @version 1.0
* @modifier
* @createDate 2018/2/8
* @description
*/
public class ClubOrderlListAdapter extends BaseAdapter
{
private List<String> dishSource;
private Context mContext;
public ClubOrderlListAdapter(Context mContext, List<String> dishSource)
{
this.mContext = mContext;
this.dishSource = dishSource;
}
@Override
public int getCount()
{
return dishSource.size();
}
@Override
public Object getItem(int position)
{
return dishSource.get(position);
}
@Override
public long getItemId(int position)
{
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
ViewHolder holder = null;
if (convertView == null)
{
holder = new ViewHolder();
convertView = LayoutInflater.from(mContext).inflate(R.layout.litem_club_order_detail, parent, false);
holder.tvDishName = (TextView) convertView.findViewById(R.id.tv_dish_name);
holder.tvDishCount = (TextView) convertView.findViewById(R.id.tv_dish_count);
convertView.setTag(holder);
} else
{
holder = (ViewHolder) convertView.getTag();
}
String pName = dishSource.get(position);
holder.tvDishName.setText(pName);
holder.tvDishCount.setText("x1");
return convertView;
}
public final class ViewHolder
{
TextView tvDishName;
TextView tvDishCount;
}
}
| [
"lingcbyq@163.com"
] | lingcbyq@163.com |
5cabf71cfb7434ff78541d6d3d30a7ca6916dae3 | e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3 | /src/chosun/ciis/se/snd/dm/SE_SND_2520_LDM.java | fddf83b92b15b476cc7cb857010b5750b2eeb109 | [] | no_license | nosmoon/misdevteam | 4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60 | 1829d5bd489eb6dd307ca244f0e183a31a1de773 | refs/heads/master | 2020-04-15T15:57:05.480056 | 2019-01-10T01:12:01 | 2019-01-10T01:12:01 | 164,812,547 | 1 | 0 | null | null | null | null | UHC | Java | false | false | 7,295 | java | /***************************************************************************************************
* 파일명 :
* 기능 :
* 작성일자 :
* 작성자 :
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.se.snd.dm;
import java.sql.*;
import oracle.jdbc.driver.*;
import somo.framework.db.*;
import somo.framework.util.*;
import chosun.ciis.se.snd.ds.*;
import chosun.ciis.se.snd.rec.*;
/**
*
*/
public class SE_SND_2520_LDM extends somo.framework.db.BaseDM implements java.io.Serializable{
public String cmpy_cd;
public String reg_dt;
public String reg_seq;
public String prt_plac_cd;
public String route_clsf;
public String cmpy_clsf;
public String incmg_pers;
public SE_SND_2520_LDM(){}
public SE_SND_2520_LDM(String cmpy_cd, String reg_dt, String reg_seq, String prt_plac_cd, String route_clsf, String cmpy_clsf, String incmg_pers){
this.cmpy_cd = cmpy_cd;
this.reg_dt = reg_dt;
this.reg_seq = reg_seq;
this.prt_plac_cd = prt_plac_cd;
this.route_clsf = route_clsf;
this.cmpy_clsf = cmpy_clsf;
this.incmg_pers = incmg_pers;
}
public void setCmpy_cd(String cmpy_cd){
this.cmpy_cd = cmpy_cd;
}
public void setReg_dt(String reg_dt){
this.reg_dt = reg_dt;
}
public void setReg_seq(String reg_seq){
this.reg_seq = reg_seq;
}
public void setPrt_plac_cd(String prt_plac_cd){
this.prt_plac_cd = prt_plac_cd;
}
public void setRoute_clsf(String route_clsf){
this.route_clsf = route_clsf;
}
public void setCmpy_clsf(String cmpy_clsf){
this.cmpy_clsf = cmpy_clsf;
}
public void setIncmg_pers(String incmg_pers){
this.incmg_pers = incmg_pers;
}
public String getCmpy_cd(){
return this.cmpy_cd;
}
public String getReg_dt(){
return this.reg_dt;
}
public String getReg_seq(){
return this.reg_seq;
}
public String getPrt_plac_cd(){
return this.prt_plac_cd;
}
public String getRoute_clsf(){
return this.route_clsf;
}
public String getCmpy_clsf(){
return this.cmpy_clsf;
}
public String getIncmg_pers(){
return this.incmg_pers;
}
public String getSQL(){
return "{ call CRMSAL_COM.SP_SE_SND_2520_L(? ,? ,? ,? ,? ,? ,? ,? ,? ,?) }";
}
public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{
SE_SND_2520_LDM dm = (SE_SND_2520_LDM)bdm;
cstmt.registerOutParameter(1, Types.VARCHAR);
cstmt.registerOutParameter(2, Types.VARCHAR);
cstmt.setString(3, dm.cmpy_cd);
cstmt.setString(4, dm.reg_dt);
cstmt.setString(5, dm.reg_seq);
cstmt.setString(6, dm.prt_plac_cd);
cstmt.setString(7, dm.route_clsf);
cstmt.setString(8, dm.cmpy_clsf);
cstmt.setString(9, dm.incmg_pers);
cstmt.registerOutParameter(10, OracleTypes.CURSOR);
}
public BaseDataSet createDataSetObject(){
return new chosun.ciis.se.snd.ds.SE_SND_2520_LDataSet();
}
public void print(){
System.out.println("SQL = " + this.getSQL());
System.out.println("cmpy_cd = [" + getCmpy_cd() + "]");
System.out.println("reg_dt = [" + getReg_dt() + "]");
System.out.println("reg_seq = [" + getReg_seq() + "]");
System.out.println("prt_plac_cd = [" + getPrt_plac_cd() + "]");
System.out.println("route_clsf = [" + getRoute_clsf() + "]");
System.out.println("cmpy_clsf = [" + getCmpy_clsf() + "]");
System.out.println("incmg_pers = [" + getIncmg_pers() + "]");
}
}
/*----------------------------------------------------------------------------------------------------
Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오.
String cmpy_cd = req.getParameter("cmpy_cd");
if( cmpy_cd == null){
System.out.println(this.toString+" : cmpy_cd is null" );
}else{
System.out.println(this.toString+" : cmpy_cd is "+cmpy_cd );
}
String reg_dt = req.getParameter("reg_dt");
if( reg_dt == null){
System.out.println(this.toString+" : reg_dt is null" );
}else{
System.out.println(this.toString+" : reg_dt is "+reg_dt );
}
String reg_seq = req.getParameter("reg_seq");
if( reg_seq == null){
System.out.println(this.toString+" : reg_seq is null" );
}else{
System.out.println(this.toString+" : reg_seq is "+reg_seq );
}
String prt_plac_cd = req.getParameter("prt_plac_cd");
if( prt_plac_cd == null){
System.out.println(this.toString+" : prt_plac_cd is null" );
}else{
System.out.println(this.toString+" : prt_plac_cd is "+prt_plac_cd );
}
String route_clsf = req.getParameter("route_clsf");
if( route_clsf == null){
System.out.println(this.toString+" : route_clsf is null" );
}else{
System.out.println(this.toString+" : route_clsf is "+route_clsf );
}
String incmg_pers = req.getParameter("incmg_pers");
if( incmg_pers == null){
System.out.println(this.toString+" : incmg_pers is null" );
}else{
System.out.println(this.toString+" : incmg_pers is "+incmg_pers );
}
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 req.getParameter() 처리시 사용하십시오.
String cmpy_cd = Util.checkString(req.getParameter("cmpy_cd"));
String reg_dt = Util.checkString(req.getParameter("reg_dt"));
String reg_seq = Util.checkString(req.getParameter("reg_seq"));
String prt_plac_cd = Util.checkString(req.getParameter("prt_plac_cd"));
String route_clsf = Util.checkString(req.getParameter("route_clsf"));
String incmg_pers = Util.checkString(req.getParameter("incmg_pers"));
----------------------------------------------------------------------------------------------------*//*----------------------------------------------------------------------------------------------------
Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오.
String cmpy_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("cmpy_cd")));
String reg_dt = Util.Uni2Ksc(Util.checkString(req.getParameter("reg_dt")));
String reg_seq = Util.Uni2Ksc(Util.checkString(req.getParameter("reg_seq")));
String prt_plac_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("prt_plac_cd")));
String route_clsf = Util.Uni2Ksc(Util.checkString(req.getParameter("route_clsf")));
String incmg_pers = Util.Uni2Ksc(Util.checkString(req.getParameter("incmg_pers")));
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 DM 파일의 변수를 설정시 사용하십시오.
dm.setCmpy_cd(cmpy_cd);
dm.setReg_dt(reg_dt);
dm.setReg_seq(reg_seq);
dm.setPrt_plac_cd(prt_plac_cd);
dm.setRoute_clsf(route_clsf);
dm.setIncmg_pers(incmg_pers);
----------------------------------------------------------------------------------------------------*/
/* 작성시간 : Tue Aug 04 20:32:25 KST 2009 */ | [
"DLCOM000@172.16.30.11"
] | DLCOM000@172.16.30.11 |
9d4903c6c6470e2e3a228d4f930a2669d65008c9 | 0180e8cdf5e23161a3408e1b4dfb616ccbbccb60 | /src/org/effectivejava/examples/chapter06/item32/Text.java | f6be8d3332976a2163bea33ad6b02afe644a377f | [] | no_license | salingers/Java | 4d6ddf2ec8fe0ece212097cc1fa9858e13f5ea5b | 0486b0d309a2bd1d305988b3a56a5bf772aa5f65 | refs/heads/master | 2020-05-22T00:03:53.896471 | 2017-04-18T08:44:20 | 2017-04-18T08:44:20 | 63,207,503 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 531 | java | // EnumSet - a modern replacement for bit fields - Page 160
package org.effectivejava.examples.chapter06.item32;
import java.util.EnumSet;
import java.util.Set;
public class Text
{
public enum Style
{
BOLD, ITALIC, UNDERLINE, STRIKETHROUGH
}
// Any Set could be passed in, but EnumSet is clearly best
public void applyStyles(Set<Style> styles)
{
// Body goes here
}
// Sample use
public static void main(String[] args)
{
Text text = new Text();
text.applyStyles(EnumSet.of(Style.BOLD, Style.ITALIC));
}
}
| [
"salingersms@msn.com"
] | salingersms@msn.com |
4dec007c4381e55996af787883f7d42d3026dc4e | 1778a0bfd06dd7478de764b8d982ca8b08f1d414 | /GrantResturantV1.3/AndroidStudio/SingleResturant/app/src/main/java/freaktemplate/singlerestau/Setting.java | 969d51ca3a5f1004edd7b5773053bdc894e1dae5 | [] | no_license | yeakub/LearnAndroidComplete | 4e86549354893b8c3ffff1f72eb434b8dd6220f0 | 157669c21fbae2d470dd55c0e358de0724023055 | refs/heads/master | 2020-03-28T08:53:51.073175 | 2017-01-06T07:25:06 | 2017-01-06T07:25:06 | 147,997,198 | 0 | 1 | null | 2018-09-09T05:51:42 | 2018-09-09T05:51:41 | null | UTF-8 | Java | false | false | 5,515 | java | package freaktemplate.singlerestau;
import java.io.File;
import java.nio.channels.FileChannel;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.net.Uri;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
import freaktemplate.singlerestau.utils.ConnectionDetector;
import freaktemplate.singlerestau.utils.GPSTracker;
public class Setting extends PreferenceActivity {
SharedPreferences sharedPreferences;
Preference contactUs, version, importExport, categoryList1, CurrencyList1;
ListPreference sortBy, defultCurrency;
Context context = this;
File file;
FileChannel src = null;
FileChannel dst = null;
int inAppFlag;
String name, link, mailpage, storename, address, offer, latitude, longitude, distance, store_name, storeaddress,
description, notice;
Boolean isInternetPresent = false;
ConnectionDetector cd;
GPSTracker gps;
double latitudecur;
double longitudecur;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.activity_setting);
cd = new ConnectionDetector(getApplicationContext());
isInternetPresent = cd.isConnectingToInternet();
// check for Internet status
if (isInternetPresent) {
gps = new GPSTracker(Setting.this);
if (gps.canGetLocation()) {
latitudecur = gps.getLatitude();
longitudecur = gps.getLongitude();
} else {
gps.showSettingsAlert();
}
}
addPreferencesFromResource(R.xml.setting);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
getintent();
openGmail();
}
private void getintent() {
// TODO Auto-generated method stub
Intent iv = getIntent();
mailpage = iv.getStringExtra("mail");
}
private void openGmail() {
// TODO Auto-generated method stub
try {
Intent gmail = new Intent(Intent.ACTION_VIEW);
gmail.setClassName("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail");
gmail.putExtra(Intent.EXTRA_EMAIL, new String[] { mailpage });
gmail.setData(Uri.parse(""));
gmail.putExtra(Intent.EXTRA_SUBJECT, "Grant Restaurant");
gmail.setType("text/plain");
gmail.putExtra(Intent.EXTRA_TEXT, "");
startActivity(gmail);
} catch (Exception e) {
sendEmail();
}
}
private void openGmail1() {
// TODO Auto-generated method stub
try {
Intent gmail = new Intent(Intent.ACTION_VIEW);
gmail.setClassName("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail");
gmail.putExtra(Intent.EXTRA_EMAIL, new String[] { "" });
gmail.setData(Uri.parse(""));
gmail.putExtra(Intent.EXTRA_SUBJECT, "Coupon");
gmail.setType("text/plain");
gmail.putExtra(Intent.EXTRA_TEXT,
"Businessname: " + storename + "\n" + "Businessaddress: " + address + "\n" + "offer: " + offer
+ "\n" + "user latitude: " + latitudecur + "\n" + "user longitude: " + longitudecur + "\n"
+ "Business latitude: " + latitude + "\n" + "Business longitude: " + longitude + "\n"
+ "Reported distance: " + distance + " km");
startActivity(gmail);
} catch (Exception e) {
sendEmail();
}
}
private void openGmail2() {
// TODO Auto-generated method stub
try {
Intent gmail = new Intent(Intent.ACTION_VIEW);
gmail.setClassName("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail");
gmail.putExtra(Intent.EXTRA_EMAIL, new String[] { "" });
gmail.setData(Uri.parse(""));
gmail.putExtra(Intent.EXTRA_SUBJECT, "Steal the Deal");
gmail.setType("text/plain");
gmail.putExtra(Intent.EXTRA_TEXT, storename + "\n" + storeaddress + "\n" + description + "\n" + notice
+ "\n" + "Download now at: " + link);
startActivity(gmail);
} catch (Exception e) {
sendEmail();
}
}
private void sendEmail() {
// TODO Auto-generated method stub
String recipient = "";
String subject = "Coupon";
@SuppressWarnings("unused")
String body = "";
String[] recipients = { recipient };
Intent email = new Intent(Intent.ACTION_SEND);
email.setType("message/rfc822");
email.putExtra(Intent.EXTRA_EMAIL, recipients);
email.putExtra(Intent.EXTRA_SUBJECT, subject);
try {
startActivity(Intent.createChooser(email, getString(R.string.email_choose_from_client)));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(Setting.this, getString(R.string.email_no_client), Toast.LENGTH_LONG).show();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.setting, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onBackPressed() {
// TODO Auto-generated method stub
super.onBackPressed();
Setting.this.finish();
}
}
| [
"em3888@gmail.com"
] | em3888@gmail.com |
8e226322de5c08d471c7a72484b469b6c496a6e5 | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/google/firebase/analytics/connector/C41643a.java | 05670b3de9ca0047194b38ec33f95940d4bc7383 | [] | 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 | 383 | java | package com.google.firebase.analytics.connector;
import android.os.Bundle;
import com.google.android.gms.common.annotation.KeepForSdk;
/* renamed from: com.google.firebase.analytics.connector.a */
public interface C41643a {
@KeepForSdk
void logEvent(String str, String str2, Bundle bundle);
@KeepForSdk
void setUserProperty(String str, String str2, Object obj);
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
35bc822c717b9af022d231c872943fecb60a114e | a0de607d1c4eee25bc5083b6c1bd32a7a460ac4a | /sdks/java/http_client/v1/src/test/java/org/openapitools/client/model/V1ExactTimeScheduleTest.java | f80360f0d1c10e23a2602c7c73bbcb019c8ac856 | [
"Apache-2.0"
] | permissive | gaocegege/polyaxon | c4c54ba7d8620039e61fdb1badcf9612e17b8990 | 4552d5ed1f76abba3d0281dba6ada993542bb612 | refs/heads/master | 2022-08-22T01:10:12.722744 | 2020-05-22T15:15:34 | 2020-05-22T15:17:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,009 | java | // Copyright 2018-2020 Polyaxon, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*
* Polyaxon SDKs and REST API specification.
* Polyaxon SDKs and REST API specification.
*
* The version of the OpenAPI document: 1.0.90
* Contact: contact@polyaxon.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.threeten.bp.OffsetDateTime;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for V1ExactTimeSchedule
*/
public class V1ExactTimeScheduleTest {
private final V1ExactTimeSchedule model = new V1ExactTimeSchedule();
/**
* Model tests for V1ExactTimeSchedule
*/
@Test
public void testV1ExactTimeSchedule() {
// TODO: test V1ExactTimeSchedule
}
/**
* Test the property 'kind'
*/
@Test
public void kindTest() {
// TODO: test kind
}
/**
* Test the property 'startAt'
*/
@Test
public void startAtTest() {
// TODO: test startAt
}
}
| [
"mouradmourafiq@gmail.com"
] | mouradmourafiq@gmail.com |
98202afdc10f4c8ce491f529b9eef9205982e018 | 24ed7785dd6c50b35ae95e3cbcbc60e0ecf092ac | /src/main/java/br/com/guilhermealvessilve/gamification/infrastructure/seal/repository/SealReactiveRepository.java | b325307fc5e9e7d65497568ae0c8763b7124a85e | [] | no_license | CarlosEscouto/clean-architecture-quarkus | cdc0755a0b60176fac393502a6f5f0da17ff3db8 | f858dadeaa7d010689f2094bd096801d9676c9d7 | refs/heads/master | 2022-11-11T11:26:11.937137 | 2020-06-23T20:32:10 | 2020-06-23T20:32:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,621 | java | package br.com.guilhermealvessilve.gamification.infrastructure.seal.repository;
import br.com.guilhermealvessilve.gamification.domain.seal.entity.Seal;
import br.com.guilhermealvessilve.gamification.domain.seal.repository.SealRepository;
import br.com.guilhermealvessilve.shared.vo.CPF;
import io.vertx.mutiny.sqlclient.Pool;
import io.vertx.mutiny.sqlclient.Tuple;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.CompletionStage;
@ApplicationScoped
public class SealReactiveRepository implements SealRepository {
private final Pool pool;
private final SealDbConverter converter;
@Inject
public SealReactiveRepository(final Pool pool, final SealDbConverter converter) {
this.pool = Objects.requireNonNull(pool, "SealRepositoryReactive.pool cannot be null!");
this.converter = Objects.requireNonNull(converter, "SealRepositoryReactive.converter cannot be null!");
}
@Override
public CompletionStage<List<Seal>> getAll() {
return pool.preparedQuery("SELECT * FROM seals;")
.execute()
.subscribeAsCompletionStage()
.thenApply(converter::getSeals);
}
@Override
public CompletionStage<Optional<Seal>> findByStudentCPF(final CPF cpf) {
Objects.requireNonNull(cpf, "cpf cannot be null");
return pool.preparedQuery("SELECT * FROM seals WHERE student_cpf = ?")
.execute(Tuple.of(cpf))
.subscribeAsCompletionStage()
.thenApply(converter::getOptionalSeal);
}
@Override
public CompletionStage<Boolean> save(final Seal seal) {
Objects.requireNonNull(seal, "seal cannot be null");
return executeStatement("INSERT INTO seals(student_cpf, name, type) VALUES (?, ?, ?) " +
"ON DUPLICATE KEY UPDATE name = name;", Tuple.of(
seal.getStudentCPF(),
seal.getName(),
seal.getType()
));
}
@Override
public CompletionStage<Boolean> delete(final Seal seal) {
Objects.requireNonNull(seal, "seal cannot be null");
return executeStatement("DELETE FROM seals WHERE student_cpf = ?;", Tuple.of(seal.getStudentCPF()));
}
private CompletionStage<Boolean> executeStatement(final String sql, final Tuple tuple) {
return pool.preparedQuery(sql)
.execute(tuple)
.subscribeAsCompletionStage()
.thenApply(converter::isSuccessOperation);
}
} | [
"guilherme_alves_silve@hotmail.com"
] | guilherme_alves_silve@hotmail.com |
1618e0eb6247c77610aa1d9fa2689ea153c163cb | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XCOMMONS-928-1-10-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/repository/internal/installed/DefaultInstalledExtensionRepository_ESTest.java | 63eba8a95f151c3814220ed13c3ffdc179ba21f7 | [] | 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 | 626 | java | /*
* This file was automatically generated by EvoSuite
* Tue Apr 07 16:42:04 UTC 2020
*/
package org.xwiki.extension.repository.internal.installed;
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 DefaultInstalledExtensionRepository_ESTest extends DefaultInstalledExtensionRepository_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
f98a951b20f0b14995bfddc8c319107809499111 | 89e9215bd42fb29cb2d8182d757b0e62439af249 | /app/src/main/java/com/winguo/productList/modle/city/ProvinceBean.java | 7371b94929f4ed9cc8f043da19bf3810684e48e3 | [] | no_license | chenqian19911214/winguoapp_4.5 | c39e2ae3c1909dc97d74378e4b7085aa2b32332e | d05022a9451d31806a4143e04603bdecd6479aee | refs/heads/master | 2021-05-05T10:02:30.115073 | 2018-01-18T03:55:08 | 2018-01-18T03:55:08 | 117,928,718 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,050 | java | package com.winguo.productList.modle.city;
import java.io.Serializable;
import java.util.List;
/**
* Created by Admin on 2017/1/16.
*/
public class ProvinceBean implements Serializable {
/**
* code : 1
* name : 北京
* cities : {"item":[{"code":72,"name":"朝阳区"},{"code":2800,"name":"海淀区"},{"code":2801,"name":"西城区"},{"code":2802,"name":"东城区"},{"code":2803,"name":"崇文区"},{"code":2804,"name":"宣武区"},{"code":2805,"name":"丰台区"},{"code":2806,"name":"石景山区"},{"code":2807,"name":"门头沟"},{"code":2808,"name":"房山区"},{"code":2809,"name":"通州区"},{"code":2810,"name":"大兴区"},{"code":2812,"name":"顺义区"},{"code":2814,"name":"怀柔区"},{"code":2816,"name":"密云区"},{"code":2901,"name":"昌平区"},{"code":2953,"name":"平谷区"},{"code":3065,"name":"延庆县"}]}
*/
public List<ProvinceItemBean> item;
@Override
public String toString() {
return "ProvinceBean{" +
"item=" + item +
'}';
}
} | [
"1096011884@qq.com"
] | 1096011884@qq.com |
34c994b39a6bce79b08ca0230ba01819d795be17 | d36b9ff8b62708f939ca535490b0ed6239324dad | /zd-hft-ctp/src/main/java/xyz/redtorch/api/jctp/CThostFtdcQryInstrumentField.java | 07825054ae8e3c21cd3b92052e88995a7607291f | [] | no_license | userKarl/stratagy-trader | c02b5be3b9b5101a7f61761546ddc7cd45b2e6a3 | fed2000fb2c994c5172c7ec3e31b3651eb2e1d31 | refs/heads/master | 2020-03-26T08:36:15.391928 | 2018-09-13T11:32:14 | 2018-09-13T11:32:14 | 144,710,668 | 3 | 7 | null | null | null | null | UTF-8 | Java | false | false | 2,315 | java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package xyz.redtorch.api.jctp;
public class CThostFtdcQryInstrumentField {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected CThostFtdcQryInstrumentField(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(CThostFtdcQryInstrumentField obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
jctpmdapiv6v3v11x64JNI.delete_CThostFtdcQryInstrumentField(swigCPtr);
}
swigCPtr = 0;
}
}
public void setInstrumentID(String value) {
jctpmdapiv6v3v11x64JNI.CThostFtdcQryInstrumentField_InstrumentID_set(swigCPtr, this, value);
}
public String getInstrumentID() {
return jctpmdapiv6v3v11x64JNI.CThostFtdcQryInstrumentField_InstrumentID_get(swigCPtr, this);
}
public void setExchangeID(String value) {
jctpmdapiv6v3v11x64JNI.CThostFtdcQryInstrumentField_ExchangeID_set(swigCPtr, this, value);
}
public String getExchangeID() {
return jctpmdapiv6v3v11x64JNI.CThostFtdcQryInstrumentField_ExchangeID_get(swigCPtr, this);
}
public void setExchangeInstID(String value) {
jctpmdapiv6v3v11x64JNI.CThostFtdcQryInstrumentField_ExchangeInstID_set(swigCPtr, this, value);
}
public String getExchangeInstID() {
return jctpmdapiv6v3v11x64JNI.CThostFtdcQryInstrumentField_ExchangeInstID_get(swigCPtr, this);
}
public void setProductID(String value) {
jctpmdapiv6v3v11x64JNI.CThostFtdcQryInstrumentField_ProductID_set(swigCPtr, this, value);
}
public String getProductID() {
return jctpmdapiv6v3v11x64JNI.CThostFtdcQryInstrumentField_ProductID_get(swigCPtr, this);
}
public CThostFtdcQryInstrumentField() {
this(jctpmdapiv6v3v11x64JNI.new_CThostFtdcQryInstrumentField(), true);
}
}
| [
"yanglin-163.-com@163.com"
] | yanglin-163.-com@163.com |
12cf58bf6aadea78233eb8689c5c07aa3a0b7ac9 | 45c84e64a486a3c48bd41a78e28252acbc0cc1b0 | /src/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationSheetView.java | 083651a3e770465e9c32e00b031f913605b1df30 | [
"BSD-3-Clause",
"MIT"
] | permissive | stanleywxc/chromium-noupdator | 47f9cccc6256b1e5b0cb22c598b7a86f5453eb42 | 637f32e9bf9079f31430c9aa9c64a75247993a71 | refs/heads/master | 2022-12-03T22:00:20.940455 | 2019-10-04T16:29:31 | 2019-10-04T16:29:31 | 212,851,250 | 1 | 2 | MIT | 2022-11-17T09:51:04 | 2019-10-04T15:49:33 | null | UTF-8 | Java | false | false | 1,368 | java | // Copyright 2019 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.gesturenav;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ListView;
import android.widget.RelativeLayout;
import org.chromium.chrome.R;
/**
* {@link View} class for navigation sheet. Provided as content view for
* {@link BottomSheet}.
*/
public class NavigationSheetView extends RelativeLayout {
private ListView mListView;
public NavigationSheetView(Context context) {
this(context, null);
}
public NavigationSheetView(Context context, AttributeSet attrs) {
super(context, attrs);
}
/**
* @return The vertical scroll offset of the list view containing the navigation history items.
*/
int getVerticalScrollOffset() {
View v = mListView.getChildAt(0);
return v == null ? 0 : -(v.getTop() - mListView.getPaddingTop());
}
/**
* Request layout for the containing listview.
*/
void requestListViewLayout() {
mListView.requestLayout();
}
@Override
public void onFinishInflate() {
super.onFinishInflate();
mListView = findViewById(R.id.navigation_entries);
}
}
| [
"stanley@moon.lan"
] | stanley@moon.lan |
f9acaffcaccb96e25800382f40580eba1303f88f | f4fd782488b9cf6d99d4375d5718aead62b63c69 | /com/planet_ink/coffee_mud/Commands/Stand.java | bb12e61cd1b8cbea4e87fe9913e7eb9b3b5370bb | [
"Apache-2.0"
] | permissive | sfunk1x/CoffeeMud | 89a8ca1267ecb0c2ca48280e3b3930ee1484c93e | 0ac2a21c16dfe3e1637627cb6373d34615afe109 | refs/heads/master | 2021-01-18T11:20:53.213200 | 2015-09-17T19:16:30 | 2015-09-17T19:16:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,779 | java | package com.planet_ink.coffee_mud.Commands;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2004-2015 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@SuppressWarnings("rawtypes")
public class Stand extends StdCommand
{
public Stand(){}
private final String[] access=I(new String[]{"STAND","ST","STA","STAN"});
@Override public String[] getAccessWords(){return access;}
@Override
public boolean execute(MOB mob, Vector commands, int metaFlags)
throws java.io.IOException
{
final boolean ifnecessary=((commands.size()>1)&&(((String)commands.lastElement()).equalsIgnoreCase("IFNECESSARY")));
final Room room = CMLib.map().roomLocation(mob);
if(CMLib.flags().isStanding(mob))
{
if(!ifnecessary)
mob.tell(L("You are already standing!"));
}
else
if((mob.session()!=null)&&(mob.session().isStopped()))
mob.tell(L("You may not stand up."));
else
if(room!=null)
{
final CMMsg msg=CMClass.getMsg(mob,null,null,CMMsg.MSG_STAND,mob.amDead()?null:L("<S-NAME> stand(s) up."));
if(room.okMessage(mob,msg))
room.send(mob,msg);
}
return false;
}
@Override public double combatActionsCost(final MOB mob, final List<String> cmds){return CMProps.getCommandCombatActionCost(ID());}
@Override public double actionsCost(final MOB mob, final List<String> cmds){return CMProps.getCommandActionCost(ID());}
@Override public boolean canBeOrdered(){return true;}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
506122afffbd6ff6207e2dab47e19383cf5a9e1d | 87c3c335023681d1c906892f96f3a868b3a6ee8e | /HTML5/dev/simplivity-citrixplugin-service/src/main/java/com/vmware/vim25/ArrayOfHostDatastoreSystemDatastoreResult.java | a9d51f06c310ed69b1daec3d73a0036188362ec4 | [
"Apache-2.0"
] | permissive | HewlettPackard/SimpliVity-Citrix-VCenter-Plugin | 19d2b7655b570d9515bf7e7ca0cf1c823cbf5c61 | 504cbeec6fce27a4b6b23887b28d6a4e85393f4b | refs/heads/master | 2023-08-09T08:37:27.937439 | 2020-04-30T06:15:26 | 2020-04-30T06:15:26 | 144,329,090 | 0 | 1 | Apache-2.0 | 2020-04-07T07:27:53 | 2018-08-10T20:24:34 | Java | UTF-8 | Java | false | false | 1,336 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// 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: 2019.06.12 at 09:16:35 AM EDT
//
package com.vmware.vim25;
/**
*
*/
@SuppressWarnings("all")
public class ArrayOfHostDatastoreSystemDatastoreResult {
private final static com.vmware.vim25.HostDatastoreSystemDatastoreResult[] NULL_HOST_DATASTORE_SYSTEM_DATASTORE_RESULT_ARRAY = new com.vmware.vim25.HostDatastoreSystemDatastoreResult[ 0 ] ;
public com.vmware.vim25.HostDatastoreSystemDatastoreResult[] HostDatastoreSystemDatastoreResult;
public com.vmware.vim25.HostDatastoreSystemDatastoreResult[] getHostDatastoreSystemDatastoreResult() {
if ((HostDatastoreSystemDatastoreResult) == null) {
return (NULL_HOST_DATASTORE_SYSTEM_DATASTORE_RESULT_ARRAY);
}
return HostDatastoreSystemDatastoreResult;
}
public void setHostDatastoreSystemDatastoreResult(com.vmware.vim25.HostDatastoreSystemDatastoreResult[] HostDatastoreSystemDatastoreResult) {
this.HostDatastoreSystemDatastoreResult = HostDatastoreSystemDatastoreResult;
}
}
| [
"anuanusha471@gmail.com"
] | anuanusha471@gmail.com |
c38eacaa03dbac314ffdbef6397d00e5b8dca944 | 493a8065cf8ec4a4ccdf136170d505248ac03399 | /net.sf.ictalive.coordination.wfannotation.mapping.diagram/src/net/sf/ictalive/coordination/wfannotation/mapping/diagram/edit/policies/Compensate2CanonicalEditPolicy.java | 5034e7fb24cb35667db9556f904f33b997f4dda6 | [] | no_license | ignasi-gomez/aliveclipse | 593611b2d471ee313650faeefbed591c17beaa50 | 9dd2353c886f60012b4ee4fe8b678d56972dff97 | refs/heads/master | 2021-01-14T09:08:24.839952 | 2014-10-09T14:21:01 | 2014-10-09T14:21:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 704 | java | package net.sf.ictalive.coordination.wfannotation.mapping.diagram.edit.policies;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
*/
public class Compensate2CanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
protected List getSemanticChildrenList() {
return Collections.EMPTY_LIST;
}
/**
* @generated
*/
protected boolean isOrphaned(Collection semanticChildren, final View view) {
return false;
}
/**
* @generated
*/
protected String getDefaultFactoryHint() {
return null;
}
}
| [
"salvarez@lsi.upc.edu"
] | salvarez@lsi.upc.edu |
c20c80db160bccfcc5e9c9f99d39cf5b8820e366 | 71027e2310f9917cd46ccb6a21c0100487c6b43b | /base/freehep-xml/src/main/java/org/freehep/xml/io/XMLIORegistry.java | 41523d1f249c0cb4905ecb4e66e11ad94d6e1963 | [] | no_license | kdk-pkg-soft/freehep-ncolor-pdf | f70f99ebdc7a78fc25960f42629e05d3c58f2b03 | d317ea43554c75f8ff04e826b4361ad4326574b0 | refs/heads/master | 2021-01-23T12:18:26.502269 | 2012-08-22T23:22:21 | 2012-08-22T23:22:21 | 5,516,244 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,497 | java | /*
* XMLIORegistry.java
*/
package org.freehep.xml.io;
/**
* Interface of an XMLIORegistry. The XMLIOFactories used
* in the restore procedure of an object and the XMLIOProxyes
* should be register to an XMLIORegistry that should be set
* in the XMLIOManager passed to the restore method.
*
* @author turri
* @version 1.0
*/
public interface XMLIORegistry
{
/**
* Register an XMLIOFactory or an XMLIOProxy to this Registry.
* @param obj Either an XMLIOFactory or an XMLIOProxy to be registered.
* @throws An IllegalArgumentException if the object does not implement
* either XMLIOFactory or XMLIOProxy.
*
*/
void register( Object obj ) throws IllegalArgumentException;
/**
* Get the appropriate XMLIOFactory to create the object
* that wrote the xml node. The XMLIOFactory identification string
* is attached to the node's attribute <code>xmlioFactory<\code>.
* If this attribute is not present, the node name is taken as
* the identification string. The identification string is
* assigned by the XMLIOManager by using the object's final
* part of the Class name.
* @param objClass The Class of the object to be created.
* @return The corresponding XMLIOFactory.
* @throws IllegalArgumentException if the XMLIOFactory does not exist.
*
*/
XMLIOFactory getXMLIOFactory( Class objClass ) throws IllegalArgumentException;
/**
* Get the appropriate XMLIOProxy to restore the object
* that wrote the xml node. The XMLIOProxy identification string
* is the node name. The identification string is
* assigned by the XMLIOManager by using the object's final
* part of the Class name.
* @param objClass The Class of the object to be restored.
* @return The corresponding XMLIOProxy.
* @throws IllegalArgumentException if the XMLIOProxy does not exist.
*
*/
XMLIOProxy getXMLIOProxy( Class objClass ) throws IllegalArgumentException;
/**
* Get the identification string corresponding to a Class.
* @param clName The Class.
* @return The identification String.
*
*/
String getClassId( Class clName );
/**
* Get the Class corresponding to an identification String.
* @param objName The object's identification String.
* @return The corresponding Class.
*
*/
Class getIdClass( String objName );
}
| [
"hamad.deshmukh@Kodak.com"
] | hamad.deshmukh@Kodak.com |
c2a100c939453480a794b27a3c0d73e414023157 | 0007e1cac6ea95bd6cf8dc9667ad3407b603cdfd | /src/main/java/com/diandiancar/demo/service/impl/CarCategoryServiceImpl.java | 25e039259c3189a8efd020ae866947ae185ab033 | [] | no_license | viosam/diandiancar | 8150c7db75d0a43e573449fdbf5c280077026eb0 | 2d4dc443afe1c8b2319aaef5e3e6e752ea97cabc | refs/heads/master | 2022-11-30T23:41:34.140073 | 2020-05-30T00:25:51 | 2020-05-30T00:25:51 | 183,133,878 | 0 | 0 | null | 2022-11-24T09:59:07 | 2019-04-24T02:43:34 | Java | UTF-8 | Java | false | false | 1,628 | java | package com.diandiancar.demo.service.impl;
import com.diandiancar.demo.entity.CarCategory;
import com.diandiancar.demo.repository.CarCategoryRepository;
import com.diandiancar.demo.service.CarCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*汽车类型
*/
@Service
public class CarCategoryServiceImpl implements CarCategoryService {
@Autowired
private CarCategoryRepository repository;
@Override
public CarCategory findOne(Integer categoryId) {
return repository.findById(categoryId).get();
}
@Override
public CarCategory save(CarCategory carCategory) {
return repository.save(carCategory);
}
@Override
public Page<CarCategory> findAll(Pageable pageable) {
return repository.findAll(pageable);
}
@Override
public List<CarCategory> findAll() {
return repository.findAll();
}
@Override
public Page<CarCategory> findByCategoryNameLike(String categoryName, Pageable pageable) {
return repository.findByCategoryNameLike("%"+categoryName+"%",pageable);
}
@Override
public List<CarCategory> findByCarCategoryTypeIn(List<Integer> categoryTypeList) {
return repository.findByCategoryTypeIn(categoryTypeList);
}
// @Override
// public List<CarCategory> findByCarCategoryTypeIn(List<Integer> categoryTypeList) {
// return repository.findByCategoryTypeIn(categoryTypeList);
// }
}
| [
"123@163.com"
] | 123@163.com |
4346517c21651a69adecfdf493f924e6059fcb68 | 139aa575296282ad3d3756b2472e8f6518a5024c | /QHDemo3.1.0/app/src/main/java/com/qhcloud/demo/manager/model/biz/IAuth.java | 42dc95ca315a7f46e1511a6e253c46b5552245e9 | [] | no_license | Sarah-alsh/QLinqDemo | c02931f8057f34bbfa2d2986009aafcc83f02508 | 090de0cc2a4ebaee62c76b4be44a78e0ee608938 | refs/heads/master | 2020-04-18T02:26:12.445663 | 2019-01-23T10:22:24 | 2019-01-23T10:22:24 | 167,162,437 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 486 | java | package com.qhcloud.demo.manager.model.biz;
/**
* 验证码登录业务逻辑接口
*/
public interface IAuth {
/**
* 获取验证码
* @param phone 手机号码
* @return 返回值:0-成功,其他-错误码
*/
int getSmsCode(String phone);
/**
* 验证码登录
* @param tel 手机号码
* @param code 验证码
* @return 返回值:0-成功,其他-错误码
*/
int loginBySmsCoder(String tel, String code);
}
| [
"sarah.shughri@gmail.com"
] | sarah.shughri@gmail.com |
325e092139659e5712c0c2973f84471f4af03903 | 2e7020495313511d2712efd1b56e52ddecc3d0bf | /src/util/trace/query/OrderedClassInstanceDisplaced.java | 9fa7235d163364b63c1fae3bbb1a6a569d4b14a0 | [] | no_license | pdewan/util | 3bc79264ce10afe6337abe6d1128c80a2be54280 | 7cd83cc286dfb2a5eb87fb54bf74dc42165ceb75 | refs/heads/master | 2022-06-19T11:03:24.758011 | 2022-06-09T04:22:27 | 2022-06-09T04:22:27 | 16,309,230 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,485 | java | package util.trace.query;
import util.trace.Traceable;
public class OrderedClassInstanceDisplaced extends OrderedClassInstanceMissing {
Integer displacement;
public OrderedClassInstanceDisplaced(String aMessage,
Integer aTestIndex,
Integer aReferenceIndex,
Class aPreviousObject, Class anExpectedObject, Class aLaterObject, Integer aDisplacement, Object aFinder) {
super(aMessage, aTestIndex, aReferenceIndex, aPreviousObject, anExpectedObject, aLaterObject, aFinder);
displacement = aDisplacement;
}
public OrderedClassInstanceDisplaced(String aMessage, Integer aTestIndex,
Integer aReferenceIndex,
Class aPreviousObject,
Class anExpectedObject, Class aLaterObject, Integer aDisplacement) {
super(aMessage, aTestIndex, aReferenceIndex, aPreviousObject, anExpectedObject, aLaterObject);
displacement = aDisplacement;
}
public static OrderedClassInstanceDisplaced toTraceable(String aMessage) {
try {
return new OrderedClassInstanceDisplaced (aMessage,
TraceableIndices.getIndex1(aMessage),
TraceableIndices.getIndex2(aMessage),
forName(getPrevious(aMessage)),
forName(getExpected(aMessage)),
forName(getLater(aMessage)),
getDisplacement(aMessage)
);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static Integer getDisplacement(String aMessage) {
return Integer.parseInt(Traceable.getArgs(aMessage, DISPLACEMENT).get(0));
}
public static final String DISPLACEMENT = "DISPLACEMENT";
public static String toString (Integer aTestIndex, Integer aReferenceIndex, Class aPreviousObject, Class anExpectedObject, Class aLaterObject, Integer aDisplacement) {
return
toString(aTestIndex, aReferenceIndex, aPreviousObject, anExpectedObject, aLaterObject) +
DISPLACEMENT + Traceable.FLAT_LEFT_MARKER + aDisplacement + Traceable.FLAT_RIGHT_MARKER;
}
public static OrderedClassInstanceDisplaced newCase (
Integer aTestIndex, Integer aReferenceIndex,
Class aPreviousObject, Class anExpectedObject, Class aLaterObject, Integer aDisplacement, Object aFinder) {
String aMessage = toString(aTestIndex, aReferenceIndex, aPreviousObject, anExpectedObject, aLaterObject);
OrderedClassInstanceDisplaced retVal =
new OrderedClassInstanceDisplaced(aMessage, aTestIndex, aReferenceIndex,
aPreviousObject, anExpectedObject, aLaterObject, aDisplacement, aFinder);
retVal.announce();
return retVal;
}
}
| [
"dewan@cs.unc.edu"
] | dewan@cs.unc.edu |
8f8966a95a4049b5127a04dd4ed23fd4100d9831 | 8eaaf20f0f20240fb0e31cb62ff838b8bbca7770 | /Owari [mc-1.7.10]/[v1]/se/proxus/owari/frames/components/Toggle.java | 167108ac79073c78510049f5142532af40cecafc | [
"LicenseRef-scancode-public-domain",
"Unlicense"
] | permissive | Olivki/minecraft-clients | aa7e5d94596c3c67fa748816566ccce17160d000 | 19e00b00d3556e6b3cee5f968005638593d12c01 | refs/heads/master | 2020-04-13T05:30:22.073886 | 2019-03-04T20:52:54 | 2019-03-04T20:52:54 | 162,994,258 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,222 | java | package se.proxus.owari.frames.components;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import org.lwjgl.opengl.GL11;
import se.proxus.owari.config.Value;
import se.proxus.owari.frames.Component;
import se.proxus.owari.frames.FrameManager;
import se.proxus.owari.mods.Mod;
import se.proxus.owari.tools.Tools;
public class Toggle extends Gui implements Component {
private String text;
private int x;
private int y;
private int width;
private int height;
private boolean state;
private Mod mod;
private Frame frame;
public Toggle(final int x, final int y, final int width, final int height, final Mod mod,
final Frame frame) {
setText(mod.getName());
setX(x);
setY(y);
setWidth(width);
setHeight(height);
setMod(mod);
setFrame(frame);
}
@Override
public void draw(final FontRenderer font, final int x, final int y, final float ticks) {
setState(getMod().getState());
boolean hovering = isHovering(x, y) && !getFrame().isObstructed(x, y);
drawRect(getX(), getY(), getX() + getWidth(), getY() + getHeight(), getState() ? 0x90FF5600
: 0x50111111);
drawRect(getX(), getY() + getHeight(), getX() + getWidth(), getY() + getHeight(),
getState() ? 0xFF19548E : 0xFF1C1C1C);
if (hovering) {
drawRect(getX(), getY(), getX() + getWidth(), getY() + getHeight(), 0x30000000);
}
font.drawString(getText(), getX() + getWidth() / 2 - font.getStringWidth(getText()) / 2,
getY() + 2, hovering ? 0xFFFFFF55 : 0xFFFFFFFF);
}
@Override
public void mouseClicked(final int x, final int y, final int type) {
boolean hovering = isHovering(x, y) && !getFrame().isObstructed(x, y);
if (hovering && type == 0) {
if (Minecraft.getMinecraft().thePlayer == null) {
return;
}
Tools.playSound("random.click", 1.0F);
getMod().toggle();
}
if (hovering && type == 1) {
Tools.playSound("random.click", 1.0F);
Frame frame = new Frame(getMod().getName() + " Config", 0, 2) {
@Override
public void init() {
for (final Value value : getMod().getValues()) {
if (!value.isEditable() || value.getName().equalsIgnoreCase("State")) {
continue;
}
if (Tools.isNumber(value.getValue())) {
addComponent(new Slider(value, 0, 0, getWidth() - 6, 12, getMod(),
value.getMax(), getFrame()));
getClient().getLogger().info(
"Found number: " + value.getName() + " Max: " + value.getMax());
}
if (value.getValue() instanceof Boolean) {
addComponent(new Button(value.getName().replace(
getMod().getName() + " ", ""), 0, 0, getWidth() - 6, 12,
getFrame()) {
@Override
public void init() {
setState(value.getBoolean());
}
@Override
public void mouseClicked(final int x, final int y, final int type) {
if (isHovering(x, y) && type == 0) {
Tools.playSound("random.click", 0.5F);
setState(!value.getBoolean());
getMod().setValue(value.getName(), getState(), true);
}
}
});
}
}
addComponent(new Button("Keybind: " + getMod().getKeybind(), 0, 0,
getWidth() - 6, 12, getFrame()) {
private boolean keyTyped = false;
@Override
public void mouseClicked(final int x, final int y, final int type) {
if (isHovering(x, y) && type == 0) {
Tools.playSound("random.click", 1.0F);
setText("Keybind: *");
setKeyTyped(!isKeyTyped());
}
if (isHovering(x, y) && type == 2) {
Tools.playSound("random.click", 1.0F);
getMod().setValue("Keybind", "NONE", true);
setText("Keybind: " + getMod().getKeybind());
setKeyTyped(false);
}
}
@Override
public void keyTyped(final String keyName, final char keyChar) {
if (isKeyTyped() && !keyName.equalsIgnoreCase("ESCAPE")) {
Tools.playSound("random.click", 1.0F);
getMod().setValue("Keybind", keyName, true);
setText("Keybind: " + getMod().getKeybind());
setKeyTyped(false);
}
}
public boolean isKeyTyped() {
return keyTyped;
}
public void setKeyTyped(final boolean keyTyped) {
this.keyTyped = keyTyped;
}
});
}
};
if (!FrameManager.getInstance().containsByName(frame.getText())) {
FrameManager.getInstance().addFrame(frame);
} else if (FrameManager.getInstance().containsByName(frame.getText())) {
FrameManager.getInstance().removeFrameByName(frame.getText());
}
}
}
@Override
public void keyTyped(final String keyName, final char keyChar) {
}
@Override
public void setText(final String text) {
this.text = text;
}
@Override
public String getText() {
return text;
}
@Override
public void setX(final int x) {
this.x = x;
}
@Override
public int getX() {
return x;
}
@Override
public void setY(final int y) {
this.y = y;
}
@Override
public int getY() {
return y;
}
@Override
public void setWidth(final int width) {
this.width = width;
}
@Override
public int getWidth() {
return width;
}
@Override
public void setHeight(final int height) {
this.height = height;
}
@Override
public int getHeight() {
return height;
}
@Override
public void setState(final boolean state) {
this.state = state;
}
@Override
public boolean getState() {
return state;
}
public Mod getMod() {
return mod;
}
public void setMod(final Mod mod) {
this.mod = mod;
}
public Frame getFrame() {
return frame;
}
public void setFrame(final Frame frame) {
this.frame = frame;
}
@Override
public boolean isHovering(final int x, final int y) {
return x >= getX() && y >= getY() && x <= getX() + getWidth() && y <= getY() + getHeight();
}
public void drawBaseBorderedRect(final int x, final int y, final int width, final int height,
final int hex1, final int hex2) {
drawRect(x, y + 1, width, height - 1, hex2);
drawVerticalLine(x - 1, y, height - 1, hex1);
drawVerticalLine(width, y, height - 1, hex1);
drawHorizontalLine(x, width - 1, y, hex1);
drawHorizontalLine(x, width - 1, height - 1, hex1);
}
public void drawBorderedRect(final int x, final int y, final int width, final int height,
final int hex1, final int hex2) {
GL11.glPushMatrix();
GL11.glScaled(0.5D, 0.5D, 0.5D);
drawBaseBorderedRect(x * 2, y * 2, width * 2, height * 2, hex1, hex2);
GL11.glPopMatrix();
}
public void drawBaseBorderedGradientRect(final int x, final int y, final int width,
final int height, final int hex1, final int hex2, final int hex3) {
drawGradientRect(x, y + 1, width, height - 1, hex2, hex3);
drawVerticalLine(x - 1, y, height - 1, hex1);
drawVerticalLine(width, y, height - 1, hex1);
drawHorizontalLine(x, width - 1, y, hex1);
drawHorizontalLine(x, width - 1, height - 1, hex1);
}
public void drawBorderedGradientRect(final int x, final int y, final int width,
final int height, final int hex1, final int hex2, final int hex3) {
GL11.glPushMatrix();
GL11.glScaled(0.5D, 0.5D, 0.5D);
drawBaseBorderedGradientRect(x * 2, y * 2, width * 2, height * 2, hex1, hex2, hex3);
GL11.glPopMatrix();
}
} | [
"0liverb3rg@gmail.com"
] | 0liverb3rg@gmail.com |
2a7e77a71f77253157228b89d82ad0b1d9b846d5 | 7961133bd042d73e83871877378ef55579b63058 | /src/main/java/com/siwuxie095/spring/chapter8th/example2nd/Main.java | 4e3491e2341eeb74f30d5e7b570eebec4835f404 | [] | no_license | siwuxie095/spring-practice | f234c14f33e468538fb620b4dd8648526fc2d28c | 7fa5aeaa5c81efd30a5c3d9e0d1396d0f866b056 | refs/heads/master | 2023-04-08T03:33:46.620416 | 2021-04-03T06:57:19 | 2021-04-03T06:57:19 | 319,481,337 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,674 | java | package com.siwuxie095.spring.chapter8th.example2nd;
/**
* @author Jiajing Li
* @date 2021-02-09 16:24:08
*/
@SuppressWarnings("all")
public class Main {
/**
* 在 Spring 中配置 Web Flow
*
* Spring Web Flow 是构建于 Spring MVC 基础之上的。这意味着所有的流程请求都需要首先经过 Spring MVC
* 的 DispatcherServlet。需要在 Spring 应用上下文中配置一些 bean 来处理流程请求并执行流程。
*
* 现在,还不支持在 Java 中配置 Spring Web Flow,所以别无选择,只能在 XML 中对其进行配置。有一些 bean
* 会使用 Spring Web Flow 的 Spring 配置文件命名空间来进行声明。因此,需要在上下文定义XML文件中添加这
* 个命名空间声明:
*
* <?xml version="1.0" encoding="UTF-8"?>
* <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
* xmlns:flow="http://www.springframework.org/schema/webflow-config"
* xmlns:context="http://www.springframework.org/schema/context"
* xmlns="http://www.springframework.org/schema/beans"
* xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
* http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
* http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd">
*
* 在声明了命名空间之后,就为装配 Web Flow 的 bean 做好了准备,下面从流程执行器(flow executor)开始吧。
*
*
*
* 1、装配流程执行器
*
* 正如其名字所示,流程执行器(flow executor)驱动流程的执行。当用户进入一个流程时,流程执行器会为用户创建
* 并启动一个流程执行实例。当流程暂停的时候(如为用户展示视图时),流程执行器会在用户执行操作后恢复流程。
*
* 在Spring中,<flow:flow-executor> 元素会创建一个流程执行器:
*
* <flow:flow-executor id="flowExecutor"/>
*
* 尽管流程执行器负责创建和执行流程,但它并不负责加载流程定义。这个责任落在了流程注册表(flow registry)身
* 上,接下来会创建它。
*
*
*
* 2、配置流程注册表
*
* 流程注册表(flow registry)的工作是加载流程定义并让流程执行器能够使用它们。可以在 Spring 中使用
* <flow:flow-registry> 配置流程注册表,如下所示:
*
* <flow:flow-registry id="flowRegistry"
* base-path="/WEB-INF/flows">
* <flow:flow-location-pattern value="*-flow.xml"/>
* </flow:flow-registry>
*
* 在这里的声明中,流程注册表会在 "/WEB-INF/flows" 目录下查找流程定义,这是通过 base-path 属性指明的。
* 依据 <flow:flow-location-pattern> 元素的值,任何文件名以 "-flow.xml" 结尾的 XML 文件都将视为流程
* 定义。
*
* 所有的流程都是通过其 ID 来进行引用的。这里使用了 <flow:flow-location-pattern> 元素,流程的 ID 就是
* 相对于 base-path 的路径或者双星号所代表的路径。
*
* 如下示例展示了流程 ID 是如何计算的:
*
* /WEB-INF/flows/order/order-flow.xml
*
* (1)WEB-INF/flows 即 流程注册表基本路径;
* (2)order 即 流程 ID;
* (3)order-flow.xml 即 流程定义。
*
* PS:在使用流程定位模式的时候,流程定义文件相对于基本路径的路径将被用作流程的 ID。
*
* 作为另一种方式,可以去除 base-path 属性,而显式声明流程定义文件的位置:
*
* <flow:flow-registry id="flowRegistry">
* <flow:flow-location path="/WEB-INF/flows/springpizza.xml"/>
* </flow:flow-registry>
*
* 在这里,使用了 <flow:flow-location> 而不是 <flow:flow-location-pattern>,path 属性直接指明了
* "/WEB-INF/flows/springpizza.xml" 作为流程定义。当这样配置的话,流程的 ID 是从流程定义文件的文件
* 名中获得的,在这里就是 springpizza。
*
* 如果你希望更显式地指定流程 ID,那你可以通过 <flow:flow-location> 元素的 id 属性来进行设置。例如,
* 要将 pizza 作为流程 ID,可以像这样配置:
*
* <flow:flow-registry id="flowRegistry">
* <flow:flow-location id="pizza" path="/WEB-INF/flows/springpizza.xml"/>
* </flow:flow-registry>
*
*
*
* 3、处理流程请求
*
* DispatcherServlet 一般将请求分发给控制器。但是对于流程而言,需要一个 FlowHandlerMapping 来帮助
* DispatcherServlet 将流程请求发送给 Spring Web Flow。在 Spring 应用上下文中,FlowHandlerMapping
* 的配置如下:
*
* <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
* <property name="flowRegistry" ref="flowRegistry"/>
* </bean>
*
* 可以看到,FlowHandlerMapping 装配了流程注册表的引用,这样它就能知道如何将请求的 URL 匹配到流程上。例如,
* 如果有一个 ID 为 pizza 的流程,FlowHandlerMapping 就会知道如果请求的 URL 模式(相对于应用程序的上下文
* 路径)是 "/pizza" 的话,就要将其匹配到这个流程上。
*
* 然而,FlowHandlerMapping 的工作仅仅是将流程请求定向到 Spring Web Flow 上,响应请求的是 FlowHandlerAdapter。
* FlowHandlerAdapter 等同于 Spring MVC 的控制器,它会响应发送的流程请求并对其进行处理。FlowHandlerAdapter 可
* 以像下面这样装配成一个 Spring bean,如下所示:
*
* <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerAdapter">
* <property name="flowExecutor" ref="flowExecutor"/>
* </bean>
*
* 这个处理适配器是 DispatcherServlet 和 Spring Web Flow 之间的桥梁。它会处理流程请求并管理基于这些请求的流程。
* 在这里,它装配了流程执行器的引用,而后者是为所处理的请求执行流程的。
*
* 已经配置了 Spring Web Flow 所需的 bean 和组件,剩下的就是真正定义流程了。
*/
public static void main(String[] args) {
}
}
| [
"834879583@qq.com"
] | 834879583@qq.com |
a8e72862abb62ee51c0aecfbbb3e9f673b086676 | caecf26c07434fca594fd35834bafac175cda7c0 | /GSpy + JNetLib/GSpyServer/src/jwoo/apps/GSpyServer/Program.java | 6ddd8431f93c0c0cb5e519a58d1109907dcfb586 | [
"BSD-3-Clause"
] | permissive | jwoo1601/Java-Minecraft-Mods | b390dca652a893e3ef5b927094ab272db65a5d19 | 1029d5ddd35cd7289b63ff34db6bb95b67763dc7 | refs/heads/master | 2020-12-27T10:22:46.668158 | 2020-02-03T02:04:42 | 2020-02-03T02:04:42 | 237,867,633 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,344 | java | package jwoo.apps.GSpyServer;
import java.io.IOException;
import java.io.Serializable;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.zip.CRC32;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.ByteBufUtil;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import jwoo.apps.GSpyServer.packets.PacketVersion;
import jwoo.apps.GSpyServer.test.TestApp;
public class Program
{
public static void main(String[] args)
{
//TestApp testApp = new TestApp();
//testApp.Execute(args);
/* int value = 0b10110110100101110010010110111011;
byte[] values = new byte[] { 0x32, 0x5A, 0x4C, 0x1F };
long crc_start = System.currentTimeMillis();
CRC32 crc = new CRC32();
crc.update(values);
long crc_checksum = crc.getValue();
long crc_end = System.currentTimeMillis();
System.out.printf("CRC32 Elapsed Time: %dms", crc_end - crc_start);
try
{
long md5_start = System.currentTimeMillis();
MessageDigest md5 = MessageDigest.getInstance("MD5");
byte[] hash = md5.digest(values);
long md5_end = System.currentTimeMillis();
System.out.printf("MD5 Elapsed Time: %dms", md5_end - md5_start);
long sha_start = System.currentTimeMillis();
MessageDigest sha = MessageDigest.getInstance("SHA-1");
byte[] hash2 = sha.digest(values);
long sha_end = System.currentTimeMillis();
System.out.printf("SHA-1 Elapsed Time: %dms\n", sha_end - sha_start);
}
catch (NoSuchAlgorithmException e)
{
e.printStackTrace();
}
long l = Integer.MAX_VALUE, l2 = 0b1111111111111111111111111111111100000000000000000000000000000000L, l3 = 0b0000000000000000000000000000000011111111111111111111111111111111L;
long l4 = 0b1111111111111111111111111111111011111111111111111111111111111101L;
int i2 = (int) (l4 & 0xFFFFFFFFL);
byte[] bytes = new byte[] { 25, 10, 25, 3 };
for (byte b : bytes)
{
System.out.printf("%s ", Integer.toBinaryString(b));
}
System.out.println();
int sb = ((int)bytes[0]) << 25 | ((int)bytes[1]) << 17 | ((int)bytes[2]) << 9 | ((int)bytes[3]);
System.out.println(Integer.toBinaryString(sb));
int i = (int) l;
Consumer<Integer> TempDecoder = (n) ->
{
int[] extInts = new int[] { 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF };
byte result = 0;
switch (n)
{
case 1:
result = (byte) Integer.rotateLeft(sb & extInts[n-1], 7);
break;
case 2:
result = (byte) Integer.rotateLeft(sb & extInts[n-1], 15);
break;
case 3:
result = (byte) ((sb & extInts[n-1]) >>> 9);
break;
case 4:
result = (byte) (sb & extInts[n-1]);
break;
default:
break;
}
System.out.println(Integer.toBinaryString(extInts[n-1]) + " / " + result + " | " + Integer.toBinaryString(result) + " | 0x" + Integer.toHexString(result));
};
for (int k = 1; k < 5; k++)
{
TempDecoder.accept(k);
}
long start = System.nanoTime();
byte t = (byte) Integer.rotateLeft(sb & 0xFF000000, 7);
long end = System.nanoTime();
System.out.println(t);
long diff1 = end - start;
start = System.nanoTime();
t = (byte) ((sb & 0x00FF0000) >>> 17);
end = System.nanoTime();
long diff2 = end - start;
System.out.println(t + " & 1: " + diff1 + " 2: " + diff2);
// 00000000000000000000000000000000
long C1 = 0b10000000000000000000000000000001L, C2 = 0b0000000000000000000000000000000010000000000000000000000000000001L;
System.out.println(Long.toBinaryString(Long.MAX_VALUE) + " " + Long.toBinaryString(C1 << 32 | C1) + " " + Integer.toBinaryString((int)(C1 << 32 | C2) >>> 32)); */
/* byte b1 = (byte) Integer.rotateLeft(sb & 0xFF000000, 7);
System.out.println(Integer.toBinaryString(0xFF000000) + " / " + b1 + " | " + Integer.toBinaryString(b1) + " | 0x" + Integer.toHexString(b1)); */
//System.out.printf("\n%d\n%s\n%d\n", Long.BYTES, Integer.toBinaryString(sb), l3);
// System.out.printf("CRC32 Checksum: value=%s, checksum=%s", Integer.toBinaryString(value), Long.toBinaryString(crc_checksum));
try {
byte[] buf = ObjectUtils.convertToBytes(new PacketVersion((byte)18, (byte)1, (byte)16, (byte)1));
System.out.printf("length: %d\ndata:", buf.length);
for (byte b : buf)
{
System.out.print(b + " ");
}
System.out.println();
System.out.println(Charset.forName("UTF-8").decode(ByteBuffer.wrap(buf)).toString());
PacketVersion version = ObjectUtils.convertFromBytes(buf);
System.out.println(version);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static class A implements Serializable
{
private static final long serialVersionUID = 5102419072560417461L;
public A(int a, int b)
{
this.a = a;
this.b = b;
}
@Override
public String toString()
{
return String.format("a=%d, b=%d", a, b);
}
private int a;
private int b;
}
}
| [
"jkim504@myseneca.ca"
] | jkim504@myseneca.ca |
2137b914fe81282f0160167ea2ec084dbf27e1ab | 97bfca9c15c070dd0f1560b26cd7d296f65aa660 | /WEBUI/src/main/java/it/prisma/presentationlayer/webui/configs/Environment.java | 1a7baf2c79822f8cf6f46690a1a416b577cb2392 | [
"Apache-2.0"
] | permissive | pon-prisma/PrismaDemo | f0b9c6d4cff3f1a011d2880263f3831174771dcd | 0ea106c07b257628bc4ed5ad45b473c1d99407c7 | refs/heads/master | 2016-09-06T15:37:22.099913 | 2015-07-06T15:28:10 | 2015-07-06T15:28:10 | 35,619,420 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 581 | java | package it.prisma.presentationlayer.webui.configs;
public enum Environment {
// LOCALHOST("localhost"),
// REPLY("reply"),
// SIELTE("sielte"),
// INFN("infn");
//
//
// private String name;
//
// private Environment(String name){
// this.name = name;
// }
//
// public String getName(){
// return name;
// }
// public static Environment lookup(String name) {
// for(Environment env: Environment.values()){
// if(env.getName().equalsIgnoreCase(name));
// return env;
// }
// throw new IllegalArgumentException("Cannot find Environment with name: " + name);
// }
}
| [
"pon.prisma@gmail.com"
] | pon.prisma@gmail.com |
1059cf0571a7f3e53fd063b13d6e30647acfd032 | 2e6d8e8baf277d73ec2cd7a1df5cd67b8d706a7b | /client/src/alexmog/rulemastersworld/scenes/debug/RamGraph.java | cca488800788a2ae32d0c2a98b952bff5345f276 | [
"MIT"
] | permissive | vsoltys/MMO-Rulemasters-World | 8cff1f89d4f981599f2e32ddbdd6a2645808fa38 | fe2e4e42b7e5adbd524fe1e70b4520e36fe7ceb3 | refs/heads/master | 2020-03-23T20:36:28.574018 | 2015-12-29T10:34:17 | 2015-12-29T10:34:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,028 | java | package alexmog.rulemastersworld.scenes.debug;
import alexmog.rulemastersworld.gui.FadeFrame;
import de.matthiasmann.twl.GUI;
import de.matthiasmann.twl.Graph;
import de.matthiasmann.twl.model.SimpleGraphLineModel;
import de.matthiasmann.twl.model.SimpleGraphModel;
public class RamGraph extends FadeFrame {
private SimpleGraphLineModel gmRamPerFrame;
private Runtime mRuntime = Runtime.getRuntime();
public RamGraph() {
gmRamPerFrame = new SimpleGraphLineModel("default", 100, 0, 30);
gmRamPerFrame.setMinValue(0);
Graph graph = new Graph(new SimpleGraphModel(gmRamPerFrame));
graph.setTheme("/graph");
setPosition(0, 300);
setTheme("resizableframe-title");
setTitle("Memory Usage");
add(graph);
}
@Override
protected void paint(GUI gui) {
gmRamPerFrame.setMaxValue(mRuntime.totalMemory());
gmRamPerFrame.addPoint((float)(mRuntime.totalMemory() - mRuntime.freeMemory()));
super.paint(gui);
}
}
| [
"moghra_a@epitech.eu"
] | moghra_a@epitech.eu |
9046e75356b82ab8e5ffb278d74e52bb98541243 | 1338bc08cf55d1818d9525f05f87bae182bcdaa5 | /PosManager/src/main/java/com/jc/pico/ext/pg/PayBean.java | b6df0dc73997c378e47110a8f4f5292f4f6b4f11 | [] | no_license | JamesAreuming/PosManager | 83ebf1615666cdaf8530e3e037522966d66449ef | 0dae16f2efccfffeee09da16a2cdd5d0d939766a | refs/heads/master | 2023-03-23T12:12:28.227846 | 2021-03-15T07:37:01 | 2021-03-15T07:37:01 | 313,203,570 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,998 | java | /**
* <pre>
* Filename : PayBean.java
* Function : payment bean
* Comment :
* History :
*
* Version : 1.0
* Author :
* </pre>
*/
package com.jc.pico.ext.pg;
public class PayBean {
private String pgKind = null; // PG사 종류(공통코드 356), PayOnline, BAK_pg, etc.
private String merchantID = null; // PG 정보, merchant ID
private String privateKey = null; // PG 정보, private key
private String paymentKey = null; // PG 정보, payment key
private String payMethod = null; // 결제수단, CARD
private String transactionId = null; // PG사 거래 ID (결제취소용)
private String orderId = null; // 주문 ID
private double amount = 0; // 금액
private String currency = null; // 통화기호, ISO 3자리
private String cardHolderName = null; // 카드 소유자명 (카드에 명기된 성명)
private String cardNumber = null; // 카드번호
private String cardExpDate = null; // 유효기한(MMYY)
private String cardCvv = null; // CVC/CVV 3자리
private String country = null; // 고객 거주 나라 (ISO 3116 alphabet 2)
public void setPgKind(String pgKind) {this.pgKind = pgKind;}
public String getPgKind() {return this.pgKind;}
public void setMerchantID(String merchantID) {this.merchantID = merchantID;}
public String getMerchantID() {return this.merchantID;}
public void setPrivateKey(String privateKey) {this.privateKey = privateKey;}
public String getPrivateKey() {return this.privateKey;}
public void setPaymentKey(String paymentKey) {this.paymentKey = paymentKey;}
public String getPaymentKey() {return this.paymentKey;}
public void setPayMethod(String payMethod) {this.payMethod = payMethod;}
public String getPayMethod() {return this.payMethod;}
public void setTransactionId(String transactionId) {this.transactionId = transactionId;}
public String getTransactionId() {return this.transactionId;}
public void setOrderId(String orderId) {this.orderId = orderId;}
public String getOrderId() {return this.orderId;}
public void setAmount(double amount) {this.amount = amount;}
public double getAmount() {return this.amount;}
public void setCurrency(String currency) {this.currency = currency;}
public String getCurrency() {return this.currency;}
public void setCardHolderName(String cardHolderName) {this.cardHolderName = cardHolderName;}
public String getCardHolderName() {return this.cardHolderName;}
public void setCardNumber(String cardNumber) {this.cardNumber = cardNumber;}
public String getCardNumber() {return this.cardNumber;}
public void setCardExpDate(String cardExpDate) {this.cardExpDate = cardExpDate;}
public String getCardExpDate() {return this.cardExpDate;}
public void setCardCvv(String cardCvv) {this.cardCvv = cardCvv;}
public String getCardCvv() {return this.cardCvv;}
public String getCountry() {return country;}
public void setCountry(String country) {this.country = country;}
}
| [
"hothihi5@gmail.com"
] | hothihi5@gmail.com |
d19888891658fd2f45d841477c5f986520c8ac24 | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava16/Foo345Test.java | f07f36459764c115c68064933f12fe2ef803a3d5 | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 482 | java | package applicationModulepackageJava16;
import org.junit.Test;
public class Foo345Test {
@Test
public void testFoo0() {
new Foo345().foo0();
}
@Test
public void testFoo1() {
new Foo345().foo1();
}
@Test
public void testFoo2() {
new Foo345().foo2();
}
@Test
public void testFoo3() {
new Foo345().foo3();
}
@Test
public void testFoo4() {
new Foo345().foo4();
}
@Test
public void testFoo5() {
new Foo345().foo5();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
f93125341b8172e58b1f96b52e0cf98e0536be08 | 3c6f4bb030a42d19ce8c25a931138641fb6fd495 | /finance-user/finance-user-model/src/main/java/com/hongkun/finance/user/utils/IDCardUtil.java | bacadc65a7697b27209551e8084dcf98f2eecf73 | [] | no_license | happyjianguo/finance-hkjf | 93195df26ebb81a8b951a191e25ab6267b73aaca | 0389a6eac966ee2e4887b6db4f99183242ba2d4e | refs/heads/master | 2020-07-28T13:42:40.924633 | 2019-08-03T00:22:19 | 2019-08-03T00:22:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,115 | java | package com.hongkun.finance.user.utils;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Map;
/**
* add by mzx 2016-08-29
* 身份证验证的工具(支持5位或18位省份证)
* 身份证号码结构:
* 17位数字和1位校验码:6位地址码数字,8位生日数字,3位出生时间顺序号,1位校验码。
* 地址码(前6位):表示对象常住户口所在县(市、镇、区)的行政区划代码,按GB/T2260的规定执行。
* 出生日期码,(第七位 至十四位):表示编码对象出生年、月、日,按GB按GB/T7408的规定执行,年、月、日代码之间不用分隔符。
* 顺序码(第十五位至十七位):表示在同一地址码所标示的区域范围内,对同年、同月、同日出生的人编订的顺序号,
* 顺序码的奇数分配给男性,偶数分配给女性。
* 校验码(第十八位数):
* 十七位数字本体码加权求和公式 s = sum(Ai*Wi), i = 0,,16,先对前17位数字的权求和;
* Ai:表示第i位置上的身份证号码数字值.Wi:表示第i位置上的加权因.Wi: 7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2;
* 计算模 Y = mod(S, 11)
* 通过模得到对应的校验码 Y: 0 1 2 3 4 5 6 7 8 9 10 校验码: 1 0 X 9 8 7 6 5 4 3 2
*/
public class IDCardUtil {
static final Map<Integer, String> zoneNum = new HashMap<>();
static {
zoneNum.put(11, "北京");
zoneNum.put(12, "天津");
zoneNum.put(13, "河北");
zoneNum.put(14, "山西");
zoneNum.put(15, "内蒙古");
zoneNum.put(21, "辽宁");
zoneNum.put(22, "吉林");
zoneNum.put(23, "黑龙江");
zoneNum.put(31, "上海");
zoneNum.put(32, "江苏");
zoneNum.put(33, "浙江");
zoneNum.put(34, "安徽");
zoneNum.put(35, "福建");
zoneNum.put(36, "江西");
zoneNum.put(37, "山东");
zoneNum.put(41, "河南");
zoneNum.put(42, "湖北");
zoneNum.put(43, "湖南");
zoneNum.put(44, "广东");
zoneNum.put(45, "广西");
zoneNum.put(46, "海南");
zoneNum.put(50, "重庆");
zoneNum.put(51, "四川");
zoneNum.put(52, "贵州");
zoneNum.put(53, "云南");
zoneNum.put(54, "西藏");
zoneNum.put(61, "陕西");
zoneNum.put(62, "甘肃");
zoneNum.put(63, "青海");
zoneNum.put(64, "新疆");
zoneNum.put(71, "台湾");
zoneNum.put(81, "香港");
zoneNum.put(82, "澳门");
zoneNum.put(91, "外国");
}
static final int[] PARITYBIT = {'1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'};
static final int[] POWER_LIST = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2};
/**
* 身份证验证
*@param s 号码内容
*@return 是否有效 null和"" 都是false
*/
public static boolean isIDCard(String certNo){
if(certNo == null || (certNo.length() != 15 && certNo.length() != 18))
return false;
final char[] cs = certNo.toUpperCase().toCharArray();
//校验位数
int power = 0;
for(int i=0; i<cs.length; i++){
if(i==cs.length-1 && cs[i] == 'X')
break;//最后一位可以 是X或x
if(cs[i]<'0' || cs[i]>'9')
return false;
if(i < cs.length -1){
power += (cs[i] - '0') * POWER_LIST[i];
}
}
//校验区位码
if(!zoneNum.containsKey(Integer.valueOf(certNo.substring(0,2)))){
return false;
}
//校验年份
String year = certNo.length() == 15 ? getIdcardCalendar() + certNo.substring(6,8) :certNo.substring(6, 10);
final int iyear = Integer.parseInt(year);
if(iyear < 1900 || iyear > Calendar.getInstance().get(Calendar.YEAR))
return false;//1900年的PASS,超过今年的PASS
//校验月份
String month = certNo.length() == 15 ? certNo.substring(8, 10) : certNo.substring(10,12);
final int imonth = Integer.parseInt(month);
if(imonth <1 || imonth >12){
return false;
}
//校验天数
String day = certNo.length() ==15 ? certNo.substring(10, 12) : certNo.substring(12, 14);
final int iday = Integer.parseInt(day);
if(iday < 1 || iday > 31)
return false;
//校验"校验码"
if(certNo.length() == 15)
return true;
return cs[cs.length -1 ] == PARITYBIT[power % 11];
}
private static int getIdcardCalendar() {
GregorianCalendar curDay = new GregorianCalendar();
int curYear = curDay.get(Calendar.YEAR);
return Integer.parseInt(String.valueOf(curYear).substring(2));
}
public static void main(String[] args) {
boolean mark = isIDCard("23");
System.out.println(mark);
}
}
| [
"zc.ding@foxmail.com"
] | zc.ding@foxmail.com |
c8550b1ddca8729130989825bc22bc29d9ffcb5f | 27511a2f9b0abe76e3fcef6d70e66647dd15da96 | /src/com/instagram/common/k/a/b.java | 750ebb1f7964c94df2925d8bfe3b2178bd9a931b | [] | no_license | biaolv/com.instagram.android | 7edde43d5a909ae2563cf104acfc6891f2a39ebe | 3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de | refs/heads/master | 2022-05-09T15:05:05.412227 | 2016-07-21T03:48:36 | 2016-07-21T03:48:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 380 | java | package com.instagram.common.k.a;
import java.util.concurrent.atomic.AtomicLong;
final class b
implements Runnable
{
b(c paramc) {}
public final void run()
{
if ((c.a(a).get() > c.b(a)) || (a.a() > c.c(a))) {
c.d(a);
}
}
}
/* Location:
* Qualified Name: com.instagram.common.k.a.b
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
57d0142bcfc6350df08c17214ebb4814d5539ac8 | d6267a448e056b47d79cc716d18edec6dd91154c | /modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/IgniteCacheContinuousQueryNoUnsubscribeTest.java | d7beb02ec867469f4c55db55a2d0434da52faa40 | [
"Apache-2.0",
"LicenseRef-scancode-gutenberg-2020",
"CC0-1.0",
"BSD-3-Clause"
] | permissive | sk8tz/ignite | 1635163cc2309aa0f9fd65734317af861679679f | 2774d879a72b0eeced862cc9a3fbd5d9c5ff2d72 | refs/heads/master | 2023-04-19T03:07:50.202953 | 2017-01-04T21:01:13 | 2017-01-04T21:01:13 | 78,094,618 | 0 | 0 | Apache-2.0 | 2023-04-17T19:45:36 | 2017-01-05T08:30:14 | Java | UTF-8 | Java | false | false | 4,718 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.cache.query.continuous;
import java.util.concurrent.atomic.AtomicInteger;
import javax.cache.configuration.FactoryBuilder;
import javax.cache.event.CacheEntryEvent;
import javax.cache.event.CacheEntryListenerException;
import javax.cache.event.CacheEntryUpdatedListener;
import org.apache.ignite.Ignite;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
import org.apache.ignite.cache.query.ContinuousQuery;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
/**
*
*/
public class IgniteCacheContinuousQueryNoUnsubscribeTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
/** */
private static AtomicInteger cntr = new AtomicInteger();
/** */
private boolean client;
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
cfg.setPeerClassLoadingEnabled(false);
cfg.setClientMode(client);
CacheConfiguration ccfg = new CacheConfiguration();
cfg.setCacheConfiguration(ccfg);
return cfg;
}
/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
super.beforeTest();
startGridsMultiThreaded(3);
}
/** {@inheritDoc} */
@Override protected void afterTest() throws Exception {
stopAllGrids();
super.afterTest();
}
/**
* @throws Exception If failed.
*/
public void testNoUnsubscribe() throws Exception {
checkNoUnsubscribe(false);
}
/**
* @throws Exception If failed.
*/
public void testNoUnsubscribeClient() throws Exception {
checkNoUnsubscribe(true);
}
/**
* @param client Client node flag.
* @throws Exception If failed.
*/
private void checkNoUnsubscribe(boolean client) throws Exception {
cntr.set(0);
this.client = client;
try (Ignite ignite = startGrid(3)) {
ContinuousQuery qry = new ContinuousQuery();
qry.setLocalListener(new CacheEntryUpdatedListener() {
@Override public void onUpdated(Iterable evts) {
// No-op.
}
});
qry.setRemoteFilterFactory(FactoryBuilder.factoryOf(CacheTestRemoteFilter.class));
qry.setAutoUnsubscribe(false);
ignite.cache(null).query(qry);
ignite.cache(null).put(1, 1);
assertEquals(1, cntr.get());
}
this.client = false;
try (Ignite newSrv = startGrid(3)) {
Integer key = primaryKey(newSrv.cache(null));
newSrv.cache(null).put(key, 1);
assertEquals(2, cntr.get());
for (int i = 0; i < 10; i++)
ignite(0).cache(null).put(i, 1);
assertEquals(12, cntr.get());
}
for (int i = 10; i < 20; i++)
ignite(0).cache(null).put(i, 1);
assertEquals(22, cntr.get());
}
/**
*
*/
public static class CacheTestRemoteFilter implements CacheEntryEventSerializableFilter<Object, Object> {
/** {@inheritDoc} */
@Override public boolean evaluate(CacheEntryEvent<?, ?> evt) throws CacheEntryListenerException {
cntr.incrementAndGet();
return true;
}
}
}
| [
"sboikov@gridgain.com"
] | sboikov@gridgain.com |
50447343fe6eeec0c6f778590e7c14484ed7c287 | ceab19a7632794a11896cdef7037725550b5269f | /src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin.tests/src/org/robotframework/ide/eclipse/main/plugin/tableeditor/source/colouring/TokenTypeBasedRuleTest.java | 44180dbf759a529305daf5d78116ee8842827145 | [
"Apache-2.0"
] | permissive | aihuasxy/RED | 79729b0b8c9b8b3c837b7fc6eaff3010aaa25ebf | aab80218fa42656310ca1ee97b87c039ae988a0a | refs/heads/master | 2021-01-13T04:25:20.808371 | 2017-01-10T13:28:14 | 2017-01-10T13:28:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,314 | java | package org.robotframework.ide.eclipse.main.plugin.tableeditor.source.colouring;
import static com.google.common.collect.Lists.newArrayList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.robotframework.red.junit.Conditions.absent;
import static org.robotframework.red.junit.Conditions.present;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.rules.Token;
import org.junit.Test;
import org.rf.ide.core.testdata.text.read.IRobotLineElement;
import org.rf.ide.core.testdata.text.read.IRobotTokenType;
import org.rf.ide.core.testdata.text.read.VersionAvailabilityInfo;
import org.rf.ide.core.testdata.text.read.VersionAvailabilityInfo.VersionAvailabilityInfoBuilder;
import org.rf.ide.core.testdata.text.read.recognizer.RobotToken;
import org.rf.ide.core.testdata.text.read.separators.Separator;
import org.robotframework.ide.eclipse.main.plugin.tableeditor.source.colouring.ISyntaxColouringRule.PositionedTextToken;
import com.google.common.base.Optional;
public class TokenTypeBasedRuleTest {
private final IRobotTokenType recognizedType1 = new RecognizedTokenTypeMock1();
private final IRobotTokenType recognizedType2 = new RecognizedTokenTypeMock2();
private final IRobotTokenType unrecognizedType = new UnrecognizedTokenTypeMock();
private final TokenTypeBasedRule testedRule = new TokenTypeBasedRule(new Token("token"),
newArrayList(recognizedType1, recognizedType2));
@Test
public void ruleIsApplicableOnlyForRobotTokens() {
assertThat(testedRule.isApplicable(new RobotToken())).isTrue();
assertThat(testedRule.isApplicable(new Separator())).isFalse();
assertThat(testedRule.isApplicable(mock(IRobotLineElement.class))).isFalse();
}
@Test
public void tokenIsRecognized_whenItHasExpectedTypeAtFirstPosition_1() {
final RobotToken token = RobotToken.create("text", newArrayList(recognizedType1, recognizedType2));
token.setStartOffset(42);
final Optional<PositionedTextToken> evaluatedToken = testedRule.evaluate(token, 0, new ArrayList<IRobotLineElement>());
assertThat(evaluatedToken).is(present());
assertThat(evaluatedToken.get().getToken().getData()).isEqualTo("token");
assertThat(evaluatedToken.get().getPosition())
.isEqualTo(new Position(token.getStartOffset(), token.getText().length()));
}
@Test
public void tokenIsRecognized_whenItHasExpectedTypeAtFirstPosition_2() {
final RobotToken token = RobotToken.create("text", newArrayList(recognizedType2, recognizedType1));
token.setStartOffset(42);
final Optional<PositionedTextToken> evaluatedToken = testedRule.evaluate(token, 0,
new ArrayList<IRobotLineElement>());
assertThat(evaluatedToken).is(present());
assertThat(evaluatedToken.get().getToken().getData()).isEqualTo("token");
assertThat(evaluatedToken.get().getPosition())
.isEqualTo(new Position(token.getStartOffset(), token.getText().length()));
}
@Test
public void tokenIsRecognized_whenItHasExpectedTypeAtFirstPositionRegardlesGivenOffsetInside() {
final RobotToken token = RobotToken.create("text", newArrayList(recognizedType2, recognizedType1));
token.setStartOffset(42);
final int offsetInside = new Random().nextInt(token.getText().length());
final Optional<PositionedTextToken> evaluatedToken = testedRule.evaluate(token, offsetInside,
new ArrayList<IRobotLineElement>());
assertThat(evaluatedToken).is(present());
assertThat(evaluatedToken.get().getToken().getData()).isEqualTo("token");
assertThat(evaluatedToken.get().getPosition())
.isEqualTo(new Position(token.getStartOffset(), token.getText().length()));
}
@Test
public void tokenIsNotRecognized_whenItHasUnrecognizedType() {
final RobotToken token = RobotToken.create("text", newArrayList(unrecognizedType));
token.setStartOffset(42);
final Optional<PositionedTextToken> evaluatedToken = testedRule.evaluate(token, 0,
new ArrayList<IRobotLineElement>());
assertThat(evaluatedToken).is(absent());
}
@Test
public void tokenIsNotRecognized_evenIfItHasRecognizedTypeButNotOnFirstPosition() {
final RobotToken token = RobotToken.create("text",
newArrayList(unrecognizedType, recognizedType1, recognizedType2));
token.setStartOffset(42);
final Optional<PositionedTextToken> evaluatedToken = testedRule.evaluate(token, 0,
new ArrayList<IRobotLineElement>());
assertThat(evaluatedToken).is(absent());
}
@Test
public void tokenIsNotRecognized_whenItHasUnrecognizedTypeRegardlesGivenOffsetInside() {
final RobotToken token = RobotToken.create("text", newArrayList(unrecognizedType));
token.setStartOffset(42);
final int offsetInside = new Random().nextInt(token.getText().length());
final Optional<PositionedTextToken> evaluatedToken = testedRule.evaluate(token, offsetInside,
new ArrayList<IRobotLineElement>());
assertThat(evaluatedToken).is(absent());
}
private class RecognizedTokenTypeMock1 implements IRobotTokenType {
@Override
public List<String> getRepresentation() {
return new ArrayList<>();
}
@Override
public List<VersionAvailabilityInfo> getVersionAvailabilityInfos() {
return newArrayList(VersionAvailabilityInfoBuilder.create().build());
}
@Override
public VersionAvailabilityInfo findVersionAvailablilityInfo(final String text) {
return VersionAvailabilityInfoBuilder.create().build();
}
}
private class RecognizedTokenTypeMock2 extends RecognizedTokenTypeMock1 {
// nothing to reimplement
}
private class UnrecognizedTokenTypeMock extends RecognizedTokenTypeMock1 {
// nothing to reimplement
}
}
| [
"test009@nsn.com.not.available"
] | test009@nsn.com.not.available |
c56ef490d11cc82ea1e80c7fc89880dabe5dcdf6 | 2817e620defafc279aea7abd7382d9907c6f8bd1 | /manager/src/main/java/io/atomix/manager/util/ResourceManagerTypeResolver.java | c5e69f8cac838d1fafce418bb50925db701c4315 | [
"Apache-2.0"
] | permissive | dmvk/atomix | 23f820bc4e97a3088982809addbfe8b698414728 | 559f25a06324746d7fbb71947ac2c2b546386fa7 | refs/heads/master | 2021-01-22T04:41:01.901860 | 2016-04-13T19:36:37 | 2016-04-13T19:36:37 | 56,785,227 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,012 | java | /*
* Copyright 2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
package io.atomix.manager.util;
import io.atomix.catalyst.serializer.SerializableTypeResolver;
import io.atomix.catalyst.serializer.SerializerRegistry;
import io.atomix.manager.internal.*;
import io.atomix.resource.ResourceType;
import io.atomix.resource.internal.InstanceTypeResolver;
import io.atomix.resource.internal.ResourceCommand;
import io.atomix.resource.internal.ResourceQuery;
/**
* Resource manager serializable type resolver.
*
* @author <a href="http://github.com/kuujo>Jordan Halterman</a>
*/
public class ResourceManagerTypeResolver implements SerializableTypeResolver {
@Override
public void resolve(SerializerRegistry registry) {
// Register instance types.
registry.resolve(new InstanceTypeResolver());
// Register resource state machine types.
registry.register(ResourceCommand.class, -50);
registry.register(ResourceQuery.class, -51);
registry.register(ResourceCommand.Config.class, -52);
registry.register(ResourceCommand.Delete.class, -53);
registry.register(ResourceType.class, -54);
// Register resource manager types.
registry.register(GetResource.class, -58);
registry.register(GetResourceIfExists.class, -59);
registry.register(GetResourceKeys.class, -60);
registry.register(ResourceExists.class, -61);
registry.register(CloseResource.class, -62);
registry.register(DeleteResource.class, -63);
}
}
| [
"jordan.halterman@gmail.com"
] | jordan.halterman@gmail.com |
9eede2ac04d47f2425839e300857ac30bec9b3d4 | f0ec508f4b480d8d5399a2880e4cbb0533fc2fc1 | /com.gzedu.xlims.biz/src/main/java/com/gzedu/xlims/serviceImpl/exam/wk/dto/ExamRoomDistribute.java | a0df16a0c0264c4a512d9bfec8820912547ed0b3 | [] | no_license | lizm335/MyLizm | a327bd4d08a33c79e9b6ef97144d63dae7114a52 | 1bcca82395b54d431fb26817e61a294f9d7dd867 | refs/heads/master | 2020-03-11T17:25:25.687426 | 2018-04-19T03:10:28 | 2018-04-19T03:10:28 | 130,146,458 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,794 | java | /**
* Copyright(c) 2013 版权所有:广州远程教育中心 www.969300.com
*/
package com.gzedu.xlims.serviceImpl.exam.wk.dto;
/**
* 功能说明:考场分配
*
* @author 李明 liming@eenet.com
* @Date 2016年7月14日
* @version 2.5
*
*/
public class ExamRoomDistribute {
String DISTRIBUTE_ID;// String 考室分配ID 否
String EXAM_ROOM_ID;// String 考室ID 否
String PROJECT_TERM_ID;// String 考试安排ID 否
String EXAM_ROOM_TYPE;// String 考试形式 是 线下offline 在线online
String START_DT;// String 开始时间 是
String FINISH_DT;// String 结束时间 是
/**
* @param dISTRIBUTE_ID
* @param eXAM_ROOM_ID
* @param pROJECT_TERM_ID
*/
public ExamRoomDistribute(String dISTRIBUTE_ID, String eXAM_ROOM_ID, String pROJECT_TERM_ID) {
super();
DISTRIBUTE_ID = dISTRIBUTE_ID;
EXAM_ROOM_ID = eXAM_ROOM_ID;
PROJECT_TERM_ID = pROJECT_TERM_ID;
}
public String getDISTRIBUTE_ID() {
return DISTRIBUTE_ID;
}
public void setDISTRIBUTE_ID(String dISTRIBUTE_ID) {
DISTRIBUTE_ID = dISTRIBUTE_ID;
}
public String getEXAM_ROOM_ID() {
return EXAM_ROOM_ID;
}
public void setEXAM_ROOM_ID(String eXAM_ROOM_ID) {
EXAM_ROOM_ID = eXAM_ROOM_ID;
}
public String getPROJECT_TERM_ID() {
return PROJECT_TERM_ID;
}
public void setPROJECT_TERM_ID(String pROJECT_TERM_ID) {
PROJECT_TERM_ID = pROJECT_TERM_ID;
}
public String getEXAM_ROOM_TYPE() {
return EXAM_ROOM_TYPE;
}
public void setEXAM_ROOM_TYPE(String eXAM_ROOM_TYPE) {
EXAM_ROOM_TYPE = eXAM_ROOM_TYPE;
}
public String getSTART_DT() {
return START_DT;
}
public void setSTART_DT(String sTART_DT) {
START_DT = sTART_DT;
}
public String getFINISH_DT() {
return FINISH_DT;
}
public void setFINISH_DT(String fINISH_DT) {
FINISH_DT = fINISH_DT;
}
}
| [
"lizengming@eenet.com"
] | lizengming@eenet.com |
9291555bf7fab5d82aba711a1ef820e2f1507c9f | e08314b8c22df72cf3aa9e089624fc511ff0d808 | /src/selfdefine/com/ces/component/sdzycspbm/dao/SdzycspbmDao.java | dfbfb1554c95b1e57bb5425a0cb97de0dbd13e3e | [] | no_license | quxiongwei/qhzyc | 46acd4f6ba41ab3b39968071aa114b24212cd375 | 4b44839639c033ea77685b98e65813bfb269b89d | refs/heads/master | 2020-12-02T06:38:21.581621 | 2017-07-12T02:06:10 | 2017-07-12T02:06:10 | 96,864,946 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 246 | java | package com.ces.component.sdzycspbm.dao;
import com.ces.component.trace.dao.base.TraceShowModuleStringIDDao;
import com.ces.xarch.core.entity.StringIDEntity;
public interface SdzycspbmDao extends TraceShowModuleStringIDDao<StringIDEntity> {
}
| [
"qu.xiongwei@cesgroup.com.cn"
] | qu.xiongwei@cesgroup.com.cn |
48b40b79d728fa86b0ef353f68329d9f7dbcb84b | 73b9f35b96af8c5b17526484c867e524f94dd1ec | /src/main/java/com/fuguo/net/oneclient/SocketClient.java | d9f157f6edde1bfe7cf5193d4ddfb790166a4299 | [] | no_license | wangfuguo/spring-boot-demo | 73b9b1738bf874c2e09807a4f24c5181f4dc8d05 | 8111a8c8c9f6c0abdcc6767f31c17966a9c68464 | refs/heads/master | 2021-05-03T09:03:58.207198 | 2018-04-09T01:48:49 | 2018-04-09T01:48:49 | 120,569,610 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,152 | java | package com.fuguo.net.oneclient;
import java.io.*;
import java.net.Socket;
/**
* @author 00938658-王富国
* @description: TODO
* @date 2018-02-05 13:37
* @since V1.0.0
*/
public class SocketClient {
public static void main(String[] args) {
try {
Socket socket = new Socket("127.0.0.1", 2018);
socket.setSoTimeout(60000);
PrintWriter printWriter = new PrintWriter(socket.getOutputStream(), true);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String result = "";
while (result.indexOf("bye") == -1) {
BufferedReader sysBuff = new BufferedReader(new InputStreamReader(System.in));
printWriter.println(sysBuff.readLine());
printWriter.flush();
result = bufferedReader.readLine();
System.out.println("Server say : " + result);
}
printWriter.close();
bufferedReader.close();
socket.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
| [
"wangfuguo_wfg@163.com"
] | wangfuguo_wfg@163.com |
ab5f8b82fdffcf0a80a03ce62412847dedd09543 | f766baf255197dd4c1561ae6858a67ad23dcda68 | /app/src/main/java/com/tencent/mm/protocal/c/or.java | d8c2ff85a7913132ed02f4f64eb85a74f91f371c | [] | no_license | jianghan200/wxsrc6.6.7 | d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849 | eb6c56587cfca596f8c7095b0854cbbc78254178 | refs/heads/master | 2020-03-19T23:40:49.532494 | 2018-06-12T06:00:50 | 2018-06-12T06:00:50 | 137,015,278 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,938 | java | package com.tencent.mm.protocal.c;
import f.a.a.b;
import java.util.LinkedList;
public final class or
extends bhp
{
public String rsU;
public String rsV;
protected final int a(int paramInt, Object... paramVarArgs)
{
if (paramInt == 0)
{
paramVarArgs = (f.a.a.c.a)paramVarArgs[0];
if (this.six == null) {
throw new b("Not all required fields were included: BaseResponse");
}
if (this.six != null)
{
paramVarArgs.fV(1, this.six.boi());
this.six.a(paramVarArgs);
}
if (this.rsU != null) {
paramVarArgs.g(2, this.rsU);
}
if (this.rsV != null) {
paramVarArgs.g(3, this.rsV);
}
return 0;
}
if (paramInt == 1) {
if (this.six == null) {
break label415;
}
}
label415:
for (int i = f.a.a.a.fS(1, this.six.boi()) + 0;; i = 0)
{
paramInt = i;
if (this.rsU != null) {
paramInt = i + f.a.a.b.b.a.h(2, this.rsU);
}
i = paramInt;
if (this.rsV != null) {
i = paramInt + f.a.a.b.b.a.h(3, this.rsV);
}
return i;
if (paramInt == 2)
{
paramVarArgs = new f.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = bhp.a(paramVarArgs); paramInt > 0; paramInt = bhp.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.cJS();
}
}
if (this.six != null) {
break;
}
throw new b("Not all required fields were included: BaseResponse");
}
if (paramInt == 3)
{
Object localObject1 = (f.a.a.a.a)paramVarArgs[0];
or localor = (or)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
switch (paramInt)
{
default:
return -1;
case 1:
paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
Object localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new fl();
localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (boolean bool = true; bool; bool = ((fl)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, bhp.a((f.a.a.a.a)localObject2))) {}
localor.six = ((fl)localObject1);
paramInt += 1;
}
case 2:
localor.rsU = ((f.a.a.a.a)localObject1).vHC.readString();
return 0;
}
localor.rsV = ((f.a.a.a.a)localObject1).vHC.readString();
return 0;
}
return -1;
}
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes5-dex2jar.jar!/com/tencent/mm/protocal/c/or.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"526687570@qq.com"
] | 526687570@qq.com |
f14384dfd966c5e061cb36c62e2805bbdd9b9843 | 1c2fc95d66ea34fdcb4f2352c8d2d362b3b5b367 | /Test/net/net/multicast/MulticastClient.java | 37ff781b82e9a5f57c4b87982928bcd07322cbbb | [] | no_license | lryxxh/Study | 2473647837535055af9cf3f6c048a81cc09be2bb | 47c556afeff8223aba3e324407fe6af97071884a | refs/heads/master | 2020-12-02T12:46:27.455563 | 2017-07-08T03:07:22 | 2017-07-08T03:07:22 | 96,589,823 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 899 | java | /**
*
*/
package net.multicast;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
public class MulticastClient{
String groupHost="192.168.20.1"; //组播组虚拟IP
int port=5678; //端口
public MulticastClient(){
try{
byte[] message = "Hello,This is Client.".getBytes(); //发送信息
InetAddress inetAddress = InetAddress.getByName(groupHost); //组播地址
DatagramPacket datagramPacket= new DatagramPacket(message, message.length, inetAddress, port); //发送数据报
DatagramSocket socket = new DatagramSocket(); //DatagramSocket实例
socket.send(datagramPacket); //发送数据
socket.close(); //关闭端口
}
catch (Exception exception) {
exception.printStackTrace(); //输出错误信息
}
}
public static void main(String[] args){
new MulticastClient();
}
} | [
"lryxxh@163.com"
] | lryxxh@163.com |
c29a33640d67a36536578b5a73622a228c2afd7f | 5741045375dcbbafcf7288d65a11c44de2e56484 | /reddit-decompilada/com/google/android/gms/internal/zzek.java | 3d69eb6e1915ac26d2cbba01b0dad903f1c1f0bc | [] | no_license | miarevalo10/ReporteReddit | 18dd19bcec46c42ff933bb330ba65280615c281c | a0db5538e85e9a081bf268cb1590f0eeb113ed77 | refs/heads/master | 2020-03-16T17:42:34.840154 | 2018-05-11T10:16:04 | 2018-05-11T10:16:04 | 132,843,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 714 | java | package com.google.android.gms.internal;
import java.lang.reflect.InvocationTargetException;
public final class zzek extends zzet {
public zzek(zzdm com_google_android_gms_internal_zzdm, String str, String str2, zzaz com_google_android_gms_internal_zzaz, int i) {
super(com_google_android_gms_internal_zzdm, str, str2, com_google_android_gms_internal_zzaz, i, 61);
}
protected final void mo1870a() throws IllegalAccessException, InvocationTargetException {
long longValue = ((Long) this.c.invoke(null, new Object[]{this.a.m5845a(), Boolean.valueOf(this.a.f7227l)})).longValue();
synchronized (this.b) {
this.b.f17632P = Long.valueOf(longValue);
}
}
}
| [
"mi.arevalo10@uniandes.edu.co"
] | mi.arevalo10@uniandes.edu.co |
84794f334110978ff472282fe85276eb58f85236 | 425a3529a26970513f885b5cfb4416aa37586b7e | /12-Custom annotations/src/main/java/com/epsilon/training/annotations/processors/JsonSerializer.java | 8b7dc89bbe3e28eb1008f8e6bbab73a9289d6bd9 | [] | no_license | kayartaya-vinod/2021-MARCH-EPSILON-JAVA-SPRING | 675f6d3858575864fcc6cba0b2c0944c4d7eab64 | fa02706b298dd1b2e6fe1b3946acf5254a4bc76a | refs/heads/master | 2023-03-22T14:27:00.801084 | 2021-03-19T09:50:54 | 2021-03-19T09:50:54 | 343,323,964 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,939 | java | package com.epsilon.training.annotations.processors;
import java.io.PrintWriter;
import java.io.Writer;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import com.epsilon.training.annotations.JsonProperty;
import com.epsilon.training.annotations.JsonSerializable;
import com.epsilon.training.entity.JsonIgnored;
import com.epsilon.training.exceptions.NotJsonSerializableException;
public class JsonSerializer {
public void serialize(Writer writer, Object obj) {
String json = this.serialize(obj);
try(PrintWriter out = new PrintWriter(writer);){
out.print(json);
}
}
public String serialize(Object obj) {
if (obj == null) {
throw new NotJsonSerializableException("Cannot serialize a null object!");
}
// cls represents the class, obj is an object of
Class<?> cls = obj.getClass();
if (!cls.isAnnotationPresent(JsonSerializable.class)) {
throw new NotJsonSerializableException("The class " + cls.getName() + " does not have @JsonSerializable");
}
List<String> kvList = new ArrayList<>();
for (Field f : cls.getDeclaredFields()) {
if (!f.isAnnotationPresent(JsonIgnored.class)) {
try {
String label = f.getName();
JsonProperty ann = f.getAnnotation(JsonProperty.class);
if(ann!=null) {
label = ann.label();
if(label ==null || label.trim().equals("")) {
label = f.getName();
}
}
f.setAccessible(true);
String kv = String.format("\"%s\": \"%s\"", label, f.get(obj));
kvList.add(kv);
} catch (Exception e) {
System.err.println("Erorr for field " + f.getName() + " - " + e.getMessage());
}
}
}
StringBuffer sb = new StringBuffer(1000);
sb.append("{");
for (int i = 0, j = kvList.size() - 1; i < j; i++) {
sb.append(kvList.get(i));
sb.append(", ");
}
sb.append(kvList.get(kvList.size() - 1));
sb.append("}");
return sb.toString();
}
}
| [
"kayartaya.vinod@gmail.com"
] | kayartaya.vinod@gmail.com |
0486874d173701aba8fa062883c350596c27728e | bbcbd7f4d53bca0f9b115b9941e174c5ff1457fa | /LibrariesTest/LibrariesTestApp/src/androidTest/java/com/chdryra/android/librariestest/remoteapifetchers/test/GpUtcOffsetTest.java | 4ef8206fb838223bc8962601f2af7d47d8d7a3b3 | [] | no_license | chdryra/Android | 8ed62ff2123813eb693c7f882941bdb5cb9f2571 | 6567c7e38bb9efa602ea9a02fc04abfe2a306984 | refs/heads/master | 2021-06-02T19:32:13.121322 | 2018-04-18T15:53:25 | 2018-04-18T15:53:25 | 24,196,984 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,605 | java | /*
* Copyright (c) 2015, Rizwan Choudrey - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Author: Rizwan Choudrey
* Date: 10 March, 2015
*/
package com.chdryra.android.librariestest.remoteapifetchers.test;
import android.test.suitebuilder.annotation.SmallTest;
import com.chdryra.android.librariestest.remoteapifetchers.test.TestUtils.JsonMaker;
import com.chdryra.android.remoteapifetchers.GpUtcOffset;
import junit.framework.TestCase;
import org.json.JSONObject;
/**
* Created by: Rizwan Choudrey
* On: 10/03/2015
* Email: rizwan.choudrey@gmail.com
*/
public class GpUtcOffsetTest extends TestCase {
@SmallTest
public void testGpUtcOffset() {
JSONObject result = JsonMaker.newJsonObject(getTestString(720));
GpUtcOffset parsed = new GpUtcOffset(result);
assertTrue(parsed.isValid());
assertEquals(720, parsed.getOffset());
result = JsonMaker.newJsonObject(getTestString(-720));
parsed = new GpUtcOffset(result);
assertTrue(parsed.isValid());
assertEquals(-720, parsed.getOffset());
result = JsonMaker.newJsonObject(getTestString(721));
parsed = new GpUtcOffset(result);
assertFalse(parsed.isValid());
result = JsonMaker.newJsonObject(getTestString(-721));
parsed = new GpUtcOffset(result);
assertFalse(parsed.isValid());
}
private String getTestString(int offset) {
return "{\n" +
" \"utc_offset\" : " + offset + "\n" +
"}";
}
}
| [
"rizwan.choudrey@gmail.com"
] | rizwan.choudrey@gmail.com |
8a51830f06773f35d3b9c6da7408a79b5ec0e976 | e96172bcad99d9fddaa00c25d00a319716c9ca3a | /java-debugger-api/src/main/java/com/intellij/java/debugger/engine/evaluation/expression/Modifier.java | ac927ad49724bed6e0034d3bd5e2499cd1053b68 | [
"Apache-2.0"
] | permissive | consulo/consulo-java | 8c1633d485833651e2a9ecda43e27c3cbfa70a8a | a96757bc015eff692571285c0a10a140c8c721f8 | refs/heads/master | 2023-09-03T12:33:23.746878 | 2023-08-29T07:26:25 | 2023-08-29T07:26:25 | 13,799,330 | 5 | 4 | Apache-2.0 | 2023-01-03T08:32:23 | 2013-10-23T09:56:39 | Java | UTF-8 | Java | false | false | 1,532 | java | /*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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.
*/
/*
* Interface Modifier
* @author Jeka
*/
package com.intellij.java.debugger.engine.evaluation.expression;
import com.intellij.java.debugger.engine.evaluation.EvaluateException;
import com.intellij.java.debugger.ui.tree.NodeDescriptor;
import consulo.project.Project;
import consulo.internal.com.sun.jdi.ClassNotLoadedException;
import consulo.internal.com.sun.jdi.InvalidTypeException;
import consulo.internal.com.sun.jdi.Type;
import consulo.internal.com.sun.jdi.Value;
public interface Modifier {
boolean canInspect();
boolean canSetValue();
/**
* sets the value to the expression
*/
void setValue(Value value) throws ClassNotLoadedException, InvalidTypeException, EvaluateException;
/**
* @return the expected type of the expression or null is class was not loaded
*/
Type getExpectedType() throws ClassNotLoadedException, EvaluateException;
NodeDescriptor getInspectItem(Project project);
}
| [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
dfe79dc9f6defa4caaf01ce6db892bf1c9618bc2 | 013c744f98ed140f8b751d76a372565b7a841ecf | /src/com/dosmil_e/kit/core/projection/structural/pub/KitDocumentProjectionPub.java | 05ece528517af83bc939b702a850e446afb71517 | [] | no_license | carrascoMDD/Kit01 | 85ac077df93f1ed1b2ece6799fc3c130e0189359 | edc0a9dcd3944f413b1206c0b834c78d8217b51b | refs/heads/master | 2020-03-14T11:53:21.408340 | 2018-04-30T13:49:34 | 2018-04-30T13:49:34 | 131,598,995 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 500 | java | package com.dosmil_e.kit.core.projection.structural.pub;
import com.dosmil_e.modelbase.support.*;
import com.dosmil_e.modelbase.flattrx.*;
public interface KitDocumentProjectionPub
extends com.dosmil_e.kit.core.model.structural.pub.KitAbstractDocumentPub,
com.dosmil_e.kit.core.projection.projecting.pub.KitProjectablePub,
com.dosmil_e.kit.core.projection.projecting.pub.KitProjectedPub,
com.dosmil_e.kit.core.projection.structural.ifc.KitDocumentProjectionIfc {
}
| [
"carrascomdd@gmail.com"
] | carrascomdd@gmail.com |
9aab27c962792f6f7f1c1cda1dac9d56906a547c | b8eaf92366f6f908fb92a38ee07a7dab52b3b882 | /spring-02/src/main/java/com/study/pojo/People2.java | 401247ad8fe60e4c66e57e3b62a89bd71a09c2f0 | [] | no_license | youthynf/spring | e681d1840ced8a4c3ae4c9f6c319e4e1d83882b8 | 1d3d36b380cb847714c0f3ba500de54e16565462 | refs/heads/master | 2023-06-24T05:28:21.153936 | 2021-07-28T11:43:29 | 2021-07-28T11:43:29 | 383,668,036 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 853 | java | package com.study.pojo;
public class People2 {
private Dog dog;
private Cat cat;
private String name;
public People2() {
}
public People2(Dog dog, Cat cat, String name) {
this.dog = dog;
this.cat = cat;
this.name = name;
}
public Dog getDog() {
return dog;
}
public void setDog(Dog dog) {
this.dog = dog;
}
public Cat getCat() {
return cat;
}
public void setCat(Cat cat) {
this.cat = cat;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "People{" +
"dog=" + dog +
", cat=" + cat +
", name='" + name + '\'' +
'}';
}
}
| [
"940436475@qq.com"
] | 940436475@qq.com |
a205665c722a372918c7f55ede718f7fdc008edc | 1cedb98670494d598273ca8933b9d989e7573291 | /ezyfox-server-bean/src/test/java/com/tvd12/ezyfoxserver/bean/testing/EzyConfigurationClassSorterTest.java | cefab697eefc1076528c6f7c9d71732987b0c026 | [
"Apache-2.0"
] | permissive | thanhdatbkhn/ezyfox-server | ee00e1e23a2b38597bac94de7103bdc3a0e0bedf | 069e70c8a7d962df8341444658b198ffadc3ce61 | refs/heads/master | 2020-03-10T11:08:10.921451 | 2018-01-14T16:50:37 | 2018-01-14T16:50:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 314 | java | package com.tvd12.ezyfoxserver.bean.testing;
import com.tvd12.ezyfoxserver.bean.impl.EzyConfigurationClassSorter;
import com.tvd12.test.base.BaseTest;
public class EzyConfigurationClassSorterTest extends BaseTest {
@Override
public Class<?> getTestClass() {
return EzyConfigurationClassSorter.class;
}
}
| [
"itprono3@gmail.com"
] | itprono3@gmail.com |
f75e00744211252c2b672a8458e1990747073c0f | f7d3023a61b362aa7586953ad145c846b73d2251 | /jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/T_785Record.java | 03a6a202c1d7a7053b1c3348df61dd90c3ade4a5 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | Toilal/jOOQ | 6ffeb332c8ef445714e987e1ddca79184dff1cec | bcd073a4025add29c68b7e6a48834f5df75b7e75 | refs/heads/master | 2021-01-14T14:37:30.209778 | 2013-12-06T10:29:23 | 2013-12-06T10:29:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,202 | java | /**
* This class is generated by jOOQ
*/
package org.jooq.test.mysql.generatedclasses.tables.records;
/**
* This class is generated by jOOQ.
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class T_785Record extends org.jooq.impl.TableRecordImpl<org.jooq.test.mysql.generatedclasses.tables.records.T_785Record> implements org.jooq.Record3<java.lang.Integer, java.lang.String, java.lang.String> {
private static final long serialVersionUID = -547222323;
/**
* Setter for <code>test.t_785.ID</code>.
*/
public void setId(java.lang.Integer value) {
setValue(0, value);
}
/**
* Getter for <code>test.t_785.ID</code>.
*/
public java.lang.Integer getId() {
return (java.lang.Integer) getValue(0);
}
/**
* Setter for <code>test.t_785.NAME</code>.
*/
public void setName(java.lang.String value) {
setValue(1, value);
}
/**
* Getter for <code>test.t_785.NAME</code>.
*/
public java.lang.String getName() {
return (java.lang.String) getValue(1);
}
/**
* Setter for <code>test.t_785.VALUE</code>.
*/
public void setValue(java.lang.String value) {
setValue(2, value);
}
/**
* Getter for <code>test.t_785.VALUE</code>.
*/
public java.lang.String getValue() {
return (java.lang.String) getValue(2);
}
// -------------------------------------------------------------------------
// Record3 type implementation
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row3<java.lang.Integer, java.lang.String, java.lang.String> fieldsRow() {
return (org.jooq.Row3) super.fieldsRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row3<java.lang.Integer, java.lang.String, java.lang.String> valuesRow() {
return (org.jooq.Row3) super.valuesRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field1() {
return org.jooq.test.mysql.generatedclasses.tables.T_785.ID;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field2() {
return org.jooq.test.mysql.generatedclasses.tables.T_785.NAME;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field3() {
return org.jooq.test.mysql.generatedclasses.tables.T_785.VALUE;
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value1() {
return getId();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.String value2() {
return getName();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.String value3() {
return getValue();
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached T_785Record
*/
public T_785Record() {
super(org.jooq.test.mysql.generatedclasses.tables.T_785.T_785);
}
/**
* Create a detached, initialised T_785Record
*/
public T_785Record(java.lang.Integer id, java.lang.String name, java.lang.String value) {
super(org.jooq.test.mysql.generatedclasses.tables.T_785.T_785);
setValue(0, id);
setValue(1, name);
setValue(2, value);
}
}
| [
"lukas.eder@gmail.com"
] | lukas.eder@gmail.com |
cb9136897d865f704bbe7136b0d9e8fe41bbebe1 | abc909448faed112c50bca7c007299540c33fb4a | /src/test/java/homeoffice/application/basket/BasketEntryTest.java | 777349f2c00a7a4ec3e7c0a3e6e9523c1dddadf7 | [] | no_license | RichardInnocent/TheBasket | 162f087df14732aaf22a3ecf1d79a6e2ac084fdc | fc6c25bd23472c94f434e885f6fcb2187af93cec | refs/heads/master | 2020-03-21T07:35:34.300619 | 2018-06-22T10:19:36 | 2018-06-22T10:19:36 | 138,288,724 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 690 | java | package homeoffice.application.basket;
import static org.junit.Assert.*;
import org.junit.Test;
public class BasketEntryTest {
private static final Item ITEM_1 = new Item("id1", "Violin bow", 14.65);
private static final Item ITEM_2 = new Item("id2", "Arduino", 34.60);
private BasketEntry basketEntry = new BasketEntry(ITEM_1, 3);
@Test
public void testToString() {
assertEquals(ITEM_1.toString() + ": 3", basketEntry.toString());
}
@Test
public void testContains() {
assertTrue(basketEntry.contains(ITEM_1));
assertFalse(basketEntry.contains(ITEM_2));
}
@Test
public void testGetTotalCost() {
assertEquals(14.65*3, basketEntry.getTotalCost(), 1e-5);
}
}
| [
"richardinnocent@sky.com"
] | richardinnocent@sky.com |
f5fed11be8a9a29d00275f4f2fe2ce770739a1a2 | 9f16c947034e950c9d4d5b240f65256f7d06bda7 | /subprojects/core-impl/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ModuleVersionResolveException.java | ece8d642a6b386bfff8b2a54a03516a12a0d5732 | [] | no_license | ben-manes/gradle | 74ad626db79ae4b52720dbb5fc0c53a3001ab176 | 73b68b55467f8acc1a8a08432492f16498feeba5 | refs/heads/master | 2023-03-19T00:09:50.654080 | 2012-09-04T20:31:58 | 2012-11-05T03:34:15 | 5,677,792 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,309 | java | /*
* Copyright 2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.api.internal.artifacts.ivyservice;
import org.apache.ivy.core.module.id.ModuleRevisionId;
import org.gradle.api.internal.AbstractMultiCauseException;
import org.gradle.api.internal.Contextual;
import org.gradle.internal.UncheckedException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Formatter;
import java.util.List;
@Contextual
public class ModuleVersionResolveException extends AbstractMultiCauseException {
private final List<List<ModuleRevisionId>> paths = new ArrayList<List<ModuleRevisionId>>();
public ModuleVersionResolveException(String message) {
super(message);
}
public ModuleVersionResolveException(ModuleRevisionId id, Throwable cause) {
super(format(id), cause);
}
public ModuleVersionResolveException(ModuleRevisionId id, Iterable<? extends Throwable> causes) {
super(format(id), causes);
}
public ModuleVersionResolveException(String message, Throwable cause) {
super(message, cause);
}
private static String format(ModuleRevisionId id) {
return String.format("Could not resolve group:%s, module:%s, version:%s.", id.getOrganisation(), id.getName(), id.getRevision());
}
/**
* Creates a copy of this exception, with the given incoming paths.
*/
public ModuleVersionResolveException withIncomingPaths(Collection<? extends List<ModuleRevisionId>> paths) {
ModuleVersionResolveException copy = createCopy(super.getMessage());
copy.paths.addAll(paths);
copy.initCauses(getCauses());
copy.setStackTrace(getStackTrace());
return copy;
}
@Override
public String getMessage() {
if (paths.isEmpty()) {
return super.getMessage();
}
Formatter formatter = new Formatter();
formatter.format("%s%nRequired by:", super.getMessage());
for (List<ModuleRevisionId> path : paths) {
formatter.format("%n %s", toString(path.get(0)));
for (int i = 1; i < path.size(); i++) {
formatter.format(" > %s", toString(path.get(i)));
}
}
return formatter.toString();
}
private String toString(ModuleRevisionId moduleRevisionId) {
return String.format("%s:%s:%s", moduleRevisionId.getOrganisation(), moduleRevisionId.getName(), moduleRevisionId.getRevision());
}
protected ModuleVersionResolveException createCopy(String message) {
try {
return getClass().getConstructor(String.class).newInstance(message);
} catch (Exception e) {
throw UncheckedException.throwAsUncheckedException(e);
}
}
}
| [
"adam.murdoch@gradleware.com"
] | adam.murdoch@gradleware.com |
53024e125105979eb91722ac0b8999518cef7d03 | ea2ce93dabc7658f97b2417658f1f3949fd2f63c | /src/main/java/edu/whu/irlab/entity/TrainRecord.java | 4960810332a152ae44fa3182ffd404c4f3d414e7 | [] | no_license | RogerFang/MobileWeb | 02aa6abcac9b13093c23fe6c7f5f8bdfd0f7e27f | 64cac8bed110518fcdb5f447239a1bc1433927ce | refs/heads/master | 2021-01-20T19:18:34.998221 | 2016-07-14T12:00:42 | 2016-07-14T12:00:42 | 62,388,361 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,409 | java | package edu.whu.irlab.entity;
import com.google.common.base.Splitter;
import org.apache.commons.lang3.time.DateFormatUtils;
import javax.persistence.*;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* Created by Roger on 2016/7/9.
*/
@Entity
@Table(name = "train_record")
public class TrainRecord {
private Integer id;
private String model;
private String trainMonthData;
private String modelPath;
private String trainPrecision;
private Integer state;
private Date updateTime;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name = "model")
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
@Column(name = "train_month_data")
public String getTrainMonthData() {
return trainMonthData;
}
public void setTrainMonthData(String trainMonthData) {
this.trainMonthData = trainMonthData;
}
@Column(name = "model_path")
public String getModelPath() {
return modelPath;
}
public void setModelPath(String modelPath) {
this.modelPath = modelPath;
}
@Column(name = "train_precision")
public String getTrainPrecision() {
return trainPrecision;
}
public void setTrainPrecision(String trainPrecision) {
this.trainPrecision = trainPrecision;
}
@Column(name = "state")
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
@Column(name = "update_time")
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Transient
public List<String> getTrainMonthDataName() {
List<String> filenameList = new ArrayList<>();
for (String filepath: Splitter.on(",").trimResults().splitToList(getTrainMonthData())){
filenameList.add(new File(filepath).getName());
}
return filenameList;
}
@Transient
public String getFormatUpdateTime(){
return DateFormatUtils.format(updateTime, "yyyy-MM-dd HH:mm:ss");
}
}
| [
"1223493354@qq.com"
] | 1223493354@qq.com |
971da5e2131f4cf4212b2dec0d3507df80bd1a37 | 38c4451ab626dcdc101a11b18e248d33fd8a52e0 | /identifiers/lucene-3.6.2/core/src/java/org/apache/lucene/index/FieldSortedTermVectorMapper.java | 4e8109d28d019e0f2bf91cbcb78ea0b0d57a300e | [] | no_license | habeascorpus/habeascorpus-data | 47da7c08d0f357938c502bae030d5fb8f44f5e01 | 536d55729f3110aee058ad009bcba3e063b39450 | refs/heads/master | 2020-06-04T10:17:20.102451 | 2013-02-19T15:19:21 | 2013-02-19T15:19:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,025 | java | org PACKAGE_IDENTIFIER false
apache PACKAGE_IDENTIFIER false
lucene PACKAGE_IDENTIFIER false
index PACKAGE_IDENTIFIER false
java PACKAGE_IDENTIFIER false
util PACKAGE_IDENTIFIER false
FieldSortedTermVectorMapper TYPE_IDENTIFIER true
TermVectorMapper TYPE_IDENTIFIER false
Map TYPE_IDENTIFIER false
String TYPE_IDENTIFIER false
SortedSet TYPE_IDENTIFIER false
TermVectorEntry TYPE_IDENTIFIER false
fieldToTerms VARIABLE_IDENTIFIER true
HashMap TYPE_IDENTIFIER false
String TYPE_IDENTIFIER false
SortedSet TYPE_IDENTIFIER false
TermVectorEntry TYPE_IDENTIFIER false
SortedSet TYPE_IDENTIFIER false
TermVectorEntry TYPE_IDENTIFIER false
currentSet VARIABLE_IDENTIFIER true
String TYPE_IDENTIFIER false
currentField VARIABLE_IDENTIFIER true
Comparator TYPE_IDENTIFIER false
TermVectorEntry TYPE_IDENTIFIER false
comparator VARIABLE_IDENTIFIER true
FieldSortedTermVectorMapper METHOD_IDENTIFIER false
Comparator TYPE_IDENTIFIER false
TermVectorEntry TYPE_IDENTIFIER false
comparator VARIABLE_IDENTIFIER true
comparator VARIABLE_IDENTIFIER false
FieldSortedTermVectorMapper METHOD_IDENTIFIER false
ignoringPositions VARIABLE_IDENTIFIER true
ignoringOffsets VARIABLE_IDENTIFIER true
Comparator TYPE_IDENTIFIER false
TermVectorEntry TYPE_IDENTIFIER false
comparator VARIABLE_IDENTIFIER true
ignoringPositions VARIABLE_IDENTIFIER false
ignoringOffsets VARIABLE_IDENTIFIER false
comparator VARIABLE_IDENTIFIER false
comparator VARIABLE_IDENTIFIER false
Override TYPE_IDENTIFIER false
map METHOD_IDENTIFIER true
String TYPE_IDENTIFIER false
term VARIABLE_IDENTIFIER true
frequency VARIABLE_IDENTIFIER true
TermVectorOffsetInfo TYPE_IDENTIFIER false
offsets VARIABLE_IDENTIFIER true
positions VARIABLE_IDENTIFIER true
TermVectorEntry TYPE_IDENTIFIER false
entry VARIABLE_IDENTIFIER true
TermVectorEntry TYPE_IDENTIFIER false
currentField VARIABLE_IDENTIFIER false
term VARIABLE_IDENTIFIER false
frequency VARIABLE_IDENTIFIER false
offsets VARIABLE_IDENTIFIER false
positions VARIABLE_IDENTIFIER false
currentSet VARIABLE_IDENTIFIER false
add METHOD_IDENTIFIER false
entry VARIABLE_IDENTIFIER false
Override TYPE_IDENTIFIER false
setExpectations METHOD_IDENTIFIER true
String TYPE_IDENTIFIER false
field VARIABLE_IDENTIFIER true
numTerms VARIABLE_IDENTIFIER true
storeOffsets VARIABLE_IDENTIFIER true
storePositions VARIABLE_IDENTIFIER true
currentSet VARIABLE_IDENTIFIER false
TreeSet TYPE_IDENTIFIER false
TermVectorEntry TYPE_IDENTIFIER false
comparator VARIABLE_IDENTIFIER false
currentField VARIABLE_IDENTIFIER false
field VARIABLE_IDENTIFIER false
fieldToTerms VARIABLE_IDENTIFIER false
put METHOD_IDENTIFIER false
field VARIABLE_IDENTIFIER false
currentSet VARIABLE_IDENTIFIER false
Map TYPE_IDENTIFIER false
String TYPE_IDENTIFIER false
SortedSet TYPE_IDENTIFIER false
TermVectorEntry TYPE_IDENTIFIER false
getFieldToTerms METHOD_IDENTIFIER true
fieldToTerms VARIABLE_IDENTIFIER false
Comparator TYPE_IDENTIFIER false
TermVectorEntry TYPE_IDENTIFIER false
getComparator METHOD_IDENTIFIER true
comparator VARIABLE_IDENTIFIER false
| [
"pschulam@gmail.com"
] | pschulam@gmail.com |
4a3f05371a6869c1d5abcdfcb22d0949d4cc4c9a | e04c596465a5099bfb968cff1510f495e8e83fde | /AM-Resources/src/main/java/am/main/data/enums/Folders.java | c1c39ae4425a2fad5d45d6f12c6d08bd178bba75 | [] | no_license | AhmedMater/AM | 47adb350706656081683ec6cca05f63e472531b9 | 1e0d11f16d71abd37e83348073e32cf1885a6ccc | refs/heads/master | 2021-01-13T09:47:00.052056 | 2018-02-13T03:47:05 | 2018-02-13T03:47:05 | 71,176,787 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 761 | java | package am.main.data.enums;
/**
* Created by ahmed.motair on 1/14/2018.
*/
public enum Folders {
EMAIL_TEMPLATES("EM", "Templates/Email"),
SMS_TEMPLATES("SMS", "Templates/SMS"),
WEB_NOTIFICATION_TEMPLATES("Web-Notification", "Templates/Web-Notification");
private final String name;
private final String path;
Folders(String name, String path){
this.name = name;
this.path = path;
}
public String folderName() {
return name;
}
public String folderPath() {
return path;
}
@Override
public String toString() {
return "Folders{" +
"name = " + name +
", path = " + path +
"}\n";
}
}
| [
"ahmedmotair@gmail.com"
] | ahmedmotair@gmail.com |
83f7ad3c41bfd06d825959556067130209c7b33d | 1cadc4f690060a429807be9a9d5d02b06ae46356 | /QuickReference/src/reference/jf18/example/MainFruit.java | 1bb32d1f06e8c71ca962688dde24d66756600848 | [] | no_license | jesushalfonzo/netbeans | 06e10fe6671ae6030bfeb17ed527ed04a7a866dc | da52ce761359c3fc02e6ffa6f8dbae0bdf1a4c30 | refs/heads/master | 2021-01-13T09:10:10.637031 | 2016-09-30T17:56:53 | 2016-09-30T17:56:53 | 69,689,246 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 970 | 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 reference.jf18.example;
/**
*
* @author yecheverria
*/
public class MainFruit {
public static void main(String [] p ){
BoxFruit<Fruit> box = new BoxFruit<>();
Mango mango1 = new Mango();
Mango mango = new Mango();
Pera pera = new Pera();
Fresa fresa = new Fresa();
box.addFruit(mango1);
box.addFruit(mango);
box.addFruit(fresa);
box.addFruit(fresa);
box.addFruit(fresa);
box.addFruit(fresa);
box.addFruit(fresa);
box.addFruit(pera);
System.out.println("Mango: " + box.countFruit(mango));
System.out.println("fresa: " + box.countFruit(fresa));
System.out.println("pera: " + box.countFruit(pera));
}
}
| [
"you@example.com"
] | you@example.com |
92f4b393d188fe5c9ed6f293826f42666ff34015 | 32b72e1dc8b6ee1be2e80bb70a03a021c83db550 | /ast_results/rtyley_agit/agit/src/main/java/com/madgag/agit/git/model/Relation.java | 0d3ed61816c4b0aec69d996a68d6bed349a97429 | [] | no_license | cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning | d90c41a17e88fcd99d543124eeb6e93f9133cb4a | 0564143d92f8024ff5fa6b659c2baebf827582b1 | refs/heads/master | 2020-07-13T13:53:40.297493 | 2019-01-11T11:51:18 | 2019-01-11T11:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,117 | java | // isComment
package com.madgag.agit.git.model;
import static com.google.common.collect.Lists.newArrayListWithExpectedSize;
import static java.util.Arrays.asList;
import java.util.List;
import org.eclipse.jgit.revplot.PlotCommit;
import org.eclipse.jgit.revplot.PlotLane;
public enum Relation {
PARENT {
@SuppressWarnings({ "isStringConstant", "isStringConstant" })
public List<PlotCommit<PlotLane>> isMethod(PlotCommit<PlotLane> isParameter) {
return (List) isMethod(isNameExpr.isMethod());
}
}
, CHILD {
@SuppressWarnings({ "isStringConstant" })
public List<PlotCommit<PlotLane>> isMethod(PlotCommit<PlotLane> isParameter) {
List<PlotCommit<PlotLane>> isVariable = isMethod(isNameExpr.isMethod());
for (int isVariable = isIntegerConstant; isNameExpr < isNameExpr.isMethod(); ++isNameExpr) {
isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr));
}
return isNameExpr;
}
}
;
public abstract List<PlotCommit<PlotLane>> isMethod(PlotCommit<PlotLane> isParameter);
}
| [
"matheus@melsolucoes.net"
] | matheus@melsolucoes.net |
7eb50d77c66b67dd2f82d2ad3f2e46c2ad66bb0b | 47798511441d7b091a394986afd1f72e8f9ff7ab | /src/main/java/com/alipay/api/response/AlipayOpenMiniMorphoAppgrayCancelResponse.java | 9cb334543511fbb9f98987ebef809bfbefca3e4f | [
"Apache-2.0"
] | permissive | yihukurama/alipay-sdk-java-all | c53d898371032ed5f296b679fd62335511e4a310 | 0bf19c486251505b559863998b41636d53c13d41 | refs/heads/master | 2022-07-01T09:33:14.557065 | 2020-05-07T11:20:51 | 2020-05-07T11:20:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 386 | java | package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.open.mini.morpho.appgray.cancel response.
*
* @author auto create
* @since 1.0, 2019-12-26 15:05:32
*/
public class AlipayOpenMiniMorphoAppgrayCancelResponse extends AlipayResponse {
private static final long serialVersionUID = 4455261263393714345L;
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
fb7eb860b8736542ffae2e12342661715a8bf3c5 | a40c680a0c353c64c2f265af81ded9157e7ac478 | /com.onpositive.wikipedia.workbench/src/com/onpositive/compactdata/IntToByteArrayMap.java | cd98c8de1246aa0d766533f6d8e36381590ba189 | [
"Apache-2.0"
] | permissive | 32kda/com.onpositive.textresearch | c9d97547b98b3159341813401ec788b59b4d569f | a183c9f62e0fae528e2cdbeffb95ad8d271424e5 | refs/heads/master | 2023-01-06T16:26:46.182686 | 2020-11-24T03:32:02 | 2020-11-24T03:32:02 | 55,604,374 | 1 | 0 | Apache-2.0 | 2023-01-02T22:09:11 | 2016-04-06T12:36:08 | Java | UTF-8 | Java | false | false | 2,123 | java | package com.onpositive.compactdata;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import com.carrotsearch.hppc.ByteArrayList;
import com.carrotsearch.hppc.IntIntOpenHashMapSerialable;
import com.carrotsearch.hppc.LongArrayList;
/**
* THIS IS ADD-ONLY MAP. REMOVALS AND SUBSEQUENT ADDITIONS TO THE SAME KEY ARE NOT SUPPORTED!
*
*
*/
public class IntToByteArrayMap {
protected IntIntOpenHashMapSerialable map = new IntIntOpenHashMapSerialable();
protected ByteArrayList alist = new ByteArrayList();
public IntToByteArrayMap() {
};
/**
* Does not support values array length of more than 256.
* If array length is greater then 256, only first 256 values are stored.
*
* @param key
* @param values
*/
public void add(int key, byte[] values) {
if (values.length == 0) {
return;
}
if (map.containsKey(key)) {
//subsequent additions not supported. Returning to prevent OOM
return;
}
int length = values.length;
if (length > 256) {
System.out.println("Cutting array of " + length + " length");
//cutting long arrays
length = 256;
}
byte byteLength = (byte)(length - 129);/*we have length from 1 to 256 inclusive here*/
map.put(key, alist.size());
alist.add(byteLength);
for (int a = 0; a < length; a++) {
alist.add(values[a]);
}
}
public byte[] get(int key) {
if (!map.containsKey(key)) {
return new byte[0];
}
int i = map.get(key);
byte byteLength = alist.get(i);
int intLength = ((int)byteLength) + 129;
byte[] res = new byte[intLength];
for (int a = 0; a < intLength; a++) {
res[a] = alist.get(a + i + 1);
}
return res;
}
public void store(DataOutputStream str) throws IOException {
CompactLongVector.writeMap(str, map);
CompactLongVector.writeByteArray(str, alist.toArray());
}
public void read(DataInputStream str) throws IOException {
map = CompactLongVector.readMap(str);
byte[] arr = CompactLongVector.readByteArrray(str);
alist.buffer = arr;
alist.elementsCount = arr.length;
}
public int[] getKeys() {
return map.keys;
}
}
| [
"dmitry@onpositive.com"
] | dmitry@onpositive.com |
3ac3a1cb1242df5887f04a10dc31b027694b3ccc | 447520f40e82a060368a0802a391697bc00be96f | /apks/malware/app29/source/com/jx/night/ui/c.java | a0e8b9477ae9db209e6e267d58e29abde6ea58a5 | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 1,809 | java | package com.jx.night.ui;
import android.app.Dialog;
import android.graphics.Color;
import android.widget.TextView;
import com.jx.night.ad.b;
import com.litesuits.http.exception.HttpException;
import com.litesuits.http.listener.HttpListener;
import com.litesuits.http.request.AbstractRequest;
import com.litesuits.http.response.Response;
import java.io.File;
class c
extends HttpListener<File>
{
c(All_1_Frag paramAll_1_Frag, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, String paramString)
{
super(paramBoolean1, paramBoolean2, paramBoolean3);
}
public void a(File paramFile, Response<File> paramResponse)
{
All_1_Frag.a(this.b, false);
paramResponse = new File(this.a);
if (paramFile.exists()) {
paramFile.renameTo(paramResponse);
}
All_1_Frag.a(this.b).h = b.a(this.a, All_1_Frag.a(this.b).j);
com.jx.night.unit.a.a(All_1_Frag.b(this.b), paramResponse);
All_1_Frag.a(this.b, this.a);
if (All_1_Frag.c(this.b) != null)
{
All_1_Frag.c(this.b).setBackgroundColor(Color.parseColor("#EC4195"));
All_1_Frag.c(this.b).setText("");
}
if (All_1_Frag.d(this.b) != null) {
All_1_Frag.d(this.b).dismiss();
}
}
public void onFailure(HttpException paramHttpException, Response<File> paramResponse)
{
All_1_Frag.a(this.b, false);
}
public void onLoading(AbstractRequest<File> paramAbstractRequest, long paramLong1, long paramLong2)
{
All_1_Frag.a(this.b, paramLong1, paramLong2);
}
public void onStart(AbstractRequest<File> paramAbstractRequest)
{
All_1_Frag.a(this.b, true);
if (All_1_Frag.c(this.b) != null)
{
All_1_Frag.c(this.b).setBackgroundColor(Color.parseColor("#6c6c6c"));
All_1_Frag.c(this.b).setText("正在开始下载");
}
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
f2957f45ca4dbd765aa6342cf7e895b07e1c6e6c | f19a7a9a41450ccc7b8bb9e03c6046f8d69b371d | /src/main/java/org/endeavourhealth/transform/emis/emisopen/schema/eommedicalrecord38/CarePlanType.java | 9dd34e7b9b163e270992637595f5c41f07ff65fd | [
"Apache-2.0"
] | permissive | endeavourhealth/Transforms | d377861ce7ae78ecb1e697fb69687c6389fe1c88 | 6b6a8e1778256c9a02bfb5ce1b6ed5bff5330d08 | refs/heads/master | 2021-06-13T22:12:33.315238 | 2021-03-09T14:21:10 | 2021-03-09T14:21:10 | 93,181,861 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 6,347 | java |
package org.endeavourhealth.transform.emis.emisopen.schema.eommedicalrecord38;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* Community Care Plans
*
* <p>Java class for CarePlanType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CarePlanType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="PKId" type="{http://www.e-mis.com/emisopen/MedicalRecord}IdentType"/>
* <element name="DisplayTerm" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="TermId" type="{http://www.e-mis.com/emisopen/MedicalRecord}StringCodeType" minOccurs="0"/>
* <element name="Notes" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="TemplateId" type="{http://www.e-mis.com/emisopen/MedicalRecord}IdentType" minOccurs="0"/>
* <element name="InterventionCategoryId" type="{http://www.e-mis.com/emisopen/MedicalRecord}IdentType"/>
* <element name="InterventionTargetTermId" type="{http://www.e-mis.com/emisopen/MedicalRecord}StringCodeType" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CarePlanType", namespace = "http://www.e-mis.com/emisopen/MedicalRecord", propOrder = {
"pkId",
"displayTerm",
"termId",
"notes",
"templateId",
"interventionCategoryId",
"interventionTargetTermId"
})
public class CarePlanType {
@XmlElement(name = "PKId", namespace = "http://www.e-mis.com/emisopen/MedicalRecord", required = true)
protected IdentType pkId;
@XmlElement(name = "DisplayTerm", namespace = "http://www.e-mis.com/emisopen/MedicalRecord", required = true)
protected String displayTerm;
@XmlElement(name = "TermId", namespace = "http://www.e-mis.com/emisopen/MedicalRecord")
protected StringCodeType termId;
@XmlElement(name = "Notes", namespace = "http://www.e-mis.com/emisopen/MedicalRecord")
protected String notes;
@XmlElement(name = "TemplateId", namespace = "http://www.e-mis.com/emisopen/MedicalRecord")
protected IdentType templateId;
@XmlElement(name = "InterventionCategoryId", namespace = "http://www.e-mis.com/emisopen/MedicalRecord", required = true)
protected IdentType interventionCategoryId;
@XmlElement(name = "InterventionTargetTermId", namespace = "http://www.e-mis.com/emisopen/MedicalRecord")
protected StringCodeType interventionTargetTermId;
/**
* Gets the value of the pkId property.
*
* @return
* possible object is
* {@link IdentType }
*
*/
public IdentType getPKId() {
return pkId;
}
/**
* Sets the value of the pkId property.
*
* @param value
* allowed object is
* {@link IdentType }
*
*/
public void setPKId(IdentType value) {
this.pkId = value;
}
/**
* Gets the value of the displayTerm property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDisplayTerm() {
return displayTerm;
}
/**
* Sets the value of the displayTerm property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDisplayTerm(String value) {
this.displayTerm = value;
}
/**
* Gets the value of the termId property.
*
* @return
* possible object is
* {@link StringCodeType }
*
*/
public StringCodeType getTermId() {
return termId;
}
/**
* Sets the value of the termId property.
*
* @param value
* allowed object is
* {@link StringCodeType }
*
*/
public void setTermId(StringCodeType value) {
this.termId = value;
}
/**
* Gets the value of the notes property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNotes() {
return notes;
}
/**
* Sets the value of the notes property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNotes(String value) {
this.notes = value;
}
/**
* Gets the value of the templateId property.
*
* @return
* possible object is
* {@link IdentType }
*
*/
public IdentType getTemplateId() {
return templateId;
}
/**
* Sets the value of the templateId property.
*
* @param value
* allowed object is
* {@link IdentType }
*
*/
public void setTemplateId(IdentType value) {
this.templateId = value;
}
/**
* Gets the value of the interventionCategoryId property.
*
* @return
* possible object is
* {@link IdentType }
*
*/
public IdentType getInterventionCategoryId() {
return interventionCategoryId;
}
/**
* Sets the value of the interventionCategoryId property.
*
* @param value
* allowed object is
* {@link IdentType }
*
*/
public void setInterventionCategoryId(IdentType value) {
this.interventionCategoryId = value;
}
/**
* Gets the value of the interventionTargetTermId property.
*
* @return
* possible object is
* {@link StringCodeType }
*
*/
public StringCodeType getInterventionTargetTermId() {
return interventionTargetTermId;
}
/**
* Sets the value of the interventionTargetTermId property.
*
* @param value
* allowed object is
* {@link StringCodeType }
*
*/
public void setInterventionTargetTermId(StringCodeType value) {
this.interventionTargetTermId = value;
}
}
| [
"ergosoftuk@gmail.com"
] | ergosoftuk@gmail.com |
c5035b302228d35a9922bf5ea2872c8af8473325 | ba2eef5e3c914673103afb944dd125a9e846b2f6 | /AL-Game/data/scripts/system/handlers/quest/udas_temple/_30103LairOfTheDragonbound.java | 2647820539c20924bfb8fac339957c45b88649c3 | [] | no_license | makifgokce/Aion-Server-4.6 | 519d1d113f483b3e6532d86659932a266d4da2f8 | 0a6716a7aac1f8fe88780aeed68a676b9524ff15 | refs/heads/master | 2022-10-07T11:32:43.716259 | 2020-06-10T20:14:47 | 2020-06-10T20:14:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,770 | java | /**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning 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.
*
* Aion-Lightning 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 Aion-Lightning.
* If not, see <http://www.gnu.org/licenses/>.
*/
package quest.udas_temple;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.questEngine.handlers.QuestHandler;
import com.aionemu.gameserver.model.DialogAction;
import com.aionemu.gameserver.questEngine.model.QuestEnv;
import com.aionemu.gameserver.questEngine.model.QuestState;
import com.aionemu.gameserver.questEngine.model.QuestStatus;
/**
* @author vlog
*/
public class _30103LairOfTheDragonbound extends QuestHandler {
private static final int questId = 30103;
public _30103LairOfTheDragonbound() {
super(questId);
}
@Override
public void register() {
qe.registerQuestNpc(799333).addOnQuestStart(questId);
qe.registerQuestNpc(799333).addOnTalkEvent(questId);
qe.registerGetingItem(182209189, questId);
}
@Override
public boolean onDialogEvent(QuestEnv env) {
Player player = env.getPlayer();
QuestState qs = player.getQuestStateList().getQuestState(questId);
DialogAction dialog = env.getDialog();
int targetId = env.getTargetId();
if (qs == null || qs.getStatus() == QuestStatus.NONE) {
if (targetId == 799333) {
if (dialog == DialogAction.QUEST_SELECT) {
return sendQuestDialog(env, 1011);
} else {
return sendQuestStartDialog(env);
}
}
} else if (qs.getStatus() == QuestStatus.START) {
int var = qs.getQuestVarById(0);
if (targetId == 799333) {
if (dialog == DialogAction.QUEST_SELECT) {
if (var == 1) {
return sendQuestDialog(env, 2375);
}
} else if (dialog == DialogAction.SELECT_QUEST_REWARD) {
changeQuestStep(env, 1, 1, true); // reward
return sendQuestDialog(env, 5);
}
}
} else if (qs.getStatus() == QuestStatus.REWARD) {
if (targetId == 799333) {
removeQuestItem(env, 182209189, 1);
return sendQuestEndDialog(env);
}
}
return false;
}
@Override
public boolean onGetItemEvent(QuestEnv env) {
return defaultOnGetItemEvent(env, 0, 1, false); // 1
}
}
| [
"Falke_34@080676fd-0f56-412f-822c-f8f0d7cea3b7"
] | Falke_34@080676fd-0f56-412f-822c-f8f0d7cea3b7 |
dca1b4cda37810eab56502baaa332a3353d13389 | d8f61380327d4f2cce92199b71d6dd89c0b38588 | /Sem12/SistVentas/EGCCStore/src/java/pe/egcc/ventasweb/controller/LogonController.java | 70dd01ff182236ddcc97031f233376426dd95df9 | [] | no_license | gcoronelc/USIL_TPC_2016_2_TT | 7c07e1417242af269619db58ceee7acc3b365c8a | bd6db85a43caa3ba91f88559014acf30543f4c85 | refs/heads/master | 2020-05-22T00:03:15.667927 | 2016-11-25T19:49:43 | 2016-11-25T19:49:43 | 65,744,172 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,868 | java | package pe.egcc.ventasweb.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import pe.egcc.ventasweb.model.Empleado;
import pe.egcc.ventasweb.service.espec.EmpleadoServiceEspec;
import pe.egcc.ventasweb.service.impl.EmpleadoServiceImpl;
/**
*
* @author Eric Gustavo Coronel Castillo
* @blog www.desarrollasoftware.com
* @email egcc.usil@gmail.com
*/
@WebServlet(name = "LogonController",
urlPatterns = {"/LogonIngresar","/LogonSalir"})
public class LogonController extends HttpServlet {
@Override
protected void service(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
switch(request.getServletPath()){
case "/LogonIngresar":
logonIngresar(request,response);
break;
case "/LogonSalir":
LogonSalir(request,response);
break;
}
} // Fin de service
private void logonIngresar(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String destino;
try {
// Datos
String usuario = request.getParameter("usuario");
String clave = request.getParameter("clave");
// Proceso
EmpleadoServiceEspec service;
service = new EmpleadoServiceImpl();
Empleado bean = service.validar(usuario, clave);
UtilController.setValue(request, "usuario", bean);
// Estado Roles
int estAdm = service.getEstado(bean.getIdemp(), 1);
int estVen = service.getEstado(bean.getIdemp(), 2);
int estOpe = service.getEstado(bean.getIdemp(), 3);
int estUsu = service.getEstado(bean.getIdemp(), 4);
// Permisos
UtilController.setValue(request, "rolVentas", ((estAdm == 1 || estVen == 1)?1:0));
UtilController.setValue(request, "rolMant", ((estAdm == 1 || estOpe == 1)?1:0));
UtilController.setValue(request, "rolConsultas", 1);
UtilController.setValue(request, "rolReportes", ((estAdm == 1 || estOpe == 1 || estUsu == 1)?1:0));
UtilController.setValue(request, "rolSeguridad", estAdm == 1);
destino = "main.jsp";
} catch (Exception e) {
e.printStackTrace();
request.setAttribute("error", e.getMessage());
destino = "index.jsp";
}
// Forward
UtilController.forward(request, response, destino);
} // Fin de LogonIngresar
private void LogonSalir(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
request.getSession().invalidate();
UtilController.forward(request, response, "index.jsp");
} // Fin de LogonSalir
} // Fin de LogonController
| [
"gcoronelc@gmail.com"
] | gcoronelc@gmail.com |
f7e54a2eb937b01c7709f3e33876051bface8bd8 | 4ba132c18d7856f0842efba125dc4067731e65c2 | /trade_hosting_apps/trade_hosting_risk_manager/server/src/main/java/xueqiao/trade/hosting/risk/manager/core/calculator/impl/global/GlobalFundRiskRate.java | 48b1aaca52ff743836f145052000ba59136d8242 | [] | no_license | feinoah/xueqiao-trade | a65496d7c529084964062dec00fc48903a4356a4 | cf4283ab1ae8c7467ec51102dc08194e3e9ffc38 | refs/heads/main | 2023-04-19T11:42:31.813771 | 2021-04-25T12:03:56 | 2021-04-25T12:03:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 637 | java | package xueqiao.trade.hosting.risk.manager.core.calculator.impl.global;
import xueqiao.trade.hosting.asset.thriftapi.HostingFund;
import xueqiao.trade.hosting.risk.manager.core.RawDataPool;
import xueqiao.trade.hosting.risk.manager.core.RiskItemValue;
public class GlobalFundRiskRate extends GlobalCalculator {
@Override
protected void onCalculate(RawDataPool rawDataPool, RiskItemValue newValue) {
HostingFund hostingFund = rawDataPool.getBaseCurrencyFund();
if (hostingFund != null && hostingFund.isSetRiskRate()) {
newValue.setValue(hostingFund.getRiskRate());
}
}
}
| [
"wangli@authine.com"
] | wangli@authine.com |
d8d0ba0d252940119e843ebd3fafaf8b68e869b0 | 7f364689fc4d0eff8bf32a2805f70e4eee98425e | /framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/value/longs/LongPrimitiveValueTypeFacetFactory.java | a5cd4817e0c8561303e61efca11952e352e46cf2 | [
"Apache-2.0"
] | permissive | mukulashokjoshi/apache-isis | 3c0fc7d4366a7f9fb8151c3229b9a0c18dfcc59e | f5ed969c82c0f334b5c4a67ca3b57846ab13b56c | refs/heads/master | 2021-01-17T11:09:18.879033 | 2012-09-26T16:38:32 | 2012-09-26T16:38:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,652 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.isis.core.progmodel.facets.value.longs;
import org.apache.isis.core.metamodel.facetapi.FacetHolder;
import org.apache.isis.core.progmodel.facets.object.value.ValueUsingValueSemanticsProviderFacetFactory;
public class LongPrimitiveValueTypeFacetFactory extends ValueUsingValueSemanticsProviderFacetFactory<Long> {
public LongPrimitiveValueTypeFacetFactory() {
super(LongValueFacet.class);
}
@Override
public void process(final ProcessClassContext processClassContext) {
final Class<?> type = processClassContext.getCls();
final FacetHolder holder = processClassContext.getFacetHolder();
if (type != long.class) {
return;
}
addFacets(new LongPrimitiveValueSemanticsProvider(holder, getConfiguration(), getContext()));
}
}
| [
"danhaywood@13f79535-47bb-0310-9956-ffa450edef68"
] | danhaywood@13f79535-47bb-0310-9956-ffa450edef68 |
65bb97ac7e8d8aeed38bc570cae97d5d22e36f93 | bb1b84c5ff61d88b6bb312eb5f4f5b71ef2a486b | /src/main/java/sf/booksdata/web/rest/vm/ManagedUserVM.java | 48c6a4ed2c6dd4dc6e281c0a2ed4418ed7c45626 | [] | no_license | frsab/books-with-jhipster | b731ec7803e9eeab31efe5c251b715847d8bc2dc | 762660bbf6f6bc3ffe089b57268599300cd7bc88 | refs/heads/master | 2020-04-13T02:39:10.189624 | 2018-12-29T15:24:17 | 2018-12-29T15:24:17 | 162,908,626 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 830 | java | package sf.booksdata.web.rest.vm;
import sf.booksdata.service.dto.UserDTO;
import javax.validation.constraints.Size;
/**
* View Model extending the UserDTO, which is meant to be used in the user management UI.
*/
public class ManagedUserVM extends UserDTO {
public static final int PASSWORD_MIN_LENGTH = 4;
public static final int PASSWORD_MAX_LENGTH = 100;
@Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH)
private String password;
public ManagedUserVM() {
// Empty constructor needed for Jackson.
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public String toString() {
return "ManagedUserVM{" +
"} " + super.toString();
}
}
| [
"frejsaber@gmail.com"
] | frejsaber@gmail.com |
a6fc42afe7c9a275f66a849d374ddb492952908e | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /single-large-project/src/test/java/org/gradle/test/performancenull_322/Testnull_32161.java | addcce1e1daa5774f13832fde93dea605cc8dc78 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 308 | java | package org.gradle.test.performancenull_322;
import static org.junit.Assert.*;
public class Testnull_32161 {
private final Productionnull_32161 production = new Productionnull_32161("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
84cfbad5ef056c5e44bffa6a761012de8f555596 | 4f4ddc396fa1dfc874780895ca9b8ee4f7714222 | /src/gdanol/gda/com/gensym/gda/dialogs/blocks/gdiAlarmRoot.java | c45a392b55b28c52624487bf40b30a0ab476d222 | [] | no_license | UtsavChokshiCNU/GenSym-Test2 | 3214145186d032a6b5a7486003cef40787786ba0 | a48c806df56297019cfcb22862dd64609fdd8711 | refs/heads/master | 2021-01-23T23:14:03.559378 | 2017-09-09T14:20:09 | 2017-09-09T14:20:09 | 102,960,203 | 3 | 5 | null | null | null | null | UTF-8 | Java | false | false | 1,099 | java | package com.gensym.gda.dialogs.blocks;
import com.gensym.gda.controls.*;
import com.gensym.util.Symbol;
public class gdiAlarmRoot extends AlarmSource {
protected ComboBoxEditor triggerOn;
protected CheckBoxEditor automaticExplanation;
protected CheckBoxEditor showMessages;
protected static final Symbol TRIGGER_ON_ = Symbol.intern("TRIGGER-ON");
protected static final Symbol AUTOMATIC_EXPLANATION_ = Symbol.intern("GENERATE-AUTOMATIC-EXPLANATION");
protected static final Symbol SHOW_MESSAGES_ = Symbol.intern("SHOW-MESSAGES");
public gdiAlarmRoot() {}
public gdiAlarmRoot(java.awt.Frame frame) {
super(frame);
triggerOn = new StatusComboBoxEditor(StatusComboBoxEditor.SMALL_UNKNOWN);
dpanel.placeAttributeEditor(triggerOn, TRIGGER_ON_, 5);
automaticExplanation= new CheckBoxEditor();
dpanel.placeAttributeEditor(automaticExplanation, AUTOMATIC_EXPLANATION_, 43);
showMessages = new CheckBoxEditor();
dpanel.placeAttributeEditor(showMessages, SHOW_MESSAGES_, 41);
}
} | [
"utsavchokshi@Utsavs-MacBook-Pro.local"
] | utsavchokshi@Utsavs-MacBook-Pro.local |
419f1af526930ee626311db82f9d825a29da8f5a | fd3cd43652fa2279a4df1647cb164cfa18040a2a | /sn-zzd-1.1/src/main/java/com/hxsn/zzd/videogo/PlanarYUVLuminanceSource.java | 9cb6d9e9e8c65967569a22d5c2a164024d91c886 | [] | no_license | jielysong/android-HsanAnd | 665df97f0e06b91a0f4714258a8b69e7498534af | c0c2e823a0c791d802c9568ec5466094e4864cc5 | refs/heads/master | 2021-01-19T02:28:05.845711 | 2017-05-24T05:53:28 | 2017-05-24T05:53:42 | 87,281,555 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 4,624 | java | /*
* Copyright 2009 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hxsn.zzd.videogo;
import android.graphics.Bitmap;
import com.google.zxing.LuminanceSource;
/**
* This object extends LuminanceSource around an array of YUV data returned from the camera driver,
* with the option to crop to a rectangle within the full data. This can be used to exclude
* superfluous pixels around the perimeter and speed up decoding.
*
* It works for any pixel format where the Y channel is planar and appears first, including
* YCbCr_420_SP and YCbCr_422_SP.
*
* @author dswitkin@google.com (Daniel Switkin)
*/
public final class PlanarYUVLuminanceSource extends LuminanceSource {
private final byte[] yuvData;
private final int dataWidth;
private final int dataHeight;
private final int left;
private final int top;
public PlanarYUVLuminanceSource(byte[] yuvData, int dataWidth, int dataHeight, int left, int top,
int width, int height, boolean reverseHorizontal) {
super(width, height);
if (left + width > dataWidth || top + height > dataHeight) {
throw new IllegalArgumentException("Crop rectangle does not fit within image data.");
}
this.yuvData = yuvData;
this.dataWidth = dataWidth;
this.dataHeight = dataHeight;
this.left = left;
this.top = top;
if (reverseHorizontal) {
reverseHorizontal(width, height);
}
}
@Override
public byte[] getRow(int y, byte[] row) {
if (y < 0 || y >= getHeight()) {
throw new IllegalArgumentException("Requested row is outside the image: " + y);
}
int width = getWidth();
if (row == null || row.length < width) {
row = new byte[width];
}
int offset = (y + top) * dataWidth + left;
System.arraycopy(yuvData, offset, row, 0, width);
return row;
}
@Override
public byte[] getMatrix() {
int width = getWidth();
int height = getHeight();
// If the caller asks for the entire underlying image, save the copy and give them the
// original data. The docs specifically warn that result.length must be ignored.
if (width == dataWidth && height == dataHeight) {
return yuvData;
}
int area = width * height;
byte[] matrix = new byte[area];
int inputOffset = top * dataWidth + left;
// If the width matches the full width of the underlying data, perform a single copy.
if (width == dataWidth) {
System.arraycopy(yuvData, inputOffset, matrix, 0, area);
return matrix;
}
// Otherwise copy one cropped row at a time.
byte[] yuv = yuvData;
for (int y = 0; y < height; y++) {
int outputOffset = y * width;
System.arraycopy(yuv, inputOffset, matrix, outputOffset, width);
inputOffset += dataWidth;
}
return matrix;
}
@Override
public boolean isCropSupported() {
return true;
}
public Bitmap renderCroppedGreyscaleBitmap() {
int width = getWidth();
int height = getHeight();
int[] pixels = new int[width * height];
byte[] yuv = yuvData;
int inputOffset = top * dataWidth + left;
for (int y = 0; y < height; y++) {
int outputOffset = y * width;
for (int x = 0; x < width; x++) {
int grey = yuv[inputOffset + x] & 0xff;
pixels[outputOffset + x] = 0xFF000000 | (grey * 0x00010101);
}
inputOffset += dataWidth;
}
Bitmap bitmap = null;
try {
bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
bitmap.setPixels(pixels, 0, width, 0, 0, width, height);
} catch (OutOfMemoryError e) {
e.printStackTrace();
}
return bitmap;
}
private void reverseHorizontal(int width, int height) {
byte[] yuvData = this.yuvData;
for (int y = 0, rowStart = top * dataWidth + left; y < height; y++, rowStart += dataWidth) {
int middle = rowStart + width / 2;
for (int x1 = rowStart, x2 = rowStart + width - 1; x1 < middle; x1++, x2--) {
byte temp = yuvData[x1];
yuvData[x1] = yuvData[x2];
yuvData[x2] = temp;
}
}
}
}
| [
"jielysong@163.com"
] | jielysong@163.com |
25750def27163fbdb7f20bd4fed5237b7a6c11f6 | d04543e6144ae7235bea8c381e284668bc3d2f0e | /src/main/java/com/cimr/boot/jwt/JwtTokenFactory.java | cc7e3caf32a85509700af373744b28b96ac44f1c | [] | no_license | jlf1997/iot-data-center | 8f745121a8c68e4f605e0acff9674d6d57ca57fb | 7a48299848b7b3a2bfe77d2bc86bcb5ed48358f9 | refs/heads/master | 2020-03-19T07:26:00.608061 | 2018-07-25T01:53:35 | 2018-07-25T01:53:35 | 136,112,889 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,180 | java | package com.cimr.boot.jwt;
import java.security.Key;
import java.util.Date;
import java.util.Map;
import java.util.UUID;
import javax.crypto.spec.SecretKeySpec;
import javax.xml.bind.DatatypeConverter;
import org.springframework.stereotype.Component;
import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
/**
* Factory class that should be always used to create {@link JwtToken}.
*
* @author vladimir.stankovic
*
* May 31, 2016
*/
@Component
public class JwtTokenFactory {
private Key getKeyInstance(JwtSettings jwtSettings) {
//We will sign our JavaWebToken with our ApiKey secret
SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
byte[] apiKeySecretBytes = DatatypeConverter.parseBase64Binary(jwtSettings.getTokenSigningKey());
Key signingKey = new SecretKeySpec(apiKeySecretBytes, signatureAlgorithm.getJcaName());
return signingKey;
}
//使用HS256签名算法和生成的signingKey最终的Token,claims中是有效载荷
public String createJavaWebToken(Map<String, Object> claims,JwtSettings jwtSettings) {
JwtBuilder jwtBuilder= Jwts.builder();
jwtBuilder.setClaims(claims);
long nowMillis = System.currentTimeMillis();
long expMillis = nowMillis + jwtSettings.getTokenExpirationTime()*60*1000;//设置token一天过期
jwtBuilder.setExpiration(new Date(expMillis));
jwtBuilder.setIssuer(jwtSettings.getTokenIssuer());
jwtBuilder.setIssuedAt(new Date(nowMillis));
jwtBuilder.setId(UUID.randomUUID().toString());
return Jwts.builder().setClaims(claims).signWith(SignatureAlgorithm.HS256, getKeyInstance(jwtSettings)).compact();
}
//解析Token,同时也能验证Token,当验证失败返回null
public Map<String, Object> parserJavaWebToken(String jwt,JwtSettings jwtSettings) {
try {
Map<String, Object> jwtClaims =
Jwts.parser().setSigningKey(getKeyInstance(jwtSettings)).parseClaimsJws(jwt).getBody();
return jwtClaims;
} catch (Exception e) {
return null;
}
}
}
| [
"675866753@qq.com"
] | 675866753@qq.com |
6f2983c7319be55d9a12402828bc9e1a68ddf948 | f6448058ca2baf0f8f1ee06614197b48d97cac5a | /src/de/dimm/vsm/records/AbstractStorageNode.java | 68d5be476852eed230f7d4ea792591c5299dea4f | [
"Apache-2.0"
] | permissive | markymarkmk2/VSMRecords | 754526c064f8c0cddaf37ca4c22b721c5c965fed | bdadba5f4cfbf8f8942c408c68d8ff256929d9c8 | refs/heads/master | 2021-01-13T11:48:37.660328 | 2017-01-03T12:29:52 | 2017-01-03T12:29:52 | 77,679,217 | 0 | 0 | null | null | null | null | ISO-8859-2 | Java | false | false | 4,936 | java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package de.dimm.vsm.records;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
/**
*
* @author mw
* Stellt einen realen Speicherablageort eines FilySystemElemNodes dar
* Subklassen können KlonesStorageNode, FS_StorageNode, FTP_StorageNode, S3_StorageNode etc sein
*/
@Entity
public class AbstractStorageNode implements Serializable
{
static final long serialVersionUID = 1L;
public static final String NT_FILESYSTEM = "fs";
public static final String NT_FTP = "ftp";
public static final String NT_S3 = "s3";
public static final String NM_VIRGIN = "VIRG";
public static final String NM_ONLINE = "ONLINE";
public static final String NM_OFFLINE = "OFFLINE";
public static final String NM_EMPTYING = "EMPTYING";
public static final String NM_EMPTIED = "EMPTIED";
public static final String NM_FULL = "FULL";
public static final String NM_TEMP_OFFLINE = "TMP_OFFLINE";
private String mountPoint;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
protected long idx;
protected String name;
@Temporal(value = javax.persistence.TemporalType.TIMESTAMP)
protected Date creation;
private String nodeMode;
private String nodeType;
@ManyToOne
private StoragePool pool;
@OneToOne
private AbstractStorageNode cloneNode;
/**
* @return the name
*/
public String getMountPoint()
{
return mountPoint;
}
public void setMountPoint( String mountPoint )
{
this.mountPoint = mountPoint;
}
/**
* @return the node_type
*/
public String getNodeType()
{
return nodeType;
}
/**
* @param node_type the node_type to set
*/
public void setNodeType( String node_type )
{
this.nodeType = node_type;
}
/**
* @return the sn_mode
*/
public String getNodeMode()
{
return nodeMode;
}
/**
* @param sn_mode the sn_mode to set
*/
public void setNodeMode( String sn_mode )
{
this.nodeMode = sn_mode;
}
@Override
public String toString()
{
return name;
}
/**
* @return the idx
*/
public long getIdx()
{
return idx;
}
/**
* @param idx the idx to set
*/
public void setIdx( long idx )
{
this.idx = idx;
}
/**
* @return the name
*/
public String getName()
{
return name;
}
/**
* @param name the name to set
*/
public void setName( String name )
{
this.name = name;
}
/**
* @return the creation
*/
public Date getCreation()
{
return creation;
}
/**
* @param creation the creation to set
*/
public void setCreation( Date creation )
{
this.creation = creation;
}
public boolean isOnline()
{
return getNodeMode().equals(NM_ONLINE);
}
public boolean isTempOffline()
{
return getNodeMode().equals(NM_TEMP_OFFLINE);
}
public boolean isFullOrOnline()
{
return getNodeMode().equals(NM_ONLINE) || getNodeMode().equals(NM_FULL);
}
public boolean isVirgin()
{
return getNodeMode().equals(NM_VIRGIN);
}
public boolean isFS()
{
return getNodeType().equals(NT_FILESYSTEM);
}
public boolean isFTP()
{
return getNodeType().equals(NT_FTP);
}
public boolean isS3()
{
return getNodeType().equals(NT_S3);
}
public static AbstractStorageNode createFSNode()
{
AbstractStorageNode n = new AbstractStorageNode();
n.setNodeType(NT_FILESYSTEM);
n.setCreation( new Date() );
n.setNodeMode(NM_VIRGIN);
return n;
}
public static AbstractStorageNode createFTPNode()
{
AbstractStorageNode n = new AbstractStorageNode();
n.setNodeType(NT_FTP);
n.setNodeMode(NM_VIRGIN);
return n;
}
public static AbstractStorageNode createS3Node()
{
AbstractStorageNode n = new AbstractStorageNode();
n.setNodeType(NT_S3);
n.setNodeMode(NM_VIRGIN);
return n;
}
public StoragePool getPool()
{
return pool;
}
public void setPool( StoragePool storagePool )
{
this.pool = storagePool;
}
public AbstractStorageNode getCloneNode()
{
return cloneNode;
}
public void setCloneNode( AbstractStorageNode cloneNode )
{
this.cloneNode = cloneNode;
}
}
| [
"mark@dimm.de"
] | mark@dimm.de |
cc1f6dd4f48c99bb1542dded043823aa818999c4 | 8b2a1da80f7cf21697a3f3f1c536ea78eb1c7998 | /family_service_platform/src/main/java/com/zxf/bean/ZhRentTransfer.java | c95a64e3bf3a62a8a09be09f0d0625e295293eac | [] | no_license | zhang6132326/reps4 | b7a6053e23d1bac4afeb766ad15f745e0877eaf6 | 078616768ba8f8c1d37f186b76972c8546eea449 | refs/heads/master | 2023-02-03T11:59:29.903891 | 2020-12-19T12:53:14 | 2020-12-19T12:53:14 | 322,591,549 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,786 | java | package com.zxf.bean;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
/**
* <p>
* 租户转兑; InnoDB free: 8192 kB
* </p>
*
* @author zxf
* @since 2020-09-19
*/
public class ZhRentTransfer implements Serializable {
private static final long serialVersionUID=1L;
/**
* 自动编号
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 所属合同编号
*/
private Integer contractId;
/**
* 转出租户id
*/
private Integer transferOutId;
/**
* 转出租户名称
*/
private String transferOutName;
/**
* 转入租户id
*/
private Integer transferInId;
/**
* 转入租户名称
*/
private String transferInName;
/**
* 更名费
*/
private Double changeNameMoney;
/**
* 转兑说明
*/
private String transferDesc;
/**
* 转兑时间
*/
private LocalDateTime transferDate;
/**
* 操作人
*/
private String operatePerson;
/**
* 操作时间
*/
private LocalDateTime operateDate;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getContractId() {
return contractId;
}
public void setContractId(Integer contractId) {
this.contractId = contractId;
}
public Integer getTransferOutId() {
return transferOutId;
}
public void setTransferOutId(Integer transferOutId) {
this.transferOutId = transferOutId;
}
public String getTransferOutName() {
return transferOutName;
}
public void setTransferOutName(String transferOutName) {
this.transferOutName = transferOutName;
}
public Integer getTransferInId() {
return transferInId;
}
public void setTransferInId(Integer transferInId) {
this.transferInId = transferInId;
}
public String getTransferInName() {
return transferInName;
}
public void setTransferInName(String transferInName) {
this.transferInName = transferInName;
}
public Double getChangeNameMoney() {
return changeNameMoney;
}
public void setChangeNameMoney(Double changeNameMoney) {
this.changeNameMoney = changeNameMoney;
}
public String getTransferDesc() {
return transferDesc;
}
public void setTransferDesc(String transferDesc) {
this.transferDesc = transferDesc;
}
public LocalDateTime getTransferDate() {
return transferDate;
}
public void setTransferDate(LocalDateTime transferDate) {
this.transferDate = transferDate;
}
public String getOperatePerson() {
return operatePerson;
}
public void setOperatePerson(String operatePerson) {
this.operatePerson = operatePerson;
}
public LocalDateTime getOperateDate() {
return operateDate;
}
public void setOperateDate(LocalDateTime operateDate) {
this.operateDate = operateDate;
}
@Override
public String toString() {
return "ZhRentTransfer{" +
"id=" + id +
", contractId=" + contractId +
", transferOutId=" + transferOutId +
", transferOutName=" + transferOutName +
", transferInId=" + transferInId +
", transferInName=" + transferInName +
", changeNameMoney=" + changeNameMoney +
", transferDesc=" + transferDesc +
", transferDate=" + transferDate +
", operatePerson=" + operatePerson +
", operateDate=" + operateDate +
"}";
}
}
| [
"6132326@qq.com"
] | 6132326@qq.com |
503d625bb4d72ea21c8f57b4aff285f34c4c4bc5 | dbbf698ee03afb5b5c126f8b2c06919a7c38baea | /code/src/sneer/bricks/pulp/reactive/gates/buffers/assync/impl/AssynchronousBufferImpl.java | 6e9f1cbfb2e299dca841b731c208eb61f7314a3e | [] | no_license | bamboo/sneer | aa1cebd3f830a1d9585f572ba0feb44c6b641936 | 8719d7bd0af2088dc1b724cebada42f0a4a9401f | refs/heads/master | 2020-05-19T20:01:30.871021 | 2014-02-13T12:32:46 | 2014-02-13T12:32:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,614 | java | package sneer.bricks.pulp.reactive.gates.buffers.assync.impl;
import static basis.environments.Environments.my;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import basis.lang.Closure;
import basis.lang.Consumer;
import sneer.bricks.hardware.cpu.lang.contracts.WeakContract;
import sneer.bricks.hardware.cpu.threads.Threads;
import sneer.bricks.hardware.ram.ref.weak.keeper.WeakReferenceKeeper;
import sneer.bricks.pulp.notifiers.Notifier;
import sneer.bricks.pulp.notifiers.Notifiers;
import sneer.bricks.pulp.notifiers.Source;
class AssynchronousBufferImpl<T> {
private final BlockingQueue<T> _buffer = new LinkedBlockingQueue<T>();
private final Notifier<T> _delegate = my(Notifiers.class).newInstance();
private Thread _daemon;
@SuppressWarnings("unused") private final WeakContract _refToAvoidGc;
AssynchronousBufferImpl(Source<T> input, String threadName) {
my(Threads.class).startDaemon(threadName, new Closure() { @Override public void run() {
_daemon = Thread.currentThread();
try {
while (true)
_delegate.notifyReceivers(_buffer.take());
} catch (InterruptedException expected) {
//finalizer() will interrupt this thread.
}
}});
_refToAvoidGc = input.addReceiver(new Consumer<T>() { @Override public void consume(T value) {
_buffer.add(value);
}});
}
Source<T> output() {
return my(WeakReferenceKeeper.class).keep(_delegate.output(), finalizer());
}
private Object finalizer() {
return new Object() {
@Override protected void finalize() {
_daemon.interrupt();
}
};
}
}
| [
"klauswuestefeld@gmail.com"
] | klauswuestefeld@gmail.com |
aad4d0cd7616c7340ec758544045f733ae20ca5a | a88404e860f9e81f175d80c51b8e735fa499c93c | /hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/graphql/Selection.java | a1cdb27718b2b6afee5b44143831a19debfd245b | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | sabri0/hapi-fhir | 4a53409d31b7f40afe088aa0ee8b946860b8372d | c7798fee4880ee8ffc9ed2e42c29c3b8f6753a1c | refs/heads/master | 2020-06-07T20:02:33.258075 | 2019-06-18T09:40:00 | 2019-06-18T09:40:00 | 193,081,738 | 2 | 0 | Apache-2.0 | 2019-06-21T10:46:17 | 2019-06-21T10:46:17 | null | UTF-8 | Java | false | false | 676 | java | package org.hl7.fhir.utilities.graphql;
public class Selection {
private Field field;
private Fragment inlineFragment;
private FragmentSpread fragmentSpread;
public Field getField() {
return field;
}
public void setField(Field field) {
this.field = field;
}
public Fragment getInlineFragment() {
return inlineFragment;
}
public void setInlineFragment(Fragment inlineFragment) {
this.inlineFragment = inlineFragment;
}
public FragmentSpread getFragmentSpread() {
return fragmentSpread;
}
public void setFragmentSpread(FragmentSpread fragmentSpread) {
this.fragmentSpread = fragmentSpread;
}
} | [
"jamesagnew@gmail.com"
] | jamesagnew@gmail.com |
eeb57b5720bb84ef363faeb21f36ce46d744c7bf | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_1007770.java | 6d8f73f8e08080c760120313a89b5493e2b4268d | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,125 | java | /**
* Filter with a 2D kernel
* @param inData the data
* @param width the width
* @param height the height
* @return the modified height map
*/
public int[] filter(int[] inData,int width,int height){
checkNotNull(inData);
int index=0;
float[] matrix=kernel.getKernelData(null);
int[] outData=new int[inData.length];
int kh=kernel.getHeight();
int kw=kernel.getWidth();
int kox=kernel.getXOrigin();
int koy=kernel.getYOrigin();
for (int y=0; y < height; ++y) {
for (int x=0; x < width; ++x) {
float z=0;
for (int ky=0; ky < kh; ++ky) {
int offsetY=y + ky - koy;
if (offsetY < 0 || offsetY >= height) {
offsetY=y;
}
offsetY*=width;
int matrixOffset=ky * kw;
for (int kx=0; kx < kw; ++kx) {
float f=matrix[matrixOffset + kx];
if (f == 0) continue;
int offsetX=x + kx - kox;
if (offsetX < 0 || offsetX >= width) {
offsetX=x;
}
z+=f * inData[offsetY + offsetX];
}
}
outData[index++]=(int)(z + 0.5);
}
}
return outData;
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
a136eb4645a0d7450f1425043e2929824f5df0fb | af0c4995d4bf5f76a6ca283fc55dfdca4e52ca3a | /unity/src/main/java/com/whaleyvr/biz/unity/IMessage.java | 0d9e9be311a594e2aa36470d90e7ff64e9448560 | [] | no_license | portal-io/portal-android | da60c4a7d54fb56fbc983c635bb1d2c4d542f78e | 623757fbb4d7979745b4c8ee34cebbf395cbd249 | refs/heads/master | 2020-03-20T07:58:08.196164 | 2019-03-16T02:30:48 | 2019-03-16T02:30:48 | 137,295,692 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 325 | java | package com.whaleyvr.biz.unity;
import xiaofei.library.hermes.annotation.ClassId;
import xiaofei.library.hermes.annotation.MethodId;
/**
* Created by dell on 2016/11/23.
*/
@ClassId("Message")
public interface IMessage {
@MethodId("sendEvent")
void sendEvent(String eventName, String dataType, String json);
}
| [
"lizs@snailvr.com"
] | lizs@snailvr.com |
5dd1e0a58ccdd28ecd21680051cfe11a9443a870 | 8a0284a1b6eedf9214ed7dad20f3e2e4c141c334 | /src/bascula/bussines/ConductorService.java | aa8f198c6dfe7dfb45cc10e2eddc6ddd0e87aa80 | [] | no_license | CiroDeLeon/bascula | 3f3ad6f9a5c8eefc0df1ecfef9df32ac1ec4a44b | b6e2e40b3877b8d4fedb8ffe402fb59fdba1c457 | refs/heads/master | 2021-01-22T10:18:27.392198 | 2017-02-15T00:47:03 | 2017-02-15T00:47:03 | 82,001,793 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 681 | 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 bascula.bussines;
import bascula.util.JPA;
/**
*
* @author Usuario1
*/
public class ConductorService {
private bascula.controller.ConductorJpaController controller;
public ConductorService() {
controller=new bascula.controller.ConductorJpaController(JPA.getEntityManagerFactory());
}
/**
* @return the controller
*/
public bascula.controller.ConductorJpaController getController() {
return controller;
}
}
| [
"Usuario1@Usuario"
] | Usuario1@Usuario |
c02963782d4f62296fe28639d240c0dd4b1b728e | ff6f0464736d202844060fdad2f5057d75a9c451 | /spec/src/sda/spec/src-gen/cleon/sda/spec/projectmanagement/protocols/protocolsitems/ProtocolsitemsPackage.java | 0c53c047dda7e88b2ce3ed0a887b6d4c926ba087 | [] | no_license | domschreckling/cleon | 79a157976fc04796560aca32d2417f37efed8526 | 48370c1b911ddfdbe345114661cf864b01073e5e | refs/heads/master | 2021-01-17T12:27:28.691880 | 2016-03-10T15:53:15 | 2016-03-10T15:53:15 | 53,592,164 | 0 | 0 | null | 2016-03-10T14:46:30 | 2016-03-10T14:46:30 | null | UTF-8 | Java | false | false | 1,102 | java | package cleon.sda.spec.projectmanagement.protocols.protocolsitems;
import ch.actifsource.core.Resource;
public class ProtocolsitemsPackage {
public static final Resource Decision = new Resource("4fb5e22c-b463-11e5-a3f4-497fd75158dc");
public static final Resource Information = new Resource("53d1f9cb-b463-11e5-a3f4-497fd75158dc");
public static final Resource Task = new Resource("55988936-b463-11e5-a3f4-497fd75158dc");
public static final Resource Task_deadline = new Resource("74220389-c1dc-11e5-bbf3-bdd12a9e2b3d");
/* Begin Protected Region [[user]] */
/* End Protected Region [[user]] */
private ProtocolsitemsPackage() {}
public static final String getScopeName() {
return "cleon.sda.spec";
}
public static final String getResourceFolderPath() {
return "asrc";
}
public static final String getPackageName() {
return "cleon.sda.spec.projectmanagement.protocols.protocolsitems";
}
}
/* Actifsource ID=[c1a07b92-fc09-11e0-b756-0dc1d96a76cb,cleon.sda.spec.projectmanagement.protocols.protocolsitems,13RSAAzAeecDq0+T0ZME23GwDS8=] */
| [
"marco@zwyssig.info"
] | marco@zwyssig.info |
abe32fb843c214d7fbbaf16a7e9a701049197c1a | 038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad | /schemaOrgDomaConv/src/org/kyojo/schemaOrg/m3n3/doma/pending/container/HealthPlanIdConverter.java | 18fcb67e1dc4ffcd20f955eae70b31d84b923285 | [
"Apache-2.0"
] | permissive | nagaikenshin/schemaOrg | 3dec1626781913930da5585884e3484e0b525aea | 4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8 | refs/heads/master | 2021-06-25T04:52:49.995840 | 2019-05-12T06:22:37 | 2019-05-12T06:22:37 | 134,319,974 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 592 | java | package org.kyojo.schemaorg.m3n3.doma.pending.container;
import org.seasar.doma.ExternalDomain;
import org.seasar.doma.jdbc.domain.DomainConverter;
import org.kyojo.schemaorg.m3n3.pending.impl.HEALTH_PLAN_ID;
import org.kyojo.schemaorg.m3n3.pending.Container.HealthPlanId;
@ExternalDomain
public class HealthPlanIdConverter implements DomainConverter<HealthPlanId, String> {
@Override
public String fromDomainToValue(HealthPlanId domain) {
return domain.getNativeValue();
}
@Override
public HealthPlanId fromValueToDomain(String value) {
return new HEALTH_PLAN_ID(value);
}
}
| [
"nagai@nagaikenshin.com"
] | nagai@nagaikenshin.com |
115d30bb08f526f2476dde4a7362a85bddfaa3f3 | 1583aa7f27c57330042756d39045f989ee323d30 | /src/main/java/uk/ac/ebi/biostd/tools/fetchpmc/Main.java | dbcc2242a26f7ec5732e525f6930a803651b8149 | [] | no_license | EBIBioStudies/MiscTools | bbda17b35e29df9a3fdee93eaf7a3581b2299157 | 4172d0a8e335406afac55cb5f939428c4f924568 | refs/heads/master | 2020-05-21T15:09:44.042355 | 2017-02-20T19:15:10 | 2017-02-20T19:15:10 | 46,571,615 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,700 | java | package uk.ac.ebi.biostd.tools.fetchpmc;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import uk.ac.ebi.biostd.in.PMDoc;
import uk.ac.ebi.biostd.in.pagetab.FileOccurrence;
import uk.ac.ebi.biostd.in.pagetab.SubmissionInfo;
import uk.ac.ebi.biostd.treelog.ErrorCounter;
import uk.ac.ebi.biostd.treelog.ErrorCounterImpl;
import uk.ac.ebi.biostd.treelog.LogNode.Level;
import uk.ac.ebi.biostd.treelog.SimpleLogNode;
public class Main
{
public static final int THREADS = 8;
public static void main(String[] args)
{
if( args.length != 2 )
{
System.err.println("Args: <input file> <output dir>");
return;
}
File srcFile = new File( args[0] );
List<File> files = new ArrayList<File>();
if( srcFile.isDirectory() )
{
for( File f : srcFile.listFiles() )
files.add(f);
}
else
files.add(srcFile);
File outDir = new File( args[1] );
int i=1;
for( File f : files )
processFile(f, outDir, i++, files.size());
}
private static void processFile( File f, File basePath, int ord, int tot )
{
System.out.println("Processing file: '" + f + "' "+ord+"of"+tot);
ErrorCounter ec = new ErrorCounterImpl();
SimpleLogNode topLn = new SimpleLogNode(Level.SUCCESS, "Parsing file: '" + f + "' "+ord+"of"+tot, ec);
PMDoc doc = CVSTVSParse.parse(f, "utf-8", '\t', topLn);
System.out.println("Read "+doc.getSubmissions().size()+" submission");
List<FileEntry> files = new ArrayList<Main.FileEntry>();
for( SubmissionInfo si : doc.getSubmissions() )
{
if( si.getFileOccurrences() == null )
continue;
String sacc = si.getSubmission().getAccNo();
for( FileOccurrence fo : si.getFileOccurrences() )
{
FileEntry fe = new FileEntry();
fe.submissionAcc=sacc;
fe.fileName = fo.getFileRef().getName();
fe.srcFile=f.getName();
files.add(fe);
}
}
Collections.sort(files);
List<FileEntry> uniqFile = new ArrayList<Main.FileEntry>(files.size());
FileEntry prev = null;
for( FileEntry fe : files )
{
if( ! fe.equals( prev ) )
uniqFile.add(fe);
else
System.err.println("Repeating: "+fe.submissionAcc+" "+fe.fileName);
prev=fe;
}
System.out.println("Found "+uniqFile.size()+" files");
ExecutorService pool = Executors.newFixedThreadPool(THREADS);
FileDispencer dsp = new FileDispencer(uniqFile, ord, tot);
for( int i=0; i < THREADS; i++ )
pool.submit( new DownloadTask(basePath, dsp) );
pool.shutdown();
while( true )
{
try
{
if( pool.awaitTermination(7, TimeUnit.DAYS) )
break;
}
catch(InterruptedException e)
{
}
}
System.err.println("File: "+f+" "+ord+"of"+tot+" download finished Total: "+uniqFile.size()+" Success: "+dsp.getSuccess()+" Fail: "+dsp.getFail()+" Skip: "+dsp.getSkip());
}
static class FileEntry implements Comparable<FileEntry>
{
String submissionAcc;
String fileName;
String srcFile;
@Override
public boolean equals(Object obj)
{
if( obj == null )
return false;
return ((FileEntry)obj).submissionAcc.equals(submissionAcc) && ((FileEntry)obj).fileName.equals(fileName);
}
@Override
public int compareTo(FileEntry o)
{
int cmp = submissionAcc.compareTo( o.submissionAcc );
if( cmp != 0 )
return cmp;
return fileName.compareTo(o.fileName);
}
}
}
| [
"gostev@ebi.ac.uk"
] | gostev@ebi.ac.uk |
1f21f0c461fc4767c4b8e47b47006d148c99a8e6 | 74dd63d7d113e2ff3a41d7bb4fc597f70776a9d9 | /timss-attendance/src/main/java/com/timss/atd/flow/dpp/training/v001/TrainingGsldHandler.java | cf07696efa8f01ceb56e15f62bda52a37230566a | [] | no_license | gspandy/timssBusiSrc | 989c7510311d59ec7c9a2bab3b04f5303150d005 | a5d37a397460a7860cc221421c5f6e31b48cac0f | refs/heads/master | 2023-08-14T02:14:21.232317 | 2017-02-16T07:18:21 | 2017-02-16T07:18:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,915 | java | package com.timss.atd.flow.dpp.training.v001;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.timss.attendance.util.AtdUserPrivUtil;
import com.timss.attendance.util.AtdWorkFlowUtil;
import com.timss.attendance.util.ProcessStatusUtil;
import com.yudean.mvc.bean.userinfo.UserInfoScope;
import com.yudean.workflow.task.TaskHandlerBase;
import com.yudean.workflow.task.TaskInfo;
/**
* 公司领导审批
*/
public class TrainingGsldHandler extends TaskHandlerBase {
Logger log = LoggerFactory.getLogger( TrainingGsldHandler.class );
@Autowired
private AtdWorkFlowUtil wfUtil;
@Autowired
private AtdUserPrivUtil privUtil;
final String handlerName="DPP TrainingGsldHandler";
/**
* 回滚前
*/
@Override
public void beforeRollback(TaskInfo sourceTaskInfo, String destTaskKey) {
log.info( handlerName+" beforeRollback" );
super.beforeRollback( sourceTaskInfo, destTaskKey );
}
/**
* 初始化
*/
@Override
public void init(TaskInfo taskInfo) {
log.info( handlerName+" init" );
UserInfoScope userInfo = privUtil.getUserInfoScope();
try {
wfUtil.updateTrainingAuditStatusByTask(taskInfo, ProcessStatusUtil.DPP_TRAINING_GSLD, userInfo.getSecureUser());
super.init( taskInfo );
} catch (Exception e) {
log.error( e.getMessage(), e );
}
}
/**
* 完成
*/
@Override
public void onComplete(TaskInfo taskInfo) {
log.info( handlerName+" onComplete" );
/* UserInfoScope userInfo = privUtil.getUserInfoScope();
try {
wfUtil.updateTrainingAuditStatusByTask(taskInfo, ProcessStatusUtil.CLOSED, userInfo.getSecureUser());
super.init( taskInfo );
} catch (Exception e) {
log.error( e.getMessage(), e );
}*/
super.onComplete( taskInfo );
}
}
| [
"londalonda@qq.com"
] | londalonda@qq.com |
d5d8e9167c921d55825aba00603e953b250b870b | d57b3b513333e821bd85ac9d5f26749ff5917ad1 | /SynergySpace2.1/src_synergynet/synergynet/table/apps/realgravity/.svn/text-base/RealGravityApp.java.svn-base | f4b5e93edca12b5d1a5d4b4f34331698651cd0b7 | [
"BSD-2-Clause"
] | permissive | synergynet/synergynet2.1 | a65ed5010fde83b247b527093f65c97e758d7de4 | 034f11aa94304e7ba95c857fe4cf73bb8d8da4a2 | refs/heads/master | 2020-12-02T16:23:45.669295 | 2017-07-07T15:15:01 | 2017-07-07T15:15:01 | 96,545,952 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,154 | /*
* Copyright (c) 2009 University of Durham, England
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'SynergySpace' nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package synergynet.table.apps.realgravity;
import java.awt.Color;
import java.awt.Point;
import com.jme.bounding.OrthogonalBoundingBox;
import com.jme.system.DisplaySystem;
import synergynet.contentsystem.ContentSystem;
import synergynet.table.appregistry.ApplicationInfo;
import synergynet.table.appregistry.menucontrol.HoldTopRightExit;
import synergynet.table.apps.DefaultSynergyNetApp;
import synergyspace.jme.cursorsystem.elements.twod.CursorEventDispatcher;
public class RealGravityApp extends DefaultSynergyNetApp {
protected UniverseSimulator us;
public RealGravityApp(ApplicationInfo info) {
super(info);
}
@Override
public void addContent() {
setMenuController(new HoldTopRightExit());
Universe.G = Universe.G / 1e1;
Universe u = new Universe();
us = new UniverseSimulator(u, "universequad", 1024f, 768f, 1024, 768, ContentSystem.getContentSystemForSynergyNetApp(this));
MassEntity earth = MassEntity.EARTH;
u.add(earth);
MassEntity mars = MassEntity.MARS;
mars.setPos(new Point.Double(6.37814e7,6.37814e7));
mars.setVel(new Point.Double(-1e3, 1e3));
u.add(mars);
us.setModelBound(new OrthogonalBoundingBox());
us.updateModelBound();
us.setLocalTranslation(DisplaySystem.getDisplaySystem().getWidth()/2, DisplaySystem.getDisplaySystem().getHeight()/2, 0);
orthoNode.attachChild(us);
new CursorEventDispatcher(us, 1);
}
public void setActive(boolean active) {
us.clear(Color.black);
super.setActive(active);
}
@Override
protected void stateUpdate(float tpf) {
us.draw();
}
}
| [
"james.andrew.mcnaughton@gmail.com"
] | james.andrew.mcnaughton@gmail.com | |
3275bdd6d1ac4584d083edd9e60d449b9c788fd5 | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/test/org/sonar/core/util/UuidFactoryImplTest.java | 7821736da153644d0434157b81272e7384e5f2d3 | [] | no_license | STAMP-project/dspot-experiments | f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5 | 121487e65cdce6988081b67f21bbc6731354a47f | refs/heads/master | 2023-02-07T14:40:12.919811 | 2019-11-06T07:17:09 | 2019-11-06T07:17:09 | 75,710,758 | 14 | 19 | null | 2023-01-26T23:57:41 | 2016-12-06T08:27:42 | null | UTF-8 | Java | false | false | 1,573 | java | /**
* SonarQube
* Copyright (C) 2009-2019 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.core.util;
import org.junit.Test;
import static UuidFactoryImpl.INSTANCE;
public class UuidFactoryImplTest {
UuidFactory underTest = INSTANCE;
@Test
public void create_different_uuids() {
// this test is not enough to ensure that generated strings are unique,
// but it still does a simple and stupid verification
assertThat(underTest.create()).isNotEqualTo(underTest.create());
}
@Test
public void test_format_of_uuid() {
String uuid = underTest.create();
assertThat(uuid.length()).isGreaterThan(10).isLessThan(40);
// URL-safe: only letters, digits, dash and underscore.
assertThat(uuid).matches("^[\\w\\-_]+$");
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
d23c6d220758d56d8e34746755d67664deb9e068 | 855bd4cebe23e8042375f753035f747c7e060573 | /src/main/java/jenkins/branch/BranchPropertyDescriptor.java | 1b3df831132daa2158dd06a659de2bd32155a4f8 | [] | no_license | mattmoor/branch-api-plugin | 8b8a5178000c8f22735b09e24294b18fe996a18a | f4890e44a3686e5ae19d0a09ee408148a8f1fb16 | refs/heads/master | 2021-01-21T07:20:32.361016 | 2014-10-31T17:48:06 | 2014-10-31T17:48:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,337 | java | /*
* The MIT License
*
* Copyright (c) 2011-2013, CloudBees, Inc., Stephen Connolly.
*
* 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 jenkins.branch;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.DescriptorExtensionList;
import hudson.model.Descriptor;
import jenkins.model.Jenkins;
import java.util.ArrayList;
import java.util.List;
/**
* {@link Descriptor} for {@link BranchProperty}.
*
* @author Kohsuke Kawaguchi
*/
public abstract class BranchPropertyDescriptor extends Descriptor<BranchProperty> {
/**
* A branch property may not be appropriate for every project, this method lets a property
* opt out of being selectable for a specific project.
*
* @param project the project.
* @return {@code} true iff this property is relevant with this project instance.
*/
@SuppressWarnings("unused") // by stapler
public boolean isApplicable(@NonNull MultiBranchProject project) {
return isApplicable(project.getDescriptor());
}
/**
* Usually a branch property is more concerned with the specific type of project than the specifics of
* the project instance.
*
* @param projectDescriptor the project type.
* @return {@code} true iff this property is relevant with this project type.
*/
protected boolean isApplicable(@NonNull MultiBranchProjectDescriptor projectDescriptor) {
return true;
}
/**
* All the registered {@link BranchPropertyDescriptor}s.
*/
public static DescriptorExtensionList<BranchProperty, BranchPropertyDescriptor> all() {
return Jenkins.getInstance().getDescriptorList(BranchProperty.class);
}
/**
* Gets all the {@link BranchPropertyDescriptor} instances applicable to the specified project.
*
* @param project the project
* @return all the {@link BranchPropertyDescriptor} instances applicable to the specified project.
*/
public static List<BranchPropertyDescriptor> all(@NonNull MultiBranchProject project) {
List<BranchPropertyDescriptor> result = new ArrayList<BranchPropertyDescriptor>();
for (BranchPropertyDescriptor d : all()) {
if (d.isApplicable(project)) {
result.add(d);
}
}
return result;
}
}
| [
"stephen.alan.connolly@gmail.com"
] | stephen.alan.connolly@gmail.com |
ef3c9b419e048fd5f3a15e31df5c669ce41d730b | 607e69f9e4440ef3ab9c33b7b6e85e95b5e982fb | /java/test/com/facebook/profilo/util/TraceEventsFakeRule.java | 2146e4a9e41bbdd29d093822d7b364226c4b752a | [
"Apache-2.0"
] | permissive | simpleton/profilo | 8bda2ebf057036a55efd4dea1564b1f114229d1a | 91ef4ba1a8316bad2b3080210316dfef4761e180 | refs/heads/master | 2023-03-12T13:34:27.037783 | 2018-04-24T22:45:58 | 2018-04-24T22:45:58 | 125,419,173 | 0 | 0 | Apache-2.0 | 2018-03-15T19:54:00 | 2018-03-15T19:54:00 | null | UTF-8 | Java | false | false | 4,489 | java | /**
* Copyright 2004-present, Facebook, 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.facebook.profilo.util;
import static org.mockito.Matchers.anyInt;
import static org.powermock.api.mockito.PowerMockito.doAnswer;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
import static org.powermock.api.mockito.PowerMockito.when;
import com.facebook.profilo.core.TraceEvents;
import org.junit.rules.MethodRule;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
public class TraceEventsFakeRule implements MethodRule {
private static class StatementWithTraceEventsMock extends Statement {
private Statement mParentStatement;
private int mEnabledProviders;
private final int[] mEnabledProviderCounts = new int[32];
StatementWithTraceEventsMock(Statement parentStatement) {
mParentStatement = parentStatement;
}
@Override
public void evaluate() throws Throwable {
setup();
mParentStatement.evaluate();
}
private void setup() throws Exception {
mockStatic(TraceEvents.class);
doAnswer(
new Answer<Void>() {
@Override
public Void answer(InvocationOnMock invocation) throws Throwable {
int providersToEnable = (int) invocation.getArguments()[0];
synchronized (StatementWithTraceEventsMock.this) {
for (int i = 0, p = 1; i < 32; i++, p <<= 1) {
if ((providersToEnable & p) == p) {
mEnabledProviderCounts[i]++;
}
}
mEnabledProviders |= providersToEnable;
}
return null;
}
})
.when(TraceEvents.class, "enableProviders", anyInt());
doAnswer(
new Answer<Void>() {
@Override
public Void answer(InvocationOnMock invocation) throws Throwable {
int providersToDisable = (int) invocation.getArguments()[0];
synchronized (StatementWithTraceEventsMock.this) {
int disableProvidersMask = 0;
for (int i = 0, p = 1; i < 32; i++, p <<= 1) {
if ((providersToDisable & p) == p) {
mEnabledProviderCounts[i]--;
if (mEnabledProviderCounts[i] == 0) {
disableProvidersMask |= p;
}
}
}
mEnabledProviders &= ~disableProvidersMask;
}
return null;
}
})
.when(TraceEvents.class, "disableProviders", anyInt());
when(TraceEvents.isEnabled(anyInt())).thenAnswer(
new Answer<Boolean>() {
@Override
public Boolean answer(InvocationOnMock invocation) throws Throwable {
int providers = (int) invocation.getArguments()[0];
synchronized (StatementWithTraceEventsMock.this) {
return (mEnabledProviders & providers) == providers;
}
}
}
);
when(TraceEvents.enabledMask(anyInt()))
.thenAnswer(
new Answer<Integer>() {
@Override
public Integer answer(InvocationOnMock invocation) throws Throwable {
int providers = (int) invocation.getArguments()[0];
synchronized (StatementWithTraceEventsMock.this) {
return mEnabledProviders & providers;
}
}
});
}
}
@Override
public Statement apply(Statement statement, FrameworkMethod frameworkMethod, Object o) {
return new StatementWithTraceEventsMock(statement);
}
}
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
bb68b278f67da1bbb9592b14ef2275b9334497ac | c9cfc6279726394475f59800259f194d349ea8da | /src/com/scholastic/sbam/server/servlets/UpdateAgreementSiteServiceImpl.java | 6dbb67598936f3488bb8b7b6e84bfbc488b63d98 | [] | no_license | VijayEluri/SBAM-Dev | ce15f813da784fa764c42f8711bc565be6251580 | 1ba017f990e633112d2bbc94e20ac190f799dee4 | refs/heads/master | 2020-05-20T11:15:01.750085 | 2012-02-25T03:19:55 | 2012-02-25T03:19:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,102 | java | package com.scholastic.sbam.server.servlets;
import java.util.Date;
import java.util.List;
import com.scholastic.sbam.client.services.UpdateAgreementSiteService;
import com.scholastic.sbam.server.database.codegen.AgreementSite;
import com.scholastic.sbam.server.database.codegen.AgreementSiteId;
import com.scholastic.sbam.server.database.objects.DbAgreementSite;
import com.scholastic.sbam.server.database.objects.DbInstitution;
import com.scholastic.sbam.server.database.util.HibernateUtil;
import com.scholastic.sbam.server.fastSearch.SiteInstitutionCache;
import com.scholastic.sbam.server.validation.AppAgreementSiteValidator;
import com.scholastic.sbam.shared.objects.InstitutionInstance;
import com.scholastic.sbam.shared.objects.UpdateResponse;
import com.scholastic.sbam.shared.objects.AgreementSiteInstance;
import com.scholastic.sbam.shared.security.SecurityManager;
import com.scholastic.sbam.shared.util.AppConstants;
/**
* The server side implementation of the RPC service.
*/
@SuppressWarnings("serial")
public class UpdateAgreementSiteServiceImpl extends AuthenticatedServiceServlet implements UpdateAgreementSiteService {
@Override
public UpdateResponse<AgreementSiteInstance> updateAgreementSite(AgreementSiteInstance instance) throws IllegalArgumentException {
boolean newCreated = false;
String messages = null;
AgreementSite dbInstance = null;
authenticate("update agreement site", SecurityManager.ROLE_MAINT);
HibernateUtil.openSession();
HibernateUtil.startTransaction();
try {
// Pre-edit/fix values
validateInput(instance);
// Get existing, or create new
if (instance.getAgreementId() > 0 && instance.getSiteUcn() > 0) {
dbInstance = DbAgreementSite.getById(instance.getAgreementId(), instance.getSiteUcn(), instance.getSiteUcnSuffix(), instance.getSiteLocCode());
}
// If none found, create new
if (dbInstance == null) {
newCreated = true;
dbInstance = new AgreementSite();
AgreementSiteId id = new AgreementSiteId();
id.setAgreementId(instance.getAgreementId());
id.setSiteUcn(instance.getSiteUcn());
id.setSiteUcnSuffix(instance.getSiteUcnSuffix());
id.setSiteLocCode(instance.getSiteLocCode());
dbInstance.setId(id);
// Set the create date/time and status
dbInstance.setCreatedDatetime(new Date());
}
// Update values
if (instance.getStatus() != 0)
dbInstance.setStatus(instance.getStatus());
if (instance.getCommissionCode() != null)
dbInstance.setCommissionCode(instance.getCommissionCode());
if (instance.getCancelReasonCode() != null)
dbInstance.setCancelReasonCode(instance.getCancelReasonCode());
if (instance.getOrgPath() != null)
dbInstance.setOrgPath(instance.getOrgPath());
if (instance.getNote() != null)
dbInstance.setNote(instance.getNote());
if (instance.getActiveDate() != null)
dbInstance.setActiveDate(instance.getActiveDate());
if (instance.getInactiveDate() != null)
dbInstance.setInactiveDate(instance.getInactiveDate());
// Fix any nulls
if (dbInstance.getCancelReasonCode() == null)
dbInstance.setCancelReasonCode("");
if (dbInstance.getOrgPath() == null)
dbInstance.setOrgPath("");
if (dbInstance.getNote() == null)
dbInstance.setNote("");
// Fix cancel values
if (dbInstance.getCancelReasonCode() != null && dbInstance.getCancelReasonCode().length() > 0) {
if (dbInstance.getInactiveDate() == null)
dbInstance.setInactiveDate(new Date());
if (dbInstance.getStatus() != AppConstants.STATUS_DELETED) // If it's already marked DELETED, then that's better than cancelled, so leave it
dbInstance.setStatus(AppConstants.STATUS_INACTIVE);
} else {
if (dbInstance.getInactiveDate() != null)
dbInstance.setInactiveDate(null);
if (dbInstance.getStatus() == AppConstants.STATUS_INACTIVE)
dbInstance.setStatus(AppConstants.STATUS_ACTIVE);
}
// Persist in database
DbAgreementSite.persist(dbInstance);
// Refresh when new row is created, to get assigned ID
if (newCreated) {
// DbAgreementSite.refresh(dbInstance); // This may not be necessary, but just in case
instance.setCreatedDatetime(dbInstance.getCreatedDatetime());
DbAgreementSite.setDescriptions(instance);
}
// Finally, record the customer in the site cache
if (SiteInstitutionCache.getSingleton() != null) {
InstitutionInstance institution = instance.getSite().getInstitution();
if (institution == null && instance.getSiteUcn() > 0) {
institution = DbInstitution.getInstance(DbInstitution.getByCode(instance.getSiteUcn()));
}
if (institution != null)
SiteInstitutionCache.getSingleton().addInstitution(institution);
}
} catch (IllegalArgumentException exc) {
silentRollback();
throw exc;
} catch (Exception exc) {
silentRollback();
exc.printStackTrace();
throw new IllegalArgumentException("The agreement site update failed unexpectedly.");
} finally {
if (HibernateUtil.isTransactionInProgress())
HibernateUtil.endTransaction();
HibernateUtil.closeSession();
}
return new UpdateResponse<AgreementSiteInstance>(instance, messages);
}
private void validateInput(AgreementSiteInstance instance) throws IllegalArgumentException {
AppAgreementSiteValidator validator = new AppAgreementSiteValidator();
validator.setOriginal(instance); // This isn't really the original, but it's good enough, because it has the original ID
testMessages(validator.validateAgreementSite(instance));
}
private void testMessages(List<String> messages) throws IllegalArgumentException {
if (messages != null)
for (String message: messages)
testMessage(message);
}
private void testMessage(String message) throws IllegalArgumentException {
if (message != null && message.length() > 0)
throw new IllegalArgumentException(message);
}
private void silentRollback() {
try {
if (HibernateUtil.isTransactionInProgress())
HibernateUtil.getSession().getTransaction().rollback();
} catch (Exception exc) { }
}
}
| [
"blacatena@comcast.net"
] | blacatena@comcast.net |
21ff82de7e5db50e4ce1f88213f04291037a250a | 9c99a856e674006f7fbec93f0d8b92c9dfa1bd30 | /assignment6.1/src/a6adept/FrameArea.java | 23f06f99642d5aad252c8ad96e43d46ed3b7cc8f | [] | no_license | maoxuxiang/CS401-JavaAssignment | db2b902b17d3ef97f4889c1479dafdef4efbf6d1 | f9ba0133f83f3d24139d43f190bf2365ab360873 | refs/heads/master | 2021-01-18T15:23:41.235886 | 2014-10-08T03:16:25 | 2014-10-08T03:16:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,305 | java | package a6adept;
public class FrameArea {
protected int min_x;
protected int min_y;
protected int max_x;
protected int max_y;
public FrameArea(int min_x, int min_y, int max_x, int max_y) {
this.min_x = min_x;
this.min_y = min_y;
this.max_x = max_x;
this.max_y = max_y;
}
public int getMinX() {
return min_x;
}
public int getMaxX() {
return max_x;
}
public int getMinY() {
return min_y;
}
public int getMaxY() {
return max_y;
}
public FrameArea intersect(FrameArea other) throws NoIntersectionException {
if(other == null ||
other.getMaxX() < this.getMinX() ||
other.getMaxY() < this.getMinY() ||
other.getMinX() > this.getMaxX() ||
other.getMinY() > this.getMaxY())
throw new NoIntersectionException("There is no intersection area between the two rectangle.");
int newMin_y = other.getMinY() > this.getMinY() ? other.getMinY() : this.getMinY();
int newMax_y = other.getMaxY() < this.getMaxY() ? other.getMaxY() : this.getMaxY();
int newMin_x = other.getMinX() > this.getMinX() ? other.getMinX() : this.getMinX();
int newMax_x = other.getMaxX() > this.getMaxX() ? other.getMaxX() : this.getMaxX();
return new FrameArea(newMin_x, newMin_y, newMax_x, newMax_y);
}
public boolean isIntersect(FrameArea other) {
if(other == null ||
other.getMaxX() < this.getMinX() ||
other.getMaxY() < this.getMinY() ||
other.getMinX() > this.getMaxX() ||
other.getMinY() > this.getMaxY())
return false;
else
return true;
}
public FrameArea union(FrameArea other) {
if(other == null)
return this;
int newMax_y = other.getMaxY() > this.getMaxY() ? other.getMaxY() : this.getMaxY();
int newMin_y = other.getMinY() < this.getMinY() ? other.getMinY() : this.getMinY();
int newMin_x = other.getMinX() < this.getMinX() ? other.getMinX() : this.getMinX();
int newMax_x = other.getMaxX() > this.getMaxX() ? other.getMaxX() : this.getMaxX();
return new FrameArea(newMin_x, newMin_y, newMax_x, newMax_y);
}
public FrameArea translate(int dx, int dy) {
return new FrameArea(min_x + dx, min_y + dy, max_x + dx, max_y + dy);
}
public String toString() {
return "("+this.getMinX() + ", "+ this.getMinY() + ")::("+this.getMaxX() +", " +this.getMaxY()+")";
}
}
| [
"maoxuxiang@gmail.com"
] | maoxuxiang@gmail.com |
0ace003e35d04d7b8bef3b8c210cb7d430e3ec21 | c66d5e45f88261372a3fbc48fc4640fb81be13da | /spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTestContextBootstrapper.java | fc94a5eba48d0a58f68f466656b0037c6fc7982c | [
"Apache-2.0"
] | permissive | hyfsy/source-spring-boot | d88fee94070d3a85e6b5c2f9c8056ef5000f43af | 407e06a42c97c971c5f175dde0a5035f1084a3b8 | refs/heads/master | 2023-07-17T07:58:43.811644 | 2021-03-26T12:29:10 | 2021-03-26T12:29:10 | 264,668,856 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,382 | java | /*
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.test.autoconfigure.data.ldap;
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.test.context.TestContextBootstrapper;
/**
* {@link TestContextBootstrapper} for {@link DataLdapTest @DataLdapTest} support.
*
* @author Artsiom Yudovin
*/
class DataLdapTestContextBootstrapper extends SpringBootTestContextBootstrapper {
@Override
protected String[] getProperties(Class<?> testClass) {
DataLdapTest annotation = AnnotatedElementUtils.getMergedAnnotation(testClass,
DataLdapTest.class);
return (annotation != null) ? annotation.properties() : null;
}
}
| [
"1577975140@qq.com"
] | 1577975140@qq.com |
67b58cfb7b0ef57eacdab062e00be29678b8c896 | c3cf33e7b9fe20ff3124edcfc39f08fa982b2713 | /pocs/netty-pure-fun/src/main/java/ResponseData.java | 0f9a1342428b79c5291df1d270f630259819f364 | [
"Unlicense"
] | permissive | diegopacheco/java-pocs | d9daa5674921d8b0d6607a30714c705c9cd4c065 | 2d6cc1de9ff26e4c0358659b7911d2279d4008e1 | refs/heads/master | 2023-08-30T18:36:34.626502 | 2023-08-29T07:34:36 | 2023-08-29T07:34:36 | 107,281,823 | 47 | 57 | Unlicense | 2022-03-23T07:24:08 | 2017-10-17T14:42:26 | Java | UTF-8 | Java | false | false | 305 | java | public class ResponseData {
private int intValue;
int getIntValue() {
return intValue;
}
void setIntValue(int intValue) {
this.intValue = intValue;
}
@Override
public String toString() {
return "ResponseData{" + "intValue=" + intValue + '}';
}
} | [
"diego.pacheco.it@gmail.com"
] | diego.pacheco.it@gmail.com |
d37414b18113a3453a763e07ab4b60ed5740721a | 654ead59b85f0faf813a0f0900832503750cdfd6 | /bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitSenderFactory.java | 2fda7d814bf82ef59fc87a298458144397c7ace1 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | doublej472/LuckPerms | c12dd6d353535cf4468769a27969d450dd25918f | 2cb5e437fd65200eefe9a39f418d94da6a14c167 | refs/heads/master | 2020-04-12T09:19:27.407255 | 2018-12-18T16:02:25 | 2018-12-18T16:02:25 | 162,399,055 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,119 | java | /*
* This file is part of LuckPerms, licensed under the MIT License.
*
* Copyright (c) lucko (Luck) <luck@lucko.me>
* Copyright (c) contributors
*
* 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 me.lucko.luckperms.bukkit;
import me.lucko.luckperms.api.Tristate;
import me.lucko.luckperms.bukkit.compat.BukkitJsonMessageHandler;
import me.lucko.luckperms.bukkit.compat.CraftBukkitUtil;
import me.lucko.luckperms.bukkit.compat.SpigotJsonMessageHandler;
import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
import me.lucko.luckperms.common.sender.Sender;
import me.lucko.luckperms.common.sender.SenderFactory;
import me.lucko.luckperms.common.util.TextUtils;
import net.kyori.text.Component;
import net.kyori.text.serializer.ComponentSerializers;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.RemoteConsoleCommandSender;
import org.bukkit.entity.Player;
import java.util.UUID;
public class BukkitSenderFactory extends SenderFactory<CommandSender> {
private final BukkitJsonMessageHandler bukkitHandler;
private final SpigotJsonMessageHandler spigotHandler;
public BukkitSenderFactory(LuckPermsPlugin plugin) {
super(plugin);
this.bukkitHandler = new BukkitJsonMessageHandler();
this.spigotHandler = isSpigot() ? new SpigotJsonMessageHandler() : null;
}
@Override
protected String getName(CommandSender sender) {
if (sender instanceof Player) {
return sender.getName();
}
return Sender.CONSOLE_NAME;
}
@Override
protected UUID getUuid(CommandSender sender) {
if (sender instanceof Player) {
return ((Player) sender).getUniqueId();
}
return Sender.CONSOLE_UUID;
}
@Override
protected void sendMessage(CommandSender sender, String s) {
// we can safely send async for players and the console
if (sender instanceof Player || sender instanceof ConsoleCommandSender || sender instanceof RemoteConsoleCommandSender) {
sender.sendMessage(s);
return;
}
// otherwise, send the message sync
getPlugin().getBootstrap().getScheduler().executeSync(new SyncMessengerAgent(sender, s));
}
@Override
protected void sendMessage(CommandSender sender, Component message) {
if (CraftBukkitUtil.isChatCompatible() && sender instanceof Player) {
Player player = (Player) sender;
String json = ComponentSerializers.JSON.serialize(message);
// Try Bukkit.
if (this.bukkitHandler.sendJsonMessage(player, json)) {
return;
}
// Try Spigot.
if (this.spigotHandler != null && this.spigotHandler.sendJsonMessage(player, json)) {
return;
}
}
// Fallback to legacy format
sendMessage(sender, TextUtils.toLegacy(message));
}
@Override
protected Tristate getPermissionValue(CommandSender sender, String node) {
boolean isSet = sender.isPermissionSet(node);
boolean val = sender.hasPermission(node);
return !isSet ? val ? Tristate.TRUE : Tristate.UNDEFINED : Tristate.fromBoolean(val);
}
@Override
protected boolean hasPermission(CommandSender sender, String node) {
return sender.hasPermission(node);
}
private static boolean isSpigot() {
try {
Class.forName("net.md_5.bungee.chat.ComponentSerializer");
return true;
} catch (ClassNotFoundException e) {
return false;
}
}
private static final class SyncMessengerAgent implements Runnable {
private final CommandSender sender;
private final String message;
private SyncMessengerAgent(CommandSender sender, String message) {
this.sender = sender;
this.message = message;
}
@Override
public void run() {
this.sender.sendMessage(this.message);
}
}
}
| [
"git@lucko.me"
] | git@lucko.me |
5b022c27cac1f42aebc381ecbe1405e69ae5e4fb | 32bdd1b2fddc92a6cb8df128f2e049834148139c | /core/src/main/java/org/operamasks/faces/annotation/MapEntry.java | 29d092391c1f3058724e8fb3016d56dfceab1926 | [] | no_license | luobenyu/OperaMasks | e678ed4ad9dbb237a047ca0124da1bfb3249e28c | b772b2fd51d7d3da0471d7f46d69a521dc47e7d9 | refs/heads/master | 2021-05-28T09:47:20.328604 | 2012-11-17T22:19:51 | 2012-11-17T22:20:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 995 | java | /*
* $Id: MapEntry.java,v 1.4 2007/10/12 03:50:16 daniel Exp $
*
* Copyright (C) 2006 Operamasks Community.
* Copyright (C) 2000-2006 Apusic Systems, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses.
*/
package org.operamasks.faces.annotation;
import java.lang.annotation.*;
@Documented
@Target({})
@Retention(RetentionPolicy.RUNTIME)
public @interface MapEntry
{
String key();
String value();
}
| [
"daniel.yuan@me.com"
] | daniel.yuan@me.com |
dd34283e50f121bf876a18dbe3b7efde2526b01a | 279589599c0038fa253e7870cd9e6d9d1ade018a | /issueTracker/src/main/java/com/issueTracker/repositories/UserRepositoryImpl.java | 50f96e3af0c1d0130104106ef5d134ec2da7f973 | [
"MIT"
] | permissive | vanncho/Java-Web-Development-Basics | 084531944aa90b1ddf5b1f1c55760a1bf4c34512 | 46262a17d81a5439db1d5fd097b6257dd85c4181 | refs/heads/master | 2021-01-19T13:21:37.358676 | 2017-07-13T09:23:14 | 2017-07-13T09:23:14 | 82,379,119 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,550 | java | package com.issueTracker.repositories;
import com.issueTracker.entities.User;
import javax.ejb.Local;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
@Stateless
@Local(UserRepository.class)
public class UserRepositoryImpl implements UserRepository {
@PersistenceContext
private EntityManager entityManager;
@Override
public User getById(Long id) {
//return this.entityManager.find(User.class, id);
Query query = this.entityManager.createQuery("SELECT u FROM User AS u WHERE u.id = :id");
query.setParameter("id", id);
User user = null;
if (query.getResultList().size() > 0) {
user = (User) query.getSingleResult();
}
return user;
}
@Override
public User getByUsername(String username) {
Query query = this.entityManager.createQuery("SELECT u FROM User AS u WHERE u.username = :username");
query.setParameter("username", username);
User user = null;
if (query.getResultList().size() > 0) {
user = (User) query.getSingleResult();
}
return user;
}
@Override
public User getByUsernameAndPassword(String username, String password) {
Query query = this.entityManager.createQuery("SELECT u FROM User AS u WHERE u.username = :username AND u.password = :password");
query.setParameter("username", username);
query.setParameter("password", password);
User user = null;
if (query.getResultList().size() > 0) {
user = (User) query.getSingleResult();
}
return user;
}
@Override
public void create(User user) {
this.entityManager.persist(user);
}
@Override
public boolean exists(String username) {
Query query = this.entityManager.createQuery("SELECT u FROM User AS u Where u.username = :username");
query.setParameter("username", username);
User user = null;
if (query.getResultList().size() > 0) {
user = (User) query.getSingleResult();
}
return user != null;
}
@Override
public boolean hasAdmin() {
Query query = this.entityManager.createQuery("SELECT u FROM User AS u Where u.role = 'ADMIN'");
User user = null;
if (query.getResultList().size() > 0) {
user = (User) query.getSingleResult();
return true;
}
return false;
}
}
| [
"van_cho@abv.bg"
] | van_cho@abv.bg |
0b4ac320cf48966bb5c7066c611d5136c823e30c | 62ab8c6f006bd139a98bf013d360a13e6b936ea0 | /Core_Java/in28Minutes/src/main/java/com/in28Minutes/generics/MyCustomList2.java | f7d81c43bf82df56e43333f019bd814472871fc6 | [] | no_license | sagarrao1/in28Minutes | 1ce1f89d1ef623b38773bad02db1b97f3821d322 | 8a9bf2e3520f8280366db00943afbef55f256c97 | refs/heads/master | 2023-08-10T14:41:30.272595 | 2023-07-20T04:28:36 | 2023-07-20T04:28:36 | 230,353,633 | 0 | 0 | null | 2022-12-16T06:37:14 | 2019-12-27T01:46:36 | Java | UTF-8 | Java | false | false | 534 | java | package com.in28Minutes.generics;
import java.util.ArrayList;
import java.util.List;
//Generics with Class and extends to restrict sub classes of then generic
public class MyCustomList2<T extends Number> {
List<T> list = new ArrayList<>();
public void addElement(T elelment) {
list.add(elelment);
}
public void removeElement(T elelment) {
list.remove(elelment);
}
public T getElement(int index) {
return list.get(index);
}
@Override
public String toString() {
return "MyCustomList [list=" + list + "]";
}
}
| [
"sagarrao1@gmail.com"
] | sagarrao1@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.