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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26504af13de8311303265b34713acc8d76528ed0
|
da3b91e93dacd51d54c6c45a3ceaee3a0fcc9729
|
/bosphorus-core/src/main/java/org/bosphorus/expression/aggregate/executor/scalar/ExpressionExecutor.java
|
bd1dde3b4753a195904b850c57619a9e5da36ccc
|
[
"Apache-2.0"
] |
permissive
|
elvis121193/bosphorus
|
e119778e8bad646e48d130c695af6cecded343a8
|
d1818f093eebffa422b011be18864c0ea914ff95
|
refs/heads/master
| 2020-12-28T23:15:24.187919
| 2014-12-01T21:07:49
| 2014-12-01T21:07:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,063
|
java
|
package org.bosphorus.expression.aggregate.executor.scalar;
import org.bosphorus.expression.aggregate.executor.IAggregateExecutor;
import org.bosphorus.expression.scalar.executor.IScalarExecutor;
public class ExpressionExecutor<TInput, TType, TOutput> implements IAggregateExecutor<TInput, TOutput> {
private IScalarExecutor<TInput, ? extends TType> expression;
private IAggregateExecutor<TType, ? extends TOutput> executor;
public ExpressionExecutor(IScalarExecutor<TInput, ? extends TType> expression, IAggregateExecutor<TType, ? extends TOutput> executor) {
this.expression = expression;
this.executor = executor;
}
@Override
public void execute(TInput input) throws Exception {
executor.execute(expression.execute(input));
}
@Override
public TOutput getValue() {
return executor.getValue();
}
@Override
public void reset() {
executor.reset();
}
@Override
public Object getState() {
return this.executor.getState();
}
@Override
public void setState(Object state) throws Exception {
this.executor.setState(state);
}
}
|
[
"unluonur@gmail.com"
] |
unluonur@gmail.com
|
2159432d6fcdde212d501547b53b973f74e8a042
|
6a95ca2d0e5d5d1b425e29af813733e600d1fb73
|
/spring-cloud-consul-discovery/src/test/java/org/springframework/cloud/consul/discovery/ConsulLifecycleCustomizedPropsTests.java
|
1a44c95a2a3862b9f8354d9d59fd8f47f09e2f84
|
[
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
moondev/spring-cloud-consul
|
095dead75707e8768b223c8e4699ebb811102325
|
bcad4ca683bc7cbc274654e97fb8bca45c42acd9
|
refs/heads/master
| 2021-01-17T06:56:05.555705
| 2016-04-06T18:36:49
| 2016-04-06T18:36:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,672
|
java
|
/*
* Copyright 2013-2015 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.cloud.consul.discovery;
import java.util.List;
import java.util.Map;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.WebIntegrationTest;
import org.springframework.cloud.consul.ConsulAutoConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.ecwid.consul.v1.ConsulClient;
import com.ecwid.consul.v1.QueryParams;
import com.ecwid.consul.v1.Response;
import com.ecwid.consul.v1.agent.model.Service;
import com.ecwid.consul.v1.health.model.Check;
import static org.junit.Assert.assertThat;
import static org.hamcrest.Matchers.*;
/**
* @author Spencer Gibb
*/
@RunWith(SpringJUnit4ClassRunner.class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@SpringApplicationConfiguration(classes = TestPropsConfig.class)
@WebIntegrationTest(value = { "spring.application.name=myTestService",
"spring.cloud.consul.discovery.instanceId=myTestService1",
"spring.cloud.consul.discovery.port=4452",
"spring.cloud.consul.discovery.hostname=myhost",
"spring.cloud.consul.discovery.ipAddress=10.0.0.1",
"spring.cloud.consul.discovery.registerHealthCheck=false", }, randomPort = true)
public class ConsulLifecycleCustomizedPropsTests {
@Autowired
ConsulLifecycle lifecycle;
@Autowired
ConsulClient consul;
@Autowired
ApplicationContext context;
@Autowired
ConsulDiscoveryProperties properties;
@Test
public void contextLoads() {
Response<Map<String, Service>> response = consul.getAgentServices();
Map<String, Service> services = response.getValue();
Service service = services.get("myTestService1");
assertThat("service was null", service, is(notNullValue()));
assertThat("service port is discovery port", 4452, equalTo(service.getPort()));
assertThat("service id was wrong", "myTestService1", equalTo(service.getId()));
assertThat("service name was wrong", "myTestService", equalTo(service.getService()));
assertThat("property hostname was wrong", "myhost", equalTo(this.properties.getHostname()));
assertThat("property ipAddress was wrong", "10.0.0.1", equalTo(this.properties.getIpAddress()));
assertThat("service address was wrong", "myhost", equalTo(service.getAddress()));
Response<List<Check>> checkResponse = consul.getHealthChecksForService("myTestService", QueryParams.DEFAULT);
List<Check> checks = checkResponse.getValue();
assertThat("checks was wrong size", checks, hasSize(0));
}
}
@Configuration
@EnableAutoConfiguration
@Import({ ConsulAutoConfiguration.class, ConsulDiscoveryClientConfiguration.class })
class TestPropsConfig {
}
|
[
"spencer@gibb.us"
] |
spencer@gibb.us
|
fca56ea70e71ed1c026212d5f9fb532569470125
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/newEvaluatedBugs/Jsoup_49_buggy/mutated/196/Token.java
|
568630466139bfcc2337cadc350cfd8e584a1ccf
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,889
|
java
|
package org.jsoup.parser;
import org.jsoup.helper.Validate;
import org.jsoup.nodes.Attribute;
import org.jsoup.nodes.Attributes;
/**
* Parse tokens for the Tokeniser.
*/
abstract class Token {
TokenType type;
private Token() {
}
static class Doctype extends Token {
final StringBuilder name = new StringBuilder();
final StringBuilder publicIdentifier = new StringBuilder();
final StringBuilder systemIdentifier = new StringBuilder();
boolean forceQuirks = false;
Doctype() {
type = TokenType.Doctype;
}
String getName() {
return name.toString();
}
String getPublicIdentifier() {
return publicIdentifier.toString();
}
public String getSystemIdentifier() {
return systemIdentifier.toString();
}
public boolean isForceQuirks() {
return forceQuirks;
}
}
static abstract class Tag extends Token {
protected String tagName;
private String pendingAttributeName;
private String pendingAttributeValue;
boolean selfClosing = false;
Attributes attributes = new Attributes(); // todo: allow nodes to not have attributes
void newAttribute() {
if (pendingAttributeName != null) {
if (pendingAttributeValue == null)
pendingAttributeValue = "";
Attribute attribute = new Attribute(pendingAttributeName, pendingAttributeValue);
attributes.put(attribute);
}
pendingAttributeName = null;
pendingAttributeValue = null;
}
void finaliseTag() {
// finalises for emit
if (pendingAttributeName != null) {
// todo: check if attribute name exists; if so, drop and error
newAttribute();
}
}
String name() {
Validate.isFalse(tagName.length() == 0);
return tagName;
}
Tag name(String name) {
tagName = name;
return this;
}
boolean isSelfClosing() {
return selfClosing;
}
@SuppressWarnings({"TypeMayBeWeakened"})
Attributes getAttributes() {
return attributes;
}
// these appenders are rarely hit in not null state-- caused by null chars.
void appendTagName(String append) {
tagName = tagName == null ? append : tagName.concat(append);
}
void appendTagName(char append) {
appendTagName(String.valueOf(append));
}
void appendAttributeName(String append) {
pendingAttributeName = pendingAttributeName == null ? append : pendingAttributeName.concat(append);
}
void appendAttributeName(char append) {
appendAttributeName(String.valueOf(append));
}
void appendAttributeValue(String append) {
pendingAttributeValue = pendingAttributeValue == null ? append : pendingAttributeValue.concat(append);
}
void appendAttributeValue(char append) {
appendAttributeValue(String.valueOf(append));
}
}
static class StartTag extends Tag {
StartTag() {
super();
type = TokenType.StartTag;
}
StartTag(String name) {
this();
this.tagName = name;
}
StartTag(String name, Attributes attributes) {
this();
this.tagName = name;
this.attributes = attributes;
}
@Override
public String toString() {
return "<" + name() + " " + attributes.toString() + ">";
}
}
static class EndTag extends Tag{
EndTag() {
super();
type = TokenType.EndTag;
}
EndTag(String name) {
this();
this.tagName = name;
}
@Override
public String toString() {
return "</" + name() + " " + attributes.toString() + ">";
}
}
static class Comment extends Token {
final StringBuilder data = new StringBuilder();
Comment() {
type = TokenType.Comment;
}
String getData() {
return data.toString();
}
@Override
public String toString() {
return "<!--" + getData() + "-->";
}
}
static class Character extends Token {
private final String data;
Character(String data) {
type = TokenType.Character;
this.data = data;
}
String getData() {
return data;
}
@Override
public String toString() {
return getData();
}
}
static class EOF extends Token {
EOF() {
type = Token.TokenType.EOF;
}
}
boolean isDoctype() {
return type == TokenType.Doctype;
}
Doctype asDoctype() {
return (Doctype) this;
}
boolean isStartTag() {
return type == TokenType.StartTag;
}
StartTag asStartTag() {
return (StartTag) this;
}
boolean isEndTag() {
return type == org.jsoup.parser.Token.TokenType.Doctype;
}
EndTag asEndTag() {
return (EndTag) this;
}
boolean isComment() {
return type == TokenType.Comment;
}
Comment asComment() {
return (Comment) this;
}
boolean isCharacter() {
return type == TokenType.Character;
}
Character asCharacter() {
return (Character) this;
}
boolean isEOF() {
return type == TokenType.EOF;
}
enum TokenType {
Doctype,
StartTag,
EndTag,
Comment,
Character,
EOF
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
e139ade29cf528b4b62381e0aec5a84422ace7a9
|
82a848c92b2b9551a12aa76654a1ff41d4178c12
|
/app/src/main/java/kiky/beam/lilly/th/ac/rmutk/fruitqr/ShowListFragmentAdapter.java
|
d5f0deb1c7f11090d12079634842fe74b3bcc478
|
[] |
no_license
|
masterUNG/FruitQRv3_11apil
|
5622579fc48e23b654c1b320353e5ae464879030
|
8097766e28532bc1e5bd88844654635c0986b031
|
refs/heads/master
| 2020-05-07T16:50:36.613645
| 2019-04-18T09:00:11
| 2019-04-18T09:00:11
| 180,701,700
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,439
|
java
|
package kiky.beam.lilly.th.ac.rmutk.fruitqr;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.ArrayList;
public class ShowListFragmentAdapter extends RecyclerView.Adapter<ShowListFragmentAdapter.ShowListFramerViewHolder>{
private Context context;
private ArrayList<String> nameStringArrayList, amountStringArrayList, dateStringArrayList, nameOwnerStringArrayList;
private OnClickItem onClickItem;
private LayoutInflater layoutInflater;
public ShowListFragmentAdapter(Context context,
ArrayList<String> nameStringArrayList,
ArrayList<String> amountStringArrayList,
ArrayList<String> dateStringArrayList,
ArrayList<String> nameOwnerStringArrayList,
OnClickItem onClickItem) {
this.layoutInflater = LayoutInflater.from(context);
this.nameStringArrayList = nameStringArrayList;
this.amountStringArrayList = amountStringArrayList;
this.dateStringArrayList = dateStringArrayList;
this.nameOwnerStringArrayList = nameOwnerStringArrayList;
this.onClickItem = onClickItem;
}
@NonNull
@Override
public ShowListFramerViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
View view = layoutInflater.inflate(R.layout.recycler_show_list_framer, viewGroup, false);
ShowListFramerViewHolder showListFramerViewHolder = new ShowListFramerViewHolder(view);
return showListFramerViewHolder;
}
@Override
public void onBindViewHolder(@NonNull final ShowListFramerViewHolder showListFramerViewHolder, int i) {
//ดึงเดต้ามาเป็นตัวอักษร
String name = nameStringArrayList.get(i);
String amountAndUnit = amountStringArrayList.get(i);
String date = dateStringArrayList.get(i);
String nameOwer = nameOwnerStringArrayList.get(i);
showListFramerViewHolder.nameTextView.setText(name);
showListFramerViewHolder.amountTextView.setText("Amount = " + amountAndUnit);
showListFramerViewHolder.dateTextView.setText(date);
showListFramerViewHolder.nameOwnerTextView.setText("Owner : " + nameOwer);
showListFramerViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onClickItem.onClickitem(v, showListFramerViewHolder.getAdapterPosition());
}
});
}
@Override
public int getItemCount() {
return nameStringArrayList.size();
}
public class ShowListFramerViewHolder extends RecyclerView.ViewHolder{
private TextView nameTextView, amountTextView, dateTextView, nameOwnerTextView;
public ShowListFramerViewHolder(@NonNull View itemView) {
super(itemView);
nameTextView = itemView.findViewById(R.id.txtName);
amountTextView = itemView.findViewById(R.id.txtAmount);
dateTextView = itemView.findViewById(R.id.txtDate);
nameOwnerTextView = itemView.findViewById(R.id.txtNameOwner);
}
}
}
|
[
"phrombutr@gmail.com"
] |
phrombutr@gmail.com
|
604303cc2c7f7f30992e25434302649964dc35c0
|
7b74527c03af2c0aa909d936a45315faae70264b
|
/impl/clusterTests/src/test/java/org/pentaho/big/data/impl/cluster/tests/mr/PingJobTrackerTestTest.java
|
595a6fb8f36372f0ada73ece1792585a4d07f95d
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
LoseYourself/big-data-plugin-8.0
|
22d7a9a24f3d2f1ddf27d62287b65a41bbd38da8
|
0cc7b301bc59d6da1507f90df66464efc3de96d0
|
refs/heads/master
| 2020-03-14T21:03:43.191289
| 2018-05-04T02:06:32
| 2018-05-04T02:06:32
| 131,788,250
| 4
| 2
|
Apache-2.0
| 2018-05-17T05:43:32
| 2018-05-02T02:36:06
|
Java
|
UTF-8
|
Java
| false
| false
| 4,080
|
java
|
/*******************************************************************************
*
* Pentaho Big Data
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************/
package org.pentaho.big.data.impl.cluster.tests.mr;
import org.junit.Before;
import org.junit.Test;
import org.pentaho.big.data.api.cluster.NamedCluster;
import org.pentaho.runtime.test.TestMessageGetterFactory;
import org.pentaho.runtime.test.i18n.MessageGetter;
import org.pentaho.runtime.test.i18n.MessageGetterFactory;
import org.pentaho.runtime.test.network.ConnectivityTest;
import org.pentaho.runtime.test.network.ConnectivityTestFactory;
import org.pentaho.runtime.test.result.RuntimeTestEntrySeverity;
import org.pentaho.runtime.test.result.RuntimeTestResultEntry;
import org.pentaho.runtime.test.result.RuntimeTestResultSummary;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
/**
* Created by bryan on 8/24/15.
*/
public class PingJobTrackerTestTest {
private MessageGetterFactory messageGetterFactory;
private ConnectivityTestFactory connectivityTestFactory;
private PingJobTrackerTest pingJobTrackerTest;
private NamedCluster namedCluster;
private MessageGetter messageGetter;
private String jobTrackerHost;
private String jobTrackerPort;
@Before
public void setup() {
messageGetterFactory = new TestMessageGetterFactory();
messageGetter = messageGetterFactory.create( PingJobTrackerTest.class );
connectivityTestFactory = mock( ConnectivityTestFactory.class );
pingJobTrackerTest = new PingJobTrackerTest( messageGetterFactory, connectivityTestFactory );
jobTrackerHost = "jobTrackerHost";
jobTrackerPort = "829";
namedCluster = mock( NamedCluster.class );
when( namedCluster.getJobTrackerHost() ).thenReturn( jobTrackerHost );
when( namedCluster.getJobTrackerPort() ).thenReturn( jobTrackerPort );
}
@Test
public void testGetName() {
assertEquals( messageGetter.getMessage( PingJobTrackerTest.PING_JOB_TRACKER_TEST_NAME ),
pingJobTrackerTest.getName() );
}
@Test
public void testSuccess() {
RuntimeTestResultEntry results = mock( RuntimeTestResultEntry.class );
String testDescription = "test-description";
when( results.getDescription() ).thenReturn( testDescription );
ConnectivityTest connectivityTest = mock( ConnectivityTest.class );
when( connectivityTestFactory.create( messageGetterFactory, jobTrackerHost, jobTrackerPort, true ) )
.thenReturn( connectivityTest );
when( connectivityTest.runTest() ).thenReturn( results );
RuntimeTestResultSummary runtimeTestResultSummary = pingJobTrackerTest.runTest( namedCluster );
assertEquals( testDescription, runtimeTestResultSummary.getOverallStatusEntry().getDescription() );
assertEquals( 0, runtimeTestResultSummary.getRuntimeTestResultEntries().size() );
}
@Test
public void testIsMapR() {
when( namedCluster.isMapr() ).thenReturn( true );
RuntimeTestResultSummary runtimeTestResultSummary = pingJobTrackerTest.runTest( namedCluster );
RuntimeTestResultEntry results = runtimeTestResultSummary.getOverallStatusEntry();
assertEquals( RuntimeTestEntrySeverity.INFO, results.getSeverity() );
assertEquals( 0, runtimeTestResultSummary.getRuntimeTestResultEntries().size() );
}
}
|
[
"snj1314@163.com"
] |
snj1314@163.com
|
2299900fbdcad785e085eb6600d2f58940c8dc63
|
7e3487cfabb5ae425ff78fea8eb72e90b40ba2e1
|
/src/main/java/cn/hgxsp/mylife/entity/Team.java
|
5e663c17a6ffce211f18c701c6d6fe2699079fe0
|
[] |
no_license
|
houlinan/mylifeSpringBoot
|
6cd0aea2bd8580ea959c0d51d22f56e0a936ad7d
|
c448afb2ca118a3cf23f9165dc02398cd0c6d6c3
|
refs/heads/master
| 2022-07-07T15:00:17.536314
| 2019-05-23T05:15:31
| 2019-05-23T05:15:31
| 186,846,659
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 691
|
java
|
package cn.hgxsp.mylife.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
/**
* DESC:小组
* CREATED BY :@hou.linan
* CREATED DATE :2018/9/30
* Time : 23:25
*/
@Entity
@Data
public class Team {
@Id
private String id ;
@Column(name = "teamname")
private String teamName ;
@Column(name = "teampassword")
private String teamPassword ;
@Column(name = "create_time")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", locale = "zh", timezone = "GMT+8")
@Temporal(TemporalType.TIMESTAMP)
/**创建时间*/
private Date createTime;
}
|
[
"houlinan@vip.qq.com"
] |
houlinan@vip.qq.com
|
b5729a1878b2b6cd20d24c298f1e475f3c11c6f1
|
25478a6ea93e229f7759888d5ec1043e21dec59e
|
/JacpFXWebsocketClient/src/main/java/org/jacpfx/controls/UserListCellFactory.java
|
add91ec1af580cb6a0fd2881a9c8666ecae6f72f
|
[] |
no_license
|
orsanakbaba/JacpFX-demos
|
d401efc93e5b6dc57345dd7083a1ad41af16aeed
|
8628f63673ec6e306af5139b1181f23df0c0dea5
|
refs/heads/master
| 2020-12-13T10:35:08.226257
| 2020-01-18T16:04:45
| 2020-01-18T16:04:45
| 234,391,487
| 0
| 0
| null | 2020-01-16T19:06:42
| 2020-01-16T19:06:41
| null |
UTF-8
|
Java
| false
| false
| 2,157
|
java
|
/*
* **********************************************************************
*
* Copyright (C) 2010 - 2015
*
* [Component.java]
* JACPFX Project (https://github.com/JacpFX/JacpFX/)
* All rights reserved.
*
* 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.jacpfx.controls;
import javafx.geometry.Insets;
import javafx.scene.control.ListCell;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.text.Text;
import org.jacpfx.entities.User;
/**
* Created by Andy Moncsek on 19.03.15.
*/
public class UserListCellFactory extends ListCell<User> {
private final HBox box = new HBox();
private User user;
@Override
protected void updateItem(User t, boolean bln) {
super.updateItem(t, bln);
box.setPrefHeight(50);
if (this.user == null && t != null) {
this.user = t;
box.getChildren().addAll(createUserImage(), createNameLabel(t.getName()));
}
setGraphic(box);
}
private Text createNameLabel(final String name) {
final Text nameLabel = new Text(name);
nameLabel.setId("names");
HBox.setMargin(nameLabel, new Insets(8, 0, 0, 20));
return nameLabel;
}
private ImageView createUserImage() {
final ImageView image = new ImageView(new Image("/images/user.png", 40, 40, false, false));
HBox.setMargin(image, new Insets(8, 0, 0, 20));
return image;
}
public User getUser() {
return this.user;
}
}
|
[
"amo.ahcp@gmail.com"
] |
amo.ahcp@gmail.com
|
3b70ef157ef2937c311eccd5d96e549e26eb1cb7
|
125c28aac7c3882070de0e5a636fb37134930002
|
/persistence/persistence-payment-hibernate/src/main/java/org/yes/cart/payment/service/impl/PaymentModuleGenericServiceImpl.java
|
10190316161cb299a96560ce21109df330034151
|
[
"Apache-2.0"
] |
permissive
|
hacklock/yes-cart
|
870480e4241cc0ee7611690cbe57901407c6dc59
|
cf2ef25f5e2db0bdcdc396415b3b23d97373185b
|
refs/heads/master
| 2020-12-01T01:05:35.891105
| 2019-12-24T18:19:25
| 2019-12-24T18:19:25
| 230,528,192
| 1
| 0
|
Apache-2.0
| 2019-12-27T22:42:23
| 2019-12-27T22:42:22
| null |
UTF-8
|
Java
| false
| false
| 2,602
|
java
|
/*
* Copyright 2009 Denys Pavlov, Igor Azarnyi
*
* 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.yes.cart.payment.service.impl;
import org.yes.cart.payment.persistence.service.PaymentModuleGenericDAO;
import org.yes.cart.payment.service.PaymentModuleGenericService;
import java.util.List;
/**
* User: Igor Azarny iazarny@yahoo.com
* Date: 07-May-2011
* Time: 10:22:53
*/
public class PaymentModuleGenericServiceImpl<ENTITY> implements PaymentModuleGenericService<ENTITY> {
private final PaymentModuleGenericDAO<ENTITY, Long> genericDao;
public PaymentModuleGenericServiceImpl(final PaymentModuleGenericDAO<ENTITY, Long> genericDao) {
this.genericDao = genericDao;
}
/**
* {@inheritDoc}
*/
@Override
public List<ENTITY> findAll() {
return genericDao.findAll();
}
/**
* {@inheritDoc}
*/
@Override
public ENTITY findById(final long pk) {
return genericDao.findById(pk);
}
/**
* {@inheritDoc}
*/
@Override
public ENTITY create(final ENTITY instance) {
return genericDao.create(instance);
}
/**
* {@inheritDoc}
*/
@Override
public ENTITY update(final ENTITY instance) {
return genericDao.update(instance);
}
/**
* {@inheritDoc}
*/
@Override
public void delete(final ENTITY instance) {
genericDao.delete(instance);
}
/**
* Get generic dao
*
* @return generic dao
*/
@Override
public PaymentModuleGenericDAO<ENTITY, Long> getGenericDao() {
return genericDao;
}
/**
* {@inheritDoc}
*/
@Override
public List<ENTITY> findByCriteria(final String eCriteria, final Object... parameters) {
return genericDao.findByCriteria(eCriteria, parameters);
}
/**
* {@inheritDoc}
*/
@Override
public ENTITY findSingleByCriteria(final String eCriteria, final Object... parameters) {
return genericDao.findSingleByCriteria(eCriteria, parameters);
}
}
|
[
"denis.v.pavlov@gmail.com"
] |
denis.v.pavlov@gmail.com
|
419c704fa1389374e46e8f2de82c343796235d67
|
a69b0f82d5e06f7497d696402ed10aeda0e84373
|
/Java Linear Data Structures Implementations/src/static_Implementation_ReversedArrayList_Using_Array/MyReversedArrayListImpl.java
|
d1638982268140c7fb55a54d22e5a7964d6705d5
|
[] |
no_license
|
yavoryankov83/Java_Data_Structures
|
ccd42610e964bf718e863a19e95af4f2868562cb
|
37557413f71d650cff55ba911854d10f5093ed3a
|
refs/heads/master
| 2020-05-18T18:15:26.068383
| 2019-06-17T06:31:26
| 2019-06-17T06:31:26
| 184,574,589
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,350
|
java
|
package static_Implementation_ReversedArrayList_Using_Array;
import java.util.Arrays;
import java.util.Iterator;
public class MyReversedArrayListImpl<T> implements MyReversedArrayList<T> {
private static final String INDEX_OUT_OF_BOUNDS = "Index is out of bounds";
private static final int RESIZE_ARRAY_MULTIPLIER = 2;
private int capacity;
private int count;
private T[] data;
public MyReversedArrayListImpl() {
this.capacity = 2;
this.count = 0;
this.data = (T[]) new Object[this.capacity];
}
//O(1) Complexity
@Override
public void addElement(T element) {
if (this.count == this.data.length) {
resize();
}
this.data[count++] = element;
}
//O(n) Complexity
@Override
public T removeAt(int index) {
checkIndexValidity(index);
T element = this.data[this.count - 1 - index];
for (int i = this.count - 1 - index; i < this.count - 1; i++) {
this.data[i] = this.data[i + 1];
}
this.count--;
this.data = (T[]) Arrays.stream(this.data).limit(count).toArray();
return element;
}
//O(1) Complexity
@Override
public T getElement(int index) {
checkIndexValidity(index);
T element = this.data[this.count - 1 - index];
return element;
}
//O(n) Complexity
@Override
public void setElement(int index, T element) {
checkIndexValidity(index);
this.data[this.count - 1 - index] = element;
}
//O(n) Complexity
@Override
public boolean contains(T value) {
for (int i = 0; i < this.count; i++) {
if (this.data[i].equals(value)) {
return true;
}
}
return false;
}
private void checkIndexValidity(int index) {
if (index < 0 || index > this.count) {
throw new IndexOutOfBoundsException(INDEX_OUT_OF_BOUNDS);
}
}
private void resize() {
T[] resizedArray;
resizedArray = Arrays.copyOf(this.data, this.data.length * RESIZE_ARRAY_MULTIPLIER);
this.data = resizedArray;
}
@Override
public Iterator<T> getIterator() {
return new MyReversedArrayListIterator();
}
private class MyReversedArrayListIterator implements Iterator<T> {
private int count;
@Override
public boolean hasNext() {
return this.count < data.length;
}
@Override
public T next() {
return data[data.length - 1 - count++];
}
}
}
|
[
"yavoryankov83@gmail.com"
] |
yavoryankov83@gmail.com
|
aa13bd65b75fe03ea16b0701dcb124fa0a7739cf
|
8169406d0b57b39bda13941fad9e0f8f5ddd7307
|
/spring-09/src/main/java/ru/otus/spring/homework/spring09/repositories/AuthorRepository.java
|
f8c04322109544302f7ec738968c04954e66310a
|
[] |
no_license
|
DimsonK/2020-11-otus-spring-konovalov
|
0b2ed6aba988756d28601daea60a61d2a69e9a95
|
46b368d0ab255a8f822e44b42dd862f1add1708e
|
refs/heads/main
| 2023-06-09T14:38:39.391631
| 2023-05-26T14:38:31
| 2023-05-26T14:38:31
| 315,385,944
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 256
|
java
|
package ru.otus.spring.homework.spring09.repositories;
import org.springframework.data.jpa.repository.JpaRepository;
import ru.otus.spring.homework.spring09.models.entity.Author;
public interface AuthorRepository extends JpaRepository<Author, Long> {
}
|
[
"dimsonk@gmail.com"
] |
dimsonk@gmail.com
|
bfc5657ce8aba2927cbcdc27d1a82de8ce42545c
|
b05a22bea18ef90a6dd33326b1dab3be4eac180c
|
/07_CommandPattern/src/command/exemploDerekBanas/DesligarTodos.java
|
bd59d9b9a75f8ffaf44d06bfbe12f482fc54f735
|
[] |
no_license
|
edneyRoldao/DesignPatternComJava
|
9ceee3d95312bb09d923baba0617055ec088616e
|
ea6893c639cd8e46aee2046c3228abc9d85320f8
|
refs/heads/master
| 2020-04-05T23:08:43.550964
| 2019-12-16T13:10:39
| 2019-12-16T13:10:39
| 56,338,161
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 538
|
java
|
package command.exemploDerekBanas;
import java.util.List;
public class DesligarTodos implements Command {
List<DispositivoEletronico> dispositivos;
public DesligarTodos(List<DispositivoEletronico> dispositivo) {
this.dispositivos = dispositivo;
}
@Override
public void executar() {
for(DispositivoEletronico dispositivo : dispositivos) {
dispositivo.desligar();
}
}
@Override
public void desfazerComando() {
for(DispositivoEletronico dispositivo : dispositivos) {
dispositivo.ligar();
}
}
}
|
[
"edneyroldao@gmail.com"
] |
edneyroldao@gmail.com
|
c15eddd53de32f6e9b5dcff8fa1162150b44721b
|
4645f0902adad06800f349d83790fa8563cf4de0
|
/intarsys-tools-runtime/src/main/java/de/intarsys/tools/locking/NullLockStrategy.java
|
3fe11c60b909ff76d4d5673c7b9612ad7019d597
|
[
"BSD-3-Clause"
] |
permissive
|
intarsys/runtime
|
51436fd883c1021238572a1967a1ca99177946a7
|
00afced0b6629dbdda4463e4b440ec962225b4ec
|
refs/heads/master
| 2023-09-03T02:50:13.190773
| 2023-07-25T12:52:50
| 2023-08-23T13:41:40
| 11,248,689
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,865
|
java
|
/*
* Copyright (c) 2007, intarsys GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of intarsys nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package de.intarsys.tools.locking;
public class NullLockStrategy extends AbstractLockStrategy {
public NullLockStrategy() {
super();
}
@Override
public boolean lock(Object object, Object owner, ILockLevel level) {
return true;
}
@Override
public void unlock(Object object, Object owner) {
// do nothing
}
}
|
[
"eheck@intarsys.de"
] |
eheck@intarsys.de
|
d6642dc274a99b0b8c9f454e20580ecda92ba581
|
28c571e43c5bf87cc71e23482b32922f71cc2bb8
|
/plugins/wintab/src/main/java/net/java/games/input/WinTabButtonComponent.java
|
a82ae197e5628e729869180e5473ab465040a145
|
[] |
no_license
|
dmssargent/jinput
|
0b31eef42f482d34ea3595a209c1308cfca617b5
|
fea8f07a710eb176d78d40f91f9661ec418894d7
|
refs/heads/master
| 2021-01-12T20:50:06.094400
| 2016-12-28T04:21:33
| 2016-12-28T04:21:33
| 47,902,344
| 1
| 0
| null | 2015-12-13T02:01:50
| 2015-12-13T02:01:50
| null |
UTF-8
|
Java
| false
| false
| 2,233
|
java
|
/**
* Copyright (C) 2006 Jeremy Booth (jeremy@newdawnsoftware.com)
* <p>
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* <p>
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. Redistributions in binary
* form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided
* with the distribution.
* The name of the author may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* <p>
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
*/
package net.java.games.input;
public class WinTabButtonComponent extends WinTabComponent {
private final int index;
WinTabButtonComponent(WinTabContext context, int parentDevice, String name, Identifier id, int index) {
super(context, parentDevice, name, id);
this.index = index;
}
public Event processPacket(WinTabPacket packet) {
Event newEvent;
float newValue = ((packet.PK_BUTTONS & (int) Math.pow(2, index)) > 0) ? 1.0f : 0.0f;
if (newValue != getPollData()) {
lastKnownValue = newValue;
//Generate an event
newEvent = new Event();
newEvent.set(this, newValue, packet.PK_TIME * 1000);
return newEvent;
}
return null;
}
}
|
[
"dmssargent@yahoo.com"
] |
dmssargent@yahoo.com
|
5504763d649e2408c859ce94be3e816dc83d96c2
|
5cd25410acdf20a93955a86a47b8e1de3e6a1b59
|
/app/src/main/java/com/example/webprog26/guitarchords/guitar_chords_engine/helpers/FretNumbersTransformHelper.java
|
60a592025d5a9ade6f45ba954221e46b20d175f8
|
[] |
no_license
|
webprog26/Guitar-Chords
|
6de460970e290f12d205364bd2966f97af34b907
|
27b08d0009debdbfc841cf01ef014c2403acdb78
|
refs/heads/master
| 2021-01-20T15:32:02.829577
| 2017-05-30T10:05:12
| 2017-05-30T10:05:12
| 90,784,349
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,524
|
java
|
package com.example.webprog26.guitarchords.guitar_chords_engine.helpers;
/**
* Created by webpr on 25.05.2017.
*/
public class FretNumbersTransformHelper {
private static final String FRET_1 = "I";
private static final String FRET_2 = "II";
private static final String FRET_3 = "III";
private static final String FRET_4 = "IV";
private static final String FRET_5 = "V";
private static final String FRET_6 = "VI";
private static final String FRET_7 = "VII";
private static final String FRET_8 = "VIII";
private static final String FRET_9 = "IX";
private static final String FRET_10 = "X";
private static final String FRET_11 = "XI";
private static final String FRET_12 = "XII";
public static String getFretToStartString(int startFretPosition){
switch (startFretPosition){
case 1:
return FRET_1;
case 2:
return FRET_2;
case 3:
return FRET_3;
case 4:
return FRET_4;
case 5:
return FRET_5;
case 6:
return FRET_6;
case 7:
return FRET_7;
case 8:
return FRET_8;
case 9:
return FRET_9;
case 10:
return FRET_10;
case 11:
return FRET_11;
case 12:
return FRET_12;
default:
return null;
}
}
}
|
[
"webprog26@gmail.com"
] |
webprog26@gmail.com
|
9a26886aa5fe859c0e286e0f532e6f3d7b3b2c44
|
b00c54389a95d81a22e361fa9f8bdf5a2edc93e3
|
/frameworks/support/v4/java/android/support/v4/view/ViewConfigurationCompat.java
|
86d19bbc736849d3ddbc936b2c854bbe129541d7
|
[] |
no_license
|
mirek190/x86-android-5.0
|
9d1756fa7ff2f423887aa22694bd737eb634ef23
|
eb1029956682072bb7404192a80214189f0dc73b
|
refs/heads/master
| 2020-05-27T01:09:51.830208
| 2015-10-07T22:47:36
| 2015-10-07T22:47:36
| 41,942,802
| 15
| 20
| null | 2020-03-09T00:21:03
| 2015-09-05T00:11:19
| null |
UTF-8
|
Java
| false
| false
| 4,055
|
java
|
/*
* Copyright (C) 2011 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 android.support.v4.view;
import android.view.ViewConfiguration;
/**
* Helper for accessing features in {@link ViewConfiguration}
* introduced after API level 4 in a backwards compatible fashion.
*/
public class ViewConfigurationCompat {
/**
* Interface for the full API.
*/
interface ViewConfigurationVersionImpl {
public int getScaledPagingTouchSlop(ViewConfiguration config);
public boolean hasPermanentMenuKey(ViewConfiguration config);
}
/**
* Interface implementation that doesn't use anything about v4 APIs.
*/
static class BaseViewConfigurationVersionImpl implements ViewConfigurationVersionImpl {
@Override
public int getScaledPagingTouchSlop(ViewConfiguration config) {
return config.getScaledTouchSlop();
}
@Override
public boolean hasPermanentMenuKey(ViewConfiguration config) {
// Pre-HC devices will always have a menu button
return true;
}
}
/**
* Interface implementation for devices with at least v8 APIs.
*/
static class FroyoViewConfigurationVersionImpl extends BaseViewConfigurationVersionImpl {
@Override
public int getScaledPagingTouchSlop(ViewConfiguration config) {
return ViewConfigurationCompatFroyo.getScaledPagingTouchSlop(config);
}
}
/**
* Interface implementation for devices with at least v11 APIs.
*/
static class HoneycombViewConfigurationVersionImpl extends FroyoViewConfigurationVersionImpl {
@Override
public boolean hasPermanentMenuKey(ViewConfiguration config) {
// There is no way to check on Honeycomb so we assume false
return false;
}
}
/**
* Interface implementation for devices with at least v14 APIs.
*/
static class IcsViewConfigurationVersionImpl extends HoneycombViewConfigurationVersionImpl {
@Override
public boolean hasPermanentMenuKey(ViewConfiguration config) {
return ViewConfigurationCompatICS.hasPermanentMenuKey(config);
}
}
/**
* Select the correct implementation to use for the current platform.
*/
static final ViewConfigurationVersionImpl IMPL;
static {
if (android.os.Build.VERSION.SDK_INT >= 14) {
IMPL = new IcsViewConfigurationVersionImpl();
} else if (android.os.Build.VERSION.SDK_INT >= 11) {
IMPL = new HoneycombViewConfigurationVersionImpl();
} else if (android.os.Build.VERSION.SDK_INT >= 8) {
IMPL = new FroyoViewConfigurationVersionImpl();
} else {
IMPL = new BaseViewConfigurationVersionImpl();
}
}
// -------------------------------------------------------------------
/**
* Call {@link ViewConfiguration#getScaledPagingTouchSlop()}.
* If running on a pre-{@link android.os.Build.VERSION_CODES#FROYO} device,
* returns {@link ViewConfiguration#getScaledTouchSlop()}.
*/
public static int getScaledPagingTouchSlop(ViewConfiguration config) {
return IMPL.getScaledPagingTouchSlop(config);
}
/**
* Report if the device has a permanent menu key available to the user, in a backwards
* compatible way.
*/
public static boolean hasPermanentMenuKey(ViewConfiguration config) {
return IMPL.hasPermanentMenuKey(config);
}
}
|
[
"mirek190@gmail.com"
] |
mirek190@gmail.com
|
fd806a462550ec612423f5a0b06814d95c9fddfb
|
1ed0e7930d6027aa893e1ecd4c5bba79484b7c95
|
/keiji/source/java/com/applovin/impl/sdk/a.java
|
cc6724c446760b711df57ccb087f1579a57e9192
|
[] |
no_license
|
AnKoushinist/hikaru-bottakuri-slot
|
36f1821e355a76865057a81221ce2c6f873f04e5
|
7ed60c6d53086243002785538076478c82616802
|
refs/heads/master
| 2021-01-20T05:47:00.966573
| 2017-08-26T06:58:25
| 2017-08-26T06:58:25
| 101,468,394
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,820
|
java
|
package com.applovin.impl.sdk;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import java.util.HashMap;
import java.util.Map;
import org.cocos2dx.lib.BuildConfig;
class a {
private static final Object a = new Object();
private static final Map b = new HashMap();
static Map a(AppLovinSdkImpl appLovinSdkImpl) {
Map c;
synchronized (a) {
appLovinSdkImpl.h().a("AdDataCache", "Reading cached device data...");
c = c(appLovinSdkImpl);
}
return c;
}
private static void a(String str, Map map) {
String[] split = str.split("=");
if (split.length == 2) {
map.put(split[0], split[1]);
}
}
static void a(Map map, AppLovinSdkImpl appLovinSdkImpl) {
b(map, appLovinSdkImpl);
}
static void b(AppLovinSdkImpl appLovinSdkImpl) {
synchronized (a) {
appLovinSdkImpl.h().a("AdDataCache", "Clearing old device data cache...");
a(new HashMap(0), appLovinSdkImpl);
}
}
private static void b(Map map, AppLovinSdkImpl appLovinSdkImpl) {
if (map == null) {
throw new IllegalArgumentException("No ad aata specified");
} else if (appLovinSdkImpl == null) {
throw new IllegalArgumentException("No sdk specified");
} else {
try {
synchronized (b) {
Map map2 = (Map) b.get("ad_data_cache");
if (map2 == null) {
map2 = new HashMap();
}
map2.clear();
map2.putAll(map);
b.put("ad_data_cache", map2);
}
Editor edit = appLovinSdkImpl.i().a().edit();
edit.putString("ad_data_cache", dm.a(map));
edit.commit();
appLovinSdkImpl.h().a("AdDataCache", map.size() + " " + "ad_data_cache" + " entries saved in cache");
} catch (Throwable e) {
appLovinSdkImpl.h().b("AdDataCache", "Unable to save ad data entries", e);
}
}
}
private static Map c(AppLovinSdkImpl appLovinSdkImpl) {
Map map;
Map hashMap;
Throwable e;
synchronized (b) {
map = (Map) b.get("ad_data_cache");
}
if (map == null) {
SharedPreferences a = appLovinSdkImpl.i().a();
String string = a.getString("ad_data_cache", BuildConfig.FLAVOR);
if (string != null && string.length() > 0) {
try {
hashMap = new HashMap();
try {
for (String a2 : string.split("&")) {
a(a2, hashMap);
}
synchronized (b) {
b.put("ad_data_cache", hashMap);
}
appLovinSdkImpl.h().a("AdDataCache", hashMap.size() + " " + "ad_data_cache" + " entries loaded from cache");
} catch (Exception e2) {
e = e2;
}
} catch (Throwable e3) {
Throwable th = e3;
hashMap = map;
e = th;
appLovinSdkImpl.h().b("AdDataCache", "Unable to load ad data", e);
Editor edit = a.edit();
edit.putString("ad_data_cache", BuildConfig.FLAVOR);
edit.commit();
return hashMap != null ? new HashMap(hashMap) : new HashMap();
}
if (hashMap != null) {
}
}
}
hashMap = map;
if (hashMap != null) {
}
}
}
|
[
"09f713c@sigaint.org"
] |
09f713c@sigaint.org
|
43e2528aa01678068bbcf659cff1d60305a9e182
|
fb70bb896f1a0772872aceff5d253bb317d959eb
|
/app/src/main/java/com/example/davis/aspectdemo/AopPoint.java
|
cd0133eefc22808777e46e644236d814f1a4bd62
|
[] |
no_license
|
xusoku/AspectJ
|
264d7f74c46ba149c2cb793f38070f27d7b700bf
|
2f8fe272e8370c6b9cd56ca421e18bb9ae4145ca
|
refs/heads/master
| 2020-05-07T00:55:27.236627
| 2019-04-15T03:10:24
| 2019-04-15T03:10:24
| 180,250,419
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 388
|
java
|
package com.example.davis.aspectdemo;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Created by xushengfu on 2019/4/11.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface AopPoint {
String value();
int type() default 0;
}
|
[
"286636562@qq.com"
] |
286636562@qq.com
|
4d7f365dc2c21478a3e45423656e3d8e88710457
|
799cce351010ca320625a651fb2e5334611d2ebf
|
/Data Set/Synthetic/After/after_2769.java
|
2658ed7cd8b9047514a5f709517f1acd80257d39
|
[] |
no_license
|
dareenkf/SQLIFIX
|
239be5e32983e5607787297d334e5a036620e8af
|
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
|
refs/heads/main
| 2023-01-29T06:44:46.737157
| 2020-11-09T18:14:24
| 2020-11-09T18:14:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 270
|
java
|
public class Dummy {
void sendRequest(Connection conn) throws SQLException {
String sql = "UPDATE EMPLOYEES SET SALARY = SALARY * 1.15 WHERE EMPLOYEE_ID = ?";
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setObject(1 , Id);
stmt.executeUpdate();
}
}
|
[
"jahin99@gmail.com"
] |
jahin99@gmail.com
|
ee694d297079192114709ca71147aae67c7c4211
|
20eee295e454b194159b49bf8d7124d5e8f8a5fd
|
/android/src/de/appwerft/linkedin/ExampleProxy.java
|
c34e3f0fa49d13427e1d139b270cec2e9abe396d
|
[] |
no_license
|
aaloul/Ti.LinkedIn
|
20ec5f5f0b6e0dd5555d0ec23356de4f0b6b8342
|
06b46bbf6f7ca2acdac7239e92396d81061b5c51
|
refs/heads/master
| 2021-06-04T20:09:22.375000
| 2016-06-13T13:30:13
| 2016-06-13T13:30:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,879
|
java
|
/**
* This file was auto-generated by the Titanium Module SDK helper for Android
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
*/
package de.appwerft.linkedin;
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.KrollProxy;
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.TiC;
import org.appcelerator.titanium.util.Log;
import org.appcelerator.titanium.util.TiConfig;
import org.appcelerator.titanium.util.TiConvert;
import org.appcelerator.titanium.proxy.TiViewProxy;
import org.appcelerator.titanium.view.TiCompositeLayout;
import org.appcelerator.titanium.view.TiCompositeLayout.LayoutArrangement;
import org.appcelerator.titanium.view.TiUIView;
import android.app.Activity;
// This proxy can be created by calling Tilinkedin.createExample({message: "hello world"})
@Kroll.proxy(creatableInModule=TilinkedinModule.class)
public class ExampleProxy extends TiViewProxy
{
// Standard Debugging variables
private static final String LCAT = "ExampleProxy";
private static final boolean DBG = TiConfig.LOGD;
private class ExampleView extends TiUIView
{
public ExampleView(TiViewProxy proxy) {
super(proxy);
LayoutArrangement arrangement = LayoutArrangement.DEFAULT;
if (proxy.hasProperty(TiC.PROPERTY_LAYOUT)) {
String layoutProperty = TiConvert.toString(proxy.getProperty(TiC.PROPERTY_LAYOUT));
if (layoutProperty.equals(TiC.LAYOUT_HORIZONTAL)) {
arrangement = LayoutArrangement.HORIZONTAL;
} else if (layoutProperty.equals(TiC.LAYOUT_VERTICAL)) {
arrangement = LayoutArrangement.VERTICAL;
}
}
setNativeView(new TiCompositeLayout(proxy.getActivity(), arrangement));
}
@Override
public void processProperties(KrollDict d)
{
super.processProperties(d);
}
}
// Constructor
public ExampleProxy()
{
super();
}
@Override
public TiUIView createView(Activity activity)
{
TiUIView view = new ExampleView(this);
view.getLayoutParams().autoFillsHeight = true;
view.getLayoutParams().autoFillsWidth = true;
return view;
}
// Handle creation options
@Override
public void handleCreationDict(KrollDict options)
{
super.handleCreationDict(options);
if (options.containsKey("message")) {
Log.d(LCAT, "example created with message: " + options.get("message"));
}
}
// Methods
@Kroll.method
public void printMessage(String message)
{
Log.d(LCAT, "printing message: " + message);
}
@Kroll.getProperty @Kroll.method
public String getMessage()
{
return "Hello World from my module";
}
@Kroll.setProperty @Kroll.method
public void setMessage(String message)
{
Log.d(LCAT, "Tried setting module message to: " + message);
}
}
|
[
"“rs@hamburger-appwerft.de“"
] |
“rs@hamburger-appwerft.de“
|
e0f4e02390b46af1530dd57dcf2b227902d874fe
|
522c4abef6c0410d52dd5b8433bf4487d46c1c25
|
/efamily-common/src/main/java/com/winterframework/efamily/service/impl/EfComResourceAssistServiceImpl.java
|
56d7db4b6e3ace7cabf46ca47007904a5592fea5
|
[] |
no_license
|
xjiafei/efamily
|
05b1c71e1f7f485132e5d6243e7af7208b567517
|
0401d6ec572c7959721c294408f6d525e3d12866
|
refs/heads/master
| 2020-03-10T11:42:00.359799
| 2018-04-13T08:13:58
| 2018-04-13T08:13:58
| 129,361,914
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 916
|
java
|
package com.winterframework.efamily.service.impl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.winterframework.efamily.core.base.BaseServiceImpl;
import com.winterframework.efamily.dao.IEfComResourceAssistDao;
import com.winterframework.efamily.entity.EfResourceAssist;
import com.winterframework.efamily.service.IEfComResourceAssistService;
@Service("efComResourceAssistServiceImpl")
@Transactional(rollbackFor = Exception.class)
public class EfComResourceAssistServiceImpl extends BaseServiceImpl<IEfComResourceAssistDao,EfResourceAssist> implements IEfComResourceAssistService {
@Resource(name="efComResourceAssistDaoImpl")
private IEfComResourceAssistDao efComResourceAssistDaoImpl;
@Override
protected IEfComResourceAssistDao getEntityDao() {
return efComResourceAssistDaoImpl;
}
}
|
[
"xjiafei126@126.com"
] |
xjiafei126@126.com
|
f8f83fcdacee18167089e366f8ff736a775ef8ed
|
2debba6c9584cc682179c0d51c014523ec41765b
|
/services/dynamodb/src/test/java/software/amazon/awssdk/services/dynamodb/mapper/IndexRangeKeyClass.java
|
061c5b4d0fdcf051298561c121b5c2b04240fab3
|
[
"Apache-2.0"
] |
permissive
|
pdcqjw/aws-sdk-java-v2
|
23e976b238fc86a33cc50e7d8f56b11c1a67a0db
|
076ac89810aeb7e2ce79610a6861b7f283a9cbe0
|
refs/heads/master
| 2021-01-02T09:05:05.859205
| 2017-07-28T17:49:11
| 2017-07-28T18:00:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,256
|
java
|
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 software.amazon.awssdk.services.dynamodb.mapper;
import software.amazon.awssdk.services.dynamodb.datamodeling.DynamoDbAttribute;
import software.amazon.awssdk.services.dynamodb.datamodeling.DynamoDbHashKey;
import software.amazon.awssdk.services.dynamodb.datamodeling.DynamoDbIndexRangeKey;
import software.amazon.awssdk.services.dynamodb.datamodeling.DynamoDbRangeKey;
import software.amazon.awssdk.services.dynamodb.datamodeling.DynamoDbTable;
import software.amazon.awssdk.services.dynamodb.datamodeling.DynamoDbVersionAttribute;
/**
* Comprehensive domain class
*/
@DynamoDbTable(tableName = "aws-java-sdk-index-range-test")
public class IndexRangeKeyClass {
private long key;
private double rangeKey;
private Double indexFooRangeKey;
private Double indexBarRangeKey;
private Double multipleIndexRangeKey;
private Long version;
private String fooAttribute;
private String barAttribute;
@DynamoDbHashKey
public long getKey() {
return key;
}
public void setKey(long key) {
this.key = key;
}
@DynamoDbRangeKey
public double getRangeKey() {
return rangeKey;
}
public void setRangeKey(double rangeKey) {
this.rangeKey = rangeKey;
}
@DynamoDbIndexRangeKey(
localSecondaryIndexName = "index_foo",
attributeName = "indexFooRangeKey"
)
public Double getIndexFooRangeKeyWithFakeName() {
return indexFooRangeKey;
}
public void setIndexFooRangeKeyWithFakeName(Double indexFooRangeKey) {
this.indexFooRangeKey = indexFooRangeKey;
}
@DynamoDbIndexRangeKey(
localSecondaryIndexName = "index_bar"
)
public Double getIndexBarRangeKey() {
return indexBarRangeKey;
}
public void setIndexBarRangeKey(Double indexBarRangeKey) {
this.indexBarRangeKey = indexBarRangeKey;
}
@DynamoDbIndexRangeKey(
localSecondaryIndexNames = {"index_foo_copy", "index_bar_copy"}
)
public Double getMultipleIndexRangeKey() {
return multipleIndexRangeKey;
}
public void setMultipleIndexRangeKey(Double multipleIndexRangeKey) {
this.multipleIndexRangeKey = multipleIndexRangeKey;
}
@DynamoDbAttribute
public String getFooAttribute() {
return fooAttribute;
}
public void setFooAttribute(String fooAttribute) {
this.fooAttribute = fooAttribute;
}
@DynamoDbAttribute
public String getBarAttribute() {
return barAttribute;
}
public void setBarAttribute(String barAttribute) {
this.barAttribute = barAttribute;
}
@DynamoDbVersionAttribute
public Long getVersion() {
return version;
}
public void setVersion(Long version) {
this.version = version;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((fooAttribute == null) ? 0 : fooAttribute.hashCode());
result = prime * result + ((barAttribute == null) ? 0 : barAttribute.hashCode());
result = prime * result + (int) (key ^ (key >>> 32));
long temp;
temp = Double.doubleToLongBits(rangeKey);
result = prime * result + (int) (temp ^ (temp >>> 32));
temp = Double.doubleToLongBits(indexFooRangeKey);
result = prime * result + (int) (temp ^ (temp >>> 32));
temp = Double.doubleToLongBits(indexBarRangeKey);
result = prime * result + (int) (temp ^ (temp >>> 32));
result = prime * result + ((version == null) ? 0 : version.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
IndexRangeKeyClass other = (IndexRangeKeyClass) obj;
if (fooAttribute == null) {
if (other.fooAttribute != null) {
return false;
}
} else if (!fooAttribute.equals(other.fooAttribute)) {
return false;
}
if (barAttribute == null) {
if (other.barAttribute != null) {
return false;
}
} else if (!barAttribute.equals(other.barAttribute)) {
return false;
}
if (key != other.key) {
return false;
}
if (Double.doubleToLongBits(rangeKey) != Double.doubleToLongBits(other.rangeKey)) {
return false;
}
if (Double.doubleToLongBits(indexFooRangeKey) != Double.doubleToLongBits(other.indexFooRangeKey)) {
return false;
}
if (Double.doubleToLongBits(indexBarRangeKey) != Double.doubleToLongBits(other.indexBarRangeKey)) {
return false;
}
if (version == null) {
if (other.version != null) {
return false;
}
} else if (!version.equals(other.version)) {
return false;
}
return true;
}
@Override
public String toString() {
return "IndexRangeKeyClass [key=" + key + ", rangeKey=" + rangeKey + ", version=" + version
+ ", indexFooRangeKey=" + indexFooRangeKey + ", indexBarRangeKey=" + indexBarRangeKey
+ ", fooAttribute=" + fooAttribute + ", barAttribute=" + barAttribute + "]";
}
}
|
[
"millem@amazon.com"
] |
millem@amazon.com
|
990817868d6631245af03e4e8c7c23b154aab752
|
d5b4fd426a078526a730e4083c4af73faf79bedb
|
/4GHot/app/src/main/java/com/doit/net/utils/MyCommonDialog.java
|
e6f02bc470935ba86b8bbb9b15e18f78529dc9c4
|
[] |
no_license
|
libin1993/hongkong
|
7d38b06d901ee9201722048c622618f591924aa1
|
36adda5ae0ddcd45ea16fc606445d92eff2209d9
|
refs/heads/master
| 2023-03-21T17:46:25.220984
| 2021-03-05T09:08:36
| 2021-03-05T09:08:36
| 335,867,470
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,827
|
java
|
package com.doit.net.utils;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.widget.TextView;
import com.doit.net.ucsi.R;
import java.lang.reflect.Field;
/**
* Created by Zxc on 2019/12/26.
*/
public class MyCommonDialog {
private Context context;
// AlertDialog dialog;
AlertDialog.Builder dialogBuiler;
private int defaultTextColor;
private int defaultButonTextColor;
private String title = "未定义";
private String content = "未定义";
private CharSequence[] items;
DialogInterface.OnClickListener itemsListener;
private DialogInterface.OnClickListener negativeListener = null;
private String negativeText;
private DialogInterface.OnClickListener postiveListener = null;
private String postiveText;
public MyCommonDialog(Context context) {
this.context = context;
dialogBuiler = new AlertDialog.Builder(context, R.style.MyDialogBkg);//背景颜色固定
defaultButonTextColor = context.getResources().getColor(R.color.darkorange);
defaultTextColor = context.getResources().getColor(R.color.white);
}
public void setItems(CharSequence[] items, DialogInterface.OnClickListener listener){
//dialog.setItems(items, null);
this.items = items;
this.itemsListener = listener;
}
public void setTitle(String title){
this.title = title;
}
public void setContent(String content){
this.content = content;
}
public void showDialog(){
if (items.length != 0){
dialogBuiler.setItems(items, null);
}else{
dialogBuiler.setMessage(content);
}
dialogBuiler.setTitle(title);
dialogBuiler.setNegativeButton(negativeText, negativeListener);
dialogBuiler.setPositiveButton(postiveText, postiveListener);
AlertDialog dialog = dialogBuiler.create();
dialog.show();
dialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(defaultButonTextColor);
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(defaultButonTextColor);
dialog.getButton(DialogInterface.BUTTON_NEGATIVE).setTextColor(defaultButonTextColor);
//设置标题颜色
try {
Field mAlert = AlertDialog.class.getDeclaredField("mAlert");
mAlert.setAccessible(true);
Object alertController = mAlert.get(dialog);
Field mTitleView = alertController.getClass().getDeclaredField("mTitleView");
mTitleView.setAccessible(true);
TextView title = (TextView) mTitleView.get(alertController);
title.setTextColor(defaultTextColor);
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
e.printStackTrace();
}
//设置内容文字颜色
try {
Field mAlert = AlertDialog.class.getDeclaredField("mAlert");
mAlert.setAccessible(true);
Object mAlertController = mAlert.get(dialog);
Field mMessage = mAlertController.getClass().getDeclaredField("mMessageView");
mMessage.setAccessible(true);
TextView mMessageView = (TextView) mMessage.get(mAlertController);
mMessageView.setTextColor(defaultTextColor);
} catch (IllegalAccessException | NoSuchFieldException e) {
e.printStackTrace();
}
}
public void setNegativeButton(String buttonText, DialogInterface.OnClickListener listener) {
negativeListener = listener;
negativeText = buttonText;
}
public void setPostiveButton(String buttonText, DialogInterface.OnClickListener listener) {
postiveListener = listener;
postiveText = buttonText;
}
}
|
[
"1993911441@qq.com"
] |
1993911441@qq.com
|
661bd60524f62278265757c8b69ee43dff6a1ee0
|
0fb7a2ed774983f2ac12c8403b6269808219e9bc
|
/yikatong-core/src/main/java/com/alipay/api/domain/MybankCreditLoantradeLoanrelationQueryModel.java
|
db49add950bf3bdb48153e5a62e22a0034be7adf
|
[] |
no_license
|
zhangzh56/yikatong-parent
|
e605b4025c934fb4099d5c321faa3a48703f8ff7
|
47e8f627ba3471eff71f593189e82c6f08ceb1a3
|
refs/heads/master
| 2020-03-19T11:23:47.000077
| 2018-04-26T02:26:48
| 2018-04-26T02:26:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,979
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 查询客户的申贷记录
*
* @author auto create
* @since 1.0, 2016-12-22 21:53:37
*/
public class MybankCreditLoantradeLoanrelationQueryModel extends AlipayObject {
private static final long serialVersionUID = 4517122847286858856L;
/**
* 工商注册号或者身份证号码
*/
@ApiField("cert_no")
private String certNo;
/**
* 当客户为公司时,certtype是全国组织机构代码证书。当客户为个人时,是居民身份证
*/
@ApiField("cert_type")
private String certType;
/**
* 预留的扩展字段
*/
@ApiField("ext_params")
private String extParams;
/**
* 政策码
*/
@ApiField("loan_policy_code")
private String loanPolicyCode;
/**
* 当客户是公司时,entityname是公司名全称;当客户是个人时,entityname是姓名
*/
@ApiField("name")
private String name;
/**
* 产品码
*/
@ApiField("product_code")
private String productCode;
public String getCertNo() {
return this.certNo;
}
public void setCertNo(String certNo) {
this.certNo = certNo;
}
public String getCertType() {
return this.certType;
}
public void setCertType(String certType) {
this.certType = certType;
}
public String getExtParams() {
return this.extParams;
}
public void setExtParams(String extParams) {
this.extParams = extParams;
}
public String getLoanPolicyCode() {
return this.loanPolicyCode;
}
public void setLoanPolicyCode(String loanPolicyCode) {
this.loanPolicyCode = loanPolicyCode;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getProductCode() {
return this.productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
}
|
[
"xiangyu.zhang@foxmail.com"
] |
xiangyu.zhang@foxmail.com
|
c7dfc4450c2389751318213efafac41f397d5ee8
|
92e8732afbcf2672a9e852d399111234493129fe
|
/app/src/main/java/com/sty/ne/canvas/split/SplitView.java
|
77e4c28238ddbd12666b988cf93c1146ac94ea34
|
[] |
no_license
|
tianyalu/NeCanvasSplit
|
a306b3b731f73a8fc161890d60210883f8d6af82
|
1a701eca7bd68d0f48bd837c137e455c433575ce
|
refs/heads/master
| 2020-08-10T19:24:00.579628
| 2019-10-11T10:11:09
| 2019-10-11T10:11:09
| 214,404,949
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,472
|
java
|
package com.sty.ne.canvas.split;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.LinearInterpolator;
import java.util.ArrayList;
import java.util.List;
/**
* 粒子特效
* Created by tian on 2019/10/11.
*/
public class SplitView extends View {
private Paint mPaint;
private Bitmap mBitmap;
private float d = 3; //粒子直径
private List<Ball> mBalls = new ArrayList<>();
private ValueAnimator mAnimator;
public SplitView(Context context) {
this(context, null);
}
public SplitView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public SplitView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
private void init() {
mPaint = new Paint();
mBitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.pic);
for (int i = 0; i < mBitmap.getWidth(); i++) {
for (int j = 0; j < mBitmap.getHeight(); j++) {
Ball ball = new Ball();
ball.color = mBitmap.getPixel(i, j);
ball.x = i * d + d / 2;
ball.y = j * d + d / 2;
ball.r = d / 2;
//速度(-20, 20) //(底数,n次方) //向上取整
ball.vX = (float) (Math.pow(-1, Math.ceil(Math.random() * 1000)) * 20 * Math.random());
ball.vY = rangInt(-15, 35);
//加速度
ball.aX = 0;
ball.aY = 0.98f;
mBalls.add(ball);
}
}
mAnimator = ValueAnimator.ofFloat(0, 1);
mAnimator.setRepeatCount(-1); //重复运行
mAnimator.setDuration(2000); //动画执行时间
mAnimator.setInterpolator(new LinearInterpolator()); //线性插值器
mAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
updateBall();
invalidate();
}
});
}
private int rangInt(int i, int j) {
int max = Math.max(i, j);
int min = Math.min(i, j);
//在0到(max - min)范围内变化,取大于x的最小整数,再随机
return (int) (min + Math.ceil(Math.random() * (max - min)));
}
private void updateBall() {
//更新粒子的位置
for (Ball ball : mBalls) {
ball.x += ball.vX;
ball.y += ball.vY;
ball.vX += ball.aX;
ball.vY += ball.aY;
}
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.translate(400, 400);
for (Ball ball : mBalls) {
mPaint.setColor(ball.color);
canvas.drawCircle(ball.x, ball.y, ball.r, mPaint);
}
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if(event.getAction() == MotionEvent.ACTION_DOWN) {
//执行动画
mAnimator.start();
}
return super.onTouchEvent(event);
}
}
|
[
"styzf@qq.com"
] |
styzf@qq.com
|
7137ac597878113a363638fe9a9f070cbce68cf3
|
12563229bd1c69d26900d4a2ea34fe4c64c33b7e
|
/nan21.dnet.module.ad/nan21.dnet.module.ad.presenter/src/main/java/net/nan21/dnet/module/ad/impex/ds/converter/ImportJobItemDsConv.java
|
3d36e9bc884d5f622fea0e12304eadcf2cbef00e
|
[] |
no_license
|
nan21/nan21.dnet.modules
|
90b002c6847aa491c54bd38f163ba40a745a5060
|
83e5f02498db49e3d28f92bd8216fba5d186dd27
|
refs/heads/master
| 2023-03-15T16:22:57.059953
| 2012-08-01T07:36:57
| 2012-08-01T07:36:57
| 1,918,395
| 0
| 1
| null | 2012-07-24T03:23:00
| 2011-06-19T05:56:03
|
Java
|
UTF-8
|
Java
| false
| false
| 3,199
|
java
|
/*
* DNet eBusiness Suite
* Copyright: 2008-2012 Nan21 Electronics SRL. All rights reserved.
* Use is subject to license terms.
*/
package net.nan21.dnet.module.ad.impex.ds.converter;
import net.nan21.dnet.core.api.converter.IDsConverter;
import net.nan21.dnet.module.ad.impex.business.service.IImportJobService;
import net.nan21.dnet.module.ad.impex.business.service.IImportMapService;
import net.nan21.dnet.module.ad.impex.domain.entity.ImportJob;
import net.nan21.dnet.module.ad.impex.domain.entity.ImportMap;
import net.nan21.dnet.core.presenter.converter.AbstractDsConverter;
import net.nan21.dnet.module.ad.impex.ds.model.ImportJobItemDs;
import net.nan21.dnet.module.ad.impex.domain.entity.ImportJobItem;
public class ImportJobItemDsConv extends
AbstractDsConverter<ImportJobItemDs, ImportJobItem> implements
IDsConverter<ImportJobItemDs, ImportJobItem> {
@Override
protected void modelToEntityReferences(ImportJobItemDs ds, ImportJobItem e,
boolean isInsert) throws Exception {
if (ds.getJobId() != null) {
if (e.getJob() == null || !e.getJob().getId().equals(ds.getJobId())) {
e.setJob((ImportJob) this.em.find(ImportJob.class,
ds.getJobId()));
}
} else {
this.lookup_job_ImportJob(ds, e);
}
if (ds.getMapId() != null) {
if (e.getMap() == null || !e.getMap().getId().equals(ds.getMapId())) {
e.setMap((ImportMap) this.em.find(ImportMap.class,
ds.getMapId()));
}
} else {
this.lookup_map_ImportMap(ds, e);
}
}
protected void lookup_job_ImportJob(ImportJobItemDs ds, ImportJobItem e)
throws Exception {
if (ds.getJobName() != null && !ds.getJobName().equals("")) {
ImportJob x = null;
try {
x = ((IImportJobService) findEntityService(ImportJob.class))
.findByName(ds.getJobName());
} catch (javax.persistence.NoResultException exception) {
throw new Exception(
"Invalid value provided to find `ImportJob` reference: `jobName` = "
+ ds.getJobName() + " ");
}
e.setJob(x);
} else {
e.setJob(null);
}
}
protected void lookup_map_ImportMap(ImportJobItemDs ds, ImportJobItem e)
throws Exception {
if (ds.getMapName() != null && !ds.getMapName().equals("")) {
ImportMap x = null;
try {
x = ((IImportMapService) findEntityService(ImportMap.class))
.findByName(ds.getMapName());
} catch (javax.persistence.NoResultException exception) {
throw new Exception(
"Invalid value provided to find `ImportMap` reference: `mapName` = "
+ ds.getMapName() + " ");
}
e.setMap(x);
} else {
e.setMap(null);
}
}
}
|
[
"mathe_attila@yahoo.com"
] |
mathe_attila@yahoo.com
|
e0149e2fddcc66f74643370ddda79d6f655dfc7b
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava11/Foo895Test.java
|
6dce16ddd9dfd060a6c461fa07d88c8fd81af875
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package applicationModulepackageJava11;
import org.junit.Test;
public class Foo895Test {
@Test
public void testFoo0() {
new Foo895().foo0();
}
@Test
public void testFoo1() {
new Foo895().foo1();
}
@Test
public void testFoo2() {
new Foo895().foo2();
}
@Test
public void testFoo3() {
new Foo895().foo3();
}
@Test
public void testFoo4() {
new Foo895().foo4();
}
@Test
public void testFoo5() {
new Foo895().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
d09a51705be3c70e1bf39fe4fc4bd0eec752a43e
|
be050d75de3a8bfc33b5fa95bf70ee73ff652f5a
|
/weixin_fastweixin_test/src/main/java/com/weixin/fastweixin/message/MpNewsMsg.java
|
856be241209fb91fc8f24fb04dbfa3132a0d5301
|
[] |
no_license
|
yirentech/jun_weixin
|
43d6bb84eb2bd92e6f6c67342bad8f017a445f1a
|
8d4b48a4efc93f8399abeb7eb57141213e7d466f
|
refs/heads/master
| 2023-08-04T19:20:18.836148
| 2021-06-27T17:29:15
| 2021-06-27T17:29:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 487
|
java
|
package com.weixin.fastweixin.message;
/**
* 提交至微信的图文消息素材
*
* @author Lian
* @date 2016年4月12日
* @since 1.0
*/
public class MpNewsMsg extends BaseMsg {
private static final long serialVersionUID = 1L;
private String mediaId;
public MpNewsMsg() {
}
public MpNewsMsg(String mediaId) {
this.mediaId = mediaId;
}
public String getMediaId() {
return mediaId;
}
public void setMediaId(String mediaId) {
this.mediaId = mediaId;
}
}
|
[
"wujun728@hotmail.com"
] |
wujun728@hotmail.com
|
c6f8f228d71e992ba059b6ae674b5b2f486077fd
|
9e8517c09329d1180f587d6c1bda7ac79629392e
|
/ioke/src/main/java/cucumber/runtime/ioke/IokeBackend.java
|
0fae8318ae3cdc20732e19b4e2d415ed4201d6f7
|
[
"MIT"
] |
permissive
|
eivindingebrigtsen/cucumber-jvm
|
167f5f72184e6be04a591d926c16cdd98729b2e6
|
968c21ddcefbe58eb59e83b60cc8397cb48f5879
|
refs/heads/master
| 2021-01-18T04:10:33.940097
| 2011-10-26T00:13:58
| 2011-10-26T00:13:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,825
|
java
|
package cucumber.runtime.ioke;
import cucumber.resources.Consumer;
import cucumber.resources.Resource;
import cucumber.resources.Resources;
import cucumber.runtime.Backend;
import cucumber.runtime.CucumberException;
import cucumber.runtime.World;
import cucumber.table.Table;
import gherkin.formatter.model.Step;
import ioke.lang.IokeObject;
import ioke.lang.Message;
import ioke.lang.Runtime;
import ioke.lang.exceptions.ControlFlow;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class IokeBackend implements Backend {
private final Runtime ioke;
private final List<Runtime.RescueInfo> failureRescues;
private final List<Runtime.RescueInfo> pendingRescues;
private String currentLocation;
private World world;
public IokeBackend() {
try {
ioke = new Runtime();
ioke.init();
ioke.ground.setCell("IokeBackend", this);
ioke.evaluateString("use(\"cucumber/runtime/ioke/dsl\")");
failureRescues = createRescues("ISpec", "ExpectationNotMet");
pendingRescues = createRescues("Pending");
} catch (Throwable e) {
throw new CucumberException("Failed to initialize Ioke", e);
}
}
@Override
public void buildWorld(List<String> gluePaths, World world) {
this.world = world;
for (String gluePath : gluePaths) {
Resources.scan(gluePath.replace('.', '/'), ".ik", new Consumer() {
public void consume(Resource resource) {
try {
currentLocation = resource.getPath();
ioke.evaluateString("use(\"" + resource.getPath() + "\")");
} catch (ControlFlow controlFlow) {
throw new CucumberException("Failed to load " + resource.getPath(), controlFlow);
}
}
});
}
}
@Override
public void disposeWorld() {
}
@Override
public String getSnippet(Step step) {
return new IokeSnippetGenerator(step).getSnippet();
}
public void addStepDefinition(Object iokeStepDefObject) throws Throwable {
world.addStepDefinition(new IokeStepDefinition(this, ioke, (IokeObject) iokeStepDefObject, currentLocation));
}
private List<Runtime.RescueInfo> createRescues(String... names) throws ControlFlow {
IokeObject condition = IokeObject.as(IokeObject.getCellChain(ioke.condition,
ioke.message,
ioke.ground,
names), ioke.ground);
List<Runtime.RescueInfo> rescues = new ArrayList<Runtime.RescueInfo>();
IokeObject rr = IokeObject.as(((Message) IokeObject.data(ioke.mimic)).sendTo(ioke.mimic, ioke.ground, ioke.rescue), ioke.ground);
List<Object> conds = new ArrayList<Object>();
conds.add(condition);
rescues.add(new Runtime.RescueInfo(rr, conds, rescues, ioke.getBindIndex()));
return rescues;
}
void execute(IokeObject iokeStepDefObject, Object[] args) throws Throwable {
try {
ioke.registerRescues(failureRescues);
ioke.registerRescues(pendingRescues);
invoke(iokeStepDefObject, "invoke", multilineArg(args));
} catch (ControlFlow.Rescue e) {
// We may handle these differently in the future...
if (e.getRescue().token == pendingRescues) {
throw e;
} else if (e.getRescue().token == failureRescues) {
Message message = (Message) IokeObject.data(ioke.reportMessage);
String errorMessage = message.sendTo(ioke.reportMessage, ioke.ground, e.getCondition()).toString();
throw new AssertionError(errorMessage);
} else {
throw e;
}
} finally {
ioke.unregisterRescues(failureRescues);
ioke.unregisterRescues(pendingRescues);
}
}
private Object multilineArg(Object[] args) {
Object multilineArg;
if (args.length > 0) {
if (args[args.length - 1] instanceof String) {
multilineArg = ioke.newText((String) args[args.length - 1]);
} else if (args[args.length - 1] instanceof Table) {
multilineArg = args[args.length - 1];
} else {
multilineArg = ioke.nil;
}
} else {
multilineArg = ioke.nil;
}
return multilineArg;
}
Object invoke(IokeObject iokeStepDefObject, String message, Object... args) throws ControlFlow {
IokeObject msg = ioke.newMessage(message);
Message m = (Message) IokeObject.data(msg);
return m.sendTo(msg, iokeStepDefObject, iokeStepDefObject, Arrays.asList(args));
}
}
|
[
"aslak.hellesoy@gmail.com"
] |
aslak.hellesoy@gmail.com
|
180471a26d9c5610fae76415eaa247723eb850b7
|
b811fa7a15118a7cc7bc871c00c9d31a10f66780
|
/src/com/fight2/util/ArenaUtils.java
|
1248b5b4ef3b536dc1f1279a4884c3717aa8503c
|
[] |
no_license
|
lanseror/Fight2Server
|
512ec08d037f11ecb964d8995409442fc3593ec7
|
ee470fc61065685a5d3f2d7216d6bdca795b6a81
|
refs/heads/master
| 2020-04-16T08:43:30.419376
| 2015-03-04T10:30:06
| 2015-03-04T10:30:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,453
|
java
|
package com.fight2.util;
import java.util.Map;
import org.hibernate.SessionFactory;
import com.fight2.dao.ArenaDao;
import com.fight2.model.Arena;
import com.fight2.model.ArenaStatus;
import com.fight2.model.UserArenaInfo;
import com.fight2.service.ArenaService;
import com.google.common.collect.Maps;
public class ArenaUtils {
private static final Map<Integer, Integer> ENTERED_ARENA = Maps.newHashMap();
private static final Map<Integer, Map<Integer, UserArenaInfo>> ARENA_USERINFO = Maps.newHashMap();
public static void enter(final int arenaId, final int userId) {
ENTERED_ARENA.put(userId, arenaId);
}
public static int getEnteredArena(final int userId) {
return ENTERED_ARENA.get(userId);
}
public static UserArenaInfo getUserArenaInfo(final int arenaId, final int userId) {
if (!ARENA_USERINFO.containsKey(arenaId)) {
final Map<Integer, UserArenaInfo> userArenaInfoMap = Maps.newHashMap();
ARENA_USERINFO.put(arenaId, userArenaInfoMap);
}
final Map<Integer, UserArenaInfo> userArenaInfoMap = ARENA_USERINFO.get(arenaId);
if (!userArenaInfoMap.containsKey(userId)) {
final UserArenaInfo userArenaInfo = new UserArenaInfo();
userArenaInfoMap.put(userId, userArenaInfo);
}
return userArenaInfoMap.get(userId);
}
public static Runnable createStartSchedule(final int id, final ArenaDao arenaDao) {
final Runnable runnable = new Runnable() {
@Override
public void run() {
final SessionFactory sessionFactory = arenaDao.getSessionFactory();
HibernateUtils.openSession(sessionFactory);
final Arena arena = arenaDao.get(id);
if (arena != null && arena.getStatus() == ArenaStatus.Scheduled) {
arena.setStatus(ArenaStatus.Started);
arenaDao.update(arena);
}
HibernateUtils.closeSession(sessionFactory);
}
};
return runnable;
}
public static Runnable createStopSchedule(final int id, final ArenaService arenaService) {
final Runnable runnable = new Runnable() {
@Override
public void run() {
arenaService.stopArena(id);
}
};
return runnable;
}
}
|
[
"yecpster@gmail.com"
] |
yecpster@gmail.com
|
d27ff991947dc9e97674797cd446f6febbdc34d9
|
d74d0e5f1114c23831bfe4a9cee4bc3acbdfcedd
|
/src/main/java/com/lijie/pay/wechat/Article.java
|
d1e4d3ba2b06622519fc3df36069dc955da513c8
|
[] |
no_license
|
tianandli/pay
|
4d126871005d7e7ea57ab6daf23793323e21cbda
|
19cb7f0ac091c33adcb64ba21b688f4c664b026d
|
refs/heads/master
| 2023-06-07T01:22:58.172862
| 2021-07-02T00:48:36
| 2021-07-02T00:48:36
| 382,191,303
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,174
|
java
|
package com.lijie.pay.wechat;
/**
* @ClassName Article
* @Description 图文model
* @Author maguojun
* @Date 2019-07-0215:11
* @Version 1.0
**/
public class Article {
// 图文消息名称
private String Title;
// 图文消息描述
private String Description;
// 图片链接,支持JPG、PNG格式,较好的效果为大图640*320,小图80*80,限制图片链接的域名需要与开发者填写的基本资料中的Url一致
private String PicUrl;
// 点击图文消息跳转链接
private String Url;
public String getTitle() {
return Title;
}
public void setTitle(String title) {
Title = title;
}
public String getDescription() {
return null == Description ? "" : Description;
}
public void setDescription(String description) {
Description = description;
}
public String getPicUrl() {
return null == PicUrl ? "" : PicUrl;
}
public void setPicUrl(String picUrl) {
PicUrl = picUrl;
}
public String getUrl() {
return null == Url ? "" : Url;
}
public void setUrl(String url) {
Url = url;
}
}
|
[
"949620260@qq.com"
] |
949620260@qq.com
|
0657d50a12c0b6039553cb13eab1df87d72c51b1
|
a03ddb4111faca852088ea25738bc8b3657e7b5c
|
/TestTransit/src/jp/co/yahoo/android/common/hamburger/YHBGSearchActivity$1.java
|
c87f8585742aaae21649a7c3defe41971db3025f
|
[] |
no_license
|
randhika/TestMM
|
5f0de3aee77b45ca00f59cac227450e79abc801f
|
4278b34cfe421bcfb8c4e218981069a7d7505628
|
refs/heads/master
| 2020-12-26T20:48:28.446555
| 2014-09-29T14:37:51
| 2014-09-29T14:37:51
| 24,874,176
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,321
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package jp.co.yahoo.android.common.hamburger;
import android.text.Editable;
import android.view.View;
import android.widget.EditText;
import android.widget.ToggleButton;
// Referenced classes of package jp.co.yahoo.android.common.hamburger:
// YHBGSearchActivity
class this._cls0
implements android.view.er.YHBGSearchActivity._cls1
{
final YHBGSearchActivity this$0;
public void onClick(View view)
{
int i;
YHBGSearchActivity.access$0(YHBGSearchActivity.this).setChecked(false);
YHBGSearchActivity.access$1(YHBGSearchActivity.this).setChecked(false);
YHBGSearchActivity.access$2(YHBGSearchActivity.this).setChecked(false);
YHBGSearchActivity.access$3(YHBGSearchActivity.this).setChecked(false);
YHBGSearchActivity.access$4(YHBGSearchActivity.this).setChecked(false);
((ToggleButton)view).setChecked(true);
i = view.getId();
if (i != 0x7f090007) goto _L2; else goto _L1
_L1:
YHBGSearchActivity.access$5(YHBGSearchActivity.this, "http://search.yahoo.co.jp/search?");
_L4:
String s = YHBGSearchActivity.access$6(YHBGSearchActivity.this).getText().toString();
YHBGSearchActivity.access$6(YHBGSearchActivity.this).setText(s);
YHBGSearchActivity.access$6(YHBGSearchActivity.this).setSelection(s.length());
return;
_L2:
if (i == 0x7f090008)
{
YHBGSearchActivity.access$5(YHBGSearchActivity.this, "http://image.search.yahoo.co.jp/search?");
} else
if (i == 0x7f090009)
{
YHBGSearchActivity.access$5(YHBGSearchActivity.this, "http://video.search.yahoo.co.jp/search?");
} else
if (i == 0x7f09000a)
{
YHBGSearchActivity.access$5(YHBGSearchActivity.this, "http://chiebukuro.search.yahoo.co.jp/search?");
} else
if (i == 0x7f09000b)
{
YHBGSearchActivity.access$5(YHBGSearchActivity.this, "http://realtime.search.yahoo.co.jp/search?");
}
if (true) goto _L4; else goto _L3
_L3:
}
()
{
this$0 = YHBGSearchActivity.this;
super();
}
}
|
[
"metromancn@gmail.com"
] |
metromancn@gmail.com
|
61a4bf367e53603e4ec80107a652f14e9791f576
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/15/15_ac22e00a00a5e3b6aa62993235191b3cee0fb356/HTMLFileFolderNavigatorUI/15_ac22e00a00a5e3b6aa62993235191b3cee0fb356_HTMLFileFolderNavigatorUI_t.java
|
091474ad7df68691fb82ca07545fb51038736cb3
|
[] |
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
| 434
|
java
|
package htmlFileFolderNavigator;
import javax.swing.*;
import javax.swing.tree.DefaultTreeModel;
public class HTMLFileFolderNavigatorUI {
private JTree tree;
public HTMLFileFolderNavigatorUI(DefaultTreeModel treeNode) {
tree = new JTree(treeNode);
}
public JComponent getScrollableTree() {
return new JScrollPane(tree);
}
public JTree getTree() {
return tree;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a5ad1922fb185a011e5620c47131185ce8a0f404
|
9c4dd2c2e5255ac9a355aec335fbc914ee1e39c2
|
/JavaCore/Java util concurrent/src/executors/executorService/ExecutorService_InvokeAll.java
|
543d502cb87698d87d9459b6928b28f5c2739080
|
[] |
no_license
|
VAPortyanko/Learning
|
a8a79bc10b2eeb12c81f10198a0923e72d8002d4
|
23664bfe45eb12f717e3585eb7f84b729fa6397c
|
refs/heads/master
| 2022-07-16T10:45:39.259839
| 2021-11-28T17:56:17
| 2021-11-28T17:56:17
| 88,914,568
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 920
|
java
|
// https://tproger.ru/translations/java8-concurrency-tutorial-1/
package executors.executorService;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class ExecutorService_InvokeAll {
public static void main(String[] args) {
ExecutorService executor = Executors.newWorkStealingPool();
List<Callable<String>> callables = Arrays.asList(
() -> "task1",
() -> "task2",
() -> "task3");
try {
executor.invokeAll(callables)
.stream()
.map(future -> {
try {
return future.get();
}
catch (Exception e) {
throw new IllegalStateException(e);
}
})
.forEach(System.out::println);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
|
[
"PortyankoWork@gmail.com"
] |
PortyankoWork@gmail.com
|
d43b72267c17208195c54be31989d2e79570664a
|
29afc08d326dda219b6dccef4e74ae5ce3413672
|
/bootstrap/src/main/java/com/nuodb/migrator/bootstrap/Bootable.java
|
de6eceb37dd065086eba47dc859adcd5697f4637
|
[] |
no_license
|
treilly-nuodb/migration-tools
|
af91edcead1cfc52bf37fa11ab1e010f0356ad19
|
d17ca42257ba7ee344f74f32bd81b1be3ec048ec
|
refs/heads/master
| 2021-01-12T22:16:29.432569
| 2014-03-06T17:29:21
| 2014-03-06T17:29:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,787
|
java
|
/**
* Copyright (c) 2012, NuoDB, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of NuoDB, Inc. nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL NUODB, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.nuodb.migrator.bootstrap;
import com.nuodb.migrator.bootstrap.config.Config;
/**
* @author Sergey Bushik
*/
public interface Bootable {
void boot(Config config, String[] arguments) throws Exception;
}
|
[
"tazija@gmail.com"
] |
tazija@gmail.com
|
987716e472ee6a0f1501eab9c84cd68d736de485
|
d883f3b07e5a19ff8c6eb9c3a4b03d9f910f27b2
|
/Tools/OracleJavaGen/src/main/resources/oracle_service_project/OracleDataService/src/main/java/com/sandata/lab/rest/oracle/model/PostalCodeUnitedStatesPostalServiceTypeCode.java
|
8a7bdebf6e9cd4d8ede7097724a58f186a3554f2
|
[] |
no_license
|
dev0psunleashed/Sandata_SampleDemo
|
ec2c1f79988e129a21c6ddf376ac572485843b04
|
a1818601c59b04e505e45e33a36e98a27a69bc39
|
refs/heads/master
| 2021-01-25T12:31:30.026326
| 2017-02-20T11:49:37
| 2017-02-20T11:49:37
| 82,551,409
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,084
|
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: 2016.11.27 at 10:53:27 PM EST
//
package com.sandata.lab.rest.oracle.model;
import com.sandata.lab.data.model.*;
import com.google.gson.annotations.SerializedName;
import com.sandata.lab.data.model.base.BaseObject;
import com.sandata.lab.data.model.dl.annotation.Mapping;
import com.sandata.lab.data.model.dl.annotation.OracleMetadata;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for Postal_Code_United_States_Postal_Service_Type_Code.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="Postal_Code_United_States_Postal_Service_Type_Code">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <maxLength value="1"/>
* <enumeration value="S"/>
* <enumeration value="P"/>
* <enumeration value="U"/>
* <enumeration value="M"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "Postal_Code_United_States_Postal_Service_Type_Code")
@XmlEnum
public enum PostalCodeUnitedStatesPostalServiceTypeCode {
/**
* "Standard - A ""standard"" ZIP Code is what most people think of when they talk about ZIP Codes - essentially a town
*
*/
S,
/**
* city
*
*/
P,
/**
* or a division of a city that has mail service."
*
*/
U,
/**
* "PO Box Only - Rural towns, groups of towns, or even high-growth areas of cities are given a ""PO Box Only"" ZIP Code type."
*
*/
M;
public String value() {
return name();
}
public static PostalCodeUnitedStatesPostalServiceTypeCode fromValue(String v) {
return valueOf(v);
}
}
|
[
"pradeep.ganesh@softcrylic.co.in"
] |
pradeep.ganesh@softcrylic.co.in
|
f88b925092e85fa7c5afa88d20d1dec3a22272a2
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a027/A027571Test.java
|
55907257127cda3e6a66ee411517182d2c146e7e
|
[] |
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
| 255
|
java
|
package irvine.oeis.a027;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A027571Test extends AbstractSequenceTest {
@Override
protected int maxTerms() {
return 8;
}
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
5d6323270a312477378307437e2fde5dd5c8e778
|
8a38bc7a1061cfb01cd581da9958033ccbdee654
|
/dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/FileResourceUtils.java
|
d83117bad7b711df61634f2ac533cb6988d1b24e
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
abyot/eotcnor
|
e4432448c91ca8a761fcb3088ecb52d97d0931e5
|
7220fd9f830a7a718c1231aa383589986f6ac5b9
|
refs/heads/main
| 2022-11-05T14:48:38.028658
| 2022-10-28T10:07:33
| 2022-10-28T10:07:33
| 120,287,850
| 0
| 0
| null | 2018-02-05T11:02:05
| 2018-02-05T10:10:22
| null |
UTF-8
|
Java
| false
| false
| 8,151
|
java
|
/*
* Copyright (c) 2004-2021, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.hisp.dhis.webapi.utils;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import javax.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.input.NullInputStream;
import org.apache.commons.lang3.StringUtils;
import org.hisp.dhis.dxf2.webmessage.WebMessageException;
import org.hisp.dhis.dxf2.webmessage.WebMessageUtils;
import org.hisp.dhis.fileresource.FileResource;
import org.hisp.dhis.fileresource.FileResourceDomain;
import org.hisp.dhis.fileresource.FileResourceService;
import org.hisp.dhis.fileresource.ImageFileDimension;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Component;
import org.springframework.util.InvalidMimeTypeException;
import org.springframework.util.MimeTypeUtils;
import org.springframework.web.multipart.MultipartFile;
import com.google.common.hash.Hashing;
import com.google.common.io.ByteSource;
/**
* @author Lars Helge Overland
*/
@Component
@Slf4j
public class FileResourceUtils
{
@Autowired
private FileResourceService fileResourceService;
/**
* Transfers the given multipart file content to a local temporary file.
*
* @param multipartFile the multipart file.
* @return a temporary local file.
* @throws IOException if the file content could not be transferred.
*/
public static File toTempFile( MultipartFile multipartFile )
throws IOException
{
File tmpFile = Files.createTempFile( "org.hisp.dhis", ".tmp" ).toFile();
tmpFile.deleteOnExit();
multipartFile.transferTo( tmpFile );
return tmpFile;
}
/**
* Indicates whether the content type represented by the given string is a
* valid, known content type.
*
* @param contentType the content type string.
* @return true if the content is valid, false if not.
*/
public static boolean isValidContentType( String contentType )
{
try
{
MimeTypeUtils.parseMimeType( contentType );
}
catch ( InvalidMimeTypeException ignored )
{
return false;
}
return true;
}
/**
*
* Builds a {@link FileResource} from a {@link MultipartFile}.
*
* @param key the key to associate to the {@link FileResource}
* @param file a {@link MultipartFile}
* @param domain a {@link FileResourceDomain}
* @return a valid {@link FileResource} populated with data from the
* provided file
* @throws IOException if hashing fails
*
*/
public static FileResource build( String key, MultipartFile file, FileResourceDomain domain )
throws IOException
{
return new FileResource( key, file.getName(), file.getContentType(), file.getSize(),
ByteSource.wrap( file.getBytes() ).hash( Hashing.md5() ).toString(), domain );
}
public static void setImageFileDimensions( FileResource fileResource, ImageFileDimension dimension )
{
if ( FileResource.IMAGE_CONTENT_TYPES.contains( fileResource.getContentType() ) &&
FileResourceDomain.getDomainForMultipleImages().contains( fileResource.getDomain() ) )
{
if ( fileResource.isHasMultipleStorageFiles() )
{
fileResource
.setStorageKey( StringUtils.join( fileResource.getStorageKey(), dimension.getDimension() ) );
}
}
}
public void configureFileResourceResponse( HttpServletResponse response, FileResource fileResource )
throws WebMessageException
{
response.setContentType( fileResource.getContentType() );
response.setContentLength( new Long( fileResource.getContentLength() ).intValue() );
response.setHeader( HttpHeaders.CONTENT_DISPOSITION, "filename=" + fileResource.getName() );
try
{
fileResourceService.copyFileResourceContent( fileResource, response.getOutputStream() );
}
catch ( IOException e )
{
throw new WebMessageException( WebMessageUtils.error( "Failed fetching the file from storage",
"There was an exception when trying to fetch the file from the storage backend. "
+ "Depending on the provider the root cause could be network or file system related." ) );
}
}
public FileResource saveFileResource( MultipartFile file, FileResourceDomain domain )
throws WebMessageException,
IOException
{
String filename = StringUtils.defaultIfBlank( FilenameUtils.getName( file.getOriginalFilename() ),
FileResource.DEFAULT_FILENAME );
String contentType = file.getContentType();
contentType = FileResourceUtils.isValidContentType( contentType ) ? contentType
: FileResource.DEFAULT_CONTENT_TYPE;
long contentLength = file.getSize();
log.info( "File uploaded with filename: '{}', original filename: '{}', content type: '{}', content length: {}",
filename, file.getOriginalFilename(), file.getContentType(), contentLength );
if ( contentLength <= 0 )
{
throw new WebMessageException( WebMessageUtils.conflict( "Could not read file or file is empty." ) );
}
ByteSource bytes = new MultipartFileByteSource( file );
String contentMd5 = bytes.hash( Hashing.md5() ).toString();
FileResource fileResource = new FileResource( filename, contentType, contentLength, contentMd5, domain );
File tmpFile = toTempFile( file );
fileResourceService.saveFileResource( fileResource, tmpFile );
return fileResource;
}
// -------------------------------------------------------------------------
// Inner classes
// -------------------------------------------------------------------------
private class MultipartFileByteSource
extends
ByteSource
{
private MultipartFile file;
public MultipartFileByteSource( MultipartFile file )
{
this.file = file;
}
@Override
public InputStream openStream()
throws IOException
{
try
{
return file.getInputStream();
}
catch ( IOException ioe )
{
return new NullInputStream( 0 );
}
}
}
}
|
[
"abyota@gmail.com"
] |
abyota@gmail.com
|
d7dd8bd993ec9a8850cbd8458f519b8e581f0eb2
|
4d6f449339b36b8d4c25d8772212bf6cd339f087
|
/netreflected/src/Framework/mscorlib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089/system/security/cryptography/ICryptoTransform.java
|
ff0b3846e78f5f088d3cd8e0cc0945ea8d19536b
|
[
"MIT"
] |
permissive
|
lvyitian/JCOReflector
|
299a64550394db3e663567efc6e1996754f6946e
|
7e420dca504090b817c2fe208e4649804df1c3e1
|
refs/heads/master
| 2022-12-07T21:13:06.208025
| 2020-08-28T09:49:29
| 2020-08-28T09:49:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,357
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 MASES s.r.l.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**************************************************************************************
* <auto-generated>
* This code was generated from a template using JCOReflector
*
* Manual changes to this file may cause unexpected behavior in your application.
* Manual changes to this file will be overwritten if the code is regenerated.
* </auto-generated>
*************************************************************************************/
package system.security.cryptography;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
// Import section
import system.IDisposable;
import system.IDisposableImplementation;
/**
* The base .NET class managing System.Security.Cryptography.ICryptoTransform, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. Implements {@link IJCOBridgeReflected}.
* <p>
*
* See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Security.Cryptography.ICryptoTransform" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Security.Cryptography.ICryptoTransform</a>
*/
public interface ICryptoTransform extends IJCOBridgeReflected, IDisposable {
/**
* Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
*/
public static final String assemblyFullName = "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
/**
* Assembly name: mscorlib
*/
public static final String assemblyShortName = "mscorlib";
/**
* Qualified class name: System.Security.Cryptography.ICryptoTransform
*/
public static final String className = "System.Security.Cryptography.ICryptoTransform";
/**
* Try to cast the {@link IJCOBridgeReflected} instance into {@link ICryptoTransform}, a cast assert is made to check if types are compatible.
*/
public static ICryptoTransform ToICryptoTransform(IJCOBridgeReflected from) throws Throwable {
JCOBridge bridge = JCOBridgeInstance.getInstance("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
JCType classType = bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName));
NetType.AssertCast(classType, from);
return new ICryptoTransformImplementation(from.getJCOInstance());
}
/**
* Returns the reflected Assembly name
*
* @return A {@link String} representing the Fullname of reflected Assembly
*/
public String getJCOAssemblyName();
/**
* Returns the reflected Class name
*
* @return A {@link String} representing the Fullname of reflected Class
*/
public String getJCOClassName();
/**
* Returns the reflected Class name used to build the object
*
* @return A {@link String} representing the name used to allocated the object
* in CLR context
*/
public String getJCOObjectName();
/**
* Returns the instantiated class
*
* @return An {@link Object} representing the instance of the instantiated Class
*/
public Object getJCOInstance();
/**
* Returns the instantiated class Type
*
* @return A {@link JCType} representing the Type of the instantiated Class
*/
public JCType getJCOType();
// Methods section
public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount) throws Throwable;
public byte[] TransformFinalBlock(JCRefOut dupParam0, int dupParam1, int dupParam2) throws Throwable;
public int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) throws Throwable;
public int TransformBlock(JCRefOut dupParam0, int dupParam1, int dupParam2, JCRefOut dupParam3, int dupParam4) throws Throwable;
// Properties section
public boolean getCanReuseTransform() throws Throwable;
public boolean getCanTransformMultipleBlocks() throws Throwable;
public int getInputBlockSize() throws Throwable;
public int getOutputBlockSize() throws Throwable;
// Instance Events section
}
|
[
"mario.mastrodicasa@masesgroup.com"
] |
mario.mastrodicasa@masesgroup.com
|
7e6e82b4c2c32775d3c90f90a9f94a575792ca72
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2005-11-25/seasar2-2.3.3/s2-framework/src/main/java/org/seasar/framework/beans/IllegalPropertyRuntimeException.java
|
a2b1954eca76837284351d4bd1898de7b36a4adf
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,423
|
java
|
/*
* Copyright 2004-2005 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.framework.beans;
import org.seasar.framework.exception.SRuntimeException;
/**
* @author higa
*
*/
public class IllegalPropertyRuntimeException
extends SRuntimeException {
private static final long serialVersionUID = 3584516316082904020L;
private Class componentClass_;
private String propertyName_;
public IllegalPropertyRuntimeException(
Class componentClass,
String propertyName,
Throwable cause) {
super(
"ESSR0059",
new Object[] { componentClass.getName(), propertyName, cause },
cause);
componentClass_ = componentClass;
propertyName_ = propertyName;
}
public Class getComponentClass() {
return componentClass_;
}
public String getPropertyName() {
return propertyName_;
}
}
|
[
"manhole@319488c0-e101-0410-93bc-b5e51f62721a"
] |
manhole@319488c0-e101-0410-93bc-b5e51f62721a
|
32f456e8db0bf34edf863531eaee11680f4d9e9e
|
3c4935f7f3c2bb075193673ba43170ca755f7875
|
/iwc2/src/main/java/com/rxjy/iwc2/api/bean/IsLowPowerBean.java
|
9824bcfa261d63dde037437d239cbe8c3832d331
|
[] |
no_license
|
WCYu/MIWCMS
|
9b97d0cf1a62c184d79b753284b580a2dfcf9172
|
bf0c1624074f6c49124956e07d50124006eb78c3
|
refs/heads/master
| 2020-03-25T23:34:38.913841
| 2018-08-11T05:31:39
| 2018-08-11T05:31:39
| 144,281,707
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,212
|
java
|
package com.rxjy.iwc2.api.bean;
import java.io.Serializable;
/**
* Created by qindd on 2016/7/19.
*/
public class IsLowPowerBean implements Serializable{
private String apiKey;
private String apiSign;
private String timeStamp;
private String IMEI;
private String SubItemId;
private int ElectValue;
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public String getApiSign() {
return apiSign;
}
public void setApiSign(String apiSign) {
this.apiSign = apiSign;
}
public String getTimeStamp() {
return timeStamp;
}
public void setTimeStamp(String timeStamp) {
this.timeStamp = timeStamp;
}
public String getIMEI() {
return IMEI;
}
public void setIMEI(String iMEI) {
IMEI = iMEI;
}
public String getSubItemId() {
return SubItemId;
}
public void setSubItemId(String subItemId) {
SubItemId = subItemId;
}
public int getElectValue(){
return ElectValue;
}
public void setElectValue(int electValue){
ElectValue = electValue;
}
}
|
[
"13466941275@163.com"
] |
13466941275@163.com
|
056397be7f566e28ba169c27f62eb4a67f29bebf
|
9b9c3236cc1d970ba92e4a2a49f77efcea3a7ea5
|
/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/datatables/sql/SkillSpellbookTable.java
|
e723e461c85ca21dc465b3bdf590cfeb0ffdd20e
|
[] |
no_license
|
BETAJIb/ikol
|
73018f8b7c3e1262266b6f7d0a7f6bbdf284621d
|
f3709ea10be2d155b0bf1dee487f53c723f570cf
|
refs/heads/master
| 2021-01-05T10:37:17.831153
| 2019-12-24T22:23:02
| 2019-12-24T22:23:02
| 240,993,482
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,039
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2jmobius.gameserver.datatables.sql;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
import org.l2jmobius.commons.database.DatabaseFactory;
import org.l2jmobius.gameserver.model.Skill;
/**
* @author l2jserver
*/
public class SkillSpellbookTable
{
private static final Logger LOGGER = Logger.getLogger(SkillTreeTable.class.getName());
private static Map<Integer, Integer> skillSpellbooks;
private SkillSpellbookTable()
{
skillSpellbooks = new HashMap<>();
try (Connection con = DatabaseFactory.getConnection())
{
final PreparedStatement statement = con.prepareStatement("SELECT skill_id, item_id FROM skill_spellbooks");
final ResultSet spbooks = statement.executeQuery();
while (spbooks.next())
{
skillSpellbooks.put(spbooks.getInt("skill_id"), spbooks.getInt("item_id"));
}
spbooks.close();
statement.close();
LOGGER.info("SkillSpellbookTable: Loaded " + skillSpellbooks.size() + " spellbooks");
}
catch (Exception e)
{
LOGGER.warning("Error while loading spellbook data " + e);
}
}
public int getBookForSkill(int skillId, int level)
{
if ((skillId == Skill.SKILL_DIVINE_INSPIRATION) && (level != -1))
{
switch (level)
{
case 1:
{
return 8618; // Ancient Book - Divine Inspiration (Modern Language Version)
}
case 2:
{
return 8619; // Ancient Book - Divine Inspiration (Original Language Version)
}
case 3:
{
return 8620; // Ancient Book - Divine Inspiration (Manuscript)
}
case 4:
{
return 8621; // Ancient Book - Divine Inspiration (Original Version)
}
default:
{
return -1;
}
}
}
if (!skillSpellbooks.containsKey(skillId))
{
return -1;
}
return skillSpellbooks.get(skillId);
}
public int getBookForSkill(Skill skill)
{
return getBookForSkill(skill.getId(), -1);
}
public int getBookForSkill(Skill skill, int level)
{
return getBookForSkill(skill.getId(), level);
}
public static SkillSpellbookTable getInstance()
{
return SingletonHolder.INSTANCE;
}
private static class SingletonHolder
{
protected static final SkillSpellbookTable INSTANCE = new SkillSpellbookTable();
}
}
|
[
"mobius@cyber-wizard.com"
] |
mobius@cyber-wizard.com
|
6caaf8db94915145e633b594ce93b173526c86f8
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module1378_internal/src/java/module1378_internal/a/Foo2.java
|
65c0194698078e6e171300f5e0f92c173487fcf8
|
[
"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
| 1,589
|
java
|
package module1378_internal.a;
import java.util.logging.*;
import java.util.zip.*;
import javax.annotation.processing.*;
/**
* 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.net.ssl.ExtendedSSLSession
* @see javax.rmi.ssl.SslRMIClientSocketFactory
* @see java.awt.datatransfer.DataFlavor
*/
@SuppressWarnings("all")
public abstract class Foo2<W> extends module1378_internal.a.Foo0<W> implements module1378_internal.a.IFoo2<W> {
java.beans.beancontext.BeanContext f0 = null;
java.io.File f1 = null;
java.rmi.Remote f2 = null;
public W element;
public static Foo2 instance;
public static Foo2 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module1378_internal.a.Foo0.create(input);
}
public String getName() {
return module1378_internal.a.Foo0.getInstance().getName();
}
public void setName(String string) {
module1378_internal.a.Foo0.getInstance().setName(getName());
return;
}
public W get() {
return (W)module1378_internal.a.Foo0.getInstance().get();
}
public void set(Object element) {
this.element = (W)element;
module1378_internal.a.Foo0.getInstance().set(this.element);
}
public W call() throws Exception {
return (W)module1378_internal.a.Foo0.getInstance().call();
}
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
44a946b44d95faad725e2cc1ce7a44a19136b382
|
c191e2ebc0d4c0fb74f94c8b26d3983cdc02fe69
|
/src/main/java/com/robertx22/age_of_exile/player_skills/crafting_inv/ProfCraftScreen.java
|
3c0f8978c9c31d079de6c17f95419e9e1eb29237
|
[] |
no_license
|
RobertSkalko/Age-of-Exile
|
c734ca05c49fd87fa2837727df397b24ed550cb9
|
a7572c25779c094089e62b08e4ae3ff718af6b59
|
refs/heads/master
| 2022-07-23T07:41:53.016747
| 2022-02-08T17:38:56
| 2022-02-08T17:38:56
| 280,625,711
| 58
| 32
| null | 2022-02-13T05:41:21
| 2020-07-18T09:38:58
|
Java
|
UTF-8
|
Java
| false
| false
| 2,351
|
java
|
package com.robertx22.age_of_exile.player_skills.crafting_inv;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import com.robertx22.age_of_exile.mmorpg.SlashRef;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.IReorderingProcessor;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting;
import java.util.List;
public class ProfCraftScreen extends ContainerScreen<ProfCraftContainer> {
private ResourceLocation texture = new ResourceLocation(SlashRef.MODID, "textures/gui/crafting/background.png");
public static ITextComponent FAIL_REASON = null;
public ProfCraftScreen(ProfCraftContainer handler, PlayerInventory inventory, ITextComponent text) {
super(handler, inventory, new StringTextComponent(""));
imageWidth = 176;
imageHeight = 207;
}
@Override
protected void renderBg(MatrixStack matrices, float delta, int mouseX, int mouseY) {
Minecraft.getInstance()
.getTextureManager()
.bind(texture);
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
blit(matrices, this.leftPos, this.topPos, 0, 0, imageWidth, imageHeight);
}
@Override
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
super.render(matrices, mouseX, mouseY, delta);
Minecraft mc = Minecraft.getInstance();
if (FAIL_REASON != null) {
List<IReorderingProcessor> list = mc.font.split(FAIL_REASON, 85);
int ypos = this.topPos + 10;
for (IReorderingProcessor txt : list) {
mc.font.drawShadow(matrices, txt,
this.leftPos + 10, ypos
, TextFormatting.RED.getColor());
ypos += mc.font.lineHeight + 2;
}
}
this.renderTooltip(matrices, mouseX, mouseY);
buttons.forEach(x -> x.renderToolTip(matrices, mouseX, mouseY));
}
@Override
protected void renderLabels(MatrixStack matrices, int mouseX, int mouseY) {
// dont draw the damn name
}
}
|
[
"treborx555@gmail.com"
] |
treborx555@gmail.com
|
a28a6f46731f1f6132539e1f55e218df0be64d6a
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_2/src/f/b/a/Calc_1_2_5106.java
|
ecbcac2cdc781c9e90398cbaeb9f3478f3284544
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 131
|
java
|
package f.b.a;
public class Calc_1_2_5106 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
97645b2eadd580dcdf11de8793c565b51a3b0dc1
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/16/16_943b59adefbf240671532b6dea978f934f6f2d4f/HistogramExtractor/16_943b59adefbf240671532b6dea978f934f6f2d4f_HistogramExtractor_t.java
|
96ffc2c26422f429ed4d44a498ecf2fdea433a93
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,571
|
java
|
package com.cse454.nel.extract;
import java.io.BufferedWriter;
import com.cse454.warmup.sf.retriever.ProcessedCorpus;
public class HistogramExtractor {
private ProcessedCorpus mCorpus;
public HistogramExtractor(ProcessedCorpus corpus) {
mCorpus = corpus;
}
public void extract(BufferedWriter out) {
/* NerExtractor entityExtractor = new NerExtractor();
List<Sentence> annotations = null;
while(mCorpus.hasNext()) {
if (annotations == null) {
annotations = mCorpus.next();
}
// use the first sentence's meta file to find the last sentence in doc
String[] split = annotations.get(SFConstants.META).split("\t");
String curId = split[2];
String documentId = curId;
List<Map<String, String>> sentences = new ArrayList<Map<String,String>>();
Map<Entity, Integer> histogram = new HashMap<Entity, Integer>();
while (curId.equals(documentId)) {
sentences.add(annotations);
List<EntityMention> entities = entityExtractor.extract(annotations);
for (Entity entity: entities) {
if (!histogram.containsKey(entity)) {
histogram.put(entity, 1);
} else {
histogram.put(entity, histogram.get(entity) + 1);
}
}
if (!mCorpus.hasNext()) {
break;
}
annotations = mCorpus.next();
split = annotations.get(SFConstants.META).split("\t");
curId = split[2];
}
for (Entry<Entity,Integer> entry : histogram.entrySet()) {
System.out.println(entry.getKey().toString() + "\t" + entry.getValue());
}
break;
}
*/
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
f207173528a147207802f8e780c62734a06c12de
|
0e06e096a9f95ab094b8078ea2cd310759af008b
|
/classes52-dex2jar/com/google/android/gms/internal/games/zzcg.java
|
f695a0649442dff3b22809ecd5690aae4b4f2588
|
[] |
no_license
|
Manifold0/adcom_decompile
|
4bc2907a057c73703cf141dc0749ed4c014ebe55
|
fce3d59b59480abe91f90ba05b0df4eaadd849f7
|
refs/heads/master
| 2020-05-21T02:01:59.787840
| 2019-05-10T00:36:27
| 2019-05-10T00:36:27
| 185,856,424
| 1
| 2
| null | 2019-05-10T00:36:28
| 2019-05-09T19:04:28
|
Java
|
UTF-8
|
Java
| false
| false
| 507
|
java
|
//
// Decompiled by Procyon v0.5.34
//
package com.google.android.gms.internal.games;
import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.games.request.Requests;
import com.google.android.gms.games.Games;
abstract class zzcg extends zza<Requests.UpdateRequestsResult>
{
private zzcg(final GoogleApiClient googleApiClient) {
super(googleApiClient);
}
}
|
[
"querky1231@gmail.com"
] |
querky1231@gmail.com
|
c647939ece273cf3000299c853e291a9fa4a0b4b
|
6be39fc2c882d0b9269f1530e0650fd3717df493
|
/weixin反编译/sources/android/support/design/widget/a.java
|
49ac26fdbcb99a9863646f2fef77edfb96e2ea8c
|
[] |
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
| 761
|
java
|
package android.support.design.widget;
import android.support.v4.view.b.b;
import android.support.v4.view.b.c;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;
final class a {
static final Interpolator eA = new LinearInterpolator();
static final Interpolator eB = new b();
static final Interpolator eC = new android.support.v4.view.b.a();
static final Interpolator eD = new c();
static final Interpolator eE = new DecelerateInterpolator();
static float b(float f, float f2, float f3) {
return ((f2 - f) * f3) + f;
}
static int a(int i, int i2, float f) {
return Math.round(((float) (i2 - i)) * f) + i;
}
}
|
[
"denghailong@vargo.com.cn"
] |
denghailong@vargo.com.cn
|
37edb95de9c269b878308b365d3d8a8c92896f6d
|
3e19a5edbdcf32418e974105257561eb1dd99c9f
|
/pubmed-lib/src/main/java/pubmed/relev/RelevanceSummaryPairFile.java
|
7f617312db3a5f5601f951cb88e4810d457c3513
|
[
"Apache-2.0"
] |
permissive
|
tipplerow/pubmed
|
2b6b9334d5166fac511df99153e9808b4f46b7a9
|
c82ef450a9b81cda55b104ff76f02dbb7f768583
|
refs/heads/master
| 2022-12-22T20:33:02.931666
| 2020-09-21T18:09:31
| 2020-09-21T18:09:31
| 268,349,362
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,259
|
java
|
package pubmed.relev;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import jam.app.JamLogger;
import jam.util.PairKeyTable;
import pubmed.article.PMID;
import pubmed.bulk.BulkFile;
import pubmed.subject.Subject;
/**
* Generates and stores relevance summary records for subject pairs.
*/
public final class RelevanceSummaryPairFile extends RelevanceSummaryFileBase {
// The subjects of this file...
private final Subject subject1;
private final Subject subject2;
// One file per subject pair...
private static final PairKeyTable<Subject, Subject, RelevanceSummaryPairFile> instances = PairKeyTable.hash();
private RelevanceSummaryPairFile(Subject subject1, Subject subject2) {
super(resolveSummaryFile(subject1, subject2));
this.subject1 = subject1;
this.subject2 = subject2;
}
private static File resolveSummaryFile(Subject subject1, Subject subject2) {
return new File(resolvePairDir(subject1), summaryBaseName(subject2));
}
private static File resolvePairDir(Subject subject1) {
return new File(resolveRelevanceDir(), subject1.getKey());
}
private static String summaryBaseName(Subject subject2) {
return subject2.getKey() + "_relevance_summary.txt";
}
/**
* Returns the relevance pair summary file for two subjects.
*
* @param subject1 the first subject of the relevance file.
*
* @param subject2 the second subject of the relevance file.
*
* @return the relevance pair summary file for the specified
* subjects.
*/
public static RelevanceSummaryPairFile instance(Subject subject1, Subject subject2) {
RelevanceSummaryPairFile instance = instances.get(subject1, subject2);
if (instance == null) {
instance = new RelevanceSummaryPairFile(subject1, subject2);
instances.put(subject1, subject2, instance);
}
return instance;
}
/**
* Merges relevance summary data for pairs of subjects.
*
* @param subject1 the first subject to process.
*
* @param subjects2 the second subjects to process.
*
* @throws RuntimeException unless all single-subject summary
* files exist.
*/
public static synchronized void process(Subject subject1, Collection<? extends Subject> subjects2) {
Set<PMID> subject1PMID =
RelevanceSummarySubjectFile.loadRelevantPMID(subject1);
subjects2.parallelStream().forEach(subject2 -> process(subject1, subject2, subject1PMID));
}
private static void process(Subject subject1, Subject subject2, Set<PMID> subject1PMID) {
List<RelevanceSummaryRecord> pairRecords
= new ArrayList<RelevanceSummaryRecord>();
List<RelevanceSummaryRecord> sub2Records =
RelevanceSummarySubjectFile.load(subject2).values();
for (RelevanceSummaryRecord sub2Record : sub2Records)
if (sub2Record.isLikelyMatch() && subject1PMID.contains(sub2Record.getPMID()))
pairRecords.add(sub2Record);
RelevanceSummaryPairFile.instance(subject1, subject2).appendSummaryRecords(pairRecords);
}
}
|
[
"jsshaff@berkeley.edu"
] |
jsshaff@berkeley.edu
|
4766a05ee4de8139ed5c05c6e809fac2fa11e52d
|
54d2953f37bf1094f77e5978b45f14d25942eee8
|
/bundles/opaeum-eclipse/org.opaeum.eclipse.uml.propertysections/src/org/opaeum/eclipse/uml/propertysections/event/OperationChooserForEvent.java
|
184d977f232f04c3b2430c8f9aff2a8ce9d2ebee
|
[] |
no_license
|
opaeum/opaeum
|
7d30c2fc8f762856f577c2be35678da9890663f7
|
a517c2446577d6a961c1fcdcc9d6e4b7a165f33d
|
refs/heads/master
| 2022-07-14T00:35:23.180202
| 2016-01-01T15:23:11
| 2016-01-01T15:23:11
| 987,891
| 2
| 2
| null | 2022-06-29T19:45:00
| 2010-10-14T19:11:53
|
Java
|
UTF-8
|
Java
| false
| false
| 2,222
|
java
|
package org.opaeum.eclipse.uml.propertysections.event;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.CallEvent;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLPackage;
import org.opaeum.eclipse.EmfElementFinder;
import org.opaeum.eclipse.EmfOperationUtil;
import org.opaeum.eclipse.uml.propertysections.base.AbstractOpaeumPropertySection;
import org.opaeum.eclipse.uml.propertysections.base.AbstractTabbedPropertySubsection;
import org.opaeum.eclipse.uml.propertysections.common.IChoiceProvider;
import org.opaeum.eclipse.uml.propertysections.subsections.AbstractDetailsSubsection;
import org.opaeum.eclipse.uml.propertysections.subsections.ChooserSubsection;
public class OperationChooserForEvent extends AbstractDetailsSubsection<CallEvent> implements IChoiceProvider{
private int labelWidth = AbstractOpaeumPropertySection.STANDARD_LABEL_WIDTH;
private ChooserSubsection operationChooser;
public OperationChooserForEvent(Composite parent,TabbedPropertySheetWidgetFactory widgetFactory){
super(parent, SWT.NONE, widgetFactory);
}
public void setLabelWidth(int labelWidth){
this.labelWidth = labelWidth;
operationChooser.setLabelWidth(labelWidth);
}
@Override
protected int getNumberOfColumns(){
return 1;
}
@Override
protected void addSubsections(){
operationChooser = createChooser(UMLPackage.eINSTANCE.getCallEvent_Operation(), "Operation", labelWidth, AbstractTabbedPropertySubsection.FILL, this);
operationChooser.setSingle(true);
}
@Override
public Object[] getChoices(){
Classifier a = (Classifier) EmfElementFinder.getNearestClassifier((Element) getSelectedObject());
List<Operation> choices = new ArrayList<Operation>(EmfOperationUtil.getEffectiveOperations(a));
if(a instanceof Behavior && ((Behavior) a).getContext() != null){
choices.addAll(EmfOperationUtil.getEffectiveOperations(((Behavior) a).getContext()));
}
return choices.toArray();
}
}
|
[
"ampieb@gmail.com"
] |
ampieb@gmail.com
|
2097f1295f3dc3731f2eaa6e9d177c5a6840c509
|
5dd84e9ca419ed669e11c236a845b0c1645cf180
|
/com/planet_ink/coffee_mud/MOBS/LargeBat.java
|
05795f81ecccc447d6a245666ab0af0abe388ee3
|
[
"Apache-2.0"
] |
permissive
|
jmbflat/CoffeeMud
|
0ab169f8d473f0aa3534ffe3c0ae82ed9a221ec8
|
c6e48d89aa58332ae030904550442155e673488c
|
refs/heads/master
| 2023-02-16T04:21:26.845481
| 2021-01-09T01:36:11
| 2021-01-09T01:36:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,732
|
java
|
package com.planet_ink.coffee_mud.MOBS;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2001-2020 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class LargeBat extends StdMOB
{
@Override
public String ID()
{
return "LargeBat";
}
public LargeBat()
{
super();
final Random randomizer = new Random(System.currentTimeMillis());
_name="a large bat";
setDescription("It looks like a bat, just larger.");
setDisplayText("A large bat flies nearby.");
CMLib.factions().setAlignment(this,Faction.Align.NEUTRAL);
setMoney(0);
setWimpHitPoint(0);
basePhyStats.setWeight(1 + Math.abs(randomizer.nextInt() % 10));
baseCharStats().setStat(CharStats.STAT_INTELLIGENCE,1);
baseCharStats().setStat(CharStats.STAT_STRENGTH,12);
baseCharStats().setStat(CharStats.STAT_DEXTERITY,17);
baseCharStats().setMyRace(CMClass.getRace("Bat"));
baseCharStats().getMyRace().startRacing(this,false);
basePhyStats().setDamage(5);
basePhyStats().setSpeed(1.0);
basePhyStats().setAbility(0);
basePhyStats().setLevel(2);
basePhyStats().setArmor(90);
basePhyStats().setDisposition(basePhyStats().disposition()|PhyStats.IS_FLYING);
baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(),20,basePhyStats().level()));
recoverMaxState();
resetToMaxState();
recoverPhyStats();
recoverCharStats();
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
1d90124814493fcaeb99362c9fc7be7fe4f5ab31
|
ef66dadf885506c94897f7c6727c35a6b5d9b7d3
|
/art-extension/opttests/src/OptimizationTests/ShortMethodsInliningNonVirtualInvokes/InvokeSuperAByteThrowNullSet_001/Main.java
|
00c16ac6b55b904fde448071d1db5a1bed485ca0
|
[
"Apache-2.0",
"NCSA",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
pramulkant/https-github.com-android-art-intel-marshmallow
|
aef8d075498f3c19712403c271b55ea457e053ec
|
87e8c22f248164780b92aaa0cdea14bf6cda3859
|
refs/heads/master
| 2021-01-12T05:00:35.783906
| 2016-11-07T08:34:41
| 2016-11-07T08:34:41
| 77,827,976
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,513
|
java
|
/*
* Copyright (C) 2015 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.
*/
package OptimizationTests.ShortMethodsInliningNonVirtualInvokes.InvokeSuperAByteThrowNullSet_001;
// The test checks that stack after NullPointerException occurs is correct despite inlining
class Main {
final static int iterations = 10;
public static void main(String[] args) {
Test test = new Test(iterations);
byte nextThingy = -128;
byte sumArrElements = 0;
for(int i = 0; i < iterations; i++) {
SuperTest.thingiesArray[i] = (byte)(nextThingy + 1);
sumArrElements = (byte)(sumArrElements + SuperTest.thingiesArray[i]);
}
for(int i = 0; i < iterations; i++) {
nextThingy = (byte)(test.getThingies(SuperTest.thingiesArray, i) + 1);
if (i == iterations - 1)
SuperTest.thingiesArray = null;
test.setThingies(SuperTest.thingiesArray, nextThingy, i);
}
}
}
|
[
"aleksey.v.ignatenko@intel.com"
] |
aleksey.v.ignatenko@intel.com
|
07ae56a549777e3e16ea72cfa15a76f71febbfac
|
dcb0e6cffe8911990cc679938b0b63046b9078ad
|
/jmx/plugins/org.fusesource.ide.jmx.activemq/src/org/fusesource/ide/jmx/activemq/internal/ConnectionViewFacade.java
|
716d20857e0da6bad229cef43754b07be3018d27
|
[] |
no_license
|
MelissaFlinn/jbosstools-fuse
|
6fe7ac5f83d05df05d8884a8576b9af4baac3cd6
|
d960f4ed562da96a82128e0a9c04e122b9e9e8b0
|
refs/heads/master
| 2021-06-25T09:30:28.876445
| 2019-07-15T09:10:12
| 2019-07-29T08:12:28
| 112,379,325
| 0
| 0
| null | 2017-11-28T19:27:42
| 2017-11-28T19:27:42
| null |
UTF-8
|
Java
| false
| false
| 888
|
java
|
/*******************************************************************************
* Copyright (c)2015 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.fusesource.ide.jmx.activemq.internal;
import org.apache.activemq.broker.jmx.ConnectionViewMBean;
/**
* <p>
* </p>
*
*/
public interface ConnectionViewFacade extends ConnectionViewMBean {
/**
* @return a unique id for this resource, typically a JMX ObjectName
* @throws Exception
*/
String getId() throws Exception;
}
|
[
"lhein@apache.org"
] |
lhein@apache.org
|
d9a7954e885fa862814573239cbb7266da684d77
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/newEvaluatedBugs/Mockito_24_buggy/mutated/134/MockingProgressImpl.java
|
f758560f2a716c8e95f68a4951afca2e12c5dbc9
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,968
|
java
|
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.progress;
import org.mockito.MockSettings;
import org.mockito.exceptions.Reporter;
import org.mockito.internal.configuration.GlobalConfiguration;
import org.mockito.internal.debugging.Localized;
import org.mockito.internal.debugging.LocationImpl;
import org.mockito.internal.listeners.MockingProgressListener;
import org.mockito.internal.listeners.MockingStartedListener;
import org.mockito.invocation.Invocation;
import org.mockito.invocation.Location;
import org.mockito.verification.VerificationMode;
@SuppressWarnings("unchecked")
public class MockingProgressImpl implements MockingProgress {
private final Reporter reporter = new Reporter();
private final ArgumentMatcherStorage argumentMatcherStorage = new ArgumentMatcherStorageImpl();
IOngoingStubbing iOngoingStubbing;
private Localized<VerificationMode> verificationMode;
private Location stubbingInProgress = null;
private MockingProgressListener listener;
public void reportOngoingStubbing(IOngoingStubbing iOngoingStubbing) {
this.iOngoingStubbing = iOngoingStubbing;
}
public IOngoingStubbing pullOngoingStubbing() {
IOngoingStubbing temp = iOngoingStubbing;
iOngoingStubbing = null;
return temp;
}
public void verificationStarted(VerificationMode verify) {
validateState();
resetOngoingStubbing();
verificationMode = new Localized(verify);
}
/* (non-Javadoc)
* @see org.mockito.internal.progress.MockingProgress#resetOngoingStubbing()
*/
public void resetOngoingStubbing() {
iOngoingStubbing = null;
}
public VerificationMode pullVerificationMode() {
validateState();
if (verificationMode == null) {
return null;
}
VerificationMode temp = verificationMode.getObject();
verificationMode = null;
return temp;
}
public void stubbingStarted() {
validateState();
stubbingInProgress = new LocationImpl();
}
public void validateState() {
validateMostStuff();
//validate stubbing:
if (stubbingInProgress != null) {
Location temp = stubbingInProgress;
stubbingInProgress = null;
reporter.unfinishedStubbing(temp);
}
}
private void validateMostStuff() {
//State is cool when GlobalConfiguration is already loaded
//this cannot really be tested functionally because I cannot dynamically mess up org.mockito.configuration.MockitoConfiguration class
GlobalConfiguration.validate();
if (verificationMode != null) {
Location location = verificationMode.getLocation();
verificationMode = null;
reporter.unfinishedVerificationException(location);
}
getArgumentMatcherStorage().validateState();
}
public void stubbingCompleted(Invocation invocation) {
stubbingInProgress = null;
}
public String toString() {
return "iOngoingStubbing: " + iOngoingStubbing +
", verificationMode: " + verificationMode +
", stubbingInProgress: " + stubbingInProgress;
}
public void reset() {
stubbingInProgress = null;
verificationMode = null;
getArgumentMatcherStorage().reset();
}
public ArgumentMatcherStorage getArgumentMatcherStorage() {
return argumentMatcherStorage;
}
public void mockingStarted(Object mock, Class classToMock) {
if (listener != null && listener instanceof MockingStartedListener) {
((MockingStartedListener) listener).mockingStarted(mock, classToMock);
}
validateMostStuff();
}
public void setListener(MockingProgressListener listener) {
this.listener = listener;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
ac46290b16194b4dae799628fcc9388bd0d3b826
|
3a517f7cf8e9183cde34f345459a6828c15c3317
|
/src/test/java/ch/alpine/tensor/io/WavReaderTest.java
|
428a38a5d4a3a021048af1626a47996dd5181c52
|
[] |
no_license
|
datahaki/tensor
|
766b3f8ad6bc0756edfd2e0f10ecbc27fa7cefa2
|
8b29f8c43ed8305accf0a6a5378213f38adb0a61
|
refs/heads/master
| 2023-09-03T05:51:04.681055
| 2023-08-24T11:04:53
| 2023-08-24T11:04:53
| 294,003,258
| 23
| 1
| null | 2022-09-15T00:43:39
| 2020-09-09T04:34:22
|
Java
|
UTF-8
|
Java
| false
| false
| 642
|
java
|
// code by jph
package ch.alpine.tensor.io;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import org.junit.jupiter.api.Test;
import ch.alpine.tensor.Scalar;
import ch.alpine.tensor.Tensor;
import ch.alpine.tensor.ext.HomeDirectory;
class WavReaderTest {
@Test
void test() throws IOException {
// TODO TENSOR IMPL
File file = HomeDirectory.file("USERAUDIO001.WAV");
if (file.isFile()) {
try (InputStream inputStream = new FileInputStream(file)) {
Tensor tensor = WavReader.read(inputStream);
tensor.map(Scalar::zero);
}
}
}
}
|
[
"jan.hakenberg@gmail.com"
] |
jan.hakenberg@gmail.com
|
9bdad5984900c037cec7b717a709afea8a8161ea
|
c77dd8c4f3762c67bc2d9bcbe02a789d8e2cb4d6
|
/src/main/java/com/github/bingoohuang/patchca/font/FontFactory.java
|
df0b3b46591a3fad691976d5ca6adc61a8fc98c9
|
[] |
no_license
|
ypsmile/patchca
|
457ea8028495c20d3b04275e525bddf484298ea0
|
7bddb3b9731d4caa00e134c3652304ad0027f3de
|
refs/heads/master
| 2020-07-03T22:12:19.389791
| 2019-08-13T05:06:37
| 2019-08-13T05:06:37
| 202,068,080
| 0
| 0
| null | 2019-08-13T05:04:37
| 2019-08-13T05:04:36
| null |
UTF-8
|
Java
| false
| false
| 1,037
|
java
|
/*
* Copyright (c) 2009 Piotr Piastucki
*
* This file is part of Patchca CAPTCHA library.
*
* Patchca is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Patchca is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Patchca. If not, see <http://www.gnu.org/licenses/>.
*/
package com.github.bingoohuang.patchca.font;
import com.github.bingoohuang.patchca.word.WordFactory;
import java.awt.*;
public interface FontFactory {
Font getFont(int index);
void setWord(String word);
void setWordFactory(WordFactory wordFactory);
}
|
[
"bingoo.huang@gmail.com"
] |
bingoo.huang@gmail.com
|
4780920c95790d615851d0a7456bd66938555531
|
ae10ea9be64e610b58374399894a25aa5070fd0e
|
/uhomeManageWeb/src/main/java/com/ytoxl/uhomemanage/web/action/brand/BrandAction.java
|
e78fa71c4dd48694a2d413accd45396fff633e76
|
[] |
no_license
|
ichoukou/uhome
|
71887423893981b614a29643d89a5ecbb3ee646a
|
09407e4d28c2b169f4890853173c7dbb48a609b6
|
refs/heads/master
| 2020-05-20T23:55:38.324369
| 2018-11-28T05:31:25
| 2018-11-28T05:31:25
| 185,812,444
| 0
| 1
| null | 2019-05-09T14:12:50
| 2019-05-09T14:12:49
| null |
UTF-8
|
Java
| false
| false
| 6,735
|
java
|
package com.ytoxl.uhomemanage.web.action.brand;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.ytoxl.module.core.common.pagination.BasePagination;
import com.ytoxl.module.core.common.utils.StringUtils;
import com.ytoxl.module.uhome.uhomebase.common.exception.UhomeStoreException;
import com.ytoxl.module.uhome.uhomebase.dataobject.Brand;
import com.ytoxl.module.uhome.uhomebase.dataobject.Plan;
import com.ytoxl.module.uhome.uhomebase.dataobject.Product;
import com.ytoxl.module.uhome.uhomebase.dataobject.ProductCategory;
import com.ytoxl.module.uhome.uhomebase.dataobject.Seller;
import com.ytoxl.module.uhome.uhomebase.service.BrandService;
import com.ytoxl.module.uhome.uhomebase.service.ProductService;
import com.ytoxl.uhomemanage.web.action.BaseAction;
public class BrandAction extends BaseAction {
private static final long serialVersionUID = 1563032240216719019L;
private static Logger logger = LoggerFactory.getLogger(BrandAction.class);
private static final String LIST_BRANDS = "listBrands";
private static final String ALTER_BRAND = "alterBrand";
private static final String LIST_USERBRANDS = "listUserBrands";
@Autowired
private BrandService brandService;
@Autowired
private ProductService productService;
private String nextAction;
private BasePagination<Brand> pagebrands;
private List<Brand> brands;
private List<ProductCategory> productCategory;
private List<Brand> brandList;
private String opert;
private Brand brand;
private Seller seller;
public String listBrands(){
try {
this.brands=brandService.listBrandsByBrandPinYin(this.getBrand());
} catch (UhomeStoreException e) {
logger.error(e.getMessage());
}
return LIST_BRANDS;
}
//管理员品牌列表
public String listUserBrans(){
SetlistProduct();
try {
if(pagebrands==null){
pagebrands =new BasePagination<Brand>();
}
brandService.searchBrands(pagebrands);
} catch (UhomeStoreException e) {
logger.error(e.getMessage());
}
return LIST_USERBRANDS;
}
//产品类别
public void SetlistProduct(){
try {
productCategory = productService.listProductCategories();
} catch (UhomeStoreException e) {
logger.error(e.getMessage());
}
}
//根据id 获取单个品牌
public String singleBrand(){
SetlistProduct();
if(brand!=null){
try {
brand = brandService.getBrandByBrandId(brand.getBrandId());
} catch (UhomeStoreException e) {
logger.error(e.getMessage());
}
}
return ALTER_BRAND;
}
//获取品牌的首字符
public String getBrandPinYinByName(){
try {
String brandPinYin = brandService.getPinyinName(brand.getBrandPinYin());
setMessage("pinyin", brandPinYin);//添加或修改成功
} catch (UhomeStoreException e) {
logger.error(e.getMessage());
}
return JSONMSG;
}
//修改或添加单个品牌
public String singleBrandSset(){
if(opert!=null){
if(opert.equals("edit")){
try {
if(!checkBrand(brand)){
brandService.updateBrandByBrandId(brand);
setMessage(Boolean.TRUE.toString(), "2");//添加或修改成功
}else{
setMessage(Boolean.TRUE.toString(), "1");//品牌重复
}
} catch (UhomeStoreException e) {
logger.error(e.getMessage());
}
}else{
try {
if(!checkBrand(brand)){
brandService.addBrand(brand);
setMessage(Boolean.TRUE.toString(), "2");//添加或修改成功
}else{
setMessage(Boolean.TRUE.toString(), "1");//品牌重复
}
} catch (UhomeStoreException e) {
logger.error(e.getMessage());
}
}
}
return JSONMSG;
}
public boolean checkBrand(Brand brand){
boolean flag =false;
try {
Brand brandZ = new Brand();
brandZ.setBrandId(brand.getBrandId());
brandZ.setName(brand.getName());
brandZ.setEnglishName("");
Brand brandE = new Brand();
brandE.setBrandId(brand.getBrandId());
brandE.setName("");
brandE.setEnglishName(brand.getEnglishName());
if(StringUtils.isNotEmpty(brand.getName()) && StringUtils.isNotEmpty(brand.getEnglishName()) ){
brandZ = brandService.searchBrandByName(brandZ);
brandE = brandService.searchBrandByName(brandE);
if(brandZ != null || brandE != null) flag = true;
}else{
brand = brandService.searchBrandByName(brand);
if(brand !=null) flag = true;
}
} catch (UhomeStoreException e) {
logger.error(e.getMessage());
}
return flag;
}
//品牌禁用
public String forbiddenBrand(){
List<Product> listProduct = null;
List<Plan> listPlan = null;
try {
listPlan=brandService.listPlansByBrandIdAndEndTime(brand.getBrandId());
if(listPlan.size()>0){
setMessage(Boolean.TRUE.toString(), "该品牌还存在排期");//品牌还存在排期
}else{
listProduct = brandService.listProductsByBrandId(brand.getBrandId());
if(listProduct.size()>0){
setMessage(Boolean.TRUE.toString(), "请先删除该品牌下的商品");//品牌还存在商品
}else{
brandService.updateIsForbbdenByBrandId(brand.getBrandId(),brand.getIsForbidden());
if(brand.getIsForbidden()==1){
setMessage(Boolean.TRUE.toString(), "该品牌已禁用");//品牌还存在商品
}else{
setMessage(Boolean.TRUE.toString(), "该品牌已激活");//品牌还存在商品
}
}
}
} catch (UhomeStoreException e) {
logger.error(e.getMessage());
}
return JSONMSG;
}
public String getOpert() {
return opert;
}
public void setOpert(String opert) {
this.opert = opert;
}
public List<Brand> getBrandList() {
return brandList;
}
public void setBrandList(List<Brand> brandList) {
this.brandList = brandList;
}
public BasePagination<Brand> getPagebrands() {
return pagebrands;
}
public void setPagebrands(BasePagination<Brand> pagebrands) {
this.pagebrands = pagebrands;
}
public List<ProductCategory> getProductCategory() {
return productCategory;
}
public void setProductCategory(List<ProductCategory> productCategory) {
this.productCategory = productCategory;
}
public List<Brand> getBrands() {
return brands;
}
public void setBrands(List<Brand> brands) {
this.brands = brands;
}
public Brand getBrand() {
return brand;
}
public void setBrand(Brand brand) {
this.brand = brand;
}
public String getNextAction() {
return nextAction;
}
public void setNextAction(String nextAction) {
this.nextAction = nextAction;
}
public BrandService getBrandService() {
return brandService;
}
public void setBrandService(BrandService brandService) {
this.brandService = brandService;
}
public Seller getSeller() {
return seller;
}
public void setSeller(Seller seller) {
this.seller = seller;
}
}
|
[
"caozhi_soft@163.com"
] |
caozhi_soft@163.com
|
7e04ccb10bd38abc45084c32164b923cbc94737e
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/avito/android/developments_catalog/items/buildingProgress/BuildingProgressBlueprint_Factory.java
|
bf6d548493cf8ca5ba91ff9e5f4237eae0a7ea71
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 922
|
java
|
package com.avito.android.developments_catalog.items.buildingProgress;
import dagger.internal.Factory;
import javax.inject.Provider;
public final class BuildingProgressBlueprint_Factory implements Factory<BuildingProgressBlueprint> {
public final Provider<BuildingProgressPresenter> a;
public BuildingProgressBlueprint_Factory(Provider<BuildingProgressPresenter> provider) {
this.a = provider;
}
public static BuildingProgressBlueprint_Factory create(Provider<BuildingProgressPresenter> provider) {
return new BuildingProgressBlueprint_Factory(provider);
}
public static BuildingProgressBlueprint newInstance(BuildingProgressPresenter buildingProgressPresenter) {
return new BuildingProgressBlueprint(buildingProgressPresenter);
}
@Override // javax.inject.Provider
public BuildingProgressBlueprint get() {
return newInstance(this.a.get());
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
daf5aedd94b1f83371f1a44bcacd5128ed83bfdb
|
9930f13fa98ea6993522eece170b835b31b40dab
|
/ymgy-transwins/src/main/java/org/ymgy/transwins/common/utils/CacheUtils.java
|
a963941c315e127a8fb99300595b40a18edfff43
|
[] |
no_license
|
zhaojunfei/transwins
|
c05ef2257323cd6990979a7d884838345071f3ed
|
953c029efa5a51b8db24ee9109ae59e0ee53dcaf
|
refs/heads/master
| 2020-06-01T15:46:57.128866
| 2017-06-14T10:41:29
| 2017-06-14T10:41:29
| 94,079,068
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,190
|
java
|
/**
* Copyright © 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package org.ymgy.transwins.common.utils;
import java.util.Iterator;
import java.util.Set;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Cache工具类
* @author ThinkGem
* @version 2013-5-29
*/
public class CacheUtils {
private static Logger logger = LoggerFactory.getLogger(CacheUtils.class);
private static CacheManager cacheManager = SpringContextHolder.getBean(CacheManager.class);
private static final String SYS_CACHE = "sysCache";
/**
* 获取SYS_CACHE缓存
* @param key
* @return
*/
public static Object get(String key) {
return get(SYS_CACHE, key);
}
/**
* 获取SYS_CACHE缓存
* @param key
* @param defaultValue
* @return
*/
public static Object get(String key, Object defaultValue) {
Object value = get(key);
return value != null ? value : defaultValue;
}
/**
* 写入SYS_CACHE缓存
* @param key
* @return
*/
public static void put(String key, Object value) {
put(SYS_CACHE, key, value);
}
/**
* 从SYS_CACHE缓存中移除
* @param key
* @return
*/
public static void remove(String key) {
remove(SYS_CACHE, key);
}
/**
* 获取缓存
* @param cacheName
* @param key
* @return
*/
public static Object get(String cacheName, String key) {
return getCache(cacheName).get(getKey(key));
}
/**
* 获取缓存
* @param cacheName
* @param key
* @param defaultValue
* @return
*/
public static Object get(String cacheName, String key, Object defaultValue) {
Object value = get(cacheName, getKey(key));
return value != null ? value : defaultValue;
}
/**
* 写入缓存
* @param cacheName
* @param key
* @param value
*/
public static void put(String cacheName, String key, Object value) {
getCache(cacheName).put(getKey(key), value);
}
/**
* 从缓存中移除
* @param cacheName
* @param key
*/
public static void remove(String cacheName, String key) {
getCache(cacheName).remove(getKey(key));
}
/**
* 从缓存中移除所有
* @param cacheName
*/
public static void removeAll(String cacheName) {
Cache<String, Object> cache = getCache(cacheName);
Set<String> keys = cache.keys();
for (Iterator<String> it = keys.iterator(); it.hasNext();){
cache.remove(it.next());
}
logger.info("清理缓存: {} => {}", cacheName, keys);
}
/**
* 获取缓存键名,多数据源下增加数据源名称前缀
* @param key
* @return
*/
private static String getKey(String key){
// String dsName = DataSourceHolder.getDataSourceName();
// if (StringUtils.isNotBlank(dsName)){
// return dsName + "_" + key;
// }
return key;
}
/**
* 获得一个Cache,没有则显示日志。
* @param cacheName
* @return
*/
private static Cache<String, Object> getCache(String cacheName){
Cache<String, Object> cache = cacheManager.getCache(cacheName);
if (cache == null){
throw new RuntimeException("当前系统中没有定义“"+cacheName+"”这个缓存。");
}
return cache;
}
}
|
[
"773152@qq.com"
] |
773152@qq.com
|
d0945e9359714ba5709310194329227ee5a7418e
|
a748c52500f6e8d7f3dace206abf26fa167ac515
|
/src/main/java/card/Card.java
|
bd6ad326489c4e6ad74e0dc8b417b35d6e723aee
|
[] |
no_license
|
xloypaypa/HearthstoneCalculator
|
353240386a0f6a3e3eb9a190093263083e0eea9e
|
71aa2dbebf40243b73f0cd802b3e6ce5a2698f05
|
refs/heads/master
| 2021-01-10T01:21:33.170683
| 2016-01-15T11:35:09
| 2016-01-15T11:35:09
| 49,713,564
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 231
|
java
|
package card;
/**
* Created by xlo on 16-1-15.
* it's the card
*/
public class Card {
private int cost;
public Card(int cost) {
this.cost = cost;
}
public int getCost() {
return cost;
}
}
|
[
"245532675@qq.com"
] |
245532675@qq.com
|
0ede1e0d76cc786bf0abc83cf37d46a258e91bba
|
947d6b0f483f1d54d53cf450c50ad8de6cadbe4f
|
/app/src/main/java/com/example/project/QrCode.java
|
3d21c33c1bb3a9e8aad6c4b030301fbe11530e02
|
[] |
no_license
|
T-Fluffy/Android-with-Unity-AR-APP-integrated
|
0597b78fb922a75c632163a73a9478bfeb9b702f
|
8b539604550173f5f599a72d587daf592f2229f9
|
refs/heads/master
| 2023-07-14T17:31:00.496530
| 2021-08-16T14:30:17
| 2021-08-16T14:30:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 935
|
java
|
package com.example.project;
public class QrCode {
private String code, username, dat;
private Integer ustiliser;
public QrCode(String code, String username, String dat, Integer ustiliser) {
this.code = code;
this.username = username;
this.dat = dat;
this.ustiliser = ustiliser;
}
public QrCode() {
}
public String getCode() {
return code;
}
public String getUsername() {
return username;
}
public String getDat() {
return dat;
}
public Integer getUstiliser() {
return ustiliser;
}
public void setCode(String code) {
this.code = code;
}
public void setUsername(String username) {
this.username = username;
}
public void setDat(String dat) {
this.dat = dat;
}
public void setUstiliser(Integer ustiliser) {
this.ustiliser = ustiliser;
}
}
|
[
"you@example.com"
] |
you@example.com
|
651a305a5febde59a311fe0ea2e6f822c569e4ee
|
5b6c278c128296cb2bd11a296859082606012eed
|
/app/src/main/java/me/shouheng/omnilist/utils/preferences/UserPreferences.java
|
db97c99db462da49f0cb97b9ad4e94b928f1da50
|
[] |
no_license
|
1322739583/OmniList
|
0a407507876ed57acf872ccff171396d577fe936
|
ae830f63c9b9d922ca969abacfa9d37fc063752e
|
refs/heads/master
| 2020-06-13T22:19:44.426279
| 2018-07-21T14:22:03
| 2018-07-21T14:22:03
| 194,806,196
| 0
| 1
| null | 2019-07-02T06:55:44
| 2019-07-02T06:55:43
| null |
UTF-8
|
Java
| false
| false
| 5,618
|
java
|
package me.shouheng.omnilist.utils.preferences;
import android.content.Context;
import android.net.Uri;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import me.shouheng.omnilist.PalmApp;
import me.shouheng.omnilist.R;
import me.shouheng.omnilist.config.Constants;
import me.shouheng.omnilist.model.enums.Operation;
import me.shouheng.omnilist.model.tools.FabSortItem;
import me.shouheng.omnilist.utils.ColorUtils;
import me.shouheng.omnilist.utils.base.BasePreferences;
/**
* Created by shouh on 2018/4/9.*/
public class UserPreferences extends BasePreferences {
public static List<FabSortItem> defaultFabOrders;
private final String FAB_SORT_SPLIT = ":";
static {
defaultFabOrders = new LinkedList<>();
defaultFabOrders.add(FabSortItem.ASSIGNMENT);
defaultFabOrders.add(FabSortItem.CATEGORY);
defaultFabOrders.add(FabSortItem.QUICK);
defaultFabOrders.add(FabSortItem.CAPTURE);
defaultFabOrders.add(FabSortItem.FILE);
}
private static UserPreferences preferences;
public static UserPreferences getInstance() {
if (preferences == null) {
synchronized (UserPreferences.class) {
if (preferences == null) {
preferences = new UserPreferences(PalmApp.getContext());
}
}
}
return preferences;
}
private UserPreferences(Context context) {
super(context);
}
public void setFirstDayOfWeek(int firstDay){
putInt(R.string.key_first_day_of_week, firstDay);
}
public int getFirstDayOfWeek(){
return getInt(R.string.key_first_day_of_week, Calendar.SUNDAY);
}
public void setVideoSizeLimit(int limit){
putInt(R.string.key_video_size_limit, limit);
}
public int getVideoSizeLimit(){
return getInt(R.string.key_video_size_limit, 10);
}
public boolean isImageAutoCompress() {
return getBoolean(R.string.key_auto_compress_image, true);
}
public boolean listAnimationEnabled() {
return getBoolean(R.string.key_list_animation, true);
}
public boolean systemAnimationEnabled() {
return getBoolean(R.string.key_system_animation, true);
}
public List<FabSortItem> getFabSortResult() {
String fabStr = getString(R.string.key_fab_sort_result, null);
if (!TextUtils.isEmpty(fabStr)) {
String[] fabs = fabStr.split(FAB_SORT_SPLIT);
List<FabSortItem> fabSortItems = new LinkedList<>();
for (String fab : fabs) {
fabSortItems.add(FabSortItem.valueOf(fab));
}
return fabSortItems;
} else {
return defaultFabOrders;
}
}
public void setFabSortResult(List<FabSortItem> fabSortItems) {
int size = fabSortItems.size();
StringBuilder fabStr = new StringBuilder();
for (int i=0;i<size;i++) {
if (size == size - 1) {
fabStr.append(fabSortItems.get(i).name());
} else {
fabStr.append(fabSortItems.get(i).name()).append(FAB_SORT_SPLIT);
}
}
putString(R.string.key_fab_sort_result, fabStr.toString());
}
public boolean is24HourMode() {
return getBoolean(R.string.key_is_24_hour_mode, true);
}
public int getTimeLineColor(Operation operation) {
return getInt(getKey(R.string.key_operation_color_prefix) + operation.name(), defaultTimeLineColor(operation));
}
private int defaultTimeLineColor(Operation operation) {
switch (operation) {
case DELETE: return PalmApp.getContext().getResources().getColor(R.color.md_red_500);
case TRASH: return PalmApp.getContext().getResources().getColor(R.color.md_deep_orange_500);
case ARCHIVE: return PalmApp.getContext().getResources().getColor(R.color.md_pink_500);
case COMPLETE: return PalmApp.getContext().getResources().getColor(R.color.md_purple_500);
case SYNCED: return PalmApp.getContext().getResources().getColor(R.color.md_light_green_900);
case ADD: return PalmApp.getContext().getResources().getColor(R.color.md_green_500);
case UPDATE: return PalmApp.getContext().getResources().getColor(R.color.md_light_green_700);
case INCOMPLETE: return PalmApp.getContext().getResources().getColor(R.color.md_blue_500);
case RECOVER: return PalmApp.getContext().getResources().getColor(R.color.md_light_blue_600);
}
return ColorUtils.accentColor();
}
public void setUserInfoBG(@Nullable Uri uri) {
putString(R.string.key_user_info_bg, uri == null ? "" : uri.toString());
}
public Uri getUserInfoBG() {
String bgUri = getString(R.string.key_user_info_bg, null);
if (!TextUtils.isEmpty(bgUri)) {
return Uri.parse(bgUri);
}
return Uri.parse(Constants.DEFAULT_USER_INFO_BG);
}
public void setUserInfoBGVisible(boolean isVisible) {
putBoolean(R.string.key_user_info_bg_visible, isVisible);
}
public boolean isUserInfoBgVisible() {
return getBoolean(R.string.key_user_info_bg_visible, true);
}
public void setUserMotto(String motto) {
putString(R.string.key_user_info_motto, motto);
}
public String getUserMotto() {
return getString(R.string.key_user_info_motto, PalmApp.getStringCompact(R.string.setting_dashboard_user_motto_default));
}
}
|
[
"shouheng2015@gmail.com"
] |
shouheng2015@gmail.com
|
2e84709fda7997b006c48fd5d4bb49b6fbc91aed
|
32072bf80206f033f3a65f77d26d86c0478315a9
|
/src/main/java/org/kyojo/schemaOrg/m3n3/doma/pending/container/VariableMeasuredConverter.java
|
290625a1e0787ced4bcac44fd800f8093cf1168e
|
[
"Apache-2.0"
] |
permissive
|
covernorgedi/nagoyakaICT
|
76613d014dc70479f4b4364e51e7ba002ba1f5af
|
b375db53216eaa54f9797549a36e7c79f66b44c0
|
refs/heads/master
| 2021-04-09T14:21:23.670598
| 2018-03-20T10:43:37
| 2018-03-20T10:43:37
| 125,742,242
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 618
|
java
|
package org.kyojo.schemaOrg.m3n3.doma.pending.container;
import org.seasar.doma.ExternalDomain;
import org.seasar.doma.jdbc.domain.DomainConverter;
import org.kyojo.schemaOrg.m3n3.pending.impl.VARIABLE_MEASURED;
import org.kyojo.schemaOrg.m3n3.pending.Container.VariableMeasured;
@ExternalDomain
public class VariableMeasuredConverter implements DomainConverter<VariableMeasured, String> {
@Override
public String fromDomainToValue(VariableMeasured domain) {
return domain.getNativeValue();
}
@Override
public VariableMeasured fromValueToDomain(String value) {
return new VARIABLE_MEASURED(value);
}
}
|
[
"covernorgedi@icloud.com"
] |
covernorgedi@icloud.com
|
3cfb63e8fafc46e5aae16ab7cafec871eb2e95a6
|
070aa63fd9247e59a3d1394d90d7983d55132dd1
|
/src/main/java/com/framework/model/Operator.java
|
fc96f50cc88e325cab2d5db8ca19f98a993ca20f
|
[] |
no_license
|
ljtianqi1986/housekeeping-admin
|
4525b1158673d15c05019cc12885e6b90ab4bd9c
|
d4e5f32f5576fa48d66fa32853ca357c53379cd1
|
refs/heads/master
| 2021-01-25T13:11:16.808013
| 2018-03-02T06:11:22
| 2018-03-02T06:11:22
| 123,536,975
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 337
|
java
|
package com.framework.model;
/**
* sql中的操作符
* Created by 刘佳佳 on 2016/7/28.
*/
public class Operator {
public static final String _LIKE="like";//模糊等于
public static final String _EQUALS="equal";//等于
public static final String _GT="gt";//大于
public static final String _LT="lt";//小于
}
|
[
"452966215@qq.com"
] |
452966215@qq.com
|
8d148f4c920095d0d4fa1b6c1d9477596eea92f8
|
65270bf285ee77759216a329561c033df3ffe78c
|
/spring-manager/src/main/java/com/example/springmanager/controller/AuthenticationController.java
|
61f61c10adfd1b20b2d5696af7047931c278c41f
|
[] |
no_license
|
ABDUVOHID771/manager
|
b00b34dd6e79b5c407a3c6bb71939a25bb21e510
|
4f7649e95d676c8d262065fda5179727cff59bf7
|
refs/heads/master
| 2022-12-23T14:57:40.661083
| 2020-09-29T08:37:01
| 2020-09-29T08:37:01
| 299,554,530
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,814
|
java
|
package com.example.springmanager.controller;
import com.example.springmanager.dao.domain.UserPrincipal;
import com.example.springmanager.jwt.AuthenticationRequest;
import com.example.springmanager.jwt.AuthenticationResponse;
import com.example.springmanager.jwt.JwtUtil;
import com.example.springmanager.service.UserPrincipalService;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@CrossOrigin(origins = {"http://localhost:3000","http://192.168.99.100:4200"})
@RestController
public class AuthenticationController {
private final AuthenticationManager authenticationManager;
private final UserPrincipalService userPrincipalService;
private final JwtUtil jwtUtil;
public AuthenticationController(AuthenticationManager authenticationManager, UserPrincipalService userPrincipalService, JwtUtil jwtUtil) {
this.authenticationManager = authenticationManager;
this.userPrincipalService = userPrincipalService;
this.jwtUtil = jwtUtil;
}
@PostMapping("/authenticate")
public ResponseEntity<?> createAuthenticationToken(@RequestBody AuthenticationRequest authenticationRequest) throws Exception {
try {
authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(authenticationRequest.getUsername(), authenticationRequest.getPassword()));
} catch (BadCredentialsException exception) {
throw new Exception("Incorrect username or password !");
}
final UserDetails userDetails = userPrincipalService.loadUserByUsername(authenticationRequest.getUsername());
final String jwt = jwtUtil.generateToken(userDetails);
return ResponseEntity.ok(new AuthenticationResponse("Bearer " + jwt));
}
@GetMapping("/refresh")
public ResponseEntity<?> refreshToken(HttpServletRequest request) {
String authToken = request.getHeader("Authorization");
final String token = authToken.substring(7);
String username = jwtUtil.extractUsername(token);
UserPrincipal userPrincipal = (UserPrincipal) userPrincipalService.loadUserByUsername(username);
if (jwtUtil.canTokenRefreshed(token) && userPrincipal != null) {
String newToken = jwtUtil.refreshToken(token);
return ResponseEntity.ok(new AuthenticationResponse(newToken));
} else {
return ResponseEntity.badRequest().body(null);
}
}
}
|
[
"aristakrat31@gmail.com"
] |
aristakrat31@gmail.com
|
cca6fb03e045bc598f85d30b9ab63dd2df9f93d4
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_7a496f0cd5d303228a23a1083ffdb718e4a6d51b/Sender/14_7a496f0cd5d303228a23a1083ffdb718e4a6d51b_Sender_s.java
|
274f3138f5a1de859ae738b46d160a9a9ec8bf8d
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,486
|
java
|
/**
*
*/
package de.ub0r.android.smsdroid;
import java.util.ArrayList;
import android.app.Activity;
import android.app.PendingIntent;
import android.app.PendingIntent.CanceledException;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.BaseColumns;
import android.text.TextUtils;
import android.widget.Toast;
import de.ub0r.android.lib.Log;
import de.ub0r.android.lib.apis.TelephonyWrapper;
/**
* Class sending messages via standard Messaging interface.
*
* @author flx
*/
public class Sender extends Activity {
/** Tag for output. */
private static final String TAG = "send";
/** {@link TelephonyWrapper}. */
private static final TelephonyWrapper TWRAPPER = TelephonyWrapper
.getInstance();
/** {@link Uri} for saving messages. */
private static final Uri URI_SMS = Uri.parse("content://sms");
/** {@link Uri} for saving sent messages. */
private static final Uri URI_SENT = Uri.parse("content://sms/sent");
/** Projection for getting the id. */
private static final String[] PROJECTION_ID = // .
new String[] { BaseColumns._ID };
/** SMS DB: address. */
private static final String ADDRESS = "address";
/** SMS DB: read. */
private static final String READ = "read";
/** SMS DB: type. */
public static final String TYPE = "type";
/** SMS DB: body. */
private static final String BODY = "body";
/** SMS DB: date. */
private static final String DATE = "date";
/** Message set action. */
public static final String MESSAGE_SENT_ACTION = // .
"com.android.mms.transaction.MESSAGE_SENT";
/**
* {@inheritDoc}
*/
@Override
public final void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.parseIntent(this.getIntent());
}
/**
* {@inheritDoc}
*/
@Override
protected final void onNewIntent(final Intent intent) {
super.onNewIntent(intent);
this.parseIntent(intent);
}
/**
* Parse data pushed by {@link Intent}.
*
* @param intent
* {@link Intent}
*/
private void parseIntent(final Intent intent) {
Log.d(TAG, "parseIntent(" + intent + ")");
if (intent == null) {
this.finish();
return;
}
Log.d(TAG, "got action: " + intent.getAction());
String address = null;
String u = intent.getDataString();
if (!TextUtils.isEmpty(u) && u.contains(":")) {
address = u.split(":")[1];
}
u = null;
final String text = intent.getCharSequenceExtra(Intent.EXTRA_TEXT)
.toString();
if (TextUtils.isEmpty(text)) {
Log.e(TAG, "text missing");
Toast
.makeText(this, R.string.error_missing_text,
Toast.LENGTH_LONG).show();
this.finish();
return;
}
if (TextUtils.isEmpty(address)) {
Log.e(TAG, "recipient missing");
Toast.makeText(this, R.string.error_missing_reciepient,
Toast.LENGTH_LONG).show();
this.finish();
return;
}
Log.d(TAG, "text: " + text);
int[] l = TWRAPPER.calculateLength(text, false);
Log.i(TAG, "text7: " + text.length() + ", " + l[0] + " " + l[1] + " "
+ l[2] + " " + l[3]);
l = TWRAPPER.calculateLength(text, true);
Log.i(TAG, "text8: " + text.length() + ", " + l[0] + " " + l[1] + " "
+ l[2] + " " + l[3]);
// save draft
final ContentResolver cr = this.getContentResolver();
ContentValues values = new ContentValues();
values.put(TYPE, Message.SMS_DRAFT);
values.put(BODY, text);
values.put(READ, 1);
values.put(ADDRESS, address);
Uri draft = null;
// save sms to content://sms/sent
Cursor cursor = cr.query(URI_SMS, PROJECTION_ID, TYPE + " = "
+ Message.SMS_DRAFT + " AND " + ADDRESS + " = '" + address
+ "' AND " + BODY + " like '" + text.replace("'", "_") + "'",
null, DATE + " DESC");
if (cursor != null && cursor.moveToFirst()) {
draft = URI_SENT // .
.buildUpon().appendPath(cursor.getString(0)).build();
Log.d(TAG, "skip saving draft: " + draft);
} else {
draft = cr.insert(URI_SENT, values);
Log.d(TAG, "draft saved: " + draft);
}
values = null;
if (cursor != null && !cursor.isClosed()) {
cursor.close();
}
cursor = null;
final ArrayList<String> messages = TWRAPPER.divideMessage(text);
final int c = messages.size();
ArrayList<PendingIntent> sentIntents = new ArrayList<PendingIntent>(c);
try {
Log.d(TAG, "send messages to: " + address);
for (int i = 0; i < c; i++) {
final String m = messages.get(i);
Log.d(TAG, "devided messages: " + m);
final Intent sent = new Intent(MESSAGE_SENT_ACTION, draft,
this, SmsReceiver.class);
sentIntents.add(PendingIntent.getBroadcast(this, 0, sent, 0));
}
TWRAPPER.sendMultipartTextMessage(address, null, messages,
sentIntents, null);
Log.i(TAG, "message sent");
} catch (Exception e) {
Log.e(TAG, "unexpected error", e);
for (PendingIntent pi : sentIntents) {
if (pi != null) {
try {
pi.send();
} catch (CanceledException e1) {
Log.e(TAG, "unexpected error", e1);
}
}
}
this.finish();
return;
}
// values = new ContentValues();
// values.put(TYPE, MESSAGE_TYPE_SENT);
// final int ret = cr.update(draft, values, null, null);
// Log.d(TAG, "message saved: " + ret);
this.finish();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
9ac953cd1894d11f7689c3736f256d3027334d96
|
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
|
/flakiness-predicter/input_data/original_tests/elasticjob-elastic-job-lite/nonFlakyMethods/io.elasticjob.lite.lifecycle.internal.statistics.JobStatisticsAPIImplTest-assertGetShardingErrorJobBriefInfo.java
|
8657073032f6baf3546872d51f76dc169543d159
|
[
"BSD-3-Clause"
] |
permissive
|
Taher-Ghaleb/FlakeFlagger
|
6fd7c95d2710632fd093346ce787fd70923a1435
|
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
|
refs/heads/main
| 2023-07-14T16:57:24.507743
| 2021-08-26T14:50:16
| 2021-08-26T14:50:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,005
|
java
|
@Test public void assertGetShardingErrorJobBriefInfo(){
when(regCenter.getChildrenKeys("/")).thenReturn(Lists.newArrayList("test_job"));
when(regCenter.get("/test_job/config")).thenReturn(LifecycleJsonConstants.getSimpleJobJson("test_job","desc"));
when(regCenter.getChildrenKeys("/test_job/servers")).thenReturn(Arrays.asList("ip1","ip2"));
when(regCenter.getChildrenKeys("/test_job/instances")).thenReturn(Arrays.asList("ip1@-@defaultInstance","ip2@-@defaultInstance"));
when(regCenter.getChildrenKeys("/test_job/sharding")).thenReturn(Arrays.asList("0","1","2"));
when(regCenter.get("/test_job/sharding/0/instance")).thenReturn("ip1@-@defaultInstance");
when(regCenter.get("/test_job/sharding/1/instance")).thenReturn("ip2@-@defaultInstance");
when(regCenter.get("/test_job/sharding/2/instance")).thenReturn("ip3@-@defaultInstance");
JobBriefInfo jobBrief=jobStatisticsAPI.getJobBriefInfo("test_job");
assertThat(jobBrief.getStatus(),Is.is(JobBriefInfo.JobStatus.SHARDING_FLAG));
}
|
[
"aalsha2@masonlive.gmu.edu"
] |
aalsha2@masonlive.gmu.edu
|
90e804873d82137f85501edcc475df129e724b39
|
467b74dfc6768b9f34f52595779e6fc420b656ac
|
/app/src/main/java/com/geekhive/foodeydeliveryboy/beans/cashpay/CashPayment.java
|
18ebf5f4e9a5d56bc89888e081ff95c1416307f4
|
[] |
no_license
|
dprasad554/FoodeyDeliveryPartner
|
426f0a7c7c50573d44e8192aba35e7f7523f79f6
|
357ad5e61c7fc7f84219c918abd1e69cff8bb5e2
|
refs/heads/master
| 2023-04-17T07:09:43.317949
| 2021-05-03T08:57:23
| 2021-05-03T08:57:23
| 363,870,853
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 400
|
java
|
package com.geekhive.foodeydeliveryboy.beans.cashpay;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class CashPayment {
@SerializedName("message")
@Expose
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
|
[
"rohitkumar.kr92@gmail.com"
] |
rohitkumar.kr92@gmail.com
|
97cd0ab9ca4571deb5edda801ee502b6fe43473e
|
36e21c7e4690125a0fb1607c148bc69a38c476dd
|
/src/main/java/com/imooc/miaosha/redis/KeyPrefix.java
|
2f0b781e4f1c5bcf57dca07da3d04187ebda77e8
|
[] |
no_license
|
kvenLin/miaoshaDemo
|
58eb0f5561e73e56dcfa7aead8e3acfc2a6709ab
|
f50f1d08f9f6128cce5a0c5e8dedf8b72439b7b4
|
refs/heads/master
| 2020-03-25T04:40:13.351007
| 2018-08-05T12:21:07
| 2018-08-05T12:21:07
| 143,407,290
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 128
|
java
|
package com.imooc.miaosha.redis;
public interface KeyPrefix {
public int expireSeconds();
public String getPrefix();
}
|
[
"1256233771@qq.com"
] |
1256233771@qq.com
|
9dd41f3391a54311ae68dbe4a29e9386790a251d
|
677330c29502be126e6202ec77a83cedd8348053
|
/src/game/cache/local/RoleCache.java
|
8395d2429ca25fa8a4ff07777dc3a2fab2d2cbfd
|
[] |
no_license
|
wcyfd/NettyServer
|
6b228778283b434000871485125d13c49b3fa1bf
|
9e26024321738b10e149e7714c180e082eba5f10
|
refs/heads/master
| 2021-01-10T01:37:40.960780
| 2016-04-10T03:01:26
| 2016-04-10T03:01:26
| 55,470,556
| 5
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,239
|
java
|
package game.cache.local;
import game.entity.bo.Role;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
*
* @author wcy 2016年3月30日
*
*/
public class RoleCache {
private static Map<Integer, Role> roleIdMap = new ConcurrentHashMap<>();
private static Map<String,Role> roleAccountMap = new ConcurrentHashMap<>();
private static Set<String> roleAccountSet = new HashSet<>();
private static Set<String> roleNameSet = new HashSet<>();
public static void putRole(Role role) {
int roleId = role.getId();
String account = role.getAccount();
String name = role.getName();
roleIdMap.put(roleId, role);
roleAccountMap.put(account, role);
roleAccountSet.add(account);
roleNameSet.add(name);
}
public static Role getRoleById(int roleId) {
return roleIdMap.get(roleId);
}
public static Map<Integer,Role> getRoleMap(){
return roleIdMap;
}
public static Role getRoleByAccount(String account){
return roleAccountMap.get(account);
}
public static Set<String> getAllAccount(){
return roleAccountSet;
}
public static Set<String> getAllName(){
return roleNameSet;
}
}
|
[
"1101697681@qq.com"
] |
1101697681@qq.com
|
b13aad5558f963f211bec97021f4e0db1886a410
|
b07e61f16cdf293b90565fda238181c846d2fa3b
|
/nb-mall-develop/nb-item/src/main/java/com/nowbook/item/Bootstrap.java
|
d6100bd4d22d280f37ac1997cb0b8d1cb64e287b
|
[] |
no_license
|
gspandy/QTH-Server
|
4d9bbb385c43a6ecb6afbecfe2aacce69f1a37b7
|
9a47cef25542feb840f6ffdebdcb79fc4c7fc57b
|
refs/heads/master
| 2023-09-03T12:36:39.468049
| 2018-02-06T06:09:49
| 2018-02-06T06:09:49
| 123,294,108
| 0
| 1
| null | 2018-02-28T14:11:08
| 2018-02-28T14:11:07
| null |
UTF-8
|
Java
| false
| false
| 1,055
|
java
|
package com.nowbook.item;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import java.util.concurrent.CountDownLatch;
/**
* Author: <a href="mailto:jl@nowbook.com">jl</a>
* Date: 2013-12-16
*/
public class Bootstrap {
private static final Logger log = LoggerFactory.getLogger(Bootstrap.class);
public static void main(String[] args) throws Exception {
final ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("spring/item-dubbo-provider.xml", "spring/item-dubbo-consumer.xml");
ac.start();
log.info("item service started successfully");
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
log.debug("Shutdown hook was invoked. Shutting down Item Service.");
ac.close();
}
});
//prevent main thread from exit
CountDownLatch countDownLatch = new CountDownLatch(1);
countDownLatch.await();
}
}
|
[
"jameshsu4879@163.com"
] |
jameshsu4879@163.com
|
f59b54e3db459b249f082805cf6a80e84b60d9d1
|
187f5eb347de307f465845f47ee48fdd6b01348d
|
/bmm/src/main/java/org/openehr/bmm/core/BmmType.java
|
ab300581305485f3c72e145baf8e6f4de3b22097
|
[
"Apache-2.0"
] |
permissive
|
nedap/java-model-stack
|
b1b2647c28fe1bf59d8b5e6bacfca25a584b71d3
|
7bf2bc0674d6a999a105be897f7a147aa047f95b
|
refs/heads/master
| 2022-12-11T00:24:53.137345
| 2017-10-09T12:23:15
| 2017-10-09T12:23:15
| 106,275,335
| 0
| 0
|
Apache-2.0
| 2022-11-28T15:48:12
| 2017-10-09T11:32:55
|
Java
|
UTF-8
|
Java
| false
| false
| 2,551
|
java
|
package org.openehr.bmm.core;
/*
* #%L
* OpenEHR - Java Model Stack
* %%
* Copyright (C) 2016 - 2017 Cognitive Medical Systems
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
* Author: Claude Nanjo
*/
import org.openehr.bmm.core.BmmModelElement;
import org.openehr.bmm.core.BmmTypeElement;
import java.util.List;
/**
* Abstract idea of specifying a type in some context. This is not the same as 'defining' a class. A type specification
* is essentially a reference of some kind, that defines the type of an attribute, or function result or argument.
* It may include generic parameters that might or might not be bound. See subtypes.
*
* Created by cnanjo on 4/11/16.
*/
public abstract class BmmType extends BmmTypeElement {
public static final String BMM_SIMPLE_TYPE = "BMM_SIMPLE_TYPE";
public static final String BMM_SIMPLE_TYPE_OPEN = "BMM_SIMPLE_TYPE_OPEN";
public static final String BMM_CONTAINER_TYPE = "BMM_CONTAINER_TYPE";
public static final String BMM_GENERIC_TYPE = "BMM_GENERIC_TYPE";
public static final String BMM_GENERIC_PARAMETER = "BMM_GENERIC_PARAMETER";
public static final String P_BMM_SIMPLE_TYPE = "P_BMM_SIMPLE_TYPE";
public static final String P_BMM_SIMPLE_TYPE_OPEN = "P_BMM_SIMPLE_TYPE_OPEN";
public static final String P_BMM_CONTAINER_TYPE = "P_BMM_CONTAINER_TYPE";
public static final String P_BMM_GENERIC_TYPE = "P_BMM_GENERIC_TYPE";
public static final String P_BMM_GENERIC_PARAMETER = "P_BMM_GENERIC_PARAMETER";
/**
* Determine if there are any type substitutions.
*
* @return
*/
public boolean hasTypeSubstitutions() {
throw new UnsupportedOperationException("Not implemented yet");
}
/**
* List of type substitutions if any available for this type within the current BMM model.
*
* @return
*/
public List<String> getTypeSubstitutions() {
throw new UnsupportedOperationException("Not implemented yet");
}
public abstract String toDisplayString();
}
|
[
"cnanjo@gmail.com"
] |
cnanjo@gmail.com
|
84762c6fd784b17c9330ef0b7d626db2a70c4288
|
bc17fc41e9d627918a9c7ba511aa1db85f5b16fe
|
/PopularMovies/app/src/main/java/ru/gdgkazan/popularmovies/MoviesApp.java
|
94a07dc847e98e6389955321d42f1e5119d9ad4b
|
[
"Apache-2.0"
] |
permissive
|
ANIKINKIRILL/AndroidSchool
|
5cb973fcf2994a050b25889ee22f806ee8ba0ff7
|
435345e26fa4c23701e82b797b3116a5d4664c52
|
refs/heads/master
| 2020-06-03T15:44:50.085343
| 2019-06-12T20:20:09
| 2019-06-12T20:20:09
| 191,635,285
| 4
| 0
| null | 2019-06-12T19:51:52
| 2019-06-12T19:51:52
| null |
UTF-8
|
Java
| false
| false
| 1,019
|
java
|
package ru.gdgkazan.popularmovies;
import android.app.Application;
import android.support.annotation.NonNull;
import com.jakewharton.picasso.OkHttp3Downloader;
import com.squareup.picasso.Picasso;
import io.realm.Realm;
import io.realm.RealmConfiguration;
import io.realm.rx.RealmObservableFactory;
/**
* @author Artur Vasilov
*/
public class MoviesApp extends Application {
private static MoviesApp sInstance;
@Override
public void onCreate() {
super.onCreate();
sInstance = this;
Picasso picasso = new Picasso.Builder(this)
.downloader(new OkHttp3Downloader(this))
.build();
Picasso.setSingletonInstance(picasso);
RealmConfiguration configuration = new RealmConfiguration.Builder(this)
.rxFactory(new RealmObservableFactory())
.build();
Realm.setDefaultConfiguration(configuration);
}
@NonNull
public static MoviesApp getAppContext() {
return sInstance;
}
}
|
[
"artur.vasilov@dz.ru"
] |
artur.vasilov@dz.ru
|
d69287813d5b0c381b097e1b2b2e1e6fbe71ec3e
|
56e9ecff6dddf36453c0b48a60a1fc8db6f08879
|
/core/src/test/java/org/springframework/security/TestDataSource.java
|
5c322d61f79ecc6a41c8c67b6772a16df4b2e2d2
|
[
"Apache-2.0"
] |
permissive
|
Contrast-Security-OSS/spring-security
|
c94248c16d86c7f9157d1d48501cf7167d5868eb
|
bef354fe750f7208b8e4e8a9cfdf9a9d1917e984
|
refs/heads/master
| 2020-02-26T13:11:08.408315
| 2014-11-13T18:47:22
| 2014-11-13T18:47:22
| 25,587,725
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 995
|
java
|
package org.springframework.security;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.beans.factory.DisposableBean;
/**
* A Datasource bean which starts an in-memory HSQL database with the supplied name and
* shuts down the database when the application context it is defined in is closed.
*
* @author Luke Taylor
*/
public class TestDataSource extends DriverManagerDataSource implements DisposableBean {
String name;
public TestDataSource(String databaseName) {
name = databaseName;
System.out.println("Creating database: " + name);
setDriverClassName("org.hsqldb.jdbcDriver");
setUrl("jdbc:hsqldb:mem:" + databaseName);
setUsername("sa");
setPassword("");
}
public void destroy() throws Exception {
System.out.println("Shutting down database: " + name);
new JdbcTemplate(this).execute("SHUTDOWN");
}
}
|
[
"luke.taylor@springsource.com"
] |
luke.taylor@springsource.com
|
e041cd96a768247fec6cd5dca4ba521537b3a016
|
981df8aa31bf62db3b9b4e34b5833f95ef4bd590
|
/xworker_netty/src/main/java/xworker/io/netty/handlers/socksx/SocksServerUtils.java
|
c2fef96305a23d349094eaf33dddcaee23539525
|
[
"Apache-2.0"
] |
permissive
|
x-meta/xworker
|
638c7cd935f0a55d81f57e330185fbde9dce9319
|
430fba081a78b5d3871669bf6fcb1e952ad258b2
|
refs/heads/master
| 2022-12-22T11:44:10.363983
| 2021-10-15T00:57:10
| 2021-10-15T01:00:24
| 217,432,322
| 1
| 0
|
Apache-2.0
| 2022-12-12T23:21:16
| 2019-10-25T02:13:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,154
|
java
|
/*
* Copyright 2012 The Netty Project
*
* The Netty Project 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 xworker.io.netty.handlers.socksx;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFutureListener;
public final class SocksServerUtils {
/**
* Closes the specified channel after all queued write requests are flushed.
*/
public static void closeOnFlush(Channel ch) {
if (ch.isActive()) {
ch.writeAndFlush(Unpooled.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE);
}
}
private SocksServerUtils() { }
}
|
[
"zhangyuxiang@tom.com"
] |
zhangyuxiang@tom.com
|
46de47df0608a58e92855c8ca9c68d727baa8552
|
d11fb0d15b73a28742caa97e349dcfbe70d2563f
|
/server/iih.ci/iih.ci.ord/src/main/java/iih/ci/ord/s/bp/orsrvsplit/getOrSplitSqlRsBp.java
|
212781128fdfdf8c7af277e066c38697f6ac8a73
|
[] |
no_license
|
fhis/order.client
|
50a363fd3e4f56d95ccc5aa288e907a0a8571031
|
56cfa7877f600a10c54fdb30306a32ffa28b8217
|
refs/heads/master
| 2021-08-22T20:50:59.511923
| 2017-12-01T07:10:27
| 2017-12-01T07:10:27
| 112,678,072
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,262
|
java
|
package iih.ci.ord.s.bp.orsrvsplit;
import iih.ci.ord.dto.blexorder.d.OrGenSplitTpEnum;
import iih.ci.ord.dto.blexorder.d.OrSplitOrderDTO;
import iih.ci.ord.dto.blexorder.d.OrSrvSplitParamDTO;
import iih.ci.ord.dto.blexorder.d.SrvSplitOrderDTO;
import iih.ci.ord.dto.orsrvsplitorder.d.OrSplitDTO;
import iih.ci.ord.dto.orsrvsplitorder.d.OrSrvSplitDTO;
import iih.ci.ord.dto.orsrvsplitorder.d.SrvSplitDTO;
import xap.mw.core.data.BaseDTO;
import xap.mw.core.data.BizException;
import xap.mw.core.data.FArrayList;
public class getOrSplitSqlRsBp {
/***
* 获得执行与记费的医嘱或服务拆分时的有效医嘱sql对应的结果值
*
* @param param
* @return
* @throws BizException
*/
@SuppressWarnings("unchecked")
public BaseDTO exec(OrSrvSplitParamDTO param) throws BizException {
OrSrvSplitDTO reDTO = new OrSrvSplitDTO();
FArrayList splitOrArry = new FArrayList();
FArrayList splitSrvArry = new FArrayList();
// 医嘱查询
param.setEu_orgensplittp(OrGenSplitTpEnum.SPLITBYOR);
GetOrAndSrvSplitSqlRsBP orBp = new GetOrAndSrvSplitSqlRsBP();
OrSplitOrderDTO[] orSplitRes = (OrSplitOrderDTO[]) orBp.exec(param);
if (orSplitRes != null) {
// 医嘱拆分
SplitOrAndSrvSplitSqlRsBP orSplitbp = new SplitOrAndSrvSplitSqlRsBP();
orSplitRes = (OrSplitOrderDTO[]) orSplitbp.exec(orSplitRes, null, param.getDt_split_end(), OrGenSplitTpEnum.SPLITBYOR);
if (orSplitRes != null) {
for (OrSplitOrderDTO orSplitOrderDTO : orSplitRes) {
splitOrArry.add(orSplitOrderDTO);
}
}
reDTO.setOrsplitarry(splitOrArry);
}
// 服务查询
param.setEu_orgensplittp(OrGenSplitTpEnum.SPLITBYSRVMM);
GetOrAndSrvSplitSqlRsBP srvBp = new GetOrAndSrvSplitSqlRsBP();
SrvSplitOrderDTO[] srvSplitRes = (SrvSplitOrderDTO[]) srvBp.exec(param);
if (srvSplitRes != null) {
// 服务拆分
SplitOrAndSrvSplitSqlRsBP srvSplitbp = new SplitOrAndSrvSplitSqlRsBP();
srvSplitRes = (SrvSplitOrderDTO[]) srvSplitbp.exec(srvSplitRes, null, param.getDt_split_end(), OrGenSplitTpEnum.SPLITBYSRVMM);
if (srvSplitRes != null) {
for (SrvSplitOrderDTO srvSplitOrderDTO : srvSplitRes) {
splitSrvArry.add(srvSplitOrderDTO);
}
}
reDTO.setSrvsplitarry(splitSrvArry);
}
return reDTO;
}
}
|
[
"27696830@qq.com"
] |
27696830@qq.com
|
1c6f66ce0721b411abcca25f54befa1da5aa2217
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/5/org/apache/commons/lang3/text/StrBuilder_equalsIgnoreCase_2645.java
|
a3a41499ee3fd304aee062d5b0c71798a1ae5121
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 4,351
|
java
|
org apach common lang3 text
build string constitu part provid flexibl power api
string buffer stringbuff
main differ string buffer stringbuff string builder stringbuild
subclass direct access charact arrai
addit method
append separ appendwithsepar add arrai valu separ
append pad appendpad add length pad charact
append fix length appendfixedlength add fix width field builder
char arrai tochararrai char getchar simpler wai rang charact arrai
delet delet string
replac search replac string
left string leftstr string rightstr mid string midstr substr except
builder string
size clear empti isempti collect style api method
view
token astoken intern buffer sourc str token strtoken
reader asread intern buffer sourc reader
writer aswrit writer write directli intern buffer
aim provid api mimic close string buffer stringbuff
addit method note edg case
invalid indic input alter individu method
biggest output text
'null' control properti link set null text setnulltext string
prior implement cloneabl implement
clone method onward longer
version
str builder strbuilder char sequenc charsequ append serializ builder string
check content builder
charact content ignor
param object check return
builder charact order
equal ignor case equalsignorecas str builder strbuilder
size size
buf thisbuf buffer
buf otherbuf buffer
size
buf thisbuf
buf otherbuf
charact upper case touppercas charact upper case touppercas
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
9a160f5c49ec27c07c97de1a6fae329c28c49492
|
bb556c79fd75c0fa2832b2c6d89d3b6771647398
|
/AnimationForView/addanimationbyxml/build/generated/source/buildConfig/debug/com/example/user/addanimationbyxml/BuildConfig.java
|
4816bd946f626eb6056e9afc9ac0c238c54d365c
|
[] |
no_license
|
CJAW/Android
|
86f665ffc3ed8e6e126be5701c702417bcc2b156
|
a653ad376e36d51a04cfc8b9990037e720fbf653
|
refs/heads/master
| 2020-06-25T22:35:21.163877
| 2017-07-12T11:52:27
| 2017-07-12T11:52:27
| 96,979,777
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 475
|
java
|
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.example.user.addanimationbyxml;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.example.user.addanimationbyxml";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}
|
[
"847400153@qq.com"
] |
847400153@qq.com
|
5034e0f968f8a46c2050d1ea065f2d6190f68a4c
|
3a11e86e5832e16be1e39bd9e75f2fff13356083
|
/modules/cpr/src/main/java/org/atmosphere/util/analytics/GoogleAnalytics_v1_URLBuildingStrategy.java
|
6858e1566292decf6dad58e986c4b1225aa6b509
|
[] |
no_license
|
srikanthprathi/atmosphere
|
a4361c25bb349513c69a8e9f74bc9fd6487c74aa
|
9bc772b27501846050e23df3e661fd8bbcbb1ea5
|
refs/heads/atmosphere-2.7.x
| 2023-08-28T23:00:51.836564
| 2021-10-06T18:21:38
| 2021-10-06T18:21:38
| 414,752,280
| 0
| 0
| null | 2021-10-07T20:44:55
| 2021-10-07T20:43:51
| null |
UTF-8
|
Java
| false
| false
| 3,789
|
java
|
/*
* Copyright 2008-2021 Async-IO.org
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.atmosphere.util.analytics;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Date;
import java.util.Random;
/**
* Fork of https://code.google.com/p/jgoogleanalytics/
* <p/>
* URL building logic for the earlier versions of google analytics (urchin.js)
*
* @author : Siddique Hameed
* @version : 0.1
*/
public class GoogleAnalytics_v1_URLBuildingStrategy implements URLBuildingStrategy {
private FocusPoint appFocusPoint;
private String googleAnalyticsTrackingCode;
private String refererURL = "http://async-io.org";
private static final String TRACKING_URL_Prefix = "http://www.google-analytics.com/__utm.gif";
private static final Random random = new Random();
private static String hostName = "localhost";
static {
try {
hostName = InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException e) {
//ignore this
}
}
public GoogleAnalytics_v1_URLBuildingStrategy(String appName, String googleAnalyticsTrackingCode) {
this.googleAnalyticsTrackingCode = googleAnalyticsTrackingCode;
this.appFocusPoint = new FocusPoint(appName);
}
public GoogleAnalytics_v1_URLBuildingStrategy(String appName, String appVersion, String googleAnalyticsTrackingCode) {
this.googleAnalyticsTrackingCode = googleAnalyticsTrackingCode;
this.appFocusPoint = new FocusPoint(appVersion, new FocusPoint(appName));
}
public String buildURL(FocusPoint focusPoint) {
int cookie = random.nextInt();
int randomValue = random.nextInt(2147483647) - 1;
long now = new Date().getTime();
focusPoint.setParentTrackPoint(appFocusPoint);
StringBuffer url = new StringBuffer(TRACKING_URL_Prefix);
url.append("?utmwv=1"); //Urchin/Analytics version
url.append("&utmn=" + random.nextInt());
url.append("&utmcs=UTF-8"); //document encoding
url.append("&utmsr=1440x900"); //screen resolution
url.append("&utmsc=32-bit"); //color depth
url.append("&utmul=en-us"); //user language
url.append("&utmje=1"); //java enabled
url.append("&utmfl=9.0%20%20r28"); //flash
url.append("&utmcr=1"); //carriage return
url.append("&utmdt=" + focusPoint.getContentTitle()); //The optimum keyword density //document title
url.append("&utmhn=" + hostName);//document hostname
url.append("&utmr=" + refererURL); //referer URL
url.append("&utmp=" + focusPoint.getContentURI());//document page URL
url.append("&utmac=" + googleAnalyticsTrackingCode);//Google Analytics account
url.append("&utmcc=__utma%3D'" + cookie + "." + randomValue + "." + now + "." + now + "." + now + ".2%3B%2B__utmb%3D" + cookie + "%3B%2B__utmc%3D" + cookie + "%3B%2B__utmz%3D" + cookie + "." + now + ".2.2.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D" + cookie);
return url.toString();
}
public void setRefererURL(String refererURL) {
this.refererURL = refererURL;
}
}
|
[
"jfarcand@apache.org"
] |
jfarcand@apache.org
|
5be423a0c74b684052b5bf74967e6be9791b831d
|
d5d15a961932bb798f3ce0b031cd008ec21c07ce
|
/spring-aop02/src/test/java/com/pymxb/AopTest.java
|
423eba41c988b0da6fb7b85e19b8fcbfb0fa4260
|
[] |
no_license
|
pymxb1991/arjpymxb
|
1d3c5fa670e738994eaf26686cfc119d5615239f
|
026ad88fad21bf02a629849cf7f0b54a9609a4c5
|
refs/heads/master
| 2022-12-25T12:06:36.951376
| 2022-03-31T05:25:01
| 2022-03-31T05:25:01
| 250,098,753
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 618
|
java
|
package com.pymxb;
import com.pymxb.service.IAccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class AopTest {
public static void main(String[] args) {
//1获取容器
ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");
//2、获取Bean对象
IAccountService as = (IAccountService) ac.getBean("accountService");
//3、执行方法
as.saveAccount();
// 如果想要执行出异常通知,可以进行让抛出个异常1/0
}
}
|
[
"pymxb1991@163.com"
] |
pymxb1991@163.com
|
d70014eaa63c37a54022c94b4385a05b1826e592
|
bcd3e4f512e4c2d380f14c74398becc6d1c64831
|
/cloud-stub/src/main/java/com/atlassian/jira/rest/client/model/JsonTypeBean.java
|
c2b634311bed81e721fa6e5bcf054e88936fa068
|
[] |
no_license
|
nemaneeraj/jira-cloud-client
|
49d80a0b83ad8c498ad0956749b8d151fda223e8
|
2b31386611598f696dad3fe581527fe8c1757111
|
refs/heads/master
| 2023-07-16T22:58:08.824520
| 2021-09-05T18:41:24
| 2021-09-05T18:41:24
| 403,384,914
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,468
|
java
|
/*
* The Jira Cloud platform REST API
* Jira Cloud platform REST API documentation
*
* OpenAPI spec version: 1001.0.0-SNAPSHOT
* Contact: ecosystem@atlassian.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.atlassian.jira.rest.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* The schema of a field.
*/
@Schema(description = "The schema of a field.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2021-03-17T19:36:29.866+05:30[Asia/Kolkata]")
public class JsonTypeBean {
@JsonProperty("type")
private String type = null;
@JsonProperty("items")
private String items = null;
@JsonProperty("system")
private String system = null;
@JsonProperty("custom")
private String custom = null;
@JsonProperty("customId")
private Long customId = null;
@JsonProperty("configuration")
private Map<String, Object> _configuration = null;
/**
* The data type of the field.
* @return type
**/
@Schema(required = true, description = "The data type of the field.")
public String getType() {
return type;
}
/**
* When the data type is an array, the name of the field items within the array.
* @return items
**/
@Schema(description = "When the data type is an array, the name of the field items within the array.")
public String getItems() {
return items;
}
/**
* If the field is a system field, the name of the field.
* @return system
**/
@Schema(description = "If the field is a system field, the name of the field.")
public String getSystem() {
return system;
}
/**
* If the field is a custom field, the URI of the field.
* @return custom
**/
@Schema(description = "If the field is a custom field, the URI of the field.")
public String getCustom() {
return custom;
}
/**
* If the field is a custom field, the custom ID of the field.
* @return customId
**/
@Schema(description = "If the field is a custom field, the custom ID of the field.")
public Long getCustomId() {
return customId;
}
/**
* If the field is a custom field, the configuration of the field.
* @return _configuration
**/
@Schema(description = "If the field is a custom field, the configuration of the field.")
public Map<String, Object> getConfiguration() {
return _configuration;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
JsonTypeBean jsonTypeBean = (JsonTypeBean) o;
return Objects.equals(this.type, jsonTypeBean.type) &&
Objects.equals(this.items, jsonTypeBean.items) &&
Objects.equals(this.system, jsonTypeBean.system) &&
Objects.equals(this.custom, jsonTypeBean.custom) &&
Objects.equals(this.customId, jsonTypeBean.customId) &&
Objects.equals(this._configuration, jsonTypeBean._configuration);
}
@Override
public int hashCode() {
return Objects.hash(type, items, system, custom, customId, _configuration);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class JsonTypeBean {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" items: ").append(toIndentedString(items)).append("\n");
sb.append(" system: ").append(toIndentedString(system)).append("\n");
sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
sb.append(" customId: ").append(toIndentedString(customId)).append("\n");
sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"neeraj.nema@unthinkable.co"
] |
neeraj.nema@unthinkable.co
|
442553b9698c428e7060343f5c1ad89ea2b7241a
|
bd645abeda330179c724bb8c3198d18907af848d
|
/WebinterfaceAPI/src/main/java/me/mrletsplay/webinterfaceapi/page/element/TitleText.java
|
0ea3843f54fb9b62fd7ded7bef2e67fd85ab551c
|
[] |
no_license
|
MrLetsplay2003/WebinterfaceAPI
|
126c9feae60a07c4461eb9b9c7ffe14120bf00e9
|
b41622ff9275be86fc946824230fb3759b3f28ac
|
refs/heads/master
| 2023-07-21T07:47:34.422872
| 2023-07-14T18:41:20
| 2023-07-14T18:41:20
| 198,411,770
| 1
| 1
| null | 2020-07-11T11:31:09
| 2019-07-23T10:54:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,488
|
java
|
package me.mrletsplay.webinterfaceapi.page.element;
import java.util.function.Supplier;
import me.mrletsplay.simplehttpserver.dom.html.HtmlElement;
import me.mrletsplay.webinterfaceapi.page.element.builder.AbstractElementBuilder;
public class TitleText extends AbstractPageElement {
private Supplier<String> text;
public TitleText(Supplier<String> text) {
this.text = text;
}
public TitleText(String text) {
this(() -> text);
}
private TitleText() {}
public void setText(Supplier<String> text) {
this.text = text;
}
public void setText(String text) {
setText(() -> text);
}
public Supplier<String> getText() {
return text;
}
@Override
public HtmlElement createElement() {
HtmlElement b = new HtmlElement("b");
b.setText(text);
return b;
}
public static Builder builder() {
return new Builder(new TitleText());
}
public static class Builder extends AbstractElementBuilder<TitleText, Builder> {
private Builder(TitleText element) {
super(element);
}
public Builder text(String text) {
element.setText(text);
return this;
}
public Builder text(Supplier<String> text) {
element.setText(text);
return this;
}
public Builder noLineBreaks() {
element.getStyle().setProperty("white-space", "nowrap");
return this;
}
@Override
public TitleText create() throws IllegalStateException {
if(element.getText() == null) throw new IllegalStateException("No text set");
return super.create();
}
}
}
|
[
"mr.letsplay2003@gmail.com"
] |
mr.letsplay2003@gmail.com
|
9dbf0a9bffd75901cb24fc18fd50ceddd30e373f
|
09ca502b44715c987b65fc3e06d41e60d4d08bc0
|
/bonita-server/src/main/java/org/ow2/bonita/runtime/hibernate/ConverterType.java
|
37f9aaf2f7db324c042eae98de6a5971172287d1
|
[] |
no_license
|
fivegg/bbonita-runtime-5-10-1
|
29b51fe1fd18c7307809c50c28f3a33aab63786d
|
585aa4ca3cf14771f03d087cfb82237aff99897d
|
refs/heads/master
| 2016-09-05T09:47:31.631120
| 2013-12-20T03:03:11
| 2013-12-20T03:03:11
| 14,005,787
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,695
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This 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 (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.ow2.bonita.runtime.hibernate;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import org.hibernate.HibernateException;
import org.hibernate.type.ImmutableType;
import org.hibernate.usertype.ParameterizedType;
import org.ow2.bonita.type.Converter;
import org.ow2.bonita.util.BonitaRuntimeException;
import org.ow2.bonita.util.ExceptionManager;
import org.ow2.bonita.util.ReflectUtil;
/**
* @author Tom Baeyens
*/
public class ConverterType extends ImmutableType implements ParameterizedType {
private static final long serialVersionUID = 1L;
private Map<Class< ? >, String> converterNames = null;
private Map<String, Converter> converters = null;
public Object fromStringValue(String arg0) throws HibernateException {
return null;
}
public Object get(ResultSet resultSet, String name) throws HibernateException, SQLException {
String converterName = resultSet.getString(name);
return converters.get(converterName);
}
public void set(PreparedStatement stmt, Object value, int index) throws HibernateException, SQLException {
String converterName = value != null ? converterNames
.get(value.getClass()) : null;
stmt.setString(index, converterName);
}
public int sqlType() {
return Types.VARCHAR;
}
public String toString(Object arg0) throws HibernateException {
return null;
}
public String getName() {
return "converter";
}
public Class< ? > getReturnedClass() {
return Converter.class;
}
public void setParameterValues(Properties properties) {
converterNames = new HashMap<Class< ? >, String>();
converters = new HashMap<String, Converter>();
for (Object key : properties.keySet()) {
String converterClassName = (String) key;
try {
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
Class< ? > converterClass = ReflectUtil.loadClass(classLoader,
converterClassName);
String converterName = properties.getProperty(converterClassName);
converterNames.put(converterClass, converterName);
Converter converter = (Converter) converterClass.newInstance();
converters.put(converterName, converter);
} catch (Exception e) {
String message = ExceptionManager.getInstance().getFullMessage(
"bp_CT_1", converterClassName);
throw new BonitaRuntimeException(message, e);
}
}
}
}
|
[
"fivegg@163.com"
] |
fivegg@163.com
|
343237a6098b88c043951a0f813cc45f5e20dde2
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/88_jopenchart-de.progra.charting.render.RowColorModel-1.0-8/de/progra/charting/render/RowColorModel_ESTest_scaffolding.java
|
0937e3c7b92baf2e3041d5229472da743efffb8d
|
[] |
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
| 545
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Oct 26 00:00:43 GMT 2019
*/
package de.progra.charting.render;
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 RowColorModel_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
1f29294a3184309043afb521dbe637148375022c
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/JetBrains--intellij-community/24e0ca649359b6790a8c6d72d1fd2d8d73fedf16/before/PsiJavaFileImpl.java
|
96b42de08f7de666edbdf92e0c4ae2c390a4f9bc
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 681
|
java
|
package com.intellij.psi.impl.source;
import com.intellij.lexer.JavaLexer;
import com.intellij.lexer.Lexer;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.fileTypes.StdFileTypes;
import com.intellij.psi.FileViewProvider;
import org.jetbrains.annotations.NotNull;
public class PsiJavaFileImpl extends PsiJavaFileBaseImpl {
public PsiJavaFileImpl(FileViewProvider file) {
super(JAVA_FILE, JAVA_FILE, file);
}
public String toString(){
return "PsiJavaFile:" + getName();
}
public Lexer createLexer() {
return new JavaLexer(getLanguageLevel());
}
@NotNull
public FileType getFileType() {
return StdFileTypes.JAVA;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
8e3f7b378eb592f405c5d21fb14d9f88b64409ae
|
a6923e1e56cdbc8bc354cba3e4f699c5f132ae1a
|
/pcapi/app-client-api/app-client-api-dao/src/main/java/com/fenlibao/p2p/dao/impl/PublicAccessoryDaoImpl.java
|
6b8acda5f97dd3260e84489e4a85e97211159f1b
|
[] |
no_license
|
mddonly/modules
|
851b8470069aca025ea63db4b79ad281e384216f
|
22dd100304e86a17bea733a8842a33123f892312
|
refs/heads/master
| 2020-03-28T03:26:51.960201
| 2018-05-11T02:24:37
| 2018-05-11T02:24:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 865
|
java
|
package com.fenlibao.p2p.dao.impl;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Repository;
import com.dimeng.p2p.S62.entities.T6232;
import com.fenlibao.p2p.dao.PublicAccessoryDao;
import com.fenlibao.p2p.model.entity.bid.BidFiles;
@Repository
public class PublicAccessoryDaoImpl implements PublicAccessoryDao{
@Resource
private SqlSession sqlSession;
private static final String MAPPER = "PublicAccessoryMapper.";
@Override
public List<T6232> getPublicAccessory(Map<String, Object> map) {
return this.sqlSession.selectList(MAPPER+"getPublicAccessory", map);
}
@Override
public List<BidFiles> getPublicAccessoryFiles(Map<String, Object> map) {
return this.sqlSession.selectList(MAPPER+"getPublicAccessoryFiles", map);
}
}
|
[
"13632415004@163.com"
] |
13632415004@163.com
|
a74fc7c0935a31f517244ef397d967ce7f3bd6d1
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/protocal/protobuf/zp.java
|
735815ce12a19378121a3fc1fa7dda451af1e1de
|
[] |
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
| 5,006
|
java
|
package com.tencent.mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import i.a.a.b;
import java.util.LinkedList;
public final class zp
extends esc
{
public String YGP;
public ml Zij;
public fe Zik;
public final int op(int paramInt, Object... paramVarArgs)
{
AppMethodBeat.i(257441);
if (paramInt == 0)
{
paramVarArgs = (i.a.a.c.a)paramVarArgs[0];
if (this.BaseResponse == null)
{
paramVarArgs = new b("Not all required fields were included: BaseResponse");
AppMethodBeat.o(257441);
throw paramVarArgs;
}
if (this.BaseResponse != null)
{
paramVarArgs.qD(1, this.BaseResponse.computeSize());
this.BaseResponse.writeFields(paramVarArgs);
}
if (this.YGP != null) {
paramVarArgs.g(2, this.YGP);
}
if (this.Zij != null)
{
paramVarArgs.qD(3, this.Zij.computeSize());
this.Zij.writeFields(paramVarArgs);
}
if (this.Zik != null)
{
paramVarArgs.qD(4, this.Zik.computeSize());
this.Zik.writeFields(paramVarArgs);
}
AppMethodBeat.o(257441);
return 0;
}
if (paramInt == 1) {
if (this.BaseResponse == null) {
break label656;
}
}
label656:
for (int i = i.a.a.a.qC(1, this.BaseResponse.computeSize()) + 0;; i = 0)
{
paramInt = i;
if (this.YGP != null) {
paramInt = i + i.a.a.b.b.a.h(2, this.YGP);
}
i = paramInt;
if (this.Zij != null) {
i = paramInt + i.a.a.a.qC(3, this.Zij.computeSize());
}
paramInt = i;
if (this.Zik != null) {
paramInt = i + i.a.a.a.qC(4, this.Zik.computeSize());
}
AppMethodBeat.o(257441);
return paramInt;
if (paramInt == 2)
{
paramVarArgs = new i.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = esc.getNextFieldNumber(paramVarArgs); paramInt > 0; paramInt = esc.getNextFieldNumber(paramVarArgs)) {
if (!super.populateBuilderWithField(paramVarArgs, this, paramInt)) {
paramVarArgs.kFT();
}
}
if (this.BaseResponse == null)
{
paramVarArgs = new b("Not all required fields were included: BaseResponse");
AppMethodBeat.o(257441);
throw paramVarArgs;
}
AppMethodBeat.o(257441);
return 0;
}
if (paramInt == 3)
{
Object localObject1 = (i.a.a.a.a)paramVarArgs[0];
zp localzp = (zp)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
Object localObject2;
switch (paramInt)
{
default:
AppMethodBeat.o(257441);
return -1;
case 1:
paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject1 = (byte[])paramVarArgs.get(paramInt);
localObject2 = new kd();
if ((localObject1 != null) && (localObject1.length > 0)) {
((kd)localObject2).parseFrom((byte[])localObject1);
}
localzp.BaseResponse = ((kd)localObject2);
paramInt += 1;
}
AppMethodBeat.o(257441);
return 0;
case 2:
localzp.YGP = ((i.a.a.a.a)localObject1).ajGk.readString();
AppMethodBeat.o(257441);
return 0;
case 3:
paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject1 = (byte[])paramVarArgs.get(paramInt);
localObject2 = new ml();
if ((localObject1 != null) && (localObject1.length > 0)) {
((ml)localObject2).parseFrom((byte[])localObject1);
}
localzp.Zij = ((ml)localObject2);
paramInt += 1;
}
AppMethodBeat.o(257441);
return 0;
}
paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject1 = (byte[])paramVarArgs.get(paramInt);
localObject2 = new fe();
if ((localObject1 != null) && (localObject1.length > 0)) {
((fe)localObject2).parseFrom((byte[])localObject1);
}
localzp.Zik = ((fe)localObject2);
paramInt += 1;
}
AppMethodBeat.o(257441);
return 0;
}
AppMethodBeat.o(257441);
return -1;
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: com.tencent.mm.protocal.protobuf.zp
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
1464a40e7804627c4a16a42e73aa6755f139b406
|
e5feba88024c1c4e4ac677ca93f5d5b6c2d5e80f
|
/src/main/java/com/bjpowernode/crm/workbench/domain/ContactsRemark.java
|
fae709cc9bae88e0afa93c9e62048796da02d8e2
|
[] |
no_license
|
codinglxj/crm
|
28f8badb376d892f95420b17d97c20c11eb7195c
|
0e75dcdec4acfc4891f9d433a3ebbb1f0d55b134
|
refs/heads/master
| 2023-04-02T23:45:37.288472
| 2021-04-06T08:41:28
| 2021-04-06T08:41:28
| 347,326,864
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,314
|
java
|
package com.bjpowernode.crm.workbench.domain;
public class ContactsRemark {
private String id;
private String noteContent;
private String createTime;
private String createBy;
private String editTime;
private String editBy;
private String editFlag;
private String contactsId;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getNoteContent() {
return noteContent;
}
public void setNoteContent(String noteContent) {
this.noteContent = noteContent;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getEditTime() {
return editTime;
}
public void setEditTime(String editTime) {
this.editTime = editTime;
}
public String getEditBy() {
return editBy;
}
public void setEditBy(String editBy) {
this.editBy = editBy;
}
public String getEditFlag() {
return editFlag;
}
public void setEditFlag(String editFlag) {
this.editFlag = editFlag;
}
public String getContactsId() {
return contactsId;
}
public void setContactsId(String contactsId) {
this.contactsId = contactsId;
}
}
|
[
"zs@bjpowernode.com"
] |
zs@bjpowernode.com
|
2c97948672308b64e7db9fc19e4a8a08769a61e3
|
e787c556a822380e6a9d1fe9dd162fac288684f3
|
/core/nifi-provenance/nifi-provenance-model/src/main/java/com/thinkbiganalytics/nifi/provenance/model/stats/GroupedStatsIdentity.java
|
e1510aef869d8f502cab28ce69cc4b55423b401e
|
[
"WTFPL",
"CDDL-1.0",
"MIT",
"CC0-1.0",
"EPL-1.0",
"PostgreSQL",
"BSD-3-Clause",
"LGPL-2.1-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-protobuf",
"OFL-1.1"
] |
permissive
|
rohituppalapati/kylo-source
|
82bd8e788a14a33edcff8ac6306245c230e90665
|
cc794fb8a128a1bb6453e029ab7f6354e75c863e
|
refs/heads/master
| 2022-12-28T08:14:32.280826
| 2019-08-13T18:16:31
| 2019-08-13T18:16:31
| 200,886,840
| 0
| 0
|
Apache-2.0
| 2022-12-16T03:26:58
| 2019-08-06T16:23:27
|
Java
|
UTF-8
|
Java
| false
| false
| 2,329
|
java
|
package com.thinkbiganalytics.nifi.provenance.model.stats;
/*-
* #%L
* thinkbig-nifi-provenance-model
* %%
* Copyright (C) 2017 ThinkBig Analytics
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.Serializable;
public class GroupedStatsIdentity implements Serializable{
private static final long serialVersionUID = 7545615440353964029L;
private String processorId;
private String processorName;
public GroupedStatsIdentity() {
}
public GroupedStatsIdentity(String processorId, String processorName) {
this.processorId = processorId;
this.processorName = processorName;
}
public String getProcessorId() {
return processorId;
}
public void setProcessorId(String processorId) {
this.processorId = processorId;
}
public String getProcessorName() {
return processorName;
}
public void setProcessorName(String processorName) {
this.processorName = processorName;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof GroupedStatsIdentity)) {
return false;
}
GroupedStatsIdentity that = (GroupedStatsIdentity) o;
if (processorId != null ? !processorId.equals(that.processorId) : that.processorId != null) {
return false;
}
if (processorName != null ? !processorName.equals(that.processorName) : that.processorName != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = processorId != null ? processorId.hashCode() : 0;
result = 31 * result + (processorName != null ? processorName.hashCode() : 0);
return result;
}
}
|
[
"rohituppalapati@Rohits-MacBook-Pro.local"
] |
rohituppalapati@Rohits-MacBook-Pro.local
|
1b4f20966d67704389f217e659e837246ea1d4a3
|
7f20b1bddf9f48108a43a9922433b141fac66a6d
|
/core3/api/tags/api-parent-3.0.0-beta1/viewmodel-api/src/main/java/org/cytoscape/view/model/events/AboutToRemoveNodeViewsEvent.java
|
4d32fe57a26f55a2830529e5c3e87dd2bcf2fa86
|
[] |
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
| 1,181
|
java
|
package org.cytoscape.view.model.events;
import java.util.Collection;
import org.cytoscape.event.AbstractCyEvent;
import org.cytoscape.view.model.CyNetworkView;
import org.cytoscape.view.model.View;
import org.cytoscape.model.CyNode;
/**
* When node {@link View}s are about to be removed from a {@linkplain CyNetworkView}, this event will be fired.
* @CyAPI.Final.Class
*/
public final class AboutToRemoveNodeViewsEvent extends AbstractCyEvent<CyNetworkView> {
private final Collection<View<CyNode>> payload;
/**
* Creates the event for about to be removed node views.
*
* @param source network view which includes the node views about to be removed.
* @param payload Collection of node view objects about to be removed.
*
*/
public AboutToRemoveNodeViewsEvent(CyNetworkView source, Collection<View<CyNode>> payload) {
super(source,AboutToRemoveNodeViewsListener.class);
this.payload = payload;
}
/**
* Returns a Collection of Views of type CyNode that are about to be removed.
* @return a Collection of Views of type CyNode that are about to be removed.
* */
public Collection<View<CyNode>> getNodeViews() {
return payload;
}
}
|
[
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] |
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
|
507f8a02a938454f26b02741720f47a50768c81f
|
75e629198d299b4533e863329d75004e59d3d17b
|
/app/src/main/java/com/squalala/hardgamerdz/data/api/ApiModule.java
|
78c1b2d1abc2046868e385de7ca554e576fe6063
|
[] |
no_license
|
matutes/HardGamerz
|
1d30a2f9e02c9918818d6fd8553062adf54151cd
|
c5bd1767d27b7d6871a2af693c8bd47920487600
|
refs/heads/master
| 2020-05-03T19:37:43.613849
| 2017-04-08T17:25:49
| 2017-04-08T17:25:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,457
|
java
|
package com.squalala.hardgamerdz.data.api;
import android.app.Application;
import android.util.Log;
import com.squalala.hardgamerdz.common.AppConstants;
import com.squalala.hardgamerdz.utils.ConnectionDetector;
import com.squareup.okhttp.Cache;
import com.squareup.okhttp.OkHttpClient;
import java.io.File;
import java.util.concurrent.TimeUnit;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import hugo.weaving.DebugLog;
import retrofit.Endpoint;
import retrofit.Endpoints;
import retrofit.RequestInterceptor;
import retrofit.RestAdapter;
import retrofit.client.OkClient;
/**
* Auteur : Fayçal Kaddouri
* Nom du fichier : ApiModule.java
* Date : 21 juin 2014
*
*/
@Module
public final class ApiModule {
private static final String TAG = ApiModule.class.getSimpleName();
@Provides
@Singleton Endpoint provideEndpoint() {
return Endpoints.newFixedEndpoint(AppConstants.API_URL);
}
@Provides
@Singleton
RestAdapter provideRestAdapter(Endpoint endpoint, final Application app) {
int cacheSize = 10 * 1024 * 1024; // 10 MiB
File cacheDirectory = new File(app.getCacheDir().getAbsolutePath(), "HttpCache");
Cache cache = new Cache(cacheDirectory, cacheSize);
OkHttpClient client = new OkHttpClient();
client.setCache(cache);
client.setConnectTimeout(5, TimeUnit.MINUTES);
client.setReadTimeout(5, TimeUnit.MINUTES);
// client.setReadTimeout(60, TimeUnit.SECONDS); // socket timeout
return new RestAdapter.Builder()
.setLogLevel(RestAdapter.LogLevel.BASIC)
.setEndpoint(endpoint)
.setRequestInterceptor(new RequestInterceptor() {
@Override
public void intercept(RequestFacade request) {
request.addHeader("Accept", "application/json;versions=1");
if (ConnectionDetector.isConnectingToInternet(app)) {
Log.e(TAG, "Pas de cache");
int maxAge = 60; // read from cache for 1 minute
request.addHeader("Cache-Control", "public, max-age=" + maxAge);
}
else {
Log.e(TAG, "Utilisation du cache");
int maxStale = 60 * 60 * 24 * 28; // tolerate 4-weeks stale
request.addHeader("Cache-Control",
"public, only-if-cached, max-stale=" + maxStale);
}
}
})
.setClient(new OkClient(client))
.build();
}
@DebugLog
@Provides
@Singleton
PostService providePostService(RestAdapter restAdapter) {
return restAdapter.create(PostService.class);
}
}
|
[
"powervlagos@gmail.com"
] |
powervlagos@gmail.com
|
9852ca9b44af9c002c6da31b72fdaa839381e389
|
126f6353d489ad721cb3062d38788437eeb7125a
|
/eclipse-sarl/plugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/oop/newanno/NewSarlAnnotationWizardPage.java
|
69b53615e9a62528b8a691079872b5d8fd07ffa6
|
[
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
amit2011/sarl
|
69c89812c684f0e7012efc1417f0e9c49ff21331
|
243a8382d9a467fc0e6f9fe649152ebefb874388
|
refs/heads/master
| 2021-01-13T03:58:02.730346
| 2016-12-21T15:01:54
| 2016-12-21T15:01:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,338
|
java
|
/*
* $Id$
*
* SARL is an general-purpose agent programming language.
* More details on http://www.sarl.io
*
* Copyright (C) 2014-2016 the original authors or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.sarl.eclipse.wizards.elements.oop.newanno;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.xtext.common.types.access.IJvmTypeProvider;
import org.eclipse.xtext.xbase.compiler.ISourceAppender;
import io.sarl.eclipse.SARLEclipsePlugin;
import io.sarl.eclipse.wizards.elements.AbstractNewSarlElementWizardPage;
import io.sarl.lang.codebuilder.appenders.ScriptSourceAppender;
import io.sarl.lang.codebuilder.builders.ISarlAnnotationTypeBuilder;
/**
* Wizard page for creating a new SARL annotation.
*
* @author $Author: sgalland$
* @version $FullVersion$
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
*/
public class NewSarlAnnotationWizardPage extends AbstractNewSarlElementWizardPage {
private static final String IMAGE_HEADER =
"platform:/plugin/org.eclipse.jdt.ui/icons/full/wizban/newannotation_wiz.png"; //$NON-NLS-1$
/** Construct a wizard page.
*/
public NewSarlAnnotationWizardPage() {
super(CLASS_TYPE, Messages.NewSarlAnnotationWizard_0);
setTitle(Messages.NewSarlAnnotationWizard_0);
setDescription(Messages.NewSarlAnnotationWizardPage_0);
setImageDescriptor(SARLEclipsePlugin.getDefault().getImageDescriptor(IMAGE_HEADER));
}
@Override
public void createPageControls(Composite parent) {
//
}
@Override
protected void doStatusUpdate() {
final IStatus[] status = new IStatus[] {
this.fContainerStatus,
this.fPackageStatus,
this.fTypeNameStatus,
};
updateStatus(status);
}
@Override
protected void generateTypeContent(ISourceAppender appender, IJvmTypeProvider typeProvider,
String comment, IProgressMonitor monitor) throws Exception {
final SubMonitor mon = SubMonitor.convert(monitor, 2);
final ScriptSourceAppender scriptBuilder = this.codeBuilderFactory.buildScript(
getPackageFragment().getElementName(), typeProvider);
final ISarlAnnotationTypeBuilder annotation = scriptBuilder.addSarlAnnotationType(getTypeName());
annotation.setDocumentation(comment);
mon.worked(1);
scriptBuilder.build(appender);
mon.done();
}
@Override
protected String getExistingElementErrorMessage() {
return Messages.NewSarlAnnotationWizardPage_1;
}
@Override
protected String getInvalidSubtypeErrorMessage() {
return null;
}
@Override
protected IType getRootSuperType() throws JavaModelException {
return getJavaProject().findType(Object.class.getName());
}
}
|
[
"galland@arakhne.org"
] |
galland@arakhne.org
|
66566b927f004a40f07e5f38a7b23fb6c471ad0b
|
e47823f99752ec2da083ac5881f526d4add98d66
|
/test_data/14_Azureus2.3.0.6/src/org/gudy/azureus2/core3/tracker/server/impl/udp/TRTrackerServerUDP.java
|
211c5ec744dbaf41314383087f5d26bc893a6a9e
|
[] |
no_license
|
Echtzeitsysteme/hulk-ase-2016
|
1dee8aca80e2425ab6acab18c8166542dace25cd
|
fbfb7aee1b9f29355a20e365f03bdf095afe9475
|
refs/heads/master
| 2020-12-24T05:31:49.671785
| 2017-05-04T08:18:32
| 2017-05-04T08:18:32
| 56,681,308
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,141
|
java
|
/*
* File : TRTrackerServerUDP.java
* Created : 19-Jan-2004
* By : parg
*
* Azureus - a Java Bittorrent client
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details ( see the LICENSE file ).
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.gudy.azureus2.core3.tracker.server.impl.udp;
/**
* @author parg
*
*/
import java.net.*;
import org.gudy.azureus2.core3.util.*;
import org.gudy.azureus2.core3.config.*;
import org.gudy.azureus2.core3.logging.*;
import org.gudy.azureus2.core3.tracker.server.*;
import org.gudy.azureus2.core3.tracker.server.impl.*;
import com.aelitis.net.udp.PRUDPPacket;
public class
TRTrackerServerUDP
extends TRTrackerServerImpl
{
protected static final int THREAD_POOL_SIZE = 10;
protected ThreadPool thread_pool;
protected int port;
public
TRTrackerServerUDP(
String _name,
int _port )
{
super( _name );
port = _port;
thread_pool = new ThreadPool( "TrackerServer:UDP:"+port, THREAD_POOL_SIZE );
try{
String bind_ip = COConfigurationManager.getStringParameter("Bind IP", "");
InetSocketAddress address;
DatagramSocket socket;
if ( bind_ip.length() == 0 ){
address = new InetSocketAddress(InetAddress.getByName("127.0.0.1"),port);
socket = new DatagramSocket( port );
}else{
address = new InetSocketAddress(InetAddress.getByName(bind_ip), port);
socket = new DatagramSocket(address);
}
socket.setReuseAddress(true);
final DatagramSocket f_socket = socket;
final InetSocketAddress f_address = address;
Thread recv_thread =
new AEThread("TRTrackerServerUDP:recv.loop")
{
public void
runSupport()
{
recvLoop( f_socket, f_address );
}
};
recv_thread.setDaemon( true );
recv_thread.start();
LGLogger.log( "TRTrackerServerUDP: recv established on port " + port );
}catch( Throwable e ){
LGLogger.log( "TRTrackerServerUDP: DatagramSocket bind failed on port " + port, e );
}
}
protected void
recvLoop(
DatagramSocket socket,
InetSocketAddress address )
{
long successful_accepts = 0;
long failed_accepts = 0;
while(true){
try{
byte[] buf = new byte[PRUDPPacket.MAX_PACKET_SIZE];
DatagramPacket packet = new DatagramPacket( buf, buf.length, address );
socket.receive( packet );
successful_accepts++;
failed_accepts = 0;
String ip = packet.getAddress().getHostAddress();
if ( !ip_filter.isInRange( ip, "Tracker" )){
thread_pool.run( new TRTrackerServerProcessorUDP( this, socket, packet ));
}
}catch( Throwable e ){
failed_accepts++;
LGLogger.log( "TRTrackerServer: receive failed on port " + port, e );
if (( failed_accepts > 100 && successful_accepts == 0 ) || failed_accepts > 1000 ){
// looks like its not going to work...
// some kind of socket problem
LGLogger.logUnrepeatableAlertUsingResource(
LGLogger.AT_ERROR,
"Network.alert.acceptfail",
new String[]{ ""+port, "UDP" } );
break;
}
}
}
}
public int
getPort()
{
return( port );
}
public String
getHost()
{
return( COConfigurationManager.getStringParameter( "Tracker IP", "" ));
}
public boolean
isSSL()
{
return( false );
}
public void
addRequestListener(
TRTrackerServerRequestListener l )
{
}
public void
removeRequestListener(
TRTrackerServerRequestListener l )
{
}
}
|
[
"sven.peldszus@stud.tu-darmstadt.de"
] |
sven.peldszus@stud.tu-darmstadt.de
|
5caceda7a1d9816d960509feefafe888af613e1f
|
b3a694913d943bdb565fbf828d6ab8a08dd7dd12
|
/sources/p423w/C4908s.java
|
d41cb08cbfd028112a6aa3e497dc8ab5901a2833
|
[] |
no_license
|
v1ckxy/radar-covid
|
feea41283bde8a0b37fbc9132c9fa5df40d76cc4
|
8acb96f8ccd979f03db3c6dbfdf162d66ad6ac5a
|
refs/heads/master
| 2022-12-06T11:29:19.567919
| 2020-08-29T08:00:19
| 2020-08-29T08:00:19
| 294,198,796
| 1
| 0
| null | 2020-09-09T18:39:43
| 2020-09-09T18:39:43
| null |
UTF-8
|
Java
| false
| false
| 4,019
|
java
|
package p423w;
import p392u.p401r.p403c.C4638h;
/* renamed from: w.s */
public final class C4908s implements C4882a0 {
/* renamed from: e */
public final C4892f f11688e;
/* renamed from: f */
public C4912v f11689f;
/* renamed from: g */
public int f11690g;
/* renamed from: h */
public boolean f11691h;
/* renamed from: i */
public long f11692i;
/* renamed from: j */
public final C4896i f11693j;
public C4908s(C4896i iVar) {
if (iVar != null) {
this.f11693j = iVar;
C4892f buffer = iVar.getBuffer();
this.f11688e = buffer;
C4912v vVar = buffer.f11660e;
this.f11689f = vVar;
this.f11690g = vVar != null ? vVar.f11702b : -1;
return;
}
C4638h.m10271a("upstream");
throw null;
}
/* JADX WARNING: Code restructure failed: missing block: B:11:0x0019, code lost:
if (r1 == r3.f11702b) goto L_0x0021;
*/
/* renamed from: b */
/* Code decompiled incorrectly, please refer to instructions dump. */
public long mo11077b(p423w.C4892f r9, long r10) {
/*
r8 = this;
r0 = 0
if (r9 == 0) goto L_0x007d
boolean r1 = r8.f11691h
r2 = 1
r1 = r1 ^ r2
if (r1 == 0) goto L_0x0071
w.v r1 = r8.f11689f
if (r1 == 0) goto L_0x0021
w.f r3 = r8.f11688e
w.v r3 = r3.f11660e
if (r1 != r3) goto L_0x0020
int r1 = r8.f11690g
if (r3 == 0) goto L_0x001c
int r3 = r3.f11702b
if (r1 != r3) goto L_0x0020
goto L_0x0021
L_0x001c:
p392u.p401r.p403c.C4638h.m10269a()
throw r0
L_0x0020:
r2 = 0
L_0x0021:
if (r2 == 0) goto L_0x0065
w.i r1 = r8.f11693j
long r2 = r8.f11692i
long r2 = r2 + r10
r1.mo11447c(r2)
w.v r1 = r8.f11689f
if (r1 != 0) goto L_0x0042
w.f r1 = r8.f11688e
w.v r1 = r1.f11660e
if (r1 == 0) goto L_0x0042
r8.f11689f = r1
if (r1 == 0) goto L_0x003e
int r0 = r1.f11702b
r8.f11690g = r0
goto L_0x0042
L_0x003e:
p392u.p401r.p403c.C4638h.m10269a()
throw r0
L_0x0042:
w.f r0 = r8.f11688e
long r0 = r0.f11661f
long r2 = r8.f11692i
long r0 = r0 - r2
long r10 = java.lang.Math.min(r10, r0)
r0 = 0
int r0 = (r10 > r0 ? 1 : (r10 == r0 ? 0 : -1))
if (r0 > 0) goto L_0x0056
r9 = -1
return r9
L_0x0056:
w.f r2 = r8.f11688e
long r4 = r8.f11692i
r3 = r9
r6 = r10
r2.mo11442a(r3, r4, r6)
long r0 = r8.f11692i
long r0 = r0 + r10
r8.f11692i = r0
return r10
L_0x0065:
java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
java.lang.String r10 = "Peek source is invalid because upstream source was used"
java.lang.String r10 = r10.toString()
r9.<init>(r10)
throw r9
L_0x0071:
java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
java.lang.String r10 = "closed"
java.lang.String r10 = r10.toString()
r9.<init>(r10)
throw r9
L_0x007d:
java.lang.String r9 = "sink"
p392u.p401r.p403c.C4638h.m10271a(r9)
throw r0
*/
throw new UnsupportedOperationException("Method not decompiled: p423w.C4908s.mo11077b(w.f, long):long");
}
/* renamed from: b */
public C4886b0 mo11078b() {
return this.f11693j.mo11078b();
}
public void close() {
this.f11691h = true;
}
}
|
[
"josemmoya@outlook.com"
] |
josemmoya@outlook.com
|
89994af417c37554c52695314c69ac6c86301f2f
|
4d27ce0df222b792a4c5763fc00e36e0943f63d7
|
/src/main/java/openperipheral/addons/sensors/TurtleUpgradeSensor.java
|
3ee307cccdf4b62345bd82f008c53f4236f7158f
|
[
"MIT"
] |
permissive
|
hohserg1/OpenPeripheral-Addons
|
ad622149a281cbaae4f138fc55c010622dbfd95e
|
a8a859155cc908e1d0c688d11da3b571152afd76
|
refs/heads/master
| 2021-01-01T01:39:28.242338
| 2020-02-08T12:04:10
| 2020-02-08T12:04:10
| 239,125,559
| 0
| 0
|
MIT
| 2020-02-08T12:01:12
| 2020-02-08T12:01:11
| null |
UTF-8
|
Java
| false
| false
| 2,511
|
java
|
package openperipheral.addons.sensors;
import dan200.computercraft.api.peripheral.IPeripheral;
import dan200.computercraft.api.turtle.ITurtleAccess;
import dan200.computercraft.api.turtle.ITurtleUpgrade;
import dan200.computercraft.api.turtle.TurtleCommandResult;
import dan200.computercraft.api.turtle.TurtleSide;
import dan200.computercraft.api.turtle.TurtleUpgradeType;
import dan200.computercraft.api.turtle.TurtleVerb;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import openperipheral.addons.Config;
import openperipheral.addons.ModuleComputerCraft.Icons;
import openperipheral.addons.OpenPeripheralAddons.Blocks;
import openperipheral.addons.utils.CCUtils;
import openperipheral.api.ApiAccess;
import openperipheral.api.architecture.cc.IComputerCraftObjectsFactory;
public class TurtleUpgradeSensor implements ITurtleUpgrade {
private static class TurtleSensorEnvironment implements ISensorEnvironment {
private ITurtleAccess turtle;
public TurtleSensorEnvironment(ITurtleAccess turtle) {
this.turtle = turtle;
}
@Override
public boolean isTurtle() {
return true;
}
@Override
public Vec3 getLocation() {
return turtle.getVisualPosition(0);
}
@Override
public World getWorld() {
return turtle.getWorld();
}
@Override
public int getSensorRange() {
final World world = getWorld();
return (world.isRaining() && world.isThundering())? Config.sensorRangeInStorm : Config.sensorRange;
}
@Override
public boolean isValid() {
return CCUtils.isTurtleValid(turtle);
}
}
@Override
public int getUpgradeID() {
return 180;
}
@Override
public String getUnlocalisedAdjective() {
return "openperipheral.turtle.sensor.adjective";
}
@Override
public TurtleUpgradeType getType() {
return TurtleUpgradeType.Peripheral;
}
@Override
public ItemStack getCraftingItem() {
return new ItemStack(Blocks.sensor);
}
@Override
public IPeripheral createPeripheral(ITurtleAccess turtle, TurtleSide side) {
return ApiAccess.getApi(IComputerCraftObjectsFactory.class).createPeripheral(new TurtleSensorEnvironment(turtle));
}
@Override
public TurtleCommandResult useTool(ITurtleAccess turtle, TurtleSide side, TurtleVerb verb, int direction) {
return null;
}
@Override
public IIcon getIcon(ITurtleAccess turtle, TurtleSide side) {
return Icons.sensorTurtle;
}
@Override
public void update(ITurtleAccess turtle, TurtleSide side) {}
}
|
[
"bartek.bok@gmail.com"
] |
bartek.bok@gmail.com
|
9a1c95e59760dc391da319f99c1bc8ac343dda01
|
424d9d65e27cd204cc22e39da3a13710b163f4e7
|
/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/EditorScreenshotTask.java
|
b153693d101eeffce3fdffedf6da910362e2664b
|
[
"BSD-3-Clause"
] |
permissive
|
bigben0123/chromium
|
7c5f4624ef2dacfaf010203b60f307d4b8e8e76d
|
83d9cd5e98b65686d06368f18b4835adbab76d89
|
refs/heads/master
| 2023-01-10T11:02:26.202776
| 2020-10-30T09:47:16
| 2020-10-30T09:47:16
| 275,543,782
| 0
| 0
|
BSD-3-Clause
| 2020-10-30T09:47:18
| 2020-06-28T08:45:11
| null |
UTF-8
|
Java
| false
| false
| 5,809
|
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.share.screenshot;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Rect;
import androidx.annotation.Nullable;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.base.annotations.NativeMethods;
import org.chromium.base.task.PostTask;
import org.chromium.chrome.browser.app.ChromeActivity;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
import org.chromium.content_public.browser.UiThreadTaskTraits;
import org.chromium.ui.UiUtils;
import org.chromium.ui.base.WindowAndroid;
/**
* A utility class to take a screenshot of an {@link Activity}.
* TODO(crbug/1024586): Remove this temporary class and instead move
* chrome/android/java/src/org/chromium/chrome/browser/feedback/ScreenshotTask.java.
*/
@JNINamespace("chrome::android")
public final class EditorScreenshotTask implements EditorScreenshotSource {
private final Activity mActivity;
private final BottomSheetController mBottomSheetController;
private boolean mDone;
private Bitmap mBitmap;
private Runnable mCallback;
/**
* Creates a {@link EditorScreenshotTask} instance that, will grab a screenshot of {@code
* activity}.
* @param activity The {@link Activity} to grab a screenshot of.
* @param sheetController A {@link BottomSheetController} to check if the sheet is showing.
*/
public EditorScreenshotTask(Activity activity, BottomSheetController sheetController) {
mActivity = activity;
mBottomSheetController = sheetController;
}
// ScreenshotSource implementation.
@Override
public void capture(@Nullable Runnable callback) {
mCallback = callback;
if (takeCompositorScreenshot(mActivity)) return;
if (takeAndroidViewScreenshot(mActivity)) return;
// If neither the compositor nor the Android view screenshot tasks were kicked off, admit
// defeat and return a {@code null} screenshot.
PostTask.postTask(UiThreadTaskTraits.DEFAULT, new Runnable() {
@Override
public void run() {
onBitmapReceived(null);
}
});
}
@Override
public boolean isReady() {
return mDone;
}
@Override
public Bitmap getScreenshot() {
return mBitmap;
}
// This will be called on the UI thread in response to
// EditorScreenshotTaskJni.get().grabWindowSnapshotAsync.
@CalledByNative
private void onBytesReceived(byte[] pngBytes) {
Bitmap bitmap = null;
if (pngBytes != null) bitmap = BitmapFactory.decodeByteArray(pngBytes, 0, pngBytes.length);
onBitmapReceived(bitmap);
}
private void onBitmapReceived(@Nullable Bitmap bitmap) {
mDone = true;
mBitmap = bitmap;
if (mCallback != null) mCallback.run();
mCallback = null;
}
private boolean takeCompositorScreenshot(@Nullable Activity activity) {
if (!shouldTakeCompositorScreenshot((activity))) return false;
Rect rect = new Rect();
activity.getWindow().getDecorView().getRootView().getWindowVisibleDisplayFrame(rect);
EditorScreenshotTaskJni.get().grabWindowSnapshotAsync(
this, ((ChromeActivity) activity).getWindowAndroid(), rect.width(), rect.height());
return true;
}
private boolean takeAndroidViewScreenshot(@Nullable final Activity activity) {
if (activity == null) return false;
PostTask.postTask(UiThreadTaskTraits.DEFAULT, new Runnable() {
@Override
public void run() {
Bitmap bitmap = UiUtils.generateScaledScreenshot(
activity.getWindow().getDecorView().getRootView(), 0,
Bitmap.Config.ARGB_8888);
onBitmapReceived(bitmap);
}
});
return true;
}
private boolean shouldTakeCompositorScreenshot(Activity activity) {
// If Activity isn't a ChromeActivity, we aren't using the Compositor to render.
if (!(activity instanceof ChromeActivity)) return false;
ChromeActivity chromeActivity = (ChromeActivity) activity;
Tab currentTab = chromeActivity.getActivityTab();
// If the bottom sheet is currently open, then do not use the Compositor based screenshot
// so that the Android View for the bottom sheet will be captured.
// TODO(https://crbug.com/835862): When the sheet is partially opened both the compositor
// and Android views should be captured in the screenshot.
if (mBottomSheetController.isSheetOpen()) return false;
// If the tab is null, assume in the tab switcher so a Compositor snapshot is good.
if (currentTab == null) return true;
// If the tab is not interactable, also assume in the tab switcher.
if (!currentTab.isUserInteractable()) return true;
// If the tab focused and not showing Android widget based content, then use the Compositor
// based screenshot.
if (currentTab.getNativePage() == null && !currentTab.isShowingCustomView()) return true;
// Assume the UI is drawn primarily by Android widgets, so do not use the Compositor
// screenshot.
return false;
}
@NativeMethods
interface Natives {
void grabWindowSnapshotAsync(
EditorScreenshotTask callback, WindowAndroid window, int width, int height);
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
c38272a1b2e6a347a785b76940b24eca3c4801fe
|
fa3893cd5593cb0475e5a2308931a356c9bcab26
|
/src/org.xtuml.bp.ui.explorer/src/org/xtuml/bp/ui/explorer/ILinkWithEditorListener.java
|
9f53f9a8e792daf8a949ee130aaecb5d662c45b4
|
[
"EPL-1.0",
"Apache-2.0"
] |
permissive
|
leviathan747/bridgepoint
|
a2c13d615ff255eb64c8a4e21fcf1824f9eff3d5
|
cf7deed47d20290d422d4b4636e7486784d17c34
|
refs/heads/master
| 2023-08-04T11:05:10.679674
| 2023-07-06T19:10:37
| 2023-07-06T19:10:37
| 28,143,415
| 0
| 1
|
Apache-2.0
| 2023-05-08T13:26:39
| 2014-12-17T15:40:25
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,262
|
java
|
package org.xtuml.bp.ui.explorer;
import org.xtuml.bp.core.common.NonRootModelElement;
//=====================================================================
//
// File: $RCSfile: ILinkWithEditorListener.java,v $
// Version: $Revision: 1.5 $
// Modified: $Date: 2013/01/10 23:15:44 $
//
// (c) Copyright 2010-2014 by Mentor Graphics Corp. All rights reserved.
//
//=====================================================================
// 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.
//=====================================================================
//
//
public interface ILinkWithEditorListener {
public void notifySelectionLink();
public NonRootModelElement getFirstSelectedElement();
}
|
[
"s.keith.brown@gmail.com"
] |
s.keith.brown@gmail.com
|
d3ec625308734d1632f79c545a2669ee8cd0eec1
|
bc95bdb5e25837d3e14a13f95b1d83cd6a34fdcf
|
/dbflute-guice-example/src/main/java/com/example/dbflute/guice/dbflute/bsbhv/loader/LoaderOfProductCategory.java
|
9c410f5a84301a046f189abc38a8809f77a13aa8
|
[
"Apache-2.0"
] |
permissive
|
seasarorg/dbflute-example-container
|
6c296135cc8bc6aeae37064621f106adc31fb76d
|
acb34a648eab7dbfcf50cd59a60ee95a06b26420
|
refs/heads/master
| 2022-07-20T07:21:44.095260
| 2019-08-04T12:43:29
| 2019-08-04T12:43:29
| 13,245,011
| 1
| 1
| null | 2022-06-29T19:21:49
| 2013-10-01T13:46:16
|
Java
|
UTF-8
|
Java
| false
| false
| 4,859
|
java
|
package com.example.dbflute.guice.dbflute.bsbhv.loader;
import java.util.List;
import org.seasar.dbflute.*;
import org.seasar.dbflute.bhv.*;
import com.example.dbflute.guice.dbflute.exbhv.*;
import com.example.dbflute.guice.dbflute.exentity.*;
import com.example.dbflute.guice.dbflute.cbean.*;
/**
* The referrer loader of (商品カテゴリ)PRODUCT_CATEGORY as TABLE. <br>
* <pre>
* [primary key]
* PRODUCT_CATEGORY_CODE
*
* [column]
* PRODUCT_CATEGORY_CODE, PRODUCT_CATEGORY_NAME, PARENT_CATEGORY_CODE
*
* [sequence]
*
*
* [identity]
*
*
* [version-no]
*
*
* [foreign table]
* PRODUCT_CATEGORY
*
* [referrer table]
* PRODUCT, PRODUCT_CATEGORY
*
* [foreign property]
* productCategorySelf
*
* [referrer property]
* productList, productCategorySelfList
* </pre>
* @author DBFlute(AutoGenerator)
*/
public class LoaderOfProductCategory {
// ===================================================================================
// Attribute
// =========
protected List<ProductCategory> _selectedList;
protected BehaviorSelector _selector;
protected ProductCategoryBhv _myBhv; // lazy-loaded
// ===================================================================================
// Ready for Loading
// =================
public LoaderOfProductCategory ready(List<ProductCategory> selectedList, BehaviorSelector selector)
{ _selectedList = selectedList; _selector = selector; return this; }
protected ProductCategoryBhv myBhv()
{ if (_myBhv != null) { return _myBhv; } else { _myBhv = _selector.select(ProductCategoryBhv.class); return _myBhv; } }
// ===================================================================================
// Load Referrer
// =============
protected List<Product> _referrerProduct;
public NestedReferrerLoaderGateway<LoaderOfProduct> loadProduct(ReferrerConditionSetupper<ProductCB> setupper) {
myBhv().loadProduct(_selectedList, setupper).withNestedReferrer(new ReferrerListHandler<Product>() {
public void handle(List<Product> referrerList) { _referrerProduct = referrerList; }
});
return new NestedReferrerLoaderGateway<LoaderOfProduct>() {
public void withNestedReferrer(ReferrerLoaderHandler<LoaderOfProduct> handler) {
handler.handle(new LoaderOfProduct().ready(_referrerProduct, _selector));
}
};
}
protected List<ProductCategory> _referrerProductCategorySelf;
public NestedReferrerLoaderGateway<LoaderOfProductCategory> loadProductCategorySelf(ReferrerConditionSetupper<ProductCategoryCB> setupper) {
myBhv().loadProductCategorySelf(_selectedList, setupper).withNestedReferrer(new ReferrerListHandler<ProductCategory>() {
public void handle(List<ProductCategory> referrerList) { _referrerProductCategorySelf = referrerList; }
});
return new NestedReferrerLoaderGateway<LoaderOfProductCategory>() {
public void withNestedReferrer(ReferrerLoaderHandler<LoaderOfProductCategory> handler) {
handler.handle(new LoaderOfProductCategory().ready(_referrerProductCategorySelf, _selector));
}
};
}
// ===================================================================================
// Pull out Foreign
// ================
protected LoaderOfProductCategory _foreignProductCategorySelfLoader;
public LoaderOfProductCategory pulloutProductCategorySelf() {
if (_foreignProductCategorySelfLoader != null) { return _foreignProductCategorySelfLoader; }
List<ProductCategory> pulledList = myBhv().pulloutProductCategorySelf(_selectedList);
_foreignProductCategorySelfLoader = new LoaderOfProductCategory().ready(pulledList, _selector);
return _foreignProductCategorySelfLoader;
}
// ===================================================================================
// Accessor
// ========
public List<ProductCategory> getSelectedList() { return _selectedList; }
public BehaviorSelector getSelector() { return _selector; }
}
|
[
"dbflute@gmail.com"
] |
dbflute@gmail.com
|
9b195d2c929d40d82707e16b09959795a6ee5801
|
e1b95055983ab7ff23156c6919a0f3f7751b3ab0
|
/src/main/java/com/wq/mqtttrabbitmq/common/MDC/WebMvcConfig.java
|
edf78709047a93b0587d8f070b90cb2b80ca306b
|
[] |
no_license
|
Wan123ab/mqttt-rabbitmq
|
70d6b1b07fd3147a246b1615e67a55810faab636
|
0698e99b5b7c33a024074a7f11b82385c784dff0
|
refs/heads/master
| 2022-06-26T00:55:46.039739
| 2019-05-28T10:52:42
| 2019-05-28T10:52:42
| 184,026,864
| 1
| 2
| null | 2022-06-17T02:08:14
| 2019-04-29T08:02:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,085
|
java
|
package com.wq.mqtttrabbitmq.common.MDC;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@EnableWebMvc
public class WebMvcConfig implements WebMvcConfigurer {
/**
* 注册拦截器
* @param registry
*/
@Override
public void addInterceptors(InterceptorRegistry registry) {
// addPathPatterns 用于添加拦截规则, 这里假设拦截 /url 后面的全部链接
// excludePathPatterns 用户排除拦截
registry.addInterceptor(mdcInterceptor())
.addPathPatterns("/**")
.excludePathPatterns("/static/**","/templates/**");
}
@Bean
public HandlerInterceptor mdcInterceptor(){
return new LogInterceptor();
}
}
|
[
"853280347@qq.com"
] |
853280347@qq.com
|
c95ee6fbfa332a57a3307bc420f6f7f9c6a8734f
|
700cb1ed1139c8bede8b7df51d254b532a41e4a0
|
/app/src/main/java/ruolan/com/cnmarket/common/utils/StringUtils.java
|
3b6ba193da7d75d3c7a0c143c8b16538e01279ee
|
[
"Apache-2.0"
] |
permissive
|
wuyinlei/CNMarket
|
e9c63eee3df8bbcdefdc3f6d74b87720cb6dfde7
|
f2447a76f2f35841091089637fb23560140cd496
|
refs/heads/master
| 2021-01-12T03:42:39.934342
| 2017-03-09T00:42:06
| 2017-03-09T00:42:06
| 78,255,489
| 3
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,456
|
java
|
package ruolan.com.cnmarket.common.utils;
/**
* Created by Administrator on 2016/10/25.
*/
public class StringUtils {
private StringUtils() {
throw new UnsupportedOperationException("u can't fuck me...");
}
/**
* 判断字符串是否为null或长度为0
*
* @param string 待校验字符串
* @return {@code true}: 空<br> {@code false}: 不为空
*/
public static boolean isEmpty(CharSequence string) {
return string == null || string.length() == 0;
}
/**
* 判断字符串是否为null或全为空格
*
* @param string 待校验字符串
* @return {@code true}: null或全空格<br> {@code false}: 不为null且不全空格
*/
public static boolean isSpace(String string) {
return (string == null || string.trim().length() == 0);
}
/**
* null转为长度为0的字符串
*
* @param string 待转字符串
* @return string为null转为长度为0字符串,否则不改变
*/
public static String null2Length0(String string) {
return string == null ? "" : string;
}
/**
* 返回字符串长度
*
* @param string 字符串
* @return null返回0,其他返回自身长度
*/
public static int length(CharSequence string) {
return string == null ? 0 : string.length();
}
/**
* 首字母大写
*
* @param string 待转字符串
* @return 首字母大写字符串
*/
public static String upperFirstLetter(String string) {
if (isEmpty(string) || !Character.isLowerCase(string.charAt(0))) {
return string;
}
return String.valueOf((char) (string.charAt(0) - 32)) + string.substring(1);
}
/**
* 首字母小写
*
* @param string 待转字符串
* @return 首字母小写字符串
*/
public static String lowerFirstLetter(String string) {
if (isEmpty(string) || !Character.isUpperCase(string.charAt(0))) {
return string;
}
return String.valueOf((char) (string.charAt(0) + 32)) + string.substring(1);
}
/**
* 转化为半角字符
*
* @param string 待转字符串
* @return 半角字符串
*/
public static String toDBC(String string) {
if (isEmpty(string)) {
return string;
}
char[] chars = string.toCharArray();
for (int i = 0, len = chars.length; i < len; i++) {
if (chars[i] == 12288) {
chars[i] = ' ';
} else if (65281 <= chars[i] && chars[i] <= 65374) {
chars[i] = (char) (chars[i] - 65248);
} else {
chars[i] = chars[i];
}
}
return new String(chars);
}
/**
* 转化为全角字符
*
* @param string 待转字符串
* @return 全角字符串
*/
public static String toSBC(String string) {
if (isEmpty(string)) {
return string;
}
char[] chars = string.toCharArray();
for (int i = 0, len = chars.length; i < len; i++) {
if (chars[i] == ' ') {
chars[i] = (char) 12288;
} else if (33 <= chars[i] && chars[i] <= 126) {
chars[i] = (char) (chars[i] + 65248);
} else {
chars[i] = chars[i];
}
}
return new String(chars);
}
}
|
[
"wuyinlei19931118@hotmail.com"
] |
wuyinlei19931118@hotmail.com
|
76e428ec15571113308b3f22caee886aea8c062b
|
f404f7198c91a0f91ed6d6dd0a1cda9adf3edbb1
|
/com/planet_ink/coffee_mud/Abilities/Properties/Prop_ModExperience.java
|
e1365bd90a650b76ae5e6e80e9c768caf74fcf01
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
bbailey/ewok
|
1f1d35b219a6ebd33fd3ad3d245383d075ef457d
|
b4fcf4ba90c7460b19d0af56a3ecabbc88470f6f
|
refs/heads/master
| 2020-04-05T08:27:05.904034
| 2017-02-01T04:14:19
| 2017-02-01T04:14:19
| 656,100
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,224
|
java
|
package com.planet_ink.coffee_mud.Abilities.Properties;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.CMath.CompiledOperation;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.MaskingLibrary;
import com.planet_ink.coffee_mud.Libraries.interfaces.MaskingLibrary.CompiledZMask;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2004-2016 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class Prop_ModExperience extends Property
{
@Override
public String ID()
{
return "Prop_ModExperience";
}
@Override
public String name()
{
return "Modifying Experience Gained";
}
@Override
protected int canAffectCode()
{
return Ability.CAN_MOBS | Ability.CAN_ITEMS | Ability.CAN_AREAS | Ability.CAN_ROOMS;
}
protected String operationFormula = "";
protected boolean selfXP = false;
protected List<CompiledOperation> operation = null;
protected CompiledZMask mask = null;
@Override
public String accountForYourself()
{
return "Modifies experience gained: " + operationFormula;
}
public int translateAmount(int amount, String val)
{
if(amount<0)
amount=-amount;
if(val.endsWith("%"))
return (int)Math.round(CMath.mul(amount,CMath.div(CMath.s_int(val.substring(0,val.length()-1)),100)));
return CMath.s_int(val);
}
public String translateNumber(String val)
{
if(val.endsWith("%"))
return "( @x1 * (" + val.substring(0,val.length()-1) + " / 100) )";
return Integer.toString(CMath.s_int(val));
}
@Override
public void setMiscText(String newText)
{
super.setMiscText(newText);
operation = null;
mask=null;
selfXP=false;
String s=newText.trim();
int x=s.indexOf(';');
if(x>=0)
{
mask=CMLib.masking().getPreCompiledMask(s.substring(x+1).trim());
s=s.substring(0,x).trim();
}
x=s.indexOf("SELF");
if(x>=0)
{
selfXP=true;
s=s.substring(0,x)+s.substring(x+4);
}
operationFormula="Amount "+s;
if(s.startsWith("="))
operation = CMath.compileMathExpression(translateNumber(s.substring(1)).trim());
else
if(s.startsWith("+"))
operation = CMath.compileMathExpression("@x1 + "+translateNumber(s.substring(1)).trim());
else
if(s.startsWith("-"))
operation = CMath.compileMathExpression("@x1 - "+translateNumber(s.substring(1)).trim());
else
if(s.startsWith("*"))
operation = CMath.compileMathExpression("@x1 * "+translateNumber(s.substring(1)).trim());
else
if(s.startsWith("/"))
operation = CMath.compileMathExpression("@x1 / "+translateNumber(s.substring(1)).trim());
else
if(s.startsWith("(")&&(s.endsWith(")")))
{
operationFormula="Amount ="+s;
operation = CMath.compileMathExpression(s);
}
else
operation = CMath.compileMathExpression(translateNumber(s.trim()));
operationFormula=CMStrings.replaceAll(operationFormula, "@x1", "Amount");
}
@Override
public boolean okMessage(final Environmental myHost, final CMMsg msg)
{
if(operation == null)
setMiscText(text());
if((msg.sourceMinor()==CMMsg.TYP_EXPCHANGE)
&&(operation != null)
&&((((msg.target()==affected)||(selfXP && (msg.source()==affected))) &&(affected instanceof MOB))
||((affected instanceof Item)
&&(msg.source()==((Item)affected).owner())
&&(!((Item)affected).amWearingAt(Wearable.IN_INVENTORY)))
||(affected instanceof Room)
||(affected instanceof Area)))
{
if(mask!=null)
{
if(affected instanceof Item)
{
if((msg.target()==null)||(!(msg.target() instanceof MOB))||(!CMLib.masking().maskCheck(mask,msg.target(),true)))
return super.okMessage(myHost,msg);
}
else
if(!CMLib.masking().maskCheck(mask,msg.source(),true))
return super.okMessage(myHost,msg);
}
msg.setValue((int)Math.round(CMath.parseMathExpression(operation, new double[]{msg.value()}, 0.0)));
}
return super.okMessage(myHost,msg);
}
}
|
[
"nosanity79@gmail.com"
] |
nosanity79@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.