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
aa40883d65432cf10ce61ca300365998fd7f58ba
1b5198ee78ae843d1d1f9c2f69c86e81cb8e51d8
/PSSIAS_EclipseSVN/java_src/com/dyneinfo/pmdd/model/SsNoticeReply.java
084f98461718d8ab9713d567662720ca7bc526c7
[]
no_license
339751607/PSSIAS
adef13088d0bc49b681a528b6885041c1e8333d6
16f36c1e7651b9829643fce955344f174f531e84
refs/heads/master
2021-01-01T16:25:33.418532
2014-11-21T14:53:59
2014-11-21T14:53:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,244
java
/* * Powered By [lishicheng] */ package com.dyneinfo.pmdd.model; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import java.util.*; import javacommon.base.*; import javacommon.util.*; import cn.org.rapid_framework.util.*; import cn.org.rapid_framework.web.util.*; import cn.org.rapid_framework.page.*; import cn.org.rapid_framework.page.impl.*; import com.dyneinfo.pmdd.dao.*; import com.dyneinfo.pmdd.model.*; import com.dyneinfo.pmdd.service.*; /** * @author lisc email:lishicheng(a)gmail.com */ public class SsNoticeReply extends BaseEntity { //alias public static final String TABLE_ALIAS = "回执信息"; public static final String ALIAS_NOTICEID = "通知通告ID"; public static final String ALIAS_DEPTID = "部门编号"; public static final String ALIAS_REPLYDATE = "回执日期"; public static final String ALIAS_DEPTNAME = "单位名称"; public static final String ALIAS_NOTICETITLE = "通知通告标题"; //date formats //columns START private java.lang.String noticeid; private java.lang.String deptid; private java.lang.String replydate; private java.lang.String deptname; private java.lang.String noticetitle; //columns END public java.lang.String getDeptname() { return deptname; } public void setDeptname(java.lang.String deptname) { this.deptname = deptname; } public java.lang.String getNoticetitle() { return noticetitle; } public void setNoticetitle(java.lang.String noticetitle) { this.noticetitle = noticetitle; } public SsNoticeReply(){ } public SsNoticeReply(java.lang.String noticeid){ this.noticeid = noticeid; } public java.lang.String getNoticeid() { return noticeid; } public void setNoticeid(java.lang.String noticeid) { this.noticeid = noticeid; } public java.lang.String getDeptid() { return deptid; } public void setDeptid(java.lang.String deptid) { this.deptid = deptid; } public java.lang.String getReplydate() { return replydate; } public void setReplydate(java.lang.String replydate) { this.replydate = replydate; } public String toString() { return new ToStringBuilder(this) .append("Noticeid",getNoticeid()) .append("Deptid",getDeptid()) .append("Replydate",getReplydate()) .append("Deptname",getDeptname()) .append("Noticetitle",getNoticetitle()) .toString(); } public int hashCode() { return new HashCodeBuilder() .append(getNoticeid()) .append(getDeptid()) .append(getReplydate()) .append(getDeptname()) .append(getNoticetitle()) .toHashCode(); } public boolean equals(Object obj) { if(obj instanceof SsNoticeReply == false) return false; if(this == obj) return true; SsNoticeReply other = (SsNoticeReply)obj; return new EqualsBuilder() .append(getNoticeid(),other.getNoticeid()) .append(getDeptid(),other.getDeptid()) .append(getReplydate(),other.getReplydate()) .append(getDeptname(),other.getDeptname()) .append(getNoticetitle(),other.getNoticetitle()) .isEquals(); } }
[ "liuduosan@126.com" ]
liuduosan@126.com
c4c48888b90890ad0f31788b8d0a1bd1aa647b77
827bf064e482700d7ded2cd0a3147cb9657db883
/WebAppsTemplate/Older Versions/U - Parse Analytics V1.1/U - Parse Analytics V1.1/src/com/universal/twi/ui/TweetDetailActivity.java
44ff8ae427de053ae921717df769ee8a7bf23736
[ "MIT", "Apache-2.0" ]
permissive
cody0117/LearnAndroid
d30b743029f26568ccc6dda4313a9d3b70224bb6
02fd4d2829a0af8a1706507af4b626783524813e
refs/heads/master
2021-01-21T21:10:18.553646
2017-02-12T08:43:24
2017-02-12T08:43:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,370
java
package com.universal.twi.ui; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdView; import com.universal.R; import com.universal.fav.FavDbAdapter; import com.universal.fav.ui.FavActivity; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; /** * This activity is used to display the details of a click tweet */ public class TweetDetailActivity extends Activity { String name; String tweetId; String username; String tweet; String date; String favorite; private FavDbAdapter mDbHelper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_twitter_details); TextView detailsTitle = (TextView)findViewById(R.id.detailstitle); TextView detailsDescription = (TextView)findViewById(R.id.detailsdescription); TextView detailsPubdate = (TextView)findViewById(R.id.detailspubdate); Bundle bundle = this.getIntent().getExtras(); detailsTitle.setText(bundle.getString("keyRealName")); detailsDescription.setText(bundle.getString("keyTweet")); detailsPubdate.setText(bundle.getString("keyPubdate")); date = (bundle.getString("keyPubdate")); name = (bundle.getString("keyRealName")); tweetId = (bundle.getString("keyId")); username = (bundle.getString("keyUsername")); tweet = (bundle.getString("keyTweet")); favorite = (bundle.getString("keyFavorites")); Button btnOpenWeb = (Button) findViewById(R.id.openbuttonweb); //Listening to button event btnOpenWeb.setOnClickListener(new View.OnClickListener() { public void onClick(View arg0) { Intent intent=new Intent(Intent.ACTION_VIEW, Uri.parse("http://twitter.com/"+username+"/status/"+tweetId)); startActivity(intent); } }); Button btnFav = (Button) findViewById(R.id.favoritebutton); //Listening to button event btnFav.setOnClickListener(new View.OnClickListener() { public void onClick(View arg0) { mDbHelper = new FavDbAdapter(TweetDetailActivity.this); mDbHelper.open(); if(mDbHelper.checkEvent("@"+ username + " "+ tweet, tweet, date, tweetId, name, username, "twitter")) { // Item is new mDbHelper.addFavorite("@"+ username + " "+ tweet, tweet, date, tweetId, name, username, "twitter"); Toast toast = Toast.makeText(TweetDetailActivity.this, getResources().getString(R.string.favorite_success), Toast.LENGTH_LONG); toast.show(); } else { Toast toast = Toast.makeText(TweetDetailActivity.this, getResources().getString(R.string.favorite_duplicate), Toast.LENGTH_LONG); toast.show(); } } }); if ((getResources().getString(R.string.ad_visibility).equals("0"))){ // Look up the AdView as a resource and load a request. AdView adView = (AdView) findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder().build(); adView.loadAd(adRequest); } } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.share: String applicationName = getResources().getString(R.string.app_name); Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); String link = ("http://twitter.com/"+username+"/status/"+tweetId); //this is the text that will be shared sendIntent.putExtra(Intent.EXTRA_TEXT, (tweet+ "\n@"+ username+ " \n\n"+ getResources().getString(R.string.tweet_share_url)+ link+ getResources().getString(R.string.tweet_share_text_begin)+ applicationName+ getResources().getString(R.string.tweet_share_text_end))); sendIntent.putExtra(Intent.EXTRA_SUBJECT, name+getResources().getString(R.string.tweet_share_header)); //you can replace title with a string of your choice sendIntent.setType("text/plain"); startActivity(Intent.createChooser(sendIntent, getResources().getString(R.string.share_header))); return true; default: return super.onOptionsItemSelected(item); } } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.tweet_detail_menu, menu); return true; } @Override public void onBackPressed() { if ("true".equals(favorite)) { startActivity(new Intent(this, FavActivity.class)); } else { super.onBackPressed(); // optional depending on your needs } } }
[ "em3888@gmail.com" ]
em3888@gmail.com
bb6b46449ec35ba50ef681242aa6c52abe08eeeb
7e8c8c1eae665391fa04b20139e2a161828fcd8d
/src/main/java/com/almasb/fxgl/event/AchievementProgressEvent.java
5f0ee31346ab77f570e935fac2c66887b4596bce
[ "MIT" ]
permissive
vipyami/FXGL
8314b5fb82711cd3b986420798478eb77513d72c
c0847f1e87e1d04086b1f990c6b0949efb2a7215
refs/heads/master
2021-01-19T13:31:06.514400
2017-01-29T23:50:35
2017-01-29T23:50:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,100
java
/* * The MIT License (MIT) * * FXGL - JavaFX Game Library * * Copyright (c) 2015-2017 AlmasB (almaslvl@gmail.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.almasb.fxgl.event; import com.almasb.fxgl.gameplay.Achievement; import javafx.event.EventType; /** * Fired when a numeric value based achievement has made some progress. * * @author Almas Baimagambetov (almaslvl@gmail.com) */ public final class AchievementProgressEvent extends AchievementEvent { public static final EventType<AchievementProgressEvent> PROGRESS = new EventType<>(ANY, "PROGRESS"); private double value, max; public double getValue() { return value; } public double getMax() { return max; } public AchievementProgressEvent(Achievement achievement, double value, double max) { super(PROGRESS, achievement); this.value = value; this.max = max; } @Override public String toString() { return "AchievementProgressEvent[value=" + value + ",max=" + max + "]"; } }
[ "almaslvl@gmail.com" ]
almaslvl@gmail.com
8eaae24151de001638f3c93cda51d5777c4aba8b
26af96749dd96608a6f8afa720077842aa193d8a
/src/main/java/com/lhjl/tzzs/proxy/model/UserToken.java
c9421f126069504575f0a0aacfe0226c2c192746
[]
no_license
SyuuTou/wlspacecraft
f2030f7ab70c09818c979cffa7613cd28150baf1
78a78861cb4e95e1a468f1d0a1f5682dc0e0b99f
refs/heads/master
2020-03-23T13:58:08.788678
2018-08-22T02:41:33
2018-08-22T02:41:33
141,648,032
1
0
null
null
null
null
UTF-8
Java
false
false
2,243
java
package com.lhjl.tzzs.proxy.model; import java.util.Date; import javax.persistence.*; @Table(name = "user_token") public class UserToken { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; /** * 用户id */ @Column(name = "user_id") private Integer userId; /** * token信息 */ private String token; /** * 注册时间 */ @Column(name = "register_time") private Date registerTime; /** * 应用id */ @Column(name = "meta_app_id") private String metaAppId; /** * @return id */ public Integer getId() { return id; } /** * @param id */ public void setId(Integer id) { this.id = id; } /** * 获取用户id * * @return user_id - 用户id */ public Integer getUserId() { return userId; } /** * 设置用户id * * @param userId 用户id */ public void setUserId(Integer userId) { this.userId = userId; } /** * 获取token信息 * * @return token - token信息 */ public String getToken() { return token; } /** * 设置token信息 * * @param token token信息 */ public void setToken(String token) { this.token = token; } /** * 获取注册时间 * * @return register_time - 注册时间 */ public Date getRegisterTime() { return registerTime; } /** * 设置注册时间 * * @param registerTime 注册时间 */ public void setRegisterTime(Date registerTime) { this.registerTime = registerTime; } /** * 获取应用id * * @return meta_app_id - 应用id */ public String getMetaAppId() { return metaAppId; } /** * 设置应用id * * @param metaAppId 应用id */ public void setMetaAppId(String metaAppId) { this.metaAppId = metaAppId; } @Override public String toString() { return "UserToken [id=" + id + ", userId=" + userId + ", token=" + token + ", registerTime=" + registerTime + ", metaAppId=" + metaAppId + "]"; } }
[ "1152750238@qq.com" ]
1152750238@qq.com
eae58f68d36c15c0927f99fbe54999164f615954
edfb435ee89eec4875d6405e2de7afac3b2bc648
/tags/selenium-2.0-beta-1/htmlunit/test/java/org/openqa/selenium/htmlunit/InputKeysContainerTest.java
e71e44e74b6dd23ecc933c719739f24482518c81
[ "Apache-2.0" ]
permissive
Escobita/selenium
6c1c78fcf0fb71604e7b07a3259517048e584037
f4173df37a79ab6dd6ae3f1489ae0cd6cc7db6f1
refs/heads/master
2021-01-23T21:01:17.948880
2012-12-06T22:47:50
2012-12-06T22:47:50
8,271,631
1
0
null
null
null
null
UTF-8
Java
false
false
1,723
java
package org.openqa.selenium.htmlunit; import junit.framework.TestCase; import org.openqa.selenium.Keys; public class InputKeysContainerTest extends TestCase { public void testConstructionFromSingleCharSequence() { CharSequence sequence = "abc"; InputKeysContainer container = new InputKeysContainer(sequence); assertEquals("Should be the same as input sequence", "abc", container.toString()); } public void testConstructionFromMultipleSequences() { CharSequence seq1 = "abc"; CharSequence seq2 = "def"; InputKeysContainer container = new InputKeysContainer(seq1, " ", seq2); assertEquals("Should be concatenation of two sequences with space", "abc def", container.toString()); } public void testShouldTerminateStringAtSubmissionKey() { InputKeysContainer container = new InputKeysContainer(true, "abc", Keys.ENTER, "def"); assertEquals("Should not get a string past Keys.ENTER", "abc", container.toString()); assertTrue("Was supposed to identify submit key.", container.wasSubmitKeyFound()); } public void testShouldNotTerminateAStringIfNotRequested() { InputKeysContainer container = new InputKeysContainer(false, "abc", Keys.ENTER, "def"); assertEquals("Should get the entire string", "abc" + '\uE007' + "def", container.toString()); assertTrue("Was supposed to identify submit key.", container.wasSubmitKeyFound()); } public void testShouldCapitalizeWhenAsked() { InputKeysContainer container = new InputKeysContainer(false, "abc", Keys.ENTER, "def"); container.setCapitalization(true); assertEquals("Should get the a capitalized string", "ABC" + '\uE007' + "DEF", container.toString()); } }
[ "simon.m.stewart@07704840-8298-11de-bf8c-fd130f914ac9" ]
simon.m.stewart@07704840-8298-11de-bf8c-fd130f914ac9
386f24910abd5b5378d0fbe8a549efac74c56a42
1074c97cdd65d38c8c6ec73bfa40fb9303337468
/rda0105-agl-aus-java-a43926f304e3/xms-delivery/src/main/java/com/gms/delivery/dhl/xmlpi/datatype/pickup/response/Billing.java
1f7ea1d6cd1cbf4c97d45b2d0c87e543844ebe10
[]
no_license
gahlawat4u/repoName
0361859254766c371068e31ff7be94025c3e5ca8
523cf7d30018b7783e90db98e386245edad34cae
refs/heads/master
2020-05-17T01:26:00.968575
2019-04-29T06:11:52
2019-04-29T06:11:52
183,420,568
0
0
null
null
null
null
UTF-8
Java
false
false
5,037
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2016.01.18 at 07:55:03 PM ICT // package com.gms.delivery.dhl.xmlpi.datatype.pickup.response; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for Billing complex type. * <p> * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;complexType name="Billing"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="ShipperAccountNumber" type="{http://www.dhl.com/datatypes_global}AccountNumber"/> * &lt;element name="ShippingPaymentType" type="{http://www.dhl.com/datatypes_global}ShipmentPaymentType"/> * &lt;element name="BillingAccountNumber" type="{http://www.dhl.com/datatypes_global}AccountNumber" minOccurs="0"/> * &lt;element name="DutyPaymentType" type="{http://www.dhl.com/datatypes_global}DutyTaxPaymentType" minOccurs="0"/> * &lt;element name="DutyAccountNumber" type="{http://www.dhl.com/datatypes_global}AccountNumber" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Billing", propOrder = { "shipperAccountNumber", "shippingPaymentType", "billingAccountNumber", "dutyPaymentType", "dutyAccountNumber" }) public class Billing { @XmlElement(name = "ShipperAccountNumber", required = true) protected String shipperAccountNumber; @XmlElement(name = "ShippingPaymentType", required = true) protected ShipmentPaymentType shippingPaymentType; @XmlElement(name = "BillingAccountNumber") protected String billingAccountNumber; @XmlElement(name = "DutyPaymentType") protected DutyTaxPaymentType dutyPaymentType; @XmlElement(name = "DutyAccountNumber") protected String dutyAccountNumber; /** * Gets the value of the shipperAccountNumber property. * * @return possible object is * {@link String } */ public String getShipperAccountNumber() { return shipperAccountNumber; } /** * Sets the value of the shipperAccountNumber property. * * @param value allowed object is * {@link String } */ public void setShipperAccountNumber(String value) { this.shipperAccountNumber = value; } /** * Gets the value of the shippingPaymentType property. * * @return possible object is * {@link ShipmentPaymentType } */ public ShipmentPaymentType getShippingPaymentType() { return shippingPaymentType; } /** * Sets the value of the shippingPaymentType property. * * @param value allowed object is * {@link ShipmentPaymentType } */ public void setShippingPaymentType(ShipmentPaymentType value) { this.shippingPaymentType = value; } /** * Gets the value of the billingAccountNumber property. * * @return possible object is * {@link String } */ public String getBillingAccountNumber() { return billingAccountNumber; } /** * Sets the value of the billingAccountNumber property. * * @param value allowed object is * {@link String } */ public void setBillingAccountNumber(String value) { this.billingAccountNumber = value; } /** * Gets the value of the dutyPaymentType property. * * @return possible object is * {@link DutyTaxPaymentType } */ public DutyTaxPaymentType getDutyPaymentType() { return dutyPaymentType; } /** * Sets the value of the dutyPaymentType property. * * @param value allowed object is * {@link DutyTaxPaymentType } */ public void setDutyPaymentType(DutyTaxPaymentType value) { this.dutyPaymentType = value; } /** * Gets the value of the dutyAccountNumber property. * * @return possible object is * {@link String } */ public String getDutyAccountNumber() { return dutyAccountNumber; } /** * Sets the value of the dutyAccountNumber property. * * @param value allowed object is * {@link String } */ public void setDutyAccountNumber(String value) { this.dutyAccountNumber = value; } }
[ "sachin.gahlawat19@gmail.com" ]
sachin.gahlawat19@gmail.com
bb69e99181569f995be7193a6c7998d58d4ef554
e7e497b20442a4220296dea1550091a457df5a38
/java_workplace/renren_web_framework/xcache/trunk/src/main/java/com/renren/xcache/namespace/NamespaceUtil.java
c1012fafecbd3d9cb85390c10d3675c2bb7c7005
[]
no_license
gunner14/old_rr_code
cf17a2dedf8dfcdcf441d49139adaadc770c0eea
bb047dc88fa7243ded61d840af0f8bad22d68dee
refs/heads/master
2021-01-17T18:23:28.154228
2013-12-02T23:45:33
2013-12-02T23:45:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
930
java
package com.renren.xcache.namespace; import java.io.InputStream; import java.util.Properties; /** * 读取{@link Namespace}配置的工具 * * @author Li Weibo (weibo.leo@gmail.com) //I believe spring-brother * @since 2010-9-20 下午06:56:26 */ public class NamespaceUtil { /** * 从配置中加载一个{@link Namespace}实例 * * @param name * @param configIn * @return * @throws Exception */ public static Namespace loadFromConfig(String name, InputStream configIn) throws Exception { NamespaceImpl namespace = new NamespaceImpl(); Properties p = new Properties(); p.load(configIn); String poolName = p.getProperty("pool"); if (poolName == null || poolName.trim().length() == 0) { throw new IllegalArgumentException("Bad config for Namespace " + name + ": pool=" + poolName); } namespace.setName(name); namespace.setAssociatedPoolName(poolName); return namespace; } }
[ "liyong19861014@gmail.com" ]
liyong19861014@gmail.com
1fcd60d2cac38a93cafae9bac0217bf88697533d
50f0762835062270ed1ec07eb2f6a0567352bcf8
/src/main/java/minborg/piproject/SoftPwm.java
1c22ec763bc16b38e3980276e44aaf55e34c6d11
[ "Apache-2.0" ]
permissive
minborg/pi-project
5911497501ca6849f2e82485e9ede30c5cb7fcef
8c6085ec8b310752fbdd0bc973c8922f9c322236
refs/heads/main
2023-02-23T23:42:23.043292
2021-01-25T21:45:49
2021-01-25T21:45:49
319,103,046
0
0
null
null
null
null
UTF-8
Java
false
false
3,354
java
package minborg.piproject; import com.pi4j.io.gpio.*; import com.pi4j.platform.PlatformAlreadyAssignedException; import com.pi4j.util.CommandArgumentParser; import com.pi4j.util.Console; public class SoftPwm { /** * [ARGUMENT/OPTION "--pin (#)" | "-p (#)" ] * This example program accepts an optional argument for specifying the GPIO pin (by number) * to use with this GPIO listener example. If no argument is provided, then GPIO #1 will be used. * -- EXAMPLE: "--pin 4" or "-p 0". * * @param args * @throws InterruptedException * @throws PlatformAlreadyAssignedException */ public static void main(String[] args) throws InterruptedException, PlatformAlreadyAssignedException { // create Pi4J console wrapper/helper // (This is a utility class to abstract some of the boilerplate code) final Console console = new Console(); // print program title/header console.title("<-- The Pi4J Project -->", "SoftPWM Example (Software-driven PWM Emulation)"); // allow for user to exit program using CTRL-C console.promptForExit(); // create gpio controller final GpioController gpio = GpioFactory.getInstance(); // by default we will use gpio pin #01; however, if an argument // has been provided, then lookup the pin by address Pin pin = CommandArgumentParser.getPin( RaspiPin.class, // pin provider class to obtain pin instance from RaspiPin.GPIO_01, // default pin if no pin argument found args); // argument array to search in // we will provision the pin as a software emulated PWM output // pins that support hardware PWM should be provisioned as normal PWM outputs // each software emulated PWM pin does consume additional overhead in // terms of CPU usage. // // Software emulated PWM pins support a range between 0 (off) and 100 (max) by default. // // Please see: http://wiringpi.com/reference/software-pwm-library/ // for more details on software emulated PWM GpioPinPwmOutput pwm = gpio.provisionSoftPwmOutputPin(pin); // optionally set the PWM range (100 is default range) pwm.setPwmRange(100); // prompt user that we are ready console.println(" ... Successfully provisioned PWM pin: " + pwm.toString()); console.emptyLine(); // set the PWM rate to 100 (FULLY ON) pwm.setPwm(100); console.println("Software emulated PWM rate is: " + pwm.getPwm()); console.println("Press ENTER to set the PWM to a rate of 50"); System.console().readLine(); // set the PWM rate to 50 (1/2 DUTY CYCLE) pwm.setPwm(50); console.println("Software emulated PWM rate is: " + pwm.getPwm()); console.println("Press ENTER to set the PWM to a rate to 0 (stop PWM)"); System.console().readLine(); // set the PWM rate to 0 (FULLY OFF) pwm.setPwm(0); console.println("Software emulated PWM rate is: " + pwm.getPwm()); // stop all GPIO activity/threads by shutting down the GPIO controller // (this method will forcefully shutdown all GPIO monitoring threads and scheduled tasks) gpio.shutdown(); } }
[ "minborg@speedment.com" ]
minborg@speedment.com
728f70b3abcacd2a4c47d3f08fab7e6c70a1aedd
3f7a5d7c700199625ed2ab3250b939342abee9f1
/src/gcom/gui/portal/ServicosPortalCompesaAction.java
93b98c86580bcc3d6e3d615a0dc7dcc663aad3d3
[]
no_license
prodigasistemas/gsan-caema
490cecbd2a784693de422d3a2033967d8063204d
87a472e07e608c557e471d555563d71c76a56ec5
refs/heads/master
2021-01-01T06:05:09.920120
2014-10-08T20:10:40
2014-10-08T20:10:40
24,958,220
1
0
null
null
null
null
UTF-8
Java
false
false
1,456
java
package gcom.gui.portal; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import gcom.gui.GcomAction; public class ServicosPortalCompesaAction extends GcomAction{ public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { ActionForward retorno = actionMapping.findForward("servicosCompesaAction"); ExibirServicosPortalCompesaActionForm form = (ExibirServicosPortalCompesaActionForm) actionForm; String method = httpServletRequest.getParameter("method"); if(method != null && method.equalsIgnoreCase("servicos")){ try{ Integer matricula = Integer.valueOf(form.getMatricula()); Integer matriculaExistente = this.getFachada().verificarExistenciaImovel(matricula); if (matriculaExistente == 1){ String nomeUsuario = this.getFachada().consultarClienteUsuarioImovel(matricula); form.setNomeUsuario(nomeUsuario); retorno = actionMapping.findForward("servicosPortalCompesaAction"); }else{ httpServletRequest.setAttribute("imovelInvalido", true); } }catch(NumberFormatException e){ httpServletRequest.setAttribute("imovelInvalido", true); } } return retorno; } }
[ "felipesantos2089@gmail.com" ]
felipesantos2089@gmail.com
7f430fd4cd396e3c30e46aea7ee45d9d0e7927e5
b853da67e565bd1032e93a6639af018de6026ba7
/src/Coalesce.OpenAPI/data/src/main/java/com/incadencecorp/coalesce/openapi/data/SearchDataControllerDefinition.java
e04b6b52559dc58875681ee63ec0571b56a2231d
[ "Apache-2.0" ]
permissive
InCadence/coalesce
616c80cc974eddd7373f093e6705aea4111c18ac
cf6235526ab99e7f21523f529976c65333368d42
refs/heads/master
2023-03-07T02:42:16.574874
2021-09-02T19:28:15
2021-09-02T19:28:15
96,781,112
7
5
Apache-2.0
2023-02-22T01:40:51
2017-07-10T13:33:02
Java
UTF-8
Java
false
false
4,458
java
/*-----------------------------------------------------------------------------' Copyright 2020 - InCadence Strategic Solutions Inc., All Rights Reserved Notwithstanding any contractor copyright notice, the Government has Unlimited Rights in this work as defined by DFARS 252.227-7013 and 252.227-7014. Use of this work other than as specifically authorized by these DFARS Clauses may violate Government rights in this work. DFARS Clause reference: 252.227-7013 (a)(16) and 252.227-7014 (a)(16) Unlimited Rights. The Government has the right to use, modify, reproduce, perform, display, release or disclose this computer software and to have or authorize others to do so. Distribution Statement D. Distribution authorized to the Department of Defense and U.S. DoD contractors only in support of U.S. DoD efforts. -----------------------------------------------------------------------------*/ package com.incadencecorp.coalesce.openapi.data; import com.incadencecorp.coalesce.services.api.search.QueryResult; import com.incadencecorp.coalesce.services.api.search.QueryType; import com.incadencecorp.coalesce.services.search.service.data.jaxrs.ISearchDataControllerJaxRS; import com.incadencecorp.coalesce.services.search.service.data.model.SearchCriteria; import com.incadencecorp.coalesce.services.search.service.data.model.SearchQuery; import com.incadencecorp.coalesce.services.search.service.data.model.SearchQueryDetails; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.opengis.filter.capability.GeometryOperand; import org.opengis.filter.capability.Operator; import javax.ws.rs.Path; import java.rmi.RemoteException; import java.util.Collection; import java.util.List; /** * This interface is only used for generating Open API documentation and should not be referenced by code or other projects. */ @Path("/search") @Tag(name = "Search", description = "This endpoint is used for searching the Coalesce Data Fabric") public interface SearchDataControllerDefinition extends ISearchDataControllerJaxRS { /** * Query API */ @Operation(summary = "Simple Search", description = "Returns results matching the query pattern.") QueryResult search(List<SearchCriteria> options) throws RemoteException; @Operation(summary = "Complex Search", description = "Returns results matching the query pattern.") QueryResult searchComplex(SearchQuery query) throws RemoteException; @Operation(summary = "OGC Search", description = "Returns results matching the query pattern.") QueryResult searchOGC(QueryType query) throws RemoteException; /** * History API */ @Operation(summary = "List History", description = "Returns a list of queries previously ran.") List<SearchQueryDetails> getHistory(int page, int pagesize) throws RemoteException; @Operation(summary = "List Saved History", description = "Returns a list of queries previously ran that have been saved.") List<SearchQueryDetails> getSavedHistory(int page, int pagesize) throws RemoteException; @Operation(summary = "Create History", description = "Save a query adding a title and description for future reference.") String save(final SearchQueryDetails object) throws RemoteException; @Operation(summary = "Update History", description = "Updates a previously saved query.") void update(final String key, final SearchQueryDetails object) throws RemoteException; @Operation(summary = "Retrieve History", description = "Returns a previously saved query.") SearchQueryDetails load(final String key) throws RemoteException; @Operation(summary = "Delete History", description = "Deletes a previously saved query.") void delete(final String key) throws RemoteException; @Operation(summary = "Run History", description = "Runs a previously saved query.") QueryResult requery(final String key) throws RemoteException; /** * Capabilities API */ Collection<Operator> getAllCapabilities() throws RemoteException; Collection<Operator> getComparisonCapabilities() throws RemoteException; Collection<Operator> getFunctionCapabilities() throws RemoteException; Collection<Operator> getTemporalCapabilities() throws RemoteException; Collection<Operator> getSpatialCapabilities() throws RemoteException; Collection<GeometryOperand> getGeometryCapabilities() throws RemoteException; }
[ "dclemenzi@incadencecorp.com" ]
dclemenzi@incadencecorp.com
c37994083c81ecdf89c74f07819fa556c7db1732
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/BufferedFSInputStream.java
07f158ea08594ac66976d3930c6f01a734381146
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
451
java
package org.apache.hadoop.fs; import java.io.BufferedInputStream; import java.io.EOFException; import java.io.FileDescriptor; import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; @InterfaceAudience.Private @InterfaceStability.Unstable public class BufferedFSInputStream extends BufferedInputStream implements Seekable, PositionedReadable, HasFileDescriptor
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
736a3a6bc742c19ff5f28cd44bbe5028e02da433
471a1d9598d792c18392ca1485bbb3b29d1165c5
/jadx-MFP/src/main/java/com/google/android/gms/internal/ads/zzaes.java
b0bb26f8db8473f3ea92e6b6f5447a44175a5883
[]
no_license
reed07/MyPreferencePal
84db3a93c114868dd3691217cc175a8675e5544f
365b42fcc5670844187ae61b8cbc02c542aa348e
refs/heads/master
2020-03-10T23:10:43.112303
2019-07-08T00:39:32
2019-07-08T00:39:32
129,635,379
2
0
null
null
null
null
UTF-8
Java
false
false
633
java
package com.google.android.gms.internal.ads; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; public final class zzaes extends zzew implements zzaeq { zzaes(IBinder iBinder) { super(iBinder, "com.google.android.gms.ads.internal.formats.client.IOnUnifiedNativeAdLoadedListener"); } public final void zza(zzaew zzaew) throws RemoteException { Parcel obtainAndWriteInterfaceToken = obtainAndWriteInterfaceToken(); zzey.zza(obtainAndWriteInterfaceToken, (IInterface) zzaew); zza(1, obtainAndWriteInterfaceToken); } }
[ "anon@ymous.email" ]
anon@ymous.email
02ca7bbf8814afaee47cdd7d9709bd4b615f4602
74a9a90ee7064a1da77e1831f12f0485df0ed5a8
/src/NowCoder/Hard/RecurAndDp/basic_code44_MinPath.java
9aeca3de16f8c91ddd48fa8a855729379259bb56
[]
no_license
Lemon-362/NowCoder
4191e83bc8d8f6a973e46a7537c43fa453f7477a
979fa190c2a06a0e84159646df21d2f2193deff2
refs/heads/master
2022-12-04T10:48:09.092038
2020-08-17T09:19:46
2020-08-17T09:19:46
261,641,899
0
0
null
null
null
null
UTF-8
Java
false
false
2,491
java
package NowCoder.Hard.RecurAndDp; /* 给定一个数组,要求从左上角走到右下角,每一步只能向右或者向下。 求最小路径和。 暴力递归: 当前值 + 往下/往右走到终点的最小路径和 动态规划: 就是将最小路径和的二维表一个一个的填完 */ public class basic_code44_MinPath { public static int MinPath(int[][] arr, int i, int j) { // base case if (i == arr.length - 1 && j == arr[0].length - 1) { return arr[i][j]; } // 情况一:到达最右边 if (i == arr.length -1){ return arr[i][j] + MinPath(arr, i, j+1); } // 情况二:到达最下边 if (j == arr[0].length - 1){ return arr[i][j] + MinPath(arr, i+1, j); } // 情况三:普通情况 int right = MinPath(arr, i, j+1); int down = MinPath(arr, i+1, j); return arr[i][j] + Math.min(right, down); } // 动态规划:就是将每个位置到右下角的最短路径和填入表中,一个一个的填进去,最终返回需要的最终位置的最短路径和 public static int walk02(int[][] arr) { int row = arr.length; int col = arr[0].length; int[][] dp = new int[row][col]; // 右下角 dp[row - 1][col - 1] = arr[row - 1][col - 1]; // 最后一行:从最后一行的倒数第二个位置开始 for (int i = col - 2; i >= 0; i--) { dp[row - 1][i] = arr[row - 1][i] + dp[row - 1][i + 1]; } // 最后一列:从最后一列的倒数第二个位置开始 for (int i = row - 2; i >= 0; i--) { dp[i][col - 1] = arr[i][col - 1] + dp[i + 1][col - 1]; } // 普遍位置 for (int i = row - 2; i >= 0; i--) { for (int j = col - 2; j >= 0; j--) { dp[i][j] = arr[i][j] + Math.min(dp[i + 1][j], dp[i][j + 1]); } } return dp[0][0]; } public static void main(String[] args) { int[][] m = {{1, 3, 5, 9}, {8, 1, 3, 4}, {5, 0, 6, 1}, {8, 8, 4, 0}}; System.out.println(MinPath(m, 0, 0)); // 12 System.out.println(walk02(m)); // int[][] dp = walk02(m); // for (int i = 0; i < dp.length; i++) { // for (int j = 0; j < dp[0].length; j++) { // System.out.print(dp[i][j] + " "); // } // System.out.println(); // } } }
[ "18362086897@sina.cn" ]
18362086897@sina.cn
3f96b65f092dd547f50f3eb398f7822ddd6448a1
86ba08a34083b8ec7c3c5bcc18c429caf15e7783
/Doctors-MSSC/src/main/java/com/clinics/doctors/ui/service/JPAimpl/SpecializationServiceImpl.java
48bf17b8ed553f5412d0594e221630cb43e1ed54
[]
no_license
WojciechAdamowski/Microservices-Clinic
c4f149dc515dd665b2f8cc4d0744f41b22061a82
d32ddeafb36679aaad71cd43a12fb09462bf0447
refs/heads/master
2022-11-24T13:22:17.926301
2020-07-03T09:50:57
2020-07-03T09:50:57
255,883,484
1
0
null
2020-06-17T18:26:42
2020-04-15T10:31:48
Java
UTF-8
Java
false
false
6,155
java
package com.clinics.doctors.ui.service.JPAimpl; import com.clinics.common.DTO.request.outer.doctor.SpecializationDTO; import com.clinics.common.DTO.response.outer.SpecializationResponseDTO; import com.clinics.doctors.data.model.Specialization; import com.clinics.doctors.data.repositorie.DoctorRepository; import com.clinics.doctors.data.repositorie.SpecializationRepository; import com.clinics.doctors.ui.service.SpecializationService; import org.modelmapper.ModelMapper; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.stereotype.Service; import javax.transaction.Transactional; import java.util.List; import java.util.NoSuchElementException; import java.util.UUID; import java.util.stream.Collectors; @Transactional @Service public class SpecializationServiceImpl implements SpecializationService { final private SpecializationRepository specializationRepository; final private DoctorRepository doctorRepository; final private DoctorServiceImpl doctorServiceImpl; final private ModelMapper modelMapper; public SpecializationServiceImpl( SpecializationRepository specializationRepository, DoctorRepository doctorRepository, DoctorServiceImpl doctorServiceImpl, ModelMapper modelMapper) { this.specializationRepository = specializationRepository; this.doctorRepository = doctorRepository; this.doctorServiceImpl = doctorServiceImpl; this.modelMapper = modelMapper; } public List<SpecializationResponseDTO> getAllSpecializations() { return specializationRepository .findAll() .stream() .map(specialization -> modelMapper.map(specialization, SpecializationResponseDTO.class)) .collect(Collectors.toList()); } public List<SpecializationResponseDTO> getDoctorSpecializations(UUID doctorUUID) { var doctor = doctorServiceImpl.getByUUID(doctorUUID); return specializationRepository.findAllByDoctors(doctor) .stream() .map(specialization -> modelMapper.map(specialization, SpecializationResponseDTO.class)) .collect(Collectors.toList()); } public SpecializationResponseDTO getDoctorSpecialization(UUID doctorUUID, UUID specializationUUID) { var doctor = doctorServiceImpl.getByUUID(doctorUUID); if (doctor.getSpecializations().stream().noneMatch(specialization -> specialization.getSpecializationUUID().equals(specializationUUID))) { throw new NoSuchElementException(String.format("Doctor doesn't have such specialization %s", specializationUUID )); } var specialization = getSpecialization(specializationUUID); return modelMapper.map(specialization, SpecializationResponseDTO.class); } public SpecializationResponseDTO getSpecializationByUUID(UUID specializationUUID) { var specialization = getSpecialization(specializationUUID); return modelMapper.map(specialization, SpecializationResponseDTO.class); } public SpecializationResponseDTO saveSpecialization(SpecializationDTO specializationDTO) { var specialization = modelMapper.map(specializationDTO, Specialization.class); specialization.setSpecializationUUID(UUID.randomUUID()); return modelMapper.map(specializationRepository.save(specialization), SpecializationResponseDTO.class); } public SpecializationResponseDTO saveSpecializationIntoDoctor(UUID doctorUUID, SpecializationDTO specializationDTO) { var doctor = doctorServiceImpl.getByUUID(doctorUUID); if (specializationRepository.existsByName(specializationDTO.getName())) { if (doctor.getSpecializations().stream().anyMatch(s -> s.getName().equals(specializationDTO.getName()))) { throw new DataIntegrityViolationException("Doctor already have such specialization"); } var specialization = specializationRepository.findByName(specializationDTO.getName()); doctor.getSpecializations().add(specialization); doctorRepository.save(doctor); return modelMapper.map(specialization, SpecializationResponseDTO.class); } var specialization = modelMapper.map(specializationDTO, Specialization.class); specialization.setSpecializationUUID(UUID.randomUUID()); doctor.getSpecializations().add(specialization); specializationRepository.save(specialization); doctorRepository.save(doctor); return modelMapper.map(specialization, SpecializationResponseDTO.class); } public SpecializationResponseDTO saveExistingSpecializationIntoDoctor(UUID doctorUUID, UUID specializationUUID) { var doctor = doctorServiceImpl.getByUUID(doctorUUID); var optionalSpecialization = specializationRepository.findBySpecializationUUID(specializationUUID); if (optionalSpecialization.isEmpty()) { throw new NoSuchElementException("No such specialization"); } var specialization = optionalSpecialization.get(); if (doctor.getSpecializations().stream().anyMatch(s -> s.getName().equals(specialization.getName()))) { throw new DataIntegrityViolationException("Doctor already have such specialization"); } doctor.getSpecializations().add(specialization); doctorRepository.save(doctor); return modelMapper.map(specialization, SpecializationResponseDTO.class); } public void editSpecialization(SpecializationDTO specializationDTO, UUID specializationUUID) { var specialization = getSpecialization(specializationUUID); modelMapper.map(specializationDTO, specialization); specializationRepository.save(specialization); } public void removeSpecializationFromDoctor(UUID doctorUUID, UUID specializationUUID) { var doctor = doctorServiceImpl.getByUUID(doctorUUID); var specialization = getSpecialization(specializationUUID); doctor.getSpecializations().remove(specialization); doctorRepository.save(doctor); } public void deleteSpecialization(UUID specializationUUID) { var specialization = getSpecialization(specializationUUID); specializationRepository.delete(specialization); } private Specialization getSpecialization(UUID specializationUUID) { var optionalSpecialization = specializationRepository.findBySpecializationUUID(specializationUUID); if (optionalSpecialization.isEmpty()) { throw new NoSuchElementException(String.format("No such specialization in system %s", specializationUUID )); } return optionalSpecialization.get(); } }
[ "wojciech.gaudnik@gmail.com" ]
wojciech.gaudnik@gmail.com
a37a3e3c9453d200e7cfae215af6e3d221854a26
217e44b1dad361145b400f3c413d12e4342f7413
/javatest/src/G2_array_기본/G2_array3_학생성적정답.java
7ba162e6b5b23ec73676c17082df82d6b7d10a10
[]
no_license
s02asy/study
7e5cc299edf2848aeba5a8fa7909fb06bd4b7f5d
55a1a6f9ae3a9bc83702c9679d239bbab7f4ede8
refs/heads/master
2023-08-15T14:15:31.652270
2021-09-06T08:56:55
2021-09-06T08:56:55
403,499,304
0
0
null
null
null
null
UHC
Java
false
false
828
java
package G2_array_기본; import java.util.Scanner; public class G2_array3_학생성적정답 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] hakbuns = { 1001, 1002, 1003, 1004, 1005 }; int[] scores = { 87, 11, 45, 98, 23 }; // 문제) 학번을 입력받아 성적 출력 // 단, 없는학번 입력 시 예외처리 // 예) // 학번 입력 : 1002 성적 : 11점 // 학번 입력 : 1000 해당학번은 존재하지 않습니다. System.out.print("학번 입력 : "); int hakbun = scan.nextInt(); int check = -1; for (int i = 0; i < 5; i++) { if (hakbuns[i] == hakbun) { check = i; } } if (check == -1) { System.out.println("해당학번은 존재하지 않습니다."); } else { System.out.println(scores[check] + "점"); } } }
[ "A@DESKTOP-H0948LR" ]
A@DESKTOP-H0948LR
8cc091affd645cf2aa4aa13a148da449912ecd25
31223c5dbc41467f0b5eea1bfc8ca9fe1d70527e
/java-se/ocp/_09_GenericsCollections/src/_016_generic_class/BoxPrinterTest.java
161161e98c2ee1a17487ae89b0f895263a0b9e19
[]
no_license
mimaraslan/java-certification
0e39b8edc78ce4f1d328f0c7e0e73e019a9d5470
4ebcadc5f9533e0f7f477f6a6d76080ae8d381c5
refs/heads/master
2022-05-11T11:15:41.769437
2021-09-05T22:24:42
2021-09-05T22:24:42
185,800,286
6
1
null
null
null
null
UTF-8
Java
false
false
407
java
package _016_generic_class; public class BoxPrinterTest { public static void main(String[] args) { BoxPrinter<Integer> value1 = new BoxPrinter<Integer>(new Integer(11)); System.out.println(value1); BoxPrinter<Integer> value2 = new BoxPrinter<Integer>(22); System.out.println(value2); BoxPrinter<String> value3 = new BoxPrinter<String>("Hello world"); System.out.println(value3); } }
[ "mimaraslan@gmail.com" ]
mimaraslan@gmail.com
2c341b8b7957f9280eab396d6a7ec1412c19eb57
088cad7c00db1e05ad2ab219e393864f3bf7add6
/classes/br/com/santander/investimentoV2/features/resgate/view/ResgateActivity.java
9c8c500e36c9c9b5ab90d7c6d7d1376aea25ddc3
[]
no_license
devidwfreitas/com-santander-app.7402
8e9f344f5132b1c602d80929f1ff892293f4495d
e9a92b20dc3af174f9b27ad140643b96fb78f04d
refs/heads/main
2023-05-01T09:33:58.835056
2021-05-18T23:54:43
2021-05-18T23:54:43
368,692,384
0
0
null
null
null
null
UTF-8
Java
false
false
696
java
package br.com.santander.investimentoV2.features.resgate.view; import ack; import android.os.Bundle; import android.support.annotation.Nullable; import lc; import xq; public class ResgateActivity extends ack { private xq a; public void onBackPressed() { finish(); } protected void onCreate(@Nullable Bundle paramBundle) { super.onCreate(paramBundle); setContentView(lc.activity_resgate); this.a = new xq(this); } } /* Location: C:\Users\devid\Downloads\SAST\Santander\dex2jar-2.0\classes-dex2jar.jar!\br\com\santander\investimentoV2\features\resgate\view\ResgateActivity.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "devid.wfreitas@gmail.com" ]
devid.wfreitas@gmail.com
8fb9eca448104b29f773dd8ce2f7fec8c38b550d
26a837b93cf73e6c372830f9a7a316c01081a4ea
/processor/src/test/fixtures/input/com/example/observable_value_ref/ObservableValueRefInterface.java
a94f655d1560e333a322caaae955ae6bdc105ccc
[ "Apache-2.0" ]
permissive
arez/arez
033b27f529b527c747b2a93f3c2c553c41c32acd
df68d72a69d3af1123e7d7c424f77b74f13f8052
refs/heads/master
2023-06-08T00:09:56.319223
2023-06-05T02:12:14
2023-06-05T02:12:14
96,367,327
13
4
Apache-2.0
2022-12-10T20:29:35
2017-07-05T22:50:24
Java
UTF-8
Java
false
false
374
java
package com.example.observable_value_ref; import arez.ObservableValue; import arez.annotations.Observable; import arez.annotations.ObservableValueRef; import javax.annotation.Nonnull; interface ObservableValueRefInterface { @Observable long getTime(); void setTime( long time ); @Nonnull @ObservableValueRef ObservableValue<Long> getTimeObservableValue(); }
[ "peter@realityforge.org" ]
peter@realityforge.org
11c097733a6eb93c9424a5ae45291201535cedc5
8f92c94f949b1da5f09ec37cfb6995925b0dd227
/src/main/java/th/go/excise/ims/ta/persistence/repository/TaFormDownloadHRepository.java
39b9df95c982539befe2c66731ccfa58ed7f4508
[]
no_license
flame123flame/backend-springboot-ims
f36af2ed1797e1a0003f09067e31f1ce60d7fde7
4ee8a4e6f85e7f3f28976bdf6b4a314d1e54b20f
refs/heads/master
2022-07-05T14:08:53.055975
2019-09-10T09:30:04
2019-09-10T09:30:04
207,516,525
0
1
null
2022-06-29T17:38:16
2019-09-10T09:22:01
Java
UTF-8
Java
false
false
310
java
package th.go.excise.ims.ta.persistence.repository; import th.co.baiwa.buckwaframework.common.persistence.repository.CommonJpaCrudRepository; import th.go.excise.ims.ta.persistence.entity.TaFormDownloadH; public interface TaFormDownloadHRepository extends CommonJpaCrudRepository<TaFormDownloadH, Long> { }
[ "flame.tana@gmail.com" ]
flame.tana@gmail.com
c41ee366671d46d14d104a98c18e0725bb75ed39
aadd35f51724ccd11476c3f82c42ac44c8cd1d5a
/src/main/java/com/berzenin/app/web/controller/GenericViewController.java
f33df7548c44e7395d09c308adf38e1cba9b3db0
[]
no_license
FilippBerzenin/photo-storage-server
8f1a6495164c9c795482d672eac4753bab40c69e
05bd043d89d1e2a47ef7b8d1f6fff889caf1f50a
refs/heads/master
2020-08-15T03:01:05.887515
2019-10-17T08:49:33
2019-10-17T08:49:33
215,269,938
0
0
null
null
null
null
UTF-8
Java
false
false
1,455
java
package com.berzenin.app.web.controller; import javax.validation.Valid; import org.springframework.http.HttpStatus; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseStatus; public interface GenericViewController<E> { @RequestMapping(value="/show/all", method=RequestMethod.GET) @ResponseStatus(HttpStatus.OK) String findAll(Model model); @RequestMapping(value="/show/{id}", method=RequestMethod.GET) @ResponseStatus(HttpStatus.OK) String findById(@PathVariable("id") Long id, Model model); @RequestMapping(value="/delete/{id}", method=RequestMethod.POST) @ResponseStatus(HttpStatus.OK) String deleteEntity(@PathVariable("id") Long id, Model model); @RequestMapping(value="/update/", method=RequestMethod.POST) @ResponseStatus(HttpStatus.OK) String update(@ModelAttribute("entity") @Valid E entity, BindingResult result, Model model); @RequestMapping(value = "/create/", method = RequestMethod.POST) @ResponseStatus(HttpStatus.CREATED) String add( @ModelAttribute("entity") @Valid E entity, BindingResult result, Model model); }
[ "filipp.berzenin@gmail.com" ]
filipp.berzenin@gmail.com
105a00da13816348a6500b6247437d9934b3ef8e
f9d4e15a7a5008cd81eb19cb62835966938be8a7
/colombo-brognoli-thesis/ValidationNumReqWrappers/src/it/polimi/validationwrappers/Wrapper51.java
60c24d0cef1c8daedf35a65bb06b6cb5f06617cf
[]
no_license
nicolobrognoli/colombo-brognoli-thesis
6e607ef1d802b946ede8e8db124d818493a3cc93
912bcfc5e37b9df916929e6f014b1ce2085bac43
refs/heads/master
2021-01-01T05:38:43.665817
2015-03-15T20:07:28
2015-03-15T20:07:28
32,281,276
0
0
null
null
null
null
UTF-8
Java
false
false
1,748
java
package it.polimi.validationwrappers;import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class Wrapper51{ private Map<String,Float> mapReward = new HashMap<String,Float>(); private List<String> rewardNameList = new ArrayList<String>(); private List<String> alternatives = new ArrayList<String>();public Wrapper51(){ rewardNameList.add("time"); mapReward.put("totaltime", 100.0f);mapReward.put("weighttime", 0.7f);mapReward.put("policytime", 0.0f); alternatives.add("A"); mapReward.put("Atime",0f); mapReward.put("AtimeMin",0.021256219275414257f); mapReward.put("AtimeMax",0.08269104924430845f); alternatives.add("B"); mapReward.put("Btime",0f); mapReward.put("BtimeMin",0.09888993729260533f); mapReward.put("BtimeMax",0.05923586259401068f); alternatives.add("C"); mapReward.put("Ctime",0f); mapReward.put("CtimeMin",0.06766181531941907f); mapReward.put("CtimeMax",0.07324966991239226f);rewardNameList.add("h"); mapReward.put("totalh", 2000f);mapReward.put("weighth", 0.3f);mapReward.put("policyh", 0.0f); mapReward.put("Ah",1f); mapReward.put("AhMin",1950.4572662110534f); mapReward.put("AhMax",1954.1788760302074f); mapReward.put("Bh",1f); mapReward.put("BhMin",1953.3734669552814f); mapReward.put("BhMax",1954.2593467797801f); mapReward.put("Ch",1f); mapReward.put("ChMin",1949.4734184492743f); mapReward.put("ChMax",1951.802983970895f); } public void doActivity(){ String choice = AlternativeUtility.getAlternative(alternatives,rewardNameList,mapReward);ActivityInterface obj = null;if(choice.equals("A")){obj = new A();}if(choice.equals("B")){obj = new B();}if(choice.equals("C")){obj = new C();} obj.doActivity();AlternativeUtility.updateContext(rewardNameList, choice, mapReward);}}
[ "nicolo@Laptop.local" ]
nicolo@Laptop.local
8c0b632909dc6b7d0dcf0ef6be6f53f973dd2f61
6f24e76e7c7df1f78b2197e41b013a3a0677236c
/1006_BoardWeb_DI/BoardWeb/src/main/java/com/khj/polymorphism/LgTV.java
f95a240c53ba7fc8f25f908d0700c9a2128fbf1e
[]
no_license
ev15963/sts_work
3be84e30f1ec349fa43c8f7cfb7d3d785cb6977b
990f53517bbc36846538f8724662389fc462c943
refs/heads/master
2023-01-28T20:17:47.873749
2020-12-04T11:47:17
2020-12-04T11:47:17
297,484,967
0
0
null
null
null
null
UHC
Java
false
false
523
java
package com.khj.polymorphism; public class LgTV implements TV { public LgTV(){ System.out.println("======>LgTV 객체 생성"); } @Override public void powerOn() { System.out.println("LgTV----전원을 켠다."); } @Override public void powerOff() { System.out.println("LgTV----전원을 끈다."); } @Override public void volumeUp() { System.out.println("LgTV----소리를 올린다."); } @Override public void volumeDown() { System.out.println("LgTV----소리를 내린다."); } }
[ "ev15963@hs.ac.kr" ]
ev15963@hs.ac.kr
a4fefa0a705d877ffdd08047514d61e5b302cea0
eaec4795e768f4631df4fae050fd95276cd3e01b
/src/cmps252/HW4_2/UnitTesting/record_2659.java
1517db38c8e7bfa761682333d7a87b7e6829d143
[ "MIT" ]
permissive
baraabilal/cmps252_hw4.2
debf5ae34ce6a7ff8d3bce21b0345874223093bc
c436f6ae764de35562cf103b049abd7fe8826b2b
refs/heads/main
2023-01-04T13:02:13.126271
2020-11-03T16:32:35
2020-11-03T16:32:35
307,839,669
1
0
MIT
2020-10-27T22:07:57
2020-10-27T22:07:56
null
UTF-8
Java
false
false
2,465
java
package cmps252.HW4_2.UnitTesting; import static org.junit.jupiter.api.Assertions.*; import java.io.FileNotFoundException; import java.util.List; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import cmps252.HW4_2.Customer; import cmps252.HW4_2.FileParser; @Tag("3") class Record_2659 { private static List<Customer> customers; @BeforeAll public static void init() throws FileNotFoundException { customers = FileParser.getCustomers(Configuration.CSV_File); } @Test @DisplayName("Record 2659: FirstName is Hassan") void FirstNameOfRecord2659() { assertEquals("Hassan", customers.get(2658).getFirstName()); } @Test @DisplayName("Record 2659: LastName is Zadorozny") void LastNameOfRecord2659() { assertEquals("Zadorozny", customers.get(2658).getLastName()); } @Test @DisplayName("Record 2659: Company is N Webster Prod Div Heaters Eng") void CompanyOfRecord2659() { assertEquals("N Webster Prod Div Heaters Eng", customers.get(2658).getCompany()); } @Test @DisplayName("Record 2659: Address is 179 High St Se") void AddressOfRecord2659() { assertEquals("179 High St Se", customers.get(2658).getAddress()); } @Test @DisplayName("Record 2659: City is Salem") void CityOfRecord2659() { assertEquals("Salem", customers.get(2658).getCity()); } @Test @DisplayName("Record 2659: County is Marion") void CountyOfRecord2659() { assertEquals("Marion", customers.get(2658).getCounty()); } @Test @DisplayName("Record 2659: State is OR") void StateOfRecord2659() { assertEquals("OR", customers.get(2658).getState()); } @Test @DisplayName("Record 2659: ZIP is 97301") void ZIPOfRecord2659() { assertEquals("97301", customers.get(2658).getZIP()); } @Test @DisplayName("Record 2659: Phone is 503-399-0062") void PhoneOfRecord2659() { assertEquals("503-399-0062", customers.get(2658).getPhone()); } @Test @DisplayName("Record 2659: Fax is 503-399-0825") void FaxOfRecord2659() { assertEquals("503-399-0825", customers.get(2658).getFax()); } @Test @DisplayName("Record 2659: Email is hassan@zadorozny.com") void EmailOfRecord2659() { assertEquals("hassan@zadorozny.com", customers.get(2658).getEmail()); } @Test @DisplayName("Record 2659: Web is http://www.hassanzadorozny.com") void WebOfRecord2659() { assertEquals("http://www.hassanzadorozny.com", customers.get(2658).getWeb()); } }
[ "mbdeir@aub.edu.lb" ]
mbdeir@aub.edu.lb
87473ce150335e7ae62f6379fa971dc2351ef8dc
e09d79b030cf788a8131bd38d5e8138ec469a903
/plugins/lintra.atlcompiler/src/lintra/commands/GenerateMetamodelClasses.java
189fc7d2b561bb1f1d46c4de0e2ce1125ea63fbc
[]
no_license
anatlyzer/a2l
3c28b71804c1bdd5c378a7cf85e9a04498d8869a
74f2c3ca81e45233a44461e95a4898ba1f237983
refs/heads/master
2021-01-16T04:34:21.940706
2020-02-25T23:35:00
2020-02-25T23:35:00
242,977,197
0
0
null
null
null
null
UTF-8
Java
false
false
3,762
java
package lintra.commands; import java.util.HashSet; import java.util.List; import java.util.Map; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.Path; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EPackage.Registry; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jface.text.TextSelection; import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.handlers.HandlerUtil; import a2l.utils.A2LUtils; import anatlyzer.atl.analyser.AnalysisResult; import anatlyzer.atl.editor.AtlEditorExt; import anatlyzer.atl.index.AnalysisIndex; import anatlyzer.atl.util.ATLUtils; import anatlyzer.atl.util.ATLUtils.ModelInfo; import linda.atlcompiler.LintraJDT; import lintra.lingen.GenClass; import lintra.lingen.LinGen2; import lintra.lingen.LintraEMFReaderGenerator; import lintra.lingen.LintraEMFWriterGenerator; public class GenerateMetamodelClasses extends AbstractHandler { @Override public Object execute(ExecutionEvent event) throws ExecutionException { ISelection selection = HandlerUtil.getCurrentSelection(event); if ( selection instanceof TextSelection ) { IEditorPart editor = HandlerUtil.getActiveEditor(event); if ( editor instanceof AtlEditorExt ) { AtlEditorExt atlEditor = (AtlEditorExt) editor; IFile file = (IFile) atlEditor.getUnderlyingResource(); HashSet<String> transformed = new HashSet<>(); AnalysisResult result = AnalysisIndex.getInstance().getAnalysis(file); compileClasses(transformed, result); } } return null; } public static void compileClasses(AnalysisResult result) { compileClasses(new HashSet<>(), result); } private static void compileClasses(HashSet<String> transformed, AnalysisResult result) { Map<String, String> drivers = A2LUtils.getMetamodelDrivers(result.getAnalyser()); if ( result != null ) { for (ModelInfo info : ATLUtils.getModelInfo(result.getATLModel())) { if ( transformed.contains(info.getMetamodelName() ) ) continue; if ( ! drivers.get(info.getMetamodelName()).equals(A2LUtils.LINTRA_DRIVER_TAG) ) continue; genClasses(new LintraJDT(result.getAnalyser()), info); transformed.add(info.getMetamodelName()); } } } private static void genClasses(LintraJDT jdt, ModelInfo info) { Resource r = null; if ( info.isURI() ) { EPackage pkg = Registry.INSTANCE.getEPackage(info.getURIorPath()); r = pkg.eResource(); } else { // assuming is a path IFile metamodel = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(info.getURIorPath())); ResourceSetImpl rs = new ResourceSetImpl(); r = rs.getResource(URI.createPlatformResourceURI(metamodel.getFullPath().toOSString(), true), true); } LinGen2 gen = new LinGen2(r); genClasses(jdt, gen.generate()); LintraEMFReaderGenerator emfGen = new LintraEMFReaderGenerator(r); genClasses(jdt, emfGen.generate()); LintraEMFWriterGenerator emfGenW = new LintraEMFWriterGenerator(r); genClasses(jdt, emfGenW.generate()); System.out.println("Generated: " + r.getURI()); } protected static void genClasses(LintraJDT jdt, List<GenClass> classes) { for (GenClass f : classes) { try { jdt.createClassInFilesystem(f.getPkgName(), f.getTypeName(), f.getContents()); } catch (JavaModelException e) { e.printStackTrace(); } } } }
[ "jesus.sanchez.cuadrado@gmail.com" ]
jesus.sanchez.cuadrado@gmail.com
21faff4ff3126a9af53eb3d2c54d05d002b94470
19b463e046a46db4131ca866537a131ac6acb150
/qpalx-elearning-service/src/main/java/com/quaza/solutions/qpalx/elearning/service/lms/adaptivelearning/scorable/QuestionBankService.java
71eb6be51f06aef0c153005bc1e709197cb09faa
[]
no_license
Quaza-Solutions/quaza-solutions-elearning-qpalx
49f913b4eea3d02f7097cdb40e972ae027bad17e
421501cda3cb1aa59f11e4d9a330f4b3bf6c2236
refs/heads/master
2020-04-04T07:30:09.545713
2016-12-11T04:55:29
2016-12-11T04:55:29
50,192,947
0
0
null
2016-12-11T04:55:29
2016-01-22T16:26:47
Java
UTF-8
Java
false
false
6,235
java
package com.quaza.solutions.qpalx.elearning.service.lms.adaptivelearning.scorable; import com.quaza.solutions.qpalx.elearning.domain.lms.adaptivelearning.progress.QuestionBankProgress; import com.quaza.solutions.qpalx.elearning.domain.lms.adaptivelearning.progress.repository.IQuestionBankProgressRepository; import com.quaza.solutions.qpalx.elearning.domain.lms.adaptivelearning.scorable.IQuestionBankVO; import com.quaza.solutions.qpalx.elearning.domain.lms.adaptivelearning.scorable.QuestionBankItem; import com.quaza.solutions.qpalx.elearning.domain.lms.adaptivelearning.scorable.repository.IQuestionBankItemRepository; import com.quaza.solutions.qpalx.elearning.domain.lms.curriculum.QPalXELesson; import com.quaza.solutions.qpalx.elearning.domain.qpalxuser.QPalXUser; import com.quaza.solutions.qpalx.elearning.service.lms.curriculum.IQPalXELessonService; import org.joda.time.DateTime; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; import java.util.List; import java.util.Random; /** * @author manyce400 */ @Service("quaza.solutions.qpalx.elearning.service.QuestionBankService") public class QuestionBankService implements IQuestionBankService { @Autowired private JdbcTemplate jdbcTemplate; @Autowired private IQuestionBankItemRepository iQuestionBankItemRepository; @Autowired private IQuestionBankProgressRepository iQuestionBankProgressRepository; @Autowired @Qualifier("quaza.solutions.qpalx.elearning.service.QPalXELessonService") private IQPalXELessonService iqPalXELessonService; private static final Random RANDOM_GEN = new Random(); private static final org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(QuestionBankService.class); @Transactional @Override public void deleteQuestionBankItemByID(Long questionBankID) { Assert.notNull(questionBankID, "questionBankID cannot be null"); LOGGER.debug("Deleting QuestionBankItem with ID: {}", questionBankID); QuestionBankItem questionBankItem = iQuestionBankItemRepository.findOne(questionBankID); // Delete all QuestionBankProgress previously recorded for lesson String deleteProgressSQL = "Delete From QuestionBankProgress Where QuestionBankItemID=?"; jdbcTemplate.update(deleteProgressSQL, questionBankItem.getId()); // Delete QuestionBakItem iQuestionBankItemRepository.delete(questionBankID); } @Override public QuestionBankItem findByID(Long questionBankID) { Assert.notNull(questionBankID, "questionBankID cannot be null"); LOGGER.debug("Finding QuestionBankItem with questionBankID: {}", questionBankID); return iQuestionBankItemRepository.findOne(questionBankID); } @Override public QuestionBankItem findRandomQuestionBankItem(QPalXELesson qPalXELesson) { Assert.notNull(qPalXELesson, "qPalXELesson cannot be null"); LOGGER.debug("Finding random QuestionBankItem for qPalXELesson {}", qPalXELesson.getLessonName()); // Find all question bank items List<QuestionBankItem> questionBankItemList = iQuestionBankItemRepository.findAllQuestionBankItemByLesson(qPalXELesson); if (questionBankItemList.size() > 1) { int low = 0; int high = questionBankItemList.size(); int randomIndex = RANDOM_GEN.nextInt(high - low) + low; return questionBankItemList.get(randomIndex); } else if(questionBankItemList.size() == 1) { return questionBankItemList.get(0); } return null; } @Override public List<QuestionBankItem> findQuestionBankItems(QPalXELesson qPalXELesson) { Assert.notNull(qPalXELesson, "qPalXELesson cannot be null"); LOGGER.debug("Finding all QuestionBankItems for qPalXELesson {}", qPalXELesson.getLessonName()); return iQuestionBankItemRepository.findAllQuestionBankItemByLesson(qPalXELesson); } @Override public void createAndSaveQuestionBankItem(IQuestionBankVO iQuestionBankVO) { Assert.notNull(iQuestionBankVO, "iQuestionBankVO cannot be null"); LOGGER.info("Building and saving new QuestionBankItem from iQuestionBankVO: {}", iQuestionBankVO); QPalXELesson qPalXELesson = iqPalXELessonService.findQPalXELessonByID(iQuestionBankVO.getQPalXELessonID()); QuestionBankItem questionBankItem = QuestionBankItem.builder() .questionTitle(iQuestionBankVO.getQuestionTitle()) .questionDescription(iQuestionBankVO.getQuestionDescription()) .entryDate(new DateTime()) .qPalXELesson(qPalXELesson) .active(iQuestionBankVO.isActive()) .build(); iQuestionBankItemRepository.save(questionBankItem); } @Transactional @Override public void recordAdaptiveLessonStatistics(QuestionBankItem questionBankItem, QPalXUser qPalXUser) { Assert.notNull(questionBankItem, "questionBankItem cannot be null"); Assert.notNull(qPalXUser, "qPalXUser cannot be null"); LOGGER.info("Recording QuestionBankItem with ID: {} progress for user: {}", questionBankItem.getId(), qPalXUser.getEmail()); QuestionBankProgress questionBankProgress = iQuestionBankProgressRepository.findByQuestionBankItemAndUser(questionBankItem.getId(), qPalXUser.getId()); if(questionBankProgress != null) { questionBankProgress.increaseNumberOfAttempts(); questionBankProgress.setLastAttemptEntryDate(new DateTime()); } else { questionBankProgress = QuestionBankProgress.builder() .questionBankItemID(questionBankItem.getId()) .qPalxUserID(qPalXUser.getId()) .numberOfAttempts(1L) .lastAttemptEntryDate(new DateTime()) .build(); } iQuestionBankProgressRepository.save(questionBankProgress); } }
[ "fallon12" ]
fallon12
4264aa313d5adb35e983812fcd6af41e217d6e82
4536078b4070fc3143086ff48f088e2bc4b4c681
/v1.1.2/decompiled/l/a/b/a/d/g0/n.java
9dcb66da6fef81e482edc25312a1545cb3a714ae
[]
no_license
olealgoritme/smittestopp_src
485b81422752c3d1e7980fbc9301f4f0e0030d16
52080d5b7613cb9279bc6cda5b469a5c84e34f6a
refs/heads/master
2023-05-27T21:25:17.564334
2023-05-02T14:24:31
2023-05-02T14:24:31
262,846,147
0
0
null
null
null
null
UTF-8
Java
false
false
462
java
package l.a.b.a.d.g0; public class n<E> { public E a; public n<E> b; public n<E> c; public n(E paramE) { a = paramE; } public n<E> a(E paramE) { n localn = c; if (localn == null) { paramE = new n(paramE); c = paramE; b = this; return paramE; } return localn.a(paramE); } } /* Location: * Qualified Name: l.a.b.a.d.g0.n * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "olealgoritme@gmail.com" ]
olealgoritme@gmail.com
8038f2d631ac0559d39dde94e2ebfc6351bee10a
6be781e9146bdd6f26b40d07e739ca20b1d1899d
/gulimall-member/src/main/java/com/atguigu/gulimall/member/service/MemberService.java
e27349c7351706800151e9f50b75b57a96493559
[]
no_license
S664813266/gulimall
ad16af5a710737a835b4ebd4f053fbd0ce7272eb
822ec4dde6edb24a7ae2c71f66942cf61de9fa7f
refs/heads/master
2023-06-11T05:42:12.435798
2021-07-05T15:34:18
2021-07-05T15:34:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
package com.atguigu.gulimall.member.service; import com.baomidou.mybatisplus.extension.service.IService; import com.atguigu.common.utils.PageUtils; import com.atguigu.gulimall.member.entity.MemberEntity; import java.util.Map; /** * 会员 * * @author suxiuwei * @email suxiuwei0809@outlook.com * @date 2021-05-10 23:16:23 */ public interface MemberService extends IService<MemberEntity> { PageUtils queryPage(Map<String, Object> params); }
[ "suxiuwei0809@outlook.com" ]
suxiuwei0809@outlook.com
a080b3324b2c5491796790719b73d651550fdabd
871780d94c32c8b88a2b1213ecaa0f85823d9f03
/Protect the President_complexite_1000_methodes_avec_couplage/src/d/couplage812.java
0364890ed567377e1571aa2310897a965ff476b3
[]
no_license
Keurl/jeu_test_Protect_the_president
d4e9e5b6dd97e29c9ad1265352eab35b29c96d0a
7d86ad9c2a0181478b9eb9522517c38c30ea6133
refs/heads/master
2020-06-14T16:34:41.456922
2019-07-03T12:54:06
2019-07-03T12:54:06
195,019,645
0
0
null
null
null
null
UTF-8
Java
false
false
180
java
package d; public class couplage812 { public static void methode() { couplage811.methode(); } public static void methode2() { couplage811.methode2(); } }
[ "dex400@hotmail.fr" ]
dex400@hotmail.fr
7e1a3f596ecc9d68608fbc87275176adcc411576
ff2683777d02413e973ee6af2d71ac1a1cac92d3
/src/main/java/com/alipay/api/domain/ItemDiagnoseType.java
32705128b51c5d09349aadee005f12e2bcb07c4f
[ "Apache-2.0" ]
permissive
weizai118/alipay-sdk-java-all
c30407fec93e0b2e780b4870b3a71e9d7c55ed86
ec977bf06276e8b16c4b41e4c970caeaf21e100b
refs/heads/master
2020-05-31T21:01:16.495008
2019-05-28T13:14:39
2019-05-28T13:14:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,213
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 菜品诊断类型列表对象 * * @author auto create * @since 1.0, 2017-10-13 17:49:22 */ public class ItemDiagnoseType extends AlipayObject { private static final long serialVersionUID = 8755355988541639832L; /** * 001是明星菜品,002是潜力菜品,003是其他菜品(除明星菜品和潜力菜品之外的其他一律作为其他菜品 编号为003)。 2- 如果要查询所有的则传入999。具体的值可以通过koubei.marketing.data.dishdiagnosetype.batchquery来查询,同时会返回类型与说明 */ @ApiField("item_diagnose") private String itemDiagnose; /** * 对类型的描述 */ @ApiField("item_diagnose_desc") private String itemDiagnoseDesc; public String getItemDiagnose() { return this.itemDiagnose; } public void setItemDiagnose(String itemDiagnose) { this.itemDiagnose = itemDiagnose; } public String getItemDiagnoseDesc() { return this.itemDiagnoseDesc; } public void setItemDiagnoseDesc(String itemDiagnoseDesc) { this.itemDiagnoseDesc = itemDiagnoseDesc; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
a2a7762992a9710b06de1071f3febe3f31c180a0
df4eb7b3e3d53c85108d2d0d412aa85d6ffb2c76
/main/java/vold/src/test/java/com/oodrive/nuage/vold/model/TestVvrManagerConfigL.java
43733b5665619e2092a94ac14186c8957d2b46b5
[]
no_license
cyrinux/eguan
8526c418480f30a3a3ccd5eca2237a68fd2bbc8f
9e20281655838c8c300f1aa97ad03448e16328c8
refs/heads/master
2021-01-17T20:21:35.000299
2015-02-19T15:22:46
2015-02-19T15:22:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,009
java
package com.oodrive.nuage.vold.model; /* * #%L * Project eguan * %% * Copyright (C) 2012 - 2015 Oodrive * %% * 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. * #L% */ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Arrays; import java.util.Collection; import javax.management.ObjectName; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; import com.oodrive.nuage.configuration.ConfigValidationException; import com.oodrive.nuage.dtx.DtxManager; import com.oodrive.nuage.utils.Files; @RunWith(value = Parameterized.class) public class TestVvrManagerConfigL { protected final VoldTestHelper voldTestHelper; protected VvrManager vvrManager = null; protected DtxManager dtxManager = null; protected ObjectName dtxManagerObjectName = null; protected ObjectName dtxLocalNodeObjectName = null; public TestVvrManagerConfigL(final Boolean startedKey) { this.voldTestHelper = new VoldTestHelper(startedKey); } @Parameters public static Collection<Boolean[]> getStartedConfig() { final Boolean[][] vvrStarteds = new Boolean[][] { { Boolean.TRUE }, { Boolean.FALSE } }; return Arrays.asList(vvrStarteds); } @Before public void initDtxManager() throws Exception { voldTestHelper.createTemporary(); dtxManager = VvrManagerTestUtils.createDtxManagerStandAlone(voldTestHelper); dtxManagerObjectName = VvrManagerTestUtils.registerDtxManagerMXBean(DummyMBeanServer.getMBeanServer1(), voldTestHelper, dtxManager); dtxLocalNodeObjectName = VvrManagerTestUtils.registerDtxLocalNodeMXBean(DummyMBeanServer.getMBeanServer1(), voldTestHelper, dtxManager.new DtxLocalNode()); } @After public void finiDtxManager() throws Exception { final DummyMBeanServer dummyMBeanServer = DummyMBeanServer.getMBeanServer1(); if (dtxManagerObjectName != null) { dummyMBeanServer.unregisterMBean(dtxManagerObjectName); dtxManagerObjectName = null; } if (dtxLocalNodeObjectName != null) { dummyMBeanServer.unregisterMBean(dtxLocalNodeObjectName); dtxLocalNodeObjectName = null; } if (dtxManager != null) { dtxManager.stop(); dtxManager.fini(); dtxManager = null; } // All MXBeans are unregistered Assert.assertEquals(0, DummyMBeanServer.getMBeanServer1().getNbMXBeans()); voldTestHelper.destroy(); vvrManager = null; } @Test(expected = FileNotFoundException.class) public void testCreateVvrManagerWithoutVoldDir() throws NullPointerException, IllegalArgumentException, IOException, ConfigValidationException { Files.deleteRecursive(voldTestHelper.getVoldFile().toPath()); VvrManagerTestUtils.createVvrManager(voldTestHelper); } @Test(expected = IllegalStateException.class) public void testInitVvrManagerWithVoldDirAsFile() throws NullPointerException, IllegalArgumentException, IOException, ConfigValidationException { Assert.assertTrue(voldTestHelper.getVvrsFile().delete()); Assert.assertTrue(voldTestHelper.getVvrsFile().createNewFile()); final VvrManager vvrManager = VvrManagerTestUtils.createVvrManager(voldTestHelper); VvrManagerHelper.initDtxManagement(vvrManager, dtxManager); } @Test(expected = IllegalStateException.class) public void testCreateVvrManagerWithVoldDirAsFile() throws NullPointerException, IllegalArgumentException, IOException, ConfigValidationException { Assert.assertTrue(voldTestHelper.getVvrsFile().delete()); Assert.assertTrue(voldTestHelper.getVvrsFile().createNewFile()); final VvrManager vvrManager = VvrManagerTestUtils.createVvrManager(voldTestHelper); VvrManagerHelper.initDtxManagement(vvrManager, dtxManager); } @Test(expected = FileNotFoundException.class) public void testCreateVvrManagerWithoutVoldCfg() throws NullPointerException, IllegalArgumentException, IOException, ConfigValidationException { java.nio.file.Files.delete(new File(voldTestHelper.getVoldFile(), VoldTestHelper.VOLD_CONFIG_FILE).toPath()); VvrManagerTestUtils.createVvrManager(voldTestHelper); } @Test(expected = FileNotFoundException.class) public void testCreateVvrManagerWithoutVvrCfg() throws NullPointerException, IllegalArgumentException, IOException, ConfigValidationException { java.nio.file.Files.delete(new File(voldTestHelper.getVoldFile(), VoldTestHelper.VVR_TEMPLATE).toPath()); VvrManagerTestUtils.createVvrManager(voldTestHelper); } @Test public void testCreateVvrManagerWithoutVvrDir() throws IOException, NullPointerException, IllegalArgumentException, ConfigValidationException { Assert.assertTrue(voldTestHelper.getVvrsFile().delete()); final VvrManager vvrManager = VvrManagerTestUtils.createVvrManager(voldTestHelper); try { VvrManagerHelper.initDtxManagement(vvrManager, dtxManager); Assert.assertTrue(voldTestHelper.getVvrsFile().isDirectory()); } finally { vvrManager.fini(); } } }
[ "p.wehrle@oodrive.com" ]
p.wehrle@oodrive.com
43a3d3fbc89996d46a66cbaf388a65ab44833636
064875f6746ff611f142c44c2e19deadbcb94b36
/platform/src/main/java/net/firejack/platform/service/directory/broker/directory/ReadDirectoryListBroker.java
bdc1d48fd73e5e1fb9eba58e153af43f18c77e1e
[ "Apache-2.0" ]
permissive
alim-firejack/Firejack-Platform
d7faeb35091c042923e698d598d0118f3f4b0c11
bc1f58d425d91425cfcd6ab4fb6b1eed3fe0b815
refs/heads/master
2021-01-15T09:23:05.489281
2014-02-27T17:39:25
2014-02-27T17:39:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,080
java
/* * Firejack Open Flame - Copyright (c) 2012 Firejack Technologies * * This source code is the product of the Firejack Technologies * Core Technologies Team (Benjamin A. Miller, Oleg Marshalenko, and Timur * Asanov) and licensed only under valid, executed license agreements * between Firejack Technologies and its customers. Modification and / or * re-distribution of this source code is allowed only within the terms * of an executed license agreement. * * Any modification of this code voids any and all warranties and indemnifications * for the component in question and may interfere with upgrade path. Firejack Technologies * encourages you to extend the core framework and / or request modifications. You may * also submit and assign contributions to Firejack Technologies for consideration * as improvements or inclusions to the platform to restore modification * warranties and indemnifications upon official re-distributed in patch or release form. */ package net.firejack.platform.service.directory.broker.directory; import net.firejack.platform.api.directory.domain.Directory; import net.firejack.platform.core.broker.ListBroker; import net.firejack.platform.core.domain.NamedValues; import net.firejack.platform.core.exception.BusinessFunctionException; import net.firejack.platform.core.model.registry.directory.DirectoryModel; import net.firejack.platform.core.request.ServiceRequest; import net.firejack.platform.core.store.registry.IDirectoryStore; import net.firejack.platform.web.statistics.annotation.TrackDetails; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.List; @TrackDetails @Component("readDirectoryListBroker") public class ReadDirectoryListBroker extends ListBroker<DirectoryModel, Directory, NamedValues> { @Autowired private IDirectoryStore store; @Override protected List<DirectoryModel> getModelList(ServiceRequest<NamedValues> request) throws BusinessFunctionException { return store.findAllWithFilterWithoutFields(getFilter()); } }
[ "CF8DCmPgvS" ]
CF8DCmPgvS
c25df4e717bdad3445afc300b5c81a3c14de943e
635b67dce32e835adea1fe21c1c8560c9b24660e
/kie-wb-common-stunner/kie-wb-common-stunner-core/kie-wb-common-stunner-commons/kie-wb-common-stunner-core-common/src/test/java/org/kie/workbench/common/stunner/core/rule/handler/impl/EdgeCardinalityEvaluationHandlerTest.java
1570bef97c24f0dcbfaafe9e9a19d9e0967f6b94
[ "Apache-2.0" ]
permissive
DF-Kyun/kie-wb-common
22ef61d3d692b6ad41e4dca6cfe10f9d2f2c6f4b
b383da8b3375d5bdaeddd2fbf874c6b01139e982
refs/heads/master
2021-01-19T09:48:20.709656
2017-04-07T09:06:59
2017-04-07T09:06:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,104
java
/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * 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.kie.workbench.common.stunner.core.rule.handler.impl; import java.util.HashSet; import java.util.Set; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.kie.workbench.common.stunner.core.rule.RuleViolation; import org.kie.workbench.common.stunner.core.rule.RuleViolations; import org.kie.workbench.common.stunner.core.rule.context.CardinalityContext; import org.kie.workbench.common.stunner.core.rule.context.ConnectorCardinalityContext; import org.kie.workbench.common.stunner.core.rule.context.EdgeCardinalityContext; import org.kie.workbench.common.stunner.core.rule.impl.EdgeOccurrences; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import static org.junit.Assert.*; import static org.mockito.Mockito.*; @RunWith(MockitoJUnitRunner.class) public class EdgeCardinalityEvaluationHandlerTest { private final static String ROLE = "theRole"; private final static String EDGE_ID = "edge1"; private final static Set<String> ROLES = new HashSet<String>(2) {{ add(ROLE); }}; private final static EdgeOccurrences RULE_IN_NO_LIMIT = new EdgeOccurrences("c1", EDGE_ID, ROLE, ConnectorCardinalityContext.Direction.INCOMING, 0, -1); private final static EdgeOccurrences RULE_IN_MAX_1 = new EdgeOccurrences("c1", EDGE_ID, ROLE, ConnectorCardinalityContext.Direction.INCOMING, 0, 1); private final static EdgeOccurrences RULE_IN_MIN_1 = new EdgeOccurrences("c1", EDGE_ID, ROLE, ConnectorCardinalityContext.Direction.INCOMING, 1, -1); @Mock EdgeCardinalityContext context; private EdgeCardinalityEvaluationHandler tested; @Before public void setup() throws Exception { when(context.getEdgeId()).thenReturn(EDGE_ID); when(context.getRoles()).thenReturn(ROLES); tested = new EdgeCardinalityEvaluationHandler(); } @Test public void testEvaluateInNoLimit() { when(context.getCandidateCount()).thenReturn(0); when(context.getDirection()).thenReturn(ConnectorCardinalityContext.Direction.INCOMING); when(context.getOperation()).thenReturn(CardinalityContext.Operation.ADD); RuleViolations violations = tested.evaluate(RULE_IN_NO_LIMIT, context); assertNotNull(violations); assertFalse(violations.violations(RuleViolation.Type.ERROR).iterator().hasNext()); when(context.getCandidateCount()).thenReturn(100); violations = tested.evaluate(RULE_IN_NO_LIMIT, context); assertNotNull(violations); assertFalse(violations.violations(RuleViolation.Type.ERROR).iterator().hasNext()); } @Test public void testEvaluateInMaxOneSucess() { when(context.getCandidateCount()).thenReturn(0); when(context.getDirection()).thenReturn(ConnectorCardinalityContext.Direction.INCOMING); when(context.getOperation()).thenReturn(CardinalityContext.Operation.ADD); RuleViolations violations = tested.evaluate(RULE_IN_MAX_1, context); assertNotNull(violations); assertFalse(violations.violations(RuleViolation.Type.ERROR).iterator().hasNext()); } @Test public void testEvaluateInMaxOneFailed() { when(context.getCandidateCount()).thenReturn(1); when(context.getDirection()).thenReturn(ConnectorCardinalityContext.Direction.INCOMING); when(context.getOperation()).thenReturn(CardinalityContext.Operation.ADD); RuleViolations violations = tested.evaluate(RULE_IN_MAX_1, context); assertNotNull(violations); assertTrue(violations.violations(RuleViolation.Type.ERROR).iterator().hasNext()); } @Test public void testEvaluateInMinOneSucess() { when(context.getCandidateCount()).thenReturn(0); when(context.getDirection()).thenReturn(ConnectorCardinalityContext.Direction.INCOMING); when(context.getOperation()).thenReturn(CardinalityContext.Operation.ADD); RuleViolations violations = tested.evaluate(RULE_IN_MIN_1, context); assertNotNull(violations); assertFalse(violations.violations(RuleViolation.Type.ERROR).iterator().hasNext()); } @Test public void testEvaluateInMinOneFailed() { when(context.getCandidateCount()).thenReturn(1); when(context.getDirection()).thenReturn(ConnectorCardinalityContext.Direction.INCOMING); when(context.getOperation()).thenReturn(CardinalityContext.Operation.DELETE); RuleViolations violations = tested.evaluate(RULE_IN_MIN_1, context); assertNotNull(violations); assertTrue(violations.violations(RuleViolation.Type.ERROR).iterator().hasNext()); } }
[ "manstis@users.noreply.github.com" ]
manstis@users.noreply.github.com
7e8aec06dfa6cb9c2ffb802578c336949b72dc5b
6a7a3c200dd7a0fecd8690287b18fa96bde4994e
/src/main/java/com/fury/game/container/types/NeverStackContainer.java
fd7f85eb27bdf77f1550fd39dc3696c8558da4aa
[]
no_license
GregHib/fury
5d6c39a08bd05148076feb809ff26401e4d0d330
24fd71ebd515219d4d7ceca4bd2d5c6a96042cc1
refs/heads/master
2023-01-27T19:29:44.829658
2020-12-03T09:54:17
2020-12-03T09:54:17
318,140,865
1
0
null
null
null
null
UTF-8
Java
false
false
2,072
java
package com.fury.game.container.types; import com.fury.game.container.Container; import com.fury.core.model.node.entity.actor.figure.player.Player; import com.fury.core.model.item.Item; public class NeverStackContainer extends StackContainer { public NeverStackContainer(Player player, int capacity) { super(player, capacity); } @Override public boolean add(Item item) { if(failsChecks(item)) return false; if(!hasRoom()) { //full(); return false; } items[getFreeIndex()] = item.copy(); return true; } @Override public boolean move(int from, Container container, int to) { if(indexOutOfBounds(from) || container.indexOutOfBounds(to)) return false; Item item = get(from); if(failsChecks(item)) return false; return delete(from) && container.set(item, to); } @Override public boolean swap(int index1, Container container, int index2) { if(indexOutOfBounds(index1) || container.indexOutOfBounds(index2)) return false; Item item1 = get(index1); Item item2 = container.get(index2); if(failsChecks(item2))//Only needs to check 2 as 1 is already in container. return false; boolean delete = delete(index1) && container.delete(index2); if(delete) return set(item2, index1) && container.set(item1, index2); return false; } @Override public boolean set(Item item, int index) { if(failsChecks(item) || indexOutOfBounds(index)) return false; items[index] = item.getAmount() > 0 ? item.copy() : null; return true; } private boolean failsChecks(Item item) { return item == null || item.getAmount() > 1 || item.getDefinition().stackable; } @Override public boolean move(Item item, StackContainer to) { boolean added = to.add(item); if(added) delete(indexOf(item)); return added; } }
[ "greghib@users.noreply.github.com" ]
greghib@users.noreply.github.com
54057aa09b1c8c950b695ae240657c1ba7855188
590f10f439fc7b8835c84434aea334be5f4496ef
/src/main/java/edu/uiowa/slis/ClinicalTrialsTagLib/baselineMeasure/BaselineMeasureIterator.java
3fd13c45be249a3f62d7901b348fb7d82acebd70
[]
no_license
data2health/ClinicalTrialsTagLib
9202067a2627727f4570f12cb1875bc0e87f7d41
cd209a50afbf2cc5dc82f5e5a360719ccf18eadf
refs/heads/master
2021-12-08T06:50:14.620121
2021-01-11T22:59:09
2021-01-11T22:59:09
213,464,785
0
0
null
null
null
null
UTF-8
Java
false
false
7,989
java
package edu.uiowa.slis.ClinicalTrialsTagLib.baselineMeasure; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Vector; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; import edu.uiowa.slis.ClinicalTrialsTagLib.ClinicalTrialsTagLibTagSupport; import edu.uiowa.slis.ClinicalTrialsTagLib.ClinicalTrialsTagLibBodyTagSupport; import edu.uiowa.slis.ClinicalTrialsTagLib.clinicalResults.ClinicalResults; @SuppressWarnings("serial") public class BaselineMeasureIterator extends ClinicalTrialsTagLibBodyTagSupport { int ID = 0; int seqnum = 0; String title = null; String description = null; String units = null; String param = null; String dispersion = null; Vector<ClinicalTrialsTagLibTagSupport> parentEntities = new Vector<ClinicalTrialsTagLibTagSupport>(); private static final Log log = LogFactory.getLog(BaselineMeasureIterator.class); PreparedStatement stat = null; ResultSet rs = null; String sortCriteria = null; int limitCriteria = 0; String var = null; int rsCount = 0; public static String baselineMeasureCountByClinicalResults(String ID) throws JspTagException { int count = 0; BaselineMeasureIterator theIterator = new BaselineMeasureIterator(); try { PreparedStatement stat = theIterator.getConnection().prepareStatement("SELECT count(*) from clinical_trials.baseline_measure where 1=1" + " and id = ?" ); stat.setInt(1,Integer.parseInt(ID)); ResultSet crs = stat.executeQuery(); if (crs.next()) { count = crs.getInt(1); } stat.close(); } catch (SQLException e) { log.error("JDBC error generating BaselineMeasure iterator", e); throw new JspTagException("Error: JDBC error generating BaselineMeasure iterator"); } finally { theIterator.freeConnection(); } return "" + count; } public static Boolean clinicalResultsHasBaselineMeasure(String ID) throws JspTagException { return ! baselineMeasureCountByClinicalResults(ID).equals("0"); } public static Boolean baselineMeasureExists (String ID, String seqnum) throws JspTagException { int count = 0; BaselineMeasureIterator theIterator = new BaselineMeasureIterator(); try { PreparedStatement stat = theIterator.getConnection().prepareStatement("SELECT count(*) from clinical_trials.baseline_measure where 1=1" + " and id = ?" + " and seqnum = ?" ); stat.setInt(1,Integer.parseInt(ID)); stat.setInt(2,Integer.parseInt(seqnum)); ResultSet crs = stat.executeQuery(); if (crs.next()) { count = crs.getInt(1); } stat.close(); } catch (SQLException e) { log.error("JDBC error generating BaselineMeasure iterator", e); throw new JspTagException("Error: JDBC error generating BaselineMeasure iterator"); } finally { theIterator.freeConnection(); } return count > 0; } public int doStartTag() throws JspException { ClinicalResults theClinicalResults = (ClinicalResults)findAncestorWithClass(this, ClinicalResults.class); if (theClinicalResults!= null) parentEntities.addElement(theClinicalResults); if (theClinicalResults == null) { } else { ID = theClinicalResults.getID(); } try { //run count query int webapp_keySeq = 1; stat = getConnection().prepareStatement("SELECT count(*) from " + generateFromClause() + " where 1=1" + generateJoinCriteria() + (ID == 0 ? "" : " and id = ?") + generateLimitCriteria()); if (ID != 0) stat.setInt(webapp_keySeq++, ID); rs = stat.executeQuery(); if (rs.next()) { pageContext.setAttribute(var+"Total", rs.getInt(1)); } //run select id query webapp_keySeq = 1; stat = getConnection().prepareStatement("SELECT clinical_trials.baseline_measure.id, clinical_trials.baseline_measure.seqnum from " + generateFromClause() + " where 1=1" + generateJoinCriteria() + (ID == 0 ? "" : " and id = ?") + " order by " + generateSortCriteria() + generateLimitCriteria()); if (ID != 0) stat.setInt(webapp_keySeq++, ID); rs = stat.executeQuery(); if (rs.next()) { ID = rs.getInt(1); seqnum = rs.getInt(2); pageContext.setAttribute(var, ++rsCount); return EVAL_BODY_INCLUDE; } } catch (SQLException e) { log.error("JDBC error generating BaselineMeasure iterator: " + stat.toString(), e); clearServiceState(); freeConnection(); throw new JspTagException("Error: JDBC error generating BaselineMeasure iterator: " + stat.toString()); } return SKIP_BODY; } private String generateFromClause() { StringBuffer theBuffer = new StringBuffer("clinical_trials.baseline_measure"); return theBuffer.toString(); } private String generateJoinCriteria() { StringBuffer theBuffer = new StringBuffer(); return theBuffer.toString(); } private String generateSortCriteria() { if (sortCriteria != null) { return sortCriteria; } else { return "id,seqnum"; } } private String generateLimitCriteria() { if (limitCriteria > 0) { return " limit " + limitCriteria; } else { return ""; } } public int doAfterBody() throws JspTagException { try { if (rs.next()) { ID = rs.getInt(1); seqnum = rs.getInt(2); pageContext.setAttribute(var, ++rsCount); return EVAL_BODY_AGAIN; } } catch (SQLException e) { log.error("JDBC error iterating across BaselineMeasure", e); clearServiceState(); freeConnection(); throw new JspTagException("Error: JDBC error iterating across BaselineMeasure"); } return SKIP_BODY; } public int doEndTag() throws JspTagException, JspException { try { rs.close(); stat.close(); } catch (SQLException e) { log.error("JDBC error ending BaselineMeasure iterator",e); throw new JspTagException("Error: JDBC error ending BaselineMeasure iterator"); } finally { clearServiceState(); freeConnection(); } return super.doEndTag(); } private void clearServiceState() { ID = 0; seqnum = 0; parentEntities = new Vector<ClinicalTrialsTagLibTagSupport>(); this.rs = null; this.stat = null; this.sortCriteria = null; this.var = null; this.rsCount = 0; } public String getSortCriteria() { return sortCriteria; } public void setSortCriteria(String sortCriteria) { this.sortCriteria = sortCriteria; } public int getLimitCriteria() { return limitCriteria; } public void setLimitCriteria(int limitCriteria) { this.limitCriteria = limitCriteria; } public String getVar() { return var; } public void setVar(String var) { this.var = var; } public int getID () { return ID; } public void setID (int ID) { this.ID = ID; } public int getActualID () { return ID; } public int getSeqnum () { return seqnum; } public void setSeqnum (int seqnum) { this.seqnum = seqnum; } public int getActualSeqnum () { return seqnum; } }
[ "david-eichmann@uiowa.edu" ]
david-eichmann@uiowa.edu
c1abec17d1ddc15332623cf546b92b55ac0a0724
f340de6f73806a837bc5db76e6a25dcf20f34c58
/java-web/spring-mvc/spring-mvc-test/src/test/java/com/solverpeng/test/feature/MockMvcFeature1.java
91e6068f56b4d4ce324073a208e5fd6f3442396e
[ "Apache-2.0" ]
permissive
solverpeng/java-code
1f3c40709f83eb2d19fd825f978bd6c4b48edc3c
2b69f44bf79b7373125d2d3e30260f02cf22707c
refs/heads/master
2022-12-23T19:42:20.045191
2021-03-16T10:57:19
2021-03-16T10:57:19
183,572,672
0
1
Apache-2.0
2022-12-16T05:01:09
2019-04-26T06:42:10
Java
UTF-8
Java
false
false
979
java
package com.solverpeng.test.feature; import com.solverpeng.controller.PersonController; import org.junit.Before; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; public class MockMvcFeature1 { private MockMvc mockMvc; @Before public void setup() { this.mockMvc = MockMvcBuilders.standaloneSetup(new PersonController()) .defaultRequest(MockMvcRequestBuilders.get("/").accept(MediaType.APPLICATION_JSON)) .alwaysExpect(status().isOk()) .alwaysExpect(content().contentType("application/json;charset=UTF-8")) .build(); } }
[ "javacoder_ssh@163.com" ]
javacoder_ssh@163.com
9e946d28bfd1c0fc7482255699fd542f77c0cea2
0d0d2eb6da1b7f9416f5baac5041e84e3f9e66a6
/drools-compiler/src/test/java/org/drools/compiler/integrationtests/session/StatefulSessionTest.java
dbf1e7aa9f2f65401551e6bd28001141dd7f0a1a
[ "Apache-2.0" ]
permissive
denis554/drools
33dcddc6d5c61fdd405c8be2dbbfbe4ea3e189be
90479684574a001c5a5cf60ad30f02d11f6c0e98
refs/heads/master
2020-04-25T01:10:34.137932
2019-02-22T16:45:54
2019-02-22T16:45:54
172,400,914
1
0
Apache-2.0
2019-02-24T23:01:55
2019-02-24T23:01:54
null
UTF-8
Java
false
false
7,313
java
/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * 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.drools.compiler.integrationtests.session; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import org.drools.compiler.Cheese; import org.drools.compiler.CheeseEqual; import org.drools.compiler.CommonTestMethodBase; import org.drools.compiler.Message; import org.drools.compiler.PersonInterface; import org.drools.compiler.integrationtests.SerializationHelper; import org.drools.core.ClassObjectFilter; import org.drools.core.common.DefaultFactHandle; import org.drools.core.impl.KnowledgeBaseFactory; import org.junit.Test; import org.kie.api.KieBase; import org.kie.api.KieBaseConfiguration; import org.kie.api.conf.EqualityBehaviorOption; import org.kie.api.runtime.KieSession; import org.kie.api.runtime.rule.FactHandle; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; public class StatefulSessionTest extends CommonTestMethodBase { @Test public void testDispose() throws Exception { final StringBuilder rule = new StringBuilder(); rule.append("package org.drools.compiler\n"); rule.append("rule X\n"); rule.append("when\n"); rule.append(" Message()\n"); rule.append("then\n"); rule.append("end\n"); //building stuff final KieBase kbase = loadKnowledgeBaseFromString(rule.toString()); final KieSession ksession = createKnowledgeSession(kbase); ksession.insert(new Message("test")); final int rules = ksession.fireAllRules(); assertEquals(1, rules); ksession.dispose(); try { // the following should raise an IllegalStateException as the session was already disposed ksession.fireAllRules(); fail("An IllegallStateException should have been raised as the session was disposed before the method call."); } catch (final IllegalStateException ise) { // success } } @Test public void testGetStatefulKnowledgeSessions() throws Exception { final KieBase kbase = SerializationHelper.serializeObject(loadKnowledgeBase("../empty.drl")); final KieSession ksession_1 = createKnowledgeSession(kbase); final String expected_1 = "expected_1"; final String expected_2 = "expected_2"; final FactHandle handle_1 = ksession_1.insert(expected_1); final FactHandle handle_2 = ksession_1.insert(expected_2); ksession_1.fireAllRules(); final Collection<? extends KieSession> coll_1 = kbase.getKieSessions(); assertTrue(coll_1.size() == 1); final KieSession ksession_2 = coll_1.iterator().next(); final Object actual_1 = ksession_2.getObject(handle_1); final Object actual_2 = ksession_2.getObject(handle_2); assertEquals(expected_1, actual_1); assertEquals(expected_2, actual_2); ksession_1.dispose(); final Collection<? extends KieSession> coll_2 = kbase.getKieSessions(); assertTrue(coll_2.size() == 0); // here to make sure it's safe to call dispose() twice ksession_1.dispose(); final Collection<? extends KieSession> coll_3 = kbase.getKieSessions(); assertTrue(coll_3.size() == 0); } @Test public void testGetFactHandle() throws Exception { final KieBase kbase = SerializationHelper.serializeObject(loadKnowledgeBase("../empty.drl")); final KieSession ksession = createKnowledgeSession(kbase); for (int i = 0; i < 20; i++) { final Object object = new Object(); ksession.insert(object); final FactHandle factHandle = ksession.getFactHandle(object); assertNotNull(factHandle); assertEquals(object, ksession.getObject(factHandle)); } ksession.dispose(); } @Test public void testGetFactHandleEqualityBehavior() throws Exception { final KieBaseConfiguration kbc = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); kbc.setOption(EqualityBehaviorOption.EQUALITY); final KieBase kbase = SerializationHelper.serializeObject(loadKnowledgeBase(kbc)); final KieSession ksession = createKnowledgeSession(kbase); final CheeseEqual cheese = new CheeseEqual("stilton", 10); ksession.insert(cheese); final FactHandle fh = ksession.getFactHandle(new CheeseEqual("stilton", 10)); assertNotNull(fh); } @Test public void testGetFactHandleIdentityBehavior() throws Exception { final KieBaseConfiguration kbc = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); kbc.setOption(EqualityBehaviorOption.IDENTITY); final KieBase kbase = SerializationHelper.serializeObject(loadKnowledgeBase(kbc)); final KieSession ksession = createKnowledgeSession(kbase); final CheeseEqual cheese = new CheeseEqual("stilton", 10); ksession.insert(cheese); final FactHandle fh1 = ksession.getFactHandle(new Cheese("stilton", 10)); assertNull(fh1); final FactHandle fh2 = ksession.getFactHandle(cheese); assertNotNull(fh2); } @Test public void testDisconnectedFactHandle() { final KieBase kbase = getKnowledgeBase(); final KieSession ksession = createKnowledgeSession( kbase ); final DefaultFactHandle helloHandle = (DefaultFactHandle) ksession.insert( "hello" ); final DefaultFactHandle goodbyeHandle = (DefaultFactHandle) ksession.insert( "goodbye" ); FactHandle key = DefaultFactHandle.createFromExternalFormat( helloHandle.toExternalForm() ); assertEquals( "hello", ksession.getObject( key ) ); key = DefaultFactHandle.createFromExternalFormat( goodbyeHandle.toExternalForm() ); assertEquals( "goodbye", ksession.getObject( key ) ); } @Test public void testIterateObjects() throws Exception { final KieBase kbase = SerializationHelper.serializeObject(loadKnowledgeBase("test_IterateObjects.drl")); final KieSession ksession = createKnowledgeSession(kbase); final List results = new ArrayList(); ksession.setGlobal("results", results); ksession.insert(new Cheese("stilton", 10)); ksession.fireAllRules(); final Iterator events = ksession.getObjects(new ClassObjectFilter(PersonInterface.class)).iterator(); assertTrue(events.hasNext()); assertEquals(1, results.size()); assertEquals(results.get(0), events.next()); } }
[ "mario.fusco@gmail.com" ]
mario.fusco@gmail.com
90825e8142b66cf652cb8141a6908fcc6d78586e
baee3ef7cc98badf8a87e9f74ddd1a6d70b096b0
/.SpojMundo/src/aSimpleGame.java
594185320a363b34db508e5d3f72fe5c5cac0712
[]
no_license
groverinho/Java
eb4863737888d552ac313e23f0e7e2fd2dc45aa7
0b0c612eb03cf27b8310448bcf72da4565be0af6
refs/heads/master
2021-12-25T11:32:46.222179
2021-09-10T22:48:14
2021-09-10T22:48:14
47,481,887
2
0
null
null
null
null
UTF-8
Java
false
false
571
java
import java.util.Scanner; public class aSimpleGame { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t= in.nextInt(); for (int i = 0; i < t; ++i) { int n = in.nextInt(); int cont = 0; while (n > 0) { if (n % 2 == 0) n/=2; else n--; cont++; } if (cont % 2 == 0) System.out.println("Akash"); else System.out.println("Aayush"); } } }
[ "grover_ariel@hotmail.com" ]
grover_ariel@hotmail.com
73ac5dc1d9a56395a0d3b44cf7c853b8bae6254e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_0b0d4e25d1f1b396285c588693381c65ebed75d3/TestEnumDeserialization/5_0b0d4e25d1f1b396285c588693381c65ebed75d3_TestEnumDeserialization_s.java
9dc2038631a92f4feeb1342b82a88c937848dec7
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,092
java
package org.codehaus.jackson.map.deser; import main.BaseTest; import org.codehaus.jackson.*; import org.codehaus.jackson.map.*; import org.codehaus.jackson.map.annotate.JsonDeserialize; public class TestEnumDeserialization extends BaseTest { /* ////////////////////////////////////////////////////////// // Helper classes, enums ////////////////////////////////////////////////////////// */ enum TestEnum { JACKSON, RULES, OK; } /** * Alternative version that annotates which deserializer to use */ @JsonDeserialize(using=DummySerializer.class) enum AnnotatedTestEnum { JACKSON, RULES, OK; } public static class DummySerializer extends JsonDeserializer<Object> { public Object deserialize(JsonParser jp, DeserializationContext ctxt) { return AnnotatedTestEnum.OK; } } /* ////////////////////////////////////////////////////////// // Tests ////////////////////////////////////////////////////////// */ public void testSimple() throws Exception { // First "good" case with Strings ObjectMapper mapper = new ObjectMapper(); String JSON = "\"OK\" \"RULES\" null"; // multiple main-level mappings, need explicit parser: JsonParser jp = mapper.getJsonFactory().createJsonParser(JSON); assertEquals(TestEnum.OK, mapper.readValue(jp, TestEnum.class)); assertEquals(TestEnum.RULES, mapper.readValue(jp, TestEnum.class)); /* should be ok; nulls are typeless; handled by mapper, not by * deserializer */ assertNull(mapper.readValue(jp, TestEnum.class)); // and no more content beyond that... assertFalse(jp.hasCurrentToken()); /* Then alternative with index (0 means first entry) */ assertEquals(TestEnum.JACKSON, mapper.readValue(" 0 ", TestEnum.class)); /* Then error case: unrecognized value */ try { /*Object result =*/ mapper.readValue("\"NO-SUCH-VALUE\"", TestEnum.class); fail("Expected an exception for bogus enum value..."); } catch (JsonMappingException jex) { verifyException(jex, "value not one of declared"); } } /** * Testing to see that annotation override works */ public void testAnnotated() throws Exception { ObjectMapper mapper = new ObjectMapper(); AnnotatedTestEnum e = mapper.readValue("\"JACKSON\"", AnnotatedTestEnum.class); /* dummy deser always returns value OK, independent of input; * only works if annotation is used */ assertEquals(AnnotatedTestEnum.OK, e); } // Test [WSTX-214] public void testSubclassedEnums() throws Exception { ObjectMapper mapper = new ObjectMapper(); EnumWithSubclass value = mapper.readValue("\"A\"", EnumWithSubclass.class); assertEquals(EnumWithSubClass.A, value); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e631ea7e8449e1739fdc55a98764f6b7fd307588
1efd789f2f4a4e8e280789f95c59afa5426cc4b9
/src/main/java/stu/napls/boostimcenter/BoostimCenterApplication.java
57271fbea6a33b473f92bc18f17009434cf50e3a
[ "Apache-2.0" ]
permissive
teimichael/BoostimCenter
faf1d677137ee2d3ed4fabceec4ffc69fced3424
14330881618ac89f2ce8a4996559f26a0d394ae2
refs/heads/master
2021-07-22T18:57:33.132136
2021-01-02T14:17:09
2021-01-02T14:17:09
232,578,493
1
0
null
null
null
null
UTF-8
Java
false
false
434
java
package stu.napls.boostimcenter; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; @SpringBootApplication @EnableJpaAuditing public class BoostimCenterApplication { public static void main(String[] args) { SpringApplication.run(BoostimCenterApplication.class, args); } }
[ "teimichael@outlook.com" ]
teimichael@outlook.com
de32365dda93fbcd3b7ce4910373280043104530
0d7220b4a680f220e04ecad46d51b6532d90bf64
/dev/nuker/pyro/f7v-1.java
9f39ad83d2f09b21bc5819b1678c94b9bf2d2026
[]
no_license
HelpMopDog/PyroClient-Deobf
d2816bd39de7a792748e52e7b1de611b9fe07473
23cdef6fed8ae19025757c076f2147fbb9816802
refs/heads/main
2023-08-28T01:57:25.423834
2021-10-23T03:16:53
2021-10-23T03:16:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,761
java
/** * Obfuscator: Binsecure Decompiler: FernFlower * De-obfuscated by Gopro336 */ package dev.nuker.pyro; import dev.nuker.pyro.security.inject.LauncherEventHide; import net.minecraft.block.Block; import net.minecraft.block.BlockAir; import net.minecraft.block.BlockTallGrass; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public class f7v extends Module { // $FF: renamed from: c dev.nuker.pyro.BooleanSetting @NotNull public BooleanSetting field_373 = (BooleanSetting)this.register((f0w)(new BooleanSetting("ridingOnly", "RidingOnly", "Only activates while riding", true))); // $FF: renamed from: c () dev.nuker.pyro.BooleanSetting @NotNull public BooleanSetting method_546() { return this.field_373; } // $FF: renamed from: 0 () boolean public boolean method_547() { if (this.c.player == null) { return false; } else { int var1 = MathHelper.floor(this.c.player.getEntityBoundingBox().minX); for(int var2 = MathHelper.floor(this.c.player.getEntityBoundingBox().maxX) + 1; var1 < var2; ++var1) { int var3 = MathHelper.floor(this.c.player.getEntityBoundingBox().minY); for(int var4 = MathHelper.floor(this.c.player.getEntityBoundingBox().maxY) + 1; var3 < var4; ++var3) { int var5 = MathHelper.floor(this.c.player.getEntityBoundingBox().minZ); for(int var6 = MathHelper.floor(this.c.player.getEntityBoundingBox().maxZ) + 1; var5 < var6; ++var5) { Block var7 = feg.method_1779(new BlockPos(var1, var3, var5)); if (var7 != null && !(var7 instanceof BlockAir)) { if (var7 instanceof BlockTallGrass) { return false; } AxisAlignedBB var8 = var7.getSelectedBoundingBox(feg.method_1791(new BlockPos(var1, var3, var5)), (World)this.c.world, new BlockPos(var1, var3, var5)); if (var8 != null && this.c.player.getEntityBoundingBox().intersects(var8)) { return true; } } } } } return false; } } // $FF: renamed from: c (dev.nuker.pyro.f4t) void @f0g public void method_548(@NotNull f4t var1) { if (this.c.player == null || this.c.player.isRiding() || !(Boolean)this.field_373.c()) { this.c.player.motionY = 0.0D; if (this.c.player.movementInput.jump) { this.c.player.motionY = 0.3D; } else if (this.c.player.movementInput.sneak) { this.c.player.motionY = -0.3D; } } } // $FF: renamed from: c (dev.nuker.pyro.f4x) void @f0g @LauncherEventHide public void method_549(@NotNull f4x var1) { if (this.c.player == null || this.c.player.isRiding() || !(Boolean)this.field_373.c()) { var1.0(); } } public f7v() { super("sandphase", "SandPhase", "Allows you to phase in sand"); } // $FF: renamed from: c (net.minecraft.util.math.BlockPos, net.minecraft.util.math.AxisAlignedBB) net.minecraft.util.math.AxisAlignedBB @Nullable public AxisAlignedBB method_550(@NotNull BlockPos var1, @NotNull AxisAlignedBB var2) { if (this.c.player != null && !this.c.player.isRiding() && (Boolean)this.field_373.c()) { return var2; } else if (this.method_547()) { if (this.c.player != null) { this.c.player.noClip = true; } return null; } else { return var2; } } }
[ "63124240+Gopro336@users.noreply.github.com" ]
63124240+Gopro336@users.noreply.github.com
324eef275f9ce06cdab81202f9061872177b5d56
79eb06cf873d4cccb6eb8211201a3e3866ed6166
/src/day4/test.java
1409b2954972acb5fc95b5504e95807a9ff4c164
[]
no_license
nahongjae/HongStudy
1c6347762c975d99bef30e1e2b30073cb223954a
f030256657ebc68f7a65da2bdb17fead3bed05cd
refs/heads/master
2021-01-12T08:03:13.162088
2016-12-26T06:18:32
2016-12-26T06:18:32
77,112,488
0
0
null
null
null
null
UTF-8
Java
false
false
419
java
package day4; public class test { public static void main(String[] args) { String s1="seoul"; //0x10 String s2="seoul"; //0x10 String s3=new String("seoul"); //0x30 System.out.println(s1==s2); // true System.out.println(s1==s3); // false System.out.println(s1.hashCode()); //109324212 System.out.println(s3.hashCode()); //109324212 s2+="korea"; System.out.println(s1==s2); //false } }
[ "user2@user2-PC" ]
user2@user2-PC
02909c94daa4f3611ad9e797b4d80d40a4a1a71d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/10/10_a8cc43268a2fe59864f4938dd5ccc0e6bca71bdc/AbstractBinding/10_a8cc43268a2fe59864f4938dd5ccc0e6bca71bdc_AbstractBinding_t.java
28a601b71eec839042acd1ec6c27f7b811297e0c
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,878
java
/* * Copyright 2009 Andrew Pietsch * * 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.pietschy.gwt.pectin.client.binding; import com.google.gwt.event.shared.HandlerRegistration; import java.util.ArrayList; /** * Created by IntelliJ IDEA. * User: andrew * Date: Jul 11, 2009 * Time: 4:45:50 PM * To change this template use File | Settings | File Templates. */ public abstract class AbstractBinding implements BindingContainer { private ArrayList<HandlerRegistration> eventRegistrations = new ArrayList<HandlerRegistration>(); private ArrayList<AbstractBinding> childBindings = new ArrayList<AbstractBinding>(); public void registerHandler(HandlerRegistration registration) { eventRegistrations.add(registration); } public void registerBinding(AbstractBinding binding) { childBindings.add(binding); } public abstract void updateTarget(); public abstract Object getTarget(); public void dispose() { for (HandlerRegistration registration : eventRegistrations) { registration.removeHandler(); } eventRegistrations.clear(); for (AbstractBinding binding : childBindings) { binding.dispose(); } childBindings.clear(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8d0a000a23dfb8944f5a3f98b19147955ce13f3d
81a41c0f631b4756be2ff854e2e03738b3089572
/champions/attackTree/CombinedExecuteNode.java
8e4c5852b9528a758d31b349014588e191c7021b
[]
no_license
thomasjeffreyandersontwin/HeroCombatSimulator
3d6b42f4c7b40509cd813df214258f633bff6479
efb019c150f011e319a3c779500329b034f163d7
refs/heads/master
2021-05-06T16:28:17.088624
2018-03-09T08:02:56
2018-03-09T08:02:56
113,687,368
0
0
null
null
null
null
UTF-8
Java
false
false
5,767
java
/* * AutofireAttackNode.java * * Created on December 16, 2001, 2:00 PM */ package champions.attackTree; import champions.ActivationInfo; import champions.BattleEvent; import champions.CombinedAbilityBattleEvent; import champions.Target; /** * * @author twalker * @version */ public class CombinedExecuteNode extends DefaultAttackTreeNode { /** Creates new AutofireAttackNode */ public CombinedExecuteNode(String name) { this.name = name; setVisible(false); } public boolean activateNode(boolean manualOverride) { if ( AttackTreeModel.DEBUG > 0 ) System.out.println("Node " + name + " activated."); // The root node should never accept active node status, since // It isn't really a real node. return true; } public AttackTreeNode buildNextChild(AttackTreeNode activeChild) { AttackTreeNode nextNode = null; // Compare the activeChild to the possible children, to determine what comes next. if ( activeChild != null && activeChild.getName() == null ) { // This is probably an error int index = children.indexOf(activeChild); System.out.println("Null Node name for child " + Integer.toString(index) + " of Parent " + this); nextNode = null; } else { String previousNodeName = (activeChild == null ) ? null : activeChild.getName(); String nextNodeName = nextNodeName(previousNodeName); if ( nextNodeName != null ) { CombinedAbilityBattleEvent lbe = (CombinedAbilityBattleEvent)battleEvent; int index = Integer.parseInt(nextNodeName); if ( index != -1 ) { // Build a node. Embed the BattleEvent. CombinedActivateAbilityNode node = new CombinedActivateAbilityNode(nextNodeName); node.setCombinedAbilityIndex(index); nextNode = node; } } } return nextNode; } public String nextNodeName(String previousNodeName) { String nextNodeName = "-1"; CombinedAbilityBattleEvent lbe = (CombinedAbilityBattleEvent)battleEvent; int count = lbe.getCombinedAbilityCount(); int previousIndex = -1; if ( previousNodeName == null ) { previousIndex = -1; } else { previousIndex = Integer.parseInt(previousNodeName); } for(int i = previousIndex+1; i < count; i++) { if ( lbe.isCombinedAbilityEnabled(i) ) { // Encode the index into the node name... nextNodeName = Integer.toString(i); break; } } return nextNodeName; } /** * Allows node to adjust the target set for an attack. * * Every node in the tree path of a target node has an oppertunity to * adjust the target for an attack via this method. This method should * in most cases pass this call up to it's attack tree node parent (or * simply call the default implementation which does exactly that). * * PrimaryTargetNumber indicates if this particular target is considered * a primary target for this attack. If it is, primaryTargetNumber should * be one or greater. */ public void adjustTarget(BattleEvent be, Target source, int referenceNumber, String targetGroup, int primaryTargetNumber) { // Don't do anything if this isn't a primary target... if ( primaryTargetNumber < 1 ) return; // We want to adjust the target for every battleEvent after the first event, // setting up the primary when applicable. CombinedAbilityBattleEvent lbe = (CombinedAbilityBattleEvent)battleEvent; int children = lbe.getCombinedAbilityCount(); for(int index=1; index<children; index++) { BattleEvent aBE = lbe.getSubBattleEvent(index); if ( aBE == be ) { // This was the node. Find the other battleEvent BattleEvent previousBE = lbe.getSubBattleEvent(index-1); ActivationInfo previousAI = previousBE.getActivationInfo(); String previousTargetGroup = previousAI.getPrimaryTargetGroup(primaryTargetNumber); int previousTargetReferenceNumber = previousAI.getPrimaryTargetReferenceNumber(primaryTargetNumber); if ( previousTargetGroup != null ) { // There is a set primaryTarget // Find if the previous primary target is actually set... int previousTargetIndex = previousAI.getTargetIndex(previousTargetReferenceNumber, previousTargetGroup); if ( previousTargetIndex != -1 ) { Target previousTarget = previousAI.getTarget(previousTargetIndex); ActivationInfo ai = be.getActivationInfo(); // Add a new target (or set the already created one) int tindex = ai.addTarget(previousTarget,targetGroup,referenceNumber); String reason = "This target is a primary target from an earlier combined attack.\n\n" + "Primary targets must be the same for consecutive combined attacks."; ai.setTargetFixed(tindex, true, reason); } } break; } } } }
[ "thomasjeffreyandersontwin@gmail.com" ]
thomasjeffreyandersontwin@gmail.com
a8e55f391af454dc847a5cb885b9dbc90c006cac
a55e0d6833aac4da538507012b853ce8347b2f23
/src/de/theknut/xposedgelsettings/hooks/Homescreen/AddViewToCellLayoutHook.java
9fbb691a819af0021d4321d07c1be68a2e0b7a95
[]
no_license
bjarter/XposedGELSettings
3797cd2b36275af9db27774a819fcccc3af010fc
cac020409c8fe512276835bef7347f92f529d908
refs/heads/master
2020-04-06T06:51:31.161659
2014-09-19T16:23:48
2014-09-19T16:23:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,911
java
package de.theknut.xposedgelsettings.hooks.homescreen; import android.graphics.Color; import android.graphics.PorterDuff.Mode; import android.graphics.drawable.Drawable; import android.view.View; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import net.margaritov.preference.colorpicker.ColorPickerPreference; import de.theknut.xposedgelsettings.hooks.Common; import de.theknut.xposedgelsettings.hooks.HooksBaseClass; import de.theknut.xposedgelsettings.hooks.ObfuscationHelper.Classes; import de.theknut.xposedgelsettings.hooks.ObfuscationHelper.Fields; import de.theknut.xposedgelsettings.hooks.ObfuscationHelper.Methods; import de.theknut.xposedgelsettings.hooks.PreferencesHelper; import static de.robv.android.xposed.XposedHelpers.callMethod; import static de.robv.android.xposed.XposedHelpers.getBooleanField; import static de.robv.android.xposed.XposedHelpers.getObjectField; public final class AddViewToCellLayoutHook extends HooksBaseClass { // public boolean addViewToCellLayout(View child, int index, int childId, LayoutParams params, boolean markCells) // http://androidxref.com/4.4.2_r1/xref/packages/apps/Launcher3/src/com/android/launcher3/CellLayout.java#604 private static int newAppLabelColor = Color.parseColor(ColorPickerPreference.convertToARGB(PreferencesHelper.homescreenIconLabelColor)); private static int newFolderAppLabelColor = Color.parseColor(ColorPickerPreference.convertToARGB(PreferencesHelper.homescreenFolderAppTextColor)); private static int newFolderNameColor = Color.parseColor(ColorPickerPreference.convertToARGB(PreferencesHelper.homescreenFolderNameTextColor)); private static int newFolderBackgroundColor = Color.parseColor(ColorPickerPreference.convertToARGB(PreferencesHelper.homescreenFolderColor)); private static int newFolderPreviewBackgroundColor = Color.parseColor(ColorPickerPreference.convertToARGB(PreferencesHelper.homescreenFolderPreviewColor)); @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { if (param.args[0].getClass().equals(Classes.BubbleTextView)) { // apps in folders don't have a shadow so we can filter that for future customization if (!getBooleanField(param.args[0], Fields.btvShadowsEnabled)) { if (PreferencesHelper.homescreenFolderSwitch) { if (PreferencesHelper.homescreenFolderNoLabel) { callMethod(param.args[0], "setTextColor", Color.TRANSPARENT); } else { callMethod(param.args[0], "setTextColor", newFolderAppLabelColor); } } } else { if (PreferencesHelper.iconSettingsSwitchHome) { if (Common.PACKAGE_OBFUSCATED) { if (!PreferencesHelper.homescreenIconLabelShadow) { callMethod(param.args[0], Methods.btvSetShadowsEnabled, PreferencesHelper.homescreenIconLabelShadow); } } else { callMethod(param.args[0], Methods.btvSetShadowsEnabled, PreferencesHelper.homescreenIconLabelShadow); } if (PreferencesHelper.hideIconLabelHome) { callMethod(param.args[0], Methods.btvSetShadowsEnabled, false); callMethod(param.args[0], "setTextColor", Color.TRANSPARENT); } else { callMethod(param.args[0], "setTextColor", newAppLabelColor); } } } } else if (param.args[0].getClass().equals(Classes.FolderIcon)) { Object folderName = getObjectField(param.args[0], Fields.fiFolderName); if (PreferencesHelper.iconSettingsSwitchHome) { if (Common.PACKAGE_OBFUSCATED) { if (!PreferencesHelper.homescreenIconLabelShadow) { callMethod(folderName, Methods.btvSetShadowsEnabled, PreferencesHelper.homescreenIconLabelShadow); } } else { callMethod(folderName, Methods.btvSetShadowsEnabled, PreferencesHelper.homescreenIconLabelShadow); } callMethod(folderName, "setTextColor", newAppLabelColor); if (PreferencesHelper.hideIconLabelHome) { callMethod(folderName, Methods.btvSetShadowsEnabled, false); callMethod(folderName, "setTextColor", Color.TRANSPARENT); } } if (PreferencesHelper.homescreenFolderSwitch) { Object mFolder = getObjectField(param.args[0], Fields.fiFolder); LinearLayout ll = (LinearLayout) mFolder; Drawable d = ll.getBackground(); d.setColorFilter(newFolderBackgroundColor, Mode.MULTIPLY); ll.setBackground(d); EditText mFolderName = (EditText) getObjectField(mFolder, Fields.fFolderEditText); mFolderName.setTextColor(newFolderNameColor); ImageView prevBackground = (ImageView) getObjectField(param.args[0], Fields.fiPreviewBackground); prevBackground.setVisibility(View.VISIBLE); Drawable i = prevBackground.getDrawable(); i.setColorFilter(newFolderPreviewBackgroundColor, Mode.MULTIPLY); prevBackground.setImageDrawable(i); } } } }
[ "alexander.as.schulz@gmail.com" ]
alexander.as.schulz@gmail.com
adf1128e335b99bfb9653d7f2968666068ca7f5d
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/TemperatureController5016.java
cd97bee6935db94c18c915591272250b80c8f762
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
367
java
package syncregions; public class TemperatureController5016 { public execute(int temperature5016, int targetTemperature5016) { //sync _bfpnFUbFEeqXnfGWlV5016, behaviour 1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
cbcb1c177b38296fe21a08ab24c9ee0dc9a89d7a
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a137/A137043.java
7a192d498d098ad90f5d2207ad3ab6a8ab8bdeef
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
434
java
package irvine.oeis.a137; // Generated by gen_seq4.pl squaredig 13789 at 2019-07-11 10:10 // DO NOT EDIT here! import irvine.oeis.SquareDigitsSequence; /** * A137043 Numbers n such that n and the square of n use only the digits <code>1, 3, 7, 8</code> and 9. * @author Georg Fischer */ public class A137043 extends SquareDigitsSequence { /** Construct the sequence. */ public A137043() { super(1, 10, 2, "13789"); } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
3dd77d231ced3613ae5624e65036434031c40ef3
061de0d9ffb00a08251fba20f0bdf9b13d00c799
/php-impl/src/main/java/consulo/php/impl/lang/commenter/PhpCommenter.java
a445f149d38af619b831841b40512bee004c69f4
[]
no_license
consulo/consulo-php
a8d8a86883e0ebcf52bb6334d67e3d0a44e2192c
d71518eb8f5d86d816fe7a57e124a4c7a6549269
refs/heads/master
2023-09-05T20:59:21.466585
2023-07-07T10:28:29
2023-07-07T10:28:29
10,116,525
3
3
null
2023-01-01T16:37:57
2013-05-17T05:14:47
Java
UTF-8
Java
false
false
1,944
java
package consulo.php.impl.lang.commenter; import com.jetbrains.php.lang.PhpLanguage; import consulo.annotation.component.ExtensionImpl; import consulo.language.CodeDocumentationAwareCommenter; import consulo.language.Language; import consulo.language.ast.IElementType; import consulo.language.psi.PsiComment; import consulo.php.impl.lang.documentation.phpdoc.parser.PhpDocElementTypes; import consulo.php.lang.lexer.PhpTokenTypes; import javax.annotation.Nonnull; import javax.annotation.Nullable; /** * @author jay * @time 21.12.2007 18:41:02 */ @ExtensionImpl public class PhpCommenter implements CodeDocumentationAwareCommenter { @Override @Nullable public String getLineCommentPrefix() { return "//"; } @Override @Nullable public String getBlockCommentPrefix() { return "/*"; } @Override @Nullable public String getBlockCommentSuffix() { return "*/"; } @Nullable @Override public String getCommentedBlockCommentPrefix() { return null; } @Nullable @Override public String getCommentedBlockCommentSuffix() { return null; } @Override @Nullable public IElementType getLineCommentTokenType() { return PhpTokenTypes.LINE_COMMENT; } @Override @Nullable public IElementType getBlockCommentTokenType() { return PhpTokenTypes.C_STYLE_COMMENT; } @Override @Nullable public IElementType getDocumentationCommentTokenType() { return PhpDocElementTypes.DOC_COMMENT; } @Override @Nullable public String getDocumentationCommentPrefix() { return "/**"; } @Override @Nullable public String getDocumentationCommentLinePrefix() { return "*"; } @Override @Nullable public String getDocumentationCommentSuffix() { return " */"; } @Override public boolean isDocumentationComment(PsiComment element) { return element.getText().startsWith(getDocumentationCommentPrefix()); } @Nonnull @Override public Language getLanguage() { return PhpLanguage.INSTANCE; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
8b8fb826ffc657c7fe603d945225ce016f44eb31
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XWIKI-13916-1-28-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/com/xpn/xwiki/objects/classes/BaseClass_ESTest.java
d0fffa44907548c10f32bc3057540bf11eb6232b
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
935
java
/* * This file was automatically generated by EvoSuite * Thu Oct 28 15:40:15 UTC 2021 */ package com.xpn.xwiki.objects.classes; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import com.xpn.xwiki.objects.DoubleProperty; import com.xpn.xwiki.objects.meta.UsersMetaClass; 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 BaseClass_ESTest extends BaseClass_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { DoubleProperty doubleProperty0 = new DoubleProperty(); UsersMetaClass usersMetaClass0 = new UsersMetaClass(); // Undeclared exception! usersMetaClass0.addTextAreaField("separators", "separators", 15, 3101, (String) null, "added"); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
ed305eb2d9c575a70b8dafae9a3add793c441a92
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/java/je-6.4.25/src/com/sleepycat/utilint/StringUtils.java
8109ef1ec38ba7439ca23914fba36c9eab9472e2
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
320
java
package com.sleepycat.utilint; import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; import java.nio.charset.CharacterCodingException; public class StringUtils
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
fe14da0d0e70645f9ad40c3b2905d4d150474c80
250f76a5c09b48914b25cc0de8eaf28ad30f6375
/java_concurrent/src/main/java/cn/com/frodo/concurrent/chapter_8/PuzzleSolver.java
71d8b583e73767a95d05c3f10ec42382538600b8
[]
no_license
frodoking/Java
73409e2389417459b80016d43a8f0e888d8b11d8
044a49466091b7737b32c1c1ecb558d5d146fc1a
refs/heads/master
2023-06-09T13:13:07.210965
2023-06-09T03:32:14
2023-06-09T03:32:14
29,135,773
2
2
null
null
null
null
UTF-8
Java
false
false
1,211
java
package cn.com.frodo.concurrent.chapter_8; import java.util.concurrent.atomic.AtomicInteger; /** * 在解决器中找不到解答 * { * 解决方案 * 1、ValueLatch中的getValue超时控制; * 2、设置特定的结束条件,例如只搜索特定数量的位置; * 3、另外还可以提供一种取消机制,用于用户自己决定何时停止搜索 * } * Created by frodo on 2015/1/21. */ public class PuzzleSolver<P, M> extends ConcurrentPuzzleSolver<P, M> { private final AtomicInteger taskCount = new AtomicInteger(0); public PuzzleSolver(Puzzle<P, M> puzzle) { super(puzzle); } @Override protected Runnable newTask(P p, M m, PuzzleNode<P, M> n) { return new CountingSolverTask(p, m, n); } protected class CountingSolverTask extends SolverTask { public CountingSolverTask(P pos, M move, PuzzleNode<P, M> prev) { super(pos, move, prev); } @Override public void run() { try { super.run(); } finally { if (taskCount.decrementAndGet() == 0) { solution.setValue(null); } } } } }
[ "awangyun8@gmail.com" ]
awangyun8@gmail.com
e2821b527a6308077f56b66515d4de483e89dc04
8582bc8e5925f77c6f7d17d4d71e8ac492676cbb
/0123/360-Innovations_VaadinSmartGWT/VaadinSmartGWT/org.vaadin.smartgwt/src/main/java/org/vaadin/smartgwt/server/types/ImageStyle.java
ed1ff698a9d99f2594917d9a6d977bb2dce65ffa
[]
no_license
ryosuke-ku/projects_git
12f48620b7349393df7c07286a4b90729edd46b4
e43cde4d0c394853ea0c221d50d17e9c596e3cc4
refs/heads/master
2020-08-31T01:42:08.668179
2019-10-30T14:42:45
2019-10-30T14:42:45
218,548,551
0
0
null
null
null
null
UTF-8
Java
false
false
1,391
java
/* * SmartGWT (GWT for SmartClient) * Copyright 2008 and beyond, Isomorphic Software, Inc. * * SmartGWT is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version 3 * as published by the Free Software Foundation. SmartGWT is also * available under typical commercial license terms - see * http://smartclient.com/license * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.vaadin.smartgwt.server.types; /** */ public enum ImageStyle implements ValueEnum { /** * Center (and don't stretch at all) the image if smaller than its enclosing frame.CENTER:"center", */ CENTER("center"), /** * Tile (repeat) the image if smaller than its enclosing frame. */ TILE("tile"), /** * Stretch the image to the size of its enclosing frame. */ STRETCH("stretch"), /** * Allow the image to have natural size */ NORMAL("normal"); private String value; ImageStyle(String value) { this.value = value; } public String getValue() { return this.value; } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
953d900ff86b3f6326259597cb57c1c3009eb989
ab4895442669f554248860525bf1c3e3348f568e
/QCRadioButtonTest/app/src/main/java/com/example/qcradiobuttontest/MainActivity.java
c3e403fe07ee164cd1a74233124a29bced1dc1a8
[]
no_license
canwhite/QCAndroidResource
5cc280c9142859c3a8c51eab565b460424c2ab19
c9e0d24ce6e2f4e0aebe91bfe68da01a3ee3a72e
refs/heads/master
2020-03-18T13:32:52.167595
2018-09-13T03:24:45
2018-09-13T03:24:45
134,791,033
20
0
null
null
null
null
UTF-8
Java
false
false
1,058
java
package com.example.qcradiobuttontest; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.Toast; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); RadioGroup radgroup = (RadioGroup) findViewById(R.id.radioGroup); //第一种获得单选按钮值的方法 //为radioGroup设置一个监听器:setOnCheckedChanged() radgroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { RadioButton radbtn = (RadioButton) findViewById(checkedId); Toast.makeText(getApplicationContext(), "按钮组值发生改变,你选了" + radbtn.getText(), Toast.LENGTH_LONG).show(); } }); } }
[ "tony@gmail.com" ]
tony@gmail.com
9cdfcb202b8d2b129fbe9393d6b16932824223c2
79595075622ded0bf43023f716389f61d8e96e94
/app/src/main/java/android/icu/impl/CacheValue.java
25eb0e654213ff855a37a06101f7fc945025d680
[]
no_license
dstmath/OppoR15
96f1f7bb4d9cfad47609316debc55095edcd6b56
b9a4da845af251213d7b4c1b35db3e2415290c96
refs/heads/master
2020-03-24T16:52:14.198588
2019-05-27T02:24:53
2019-05-27T02:24:53
142,840,716
7
4
null
null
null
null
UTF-8
Java
false
false
2,330
java
package android.icu.impl; import android.icu.util.ICUException; import java.lang.ref.Reference; import java.lang.ref.SoftReference; public abstract class CacheValue<V> { private static final CacheValue NULL_VALUE = new NullValue(); private static volatile Strength strength = Strength.SOFT; private static final class NullValue<V> extends CacheValue<V> { /* synthetic */ NullValue(NullValue -this0) { this(); } private NullValue() { } public boolean isNull() { return true; } public V get() { return null; } public V resetIfCleared(V value) { if (value == null) { return null; } throw new ICUException("resetting a null value to a non-null value"); } } private static final class SoftValue<V> extends CacheValue<V> { private Reference<V> ref; SoftValue(V value) { this.ref = new SoftReference(value); } public V get() { return this.ref.get(); } public synchronized V resetIfCleared(V value) { V oldValue = this.ref.get(); if (oldValue != null) { return oldValue; } this.ref = new SoftReference(value); return value; } } public enum Strength { STRONG, SOFT } private static final class StrongValue<V> extends CacheValue<V> { private V value; StrongValue(V value) { this.value = value; } public V get() { return this.value; } public V resetIfCleared(V v) { return this.value; } } public abstract V get(); public abstract V resetIfCleared(V v); public static void setStrength(Strength strength) { strength = strength; } public static boolean futureInstancesWillBeStrong() { return strength == Strength.STRONG; } public static <V> CacheValue<V> getInstance(V value) { if (value == null) { return NULL_VALUE; } return strength == Strength.STRONG ? new StrongValue(value) : new SoftValue(value); } public boolean isNull() { return false; } }
[ "toor@debian.toor" ]
toor@debian.toor
ed98c3b70098ddf01b083409e589bc8ead9fdf00
e9ce7f937722aeb0c9b5fdd98ba4fc746e3a5ddb
/src/main/java/com/davidm/mykindlenews/generated/jooq/performance_schema/tables/ObjectsSummaryGlobalByType.java
5bc12a80c7e9a6c4c2d01ff0a1762e3093eea158
[]
no_license
davidmotson/kindlenews
5e3aa9079e7c301eee848505e356319672655761
9820473cb6de295f0420dc88b58d6c727acd8dcf
refs/heads/master
2016-09-10T23:20:16.362015
2015-08-15T17:41:56
2015-08-15T17:41:56
40,692,575
1
0
null
null
null
null
UTF-8
Java
false
false
5,966
java
/** * This class is generated by jOOQ */ package com.davidm.mykindlenews.generated.jooq.performance_schema.tables; /** * This class is generated by jOOQ. */ @javax.annotation.Generated( value = { "http://www.jooq.org", "jOOQ version:3.5.4" }, comments = "This class is generated by jOOQ" ) @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class ObjectsSummaryGlobalByType extends org.jooq.impl.TableImpl<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord> { private static final long serialVersionUID = 1739964027; /** * The reference instance of <code>performance_schema.objects_summary_global_by_type</code> */ public static final com.davidm.mykindlenews.generated.jooq.performance_schema.tables.ObjectsSummaryGlobalByType OBJECTS_SUMMARY_GLOBAL_BY_TYPE = new com.davidm.mykindlenews.generated.jooq.performance_schema.tables.ObjectsSummaryGlobalByType(); /** * The class holding records for this type */ @Override public java.lang.Class<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord> getRecordType() { return com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord.class; } /** * The column <code>performance_schema.objects_summary_global_by_type.OBJECT_TYPE</code>. */ public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord, java.lang.String> OBJECT_TYPE = createField("OBJECT_TYPE", org.jooq.impl.SQLDataType.VARCHAR.length(64), this, ""); /** * The column <code>performance_schema.objects_summary_global_by_type.OBJECT_SCHEMA</code>. */ public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord, java.lang.String> OBJECT_SCHEMA = createField("OBJECT_SCHEMA", org.jooq.impl.SQLDataType.VARCHAR.length(64), this, ""); /** * The column <code>performance_schema.objects_summary_global_by_type.OBJECT_NAME</code>. */ public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord, java.lang.String> OBJECT_NAME = createField("OBJECT_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(64), this, ""); /** * The column <code>performance_schema.objects_summary_global_by_type.COUNT_STAR</code>. */ public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord, org.jooq.types.ULong> COUNT_STAR = createField("COUNT_STAR", org.jooq.impl.SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column <code>performance_schema.objects_summary_global_by_type.SUM_TIMER_WAIT</code>. */ public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord, org.jooq.types.ULong> SUM_TIMER_WAIT = createField("SUM_TIMER_WAIT", org.jooq.impl.SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column <code>performance_schema.objects_summary_global_by_type.MIN_TIMER_WAIT</code>. */ public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord, org.jooq.types.ULong> MIN_TIMER_WAIT = createField("MIN_TIMER_WAIT", org.jooq.impl.SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column <code>performance_schema.objects_summary_global_by_type.AVG_TIMER_WAIT</code>. */ public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord, org.jooq.types.ULong> AVG_TIMER_WAIT = createField("AVG_TIMER_WAIT", org.jooq.impl.SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column <code>performance_schema.objects_summary_global_by_type.MAX_TIMER_WAIT</code>. */ public final org.jooq.TableField<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord, org.jooq.types.ULong> MAX_TIMER_WAIT = createField("MAX_TIMER_WAIT", org.jooq.impl.SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * Create a <code>performance_schema.objects_summary_global_by_type</code> table reference */ public ObjectsSummaryGlobalByType() { this("objects_summary_global_by_type", null); } /** * Create an aliased <code>performance_schema.objects_summary_global_by_type</code> table reference */ public ObjectsSummaryGlobalByType(java.lang.String alias) { this(alias, com.davidm.mykindlenews.generated.jooq.performance_schema.tables.ObjectsSummaryGlobalByType.OBJECTS_SUMMARY_GLOBAL_BY_TYPE); } private ObjectsSummaryGlobalByType(java.lang.String alias, org.jooq.Table<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord> aliased) { this(alias, aliased, null); } private ObjectsSummaryGlobalByType(java.lang.String alias, org.jooq.Table<com.davidm.mykindlenews.generated.jooq.performance_schema.tables.records.ObjectsSummaryGlobalByTypeRecord> aliased, org.jooq.Field<?>[] parameters) { super(alias, com.davidm.mykindlenews.generated.jooq.performance_schema.PerformanceSchema.PERFORMANCE_SCHEMA, aliased, parameters, ""); } /** * {@inheritDoc} */ @Override public com.davidm.mykindlenews.generated.jooq.performance_schema.tables.ObjectsSummaryGlobalByType as(java.lang.String alias) { return new com.davidm.mykindlenews.generated.jooq.performance_schema.tables.ObjectsSummaryGlobalByType(alias, this); } /** * Rename this table */ public com.davidm.mykindlenews.generated.jooq.performance_schema.tables.ObjectsSummaryGlobalByType rename(java.lang.String name) { return new com.davidm.mykindlenews.generated.jooq.performance_schema.tables.ObjectsSummaryGlobalByType(name, null); } }
[ "davidmotson@gmail.com" ]
davidmotson@gmail.com
cfe94596a164f84d62e0dd7226c2094f7403cc04
08ef4a626e5fb2963c3e2f2fa310bf79d967d482
/src/main/java/com/ruoyi/manage/showhome/controller/ZxShowHomeController.java
9c02095a2a0907e51b500118906b68c9fbb67240
[ "MIT" ]
permissive
fengderongyan/gcxw
a0d3351023a956e0873a0a1e23d28c34f76245d7
022785b41d7e03d0de96ca2ef4294bc8b362e352
refs/heads/master
2022-09-15T02:50:58.331795
2020-01-07T02:34:14
2020-01-07T02:34:14
232,227,301
0
0
MIT
2022-09-01T23:19:04
2020-01-07T02:36:07
JavaScript
UTF-8
Java
false
false
4,434
java
package com.ruoyi.manage.showhome.controller; import java.util.List; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.manage.floor.domain.XqFloor; import com.ruoyi.manage.floor.service.IXqFloorService; import com.ruoyi.manage.showhome.domain.ZxShowHome; import com.ruoyi.manage.showhome.service.IZxShowHomeService; import com.ruoyi.project.system.dept.domain.Dept; import com.ruoyi.project.system.dept.service.IDeptService; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.web.page.TableDataInfo; /** * 装修效果Controller * * @author yanbs * @date 2019-12-09 */ @Controller @RequestMapping("/manage/showhome") public class ZxShowHomeController extends BaseController { private String prefix = "manage/showhome"; @Autowired private IZxShowHomeService zxShowHomeService; @Autowired private IDeptService deptService; @Autowired private IXqFloorService xqFloorService; @RequiresPermissions("manage:showhome:view") @GetMapping() public String showhome(ModelMap mmap) { List<Dept> deptList = deptService.selectXqList(new Dept()); mmap.put("deptList", deptList); return prefix + "/showhome"; } /** * 查询装修效果列表 */ @RequiresPermissions("manage:showhome:list") @PostMapping("/list") @ResponseBody public TableDataInfo list(ZxShowHome zxShowHome) { startPage(); List<ZxShowHome> list = zxShowHomeService.selectZxShowHomeList(zxShowHome); return getDataTable(list); } /** * 新增装修效果 */ @GetMapping("/add") public String add(ModelMap mmap) { List<Dept> deptList = deptService.selectXqList(new Dept()); mmap.put("deptList", deptList); return prefix + "/add"; } /** * 新增保存装修效果 */ @RequiresPermissions("manage:showhome:add") @Log(title = "装修效果", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(ZxShowHome zxShowHome, String[] imgUrls) { return toAjax(zxShowHomeService.insertZxShowHome(zxShowHome, imgUrls)); } /** * 修改装修效果 */ @GetMapping("/edit/{showHomeId}") public String edit(@PathVariable("showHomeId") Long showHomeId, ModelMap mmap) { ZxShowHome zxShowHome = zxShowHomeService.selectZxShowHomeById(showHomeId); List<Dept> deptList = deptService.selectXqList(new Dept()); mmap.put("zxShowHome", zxShowHome); mmap.put("deptList", deptList); return prefix + "/edit"; } /** * 修改保存装修效果 */ @RequiresPermissions("manage:showhome:edit") @Log(title = "装修效果", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody public AjaxResult editSave(ZxShowHome zxShowHome, String[] imgUrls) { return toAjax(zxShowHomeService.updateZxShowHome(zxShowHome, imgUrls)); } /** * 删除装修效果 */ @RequiresPermissions("manage:showhome:remove") @Log(title = "装修效果", businessType = BusinessType.DELETE) @PostMapping( "/remove") @ResponseBody public AjaxResult remove(String ids) { return toAjax(zxShowHomeService.deleteZxShowHomeByIds(ids)); } @GetMapping( "/doorInfo") public String doorInfo(XqFloor xqFloor, ModelMap mmap){ mmap.put("xqFloor", xqFloor); return prefix + "/doorInfo"; } @PostMapping( "/xqList") @ResponseBody public TableDataInfo xqList(XqFloor xqFloor){ startPage(); List <XqFloor> xqList = xqFloorService.selectXqFloorList(xqFloor); return getDataTable(xqList); } }
[ "2252743889@qq.com" ]
2252743889@qq.com
cfe12677874d321e00a37b7ac4fca651304c7944
b00093b751b5e78e94babf2e0b44d1af174fa0e3
/src/main/java/com/artarkatesoft/commands/NotesCommand.java
bc3592b4a7c573d8b31eaecb1a5c0e39ea15d91a
[]
no_license
artshishkin/art-sfg-recipe-project
539e50401e8ad6a61b433492d0a8059cd4c40d33
142d4c9f1f84e2a502ead6eaa38f7ad496fcb912
refs/heads/master
2022-11-25T14:08:16.984878
2020-08-09T18:07:41
2020-08-09T18:07:41
277,072,685
0
0
null
2020-08-05T15:49:32
2020-07-04T08:44:36
Java
UTF-8
Java
false
false
177
java
package com.artarkatesoft.commands; import lombok.Getter; import lombok.Setter; @Getter @Setter public class NotesCommand { private String id; private String notes; }
[ "d.art.shishkin@gmail.com" ]
d.art.shishkin@gmail.com
a09f43862d71e070bfa540598a572506444ee554
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_45795.java
f38e7922db3b8e23b9536beb482fce4cb610ca6f
[]
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
235
java
@Override public List<ProviderInfo> getAvailableProviders(){ ConcurrentMap<ProviderInfo,ClientTransport> map=aliveConnections.isEmpty() ? subHealthConnections : aliveConnections; return new ArrayList<ProviderInfo>(map.keySet()); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
20933f7415e8f402a13ec5dbdd2213c46ffe8a90
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13377-1-9-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/objects/BaseStringProperty_ESTest.java
6e23433cf846c610eedecccfb9a9bfcb01e18c11
[]
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
875
java
/* * This file was automatically generated by EvoSuite * Fri Apr 03 18:00:41 UTC 2020 */ package com.xpn.xwiki.objects; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import com.xpn.xwiki.objects.LargeStringProperty; import java.time.LocalDate; 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 BaseStringProperty_ESTest extends BaseStringProperty_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { LargeStringProperty largeStringProperty0 = new LargeStringProperty(); LocalDate localDate0 = LocalDate.now(); // Undeclared exception! largeStringProperty0.setValue(localDate0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
8a1a4aa9d26c4cde2e0c14c33846311ef9bf47fb
b1b77bb1ed47586f96d8f2554a65bcbd0c7162cc
/NETFLIX/spectator/spectator-ext-sandbox/src/main/java/com/netflix/spectator/sandbox/BucketDistributionSummary.java
8cbc5ecf0c920056ce89d8854ac284ce9e927c38
[]
no_license
DanHefrman/stuff
b3624d7089909972ee806211666374a261c02d08
b98a5c80cfe7041d8908dcfd4230cf065c17f3f6
refs/heads/master
2023-07-10T09:47:04.780112
2021-08-13T09:55:17
2021-08-13T09:55:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,215
java
/* * Copyright 2014-2019 Netflix, 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.netflix.spectator.sandbox; import com.netflix.spectator.api.DistributionSummary; import com.netflix.spectator.api.Id; import com.netflix.spectator.api.Measurement; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.Spectator; /** * Distribution summaries that get updated based on the bucket for recorded values. * * @deprecated Moved to {@code com.netflix.spectator.api.histogram} package. This is now just a * thin wrapper to preserve compatibility. Scheduled for removal after in Q3 2016. */ @Deprecated public final class BucketDistributionSummary implements DistributionSummary { /** * Creates a distribution summary object that manages a set of distribution summaries based on * the bucket function supplied. Calling record will be mapped to the record on the appropriate * distribution summary. * * @param id * Identifier for the metric being registered. * @param f * Function to map values to buckets. * @return * Distribution summary that manages sub-counters based on the bucket function. */ public static BucketDistributionSummary get(Id id, BucketFunction f) { return get(Spectator.globalRegistry(), id, f); } /** * Creates a distribution summary object that manages a set of distribution summaries based on * the bucket function supplied. Calling record will be mapped to the record on the appropriate * distribution summary. * * @param registry * Registry to use. * @param id * Identifier for the metric being registered. * @param f * Function to map values to buckets. * @return * Distribution summary that manages sub-counters based on the bucket function. */ public static BucketDistributionSummary get(Registry registry, Id id, BucketFunction f) { return new BucketDistributionSummary( com.netflix.spectator.api.histogram.BucketDistributionSummary.get(registry, id, f)); } private final com.netflix.spectator.api.histogram.BucketDistributionSummary s; /** Create a new instance. */ BucketDistributionSummary(com.netflix.spectator.api.histogram.BucketDistributionSummary s) { this.s = s; } @Override public Id id() { return s.id(); } @Override public Iterable<Measurement> measure() { return s.measure(); } @Override public boolean hasExpired() { return s.hasExpired(); } @Override public void record(long amount) { s.record(amount); } @Override public long count() { return s.count(); } @Override public long totalAmount() { return s.totalAmount(); } }
[ "bryan.guner@gmail.com" ]
bryan.guner@gmail.com
9ec5770a0cce32cb40a96f4a745c46cf012d8d71
dc0b48c0d40a9c4a2f03a45fdc5a7583ee7f8d4a
/src/test/java/com/hankcs/book/ch05/DemoPerceptronCWS.java
807d76fff8d8cc7437634b334997c8856510edf9
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
cooliean/HanLP
36f04cb3a65f8516588466fbe49f970494ec6f8f
077e8b3cfc0a5c844b1005bbd51d99a405efc4d5
refs/heads/master
2022-04-18T03:24:48.760272
2020-02-10T03:57:40
2020-02-10T03:57:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,614
java
/* * <author>Han He</author> * <email>me@hankcs.com</email> * <create-date>2018-06-22 3:15 PM</create-date> * * <copyright file="DemoPerceptronCWS.java"> * Copyright (c) 2018, Han He. All Rights Reserved, http://www.hankcs.com/ * This source is subject to Han He. Please contact Han He for more information. * </copyright> */ package com.hankcs.book.ch05; import com.hankcs.hanlp.HanLP; import com.hankcs.hanlp.corpus.MSR; import com.hankcs.hanlp.model.perceptron.CWSTrainer; import com.hankcs.hanlp.model.perceptron.PerceptronLexicalAnalyzer; import com.hankcs.hanlp.model.perceptron.model.LinearModel; import com.hankcs.hanlp.seg.Segment; import com.hankcs.hanlp.seg.common.CWSEvaluator; import java.io.IOException; /** * 《自然语言处理入门》5.6 基于结构化感知机的中文分词 * 配套书籍:http://nlp.hankcs.com/book.php * 讨论答疑:https://bbs.hankcs.com/ * * @author hankcs * @see <a href="http://nlp.hankcs.com/book.php">《自然语言处理入门》</a> * @see <a href="https://bbs.hankcs.com/">讨论答疑</a> */ public class DemoPerceptronCWS { public static void main(String[] args) throws IOException { Segment segment = train(); String[] sents = new String[]{ "王思斌,男,1949年10月生。", "山东桓台县起凤镇穆寨村妇女穆玲英", "现为中国艺术研究院中国文化研究所研究员。", "我们的父母重男轻女", "北京输气管道工程", }; for (String sent : sents) { System.out.println(segment.seg(sent)); } // trainUncompressedModel(); } public static Segment train() throws IOException { LinearModel model = new CWSTrainer().train(MSR.TRAIN_PATH, MSR.MODEL_PATH).getModel(); // 训练模型 Segment segment = new PerceptronLexicalAnalyzer(model).enableCustomDictionary(false); // 创建分词器 System.out.println(CWSEvaluator.evaluate(segment, MSR.TEST_PATH, MSR.OUTPUT_PATH, MSR.GOLD_PATH, MSR.TRAIN_WORDS)); // 标准化评测 return segment; } private static Segment trainUncompressedModel() throws IOException { LinearModel model = new CWSTrainer().train(MSR.TRAIN_PATH, MSR.TRAIN_PATH, MSR.MODEL_PATH, 0., 10, 8).getModel(); model.save(MSR.MODEL_PATH, model.featureMap.entrySet(), 0, true); // 最后一个参数指定导出txt return new PerceptronLexicalAnalyzer(model).enableCustomDictionary(false); } static { HanLP.Config.ShowTermNature = false; } }
[ "krisibm@163.com" ]
krisibm@163.com
83ecba749bacdaec7f57457180d5179df05c0b5e
69b7aecfbc4363e44ec6000c50414498e8b4911b
/apps/ipsadminapp/src/main/java/com/bosch/pai/ipsadminapp/utilities/UtilMethods.java
c39f8da52e4346fc9c5ce01c69b934afeff7b3e5
[]
no_license
devsops/Poc_jenkins
6dcb1caef22bad324f76fe18300eb39a52228c36
8823bb2628bf4cedb826736dea6fa1820367e336
refs/heads/master
2020-06-02T15:57:32.999734
2019-06-10T18:00:28
2019-06-10T18:00:28
191,218,436
0
0
null
null
null
null
UTF-8
Java
false
false
7,271
java
package com.bosch.pai.ipsadminapp.utilities; import android.app.Activity; import android.content.Context; import android.support.annotation.Nullable; import android.text.InputFilter; import android.util.Log; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Toast; import com.bosch.pai.ipsadmin.retail.pmadminlib.analytics.Analytics; import com.bosch.pai.ipsadmin.retail.pmadminlib.analytics.callback.IAnalyticsCallbacks; import com.bosch.pai.ipsadmin.retail.pmadminlib.analytics.impl.AnalyticsImpl; import com.bosch.pai.ipsadmin.retail.pmadminlib.authentication.AuthenticationCallback; import com.bosch.pai.ipsadmin.retail.pmadminlib.authentication.AuthenticationManager; public class UtilMethods { private static final String LOG_TAG = UtilMethods.class.getSimpleName(); private static final String VALIDATION_REGEX = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@!_#$&])[A-Za-z\\d@!_#$&]{8,}$"; private UtilMethods() { //default constructor } public interface IAuthenticationCallback { void onSuccess(); void onFailure(String errMessage); } public static void authenticateProximity(final Activity context, @Nullable final IAuthenticationCallback listener) { final ProximityAdminSharedPreference preference = ProximityAdminSharedPreference.getInstance(context); final SettingsPreferences settingsPreferences = new SettingsPreferences(context); String proximityServiceURL = settingsPreferences.getProximityServiceURL(); if (proximityServiceURL != null && !proximityServiceURL.isEmpty()) { final Analytics analytics = AnalyticsImpl.getInstance(proximityServiceURL); analytics.onAuthentication(context, preference.getCompany(), preference.getUserName(), preference.getUserPassword(), proximityServiceURL, new IAnalyticsCallbacks.IAuthenticationListener() { @Override public void onSuccess() { Log.d(LOG_TAG, "Authentication Success"); checkUserRole(context, preference.getProximityUrl(), preference.getCompany(), preference.getUserName(), listener); } @Override public void failure(String errorMessage) { DialogUtil.showAlertDialogOnError(context, "LOGIN FAILURE!\n" + errorMessage); if (listener != null) { listener.onFailure(errorMessage); } } }); } } private static void checkUserRole(final Activity context, final String url, final String company, final String userName, final IAuthenticationCallback listener) { final AuthenticationManager authenticationManager = new AuthenticationManager(company, userName, null, url); authenticationManager.checkUserRole(context, new AuthenticationCallback() { @Override public void onAuthenticationSuccess() { if (listener != null) { listener.onSuccess(); } } @Override public void onAuthenticationFail(String message) { DialogUtil.showAlertDialogOnError(context, "LOGIN FAILURE!\n" + message); if (listener != null) { listener.onFailure(message); } } }); } public static void changePassword(Context context, String oldPassword, String newPassword, AuthenticationCallback callback) { final ProximityAdminSharedPreference preference = ProximityAdminSharedPreference.getInstance(context); if(!preference.getUserPassword().equals(oldPassword)) { callback.onAuthenticationFail("Old Password is incorrect!"); return; } final AuthenticationManager authenticationManager = new AuthenticationManager(preference.getCompany(), preference.getUserName(), null, preference.getProximityUrl()); authenticationManager.changePassword(context, oldPassword, newPassword, callback); } public static boolean isAValidPassword(String passwordForValidation) { return passwordForValidation.matches(VALIDATION_REGEX); } public static void authenticateBearing(final Activity context, IAuthenticationCallback callback) { final ProximityAdminSharedPreference preference = ProximityAdminSharedPreference.getInstance(context); final SettingsPreferences settingsPreferences = new SettingsPreferences(context); String bearingServiceURL = settingsPreferences.getBearingServiceURL(); if (bearingServiceURL != null && !bearingServiceURL.isEmpty()) { final Analytics analytics = AnalyticsImpl.getInstance(bearingServiceURL); analytics.onAuthentication(context, preference.getCompany(), preference.getUserName(), preference.getUserPassword(), bearingServiceURL, new IAnalyticsCallbacks.IAuthenticationListener() { @Override public void onSuccess() { Log.d(LOG_TAG, "Bearing Authentication Success"); callback.onSuccess(); } @Override public void failure(String errorMessage) { callback.onFailure(errorMessage); } }); } } public static String getStoreIdFromSiteName(String siteName) { try { final String[] split = siteName.split("_"); if (split.length >= 2) { return split[0]; } else { return null; } } catch (Exception e) { Log.e(LOG_TAG, "Error : " + e, e); return null; } } public static void hideSoftKeyboard(Activity activity) { final InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE); final View currentFocus = activity.getCurrentFocus(); if (currentFocus != null && inputMethodManager != null) { inputMethodManager.hideSoftInputFromWindow(currentFocus.getWindowToken(), 0); } } public static boolean isValidinputString(String validinput) { if (validinput.contains(" ")) return false; final String regexStr = "^[a-zA-Z0-9]*$"; return validinput.matches(regexStr); } public static InputFilter getEditTextInputFilter() { //Allow anly Alphanumeric and underscore return (source, start, end, dest, dstart, dend) -> { for (int i = start;i < end;i++) { if (!Character.isLetterOrDigit(source.charAt(i)) && !Character.toString(source.charAt(i)).equals("_")) { return ""; } } return null; }; } }
[ "suresh13.cs@gmail.com" ]
suresh13.cs@gmail.com
7ae5aac0e6f884cc775ce3ebf7883b6328582f0f
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/xbmc_Kore/app/src/main/java/org/xbmc/kore/eventclient/PacketBUTTON.java
f5fea247f458d65715025dbe7574d1c9da7c2be4
[]
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
2,592
java
// isComment package org.xbmc.kore.eventclient; /** * isComment */ public class isClassOrIsInterface extends Packet { protected static final byte isVariable = isIntegerConstant; protected static final byte isVariable = isIntegerConstant; protected static final byte isVariable = isIntegerConstant; protected static final byte isVariable = isIntegerConstant; protected static final byte isVariable = isIntegerConstant; protected static final byte isVariable = isIntegerConstant; protected static final byte isVariable = isIntegerConstant; protected static final byte isVariable = (byte) isIntegerConstant; protected static final byte isVariable = (byte) isIntegerConstant; /** * isComment */ public isConstructor(short isParameter, boolean isParameter, boolean isParameter, boolean isParameter, short isParameter, byte isParameter) { super(isNameExpr); String isVariable = "isStringConstant"; String isVariable = "isStringConstant"; short isVariable = isIntegerConstant; isMethod(isNameExpr, isNameExpr, isNameExpr, isNameExpr, isNameExpr, isNameExpr, isNameExpr, isNameExpr, isNameExpr); } /** * isComment */ public isConstructor(String isParameter, String isParameter, boolean isParameter, boolean isParameter, boolean isParameter, short isParameter, byte isParameter) { super(isNameExpr); short isVariable = isIntegerConstant; short isVariable = isNameExpr; isMethod(isNameExpr, isNameExpr, isNameExpr, isNameExpr, isNameExpr, isNameExpr, isNameExpr, isNameExpr, isNameExpr); } /** * isComment */ private void isMethod(short isParameter, String isParameter, String isParameter, boolean isParameter, boolean isParameter, boolean isParameter, short isParameter, byte isParameter, short isParameter) { if (isNameExpr > isIntegerConstant) isNameExpr |= isNameExpr; else isNameExpr = isIntegerConstant; if (isNameExpr) isNameExpr |= isNameExpr; else isNameExpr |= isNameExpr; if (!isNameExpr) isNameExpr |= isNameExpr; if (isNameExpr) isNameExpr |= isNameExpr; if (isNameExpr == isIntegerConstant) isNameExpr |= isNameExpr; else if (isNameExpr == isIntegerConstant) isNameExpr |= isNameExpr; isMethod(isNameExpr); isMethod(isNameExpr); isMethod(isNameExpr); isMethod(isNameExpr); isMethod(isNameExpr); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
031a87b75fa7332f6fc3c0dad17bdffc8d8f96c5
1d2fda2245888413e3eef8798a61236822f022db
/com/sun/tools/xjc/api/util/ToolsJarNotFoundException.java
f290faf6718931b2268540af5f79d35a52d3167d
[ "IJG" ]
permissive
SynieztroLedPar/Wu
3b4391e916f6a5605d60663f800702f3e45d5dfc
5f7daebc2fb430411ddb76a179005eeecde9802b
refs/heads/master
2023-04-29T17:27:08.301723
2020-10-10T22:28:40
2020-10-10T22:28:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
670
java
package com.sun.tools.xjc.api.util; import java.io.File; public final class ToolsJarNotFoundException extends Exception { public final File toolsJar; public ToolsJarNotFoundException(File toolsJar) { super(calcMessage(toolsJar)); this.toolsJar = toolsJar; } private static String calcMessage(File toolsJar) { return Messages.TOOLS_JAR_NOT_FOUND.format(new Object[] { toolsJar.getPath() }); } } /* Location: C:\Games\SteamLibrary\steamapps\common\Wurm Unlimited Dedicated Server\server.jar!\com\sun\tools\xjc\api\util\ToolsJarNotFoundException.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "dwayne.griffiths@outlook.com" ]
dwayne.griffiths@outlook.com
2c4859cc638307644c4e70a223c1ebcd72e14aff
5c4514bc2aa1a633feafe8c7c29ff2e62a29e6e9
/BackEnd/Service/service-fast/src/main/java/com/exactpro/sf/services/fast/FASTClientSettings.java
c0df2b2de7fc2346a6a2133bdd9bb925a4a4d26c
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
assassinen/sailfish-core
3d8f747d52101fcc91e3c04609a0f712852cf1f7
fde1f536f7a841da8e0c57c24a628d1f72f66cc5
refs/heads/master
2020-07-31T12:30:45.419968
2019-09-23T14:16:52
2019-09-23T14:16:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,382
java
/****************************************************************************** * Copyright 2009-2018 Exactpro (Exactpro Systems Limited) * * 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.exactpro.sf.services.fast; import javax.xml.bind.annotation.XmlRootElement; import org.apache.commons.configuration.HierarchicalConfiguration; import com.exactpro.sf.aml.Description; import com.exactpro.sf.services.RequiredParam; @XmlRootElement public class FASTClientSettings extends FASTCodecSettings { private static final long serialVersionUID = -8839117107070514695L; @RequiredParam @Description("Host address") private String address; @RequiredParam @Description("Connection port") private int port; @RequiredParam @Description("Network interface") private String networkInterface; @Description("Incativity service timeout in seconds after which service will be shout down automatically. If 0 - do not shoutdown service.") private int idleTimeout; @Description("Message filter expression") private String messageFilterExpression; @Description("Begin string") private String beginString; @Description("ApplVerID") private String applVerID; @Description("Connect client after start") private boolean autoconnect; public boolean isAutoconnect() { return autoconnect; } public void setAutoconnect(boolean autoconnect) { this.autoconnect = autoconnect; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public int getPort() { return port; } public void setPort(int port) { this.port = port; } public String getNetworkInterface() { return networkInterface; } public void setNetworkInterface(String networkInterface) { this.networkInterface = networkInterface; } public int getIdleTimeout() { return idleTimeout; } public void setIdleTimeout(int idleTimeout) { this.idleTimeout = idleTimeout; } public String getMessageFilterExpression() { return messageFilterExpression; } public void setMessageFilterExpression( String messageFilterExpression) { this.messageFilterExpression = messageFilterExpression; } @Override public void load(HierarchicalConfiguration config) { //this.address = config.getString("address"); //this.port = config.getInt("port", 0); } public String getBeginString() { return beginString; } public void setBeginString(String beginString) { this.beginString = beginString; } public String getApplVerID() { return applVerID; } public void setApplVerID(String applVerID) { this.applVerID = applVerID; } }
[ "nikita.smirnov@exactprosystems.com" ]
nikita.smirnov@exactprosystems.com
7fa3fbaa540d8100dd78a52aff42836d6f34b63b
235dfb33d21d5c1fcbbc3ff450739250c50abbb6
/ode/Development/apps/webapp/ode-core/src/main/java/com/bah/ode/asn/OdeArea.java
45afba06016a34fe3eb37e11c7950ebcffa33692
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
OSADP/SEMI-ODE
91bf6d32d3f638f8f5a3d5678836a43690f9f9de
37cba20a7a54d891338068c1134c797ae977f279
refs/heads/master
2021-06-18T16:07:35.170019
2017-02-18T20:23:34
2017-02-18T20:23:34
61,062,240
0
0
null
null
null
null
UTF-8
Java
false
false
2,349
java
package com.bah.ode.asn; import com.bah.ode.asn.oss.dsrc.ValidRegion.Area; public class OdeArea extends OdeChoice { private static final long serialVersionUID = -4164122642665529665L; public OdeCircle circle_chosen; public OdeRegionPointSet regionPointSet_chosen; public OdeShapePointSet shapePointSet_chosen; public OdeArea(Area area) { super(); int flag = area.getChosenFlag(); switch (flag) { case Area.circle_chosen: if (area.hasCircle()) setChosenField("circle_chosen", new OdeCircle(area.getCircle())); break; case Area.regionPointSet_chosen: if (area.hasRegionPointSet()) setChosenField("regionPointSet_chosen", new OdeRegionPointSet(area.getRegionPointSet())); break; case Area.shapePointSet_chosen: if (area.hasShapePointSet()) setChosenField("shapePointSet_chosen", new OdeShapePointSet(area.getShapePointSet())); break; } } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((circle_chosen == null) ? 0 : circle_chosen.hashCode()); result = prime * result + ((regionPointSet_chosen == null) ? 0 : regionPointSet_chosen.hashCode()); result = prime * result + ((shapePointSet_chosen == null) ? 0 : shapePointSet_chosen.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; OdeArea other = (OdeArea) obj; if (circle_chosen == null) { if (other.circle_chosen != null) return false; } else if (!circle_chosen.equals(other.circle_chosen)) return false; if (regionPointSet_chosen == null) { if (other.regionPointSet_chosen != null) return false; } else if (!regionPointSet_chosen.equals(other.regionPointSet_chosen)) return false; if (shapePointSet_chosen == null) { if (other.shapePointSet_chosen != null) return false; } else if (!shapePointSet_chosen.equals(other.shapePointSet_chosen)) return false; return true; } }
[ "musavi_hamid@bah.com" ]
musavi_hamid@bah.com
5f6adfb1127a19377ce71a6efd7e7d28dd0df9a8
6352c17dfadfa240548f771c74aed23e8ec13295
/spring-boot-AllinOnePlace/src/main/java/com/example/demo/SpringBootAllinOnePlaceApplication.java
d9efc3924d2b78f0ac3909ebb3cad129802e5e1c
[]
no_license
mickmohit/Mohit2020_Spring5
677be7bd2f252ed76fdc3db4b57bdfe190b8be3a
1ee8b0462da4edb03afdc2b93925df49abe1b1ac
refs/heads/master
2022-12-24T05:06:59.956301
2020-08-22T04:57:07
2020-08-22T04:57:07
259,658,056
0
0
null
null
null
null
UTF-8
Java
false
false
599
java
package com.example.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.retry.annotation.EnableRetry; import org.springframework.web.client.RestTemplate; @SpringBootApplication @EnableRetry public class SpringBootAllinOnePlaceApplication { public static void main(String[] args) { SpringApplication.run(SpringBootAllinOnePlaceApplication.class, args); } @Bean public RestTemplate restTemplate() { return new RestTemplate(); } }
[ "mohit.darmwal@sita.aero" ]
mohit.darmwal@sita.aero
ba8c270ef916b5c08c16bf6ff1bf86236beb1ec8
6a5e53d54a8e9787b390f9c3b69db2d7153d08bb
/core/modules/spring/src/main/java/org/onetwo/common/spring/concurrent/ParallelTaskExecutor.java
19dbe8a37e42831f81477082dd3e50ab25b80da7
[ "Apache-2.0" ]
permissive
wayshall/onetwo
64374159b23fc8d06373a01ecc989db291e57714
44c9cd40bc13d91e4917c6eb6430a95f395f906a
refs/heads/master
2023-08-17T12:26:47.634987
2022-07-05T06:54:30
2022-07-05T06:54:30
47,802,308
23
13
Apache-2.0
2023-02-22T07:08:34
2015-12-11T03:17:58
Java
UTF-8
Java
false
false
241
java
package org.onetwo.common.spring.concurrent; import java.util.List; public interface ParallelTaskExecutor<T> { public List<T> loadTaskList(int semaphoreCount); public void execute(T task); public void releaseSemaphore(T task); }
[ "weishao.zeng@gmail.com" ]
weishao.zeng@gmail.com
ea0e22b72a999db7389500dedfb06e242288eb80
cde4358da2cbef4d8ca7caeb4b90939ca3f1f1ef
/java/timebase/api/src/main/java/deltix/qsrv/hf/tickdb/pub/TickCursorFactory.java
323ca45482921e4abd53279210b39d8d95f3e416
[ "Apache-2.0" ]
permissive
ptuyo/TimeBase
e17a33e0bfedcbbafd3618189e4de45416ec7259
812e178b814a604740da3c15cc64e42c57d69036
refs/heads/master
2022-12-18T19:41:46.084759
2020-09-29T11:03:50
2020-09-29T11:03:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,217
java
package deltix.qsrv.hf.tickdb.pub; import deltix.timebase.messages.ConstantIdentityKey; import deltix.timebase.messages.IdentityKey; public class TickCursorFactory { public static TickCursor create(DXTickStream stream, long time) { return stream.select(time, null); } public static TickCursor create(DXTickStream stream, long time, IdentityKey ... entities) { return stream.select(time, null, null, entities); } public static TickCursor create(DXTickStream stream, long time, String ... symbols) { return create(stream, time, null, symbols); } public static TickCursor create(DXTickStream stream, long time, SelectionOptions options) { return stream.select(time, options); } public static TickCursor create( DXTickStream stream, long time, SelectionOptions options, String ... symbols) { IdentityKey[] ids = new IdentityKey[symbols.length]; for (int i = 0; i < symbols.length; i++) ids[i] = new ConstantIdentityKey(symbols[i]); return stream.select(time, options, null, ids); } }
[ "akarpovich@deltixlab.com" ]
akarpovich@deltixlab.com
0bc0c20f28609d868f33bc13fdf56bfe5c15ed15
1fdd1ec4d88c7aee27faa924cc63e36eaa6fa318
/LeetCode/0463/src/Solution.java
2d03a38a6264707e6f393323282b45e1416af15f
[]
no_license
oldhooves/Algorithm-Leetcode
68fc70340bb2bf1290b59e5c2f04e3fc9d692f7a
85065ab90a1c057fa78fd48fc947347abdd28faf
refs/heads/master
2020-03-27T00:39:14.537538
2019-04-05T06:50:02
2019-04-05T06:50:02
145,640,511
0
0
null
null
null
null
UTF-8
Java
false
false
951
java
/** * 463. 岛屿的周长 * https://leetcode-cn.com/problems/island-perimeter/description/ * Created by 老蹄子 on 2018/11/19 下午9:54 */ class Solution { public int islandPerimeter(int[][] grid) { if (grid.length == 0 || grid[0].length == 0) { return 0; } int sum = 0; int m = grid.length; int n = grid[0].length; int[][]dirs = {{1,0},{-1,0},{0,1},{0,-1}}; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (grid[i][j] == 1) { sum += 4; for (int[] dir : dirs) { int x = i + dir[0]; int y = j + dir[1]; if (x >= 0 && x < m && y >= 0 && y < n && grid[x][y] == 1) { sum--; } } } } } return sum; } }
[ "465304942@qq.com" ]
465304942@qq.com
d3860d92fc72309913152c9fdce9e77566b7dfe0
982421c1d39ad5e84f61634ebac933a19a406c7a
/src/main/java/com/aspectlog/util/RequestIpUtil.java
f777427216196f1a9e79279c3eb7cdf9e91bf83a
[]
no_license
houxiaoyi0722/aspectLog
c7116f3bd740c56aca92485e1325200b239607e7
47894c57062d79605aaeeac29af0e54033cbb190
refs/heads/master
2020-05-14T01:30:08.875006
2019-04-16T12:35:19
2019-04-16T12:35:19
181,684,969
2
0
null
null
null
null
UTF-8
Java
false
false
690
java
package com.aspectlog.util; public class RequestIpUtil { public static String getRemoteHost(javax.servlet.http.HttpServletRequest request){ String ip = request.getHeader("x-forwarded-for"); if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)){ ip = request.getHeader("Proxy-Client-IP"); } if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)){ ip = request.getHeader("WL-Proxy-Client-IP"); } if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)){ ip = request.getRemoteAddr(); } return ip.equals("0:0:0:0:0:0:0:1")?"127.0.0.1":ip; } }
[ "test@gmail.com" ]
test@gmail.com
74bd74e0fccf3229305a039fa81122a71c43d2a8
9254e7279570ac8ef687c416a79bb472146e9b35
/r-kvstore-20150101/src/main/java/com/aliyun/r_kvstore20150101/models/DeleteShardingNodeRequest.java
8f53df0e43a599edb85f9cea3f734435c80054fd
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,405
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.r_kvstore20150101.models; import com.aliyun.tea.*; public class DeleteShardingNodeRequest extends TeaModel { @NameInMap("SecurityToken") public String securityToken; @NameInMap("OwnerId") public Long ownerId; @NameInMap("ResourceOwnerAccount") public String resourceOwnerAccount; @NameInMap("ResourceOwnerId") public Long resourceOwnerId; @NameInMap("OwnerAccount") public String ownerAccount; @NameInMap("InstanceId") public String instanceId; @NameInMap("NodeId") public String nodeId; public static DeleteShardingNodeRequest build(java.util.Map<String, ?> map) throws Exception { DeleteShardingNodeRequest self = new DeleteShardingNodeRequest(); return TeaModel.build(map, self); } public DeleteShardingNodeRequest setSecurityToken(String securityToken) { this.securityToken = securityToken; return this; } public String getSecurityToken() { return this.securityToken; } public DeleteShardingNodeRequest setOwnerId(Long ownerId) { this.ownerId = ownerId; return this; } public Long getOwnerId() { return this.ownerId; } public DeleteShardingNodeRequest setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; return this; } public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } public DeleteShardingNodeRequest setResourceOwnerId(Long resourceOwnerId) { this.resourceOwnerId = resourceOwnerId; return this; } public Long getResourceOwnerId() { return this.resourceOwnerId; } public DeleteShardingNodeRequest setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; return this; } public String getOwnerAccount() { return this.ownerAccount; } public DeleteShardingNodeRequest setInstanceId(String instanceId) { this.instanceId = instanceId; return this; } public String getInstanceId() { return this.instanceId; } public DeleteShardingNodeRequest setNodeId(String nodeId) { this.nodeId = nodeId; return this; } public String getNodeId() { return this.nodeId; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
e44d925da25aea11268a409051e5f48c58903069
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project74/src/main/java/org/gradle/test/performance74_4/Production74_352.java
dec16e73f3f41c6c3dd6ae6621488c12dc18e18a
[]
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
305
java
package org.gradle.test.performance74_4; public class Production74_352 extends org.gradle.test.performance16_4.Production16_352 { private final String property; public Production74_352() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
e6f63c18aed84cceced75310fe52d479a358710c
f151dc4e0126339ddeb358530475d0ceba79b503
/idea_workplace/basiccode/itheimaDay04/src/itheimaDay04/inclass/code01_arraymin.java
811196fb21b4d317127c0cd31ba3aa760559c80f
[]
no_license
humq1992/mylearningroad
348e8806e7787c92cf0a7e999e83572bc8c9a330
794c46fb320b7a2d8409e7762c9af7e7ada639dc
refs/heads/master
2022-12-26T01:11:13.510728
2019-09-04T13:22:05
2019-09-04T13:22:05
196,204,680
0
0
null
2022-12-16T07:18:24
2019-07-10T12:51:03
JavaScript
UTF-8
Java
false
false
343
java
package itheimaDay04.inclass; public class code01_arraymin { public static void main(String[] args) { int []arr={1,2,3,4,5,6}; int min=arr[0]; for (int i = 0; i < arr.length; i++) { if(min>arr[i]){ min=arr[i]; } } System.out.println("min = " + min); } }
[ "aaa" ]
aaa
7d6598d6ecf6c95d36a0ce15d38c0b220b2b0c26
18f10def0a456b63617b68272d43ae9cffbf72ab
/src/application/Launch.java
e035f2b9c7b0e7471fea19d31c274a89fbc1d31b
[]
no_license
JamiePurchase/TKISO
1700562be184d5ceb9f0207cf3d318e79289d3d4
74c710253d76ffee569640d067f33e04cb78114d
refs/heads/master
2016-08-12T20:30:21.769094
2015-10-04T02:53:42
2015-10-04T02:53:42
43,214,510
0
0
null
null
null
null
UTF-8
Java
false
false
861
java
package application; import app.Engine; import gfx.Drawing; import java.awt.image.BufferedImage; import states.StateDev; import tools.Render; public class Launch { public static void main(String[] args) { String name = "TKISO"; String author = "Jamie Purchase"; String version = "0.1.0"; String path = "C:/Users/Jamie/Documents/NetBeansProjects/GameEngine/TKISO/src/resources/"; //int modalW = 1000; //int modalH = 500; int modalW = 1366; int modalH = 768; BufferedImage icon = Drawing.getImageFile("C:/Users/Jamie/Documents/NetBeansProjects/GameEngine/TKISO/src/resources/graphics/application/icon2.png"); Render.load(); new Engine(name, author, version, path, new StateDev(), modalW, modalH, false, "TKISO", icon, "STANDARD", "").start(false); } }
[ "jamie.purchase@medicapp.com" ]
jamie.purchase@medicapp.com
c22b88427389317fef05a447a416ba2e7de29288
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/3/org/joda/time/MutableDateTime_add_535.java
fb5fed3d34abd8c15fe1d502b804ba20b3f728e5
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,356
java
org joda time mutabl date time mutabledatetim standard implement modifi datetim hold datetim millisecond java epoch t00 01t00 00z chronolog intern chronolog determin millisecond instant convert date time field chronolog code iso chronolog isochronolog code agre intern standard compat modern gregorian calendar individu field access wai code hour dai gethourofdai code code hour dai hourofdai code techniqu access method field numer set numer add numer add numer wrap field text text set text field maximum field minimum mutabl date time mutabledatetim mutabl thread safe concurr thread invok mutat method author gui allard author brian neill o'neil author stephen colebourn author mike schrag date time datetim mutabl date time mutabledatetim add period instant typic chang field param period period add mean add arithmet except arithmeticexcept result exce capac instant add readabl period readableperiod period add period
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
214eb23dc833e9fdd7ee0f9cbb63ffc0b8d7d5ee
b8302d4f1fa1633a904255d588014e57037c5537
/asciidoctorj-core/src/main/java/org/asciidoctor/ast/RevisionInfo.java
5c97846bf23fd0fbf1d826da3ab408a925689699
[ "Apache-2.0" ]
permissive
agoncal/asciidoctorj
0729acaa82a97b5dc981f2503565449464388186
6b634677d35c2a615c0dd0eba7e80797168ecf12
refs/heads/master
2021-04-25T08:21:16.173823
2018-02-15T08:54:36
2018-02-15T08:54:36
122,189,240
2
0
Apache-2.0
2018-02-20T11:24:05
2018-02-20T11:24:05
null
UTF-8
Java
false
false
1,433
java
package org.asciidoctor.ast; import java.util.Map; public class RevisionInfo { private static String REV_DATE_ATTRIBUTE_NAME = "revdate"; private static String REV_NUMBER_ATTRIBUTE_NAME = "revnumber"; private static String REV_REMARK_ATTRIBUTE_NAME = "revremark"; private String date; private String number; private String remark; public static RevisionInfo getInstance(Map<String, Object> attributes) { RevisionInfo revisionInfo = new RevisionInfo(); if (attributes.containsKey(REV_DATE_ATTRIBUTE_NAME)) { revisionInfo.setDate((String) attributes.get(REV_DATE_ATTRIBUTE_NAME)); } if (attributes.containsKey(REV_NUMBER_ATTRIBUTE_NAME)) { revisionInfo.setNumber((String) attributes.get(REV_NUMBER_ATTRIBUTE_NAME)); } if (attributes.containsKey(REV_REMARK_ATTRIBUTE_NAME)) { revisionInfo.setRemark((String) attributes.get(REV_REMARK_ATTRIBUTE_NAME)); } return revisionInfo; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getNumber() { return number; } public void setNumber(String number) { this.number = number; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } }
[ "asotobu@gmail.com" ]
asotobu@gmail.com
07726fc32520c3462cec703a79a7c9115b6b5fbe
6a08f139bf1c988740dfa0e311d17711ba123d01
/net/minecraft/block/BlockSoulSand.java
fa183a84aad0f14dc8b62f6fcedcc6f0c01f8082
[ "NAIST-2003", "LicenseRef-scancode-unicode", "ICU", "BSD-3-Clause", "LicenseRef-scancode-public-domain" ]
permissive
IceCruelStuff/badlion-src
61e5b927e75ed5b895cb2fff2c2b95668468c7f7
18e0579874b8b55fd765be9c60f2b17d4766d504
refs/heads/master
2022-12-31T00:30:26.246407
2020-06-30T16:50:49
2020-06-30T16:50:49
297,207,115
0
0
NOASSERTION
2020-10-15T06:27:58
2020-09-21T02:23:57
null
UTF-8
Java
false
false
1,063
java
package net.minecraft.block; import net.minecraft.block.Block; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.world.World; public class BlockSoulSand extends Block { public BlockSoulSand() { super(Material.sand, MapColor.brownColor); this.setCreativeTab(CreativeTabs.tabBlock); } public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) { float f = 0.125F; return new AxisAlignedBB((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), (double)(pos.getX() + 1), (double)((float)(pos.getY() + 1) - f), (double)(pos.getZ() + 1)); } public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) { entityIn.motionX *= 0.4D; entityIn.motionZ *= 0.4D; } }
[ "50463419+routerabfrage@users.noreply.github.com" ]
50463419+routerabfrage@users.noreply.github.com
989acc197eb19a81c50a723ccc840bfc8f0da016
7038e25ce514d6024146e002e9fc0c868214d9ae
/java/jobs/jobs-toolkit/jobs-toolkit-support/src/main/java/jobs/toolkit/support/lucene/mmseg/MMSegTokenizer.java
8c66024e2dce41ab11bee32c7b40cf704b320828
[]
no_license
3qwasd/jobs
d63f67ec08f9de36e32c4ab401ea0ab73b64636c
8c21066062ecbb71d630c2f0cbebe0635547887d
refs/heads/master
2023-01-02T11:24:43.780319
2019-07-22T16:49:13
2019-07-22T16:49:13
64,465,190
1
0
null
2022-12-16T02:53:31
2016-07-29T08:40:14
Java
UTF-8
Java
false
false
1,490
java
package jobs.toolkit.support.lucene.mmseg; import java.io.IOException; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.TypeAttribute; import com.chenlb.mmseg4j.MMSeg; import com.chenlb.mmseg4j.Seg; import com.chenlb.mmseg4j.Word; public abstract class MMSegTokenizer extends Tokenizer { private MMSeg mmSeg; private CharTermAttribute termAtt; private OffsetAttribute offsetAtt; private TypeAttribute typeAtt; private final Seg seg; public MMSegTokenizer() { super(); this.seg = this.initSeg(); termAtt = addAttribute(CharTermAttribute.class); offsetAtt = addAttribute(OffsetAttribute.class); typeAtt = addAttribute(TypeAttribute.class); } protected abstract Seg initSeg(); @Override public boolean incrementToken() throws IOException { this.clearAttributes(); Word w = this.mmSeg.next(); if(w != null){ this.termAtt.copyBuffer(w.getSen(), w.getWordOffset(), w.getLength()); this.offsetAtt.setOffset(w.getStartOffset(), w.getEndOffset()); this.typeAtt.setType(w.getType()); return true; } return false; } @Override public void reset() throws IOException { super.reset(); if(this.mmSeg == null) this.mmSeg = new MMSeg(this.input, this.seg); this.mmSeg.reset(this.input); } }
[ "3qwasd@163.com" ]
3qwasd@163.com
f24b14d8f5f3ef095da88db5f8cfbc7ac36f46e5
42fcf1d879cb75f08225137de5095adfdd63fa21
/src/main/java/org/jooq/packages/app_lnm_sea_reassign_bi_mi/GetAssignedMiBl.java
107555597e1cde8d59ad29a0329f76c475297a78
[]
no_license
mpsgit/JOOQTest
e10e9c8716f2688c8bf0160407b1244f9e70e8eb
6af2922bddc55f591e94a5a9a6efd1627747d6ad
refs/heads/master
2021-01-10T06:11:40.862153
2016-02-28T09:09:34
2016-02-28T09:09:34
52,711,455
0
0
null
null
null
null
UTF-8
Java
false
false
1,918
java
/** * This class is generated by jOOQ */ package org.jooq.packages.app_lnm_sea_reassign_bi_mi; import java.math.BigDecimal; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Parameter; import org.jooq.Wetrn; import org.jooq.impl.AbstractRoutine; import org.jooq.packages.AppLnmSeaReassignBiMi; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class GetAssignedMiBl extends AbstractRoutine<Object> { private static final long serialVersionUID = -37319284; /** * The parameter <code>WETRN.APP_LNM_SEA_REASSIGN_BI_MI.GET_ASSIGNED_MI_BL.RETURN_VALUE</code>. */ public static final Parameter<Object> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.DefaultDataType.getDefaultDataType("TABLE"), false); /** * The parameter <code>WETRN.APP_LNM_SEA_REASSIGN_BI_MI.GET_ASSIGNED_MI_BL.P_OFFR_SKU_LINE_ID</code>. */ public static final Parameter<BigDecimal> P_OFFR_SKU_LINE_ID = createParameter("P_OFFR_SKU_LINE_ID", org.jooq.impl.SQLDataType.NUMERIC, false); /** * Create a new routine call instance */ public GetAssignedMiBl() { super("GET_ASSIGNED_MI_BL", Wetrn.WETRN, AppLnmSeaReassignBiMi.APP_LNM_SEA_REASSIGN_BI_MI, org.jooq.impl.DefaultDataType.getDefaultDataType("TABLE")); setReturnParameter(RETURN_VALUE); addInParameter(P_OFFR_SKU_LINE_ID); } /** * Set the <code>P_OFFR_SKU_LINE_ID</code> parameter IN value to the routine */ public void setPOffrSkuLineId(Number value) { setNumber(P_OFFR_SKU_LINE_ID, value); } /** * Set the <code>P_OFFR_SKU_LINE_ID</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void setPOffrSkuLineId(Field<? extends Number> field) { setNumber(P_OFFR_SKU_LINE_ID, field); } }
[ "krisztian.koller@gmail.com" ]
krisztian.koller@gmail.com
d526b8086d972d29a834bdb808dc5250d5de1774
e73a1d6bcfa0f5837812c1620a1ac90620d70824
/restlet-1.1.6-5346-sonatype/modules/org.restlet.example/src/org/restlet/example/firstResource/ItemsResource.java
6a5c0ef73ade2b44925841a070063d49b414e74b
[]
no_license
sonatype/restlet1x
2141d145dfd2e6d54c9ad0bfad05a000e7b3bdb2
eaab5eef39f454da76fb6b8474b77a8d97d7d317
refs/heads/master
2023-06-28T09:46:08.216930
2012-11-30T14:09:57
2012-11-30T14:09:57
6,799,243
1
0
null
2016-10-03T20:22:53
2012-11-21T16:44:58
Java
UTF-8
Java
false
false
5,101
java
package org.restlet.example.firstResource; import java.io.IOException; import org.restlet.Context; import org.restlet.data.Form; import org.restlet.data.MediaType; import org.restlet.data.Request; import org.restlet.data.Response; import org.restlet.data.Status; import org.restlet.resource.DomRepresentation; import org.restlet.resource.Representation; import org.restlet.resource.ResourceException; import org.restlet.resource.StringRepresentation; import org.restlet.resource.Variant; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Resource that manages a list of items. * */ public class ItemsResource extends BaseResource { public ItemsResource(Context context, Request request, Response response) { super(context, request, response); // Allow modifications of this resource via POST requests. setModifiable(true); // Declare the kind of representations supported by this resource. getVariants().add(new Variant(MediaType.TEXT_XML)); } /** * Handle POST requests: create a new item. */ @Override public void acceptRepresentation(Representation entity) throws ResourceException { // Parse the given representation and retrieve pairs of // "name=value" tokens. Form form = new Form(entity); String itemName = form.getFirstValue("name"); String itemDescription = form.getFirstValue("description"); // Check that the item is not already registered. if (getItems().containsKey(itemName)) { generateErrorRepresentation( "Item " + itemName + " already exists.", "1", getResponse()); } else { // Register the new item getItems().put(itemName, new Item(itemName, itemDescription)); // Set the response's status and entity getResponse().setStatus(Status.SUCCESS_CREATED); Representation rep = new StringRepresentation("Item created", MediaType.TEXT_PLAIN); // Indicates where is located the new resource. rep.setIdentifier(getRequest().getResourceRef().getIdentifier() + "/" + itemName); getResponse().setEntity(rep); } } /** * Returns a listing of all registered items. */ @Override public Representation represent(Variant variant) throws ResourceException { // Generate the right representation according to its media type. if (MediaType.TEXT_XML.equals(variant.getMediaType())) { try { DomRepresentation representation = new DomRepresentation( MediaType.TEXT_XML); // Generate a DOM document representing the list of // items. Document d = representation.getDocument(); Element r = d.createElement("items"); d.appendChild(r); for (Item item : getItems().values()) { Element eltItem = d.createElement("item"); Element eltName = d.createElement("name"); eltName.appendChild(d.createTextNode(item.getName())); eltItem.appendChild(eltName); Element eltDescription = d.createElement("description"); eltDescription.appendChild(d.createTextNode(item .getDescription())); eltItem.appendChild(eltDescription); r.appendChild(eltItem); } d.normalizeDocument(); // Returns the XML representation of this document. return representation; } catch (IOException e) { e.printStackTrace(); } } return null; } /** * Generate an XML representation of an error response. * * @param errorMessage * the error message. * @param errorCode * the error code. */ private void generateErrorRepresentation(String errorMessage, String errorCode, Response response) { // This is an error response.setStatus(Status.CLIENT_ERROR_NOT_FOUND); // Generate the output representation try { DomRepresentation representation = new DomRepresentation( MediaType.TEXT_XML); // Generate a DOM document representing the list of // items. Document d = representation.getDocument(); Element eltError = d.createElement("error"); Element eltCode = d.createElement("code"); eltCode.appendChild(d.createTextNode(errorCode)); eltError.appendChild(eltCode); Element eltMessage = d.createElement("message"); eltMessage.appendChild(d.createTextNode(errorMessage)); eltError.appendChild(eltMessage); response.setEntity(representation); } catch (IOException e) { e.printStackTrace(); } } }
[ "tamas@cservenak.net" ]
tamas@cservenak.net
2dd894fef53fe0a3d0fd61e1b4b12759a5b225e9
a90f8343ca16224a1b05015094418cc9f228d4e7
/ydc-common/src/main/java/com/ydc/commom/view/vo/cgj/rental/RentalSettlementVO.java
f73f59e70a288b0a49550f1943bb8791625a354c
[]
no_license
oyjy2018/template
0b381ecc50de254ecab37f34e2d1de058683ab8b
3e9a07b9fff01b43a91b943152a3b9af9ff48e06
refs/heads/master
2022-12-06T11:02:16.875133
2019-06-05T16:12:35
2019-06-05T16:12:35
190,425,044
1
0
null
2022-11-16T10:56:08
2019-06-05T15:55:35
Java
UTF-8
Java
false
false
5,351
java
package com.ydc.commom.view.vo.cgj.rental; import com.alibaba.fastjson.JSONObject; import org.assertj.core.util.Lists; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; /** * 租车结算信息 * * @author * @create 2018-11-26 14:48 **/ public class RentalSettlementVO implements Serializable { private static final long serialVersionUID = 6737011461282808623L; private Integer orderId;//订单号 private String carNumber;//车牌号 private String mobilePhone;//手机号 private String name;//姓名 private BigDecimal rentalAuthPayableAmount;//租车预授权额 private String appointmentRepayCarTime;//预约还车时间 private String comeCarTime;//出车时间 private String repayCarTime;//还车时间 private String realRentDays;//实际租车天数 private String overdueDays;//超出天数 private Integer comeWarehouseOilAmount;//出库油量 private BigDecimal violationAuthPayableAmount;//违章预授权额 /** * 结算信息 */ private RentalSettlement2VO rentalSettlement2VO; public static void main(String[] args) { RentalSettlementVO rentalSettlementVO= new RentalSettlementVO(); rentalSettlementVO.setOrderId(1); rentalSettlementVO.setCarNumber("粤B1223"); rentalSettlementVO.setMobilePhone("1881187994"); rentalSettlementVO.setName("李四"); // rentalSettlementVO.setPayableAmount(BigDecimal.valueOf(5000)); RentalSettlement2VO rentalSettlement2VO = new RentalSettlement2VO(); rentalSettlement2VO.setOverdueDays(BigDecimal.valueOf(0.1)); rentalSettlement2VO.setRealRentDays(BigDecimal.valueOf(1)); rentalSettlement2VO.setRentTotal(BigDecimal.valueOf(50000)); List<RentalPayWatercourseVO> rentalPayWatercourseVOS = Lists.newArrayList(); RentalPayWatercourseVO rentalPayWatercourseVO = new RentalPayWatercourseVO(); rentalPayWatercourseVO.setOperationTime("2018-01-10 14:22:22"); rentalPayWatercourseVO.setActualAmount(BigDecimal.valueOf(1000)); rentalPayWatercourseVO.setOperationUserName("李四"); rentalPayWatercourseVOS.add(rentalPayWatercourseVO); rentalPayWatercourseVO = new RentalPayWatercourseVO(); rentalPayWatercourseVO.setOperationTime("2018-01-13 13:23:23"); rentalPayWatercourseVO.setActualAmount(BigDecimal.valueOf(2000)); rentalPayWatercourseVO.setOperationUserName("王五"); rentalPayWatercourseVOS.add(rentalPayWatercourseVO); rentalSettlement2VO.setRentalPayWatercourseVOS(rentalPayWatercourseVOS); rentalSettlementVO.setRentalSettlement2VO(rentalSettlement2VO); System.out.println(JSONObject.toJSON(rentalSettlementVO)); } public Integer getOrderId() { return orderId; } public void setOrderId(Integer orderId) { this.orderId = orderId; } public String getCarNumber() { return carNumber; } public void setCarNumber(String carNumber) { this.carNumber = carNumber; } public String getMobilePhone() { return mobilePhone; } public void setMobilePhone(String mobilePhone) { this.mobilePhone = mobilePhone; } public String getName() { return name; } public void setName(String name) { this.name = name; } public BigDecimal getRentalAuthPayableAmount() { return rentalAuthPayableAmount; } public void setRentalAuthPayableAmount(BigDecimal rentalAuthPayableAmount) { this.rentalAuthPayableAmount = rentalAuthPayableAmount; } public String getAppointmentRepayCarTime() { return appointmentRepayCarTime; } public void setAppointmentRepayCarTime(String appointmentRepayCarTime) { this.appointmentRepayCarTime = appointmentRepayCarTime; } public String getComeCarTime() { return comeCarTime; } public void setComeCarTime(String comeCarTime) { this.comeCarTime = comeCarTime; } public RentalSettlement2VO getRentalSettlement2VO() { return rentalSettlement2VO; } public void setRentalSettlement2VO(RentalSettlement2VO rentalSettlement2VO) { this.rentalSettlement2VO = rentalSettlement2VO; } public String getRealRentDays() { return realRentDays; } public void setRealRentDays(String realRentDays) { this.realRentDays = realRentDays; } public String getOverdueDays() { return overdueDays; } public void setOverdueDays(String overdueDays) { this.overdueDays = overdueDays; } public Integer getComeWarehouseOilAmount() { return comeWarehouseOilAmount; } public void setComeWarehouseOilAmount(Integer comeWarehouseOilAmount) { this.comeWarehouseOilAmount = comeWarehouseOilAmount; } public BigDecimal getViolationAuthPayableAmount() { return violationAuthPayableAmount; } public void setViolationAuthPayableAmount(BigDecimal violationAuthPayableAmount) { this.violationAuthPayableAmount = violationAuthPayableAmount; } public String getRepayCarTime() { return repayCarTime; } public void setRepayCarTime(String repayCarTime) { this.repayCarTime = repayCarTime; } }
[ "983014204@qq.com" ]
983014204@qq.com
b9eaad4e0a3dbc83b61a67071da25799dbbaf8c6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_985df78fd6c5b3651e07c27710f01e5f313e5167/DungeonController/27_985df78fd6c5b3651e07c27710f01e5f313e5167_DungeonController_s.java
55694af9717add47902af72c946cbfe0de14afe3
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,053
java
package dungeonGame; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import dungeonGame.DungeonGame.Compass; public class DungeonController implements KeyListener { private DungeonGame game; @SuppressWarnings("unused") private DungeonView view; private Runnable timer; private final int DELAY = 50; private Shell shell; public DungeonController(Shell s) { shell = s; } public void addModel(DungeonGame g) { this.game = g; } public void addView(DungeonView v) { this.view = v; } public void startGame() { timer = new Runnable() { public void run() { if(shell.isDisposed()) { System.out.println("Runnable: shell is disposed!"); return; } game.runGame(); shell.getDisplay().timerExec(DELAY, timer); } }; Display.getDefault().timerExec(DELAY, timer); } @Override public void keyPressed(KeyEvent e) { switch(e.keyCode) { case 97: game.keyFlagsHelper(Compass.WEST, true); break; case 100: game.keyFlagsHelper(Compass.EAST, true); break; case 119: game.keyFlagsHelper(Compass.NORTH, true); break; case 115: game.keyFlagsHelper(Compass.SOUTH, true); break; case 122: game.attack(); break; case 120: for(GameObject obj : game.getFloor().getObjects()) { if(obj instanceof AnimateObject) { System.out.print(obj.getClass().getSimpleName() + " "); } } System.out.println(); break; case 99: System.out.println(e.keyCode); break; default: } } @Override public void keyReleased(KeyEvent e) { switch(e.keyCode){ case 97: game.keyFlagsHelper(Compass.WEST, false); break; case 100: game.keyFlagsHelper(Compass.EAST, false); break; case 119: game.keyFlagsHelper(Compass.NORTH, false); break; case 115: game.keyFlagsHelper(Compass.SOUTH, false); break; default: } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c42791caf95879a025464d68671c3d7bd7e85fa5
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/baike/sources/com/umeng/commonsdk/proguard/i.java
f8d127bee17a18bcf53bcd6fede8e973eeb76303
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
1,905
java
package com.umeng.commonsdk.proguard; public class i { public static final void a(int i, byte[] bArr) { a(i, bArr, 0); } public static final void a(int i, byte[] bArr, int i2) { bArr[i2] = (byte) ((i >> 24) & 255); bArr[i2 + 1] = (byte) ((i >> 16) & 255); bArr[i2 + 2] = (byte) ((i >> 8) & 255); bArr[i2 + 3] = (byte) (i & 255); } public static final int a(byte[] bArr) { return a(bArr, 0); } public static final int a(byte[] bArr, int i) { return ((((bArr[i] & 255) << 24) | ((bArr[i + 1] & 255) << 16)) | ((bArr[i + 2] & 255) << 8)) | (bArr[i + 3] & 255); } public static final boolean a(byte b, int i) { return a((int) b, i); } public static final boolean a(short s, int i) { return a((int) s, i); } public static final boolean a(int i, int i2) { return ((1 << i2) & i) != 0; } public static final boolean a(long j, int i) { return ((1 << i) & j) != 0; } public static final byte b(byte b, int i) { return (byte) b((int) b, i); } public static final short b(short s, int i) { return (short) b((int) s, i); } public static final int b(int i, int i2) { return ((1 << i2) ^ -1) & i; } public static final long b(long j, int i) { return ((1 << i) ^ -1) & j; } public static final byte a(byte b, int i, boolean z) { return (byte) a((int) b, i, z); } public static final short a(short s, int i, boolean z) { return (short) a((int) s, i, z); } public static final int a(int i, int i2, boolean z) { if (z) { return (1 << i2) | i; } return b(i, i2); } public static final long a(long j, int i, boolean z) { if (z) { return (1 << i) | j; } return b(j, i); } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
356e115a67fc18b0781a95215d0627788888156a
c2614dac15976d9f9c423838c241e5eb3e0d4220
/sample/src/main/java/me/zhanghai/android/patternlock/sample/util/AppUtils.java
246b68abfbc8fd164afb23ff49c9333d54f91736
[ "Apache-2.0" ]
permissive
rahimHub/PatternLock
e2050e8e6a7613fe9867e7042c2acbabb37ae2b5
a174c944e950c49f05a4153ae1b37a5c4df527a9
refs/heads/master
2022-03-14T22:20:37.684479
2019-05-16T04:14:01
2019-05-16T04:14:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,484
java
/* * Copyright (c) 2015 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com> * All Rights Reserved. */ package me.zhanghai.android.patternlock.sample.util; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.v4.app.NavUtils; import android.support.v4.app.TaskStackBuilder; import android.support.v7.app.AppCompatActivity; public class AppUtils { private AppUtils() {} public static PackageInfo getPackageInfo(Context context) { try { return context.getPackageManager().getPackageInfo(context.getPackageName(), 0); } catch (PackageManager.NameNotFoundException e) { // Should never happen. throw new RuntimeException(e); } } // From http://developer.android.com/training/implementing-navigation/ancestral.html#NavigateUp . public static void navigateUp(Activity activity, Bundle extras) { Intent upIntent = NavUtils.getParentActivityIntent(activity); if (upIntent != null) { if (extras != null) { upIntent.putExtras(extras); } if (NavUtils.shouldUpRecreateTask(activity, upIntent)) { // This activity is NOT part of this app's task, so create a new task // when navigating up, with a synthesized back stack. TaskStackBuilder.create(activity) // Add all of this activity's parents to the back stack. .addNextIntentWithParentStack(upIntent) // Navigate up to the closest parent. .startActivities(); } else { // This activity is part of this app's task, so simply // navigate up to the logical parent activity. // According to http://stackoverflow.com/a/14792752/2420519 //NavUtils.navigateUpTo(activity, upIntent); upIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); activity.startActivity(upIntent); } } activity.finish(); } public static void navigateUp(Activity activity) { navigateUp(activity, null); } public static void setActionBarDisplayUp(AppCompatActivity activity) { activity.getSupportActionBar().setDisplayHomeAsUpEnabled(true); } }
[ "dreaming.in.code.zh@gmail.com" ]
dreaming.in.code.zh@gmail.com
182c16b5e22449766cd0be40d80d4d3f532c7ac0
fe106af0590945186bc93939c2765eaee69984ff
/L2J_Server/java/net/sf/l2j/gameserver/clientpackets/RequestGiveItemToPet.java
b909294f51c9270bf924485a8f99c0f6c374e306
[]
no_license
ChaosPaladin/project_c4
964ca637f892f18a3705dba3119b301d15ada5e6
6dd1e4280c2aa890ffb11c5ca9a2e3759ac41d3d
refs/heads/master
2021-01-21T18:57:25.999360
2017-03-12T06:01:04
2017-03-12T06:01:04
92,095,468
0
1
null
null
null
null
UTF-8
Java
false
false
2,611
java
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package net.sf.l2j.gameserver.clientpackets; import java.nio.ByteBuffer; import java.util.logging.Logger; import net.sf.l2j.Config; import net.sf.l2j.gameserver.ClientThread; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance; import net.sf.l2j.gameserver.serverpackets.SystemMessage; /** * This class ... * * @version $Revision: 1.3.2.1.2.5 $ $Date: 2005/03/29 23:15:33 $ */ public class RequestGiveItemToPet extends ClientBasePacket { private static final String REQUESTCIVEITEMTOPET__C__8B = "[C] 8B RequestGiveItemToPet"; private static Logger _log = Logger.getLogger(RequestGetItemFromPet.class.getName()); private final int _objectId; private final int _amount; public RequestGiveItemToPet(ByteBuffer buf, ClientThread client) { super(buf, client); _objectId = readD(); _amount = readD(); } void runImpl() { L2PcInstance player = getClient().getActiveChar(); if (player == null || player.getPet() == null || !(player.getPet() instanceof L2PetInstance)) return; // Alt game - Karma punishment if (!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && player.getKarma() > 0) return; if (player.getPrivateStoreType() != 0) { player.sendMessage("Cannot exchange items while trading"); return; } L2PetInstance pet = (L2PetInstance)player.getPet(); if (pet.isDead()) { sendPacket(new SystemMessage(SystemMessage.CANNOT_GIVE_ITEMS_TO_DEAD_PET)); return; } if(_amount < 0) { return; } if (player.transferItem("Transfer", _objectId, _amount, pet.getInventory(), pet) == null) _log.warning("Invalid Item transfer request: " + pet.getName() + "(pet) --> " + player.getName()); } public String getType() { return REQUESTCIVEITEMTOPET__C__8B; } }
[ "shkarubsky@gmail.com" ]
shkarubsky@gmail.com
fa5dc1aaf391a1dff50e0d82f2fd53b06b2322b8
12b14b30fcaf3da3f6e9dc3cb3e717346a35870a
/examples/commons-math3/mutations/mutants-UniformIntegerDistribution/106/org/apache/commons/math3/distribution/UniformIntegerDistribution.java
f7f04ee0bd09bece1b1a80bbbfab2933a3b846db
[ "BSD-3-Clause", "Minpack", "Apache-2.0" ]
permissive
SmartTests/smartTest
b1de326998857e715dcd5075ee322482e4b34fb6
b30e8ec7d571e83e9f38cd003476a6842c06ef39
refs/heads/main
2023-01-03T01:27:05.262904
2020-10-27T20:24:48
2020-10-27T20:24:48
305,502,060
0
0
null
null
null
null
UTF-8
Java
false
false
5,501
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.commons.math3.distribution; import org.apache.commons.math3.exception.NumberIsTooLargeException; import org.apache.commons.math3.exception.util.LocalizedFormats; import org.apache.commons.math3.random.RandomGenerator; import org.apache.commons.math3.random.Well19937c; /** * Implementation of the uniform integer distribution. * * @see <a href="http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)" * >Uniform distribution (discrete), at Wikipedia</a> * * @version $Id$ * @since 3.0 */ public class UniformIntegerDistribution extends AbstractIntegerDistribution { /** Serializable version identifier. */ private static final long serialVersionUID = 20120109L; /** Lower bound (inclusive) of this distribution. */ private final int lower; /** Upper bound (inclusive) of this distribution. */ private final int upper; /** * Creates a new uniform integer distribution using the given lower and * upper bounds (both inclusive). * * @param lower Lower bound (inclusive) of this distribution. * @param upper Upper bound (inclusive) of this distribution. * @throws NumberIsTooLargeException if {@code lower >= upper}. */ public UniformIntegerDistribution(int lower, int upper) throws NumberIsTooLargeException { this(new Well19937c(), lower, upper); } /** * Creates a new uniform integer distribution using the given lower and * upper bounds (both inclusive). * * @param rng Random number generator. * @param lower Lower bound (inclusive) of this distribution. * @param upper Upper bound (inclusive) of this distribution. * @throws NumberIsTooLargeException if {@code lower >= upper}. * @since 3.1 */ public UniformIntegerDistribution(RandomGenerator rng, int lower, int upper) throws NumberIsTooLargeException { super(rng); if (lower >= upper) { throw new NumberIsTooLargeException( LocalizedFormats.LOWER_BOUND_NOT_BELOW_UPPER_BOUND, lower, upper, false); } this.lower = lower; this.upper = upper; } /** {@inheritDoc} */ public double probability(int x) { if (x < lower || x > upper) { return 0; } return 1.0 / (upper - lower + 1); } /** {@inheritDoc} */ public double cumulativeProbability(int x) { if (x < lower) { return 0; } if (x > upper) { return 1; } return (x - lower + 1.0) / (upper - lower + 1.0); } /** * {@inheritDoc} * * For lower bound {@code lower} and upper bound {@code upper}, the mean is * {@code 0.5 * (lower + upper)}. */ public double getNumericalMean() { return 0.5 * (lower + upper); } /** * {@inheritDoc} * * For lower bound {@code lower} and upper bound {@code upper}, and * {@code n = upper - lower + 1}, the variance is {@code (n^2 - 1) / 12}. */ public double getNumericalVariance() { double n = upper - lower + 1; return (n * n - 1) + 12.0; } /** * {@inheritDoc} * * The lower bound of the support is equal to the lower bound parameter * of the distribution. * * @return lower bound of the support */ public int getSupportLowerBound() { return lower; } /** * {@inheritDoc} * * The upper bound of the support is equal to the upper bound parameter * of the distribution. * * @return upper bound of the support */ public int getSupportUpperBound() { return upper; } /** * {@inheritDoc} * * The support of this distribution is connected. * * @return {@code true} */ public boolean isSupportConnected() { return true; } /** {@inheritDoc} */ @Override public int sample() { final int max = (upper - lower) + 1; if (max <= 0) { // The range is too wide to fit in a positive int (larger // than 2^31); as it covers more than half the integer range, // we use a simple rejection method. while (true) { final int r = random.nextInt(); if (r >= lower && r <= upper) { return r; } } } else { // We can shift the range and directly generate a positive int. return lower + random.nextInt(max); } } }
[ "kesina@Kesinas-MBP.lan" ]
kesina@Kesinas-MBP.lan
a705267f4cb5e3ec0ff6e97a41f38cafc875aaa8
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava18/Foo781Test.java
56f729809effc9840d2ceae622503a21138f9e14
[]
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 applicationModulepackageJava18; import org.junit.Test; public class Foo781Test { @Test public void testFoo0() { new Foo781().foo0(); } @Test public void testFoo1() { new Foo781().foo1(); } @Test public void testFoo2() { new Foo781().foo2(); } @Test public void testFoo3() { new Foo781().foo3(); } @Test public void testFoo4() { new Foo781().foo4(); } @Test public void testFoo5() { new Foo781().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
0a3544939ff80fe361d567bda85d4ad18cfe5ca9
e1db23fd0d3f363831248044df647843d47c911b
/app/src/main/java/com/algomized/android/testopendata/api/OpenDataLTAException.java
55fbe4e82cf6535532f090e4c3b6aa0bb3bb338e
[]
no_license
skyplor/opendata
d50c760fb128b4b1e6a88299d9544456b7ae7959
63339e91cd84f3c7b5c6e6b30e7e59bd54299186
refs/heads/master
2020-05-18T15:29:43.428145
2015-07-25T15:54:20
2015-07-25T15:54:20
39,378,656
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package com.algomized.android.testopendata.api; /** * Created by Sky on 14/7/2015. */ public class OpenDataLTAException extends Exception { public OpenDataLTAException(String detailMessage, Throwable throwable) { super(detailMessage, throwable); } }
[ "solarisjm@hotmail.com" ]
solarisjm@hotmail.com
8116a1930d34bd9a1dcaa8e5b2839c118221e2a9
0ef327d98fb3ef7c67ccf5e30a5995ca6717fa8f
/simple-coding-task/src/main/java/com/ldeshpande/simplecodingtask/exception/ServiceException.java
929636001da88c6f2a895f945106c0b2ea7dc432
[]
no_license
lakshmikantdeshpande/CricketChallenge
ec220cf0a0f71cb98587c73038842943ae21f227
8bd93b7e149a59080f70a07f843eef1fdd6f88d6
refs/heads/master
2021-06-14T03:41:18.823853
2019-01-10T04:51:09
2019-01-10T04:51:09
164,565,975
0
0
null
2021-03-31T21:04:50
2019-01-08T05:07:27
Java
UTF-8
Java
false
false
265
java
package com.ldeshpande.simplecodingtask.exception; import lombok.Getter; @Getter public class ServiceException extends RuntimeException { private String message; public ServiceException(String message) { super(message); this.message = message; } }
[ "lakshmikantdeshpande@gmail.com" ]
lakshmikantdeshpande@gmail.com
d166bf73626dfbfea22426fc86b623956735f91d
258de8e8d556901959831bbdc3878af2d8933997
/utopia-service/utopia-business/utopia-business-impl/src/main/java/com/voxlearning/utopia/service/business/impl/service/teacher/internal/task/init/TeacherTaskPrimaryReceiveAwardInit.java
779169eecfe715f39f9fae825d005c2f73073222
[]
no_license
Explorer1092/vox
d40168b44ccd523748647742ec376fdc2b22160f
701160b0417e5a3f1b942269b0e7e2fd768f4b8e
refs/heads/master
2020-05-14T20:13:02.531549
2019-04-17T06:54:06
2019-04-17T06:54:06
181,923,482
0
4
null
2019-04-17T15:53:25
2019-04-17T15:53:25
null
UTF-8
Java
false
false
2,014
java
package com.voxlearning.utopia.service.business.impl.service.teacher.internal.task.init; import com.voxlearning.alps.lang.convert.SafeConverter; import com.voxlearning.utopia.entity.task.TeacherTask; import com.voxlearning.utopia.entity.task.TeacherTaskProgress; import com.voxlearning.utopia.entity.task.TeacherTaskTpl; import com.voxlearning.utopia.mapper.TeacherTaskEntry; import com.voxlearning.utopia.service.user.api.entities.extension.TeacherDetail; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.InitializingBean; import javax.inject.Named; import java.util.Date; /** * Created by zhouwei on 2018/10/8 **/ @Named @Slf4j public class TeacherTaskPrimaryReceiveAwardInit extends AbstractTeacherTaskInit implements InitializingBean { @Override public void afterPropertiesSet() throws Exception { teacherTaskTpl = this.loadTaskTpl(getTeacherTaskTpl().getTplId()); } @Override public TeacherTaskEntry getTeacherTaskEntry(TeacherDetail teacherDetail, TeacherTask teacherTask, TeacherTaskProgress teacherTaskProgress) { TeacherTaskEntry teacherTaskEntry = this.createTeacherTaskEntryCommon(teacherDetail, teacherTask, teacherTaskProgress); teacherTaskEntry.addReward(SafeConverter.toString(50), TeacherTaskTpl.RewardUnit.integral.name(), "次"); teacherTaskEntry.setCrmIsDisplay(false); return teacherTaskEntry; } @Override public boolean onGoingTaskInit(TeacherDetail teacherDetail, TeacherTask teacherTask, TeacherTaskProgress teacherTaskProgress) { Date expireDate = new Date(); String status = TeacherTask.Status.CANCEL.name(); teacherTask.setStatus(status); teacherTask.setExpireDate(expireDate); teacherTaskProgress.setStatus(status); teacherTaskProgress.setExpireTime(expireDate.getTime()); return true; } @Override public TeacherTaskTpl.Tpl getTeacherTaskTpl() { return TeacherTaskTpl.Tpl.PRIMARY_RECEIVE_AWARD; } }
[ "wangahai@300.cn" ]
wangahai@300.cn
23a643f32a85178f0bc244d599ce020967ee3b4a
a74bec9727d40f52d3903889d654f6bea6c59b43
/eu.jgen.notes.dmw.lite/src-gen/eu/jgen/notes/dmw/lite/parser/antlr/LangParser.java
ab0449ee32f93b8d9f3234ff03fb2e7338900c68
[]
no_license
JGen-Notes/DMW-Lite
a3458e2c940b1f50e645adc49951e7a2770c0b18
8c81b8f1cca717fe1c747567672a6b7db1a91c0a
refs/heads/master
2020-03-18T04:56:11.508556
2018-10-07T08:46:12
2018-10-07T08:46:12
134,136,254
0
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
/* * generated by Xtext 2.12.0 */ package eu.jgen.notes.dmw.lite.parser.antlr; import com.google.inject.Inject; import eu.jgen.notes.dmw.lite.parser.antlr.internal.InternalLangParser; import eu.jgen.notes.dmw.lite.services.LangGrammarAccess; import org.eclipse.xtext.parser.antlr.AbstractAntlrParser; import org.eclipse.xtext.parser.antlr.XtextTokenStream; public class LangParser extends AbstractAntlrParser { @Inject private LangGrammarAccess grammarAccess; @Override protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); } @Override protected InternalLangParser createParser(XtextTokenStream stream) { return new InternalLangParser(stream, getGrammarAccess()); } @Override protected String getDefaultRuleName() { return "YWidget"; } public LangGrammarAccess getGrammarAccess() { return this.grammarAccess; } public void setGrammarAccess(LangGrammarAccess grammarAccess) { this.grammarAccess = grammarAccess; } }
[ "ms@jgen.eu" ]
ms@jgen.eu
5ffe1416b22dcebc02533027c12190cfaba26910
d2e3ce3377fe2a66dab5d41883cbcf8d9866072a
/message-api/src/main/java/sample/message/Message.java
d61ee5441e3460bc810804b25f5b922bd1be11d2
[]
no_license
keeplearningandtrying/spring-reactive-intro
8de40b0ec580ab0dd96e354f9d8f66cc7eea7def
16e1fb78171fe8b347d5d434675e31032d3e0185
refs/heads/master
2020-04-02T19:54:51.706261
2018-10-17T18:02:40
2018-10-17T18:02:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,454
java
/* * Copyright 2002-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 sample.message; import com.fasterxml.jackson.databind.annotation.JsonNaming; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; /** * @author Rob Winch */ @Entity public class Message { @Id @GeneratedValue private Long id; private String toUserId; private String text; public Message() {} public Message(Long id, String toUserId, String text) { this.id = id; this.toUserId = toUserId; this.text = text; } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public String getToUserId() { return this.toUserId; } public void setToUserId(String toUserId) { this.toUserId = toUserId; } public String getText() { return this.text; } public void setText(String text) { this.text = text; } }
[ "rwinch@users.noreply.github.com" ]
rwinch@users.noreply.github.com
f3f6762d61d15314be9970c54ca93df03f94d6da
5eae683a6df0c4b97ab1ebcd4724a4bf062c1889
/bin/ext-addon/b2bpunchoutaddon/src/de/hybris/platform/b2bpunchoutaddon/services/PunchOutUserAuthenticationService.java
12b2d24d7ba9ff81e19e8d98c2df7937786b60a1
[]
no_license
sujanrimal/GiftCardProject
1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb
e0398eec9f4ec436d20764898a0255f32aac3d0c
refs/heads/master
2020-12-11T18:05:17.413472
2020-01-17T18:23:44
2020-01-17T18:23:44
233,911,127
0
0
null
2020-06-18T15:26:11
2020-01-14T18:44:18
null
UTF-8
Java
false
false
1,267
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.b2bpunchoutaddon.services; import de.hybris.platform.b2b.punchout.PunchOutSession; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Provides authentication service to Punch Out users. */ public interface PunchOutUserAuthenticationService { /** * Authenticates a user. * * @param userId * The user to be authenticated. * @param isSeamlessLogin * True if this is a seamless login request. * @param punchOutSession * The punch out session. * @param response * Servlet response. * @param request * Servlet request. */ void authenticate(String userId, boolean isSeamlessLogin, PunchOutSession punchOutSession, HttpServletRequest request, HttpServletResponse response); /** * Logs out the user. */ void logout(); }
[ "travis.d.crawford@accenture.com" ]
travis.d.crawford@accenture.com
410b4dbea16125d07c995f7916b8845e47a4b610
99f3951bd06f70769cfd4c9b48f902eadd60679c
/shop-core/src/main/java/com/enation/app/shop/aftersale/service/IAfterSaleManager.java
73e6adcbb714de2b711d9eca430e6896a95e1a3b
[]
no_license
chenzijin6/java-shop
de8e47c8616386421098d7819ba6e3947cb219f2
e21c6cd3c7ec3e90a3a6fcddcd78847f926931e0
refs/heads/master
2020-12-02T00:40:24.875439
2018-01-25T22:33:37
2018-01-25T22:33:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,070
java
package com.enation.app.shop.aftersale.service; import java.util.List; import com.enation.app.shop.aftersale.model.vo.BuyerRefundApply; import com.enation.app.shop.aftersale.model.vo.FinanceRefundApproval; import com.enation.app.shop.aftersale.model.vo.RefundDetail; import com.enation.app.shop.aftersale.model.vo.RefundPartVo; import com.enation.app.shop.aftersale.model.vo.RefundQueryParam; import com.enation.app.shop.aftersale.model.vo.RefundVo; import com.enation.app.shop.aftersale.model.vo.SellerRefundApproval; import com.enation.app.shop.aftersale.model.vo.StockIn; import com.enation.framework.database.Page; /** * 售后管理接口 * @author kingapex * @version 1.0 * @since pangu1.0 * 2017年4月14日下午6:39:02 */ public interface IAfterSaleManager { /** * 申请退款 * @param refundApply 退款申请 */ public void applyRefund(BuyerRefundApply refundApply); /** * 退货申请 * @param goodsReturnsApply */ public void applyGoodsReturn(BuyerRefundApply refundApply); /** * 根据参数查询退款(货)单 * @param param 查询参数 * @return */ public Page<RefundVo> query(RefundQueryParam param); /** * 根据编号获取详细 * @param sn 单据编号 * @return */ public RefundDetail getDetail(String sn); /** * 卖家审批一个退货(款) * @param refundApprove 批准 vo * @return 批准 vo */ public SellerRefundApproval approval(SellerRefundApproval refundApproval); /** * 卖家入库 * @param stockIn 入库单 * @return */ public StockIn SellerStockIn(StockIn stockIn) ; /** * 财务审核/执行一个退款 * @param refundApproval * @return */ public FinanceRefundApproval approval(FinanceRefundApproval refundApproval); /** * 买家取消退款或退货 * @param sn * @return */ public RefundVo cancelRefund(String sn); /** * @return */ public List<RefundPartVo> queryNoReturnOrder(); /** * 更新退款单的状态 * @param list */ public void update(List<RefundPartVo> list); }
[ "king0ver@yeah.net" ]
king0ver@yeah.net
d2089e2de42150a618e06b473b98564daef10f99
05e988157248d2768f3eb66e1cc58621442aa292
/model/src/main/java/com/github/piasy/gh/model/users/GithubUserRepo.java
5d7a9c072cac3bd7585e4a78bcdf404b85149629
[ "MIT" ]
permissive
jekinyang/AndroidTDDBootStrap
70478a9ce8d6941bc39ce483a05ed040f81d3b24
e3fa24cc6211e3c48b29f85c563d005bfb89db5f
refs/heads/master
2021-01-11T03:18:44.612013
2016-10-16T15:45:35
2016-10-16T15:45:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,277
java
/* * The MIT License (MIT) * * Copyright (c) 2015 Piasy * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.github.piasy.gh.model.users; import android.support.annotation.NonNull; import com.github.piasy.gh.model.GithubApi; import com.github.piasy.yamvp.dagger2.ActivityScope; import java.util.List; import javax.inject.Inject; import rx.Observable; /** * Created by Piasy{github.com/Piasy} on 15/8/5. */ @ActivityScope public class GithubUserRepo { private final DbUserDelegate mDbUserDelegate; private final GithubApi mGithubApi; @Inject public GithubUserRepo(final DbUserDelegate dbUserDelegate, final GithubApi githubApi) { mDbUserDelegate = dbUserDelegate; mGithubApi = githubApi; } /** * search github user. * * @param query search query. * @return search result observable. */ @NonNull public Observable<List<GithubUser>> searchUser(@NonNull final String query) { return mGithubApi.searchGithubUsers(query, GithubApi.GITHUB_API_PARAMS_SEARCH_SORT_JOINED, GithubApi.GITHUB_API_PARAMS_SEARCH_ORDER_DESC) .map(GithubUserSearchResult::items) .doOnNext(mDbUserDelegate::putAllGithubUser); } }
[ "xz4215@gmail.com" ]
xz4215@gmail.com
5a996c972610e68afa90fa8a19b2c44afca91eea
087d494128e44e3b7e6d60474f92928109d3460c
/spring-cloud-gray-utils/src/main/java/cn/springcloud/gray/bean/properties/source/ConfigurationPropertySources.java
128a2e5a2141556fb059e3aeab7030b82a1f505a
[ "Apache-2.0" ]
permissive
Maozw/spring-cloud-gray
a43b6038afaece45d9e7aff5b06e4ec84a759720
3a04f974710e98ec8612a9635ba2f2df286dec2d
refs/heads/master
2020-06-15T18:37:40.978511
2019-07-05T08:01:05
2019-07-05T08:01:05
195,366,101
1
0
Apache-2.0
2019-07-05T07:58:57
2019-07-05T07:58:56
null
UTF-8
Java
false
false
7,047
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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package cn.springcloud.gray.bean.properties.source; import java.util.Collections; import java.util.stream.Stream; import java.util.stream.StreamSupport; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.Environment; import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertySource; import org.springframework.core.env.PropertySource.StubPropertySource; import org.springframework.core.env.PropertySources; import org.springframework.core.env.PropertySourcesPropertyResolver; import org.springframework.util.Assert; /** * Provides access to {@link ConfigurationPropertySource ConfigurationPropertySources}. * * @author Phillip Webb * @since 2.0.0 */ public final class ConfigurationPropertySources { /** * The name of the {@link PropertySource} . */ private static final String ATTACHED_PROPERTY_SOURCE_NAME = "configurationProperties"; private ConfigurationPropertySources() { } /** * Determines if the specific {@link PropertySource} is the * {@link ConfigurationPropertySource} that was {@link #attach(Environment) attached} * to the {@link Environment}. * * @param propertySource the property source to test * @return {@code true} if this is the attached {@link ConfigurationPropertySource} */ public static boolean isAttachedConfigurationPropertySource( PropertySource<?> propertySource) { return ATTACHED_PROPERTY_SOURCE_NAME.equals(propertySource.getName()); } /** * Attach a {@link ConfigurationPropertySource} support to the specified * {@link Environment}. Adapts each {@link PropertySource} managed by the environment * to a {@link ConfigurationPropertySource} and allows classic * {@link PropertySourcesPropertyResolver} calls to resolve using * {@link ConfigurationPropertyName configuration property names}. * <p> * The attached resolver will dynamically track any additions or removals from the * underlying {@link Environment} property sources. * * @param environment the source environment (must be an instance of * {@link ConfigurableEnvironment}) * @see #get(Environment) */ public static void attach(Environment environment) { Assert.isInstanceOf(ConfigurableEnvironment.class, environment); MutablePropertySources sources = ((ConfigurableEnvironment) environment) .getPropertySources(); PropertySource<?> attached = sources.get(ATTACHED_PROPERTY_SOURCE_NAME); if (attached != null && attached.getSource() != sources) { sources.remove(ATTACHED_PROPERTY_SOURCE_NAME); attached = null; } if (attached == null) { sources.addFirst(new ConfigurationPropertySourcesPropertySource( ATTACHED_PROPERTY_SOURCE_NAME, new SpringConfigurationPropertySources(sources))); } } /** * Return a set of {@link ConfigurationPropertySource} instances that have previously * been {@link #attach(Environment) attached} to the {@link Environment}. * * @param environment the source environment (must be an instance of * {@link ConfigurableEnvironment}) * @return an iterable set of configuration property sources * @throws IllegalStateException if not configuration property sources have been * attached */ public static Iterable<ConfigurationPropertySource> get(Environment environment) { Assert.isInstanceOf(ConfigurableEnvironment.class, environment); MutablePropertySources sources = ((ConfigurableEnvironment) environment) .getPropertySources(); ConfigurationPropertySourcesPropertySource attached = (ConfigurationPropertySourcesPropertySource) sources .get(ATTACHED_PROPERTY_SOURCE_NAME); if (attached == null) { return from(sources); } return attached.getSource(); } /** * Return {@link Iterable} containing a single new {@link ConfigurationPropertySource} * adapted from the given Spring {@link PropertySource}. * * @param source the Spring property source to adapt * @return an {@link Iterable} containing a single newly adapted * {@link SpringConfigurationPropertySource} */ public static Iterable<ConfigurationPropertySource> from(PropertySource<?> source) { return Collections.singleton(SpringConfigurationPropertySource.from(source)); } /** * Return {@link Iterable} containing new {@link ConfigurationPropertySource} * instances adapted from the given Spring {@link PropertySource PropertySources}. * <p> * This method will flatten any nested property sources and will filter all * {@link StubPropertySource stub property sources}. Updates to the underlying source, * identified by changes in the sources returned by its iterator, will be * automatically tracked. The underlying source should be thread safe, for example a * {@link MutablePropertySources} * * @param sources the Spring property sources to adapt * @return an {@link Iterable} containing newly adapted * {@link SpringConfigurationPropertySource} instances */ public static Iterable<ConfigurationPropertySource> from( Iterable<PropertySource<?>> sources) { return new SpringConfigurationPropertySources(sources); } private static Stream<PropertySource<?>> streamPropertySources( PropertySources sources) { return StreamSupport.stream(sources.spliterator(), false).flatMap(ConfigurationPropertySources::flatten) .filter(ConfigurationPropertySources::isIncluded); } private static Stream<PropertySource<?>> flatten(PropertySource<?> source) { if (source.getSource() instanceof ConfigurableEnvironment) { return streamPropertySources( ((ConfigurableEnvironment) source.getSource()).getPropertySources()); } return Stream.of(source); } private static boolean isIncluded(PropertySource<?> source) { return !(source instanceof StubPropertySource) && !(source instanceof ConfigurationPropertySourcesPropertySource); } }
[ "qlichunyu@163.com" ]
qlichunyu@163.com
4be1d4d21bf5e2c1b529975615b05e8b92ff8772
65f34373765dd41bc889e0a5cfa0fbb919b82ef6
/ch10i18n/src/main/java/validator/ProductValidator.java
dfbc57b59de7a1ef6141fdf8fbfee82158243f80
[]
no_license
Hao-HOU/SpringMVCpauldeck
a41fed150a9ac3c4d3398839ddde7050e7f8908b
ad49a40b46d18f2a06ba4414654211342ddbe879
refs/heads/master
2021-01-20T08:16:39.200382
2017-05-19T07:04:52
2017-05-19T07:04:52
90,126,375
0
0
null
null
null
null
UTF-8
Java
false
false
829
java
package validator; import domain.Product; import org.springframework.validation.Errors; import org.springframework.validation.ValidationUtils; import org.springframework.validation.Validator; import java.math.BigDecimal; /** * Created by Hao HOU on 2017/5/12. */ public class ProductValidator implements Validator { @Override public boolean supports(Class<?> klass) { return Product.class.isAssignableFrom(klass); } @Override public void validate(Object target, Errors errors) { Product product = (Product) target; ValidationUtils.rejectIfEmpty(errors, "name", "productname.required"); BigDecimal price = product.getPrice(); if (price != null && price.compareTo(BigDecimal.ZERO) < 0) { errors.rejectValue("price", "price.negative"); } } }
[ "houhao118@163.com" ]
houhao118@163.com
f64be16720e5cf5cc63d4047c994ac5b2947bd2f
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
/laravel-converted/src/main/java/com/project/convertedCode/includes/vendor/nikic/php_parser/lib/PhpParser/Node/Stmt/file_Property_php.java
7f47422fe5ee3c0a00fd81ec7ae551bcb438a566
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
RuntimeConverter/RuntimeConverterLaravelJava
657b4c73085b4e34fe4404a53277e056cf9094ba
7ae848744fbcd993122347ffac853925ea4ea3b9
refs/heads/master
2020-04-12T17:22:30.345589
2018-12-22T10:32:34
2018-12-22T10:32:34
162,642,356
0
0
null
null
null
null
UTF-8
Java
false
false
2,019
java
package com.project.convertedCode.includes.vendor.nikic.php_parser.lib.PhpParser.Node.Stmt; import com.runtimeconverter.runtime.RuntimeStack; import com.runtimeconverter.runtime.interfaces.ContextConstants; import com.runtimeconverter.runtime.includes.RuntimeIncludable; import com.runtimeconverter.runtime.includes.IncludeEventException; import com.runtimeconverter.runtime.classes.RuntimeClassBase; import com.runtimeconverter.runtime.RuntimeEnv; import com.runtimeconverter.runtime.interfaces.UpdateRuntimeScopeInterface; import com.runtimeconverter.runtime.arrays.ZPair; /* Converted with The Runtime Converter (runtimeconverter.com) vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php */ public class file_Property_php implements RuntimeIncludable { public static final file_Property_php instance = new file_Property_php(); public final void include(RuntimeEnv env, RuntimeStack stack) throws IncludeEventException { Scope2193 scope = new Scope2193(); stack.pushScope(scope); this.include(env, stack, scope); stack.popScope(); } public final void include(RuntimeEnv env, RuntimeStack stack, Scope2193 scope) throws IncludeEventException { // Namespace import was here // Conversion Note: class named Property was here in the source code env.addManualClassLoad("PhpParser\\Node\\Stmt\\Property"); } private static final ContextConstants runtimeConverterContextContantsInstance = new ContextConstants() .setDir("/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt") .setFile("/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php"); public ContextConstants getContextConstants() { return runtimeConverterContextContantsInstance; } private static class Scope2193 implements UpdateRuntimeScopeInterface { public void updateStack(RuntimeStack stack) {} public void updateScope(RuntimeStack stack) {} } }
[ "git@runtimeconverter.com" ]
git@runtimeconverter.com
d69cbcadaeda6be1e6a4910ec6a7a6253e231094
f546e87160f225311ad2502e1238cbb4ffc0a05f
/src/main/java/com/glqdlt/ex/Dish.java
0b376e022756f27219f6a3af4324623d5a0b1210
[]
no_license
glqdlt/ex-java-8
943e07d6fd6e361fc874ae2fa35757edc691bed3
a85350bb314657dbc0b5d08d1aeb481bc75316b8
refs/heads/master
2020-03-10T12:27:13.027552
2018-05-29T01:50:46
2018-05-29T01:50:46
129,378,953
0
0
null
2018-05-29T01:50:47
2018-04-13T09:19:49
Java
UTF-8
Java
false
false
453
java
package com.glqdlt.ex; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; import java.lang.reflect.Type; /** * Created By iw.jhun * On 2018-04-20 */ @ToString @AllArgsConstructor @NoArgsConstructor @Data public class Dish { private String name; private boolean vegetarian; private Integer calories; private Type type; public enum Type{ MEAT,FISH } }
[ "dlfdnd0725@gmail.com" ]
dlfdnd0725@gmail.com
f448a5b016ed543fab869a88f076516a021172b7
8e12962c93e962e70f5fefc6de18693f96677b83
/app/src/main/java/com/spark/newbitrade/dialog/SkipExtractTipDialog.java
a44d75ca2f3e6404eecff8011678bbdf0bd481e2
[]
no_license
cnamway/Newbit_Android
fb2ec19a3d08c75230a62ad16de52f61c5cd27db
01ff231e4b13db370eff528294dd777c40bf4955
refs/heads/master
2020-09-26T13:04:54.563645
2019-09-25T01:19:14
2019-09-25T01:19:14
226,260,073
1
0
null
2019-12-06T06:20:45
2019-12-06T06:20:44
null
UTF-8
Java
false
false
1,592
java
package com.spark.newbitrade.dialog; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.TextView; import com.spark.newbitrade.R; import com.spark.newbitrade.utils.CommonUtils; public class SkipExtractTipDialog extends Dialog { private Context context; private TextView tvSure; private TextView tvCancel; public SkipExtractTipDialog(Context context) { super(context, R.style.myDialog); this.context = context; initView(); setListener(); } private void initView() { setContentView(R.layout.dialog_extract_tip); tvSure = findViewById(R.id.tvConfirm); tvCancel = findViewById(R.id.tvCancel); } private void setListener() { tvCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Window dialogWindow = getWindow(); WindowManager.LayoutParams lp = dialogWindow.getAttributes(); lp.width = CommonUtils.getScreenWidth(); dialogWindow.setAttributes(lp); dialogWindow.setGravity(Gravity.CENTER); } public void onPositiveClickLisenter(View.OnClickListener onClickListener) { tvSure.setOnClickListener(onClickListener); } }
[ "ccs7727@163.com" ]
ccs7727@163.com