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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ebe193b21ab524c91750b6dc6ea57588205d494a | 23458bdfb7393433203985569e68bc1935a022d6 | /ONEOrder/Java SDK/oo-jaxb/ServiceDeliveryNotificationRQ/target/generated-sources/xjc/org/iata/oo/schema/ServiceDeliveryNotificationRQ/ContactCoreType.java | a600aee51fc7e75b3c24d22e6e3f274feda9b0d2 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | joelmorales/NDC | 7c6baa333c0285b724e6356bd7ae808f1f74e7ec | ebddd30369ec74e078a2c9996da0402f9ac448a1 | refs/heads/master | 2021-06-30T02:49:12.522375 | 2019-06-13T14:55:05 | 2019-06-13T14:55:05 | 171,594,242 | 1 | 0 | null | 2020-10-13T12:03:33 | 2019-02-20T03:29:16 | Java | UTF-8 | Java | false | false | 1,848 | java |
package org.iata.oo.schema.ServiceDeliveryNotificationRQ;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlIDREF;
import javax.xml.bind.annotation.XmlType;
/**
* CONTACT CORE definition.
*
* <p>Java class for ContactCoreType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ContactCoreType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{http://www.iata.org/IATA/EDIST/2017.1}ObjAssociationAttrGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ContactCoreType")
public class ContactCoreType {
@XmlAttribute(name = "refs")
@XmlIDREF
protected List<Object> refs;
/**
* Gets the value of the refs property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the refs property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRefs().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
*
*
*/
public List<Object> getRefs() {
if (refs == null) {
refs = new ArrayList<Object>();
}
return this.refs;
}
}
| [
"joel.moralesmorales@hotmail.com"
] | joel.moralesmorales@hotmail.com |
bc3263730623580835ad772a6011ac30f1d90e2a | 46167791cbfeebc8d3ddc97112764d7947fffa22 | /spring-boot/src/main/java/com/justexample/entity/Entity1121.java | 5d82706255e1c22d90a949e196c7726dbf4e975e | [] | no_license | kahlai/unrealistictest | 4f668b4822a25b4c1f06c6b543a26506bb1f8870 | fe30034b05f5aacd0ef69523479ae721e234995c | refs/heads/master | 2023-08-25T09:32:16.059555 | 2021-11-09T08:17:22 | 2021-11-09T08:17:22 | 425,726,016 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,134 | java | package com.justexample.entity;
import java.sql.Timestamp;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class Entity1121 {
@Id
private Long id;
private String code;
private String name;
private String status;
private int seq;
private Timestamp createdDate;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public int getSeq() {
return seq;
}
public void setSeq(int seq) {
this.seq = seq;
}
public Timestamp getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Timestamp createdDate) {
this.createdDate = createdDate;
}
}
| [
"laikahhoe@gmail.com"
] | laikahhoe@gmail.com |
f9a002a22745edd118d52ab374184e6ef9a90890 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MATH-32b-3-25-SPEA2-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/geometry/euclidean/threed/PolyhedronsSet$FacetsContributionVisitor_ESTest.java | 0ae6bdc78bbaba4c147daf51e90e0de216e10d78 | [] | 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 | 637 | java | /*
* This file was automatically generated by EvoSuite
* Sun Apr 05 22:20:36 UTC 2020
*/
package org.apache.commons.math3.geometry.euclidean.threed;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class PolyhedronsSet$FacetsContributionVisitor_ESTest extends PolyhedronsSet$FacetsContributionVisitor_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
f11afb41e5d67bf86f4d35555f0b210f68bf8a89 | 218f071cfd19ffb6f3494852d653e8ac3ef089a8 | /app/src/main/java/com/lvgou/distribution/activity/RecommendRecordActivity.java | e040cc096f2a67b7fb0cd50c496e18be69db777a | [] | no_license | Jiafeicsdn/fyk | b299e6119789c7923396d853922f248489b32997 | 97ff951774cb6ce6bb8d0b8e610fadecebd396eb | refs/heads/master | 2021-06-30T18:06:18.727005 | 2017-09-17T03:57:20 | 2017-09-17T03:57:20 | 103,801,359 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,480 | java | package com.lvgou.distribution.activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.lvgou.distribution.R;
import com.lvgou.distribution.adapter.CollecteJokeAdapter;
import com.lvgou.distribution.adapter.RecommendRecordAdapter;
import com.lvgou.distribution.constants.SPConstants;
import com.lvgou.distribution.presenter.RecommendListPresenter;
import com.lvgou.distribution.utils.TGmd5;
import com.lvgou.distribution.view.RecommendListView;
import com.lvgou.distribution.widget.XListView;
import com.xdroid.common.utils.PreferenceHelper;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
/**
* Created by Administrator on 2017/4/28.
*/
public class RecommendRecordActivity extends BaseActivity implements View.OnClickListener, RecommendListView, XListView.IXListViewListener {
private RecommendListPresenter recommendListPresenter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recommend_record);
recommendListPresenter = new RecommendListPresenter(this);
initView();
onRefresh();
initClick();
}
private RelativeLayout rl_back;
private TextView tv_title;
private TextView tv_success_num;
private XListView mListView;
private RecommendRecordAdapter recommendRecordAdapter;
private RelativeLayout rl_none_one;
private void initView() {
rl_none_one = (RelativeLayout) findViewById(R.id.rl_none_one);
rl_back = (RelativeLayout) findViewById(R.id.rl_back);
tv_title = (TextView) findViewById(R.id.tv_title);
tv_title.setText("推荐记录");
tv_success_num = (TextView) findViewById(R.id.tv_success_num);
mListView = (XListView) findViewById(R.id.list_view);
recommendRecordAdapter = new RecommendRecordAdapter(this);
mListView.setPullRefreshEnable(true);
mListView.setPullLoadEnable(true);
// mListView.stopLoadMore();
mListView.setAutoLoadEnable(false);
mListView.setXListViewListener(this);
mListView.setRefreshTime(this.getTime());
mListView.setDivider(null);
mListView.setAdapter(recommendRecordAdapter);
}
private void initClick() {
rl_back.setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.rl_back:
finish();
break;
}
}
@Override
public void onRefresh() {
page = 1;
dataList.clear();
initDatas();
}
@Override
public void onLoadMore() {
page++;
initDatas();
}
public ArrayList<HashMap<String, Object>> dataList = new ArrayList<HashMap<String, Object>>();
public ArrayList<HashMap<String, Object>> dataListTmp = new ArrayList<HashMap<String, Object>>();
private int page = 1;
private void initDatas() {
String distributorid = PreferenceHelper.readString(this, SPConstants.SHARED_PREFERENCE_NAME, SPConstants.LOGIN_USERID);
String sign = TGmd5.getMD5("" + distributorid + page);
showLoadingProgressDialog(this, "");
recommendListPresenter.recommendList(distributorid, page, sign);
}
@Override
public void OnRecommendListSuccCallBack(String state, String respanse) {
closeLoadingProgressDialog();
mListView.stopRefresh();
try {
JSONObject jsonObject = new JSONObject(respanse);
JSONArray jsonArray = new JSONArray(jsonObject.getString("result"));
JSONObject jsonObject1 = new JSONObject(jsonArray.get(0).toString());
JSONArray jsonArray1 = new JSONArray(jsonObject1.getString("Items"));
int jsonObject2 = jsonArray.getInt(1);
if (jsonObject2 == 0) {
tv_success_num.setVisibility(View.GONE);
} else {
tv_success_num.setVisibility(View.VISIBLE);
tv_success_num.setText("成功推荐" + jsonObject2 + "人");
}
for (int i = 0; i < jsonArray1.length(); i++) {
JSONObject jsoo = jsonArray1.getJSONObject(i);
HashMap<String, Object> map1 = new HashMap<String, Object>();
Iterator it = jsoo.keys();
while (it.hasNext()) {
String key = (String) it.next();
String value = jsoo.getString(key);
map1.put(key, value);
}
dataListTmp.add(map1);
}
if (dataListTmp.size() < Integer.parseInt(jsonObject1.get("ItemsPerPage").toString()) && Integer.parseInt(jsonObject1.get("ItemsPerPage").toString()) != 0) {
mHandler.sendEmptyMessage(2);
} else {
mHandler.sendEmptyMessage(1);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void OnRecommendListFialCallBack(String state, String respanse) {
closeLoadingProgressDialog();
}
@Override
public void closeRecommendListProgress() {
}
private final mainHandler mHandler = new mainHandler(this);
private static class mainHandler extends Handler {
private final WeakReference<RecommendRecordActivity> mActivity;
public mainHandler(RecommendRecordActivity activity) {
mActivity = new WeakReference<RecommendRecordActivity>(activity);
}
@Override
public void handleMessage(Message msg) {
RecommendRecordActivity activity = mActivity.get();
if (activity != null) {
activity.flushDataList(msg);
}
}
}
public void flushDataList(Message msg) {
if (msg.what == 1) {
dataList.addAll(dataListTmp);
if (dataList != null) {
recommendRecordAdapter.setData(dataList);
recommendRecordAdapter.notifyDataSetChanged();
mListView.setPullLoadEnable(true);
} else {
mListView.setPullLoadEnable(false);
}
if (dataList.size() == 0) {
mListView.setPullLoadEnable(false);
rl_none_one.setVisibility(View.VISIBLE);
} else {
rl_none_one.setVisibility(View.GONE);
}
dataListTmp.clear();
mListView.stopRefresh();
} else if (msg.what == 2) {
dataList.addAll(dataListTmp);
recommendRecordAdapter.setData(dataList);
recommendRecordAdapter.notifyDataSetChanged();
dataListTmp.clear();
if (dataList.size() == 0) {
rl_none_one.setVisibility(View.VISIBLE);
} else {
rl_none_one.setVisibility(View.GONE);
}
mListView.setPullLoadEnable(false);
mListView.stopLoadMore();
}
}
}
| [
"jiafeiwangyi@163.com"
] | jiafeiwangyi@163.com |
f440725c1cfcab8c2807a97bb0517068bc4d601f | c9f8eb8f10f60e37f2358c2b7fbf1951fb4c420f | /simplified-app-shared/src/main/java/org/nypl/simplified/app/catalog/MainHoldsActivity.java | 8ce86573c9a2432588c00ba1a1fd1ac6db0b5e6a | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | NYPL-Simplified/Open-eBooks-Android | 8edf17805177255bb3a4b4bb04d627be7a2429ea | 0678b3d1f6ad5b87125f7c97194fa105b7c5ca3d | refs/heads/master | 2022-04-01T02:25:59.857924 | 2019-11-08T16:45:10 | 2019-11-08T16:45:10 | 106,757,186 | 1 | 0 | NOASSERTION | 2021-01-08T22:25:32 | 2017-10-12T23:58:12 | Java | UTF-8 | Java | false | false | 863 | java | package org.nypl.simplified.app.catalog;
import org.nypl.simplified.app.R;
import org.nypl.simplified.app.SimplifiedPart;
import org.nypl.simplified.books.core.BooksFeedSelection;
/**
* An activity that displays the holds for the current user.
*/
public final class MainHoldsActivity extends MainLocalFeedActivity
{
/**
* Construct a new activity.
*/
public MainHoldsActivity()
{
}
@Override protected BooksFeedSelection getLocalFeedTypeSelection()
{
return BooksFeedSelection.BOOKS_FEED_HOLDS;
}
@Override protected SimplifiedPart navigationDrawerGetPart()
{
return SimplifiedPart.PART_HOLDS;
}
@Override protected boolean navigationDrawerShouldShowIndicator()
{
return true;
}
@Override protected String catalogFeedGetEmptyText()
{
return this.getResources().getString(R.string.holds_empty);
}
}
| [
"code@io7m.com"
] | code@io7m.com |
6c3c49b8567b51cb6679b2868693654d2eb4f983 | 15acc10c96741b40ada276b1ecf4c49d8efbc3cc | /hedwig-server/src/main/java/com/hs/mail/imap/schedule/MessageExpunger.java | cceb1aa4b870a4ffbfc55576bdf7fbd65c5ac469 | [
"Apache-2.0"
] | permissive | snowone/hedwig | 76bcb708d3f3743b3c8070fa2b6592e469cfde3c | 226344cde50e5f3e08f624c8c92fbc719436505c | refs/heads/master | 2021-01-11T11:08:48.558648 | 2013-10-16T09:13:59 | 2013-10-16T09:13:59 | 29,674,715 | 1 | 0 | null | 2015-01-22T11:06:41 | 2015-01-22T11:06:39 | Java | UTF-8 | Java | false | false | 3,267 | java | /*
* Copyright 2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hs.mail.imap.schedule;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.log4j.Logger;
import com.hs.mail.imap.mailbox.MailboxManager;
import com.hs.mail.imap.message.search.ComparisonKey;
import com.hs.mail.imap.message.search.CompositeKey;
import com.hs.mail.imap.message.search.InternalDateKey;
import com.sun.mail.imap.protocol.BASE64MailboxEncoder;
/**
*
* @author Won Chul Doh
* @since Oct 2, 2010
*
*/
public class MessageExpunger {
static Logger logger = Logger.getLogger(MessageExpunger.class);
private MailboxManager manager;
public MessageExpunger(MailboxManager manager) {
this.manager = manager;
}
public void expunge(String prop, long timeLimit) {
Map<String, Date> criteria = getExpungeCriteria(prop);
if (MapUtils.isNotEmpty(criteria)) {
expungeMailboxes(criteria, timeLimit);
}
}
private Map<String, Date> getExpungeCriteria(String prop) {
String[] tokens = StringUtils.split(prop);
int sz = tokens.length / 2;
if (sz > 0) {
Map<String, Date> criteria = new HashMap<String, Date>(sz);
for (int i = 0; i < tokens.length / 2; i++) {
Date base = ScheduleUtils.getDateBefore(tokens[i + 1]);
if (base != null) {
criteria.put(tokens[i], base);
}
}
return criteria;
}
return null;
}
private void expungeMailboxes(Map<String, Date> criteria, long timeLimit) {
for (String name : criteria.keySet()) {
if (logger.isDebugEnabled()) {
logger.debug("Expunging messages from "
+ name
+ " which are older than "
+ DateFormatUtils.ISO_DATE_FORMAT.format(criteria
.get(name)) + ".");
}
String mbox = BASE64MailboxEncoder.encode(name);
List<Long> mailboxIdes = manager.getMailboxIDList(mbox);
if (CollectionUtils.isNotEmpty(mailboxIdes)) {
for (Long mailboxID : mailboxIdes) {
if (System.currentTimeMillis() >= timeLimit) {
return;
}
expungeMessages(mailboxID, criteria.get(name));
}
}
}
}
private void expungeMessages(long mailboxID, Date date) {
List<Long> uids = manager.search(null, mailboxID, new CompositeKey(
new InternalDateKey(ComparisonKey.LT, date)), null);
if (CollectionUtils.isNotEmpty(uids)) {
for (Long uid : uids) {
manager.deleteMessage(uid);
}
}
}
}
| [
"wonchul@aade673b-a3a6-47a5-a793-c3231508b26e"
] | wonchul@aade673b-a3a6-47a5-a793-c3231508b26e |
35f774582945f148f29517e86dc8d47ec44a0869 | 1e694075179ff36e8bb4ccb900f1212f4f71e137 | /crm-provider/src/main/java/com/kycrm/member/dao/message/ISensitiveWordDao.java | 0c723f213738ad5f0f9b452848412300d5ca2eaf | [] | no_license | benling1/bd | 6d544203c51163b1d986789db5b3851a01d4d9e0 | 8847d9178ceca0e6cff59c23c1efe9a7be136240 | refs/heads/master | 2022-12-20T17:02:30.599118 | 2019-08-22T14:06:59 | 2019-08-22T14:06:59 | 203,808,240 | 1 | 0 | null | 2022-12-16T11:54:10 | 2019-08-22T14:08:43 | Java | UTF-8 | Java | false | false | 138 | java | package com.kycrm.member.dao.message;
import java.util.List;
public interface ISensitiveWordDao {
List<String> findSensitives();
}
| [
"yubenling1004@163.com"
] | yubenling1004@163.com |
d6c69a0462157709ae7fde8fbf2ebdf4c15cf326 | df95afe2e484b6b83a3b968dcd06c2379e844e2f | /src/main/java/com/subodh/oauth2/config/LocaleConfiguration.java | 21a640571fbb11fca188657b4645521b4135826f | [] | no_license | subodh27/oauth2 | 9b4f629638a5d1a22862a42351c4b68b725528db | 7a0af42969c943d0dde978d24990b5fda18ceaed | refs/heads/master | 2023-02-20T11:25:13.744072 | 2020-01-28T19:25:40 | 2020-01-28T19:25:40 | 236,819,523 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,060 | java | package com.subodh.oauth2.config;
import io.github.jhipster.config.locale.AngularCookieLocaleResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.*;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
@Configuration
public class LocaleConfiguration implements WebMvcConfigurer {
@Bean(name = "localeResolver")
public LocaleResolver localeResolver() {
AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver();
cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY");
return cookieLocaleResolver;
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("language");
registry.addInterceptor(localeChangeInterceptor);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
40533d6a677e3e2f01d2b76fb7f283d549f3dc78 | f738d04de314416a30126f92aad5fe9752073e2e | /Test/source/mh/pos/test/FormatMonateryAmount.java | 7df9e576f58c69d3e4fde01fadeb5c5693aa9ac6 | [] | no_license | mat-hayes22/JBS2My | d76334a2bc5f370db446951be1c8a03ae90cfab2 | 854d7c8e31021694cdd53e0b1c0dcf68c80f394a | refs/heads/master | 2021-01-10T07:18:25.895202 | 2016-01-07T09:05:49 | 2016-01-07T09:05:49 | 49,013,937 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,154 | java | package mh.pos.test;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;
import static org.junit.Assert.assertEquals;
@RunWith(Parameterized.class)
public class FormatMonateryAmount {
private final int priceInCents;
private final String formattedPrice;
@Parameterized.Parameters(name = "Monetary amount {0} formats to {1}")
public static Collection<Object[]> data(){
return Arrays.asList(new Object[][]{
{789, "$7.89"},
{520, "$5.20"},
{400, "$4.00"},
{0, "$0.00"},
{2, "$0.02"},
{30, "$0.30"},
{47, "$0.47"},
{418996, "$4,189.96"},
{210832281, "$2,108,322.81"}
});
}
public FormatMonateryAmount(int priceInCents, String formattedPrice) {
this.priceInCents = priceInCents;
this.formattedPrice = formattedPrice;
}
@Test
public void test() throws Exception {
assertEquals(formattedPrice, Display.format(priceInCents));
}
}
| [
"="
] | = |
d6fd0fe24d0c5538a08201a58822dd8a3f567f1c | 7f20b1bddf9f48108a43a9922433b141fac66a6d | /cytoscape/branches/mike-experimental-3.0/src/cytoscape/plugin/CytoscapePlugin.java | 57995cac3dbd40eb339dd97f385188f879e580ac | [] | no_license | ahdahddl/cytoscape | bf783d44cddda313a5b3563ea746b07f38173022 | a3df8f63dba4ec49942027c91ecac6efa920c195 | refs/heads/master | 2020-06-26T16:48:19.791722 | 2013-08-28T04:08:31 | 2013-08-28T04:08:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,227 | java | /*
File: CytoscapePlugin.java
Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org)
The Cytoscape Consortium is:
- Institute for Systems Biology
- University of California San Diego
- Memorial Sloan-Kettering Cancer Center
- Institut Pasteur
- Agilent Technologies
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1 of the License, or
any later version.
This library 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. The software and
documentation provided hereunder is on an "as is" basis, and the
Institute for Systems Biology and the Whitehead Institute
have no obligations to provide maintenance, support,
updates, enhancements or modifications. In no event shall the
Institute for Systems Biology and the Whitehead Institute
be liable to any party for direct, indirect, special,
incidental or consequential damages, including lost profits, arising
out of the use of this software and its documentation, even if the
Institute for Systems Biology and the Whitehead Institute
have been advised of the possibility of such damage. See
the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
package cytoscape.plugin;
import org.cytoscape.*;
import cytoscape.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* A CytoscapePlugin is the new "Global" plugin. A CytoscapePlugin constructor
* does not have any arguments, since it is Network agnostic. Instead all access
* to the Cytoscape Data Structures is handled throught the static methods
* provided by cytoscape.Cytoscape.
*
* It is encouraged, but not mandatory, for plugins to override the
* {@link #describe describe} method to state what the plugin does and how it
* should be used.
*/
public abstract class CytoscapePlugin implements PropertyChangeListener {
/**
* There are no arguments required or allowed in a CytoscapePlugin
* constructor.
*/
public CytoscapePlugin() {
Cytoscape.getPropertyChangeSupport().addPropertyChangeListener(
Cytoscape.SAVE_PLUGIN_STATE, this);
Cytoscape.getPropertyChangeSupport().addPropertyChangeListener(
Cytoscape.RESTORE_PLUGIN_STATE, this);
Cytoscape.getPropertyChangeSupport().addPropertyChangeListener(
Cytoscape.CYTOSCAPE_EXIT, this);
}
/**
* If true, this plugin is capable if accepting scripts, and we will find
* out what its script name is
*/
public boolean isScriptable() {
return false;
}
/**
* If this plugin is scriptable, then this will return a unique script name,
* that will come after the colon like: :name
*/
public String getScriptName() {
return "default";
}
/**
* Take a CyNetwork as input along with some arguments, and return a
* CyNetwork, which can be the same, or different, it doesn't really matter,
* and is up to the individual plugin.
*/
public GraphPerspective interpretScript(String[] args, GraphPerspective network) {
return null;
}
/**
* If implemented, then this plugin will be activated after being
* initialized
*/
public void activate() {
}
/**
* If implemented then this plugin can remove itself from the Menu system,
* and anything else, when the user decides to deactivate it.
*/
public void deactivate() {
}
/**
* Attempts to instantiate a plugin of the class argument.
*
* @return The object, if it was not successfully constructed object will be
* null
* @return true if the plugin was successfulyl constructed, false otherwise
*/
public static Object loadPlugin(Class pluginClass)
throws InstantiationException, IllegalAccessException,
PluginException {
if (pluginClass == null) {
return false;
}
Object object = null;
try {
object = pluginClass.newInstance();
// We want to catch everything possible. Errors will cause the
// entire
// cytoscape app to crash, which a plugin should not do.
} catch (Throwable e) {
object = null;
System.err.println("Instantiation has failed for: " + pluginClass);
// Here's a bit of Java strangeness: newInstance() throws
// two exceptions (above) -- however, it also propagates any
// exception that occurs during the creation of that new instance.
// Here, we need to catch whatever other exceptions might be thrown --
// for example, attempting to load an older plugin that looks
// for the class cytoscape.CyWindow, which is no longer defined,
// propagates a ClassNotFoundException (which, if we don't
// catch causes the application to crash).
String ErrorMsg = "Unchecked '" + e.getClass().getName() + "'exception while attempting to load plugin.\n"
+ "This may happen when loading a plugin written for a different "
+ "version of Cytoscape than this one, or if the plugin is dependent "
+ "on another plugin that isn't available. Consult the documentation "
+ "for the plugin or contact the plugin author for more information.";
//System.err.println(ErrorMsg);
// System.err.println(e);
// e.printStackTrace();
throw new PluginException(ErrorMsg, e);
}
System.out.println("Successfully loaded: " + pluginClass);
return object;
}
private HashMap<String, List<File>> pluginFileListMap;
/**
* DOCUMENT ME!
*
* @param e
* DOCUMENT ME!
*/
public void propertyChange(PropertyChangeEvent e) {
String pluginName = this.getClass().getName();
int index = pluginName.lastIndexOf(".");
pluginName = pluginName.substring(index + 1);
if (e.getPropertyName().equalsIgnoreCase(Cytoscape.SAVE_PLUGIN_STATE)) {
pluginFileListMap = (HashMap<String, List<File>>) e.getOldValue();
List<File> newfiles = new ArrayList<File>();
saveSessionStateFiles(newfiles);
if (newfiles.size() > 0) {
pluginFileListMap.put(pluginName, newfiles);
}
} else if (e.getPropertyName().equalsIgnoreCase(
Cytoscape.RESTORE_PLUGIN_STATE)) {
pluginFileListMap = (HashMap<String, List<File>>) e.getOldValue();
if (pluginFileListMap.containsKey(pluginName)) {
List<File> theFileList = pluginFileListMap.get(pluginName);
if ((theFileList != null) && (theFileList.size() > 0)) {
restoreSessionState(theFileList);
}
}
} else if (e.getPropertyName().equalsIgnoreCase(
Cytoscape.CYTOSCAPE_EXIT)) {
onCytoscapeExit();
}
}
public void onCytoscapeExit() {
}
// override the following two methods to save state.
/**
* DOCUMENT ME!
*
* @param pStateFileList
* DOCUMENT ME!
*/
public void restoreSessionState(List<File> pStateFileList) {
}
/**
* DOCUMENT ME!
*
* @param pFileList
* DOCUMENT ME!
*/
public void saveSessionStateFiles(List<File> pFileList) {
}
}
| [
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] | mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5 |
8d94b3b976abf6697353c9f48dcbf47c76b41ec5 | 9d265892d49e97e98078f7cdba620acd33f69dd9 | /深圳/szjx_dc/src/com/gwssi/report/balance/htmlParser/HTMLTableParser.java | 852eef95027b8464337ac9aa6ad0b69a4ddff5fb | [] | no_license | gxlioper/collections | 70d11d5f3e6c999d40fc9f92b1fc26e6d78bf15d | 2458b9e260edd91d564b063072801905e0377a00 | refs/heads/master | 2023-06-21T22:17:49.069471 | 2021-08-10T15:43:51 | 2021-08-10T15:43:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 246 | java | package com.gwssi.report.balance.htmlParser;
import com.gwssi.report.balance.api.ReportModel;
/**
* @author wuyincheng ,Oct 31, 2016
* 解析器接口
*/
public interface HTMLTableParser {
public ReportModel parse(String htmlContext);
}
| [
"1039288191@qq.com"
] | 1039288191@qq.com |
4bea5ca5ac0583975e21701033620c475a563882 | 8464b5f858f09a715b30d42093d280e0ac625c82 | /bson/src/test/unit/org/bson/codecs/pojo/entities/SimpleGenericsModel.java | 4753953240e6706da2abf522c4d2e2c37d4be5cc | [
"Apache-2.0"
] | permissive | rozza/mongo-java-driver | be7887b438594b47d7981022cb0444ffe2a2d86c | 674d1a9a618221257877b8bb8b9e4986556624c6 | refs/heads/master | 2023-08-07T13:56:38.785053 | 2023-07-11T09:20:22 | 2023-07-11T09:24:05 | 10,246,360 | 3 | 0 | Apache-2.0 | 2023-09-13T12:54:43 | 2013-05-23T15:06:03 | Java | UTF-8 | Java | false | false | 3,739 | java | /*
* Copyright 2008-present MongoDB, 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 org.bson.codecs.pojo.entities;
import java.util.List;
import java.util.Map;
public final class SimpleGenericsModel<T, V, Z> {
private Integer myIntegerField;
private T myGenericField;
private List<V> myListField;
private Map<String, Z> myMapField;
public SimpleGenericsModel() {
}
public SimpleGenericsModel(final Integer myIntegerField, final T myGenericField, final List<V> myListField, final Map<String, Z>
myMapField) {
this.myIntegerField = myIntegerField;
this.myGenericField = myGenericField;
this.myListField = myListField;
this.myMapField = myMapField;
}
public Integer getMyIntegerField() {
return myIntegerField;
}
public void setMyIntegerField(final Integer myIntegerField) {
this.myIntegerField = myIntegerField;
}
public T getMyGenericField() {
return myGenericField;
}
public void setMyGenericField(final T myGenericField) {
this.myGenericField = myGenericField;
}
public List<V> getMyListField() {
return myListField;
}
public void setMyListField(final List<V> myListField) {
this.myListField = myListField;
}
public Map<String, Z> getMyMapField() {
return myMapField;
}
public void setMyMapField(final Map<String, Z> myMapField) {
this.myMapField = myMapField;
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SimpleGenericsModel<?, ?, ?> that = (SimpleGenericsModel<?, ?, ?>) o;
if (getMyIntegerField() != null ? !getMyIntegerField().equals(that.getMyIntegerField()) : that.getMyIntegerField() != null) {
return false;
}
if (getMyGenericField() != null ? !getMyGenericField().equals(that.getMyGenericField()) : that.getMyGenericField() != null) {
return false;
}
if (getMyListField() != null ? !getMyListField().equals(that.getMyListField()) : that.getMyListField() != null) {
return false;
}
if (getMyMapField() != null ? !getMyMapField().equals(that.getMyMapField()) : that.getMyMapField() != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = getMyIntegerField() != null ? getMyIntegerField().hashCode() : 0;
result = 31 * result + (getMyGenericField() != null ? getMyGenericField().hashCode() : 0);
result = 31 * result + (getMyListField() != null ? getMyListField().hashCode() : 0);
result = 31 * result + (getMyMapField() != null ? getMyMapField().hashCode() : 0);
return result;
}
@Override
public String toString() {
return "SimpleGenericsModel{"
+ "myIntegerField=" + myIntegerField
+ ", myGenericField=" + myGenericField
+ ", myListField=" + myListField
+ ", myMapField=" + myMapField
+ "}";
}
}
| [
"ross.lawley@gmail.com"
] | ross.lawley@gmail.com |
7efc98626cb3c15b96fb5ccf59e91139ac17c749 | 733715353aee3bb72fa7036209691e3109c1cc74 | /src/main/java/com/maimeng/waihu/core/manager/SubManager.java | 9be66a8b49404003fd9a489033784bc1da454d52 | [] | no_license | tianyaleixiaowu/waihu | 79a819f25d0629638c50a86e638fe230339362da | 5114217b1e0b38c98b7c12ea3aedea2a22815f4c | refs/heads/master | 2020-04-05T20:12:03.943192 | 2018-12-28T02:38:36 | 2018-12-28T02:38:36 | 157,169,002 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,756 | java | package com.maimeng.waihu.core.manager;
import com.maimeng.waihu.core.bean.SubCreateData;
import com.maimeng.waihu.core.bean.SubData;
import com.maimeng.waihu.core.model.Project;
import com.maimeng.waihu.core.model.Sub;
import com.maimeng.waihu.core.repository.SubRepository;
import com.maimeng.waihu.core.util.Constant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.core.annotation.Order;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import javax.annotation.Resource;
import java.util.List;
/**
* @author wuweifeng wrote on 2018/11/12.
*/
@Service
@Order(3)
public class SubManager extends BaseManager {
private Logger logger = LoggerFactory.getLogger(getClass());
@Resource
private SubRepository subRepository;
@Resource
private ProjectManager projectManager;
@Scheduled(cron = "0 0/45 * * * ?")
public void fetch() {
List<Project> projectList = projectManager.findAll();
for (Project project : projectList) {
fetchsub(project.getPrjid());
}
}
public void fetchsub(String prjid) {
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
map.add("func", "getsubscribe");
map.add("tokenid", getToken());
map.add("prjid", prjid);
try {
SubData subData = restTemplate.postForEntity(baseUrl, map,
SubData.class)
.getBody();
logger.info("返回值:" + subData);
if (Constant.SUCCESS.equals(subData.getResult())) {
saveSub(subData);
} else {
logger.info("获取sub信息失败");
}
} catch (Exception e) {
logger.info("获取sub信息失败");
e.printStackTrace();
}
}
public Sub createSub(String prjid, String memo) {
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
map.add("func", "createsubscribe");
map.add("tokenid", getToken());
map.add("prjid", prjid);
map.add("memo", memo);
try {
SubCreateData subData = restTemplate.postForEntity(baseUrl, map,
SubCreateData.class)
.getBody();
logger.info("返回值:" + subData);
if (Constant.SUCCESS.equals(subData.getResult())) {
return saveSub(subData, memo);
} else {
logger.info("获取sub信息失败");
return null;
}
} catch (Exception e) {
logger.info("获取sub信息失败");
e.printStackTrace();
return null;
}
}
private Sub save(Sub sub) {
Sub old = subRepository.findFirstBySubid(sub.getSubid());
if (old == null) {
return subRepository.save(sub);
}
return old;
}
public Sub findByName(String name) {
return subRepository.findFirstByName(name);
}
public List<Sub> findAll() {
return subRepository.findAll();
}
private Sub saveSub(SubCreateData subData, String memo) {
Sub sub = new Sub();
BeanUtils.copyProperties(subData, sub);
sub.setName(memo);
return save(sub);
}
private void saveSub(SubData subData) {
String prjid = subData.getPrjid();
if (subData.getData() == null) {
return;
}
for (Sub sub : subData.getData()) {
sub.setPrjid(prjid);
save(sub);
}
}
}
| [
"272551766@qq.com"
] | 272551766@qq.com |
d87ab5c7e02c9220a01caea6a54f567a8257ff5f | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/10/10_3ac97fd198a114fb45a710491c6a74a86a1d6887/ReportNamer/10_3ac97fd198a114fb45a710491c6a74a86a1d6887_ReportNamer_t.java | d886ec003d2e8e9f78dd200dcfa4dd386a238dd4 | [] | 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,328 | java | package net.thucydides.core.model;
import net.thucydides.core.digest.Digest;
import net.thucydides.core.model.features.ApplicationFeature;
import net.thucydides.core.util.NameConverter;
import org.apache.commons.lang3.StringUtils;
import static net.thucydides.core.util.NameConverter.withNoArguments;
import static net.thucydides.core.util.NameConverter.withNoIssueNumbers;
/**
* Determies the correct default name for test reports.
* @author johnsmart
*
*/
public class ReportNamer {
public static ReportNamer forReportType(ReportType type) {
return new ReportNamer(type);
}
private ReportType type;
private ReportNamer(final ReportType type) {
this.type = type;
}
/**
* Return a filesystem-friendly version of the test case name. The file system
* version should have no spaces and have the XML file suffix.
*/
public String getNormalizedTestNameFor(final TestOutcome testOutcome) {
String testName = getBaseTestNameFor(testOutcome);
return appendSuffixTo(Digest.ofTextValue(testName));
}
private String getBaseTestNameFor(TestOutcome testOutcome) {
String testName = "";
if (testOutcome.getUserStory() != null) {
testName = NameConverter.underscore(testOutcome.getUserStory().getName());
}
String scenarioName = NameConverter.underscore(testOutcome.getQualifiedMethodName());
return pathFrom(testOutcome) + withNoIssueNumbers(appendToIfNotNull(testName, scenarioName));
}
/**
* Return a filesystem-friendly version of the test case name. The filesytem
* version should have no spaces and have the XML file suffix.
*/
public String getSimpleTestNameFor(final TestOutcome testOutcome) {
String testName = "";
if (testOutcome.getUserStory() != null) {
testName = NameConverter.underscore(testOutcome.getUserStory().getName());
}
String scenarioName = NameConverter.underscore(testOutcome.getMethodName());
testName = pathFrom(testOutcome) + withNoIssueNumbers(withNoArguments(appendToIfNotNull(testName, scenarioName)));
return appendSuffixTo(Digest.ofTextValue(testName));
}
private String pathFrom(TestOutcome testOutcome) {
return (testOutcome.getPath() != null) ? testOutcome.getPath() + "/" : "";
}
private String appendToIfNotNull(final String baseString, final String nextElement) {
if (StringUtils.isNotEmpty(baseString)) {
return baseString + "_" + nextElement;
} else {
return nextElement;
}
}
public String getNormalizedTestNameFor(final Story userStory) {
return getNormalizedTestNameFor(userStory.getName());
}
public String getNormalizedTestNameFor(String name) {
String testNameWithUnderscores = NameConverter.underscore(name.toLowerCase());
return appendSuffixTo(Digest.ofTextValue(testNameWithUnderscores));
}
private String appendSuffixTo(final String testNameWithUnderscores) {
if (type == ReportType.ROOT) {
return testNameWithUnderscores;
} else {
return testNameWithUnderscores + "." + type.toString();
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
bdf2b9dc4f3887e4ff77891c5e9b457f3fac46f2 | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-new-fitness/results/XWIKI-13546-2-24-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage/org/xwiki/model/reference/EntityReference_ESTest.java | 634ae5ff9055d0f0e1c9d161fb26ee6477de4879 | [
"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 | 855 | java | /*
* This file was automatically generated by EvoSuite
* Sun May 17 18:06:18 UTC 2020
*/
package org.xwiki.model.reference;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.xwiki.model.EntityType;
import org.xwiki.model.reference.EntityReference;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class EntityReference_ESTest extends EntityReference_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
String string0 = "J[D*\"a:E_xP~hS!";
EntityType entityType0 = EntityType.ATTACHMENT;
EntityReference entityReference0 = new EntityReference("", entityType0);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
c4b74619dba03fbe5817c80c10c8c1785cb16e4a | 1b0c578992559628dc9b5f7c3abaf0d467a23899 | /src/RomaniTests/new_oop_tests/Test02.java | bab1716d500ed624b9f7b5abacdc9868f7af6d8e | [] | no_license | RomaniEzzatYoussef/Exercises | c9897b92507abf2d7ddc79f7e05b8b3d208f1dad | 396900c05dac95954f7ddbc424c5023deb562242 | refs/heads/master | 2020-09-25T05:52:16.701228 | 2019-12-13T19:26:12 | 2019-12-13T19:26:12 | 225,932,027 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 391 | java | package RomaniTests.new_oop_tests;
public class Test02
{
public static void main(String[] args)
{
Integer i = new Integer(2);
StringBuilder builder = new StringBuilder("java");
change(i, builder);
System.out.println(i);
System.out.println(builder);
}
private static void change(Integer i, StringBuilder builder)
{
i *= 5;;
builder.append(" and HTML");
}
} | [
"romaniezzat@hotmail.com"
] | romaniezzat@hotmail.com |
c9e222bc366e6a2e009a0e23b52d43b77e955a12 | f7d9e3c2c31acc023335331ca1cce940b1d054a3 | /demo-base/src/main/java/oauth2/oltu/simple/dao/SimpleOauth2AuthDaoImpl.java | 4bbe5d888bad0bed6892fef12fe248d9645068af | [] | no_license | ht5678/yzh-learn | ed6fc6d1ef7497bcc44c18d0af3f017388da8521 | c58ffe44b7b568c61164e1f9daf0ffea09ee3771 | refs/heads/master | 2023-02-25T12:09:04.037844 | 2022-08-23T16:19:21 | 2022-08-23T16:19:21 | 144,949,753 | 0 | 1 | null | 2023-02-22T02:43:39 | 2018-08-16T06:59:39 | Java | UTF-8 | Java | false | false | 1,735 | java | package oauth2.oltu.simple.dao;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.annotation.Resource;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.ResultSetExtractor;
import org.springframework.stereotype.Component;
import oauth2.oltu.simple.model.ClientModel;
/**
*
* @author yuezh2 2017年7月31日 下午5:52:10
*
*/
@Component
public class SimpleOauth2AuthDaoImpl implements SimpleOauth2AuthDao {
@Resource(name="otemplate")
private JdbcTemplate template;
/** LOGGER */
private static final Logger LOGGER = Logger.getLogger(SimpleOauth2AuthDaoImpl.class);
/** 通过clientId查询设备信息 */
private static final String QUERY_CLIENT_BY_ID = "select * from oauth_simple.oauth_client_details where client_id=?";
/**
* 通过设备id查询
* @param clientId
* @return
*/
public ClientModel queryByClientId(String clientId){
final ClientModel model = new ClientModel();
if(StringUtils.isEmpty(clientId)){
return model;
}
try{
template.query(QUERY_CLIENT_BY_ID, new Object[]{clientId}, new ResultSetExtractor<Integer>(){
@Override
public Integer extractData(ResultSet rs) throws SQLException, DataAccessException {
while(rs.next()){
model.setClientId(rs.getString("client_id"));
model.setClientName(rs.getString("client_name"));
model.setRedirectUri(rs.getString("redirect_uri"));
}
return null;
}
});
}catch(Exception e){
LOGGER.error(String.format("the error occured:%s", e.getMessage()), e);
}
return model;
}
}
| [
"sdwhyzhh@163.com"
] | sdwhyzhh@163.com |
4b61f99956dbcf3c99c34a058f4463f5b50ef3dd | 6252c165657baa6aa605337ebc38dd44b3f694e2 | /org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/TemperatureController422.java | 4597f59f0e1f4566750e45882e97ef36a150c7e7 | [] | 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 | 364 | java | package syncregions;
public class TemperatureController422 {
public execute(int temperature422, int targetTemperature422) {
//sync _bfpnFUbFEeqXnfGWlV2422, 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 |
b76bc379bae9eefa558d3f9dbcda6bf3d0fe40fb | 4d37505edab103fd2271623b85041033d225ebcc | /spring-web/src/main/java/org/springframework/web/context/support/GroovyWebApplicationContext.java | 72dc6d80e06725b28d736ef95c6b44137054247d | [
"Apache-2.0"
] | permissive | huifer/spring-framework-read | 1799f1f073b65fed78f06993e58879571cc4548f | 73528bd85adc306a620eedd82c218094daebe0ee | refs/heads/master | 2020-12-08T08:03:17.458500 | 2020-03-02T05:51:55 | 2020-03-02T05:51:55 | 232,931,630 | 6 | 2 | Apache-2.0 | 2020-03-02T05:51:57 | 2020-01-10T00:18:15 | Java | UTF-8 | Java | false | false | 8,065 | 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
*
* 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 org.springframework.web.context.support;
import groovy.lang.GroovyObject;
import groovy.lang.GroovySystem;
import groovy.lang.MetaClass;
import org.springframework.beans.BeanWrapper;
import org.springframework.beans.BeanWrapperImpl;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.lang.Nullable;
import java.io.IOException;
/**
* {@link org.springframework.web.context.WebApplicationContext} implementation which takes
* its configuration from Groovy bean definition scripts and/or XML files, as understood by
* a {@link org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader}.
* This is essentially the equivalent of
* {@link org.springframework.context.support.GenericGroovyApplicationContext}
* for a web environment.
*
* <p>By default, the configuration will be taken from "/WEB-INF/applicationContext.groovy"
* for the root context, and "/WEB-INF/test-servlet.groovy" for a context with the namespace
* "test-servlet" (like for a DispatcherServlet instance with the servlet-name "test").
*
* <p>The config location defaults can be overridden via the "contextConfigLocation"
* context-param of {@link org.springframework.web.context.ContextLoader} and servlet
* init-param of {@link org.springframework.web.servlet.FrameworkServlet}. Config locations
* can either denote concrete files like "/WEB-INF/context.groovy" or Ant-style patterns
* like "/WEB-INF/*-context.groovy" (see {@link org.springframework.util.PathMatcher}
* javadoc for pattern details). Note that ".xml" files will be parsed as XML content;
* all other kinds of resources will be parsed as Groovy scripts.
*
* <p>Note: In case of multiple config locations, later bean definitions will
* override ones defined in earlier loaded files. This can be leveraged to
* deliberately override certain bean definitions via an extra Groovy script.
*
* <p><b>For a WebApplicationContext that reads in a different bean definition format,
* create an analogous subclass of {@link AbstractRefreshableWebApplicationContext}.</b>
* Such a context implementation can be specified as "contextClass" context-param
* for ContextLoader or "contextClass" init-param for FrameworkServlet.
*
* @author Juergen Hoeller
* @see #setNamespace
* @see #setConfigLocations
* @see org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader
* @see org.springframework.web.context.ContextLoader#initWebApplicationContext
* @see org.springframework.web.servlet.FrameworkServlet#initWebApplicationContext
* @since 4.1
*/
public class GroovyWebApplicationContext extends AbstractRefreshableWebApplicationContext implements GroovyObject {
/**
* Default config location for the root context.
*/
public static final String DEFAULT_CONFIG_LOCATION = "/WEB-INF/applicationContext.groovy";
/**
* Default prefix for building a config location for a namespace.
*/
public static final String DEFAULT_CONFIG_LOCATION_PREFIX = "/WEB-INF/";
/**
* Default suffix for building a config location for a namespace.
*/
public static final String DEFAULT_CONFIG_LOCATION_SUFFIX = ".groovy";
private final BeanWrapper contextWrapper = new BeanWrapperImpl(this);
private MetaClass metaClass = GroovySystem.getMetaClassRegistry().getMetaClass(getClass());
/**
* Loads the bean definitions via an GroovyBeanDefinitionReader.
*
* @see org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader
* @see #initBeanDefinitionReader
* @see #loadBeanDefinitions
*/
@Override
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws BeansException, IOException {
// Create a new XmlBeanDefinitionReader for the given BeanFactory.
GroovyBeanDefinitionReader beanDefinitionReader = new GroovyBeanDefinitionReader(beanFactory);
// Configure the bean definition reader with this context's
// resource loading environment.
beanDefinitionReader.setEnvironment(getEnvironment());
beanDefinitionReader.setResourceLoader(this);
// Allow a subclass to provide custom initialization of the reader,
// then proceed with actually loading the bean definitions.
initBeanDefinitionReader(beanDefinitionReader);
loadBeanDefinitions(beanDefinitionReader);
}
/**
* Initialize the bean definition reader used for loading the bean
* definitions of this context. Default implementation is empty.
* <p>Can be overridden in subclasses.
*
* @param beanDefinitionReader the bean definition reader used by this context
*/
protected void initBeanDefinitionReader(GroovyBeanDefinitionReader beanDefinitionReader) {
}
/**
* Load the bean definitions with the given GroovyBeanDefinitionReader.
* <p>The lifecycle of the bean factory is handled by the refreshBeanFactory method;
* therefore this method is just supposed to load and/or register bean definitions.
* <p>Delegates to a ResourcePatternResolver for resolving location patterns
* into Resource instances.
*
* @throws IOException if the required Groovy script or XML file isn't found
* @see #refreshBeanFactory
* @see #getConfigLocations
* @see #getResources
* @see #getResourcePatternResolver
*/
protected void loadBeanDefinitions(GroovyBeanDefinitionReader reader) throws IOException {
String[] configLocations = getConfigLocations();
if (configLocations != null) {
for (String configLocation : configLocations) {
reader.loadBeanDefinitions(configLocation);
}
}
}
/**
* The default location for the root context is "/WEB-INF/applicationContext.groovy",
* and "/WEB-INF/test-servlet.groovy" for a context with the namespace "test-servlet"
* (like for a DispatcherServlet instance with the servlet-name "test").
*/
@Override
protected String[] getDefaultConfigLocations() {
if (getNamespace() != null) {
return new String[]{DEFAULT_CONFIG_LOCATION_PREFIX + getNamespace() + DEFAULT_CONFIG_LOCATION_SUFFIX};
}
else {
return new String[]{DEFAULT_CONFIG_LOCATION};
}
}
// Implementation of the GroovyObject interface
@Override
public MetaClass getMetaClass() {
return this.metaClass;
}
@Override
public void setMetaClass(MetaClass metaClass) {
this.metaClass = metaClass;
}
@Override
public Object invokeMethod(String name, Object args) {
return this.metaClass.invokeMethod(this, name, args);
}
@Override
public void setProperty(String property, Object newValue) {
this.metaClass.setProperty(this, property, newValue);
}
@Override
@Nullable
public Object getProperty(String property) {
if (containsBean(property)) {
return getBean(property);
}
else if (this.contextWrapper.isReadableProperty(property)) {
return this.contextWrapper.getPropertyValue(property);
}
throw new NoSuchBeanDefinitionException(property);
}
}
| [
"huifer97@163.com"
] | huifer97@163.com |
a6eaa964f8aa9613d2feb20527089835931f71eb | 9a5a88121bb5491719e7f867101e42b2cf3eee3e | /src/thi_modul2/Validata.java | 88e4e5d2ddb30eab921f8186fdbd4236a9545e9f | [] | no_license | khoa110298/module2 | fe2839a5ab25b1d7ae8d732171dcdbdf39ce5f53 | 496a375ae9f0e63d752d7ba5aaeef4a4af179ad3 | refs/heads/master | 2022-12-28T23:28:34.764010 | 2020-10-18T01:01:42 | 2020-10-18T01:01:42 | 293,729,126 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,048 | java | package thi_modul2;
import castudy.commons.BirthdayException;
import java.util.Calendar;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Validata {
public static final String NGAY_SINH = "^([0][1-9]|[1-2][0-9]|[3][0-1])[/]([0][1-9]|[1][0-2])[/]\\d{4}$";
private static Pattern pattern;
private static Matcher matcher;
public static boolean isValiDayOfBirth(String regex) {
pattern = Pattern.compile(NGAY_SINH);
matcher = pattern.matcher(regex);
return matcher.matches();
}
// private static final String REGEX_TEN = "^[A-Za-z]{4,50}$";
// private static final String REGEX_NGAYSINH = "^\\d{2}/\\d{2}/\\d{4}$";
// private static final String REGEX_SODIENTHOAI = "^(090)|(091)\\d{7}$";
//
// public static void kiemTraTen(String ten) throws TenException {
// pattern = Pattern.compile(REGEX_TEN);
// matcher = pattern.matcher(ten);
// if (!matcher.find()) throw new TenException("Ten khong hop le !!!");
// }
//
// public static void kiemTraNgaySinh(String ngaySinh) throws NgaySinhException {
// pattern = Pattern.compile(REGEX_NGAYSINH);
// matcher = pattern.matcher(ngaySinh);
// if (!matcher.find()) throw new NgaySinhException("Ngay sinh khong hop le !!!");
// }
//
// public static void kiemTraSoDienThoai(String soDienThoai) throws SoDienThoaiException {
// pattern = Pattern.compile(REGEX_SODIENTHOAI);
// matcher = pattern.matcher(soDienThoai);
// if (!matcher.find()) throw new SoDienThoaiException("Ngay sinh khong hop le !!!");
// }
//
// public static void kiemTraID(int id) throws NotFoundStudentException {
// DocFile.docFileSinhVien();
// boolean flag = false;
// for (SinhVien sinhVien: ThucDonChinh.sinhVienList) {
// if (sinhVien.getId() == id) {
// flag = true;
// break;
// }
// }
//
// if (!flag) throw new NotFoundStudentException("Sinh vien khong ton tai");
// }
}
| [
"nguyenkhoa15011998@gmail.com"
] | nguyenkhoa15011998@gmail.com |
52e905e234ec0f7918366afc3d26474fff68a722 | 7dbbe21b902fe362701d53714a6a736d86c451d7 | /BzenStudio-5.6/Source/com/zend/ide/u/bd.java | 2ccf5376ede1722d295553a6becf7054bb9dc926 | [] | no_license | HS-matty/dev | 51a53b4fd03ae01981549149433d5091462c65d0 | 576499588e47e01967f0c69cbac238065062da9b | refs/heads/master | 2022-05-05T18:32:24.148716 | 2022-03-20T16:55:28 | 2022-03-20T16:55:28 | 196,147,486 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,995 | java | package com.zend.ide.u;
import com.zend.ide.util.a.b;
import com.zend.ide.util.c.f;
import com.zend.ide.util.dj;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
public class bd
{
private static ce a;
private static cd b;
private static boolean c;
public static boolean a(JFrame paramJFrame, bh parambh, boolean paramBoolean)
{
int i = 0;
String str1 = "";
String str2 = "";
String str3 = "";
int j = 0;
int k = 3;
String str4 = parambh.l();
if ((a != null) && ((str4 == null) || (str4.length() == 0)))
{
i = 1;
str1 = a.c();
str2 = a.e();
str3 = a.g();
j = a.a();
k = a.b();
}
a = new ce(paramJFrame, parambh, paramBoolean);
if (i != 0)
{
a.a(str1, true);
a.a(str2);
a.c(str3);
a.c(j);
a.d(k);
}
a.setVisible(true);
int m = 0;
if (a.n())
m = 1;
return m;
}
public static boolean a(JFrame paramJFrame, bh parambh)
{
String str1 = parambh.m() == null ? "" : parambh.m();
String str2 = parambh.n() == null ? "" : parambh.n();
boolean bool1 = parambh.p();
int i = parambh.a();
boolean bool2 = a(paramJFrame, parambh, false);
if ((bool2) && (str1.equals(a.e())) && (str2.equals(a.f())) && (bool1 == a.j()) && (i == a.a()))
bool2 = false;
return bool2;
}
public static boolean a(bh parambh)
{
String str1 = parambh.l();
String str2 = parambh.m();
String str3 = parambh.n();
return (str1 != null) && (!str1.equals("")) && (str2 != null) && (!str2.equals("")) && (str3 != null) && (!str3.equals(""));
}
public static void a(JFrame paramJFrame, bh parambh, boolean paramBoolean1, boolean paramBoolean2, Runnable paramRunnable)
{
boolean bool = a(parambh);
if (!bool)
bool = a(paramJFrame, parambh, true);
if (!bool)
return;
if (b == null)
b = new cd(paramJFrame);
b.a(parambh);
b.a();
if (!paramBoolean2)
{
a(parambh, paramBoolean1, paramRunnable);
return;
}
be localbe = new be(parambh, paramBoolean1, paramRunnable);
f localf = com.zend.ide.util.c.h.c().a(localbe, false);
localf.h();
}
private static synchronized void a(bh parambh, boolean paramBoolean, Runnable paramRunnable)
{
c = false;
try
{
parambh.f();
b.setVisible(false);
if (paramBoolean)
com.zend.ide.j.h.m.a(parambh);
}
catch (bt localbt)
{
}
catch (dj localdj)
{
b.setVisible(false);
if (!c)
{
String str1 = localdj.d();
int i = (str1 != null) && (!str1.equals("")) && (!str1.equals(parambh.l())) ? 1 : 0;
String str2 = localdj.getMessage() + (i != 0 ? ", " + str1 : "");
throw new dj(str2);
}
}
catch (Exception localException)
{
b.setVisible(false);
if (!c)
b.a(localException);
}
if (paramRunnable != null)
SwingUtilities.invokeLater(paramRunnable);
}
public static void b(bh parambh, boolean paramBoolean, Runnable paramRunnable)
{
if (!paramBoolean)
{
a(parambh, paramRunnable);
return;
}
bf localbf = new bf(parambh, paramRunnable);
f localf = com.zend.ide.util.c.h.c().a(localbf, false);
localf.h();
}
private static synchronized void a(bh parambh, Runnable paramRunnable)
{
try
{
parambh.g();
}
catch (bt localbt)
{
}
if (paramRunnable != null)
SwingUtilities.invokeLater(paramRunnable);
}
static void c(bh parambh, boolean paramBoolean, Runnable paramRunnable)
{
a(parambh, paramBoolean, paramRunnable);
}
static void b(bh parambh, Runnable paramRunnable)
{
a(parambh, paramRunnable);
}
static boolean a(boolean paramBoolean)
{
return bd.c = paramBoolean;
}
}
/* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar
* Qualified Name: com.zend.ide.u.bd
* JD-Core Version: 0.6.0
*/ | [
"byqdes@gmail.com"
] | byqdes@gmail.com |
a94b4461a1be35d586bd52fb164c56fe84787890 | 9c21c3c2a11b787d80c2754ede7960af29d37731 | /server/src/org/apollo/game/command/Command.java | 44c6c070667ac360e102c182d5e97583af4b0285 | [
"ISC"
] | permissive | rafaelstronger/aj8 | fca643c3ee15526bd685369fd17598bd4fdfaaaf | ed559054d495e0e720d4f4dd65d6d21236d684e1 | refs/heads/master | 2021-01-14T13:42:50.796105 | 2014-03-03T04:09:04 | 2014-03-03T04:09:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 762 | java |
package org.apollo.game.command;
/**
* Represents a command.
* @author Graham
*/
public final class Command
{
/**
* The name of the command.
*/
private final String name;
/**
* The command's arguments.
*/
private final String[] arguments;
/**
* Creates the command.
* @param name The name of the command.
* @param arguments The command's arguments.
*/
public Command( String name, String[] arguments )
{
this.name = name;
this.arguments = arguments;
}
/**
* Gets the name of the command.
* @return The name of the command.
*/
public String getName()
{
return name;
}
/**
* Gets the command's arguments.
* @return The command's arguments.
*/
public String[] getArguments()
{
return arguments;
}
}
| [
"ryley.kimmel@live.com"
] | ryley.kimmel@live.com |
246d850f58578cb433b0da4f8a80717d5d91f0c4 | 46ef04782c58b3ed1d5565f8ac0007732cddacde | /platform.core/metamodel.emfapi/src/org/modelio/metamodel/uml/behavior/stateMachineModel/ShallowHistoryPseudoState.java | e256d2bed16f6f85452e34d1cee01990b08324ec | [] | no_license | daravi/modelio | 844917412abc21e567ff1e9dd8b50250515d6f4b | 1787c8a836f7e708a5734d8bb5b8a4f1a6008691 | refs/heads/master | 2020-05-26T17:14:03.996764 | 2019-05-23T21:30:10 | 2019-05-23T21:30:45 | 188,309,762 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,183 | java | /*
* Copyright 2013-2018 Modeliosoft
*
* This file is part of Modelio.
*
* Modelio is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Modelio 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 Modelio. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* WARNING: GENERATED FILE - DO NOT EDIT
Metamodel: Standard, version 2.3.00, by Modeliosoft
Generator version: 3.8.00
Generated on: Sep 7, 2018
*/
package org.modelio.metamodel.uml.behavior.stateMachineModel;
import com.modeliosoft.modelio.javadesigner.annotations.objid;
/**
* ShallowHistoryPseudoState v0.0.9054
*
*
* ShallowHistoryPseudoState represents the most recent active substate of its containing state (but not the substates of that substate).
*
* A composite state can have at most one shallow history vertex. A transition coming into the shallow history vertex is equivalent to a transition coming into the most recent active substate of a state. At most one transition may originate from the history connector to the default shallow history state. This transition is taken in case the composite state had never been active before. Entry actions of states entered on the path to the state represented by a shallow history are performed.
*/
@objid ("0052e8a6-c4bf-1fd8-97fe-001ec947cd2a")
public interface ShallowHistoryPseudoState extends AbstractPseudoState {
/**
* The metaclass simple name.
*/
@objid ("69615ab7-ad21-4f37-9796-d7adf47b719f")
public static final String MNAME = "ShallowHistoryPseudoState";
/**
* The metaclass qualified name.
*/
@objid ("17a74418-0650-4c84-bf47-60d189ab4877")
public static final String MQNAME = "Standard.ShallowHistoryPseudoState";
}
| [
"puya@motionmetrics.com"
] | puya@motionmetrics.com |
f2e09d53034abe3414d271c68eb9e0c3f0d49085 | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes2.dex_source_from_JADX/com/facebook/appupdate/AppUpdatePersistence.java | 55965c757cb05944dcf8b6dd04dc8abeee2eaef1 | [] | no_license | pxson001/facebook-app | 87aa51e29195eeaae69adeb30219547f83a5b7b1 | 640630f078980f9818049625ebc42569c67c69f7 | refs/heads/master | 2020-04-07T20:36:45.758523 | 2018-03-07T09:04:57 | 2018-03-07T09:04:57 | 124,208,458 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,284 | java | package com.facebook.appupdate;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Pair;
import com.facebook.tools.dextr.runtime.detour.SQLiteDetour;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
/* compiled from: ranking_config */
public class AppUpdatePersistence {
private final Context f8285a;
private SQLiteDatabase f8286b;
@Inject
public AppUpdatePersistence(Context context) {
this.f8285a = context;
}
public final long m12802a(byte[] bArr) {
if (this.f8286b == null) {
this.f8286b = new DbHelper(this.f8285a).getWritableDatabase();
}
ContentValues contentValues = new ContentValues();
contentValues.put("data", bArr);
SQLiteDetour.a(1957104899);
long insert = this.f8286b.insert("app_updates", null, contentValues);
SQLiteDetour.a(-1365783038);
return insert;
}
public final void m12805a(long j, byte[] bArr) {
if (this.f8286b == null) {
this.f8286b = new DbHelper(this.f8285a).getWritableDatabase();
}
ContentValues contentValues = new ContentValues();
contentValues.put("id", Long.valueOf(j));
contentValues.put("data", bArr);
SQLiteDetour.a(this.f8286b, -1302973955);
try {
this.f8286b.delete("app_updates", "id = ?", new String[]{String.valueOf(j)});
SQLiteDetour.a(-1945763053);
this.f8286b.insert("app_updates", null, contentValues);
SQLiteDetour.a(170249287);
this.f8286b.setTransactionSuccessful();
} finally {
SQLiteDetour.b(this.f8286b, -880813214);
}
}
public final void m12804a(long j) {
if (this.f8286b == null) {
this.f8286b = new DbHelper(this.f8285a).getWritableDatabase();
}
this.f8286b.delete("app_updates", "id = ?", new String[]{String.valueOf(j)});
}
public final List<Pair<Long, byte[]>> m12803a() {
Cursor query;
Throwable th;
if (this.f8286b == null) {
this.f8286b = new DbHelper(this.f8285a).getWritableDatabase();
}
List<Pair<Long, byte[]>> arrayList = new ArrayList();
try {
query = this.f8286b.query("app_updates", null, null, null, null, null, null);
try {
int columnIndex = query.getColumnIndex("id");
int columnIndex2 = query.getColumnIndex("data");
while (query.moveToNext()) {
arrayList.add(new Pair(Long.valueOf(query.getLong(columnIndex)), query.getBlob(columnIndex2)));
}
if (query != null) {
query.close();
}
return arrayList;
} catch (Throwable th2) {
th = th2;
if (query != null) {
query.close();
}
throw th;
}
} catch (Throwable th3) {
th = th3;
query = null;
if (query != null) {
query.close();
}
throw th;
}
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
40f102ed0e93b383238dda3181504707cac3dda9 | fed36f61461c526c4c7455bb80a51da7f797d348 | /moql-cep/src/main/java/org/moql/cep/sw/MatcherWindow.java | 95598b0d1f3d653f54bebcc344aaaa6c5adbd754 | [
"Apache-2.0"
] | permissive | singer568/moql | b991be29d5ffb588161ea599d9c490a3a5440ce4 | 6980b00d2a6e1b121794161a7d01476edf8a430a | refs/heads/master | 2021-05-10T11:03:28.571959 | 2017-12-19T03:48:08 | 2017-12-19T03:48:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,592 | java | package org.moql.cep.sw;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.Validate;
import org.moql.EntityMap;
import org.moql.EntityMapImpl;
import org.moql.MoqlException;
import org.moql.Operand;
import org.moql.cep.metadata.CeperMetadata;
import org.moql.engine.MoqlEngine;
import java.util.List;
/**
* Created by tangtadin on 17/1/25.
*/
public class MatcherWindow<T> extends AbstractWindow<T> {
public static final String PARAM_MATCHER_EXPRESSION = "win.matcher.expression";
protected Operand operand;
protected Object curValue;
protected EntityMap entityMap = new EntityMapImpl();
public MatcherWindow(String eventStreamName, CeperMetadata metadata) {
super(eventStreamName, metadata);
String expression = metadata.getParameters().get(PARAM_MATCHER_EXPRESSION);
Validate.notEmpty(expression, "matcher expression is empty!");
try {
operand = MoqlEngine.createOperand(expression);
} catch (MoqlException e) {
throw new IllegalArgumentException("matcher expression is invalid!");
}
}
@Override public synchronized void push(List<T> dataSet) {
for(T entity : dataSet) {
push(entity);
}
}
@Override public synchronized void push(T entity) {
entityMap.putEntity(eventStreamName, entity);
Object value = operand.operate(entityMap);
if (!ObjectUtils.equals(curValue, value)) {
if (curBucket.size() != 0) {
operate();
updateBuckets();
}
curValue = value;
}
curBucket.add(entity);
}
@Override public void onTick(int tick) {
}
}
| [
"ttd_ttt@sina.com.cn"
] | ttd_ttt@sina.com.cn |
dbfeb519fbcace86903cd71f517143db3e9312e7 | 5c6d5df18d9ed6328808c7d1c8678a27c648d0b4 | /src/test/java/SaurceLabs.java | b7571eeb3d1c01cf3f427e62dc65e5e1299bd602 | [] | no_license | carlacavli/SeleniumGrid | 8e7f48b6995776d0463fb8b0d32e3b94b0a6e4f0 | 351209eed993955c01c896ec9ea9c03bf8ad11de | refs/heads/master | 2021-02-28T15:15:35.567228 | 2020-03-07T21:29:18 | 2020-03-07T21:29:18 | 245,708,363 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,152 | java | import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
import java.net.MalformedURLException;
import java.net.URL;
public class SaurceLabs {
private WebDriver driver;
@Parameters({"browser"})
@BeforeClass
public void setup(String browser) throws MalformedURLException {
DesiredCapabilities cap = new DesiredCapabilities();
cap.setBrowserName(browser);
cap.setPlatform( Platform.MAC );
cap.setCapability("name", "Web Driver demo Test");
URL url = new URL("https://daulet:f098ca38-48d4-4f88-9667-acd7336db9c4@ondemand.saucelabs.com:443/wd/hub");
driver = new RemoteWebDriver(url, cap);
}
@Test
public void test() {
driver.get("https://google.com");
driver.manage().window().maximize();
}
@AfterClass
public void quit() {
driver.quit();
}
}
| [
"info@techno.study"
] | info@techno.study |
87cfb34228dc7ad847f2efa3e13864090345bfc8 | d4b17a1dde0309ea8a1b2f6d6ae640e44a811052 | /lang_interface/java/com/intel/daal/algorithms/adaboost/training/TrainingResult.java | d8046e4b2711cdb777244475246f0e50015a8605 | [
"Apache-2.0",
"Intel"
] | permissive | h2oai/daal | c50f2b14dc4a9ffc0b7f7bcb40b599cadac6d333 | d49815df3040f3872a1fdb9dc99ee86148e4494e | refs/heads/daal_2018_beta_update1 | 2023-05-25T17:48:44.312245 | 2017-09-29T13:30:10 | 2017-09-29T13:30:10 | 96,125,165 | 2 | 3 | null | 2017-09-29T13:30:11 | 2017-07-03T15:26:26 | C++ | UTF-8 | Java | false | false | 2,105 | java | /* file: TrainingResult.java */
/*******************************************************************************
* Copyright 2014-2017 Intel Corporation
*
* 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.
*******************************************************************************/
/**
* @ingroup adaboost_training
* @{
*/
package com.intel.daal.algorithms.adaboost.training;
import com.intel.daal.algorithms.ComputeMode;
import com.intel.daal.algorithms.adaboost.Model;
import com.intel.daal.algorithms.classifier.training.TrainingResultId;
import com.intel.daal.services.DaalContext;
/**
* <a name="DAAL-CLASS-ALGORITHMS__ADABOOST__TRAINING__TRAININGRESULT"></a>
* @brief Provides methods to access final results obtained with the compute() method of the AdaBoost training algorithm in the batch processing mode
*/
public final class TrainingResult extends com.intel.daal.algorithms.boosting.training.TrainingResult {
/** @private */
static {
System.loadLibrary("JavaAPI");
}
public TrainingResult(DaalContext context, long cObject) {
super(context, cObject);
}
/**
* Returns the final result of the AdaBoost training algorithm
* @param id Identifier of the result
* @return %Result that corresponds to the given identifier
*/
@Override
public Model get(TrainingResultId id) {
if (id != TrainingResultId.model) {
throw new IllegalArgumentException("type unsupported");
}
return new Model(getContext(), cGetModel(cObject, TrainingResultId.model.getValue()));
}
}
/** @} */
| [
"vasily.rubtsov@intel.com"
] | vasily.rubtsov@intel.com |
293cd1d4d2762ae19ddd4a5c0eef8b556bfda848 | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/tencent/mm/pluginsdk/ui/applet/g$5.java | 1200c97ea17cd0abdd465bde49e3205022bc14c0 | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 734 | java | package com.tencent.mm.pluginsdk.ui.applet;
import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.mm.pluginsdk.ui.applet.q.a;
import com.tencent.mm.ui.base.o;
class g$5 implements OnClickListener {
final /* synthetic */ o qIB;
final /* synthetic */ a qIz;
final /* synthetic */ View val$view;
g$5(a aVar, View view, o oVar) {
this.qIz = aVar;
this.val$view = view;
this.qIB = oVar;
}
public final void onClick(View view) {
if (this.qIz != null) {
this.qIz.a(true, g.df(this.val$view), g.dg(this.val$view));
}
this.qIB.dismiss();
this.qIB.setFocusable(false);
this.qIB.setTouchable(false);
}
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
35c9abafdb6b7c539ba042cee0c578e12a99081f | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a102/A102167Test.java | 8cd8568baae6eff57ba6eef9174eefc8f1c8dd7e | [] | 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 | 195 | java | package irvine.oeis.a102;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A102167Test extends AbstractSequenceTest {
}
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
9efacfeadbefd8084ae5ab8f25b30cda9e3e23d3 | e95e8b2d272f136c1886ee100894bfdfbb677afd | /core/src/main/java/io/github/mmm/ui/api/attribute/AttributeWriteToggleGroup.java | 7011040deb898baf2604bc9117f9dbe65629b8ce | [
"Apache-2.0"
] | permissive | safibarri/ui-api | 6b3443bc9f89fa9bf4d493be15ab88cb60e1c0db | d85b6ad5a45f7cc345b47294a8a476cf7cfbcefd | refs/heads/master | 2022-11-22T17:37:03.760197 | 2020-06-29T08:01:37 | 2020-06-29T08:01:37 | 270,618,639 | 0 | 0 | Apache-2.0 | 2020-06-08T10:04:30 | 2020-06-08T10:04:30 | null | UTF-8 | Java | false | false | 805 | java | /* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package io.github.mmm.ui.api.attribute;
import io.github.mmm.ui.api.UiToggleGroup;
/**
* Interface to {@link #getToggleGroup() read} and {@link #setToggleGroup(UiToggleGroup) write} a {@link UiToggleGroup}.
*
* @since 1.0.0
*/
public abstract interface AttributeWriteToggleGroup {
/**
* @return he {@link UiToggleGroup} that combines multiple
* {@link io.github.mmm.ui.api.widget.value.UiAbstractRadioButton radio buttons} so that only one out of the
* group can be selected.
*/
UiToggleGroup getToggleGroup();
/**
* @param group the new {@link #getToggleGroup() toggle group}.
*/
void setToggleGroup(UiToggleGroup group);
}
| [
"hohwille@users.sourceforge.net"
] | hohwille@users.sourceforge.net |
3c9934bfd634e8714accd515319c358cf65a31b1 | 9adb1ba9e87fa8eaa3631bb177c1eb7c4b6b14e7 | /src/main/java/com/coinblesk/json/v1/UserAccountStatusTO.java | fbfee3a63b1774a7c95a0223b9cbdb338c296514 | [
"Apache-2.0"
] | permissive | coinblesk/coinblesk-shared-resources | 1a9927d4f8166b7a7e059124896122e40f987016 | 09c42f72478b124dca6e018100b63fa27467f2f5 | refs/heads/master | 2020-03-28T06:48:07.530983 | 2017-09-28T11:29:24 | 2017-09-28T11:29:24 | 32,333,595 | 0 | 5 | null | 2017-03-16T11:00:38 | 2015-03-16T15:15:39 | Java | UTF-8 | Java | false | false | 790 | java | /*
* Copyright 2016 The Coinblesk team and the CSG Group at University of Zurich
*
* 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.coinblesk.json.v1;
/**
*
* @author Thomas Bocek
*/
public class UserAccountStatusTO extends BaseTO<UserAccountStatusTO> {
}
| [
"tom@tomp2p.net"
] | tom@tomp2p.net |
3d79e2f4d78a02e569ed02e5f9f7d016973429cf | 63ac758aa771d493d56b9d7a2a9b3aa6a43d8799 | /백준/Bronze/14215. 세 막대/세 막대.java | 4ae4165203d05be7b68d23d5be69d5b673fcadf1 | [] | no_license | J511Y/Algorithm | 7c25e84724ca3ccb7c72d330a34d06155fe1eca3 | aa73beaa7647b545abcf75b7469f5909ca0c5478 | refs/heads/master | 2023-05-29T22:14:44.337095 | 2023-05-26T10:37:17 | 2023-05-26T10:37:17 | 234,313,177 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 309 | java | import java.util.*;
class Main {
public static void main(String[] ar) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt(), max = Math.max(Math.max(a, b), c), other = (a + b + c) - max;
while (max >= other) max--;
System.out.print(other + max);
}
} | [
"47891005+J511Y@users.noreply.github.com"
] | 47891005+J511Y@users.noreply.github.com |
5f6d9862e2be92cb28cb76ea575030f11bf2b59b | 7a64ed7182373e2967737fa9f10459d30d7a01f5 | /Chapter 3/Struts2Action/WEB-INF/src/com/kogent/action/UserAction.java | aed6e63c891d74ff98051b902d66957028780d62 | [] | no_license | srirambtechit/struts2-project | db1d1e10494df061994dc0290fc2163ba77fe65c | cbcab9a39b8598c0b778abced2a02614d0643d4b | refs/heads/master | 2021-01-19T02:48:46.079858 | 2016-06-19T10:04:38 | 2016-06-19T10:04:38 | 55,705,216 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,329 | java | package com.kogent.action;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import org.apache.struts2.interceptor.ApplicationAware;
import com.kogent.User;
import com.opensymphony.xwork2.ActionSupport;
public class UserAction extends ActionSupport implements ApplicationAware{
String username;
String password;
String city;
String email;
String type;
Map application;
public void setApplication(Map application) {
this.application=application;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String execute() throws Exception {
ArrayList users=(ArrayList)application.get("users");
if(users==null){
users=new ArrayList();
}
if(getUser(username)==null){
users.add(buildUser());
application.put("users", users);
}else{
this.addActionError("User Name is in use.");
return ERROR;
}
return SUCCESS;
}
public String edit() throws Exception{
ArrayList users=(ArrayList)application.get("users");
User user=null;
int index=0;
Iterator it=users.iterator();
while(it.hasNext()){
user=(User)it.next();
if(user.getUsername().equals(username)){
break;
}
index++;
}
User newuser=buildUser();
users.set(index, newuser);
application.put("users", users);
return SUCCESS;
}
public String deleteUser() throws Exception{
ArrayList users=(ArrayList)application.get("users");
User user=null;
int index=0;
Iterator it=users.iterator();
while(it.hasNext()){
user=(User)it.next();
if(user.getUsername().equals(username)){
break;
}
index++;
}
users.remove(index);
application.put("users", users);
return SUCCESS;
}
public User buildUser(){
User user=new User();
user.setUsername(username);
user.setPassword(password);
user.setCity(city);
user.setEmail(email);
user.setType(type);
return user;
}
public User getUser(String username){
User user=new User();
boolean found=false;
ArrayList users=(ArrayList)application.get("users");
if(users!=null){
Iterator it=users.iterator();
while(it.hasNext()){
user=(User)it.next();
if(username.equals(user.getUsername())){
found=true;
break;
}
}
if(found){
return user;
}
}
return null;
}
public void validate() {
if ( (username == null ) || (username.length() == 0) ) {
this.addFieldError("username", getText("app.username.blank"));
}
if ( (password == null ) || (password.length() == 0) ) {
this.addFieldError("password", getText("app.password.blank"));
}
if ( (email == null ) || (email.length() == 0) ) {
this.addFieldError("email", getText("app.email.blank"));
}
}
}
| [
"srirambtecit@gmail.com"
] | srirambtecit@gmail.com |
a57574ab749a69375b69c1009b79a8a32531b743 | 86b4ab9694210489f670cb8a8b1275677c7799c4 | /JMonkey-Modules/JMonkey-Modules-UPMS/src/main/java/com/wang/jmonkey/cloud/modules/upms/model/entity/SysUserRoleEntity.java | 824c9b35f6a7ec1a1077fafaed49bbad319311fd | [] | no_license | hejiawang/JMonkey-Cloud | 637ac89f7dcc1a155191674743ba861b7765dc47 | 8f1a9945c3f5e2c825ffebc8a1d78e623b52f593 | refs/heads/master | 2020-03-21T08:54:10.007407 | 2018-08-13T09:15:57 | 2018-08-13T09:15:57 | 138,372,458 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 869 | java | package com.wang.jmonkey.cloud.modules.upms.model.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.wang.jmonkey.cloud.common.model.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @Description: 用户角色关联信息
* @Auther: HeJiawang
* @Date: 2018/6/23
*/
@Data
@Accessors(chain = true)
@TableName("sys_user_role")
public class SysUserRoleEntity extends BaseEntity<SysUserRoleEntity> {
/**
* 用户ID
*/
@TableId(type = IdType.INPUT)
private String userId;
/**
* 角色ID
*/
@TableId(type = IdType.INPUT)
private String roleId;
@Override
protected Serializable pkVal() {
return this.userId + this.roleId;
}
}
| [
"952327407@qq.com"
] | 952327407@qq.com |
327ac732868a8b0b3ecb9066157aca2ae16f9dcb | 06888f55502c4cdb2caab2532361980681108bbf | /src/binding/facebook/java/org/moe/binding/facebook/fbsdksharekit/FBSDKShareLinkContent.java | f092f3e1546543abbfac8eb01af0e5c4a8c1ead3 | [] | no_license | eddabjork/moe-bindings | 234b924e77e3661f82437f1c7f7bc0fda71bf229 | 424d2f9123f2b03cea754a3537178fe4ae54c728 | refs/heads/master | 2021-01-23T08:15:02.666400 | 2017-02-03T00:12:55 | 2017-02-03T00:12:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,849 | java | package org.moe.binding.facebook.fbsdksharekit;
import apple.NSObject;
import apple.foundation.NSArray;
import apple.foundation.NSCoder;
import apple.foundation.NSMethodSignature;
import apple.foundation.NSSet;
import apple.foundation.NSURL;
import org.moe.binding.facebook.fbsdksharekit.protocol.FBSDKSharingContent;
import org.moe.natj.c.ann.FunctionPtr;
import org.moe.natj.general.NatJ;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.Library;
import org.moe.natj.general.ann.Mapped;
import org.moe.natj.general.ann.MappedReturn;
import org.moe.natj.general.ann.NInt;
import org.moe.natj.general.ann.NUInt;
import org.moe.natj.general.ann.Owned;
import org.moe.natj.general.ann.Runtime;
import org.moe.natj.general.ptr.VoidPtr;
import org.moe.natj.objc.Class;
import org.moe.natj.objc.ObjCRuntime;
import org.moe.natj.objc.SEL;
import org.moe.natj.objc.ann.ObjCClassBinding;
import org.moe.natj.objc.ann.ProtocolClassMethod;
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.map.ObjCObjectMapper;
@Generated
@Library("FBSDKShareKit")
@Runtime(ObjCRuntime.class)
@ObjCClassBinding
public class FBSDKShareLinkContent extends NSObject implements
FBSDKSharingContent {
static {
NatJ.register();
}
@Generated
protected FBSDKShareLinkContent(Pointer peer) {
super(peer);
}
@Generated
@Selector("accessInstanceVariablesDirectly")
public static native boolean accessInstanceVariablesDirectly();
@Generated
@Owned
@Selector("alloc")
public static native FBSDKShareLinkContent alloc();
@Generated
@Selector("allocWithZone:")
@MappedReturn(ObjCObjectMapper.class)
public static native Object allocWithZone(VoidPtr zone);
@Generated
@Selector("automaticallyNotifiesObserversForKey:")
public static native boolean automaticallyNotifiesObserversForKey(String key);
@Generated
@Selector("cancelPreviousPerformRequestsWithTarget:")
public static native void cancelPreviousPerformRequestsWithTarget(
@Mapped(ObjCObjectMapper.class) Object aTarget);
@Generated
@Selector("cancelPreviousPerformRequestsWithTarget:selector:object:")
public static native void cancelPreviousPerformRequestsWithTargetSelectorObject(
@Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector,
@Mapped(ObjCObjectMapper.class) Object anArgument);
@Generated
@Selector("class")
public static native Class class_objc_static();
@Generated
@Selector("classFallbacksForKeyedArchiver")
public static native NSArray<String> classFallbacksForKeyedArchiver();
@Generated
@Selector("classForKeyedUnarchiver")
public static native Class classForKeyedUnarchiver();
@Generated
@Selector("contentDescription")
public native String contentDescription();
@Generated
@Selector("contentTitle")
public native String contentTitle();
@Generated
@Selector("contentURL")
public native NSURL contentURL();
@Generated
@Owned
@Selector("copy")
@MappedReturn(ObjCObjectMapper.class)
public native Object copy();
@Generated
@Owned
@Selector("copyWithZone:")
@MappedReturn(ObjCObjectMapper.class)
public native Object copyWithZone(VoidPtr zone);
@Generated
@Selector("debugDescription")
public static native String debugDescription_static();
@Generated
@Selector("description")
public static native String description_static();
@Generated
@Selector("encodeWithCoder:")
public native void encodeWithCoder(NSCoder aCoder);
@Generated
@Selector("hash")
@NUInt
public static native long hash_static();
@Generated
@Selector("hashtag")
public native FBSDKHashtag hashtag();
@Generated
@Selector("imageURL")
public native NSURL imageURL();
@Generated
@Selector("init")
public native FBSDKShareLinkContent init();
@Generated
@Selector("initWithCoder:")
public native FBSDKShareLinkContent initWithCoder(NSCoder aDecoder);
@Generated
@Selector("initialize")
public static native void initialize();
@Generated
@Selector("instanceMethodForSelector:")
@FunctionPtr(name = "call_instanceMethodForSelector_ret")
public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(
SEL aSelector);
@Generated
@Selector("instanceMethodSignatureForSelector:")
public static native NSMethodSignature instanceMethodSignatureForSelector(
SEL aSelector);
@Generated
@Selector("instancesRespondToSelector:")
public static native boolean instancesRespondToSelector(SEL aSelector);
@Generated
@Selector("isEqualToShareLinkContent:")
public native boolean isEqualToShareLinkContent(
FBSDKShareLinkContent content);
@Generated
@Selector("isSubclassOfClass:")
public static native boolean isSubclassOfClass(Class aClass);
@Generated
@Selector("keyPathsForValuesAffectingValueForKey:")
public static native NSSet<String> keyPathsForValuesAffectingValueForKey(
String key);
@Generated
@Selector("load")
public static native void load_objc_static();
@Generated
@Owned
@Selector("new")
@MappedReturn(ObjCObjectMapper.class)
public static native Object new_objc();
@Generated
@Selector("peopleIDs")
public native NSArray<?> peopleIDs();
@Generated
@Selector("placeID")
public native String placeID();
@Generated
@Selector("quote")
public native String quote();
@Generated
@Selector("ref")
public native String ref();
@Generated
@Selector("resolveClassMethod:")
public static native boolean resolveClassMethod(SEL sel);
@Generated
@Selector("resolveInstanceMethod:")
public static native boolean resolveInstanceMethod(SEL sel);
@Generated
@Selector("setContentDescription:")
public native void setContentDescription(String value);
@Generated
@Selector("setContentTitle:")
public native void setContentTitle(String value);
@Generated
@Selector("setContentURL:")
public native void setContentURL(NSURL value);
@Generated
@Selector("setHashtag:")
public native void setHashtag(FBSDKHashtag value);
@Generated
@Selector("setImageURL:")
public native void setImageURL(NSURL value);
@Generated
@Selector("setPeopleIDs:")
public native void setPeopleIDs(NSArray<?> value);
@Generated
@Selector("setPlaceID:")
public native void setPlaceID(String value);
@Generated
@Selector("setQuote:")
public native void setQuote(String value);
@Generated
@Selector("setRef:")
public native void setRef(String value);
@Generated
@Selector("setVersion:")
public static native void setVersion(@NInt long aVersion);
@Generated
@Selector("superclass")
public static native Class superclass_static();
@Generated
@Selector("supportsSecureCoding")
public static native boolean supportsSecureCoding();
@Generated
@ProtocolClassMethod("supportsSecureCoding")
public boolean _supportsSecureCoding() {
return supportsSecureCoding();
}
@Generated
@Selector("version")
@NInt
public static native long version_static();
} | [
"kristof.liliom@migeran.com"
] | kristof.liliom@migeran.com |
fc6786cea01b3652abaa132dfe17129bdd169952 | 90a195600bba309ce361dba513e5fab9fc75aa92 | /net/tangotek/tektopia/gui/GuiTekCheckBox.java | 6716a3cf0c09e60763d1e0054e55ac442f99c934 | [] | no_license | TheShermanTanker/TekTopia-Deobfuscated | b4f87f787dd2aca7207f3b825c2f20a1b5e8087d | 0737e3916c0926b3d7d0d93d3d794c1f3c4f6ebb | refs/heads/master | 2022-12-17T08:02:59.096179 | 2020-09-19T16:56:45 | 2020-09-19T16:56:45 | 296,913,336 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,059 | java | /* */ package net.tangotek.tektopia.gui;
/* */
/* */ import net.minecraft.client.Minecraft;
/* */ import net.minecraft.client.gui.GuiButton;
/* */ import net.minecraft.client.renderer.GlStateManager;
/* */ import net.minecraft.util.ResourceLocation;
/* */
/* */ public class GuiTekCheckBox
/* */ extends GuiButton
/* */ {
/* */ private boolean isChecked;
/* */ ResourceLocation resourceLocation;
/* */ private int checkedTexX;
/* */ private int checkedTexY;
/* */ private int uncheckedTexX;
/* */ private int uncheckedTexY;
/* */
/* */ public GuiTekCheckBox(int buttonId, int x, int y, int widthIn, int heightIn, boolean isChecked, int checkedTexX, int checkedTexY, int uncheckedTexX, int uncheckedTexY, ResourceLocation resourceLocation) {
/* 19 */ super(buttonId, x, y, widthIn, heightIn, "");
/* 20 */ this.resourceLocation = resourceLocation;
/* 21 */ this.isChecked = isChecked;
/* 22 */ this.width = widthIn;
/* 23 */ this.height = heightIn;
/* 24 */ this.checkedTexX = checkedTexX;
/* 25 */ this.checkedTexY = checkedTexY;
/* 26 */ this.uncheckedTexX = uncheckedTexX;
/* 27 */ this.uncheckedTexY = uncheckedTexY;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void drawButton(Minecraft mc, int mouseX, int mouseY, float partial) {
/* 36 */ if (this.visible) {
/* */
/* 38 */ this.hovered = (mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height);
/* 39 */ mc.getTextureManager().bindTexture(this.resourceLocation);
/* 40 */ GlStateManager.disableDepth();
/* */
/* 42 */ if (this.isChecked) {
/* 43 */ drawTexturedModalRect(this.x, this.y, this.checkedTexX, this.checkedTexY, this.width, this.height);
/* */ } else {
/* */
/* 46 */ drawTexturedModalRect(this.x, this.y, this.uncheckedTexX, this.uncheckedTexY, this.width, this.height);
/* */ }
/* */
/* 49 */ GlStateManager.enableDepth();
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public boolean mousePressed(Minecraft mc, int mouseX, int mouseY) {
/* 60 */ if (this.enabled && this.visible && mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height) {
/* */
/* 62 */ this.isChecked = !this.isChecked;
/* 63 */ return true;
/* */ }
/* */
/* 66 */ return false;
/* */ }
/* */
/* */
/* */ public boolean isChecked() {
/* 71 */ return this.isChecked;
/* */ }
/* */
/* */
/* */ public void setIsChecked(boolean isChecked) {
/* 76 */ this.isChecked = isChecked;
/* */ }
/* */ }
/* Location: C:\Users\Josep\Downloads\tektopia-1.1.0-deobf.jar!\net\tangotek\tektopia\gui\GuiTekCheckBox.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/ | [
"tanksherman27@gmail.com"
] | tanksherman27@gmail.com |
d820b03cfa9440a7288f547ecade32911d41d263 | f7a25da32609d722b7ac9220bf4694aa0476f7b2 | /net/minecraft/world/entity/monster/AbstractIllager.java | 6fe6054361bc2bdf9b6d19187aa9d8d26f999fc7 | [] | no_license | basaigh/temp | 89e673227e951a7c282c50cce72236bdce4870dd | 1c3091333f4edb2be6d986faaa026826b05008ab | refs/heads/master | 2023-05-04T22:27:28.259481 | 2021-05-31T17:15:09 | 2021-05-31T17:15:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,275 | java | package net.minecraft.world.entity.monster;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.goal.OpenDoorGoal;
import net.minecraft.world.entity.MobType;
import net.minecraft.world.level.Level;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.raid.Raider;
public abstract class AbstractIllager extends Raider {
protected AbstractIllager(final EntityType<? extends AbstractIllager> ais, final Level bhr) {
super(ais, bhr);
}
@Override
protected void registerGoals() {
super.registerGoals();
}
public MobType getMobType() {
return MobType.ILLAGER;
}
public IllagerArmPose getArmPose() {
return IllagerArmPose.CROSSED;
}
public enum IllagerArmPose {
CROSSED,
ATTACKING,
SPELLCASTING,
BOW_AND_ARROW,
CROSSBOW_HOLD,
CROSSBOW_CHARGE,
CELEBRATING;
}
public class RaiderOpenDoorGoal extends OpenDoorGoal {
public RaiderOpenDoorGoal(final Raider axl) {
super(axl, false);
}
@Override
public boolean canUse() {
return super.canUse() && AbstractIllager.this.hasActiveRaid();
}
}
}
| [
"mark70326511@gmail.com"
] | mark70326511@gmail.com |
4499f0463192f35244402e9a6fae573f9c361dc6 | 1af49694004c6fbc31deada5618dae37255ce978 | /chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/v1/FeedV1StreamCreator.java | 4cea674d2302b5d996d7f1adfed2f028194b0f2a | [
"BSD-3-Clause"
] | permissive | sadrulhc/chromium | 59682b173a00269ed036eee5ebfa317ba3a770cc | a4b950c23db47a0fdd63549cccf9ac8acd8e2c41 | refs/heads/master | 2023-02-02T07:59:20.295144 | 2020-12-01T21:32:32 | 2020-12-01T21:32:32 | 317,678,056 | 3 | 0 | BSD-3-Clause | 2020-12-01T21:56:26 | 2020-12-01T21:56:25 | null | UTF-8 | Java | false | false | 5,904 | java | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.feed.v1;
import android.app.Activity;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.feed.library.api.client.scope.ProcessScope;
import org.chromium.chrome.browser.feed.library.api.host.action.ActionApi;
import org.chromium.chrome.browser.feed.library.api.host.stream.CardConfiguration;
import org.chromium.chrome.browser.feed.library.api.host.stream.SnackbarApi;
import org.chromium.chrome.browser.feed.library.api.host.stream.SnackbarCallbackApi;
import org.chromium.chrome.browser.feed.library.api.host.stream.StreamConfiguration;
import org.chromium.chrome.browser.feed.shared.stream.Stream;
import org.chromium.chrome.browser.feed.v1.tooltip.BasicTooltipApi;
import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar;
import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
import org.chromium.components.browser_ui.widget.displaystyle.UiConfig;
/**
* Creates a {@link Stream}. This class was created to reduce feed v1 clutter in
* {@link FeedSurfaceCoordinator}.
*/
class FeedV1StreamCreator {
/**
* Create a feed v1 {@link Stream}.
*/
public static Stream createStream(Activity activity, FeedImageLoader imageLoader,
ActionApi actionApi, UiConfig uiConfig, SnackbarManager snackbarManager,
boolean showDarkBackground, boolean isPlaceholderShown) {
ProcessScope processScope = FeedProcessScopeFactory.getFeedProcessScope();
assert processScope != null;
return processScope
.createStreamScopeBuilder(activity, imageLoader, actionApi,
new BasicStreamConfiguration(),
new BasicCardConfiguration(activity.getResources(), uiConfig),
new BasicSnackbarApi(snackbarManager),
FeedProcessScopeFactory.getFeedOfflineIndicator(), new BasicTooltipApi())
.setIsBackgroundDark(showDarkBackground)
.setIsPlaceholderShown(isPlaceholderShown)
.build()
.getStream();
}
private static class BasicSnackbarApi implements SnackbarApi {
private final SnackbarManager mManager;
public BasicSnackbarApi(SnackbarManager manager) {
mManager = manager;
}
@Override
public void show(String message) {
mManager.showSnackbar(Snackbar.make(message, new SnackbarManager.SnackbarController() {
}, Snackbar.TYPE_ACTION, Snackbar.UMA_FEED_NTP_STREAM));
}
@Override
public void show(String message, String action, SnackbarCallbackApi callback) {
mManager.showSnackbar(
Snackbar.make(message,
new SnackbarManager.SnackbarController() {
@Override
public void onAction(Object actionData) {
callback.onDismissedWithAction();
}
@Override
public void onDismissNoAction(Object actionData) {
callback.onDismissNoAction();
}
},
Snackbar.TYPE_ACTION, Snackbar.UMA_FEED_NTP_STREAM)
.setAction(action, null));
}
}
private static class BasicStreamConfiguration implements StreamConfiguration {
public BasicStreamConfiguration() {}
@Override
public int getPaddingStart() {
return 0;
}
@Override
public int getPaddingEnd() {
return 0;
}
@Override
public int getPaddingTop() {
return 0;
}
@Override
public int getPaddingBottom() {
return 0;
}
}
private static class BasicCardConfiguration implements CardConfiguration {
private final Resources mResources;
private final UiConfig mUiConfig;
private final int mCornerRadius;
private final int mCardMargin;
private final int mCardWideMargin;
public BasicCardConfiguration(Resources resources, UiConfig uiConfig) {
mResources = resources;
mUiConfig = uiConfig;
mCornerRadius = mResources.getDimensionPixelSize(R.dimen.default_rounded_corner_radius);
mCardMargin = mResources.getDimensionPixelSize(
R.dimen.content_suggestions_card_modern_margin);
mCardWideMargin =
mResources.getDimensionPixelSize(R.dimen.ntp_wide_card_lateral_margins);
}
@Override
public int getDefaultCornerRadius() {
return mCornerRadius;
}
@Override
public Drawable getCardBackground() {
return ApiCompatibilityUtils.getDrawable(mResources,
FeedConfiguration.getFeedUiEnabled()
? R.drawable.hairline_border_card_background_with_inset
: R.drawable.hairline_border_card_background);
}
@Override
public int getCardBottomMargin() {
return mCardMargin;
}
@Override
public int getCardStartMargin() {
return 0;
}
@Override
public int getCardEndMargin() {
return 0;
}
}
private FeedV1StreamCreator() {}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
b7c863079d036bf4f628b2685f32893be3e82dc0 | 0da4ede0f251508c4a6c0cd8b8956679b8802c16 | /app/src/main/java/com/ingic/ezhalbatek/technician/ui/binders/SubscriberTaskBinder.java | 13ea4a6be4930fa7e78a0b1e77452b28fb8d0098 | [] | no_license | SaeedHyder/DohaMart_Technicain_Android | b02d2f71aa6bba501cbb678eff059a221af35336 | 5de60aed7c4fde845a1c5861f2a961deb1a8cc17 | refs/heads/master | 2022-03-17T06:30:56.066511 | 2019-11-11T18:48:33 | 2019-11-11T18:48:33 | 168,325,718 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,163 | java | package com.ingic.ezhalbatek.technician.ui.binders;
import android.content.Context;
import android.view.View;
import android.widget.Button;
import com.ingic.ezhalbatek.technician.R;
import com.ingic.ezhalbatek.technician.entities.SubscriptionPaymentEnt;
import com.ingic.ezhalbatek.technician.interfaces.RecyclerItemListener;
import com.ingic.ezhalbatek.technician.ui.viewbinders.abstracts.RecyclerViewBinder;
import com.ingic.ezhalbatek.technician.ui.views.AnyTextView;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* Created on 6/6/18.
*/
public class SubscriberTaskBinder extends RecyclerViewBinder<SubscriptionPaymentEnt> {
private RecyclerItemListener itemClickListener;
public SubscriberTaskBinder(RecyclerItemListener itemClickListener) {
super(R.layout.row_item_subscriber_task);
this.itemClickListener = itemClickListener;
}
@Override
public BaseViewHolder createViewHolder(View view) {
return new ViewHolder(view);
}
@Override
public void bindView(SubscriptionPaymentEnt entity, int position, Object viewHolder, Context context) {
ViewHolder holder = (ViewHolder) viewHolder;
holder.txtSubscriptionID.setText(entity.getSubscriptionId());
holder.txtCustomerName.setText(entity.getUser().getFullName());
holder.txtSubscriptionPackage.setText(entity.getSubscription().getTitle());
holder.txtSubscriptionPackage.setSelected(true);
holder.btnViewDetail.setOnClickListener(v -> {
if (itemClickListener != null) {
itemClickListener.onItemClicked(entity, position, v.getId());
}
});
}
static class ViewHolder extends BaseViewHolder {
@BindView(R.id.txtSubscriptionID)
AnyTextView txtSubscriptionID;
@BindView(R.id.txtCustomerName)
AnyTextView txtCustomerName;
@BindView(R.id.txtSubscriptionPackage)
AnyTextView txtSubscriptionPackage;
@BindView(R.id.btnViewDetail)
Button btnViewDetail;
ViewHolder(View view) {
super(view);
ButterKnife.bind(this, view);
}
}
}
| [
"saeedhyder@axact.com"
] | saeedhyder@axact.com |
19d228c1cddff35e4b94c3c471049573941790c5 | 96f8d42c474f8dd42ecc6811b6e555363f168d3e | /zuiyou/sources/com/xiaomi/push/service/s.java | 9eef1ef1dbf71f787538619308a4bc464f3fb72a | [] | 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 | 2,198 | java | package com.xiaomi.push.service;
import android.content.Context;
import com.xiaomi.channel.commonutils.android.a;
import com.xiaomi.push.service.ap.b;
import java.util.Locale;
public class s {
public final String a;
public final String b;
public final String c;
public final String d;
public final String e;
public final String f;
public final int g;
public s(String str, String str2, String str3, String str4, String str5, String str6, int i) {
this.a = str;
this.b = str2;
this.c = str3;
this.d = str4;
this.e = str5;
this.f = str6;
this.g = i;
}
public static boolean a() {
try {
return Class.forName("miui.os.Build").getField("IS_ALPHA_BUILD").getBoolean(null);
} catch (Exception e) {
return false;
}
}
public static boolean a(Context context) {
return "com.xiaomi.xmsf".equals(context.getPackageName()) && a();
}
private static boolean b(Context context) {
return context.getPackageName().equals("com.xiaomi.xmsf");
}
public b a(XMPushService xMPushService) {
b bVar = new b(xMPushService);
a(bVar, xMPushService, xMPushService.e(), "c");
return bVar;
}
public b a(b bVar, Context context, e eVar, String str) {
bVar.a = context.getPackageName();
bVar.b = this.a;
bVar.i = this.c;
bVar.c = this.b;
bVar.h = "5";
bVar.d = "XMPUSH-PASS";
bVar.e = false;
String str2 = "";
if (b(context)) {
str2 = a.a(context);
}
bVar.f = String.format("%1$s:%2$s,%3$s:%4$s,%5$s:%6$s:%7$s:%8$s", new Object[]{"sdk_ver", Integer.valueOf(31), "cpvn", "3_5_2", "cpvc", Integer.valueOf(30502), "aapn", str2});
str2 = b(context) ? "1000271" : this.d;
bVar.g = String.format("%1$s:%2$s,%3$s:%4$s,%5$s:%6$s,sync:1", new Object[]{"appid", str2, "locale", Locale.getDefault().toString(), "miid", p.a(context).c()});
if (a(context)) {
bVar.g += String.format(",%1$s:%2$s", new Object[]{"ab", str});
}
bVar.k = eVar;
return bVar;
}
}
| [
"aheadlcxzhang@gmail.com"
] | aheadlcxzhang@gmail.com |
2733f3e28ee967c60c2c5e6b9d80ce0a58ed28b9 | d48cfe7bb65c3169dea931f605d62b4340222d75 | /chinahrd-hrbi/tr-talentSearch/src/main/java/net/chinahrd/talentSearch/mvc/app/service/MobileTalentSearchService.java | c6c3a9c877be719c458b321c0da42712d76d8764 | [] | no_license | a559927z/doc | 7b65aeff1d4606bab1d7f71307d6163b010a226d | 04e812838a5614ed78f8bbfa16a377e7398843fc | refs/heads/master | 2022-12-23T12:09:32.360591 | 2019-07-15T17:52:54 | 2019-07-15T17:52:54 | 195,972,411 | 0 | 0 | null | 2022-12-16T07:47:50 | 2019-07-09T09:02:38 | JavaScript | UTF-8 | Java | false | false | 569 | java | package net.chinahrd.talentSearch.mvc.app.service;
import java.util.List;
import net.chinahrd.entity.dto.PaginationDto;
import net.chinahrd.entity.dto.app.common.EmpDto;
import net.chinahrd.entity.dto.pc.admin.OrganDto;
/**
*
* @author htpeng
*2016年3月30日下午5:31:34
*/
public interface MobileTalentSearchService {
/**
* 根据名称搜索人员
*
* @return
*/
PaginationDto<EmpDto> queryTalentSearch(String customerId,String key,List<OrganDto> organPermitIds,PaginationDto<EmpDto> dto);
}
| [
"a559927z@163.com"
] | a559927z@163.com |
72448235ded2e43cecb03a6830835f994502bdf5 | 55e25ce39c42c78681c663cece12a2652a994dbb | /src/test/java/com/github/davidmoten/rtree/geometry/IntersectsTest.java | 91aab83d73e1c866d60b2ec17a75e687d1cd2e1f | [
"Apache-2.0"
] | permissive | davidmoten/rtree | f36283e402de18f4cd45491d23703565a462dd71 | b4bf255b08256a289b9bf8b3258dd8607b7d17a3 | refs/heads/master | 2023-08-23T20:31:40.858481 | 2023-08-04T11:54:55 | 2023-08-04T11:56:22 | 23,350,791 | 993 | 247 | Apache-2.0 | 2023-08-04T11:56:23 | 2014-08-26T12:29:14 | Java | UTF-8 | Java | false | false | 882 | java | package com.github.davidmoten.rtree.geometry;
import static com.github.davidmoten.rtree.geometry.Geometries.circle;
import static com.github.davidmoten.rtree.geometry.Geometries.rectangle;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import com.github.davidmoten.junit.Asserts;
public class IntersectsTest {
@Test
public void testConstructorIsPrivate() {
Asserts.assertIsUtilityClass(Intersects.class);
}
@Test
public void testRectangleIntersectsCircle() {
assertTrue(
Intersects.rectangleIntersectsCircle.call(rectangle(0, 0, 0, 0), circle(0, 0, 1)));
}
@Test
public void testRectangleDoesNotIntersectCircle() {
assertFalse(Intersects.rectangleIntersectsCircle.call(rectangle(0, 0, 0, 0),
circle(100, 100, 1)));
}
}
| [
"davidmoten@gmail.com"
] | davidmoten@gmail.com |
b6ac623963207cf896c92eb196ad0d7cb6f94c9d | d5786bf0335010f7de9bb2cea6bb0a9536ff73af | /aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/model/v20190815/UpdateMsGuardianGrayRuleStatusRequest.java | 1861d756f0d7c94c2e4ed7f57662c644c5358907 | [
"Apache-2.0"
] | permissive | 1203802276/aliyun-openapi-java-sdk | 8066c546f0177cbbebb7b1178fe6ccaeb6f1da09 | e3f89f2ef8542055e3990401a94edccd1bbca410 | refs/heads/master | 2023-04-15T07:09:27.195262 | 2021-03-19T06:22:51 | 2021-03-19T06:22:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,165 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.sofa.model.v20190815;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.sofa.Endpoint;
/**
* @author auto create
* @version
*/
public class UpdateMsGuardianGrayRuleStatusRequest extends RpcAcsRequest<UpdateMsGuardianGrayRuleStatusResponse> {
private String ipList;
private String instanceId;
private Long ruleId;
public UpdateMsGuardianGrayRuleStatusRequest() {
super("SOFA", "2019-08-15", "UpdateMsGuardianGrayRuleStatus", "sofacafedeps");
setMethod(MethodType.POST);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}
public String getIpList() {
return this.ipList;
}
public void setIpList(String ipList) {
this.ipList = ipList;
if(ipList != null){
putBodyParameter("IpList", ipList);
}
}
public String getInstanceId() {
return this.instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
if(instanceId != null){
putBodyParameter("InstanceId", instanceId);
}
}
public Long getRuleId() {
return this.ruleId;
}
public void setRuleId(Long ruleId) {
this.ruleId = ruleId;
if(ruleId != null){
putBodyParameter("RuleId", ruleId.toString());
}
}
@Override
public Class<UpdateMsGuardianGrayRuleStatusResponse> getResponseClass() {
return UpdateMsGuardianGrayRuleStatusResponse.class;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
7cff9f00d7294a5296ea9fe2ec040a2268feaf98 | c800b6aa137b5b95a52a13501ffc1a563087237a | /src/main/java/cn/com/sky/algorithms/offer/CopyBinaryTree.java | ec883f1aa8ea7e8fe2c2a941ed59e4de4f2d5746 | [] | no_license | git-sky/algorithms | a0b85a550c4605e207a75ba9083b9243cbadf319 | 582faffa813fce70e0e5afbb3d990f07219d3e2d | refs/heads/master | 2021-01-19T00:43:08.133723 | 2018-02-24T05:59:25 | 2018-02-24T05:59:25 | 73,152,330 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 842 | java | package cn.com.sky.algorithms.offer;
import java.util.Random;
import org.junit.Test;
/**
* 题目: 请完成一个函数,输入一个二叉树,该函数输出它的镜像。
*/
public class CopyBinaryTree {
@Test
public void solution() {
Random r = new Random();
int count = r.nextInt(10);
BinaryNode head = init(count);
}
// TODO 生产二叉树
public BinaryNode init(int count) {
BinaryNode node = new BinaryNode(1, null, null);
return null;
}
public void get(BinaryNode data, BinaryNode left, BinaryNode right) {
}
static class BinaryNode {
int data;
BinaryNode left;
BinaryNode right;
public BinaryNode(int data, BinaryNode left, BinaryNode right) {
super();
this.data = data;
this.left = left;
this.right = right;
}
}
}
| [
"linkme2008@sina.com"
] | linkme2008@sina.com |
7fe1e2b5f6a9358b0ca5b0a4e88ea8991cb976ea | 64115312895a97813d459855fae144c9053ee7d6 | /src/main/java/wooteco/subway/admin/dto/PathRequest.java | 869545d35681d85172987e651bdd1cbe9c38b17e | [] | no_license | begaonnuri/woowa-atdd-subway-path | 7c439d5f2fb9d8cdfa9c073b3ba7262d70af21f2 | a3b299e72617127cf1ee8c25cefa93f624ed6bd4 | refs/heads/master | 2022-11-13T19:36:38.632681 | 2020-05-25T01:50:54 | 2020-05-25T01:50:54 | 275,432,953 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 498 | java | package wooteco.subway.admin.dto;
public class PathRequest {
private String key;
private String source;
private String target;
public PathRequest(final String key, final String source, final String target) {
this.key = key;
this.source = source;
this.target = target;
}
public String getKey() {
return key;
}
public String getSource() {
return source;
}
public String getTarget() {
return target;
}
}
| [
"pci2676@gmail.com"
] | pci2676@gmail.com |
7d6b1c6ecd3f4c6dc25fc36beed055e258480a14 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a002/A002521Test.java | e3935be6d03b9d1305017a2f014cf2c7a05580d2 | [] | 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 | 195 | java | package irvine.oeis.a002;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A002521Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
27a8e18b179954bb2b7d211801431d49b22bd951 | 949c9d796c6779418d1b13c730a0acc3c22a7be0 | /src/oasis/names/specification/ubl/schema/xsd/unqualifieddatatypes_2/PictureType.java | 7857bab1839101f0011b38e85fc0c0d18b0b6331 | [] | no_license | gvilauy/XpandeDIAN | 2c649a397e7423bffcbe5efc68824a4ee207eb3a | e27966b3b668ba2f3d4b89920e448aeebe3a3dbb | refs/heads/master | 2023-04-02T09:35:04.702985 | 2021-04-06T14:52:52 | 2021-04-06T14:52:52 | 333,752,128 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,732 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// 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: 2021.01.28 at 09:51:24 AM UYT
//
package oasis.names.specification.ubl.schema.xsd.unqualifieddatatypes_2;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import un.unece.uncefact.data.specification.corecomponenttypeschemamodule._2.BinaryObjectType;
/**
*
*
* <pre>
* <?xml version="1.0" encoding="UTF-8"?><ccts:UniqueID xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">UBLUDT000004</ccts:UniqueID>
* </pre>
*
*
* <pre>
* <?xml version="1.0" encoding="UTF-8"?><ccts:CategoryCode xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">UDT</ccts:CategoryCode>
* </pre>
*
*
* <pre>
* <?xml version="1.0" encoding="UTF-8"?><ccts:DictionaryEntryName xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">Picture. Type</ccts:DictionaryEntryName>
* </pre>
*
*
* <pre>
* <?xml version="1.0" encoding="UTF-8"?><ccts:VersionID xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">1.0</ccts:VersionID>
* </pre>
*
*
* <pre>
* <?xml version="1.0" encoding="UTF-8"?><ccts:Definition xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">A diagram, graph, mathematical curve, or similar representation.</ccts:Definition>
* </pre>
*
*
* <pre>
* <?xml version="1.0" encoding="UTF-8"?><ccts:RepresentationTermName xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">Picture</ccts:RepresentationTermName>
* </pre>
*
*
* <pre>
* <?xml version="1.0" encoding="UTF-8"?><ccts:PrimitiveType xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">binary</ccts:PrimitiveType>
* </pre>
*
*
*
* <p>Java class for PictureType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="PictureType">
* <simpleContent>
* <restriction base="<urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2>BinaryObjectType">
* <attribute name="mimeCode" use="required" type="{http://www.w3.org/2001/XMLSchema}normalizedString" />
* </restriction>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PictureType")
public class PictureType
extends BinaryObjectType
{
}
| [
"gabrielvila13@gmail.com"
] | gabrielvila13@gmail.com |
38ece6caa5366033d47cb054c98346c779b1c4f3 | 254292bbb95222cd6a97eae493e28b5a63c14a9d | /spring-boot/src/main/java/org/springframework/boot/jta/narayana/DataSourceXAResourceRecoveryHelper.java | d1afb237ec0686ac8869e965bc2fefaf60056d70 | [
"Apache-2.0"
] | permissive | pikefeier/springboot | 0e881a59ceefd3ae1991e83a0ad4a4d787831097 | 2fb23ab250f095dec39bf5e4d114c26d51467142 | refs/heads/master | 2023-01-09T02:51:23.939848 | 2019-12-30T12:19:14 | 2019-12-30T12:19:14 | 230,909,567 | 0 | 0 | Apache-2.0 | 2022-12-27T14:51:00 | 2019-12-30T12:10:46 | Java | UTF-8 | Java | false | false | 4,838 | java | /*
* Copyright 2012-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.jta.narayana;
import java.sql.SQLException;
import javax.sql.XAConnection;
import javax.sql.XADataSource;
import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;
import com.arjuna.ats.jta.recovery.XAResourceRecoveryHelper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.Assert;
/**
* XAResourceRecoveryHelper implementation which gets XIDs, which needs to be recovered,
* from the database.
*
* @author Gytis Trikleris
* @since 1.4.0
*/
public class DataSourceXAResourceRecoveryHelper
implements XAResourceRecoveryHelper, XAResource {
private static final XAResource[] NO_XA_RESOURCES = {};
private static final Log logger = LogFactory
.getLog(DataSourceXAResourceRecoveryHelper.class);
private final XADataSource xaDataSource;
private final String user;
private final String password;
private XAConnection xaConnection;
private XAResource delegate;
/**
* Create a new {@link DataSourceXAResourceRecoveryHelper} instance.
*
* @param xaDataSource the XA data source
*/
public DataSourceXAResourceRecoveryHelper(XADataSource xaDataSource) {
this(xaDataSource, null, null);
}
/**
* Create a new {@link DataSourceXAResourceRecoveryHelper} instance.
*
* @param xaDataSource the XA data source
* @param user the database user or {@code null}
* @param password the database password or {@code null}
*/
public DataSourceXAResourceRecoveryHelper(XADataSource xaDataSource, String user,
String password) {
Assert.notNull(xaDataSource, "XADataSource must not be null");
this.xaDataSource = xaDataSource;
this.user = user;
this.password = password;
}
@Override
public boolean initialise(String properties) {
return true;
}
@Override
public XAResource[] getXAResources() {
if (connect()) {
return new XAResource[]{this};
}
return NO_XA_RESOURCES;
}
private boolean connect() {
if (this.delegate == null) {
try {
this.xaConnection = getXaConnection();
this.delegate = this.xaConnection.getXAResource();
} catch (SQLException ex) {
logger.warn("Failed to create connection", ex);
return false;
}
}
return true;
}
private XAConnection getXaConnection() throws SQLException {
if (this.user == null && this.password == null) {
return this.xaDataSource.getXAConnection();
}
return this.xaDataSource.getXAConnection(this.user, this.password);
}
@Override
public Xid[] recover(int flag) throws XAException {
try {
return getDelegate(true).recover(flag);
} finally {
if (flag == XAResource.TMENDRSCAN) {
disconnect();
}
}
}
private void disconnect() throws XAException {
try {
this.xaConnection.close();
} catch (SQLException e) {
logger.warn("Failed to close connection", e);
} finally {
this.xaConnection = null;
this.delegate = null;
}
}
@Override
public void start(Xid xid, int flags) throws XAException {
getDelegate(true).start(xid, flags);
}
@Override
public void end(Xid xid, int flags) throws XAException {
getDelegate(true).end(xid, flags);
}
@Override
public int prepare(Xid xid) throws XAException {
return getDelegate(true).prepare(xid);
}
@Override
public void commit(Xid xid, boolean onePhase) throws XAException {
getDelegate(true).commit(xid, onePhase);
}
@Override
public void rollback(Xid xid) throws XAException {
getDelegate(true).rollback(xid);
}
@Override
public boolean isSameRM(XAResource xaResource) throws XAException {
return getDelegate(true).isSameRM(xaResource);
}
@Override
public void forget(Xid xid) throws XAException {
getDelegate(true).forget(xid);
}
@Override
public int getTransactionTimeout() throws XAException {
return getDelegate(true).getTransactionTimeout();
}
@Override
public boolean setTransactionTimeout(int seconds) throws XAException {
return getDelegate(true).setTransactionTimeout(seconds);
}
private XAResource getDelegate(boolean required) {
Assert.state(this.delegate != null || !required,
"Connection has not been opened");
return this.delegate;
}
}
| [
"945302777@qq.com"
] | 945302777@qq.com |
165245234d8b9b6600cb2ed952f9f025c462a6bf | e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f | /FantastleX/src/com/puttysoftware/fantastlex/creatures/monsters/AbstractDefiniteScalingMonster.java | 76515d76bfba9a78668efd20e32ce148dcc1a806 | [
"Unlicense"
] | permissive | retropipes/older-java-games | 777574e222f30a1dffe7936ed08c8bfeb23a21ba | 786b0c165d800c49ab9977a34ec17286797c4589 | refs/heads/master | 2023-04-12T14:28:25.525259 | 2021-05-15T13:03:54 | 2021-05-15T13:03:54 | 235,693,016 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,764 | java | /* FantastleX: A Maze/RPG Hybrid Game
Copyleft 2013 Eric Ahnell
Any questions should be directed to the author via email at: products@puttysoftware.com
*/
package com.puttysoftware.fantastlex.creatures.monsters;
import com.puttysoftware.fantastlex.creatures.StatConstants;
import com.puttysoftware.fantastlex.creatures.party.PartyManager;
import com.puttysoftware.randomrange.RandomLongRange;
import com.puttysoftware.randomrange.RandomRange;
abstract class AbstractDefiniteScalingMonster extends AbstractDefiniteMonster {
// Constructors
AbstractDefiniteScalingMonster() {
super();
}
@Override
public void loadMonster() {
super.loadMonster();
final int newLevel = PartyManager.getParty().getPartyMeanLevel();
this.setLevel(newLevel);
this.setVitality(this.getInitialVitality());
this.setCurrentHP(this.getMaximumHP());
this.setIntelligence(this.getInitialIntelligence());
this.setCurrentMP(this.getMaximumMP());
this.setStrength(this.getInitialStrength());
this.setBlock(this.getInitialBlock());
this.setAgility(this.getInitialAgility());
this.setLuck(this.getInitialLuck());
this.setGold(this.getInitialGold());
this.setExperience((long) (this.getInitialExperience()
* this.adjustForLevelDifference()));
this.setAttacksPerRound(1);
this.setSpellsPerRound(1);
this.image = this.getInitialImage();
}
@Override
public boolean scales() {
return true;
}
private int getInitialStrength() {
final RandomRange r = new RandomRange(1,
Math.max(this.getLevel() * StatConstants.GAIN_STRENGTH, 1));
return r.generate();
}
private int getInitialBlock() {
final RandomRange r = new RandomRange(0,
Math.max(this.getLevel() * StatConstants.GAIN_BLOCK, 1));
return r.generate();
}
private long getInitialExperience() {
long minvar, maxvar;
minvar = (long) (this.getLevel()
* AbstractMonster.MINIMUM_EXPERIENCE_RANDOM_VARIANCE);
maxvar = (long) (this.getLevel()
* AbstractMonster.MAXIMUM_EXPERIENCE_RANDOM_VARIANCE);
final RandomLongRange r = new RandomLongRange(minvar, maxvar);
final long expbase = PartyManager.getParty().getPartyMaxToNextLevel();
final long factor = this.getBattlesToNextLevel();
return expbase / factor + r.generate();
}
private int getToughness() {
return this.getStrength() + this.getBlock() + this.getAgility()
+ this.getVitality() + this.getIntelligence() + this.getLuck();
}
private int getInitialGold() {
final int min = 0;
final int max = this.getToughness()
* AbstractMonster.GOLD_TOUGHNESS_MULTIPLIER;
final RandomRange r = new RandomRange(min, max);
return r.generate();
}
private int getInitialAgility() {
final RandomRange r = new RandomRange(1,
Math.max(this.getLevel() * StatConstants.GAIN_AGILITY, 1));
return r.generate();
}
private int getInitialVitality() {
final RandomRange r = new RandomRange(1,
Math.max(this.getLevel() * StatConstants.GAIN_VITALITY, 1));
return r.generate();
}
private int getInitialIntelligence() {
final RandomRange r = new RandomRange(0,
Math.max(this.getLevel() * StatConstants.GAIN_INTELLIGENCE, 1));
return r.generate();
}
private int getInitialLuck() {
final RandomRange r = new RandomRange(0,
Math.max(this.getLevel() * StatConstants.GAIN_LUCK, 1));
return r.generate();
}
}
| [
"eric.ahnell@puttysoftware.com"
] | eric.ahnell@puttysoftware.com |
e4d25aaa5376374f37bebf6c1d1cf63b52d808bc | c6c1a124eb1ff2fc561213d43d093f84d1ab2c43 | /mxz-ttafs-server/ai/cn/mxz/bossbattle/ui/RankInfoImpl.java | 4eea5dad80182f7534090d9cccb7318b7e0372ad | [] | no_license | fantasylincen/javaplus | 69201dba21af0973dfb224c53b749a3c0440317e | 36fc370b03afe952a96776927452b6d430b55efd | refs/heads/master | 2016-09-06T01:55:33.244591 | 2015-08-15T12:15:51 | 2015-08-15T12:15:51 | 15,601,930 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,155 | java | package cn.mxz.bossbattle.ui;
import java.util.List;
import cn.mxz.bossbattle.Challenger;
import cn.mxz.bossbattle.IRankInfo;
import cn.mxz.bossbattle.ISimpleChallenger;
import com.google.common.collect.Lists;
public class RankInfoImpl implements IRankInfo{
private ISimpleChallenger killer;
private ISimpleChallenger myself;
private List<ISimpleChallenger> list = Lists.newArrayList();
public RankInfoImpl( List<Challenger> topTenList, Challenger killer,Challenger me, int myRank ) {
int rank = 1;
for( Challenger c : topTenList ){
SimpleChallengerImpl sc = new SimpleChallengerImpl( c, rank++ );
list.add( sc );
if( c == killer ){
sc.setReputation();
}
}
if( killer != null ){
this.killer = new SimpleChallengerImpl( killer, -1 );
}
this.myself = new SimpleChallengerImpl( me, myRank );
}
@Override
public List<ISimpleChallenger> getTopChallenger() {
return list;
}
@Override
public ISimpleChallenger getKiller() {
return killer;
}
@Override
public ISimpleChallenger getMyself() {
return myself;
}
}
| [
"12-2"
] | 12-2 |
f2ccb945818fe6e0132c034863cff66673ce1adc | 1dc85b5f57fc1d390bb1484c056df960dc0dab77 | /baselib/src/main/java/com/app/baselib/pmsion/CheckPermissionsCallback.java | 1722efb9e5a4eeea4c15b6ab170c80a95bd8eb1c | [] | no_license | fengxiaocan/ImageBrowser | 506d830c6fdd1c1c2ef8577af1479ca4e9f412c0 | 9d86e904d2cd8f86bc679a9ae03260b5130d3ed7 | refs/heads/master | 2020-04-10T05:13:13.438581 | 2019-01-25T12:33:14 | 2019-01-25T12:33:14 | 160,820,566 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 480 | java | package com.app.baselib.pmsion;
import android.support.annotation.Nullable;
/**
* @项目名: BaseApp
* @包名: com.dgtle.baselib.base.pmsion
* @创建者: Noah.冯
* @时间: 11:37
* @描述: 检测运行时权限回调接口
*/
public interface CheckPermissionsCallback {
/**
* 拥有权限
*/
void hasPremissions(int requestCode);
/**
* 没有权限
*/
void nonePremissions(int requestCode,@Nullable String[] permissions);
}
| [
"fengxiaocan@gmail.com"
] | fengxiaocan@gmail.com |
c0f8b80456200b1dff34c7ebe1e41283a7d8a3b3 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-14122-37-2-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/job/internal/AbstractExtensionJob_ESTest_scaffolding.java | 4f74e942db25358d6138374f07cdb0f4b00d879c | [] | 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 | 457 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 06:28:08 UTC 2020
*/
package org.xwiki.extension.job.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class AbstractExtensionJob_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
a969f655e8c8f76c42822c378cba2bbeb78bde4a | 3cae09110e2aad7dd11bfebb87145c6bf91731c0 | /travisdk/src/main/java/com/alorma/travisdk/datasource/accounts/cache/CacheAccountsWrapper.java | 304106f2f93f0d1bf78a882d7f1c33295c0b1dca | [] | no_license | gitskarios/Sivart | c34240092435f68d310ba1bca7d007768ca562aa | 38856b1d2d16e1f1d249089701f1e99ec39f67de | refs/heads/develop | 2021-01-10T10:47:11.998381 | 2016-03-06T17:42:06 | 2016-03-06T17:42:06 | 52,298,490 | 3 | 1 | null | 2016-03-06T14:44:47 | 2016-02-22T19:16:11 | Java | UTF-8 | Java | false | false | 1,250 | java | package com.alorma.travisdk.datasource.accounts.cache;
import com.alorma.travisdk.bean.response.GithubAccount;
import com.fewlaps.quitnowcache.QNCache;
import com.fewlaps.quitnowcache.QNCacheBuilder;
import java.util.List;
import java.util.concurrent.TimeUnit;
public class CacheAccountsWrapper {
private static final String ACCOUNTS_KEY_PREFIX = "accounts:";
private static QNCache<List<GithubAccount>> cache =
new QNCacheBuilder().setDefaultKeepaliveInMillis(TimeUnit.MINUTES.toMillis(10))
.createQNCache();
private static String convertToEffectiveKey(String name, String token) {
return ACCOUNTS_KEY_PREFIX + name + ":" + token;
}
public static void clear() {
cache.removeAll();
}
public static List<GithubAccount> get(String name, String token) {
return cache.get(convertToEffectiveKey(name, token));
}
public static void set(String name, String token, List<GithubAccount> items) {
List<GithubAccount> githubAccounts = get(name, token);
if (githubAccounts == null || githubAccounts.isEmpty()) {
cache.set(convertToEffectiveKey(name, token), items);
} else {
githubAccounts.addAll(items);
cache.set(convertToEffectiveKey(name, token), githubAccounts);
}
}
} | [
"bernatbor15@gmail.com"
] | bernatbor15@gmail.com |
e3984e8d6996b3e2f8b93c0195552388c9ada724 | 3de3dae722829727edfdd6cc3b67443a69043475 | /cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/mouse/MPELegendInputHandler.java | 968428aec53a013917f73a78d837e89b16d572fb | [
"LicenseRef-scancode-public-domain",
"Apache-2.0"
] | permissive | Unidata/awips2 | 9aee5b7ec42c2c0a2fa4d877cb7e0b399db74acb | d76c9f96e6bb06f7239c563203f226e6a6fffeef | refs/heads/unidata_18.2.1 | 2023-08-18T13:00:15.110785 | 2023-08-09T06:06:06 | 2023-08-09T06:06:06 | 19,332,079 | 161 | 75 | NOASSERTION | 2023-09-13T19:06:40 | 2014-05-01T00:59:04 | Java | UTF-8 | Java | false | false | 3,706 | java | /**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.mpe.ui.mouse;
import com.raytheon.viz.mpe.ui.MPEDisplayManager;
import com.raytheon.viz.mpe.ui.actions.DrawDQCStations;
import com.raytheon.viz.mpe.ui.rsc.MPELegendResource;
import com.raytheon.viz.ui.input.InputAdapter;
/**
* Handles the mouse interactions for the colorbar
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 11/28/2009 snaples Initial Creation.
*
* </pre>
*
* @author snaples
* @version 1.0
*/
public class MPELegendInputHandler extends InputAdapter {
protected MPELegendResource rsc;
protected int[] lastPoint;
com.raytheon.uf.viz.core.PixelExtent pe;
public MPELegendInputHandler(MPELegendResource rsc) {
this.rsc = rsc;
}
/*
* (non-Javadoc)
*
* @see com.raytheon.viz.ui.input.IInputHandler#handleMouseDown(int, int,
* int)
*/
@Override
public boolean handleMouseDown(int x, int y, int mouseButton) {
pe = rsc.getExtent();
if (pe == null) {
return false;
}
double[] v = rsc.getResourceContainer().getActiveDisplayPane()
.screenToGrid(x, y, 0);
if ((mouseButton == 1 || mouseButton == 3)
&& (MPEDisplayManager.getCurrent().isGroupedt() == false)
&& pe.contains(v[0], v[1])
&& (DrawDQCStations.grids_flag == 1 || DrawDQCStations.map_flag == 1)) {
return execute(x, y, true);
}
return false;
}
private boolean execute(int x, int y, boolean setLastPoint) {
pe = rsc.getExtent();
if (pe == null) {
return false;
}
double[] v = rsc.getResourceContainer().getActiveDisplayPane()
.screenToGrid(x, y, 0);
if (pe.contains(v[0], v[1])) {
if (setLastPoint) {
lastPoint = new int[] { x, y };
}
rsc.getValueAt(v);
rsc.issueRefresh();
return true;
} else if (setLastPoint) {
lastPoint = null;
}
return false;
}
/*
* (non-Javadoc)
*
* @see com.raytheon.viz.ui.input.IInputHandler#handleMouseDownMove(int,
* int, int)
*/
@Override
public boolean handleMouseDownMove(int x, int y, int mouseButton) {
if (lastPoint != null) {
if (mouseButton == 1) {
// execute(x, y, false);
}
return false;
}
return false;
}
/*
* (non-Javadoc)
*
* @see com.raytheon.viz.ui.input.IInputHandler#handleMouseUp(int, int, int)
*/
@Override
public boolean handleMouseUp(int x, int y, int mouseButton) {
if (lastPoint != null) {
lastPoint = null;
return true;
}
return false;
}
}
| [
"mjames@unidata.ucar.edu"
] | mjames@unidata.ucar.edu |
a27b9f102a292b06e73452f1b88bc44736d77ba8 | 5bfa069cf394595d25ddb331b8cd701acf37eeb3 | /app/src/main/java/fi/polar/polarmathsmart/trainingprogram/running/model/smartdistribution/SmartDistributionEventRunningTrainingProgram.java | 214fbaf37e4d5ca1ea0f2ca92a2a1ebed265fce9 | [] | no_license | skorotkov/reversed | 747d36a44314e2bf3ebee0607152a0873b191ca5 | 3f5222de57befe8a54fd1d07462492f3a605efdd | refs/heads/master | 2020-03-27T23:45:35.198114 | 2018-09-04T14:11:47 | 2018-09-04T14:11:47 | 147,343,931 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,579 | java | package fi.polar.polarmathsmart.trainingprogram.running.model.smartdistribution;
public class SmartDistributionEventRunningTrainingProgram extends SmartDistributionTrainingTargetTrainingProgram {
private String descriptionKey;
public boolean equals(Object var1) {
boolean var2 = true;
if (this != var1) {
if (var1 != null && this.getClass() == var1.getClass()) {
if (!super.equals(var1)) {
var2 = false;
} else {
SmartDistributionEventRunningTrainingProgram var3 = (SmartDistributionEventRunningTrainingProgram)var1;
if (this.descriptionKey != null) {
if (this.descriptionKey.equals(var3.descriptionKey)) {
return var2;
}
} else if (var3.descriptionKey == null) {
return var2;
}
var2 = false;
}
} else {
var2 = false;
}
}
return var2;
}
public String getDescriptionKey() {
return this.descriptionKey;
}
public int hashCode() {
int var1 = super.hashCode();
int var2;
if (this.descriptionKey != null) {
var2 = this.descriptionKey.hashCode();
} else {
var2 = 0;
}
return var2 + var1 * 31;
}
public void setDescriptionKey(String var1) {
this.descriptionKey = var1;
}
public String toString() {
return "SmartDistributionEventRunningTrainingProgram{descriptionKey='" + this.descriptionKey + '\'' + '}';
}
}
| [
"sergey.korotkov@prowidelabs.com"
] | sergey.korotkov@prowidelabs.com |
a6eb223dc62c39d89dd728b0eb6576bc3e77d948 | 56319e53f4155b0f0ae4ab249b1d3249fc8ddd98 | /apache-tomcat-8.0.39/converted/org/apache/catalina/valves/rewrite/MainForTestRewriteValve_testUtf8FlagsB.java | 69ce914d288fc17cf4c0b7f886ac5ba815314e1d | [] | no_license | SnowOnion/J2mConvertedTestcases | 2f904e2f2754f859f6125f248d3672eb1a70abd1 | e74b0e4c08f12e5effeeb8581670156ace42640a | refs/heads/master | 2021-01-11T19:01:42.207334 | 2017-01-19T12:22:22 | 2017-01-19T12:22:22 | 79,295,183 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 615 | java | package org.apache.catalina.valves.rewrite;
import org.apache.catalina.valves.rewrite.TestRewriteValve;
public class MainForTestRewriteValve_testUtf8FlagsB {
public static void main(String[] args) {
try {
TestRewriteValve.setUpPerTestClass();
TestRewriteValve objTestRewriteValve = new TestRewriteValve();
objTestRewriteValve.setUp();
objTestRewriteValve.testUtf8FlagsB();
objTestRewriteValve.tearDown();
TestRewriteValve.tearDownPerTestClass();
} catch (Throwable e) {
e.printStackTrace();
}
}
}
| [
"snowonionlee@gmail.com"
] | snowonionlee@gmail.com |
3c62e6e654c9499b6a836300ec192b44588c03a9 | 4bd2ddf7cd2b0e3e87c78d7d81d6df1c5bdc1cda | /xh5/x5-base-root/modules/x5-base-core/src/main/java/com/hotent/base/core/util/string/StringPool.java | a6f4287d1d914a4771cebd50c569affcbbf7c542 | [] | no_license | codingOnGithub/hx | 27a873a308528eb968632bbf97e6e25107f92a9f | c93d6c23032ff798d460ee9a0efaba214594a6b9 | refs/heads/master | 2021-05-27T14:40:05.776605 | 2014-10-22T16:52:34 | 2014-10-22T16:52:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,439 | java | package com.hotent.base.core.util.string;
/**
* @描述 常用的变量接口
* @构建组 x5-base-core
* @作者 hugh zhuang
* @邮箱 zhuangxh@jee-soft.cn
* @日期 2014-01-13 下午4:23:32
* @版权 广州宏天软件有限公司版权所有
*/
public interface StringPool {
String AMPERSAND = "&";
String AND = "and";
String AT = "@";
String ASTERISK = "*";
String STAR = ASTERISK;
String BACK_SLASH = "\\";
String COLON = ":";
String COMMA = ",";
String DASH = "-";
String DOLLAR = "$";
String DOT = ".";
String DOTDOT = "..";
String DOT_CLASS = ".class";
String DOT_JAVA = ".java";
String EMPTY = "";
String EQUALS = "=";
String FALSE = "false";
String SLASH = "/";
String HASH = "#";
String HAT = "^";
String LEFT_BRACE = "{";
String LEFT_BRACKET = "(";
String LEFT_CHEV = "<";
String LEFT_CHEV_EQUAL = "<=";
String NEWLINE = "\n";
String N = "n";
String NO = "no";
String NULL = "null";
String OFF = "off";
String ON = "on";
String OR = "or";
String PERCENT = "%";
String PIPE = "|";
String PLUS = "+";
String QUESTION_MARK = "?";
String EXCLAMATION_MARK = "!";
String QUOTE = "\"";
String RETURN = "\r";
String TAB = "\t";
String RETURN_NEW_LINE = "\r\n";
String RIGHT_BRACE = "}";
String RIGHT_BRACKET = ")";
String RIGHT_CHEV = ">";
String RIGHT_CHEV_EQUAL = ">=";
String SEMICOLON = ";";
String SINGLE_QUOTE = "'";
String SPACE = " ";
String LEFT_SQ_BRACKET = "[";
String RIGHT_SQ_BRACKET = "]";
String TRUE = "true";
String UNDERSCORE = "_";
String UTF_8 = "UTF-8";
String ISO_8859_1 = "ISO-8859-1";
String Y = "y";
String YES = "yes";
String ONE = "1";
String ZERO = "0";
String DOLLAR_LEFT_BRACE = "${";
String LIKE = "LIKE";
/** 特殊字符 */
String SPECIAL_REG_EX = "[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?\"]";
/** yyyy-MM-dd HH:mm:ss */
String DATE_FORMAT_DATETIME = "yyyy-MM-dd HH:mm:ss";
/** yyyy-MM-dd */
String DATE_FORMAT_DATE = "yyyy-MM-dd";
/** yyyy-MM-dd HH:mm */
String DATE_FORMAT_DATETIME_NOSECOND = "yyyy-MM-dd HH:mm";
/** yyyy-MM-dd HH */
String DATE_FORMAT_DATETIME_NOMINUTE = "yyyy-MM-dd HH";
/** HH:mm:ss */
String DATE_FORMAT_TIME = "HH:mm:ss";
/** HH:mm */
String DATE_FORMAT_TIME_NOSECOND = "HH:mm";
/** yyyy-MM-dd HH:mm:ss.SSS */
String DATE_FORMAT_TIMESTAMP = "yyyy-MM-dd HH:mm:ss.SSS";
}
| [
"wang2009long@126.com"
] | wang2009long@126.com |
51b31d28ae113da1d2e2256976a277ccd262f6d7 | 2905e6745a67004580aa70a3fa246aa47c0eee97 | /netscript/src/jprime/gen/DistributedTrafficType.java | acaeb7d07de0be02212e391ce1383bb5748ad594 | [] | no_license | summonersRift/primogeni | 32cbf949f62e6442d0748258dfdff2dd63199a3b | 763cf746dcd7c9c4d3d20d328899cb96efe6da69 | refs/heads/master | 2020-12-25T00:08:58.727433 | 2015-01-30T18:13:36 | 2015-01-30T18:13:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,262 | java | /* ------------------------- */
/* ------------------------- */
/* WARNING: */
/* THIS FILE IS GENERATED! */
/* DO NOT EDIT! */
/* ------------------------- */
/* ------------------------- */
package jprime.gen;
import jprime.*;
import jprime.variable.*;
import jprime.ModelNodeRecord;
import org.python.core.PyObject;
import org.python.core.Py;
public abstract class DistributedTrafficType extends jprime.DynamicTrafficType.DynamicTrafficType implements jprime.gen.IDistributedTrafficType {
/* used to enforce the minimum/maximum child requirement */
public void enforceChildConstraints() {
super.enforceChildConstraints();
}
public DistributedTrafficType(PyObject[] v, String[] s){super(v,s);}
public DistributedTrafficType(ModelNodeRecord rec){ super(rec); }
public DistributedTrafficType(IModelNode parent){ super(parent); }
/**
* @return the interface which this node implements
*/
public Class<?> getNodeType() {
return jprime.DistributedTrafficType.IDistributedTrafficType.class;
}
/**
* @param used by replicas to do a deep copy of the node.
*/
public jprime.ModelNode deepCopy(jprime.ModelNode parent) {
jprime.DistributedTrafficType.DistributedTrafficTypeReplica c = new jprime.DistributedTrafficType.DistributedTrafficTypeReplica(this.getName(),(IModelNode)parent,(jprime.DistributedTrafficType.IDistributedTrafficType)this);
return c;
}
public static boolean isSubType(IModelNode n) {
return isSubType(n.getTypeId());
}
public static boolean isSubType(int id) {
switch(id) {
case 1021: //DistributedTrafficType
case 1077: //DistributedTrafficTypeAlias
case 1133: //DistributedTrafficTypeReplica
case 1189: //DistributedTrafficTypeAliasReplica
return true;
}
return false;
}
/* (non-Javadoc)
* @see jprime.IModelNode#getTypeId()
*/
public abstract int getTypeId();
public final static java.util.ArrayList<Integer> attrIds=new java.util.ArrayList<Integer>();
static {
}
/**
* @return a list of ids of the possible type of attribute this model node type can have
*/
public java.util.ArrayList<Integer> getAttrIds() {
return attrIds;
}
/**
* @param visitor a generic visitor
*/
public abstract void accept(jprime.visitors.IGenericVisitor visitor);
}
| [
"obaida007@gmail.com"
] | obaida007@gmail.com |
ea491085798b54e8cd774743f33192c62528e4e4 | ac82c09fd704b2288cef8342bde6d66f200eeb0d | /projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/bondcleanprice/BondConvexityFromCleanPriceFunction.java | 2111fcccca155deb9480bf85fdd1c56a8f65079e | [
"Apache-2.0"
] | permissive | cobaltblueocean/OG-Platform | 88f1a6a94f76d7f589fb8fbacb3f26502835d7bb | 9b78891139503d8c6aecdeadc4d583b23a0cc0f2 | refs/heads/master | 2021-08-26T00:44:27.315546 | 2018-02-23T20:12:08 | 2018-02-23T20:12:08 | 241,467,299 | 0 | 2 | Apache-2.0 | 2021-08-02T17:20:41 | 2020-02-18T21:05:35 | Java | UTF-8 | Java | false | false | 893 | java | /**
* Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.financial.analytics.model.bondcleanprice;
import static com.opengamma.engine.value.ValueRequirementNames.CONVEXITY;
import com.opengamma.analytics.financial.interestrate.bond.calculator.ConvexityFromCleanPriceCalculator;
import com.opengamma.engine.value.ValueRequirementNames;
/**
* Calculates the convexity of a bond from the clean price.
*/
public class BondConvexityFromCleanPriceFunction extends BondFromCleanPriceFunction<Double> {
/**
* Sets the value requirement name to {@link ValueRequirementNames#CONVEXITY}
* and the calculator to {@link ConvexityFromCleanPriceCalculator}
*/
public BondConvexityFromCleanPriceFunction() {
super(CONVEXITY, ConvexityFromCleanPriceCalculator.getInstance());
}
}
| [
"cobaltblue.ocean@gmail.com"
] | cobaltblue.ocean@gmail.com |
ff7772858c4306bf8b88fc7b68c1db618a5dfe57 | 93c99ee9770362d2917c9494fd6b6036487e2ebd | /server/decompiled_apps/2b7122657dcb75ede8840eff964dd94a/com.bankeen.ui.pincode/x.java | e1d2714efc27dd7cd3c18cbe16983d1f68b1e551 | [] | no_license | YashJaveri/Satic-Analysis-Tool | e644328e50167af812cb2f073e34e6b32279b9ce | d6f3be7d35ded34c6eb0e38306aec0ec21434ee4 | refs/heads/master | 2023-05-03T14:29:23.611501 | 2019-06-24T09:01:23 | 2019-06-24T09:01:23 | 192,715,309 | 0 | 1 | null | 2023-04-21T20:52:07 | 2019-06-19T11:00:47 | Smali | UTF-8 | Java | false | false | 2,175 | java | package com.bankeen.ui.pincode;
import android.content.Context;
import android.hardware.fingerprint.FingerprintManager;
import android.os.Build.VERSION;
import com.bankeen.data.encryptedprefs.Entry;
import com.bankeen.data.f.c;
import com.bankeen.data.f.k;
import com.bankeen.utils.i;
import javax.inject.Named;
/* compiled from: PincodeModule */
public abstract class x {
static w a(Context context, ah ahVar) {
if (VERSION.SDK_INT < 23) {
return new q();
}
if (!ahVar.a()) {
return new q();
}
FingerprintManager fingerprintManager = (FingerprintManager) context.getSystemService("fingerprint");
if (fingerprintManager == null) {
return new q();
}
return new d(context, fingerprintManager);
}
static ai a(ah ahVar, c cVar, k kVar) {
switch (ahVar) {
case CREATE:
return new ak(kVar);
case APP_AUTHENTICATE:
case TRANSFER_AUTHENTICATE:
return new aj(cVar);
case DELETE:
return new al(cVar, kVar);
default:
i iVar = i.a;
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("unknown action: ");
stringBuilder.append(ahVar);
iVar.a(new IllegalArgumentException(stringBuilder.toString()));
return new aj(cVar);
}
}
static t a(ah ahVar) {
if (ahVar.c()) {
return new b();
}
return new c();
}
@Named
static String b(Context context, ah ahVar) {
return context.getString(ahVar.b());
}
static ah a(PincodeActivity pincodeActivity) {
return ah.values()[pincodeActivity.getIntent().getIntExtra("extra:extra_pincode_spec_ordinal", ah.APP_AUTHENTICATE.ordinal())];
}
static v a(ah ahVar, com.bankeen.data.encryptedprefs.c cVar) {
if (ahVar == ah.CREATE) {
return v.STANDARD;
}
if (cVar.a(Entry.PINCODE).length() == v.LEGACY.c()) {
return v.LEGACY;
}
return v.STANDARD;
}
} | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
8b1c04d59767d2ba8ff4fbef52acf7faf45ae0e2 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.token/classes.jar/oicq/wlogin_sdk/tlv_type/tlv_t17e.java | 3a1168b6da11239b3389674dd9f0ddc35e9521a0 | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 321 | java | package oicq.wlogin_sdk.tlv_type;
public class tlv_t17e
extends tlv_t
{
public tlv_t17e()
{
this._cmd = 382;
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.token\classes.jar
* Qualified Name: oicq.wlogin_sdk.tlv_type.tlv_t17e
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
fb9aa24a2478545dfc443808149b54beb10ae546 | 0944251ec279eb79085d84767dff544eb79a1789 | /app.web/src/main/java/com/weiqi/app/web/appurl/BaseAppPage.java | 8fd54f8682ad7cde297570d8d9dc1022e9858969 | [] | no_license | pengsong31/weiqi.app | 3b9d90cfeb523009523485dfbcae41319d66ea1d | 1dc8da537e9bd279b57da410e2da194e7498742d | refs/heads/master | 2021-01-20T21:34:50.353972 | 2013-06-22T10:57:26 | 2013-06-22T10:57:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,166 | java | /*
* Copyright 2013 Aliyun.com All right reserved. This software is the
* confidential and proprietary information of Aliyun.com ("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 Aliyun.com .
*/
package com.weiqi.app.web.appurl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.request.IRequestCycle;
import org.apache.wicket.request.IRequestHandler;
import org.apache.wicket.request.http.WebResponse;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.apache.wicket.spring.injection.annot.SpringBean;
import com.alibaba.fastjson.JSON;
import com.weiqi.app.service.intf.CompanyService;
import com.weiqi.app.web.annotation.Page;
/**
* @author darui.wudr 2013-6-22 下午1:10:05
*/
public abstract class BaseAppPage extends WebPage {// implements IMarkupResourceStreamProvider
private static final long serialVersionUID = -521887324367928854L;
private static Log log = LogFactory.getLog(BaseAppPage.class);
final static String APP_UUID = "appuuid";
@SpringBean
protected CompanyService companyService;
public BaseAppPage(final PageParameters paras) {
IRequestHandler handler = new AppRequestHandler() {
@Override
protected String process() {
Object bean = doProcess(paras);
String json = toJson(bean);
log.info("\nurl " + getURL() + " json:\n\t" + json);
return json;
}
};
this.getRequestCycle().scheduleRequestHandlerAfterCurrent(handler);
}
/**
* 根据url参数查询相应的结果(bean)
*
* @param paras
* @return
*/
protected abstract Object doProcess(final PageParameters paras);
protected long getAppID(PageParameters paras) {
String appUUID = paras.get(APP_UUID).toString();
Long appID = companyService.findAppIDByUUID(appUUID);
return appID == null ? 0L : appID;
}
private final static String toJson(Object obj) {
String json = JSON.toJSONString(obj);
return json;
}
private String pageUrl = null;
private String getURL() {
if (pageUrl == null) {
Page page = this.getClass().getAnnotation(Page.class);
this.pageUrl = page == null ? "app/unknown" : page.value();
}
return pageUrl;
}
}
abstract class AppRequestHandler implements IRequestHandler {
@Override
public void respond(IRequestCycle requestCycle) {
}
@Override
public void detach(IRequestCycle requestCycle) {
WebResponse response = (WebResponse) requestCycle.getResponse();
response.setContentType("application/json; charset=UTF-8");
response.addHeader("Content-Type", "application/json; charset=UTF-8");
String json = this.process();
response.write(json);
}
protected abstract String process();
}
| [
"darui.wu@163.com"
] | darui.wu@163.com |
e85043a4408e9078303b68eb4e3853db8d52cd61 | 6be39fc2c882d0b9269f1530e0650fd3717df493 | /weixin反编译/sources/oicq/wlogin_sdk/tools/a.java | 1e03d9fd5fe4ec68eb8b149dda1b39216fc0e0e6 | [] | no_license | sir-deng/res | f1819af90b366e8326bf23d1b2f1074dfe33848f | 3cf9b044e1f4744350e5e89648d27247c9dc9877 | refs/heads/master | 2022-06-11T21:54:36.725180 | 2020-05-07T06:03:23 | 2020-05-07T06:03:23 | 155,177,067 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,690 | java | package oicq.wlogin_sdk.tools;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Random;
final class a {
int contextStart;
int crypt;
boolean header = true;
byte[] key;
byte[] out;
int padding;
byte[] plain;
int pos;
int preCrypt;
byte[] prePlain;
Random random = new Random();
a() {
}
private static long x(byte[] bArr, int i) {
long j = 0;
int i2 = i + 4;
while (i < i2) {
j = (j << 8) | ((long) (bArr[i] & 255));
i++;
}
return (j >>> 32) | (4294967295L & j);
}
private byte[] encipher(byte[] bArr) {
int i = 16;
try {
long x = x(bArr, 0);
long x2 = x(bArr, 4);
long x3 = x(this.key, 0);
long x4 = x(this.key, 4);
long x5 = x(this.key, 8);
long x6 = x(this.key, 12);
long j = 0;
while (true) {
int i2 = i - 1;
if (i <= 0) {
OutputStream byteArrayOutputStream = new ByteArrayOutputStream(8);
DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);
dataOutputStream.writeInt((int) x);
dataOutputStream.writeInt((int) x2);
dataOutputStream.close();
return byteArrayOutputStream.toByteArray();
}
j = (j + 2654435769L) & 4294967295L;
x = (x + ((((x2 << 4) + x3) ^ (x2 + j)) ^ ((x2 >>> 5) + x4))) & 4294967295L;
x2 = (x2 + ((((x << 4) + x5) ^ (x + j)) ^ ((x >>> 5) + x6))) & 4294967295L;
i = i2;
}
} catch (IOException e) {
return null;
}
}
byte[] decipher(byte[] bArr, int i) {
int i2 = 16;
try {
long x = x(bArr, 0);
long x2 = x(bArr, 4);
long x3 = x(this.key, 0);
long x4 = x(this.key, 4);
long x5 = x(this.key, 8);
long x6 = x(this.key, 12);
long j = 3816266640L;
while (true) {
int i3 = i2 - 1;
if (i2 <= 0) {
OutputStream byteArrayOutputStream = new ByteArrayOutputStream(8);
DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);
dataOutputStream.writeInt((int) x);
dataOutputStream.writeInt((int) x2);
dataOutputStream.close();
return byteArrayOutputStream.toByteArray();
}
x2 = (x2 - ((((x << 4) + x5) ^ (x + j)) ^ ((x >>> 5) + x6))) & 4294967295L;
x = (x - ((((x2 << 4) + x3) ^ (x2 + j)) ^ ((x2 >>> 5) + x4))) & 4294967295L;
j = (j - 2654435769L) & 4294967295L;
i2 = i3;
}
} catch (IOException e) {
return null;
}
}
final void encrypt8Bytes() {
byte[] bArr;
int i;
this.pos = 0;
while (this.pos < 8) {
if (this.header) {
bArr = this.plain;
i = this.pos;
bArr[i] = (byte) (bArr[i] ^ this.prePlain[this.pos]);
} else {
bArr = this.plain;
i = this.pos;
bArr[i] = (byte) (bArr[i] ^ this.out[this.preCrypt + this.pos]);
}
this.pos++;
}
System.arraycopy(encipher(this.plain), 0, this.out, this.crypt, 8);
this.pos = 0;
while (this.pos < 8) {
bArr = this.out;
i = this.crypt + this.pos;
bArr[i] = (byte) (bArr[i] ^ this.prePlain[this.pos]);
this.pos++;
}
System.arraycopy(this.plain, 0, this.prePlain, 0, 8);
this.preCrypt = this.crypt;
this.crypt += 8;
this.pos = 0;
this.header = false;
}
boolean decrypt8Bytes(byte[] bArr, int i, int i2) {
this.pos = 0;
while (this.pos < 8) {
if (this.contextStart + this.pos >= i2) {
return true;
}
byte[] bArr2 = this.prePlain;
int i3 = this.pos;
bArr2[i3] = (byte) (bArr2[i3] ^ bArr[(this.crypt + 0) + this.pos]);
this.pos++;
}
this.prePlain = decipher(this.prePlain, 0);
if (this.prePlain == null) {
return false;
}
this.contextStart += 8;
this.crypt += 8;
this.pos = 0;
return true;
}
}
| [
"denghailong@vargo.com.cn"
] | denghailong@vargo.com.cn |
8602a5fa744138c1d1aaa0591f5bc9ed3111c949 | dc7623e87efba8314ffd95427926af336e9628de | /src/main/java/net/openhft/chronicle/bytes/CommonMarshallable.java | 6b23c3ce6c3c9402408416f627b9ae4527948742 | [
"Apache-2.0"
] | permissive | JanStureNielsen/Chronicle-Bytes | 924a21e6190303ce94640da99004cb634e631042 | 73b23bd0abb414fd5e9b4a516c7264154def3334 | refs/heads/master | 2020-04-22T07:49:57.108076 | 2020-03-17T06:47:27 | 2020-03-17T06:47:27 | 170,226,098 | 0 | 0 | NOASSERTION | 2019-02-12T00:41:17 | 2019-02-12T00:41:17 | null | UTF-8 | Java | false | false | 313 | java | package net.openhft.chronicle.bytes;
import net.openhft.chronicle.core.annotation.DontChain;
@DontChain
public interface CommonMarshallable {
/**
* @return whether this message should be written as self describing
*/
default boolean usesSelfDescribingMessage() {
return false;
}
}
| [
"peter.lawrey@higherfrequencytrading.com"
] | peter.lawrey@higherfrequencytrading.com |
dba1ceddd02e2cd6d31709e5f5aac8e11f2ddc2c | 421f0a75a6b62c5af62f89595be61f406328113b | /generated_tests/no_seeding/69_lhamacaw-macaw.presentationLayer.OntologyTermEditor-1.0-5/macaw/presentationLayer/OntologyTermEditor_ESTest_scaffolding.java | 16303a3162ec39b8bb8c958a9c5bb58787017ce2 | [] | no_license | tigerqiu712/evosuite-model-seeding-empirical-evaluation | c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6 | 11a920b8213d9855082d3946233731c843baf7bc | refs/heads/master | 2020-12-23T21:04:12.152289 | 2019-10-30T08:02:29 | 2019-10-30T08:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 548 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Oct 28 18:34:15 GMT 2019
*/
package macaw.presentationLayer;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class OntologyTermEditor_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pderakhshanfar@bsr01.win.tue.nl"
] | pderakhshanfar@bsr01.win.tue.nl |
ff326ce6999f3225973bb002b7271726d1a8a58e | 2e590ef886718e01d7ec58beff00a28d7aa9a366 | /source-code/java/pig/src/gov/nasa/kepler/ui/ops/parameters/ParametersClassCache.java | 9833958c2abb166349975df31f6905c7480a549e | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | adam-sweet/kepler-pipeline | 95a6cbc03dd39a8289b090fb85cdfc1eb5011fd9 | f58b21df2c82969d8bd3e26a269bd7f5b9a770e1 | refs/heads/master | 2022-06-07T21:22:33.110291 | 2020-05-06T01:12:08 | 2020-05-06T01:12:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,560 | java | /*
* Copyright 2017 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* This file is available under the terms of the NASA Open Source Agreement
* (NOSA). You should have received a copy of this agreement with the
* Kepler source code; see the file NASA-OPEN-SOURCE-AGREEMENT.doc.
*
* No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY
* WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY,
* INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE
* WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM
* INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR
* FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM
* TO THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER,
* CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT
* OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY
* OTHER APPLICATIONS RESULTING FROM USE OF THE SUBJECT SOFTWARE.
* FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND LIABILITIES
* REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE,
* AND DISTRIBUTES IT "AS IS."
*
* Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS
* AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND
* SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF
* THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES,
* EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM
* PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT
* SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED
* STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY
* PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE
* REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL
* TERMINATION OF THIS AGREEMENT.
*/
package gov.nasa.kepler.ui.ops.parameters;
import gov.nasa.kepler.hibernate.pi.ClassWrapper;
import gov.nasa.kepler.ui.common.ClasspathUtils;
import gov.nasa.spiffy.common.pi.Parameters;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
/**
* Cache that holds {@link ClassWrapper<Parameters>} objects for all
* implementations of the {@link Parameters} interface found on the
* classpath.
*
* @author tklaus
*
*/
public class ParametersClassCache {
private static List<ClassWrapper<Parameters>> cache = new LinkedList<ClassWrapper<Parameters>>();
private static boolean initialized = false;
private ParametersClassCache() {
}
/**
* Return a cached List of all classes that implement the {@link Parameters}
* interface found on the classpath.
*
* @return
* @throws Exception
*/
public static synchronized List<ClassWrapper<Parameters>> getCache() throws Exception{
if(!initialized){
initializeCache();
}
return cache;
}
/**
* Return a cached List of all classes that implement the {@link Parameters}
* interface and are sub-classes for the specified filter class
* found on the classpath.
*
* @param filter
* @return
* @throws Exception
*/
public static synchronized List<ClassWrapper<Parameters>> getCache(Class<? extends Parameters> filter) throws Exception{
if(!initialized){
initializeCache();
}
List<ClassWrapper<Parameters>> filteredCache = new LinkedList<ClassWrapper<Parameters>>();
for (ClassWrapper<Parameters> classWrapper : cache) {
if(filter.isAssignableFrom(classWrapper.getClazz())){
filteredCache.add(classWrapper);
}
}
return filteredCache;
}
private static synchronized void initializeCache() throws Exception{
cache = new LinkedList<ClassWrapper<Parameters>>();
ClasspathUtils classpathUtils = new ClasspathUtils();
Set<Class<? extends Parameters>> detectedClasses = classpathUtils.scanForInterfaceImpl(Parameters.class);
for (Class<? extends Parameters> clazz : detectedClasses) {
ClassWrapper<Parameters> wrapper = new ClassWrapper<Parameters>(clazz);
cache.add(wrapper);
}
Collections.sort(cache);
}
}
| [
"Bill.Wohler@nasa.gov"
] | Bill.Wohler@nasa.gov |
169296527402c715c55a2d677fa890dc0131ef8f | 6d0a2a7e38debf97ffd05018122438981e9b3bb7 | /Package Service/src/main/java/com/enableets/edu/pakage/microservice/ppr/restful/AnswerInfoRestful.java | 28e06d7fa3c5c8dada3d047effbc8451c7c04138 | [] | no_license | zhouyi10/Enable-Cloud-Package | 165d03a4af0ea4854787630c7b62cdb7ad185dae | 6790a1bad3a96cf782761f9ff5ae431d1fd4ffe6 | refs/heads/master | 2023-06-11T12:26:00.243936 | 2021-06-30T06:50:45 | 2021-06-30T06:50:45 | 365,156,634 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,520 | java | package com.enableets.edu.pakage.microservice.ppr.restful;
import com.enableets.edu.module.service.controller.ServiceControllerAdapter;
import com.enableets.edu.module.service.core.Response;
import com.enableets.edu.pakage.framework.ppr.bo.TestInfoBO;
import com.enableets.edu.pakage.framework.ppr.test.service.AnswerInfoService;
import com.enableets.edu.pakage.framework.ppr.test.service.TestInfoService;
import com.enableets.edu.pakage.framework.ppr.test.service.submitV2.SubmitAnswerV2Service;
import com.enableets.edu.pakage.framework.ppr.test.service.submitV2.processor.AnswerRequestCompressorRunner;
import com.enableets.edu.pakage.microservice.ppr.vo.AnswerCardSubmitInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* answer restful interface
* @author walle_yu@enable-ets.com
* @since 2020/07/31
**/
@Api(value = "(5)Test answer Info Api", tags = "(5)answer、submit 、mark info!", position = 5)
@RestController
@RequestMapping(value = "/microservice/packageservice/ppr/answer")
public class AnswerInfoRestful extends ServiceControllerAdapter<String> {
@Autowired
public SubmitAnswerV2Service submitAnswerV2Service;
@Autowired
public TestInfoService testInfoService;
@Autowired
private AnswerRequestCompressorRunner answerRequestCompressorRunner;
@Autowired
private AnswerInfoService answerInfoService;
/**
* Submit Answer & Temporary storage
* @param answerSubmitInfoVO
* @return
*/
@RequestMapping(value = "/submit", method = RequestMethod.POST)
public Response<String> submit(@ApiParam(value = "Answer Card Info", required = true) @RequestBody AnswerCardSubmitInfoVO answerSubmitInfoVO){
String testUserId = (String)submitAnswerV2Service.save(answerSubmitInfoVO.getEnableCardXml()).getData();
return responseTemplate.format(testUserId);
}
/**
* Get Test Info By ID
* @param testId Test ID
* @return TestInfoBO
*/
@ApiOperation(value = "Get Test Info", notes = "Get Test Info By ID")
@RequestMapping(value = "/test/{testId}", method = RequestMethod.GET)
public Response<TestInfoBO> get(@ApiParam(value = "Test ID", required = true) @PathVariable("testId") String testId){
return responseTemplate.format(testInfoService.get(testId, null, null, null, Boolean.FALSE));
}
}
| [
"justice_zhou@enable-ets.com"
] | justice_zhou@enable-ets.com |
98bfd2b9ec96169f16b8e9de02e00e417c7cb538 | 76ad64ad8a606e03f3b6d92dba99cd9eb22fd366 | /kikaha-core/source/kikaha/core/url/URLMatcher.java | c9cee87f6a2ae98ec10e17a298f42d834153b58f | [
"Apache-2.0"
] | permissive | Skullabs/kikaha | 069cd66d1dbfda9bface09d12a13436c6f2a8804 | 0df3ca87e1ffe50e5f53b582fc0f734ac69e422c | refs/heads/version-2.1.x | 2023-08-27T12:43:15.321098 | 2021-06-14T04:11:42 | 2021-06-14T04:11:42 | 20,723,726 | 73 | 27 | Apache-2.0 | 2023-04-15T20:20:58 | 2014-06-11T12:09:38 | Java | UTF-8 | Java | false | false | 3,845 | java | package kikaha.core.url;
import java.util.*;
import kikaha.core.cdi.helpers.*;
import lombok.*;
@RequiredArgsConstructor
public class URLMatcher implements Matcher {
public static final URLMatcher EMPTY = new URLMatcher( Collections.emptyList() );
final List<Matcher> patternMatchers;
public boolean matches( final String string, final Map<String, String> foundParameters ) {
return matches( new StringCursor( string ), foundParameters );
}
@Override
public boolean matches( final StringCursor string, final Map<String, String> foundParameters ) {
string.reset();
for ( final Matcher matcher : patternMatchers )
if ( !matcher.matches( string, foundParameters ) )
return false;
return true;
}
public static URLMatcher compile( final String string ) {
return compile( string, false );
}
public static URLMatcher compile( final String string, final boolean doNotIgnoreSlashes ) {
val compiler = new URLPatternCompiler( doNotIgnoreSlashes );
compiler.compile( string );
return new URLMatcher( compiler.patternMatchers );
}
public String replace( final Map<String, String> foundParameters ) {
val buffer = new StringBuilder();
replace( buffer, foundParameters );
return buffer.toString();
}
@Override
public void replace( final StringBuilder buffer, final Map<String, String> foundParameters ) {
for ( final Matcher matcher : patternMatchers )
matcher.replace( buffer, foundParameters );
}
@Override
public String toString() {
val buffer = new StringBuilder();
for ( final Matcher matcher : patternMatchers )
buffer.append( matcher.toString() ).append(',');
return buffer.toString();
}
}
@RequiredArgsConstructor
class URLPatternCompiler {
final List<Matcher> patternMatchers = new TinyList<>();
final boolean doNotIgnoreSlashes;
boolean remainsUnparsedDataInCursor = false;
public void compile( final String string ) {
final StringCursor cursor = new StringCursor( string );
while ( cursor.hasNext() )
compile( cursor, cursor.next() );
if ( remainsUnparsedDataInCursor )
patternMatchers.add( new EqualsMatcher( cursor.substringFromLastMark() ) );
patternMatchers.add( new EndOfStringMatcher() );
}
private void compile( final StringCursor cursor, final char next ) {
if ( next == '*' || next == '{' ) {
compileSpecialCharacters( cursor, next );
remainsUnparsedDataInCursor = false;
} else
remainsUnparsedDataInCursor = true;
}
private void compileSpecialCharacters( final StringCursor cursor, final char next ) {
appendEqualsMatcherForBufferedTextUntilNow( cursor );
cursor.mark();
handleSpecialCharacter( cursor, next );
cursor.mark();
}
private void appendEqualsMatcherForBufferedTextUntilNow( final StringCursor cursor ) {
final String token = cursor.substringFromLastMark( 1 );
if ( !token.isEmpty() )
patternMatchers.add( new EqualsMatcher( token ) );
}
private void handleSpecialCharacter( final StringCursor cursor, final char next ) {
if ( next == '*' )
appendMatcherForAsterisk( cursor );
else if ( next == '{' )
appendPlaceHolderMatcher( cursor );
}
private void appendMatcherForAsterisk( final StringCursor cursor ) {
if ( cursor.hasNext() )
patternMatchers.add( new AnyStringNextValidCharMatcher( cursor.next() ) );
else
patternMatchers.add( new AnyStringUntilEndMatcher() );
}
private void appendPlaceHolderMatcher( final StringCursor cursor ) {
if ( !cursor.shiftCursorToNextChar( '}' ) )
throw new RuntimeException( "Invalid expression!" );
final String placeholder = cursor.substringFromLastMark( 1 );
if ( cursor.hasNext() ) {
final char nextChar = cursor.next();
patternMatchers.add( new PlaceHolderMatcher( placeholder, nextChar ) );
} else
patternMatchers.add( new PlaceHolderForAnyStringUntilEndMatcher( placeholder, doNotIgnoreSlashes ) );
}
}
| [
"miere00@gmail.com"
] | miere00@gmail.com |
1715a4c3543494620d030d8487b30d229208be4f | 6cc4c3cf5d8352db2ee2659532042350c265e0f1 | /src/com/clashroom/shared/entity/QueuedBattleEntity.java | c125cffb05dc6e54900edaf60fa0389bb7f4ba50 | [] | no_license | samueltoma/Clashroom | d883a121acd4e711fefbcd7a242af1e54f76ac87 | 86fea45a2899048433aabaf6e0795ca2d9061063 | refs/heads/master | 2021-01-18T02:24:44.716288 | 2013-05-20T23:26:04 | 2013-05-20T23:26:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,753 | java | package com.clashroom.shared.entity;
import java.io.Serializable;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
/**
* An entity representing a {@link BattleEntity} that should be
* created in the future.
*/
@PersistenceCapable
public class QueuedBattleEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
@PrimaryKey
private Long id;
@Persistent
private List<Long> playerIds;
@Persistent
private String teamAName;
@Persistent
private List<Long> teamAIds;
@Persistent
private String teamBName;
@Persistent
private List<Long> teamBIds;
@Persistent
private Date time;
@Deprecated
public QueuedBattleEntity() { }
public QueuedBattleEntity(String teamAName, List<Long> teamAIds,
String teamBName, List<Long> teamBIds, Date time) {
this.teamAName = teamAName;
this.teamAIds = teamAIds;
this.teamBName = teamBName;
this.teamBIds = teamBIds;
this.time = time;
playerIds = new LinkedList<Long>();
playerIds.addAll(teamAIds);
playerIds.addAll(teamBIds);
}
public Long getId() {
return id;
}
public List<Long> getPlayerIds() {
return playerIds;
}
public String getTeamAName() {
return teamAName;
}
public List<Long> getTeamAIds() {
return teamAIds;
}
public String getTeamBName() {
return teamBName;
}
public List<Long> getTeamBIds() {
return teamBIds;
}
public Date getTime() {
return time;
}
}
| [
"thomaswprice@msn.com"
] | thomaswprice@msn.com |
8cc7b6ab745a01b6ac2160cf3af7ddc7dbef1840 | f987eef180221332b4b6da83e4ebf095fd1eac2f | /sdk/java/src/main/java/com/pulumi/aiven/inputs/AccountAuthenticationSamlFieldMappingArgs.java | 301f4bcde7def04927cd3b99ec2a421c08147759 | [
"Apache-2.0",
"MPL-2.0",
"BSD-3-Clause"
] | permissive | pulumi/pulumi-aiven | dd10b0a6880b3b89c21e83ae0e071899ae6a8885 | c6772dd188ce82ba4601a8d732a5cc6ce1ef0435 | refs/heads/master | 2023-09-05T15:29:05.424768 | 2023-08-28T19:55:24 | 2023-08-28T19:55:24 | 202,578,855 | 10 | 1 | Apache-2.0 | 2023-09-11T23:02:08 | 2019-08-15T16:50:42 | Java | UTF-8 | Java | false | false | 7,138 | java | // *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aiven.inputs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class AccountAuthenticationSamlFieldMappingArgs extends com.pulumi.resources.ResourceArgs {
public static final AccountAuthenticationSamlFieldMappingArgs Empty = new AccountAuthenticationSamlFieldMappingArgs();
/**
* Field name for user email
*
*/
@Import(name="email")
private @Nullable Output<String> email;
/**
* @return Field name for user email
*
*/
public Optional<Output<String>> email() {
return Optional.ofNullable(this.email);
}
/**
* Field name for user's first name
*
*/
@Import(name="firstName")
private @Nullable Output<String> firstName;
/**
* @return Field name for user's first name
*
*/
public Optional<Output<String>> firstName() {
return Optional.ofNullable(this.firstName);
}
/**
* Field name for user's identity. This field must always exist in responses, and must be immutable and unique. Contents of this field are used to identify the user. Using user ID (such as unix user id) is highly recommended, as email address may change, requiring relinking user to Aiven user.
*
*/
@Import(name="identity")
private @Nullable Output<String> identity;
/**
* @return Field name for user's identity. This field must always exist in responses, and must be immutable and unique. Contents of this field are used to identify the user. Using user ID (such as unix user id) is highly recommended, as email address may change, requiring relinking user to Aiven user.
*
*/
public Optional<Output<String>> identity() {
return Optional.ofNullable(this.identity);
}
/**
* Field name for user's last name
*
*/
@Import(name="lastName")
private @Nullable Output<String> lastName;
/**
* @return Field name for user's last name
*
*/
public Optional<Output<String>> lastName() {
return Optional.ofNullable(this.lastName);
}
/**
* Field name for user's full name. If specified, first*name and last*name mappings are ignored
*
*/
@Import(name="realName")
private @Nullable Output<String> realName;
/**
* @return Field name for user's full name. If specified, first*name and last*name mappings are ignored
*
*/
public Optional<Output<String>> realName() {
return Optional.ofNullable(this.realName);
}
private AccountAuthenticationSamlFieldMappingArgs() {}
private AccountAuthenticationSamlFieldMappingArgs(AccountAuthenticationSamlFieldMappingArgs $) {
this.email = $.email;
this.firstName = $.firstName;
this.identity = $.identity;
this.lastName = $.lastName;
this.realName = $.realName;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AccountAuthenticationSamlFieldMappingArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private AccountAuthenticationSamlFieldMappingArgs $;
public Builder() {
$ = new AccountAuthenticationSamlFieldMappingArgs();
}
public Builder(AccountAuthenticationSamlFieldMappingArgs defaults) {
$ = new AccountAuthenticationSamlFieldMappingArgs(Objects.requireNonNull(defaults));
}
/**
* @param email Field name for user email
*
* @return builder
*
*/
public Builder email(@Nullable Output<String> email) {
$.email = email;
return this;
}
/**
* @param email Field name for user email
*
* @return builder
*
*/
public Builder email(String email) {
return email(Output.of(email));
}
/**
* @param firstName Field name for user's first name
*
* @return builder
*
*/
public Builder firstName(@Nullable Output<String> firstName) {
$.firstName = firstName;
return this;
}
/**
* @param firstName Field name for user's first name
*
* @return builder
*
*/
public Builder firstName(String firstName) {
return firstName(Output.of(firstName));
}
/**
* @param identity Field name for user's identity. This field must always exist in responses, and must be immutable and unique. Contents of this field are used to identify the user. Using user ID (such as unix user id) is highly recommended, as email address may change, requiring relinking user to Aiven user.
*
* @return builder
*
*/
public Builder identity(@Nullable Output<String> identity) {
$.identity = identity;
return this;
}
/**
* @param identity Field name for user's identity. This field must always exist in responses, and must be immutable and unique. Contents of this field are used to identify the user. Using user ID (such as unix user id) is highly recommended, as email address may change, requiring relinking user to Aiven user.
*
* @return builder
*
*/
public Builder identity(String identity) {
return identity(Output.of(identity));
}
/**
* @param lastName Field name for user's last name
*
* @return builder
*
*/
public Builder lastName(@Nullable Output<String> lastName) {
$.lastName = lastName;
return this;
}
/**
* @param lastName Field name for user's last name
*
* @return builder
*
*/
public Builder lastName(String lastName) {
return lastName(Output.of(lastName));
}
/**
* @param realName Field name for user's full name. If specified, first*name and last*name mappings are ignored
*
* @return builder
*
*/
public Builder realName(@Nullable Output<String> realName) {
$.realName = realName;
return this;
}
/**
* @param realName Field name for user's full name. If specified, first*name and last*name mappings are ignored
*
* @return builder
*
*/
public Builder realName(String realName) {
return realName(Output.of(realName));
}
public AccountAuthenticationSamlFieldMappingArgs build() {
return $;
}
}
}
| [
"public@paulstack.co.uk"
] | public@paulstack.co.uk |
f35315cef8e5d23d8a6e3369ef4dd11437f11070 | c7650f601865a69029474c8f1cee9b6ba15338a1 | /arouter-api/src/main/java/com/xinrenlei/arouter_api/AsDrawable.java | 710944e8bea67d1fc7fb6ae0fe092f6f5104e66c | [] | no_license | junyao-yu/moduleApp | 055818437f7d9095a91a45f32323ff88a90b1894 | 34aed69a8d165a57b1fe58786b100711eee1be24 | refs/heads/main | 2023-01-24T16:15:02.093553 | 2020-12-16T07:49:01 | 2020-12-16T07:49:01 | 320,227,452 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 223 | java | package com.xinrenlei.arouter_api;
/**
* Auth:yujunyao
* Since: 2020/12/11 5:46 PM
* Email:yujunyao@xinrenlei.net
* 可以作为扩展,也可以作为apt解析的统一入口
*/
public interface AsDrawable {
}
| [
"yujunyao@yonglibao.com"
] | yujunyao@yonglibao.com |
0c567f1f9cf245f856ea3d751706c3b556773e2d | a6681efd68debe060bf27f748d2900137e53591b | /JavaSource/org/unitime/timetable/server/instructor/InstructorAvailabilityBackend.java | 199f1ba0ee66569638de6e33d086fddf40e306c4 | [
"Apache-2.0",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"CC-BY-3.0",
"LicenseRef-scancode-freemarker",
"CDDL-1.0",
"LGPL-2.1-or-later",
"BSD-3-Clause",
"MIT",
"EPL-1.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-generic-cla",
"LicenseRef-s... | permissive | sshyran/unitime | dc0ebc3cc3e18220687a18a7f7bd74bbaf47d579 | ea5af223ca5b77bb606f640e842eceba8f4553c5 | refs/heads/master | 2023-04-07T07:06:23.667880 | 2017-02-24T18:06:45 | 2017-02-24T18:06:45 | 83,221,633 | 0 | 0 | Apache-2.0 | 2023-04-04T00:38:43 | 2017-02-26T16:02:37 | Java | UTF-8 | Java | false | false | 4,368 | java | /*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* The Apereo Foundation 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.unitime.timetable.server.instructor;
import org.unitime.localization.impl.Localization;
import org.unitime.timetable.defaults.ApplicationProperty;
import org.unitime.timetable.defaults.CommonValues;
import org.unitime.timetable.defaults.UserProperty;
import org.unitime.timetable.gwt.client.instructor.InstructorAvailabilityWidget.InstructorAvailabilityModel;
import org.unitime.timetable.gwt.client.instructor.InstructorAvailabilityWidget.InstructorAvailabilityRequest;
import org.unitime.timetable.gwt.command.server.GwtRpcImplementation;
import org.unitime.timetable.gwt.command.server.GwtRpcImplements;
import org.unitime.timetable.gwt.resources.GwtConstants;
import org.unitime.timetable.gwt.resources.GwtMessages;
import org.unitime.timetable.gwt.shared.RoomInterface;
import org.unitime.timetable.gwt.shared.RoomInterface.RoomSharingOption;
import org.unitime.timetable.model.DepartmentalInstructor;
import org.unitime.timetable.model.Preference;
import org.unitime.timetable.model.PreferenceLevel;
import org.unitime.timetable.model.TimePref;
import org.unitime.timetable.model.dao.DepartmentalInstructorDAO;
import org.unitime.timetable.security.SessionContext;
import org.unitime.timetable.webutil.RequiredTimeTable;
/**
* @author Tomas Muller
*/
@GwtRpcImplements(InstructorAvailabilityRequest.class)
public class InstructorAvailabilityBackend implements GwtRpcImplementation<InstructorAvailabilityRequest, InstructorAvailabilityModel>{
protected static final GwtConstants CONSTANTS = Localization.create(GwtConstants.class);
protected static final GwtMessages MESSAGES = Localization.create(GwtMessages.class);
@Override
public InstructorAvailabilityModel execute(InstructorAvailabilityRequest request, SessionContext context) {
InstructorAvailabilityModel model = new InstructorAvailabilityModel();
for (int i = 0; true; i++) {
String mode = ApplicationProperty.RoomSharingMode.value(String.valueOf(1 + i), i < CONSTANTS.roomSharingModes().length ? CONSTANTS.roomSharingModes()[i] : null);
if (mode == null || mode.isEmpty()) break;
model.addMode(new RoomInterface.RoomSharingDisplayMode(mode));
}
model.setDefaultEditable(true);
for (PreferenceLevel pref: PreferenceLevel.getPreferenceLevelList()) {
if (PreferenceLevel.sRequired.equals(pref.getPrefProlog())) continue;
RoomSharingOption option = new RoomSharingOption(model.char2id(PreferenceLevel.prolog2char(pref.getPrefProlog())), pref.prefcolor(), "", pref.getPrefName(), true);
model.addOption(option);
if (PreferenceLevel.sNeutral.equals(pref.getPrefProlog()))
model.setDefaultOption(option);
}
String defaultGridSize = RequiredTimeTable.getTimeGridSize(context.getUser());
if (defaultGridSize != null)
for (int i = 0; i < model.getModes().size(); i++) {
if (model.getModes().get(i).getName().equals(defaultGridSize)) {
model.setDefaultMode(i); break;
}
}
model.setDefaultHorizontal(CommonValues.HorizontalGrid.eq(context.getUser().getProperty(UserProperty.GridOrientation)));
model.setNoteEditable(false);
if (request.getInstructorId() != null) {
if (request.getInstructorId().length() > 200) {
model.setPattern(request.getInstructorId());
} else {
DepartmentalInstructor instructor = DepartmentalInstructorDAO.getInstance().get(Long.valueOf(request.getInstructorId()));
for (Preference pref: instructor.getPreferences()) {
if (pref instanceof TimePref) {
model.setPattern(((TimePref) pref).getPreference());
break;
}
}
}
}
return model;
}
}
| [
"muller@unitime.org"
] | muller@unitime.org |
7c5773a618ce5cdfac425a21448c1b81808039c5 | ca957060b411c88be41dfbf5dffa1fea2744f4a5 | /src/org/sosy_lab/cpachecker/util/coverage/CoverageReportGcov.java | 4195d07ae012f5b280158e7d9b2299b073364bcb | [
"Apache-2.0"
] | permissive | 45258E9F/IntPTI | 62f705f539038f9457c818d515c81bf4621d7c85 | e5dda55aafa2da3d977a9a62ad0857746dae3fe1 | refs/heads/master | 2020-12-30T14:34:30.174963 | 2018-06-01T07:32:07 | 2018-06-01T07:32:07 | 91,068,091 | 4 | 6 | null | null | null | null | UTF-8 | Java | false | false | 3,559 | java | /*
* IntPTI: integer error fixing by proper-type inference
* Copyright (c) 2017.
*
* Open-source component:
*
* CPAchecker
* Copyright (C) 2007-2014 Dirk Beyer
*
* Guava: Google Core Libraries for Java
* Copyright (C) 2010-2006 Google
*
*
*/
package org.sosy_lab.cpachecker.util.coverage;
import org.sosy_lab.common.configuration.Configuration;
import org.sosy_lab.common.configuration.FileOption;
import org.sosy_lab.common.configuration.InvalidConfigurationException;
import org.sosy_lab.common.configuration.Option;
import org.sosy_lab.common.configuration.Options;
import org.sosy_lab.common.io.Files;
import org.sosy_lab.common.io.Path;
import org.sosy_lab.common.io.Paths;
import org.sosy_lab.common.log.LogManager;
import org.sosy_lab.cpachecker.util.coverage.FileCoverageInformation.FunctionInfo;
import java.io.IOException;
import java.io.PrintStream;
import java.io.Writer;
import java.util.Map;
import java.util.logging.Level;
/**
* Generate coverage information in Gcov format
* (http://gcc.gnu.org/onlinedocs/gcc/Gcov.html).
*/
@Options
class CoverageReportGcov implements CoverageWriter {
@Option(secure = true,
name = "coverage.export",
description = "print coverage info to file")
private boolean exportCoverage = true;
@Option(secure = true,
name = "coverage.file",
description = "print coverage info to file")
@FileOption(FileOption.Type.OUTPUT_FILE)
private Path outputCoverageFile = Paths.get("coverage.info");
//String constants from gcov format
private final static String TEXTNAME = "TN:";
private final static String SOURCEFILE = "SF:";
private final static String FUNCTION = "FN:";
private final static String FUNCTIONDATA = "FNDA:";
private final static String LINEDATA = "DA:";
private final LogManager logger;
public CoverageReportGcov(Configuration pConfig, LogManager pLogger)
throws InvalidConfigurationException {
pConfig.inject(this);
this.logger = pLogger;
}
@Override
public void write(Map<String, FileCoverageInformation> pCoverage, PrintStream pStdOut) {
if (!exportCoverage || (outputCoverageFile == null)) {
return;
}
try (Writer w = Files.openOutputFile(outputCoverageFile)) {
for (Map.Entry<String, FileCoverageInformation> entry : pCoverage.entrySet()) {
String sourcefile = entry.getKey();
FileCoverageInformation fileInfos = entry.getValue();
//Convert ./test.c -> /full/path/test.c
w.append(TEXTNAME + "\n");
w.append(SOURCEFILE + Paths.get(sourcefile).getAbsolutePath() + "\n");
for (FunctionInfo info : fileInfos.allFunctions) {
w.append(FUNCTION + info.firstLine + "," + info.name + "\n");
//Information about function end isn't used by lcov, but it is useful for some postprocessing
//But lcov ignores all unknown lines, so, this additional information can't affect on its work
w.append("#" + FUNCTION + info.lastLine + "\n");
}
for (String name : fileInfos.visitedFunctions.keySet()) {
w.append(FUNCTIONDATA + fileInfos.visitedFunctions.get(name) + "," + name + "\n");
}
/* Now save information about lines
*/
for (Integer line : fileInfos.allLines) {
w.append(LINEDATA + line + "," + fileInfos.getVisitedLine(line) + "\n");
}
w.append("end_of_record\n");
}
} catch (IOException e) {
logger.logUserException(Level.WARNING, e, "Could not write coverage information to file");
}
}
}
| [
"chengxi09@gmail.com"
] | chengxi09@gmail.com |
2ba1fd3a9dcee0fe8670c4802d34dfd1720d3c1c | 34f8d4ba30242a7045c689768c3472b7af80909c | /jdk-17/src/java.base/java/nio/HeapDoubleBufferR.java | 0cc17088dbb8d5603a20b042141a4c2e545636b6 | [
"Apache-2.0"
] | permissive | lovelycheng/JDK | 5b4cc07546f0dbfad15c46d427cae06ef282ef79 | 19a6c71e52f3ecd74e4a66be5d0d552ce7175531 | refs/heads/master | 2023-04-08T11:36:22.073953 | 2022-09-04T01:53:09 | 2022-09-04T01:53:09 | 227,544,567 | 0 | 0 | null | 2019-12-12T07:18:30 | 2019-12-12T07:18:29 | null | UTF-8 | Java | false | false | 4,512 | java | /*
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
// -- This file was mechanically generated: Do not edit! -- //
package java.nio;
import java.util.Objects;
import jdk.internal.access.foreign.MemorySegmentProxy;
/**
* A read-only HeapDoubleBuffer. This class extends the corresponding
* read/write class, overriding the mutation methods to throw a {@link
* ReadOnlyBufferException} and overriding the view-buffer methods to return an
* instance of this class rather than of the superclass.
*/
class HeapDoubleBufferR
extends HeapDoubleBuffer
{
// Cached array base offset
private static final long ARRAY_BASE_OFFSET = UNSAFE.arrayBaseOffset(double[].class);
// Cached array index scale
private static final long ARRAY_INDEX_SCALE = UNSAFE.arrayIndexScale(double[].class);
// For speed these fields are actually declared in X-Buffer;
// these declarations are here as documentation
/*
*/
HeapDoubleBufferR(int cap, int lim, MemorySegmentProxy segment) { // package-private
super(cap, lim, segment);
this.isReadOnly = true;
}
HeapDoubleBufferR(double[] buf, int off, int len, MemorySegmentProxy segment) { // package-private
super(buf, off, len, segment);
this.isReadOnly = true;
}
protected HeapDoubleBufferR(double[] buf,
int mark, int pos, int lim, int cap,
int off, MemorySegmentProxy segment)
{
super(buf, mark, pos, lim, cap, off, segment);
this.isReadOnly = true;
}
public DoubleBuffer slice() {
int pos = this.position();
int lim = this.limit();
int rem = (pos <= lim ? lim - pos : 0);
return new HeapDoubleBufferR(hb,
-1,
0,
rem,
rem,
pos + offset, segment);
}
@Override
public DoubleBuffer slice(int index, int length) {
Objects.checkFromIndexSize(index, length, limit());
return new HeapDoubleBufferR(hb,
-1,
0,
length,
length,
index + offset, segment);
}
public DoubleBuffer duplicate() {
return new HeapDoubleBufferR(hb,
this.markValue(),
this.position(),
this.limit(),
this.capacity(),
offset, segment);
}
public DoubleBuffer asReadOnlyBuffer() {
return duplicate();
}
public boolean isReadOnly() {
return true;
}
public DoubleBuffer put(double x) {
throw new ReadOnlyBufferException();
}
public DoubleBuffer put(int i, double x) {
throw new ReadOnlyBufferException();
}
public DoubleBuffer put(double[] src, int offset, int length) {
throw new ReadOnlyBufferException();
}
public DoubleBuffer put(DoubleBuffer src) {
throw new ReadOnlyBufferException();
}
public DoubleBuffer put(int index, DoubleBuffer src, int offset, int length) {
throw new ReadOnlyBufferException();
}
public DoubleBuffer put(int index, double[] src, int offset, int length) {
throw new ReadOnlyBufferException();
}
public DoubleBuffer compact() {
throw new ReadOnlyBufferException();
}
public ByteOrder order() {
return ByteOrder.nativeOrder();
}
}
| [
"zeng255@163.com"
] | zeng255@163.com |
500aa8418593c95a27b3a248f7e0859d4b63b1e3 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/13/13_99a1be6f63230f5a4d6ac38a8d1ccf58a05ed20a/TimerAlertFullScreen/13_99a1be6f63230f5a4d6ac38a8d1ccf58a05ed20a_TimerAlertFullScreen_s.java | bf078a50ac46f6c792af4350cda3ca102d4ac3e8 | [] | 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 | 4,904 | java | /*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.android.deskclock.timer;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import com.android.deskclock.R;
import com.android.deskclock.Utils;
import com.android.deskclock.timer.TimerFragment.OnEmptyListListener;
/**
* Timer alarm alert: pops visible indicator. This activity is the version which
* shows over the lock screen.
*/
public class TimerAlertFullScreen extends Activity implements OnEmptyListListener {
// private static final String TAG = "TimerAlertFullScreen";
private static final String FRAGMENT = "timer";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.timer_alert_full_screen);
final View view = findViewById(R.id.fragment_container);
view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
final Window win = getWindow();
win.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
// Turn on the screen unless we are being launched from the AlarmAlert
// subclass as a result of the screen turning off.
win.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
| WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON);
// Don't create overlapping fragments.
if (getFragment() == null) {
TimerFragment timerFragment = new TimerFragment();
// Create fragment and give it an argument to only show
// timers in STATE_TIMESUP state
Bundle args = new Bundle();
args.putBoolean(Timers.TIMESUP_MODE, true);
timerFragment.setArguments(args);
// Add the fragment to the 'fragment_container' FrameLayout
getFragmentManager().beginTransaction().add(R.id.fragment_container, timerFragment, FRAGMENT).commit();
}
}
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// Handle key down and key up on a few of the system keys.
boolean up = event.getAction() == KeyEvent.ACTION_UP;
switch (event.getKeyCode()) {
// Volume keys and camera keys stop all the timers
case KeyEvent.KEYCODE_VOLUME_UP:
case KeyEvent.KEYCODE_VOLUME_DOWN:
case KeyEvent.KEYCODE_VOLUME_MUTE:
case KeyEvent.KEYCODE_CAMERA:
case KeyEvent.KEYCODE_FOCUS:
if (up) {
stopAllTimesUpTimers();
}
return true;
default:
break;
}
return super.dispatchKeyEvent(event);
}
/**
* this is called when a second timer is triggered while a previous alert
* window is still active.
*/
@Override
protected void onNewIntent(Intent intent) {
TimerFragment timerFragment = getFragment();
if (timerFragment != null) {
timerFragment.restartAdapter();
}
super.onNewIntent(intent);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
ViewGroup viewContainer = (ViewGroup)findViewById(R.id.fragment_container);
viewContainer.requestLayout();
super.onConfigurationChanged(newConfig);
}
@Override
protected void onStop() {
stopAllTimesUpTimers();
super.onStop();
}
protected void stopAllTimesUpTimers() {
TimerFragment timerFragment = getFragment();
if (timerFragment != null) {
timerFragment.stopAllTimesUpTimers();
}
}
@Override
public void onEmptyList() {
onListChanged();
finish();
}
@Override
public void onListChanged() {
Utils.showInUseNotifications(this);
}
private TimerFragment getFragment() {
return (TimerFragment) getFragmentManager().findFragmentByTag(FRAGMENT);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
6e6a82d43112dee6ec7ea5dd644d393555a549f5 | a61e512a63c06b6e9da51c36406d57c63f59842f | /target/classes/com/sol/erp/Shift.java | d68a0079b3abe082e06b1777f95791f823387f1e | [] | no_license | shekharkumargupta1070/solerp | 72c2522f54681d4e659d6017b0731f6471eabdde | dd73736e5da7993adaccdd76e1537d6fad535e2f | refs/heads/master | 2020-03-23T16:22:51.060346 | 2018-11-29T18:53:54 | 2018-11-29T18:53:54 | 141,806,788 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,137 | java | package com.sol.erp;
import java.awt.Color;
import java.awt.Font;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JTextField;
import com.sol.erp.dao.UtilListQuery;
import com.sol.erp.dao.UtilQueryResult;
import com.sol.erp.util.DBConnectionUtil;
import com.sol.erp.util.DateDifferencesUtil;
public class Shift extends javax.swing.JInternalFrame implements java.awt.event.ActionListener {
/**
*
*/
private static final long serialVersionUID = 1L;
java.sql.Connection con = null;
java.sql.Statement stat = null;
java.sql.ResultSet rs = null;
UtilQueryResult qr = new UtilQueryResult();
public Shift() {
initComponents();
companyList();
}
private void initComponents() {
p1 = new JPanel();
l1 = new JLabel();
cb1 = new JComboBox();
l2 = new JLabel();
tf1 = new JTextField("textFieldProjectNumber");
l3 = new JLabel();
tf2 = new JTextField();
l4 = new JLabel();
tf3 = new JTextField();
p2 = new JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
listmodel = new javax.swing.DefaultListModel();
jList1 = new JList(listmodel);
l5 = new JLabel();
l6 = new JLabel();
tf4 = new JTextField();
l7 = new JLabel();
tf5 = new JTextField();
l8 = new JLabel();
tf6 = new JTextField();
p3 = new JPanel();
b1 = new JButton();
b2 = new JButton();
b3 = new JButton();
getContentPane().setLayout(null);
setClosable(true);
setIconifiable(true);
setMaximizable(true);
setResizable(true);
setTitle("Shift");
p1.setLayout(null);
p1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
l1.setFont(new Font("MS Sans Serif", 1, 11));
l1.setForeground(new Color(102, 102, 102));
l1.setText("Company ID");
p1.add(l1);
l1.setBounds(10, 10, 65, 15);
cb1.setEditable(true);
p1.add(cb1);
cb1.setBounds(90, 10, 80, 21);
l2.setFont(new Font("MS Sans Serif", 1, 11));
l2.setForeground(new Color(102, 102, 102));
l2.setText("Name");
p1.add(l2);
l2.setBounds(10, 40, 50, 20);
tf1.setEditable(false);
p1.add(tf1);
tf1.setBounds(90, 40, 370, 21);
l3.setFont(new Font("MS Sans Serif", 1, 11));
l3.setForeground(new Color(102, 102, 102));
l3.setText("Branch Code");
p1.add(l3);
l3.setBounds(10, 70, 70, 20);
p1.add(tf2);
tf2.setBounds(90, 70, 80, 21);
l4.setFont(new Font("MS Sans Serif", 1, 11));
l4.setForeground(new Color(102, 102, 102));
l4.setText("Name");
p1.add(l4);
l4.setBounds(180, 70, 40, 20);
tf3.setEditable(false);
p1.add(tf3);
tf3.setBounds(220, 70, 240, 21);
getContentPane().add(p1);
p1.setBounds(20, 20, 480, 110);
p2.setLayout(null);
p2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
jList1.setFont(new Font("MS Sans Serif", 1, 11));
jList1.setModel(new DefaultListModel() {
/**
*
*/
private static final long serialVersionUID = 1L;
String[] strings = { "A", "B", "C", "G" };
public int getSize() {
return strings.length;
}
public String getElementAt(int paramAnonymousInt) {
return strings[paramAnonymousInt];
}
});
jList1.setSelectionMode(0);
jScrollPane1.setViewportView(jList1);
p2.add(jScrollPane1);
jScrollPane1.setBounds(10, 30, 70, 110);
l5.setFont(new Font("MS Sans Serif", 1, 11));
l5.setForeground(new Color(102, 102, 102));
l5.setText("Shift Code");
p2.add(l5);
l5.setBounds(10, 10, 80, 15);
l6.setFont(new Font("MS Sans Serif", 1, 11));
l6.setForeground(new Color(102, 102, 102));
l6.setText("In Time");
p2.add(l6);
l6.setBounds(100, 30, 80, 15);
p2.add(tf4);
tf4.setBounds(180, 30, 100, 21);
l7.setFont(new Font("MS Sans Serif", 1, 11));
l7.setForeground(new Color(102, 102, 102));
l7.setText("Out Time");
p2.add(l7);
l7.setBounds(100, 60, 80, 15);
p2.add(tf5);
tf5.setBounds(180, 60, 100, 21);
l8.setFont(new Font("MS Sans Serif", 1, 11));
l8.setForeground(new Color(102, 102, 102));
l8.setText("Total Time");
p2.add(l8);
l8.setBounds(100, 90, 80, 15);
p2.add(tf6);
tf6.setBounds(180, 90, 100, 21);
getContentPane().add(p2);
p2.setBounds(20, 140, 300, 160);
p3.setLayout(null);
p3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
b1.setText("Save");
p3.add(b1);
b1.setBounds(50, 10, 90, 30);
b2.setText("Update");
p3.add(b2);
b2.setBounds(50, 50, 90, 30);
b3.setText("Close");
p3.add(b3);
b3.setBounds(50, 115, 90, 30);
getContentPane().add(p3);
p3.setBounds(330, 140, 170, 160);
setBounds(0, 0, 526, 354);
cb1.addActionListener(this);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
tf3.addActionListener(this);
tf4.addActionListener(this);
tf5.addActionListener(this);
}
java.util.ArrayList ar = new java.util.ArrayList();
private JButton b1;
public void companyList() {
ar = UtilListQuery.skList("company_id", "HRCOMPANY_ID");
System.out.println(ar);
for (int i = 0; i < ar.size(); i++) {
cb1.addItem(String.valueOf(ar.get(i)).toUpperCase());
}
}
private JButton b2;
private JButton b3;
private JComboBox cb1;
public void companyDetails() {
try {
con = DBConnectionUtil.getConnection();
stat = con.createStatement();
rs = stat.executeQuery("Select CO_Name, BRANCH_CODE, CITY from HRCOMPANY_ID where company_id ='"
+ cb1.getSelectedItem() + "' ");
while (rs.next()) {
String str1 = new String(rs.getString(1));
String str2 = new String(rs.getString(2));
String str3 = new String(rs.getString(3));
tf1.setText(str1);
tf2.setText(str2);
tf3.setText(str3);
}
} catch (Exception localException) {
}
}
private JList jList1;
private javax.swing.DefaultListModel listmodel;
private javax.swing.JScrollPane jScrollPane1;
private JTextField tf2;
private JTextField tf3;
private JTextField tf4;
private JTextField tf5;
private JTextField tf6;
public void actionPerformed(java.awt.event.ActionEvent paramActionEvent) {
if (paramActionEvent.getSource() == cb1) {
companyDetails();
}
String str;
if (paramActionEvent.getSource() == b1) {
qr.Query("insert into HRSHIFT values('" + cb1.getSelectedItem() + "','" + tf2.getText()
+ "','" + jList1.getSelectedValue() + "','" + tf4.getText() + "','" + tf5.getText()
+ "','" + tf6.getText() + "')");
str = qr.getMessage();
if (str.equalsIgnoreCase("succeed")) {
javax.swing.JOptionPane.showMessageDialog(this, "Shift Time Set");
} else {
javax.swing.JOptionPane.showMessageDialog(this, str);
}
}
if (paramActionEvent.getSource() == b3) {
setVisible(false);
}
if (paramActionEvent.getSource() == tf5) {
str = DateDifferencesUtil.getTimeDiff(String.valueOf(tf4.getText()), String.valueOf(tf5.getText()));
tf6.setText("Shekhar");
tf6.setText(str);
}
}
private JLabel l1;
private JLabel l2;
private JLabel l3;
private JLabel l4;
private JLabel l5;
private JLabel l6;
private JLabel l7;
private JLabel l8;
private JPanel p1;
private JPanel p2;
private JPanel p3;
private JTextField tf1;
}
| [
"shekharkumargupta@gmail.com"
] | shekharkumargupta@gmail.com |
2436d58ab9c0d283249029d914d38796b2b4130a | deebd6104eebc336da686e66eb9aea15d0c92d5d | /org.dbdoclet.svg/src/main/java/org/dbdoclet/svg/shape/g2d/ProcessStartArrow.java | 02664b8dae7f49c5bc759bfc5f1848c28379feb2 | [] | no_license | christiancandela/markup | e0071ff89ab349713a170bd20b80b4e68af7113b | 4293fde8620ff937c0c6427dbf06f4e8648e450c | refs/heads/master | 2021-06-01T10:13:47.887714 | 2016-05-11T07:15:19 | 2016-05-11T07:15:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,444 | java | /*
* ### Copyright (C) 2008 Michael Fuchs ###
* ### All Rights Reserved. ###
*
* Author: Michael Fuchs
* E-Mail: michael.fuchs@unico-group.com
* URL: http://www.michael-a-fuchs.de
*/
package org.dbdoclet.svg.shape.g2d;
import java.awt.Graphics2D;
import java.awt.Polygon;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class ProcessStartArrow extends ProcessArrow {
private static Log logger = LogFactory.getLog(ProcessStartArrow.class);
public ProcessStartArrow(String id, int row, int col) {
super(id, row, col);
}
public ProcessStartArrow(Graphics2D g2d, String id, int row, int col, String text) {
super(g2d, id, row, col, text);
}
public void draw(int x, int y) {
logger.debug("Zeichne ProcessStartArrow an Position(" + x + ", " + y + ")");
Graphics2D g2d = getGraphics2D();
int width = getWidth();
int height = getHeight();
Polygon p = new Polygon();
p.addPoint(x, y);
p.addPoint(x, y + height);
p.addPoint(x + width, y + height);
p.addPoint(x + width + 17, y + height - (height / 2));
p.addPoint(x + width, y);
g2d.setPaint(backgroundColor);
g2d.fillPolygon(p);
g2d.setPaint(foregroundColor);
g2d.draw(p);
g2d.drawString(text, x + leftPadding, y + topPadding + fontMetrics.getAscent());
}
}
| [
"michael.fuchs@dbdoclet.org"
] | michael.fuchs@dbdoclet.org |
8ce836c36aa8e77d5876cc50864813275d4b65a5 | cada108fe7eb04f03cb22ae6295d1f77f1bdde0b | /spring-dsl-lsp-core/src/main/java/org/springframework/dsl/lsp/server/jsonrpc/RpcHandler.java | aee2de9d9ea4f60e99f20261ceb537299070463b | [
"Apache-2.0"
] | permissive | jvalkeal/spring-dsl-wip | 89ec1e93b73319db0a0ffe0498a0c368e971f46b | cc13c572921fecad8e29f7ffc8489e00b5e54d33 | refs/heads/master | 2021-04-15T08:27:48.916000 | 2018-11-04T13:31:05 | 2018-11-04T13:31:05 | 126,695,221 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,578 | java | /*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.dsl.lsp.server.jsonrpc;
import org.springframework.dsl.jsonrpc.JsonRpcInputMessage;
import org.springframework.dsl.jsonrpc.JsonRpcOutputMessage;
import org.springframework.dsl.jsonrpc.session.JsonRpcSession.JsonRpcSessionCustomizer;
import reactor.core.publisher.Mono;
/**
* Lowest level contract for reactive JSONRPC request handling that serves as a
* common denominator across different runtimes.
*
* @author Janne Valkealahti
*
*/
public interface RpcHandler {
/**
* Handle the given request and write to the response.
*
* @param request the current request
* @param response the current response
* @return indicates completion of request handling
*/
Mono<Void> handle(JsonRpcInputMessage request, JsonRpcOutputMessage response, JsonRpcSessionCustomizer sessionCustomizer);
default Mono<Void> handle(JsonRpcInputMessage request, JsonRpcOutputMessage response) {
return handle(request, response, null);
}
}
| [
"janne.valkealahti@gmail.com"
] | janne.valkealahti@gmail.com |
003864f74db0d2b5171f1fac7d9a9613bdb10f3d | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /src/irvine/oeis/a039/A039108.java | f12146ca2da9cc929a00efc64737c703caf6ce58 | [] | 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 | 660 | java | package irvine.oeis.a039;
// Generated by gen_seq4.pl basdig2 9 5 8 at 2019-07-04 09:18
// DO NOT EDIT here!
import irvine.math.z.Z;
import irvine.oeis.RunsBaseSequence;
/**
* A039108 Numbers n such that representation in base 9 has same number of <code>5</code>'s and <code>8</code>'s.
* @author Georg Fischer
*/
public class A039108 extends RunsBaseSequence {
/** Construct the sequence. */
public A039108() {
super(1, -1);
}
@Override
protected boolean isOk() {
final int count1 = getDigitCount(mK, 9, 5);
return count1 == getDigitCount(mK, 9, 8);
}
@Override
public Z next() {
return getNextWithProperty();
}
}
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
f6096f316b9a0705813788a0bbbfc0ccccb764ca | 728b98c7fc98e12118720dc32c19d209ce2e53d6 | /src/anno/Entity.java | bef4c0d0146c6189b99274b7f180c14a090d1630 | [] | no_license | 75168859/java_distributed | 4903fc59226f5f2df6f2266d733524f50d4b8b15 | 13e6a775ffe0eb38f97daa720632f26ac3ca8b9e | refs/heads/master | 2021-01-13T00:38:47.516886 | 2016-04-01T15:25:41 | 2016-04-01T15:25:41 | 55,241,451 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 297 | java | package anno;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Entity {
String value();
}
| [
"75168859@qq.com"
] | 75168859@qq.com |
1b24fac8fdf22487b0ab4eaf2ea7d13db8afe4ff | 77ab252244005f80fbfc33f8e931a41e65e83e5a | /spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfiguration.java | 53629457654a1d6580038580351974d10accc921 | [
"Apache-2.0"
] | permissive | llsydn/spring-boot | d4401969d8ca51937bda7736fabea82944417c39 | b88906cf98c4aa307952d27696897b2d4384b7e8 | refs/heads/master | 2023-01-03T12:14:42.767063 | 2019-09-26T08:53:10 | 2019-09-26T08:53:10 | 171,982,414 | 2 | 1 | Apache-2.0 | 2022-12-27T14:50:56 | 2019-02-22T02:44:30 | Java | UTF-8 | Java | false | false | 5,239 | java | /*
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra;
import java.util.List;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Session;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.domain.EntityScanPackages;
import org.springframework.boot.bind.RelaxedPropertyResolver;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertyResolver;
import org.springframework.data.cassandra.config.CassandraEntityClassScanner;
import org.springframework.data.cassandra.config.CassandraSessionFactoryBean;
import org.springframework.data.cassandra.config.SchemaAction;
import org.springframework.data.cassandra.convert.CassandraConverter;
import org.springframework.data.cassandra.convert.MappingCassandraConverter;
import org.springframework.data.cassandra.core.CassandraAdminOperations;
import org.springframework.data.cassandra.core.CassandraTemplate;
import org.springframework.data.cassandra.mapping.BasicCassandraMappingContext;
import org.springframework.data.cassandra.mapping.CassandraMappingContext;
import org.springframework.data.cassandra.mapping.SimpleUserTypeResolver;
import org.springframework.util.StringUtils;
/**
* {@link EnableAutoConfiguration Auto-configuration} for Spring Data's Cassandra support.
*
* @author Julien Dubois
* @author Eddú Meléndez
* @author Mark Paluch
* @since 1.3.0
*/
@Configuration
@ConditionalOnClass({ Cluster.class, CassandraAdminOperations.class })
@EnableConfigurationProperties(CassandraProperties.class)
@AutoConfigureAfter(CassandraAutoConfiguration.class)
public class CassandraDataAutoConfiguration {
private final BeanFactory beanFactory;
private final CassandraProperties properties;
private final Cluster cluster;
private final PropertyResolver propertyResolver;
public CassandraDataAutoConfiguration(BeanFactory beanFactory,
CassandraProperties properties, Cluster cluster, Environment environment) {
this.beanFactory = beanFactory;
this.properties = properties;
this.cluster = cluster;
this.propertyResolver = new RelaxedPropertyResolver(environment,
"spring.data.cassandra.");
}
@Bean
@ConditionalOnMissingBean
public CassandraMappingContext cassandraMapping() throws ClassNotFoundException {
BasicCassandraMappingContext context = new BasicCassandraMappingContext();
List<String> packages = EntityScanPackages.get(this.beanFactory)
.getPackageNames();
if (packages.isEmpty() && AutoConfigurationPackages.has(this.beanFactory)) {
packages = AutoConfigurationPackages.get(this.beanFactory);
}
if (!packages.isEmpty()) {
context.setInitialEntitySet(CassandraEntityClassScanner.scan(packages));
}
if (StringUtils.hasText(this.properties.getKeyspaceName())) {
context.setUserTypeResolver(new SimpleUserTypeResolver(this.cluster,
this.properties.getKeyspaceName()));
}
return context;
}
@Bean
@ConditionalOnMissingBean
public CassandraConverter cassandraConverter(CassandraMappingContext mapping) {
return new MappingCassandraConverter(mapping);
}
@Bean
@ConditionalOnMissingBean(Session.class)
public CassandraSessionFactoryBean session(CassandraConverter converter)
throws Exception {
CassandraSessionFactoryBean session = new CassandraSessionFactoryBean();
session.setCluster(this.cluster);
session.setConverter(converter);
session.setKeyspaceName(this.properties.getKeyspaceName());
String name = this.propertyResolver.getProperty("schemaAction",
SchemaAction.NONE.name());
SchemaAction schemaAction = SchemaAction.valueOf(name.toUpperCase());
session.setSchemaAction(schemaAction);
return session;
}
@Bean
@ConditionalOnMissingBean
public CassandraTemplate cassandraTemplate(Session session,
CassandraConverter converter) throws Exception {
return new CassandraTemplate(session, converter);
}
}
| [
"1091391667@qq.com"
] | 1091391667@qq.com |
bcbd42a14ef12ebd2ed2472995a0484e504372ba | 153e6380d8b372129a435e4bc290665026355a97 | /OnlineBookStoreClient/src/RMI/deletePromotion.java | c2ec54695b0bea07475278d352fa56a88ee46868 | [] | no_license | rdgt321/OBBS | e4cac22d22f9674fd603b4a715584c3c7a582f11 | ac6a261dd740b4a3ceb3cc0bb07fe57e01854418 | refs/heads/master | 2016-09-06T13:03:46.792064 | 2012-12-26T17:13:10 | 2012-12-26T17:13:10 | 6,744,392 | 4 | 0 | null | 2015-10-09T01:42:03 | 2012-11-18T06:53:02 | Java | UTF-8 | Java | false | false | 190 | java | package RMI;
import java.rmi.Remote;
public interface deletePromotion extends Remote {
public ResultMessage deletePromotion(int promotionID)
throws java.rmi.RemoteException;
}
| [
"rdgt321@gmail.com"
] | rdgt321@gmail.com |
b5a9a1a34f643f2957586f62d5119c766448ab73 | c75e79bb255ebc8e019eec465a0a7f4eb2520f6f | /src/chap06/textbook/s060602/FieldInitValue.java | 76c8dc4d37e570b2ca882115c3232ccea9c6d83b | [] | no_license | sebaek/java20200929 | 49790fe0b65a7f31c24170ac934b188441d6aa86 | 4006f44fb286f6f97f6a348c7dfcf3ecdcb2b421 | refs/heads/master | 2023-02-17T06:13:16.575816 | 2021-01-15T03:23:19 | 2021-01-15T03:23:19 | 299,485,640 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 261 | java | package chap06.textbook.s060602;
public class FieldInitValue {
byte byteField;
short shortField;
int intField;
long longField;
boolean booleanField;
char charField;
float floatField;
double doubleField;
int[] arrField;
String referenceField;
}
| [
"sebaek@gmail.com"
] | sebaek@gmail.com |
f39930fa7a8db6399f59797d2a87bda7a4447826 | d2c7893a967738a97583368dbf1e41caeb1d47c7 | /aTalk/src/main/java/org/atalk/impl/neomedia/stats/SendTrackStatsImpl.java | b48c88ce5f064df51ddf25140e3daa4d61f88627 | [
"Apache-2.0"
] | permissive | cmeng-git/atalk-android | 0b5a7f48d04ba0173852d2f2ccbe786830669603 | a821544edc644fdb3f63402340051dc1e86c1c59 | refs/heads/master | 2023-07-08T08:58:44.604534 | 2023-07-07T14:24:52 | 2023-07-07T14:24:52 | 116,449,957 | 148 | 79 | Apache-2.0 | 2023-03-28T10:31:34 | 2018-01-06T03:27:17 | Java | UTF-8 | Java | false | false | 5,154 | java | /*
* Copyright @ 2015 Atlassian Pty Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.atalk.impl.neomedia.stats;
import org.atalk.service.neomedia.stats.SendTrackStats;
import org.atalk.util.RTPUtils;
import org.ice4j.util.RateStatistics;
/**
* Media stream statistics implementation per send SSRC.
*
* @author Damian Minkov
* @author Boris Grozev
*/
public class SendTrackStatsImpl extends AbstractTrackStats
implements SendTrackStats
{
/**
* The highest sent sequence number.
*/
private int highestSeq = -1;
/**
* Rate of packet that we did not send (i.e. were lost on their way to us)
*/
RateStatistics packetsNotSentRate = new RateStatistics(1000, 1000F);
/**
* The fraction lost reported in the most recently received RTCP Receiver Report.
*/
private double fractionLost = -1d;
/**
* The time at which {@link #fractionLost} was last updated.
*/
private long fractionLostLastUpdate = -1;
/**
* Initializes a new instance.
* @param interval the interval in milliseconds over which average bit- and
* packet-rates will be computed.
*/
SendTrackStatsImpl(int interval, long ssrc)
{
super(interval, ssrc);
}
/**
* Notifies this instance that an RTP packet with a particular sequence
* number was sent (or is about to be sent).
* @param seq the RTP sequence number.
* @param length the length in bytes.
*/
void rtpPacketSent(int seq, int length)
{
long now = System.currentTimeMillis();
// update the bit- and packet-rate
super.packetProcessed(length, now, true);
if (highestSeq == -1)
{
highestSeq = seq;
return;
}
// We monitor the sequence numbers of sent packets in order to
// calculate the actual number of lost packets.
// If we are forwarding the stream (as opposed to generating it
// locally), as is the case in jitsi-videobridge, packets may be lost
// between the sender and us, and we need to take this into account
// when calculating packet loss to the receiver.
int diff = RTPUtils.getSequenceNumberDelta(seq, highestSeq);
if (diff <= 0)
{
// An old packet, already counted as not send. Un-not-send it ;)
packetsNotSentRate.update(-1, now);
}
else
{
// A newer packet.
highestSeq = seq;
// diff = 1 is the "normal" case (i.e. we received the very next
// packet).
if (diff > 1)
{
packetsNotSentRate.update(diff - 1, now);
}
}
// update bytes, packets, loss...
}
/**
* {@inheritDoc}
*
* Returns an estimation of the loss rate based on the most recent RTCP
* Receiver Report that we received, and the rate of "non-sent" packets
* (i.e. in the case of jitsi-videobridge the loss rate from the sender to the bridge).
*/
@Override
public double getLossRate()
{
long now = System.currentTimeMillis();
if (fractionLostLastUpdate == -1 || now - fractionLostLastUpdate > 8000)
{
// We haven't received a RR recently, so assume no loss.
return 0;
}
// Take into account packets that we did not send
long packetsNotSent = packetsNotSentRate.getAccumulatedCount(now);
long packetsSent = packetRate.getAccumulatedCount(now);
double fractionNotSent
= (packetsSent+packetsNotSent > 0)
? (packetsNotSent / (packetsNotSent+packetsSent))
: 0;
return Math.max(0, fractionLost - fractionNotSent);
}
/**
* {@inheritDoc}
*/
@Override
public int getHighestSent()
{
return highestSeq;
}
/**
* Notifies this instance that an RTCP packet with a given length in bytes
* was sent (or is about to be sent).
* @param length
*/
void rtcpPacketSent(int length)
{
super.packetProcessed(length, System.currentTimeMillis(), false);
}
/**
* Notifies this instance that an RTCP Receiver Report with a given value
* for the "fraction lost" field was received.
* @param fractionLost the value of the "fraction lost" field from an RTCP
* Receiver Report as an unsigned integer.
*/
void rtcpReceiverReportReceived(int fractionLost)
{
this.fractionLost = fractionLost / 256d;
this.fractionLostLastUpdate = System.currentTimeMillis();
}
}
| [
"cmeng.gm@gmail.com"
] | cmeng.gm@gmail.com |
70c50fc397af6262945202a478b6d33b9c652576 | c0b37a664fde6a57ae61c4af635e6dea28d7905e | /Helpful dev stuff/AeriesMobilePortal_v1.2.0_apkpure.com_source_from_JADX/com/aeries/mobileportal/interactors/add_district/AddDistrictInteractor$sendAnalytics$1.java | 9b0d6f4e3b62c16cc72e353129bd28950089b587 | [] | no_license | joshkmartinez/Grades | a21ce8ede1371b9a7af11c4011e965f603c43291 | 53760e47f808780d06c4fbc2f74028a2db8e2942 | refs/heads/master | 2023-01-30T13:23:07.129566 | 2020-12-07T18:20:46 | 2020-12-07T18:20:46 | 131,549,535 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 817 | java | package com.aeries.mobileportal.interactors.add_district;
import io.reactivex.functions.Consumer;
import kotlin.Metadata;
@Metadata(bv = {1, 0, 2}, d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "", "it", "", "kotlin.jvm.PlatformType", "accept"}, k = 3, mv = {1, 1, 10})
/* compiled from: AddDistrictInteractor.kt */
final class AddDistrictInteractor$sendAnalytics$1<T> implements Consumer<Object> {
public static final AddDistrictInteractor$sendAnalytics$1 INSTANCE = new AddDistrictInteractor$sendAnalytics$1();
AddDistrictInteractor$sendAnalytics$1() {
}
public final void accept(Object obj) {
}
}
| [
"joshkmartinez@gmail.com"
] | joshkmartinez@gmail.com |
93c4de5291875e2c54409d57c046401b780dec47 | ab58b63ea80f1dc289e3933f1f18fc1d85141350 | /FFT/src/main/java/com/ComplexNumber.java | f9f251b134b7ee40b00ff86acdae5e74db6752eb | [] | no_license | antey1988/JavaRushTasks | b1959e402c70686c8559e0fd0f4a112e37be82ec | c7e85f4dabee07985f60e066f65f3c1c87f007ac | refs/heads/master | 2023-05-14T04:20:15.778595 | 2021-06-08T07:51:00 | 2021-06-08T07:51:00 | 353,578,765 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,008 | java | package com;
import java.io.StringReader;
import java.util.Arrays;
import java.util.stream.Stream;
public class ComplexNumber {
private double Re;
private double Im;
private double Mod;
private double Ang;
public ComplexNumber(double re, double im) {
this(re, im, true);
}
public ComplexNumber(double mod, double ang, boolean flag) {
if (flag) {
Re = mod;
Im = ang;
trigToExp();
} else {
Mod = mod;
Ang = ang;
expToTrig();
}
}
public double getRe() {
return Re;
}
public double getIm() {
return Im;
}
public double getMod() {
return Mod;
}
public double getAng() {
return Ang;
}
public void expToTrig() {
Re = Mod * Math.cos(Ang);
Im = Mod * Math.sin(Ang);
}
public void trigToExp() {
Mod = Math.sqrt(Re * Re + Im * Im);
Ang = Math.atan(Im/Re);
}
public static ComplexNumber add(ComplexNumber Z1, ComplexNumber Z2) {
return new ComplexNumber(Z1.Re + Z2.Re, Z1.Im + Z2.Im);
}
public static ComplexNumber multiply(ComplexNumber Z1, ComplexNumber Z2) {
return new ComplexNumber(Z1.Re*Z2.Re - Z1.Im*Z2.Im, Z1.Re*Z2.Im + Z1.Im*Z2.Re);
}
public static ComplexNumber multiplyOnInt(ComplexNumber Z, int n) {
return new ComplexNumber(Z.Re*n, Z.Im*n);
}
public static ComplexNumber[] sqrt(ComplexNumber Z, int n) {
double angRad = 2*Math.PI / n;
Stream<ComplexNumber> stream = Stream.iterate(0, i->++i).limit(n)
.map((i)->new ComplexNumber(Z.Mod, Z.Ang/n + angRad*i, false));
return stream.toArray(ComplexNumber[]::new);
}
public static ComplexNumber pow(ComplexNumber Z, int n) {
return new ComplexNumber(Z.Mod, Z.Ang*n, false);
}
@Override
public String toString() {
return String.format("%+.3f%+.3f*i", Re, Im);
}
}
| [
"antey1988@gmail.com"
] | antey1988@gmail.com |
d54aa1f0cc4031690e1c4f73f25099670b4fa797 | f42d7da85f9633cfb84371ae67f6d3469f80fdcb | /com4j-20120426-2/samples/powerPoint/build/src/office/Crop.java | fc23e5e01275683e4d13d7c8c75c35f9fb5616d2 | [
"BSD-2-Clause"
] | permissive | LoongYou/Wanda | ca89ac03cc179cf761f1286172d36ead41f036b5 | 2c2c4d1d14e95e98c0a3af365495ec53775cc36b | refs/heads/master | 2023-03-14T13:14:38.476457 | 2021-03-06T10:20:37 | 2021-03-06T10:20:37 | 231,610,760 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,382 | java | package office ;
import com4j.*;
@IID("{000C03D3-0000-0000-C000-000000000046}")
public interface Crop extends office._IMsoDispObj {
// Methods:
/**
* <p>
* Getter method for the COM property "PictureOffsetX"
* </p>
* @return Returns a value of type float
*/
@DISPID(0) //= 0x0. The runtime will prefer the VTID if present
@VTID(9)
@DefaultMethod
float pictureOffsetX();
/**
* <p>
* Setter method for the COM property "PictureOffsetX"
* </p>
* @param pictureOffsetX Mandatory float parameter.
*/
@DISPID(0) //= 0x0. The runtime will prefer the VTID if present
@VTID(10)
@DefaultMethod
void pictureOffsetX(
float pictureOffsetX);
/**
* <p>
* Getter method for the COM property "PictureOffsetY"
* </p>
* @return Returns a value of type float
*/
@DISPID(1) //= 0x1. The runtime will prefer the VTID if present
@VTID(11)
float pictureOffsetY();
/**
* <p>
* Setter method for the COM property "PictureOffsetY"
* </p>
* @param pictureOffsetY Mandatory float parameter.
*/
@DISPID(1) //= 0x1. The runtime will prefer the VTID if present
@VTID(12)
void pictureOffsetY(
float pictureOffsetY);
/**
* <p>
* Getter method for the COM property "PictureWidth"
* </p>
* @return Returns a value of type float
*/
@DISPID(2) //= 0x2. The runtime will prefer the VTID if present
@VTID(13)
float pictureWidth();
/**
* <p>
* Setter method for the COM property "PictureWidth"
* </p>
* @param pictureWidth Mandatory float parameter.
*/
@DISPID(2) //= 0x2. The runtime will prefer the VTID if present
@VTID(14)
void pictureWidth(
float pictureWidth);
/**
* <p>
* Getter method for the COM property "PictureHeight"
* </p>
* @return Returns a value of type float
*/
@DISPID(3) //= 0x3. The runtime will prefer the VTID if present
@VTID(15)
float pictureHeight();
/**
* <p>
* Setter method for the COM property "PictureHeight"
* </p>
* @param pictureHeight Mandatory float parameter.
*/
@DISPID(3) //= 0x3. The runtime will prefer the VTID if present
@VTID(16)
void pictureHeight(
float pictureHeight);
/**
* <p>
* Getter method for the COM property "ShapeLeft"
* </p>
* @return Returns a value of type float
*/
@DISPID(5) //= 0x5. The runtime will prefer the VTID if present
@VTID(17)
float shapeLeft();
/**
* <p>
* Setter method for the COM property "ShapeLeft"
* </p>
* @param shapeLeft Mandatory float parameter.
*/
@DISPID(5) //= 0x5. The runtime will prefer the VTID if present
@VTID(18)
void shapeLeft(
float shapeLeft);
/**
* <p>
* Getter method for the COM property "ShapeTop"
* </p>
* @return Returns a value of type float
*/
@DISPID(6) //= 0x6. The runtime will prefer the VTID if present
@VTID(19)
float shapeTop();
/**
* <p>
* Setter method for the COM property "ShapeTop"
* </p>
* @param shapeTop Mandatory float parameter.
*/
@DISPID(6) //= 0x6. The runtime will prefer the VTID if present
@VTID(20)
void shapeTop(
float shapeTop);
/**
* <p>
* Getter method for the COM property "ShapeWidth"
* </p>
* @return Returns a value of type float
*/
@DISPID(7) //= 0x7. The runtime will prefer the VTID if present
@VTID(21)
float shapeWidth();
/**
* <p>
* Setter method for the COM property "ShapeWidth"
* </p>
* @param shapeWidth Mandatory float parameter.
*/
@DISPID(7) //= 0x7. The runtime will prefer the VTID if present
@VTID(22)
void shapeWidth(
float shapeWidth);
/**
* <p>
* Getter method for the COM property "ShapeHeight"
* </p>
* @return Returns a value of type float
*/
@DISPID(8) //= 0x8. The runtime will prefer the VTID if present
@VTID(23)
float shapeHeight();
/**
* <p>
* Setter method for the COM property "ShapeHeight"
* </p>
* @param shapeHeight Mandatory float parameter.
*/
@DISPID(8) //= 0x8. The runtime will prefer the VTID if present
@VTID(24)
void shapeHeight(
float shapeHeight);
// Properties:
}
| [
"815234949@qq.com"
] | 815234949@qq.com |
33cd577fe7c3744ca38a460d6c3269619c242c3f | 52c36ce3a9d25073bdbe002757f08a267abb91c6 | /src/main/java/com/alipay/api/response/AlipayPcreditLoanLoanDetailQueryResponse.java | ad297e6264f8baf5a4fabec0909ba08d625276a6 | [
"Apache-2.0"
] | permissive | itc7/alipay-sdk-java-all | d2f2f2403f3c9c7122baa9e438ebd2932935afec | c220e02cbcdda5180b76d9da129147e5b38dcf17 | refs/heads/master | 2022-08-28T08:03:08.497774 | 2020-05-27T10:16:10 | 2020-05-27T10:16:10 | 267,271,062 | 0 | 0 | Apache-2.0 | 2020-05-27T09:02:04 | 2020-05-27T09:02:04 | null | UTF-8 | Java | false | false | 5,924 | java | package com.alipay.api.response;
import java.util.Date;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.LoanTerm;
import com.alipay.api.domain.RepayPlanTermVO;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.pcredit.loan.loan.detail.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayPcreditLoanLoanDetailQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 4516111698463242592L;
/**
* 贷款申请金额
*/
@ApiField("apply_amt")
private String applyAmt;
/**
* 申请时间,即用户提交贷款申请时间
*/
@ApiField("apply_date")
private Date applyDate;
/**
* 贷款结清时间
*/
@ApiField("clear_date")
private Date clearDate;
/**
* 签署合同类型列表,取值{LOAN}:LOAN-贷款合同;
*/
@ApiListField("contract_type_list")
@ApiField("string")
private List<String> contractTypeList;
/**
* 扩展变量
*/
@ApiField("ext_variable")
private String extVariable;
/**
* 贷款期限,包含贷款期数和期数单位
*/
@ApiField("loan_term")
private LoanTerm loanTerm;
/**
* 贷款连续逾期天数=max{本金连续逾期天数,利息连续逾期天数}
*/
@ApiField("ovd_day_num")
private Long ovdDayNum;
/**
* 累计已还利息
*/
@ApiField("paid_int")
private String paidInt;
/**
* 累计已还逾期利息罚息
*/
@ApiField("paid_ovd_int_penalty")
private String paidOvdIntPenalty;
/**
* 累计已还逾期本金罚息
*/
@ApiField("paid_ovd_prin_penalty")
private String paidOvdPrinPenalty;
/**
* 累计已还本金
*/
@ApiField("paid_prin")
private String paidPrin;
/**
* 剩余应还总额
*/
@ApiField("remain_repay_amt")
private String remainRepayAmt;
/**
* 剩余应还利息
*/
@ApiField("remain_repay_int_amt")
private String remainRepayIntAmt;
/**
* 剩余应还本金
*/
@ApiField("remain_repay_prin_amt")
private String remainRepayPrinAmt;
/**
* 还款方式,取值{1, 3, 6}:1-等额本息; 3-按期付息到期还本; 6-到期一次性还本付息;
*/
@ApiField("repay_mode")
private String repayMode;
/**
* 贷后还款分期计划
*/
@ApiListField("repay_plan_term_list")
@ApiField("repay_plan_term_v_o")
private List<RepayPlanTermVO> repayPlanTermList;
/**
* 贷款开始时间,即贷款生效时间
*/
@ApiField("start_date")
private Date startDate;
/**
* 贷款申请状态,取值{SUBMITTED, LENDING, USING, OVD, CLEAR, FAILED}:SUBMITTED-已提交; LENDING-放款中; USING-使用中; OVD-已逾期; CLEAR-已结清; FAILED-已失败
*/
@ApiField("status")
private String status;
public void setApplyAmt(String applyAmt) {
this.applyAmt = applyAmt;
}
public String getApplyAmt( ) {
return this.applyAmt;
}
public void setApplyDate(Date applyDate) {
this.applyDate = applyDate;
}
public Date getApplyDate( ) {
return this.applyDate;
}
public void setClearDate(Date clearDate) {
this.clearDate = clearDate;
}
public Date getClearDate( ) {
return this.clearDate;
}
public void setContractTypeList(List<String> contractTypeList) {
this.contractTypeList = contractTypeList;
}
public List<String> getContractTypeList( ) {
return this.contractTypeList;
}
public void setExtVariable(String extVariable) {
this.extVariable = extVariable;
}
public String getExtVariable( ) {
return this.extVariable;
}
public void setLoanTerm(LoanTerm loanTerm) {
this.loanTerm = loanTerm;
}
public LoanTerm getLoanTerm( ) {
return this.loanTerm;
}
public void setOvdDayNum(Long ovdDayNum) {
this.ovdDayNum = ovdDayNum;
}
public Long getOvdDayNum( ) {
return this.ovdDayNum;
}
public void setPaidInt(String paidInt) {
this.paidInt = paidInt;
}
public String getPaidInt( ) {
return this.paidInt;
}
public void setPaidOvdIntPenalty(String paidOvdIntPenalty) {
this.paidOvdIntPenalty = paidOvdIntPenalty;
}
public String getPaidOvdIntPenalty( ) {
return this.paidOvdIntPenalty;
}
public void setPaidOvdPrinPenalty(String paidOvdPrinPenalty) {
this.paidOvdPrinPenalty = paidOvdPrinPenalty;
}
public String getPaidOvdPrinPenalty( ) {
return this.paidOvdPrinPenalty;
}
public void setPaidPrin(String paidPrin) {
this.paidPrin = paidPrin;
}
public String getPaidPrin( ) {
return this.paidPrin;
}
public void setRemainRepayAmt(String remainRepayAmt) {
this.remainRepayAmt = remainRepayAmt;
}
public String getRemainRepayAmt( ) {
return this.remainRepayAmt;
}
public void setRemainRepayIntAmt(String remainRepayIntAmt) {
this.remainRepayIntAmt = remainRepayIntAmt;
}
public String getRemainRepayIntAmt( ) {
return this.remainRepayIntAmt;
}
public void setRemainRepayPrinAmt(String remainRepayPrinAmt) {
this.remainRepayPrinAmt = remainRepayPrinAmt;
}
public String getRemainRepayPrinAmt( ) {
return this.remainRepayPrinAmt;
}
public void setRepayMode(String repayMode) {
this.repayMode = repayMode;
}
public String getRepayMode( ) {
return this.repayMode;
}
public void setRepayPlanTermList(List<RepayPlanTermVO> repayPlanTermList) {
this.repayPlanTermList = repayPlanTermList;
}
public List<RepayPlanTermVO> getRepayPlanTermList( ) {
return this.repayPlanTermList;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getStartDate( ) {
return this.startDate;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus( ) {
return this.status;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
7ee1cebb6624c78e2a02d3ca94aa5ee408051b1e | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-481-32-6-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest.java | 23a05f48174bbe22c427a8a19184d514c1d3dee4 | [] | 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 | 576 | java | /*
* This file was automatically generated by EvoSuite
* Wed Apr 08 14:32:46 UTC 2020
*/
package org.xwiki.velocity.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultVelocityEngine_ESTest extends DefaultVelocityEngine_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
cb321de8d7612ae788aa391c75f3cb764351328f | e2dc2d0be030d4afa8c23f18d5277aa58f0aee77 | /lawyer/my-lawyer/my-lawyer-admin-service/src/main/java/com/tz/service/ZaCaseCategoryService.java | 3d591fd5991e5c73e2afc03b45401d1c56110802 | [
"Apache-2.0"
] | permissive | money461/MyLawyer | fbce64bcd0bec4b42e0e76059dd4ab1fe1b5e270 | f9891a16609739a6cb4a18ad3022b28088f9edcd | refs/heads/master | 2022-11-23T12:49:33.513029 | 2020-02-10T14:47:55 | 2020-02-10T14:47:55 | 239,531,197 | 0 | 0 | Apache-2.0 | 2022-11-04T01:00:09 | 2020-02-10T14:27:35 | Java | UTF-8 | Java | false | false | 962 | java | package com.tz.service;
import com.tz.pojo.ZaCaseCategory;
import com.tz.pojo.vo.ZaCaseCategoryVo;
import com.tz.res.AppMsgResult;
/**
* 律师分类接口
*
* @author menglin 2018年1月19日10:09:13
*/
public interface ZaCaseCategoryService {
// 查询所有的律师分类或者查询父类下的所有子类分类列表
AppMsgResult findCategoryOrSonList(ZaCaseCategoryVo caseCategoryVo, Integer curPage, Integer rows, String type, String userId,
String token);
// 添加或者修改律师分类信息
AppMsgResult addOrUpdateCategory(ZaCaseCategory caseCategory, String type, String userId, String token);
// 根据id修改律师分类状态
AppMsgResult updateStatusById(String id, String caseStatus,String userId, String token);
// 根据id删除律师分类信息
AppMsgResult deleteById(String id,String userId, String token);
// 查询律师分类信息
AppMsgResult selectById(String id,String userId, String token);
}
| [
"2282500426@qq.com"
] | 2282500426@qq.com |
647532502616d30c0511fbdca78c1411d24766a9 | 5d33c88519c7dca36011bce8efac0e384d980e91 | /lhx_haoke_manager_dubbo_server/lhx_haoke_manager_dubbo_server_ad/lhx_haoke_manager_dubbo_server_ad_service/src/main/java/com/lhx/haoke/dubbo/server/config/MybatisConfig.java | 4b25190aa84f70762d0c18ecd50455dd84326b7e | [] | no_license | a576234489/lhx_haoke_manager | e6eac5cdde409be8e0d3b276847a994ee8c73b77 | b70913d83a101d57c9353410260fc13c832fdaf4 | refs/heads/master | 2022-10-13T10:43:04.804038 | 2019-11-28T05:56:19 | 2019-11-28T05:56:19 | 224,579,323 | 0 | 0 | null | 2022-09-16T21:07:46 | 2019-11-28T05:50:14 | Java | UTF-8 | Java | false | false | 530 | java | package com.lhx.haoke.dubbo.server.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@MapperScan("com.lhx.haoke.dubbo.server.mapper")
@Configuration
public class MybatisConfig {
/**
* 分页插件
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
}
| [
"576234489@qq.com"
] | 576234489@qq.com |
3922366db7f99e07033cc44a2c4b42543f4f53c6 | 537b3a622f307ff8f5d32c92e02c0ffca721b1be | /mystudy/Effective-Java/src/main/java/org/effectivejava/examples/chapter03/item12/PhoneNumber.java | 39302ea09af0093f194df58d72670f361f618751 | [] | no_license | hotinh/mygit | b01cb92efcd6e037acf897db6ed73bba01ad5a0a | 54d6a8c5ed8f66afbb97baf482dcbc6982d91b9b | refs/heads/master | 2021-07-12T03:05:57.519248 | 2019-01-26T13:41:43 | 2019-01-26T13:41:43 | 104,535,060 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,259 | java | package org.effectivejava.examples.chapter03.item12;
import java.util.NavigableSet;
import java.util.Random;
import java.util.TreeSet;
public class PhoneNumber implements Cloneable, Comparable<PhoneNumber> {
private final short areaCode;
private final short prefix;
private final short lineNumber;
public PhoneNumber(int areaCode, int prefix, int lineNumber) {
rangeCheck(areaCode, 999, "area code");
rangeCheck(prefix, 999, "prefix");
rangeCheck(lineNumber, 9999, "line number");
this.areaCode = (short) areaCode;
this.prefix = (short) prefix;
this.lineNumber = (short) lineNumber;
}
private static void rangeCheck(int arg, int max, String name) {
if (arg < 0 || arg > max) {
throw new IllegalArgumentException(name + ": " + arg);
}
}
@Override
public boolean equals(Object o) {
if (o == this)
return true;
if (!(o instanceof PhoneNumber))
return false;
PhoneNumber pn = (PhoneNumber) o;
return pn.lineNumber == lineNumber && pn.prefix == prefix
&& pn.areaCode == areaCode;
}
@Override
public int hashCode() {
int result = 17;
result = 31 * result + areaCode;
result = 31 * result + prefix;
result = 31 * result + lineNumber;
return result;
}
/**
* Returns the string representation of this phone number. The string
* consists of fourteen characters whose format is "(XXX) YYY-ZZZZ", where
* XXX is the area code, YYY is the prefix, and ZZZZ is the line number.
* (Each of the capital letters represents a single decimal digit.)
*
* If any of the three parts of this phone number is too small to fill up
* its field, the field is padded with leading zeros. For example, if the
* value of the line number is 123, the last four characters of the string
* representation will be "0123".
*
* Note that there is a single space separating the closing parenthesis
* after the area code from the first digit of the prefix.
*/
@Override
public String toString() {
return String.format("(%03d) %03d-%04d", areaCode, prefix, lineNumber);
}
@Override
public PhoneNumber clone() {
try {
return (PhoneNumber) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError(); // Can't happen
}
}
// Works fine, but can be made faster
// @Override
// public int compareTo(PhoneNumber pn) {
// // Compare area codes
// if (areaCode < pn.areaCode) {
// return -1;
// }
// if (areaCode > pn.areaCode) {
// return 1;
// }
//
// // Area codes are equal, compare prefixes
// if (prefix < pn.prefix) {
// return -1;
// }
// if (prefix > pn.prefix) {
// return 1;
// }
//
// // Area codes and prefixes are equal, compare line numbers
// if (lineNumber < pn.lineNumber) {
// return -1;
// }
// if (lineNumber > pn.lineNumber) {
// return 1;
// }
//
// return 0; // All fields are equal
// }
@Override
public int compareTo(PhoneNumber pn) {
// Compare area codes
int areaCodeDiff = areaCode - pn.areaCode;
if (areaCodeDiff != 0) {
return areaCodeDiff;
}
// Area codes are equal, compare prefix
int prefixDiff = prefix - pn.prefix;
if (prefixDiff != 0) {
return prefixDiff;
}
// Area codes and prefixes are equals, compare line numbers
return lineNumber - pn.lineNumber;
}
public static void main(String[] args) {
NavigableSet<PhoneNumber> s = new TreeSet<PhoneNumber>();
for (int i = 0; i < 10; i++) {
s.add(randomPhoneNumber());
}
System.out.println(s);
}
private static final Random rnd = new Random();
private static PhoneNumber randomPhoneNumber() {
return new PhoneNumber((short) rnd.nextInt(1000),
(short) rnd.nextInt(1000), (short) rnd.nextInt(10000));
}
}
| [
"chenw0571@outlook.com"
] | chenw0571@outlook.com |
375978d440dfe06c375c4466931873061934ec57 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module0905/src/java/module0905/a/IFoo0.java | 80b3aef054da3b75d926eac6a8348a9d403634f9 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 864 | java | package module0905.a;
import javax.net.ssl.*;
import javax.rmi.ssl.*;
import java.awt.datatransfer.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.management.Attribute
* @see javax.naming.directory.DirContext
* @see javax.net.ssl.ExtendedSSLSession
*/
@SuppressWarnings("all")
public interface IFoo0<C> extends java.util.concurrent.Callable<C> {
javax.rmi.ssl.SslRMIClientSocketFactory f0 = null;
java.awt.datatransfer.DataFlavor f1 = null;
java.beans.beancontext.BeanContext f2 = null;
String getName();
void setName(String s);
C get();
void set(C e);
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
60eeba88de037e7aabfc927ba0377d187bee7609 | 802fa2655a75856beb9b7ecef67aec2cfa855674 | /algorithms/src/com/msrm/algorithms/strings/StringValidation.java | 2189b053f8c7cd34ed54e165962ecf50d5776e97 | [] | no_license | srirambtechit/computer-science | 018ac74b08b517b12afe870a480fd0baa0ad3acf | 85e248253fee8577bf5b9d106c2d9675bf5a889d | refs/heads/master | 2021-01-22T07:06:32.076572 | 2017-11-15T15:58:20 | 2017-11-15T15:58:20 | 42,003,765 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,754 | java | package com.msrm.algorithms.strings;
/**
* Count occurrence of "ABA" in the given input string. Input string will only
* have A and B. should not use substring() method in String class
*
* @author sriram
*
*/
public class StringValidation {
public static void main(String[] args) {
String[] inputs = { "AAA", "BAB", "BAA", "ABBABABABBABABAA", "AABA", "BBABA", "BBBBAAAABAABABB", "ABABABAABABABA" };
String searchString = "ABA";
StringValidation strValidation = new StringValidation();
for (String string : inputs) {
System.out.printf("Searching '%s'... %d occurred in %s%n", searchString, strValidation.occurrence(string, searchString), string);
}
}
public int occurrence(String inputString, String searchString) {
int count = 0;
char[] inputCharArray = inputString.toCharArray();
char[] searchCharArray = searchString.toCharArray();
// loop till Length(inputString) - Length(searchString) + 1, otherwise
// it may lead to ArrayIndexOutOfBoundsException
for (int i = 0; i < inputCharArray.length - searchCharArray.length + 1; i++) {
// condition for optimization of looping
if (inputCharArray[i] == searchCharArray[0] && checkStr(i, inputCharArray, searchCharArray)) {
count++;
}
}
return count;
}
private boolean checkStr(int startIndex, char[] inputCharArray, char[] searchCharArray) {
for (int i = 0; i < searchCharArray.length; i++) {
if (inputCharArray[startIndex + i] != searchCharArray[i])
return false;
}
return true;
// int endIndex = startIndex;
// for (char c : searchCharArray) {
// if (c == inputCharArray[endIndex]) {
// endIndex++;
// } else {
// endIndex--;
// break;
// }
// }
// return (endIndex - startIndex) == searchCharArray.length;
}
}
| [
"srirambtecit@gmail.com"
] | srirambtecit@gmail.com |
59b91f2082ece376b8a5c2e81d5008f72554104d | cad7bc29389fbf5d5b722ee5327ba8154e7cc952 | /submissions/available/CPC/CPC-what-property/data/source/collections/bidimap/package-info.java | 6657712d1358787c5d5709b8eb3cd9d4ed483bdc | [
"Apache-2.0",
"Unlicense"
] | permissive | XZ-X/CPC-artifact-release | f9f9f0cde79b111f47622faba02f08b85a8a5ee9 | 5710dc0e39509f79e42535e0b5ca5e41cbd90fc2 | refs/heads/master | 2022-12-20T12:30:22.787707 | 2020-01-27T21:45:33 | 2020-01-27T21:45:33 | 236,601,424 | 1 | 0 | Unlicense | 2022-12-16T04:24:27 | 2020-01-27T21:41:38 | Java | UTF-8 | Java | false | false | 1,891 | 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.
*/
/**
* This package contains implementations of the
* {@link org.apache.commons.collections4.BidiMap BidiMap},
* {@link org.apache.commons.collections4.OrderedBidiMap OrderedBidiMap} and
* {@link org.apache.commons.collections4.SortedBidiMap SortedBidiMap} interfaces.
* A BidiMap is an extension to Map that allows keys and values to be looked up with equal ease.
* One example usage is a system communicating to a legacy datasource that must convert codes
* from the new format to the old format and vice versa.
* <p>
* The following implementations are provided in the package:
* <ul>
* <li>DualHashBidiMap - uses two HashMaps to implement BidiMap
* <li>DualLinkedHashBidiMap - uses two LinkedHashMaps to implement BidiMap
* <li>DualTreeBidiMap - uses two TreeMaps to implement SortedBidiMap
* <li>TreeBidiMap - red-black tree implementation of OrderedBidiMap
* </ul>
* <p>
* The following decorators are provided in the package:
* <ul>
* <li>Unmodifiable - ensures the map cannot be altered
* </ul>
*
*/
package org.apache.commons.collections4.bidimap;
| [
"161250170@smail.nju.edu.cn"
] | 161250170@smail.nju.edu.cn |
bedad32eee531ab411fddd58c552a5bdfe8ccdbc | 003342a945cdbc3dafa845ae04c622d15d25533d | /android/support/transition/TransitionManagerIcs.java | 393fce05e723e3c848f321ebbb98aec571d3e56e | [] | no_license | Amorend/a-gift | ef51d342d689222e29821839134efbd6be8b18d1 | 4fc54241dbeae3cfa0dab576f3b75291a55933ab | refs/heads/main | 2022-12-31T18:09:21.468241 | 2020-10-14T17:27:40 | 2020-10-14T17:27:40 | 304,072,291 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,735 | java | package android.support.transition;
import android.annotation.TargetApi;
import android.support.annotation.RequiresApi;
@TargetApi(14)
@RequiresApi(14)
class TransitionManagerIcs
extends TransitionManagerImpl
{
private final TransitionManagerPort mTransitionManager = new TransitionManagerPort();
public void setTransition(SceneImpl paramSceneImpl1, SceneImpl paramSceneImpl2, TransitionImpl paramTransitionImpl)
{
TransitionManagerPort localTransitionManagerPort = this.mTransitionManager;
ScenePort localScenePort = ((SceneIcs)paramSceneImpl1).mScene;
paramSceneImpl2 = ((SceneIcs)paramSceneImpl2).mScene;
if (paramTransitionImpl == null) {}
for (paramSceneImpl1 = null;; paramSceneImpl1 = ((TransitionIcs)paramTransitionImpl).mTransition)
{
localTransitionManagerPort.setTransition(localScenePort, paramSceneImpl2, paramSceneImpl1);
return;
}
}
public void setTransition(SceneImpl paramSceneImpl, TransitionImpl paramTransitionImpl)
{
TransitionManagerPort localTransitionManagerPort = this.mTransitionManager;
ScenePort localScenePort = ((SceneIcs)paramSceneImpl).mScene;
if (paramTransitionImpl == null) {}
for (paramSceneImpl = null;; paramSceneImpl = ((TransitionIcs)paramTransitionImpl).mTransition)
{
localTransitionManagerPort.setTransition(localScenePort, paramSceneImpl);
return;
}
}
public void transitionTo(SceneImpl paramSceneImpl)
{
this.mTransitionManager.transitionTo(((SceneIcs)paramSceneImpl).mScene);
}
}
/* Location: C:\Users\12724\Desktop\classes-dex2jar.jar!\android\support\transition\TransitionManagerIcs.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"am16@vip.qq.com"
] | am16@vip.qq.com |
25bbbf9e96ebd10ce41e2331dd4d21df3447128b | 4aa90348abcb2119011728dc067afd501f275374 | /app/src/main/java/com/tencent/mm/ui/friend/FindMContactInviteUI$4.java | c4e3955db64d920c4085aad61e9b6bc18282d63a | [] | no_license | jambestwick/HackWechat | 0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6 | 6a34899c8bfd50d19e5a5ec36a58218598172a6b | refs/heads/master | 2022-01-27T12:48:43.446804 | 2021-12-29T10:36:30 | 2021-12-29T10:36:30 | 249,366,791 | 0 | 0 | null | 2020-03-23T07:48:32 | 2020-03-23T07:48:32 | null | UTF-8 | Java | false | false | 512 | java | package com.tencent.mm.ui.friend;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
class FindMContactInviteUI$4 implements OnClickListener {
final /* synthetic */ FindMContactInviteUI zcx;
FindMContactInviteUI$4(FindMContactInviteUI findMContactInviteUI) {
this.zcx = findMContactInviteUI;
}
public final void onClick(DialogInterface dialogInterface, int i) {
FindMContactInviteUI.n(this.zcx);
this.zcx.finish();
}
}
| [
"malin.myemail@163.com"
] | malin.myemail@163.com |
a3f927edebdd2efd253d2b7e27453469a8df7bc8 | 96f7f6322c3e3a5f009dad9bce1e231b5a57a5e8 | /ProjectDesignPartners/src/main/java/Pack20DesignPatterns/ArchitecturalStandards/flux/store/MenuStore.java | 4992740f0626279f78df7c56486e1931b9851a9e | [] | no_license | weder96/javaaula21 | 09cb63a2e6f3fe7ac34f166315ae3024113a4dd3 | 8f4245a922eea74747644ad2f4a0f2b3396c319e | refs/heads/main | 2023-08-23T10:47:43.216438 | 2021-10-27T21:46:45 | 2021-10-27T21:46:45 | 421,982,565 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 783 | java | package Pack20DesignPatterns.ArchitecturalStandards.flux.store;
import Pack20DesignPatterns.ArchitecturalStandards.flux.action.Action;
import Pack20DesignPatterns.ArchitecturalStandards.flux.action.ActionType;
import Pack20DesignPatterns.ArchitecturalStandards.flux.action.MenuAction;
import Pack20DesignPatterns.ArchitecturalStandards.flux.action.MenuItem;
/**
*
* MenuStore is a concrete store.
*
*/
public class MenuStore extends Store {
private MenuItem selected = MenuItem.HOME;
@Override
public void onAction(Action action) {
if (action.getType().equals(ActionType.MENU_ITEM_SELECTED)) {
MenuAction menuAction = (MenuAction) action;
selected = menuAction.getMenuItem();
notifyChange();
}
}
public MenuItem getSelected() {
return selected;
}
}
| [
"weder96@gmail.com"
] | weder96@gmail.com |
ba7dcf40d2a19ba553182c1a20a47e4dc4223678 | 519de3b9fca2d6f905e7f3498884094546432c30 | /kk-4.x/external/apache-http/src/org/apache/http/HttpMessage.java | 87e06b283fefd0dff1359e0aa01ef05ce0efa341 | [
"Apache-2.0"
] | permissive | hongshui3000/mt5507_android_4.4 | 2324e078190b97afbc7ceca22ec1b87b9367f52a | 880d4424989cf91f690ca187d6f0343df047da4f | refs/heads/master | 2020-03-24T10:34:21.213134 | 2016-02-24T05:57:53 | 2016-02-24T05:57:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,365 | java | /*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpMessage.java $
* $Revision: #1 $
* $Date: 2014/10/13 $
*
* ====================================================================
* 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
import org.apache.http.params.HttpParams;
/**
* A generic HTTP message.
* Holds what is common between requests and responses.
*
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision: #1 $
*
* @since 4.0
*/
public interface HttpMessage {
/**
* Returns the protocol version this message is compatible with.
*/
ProtocolVersion getProtocolVersion();
/**
* Checks if a certain header is present in this message. Header values are
* ignored.
*
* @param name the header name to check for.
* @return true if at least one header with this name is present.
*/
boolean containsHeader(String name);
/**
* Returns all the headers with a specified name of this message. Header values
* are ignored. Headers are orderd in the sequence they will be sent over a
* connection.
*
* @param name the name of the headers to return.
* @return the headers whose name property equals <code>name</code>.
*/
Header[] getHeaders(String name);
/**
* Returns the first header with a specified name of this message. Header
* values are ignored. If there is more than one matching header in the
* message the first element of {@link #getHeaders(String)} is returned.
* If there is no matching header in the message <code>null</code> is
* returned.
*
* @param name the name of the header to return.
* @return the first header whose name property equals <code>name</code>
* or <code>null</code> if no such header could be found.
*/
Header getFirstHeader(String name);
/**
* Returns the last header with a specified name of this message. Header values
* are ignored. If there is more than one matching header in the message the
* last element of {@link #getHeaders(String)} is returned. If there is no
* matching header in the message <code>null</code> is returned.
*
* @param name the name of the header to return.
* @return the last header whose name property equals <code>name</code>.
* or <code>null</code> if no such header could be found.
*/
Header getLastHeader(String name);
/**
* Returns all the headers of this message. Headers are orderd in the sequence
* they will be sent over a connection.
*
* @return all the headers of this message
*/
Header[] getAllHeaders();
/**
* Adds a header to this message. The header will be appended to the end of
* the list.
*
* @param header the header to append.
*/
void addHeader(Header header);
/**
* Adds a header to this message. The header will be appended to the end of
* the list.
*
* @param name the name of the header.
* @param value the value of the header.
*/
void addHeader(String name, String value);
/**
* Overwrites the first header with the same name. The new header will be appended to
* the end of the list, if no header with the given name can be found.
*
* @param header the header to set.
*/
void setHeader(Header header);
/**
* Overwrites the first header with the same name. The new header will be appended to
* the end of the list, if no header with the given name can be found.
*
* @param name the name of the header.
* @param value the value of the header.
*/
void setHeader(String name, String value);
/**
* Overwrites all the headers in the message.
*
* @param headers the array of headers to set.
*/
void setHeaders(Header[] headers);
/**
* Removes a header from this message.
*
* @param header the header to remove.
*/
void removeHeader(Header header);
/**
* Removes all headers with a certain name from this message.
*
* @param name The name of the headers to remove.
*/
void removeHeaders(String name);
/**
* Returns an iterator of all the headers.
*
* @return Iterator that returns Header objects in the sequence they are
* sent over a connection.
*/
HeaderIterator headerIterator();
/**
* Returns an iterator of the headers with a given name.
*
* @param name the name of the headers over which to iterate, or
* <code>null</code> for all headers
*
* @return Iterator that returns Header objects with the argument name
* in the sequence they are sent over a connection.
*/
HeaderIterator headerIterator(String name);
/**
* Returns the parameters effective for this message as set by
* {@link #setParams(HttpParams)}.
*/
HttpParams getParams();
/**
* Provides parameters to be used for the processing of this message.
* @param params the parameters
*/
void setParams(HttpParams params);
}
| [
"342981011@qq.com"
] | 342981011@qq.com |
1f4dd14dbeef17ae9f018b916cd2ddaee1509fa3 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /java/java-tests/testData/ig/com/siyeh/igtest/maturity/commented_out_code/CommentedOutCode.java | bf61a831bc2401388dc393aefcecc7d60370d2e1 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Java | false | false | 5,753 | java | import java.util.*;
import java.io.*;
<warning descr="Commented out code (1 line)">//</warning> import java.awt.List;
class CommentedOutCode /* extends Object */ {
// https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
// https://youtrack.jetbrains.com/issue/IDEA-71996
//// VARIABLE STATE \\\\
private String s;
<warning descr="Commented out code (1 line)">//</warning> void x() {}
private String field;
private static int danglingElse(int i) {
if (i == 3) {
System.out.println(i);
}
<warning descr="Commented out code (3 lines)">//</warning>else if (i == 4) {
// System.exit(-1);
//}
return i;
//else if (i == 4) {
// System.exit(-1);
//}
}
private void danglingElse2(int i) {
if (i == 3) {
System.out.println(i);
} else {
}
//else if (i == 4) {
// System.exit(-1);
//}
if (i == 3) {
System.out.println(i);
} else if (i == 0) {
}
<warning descr="Commented out code (3 lines)">//</warning>else if (i == 4) {
// System.exit(-1);
//}
}
int x(int i) {
new Object() {
<warning descr="Commented out code (3 lines)">/*</warning>public String toString() {
return "";
}*/
};
<warning descr="Commented out code (1 line)"><caret>//</warning> System.out.println(i);
return i + 1 /*+ 2*/;
// https://youtrack.jetbrains.com/issue/CPP-3936 Move members dialog choses arbitrary file by name, if there are several in project
// https://youtrack.jetbrains.com/issue/CPP-3935 Move members dialog doesn't recognize case insensitive file names
// https://youtrack.jetbrains.com/issue/CPP-3937 Move members dialog doesn't recognize existing non source files
}
//TODO highlight parameters in macro substitution (in macro definition)
<warning descr="Commented out code (4 lines)">//</warning>@Override
//public void visitMacroParameter(OCMacroParameterImpl parameter) {
// highlight(parameter, OCHighlightingKeys.MACRO_PARAMETER);
//}
//
/*
List<String> tmp = map.get(s.length());
if(tmp == null) {
tmp = new ArrayList<>();
map.put(s.length(), tmp);
}
tmp.add(s);
*/
void x(String s, String... ss) {}
void x() {
// file://C:/Windows/System32/Config
<warning descr="Commented out code (1 line)">//</warning> System.out.println();
}
void k() {
//noinspection unchecked
l(new ArrayList());
// TODO:
}
void l(List<String> l) {
//noinspection one,two
System.out.println(); // Smiles("[C+]");
// "DROP VIEW $viewName$";
}
// TODO: change to (uri -> url)
// uri -> path
public String fromUri(String uri) {
try {
new FileInputStream(uri);
}
catch (FileNotFoundException e) {
//ignore;
}
// was: true
return null;
// test
//
}
//////////////////////////////////////////////////////////////////////////////////////////
//
// Parser
//
//////////////////////////////////////////////////////////////////////////////////////////
public boolean value(final String file) {
// Blocked by current false-positives
// https://youtrack.jetbrains.com/issue/CPP-11252
<warning descr="Commented out code (1 line)">//</warning>return OCAnnotator.isAnnotated(myProject, file);
return false;
}
// fixme we've got a race here. RailsFacet is not yet updated configs, bug tree already updated RUBY-22574
<warning descr="Commented out code (41 lines)">/*</warning>
public void testRenameInHomeFolder_HomeRoot() throws IncorrectOperationException {
final JTree tree = initTree();
PlatformTestUtil.assertTreeEqual(tree,
"-Project\n" +
" -Module\n" +
" -Config\n" +
" -User Folder: environment\n" +
" File: file.rb\n" +
" File: some.yml\n" +
" -Lib: Lib\n" +
" -User Folder: folder\n" +
" -User Folder: subfolder\n" +
" File: file.rb\n" +
" File: readme.txt\n" +
" File: some.yml\n" +
" -RSpec\n" +
" -User Folder: folder\n" +
" File: some_spec.rb\n" +
" File: readme.txt\n");
renameFileOrFolderAndWait("", "other_rails");
PlatformTestUtil.assertTreeEqual(tree,
"-Project\n" +
" -Module\n" +
" -Config\n" +
" -User Folder: environment\n" +
" File: file.rb\n" +
" File: some.yml\n" +
" -Lib: Lib\n" +
" -User Folder: folder\n" +
" -User Folder: subfolder\n" +
" File: file.rb\n" +
" File: readme.txt\n" +
" File: some.yml\n" +
" -RSpec\n" +
" -User Folder: folder\n" +
" File: some_spec.rb\n" +
" File: readme.txt\n");
}
*/
}
enum E {
A {
<warning descr="Commented out code (3 lines)">/*</warning>
public String toString() {
return "";
}
*/
}
} | [
"intellij-monorepo-bot-no-reply@jetbrains.com"
] | intellij-monorepo-bot-no-reply@jetbrains.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.