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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6c987e5aa04e3a19ead0f84ccef56b025e12d415
|
10fdc3aa333ef07a180f29a4425650945c3da9c8
|
/zhuanbo-core/src/main/java/com/zhuanbo/core/constants/MQMessageStatusEnum.java
|
eca468c37672568cc3fd7ebeeb0dc6921a1feefa
|
[] |
no_license
|
arvin-xiao/lexuan
|
4d67f4ab40243c7e6167e514d899c6cd0c3f0995
|
6cffeee1002bad067e6c8481a3699186351d91a8
|
refs/heads/master
| 2023-04-27T21:01:06.644131
| 2020-05-03T03:03:52
| 2020-05-03T03:03:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 344
|
java
|
package com.zhuanbo.core.constants;
public enum MQMessageStatusEnum {
STATUS_0(0),// 0:待发送
STATUS_1(1),// 1:已发送
STATUS_2(2);// 已消费(客户端)
private Integer value;
MQMessageStatusEnum(Integer value){
this.value = value;
}
public Integer value(){
return this.value;
}
}
|
[
"13509030019@163.com"
] |
13509030019@163.com
|
2556595ef44ab6f672cdc5cc233cd48dd6b09684
|
3bd02f8edb3cb50e8b2e2c9fd4f2f7946c0e258c
|
/src/test/java/de/tum/group34/protocol/nse/EstimateMessage.java
|
3f906a354154762f3592ab0238ac67a91ca21bb1
|
[] |
no_license
|
DorelComan/RandomPeerSampling
|
26ee90c490d1ce03df75e8e81386493c2ef31fb6
|
26edc9a8f93a2b1d35567756d0cc5a0625ce0730
|
refs/heads/master
| 2020-06-29T21:31:21.362720
| 2019-08-05T10:03:03
| 2019-08-05T10:03:03
| 200,629,869
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,126
|
java
|
/*
* Copyright (C) 2016 totakura
*
* 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 de.tum.group34.protocol.nse;
import de.tum.group34.protocol.Message;
import de.tum.group34.protocol.MessageParserException;
import de.tum.group34.protocol.Protocol;
import java.nio.ByteBuffer;
/**
* The NSE estimate message.
*
* This is sent by the NSE module as a response to the query message
*
* @author totakura
*/
public class EstimateMessage extends ApiMessage {
private long estimate;
private long deviation;
public EstimateMessage(long estimate, long deviation) {
assert (estimate <= Integer.MAX_VALUE);
assert (deviation <= Integer.MAX_VALUE);
this.addHeader(Protocol.MessageType.API_NSE_ESTIMATE);
this.estimate = estimate;
this.deviation = deviation;
this.size += 8; // 4: estimate + 4:deviation
}
public int getEstimate() {
return (int) estimate;
}
public int getDeviation() {
return (int) deviation;
}
@Override
public void send(ByteBuffer out) {
out.putInt((int) this.estimate);
out.putInt((int) this.deviation);
}
public static EstimateMessage parse(ByteBuffer buf)
throws MessageParserException {
long estimate;
long deviation;
if (buf.remaining() != 8) {
throw new MessageParserException("Invalid size for NSE EstimateMessage");
}
estimate = Message.unsignedLongFromInt(buf.getInt());
deviation = Message.unsignedLongFromInt(buf.getInt());
return new EstimateMessage(estimate, deviation);
}
}
|
[
"hannes.dorfmann@gmail.com"
] |
hannes.dorfmann@gmail.com
|
b65f22041d965b85c40a0d229c06e5314e57ccc8
|
bd854f6dbd5968c0779d7bd8542293079c3031cb
|
/src/com/print/activity/PrintReceiptActivity.java
|
2b0a33428ac6db594d5453aa54a826efec0b1319
|
[] |
no_license
|
suntinghui/POS2Android_Print
|
d8bbbaf8dc3669ebf7173b8fea3bb1d8e3288145
|
0f008ab6598830e131c394d7e44f30f97259c12b
|
refs/heads/master
| 2016-09-16T02:18:32.480579
| 2013-12-19T15:07:30
| 2013-12-19T15:07:30
| 15,099,715
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,328
|
java
|
package com.print.activity;
import java.util.HashMap;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import com.print.R;
import com.print.dynamic.core.Event;
public class PrintReceiptActivity extends BaseActivity {
String printContent = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.print_receipt);
this.findViewById(R.id.closeButton).setOnClickListener(new OnClickListener(){
@Override
public void onClick(View arg0) {
PrintReceiptActivity.this.setResult(RESULT_OK);
PrintReceiptActivity.this.finish();
}
});
try {
@SuppressWarnings("unchecked")
HashMap<String, String> map = (HashMap<String, String>) this.getIntent().getSerializableExtra("content");
StringBuffer sb = new StringBuffer();
for (String key : map.keySet()){
if (!key.equals("fieldMAB")){
sb.append(key).append("=").append(map.get(key)).append(";");
}
}
printContent = sb.deleteCharAt(sb.length()-1).toString();
new PrintReceiptTask().execute();
} catch (Exception e) {
e.printStackTrace();
}
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_BACK:
{
PrintReceiptActivity.this.setResult(RESULT_OK);
PrintReceiptActivity.this.finish();
}
return true;
}
return super.onKeyDown(keyCode, event);
}
class PrintReceiptTask extends AsyncTask<Object, Object, Object>{
@Override
protected void onPreExecute() {
PrintReceiptActivity.this.showDialog(BaseActivity.PROGRESS_DIALOG, PrintReceiptActivity.this.getResources().getString(R.string.operatingDevice));
try{
Event event = new Event(null,"print", null);
String fskStr = "Set_PtrData|string:" + printContent;
event.setFsk(fskStr);
event.trigger();
} catch(Exception e){
e.printStackTrace();
}
}
@Override
protected void onPostExecute(Object result) {
PrintReceiptActivity.this.hideDialog(BaseActivity.PROGRESS_DIALOG);
}
@Override
protected Object doInBackground(Object... arg0) {
return null;
}
}
}
|
[
"tinghuisun@163.com"
] |
tinghuisun@163.com
|
597ccb967eca4681ece959f90e772230322d6d2f
|
b07f31138d1964e2ef6d2b1a4685623e8d9ba756
|
/shop/com/enation/app/shop/core/model/AllocationItem.java
|
12f51683f9ee688e8c174a2df6d4115d862d7aa7
|
[] |
no_license
|
worgent/yiming-mall
|
364072c676ef6b9dc153344755c78981efc773ee
|
545aecf48eaa531dc2b1fb7c8cad77970e2e92a1
|
refs/heads/master
| 2021-06-24T14:18:29.320720
| 2017-09-11T14:04:47
| 2017-09-11T14:04:47
| 103,140,528
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,923
|
java
|
package com.enation.app.shop.core.model;
import com.enation.framework.database.NotDbField;
public class AllocationItem
{
private Integer allocationid;
private int itemid;
private int cat_id;
private int orderid;
private int depotid;
private int goodsid;
private int productid;
private int num;
private String other;
private int iscmpl;
public int getIscmpl()
{
return this.iscmpl;
}
public void setIscmpl(int iscmpl) { this.iscmpl = iscmpl; }
public Integer getAllocationid() {
return this.allocationid;
}
public void setAllocationid(Integer allocationid) { this.allocationid = allocationid; }
public int getOrderid() {
return this.orderid;
}
public void setOrderid(int orderid) { this.orderid = orderid; }
public int getDepotid() {
return this.depotid;
}
public void setDepotid(int depotid) { this.depotid = depotid; }
public int getGoodsid() {
return this.goodsid;
}
public void setGoodsid(int goodsid) { this.goodsid = goodsid; }
public int getProductid() {
return this.productid;
}
public void setProductid(int productid) { this.productid = productid; }
public int getNum() {
return this.num;
}
public void setNum(int num) { this.num = num; }
@NotDbField
public int getCat_id() {
return this.cat_id;
}
public void setCat_id(int cat_id) { this.cat_id = cat_id; }
public String getOther() {
return this.other;
}
public void setOther(String other) { this.other = other; }
public int getItemid() {
return this.itemid;
}
public void setItemid(int itemid) { this.itemid = itemid; }
}
/* Location: C:\Users\worgen\Desktop\临时\javashop_b2b2c.war!\WEB-INF\lib\component-shop.jar!\com\enation\app\shop\core\model\AllocationItem.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"418251346@qq.com"
] |
418251346@qq.com
|
ef245525a30c83325ebefefa1c4dda98ccab3535
|
a73f1351063a9f06360e39552d47e15d0cf1a092
|
/ch08/src/sec05_03/HankookTire.java
|
6046af68b9bc04436f2857754a1acf5f817e6035
|
[] |
no_license
|
jonghwankwon/Java-Lecture
|
37d6ad91145cb963592af2ad66935da2c899a3e2
|
cca81332911ac11abfdf9cefaa9908592e15047b
|
refs/heads/master
| 2020-04-28T19:51:19.073957
| 2019-04-15T12:52:02
| 2019-04-15T12:52:02
| 175,524,476
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 165
|
java
|
package sec05_03;
public class HankookTire implements Tire{
@Override
public void roll() {
System.out.println("한국 타이어가 굴러갑니다.");
}
}
|
[
"whdghks1048@naver.com"
] |
whdghks1048@naver.com
|
c4eb568698cd632188d9b0d7559e9e7f4168e0ec
|
f539bfda3a620f76177f7812391d6d25df26f47b
|
/AppCode/src/main/java/com/creativewidgetworks/goldparser/engine/Reduction.java
|
a7688798f999e1a349e3df6780f39cb0d66fe104
|
[
"Apache-2.0"
] |
permissive
|
Epi-Info/Epi-Info-Android
|
c5f8efb8c6434249a46cf50fd82d935ca6035d19
|
e293bbc204c29bff591c5df164361724750ae45a
|
refs/heads/master
| 2023-09-01T03:08:18.344846
| 2023-08-21T20:37:19
| 2023-08-21T20:37:19
| 112,626,339
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,992
|
java
|
package com.creativewidgetworks.goldparser.engine;
import java.util.ArrayList;
import com.creativewidgetworks.goldparser.parser.Variable;
/**
* Reduction
*
* This class is used by the engine to hold a reduced rule. A reduction contains
* a list of Tokens corresponding to the the rule it represents. This class is
* important since it is used to store the actual source program parsed by the Engine
* Dependencies:
* @see Production
* @see Token
*
* @author Devin Cook (http://www.DevinCook.com/GOLDParser)
* @author Ralph Iden (http://www.creativewidgetworks.com), port to Java
* @version 5.0.0
*/
public class Reduction extends ArrayList<Token> {
private Production parent;
private Variable value;
public Reduction() {
// default constructor
}
/**
* Constructor that establishes the size of the list and creates placeholder
* objects so the list can be accessed in a "random" fashion when setting
* items.
* @param size
*/
public Reduction(int size) {
super(size);
for (int i = 0; i < size; i++) {
add(null);
}
}
/*----------------------------------------------------------------------------*/
/**
* This method is called when the parsed program tree is executed. Rule handler
* classes override this method as necessary to implement code generation or
* execution strategies
* @throws ParserException
*/
public void execute() throws ParserException {
// Base implementation does nothing, override as necessary
}
/*----------------------------------------------------------------------------*/
public Production getParent() {
return parent;
}
public void setParent(Production parent) {
this.parent = parent;
}
public Variable getValue() {
return value;
}
public void setValue(Variable value) {
this.value = value;
}
}
|
[
"mii0@cdc.gov"
] |
mii0@cdc.gov
|
b988154994fe4c32d3d342be8845c20dd9877ce6
|
d5e5129850e4332a8d4ccdcecef81c84220538d9
|
/Graphics/Dynamic Chart Library/Source/com/philsprojects/chart/view/CanvasListener.java
|
dedf77a5d438c0aa0b21e4217e4330393243ded1
|
[] |
no_license
|
ClickerMonkey/ship
|
e52da76735d6bf388668517c033e58846c6fe017
|
044430be32d4ec385e01deb17de919eda0389d5e
|
refs/heads/master
| 2020-03-18T00:43:52.330132
| 2018-05-22T13:45:14
| 2018-05-22T13:45:14
| 134,109,816
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 130
|
java
|
package com.philsprojects.chart.view;
public interface CanvasListener
{
public void requestRedraw(Canvas canvas);
}
|
[
"pdiffenderfer@gmail.com"
] |
pdiffenderfer@gmail.com
|
9771dffd9881bfb5f9d3f4ba7355e535cb8e83b8
|
10874aeaddf39dadbe0b8e7526661c5b8264a2af
|
/instrumentation/hunterlabs/lsxe/src/main/java/org/color4j/spectro/hunter/lsxe/StandardizeModeCommand.java
|
e677459f54d52a5188ca21b732289f51b31b96c4
|
[] |
no_license
|
stickfigure/color4j
|
e33cd22a4787d7e28aef50f92fd9e57795058fcc
|
813d953abf6980e4334d3a843d966f9cc577b7be
|
refs/heads/master
| 2020-12-30T18:02:38.963756
| 2011-10-27T08:04:01
| 2011-10-27T08:04:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,595
|
java
|
/*
* Copyright (c) 2011 Niclas Hedhman.
*
* 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.color4j.spectro.hunter.lsxe;
import org.color4j.spectro.hunter.common.Hex;
import org.color4j.spectro.spi.SpectroCommand;
import org.color4j.spectro.spi.SpectroEvent;
public class StandardizeModeCommand
implements SpectroCommand
{
private int filter;
private int port;
public StandardizeModeCommand( String uvFilter, String portPlate )
{
try
{
filter = Integer.parseInt( uvFilter );
}
catch( NumberFormatException numEx )
{
filter = -1;
}
try
{
port = Integer.parseInt( portPlate );
}
catch( NumberFormatException numEx )
{
port = -1;
}
}
public String getName()
{
return "Standardize Mode Command";
}
public String construct()
{
StringBuffer command = new StringBuffer();
command.append( "F" );
command.append( "0000" );
command.append( "0" );
//UV Settings
command.append( "000" );
command.append( filter );
//PortPlate Settings
command.append( Hex.intToHexString( port, 4 ) );
command.append( Hex.intToHexString( port, 4 ) );
return command.toString();
}
public SpectroEvent interpret( byte[] received )
{
LSXEStatus status = LSXEStatus.create( new String( received ) );
if( (int) received[ 8 ] != filter )
{
status.addWarning( "UNABLE_TO_SET_UV" );
}
String spotSize = new String( received, 9, 4 );
String portPlate = new String( received, 13, 4 );
if( Hex.hexStringToInt( spotSize ) != port )
{
status.addWarning( "UNABLE_TO_SET_LENS_FOCUS" );
}
else if( Hex.hexStringToInt( portPlate ) != port )
{
status.addWarning( "PORT_PLATE_LENS_FOCUS_MISMATCH" );
}
return new SpectroEvent( this, status );
}
}
|
[
"niclas@hedhman.org"
] |
niclas@hedhman.org
|
89eab3e14fb7b430b9fec1f856bfe865a76986ea
|
ab91edf364c66071c0ec5777595033fc8cde8113
|
/panda-core/src/test/java/panda/codec/EncoderExceptionTest.java
|
891901d9245ae5596bc0f470ce1ac3c86be52953
|
[
"Apache-2.0"
] |
permissive
|
pandafw/panda
|
054a5262cb006382ca22858925329a928fec844b
|
5ab4c335dae0dba34995f13863f11be790b14548
|
refs/heads/master
| 2023-08-31T03:40:26.800171
| 2023-08-29T08:11:50
| 2023-08-29T08:11:50
| 78,275,890
| 10
| 1
|
Apache-2.0
| 2022-11-08T11:20:35
| 2017-01-07T11:47:02
|
Java
|
UTF-8
|
Java
| false
| false
| 1,026
|
java
|
package panda.codec;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.junit.Test;
/**
* Tests {@link EncoderException}.
*/
public class EncoderExceptionTest {
private static final String MSG = "TEST";
private static final Throwable t = new Exception();
@Test
public void testConstructor0() {
final EncoderException e = new EncoderException();
assertNull(e.getMessage());
assertNull(e.getCause());
}
@Test
public void testConstructorString() {
final EncoderException e = new EncoderException(MSG);
assertEquals(MSG, e.getMessage());
assertNull(e.getCause());
}
@Test
public void testConstructorStringThrowable() {
final EncoderException e = new EncoderException(MSG, t);
assertEquals(MSG, e.getMessage());
assertEquals(t, e.getCause());
}
@Test
public void testConstructorThrowable() {
final EncoderException e = new EncoderException(t);
assertEquals(t.getClass().getName(), e.getMessage());
assertEquals(t, e.getCause());
}
}
|
[
"yf.frank.wang@outlook.com"
] |
yf.frank.wang@outlook.com
|
c2885ed565c04cbeba474e48ca223fa91ce7b6bc
|
3d1168c443a154bc4a4e75e12db9d0d1edf57de8
|
/eagleboard-services/eagleboard-service-core/src/main/java/com/mass3d/user/hibernate/HibernateUserAuthorityGroupStore.java
|
176b3fb22291542fff4229185e368e7fe0541cc5
|
[] |
no_license
|
Hamza-ye/eagleboard-platform
|
cabdb2445fe5d42b4f7bc69b6a9273e1a11d6a29
|
7c178b466ebf7eeef31c7e9288b8a3bafc87339f
|
refs/heads/master
| 2023-01-07T06:07:22.794363
| 2020-11-09T22:35:34
| 2020-11-09T22:35:34
| 307,714,180
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,417
|
java
|
package com.mass3d.user.hibernate;
import com.mass3d.common.hibernate.HibernateIdentifiableObjectStore;
import com.mass3d.dataset.DataSet;
import com.mass3d.security.acl.AclService;
import com.mass3d.user.CurrentUserService;
import com.mass3d.user.UserAuthorityGroup;
import com.mass3d.user.UserAuthorityGroupStore;
import org.hibernate.SessionFactory;
import org.hibernate.query.Query;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
@Repository("com.mass3d.user.UserAuthorityGroupStore")
public class HibernateUserAuthorityGroupStore
extends HibernateIdentifiableObjectStore<UserAuthorityGroup>
implements UserAuthorityGroupStore {
public HibernateUserAuthorityGroupStore(SessionFactory sessionFactory, JdbcTemplate jdbcTemplate,
ApplicationEventPublisher publisher, CurrentUserService currentUserService,
AclService aclService) {
super(sessionFactory, jdbcTemplate, publisher, UserAuthorityGroup.class, currentUserService,
aclService, true);
}
@Override
public int countDataSetUserAuthorityGroups(DataSet dataSet) {
Query<Long> query = getTypedQuery(
"select count(distinct c) from UserAuthorityGroup c where :dataSet in elements(c.dataSets)");
query.setParameter("dataSet", dataSet);
return query.getSingleResult().intValue();
}
}
|
[
"7amza.it@gmail.com"
] |
7amza.it@gmail.com
|
95f6137b41b4295dc3030b3973cc4b2730da8182
|
e437e71c761c88665f0174133a3c2a7c0a73846f
|
/http-client/src/test/groovy/io/micronaut/http/client/docs/binding/Book.java
|
f485a288e3e240cbc17ed71ef9371ebbfaedc900
|
[
"Apache-2.0"
] |
permissive
|
gaecom/micronaut-core
|
f4e9081322308b04bbaa44208ef56efab95832ee
|
d4a5f4a4a52da7ad88f782f3e0765aaacee3b4ae
|
refs/heads/master
| 2020-09-29T21:37:11.581695
| 2019-12-10T11:06:52
| 2019-12-10T11:06:52
| 227,128,310
| 1
| 0
|
Apache-2.0
| 2019-12-10T13:29:57
| 2019-12-10T13:29:57
| null |
UTF-8
|
Java
| false
| false
| 1,193
|
java
|
/*
* Copyright 2017-2019 original 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.micronaut.http.client.docs.binding;
import java.net.URL;
/**
* @author graemerocher
* @since 1.0
*/
public class Book {
private String title;
private URL url;
private int pages;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public URL getUrl() {
return url;
}
public void setUrl(URL url) {
this.url = url;
}
public int getPages() {
return pages;
}
public void setPages(int pages) {
this.pages = pages;
}
}
|
[
"graeme.rocher@gmail.com"
] |
graeme.rocher@gmail.com
|
a87f623c1cf98fd42ce3d927033de3a8f3156128
|
30a1e1bd729881fd5bd6874eff81189467292a9b
|
/src/main/java/com/melardev/spring/shoppingcartweb/controllers/LoginController.java
|
6652ece15e8e5bdef46999f97b8589cc3545dea2
|
[] |
no_license
|
melardev/SBootApiEcomMVCHibernate
|
255af6ca6a5ec70e4c5ce7a27d5fe972e86d90e9
|
0a3a3f945e385cc8eb3b04c87e7e54c9e28e0d68
|
refs/heads/master
| 2020-04-22T11:16:14.147216
| 2019-07-25T15:58:20
| 2019-07-25T15:58:20
| 170,333,719
| 15
| 11
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 475
|
java
|
package com.melardev.spring.shoppingcartweb.controllers;
import com.melardev.spring.shoppingcartweb.forms.LoginForm;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@Controller("/users")
public class LoginController {
@GetMapping("login")
public String login(Model model) {
model.addAttribute("form", new LoginForm());
return "users/login";
}
}
|
[
"melardev@users.noreply.github.com"
] |
melardev@users.noreply.github.com
|
3accfcf87cff0def26a8105a253f019804219041
|
a5dfb6f0a0152d6142e6ddd0bc7c842fdea3daf9
|
/second_semester/second_semester_sdj/Exercise13_01/src/Main.java
|
15e3728eb9aee4ff8825fb31f51a13f7e7a5a1a4
|
[] |
no_license
|
jimmi280586/Java_school_projects
|
e7c97dfe380cd3f872487232f1cc060e1fabdc1c
|
86b0cb5d38c65e4f7696bc841e3c5eed74e4d552
|
refs/heads/master
| 2021-01-11T11:58:06.578737
| 2016-12-16T20:55:48
| 2016-12-16T20:55:48
| 76,685,030
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,116
|
java
|
public class Main {
public static void main(String args[]) throws InterruptedException {
Bus bus = new Bus();
System.out.println("Bus ID: " + bus.getInfo());
System.out.println();
BusPassenger[] passengers = new BusPassenger[4];
passengers[0] = new BusPassenger("Allan");
passengers[1] = new BusPassenger("Britt");
passengers[2] = new BusPassenger("Carl");
passengers[3] = new BusPassenger("Dee");
for (int i = 0; i < passengers.length; i++) {
System.out.println(passengers[i] + " is getting in");
passengers[i].getIn(bus);
Thread.sleep(6000);
}
System.out.println(passengers[2] + " is getting out");
passengers[2].getOut();
System.out.println();
System.out.println(bus);
}
}
/* OUTPUT: (note Buss id could be different)
Bus ID: eXpress 22
Allan is getting in
Britt is getting in
Allan: Hello Britt
Carl is getting in
Allan: Hello Carl
Britt: Hello Carl
Dee is getting in
Allan: Hello Dee
Britt: Hello Dee
Carl: Hello Dee
Carl is getting out
Allan: Bye Bye Carl
Britt: Bye Bye Carl
Dee: Bye Bye Carl
eXpress 22:
Allan
Britt
Dee
*/
|
[
"joa@jimmiandersen.dk"
] |
joa@jimmiandersen.dk
|
91a9b1373aa5972436cadb19a127776e2972a6af
|
5584006d965c4d8467a508f1af4f78157ecd479a
|
/pkix/src/main/java/org/bouncycastle/mime/smime/SMimeParserListener.java
|
59e2ac21925f7bd89886b0f99cef0f3d296b61b0
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
cchenOBS/bc-java
|
25c38b9f12bd9f24eb19272eca65d99b4ed24ab6
|
d1dd18cd6f17f8b82789df17ec3af8638f6498c2
|
refs/heads/master
| 2020-03-26T17:00:46.794588
| 2018-08-13T08:39:31
| 2018-08-13T08:39:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,756
|
java
|
package org.bouncycastle.mime.smime;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.cms.CMSEnvelopedDataParser;
import org.bouncycastle.cms.CMSException;
import org.bouncycastle.cms.CMSSignedData;
import org.bouncycastle.cms.OriginatorInformation;
import org.bouncycastle.cms.RecipientInformationStore;
import org.bouncycastle.cms.SignerInformationStore;
import org.bouncycastle.mime.ConstantMimeContext;
import org.bouncycastle.mime.Headers;
import org.bouncycastle.mime.MimeContext;
import org.bouncycastle.mime.MimeParserContext;
import org.bouncycastle.mime.MimeParserListener;
import org.bouncycastle.operator.DigestCalculator;
import org.bouncycastle.util.Store;
import org.bouncycastle.util.io.Streams;
public abstract class SMimeParserListener
implements MimeParserListener
{
private DigestCalculator[] digestCalculators;
private SMimeMultipartContext parent;
public MimeContext createContext(MimeParserContext parserContext, Headers headers)
{
if (headers.isMultipart())
{
parent = new SMimeMultipartContext(parserContext, headers);
this.digestCalculators = parent.getDigestCalculators();
return parent;
}
else
{
return new ConstantMimeContext();
}
}
public void object(MimeParserContext parserContext, Headers headers, InputStream inputStream)
throws IOException
{
try
{
if (headers.getContentType().equals("application/pkcs7-signature")
|| headers.getContentType().equals("application/x-pkcs7-signature"))
{
Map<ASN1ObjectIdentifier, byte[]> hashes = new HashMap<ASN1ObjectIdentifier, byte[]>();
for (int i = 0; i != digestCalculators.length; i++)
{
digestCalculators[i].getOutputStream().close();
hashes.put(digestCalculators[i].getAlgorithmIdentifier().getAlgorithm(), digestCalculators[i].getDigest());
}
CMSSignedData signedData = new CMSSignedData(hashes, Streams.readAll(inputStream));
signedData(parserContext, headers, signedData.getCertificates(), signedData.getCRLs(), signedData.getAttributeCertificates(), signedData.getSignerInfos());
}
else if (headers.getContentType().equals("application/pkcs7-mime")
|| headers.getContentType().equals("application/x-pkcs7-mime"))
{
CMSEnvelopedDataParser envelopedDataParser = new CMSEnvelopedDataParser(inputStream);
envelopedData(parserContext, headers, envelopedDataParser.getOriginatorInfo(), envelopedDataParser.getRecipientInfos());
envelopedDataParser.close();
}
else
{
content(parserContext, headers, inputStream);
}
}
catch (CMSException e)
{
throw new IOException("CMS failure: " + e.getMessage(), e);
}
}
public void content(MimeParserContext parserContext, Headers headers, InputStream inputStream)
throws IOException
{
}
public void signedData(MimeParserContext parserContext, Headers headers, Store certificates, Store CRLs, Store attributeCertificates, SignerInformationStore signers)
throws IOException, CMSException
{
}
public void envelopedData(MimeParserContext parserContext, Headers headers, OriginatorInformation originatorInformation, RecipientInformationStore recipients)
throws IOException, CMSException
{
}
}
|
[
"dgh@cryptoworkshop.com"
] |
dgh@cryptoworkshop.com
|
58d4a54d76d60ddcbd2fee37192d17f2245414cc
|
9c4dd2c2e5255ac9a355aec335fbc914ee1e39c2
|
/JavaCore/Java util/src/stringTikinizer_Ex/StringTokinizer_ex.java
|
fddcdd97d54aabf710d6f0ce506eba53e435567f
|
[] |
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
| 1,057
|
java
|
package stringTikinizer_Ex;
import java.util.StringTokenizer;
public class StringTokinizer_ex {
public static void main(String[] args) {
String str = "Skazika, Diadia, ved' ne darom, Moskva, spalennaia pozgarom";
String delim=",";
System.out.println("String for parsing: \"" + str + "\"");
System.out.println("Delimeters: \"" + delim + "\"");
StringTokenizer st = new StringTokenizer(str, delim, true);
System.out.println("\nStringTokinizer with param [returnDelim = true].\n");
System.out.println("\nToken counts: " + st.countTokens());
int i = 1;
while (st.hasMoreTokens()){
System.out.println(i++ + ": [" + st.nextToken() + "]");
}
// StringTokinizer with param [returnDelim = false].
System.out.println("\nStringTokinizer with param [returnDelim = false].\n");
StringTokenizer st2 = new StringTokenizer(str, delim, false);
System.out.println("Token counts: " + st2.countTokens());
i = 1;
while (st2.hasMoreTokens()){
System.out.println(i++ + ": [" + st2.nextToken() + "]");
}
}
}
|
[
"PortyankoWork@gmail.com"
] |
PortyankoWork@gmail.com
|
7e9655bd06ecbcf5e1043fd5890dfe55af9db273
|
a52306370b497b800ea5e87c8fbe4e173fdf7a5b
|
/app/src/main/java/org/chzz/mvp/base/utils/ToastUtil.java
|
eb2bd1953ccdb86d7f327dc50a322bf66d91da7f
|
[] |
no_license
|
xiaoxinxing12/ChzzMVP-Android
|
ea6d7313d5e24e4aa69cd525e2e43fd678d03180
|
29b413465afe4455dd09b531497f08a278e3be51
|
refs/heads/master
| 2016-09-12T23:36:42.706954
| 2016-05-18T10:06:38
| 2016-05-18T10:06:38
| 59,104,089
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 614
|
java
|
package org.chzz.mvp.base.utils;
import android.widget.Toast;
import org.chzz.mvp.App;
/**
* 作者:copy 邮件:2499551993@qq.com
* 创建时间:15/7/2 10:17
* 描述:
*/
public class ToastUtil {
private ToastUtil() {
}
public static void show(CharSequence text) {
if (text.length() < 10) {
Toast.makeText(App.getInstance(), text, Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(App.getInstance(), text, Toast.LENGTH_LONG).show();
}
}
public static void show( int resId) {
show(App.getInstance().getString(resId));
}
}
|
[
"xiaoxinxing12@qq.com"
] |
xiaoxinxing12@qq.com
|
4f8cf4e206d3a5c7b00811ea426e3f86166f12f0
|
4be72dee04ebb3f70d6e342aeb01467e7e8b3129
|
/bin/ext-commerce/warehousing/testsrc/de/hybris/platform/warehousing/util/models/Addresses.java
|
e5675274cffe9be335e45bbb6d3be7c095a06e58
|
[] |
no_license
|
lun130220/hybris
|
da00774767ba6246d04cdcbc49d87f0f4b0b1b26
|
03c074ea76779f96f2db7efcdaa0b0538d1ce917
|
refs/heads/master
| 2021-05-14T01:48:42.351698
| 2018-01-07T07:21:53
| 2018-01-07T07:21:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,084
|
java
|
package de.hybris.platform.warehousing.util.models;
import de.hybris.platform.core.model.user.AddressModel;
import de.hybris.platform.servicelayer.user.daos.AddressDao;
import de.hybris.platform.warehousing.util.builder.AddressModelBuilder;
import org.springframework.beans.factory.annotation.Required;
public class Addresses extends AbstractItems<AddressModel>
{
private AddressDao addressDao;
private Countries countries;
private Users users;
public AddressModel MontrealDeMaisonneuvePos()
{
return getFromCollectionOrSaveAndReturn( //
() -> getAddressDao().findAddressesForOwner(getUsers().ManagerMontrealMaisonneuve()), //
() -> AddressModelBuilder.aModel() //
.withStreetNumber("999") //
.withStreetName("De Maisonneuve") //
.withTown("Montreal") //
.withPostalCode("H3A 3L4") //
.withCountry(getCountries().Canada()) //
.withDuplicate(Boolean.FALSE) //
.withBillingAddress(Boolean.FALSE) //
.withContactAddress(Boolean.FALSE) //
.withUnloadingAddress(Boolean.FALSE) //
.withShippingAddress(Boolean.TRUE) //
.withOwner(getUsers().ManagerMontrealMaisonneuve()) //
.withLatitude(Double.valueOf(45.5016330)) //
.withLongitude(Double.valueOf(-73.5740030)) //
.build());
}
public AddressModel MontrealDukePos()
{
return getFromCollectionOrSaveAndReturn( //
() -> getAddressDao().findAddressesForOwner(getUsers().ManagerMontrealDuke()), //
() -> AddressModelBuilder.aModel() //
.withStreetNumber("111") //
.withStreetName("Duke") //
.withTown("Montreal") //
.withPostalCode("H3C 2M1") //
.withCountry(getCountries().Canada()) //
.withDuplicate(Boolean.FALSE) //
.withBillingAddress(Boolean.FALSE) //
.withContactAddress(Boolean.FALSE) //
.withUnloadingAddress(Boolean.FALSE) //
.withShippingAddress(Boolean.TRUE) //
.withOwner(getUsers().ManagerMontrealDuke()) //
.build());
}
public AddressModel MontrealNancyHome()
{
return getFromCollectionOrSaveAndReturn(() -> getAddressDao().findAddressesForOwner(getUsers().Nancy()), //
() -> AddressModelBuilder.fromModel(ShippingAddress()) //
.withStreetNumber("705") //
.withStreetName("Ste-Catherine") //
.withTown("Montreal") //
.withPostalCode("H3B 4G5") //
.withCountry(getCountries().Canada()) //
.withOwner(getUsers().Nancy()) //
.withLatitude(Double.valueOf(45.5027940)) //
.withLongitude(Double.valueOf(-73.5714720)) //
.build());
}
public AddressModel Boston()
{
return getFromCollectionOrSaveAndReturn(() -> getAddressDao().findAddressesForOwner(getUsers().Bob()), //
() -> AddressModelBuilder.fromModel(ShippingAddress()) //
.withStreetNumber("33-41") //
.withStreetName("Farnsworth") //
.withTown("Boston") //
.withPostalCode("02210") //
.withCountry(getCountries().UnitedStates()) //
.withDuplicate(Boolean.FALSE) //
.withBillingAddress(Boolean.TRUE) //
.withContactAddress(Boolean.FALSE) //
.withUnloadingAddress(Boolean.FALSE) //
.withShippingAddress(Boolean.TRUE) //
.withOwner(getUsers().Bob()) //
.withLatitude(Double.valueOf(42.3519410)) //
.withLongitude(Double.valueOf(-71.0478470)) //
.build());
}
protected AddressModel ShippingAddress()
{
return AddressModelBuilder.aModel() //
.withDuplicate(Boolean.FALSE) //
.withBillingAddress(Boolean.FALSE) //
.withContactAddress(Boolean.FALSE) //
.withUnloadingAddress(Boolean.FALSE) //
.withShippingAddress(Boolean.TRUE) //
.build();
}
public AddressDao getAddressDao()
{
return addressDao;
}
@Required
public void setAddressDao(final AddressDao addressDao)
{
this.addressDao = addressDao;
}
public Countries getCountries()
{
return countries;
}
@Required
public void setCountries(final Countries countries)
{
this.countries = countries;
}
public Users getUsers()
{
return users;
}
@Required
public void setUsers(final Users users)
{
this.users = users;
}
}
|
[
"lun130220@gamil.com"
] |
lun130220@gamil.com
|
b3d6fa03da7656241de43069d94c1c8fd2ae1961
|
b3a579a7d775276e604c280ecae62afdbe22f039
|
/src/main/java/com/concurrency/task5/deadlock/race/Producer.java
|
f4e641181d1807459f270ca5b2673f68e7994535
|
[] |
no_license
|
ValkSam/concurrencyTask
|
53876fe7b3a9f76d57c87f2d28678f8d03cc9b45
|
8d5cf4e20a81590df2398ea26283fcafe63efe8c
|
refs/heads/develop
| 2021-07-24T04:31:34.190830
| 2019-01-12T11:48:16
| 2019-11-24T19:42:13
| 223,791,613
| 0
| 0
| null | 2020-10-13T17:42:47
| 2019-11-24T18:36:29
|
Java
|
UTF-8
|
Java
| false
| false
| 1,189
|
java
|
package com.concurrency.task5.deadlock.race;
import java.util.ArrayList;
public class Producer implements Runnable {
private final ArrayList<String> queue;
private final int count;
public Producer(ArrayList<String> queue, int count) {
this.queue = queue;
this.count = count;
}
@Override
public void run() {
System.out.println("ProducerNoBlocking1 Started");
for (int i = 0; i < count; i++) {
while (queue.size() == count) {
System.out.println("Producer wait ...");
synchronized (queue) {
try {
queue.wait();
} catch (InterruptedException e) {
System.out.println("I am interrupted!");
Thread.currentThread().interrupt();
}
}
}
String element = "Producer" + i;
queue.add(element);
System.out.println("Produced: " + element);
if (queue.size() == 1) {
synchronized (queue) {
queue.notifyAll();
}
}
}
}
}
|
[
"do110473sva@gmail.com"
] |
do110473sva@gmail.com
|
63319b56e26c06190f786160837331c338f2f3c8
|
6f3b475dfa253ab9e9533428088790ef5c6898b2
|
/Spring DI/src/org/javaturk/spring/di/ch08/lifecycle/callback/example/domain/domain3/BeanE.java
|
eec2ddd2fd5deeecfb90792551071a410b3b4819
|
[] |
no_license
|
yusufsevinc/springLearnExamples
|
710bf2f2d4380e3250a976f7e70e6f8607581f5d
|
2fc8caa5a13e97557297d8d9e273888a7287111b
|
refs/heads/master
| 2023-07-09T13:05:10.085534
| 2021-08-05T13:59:56
| 2021-08-18T14:59:12
| 381,757,686
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 657
|
java
|
package org.javaturk.spring.di.ch08.lifecycle.callback.example.domain.domain3;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class BeanE {
private BeanF beanF;
@Autowired
public void setBeanD(BeanF beanF) {
this.beanF = beanF;
}
@Override
public String toString() {
return "BeanE [beanF=" + beanF + "]";
}
@PostConstruct
public void init() {
System.err.println("in BeanE init()");
}
@PreDestroy
public void shutDown() {
System.err.println("in BeanE shutDown()");
}
}
|
[
"1yusufsevinc@gmail.com"
] |
1yusufsevinc@gmail.com
|
a77a414541b6d1e0bf4e4c9c4c7164be1709792a
|
b3124be5e48bd1feeaa5ef357fcbe931a84f8e28
|
/httpclient_android/src/main/java-deprecated/org/apache/http/impl/client/DefaultRedirectHandler.java
|
d492482536ca854193b474033b4cd49a67d0f562
|
[] |
no_license
|
fabletang/sposutils
|
80fe3d915214b85585d50ea4c4c1bfeca913f36d
|
65e86e0fd4fc13e23c77bbc3ebc2a0cb072fe5cd
|
refs/heads/master
| 2016-09-08T01:44:11.829037
| 2015-04-20T03:15:32
| 2015-04-20T03:15:32
| 23,818,759
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,193
|
java
|
/*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.impl.client;
import java.net.URI;
import java.net.URISyntaxException;
import apache.http.impl.client.RedirectLocations;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.Header;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.ProtocolException;
import org.apache.http.annotation.Immutable;
import org.apache.http.client.CircularRedirectException;
import org.apache.http.client.RedirectHandler;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpHead;
import org.apache.http.client.params.ClientPNames;
import org.apache.http.client.utils.URIUtils;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.ExecutionContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.Args;
import org.apache.http.util.Asserts;
/**
* Default implementation of {@link RedirectHandler}.
*
* @since 4.0
*
* @deprecated (4.1) use {@link apache.http.impl.client.DefaultRedirectStrategy}.
*/
@Immutable
@Deprecated
public class DefaultRedirectHandler implements RedirectHandler {
private final Log log = LogFactory.getLog(getClass());
private static final String REDIRECT_LOCATIONS = "http.protocol.redirect-locations";
public DefaultRedirectHandler() {
super();
}
public boolean isRedirectRequested(
final HttpResponse response,
final HttpContext context) {
Args.notNull(response, "HTTP response");
final int statusCode = response.getStatusLine().getStatusCode();
switch (statusCode) {
case HttpStatus.SC_MOVED_TEMPORARILY:
case HttpStatus.SC_MOVED_PERMANENTLY:
case HttpStatus.SC_TEMPORARY_REDIRECT:
final HttpRequest request = (HttpRequest) context.getAttribute(
ExecutionContext.HTTP_REQUEST);
final String method = request.getRequestLine().getMethod();
return method.equalsIgnoreCase(HttpGet.METHOD_NAME)
|| method.equalsIgnoreCase(HttpHead.METHOD_NAME);
case HttpStatus.SC_SEE_OTHER:
return true;
default:
return false;
} //end of switch
}
public URI getLocationURI(
final HttpResponse response,
final HttpContext context) throws ProtocolException {
Args.notNull(response, "HTTP response");
//get the location header to find out where to redirect to
final Header locationHeader = response.getFirstHeader("location");
if (locationHeader == null) {
// got a redirect response, but no location header
throw new ProtocolException(
"Received redirect response " + response.getStatusLine()
+ " but no location header");
}
final String location = locationHeader.getValue();
if (this.log.isDebugEnabled()) {
this.log.debug("Redirect requested to location '" + location + "'");
}
URI uri;
try {
uri = new URI(location);
} catch (final URISyntaxException ex) {
throw new ProtocolException("Invalid redirect URI: " + location, ex);
}
final HttpParams params = response.getParams();
// rfc2616 demands the location value be a complete URI
// Location = "Location" ":" absoluteURI
if (!uri.isAbsolute()) {
if (params.isParameterTrue(ClientPNames.REJECT_RELATIVE_REDIRECT)) {
throw new ProtocolException("Relative redirect location '"
+ uri + "' not allowed");
}
// Adjust location URI
final HttpHost target = (HttpHost) context.getAttribute(
ExecutionContext.HTTP_TARGET_HOST);
Asserts.notNull(target, "Target host");
final HttpRequest request = (HttpRequest) context.getAttribute(
ExecutionContext.HTTP_REQUEST);
try {
final URI requestURI = new URI(request.getRequestLine().getUri());
final URI absoluteRequestURI = URIUtils.rewriteURI(requestURI, target, true);
uri = URIUtils.resolve(absoluteRequestURI, uri);
} catch (final URISyntaxException ex) {
throw new ProtocolException(ex.getMessage(), ex);
}
}
if (params.isParameterFalse(ClientPNames.ALLOW_CIRCULAR_REDIRECTS)) {
RedirectLocations redirectLocations = (RedirectLocations) context.getAttribute(
REDIRECT_LOCATIONS);
if (redirectLocations == null) {
redirectLocations = new RedirectLocations();
context.setAttribute(REDIRECT_LOCATIONS, redirectLocations);
}
final URI redirectURI;
if (uri.getFragment() != null) {
try {
final HttpHost target = new HttpHost(
uri.getHost(),
uri.getPort(),
uri.getScheme());
redirectURI = URIUtils.rewriteURI(uri, target, true);
} catch (final URISyntaxException ex) {
throw new ProtocolException(ex.getMessage(), ex);
}
} else {
redirectURI = uri;
}
if (redirectLocations.contains(redirectURI)) {
throw new CircularRedirectException("Circular redirect to '" +
redirectURI + "'");
} else {
redirectLocations.add(redirectURI);
}
}
return uri;
}
}
|
[
"tanghai@paxsz.com"
] |
tanghai@paxsz.com
|
7f7af2e66952bed06a406089dead905181acab55
|
b4a2a49b9744329e5e894cef1222be309bfe58b2
|
/src/test/java/org/tugraz/sysds/test/functions/parfor/ParForAdversarialLiteralsTest.java
|
d006335d80bacf637529eb17840c0a01e498cda9
|
[
"Apache-2.0"
] |
permissive
|
tugraz-isds/systemds
|
b1942d8f905ccf8a5da233a376c8bab045688cbf
|
c771440e9d41507a1420a58d316ac82b53923d55
|
refs/heads/master
| 2021-06-26T02:49:55.256823
| 2020-09-01T15:39:21
| 2020-09-01T15:39:21
| 147,829,568
| 42
| 28
|
Apache-2.0
| 2020-10-13T10:59:15
| 2018-09-07T13:48:30
|
Java
|
UTF-8
|
Java
| false
| false
| 5,080
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.tugraz.sysds.test.functions.parfor;
import java.util.HashMap;
import org.junit.Test;
import org.tugraz.sysds.lops.Lop;
import org.tugraz.sysds.runtime.matrix.data.MatrixValue.CellIndex;
import org.tugraz.sysds.test.AutomatedTestBase;
import org.tugraz.sysds.test.TestConfiguration;
import org.tugraz.sysds.test.TestUtils;
public class ParForAdversarialLiteralsTest extends AutomatedTestBase
{
private final static String TEST_NAME1a = "parfor_literals1a"; //local parfor, out filename dynwrite contains _t0
private final static String TEST_NAME1b = "parfor_literals1b"; //remote parfor, out filename dynwrite contains _t0
private final static String TEST_NAME1c = "parfor_literals1c"; //local parfor nested, out filename dynwrite contains _t0
private final static String TEST_NAME2 = "parfor_literals2"; //TODO clarify functions first
private final static String TEST_NAME3 = "parfor_literals3"; //remote parfor, print delimiters for prog conversion.
private final static String TEST_NAME4a = "parfor_literals4a"; //local parfor, varname _t0
private final static String TEST_NAME4b = "parfor_literals4b"; //remote parfor, varname _t0
private final static String TEST_DIR = "functions/parfor/";
private final static String TEST_CLASS_DIR = TEST_DIR + ParForAdversarialLiteralsTest.class.getSimpleName() + "/";
private final static double eps = 1e-10;
private final static int rows = 20;
private final static int cols = 10;
private final static double sparsity = 1.0;
@Override
public void setUp() {
addTestConfiguration(TEST_NAME1a,
new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1a, new String[] { "_t0B" }) );
addTestConfiguration(TEST_NAME1b,
new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1b, new String[] { "_t0B" }) );
addTestConfiguration(TEST_NAME1c,
new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1c, new String[] { "_t0B" }) );
addTestConfiguration(TEST_NAME2,
new TestConfiguration(TEST_CLASS_DIR, TEST_NAME2, new String[] { "B" }) );
addTestConfiguration(TEST_NAME3,
new TestConfiguration(TEST_CLASS_DIR, TEST_NAME3, new String[] { "B" }) );
addTestConfiguration(TEST_NAME4a,
new TestConfiguration(TEST_CLASS_DIR, TEST_NAME4a, new String[] { "B" }) );
addTestConfiguration(TEST_NAME4b,
new TestConfiguration(TEST_CLASS_DIR, TEST_NAME4b, new String[] { "B" }) );
}
@Test
public void testParForLocalThreadIDLiterals() {
runLiteralTest(TEST_NAME1a);
}
@Test
public void testParForRemoteThreadIDLiterals() {
runLiteralTest(TEST_NAME1b);
}
@Test
public void testParForLocalNestedThreadIDLiterals() {
runLiteralTest(TEST_NAME1c);
}
@Test
public void testParForExtFuncLiterals() {
runLiteralTest(TEST_NAME2);
}
@Test
public void testParForDelimiterLiterals() {
runLiteralTest(TEST_NAME3);
}
@Test
public void testParForLocalThreadIDVarname() {
runLiteralTest(TEST_NAME4a);
}
@Test
public void testParForRemoteThreadIDVarname() {
runLiteralTest(TEST_NAME4b);
}
@SuppressWarnings("deprecation")
private void runLiteralTest( String testName )
{
String TEST_NAME = testName;
TestConfiguration config = getTestConfiguration(TEST_NAME);
config.addVariable("rows", rows);
config.addVariable("cols", cols);
loadTestConfiguration(config);
// This is for running the junit test the new way, i.e., construct the arguments directly
String HOME = SCRIPT_DIR + TEST_DIR;
String IN = "A";
String OUT = (testName.equals(TEST_NAME1a)||testName.equals(TEST_NAME1b))?Lop.CP_ROOT_THREAD_ID:"B";
fullDMLScriptName = HOME + TEST_NAME + ".dml";
programArgs = new String[]{"-args", input(IN),
Integer.toString(rows), Integer.toString(cols), output(OUT) };
fullRScriptName = HOME + TEST_NAME + ".R";
rCmd = "Rscript" + " " + fullRScriptName + " " + inputDir() + " " + expectedDir();
double[][] A = getRandomMatrix(rows, cols, 0, 1, sparsity, 7);
writeInputMatrix("A", A, false);
boolean exceptionExpected = false;
runTest(true, exceptionExpected, null, -1);
//compare matrices
HashMap<CellIndex, Double> dmlin = TestUtils.readDMLMatrixFromHDFS(input(IN));
HashMap<CellIndex, Double> dmlout = readDMLMatrixFromHDFS(OUT);
TestUtils.compareMatrices(dmlin, dmlout, eps, "DMLin", "DMLout");
}
}
|
[
"mboehm7@gmail.com"
] |
mboehm7@gmail.com
|
5ebe9dc4802da18e850100b68da847590b9d3150
|
e49309ccc4a20c6b20016ca73ac5a043c58e699d
|
/zuoye/Html.java
|
6c954cd32d47b1a1352718a0ee681c54d8e80b3a
|
[] |
no_license
|
dengyanxin/homework
|
1dae157324d02ef57808c6e5992d7f8adb38c706
|
fc047b91a240429b731020e324baab50d4508fbc
|
refs/heads/master
| 2021-01-22T04:23:26.150153
| 2017-05-26T01:42:01
| 2017-05-26T01:42:01
| 92,460,061
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,434
|
java
|
package com.html;
import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
/**
*
* Socket TCP/IP协议
*
* */
public class Html {
public static void main(String[] args) {
//服务器端
ServerSocket server = null;
try {
server = new ServerSocket(9600);
} catch (IOException e) {
e.printStackTrace();
}
while(true){
try{
Socket client = server.accept();
byte[] buf = new byte[1024];
//读取请求信息
//InputStream in = client.getInputStream();
//in.read(buf);
//System.out.println("request from client " + client.getInetAddress().getHostAddress());
//System.out.println(new String(buf));
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(client.getInputStream()));
String s = bufferedReader.readLine();
String[] ss = s.split(" ");
//ss[1] =/index.html?id=1&action=delete
String[] sss = ss[1].split("[?]");
String[] ssss = sss[1].split("&");
if(ssss[1].equals("action=delete")){
String sql = "delete from student where "+ssss[0];
//。。。执行sql语句
}
// for(String ssss:sss){
// System.out.println(ssss);
// }
//发送响应内容
FileInputStream fileInputStream = new FileInputStream(new File("src"+sss[0]));
PrintStream writer = new PrintStream(client.getOutputStream());
writer.println("HTTP/1.1 200 OK");// 返回应答消息,并结束应答
writer.println("Content-Type:text/html");
writer.println();// 根据 HTTP 协议, 空行将结束头信息
byte[] buf1 = new byte[fileInputStream.available()];
//读取文件内容到buf1数组当中。
fileInputStream.read(buf1);
//写入到输出流当中。
writer.write("成龙刘凡在一起".getBytes());
writer.flush();
writer.close();
//in.close();
client.close();
}catch(Exception e){
e.printStackTrace();
}
}
}
}
|
[
"you@example.com"
] |
you@example.com
|
873b06b4ec567eb68bbbb3a22113edde66b0795b
|
a62338014368a94368af5c9f15fc661eaefe896b
|
/DropCap/demo/src/main/java/com/mecharyry/dropcap/demo/FontType.java
|
b34bf4b6813f7d0460a63d2bda81f1f8e0f32432
|
[
"Apache-2.0"
] |
permissive
|
haikuowuya/spikes
|
2fe4d3622c5aa6ed3f054ef25e3d91a5dbc24628
|
932030763249fabaaa11d9cdd4ae69a4282920af
|
refs/heads/master
| 2021-01-18T15:05:59.816624
| 2016-07-19T18:23:52
| 2016-07-19T18:23:52
| 64,445,893
| 1
| 0
| null | 2016-07-29T03:03:00
| 2016-07-29T03:03:00
| null |
UTF-8
|
Java
| false
| false
| 721
|
java
|
package com.mecharyry.dropcap.demo;
import android.support.annotation.StringRes;
import com.mecharyry.drop_cap.R;
enum FontType {
CABIN_REGULAR("Cabin Regular", R.string.sans_serif),
FUNKROCKER("Funkrocker", R.string.funkrocker),
MAGNIFICENT("Magnificent", R.string.magnificent),
NEUROPOLITICAL("Neuropolitical", R.string.neuropolitical);
private final String fontName;
@StringRes
private final int assetUrl;
FontType(String fontName, @StringRes int assetUrl) {
this.fontName = fontName;
this.assetUrl = assetUrl;
}
public String getFontName() {
return fontName;
}
@StringRes
public int getAssetUrl() {
return assetUrl;
}
}
|
[
"ryan.feline@novoda.com"
] |
ryan.feline@novoda.com
|
7fafb7765b03417cbd2db03c85125719a145660a
|
7f223ec1ddfc88fd1e8732fe227a88fddc054926
|
/server/infz-free/src/main/java/com/only/tech/enums/BookSubjectTypeEnum.java
|
5a5910c4370f8ef04502b42c8c2a8ffc2d2a2d91
|
[] |
no_license
|
sengeiou/qy_book_free
|
93da8933e0b1bd584bf974f97ed65063615917c4
|
42e35f88c24ce864de61d9f4f6921ca7df2970b7
|
refs/heads/master
| 2022-04-07T11:28:18.472504
| 2019-06-25T07:57:58
| 2019-06-25T07:57:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 510
|
java
|
package com.only.tech.enums;
import com.only.tech.constant.BookSubjectTypeConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 书籍专题分类
* @author shutong
* @since 2019/4/28
*/
@Getter
@AllArgsConstructor
public enum BookSubjectTypeEnum {
BOY(BookSubjectTypeConstants.BOY,"男生"),
GIRL(BookSubjectTypeConstants.GIRL,"女生"),
RECOMMEND(BookSubjectTypeConstants.RECOMMEND,"推荐");
private String status;
private String name;
}
|
[
"chenchendedefeng@126.com"
] |
chenchendedefeng@126.com
|
a315db26f303fde15a9b7a5348a75a5a526fa6ac
|
4d0f2d62d1c156d936d028482561585207fb1e49
|
/Ma nguon/zcs-8.0.2_GA_5570-src/ZimbraSoap/src/java/com/zimbra/soap/admin/type/SyncGalAccountDataSourceSpec.java
|
96dd32582a8b9ea1b3dd52f6f1590c58644bf8c9
|
[] |
no_license
|
vuhung/06-email-captinh
|
e3f0ff2e84f1c2bc6bdd6e4167cd7107ec42c0bd
|
af828ac73fc8096a3cc096806c8080e54d41251f
|
refs/heads/master
| 2020-07-08T09:09:19.146159
| 2013-05-18T12:57:24
| 2013-05-18T12:57:24
| 32,319,083
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,601
|
java
|
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2011 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
* ***** END LICENSE BLOCK *****
*/
package com.zimbra.soap.admin.type;
import com.google.common.base.Objects;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;
import com.zimbra.common.soap.AdminConstants;
import com.zimbra.soap.type.ZmBoolean;
@XmlAccessorType(XmlAccessType.NONE)
public class SyncGalAccountDataSourceSpec {
/**
* @zm-api-field-tag datasource-by
* @zm-api-field-description By - <b>id|name</b>
*/
@XmlAttribute(name=AdminConstants.A_BY /* by */, required=true)
private String by;
/**
* @zm-api-field-tag full-sync
* @zm-api-field-description If fullSync is set to <b>0 (false)</b> or unset the default behavior is trickle
* sync which will pull in any new contacts or modified contacts since last sync.
* <br />
* If fullSync is set to <b>1 (true)</b>, then the server will go through all the contacts that appear in GAL,
* and resolve deleted contacts in addition to new or modified ones.
*/
@XmlAttribute(name=AdminConstants.A_FULLSYNC /* fullSync */, required=false)
private ZmBoolean fullSync;
/**
* @zm-api-field-tag reset flag
* @zm-api-field-description Reset flag. If set, then all the contacts will be populated again, regardless of
* the status since last sync. Reset needs to be done when there is a significant change in the configuration,
* such as filter, attribute map, or search base.
*/
@XmlAttribute(name=AdminConstants.A_RESET /* reset */, required=false)
private ZmBoolean reset;
/**
* @zm-api-field-tag key
* @zm-api-field-description Key - meaning determined by <b>{datasource-by}</b>
*/
@XmlValue
private String value;
public SyncGalAccountDataSourceSpec() {
}
private SyncGalAccountDataSourceSpec(String by, String value) {
setBy(by);
setValue(value);
}
public static SyncGalAccountDataSourceSpec createForByAndValue(String by, String value) {
return new SyncGalAccountDataSourceSpec(by, value);
}
public void setBy(String by) { this.by = by; }
public void setFullSync(Boolean fullSync) { this.fullSync = ZmBoolean.fromBool(fullSync); }
public void setReset(Boolean reset) { this.reset = ZmBoolean.fromBool(reset); }
public void setValue(String value) { this.value = value; }
public String getBy() { return by; }
public Boolean getFullSync() { return ZmBoolean.toBool(fullSync); }
public Boolean getReset() { return ZmBoolean.toBool(reset); }
public String getValue() { return value; }
public Objects.ToStringHelper addToStringInfo(
Objects.ToStringHelper helper) {
return helper
.add("by", by)
.add("fullSync", fullSync)
.add("reset", reset)
.add("value", value);
}
@Override
public String toString() {
return addToStringInfo(Objects.toStringHelper(this))
.toString();
}
}
|
[
"vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931"
] |
vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931
|
500427f4f119d4a2bba8cc7b285108e71cfd2d2f
|
75b0f2fceb9d1786d64cac831326354d431a8a32
|
/com/planet_ink/coffee_mud/Commands/Give.java
|
26919207f77d10f8b6f30a59bd9298c18c8789ba
|
[
"Apache-2.0"
] |
permissive
|
thierrylach/CoffeeMud
|
f41857a8106706530c794d377bfb81b6458a847a
|
83101f209d8875ec2bbaf6c623d520a30cd3cc8d
|
refs/heads/master
| 2022-09-20T17:14:07.782102
| 2022-08-29T22:07:57
| 2022-08-29T22:07:57
| 113,072,543
| 0
| 0
| null | 2017-12-04T17:20:51
| 2017-12-04T17:20:51
| null |
UTF-8
|
Java
| false
| false
| 7,492
|
java
|
package com.planet_ink.coffee_mud.Commands;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.CMSecurity.SecFlag;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2004-2022 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 Give extends StdCommand
{
public Give()
{
}
private final String[] access = I(new String[] { "GIVE", "GI" });
@Override
public String[] getAccessWords()
{
return access;
}
private final static Class<?>[][] internalParameters=new Class<?>[][]
{
{
Item.class,MOB.class,Boolean.class
}
};
@Override
public boolean execute(final MOB mob, final List<String> commands, final int metaFlags)
throws java.io.IOException
{
final Vector<String> origCmds=new XVector<String>(commands);
if(commands.size()<2)
{
CMLib.commands().postCommandFail(mob,origCmds,L("Give what to whom?"));
return false;
}
commands.remove(0);
if(commands.size()<2)
{
CMLib.commands().postCommandFail(mob,origCmds,L("To whom should I give that?"));
return false;
}
final MOB recipient=mob.location().fetchInhabitant(commands.get(commands.size()-1));
if((recipient==null)||(!CMLib.flags().canBeSeenBy(recipient,mob)))
{
CMLib.commands().postCommandFail(mob,origCmds,L("I don't see anyone called @x1 here.",commands.get(commands.size()-1)));
return false;
}
commands.remove(commands.size()-1);
if((commands.size()>0)&&(commands.get(commands.size()-1).equalsIgnoreCase("to")))
commands.remove(commands.size()-1);
final int maxToGive=CMLib.english().parseMaxToGive(mob,commands,true,mob,false);
if(maxToGive<0)
return false;
String thingToGive=CMParms.combine(commands,0);
int addendum=1;
String addendumStr="";
final List<Item> itemsV = new ArrayList<Item>();
boolean allFlag = (commands.size() > 0) ? commands.get(0).equalsIgnoreCase("all") : false;
if (thingToGive.toUpperCase().startsWith("ALL."))
{
allFlag = true;
thingToGive = "ALL " + thingToGive.substring(4);
}
if (thingToGive.toUpperCase().endsWith(".ALL"))
{
allFlag = true;
thingToGive = "ALL " + thingToGive.substring(0, thingToGive.length() - 4);
}
final boolean onlyGoldFlag = mob.hasOnlyGoldInInventory();
Item giveThis=CMLib.english().parseBestPossibleGold(mob,null,thingToGive);
if(giveThis!=null)
{
if((CMath.bset(metaFlags, MUDCmdProcessor.METAFLAG_ORDER)||CMath.bset(metaFlags, MUDCmdProcessor.METAFLAG_FORCED))
&&(CMLib.law().getPropertyRecord(giveThis)!=null)
&&(!CMSecurity.isAllowed(mob, mob.location(), CMSecurity.SecFlag.ORDER)))
{
mob.tell(L("Yea, you don't want to do that."));
return false;
}
if(((Coins)giveThis).getNumberOfCoins()<CMLib.english().parseNumPossibleGold(mob,thingToGive))
return false;
if(CMLib.flags().canBeSeenBy(giveThis,mob))
itemsV.add(giveThis);
}
boolean doBugFix = true;
if(itemsV.size()==0)
{
while(doBugFix || ((allFlag)&&(addendum<=maxToGive)))
{
doBugFix=false;
giveThis=mob.fetchItem(null,Wearable.FILTER_UNWORNONLY,thingToGive+addendumStr);
if((giveThis==null)
&&(itemsV.size()==0)
&&(addendumStr.length()==0)
&&(!allFlag))
{
giveThis=mob.fetchItem(null,Wearable.FILTER_WORNONLY,thingToGive);
if(giveThis!=null)
{
if((!(giveThis).amWearingAt(Wearable.WORN_HELD))&&(!(giveThis).amWearingAt(Wearable.WORN_WIELD)))
{
CMLib.commands().postCommandFail(mob,origCmds,L("You must remove that first."));
return false;
}
final CMMsg newMsg=CMClass.getMsg(mob,giveThis,null,CMMsg.MSG_REMOVE,null);
if(mob.location().okMessage(mob,newMsg))
mob.location().send(mob,newMsg);
else
return false;
}
}
if((allFlag)
&&(!onlyGoldFlag)
&&(giveThis instanceof Coins)
&&(thingToGive.equalsIgnoreCase("all")))
giveThis=null;
else
{
if(giveThis==null)
break;
if(CMLib.flags().canBeSeenBy(giveThis,mob))
{
if((CMath.bset(metaFlags, MUDCmdProcessor.METAFLAG_ORDER)||CMath.bset(metaFlags, MUDCmdProcessor.METAFLAG_FORCED))
&&(CMLib.law().getPropertyRecord(giveThis)!=null)
&&(!CMSecurity.isAllowed(mob, mob.location(), CMSecurity.SecFlag.ORDER)))
{
mob.tell(L("Yea, you don't want to give over @x1.",giveThis.Name()));
giveThis=null;
}
else
itemsV.add(giveThis);
}
}
addendumStr="."+(++addendum);
}
}
if(itemsV.size()==0)
CMLib.commands().postCommandFail(mob,origCmds,L("You don't seem to be carrying that."));
else
for(int i=0;i<itemsV.size();i++)
{
giveThis=itemsV.get(i);
give(mob, recipient, giveThis, false);
}
return false;
}
protected boolean give(final MOB mob, final MOB recipient, final Item giveThis, final boolean quiet)
{
final CMMsg newMsg=CMClass.getMsg(mob,recipient,giveThis,CMMsg.MSG_GIVE,quiet?"":L("<S-NAME> give(s) <O-NAME> to <T-NAMESELF>."));
boolean success=false;
if(mob.location().okMessage(mob,newMsg))
{
mob.location().send(mob,newMsg);
success=true;
}
if(giveThis instanceof Coins)
((Coins)giveThis).putCoinsBack();
if(giveThis instanceof RawMaterial)
((RawMaterial)giveThis).rebundle();
return success;
}
@Override
public double combatActionsCost(final MOB mob, final List<String> cmds)
{
return CMProps.getCommandCombatActionCost(ID());
}
@Override
public double actionsCost(final MOB mob, final List<String> cmds)
{
return CMProps.getCommandActionCost(ID());
}
@Override
public boolean canBeOrdered()
{
return true;
}
@Override
public Object executeInternal(final MOB mob, final int metaFlags, final Object... args) throws java.io.IOException
{
if(!super.checkArguments(internalParameters, args))
return Boolean.FALSE;
if(args[0] instanceof Item)
{
final Item I=(Item)args[0];
final MOB targetMOB=(MOB)args[1];
final boolean quiet = ((Boolean)args[2]).booleanValue();
give(mob,targetMOB,I,quiet);
}
return Boolean.FALSE;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
b387ece5e7a4b0469b73cceada1b3c76390bd002
|
91297ffb10fb4a601cf1d261e32886e7c746c201
|
/api.progress/test/unit/src/org/netbeans/api/progress/ProgressHandleFactoryTest.java
|
b09d9919afbf090095e124c982770bd62e7769aa
|
[] |
no_license
|
JavaQualitasCorpus/netbeans-7.3
|
0b0a49d8191393ef848241a4d0aa0ecc2a71ceba
|
60018fd982f9b0c9fa81702c49980db5a47f241e
|
refs/heads/master
| 2023-08-12T09:29:23.549956
| 2019-03-16T17:06:32
| 2019-03-16T17:06:32
| 167,005,013
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,583
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Contributor(s):
*
* The Original Software is NetBeans. The Initial Developer of the Original
* Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
* Microsystems, Inc. All Rights Reserved.
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*/
package org.netbeans.api.progress;
import javax.swing.JComponent;
import javax.swing.JProgressBar;
import javax.swing.SwingUtilities;
import javax.swing.Timer;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import org.netbeans.junit.NbTestCase;
import org.netbeans.junit.RandomlyFails;
import org.netbeans.modules.progress.spi.Controller;
import org.netbeans.modules.progress.spi.InternalHandle;
import org.netbeans.modules.progress.spi.ProgressEvent;
import org.netbeans.modules.progress.spi.ProgressUIWorker;
import org.openide.util.Cancellable;
/**
*
* @author Milos Kleint (mkleint@netbeans.org)
*/
public class ProgressHandleFactoryTest extends NbTestCase {
public ProgressHandleFactoryTest(String testName) {
super(testName);
}
/**
* Test of createHandle method, of class org.netbeans.progress.api.ProgressHandleFactory.
*/
public void testCreateHandle() {
ProgressHandle handle = ProgressHandleFactory.createHandle("task 1");
InternalHandle internal = handle.getInternalHandle();
assertEquals("task 1", internal.getDisplayName());
assertFalse(internal.isAllowCancel());
assertFalse(internal.isCustomPlaced());
assertEquals(InternalHandle.STATE_INITIALIZED, internal.getState());
handle = ProgressHandleFactory.createHandle("task 2", new TestCancel());
internal = handle.getInternalHandle();
assertEquals("task 2", internal.getDisplayName());
assertTrue(internal.isAllowCancel());
assertFalse(internal.isCustomPlaced());
assertEquals(InternalHandle.STATE_INITIALIZED, internal.getState());
}
@RandomlyFails // NB-Core-Build #1176
public void testCustomComponentIsInitialized() {
Controller.defaultInstance = new TestController();
ProgressHandle handle = ProgressHandleFactory.createHandle("task 1");
JComponent component = ProgressHandleFactory.createProgressComponent(handle);
handle.start(15);
handle.progress(2);
waitForTimerFinish();
assertEquals(15, ((JProgressBar) component).getMaximum());
assertEquals(2, ((JProgressBar) component).getValue());
handle = ProgressHandleFactory.createHandle("task 2");
component = ProgressHandleFactory.createProgressComponent(handle);
handle.start(20);
waitForTimerFinish();
assertEquals(20, ((JProgressBar) component).getMaximum());
assertEquals(0, ((JProgressBar) component).getValue());
}
private static class AwtBlocker implements Runnable {
public AwtBlocker(int blockingTime) {
this.blockingTime = blockingTime;
}
public void run() {
UIDefaults uidef = UIManager.getDefaults();
synchronized (uidef) {
blocking = true;
sleep();
}
}
synchronized void sleep() {
try {
wait(blockingTime);
} catch (InterruptedException ex) {
}
}
synchronized void wakeup() {
notify();
}
volatile public boolean blocking = false;
private int blockingTime;
}
/**
* Tests if ProgressUIWorkerProvider is created inside awt thread (if not deadlock is possible)
*/
public void testProgressCanBeCreatedOutOfSyncAwt() {
Controller.defaultInstance = null;
final int blockingTime = 10000;
AwtBlocker blocker = new AwtBlocker(blockingTime);
long start = System.currentTimeMillis();
SwingUtilities.invokeLater(blocker);
while (!blocker.blocking) {
try {
Thread.sleep(10);
} catch (InterruptedException ex) {
}
}
ProgressHandle pHandle = ProgressHandleFactory.createHandle("Peforming operation...");
pHandle.start();
long elapsed = System.currentTimeMillis() - start;
assertTrue("Possible deadlock detected, ProgressUIWorkerProvider is creating UI outside AWT thread.", elapsed < blockingTime);
pHandle.finish();
blocker.wakeup();
}
private static class TestCancel implements Cancellable {
public boolean cancel() {
return true;
}
}
private class TestController extends Controller {
public TestController() {
super(new ProgressUIWorker() {
public void processProgressEvent(ProgressEvent event) { }
public void processSelectedProgressEvent(ProgressEvent event) { }
});
}
public Timer getTestTimer() {
return timer;
}
}
private void waitForTimerFinish() {
TestController tc = (TestController)Controller.defaultInstance;
int count = 0;
do {
if (count > 10) {
fail("Takes too much time");
}
try {
count = count + 1;
Thread.sleep(300);
} catch (InterruptedException exc) {
System.out.println("interrupted");
}
} while (tc.getTestTimer().isRunning());
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
701d3fa4a772835ef456b0fd1d9e6e03cf00798c
|
fa7a49d74b5781bf93020ef6b800b2a34c0c8055
|
/src/main/java/com/hcl/inghackathon/repository/PaymentRepository.java
|
a4d13cc599153bce37b63f4571d575bcf74087df
|
[] |
no_license
|
SumangalaBhat/INGBank
|
2db8a0bb559ee5a2bf6e955aafba04bc2a90c5a8
|
5f6fc6f615c75557bc2b29923a9878a88dea75a9
|
refs/heads/master
| 2020-06-12T06:38:56.585681
| 2019-05-09T14:06:17
| 2019-05-09T14:06:17
| 194,222,171
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 290
|
java
|
package com.hcl.inghackathon.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.hcl.inghackathon.entities.Payment;
@Repository
public interface PaymentRepository extends JpaRepository<Payment, Long> {
}
|
[
"nithin2889@gmail.com"
] |
nithin2889@gmail.com
|
beb03c3e20ec9127637c07443c0acd1d868ddcf3
|
9df16d3996015f4ca510b7b37bcc69fcbc57d9c8
|
/UserService/src/main/java/pl/java/scalatech/domain/AbstractEntity.java
|
6df3dd9779015144d806ba3ee001e8321a159dbd
|
[] |
no_license
|
przodownikR1/CloudPoc
|
79eb935e9faca313e492e432399139eb7e202b46
|
01e1aced0b2fc0c7ecdbe9ecc7b39d7aa262bd8b
|
refs/heads/master
| 2020-12-24T10:24:28.212201
| 2017-03-15T22:37:54
| 2017-03-15T22:37:54
| 73,082,589
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 491
|
java
|
package pl.java.scalatech.domain;
import java.io.Serializable;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import lombok.Getter;
@MappedSuperclass
public abstract class AbstractEntity implements Serializable{
private static final long serialVersionUID = 1764429777262538648L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Getter
protected Long id;
}
|
[
"przodownik@tlen.pl"
] |
przodownik@tlen.pl
|
7ef35401af3ab59bd7c56cfb58dd5ecfdd773288
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/32/32_8b0dc6fdce57052bd10a439f96ef300e8a518f54/Bpmn2PropertyPage/32_8b0dc6fdce57052bd10a439f96ef300e8a518f54_Bpmn2PropertyPage_t.java
|
fa08766f62802f5413dec2ebcf685b2d1204da17
|
[] |
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
| 6,636
|
java
|
/*******************************************************************************
* Copyright (c) 2011 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
*
* @author Bob Brodt
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.preferences;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.ui.Activator;
import org.eclipse.bpmn2.modeler.ui.Messages;
import org.eclipse.core.resources.IProject;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.dialogs.PropertyPage;
import org.osgi.service.prefs.BackingStoreException;
public class Bpmn2PropertyPage extends PropertyPage {
private Bpmn2Preferences prefs;
private Combo cboRuntimes;
private Button btnShowAdvancedProperties;
private Button btnShowDescriptions;
private Button btnShowIds;
private Button btnCheckProjectNature;
private BPMNDIAttributeDefaultCombo cboIsHorizontal;
private BPMNDIAttributeDefaultCombo cboIsExpanded;
private BPMNDIAttributeDefaultCombo cboIsMessageVisible;
private BPMNDIAttributeDefaultCombo cboIsMarkerVisible;
private Composite runtimeComposite;
public Bpmn2PropertyPage() {
super();
setTitle("BPMN2");
setDescription(Messages.Bpmn2PreferencePage_HomePage_Description);
}
@Override
protected Control createContents(Composite parent) {
loadPrefs();
Composite container = new Composite(parent, SWT.NULL);
container.setLayout(new GridLayout(3, false));
Label label = new Label(container, SWT.NONE);
label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1));
label.setText(Bpmn2Preferences.PREF_TARGET_RUNTIME_LABEL);
cboRuntimes = new Combo(container, SWT.READ_ONLY);
cboRuntimes.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1));
btnShowAdvancedProperties = new Button(container, SWT.CHECK);
btnShowAdvancedProperties.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 3, 1));
btnShowAdvancedProperties.setText(Bpmn2Preferences.PREF_SHOW_ADVANCED_PROPERTIES_LABEL);
btnShowDescriptions = new Button(container, SWT.CHECK);
btnShowDescriptions.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 3, 1));
btnShowDescriptions.setText(Bpmn2Preferences.PREF_SHOW_DESCRIPTIONS_LABEL);
btnShowIds = new Button(container, SWT.CHECK);
btnShowIds.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 3, 1));
btnShowIds.setText(Bpmn2Preferences.PREF_SHOW_ID_ATTRIBUTE_LABEL);
btnCheckProjectNature = new Button(container, SWT.CHECK);
btnCheckProjectNature.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 3, 1));
btnCheckProjectNature.setText(Bpmn2Preferences.PREF_CHECK_PROJECT_NATURE_LABEL);
// Default values for optional BPMN DI attributes
Group group = new Group(container, SWT.BORDER);
group.setLayout(new GridLayout(3,false));
group.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 3, 1));
group.setText("Default values for BPMN Diagram Interchange (DI) optional attributes");
cboIsHorizontal = new BPMNDIAttributeDefaultCombo(group);
cboIsHorizontal.setText(Bpmn2Preferences.PREF_IS_HORIZONTAL_LABEL);
cboIsExpanded = new BPMNDIAttributeDefaultCombo(group);
cboIsExpanded.setText(Bpmn2Preferences.PREF_IS_EXPANDED_LABEL);
cboIsMessageVisible = new BPMNDIAttributeDefaultCombo(group);
cboIsMessageVisible.setText(Bpmn2Preferences.PREF_IS_MESSAGE_VISIBLE_LABEL);
cboIsMarkerVisible = new BPMNDIAttributeDefaultCombo(group);
cboIsMarkerVisible.setText(Bpmn2Preferences.PREF_IS_MARKER_VISIBLE_LABEL);
runtimeComposite = prefs.getRuntime().getRuntimeExtension().getPreferencesComposite(container, prefs);
initData();
return container;
}
private void restoreDefaults() {
prefs.restoreDefaults(true);
prefs.getRuntime();
initData();
}
@Override
protected void performDefaults() {
super.performDefaults();
restoreDefaults();
}
public void loadPrefs() {
IProject project = (IProject) getElement().getAdapter(IProject.class);
prefs = Bpmn2Preferences.getInstance(project);
prefs.load();
}
private void initData() {
btnShowAdvancedProperties.setSelection( prefs.getShowAdvancedPropertiesTab() );
btnShowDescriptions.setSelection( prefs.getShowDescriptions() );
btnShowIds.setSelection( prefs.getShowIdAttribute() );
btnCheckProjectNature.setSelection( prefs.getCheckProjectNature() );
cboIsHorizontal.setValue(prefs.getIsHorizontal());
cboIsExpanded.setValue( prefs.getIsExpanded() );
cboIsMessageVisible.setValue( prefs.getIsMessageVisible() );
cboIsMarkerVisible.setValue( prefs.getIsMarkerVisible() );
TargetRuntime cr = prefs.getRuntime();
int i = 0;
for (TargetRuntime r : TargetRuntime.getAllRuntimes()) {
cboRuntimes.add(r.getName());
if (r == cr)
cboRuntimes.select(i);
++i;
}
}
@Override
public boolean performOk() {
setErrorMessage(null);
try {
updateData();
} catch (BackingStoreException e) {
Activator.showErrorWithLogging(e);
}
return true;
}
@Override
public void dispose() {
prefs.dispose();
super.dispose();
}
private void updateData() throws BackingStoreException {
int i = cboRuntimes.getSelectionIndex();
TargetRuntime rt = TargetRuntime.getAllRuntimes()[i];
prefs.setRuntime(rt);
prefs.setShowAdvancedPropertiesTab(btnShowAdvancedProperties.getSelection());
prefs.setShowDescriptions(btnShowDescriptions.getSelection());
prefs.setShowIdAttribute(btnShowIds.getSelection());
prefs.setCheckProjectNature(btnCheckProjectNature.getSelection());
prefs.setIsHorizontal(cboIsHorizontal.getValue());
prefs.setIsExpanded(cboIsExpanded.getValue());
prefs.setIsMessageVisible(cboIsMessageVisible.getValue());
prefs.setIsMarkerVisible(cboIsMarkerVisible.getValue());
prefs.save();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
923726f2ad2ada21376b0a1eb587316864d6c6c7
|
d6b6abe73a0c82656b04875135b4888c644d2557
|
/sources/com/google/android/gms/internal/ads/pm.java
|
845a989dfcb31842d01222becd2607b89959b3ac
|
[] |
no_license
|
chanyaz/and_unimed
|
4344d1a8ce8cb13b6880ca86199de674d770304b
|
fb74c460f8c536c16cca4900da561c78c7035972
|
refs/heads/master
| 2020-03-29T09:07:09.224595
| 2018-08-30T06:29:32
| 2018-08-30T06:29:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,748
|
java
|
package com.google.android.gms.internal.ads;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.a;
public final class pm extends afa implements zzatn {
pm(IBinder iBinder) {
super(iBinder, "com.google.android.gms.ads.omid.IOmid");
}
public final String getVersion() {
Parcel a = a(6, a());
String readString = a.readString();
a.recycle();
return readString;
}
public final IObjectWrapper zza(String str, IObjectWrapper iObjectWrapper, String str2, String str3, String str4) {
Parcel a = a();
a.writeString(str);
afc.a(a, (IInterface) iObjectWrapper);
a.writeString(str2);
a.writeString(str3);
a.writeString(str4);
a = a(3, a);
IObjectWrapper a2 = a.a(a.readStrongBinder());
a.recycle();
return a2;
}
public final void zza(IObjectWrapper iObjectWrapper, IObjectWrapper iObjectWrapper2) {
Parcel a = a();
afc.a(a, (IInterface) iObjectWrapper);
afc.a(a, (IInterface) iObjectWrapper2);
b(5, a);
}
public final void zzm(IObjectWrapper iObjectWrapper) {
Parcel a = a();
afc.a(a, (IInterface) iObjectWrapper);
b(4, a);
}
public final void zzn(IObjectWrapper iObjectWrapper) {
Parcel a = a();
afc.a(a, (IInterface) iObjectWrapper);
b(7, a);
}
public final boolean zzy(IObjectWrapper iObjectWrapper) {
Parcel a = a();
afc.a(a, (IInterface) iObjectWrapper);
a = a(2, a);
boolean a2 = afc.a(a);
a.recycle();
return a2;
}
}
|
[
"khairilirfanlbs@gmail.com"
] |
khairilirfanlbs@gmail.com
|
1a7b06240344bf519b49bad5a56411b9f2ee235a
|
201435d49107616e55ffe27f68c47629772a8796
|
/Exemplo4/src/br/com/fiap/rs/exemplos/Aplicacao.java
|
8403a394439bce42d8245cc566a7d7e1f5a22973
|
[] |
no_license
|
gfishdev/FIAP-WEBSERVICES
|
0559802181f6ba88ad55660633e8eb064b3224a5
|
986add83fb72569044b699920c95c1f8d8cc281e
|
refs/heads/master
| 2021-07-15T01:01:09.083733
| 2017-10-20T23:12:37
| 2017-10-20T23:12:37
| 103,469,444
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 268
|
java
|
package br.com.fiap.rs.exemplos;
import javax.ws.rs.ApplicationPath;
import org.glassfish.jersey.server.ResourceConfig;
@ApplicationPath("resources")
public class Aplicacao extends ResourceConfig{
public Aplicacao(){
packages("br.com.fiap.rs.exemplos");
}
}
|
[
"logonrm@fiap.com.br"
] |
logonrm@fiap.com.br
|
2d9c0f7342eefb853af1d004febf25e22cbcdc52
|
2072659ed1de2bb264493e023802d7dd771df268
|
/zuihou-authority-biz/src/main/java/com/github/zuihou/authority/service/auth/UserService.java
|
766d6fde50e33cebb620a9b9859bc1ccb32a0286
|
[
"Apache-2.0"
] |
permissive
|
LimTerran/zuihou-admin-boot
|
a4c9fae022b5ff4e10e4b3030957129ae0c71b84
|
af0de7b158536cc36c5f9b000b759a349660e5d0
|
refs/heads/master
| 2022-11-06T05:12:55.195896
| 2020-06-28T06:30:05
| 2020-06-28T06:30:05
| 259,492,403
| 0
| 0
|
Apache-2.0
| 2020-06-28T06:30:06
| 2020-04-28T00:48:50
| null |
UTF-8
|
Java
| false
| false
| 3,256
|
java
|
package com.github.zuihou.authority.service.auth;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.zuihou.authority.dto.auth.UserUpdatePasswordDTO;
import com.github.zuihou.authority.entity.auth.User;
import com.github.zuihou.base.service.SuperCacheService;
import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
import com.github.zuihou.security.feign.UserQuery;
import com.github.zuihou.security.model.SysUser;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* <p>
* 业务接口
* 账号
* </p>
*
* @author zuihou
* @date 2019-07-03
*/
public interface UserService extends SuperCacheService<User> {
/**
* 根据用户id 查询数据范围
*
* @param userId 用户id
* @return
*/
Map<String, Object> getDataScopeById(Long userId);
/**
* 根据角色id 和 账号或名称 查询角色关联的用户
* <p>
* 注意,该接口只返回 id,账号,姓名,手机,性别
*
* @param roleId 角色id
* @param keyword 账号或名称
* @return
*/
List<User> findUserByRoleId(Long roleId, String keyword);
/**
* 检测账号是否存在
*
* @param account
* @return
*/
boolean check(String account);
/**
* 修改输错密码的次数
*
* @param id
*/
void incrPasswordErrorNumById(Long id);
/**
* 根据账号查询用户
*
* @param account
* @return
*/
User getByAccount(String account);
/**
* 修改用户最后一次登录 时间
*
* @param account
*/
// void updateLoginTime(String account);
/**
* 保存
*
* @param user
* @return
*/
User saveUser(User user);
/**
* 重置密码
*
* @param ids
* @return
*/
boolean reset(List<Long> ids);
/**
* 修改
*
* @param user
* @return
*/
User updateUser(User user);
/**
* 删除
*
* @param ids
* @return
*/
boolean remove(List<Long> ids);
/**
* 数据权限 分页
*
* @param page
* @param wrapper
*/
IPage<User> findPage(IPage<User> page, LbqWrapper<User> wrapper);
/**
* 修改密码
*
* @param data
* @return
*/
Boolean updatePassword(UserUpdatePasswordDTO data);
/**
* 重置密码错误次数
*
* @param id
* @return
*/
int resetPassErrorNum(Long id);
/**
* 根据 id 查询用户
*
* @param ids
* @return
*/
Map<Serializable, Object> findUserByIds(Set<Serializable> ids);
/**
* 根据 id 查询用户名称
*
* @param ids
* @return
*/
Map<Serializable, Object> findUserNameByIds(Set<Serializable> ids);
/**
* 根据id 查询用户详情
*
* @param id
* @param query
* @return
*/
SysUser getSysUserById(Long id, UserQuery query);
/**
* 查询所有用户的id
*
* @return
*/
List<Long> findAllUserId();
/**
* 初始化用户
*
* @param user
* @return
*/
boolean initUser(User user);
}
|
[
"244387066@qq.com"
] |
244387066@qq.com
|
67c2c3f3574525eb1ba2ce99a570bb636fb662c8
|
4627d514d6664526f58fbe3cac830a54679749cd
|
/results/evosuite5/time-org.joda.time.format.FormatUtils-13/org/joda/time/format/FormatUtils_ESTest_scaffolding.java
|
6fef709f96ea0d6c76f2250f80374b37000b31ec
|
[] |
no_license
|
STAMP-project/Cling-application
|
c624175a4aa24bb9b29b53f9b84c42a0f18631bd
|
0ff4d7652b434cbfd9be8d8bb38cfc8d8eaa51b5
|
refs/heads/master
| 2022-07-27T09:30:16.423362
| 2022-07-19T12:01:46
| 2022-07-19T12:01:46
| 254,310,667
| 2
| 2
| null | 2021-07-12T12:29:50
| 2020-04-09T08:11:35
| null |
UTF-8
|
Java
| false
| false
| 3,773
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Aug 13 20:42:57 GMT 2019
*/
package org.joda.time.format;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class FormatUtils_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.joda.time.format.FormatUtils";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "/home/pderakhshanfar/botsing-integration-experiment");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(FormatUtils_ESTest_scaffolding.class.getClassLoader() ,
"org.joda.time.format.FormatUtils"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(FormatUtils_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.joda.time.format.FormatUtils"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
f315f61ee82eb8d37333ccb4054e7edbae85fb07
|
923935c1c19d62546fae2e6ac8b2aa3a21ac1190
|
/provider/provider-admin-api/src/main/java/com/lwx/myshop/plus/provider/domain/UmsAdmin.java
|
26cd4f475c4af1f91dc648ad931d8b8c8daea27a
|
[
"Apache-2.0"
] |
permissive
|
liuwuxiang/MyShopPlus
|
a4fd060213930593e9d8181f6705f29eb2b45c49
|
757b3386d1df587276716cdaee2ad8b68668674a
|
refs/heads/master
| 2022-04-29T00:29:36.866431
| 2020-04-26T01:57:22
| 2020-04-26T01:57:22
| 258,913,775
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,524
|
java
|
package com.lwx.myshop.plus.provider.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 系统用户表
* @author 刘武祥
* @version 1.0.0
*/
@Data
@Table(name = "ums_admin")
public class UmsAdmin implements Serializable {
private static final long serialVersionUID = 6062572194707751961L;
@Id
@Column(name = "id")
@GeneratedValue(generator = "JDBC")
private Long id;
@Column(name = "username")
private String username;
@Column(name = "`password`")
private String password;
/**
* 头像
*/
@Column(name = "icon")
private String icon;
/**
* 邮箱
*/
@Column(name = "email")
private String email;
/**
* 昵称
*/
@Column(name = "nick_name")
private String nickName;
/**
* 备注信息
*/
@Column(name = "note")
private String note;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Column(name = "create_time")
private Date createTime;
/**
* 最后登录时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Column(name = "login_time")
private Date loginTime;
/**
* 帐号启用状态:0->禁用;1->启用
*/
@Column(name = "`status`")
private Integer status;
}
|
[
"494775947@qq.com"
] |
494775947@qq.com
|
c29c21e8435ed85d03920a53ceb2b52dea6eda4f
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/mapstruct/learning/4167/MethodSelectors.java
|
c7c21d4ba9f3ffc610194f88721c6fcd98f9cf4d
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,602
|
java
|
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.internal.model.source.selector;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
import org.mapstruct.ap.internal.model.common.Type;
import org.mapstruct.ap.internal.model.common.TypeFactory;
import org.mapstruct.ap.internal.model.source.Method;
/**
* Applies all known {@link MethodSelector}s in order.
*
* @author Sjaak Derksen
*/
public class MethodSelectors {
private final List<MethodSelector> selectors;
public MethodSelectors(Types typeUtils, Elements elementUtils, TypeFactory typeFactory) {
selectors = Arrays.asList(
new MethodFamilySelector(),
new TypeSelector( typeFactory ),
new QualifierSelector( typeUtils, elementUtils ),
new TargetTypeSelector( typeUtils, elementUtils ),
new XmlElementDeclSelector( typeUtils ),
new InheritanceSelector(),
new CreateOrUpdateSelector(),
new FactoryParameterSelector() );
}
/**
* Selects those methods which match the given types and other criteria
*
* @param <T> either SourceMethod or BuiltInMethod
* @param mappingMethod mapping method, defined in Mapper for which this selection is carried out
* @param methods list of available methods
* @param sourceTypes parameter type(s) that should be matched
* @param targetType return type that should be matched
* @param criteria criteria used in the selection process
* @return list of methods that passes the matching process
*/
public <T extends Method> List<SelectedMethod<T>> getMatchingMethods(Method mappingMethod, List<T> methods,
List<Type> sourceTypes, Type targetType,
SelectionCriteria criteria) {
List<SelectedMethod<T>> candidates = new ArrayList<>( methods.size()
);
for ( T method : methods ) {
candidates.add( new SelectedMethod<>( method ) );
}
for ( MethodSelector selector : selectors ) {
candidates = selector.getMatchingMethods(
mappingMethod,
candidates,
sourceTypes,
targetType,
criteria );
}
return candidates;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
0f7eab75a40753663bb0ea72f6d6518d5670f7b6
|
220aa92b5848802bb6bf76785b368f6eb1471b73
|
/app/src/main/java/com/example/zhanghao/woaisiji/activity/login/RegisterOneActivity.java
|
35655eb4bdae455aa168d71671decd22ad4b1adc
|
[] |
no_license
|
Cheng7758/FuBaihui
|
c0fa497cd6870ce4658720065b9425a14e1a1663
|
4830733a8b2d50f0e00d1e65d9b0a44a50ec22ff
|
refs/heads/master
| 2020-06-16T11:00:54.696259
| 2019-08-14T01:53:36
| 2019-08-14T01:53:36
| 195,545,689
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,313
|
java
|
package com.example.zhanghao.woaisiji.activity.login;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import com.example.zhanghao.woaisiji.R;
import com.example.zhanghao.woaisiji.utils.PhoneJudgeUtils;
import com.example.zhanghao.woaisiji.utils.PublicActivityList;
//import com.readystatesoftware.systembartint.SystemBarTintManager;
/**
* Created by admin on 2016/8/13.
*/
public class RegisterOneActivity extends Activity implements View.OnClickListener {
private Button btnNext;
private EditText editRegisterPhoneNumber;
private ImageView registerBack;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PublicActivityList.activityList.add(this);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_register_one);
initView();
// 响应点击事件
responseClickListener();
// 判断手机号格式是否正确
editRegisterPhoneNumber.addTextChangedListener(new TextWatcher() {
private CharSequence mTemp;
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
mTemp = charSequence;
}
@Override
public void afterTextChanged(Editable editable) {
String phoneNumber = mTemp.toString();
if ((null != phoneNumber) && PhoneJudgeUtils.isPhone(phoneNumber)) {
btnNext.setBackgroundResource(R.drawable.btn_register_selected);
btnNext.setEnabled(true);
btnNext.setClickable(true);
btnNext.setOnClickListener(RegisterOneActivity.this);
} else {
btnNext.setBackgroundResource(R.drawable.btn_register_default);
btnNext.setClickable(false);
btnNext.setEnabled(false);
}
}
});
}
private void responseClickListener() {
registerBack.setOnClickListener(this);
}
private void initView() {
editRegisterPhoneNumber = (EditText) findViewById(R.id.edit_register_phone_number);
registerBack = (ImageView) findViewById(R.id.iv_register_back);
btnNext = (Button) findViewById(R.id.btn_next);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.btn_next://下一步
Intent intent = new Intent(RegisterOneActivity.this, RegisterTwoActivity.class);
intent.putExtra("phone",editRegisterPhoneNumber.getText().toString());
startActivity(intent);
break;
case R.id.iv_register_back://返回按钮
finish();
break;
}
}
}
|
[
"wang62719@gmail.com"
] |
wang62719@gmail.com
|
6a4305b0039236111718d7c3424cfa0df395b247
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_2f86b0fd1870f3584834cf1e8693e34ea577ad19/RDBScheme/18_2f86b0fd1870f3584834cf1e8693e34ea577ad19_RDBScheme_s.java
|
a10037e595c6eec0c1d2efc16b73584f23d0c306
|
[] |
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,680
|
java
|
package com.etsy.rdb;
import cascading.flow.FlowProcess;
import cascading.scheme.Scheme;
import cascading.scheme.SinkCall;
import cascading.scheme.SourceCall;
import cascading.tap.Tap;
import cascading.tuple.Fields;
import cascading.tuple.Tuple;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.RecordReader;
import java.io.IOException;
public class RDBScheme extends Scheme<JobConf, RecordReader, OutputCollector, Object[], Void>
{
public RDBScheme( Fields fields )
{
super( fields, fields );
}
@Override
public void sourceConfInit( FlowProcess<JobConf> flowProcess, Tap<JobConf, RecordReader, OutputCollector> tap, JobConf conf )
{
}
@Override
public void sourcePrepare( FlowProcess<JobConf> flowProcess, SourceCall<Object[], RecordReader> sourceCall )
{
}
@Override
public void sinkConfInit( FlowProcess<JobConf> flowProcess, Tap<JobConf, RecordReader, OutputCollector> tap, JobConf conf )
{
conf.setOutputKeyClass( RDBString.class );
conf.setOutputValueClass( RDBString.class );
conf.setOutputFormat( RDBOutputFormat.class );
}
@Override
public boolean source( FlowProcess<JobConf> flowProcess, SourceCall<Object[], RecordReader> sourceCall ) throws IOException
{
return false;
}
@Override
public void sink( FlowProcess<JobConf> flowProcess, SinkCall<Void, OutputCollector> sinkCall ) throws IOException
{
Tuple tuple = sinkCall.getOutgoingEntry().getTuple();
sinkCall.getOutput().collect( tuple.getObject(0), tuple.getObject(1) );
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
de59f9ebfc72ca6a51d8a93f58606a024aa2465c
|
3e5cc4452f103da4a94e2644ae1ef5645826be18
|
/app/src/main/java/com/rainwood/chestnut/okhttp/HttpHandler.java
|
9383fb4cba9c9518d2aa8f7d417d6ed9ad2aa19d
|
[] |
no_license
|
maple00/ChestnutCustom
|
f1f3cd237adf60c8a955dbb85a6db6847bc8191f
|
4bee1c147ff71848753674526b29000fdeefd36d
|
refs/heads/master
| 2021-02-17T21:11:50.753728
| 2020-04-20T10:10:27
| 2020-04-20T10:10:27
| 243,754,799
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,957
|
java
|
package com.rainwood.chestnut.okhttp;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.rainwood.chestnut.utils.DateTimeUtils;
/**
* Created by Relin
* on 2018-09-10.
* Http异步处理类
*/
public class HttpHandler extends Handler {
//网络请求失败的what
public static final int WHAT_ON_FAILURE = 0xa01;
//网络请求成功的what
public static final int WHAT_ON_SUCCEED = 0xb02;
//请求数据无返回的异常
public static final String HTTP_NO_RESPONSE = "The server request is unresponsive code = ";
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
HttpResponse httpResult = (HttpResponse) msg.obj;
OnHttpListener listener = httpResult.listener();
//printDebugLog(httpResult);
switch (msg.what) {
case WHAT_ON_FAILURE:
if (listener != null && httpResult != null && httpResult.body() != null) {
listener.onHttpFailure(httpResult);
}
break;
case WHAT_ON_SUCCEED:
if (listener != null && httpResult != null && httpResult.body() != null) {
listener.onHttpSucceed(httpResult);
Log.d("sxs-api-interface", DateTimeUtils.getNowDate(DateTimeUtils.DatePattern.ALL_TIME));
}
break;
}
}
/**
* 发送异常消息
*
* @param requestParams 请求参数
* @param url 请求地址
* @param code 请求结果代码
* @param e 异常
* @param listener 网络请求监听
*/
public void sendExceptionMsg(RequestParams requestParams, String url, int code, Exception e, OnHttpListener listener) {
Message msg = obtainMessage();
msg.what = HttpHandler.WHAT_ON_FAILURE;
HttpResponse response = new HttpResponse();
response.requestParams(requestParams);
response.url(url);
response.exception(e);
response.code(code);
response.listener(listener);
msg.obj = response;
sendMessage(msg);
}
/**
* 发送成功信息
*
* @param requestParams 请求参数
* @param url 请求地址
* @param code 请求结果代码
* @param result 请求结果
* @param listener 网络请求监听
*/
public void sendSuccessfulMsg(RequestParams requestParams, String url, int code, String result, OnHttpListener listener) {
HttpResponse response = new HttpResponse();
response.body(result);
response.url(url);
response.requestParams(requestParams);
response.code(code);
response.listener(listener);
Message msg = this.obtainMessage();
msg.what = HttpHandler.WHAT_ON_SUCCEED;
msg.obj = response;
sendMessage(msg);
}
}
|
[
"a797shaoxuesong@163.com"
] |
a797shaoxuesong@163.com
|
88b2e8551651c58b548967107d470d92f2d8ca52
|
668f63240b67fce816f4527f16a0597c114fa919
|
/src/test/java/com/jitterted/ebp/blackjack/GameBetPayoffTest.java
|
8f0d39bbf5d94e02aa722d8151b4a1cf5832f6e9
|
[] |
no_license
|
tedyoung/mycmt1-blackjack-20210419-am
|
e212cdb94fd7df2d63664cb9cf1300f4fecfbb07
|
11d8ee9e963e79c7a7032236b6fbfeed6374b2ff
|
refs/heads/master
| 2023-04-09T12:04:44.165790
| 2021-04-22T19:04:28
| 2021-04-22T19:04:28
| 359,508,047
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,030
|
java
|
package com.jitterted.ebp.blackjack;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.*;
class GameBetPayoffTest {
@Test
public void playerStartsWithZeroBalance() throws Exception {
Game game = new Game();
assertThat(game.playerBalance())
.isZero();
}
@Test
public void playerDeposits25BalanceIs25() throws Exception {
Game game = new Game();
game.playerDeposits(25);
assertThat(game.playerBalance())
.isEqualTo(25);
}
@Test
public void playerWith100BalanceBets50BalanceIs50() throws Exception {
Game game = new Game();
game.playerDeposits(100);
game.playerBets(50);
assertThat(game.playerBalance())
.isEqualTo(100 - 50);
}
@Test
public void playerWith100BalanceBets50AndWinsBalanceIs150() throws Exception {
Game game = new Game();
game.playerDeposits(100);
game.playerBets(50);
game.playerWins();
assertThat(game.playerBalance())
.isEqualTo(100 - 50 + (50 * 2));
}
}
|
[
"tedyoung@gmail.com"
] |
tedyoung@gmail.com
|
116ad9e6c552ef8fbb2f2852d07c50208fbe914b
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE190_Integer_Overflow/s03/CWE190_Integer_Overflow__int_max_add_67b.java
|
ac3dadd7fcf65f01f2d8ee79ff19145d15ac7723
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,080
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_max_add_67b.java
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-67b.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: max Set data to the maximum value for int
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: add
* GoodSink: Ensure there will not be an overflow before adding 1 to data
* BadSink : Add 1 to data, which can cause an overflow
* Flow Variant: 67 Data flow: data passed in a class from one method to another in different source files in the same package
*
* */
package testcases.CWE190_Integer_Overflow.s03;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE190_Integer_Overflow__int_max_add_67b
{
public void badSink(CWE190_Integer_Overflow__int_max_add_67a.Container dataContainer ) throws Throwable
{
int data = dataContainer.containerOne;
/* POTENTIAL FLAW: if data == Integer.MAX_VALUE, this will overflow */
int result = (int)(data + 1);
IO.writeLine("result: " + result);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(CWE190_Integer_Overflow__int_max_add_67a.Container dataContainer ) throws Throwable
{
int data = dataContainer.containerOne;
/* POTENTIAL FLAW: if data == Integer.MAX_VALUE, this will overflow */
int result = (int)(data + 1);
IO.writeLine("result: " + result);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(CWE190_Integer_Overflow__int_max_add_67a.Container dataContainer ) throws Throwable
{
int data = dataContainer.containerOne;
/* FIX: Add a check to prevent an overflow from occurring */
if (data < Integer.MAX_VALUE)
{
int result = (int)(data + 1);
IO.writeLine("result: " + result);
}
else
{
IO.writeLine("data value is too large to perform addition.");
}
}
}
|
[
"you@example.com"
] |
you@example.com
|
bab363d52cddbfcad7bf3355e5db8c167aaa2b59
|
8630a7dcbbad52cc4bc1a5e2e8771b80f698efdd
|
/packages/apps/SystemUpdate/tests/src/com/mediatek/systemupdate/test/OtaGetDataTests.java
|
1655e8a9fa91cc6668817d5f2f65703c2db54dae
|
[] |
no_license
|
ferhung/android_mediatek_lenovo
|
c1405092e32fce6577dbea2579bccba596f0af85
|
52c949c07ef2936ea24ec7f01eb0bcdd593d9ec3
|
refs/heads/cm-11.0
| 2021-01-22T12:44:26.346450
| 2014-09-22T03:41:53
| 2014-09-22T03:41:53
| 38,955,719
| 0
| 2
| null | 2015-07-12T08:53:44
| 2015-07-12T08:53:44
| null |
UTF-8
|
Java
| false
| false
| 5,929
|
java
|
package com.mediatek.systemupdate.test;
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Environment;
import android.os.storage.StorageManager;
import android.os.storage.StorageVolume;
import android.test.ActivityInstrumentationTestCase2;
import android.view.KeyEvent;
import android.view.Menu;
import android.widget.ListView;
import android.widget.TextView;
import com.mediatek.systemupdate.R;
import com.mediatek.common.featureoption.FeatureOption;
import com.mediatek.systemupdate.UpdateOption;
import com.mediatek.xlog.Xlog;
import com.mediatek.systemupdate.test.OtaSetDataTests.DataValue;
import com.mediatek.systemupdate.test.OtaSetDataTests.KeySet;
import junit.framework.Assert;
public class OtaGetDataTests extends ActivityInstrumentationTestCase2<UpdateOption> {
private final String TAG = "SystemUpdate/OtaGetDataTests";
private static final String OTA_PREFERENCE = "googleota";
private static final String OTA_PRE_STATUS = "downlaodStatus";
private static final String OTA_UNZ_STATUS = "isunzip";
private static final String OTA_REN_STATUS = "isrename";
private static final String OTA_PRE_DOWNLOAND_PERCENT = "downloadpercent";
private static final String EXTERNAL_USB_STORAGE = "usbotg";
private static final int STATE_QUERYNEWVERSION = 0;
private static final int STATE_NEWVERSION_READY = 1;
/*
* The testing activity
*/
private UpdateOption mActivity;
private Context mContext;
/*
* The intsrumenation
*/
Instrumentation mInst;
/*
* Constructor
*/
public OtaGetDataTests() {
super("com.mediatek.systemupdate", UpdateOption.class);
}
/*
* Sets up the test environment before each test.
*/
@Override
protected void setUp() throws Exception {
super.setUp();
setActivityInitialTouchMode(false);
mActivity = getActivity();
mInst = getInstrumentation();
mContext = mInst.getTargetContext();
}
protected void tearDown() throws Exception {
if (mActivity != null) {
mActivity.finish();
Xlog.i(TAG, "activity finish");
}
super.tearDown();
}
/**
* Test files get from data/data/com.mediatek.systemupdate/, and compare the result
*/
public void testcase01GetUpdateType() {
// get Summay equals what we set
Assert.assertEquals(com.mediatek.systemupdate.Util.UPDATE_OPTION,
com.mediatek.systemupdate.Util.getUpdateType());
}
/**
* Test SharedPreferences get from data/data/com.mediatek.systemupdate/, and compare the result
*/
public void testcase02GetDownloadInfo() {
Context context= mInst.getTargetContext();
SharedPreferences preference = context.getSharedPreferences(KeySet.OTA_PREFERENCE,
Context.MODE_WORLD_READABLE);
Assert.assertEquals(DataValue.TEST_STATUS,
preference.getInt(KeySet.OTA_PRE_STATUS, DataValue.TEST_STATUS - 1));
Assert.assertEquals(DataValue.TEST_PERCENT,
preference.getInt(KeySet.OTA_PRE_DOWNLOAND_PERCENT, DataValue.TEST_PERCENT - 1));
Assert.assertEquals(DataValue.TEST_SIZE,
preference.getLong(KeySet.OTA_PRE_IMAGE_SIZE, DataValue.TEST_SIZE - 1));
Assert.assertEquals(DataValue.TEST_VERSION,
preference.getString(KeySet.OTA_PRE_VER, DataValue.TEST_VERSION + "fail"));
Assert.assertEquals(DataValue.TEST_NOTE,
preference.getString(KeySet.OTA_PRE_VER_NOTE, DataValue.TEST_NOTE + "fail"));
Assert.assertEquals(DataValue.TEST_DELTA_ID,
preference.getInt(KeySet.OTA_PRE_DELTA_ID, DataValue.TEST_DELTA_ID - 1));
Assert.assertEquals(DataValue.TEST_UNZ,
preference.getBoolean(KeySet.OTA_UNZ_STATUS, !DataValue.TEST_UNZ));
Assert.assertEquals(DataValue.TEST_REN,
preference.getBoolean(KeySet.OTA_REN_STATUS, !DataValue.TEST_REN));
Assert.assertEquals(DataValue.TEST_QUERY_DATE,
preference.getString(KeySet.OTA_QUERY_DATE, DataValue.TEST_QUERY_DATE + "fail"));
Assert.assertEquals(DataValue.TEST_UPGRADE_STARTED,
preference.getBoolean(KeySet.OTA_UPGRADE_STARTED, !DataValue.TEST_UPGRADE_STARTED));
Assert.assertEquals(DataValue.TEST_FULL_PKG,
preference.getBoolean(KeySet.OTA_FULL_PKG, !DataValue.TEST_FULL_PKG));
Assert.assertEquals(DataValue.TEST_ANDR_VER,
preference.getString(KeySet.OTA_ANDR_VER, DataValue.TEST_ANDR_VER + "fail"));
Assert.assertEquals(DataValue.TEST_DOWNLOAD_ONLY,
preference.getBoolean(KeySet.WIFI_DOWNLOAD_ONLY, !DataValue.TEST_DOWNLOAD_ONLY));
Assert.assertEquals(DataValue.TEST_AUTO_DOWNLOADING, preference.getBoolean(
KeySet.OTA_AUTO_DOWNLOADING, !DataValue.TEST_AUTO_DOWNLOADING));
Assert.assertEquals(DataValue.TEST_PAUSE_WITHIN_TIME,
preference.getBoolean(KeySet.PAUSE_WITHIN_TIME, !DataValue.TEST_PAUSE_WITHIN_TIME));
Assert.assertEquals(DataValue.TEST_REFRESH_STATUS,
preference.getBoolean(KeySet.NEED_REFRESH_PACKAGE, !DataValue.TEST_REFRESH_STATUS));
Assert.assertEquals(DataValue.TEST_MENU_STATUS,
preference.getBoolean(KeySet.NEED_REFRESH_MENU, !DataValue.TEST_MENU_STATUS));
Assert.assertEquals(DataValue.TEST_SHUT_STATUS,
preference.getBoolean(KeySet.IS_SHUTTING_DOWN, !DataValue.TEST_SHUT_STATUS));
Assert.assertEquals(DataValue.TEST_ACTIVITY_ID,
preference.getInt(KeySet.ACTIVITY_ID, DataValue.TEST_ACTIVITY_ID - 1));
// preference.edit().clear().commit();
}
}
|
[
"idontknw.wang@gmail.com"
] |
idontknw.wang@gmail.com
|
3ce9b3493f3a86e839689cfc010fe2c43f64502b
|
1ab035b4e2d3a27f32bfcff303d0fd6a9b8875e0
|
/E-Staff/src/com/service/SignService.java
|
d186f3ee492f673aadda183fa66766d919eba632
|
[] |
no_license
|
MQ-380/Manager
|
da04421ea240d6b373f7f60f6db610e5cc9d879b
|
55566e128ebb74a22091fecdd9304da94a55617f
|
refs/heads/master
| 2021-01-19T21:47:37.648477
| 2017-05-27T09:53:03
| 2017-05-27T09:53:03
| 88,706,866
| 1
| 3
| null | 2017-05-27T09:53:04
| 2017-04-19T06:00:54
|
Vue
|
UTF-8
|
Java
| false
| false
| 261
|
java
|
package com.service;
import java.util.Date;
import java.util.List;
import com.model.Sign;
public interface SignService {
public List findByExample(Sign sign);
public void save(Sign sign);
public List<Sign> consultLogData(String id,Date st,Date et);
}
|
[
"you@example.com"
] |
you@example.com
|
c6f9947d4d4f1ff6f7493058fae743c07e2dde66
|
eacfc7cf6b777649e8e017bf2805f6099cb9385d
|
/APK Source/src/com/jirbo/adcolony/AdColonyInterstitialAd.java
|
a9476bc75fb554a8445f51c0ffe772c6baa4dad3
|
[] |
no_license
|
maartenpeels/WordonHD
|
8b171cfd085e1f23150162ea26ed6967945005e2
|
4d316eb33bc1286c4b8813c4afd478820040bf05
|
refs/heads/master
| 2021-03-27T16:51:40.569392
| 2017-06-12T13:32:51
| 2017-06-12T13:32:51
| 44,254,944
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,553
|
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 com.jirbo.adcolony;
import android.graphics.Bitmap;
import java.util.ArrayList;
// Referenced classes of package com.jirbo.adcolony:
// AdColonyAd, a, ab, AdColonyAdListener,
// AdColonyBrowser, AdColonyNativeAdView, AdColonyNativeAdListener, d,
// AdColony, l, j, u
public class AdColonyInterstitialAd extends AdColonyAd
{
AdColonyAdListener v;
AdColonyNativeAdListener w;
AdColonyNativeAdView x;
boolean y;
public AdColonyInterstitialAd()
{
a.u = false;
com.jirbo.adcolony.a.e();
j = "interstitial";
k = "fullscreen";
y = false;
l = ab.b();
}
public AdColonyInterstitialAd(String s)
{
j = "interstitial";
k = "fullscreen";
com.jirbo.adcolony.a.e();
g = s;
y = false;
l = ab.b();
}
void a()
{
j = "interstitial";
k = "fullscreen";
if (v != null)
{
v.onAdColonyAdAttemptFinished(this);
} else
if (w != null)
{
if (canceled())
{
x.I = true;
} else
{
x.I = false;
}
w.onAdColonyNativeAdFinished(true, x);
}
com.jirbo.adcolony.a.h();
System.gc();
if (!a.u && !AdColonyBrowser.B)
{
for (int i = 0; i < a.ad.size(); i++)
{
((Bitmap)a.ad.get(i)).recycle();
}
a.ad.clear();
}
a.K = null;
a.v = true;
}
boolean a(boolean flag)
{
if (g == null)
{
g = a.l.e();
if (g == null)
{
return false;
}
}
return a.l.f(g);
}
boolean b()
{
return false;
}
public boolean isReady()
{
if (g == null)
{
g = a.l.e();
if (g == null)
{
return false;
}
}
if (AdColony.isZoneNative(g))
{
a.ac = 12;
return false;
} else
{
return a.l.f(g);
}
}
public void show()
{
a.ac = 0;
if (y)
{
l.d.b("Show attempt on out of date ad object. Please instantiate a new ad object for each ad attempt.");
} else
{
y = true;
j = "interstitial";
k = "fullscreen";
if (!isReady())
{
new j(a.l) {
final AdColonyInterstitialAd a;
void a()
{
if (a.g != null)
{
o.d.a(a.g, a);
}
}
{
a = AdColonyInterstitialAd.this;
super(d1);
}
};
f = 2;
if (v != null)
{
v.onAdColonyAdAttemptFinished(this);
return;
}
} else
{
if (a.v)
{
new j(a.l) {
final AdColonyInterstitialAd a;
void a()
{
o.d.a(a.g, a);
}
{
a = AdColonyInterstitialAd.this;
super(d1);
}
};
a.v = false;
c();
a.J = this;
if (!a.l.b(this))
{
if (v != null)
{
v.onAdColonyAdAttemptFinished(this);
}
a.v = true;
return;
}
if (v != null)
{
v.onAdColonyAdStarted(this);
}
}
f = 4;
return;
}
}
}
public AdColonyInterstitialAd withListener(AdColonyAdListener adcolonyadlistener)
{
v = adcolonyadlistener;
return this;
}
}
|
[
"maartenpeels1012@hotmail.com"
] |
maartenpeels1012@hotmail.com
|
149b48c416b5e2fd653ed0bccf47e6fdec0de99d
|
8c07424b949968d1e595f8b4c47cfe11b5f4537c
|
/server/src/au/com/codeka/warworlds/server/ctrl/CombatReportController.java
|
6d35678e4ae29b5e3e94e68b28f141c090e29624
|
[
"MIT"
] |
permissive
|
ronnysuero/wwmmo
|
dab96c6b6b20b42ba0847e714f65a5142954e5e4
|
55ef2be8a8c869680a162c2614074be53b9c4609
|
refs/heads/master
| 2021-08-18T03:00:21.887511
| 2014-11-30T19:09:14
| 2014-11-30T19:09:14
| 28,038,095
| 0
| 0
|
MIT
| 2021-01-26T02:00:02
| 2014-12-15T13:33:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,561
|
java
|
package au.com.codeka.warworlds.server.ctrl;
import au.com.codeka.common.protobuf.Messages;
import au.com.codeka.warworlds.server.RequestException;
import au.com.codeka.warworlds.server.data.DB;
import au.com.codeka.warworlds.server.data.SqlResult;
import au.com.codeka.warworlds.server.data.SqlStmt;
import au.com.codeka.warworlds.server.data.Transaction;
public class CombatReportController {
private DataBase db;
public CombatReportController() {
db = new DataBase();
}
public CombatReportController(Transaction trans) {
db = new DataBase(trans);
}
public Messages.CombatReport fetchCombatReportPb(int combatReportID) throws RequestException {
try {
return db.fetchCombatReportPb(combatReportID);
} catch(Exception e) {
throw new RequestException(e);
}
}
private static class DataBase extends BaseDataBase {
public DataBase() {
super();
}
public DataBase(Transaction trans) {
super(trans);
}
public Messages.CombatReport fetchCombatReportPb(int combatReportID) throws Exception {
String sql = "SELECT rounds FROM combat_reports WHERE id = ?";
try (SqlStmt stmt = DB.prepare(sql)) {
stmt.setInt(1, combatReportID);
SqlResult res = stmt.select();
while (res.next()) {
return Messages.CombatReport.parseFrom(res.getBytes(1));
}
}
return null;
}
}
}
|
[
"dean@codeka.com.au"
] |
dean@codeka.com.au
|
acfd788d72c7c36f47941f0d80b5dbaffd3e67df
|
c94f888541c0c430331110818ed7f3d6b27b788a
|
/ldc/java/src/main/java/com/antgroup/antchain/openapi/ldc/models/QueryReleasepipelineEventRequest.java
|
387418b6f46e6005a3e3c00d4e22b28006a139d9
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
alipay/antchain-openapi-prod-sdk
|
48534eb78878bd708a0c05f2fe280ba9c41d09ad
|
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
|
refs/heads/master
| 2023-09-03T07:12:04.166131
| 2023-09-01T08:56:15
| 2023-09-01T08:56:15
| 275,521,177
| 9
| 10
|
MIT
| 2021-03-25T02:35:20
| 2020-06-28T06:22:14
|
PHP
|
UTF-8
|
Java
| false
| false
| 1,091
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.antgroup.antchain.openapi.ldc.models;
import com.aliyun.tea.*;
public class QueryReleasepipelineEventRequest extends TeaModel {
// OAuth模式下的授权token
@NameInMap("auth_token")
public String authToken;
// 发布单对应的service id
@NameInMap("service_id")
@Validation(required = true)
public String serviceId;
public static QueryReleasepipelineEventRequest build(java.util.Map<String, ?> map) throws Exception {
QueryReleasepipelineEventRequest self = new QueryReleasepipelineEventRequest();
return TeaModel.build(map, self);
}
public QueryReleasepipelineEventRequest setAuthToken(String authToken) {
this.authToken = authToken;
return this;
}
public String getAuthToken() {
return this.authToken;
}
public QueryReleasepipelineEventRequest setServiceId(String serviceId) {
this.serviceId = serviceId;
return this;
}
public String getServiceId() {
return this.serviceId;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
6a6fc19ab4e985dfb6b2f56217678db2f0b7f2f7
|
e89dc01c95b8b45404f971517c2789fd21657749
|
/src/main/java/com/alipay/api/response/AlipayMarketingExchangevoucherUseResponse.java
|
c3eb0a58bd1a52b7c6ff11c2f87f039c02a39c59
|
[
"Apache-2.0"
] |
permissive
|
guoweiecust/alipay-sdk-java-all
|
3370466eec70c5422c8916c62a99b1e8f37a3f46
|
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
|
refs/heads/master
| 2023-05-05T07:06:47.823723
| 2021-05-25T15:26:21
| 2021-05-25T15:26:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 664
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.marketing.exchangevoucher.use response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayMarketingExchangevoucherUseResponse extends AlipayResponse {
private static final long serialVersionUID = 7516358713382856642L;
/**
* 被核销的券ID
*/
@ApiField("voucher_id")
private String voucherId;
public void setVoucherId(String voucherId) {
this.voucherId = voucherId;
}
public String getVoucherId( ) {
return this.voucherId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
45ac7bcde69fd98b0e0045bccfd55a89f618fa11
|
8d069403eccfe571dfcc464790debc2930a9bcbf
|
/src/main/java/edu/isi/kcap/ontapi/jena/rules/KBRuleFunctorJena.java
|
309586eb93e6fabd759af7546a799146cd6ac8d0
|
[
"Apache-2.0"
] |
permissive
|
KnowledgeCaptureAndDiscovery/ontapi
|
954c3f8f278535feb71471bbbd30045c8d17245c
|
652a8aea61ed6dd137973d3cadb43fb82f8e19af
|
refs/heads/master
| 2023-06-23T04:37:58.300717
| 2023-06-20T14:58:35
| 2023-06-20T14:58:35
| 144,797,688
| 0
| 1
|
Apache-2.0
| 2023-06-20T14:54:25
| 2018-08-15T02:50:29
|
Java
|
UTF-8
|
Java
| false
| false
| 1,908
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package edu.isi.kcap.ontapi.jena.rules;
import java.util.ArrayList;
import org.apache.jena.graph.Node;
import org.apache.jena.reasoner.rulesys.Functor;
import edu.isi.kcap.ontapi.rules.KBRuleFunctor;
import edu.isi.kcap.ontapi.rules.KBRuleObject;
public class KBRuleFunctorJena implements KBRuleFunctor {
transient Functor functor;
String name;
ArrayList<KBRuleObject> args;
public KBRuleFunctorJena(Functor functor) {
this.functor = functor;
this.name = functor.getName();
this.args = new ArrayList<KBRuleObject>();
for (Node arg : functor.getArgs()) {
args.add(new KBRuleObjectJena(arg));
}
}
//@Override
public String getName() {
return this.name;
}
//@Override
public ArrayList<KBRuleObject> getArguments() {
return this.args;
}
//@Override
public void setName(String name) {
this.name = name;
}
//@Override
public void addArgument(KBRuleObject item) {
this.args.add(item);
}
//@Override
public void setArguments(ArrayList<KBRuleObject> args) {
this.args = args;
}
//@Override
public Object getInternalFunctor() {
return this.functor;
}
}
|
[
"varunratnakar@gmail.com"
] |
varunratnakar@gmail.com
|
ac2d220ecfcaa78984239171ecf0a72c06ef1b83
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/repairnator/validation/477/BlacklistedSerializer.java
|
733b5ceae3c6d7776ac3690819dc5f35625565a0
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,511
|
java
|
package fr.inria.spirals.repairnator.realtime.serializer;
import com.google.gson.JsonObject;
import fr.inria.jtravis.entities.Repository;
import fr.inria.spirals.repairnator.Utils;
import fr.inria.spirals.repairnator.realtime.RTScanner;
import fr.inria.spirals.repairnator.serializer.Serializer;
import fr.inria.spirals.repairnator.serializer.SerializerType;
import fr.inria.spirals.repairnator.serializer.engines.SerializedData;
import fr.inria.spirals.repairnator.serializer.engines.SerializerEngine;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class BlacklistedSerializer extends Serializer {
public enum Reason {
OTHER_LANGUAGE,
USE_GRADLE,
UNKNOWN_BUILD_TOOL,
NO_SUCCESSFUL_BUILD
}
RTScanner rtScanner;
public BlacklistedSerializer(List<SerializerEngine> engines, RTScanner rtScanner) {
super(engines, SerializerType.BLACKLISTED);
this.rtScanner = rtScanner;
}
private List<Object> serializeAsList(Repository repo, Reason
reason, String comment) {
List<Object> result = new ArrayList<>();
result.add(Utils.getHostname());
result.add(this.rtScanner.getRunId());
result.add(Utils.formatCompleteDate(new Date()));
result.add(repo.getId());
result.add(repo.getSlug());
result.add(reason.name());
result.add(comment);
return result;
}
private JsonObject serializeAsJson(Repository repo, Reason reason, String comment) {
JsonObject result = new JsonObject();
result.addProperty("hostname", Utils.getHostname());
result.addProperty("runId", this.rtScanner.getRunId());
this.addDate(result, "dateBlacklist", new Date());
result.addProperty("dateBlacklistStr", Utils.formatCompleteDate(new Date()));
result.addProperty("repoId", repo.getId());
result.addProperty("repoName", repo.getSlug());
result.addProperty("reason", reason.name());
result.addProperty("comment", comment);
return result;
}
public void serialize(Repository repo, Reason reason, String comment) {
SerializedData data = new SerializedData(this.serializeAsList(repo, reason, comment), this.serializeAsJson(repo, reason, comment));
List<SerializedData> allData = new ArrayList<>();
allData.add(data);
for (SerializerEngine engine : this.getEngines()) {
engine.serialize(allData, this.getType());
}
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
3c5013e89754bcea0c47af6a9b06a0b6768dd459
|
a735a57eaa585658175a929e205998c68274cb84
|
/src/Ynzc/YnzcAms/Service/HandlingSituationService.java
|
9327d8055dc19b8097357a4448cb4c30548999c6
|
[] |
no_license
|
liuxiaoqiang/test2
|
9617c9d4bb4476ae46b4a409ceaab253342a3899
|
269fd31702a3a69a7d70dad2685188ddf61542a2
|
refs/heads/master
| 2016-08-09T23:04:03.234229
| 2016-03-25T07:43:24
| 2016-03-25T08:00:38
| 54,703,219
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 650
|
java
|
package Ynzc.YnzcAms.Service;
import java.util.List;
import Ynzc.YnzcAms.Model.HandlingSituation;
import Ynzc.YnzcAms.Model.Page;
public interface HandlingSituationService {
public List<HandlingSituation> getAllHandlingSituationList(Page page,String conditions);
public HandlingSituation findHandlingSituationById(int id);
public boolean addHandlingSituation(HandlingSituation model);
public boolean delHandlingSituation(HandlingSituation model);
public boolean updateHandlingSituation(HandlingSituation model);
public boolean delHandlingSituationByIds(String ids);
public HandlingSituation GetHandlingSituationByCondition(String where);
}
|
[
"liuxiaoqiang_0625@163.com"
] |
liuxiaoqiang_0625@163.com
|
be3047f894f03ff7533bbd4ba5512cf934abb194
|
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
|
/src/main/java/com/horcrux/svg/TextView.java
|
171a08a79af180169e1eedeeb7c7606ef0bd521d
|
[] |
no_license
|
redpicasso/fluffy-octo-robot
|
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
|
b2b62d7344da65af7e35068f40d6aae0cd0835a6
|
refs/heads/master
| 2022-11-15T14:43:37.515136
| 2020-07-01T22:19:16
| 2020-07-01T22:19:16
| 276,492,708
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,899
|
java
|
package com.horcrux.svg;
import android.annotation.SuppressLint;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Region.Op;
import android.view.View;
import android.view.ViewParent;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.uimanager.annotations.ReactProp;
import java.util.ArrayList;
import javax.annotation.Nullable;
@SuppressLint({"ViewConstructor"})
class TextView extends GroupView {
double cachedAdvance = Double.NaN;
private AlignmentBaseline mAlignmentBaseline;
private String mBaselineShift = null;
@Nullable
private ArrayList<SVGLength> mDeltaX;
@Nullable
private ArrayList<SVGLength> mDeltaY;
SVGLength mInlineSize = null;
TextLengthAdjust mLengthAdjust = TextLengthAdjust.spacing;
@Nullable
private ArrayList<SVGLength> mPositionX;
@Nullable
private ArrayList<SVGLength> mPositionY;
@Nullable
private ArrayList<SVGLength> mRotate;
SVGLength mTextLength = null;
public TextView(ReactContext reactContext) {
super(reactContext);
}
public void invalidate() {
if (this.mPath != null) {
super.invalidate();
getTextContainer().clearChildCache();
}
}
void clearCache() {
this.cachedAdvance = Double.NaN;
super.clearCache();
}
@ReactProp(name = "inlineSize")
public void setInlineSize(Dynamic dynamic) {
this.mInlineSize = SVGLength.from(dynamic);
invalidate();
}
@ReactProp(name = "textLength")
public void setTextLength(Dynamic dynamic) {
this.mTextLength = SVGLength.from(dynamic);
invalidate();
}
@ReactProp(name = "lengthAdjust")
public void setLengthAdjust(@Nullable String str) {
this.mLengthAdjust = TextLengthAdjust.valueOf(str);
invalidate();
}
@ReactProp(name = "alignmentBaseline")
public void setMethod(@Nullable String str) {
this.mAlignmentBaseline = AlignmentBaseline.getEnum(str);
invalidate();
}
@ReactProp(name = "baselineShift")
public void setBaselineShift(Dynamic dynamic) {
this.mBaselineShift = SVGLength.toString(dynamic);
invalidate();
}
@ReactProp(name = "verticalAlign")
public void setVerticalAlign(@Nullable String str) {
if (str != null) {
str = str.trim();
int lastIndexOf = str.lastIndexOf(32);
try {
this.mAlignmentBaseline = AlignmentBaseline.getEnum(str.substring(lastIndexOf));
} catch (IllegalArgumentException unused) {
this.mAlignmentBaseline = AlignmentBaseline.baseline;
}
try {
this.mBaselineShift = str.substring(0, lastIndexOf);
} catch (IndexOutOfBoundsException unused2) {
this.mBaselineShift = null;
}
} else {
this.mAlignmentBaseline = AlignmentBaseline.baseline;
this.mBaselineShift = null;
}
invalidate();
}
@ReactProp(name = "rotate")
public void setRotate(Dynamic dynamic) {
this.mRotate = SVGLength.arrayFrom(dynamic);
invalidate();
}
@ReactProp(name = "dx")
public void setDeltaX(Dynamic dynamic) {
this.mDeltaX = SVGLength.arrayFrom(dynamic);
invalidate();
}
@ReactProp(name = "dy")
public void setDeltaY(Dynamic dynamic) {
this.mDeltaY = SVGLength.arrayFrom(dynamic);
invalidate();
}
@ReactProp(name = "x")
public void setPositionX(Dynamic dynamic) {
this.mPositionX = SVGLength.arrayFrom(dynamic);
invalidate();
}
@ReactProp(name = "y")
public void setPositionY(Dynamic dynamic) {
this.mPositionY = SVGLength.arrayFrom(dynamic);
invalidate();
}
void draw(Canvas canvas, Paint paint, float f) {
if (f > 0.01f) {
setupGlyphContext(canvas);
clip(canvas, paint);
getGroupPath(canvas, paint);
pushGlyphContext();
drawGroup(canvas, paint, f);
popGlyphContext();
}
}
Path getPath(Canvas canvas, Paint paint) {
if (this.mPath != null) {
return this.mPath;
}
setupGlyphContext(canvas);
return getGroupPath(canvas, paint);
}
Path getPath(Canvas canvas, Paint paint, Op op) {
return getPath(canvas, paint);
}
AlignmentBaseline getAlignmentBaseline() {
if (this.mAlignmentBaseline == null) {
for (ViewParent parent = getParent(); parent != null; parent = parent.getParent()) {
if (parent instanceof TextView) {
AlignmentBaseline alignmentBaseline = ((TextView) parent).mAlignmentBaseline;
if (alignmentBaseline != null) {
this.mAlignmentBaseline = alignmentBaseline;
return alignmentBaseline;
}
}
}
}
if (this.mAlignmentBaseline == null) {
this.mAlignmentBaseline = AlignmentBaseline.baseline;
}
return this.mAlignmentBaseline;
}
String getBaselineShift() {
if (this.mBaselineShift == null) {
for (ViewParent parent = getParent(); parent != null; parent = parent.getParent()) {
if (parent instanceof TextView) {
String str = ((TextView) parent).mBaselineShift;
if (str != null) {
this.mBaselineShift = str;
return str;
}
}
}
}
return this.mBaselineShift;
}
Path getGroupPath(Canvas canvas, Paint paint) {
if (this.mPath != null) {
return this.mPath;
}
pushGlyphContext();
this.mPath = super.getPath(canvas, paint);
popGlyphContext();
return this.mPath;
}
void pushGlyphContext() {
boolean z = ((this instanceof TextPathView) || (this instanceof TSpanView)) ? false : true;
getTextRootGlyphContext().pushContext(z, this, this.mFont, this.mPositionX, this.mPositionY, this.mDeltaX, this.mDeltaY, this.mRotate);
}
TextView getTextAnchorRoot() {
ArrayList arrayList = getTextRootGlyphContext().mFontContext;
int size = arrayList.size() - 1;
ViewParent parent = getParent();
TextView textView = this;
while (size >= 0 && (parent instanceof TextView) && ((FontData) arrayList.get(size)).textAnchor != TextAnchor.start && textView.mPositionX == null) {
textView = (TextView) parent;
parent = textView.getParent();
size--;
}
return textView;
}
double getSubtreeTextChunksTotalAdvance(Paint paint) {
if (!Double.isNaN(this.cachedAdvance)) {
return this.cachedAdvance;
}
double d = 0.0d;
for (int i = 0; i < getChildCount(); i++) {
View childAt = getChildAt(i);
if (childAt instanceof TextView) {
d += ((TextView) childAt).getSubtreeTextChunksTotalAdvance(paint);
}
}
this.cachedAdvance = d;
return d;
}
TextView getTextContainer() {
ViewParent parent = getParent();
TextView textView = this;
while (parent instanceof TextView) {
textView = (TextView) parent;
parent = textView.getParent();
}
return textView;
}
}
|
[
"aaron@goodreturn.org"
] |
aaron@goodreturn.org
|
3dd0612466e99a49390ca0953774eb3334a4053d
|
ea866a11daf4ebbecd080c19595867154ca95f45
|
/longshaolib/src/main/java/com/like/longshaolib/widget/LoadAnyLinearLayout.java
|
1a08516f5157ed32a4e4a01ad72f6df50d0f7a33
|
[] |
no_license
|
wongainia/lyzb
|
a7def27abf59371164a19344eede2b734403472c
|
22fcb1f45672c4186c883df88621b1913f789c80
|
refs/heads/master
| 2022-01-08T14:23:22.605769
| 2019-07-18T04:48:46
| 2019-07-18T04:48:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,418
|
java
|
package com.like.longshaolib.widget;
import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import java.util.Iterator;
import java.util.LinkedHashSet;
/**
* 加载各种不同布局
* 备注:主要是用于加载数据错误,无数据等布局
* Created by longshao on 2017/5/17.
*/
public class LoadAnyLinearLayout extends LinearLayout {
private Context mContext;
private LinkedHashSet<View> viewLinkedList;
public LoadAnyLinearLayout(Context context) {
this(context, null);
}
public LoadAnyLinearLayout(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, -1);
}
public LoadAnyLinearLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context);
}
private void init(Context context) {
mContext = context;
viewLinkedList = new LinkedHashSet<>();
}
/**
* 加载其他的布局布局
*
* @param resId
*/
public void addOtherLayout(Integer resId) {
int countViews = this.getChildCount();
for (int i = 0; i < countViews; i++) {
this.getChildAt(i).setVisibility(GONE);
}
if (viewLinkedList.size() > 0) {
for (Iterator it = viewLinkedList.iterator(); it.hasNext(); ) {
this.removeView((View) it.next());
}
}
View childView = LayoutInflater.from(mContext).inflate(resId, null, false);
LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
childView.setLayoutParams(params);
this.addView(childView);
viewLinkedList.add(childView);
}
/**
* 还原原来布局
*/
public void showNomalLayout() {
if (viewLinkedList.size() == 0)
return;
if (viewLinkedList.size() > 0) {
for (Iterator it = viewLinkedList.iterator(); it.hasNext(); ) {
this.removeView((View) it.next());
}
}
int countViews = this.getChildCount();
for (int i = 0; i < countViews; i++) {
this.getChildAt(i).setVisibility(VISIBLE);
}
}
}
|
[
"chenchaozheng@lyzb.cn"
] |
chenchaozheng@lyzb.cn
|
1011645ae8989808525ee750e6a78aab5352d828
|
64e3f2b8d6abff582d8dff2f200e0dfc708a5f4b
|
/2010/NFJS/Tampa/Collections/App.java
|
07bd9e4295681a8c390fef5b330f05ba3b769bc8
|
[] |
no_license
|
tedneward/Demos
|
a65df9d5a0390e3fdfd100c33bbc756c83d4899e
|
28fff1c224e1f6e28feb807a05383d7dc1361cc5
|
refs/heads/master
| 2023-01-11T02:36:24.465319
| 2019-11-30T09:03:45
| 2019-11-30T09:03:45
| 239,251,479
| 0
| 0
| null | 2023-01-07T14:38:21
| 2020-02-09T05:21:15
|
Java
|
UTF-8
|
Java
| false
| false
| 1,079
|
java
|
import java.util.*;
class Util
{
}
public class App
{
public static void main(String[] args)
{
List<Person> people = new ArrayList<Person>(Arrays.asList(
new Person("Miki", "Yun", 25),
new Person("Jason", "Warner", 24),
new Person("Ron", "Gallant", 36),
new Person("Mohammad", "Khan", 37),
new Person("Sangeta", "Kundu", 29),
new Person("Bavel", "Vassilev", 27),
new Person("Ted", "Neward", 39),
new Person("Michael", "Neward", 16),
new Person("Matthew", "Neward", 10)
));
people.add(new Person("Johan", "Andrade", 16));
//System.out.println(people);
SortedSet<Person> pba = new TreeSet<Person>(Person.BY_AGE);
pba.addAll(people);
//System.out.println(pba);
SortedSet<Person> drinkers = pba.tailSet(new Person("", "", 21));
for (Person p : drinkers)
System.out.println("Have a beer, " + p.getFirstName() + "!");
}
}
|
[
"ted@tedneward.com"
] |
ted@tedneward.com
|
3e90a6b5506a65750651b3c04bea609c39fd55fa
|
4729bbfd2702933b8449d08a37cc91794aa705cf
|
/app/src/main/java/im/boss66/com/adapter/MyMessageAdapter.java
|
93678eb5c41aba25e7b91052859ffbd61b342b6c
|
[] |
no_license
|
duanjisi/IMProject
|
c56ee43e2ed021129227cbc9162ea4871602bbcf
|
05f85a21abe426ecb97b1295bfdb2d6c5627cec8
|
refs/heads/master
| 2021-01-11T11:59:47.362517
| 2017-04-15T05:31:35
| 2017-04-15T05:31:35
| 79,533,533
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,481
|
java
|
package im.boss66.com.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import im.boss66.com.R;
import im.boss66.com.entity.MyMessage;
/**
* Created by liw on 2017/2/23.
*/
public class MyMessageAdapter extends BaseRecycleViewAdapter {
private Context context;
public MyMessageAdapter(Context context) {
this.context = context;
}
@Override
public void onBindItemHolder(RecyclerView.ViewHolder holder, int position) {
final MyMessageHolder holder1 = (MyMessageHolder) holder;
MyMessage msg = (MyMessage) datas.get(position);
Glide.with(context).load(msg.getImg1()).into(holder1.img_other);
Glide.with(context).load(msg.getImg2()).into(holder1.img_content);
holder1.tv_other.setText(msg.getTv1());
holder1.tv_comment.setText(msg.getTv2());
holder1.tv_time.setText(msg.getTv3());
holder1.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int adapterPosition = holder1.getAdapterPosition();
itemListener.onItemClick(adapterPosition);
}
});
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view;
view = LayoutInflater.from(context).inflate(R.layout.item_my_message,parent,false);
return new MyMessageHolder(view);
}
@Override
public int getItemCount() {
return datas!=null?datas.size():0;
}
public static class MyMessageHolder extends RecyclerView.ViewHolder{
public ImageView img_other;
public ImageView img_content;
public TextView tv_other;
public TextView tv_comment;
public TextView tv_time;
public MyMessageHolder(View itemView) {
super(itemView);
img_other = (ImageView) itemView.findViewById(R.id.img_other);
img_content = (ImageView) itemView.findViewById(R.id.img_content);
tv_other = (TextView) itemView.findViewById(R.id.tv_other);
tv_comment = (TextView) itemView.findViewById(R.id.tv_comment);
tv_time = (TextView) itemView.findViewById(R.id.tv_time);
}
}
}
|
[
"576248427@qq.com"
] |
576248427@qq.com
|
20abad81ce0612e8780ede4b6bf50c99dc30bb9f
|
ca85b4da3635bcbea482196e5445bd47c9ef956f
|
/iexhub/src/main/java/PIXManager/org/hl7/v3/IntratympanicRoute.java
|
8b8010d0c2dbcf523408487cde78630b112c4803
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
bhits/iexhub-generated
|
c89a3a9bd127140f56898d503bc0c924d0398798
|
e53080ae15f0c57c8111a54d562101d578d6c777
|
refs/heads/master
| 2021-01-09T05:59:38.023779
| 2017-02-01T13:30:19
| 2017-02-01T13:30:19
| 80,863,998
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,694
|
java
|
/*******************************************************************************
* Copyright (c) 2015, 2016 Substance Abuse and Mental Health Services Administration (SAMHSA)
*
* 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.
*
* Contributors:
* Eversolve, LLC - initial IExHub implementation for Health Information Exchange (HIE) integration
* Anthony Sute, Ioana Singureanu
*******************************************************************************/
package PIXManager.org.hl7.v3;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for IntratympanicRoute.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="IntratympanicRoute">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="ITYMPINJ"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "IntratympanicRoute")
@XmlEnum
public enum IntratympanicRoute {
ITYMPINJ;
public String value() {
return name();
}
public static IntratympanicRoute fromValue(String v) {
return valueOf(v);
}
}
|
[
"michael.hadjiosif@feisystems.com"
] |
michael.hadjiosif@feisystems.com
|
d9e6e79893e3793a4210fdd5a54b3ba95e419588
|
57b95a057dc4c7526736cb90abda10ef68ef9a8d
|
/designer_form/src/com/fr/design/mainframe/widget/wrappers/primitive/CharWrapper.java
|
1d921870f9737214096b40e1ade78081cddcc19f
|
[] |
no_license
|
jingedawang/fineRep
|
1f97702f8690d6119a817bba8f44c265e9d7fcb5
|
fce3e7a9238dd13fc168bf475f93496abd4a9f39
|
refs/heads/master
| 2021-01-18T08:21:05.238130
| 2016-02-28T11:15:25
| 2016-02-28T11:15:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 909
|
java
|
package com.fr.design.mainframe.widget.wrappers.primitive;
import com.fr.design.Exception.ValidationException;
import com.fr.design.designer.properties.Decoder;
import com.fr.design.designer.properties.Encoder;
public class CharWrapper implements Encoder, Decoder {
@Override
public String encode(Object v) {
if (v == null) {
return "\\0";
}
return v.toString();
}
@Override
public Object decode(String txt) {
if (txt == null || txt.length() == 0) {
return '\0';
}
if (txt.equals("\\0")) {
return '\0';
} else {
return txt.charAt(0);
}
}
@Override
public void validate(String txt) throws ValidationException {
if (txt == null || txt.length() != 1) {
throw new ValidationException("Character should be 1 character long!");
}
}
}
|
[
"develop@finereport.com"
] |
develop@finereport.com
|
f36975eecc04b20f5dc2116692c7979a808c408f
|
706fe0bea8c374dddb8ff4148c4629e92d02be4f
|
/Libs/spreadsheet-2.0.1/vaadin-spreadsheet/src/test/java/com/vaadin/addon/spreadsheet/test/junit/ConditionalFormatterTest.java
|
34166fc788b32dd44858c950fad643d49309aa7f
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
squirlemaster42/Fantasy-FRC
|
82c4ea182470c5c02630208fc2eafafb9c0c500c
|
c0f7d0036155fdc0e105eecdc4065b659ae73a71
|
refs/heads/master
| 2022-05-01T01:37:06.487430
| 2021-02-04T04:16:45
| 2021-02-04T04:16:45
| 162,146,098
| 0
| 0
|
MIT
| 2022-03-08T21:20:20
| 2018-12-17T14:52:10
|
Java
|
UTF-8
|
Java
| false
| false
| 2,362
|
java
|
package com.vaadin.addon.spreadsheet.test.junit;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import org.apache.poi.ss.usermodel.ClientAnchor;
import org.junit.Test;
import com.vaadin.addon.spreadsheet.ConditionalFormatter;
import com.vaadin.addon.spreadsheet.SheetImageWrapper;
import com.vaadin.addon.spreadsheet.Spreadsheet;
/**
* Tests for conditional formatting
*
*/
public class ConditionalFormatterTest {
/**
* Ticket #17595
*/
@Test
public void createConditionalFormatterRules_sheetWithStringFormatRuleForNumericCell_rulesCreatedWithoutExceptions()
throws URISyntaxException, IOException {
ClassLoader classLoader = ConditionalFormatterTest.class
.getClassLoader();
URL resource = classLoader.getResource("test_sheets" + File.separator
+ "conditional_formatting.xlsx");
File file = new File(resource.toURI());
Spreadsheet sheet = new Spreadsheet(file);
new ConditionalFormatter(sheet).createConditionalFormatterRules();
}
/**
* Test no NPE is thrown
*
* This test might fail if assertions are enabled due to
* {@link SheetImageWrapper#hashCode()} using
* {@link ClientAnchor#hashCode()} which wasn't designed and does
* {@code
* assert false : "hashCode not designed";
* }. Assertions can be disabled with -DenableAssertions=false in maven.
* HashCode issue reported in SHEET-120
*/
@Test
public void matchesFormula_rulesWithoutFormula_formulasEvaluatedWithoutExceptions()
throws URISyntaxException, IOException {
ClassLoader classLoader = ConditionalFormatterTest.class
.getClassLoader();
URL resource = classLoader.getResource("test_sheets" + File.separator
+ "ConditionalFormatterSamples.xlsx");
File file = new File(resource.toURI());
Spreadsheet sheet = new Spreadsheet(file);
// active sheet is saved in file
// it might change after modifying test file
// ensure sheet with rules without formulas is active
if (sheet.getActiveSheetIndex() != 3) {
sheet.setActiveSheetIndex(3);
}
new ConditionalFormatter(sheet).createConditionalFormatterRules();
}
}
|
[
"jakobmisbach8@gmail.com"
] |
jakobmisbach8@gmail.com
|
d9e638c9bb1d6b3b5f10ac3f795c0ac5a1a74bcd
|
3ca53c13d2953805c00406476ceda9684887a8ad
|
/src/com/iwxxm/common/VerticalCRSPropertyType.java
|
5849efee0b7d9ffac0fd8fddafe15df3223e041b
|
[] |
no_license
|
yw2017051032/tac2iwxxm
|
ae93c12b08b7316cd59de032d4ae2e8082bc6c0b
|
5a08cb9ecd0833fd4435bf6db81a2b8126380ec1
|
refs/heads/master
| 2020-03-17T03:03:06.671868
| 2018-06-05T16:55:59
| 2018-06-05T17:06:03
| 133,217,637
| 3
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 8,041
|
java
|
//
// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.8-b130911.1802 生成的
// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// 在重新编译源模式时, 对此文件的所有修改都将丢失。
// 生成时间: 2018.04.04 时间 10:18:30 PM CST
//
package com.iwxxm.common;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* gml:VerticalCRSPropertyType is a property type for association roles to a vertical coordinate reference system, either referencing or containing the definition of that reference system.
*
* <p>VerticalCRSPropertyType complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="VerticalCRSPropertyType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence minOccurs="0">
* <element ref="{http://www.opengis.net/gml/3.2}VerticalCRS"/>
* </sequence>
* <attGroup ref="{http://www.opengis.net/gml/3.2}AssociationAttributeGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VerticalCRSPropertyType", propOrder = {
"verticalCRS"
})
public class VerticalCRSPropertyType {
@XmlElement(name = "VerticalCRS")
protected VerticalCRSType verticalCRS;
@XmlAttribute(name = "nilReason")
protected List<String> nilReason;
@XmlAttribute(name = "remoteSchema", namespace = "http://www.opengis.net/gml/3.2")
@XmlSchemaType(name = "anyURI")
protected String remoteSchema;
@XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink")
protected TypeType type;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink")
protected String role;
@XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink")
protected String arcrole;
@XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink")
protected String valueFileSizeTriggerType2;
@XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink")
protected ShowType show;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
/**
* 获取verticalCRS属性的值。
*
* @return
* possible object is
* {@link VerticalCRSType }
*
*/
public VerticalCRSType getVerticalCRS() {
return verticalCRS;
}
/**
* 设置verticalCRS属性的值。
*
* @param value
* allowed object is
* {@link VerticalCRSType }
*
*/
public void setVerticalCRS(VerticalCRSType value) {
this.verticalCRS = value;
}
/**
* Gets the value of the nilReason property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the nilReason property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getNilReason().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getNilReason() {
if (nilReason == null) {
nilReason = new ArrayList<String>();
}
return this.nilReason;
}
/**
* 获取remoteSchema属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getRemoteSchema() {
return remoteSchema;
}
/**
* 设置remoteSchema属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRemoteSchema(String value) {
this.remoteSchema = value;
}
/**
* 获取type属性的值。
*
* @return
* possible object is
* {@link TypeType }
*
*/
public TypeType getType() {
if (type == null) {
return TypeType.SIMPLE;
} else {
return type;
}
}
/**
* 设置type属性的值。
*
* @param value
* allowed object is
* {@link TypeType }
*
*/
public void setType(TypeType value) {
this.type = value;
}
/**
* 获取href属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* 设置href属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
/**
* 获取role属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getRole() {
return role;
}
/**
* 设置role属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRole(String value) {
this.role = value;
}
/**
* 获取arcrole属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getArcrole() {
return arcrole;
}
/**
* 设置arcrole属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArcrole(String value) {
this.arcrole = value;
}
/**
* 获取valueFileSizeTriggerType2属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getValueFileSizeTriggerType2() {
return valueFileSizeTriggerType2;
}
/**
* 设置valueFileSizeTriggerType2属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValueFileSizeTriggerType2(String value) {
this.valueFileSizeTriggerType2 = value;
}
/**
* 获取show属性的值。
*
* @return
* possible object is
* {@link ShowType }
*
*/
public ShowType getShow() {
return show;
}
/**
* 设置show属性的值。
*
* @param value
* allowed object is
* {@link ShowType }
*
*/
public void setShow(ShowType value) {
this.show = value;
}
/**
* 获取actuate属性的值。
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
return actuate;
}
/**
* 设置actuate属性的值。
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
}
|
[
"852406820@qq.com"
] |
852406820@qq.com
|
7151403bcb3bd53fac418a0eb977449215278159
|
d2845579ea6aa51a2e150f0ffe6ccfda85d035ce
|
/serving/serving-service/src/main/java/com/welab/wefe/serving/service/api/predict/PromoterApi.java
|
015caea9ce545364dfa3eb9dd1e759613c9a28f4
|
[
"Apache-2.0"
] |
permissive
|
as23187/WeFe
|
d8de9ff626f9f3e5d98e0850b0b717a80fd73e72
|
ba92871d4b1d2eef6c606c34795f4575e84703bd
|
refs/heads/main
| 2023-08-22T12:01:06.718246
| 2021-10-28T01:54:05
| 2021-10-28T01:54:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,278
|
java
|
/**
* Copyright 2021 Tianmian Tech. 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 com.welab.wefe.serving.service.api.predict;
import com.alibaba.fastjson.JSONObject;
import com.welab.wefe.common.StatusCode;
import com.welab.wefe.common.exception.StatusCodeWithException;
import com.welab.wefe.common.fieldvalidate.annotation.Check;
import com.welab.wefe.common.util.StringUtil;
import com.welab.wefe.common.web.api.base.AbstractApi;
import com.welab.wefe.common.web.api.base.Api;
import com.welab.wefe.common.web.dto.AbstractApiInput;
import com.welab.wefe.common.web.dto.ApiResult;
import com.welab.wefe.serving.sdk.dto.PredictResult;
import com.welab.wefe.serving.service.manager.ModelManager;
import com.welab.wefe.serving.service.predicter.Predicter;
import com.welab.wefe.serving.service.service.CacheObjects;
import org.apache.commons.collections4.MapUtils;
import java.util.Map;
/**
* @author hunter.zhao
*/
@Api(
path = "predict/promoter",
name = "模型预测",
login = false
// ,
// rsaVerify = true,
// domain = Caller.Member
)
public class PromoterApi extends AbstractApi<PromoterApi.Input, PredictResult> {
@Override
protected ApiResult<PredictResult> handle(Input input) {
try {
if (!ModelManager.getModelEnable(input.getModelId())) {
return fail("模型成员 " + CacheObjects.getMemberName() + " 未上线该模型");
}
/**
* batch prediction
*/
if (input.getBatch()) {
PredictResult result = Predicter.batchPromoterPredict(
input.getModelId(),
input.getFeatureDataMap()
);
return success(result);
}
/**
* Single prediction
*/
PredictResult result = Predicter.promoter(
input.getModelId(),
input.getUserId(),
input.getFeatureData(),
input.getParams() == null ? null : new JSONObject(input.getParams())
);
return success(result);
} catch (Exception e) {
return fail("predict error : " + e.getMessage());
}
}
public static class Input extends AbstractApiInput {
@Check(require = true, name = "模型唯一标识")
private String modelId;
@Check(name = "用户 id")
private String userId;
@Check(name = "特征参数")
private Map<String, Object> featureData;
@Check(name = "其他参数")
private Map<String, Object> params;
@Check(name = "是否批量")
private Boolean isBatch = false;
@Check(name = "批量预测参数")
private Map<String, Map<String, Object>> featureDataMap;
@Override
public void checkAndStandardize() throws StatusCodeWithException {
super.checkAndStandardize();
if (!isBatch) {
if (StringUtil.isEmpty(userId)) {
throw new StatusCodeWithException("单条预测时,参数userId不能为空", StatusCode.PARAMETER_VALUE_INVALID);
}
return;
}
if (MapUtils.isEmpty(featureDataMap)) {
throw new StatusCodeWithException("批量预测时,参数predictParamsList不能为空", StatusCode.PARAMETER_VALUE_INVALID);
}
}
//region getter/setter
public String getModelId() {
return modelId;
}
public void setModelId(String modelId) {
this.modelId = modelId;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public Map<String, Object> getFeatureData() {
return featureData;
}
public void setFeatureData(Map<String, Object> featureData) {
this.featureData = featureData;
}
public Map<String, Object> getParams() {
return params;
}
public void setParams(Map<String, Object> params) {
this.params = params;
}
public Map<String, Map<String, Object>> getFeatureDataMap() {
return featureDataMap;
}
public void setFeatureDataMap(Map<String, Map<String, Object>> featureDataMap) {
this.featureDataMap = featureDataMap;
}
public Boolean getBatch() {
return isBatch;
}
public void setBatch(Boolean batch) {
isBatch = batch;
}
//endregion
}
}
|
[
"winter.zou@welab-inc.com"
] |
winter.zou@welab-inc.com
|
8ccff94d725fb96a2fde525174fc0e1a938d1ecb
|
bceba483c2d1831f0262931b7fc72d5c75954e18
|
/src/qubed/corelogic/UNPLATTEDLANDEXTENSION.java
|
54f62a04fbc9e260b1ca34ce524cf6d5f99b6050
|
[] |
no_license
|
Nigel-Qubed/credit-services
|
6e2acfdb936ab831a986fabeb6cefa74f03c672c
|
21402c6d4328c93387fd8baf0efd8972442d2174
|
refs/heads/master
| 2022-12-01T02:36:57.495363
| 2020-08-10T17:26:07
| 2020-08-10T17:26:07
| 285,552,565
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,460
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.08.05 at 04:46:29 AM CAT
//
package qubed.corelogic;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for UNPLATTED_LAND_EXTENSION complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="UNPLATTED_LAND_EXTENSION">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="MISMO" type="{http://www.mismo.org/residential/2009/schemas}MISMO_BASE" minOccurs="0"/>
* <element name="OTHER" type="{http://www.mismo.org/residential/2009/schemas}OTHER_BASE" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UNPLATTED_LAND_EXTENSION", propOrder = {
"mismo",
"other"
})
public class UNPLATTEDLANDEXTENSION {
@XmlElement(name = "MISMO")
protected MISMOBASE mismo;
@XmlElement(name = "OTHER")
protected OTHERBASE other;
/**
* Gets the value of the mismo property.
*
* @return
* possible object is
* {@link MISMOBASE }
*
*/
public MISMOBASE getMISMO() {
return mismo;
}
/**
* Sets the value of the mismo property.
*
* @param value
* allowed object is
* {@link MISMOBASE }
*
*/
public void setMISMO(MISMOBASE value) {
this.mismo = value;
}
/**
* Gets the value of the other property.
*
* @return
* possible object is
* {@link OTHERBASE }
*
*/
public OTHERBASE getOTHER() {
return other;
}
/**
* Sets the value of the other property.
*
* @param value
* allowed object is
* {@link OTHERBASE }
*
*/
public void setOTHER(OTHERBASE value) {
this.other = value;
}
}
|
[
"vectorcrael@yahoo.com"
] |
vectorcrael@yahoo.com
|
0002f792d56c2bc853d7846a1d2006aa572403ce
|
553392b78d2110c70433af1acbb3bde9660fc860
|
/editor/src/com/kotcrab/vis/editor/assets/transaction/generator/TextureRegionAssetTransactionGenerator.java
|
4ce3722043290dbfe273d6031487bf242f2680db
|
[
"Apache-2.0"
] |
permissive
|
stbachmann/VisEditor
|
00b9ece7e587099e1c32786a1d05b04a0a02b5fa
|
0c5d052858753d2828c22e4b3ef16619e12b1f95
|
refs/heads/master
| 2021-01-18T00:04:05.249500
| 2016-06-08T20:06:31
| 2016-06-08T20:06:31
| 52,627,769
| 3
| 0
| null | 2016-02-26T19:32:40
| 2016-02-26T19:32:40
| null |
UTF-8
|
Java
| false
| false
| 2,339
|
java
|
/*
* Copyright 2014-2016 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.kotcrab.vis.editor.assets.transaction.generator;
import com.badlogic.gdx.files.FileHandle;
import com.kotcrab.vis.editor.assets.transaction.AssetProviderResult;
import com.kotcrab.vis.editor.assets.transaction.AssetTransaction;
import com.kotcrab.vis.editor.assets.transaction.AssetTransactionGenerator;
import com.kotcrab.vis.editor.assets.transaction.action.CopyFileAction;
import com.kotcrab.vis.editor.assets.transaction.action.DeleteFileAction;
import com.kotcrab.vis.editor.assets.transaction.action.UpdateReferencesAction;
import com.kotcrab.vis.editor.module.ModuleInjector;
import com.kotcrab.vis.runtime.assets.TextureRegionAsset;
import com.kotcrab.vis.runtime.assets.VisAssetDescriptor;
/**
* Transaction generator for {@link TextureRegionAsset}
* @author Kotcrab
*/
public class TextureRegionAssetTransactionGenerator implements AssetTransactionGenerator {
private FileHandle transactionStorage;
@Override
public void setTransactionStorage (FileHandle transactionStorage) {
this.transactionStorage = transactionStorage;
}
@Override
public boolean isSupported (VisAssetDescriptor descriptor, FileHandle file) {
return descriptor instanceof TextureRegionAsset;
}
@Override
public AssetTransaction analyze (ModuleInjector injector, AssetProviderResult providerResult, FileHandle source, FileHandle target, String relativeTargetPath) {
AssetTransaction transaction = new AssetTransaction();
transaction.add(new CopyFileAction(source, target));
transaction.add(new UpdateReferencesAction(injector, providerResult, new TextureRegionAsset(relativeTargetPath)));
transaction.add(new DeleteFileAction(source, transactionStorage));
transaction.finalizeGroup();
return transaction;
}
}
|
[
"kotcrab@gmail.com"
] |
kotcrab@gmail.com
|
1a4f1da55f06ec9540b3345f35b24e0d2f102f6d
|
a2440dbe95b034784aa940ddc0ee0faae7869e76
|
/modules/lwjgl/vulkan/src/generated/java/org/lwjgl/vulkan/EXTGlobalPriority.java
|
7c26b6a69bd85832397b7953f37a8508d9d54070
|
[
"LGPL-2.0-or-later",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-khronos"
] |
permissive
|
LWJGL/lwjgl3
|
8972338303520c5880d4a705ddeef60472a3d8e5
|
67b64ad33bdeece7c09b0f533effffb278c3ecf7
|
refs/heads/master
| 2023-08-26T16:21:38.090410
| 2023-08-26T16:05:52
| 2023-08-26T16:05:52
| 7,296,244
| 4,835
| 1,004
|
BSD-3-Clause
| 2023-09-10T12:03:24
| 2012-12-23T15:40:04
|
Java
|
UTF-8
|
Java
| false
| false
| 5,337
|
java
|
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.vulkan;
/**
* In Vulkan, users can specify device-scope queue priorities. In some cases it may be useful to extend this concept to a system-wide scope. This extension provides a mechanism for callers to set their system-wide priority. The default queue priority is {@link #VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT}.
*
* <p>The driver implementation will attempt to skew hardware resource allocation in favour of the higher-priority task. Therefore, higher-priority work may retain similar latency and throughput characteristics even if the system is congested with lower priority work.</p>
*
* <p>The global priority level of a queue shall take precedence over the per-process queue priority ({@link VkDeviceQueueCreateInfo}{@code ::pQueuePriorities}).</p>
*
* <p>Abuse of this feature may result in starving the rest of the system from hardware resources. Therefore, the driver implementation may deny requests to acquire a priority above the default priority ({@link #VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT}) if the caller does not have sufficient privileges. In this scenario {@link #VK_ERROR_NOT_PERMITTED_EXT ERROR_NOT_PERMITTED_EXT} is returned.</p>
*
* <p>The driver implementation may fail the queue allocation request if resources required to complete the operation have been exhausted (either by the same process or a different process). In this scenario {@link VK10#VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED} is returned.</p>
*
* <h5>VK_EXT_global_priority</h5>
*
* <dl>
* <dt><b>Name String</b></dt>
* <dd>{@code VK_EXT_global_priority}</dd>
* <dt><b>Extension Type</b></dt>
* <dd>Device extension</dd>
* <dt><b>Registered Extension Number</b></dt>
* <dd>175</dd>
* <dt><b>Revision</b></dt>
* <dd>2</dd>
* <dt><b>Deprecation state</b></dt>
* <dd><ul>
* <li><em>Promoted</em> to {@link KHRGlobalPriority VK_KHR_global_priority} extension</li>
* </ul></dd>
* <dt><b>Contact</b></dt>
* <dd><ul>
* <li>Andres Rodriguez <a href="https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_EXT_global_priority]%20@lostgoat%250A*Here%20describe%20the%20issue%20or%20question%20you%20have%20about%20the%20VK_EXT_global_priority%20extension*">lostgoat</a></li>
* </ul></dd>
* </dl>
*
* <h5>Other Extension Metadata</h5>
*
* <dl>
* <dt><b>Last Modified Date</b></dt>
* <dd>2017-10-06</dd>
* <dt><b>IP Status</b></dt>
* <dd>No known IP claims.</dd>
* <dt><b>Contributors</b></dt>
* <dd><ul>
* <li>Andres Rodriguez, Valve</li>
* <li>Pierre-Loup Griffais, Valve</li>
* <li>Dan Ginsburg, Valve</li>
* <li>Mitch Singer, AMD</li>
* </ul></dd>
* </dl>
*/
public final class EXTGlobalPriority {
/** The extension specification version. */
public static final int VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION = 2;
/** The extension name. */
public static final String VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_EXT_global_priority";
/** Extends {@code VkStructureType}. */
public static final int VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000;
/** Extends {@code VkResult}. */
public static final int VK_ERROR_NOT_PERMITTED_EXT = -1000174001;
/**
* VkQueueGlobalPriorityKHR - Values specifying a system-wide queue priority
*
* <h5>Description</h5>
*
* <p>Priority values are sorted in ascending order. A comparison operation on the enum values can be used to determine the priority order.</p>
*
* <ul>
* <li>{@link #VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR QUEUE_GLOBAL_PRIORITY_LOW_KHR} is below the system default. Useful for non-interactive tasks.</li>
* <li>{@link #VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR} is the system default priority.</li>
* <li>{@link #VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR QUEUE_GLOBAL_PRIORITY_HIGH_KHR} is above the system default.</li>
* <li>{@link #VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR QUEUE_GLOBAL_PRIORITY_REALTIME_KHR} is the highest priority. Useful for critical tasks.</li>
* </ul>
*
* <h5>See Also</h5>
*
* <p>{@link VkDeviceQueueGlobalPriorityCreateInfoKHR}, {@link VkQueueFamilyGlobalPriorityPropertiesKHR}</p>
*
* <h5>Enum values:</h5>
*
* <ul>
* <li>{@link #VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT QUEUE_GLOBAL_PRIORITY_LOW_EXT}</li>
* <li>{@link #VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT}</li>
* <li>{@link #VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT QUEUE_GLOBAL_PRIORITY_HIGH_EXT}</li>
* <li>{@link #VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT QUEUE_GLOBAL_PRIORITY_REALTIME_EXT}</li>
* </ul>
*/
public static final int
VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR = 128,
VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR = 256,
VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR = 512,
VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR = 1024,
VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = 128,
VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = 256,
VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = 512,
VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = 1024;
private EXTGlobalPriority() {}
}
|
[
"iotsakp@gmail.com"
] |
iotsakp@gmail.com
|
ea3fc23df8ff19f6aa70747eb69530b014db77b2
|
f87b6a5a1cfd2aa705edac40dd712e3433c73718
|
/itoken-common-service/src/main/java/com/lwx/itoken/common/mapper/TbDigiccyExchangeMktMapper.java
|
ee9336062112f31a343182e87c6cf7ccb8a9944d
|
[] |
no_license
|
liuwuxiang/spring-cloud-netflix-itoken
|
5b82dfb160005317d4218894b17e4ef8904b6715
|
d1fed9262ae80f36bab5746e6495e904071c85b5
|
refs/heads/master
| 2022-11-27T07:21:34.914965
| 2019-11-07T07:26:25
| 2019-11-07T07:26:45
| 220,175,672
| 0
| 0
| null | 2022-11-16T10:56:26
| 2019-11-07T07:21:45
|
Java
|
UTF-8
|
Java
| false
| false
| 370
|
java
|
package com.lwx.itoken.common.mapper;
import com.lwx.itoken.common.domain.TbDigiccyExchangeMkt;
import com.lwx.itoken.common.utils.RedisCache;
import org.apache.ibatis.annotations.CacheNamespace;
import tk.mybatis.mapper.MyMapper;
@CacheNamespace(implementation = RedisCache.class)
public interface TbDigiccyExchangeMktMapper extends MyMapper<TbDigiccyExchangeMkt> {
}
|
[
"494775947@qq.com"
] |
494775947@qq.com
|
85d7e9633133094f019d98d91c7103717bcf1c0e
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project27/src/test/java/org/gradle/test/performance27_4/Test27_334.java
|
587a633b6c040a67537e2e99ee1e9b552b4cf3e8
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance27_4;
import static org.junit.Assert.*;
public class Test27_334 {
private final Production27_334 production = new Production27_334("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
04b4b61b7bce5d3c4e0c139347c4579287cf981b
|
db55988e5f1879f9de033aae62bdba25765f5665
|
/demo-websocket/websocket-cluster/src/main/java/com/remember/websocket/cluster/controller/TestMQCtl.java
|
6b49a3eafde879f73fd383092d6c875f4c453d13
|
[
"MIT"
] |
permissive
|
remember-5/spring-boot-demo
|
043ceb0931a04739359a396096f848622c782f89
|
d000a9b6a717893c04000c4acf4445348166102f
|
refs/heads/main
| 2023-08-24T15:10:28.743845
| 2023-08-04T09:29:54
| 2023-08-04T09:29:54
| 249,986,236
| 8
| 3
|
MIT
| 2023-08-30T06:26:15
| 2020-03-25T13:30:14
|
Java
|
UTF-8
|
Java
| false
| false
| 2,636
|
java
|
package com.remember.websocket.cluster.controller;
import com.alibaba.fastjson.JSON;
import com.remember.websocket.cluster.domain.RequestMessage;
import com.remember.websocket.cluster.service.IRedisSessionService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/**
* @author fly
* @description
* @date 2021/12/14 16:13
*/
@Slf4j
@Controller
@RequestMapping(value = "/ws")
@RequiredArgsConstructor
public class TestMQCtl {
// 实现spring websocket需要引入AmqpTemplate类
private final AmqpTemplate amqpTemplate;
private final IRedisSessionService redisSessionService;
/**
* 模拟登录
* @param request /
* @param name /
* @return /
*/
@RequestMapping(value = "loginIn", method = RequestMethod.GET)
public String login(HttpServletRequest request, String name){
HttpSession httpSession = request.getSession();
// 如果登录成功,则保存到会话中
httpSession.setAttribute("loginName", name);
return "OK";
}
/**
* 向执行用户发送请求
* @param msg
* @param name
* @return
*/
@RequestMapping(value = "send2user")
@ResponseBody
public int sendMq2User(String msg, String name){
// 根据用户名称获取用户对应的session id值
String wsSessionId = redisSessionService.get(name);
RequestMessage demoMQ = new RequestMessage();
demoMQ.setName(msg);
// 生成路由键值,生成规则如下: websocket订阅的目的地 + "-user" + websocket的sessionId值。生成值类似:
String routingKey = getTopicRoutingKey("demo", wsSessionId);
// 向amq.topi交换机发送消息,路由键为routingKey
log.info("向用户[{}]sessionId=[{}],发送消息[{}],路由键[{}]", name, wsSessionId, wsSessionId, routingKey);
amqpTemplate.convertAndSend("amq.topic", routingKey, JSON.toJSONString(demoMQ));
return 0;
}
/**
* 获取Topic的生成的路由键
*
* @param actualDestination
* @param sessionId
* @return
*/
private String getTopicRoutingKey(String actualDestination, String sessionId){
return actualDestination + "-user" + sessionId;
}
}
|
[
"1332661444@qq.com"
] |
1332661444@qq.com
|
5b328f2e68276279f40f60c0948b971e5fe654b0
|
2958df3f24ae8a8667394b6ebb083ba6a9a1d36a
|
/Universal08Cloud/src/br/UFSC/GRIMA/util/drawLines/DemoFrame.java
|
a4afdecd9a46a3ae7a4624c9dc52b316f390630c
|
[] |
no_license
|
igorbeninca/utevolux
|
27ac6af9a6d03f21d815c057f18524717b3d1c4d
|
3f602d9cf9f58d424c3ea458346a033724c9c912
|
refs/heads/master
| 2021-01-19T02:50:04.157218
| 2017-10-13T16:19:41
| 2017-10-13T16:19:41
| 51,842,805
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 963
|
java
|
package br.UFSC.GRIMA.util.drawLines;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.JLabel;
/**
* Esse � s� um frame para exibir o painel.
* O "quente" do c�digo est� l�.
* N�o tem nada o que entender aqui.
*/
public class DemoFrame extends JFrame
{
public DemoFrame()
{
Toolkit toolKit = Toolkit.getDefaultToolkit();
Dimension d = toolKit.getScreenSize();
setSize(d.width/2, d.height/2);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(new BorderLayout());
add(new LinePanel(), BorderLayout.CENTER); //Aqui adicionamos o frame no painel.
add(new JLabel("Use o mouse para desenhar"), BorderLayout.NORTH);
}
public static void main(String[] args)
{
new DemoFrame().setVisible(true);
}
}
|
[
"pilarrmeister@gmail.com"
] |
pilarrmeister@gmail.com
|
efbb85b9cbd4b161167f08186976ccb972ac3198
|
efe469d4b01fc67e4179bd90653843423c8ca7d1
|
/welcomelibrary/src/main/java/com/eric/come/glide/load/engine/EngineJobListener.java
|
07bfe8c6e34aae04011b62d803c2f603def05ac2
|
[] |
no_license
|
AndroidLMY/Welcome
|
5194e5da9f08b5ac809ed89d8c40ddb57b7b946a
|
e2c1eed1e86021e57fe3804cb20ee6d9c24d43b5
|
refs/heads/master
| 2021-06-13T20:29:59.541071
| 2021-05-25T03:14:27
| 2021-05-25T03:14:27
| 200,602,628
| 6
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 265
|
java
|
package com.eric.come.glide.load.engine;
import com.eric.come.glide.load.Key;
interface EngineJobListener {
void onEngineJobComplete(EngineJob<?> engineJob, Key key, EngineResource<?> resource);
void onEngineJobCancelled(EngineJob<?> engineJob, Key key);
}
|
[
"465008238@qq.com"
] |
465008238@qq.com
|
2b78ae5857b2a7f701efcca84802ebb134c1bebe
|
53510b2f25f4fab32b9a0494500b84f6c79cb2ee
|
/FQPMall/app/src/main/java/com/fengqipu/mall/view/CircleImageView.java
|
e94dc45f855ac9497e160cccb5ec17bb1891195a
|
[] |
no_license
|
shenkuen88/FQPMall
|
14c594172e9e70c8c752c1a452bd898161c796c6
|
6b81cc076844f126c5e682e9c1d5f5c7bc5add6e
|
refs/heads/master
| 2020-12-03T00:42:41.203339
| 2017-11-30T06:48:29
| 2017-11-30T06:48:29
| 96,063,803
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,002
|
java
|
package com.fengqipu.mall.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ImageView;
import com.fengqipu.mall.R;
public class CircleImageView extends ImageView {
private static final ScaleType SCALE_TYPE = ScaleType.CENTER_CROP;
private static final Bitmap.Config BITMAP_CONFIG = Bitmap.Config.ARGB_8888;
private static final int COLORDRAWABLE_DIMENSION = 1;
private static final int DEFAULT_BORDER_WIDTH = 0;
private static final int DEFAULT_BORDER_COLOR = Color.BLACK;
private final RectF mDrawableRect = new RectF();
private final RectF mBorderRect = new RectF();
private final Matrix mShaderMatrix = new Matrix();
private final Paint mBitmapPaint = new Paint();
private final Paint mBorderPaint = new Paint();
private int mBorderColor = DEFAULT_BORDER_COLOR;
private int mBorderWidth = DEFAULT_BORDER_WIDTH;
private Bitmap mBitmap;
private BitmapShader mBitmapShader;
private int mBitmapWidth;
private int mBitmapHeight;
private float mDrawableRadius;
private float mBorderRadius;
private boolean mReady;
private boolean mSetupPending;
public CircleImageView(Context context) {
super(context);
}
public CircleImageView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public CircleImageView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
super.setScaleType(SCALE_TYPE);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView, defStyle, 0);
mBorderWidth = a.getDimensionPixelSize(R.styleable.CircleImageView_border_width, DEFAULT_BORDER_WIDTH);
mBorderColor = a.getColor(R.styleable.CircleImageView_border_color, DEFAULT_BORDER_COLOR);
a.recycle();
mReady = true;
if (mSetupPending) {
setup();
mSetupPending = false;
}
}
@Override
public ScaleType getScaleType() {
return SCALE_TYPE;
}
@Override
public void setScaleType(ScaleType scaleType) {
if (scaleType != SCALE_TYPE) {
throw new IllegalArgumentException(String.format("ScaleType %s not supported.", scaleType));
}
}
@Override
protected void onDraw(Canvas canvas) {
if (getDrawable() == null) {
return;
}
canvas.drawCircle(getWidth() / 2, getHeight() / 2, mDrawableRadius, mBitmapPaint);
canvas.drawCircle(getWidth() / 2, getHeight() / 2, mBorderRadius, mBorderPaint);
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
setup();
}
public int getBorderColor() {
return mBorderColor;
}
public void setBorderColor(int borderColor) {
if (borderColor == mBorderColor) {
return;
}
mBorderColor = borderColor;
mBorderPaint.setColor(mBorderColor);
invalidate();
}
public int getBorderWidth() {
return mBorderWidth;
}
public void setBorderWidth(int borderWidth) {
if (borderWidth == mBorderWidth) {
return;
}
mBorderWidth = borderWidth;
setup();
}
@Override
public void setImageBitmap(Bitmap bm) {
super.setImageBitmap(bm);
mBitmap = bm;
setup();
}
@Override
public void setImageDrawable(Drawable drawable) {
super.setImageDrawable(drawable);
mBitmap = getBitmapFromDrawable(drawable);
setup();
}
@Override
public void setImageResource(int resId) {
super.setImageResource(resId);
mBitmap = getBitmapFromDrawable(getDrawable());
setup();
}
private Bitmap getBitmapFromDrawable(Drawable drawable) {
if (drawable == null) {
return null;
}
if (drawable instanceof BitmapDrawable) {
return ((BitmapDrawable) drawable).getBitmap();
}
try {
Bitmap bitmap;
if (drawable instanceof ColorDrawable) {
bitmap = Bitmap.createBitmap(COLORDRAWABLE_DIMENSION, COLORDRAWABLE_DIMENSION, BITMAP_CONFIG);
} else {
bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), BITMAP_CONFIG);
}
Canvas canvas = new Canvas(bitmap);
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
drawable.draw(canvas);
return bitmap;
} catch (OutOfMemoryError e) {
return null;
}
}
private void setup() {
if (!mReady) {
mSetupPending = true;
return;
}
if (mBitmap == null) {
return;
}
mBitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
mBitmapPaint.setAntiAlias(true);
mBitmapPaint.setShader(mBitmapShader);
mBorderPaint.setStyle(Paint.Style.STROKE);
mBorderPaint.setAntiAlias(true);
mBorderPaint.setColor(mBorderColor);
mBorderPaint.setStrokeWidth(mBorderWidth);
mBitmapHeight = mBitmap.getHeight();
mBitmapWidth = mBitmap.getWidth();
mBorderRect.set(0, 0, getWidth(), getHeight());
mBorderRadius = Math.min((mBorderRect.height() - mBorderWidth) / 2, (mBorderRect.width() - mBorderWidth) / 2);
mDrawableRect.set(mBorderWidth, mBorderWidth, mBorderRect.width() - mBorderWidth, mBorderRect.height() - mBorderWidth);
mDrawableRadius = Math.min(mDrawableRect.height() / 2, mDrawableRect.width() / 2);
updateShaderMatrix();
invalidate();
}
private void updateShaderMatrix() {
float scale;
float dx = 0;
float dy = 0;
mShaderMatrix.set(null);
if (mBitmapWidth * mDrawableRect.height() > mDrawableRect.width() * mBitmapHeight) {
scale = mDrawableRect.height() / (float) mBitmapHeight;
dx = (mDrawableRect.width() - mBitmapWidth * scale) * 0.5f;
} else {
scale = mDrawableRect.width() / (float) mBitmapWidth;
dy = (mDrawableRect.height() - mBitmapHeight * scale) * 0.5f;
}
mShaderMatrix.setScale(scale, scale);
mShaderMatrix.postTranslate((int) (dx + 0.5f) + mBorderWidth, (int) (dy + 0.5f) + mBorderWidth);
mBitmapShader.setLocalMatrix(mShaderMatrix);
}
}
|
[
"543126764@qq.com"
] |
543126764@qq.com
|
6ccc6abc9adfea913b79e79da3b5709e6cd9a253
|
2256e4ad6fcb35d6e84ee610a6b11df0e4122ccd
|
/src/java/com/viettel/im/database/DAO/.svn/text-base/ViewDepostiStaffDAO.java.svn-base
|
38033755c86df121986b453c6deebcfb09978db1
|
[] |
no_license
|
tuanns/bccs_sm
|
cd9ae4da6dc410e4c71909b21c2ae1cf35864fc2
|
60476a905db7d4e7422061423fe93f7713eebf9c
|
refs/heads/master
| 2022-06-21T05:52:49.165156
| 2020-05-06T19:02:56
| 2020-05-06T19:02:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,196
|
package com.viettel.im.database.DAO;
import com.viettel.database.DAO.BaseDAOAction;
import com.viettel.im.database.BO.ViewDepostiStaff;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
/**
* A data access object (DAO) providing persistence and search support for
* ViewDepostiStaff entities. Transaction control of the save(), update() and
* delete() operations can directly support Spring container-managed
* transactions or they can be augmented to handle user-managed Spring
* transactions. Each of these methods provides additional information for how
* to configure it for the desired type of transaction control.
*
* @see com.viettel.im.database.BO.ViewDepostiStaff
* @author MyEclipse Persistence Tools
*/
public class ViewDepostiStaffDAO extends BaseDAOAction {
private static final Log log = LogFactory.getLog(ViewDepostiStaffDAO.class);
// property constants
public void save(ViewDepostiStaff transientInstance) {
log.debug("saving ViewDepostiStaff instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(ViewDepostiStaff persistentInstance) {
log.debug("deleting ViewDepostiStaff instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public ViewDepostiStaff findById(Long id) {
log.debug("getting ViewDepostiStaff instance with id: " + id);
try {
ViewDepostiStaff instance = (ViewDepostiStaff) getSession().get(
"com.viettel.im.database.BO.ViewDepostiStaff", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(ViewDepostiStaff instance) {
log.debug("finding ViewDepostiStaff instance by example");
try {
List results = getSession().createCriteria(
"com.viettel.im.database.BO.ViewDepostiStaff").add(
Example.create(instance)).list();
log.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding ViewDepostiStaff instance with property: "
+ propertyName + ", value: " + value);
try {
String queryString = "from ViewDepostiStaff as model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
public List findAll() {
log.debug("finding all ViewDepostiStaff instances");
try {
String queryString = "from ViewDepostiStaff";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public ViewDepostiStaff merge(ViewDepostiStaff detachedInstance) {
log.debug("merging ViewDepostiStaff instance");
try {
ViewDepostiStaff result = (ViewDepostiStaff) getSession().merge(
detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(ViewDepostiStaff instance) {
log.debug("attaching dirty ViewDepostiStaff instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(ViewDepostiStaff instance) {
log.debug("attaching clean ViewDepostiStaff instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
}
|
[
"xuanbac1611@gmail.com"
] |
xuanbac1611@gmail.com
|
|
94e085e1e4c3459f7c1fbeae724637f72942967e
|
63f9b6a82d131e7a19c631613eeb7e574b8764bb
|
/otus-algorithms-HW/HW5/src/main/java/ru/nchernetsov/heapSort/Heap.java
|
78bd6b6a205fcb795f198bb6615ded70455a1fed
|
[] |
no_license
|
ChernetsovNG/algorithms_2018_12
|
efaa197002fb3e33745ebb233fb5daec77206e55
|
911cd965141c0ef97fb433dbe0dcd1d3c58aa2f9
|
refs/heads/master
| 2020-04-14T00:05:48.316657
| 2019-07-06T16:19:25
| 2019-07-06T16:19:25
| 163,524,485
| 0
| 0
| null | 2019-06-29T17:49:26
| 2018-12-29T16:19:48
|
Java
|
UTF-8
|
Java
| false
| false
| 2,477
|
java
|
package ru.nchernetsov.heapSort;
public class Heap {
private int[] heapArray;
private int currentSize;
public Heap(int size) {
heapArray = new int[size];
currentSize = 0;
}
/**
* Построить пирамиду из заданного массива
*
* @param array массив
* @return пирамида
*/
public static Heap buildHeap(int[] array) {
int size = array.length;
Heap heap = new Heap(size);
// заполняем пирамиду данными из массива
for (int i = 0; i < size; i++) {
heap.insertAt(i, array[i]);
heap.incrementSize();
}
// восстанавливаем свойства пирамиды
for (int j = size / 2 - 1; j >= 0; j--) {
heap.drown(j);
}
return heap;
}
/**
* Получить элемент из корня пирамиды
*
* @return корневой элемент
*/
public int remove() {
int root = heapArray[0];
heapArray[0] = heapArray[--currentSize];
drown(0);
return root;
}
/**
* "Утопить" элемент по заданному индексу
*
* @param index индекс
*/
private void drown(int index) {
int largerChild;
int top = heapArray[index]; // сохранение корня
while (index < currentSize / 2) { // пока у узла имеется хотя бы один потомок
int leftChildIndex = 2 * index + 1;
int rightChildIndex = leftChildIndex + 1;
// Определение большего потомка
if (rightChildIndex < currentSize && heapArray[leftChildIndex] < heapArray[rightChildIndex]) {
largerChild = rightChildIndex;
} else {
largerChild = leftChildIndex;
}
if (top >= heapArray[largerChild]) {
break;
}
heapArray[index] = heapArray[largerChild]; // потомок сдвигается вверх
index = largerChild; // переход вниз
}
heapArray[index] = top; // index <- корень
}
private void insertAt(int index, int newNode) {
heapArray[index] = newNode;
}
private void incrementSize() {
currentSize++;
}
}
|
[
"n.chernetsov86@gmail.com"
] |
n.chernetsov86@gmail.com
|
c407b1cb22ece8f78a7b42d5b34c732e1531bb63
|
2d6714f15a6fd89b46f28a4d894460bba9ec5718
|
/src/yaas/commands/vector/AChangeMarkerCommand.java
|
731a0a4e2b312c98ee76bf26f15fbaa49cfdb5d3
|
[] |
no_license
|
pdewan/YAAS
|
83e74d250e3f2895580315d5c31461b577853687
|
6fe3f7cd16cba8a76f8321cf879c307678970fdc
|
refs/heads/master
| 2020-04-06T03:48:24.054444
| 2018-12-08T23:58:53
| 2018-12-08T23:58:53
| 16,783,145
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,574
|
java
|
package yaas.commands.vector;
import util.models.ListenableVector;
import yaas.buffers.vector.ALinearBuffer;
import bus.uigen.uiFrame;
import bus.uigen.reflect.MethodProxy;
import bus.uigen.undo.Command;
import bus.uigen.undo.CommandListener;
public class AChangeMarkerCommand<ElementType> implements Command{
private ListenableVector<ElementType> buffer;
private int position;
Integer oldVal;
public AChangeMarkerCommand(ListenableVector<ElementType> buf, int pos) {
buffer = buf;
position = pos;
}
public Object execute() {
oldVal = buffer.getPointer();
buffer.setPointer(position);
return null;
}
public void undo() {
buffer.setPointer (oldVal);
}
public Object getObject(){
return position;
}
public void redo() {
// TODO Auto-generated method stub
}
public Command clone(Object arg0, Object[] arg1, uiFrame arg2,
CommandListener arg3) {
// TODO Auto-generated method stub
return null;
}
public MethodProxy getMethod() {
// TODO Auto-generated method stub
return null;
}
public boolean getNotUndoablePurgesUndoHistory() {
// TODO Auto-generated method stub
return false;
}
public boolean isNoOp() {
// TODO Auto-generated method stub
return false;
}
public boolean isUndoable() {
// TODO Auto-generated method stub
return false;
}
public boolean isVoid() {
// TODO Auto-generated method stub
return false;
}
public void setNotUndoablePurgesUndoHistory(boolean arg0) {
// TODO Auto-generated method stub
}
}
|
[
"dewan@DEWAN.cs.unc.edu"
] |
dewan@DEWAN.cs.unc.edu
|
ba0fb4403d7b155b8e1bd6a7baa30470358f4dc2
|
e51a0e5a48efc098c3e4310e5bea4b4d6dfbc779
|
/ph-ubl-dian/src/test/java/com/helger/dianubl/DianUBLDocumentTypesTest.java
|
2420450503282f5e79cfe92db28321ce8546ab16
|
[
"Apache-2.0"
] |
permissive
|
mainhasan/ph-ubl
|
3f42216d89b130e75dd6debe3d8eda86c3e45890
|
370120ee581be53f62f52e2177a8ad91f5b66030
|
refs/heads/master
| 2022-06-21T13:41:09.218765
| 2020-05-12T04:44:46
| 2020-05-12T04:44:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,564
|
java
|
/**
* Copyright (C) 2020 Philip Helger (www.helger.com)
* philip[at]helger[dot]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 com.helger.dianubl;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import org.junit.Test;
/**
* Test class for class {@link DianUBLDocumentTypes}.
*
* @author Philip Helger
*/
public final class DianUBLDocumentTypesTest
{
@Test
public void testGetAllNamespaces ()
{
for (final String sNamespace : DianUBLDocumentTypes.getAllLocalNames ())
{
assertNotNull (DianUBLDocumentTypes.getDocumentTypeOfLocalName (sNamespace));
assertNotNull (DianUBLDocumentTypes.getImplementationClassOfLocalName (sNamespace));
assertNotNull (DianUBLDocumentTypes.getSchemaOfLocalName (sNamespace));
}
assertNull (DianUBLDocumentTypes.getDocumentTypeOfLocalName ("any"));
assertNull (DianUBLDocumentTypes.getImplementationClassOfLocalName ("any"));
assertNull (DianUBLDocumentTypes.getSchemaOfLocalName ("any"));
assertNull (DianUBLDocumentTypes.getDocumentTypeOfLocalName (null));
assertNull (DianUBLDocumentTypes.getImplementationClassOfLocalName (null));
assertNull (DianUBLDocumentTypes.getSchemaOfLocalName (null));
}
@Test
public void testGetSchemaOfImplementationClass ()
{
assertNull (DianUBLDocumentTypes.getDocumentTypeOfImplementationClass (null));
assertNull (DianUBLDocumentTypes.getSchemaOfImplementationClass (null));
assertNull (DianUBLDocumentTypes.getSchemaOfImplementationClass (String.class));
for (final EDianUBLDocumentType eDocType : EDianUBLDocumentType.values ())
{
assertSame (eDocType,
DianUBLDocumentTypes.getDocumentTypeOfImplementationClass (eDocType.getImplementationClass ()));
assertSame (eDocType.getSchema (),
DianUBLDocumentTypes.getSchemaOfImplementationClass (eDocType.getImplementationClass ()));
assertNotNull (eDocType.getValidator (null));
}
}
}
|
[
"philip@helger.com"
] |
philip@helger.com
|
b49c3e881ec68a4c0fd8907aee950b6641af90e8
|
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
|
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_2753.java
|
d12dd5092180c53420dbc4095e09dc156aab722b
|
[
"Apache-2.0"
] |
permissive
|
lesaint/experimenting-annotation-processing
|
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
|
1e9692ceb0d3d2cda709e06ccc13290262f51b39
|
refs/heads/master
| 2021-01-23T11:20:19.836331
| 2014-11-13T10:37:14
| 2014-11-13T10:37:14
| 26,336,984
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 151
|
java
|
package fr.javatronic.blog.massive.annotation1.sub1;
import fr.javatronic.blog.processor.Annotation_001;
@Annotation_001
public class Class_2753 {
}
|
[
"sebastien.lesaint@gmail.com"
] |
sebastien.lesaint@gmail.com
|
29b1486d82139e955d3d1da81161408d83b8dcf7
|
67249ea888f86ba5e133018a17d1c35993eeb1d2
|
/src/main/java/com/ziyu/jvm/ch07/instructions/references/Invokevirtual.java
|
4ef36af7b8437dcfc2943b70b12e771c4e70e355
|
[] |
no_license
|
ZheBigFish/myjvm
|
7515a3db5653a3771707df9949707ff1a583c118
|
13105d7da590118d133b97c806d83a518793444c
|
refs/heads/master
| 2022-12-22T04:56:54.224858
| 2020-05-16T08:10:29
| 2020-05-16T08:10:29
| 231,883,089
| 1
| 0
| null | 2022-12-16T05:06:36
| 2020-01-05T07:28:34
|
Java
|
UTF-8
|
Java
| false
| false
| 3,740
|
java
|
package com.ziyu.jvm.ch07.instructions.references;
import com.ziyu.jvm.ch07.instructions.base.Index16Instruction;
import com.ziyu.jvm.ch07.instructions.base.MethodInvokeLogic;
import com.ziyu.jvm.ch07.rtda.Frame;
import com.ziyu.jvm.ch07.rtda.OperandStack;
import com.ziyu.jvm.ch07.rtda.heap.MethodLookup;
import com.ziyu.jvm.ch07.rtda.heap.Object;
import com.ziyu.jvm.ch07.rtda.heap.kclass.KClass;
import com.ziyu.jvm.ch07.rtda.heap.kclass.Method;
import com.ziyu.jvm.ch07.rtda.heap.kclass.constantpool.HeapConstantPool;
import com.ziyu.jvm.ch07.rtda.heap.kclass.constantpool.ref.MethodRef;
/**
* @ClassName Invokevirtual
* @Date
* @Author
* @Description TODO
**/
public class Invokevirtual extends Index16Instruction {
@Override
public void execute(Frame frame) {
// frame.getOperandStack().popRef();
KClass currentClass = frame.getMethod().getAClass();
HeapConstantPool contantPool = currentClass.getContantPool();
MethodRef methodRef = (MethodRef) contantPool.getConstant(index);
if (methodRef.getName().equals("println")) {
OperandStack operandStack = frame.getOperandStack();
switch (methodRef.getDescriptor()) {
case "(Z)V":
System.out.println(operandStack.popInt() != 0);
break;
case "(C)V":
System.out.println(operandStack.popInt());
break;
case "(B)V":
System.out.println(operandStack.popInt());
break;
case "(S)V":
System.out.println(operandStack.popInt());
break;
case "(I)V":
System.out.println(operandStack.popInt());
break;
case "(J)V":
System.out.println(operandStack.popLong());
break;
case "(F)V":
System.out.println(operandStack.popFloat());
break;
case "(D)V":
System.out.println(operandStack.popDouble());
break;
default:
System.out.println("println: " + methodRef.getDescriptor());
}
operandStack.popRef();
return;
}
Method method = methodRef.resolvedMethod();
KClass kClass = methodRef.resolvedClass();
if ("<init>".equals(method) && method.getAClass() != kClass) {
throw new RuntimeException("java.lang.NoSuchMethodError");
}
if (method.isStatic()) {
throw new RuntimeException("java.lang.IncompatibleClassChangeError");
}
//获取this引用
Object o = frame.getOperandStack().getRefFromTop(method.getArgSlotCount());
if (o == null) {
throw new RuntimeException("java.lang.NullPointerException");
}
//确保protected方法只能被声明该方法的类或子类调用
if (method.isProtected() && method.getAClass().isSubClassOf(currentClass)
&& method.getAClass().getPackageName() != currentClass.getPackageName()
&& o.getAClass() != currentClass && !o.getAClass().isSubClassOf(currentClass)) {
throw new RuntimeException("java.lang.IllegalAccessError");
}
Method methodToBeInvoked = MethodLookup.lookUpMethodInClass(currentClass, methodRef.getName(), methodRef.getDescriptor());
if (methodToBeInvoked == null || methodToBeInvoked.isAbstract()) {
throw new RuntimeException("java.lang.AbstractMethodError");
}
MethodInvokeLogic.invokeMethod(frame, methodToBeInvoked);
}
}
|
[
"762349436@qq.com"
] |
762349436@qq.com
|
fdf7b8bd378e1a50eab144686948dbed0e615f4a
|
6eb130c8b2586460d434290dd71a208182a87caf
|
/ZDIM/src/com/netease/nim/demo/receiver/MyJpushReceiver.java
|
ea7c0275359a190228b971be696e2d6db483e81f
|
[] |
no_license
|
mrlee1989/zdhx-im-yunxin-run
|
fcd37a5ddd06f1ae44bb03215d791ace60c26424
|
f66b014988e6fd823a321e9412065d85c4fa2156
|
refs/heads/master
| 2021-01-19T04:38:44.949781
| 2017-04-06T03:44:16
| 2017-04-06T03:44:16
| 84,165,924
| 0
| 0
| null | 2017-03-07T07:50:19
| 2017-03-07T06:59:34
|
Java
|
UTF-8
|
Java
| false
| false
| 4,965
|
java
|
package com.netease.nim.demo.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import com.netease.nim.uikit.recent.RecentContactsFragment;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Iterator;
import cn.jpush.android.api.JPushInterface;
import zhwx.common.util.SharPreUtil;
import zhwx.common.util.StringUtil;
import zhwx.ui.dcapp.noticecenter.NoticeCenterActivity;
import static android.R.attr.key;
/**
* Jpush自定义接收器
*
* 如果不定义这个 Receiver,则: 1) 默认用户会打开主界面 2) 接收不到自定义消息
*/
public class MyJpushReceiver extends BroadcastReceiver {
private static final String TAG = "JPush";
@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
Log.d(TAG, "[MyReceiver] onReceive - " + intent.getAction() + ", extras: " + printBundle(bundle));
if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) {
final String regId = bundle.getString(JPushInterface.EXTRA_REGISTRATION_ID);
Log.d(TAG, "[MyReceiver] 接收Registration Id : " + regId);
} else if (JPushInterface.ACTION_MESSAGE_RECEIVED.equals(intent.getAction())) {
//TODO
Log.d(TAG,"[MyReceiver] 接收到推送下来的自定义消息: " + bundle.getString(JPushInterface.EXTRA_MESSAGE));
processCustomMessage(context, bundle);
} else if (JPushInterface.ACTION_NOTIFICATION_RECEIVED.equals(intent.getAction())) {
int notifactionId = bundle.getInt(JPushInterface.EXTRA_NOTIFICATION_ID);
Log.d(TAG, "[MyReceiver] 接收到推送下来的通知的ID: " + notifactionId);
processCustomMessage(context, bundle);
insertMessage(context, bundle);
} else if (JPushInterface.ACTION_NOTIFICATION_OPENED.equals(intent.getAction())) {
Log.d(TAG, "[MyReceiver] 用户点击打开了通知");
Intent intent1 = new Intent(context, NoticeCenterActivity.class);
intent1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
SharPreUtil.saveField("haveNew", "");
context.startActivity(intent1);
} else if (JPushInterface.ACTION_RICHPUSH_CALLBACK.equals(intent.getAction())) {
Log.d(TAG,"[MyReceiver] 用户收到到RICH PUSH CALLBACK: "+ bundle.getString(JPushInterface.EXTRA_EXTRA));
// 在这里根据 JPushInterface.EXTRA_EXTRA 的内容处理代码,比如打开新的Activity,
// 打开一个网页等..
} else if (JPushInterface.ACTION_CONNECTION_CHANGE.equals(intent.getAction())) {
boolean connected = intent.getBooleanExtra(JPushInterface.EXTRA_CONNECTION_CHANGE, false);
Log.w(TAG, "[MyReceiver]" + intent.getAction() + " connected state change to " + connected);
} else {
Log.d(TAG, "[MyReceiver] Unhandled intent - " + intent.getAction());
}
}
// 打印所有的 intent extra 数据
private static String printBundle(Bundle bundle) {
StringBuilder sb = new StringBuilder();
for (String key : bundle.keySet()) {
if (key.equals(JPushInterface.EXTRA_NOTIFICATION_ID)) {
sb.append("\nkey:" + key + ", value:" + bundle.getInt(key));
} else if (key.equals(JPushInterface.EXTRA_CONNECTION_CHANGE)) {
sb.append("\nkey:" + key + ", value:" + bundle.getBoolean(key));
} else {
sb.append("\nkey:" + key + ", value:" + bundle.getString(key));
}
}
return sb.toString();
}
// send msg to MainActivity
private void processCustomMessage(Context context, Bundle bundle) {
Log.d(TAG, "收到消息"+bundle.getString(JPushInterface.EXTRA_MESSAGE));
Log.d(TAG, "收到消息"+bundle.getString(JPushInterface.EXTRA_EXTRA)); //自定义字段
Log.d(TAG, "收到消息"+bundle.getString(JPushInterface.EXTRA_RICHPUSH_HTML_PATH)); //富文本地址
}
private void insertMessage(Context context, Bundle bundle) {
StringBuilder sb = new StringBuilder();
try {
JSONObject json = new JSONObject(bundle.getString(JPushInterface.EXTRA_EXTRA));
Iterator<String> it = json.keys();
while (it.hasNext()) {
String myKey = it.next().toString();
sb.append("\nkey:" + key + ", value: [" +
myKey + " - " +json.optString(myKey) + "]");
}
} catch (JSONException e) {
Log.e(TAG, "Get message extra JSON error!");
}
Log.d(TAG, "收到通知"+bundle.getString("cn.jpush.android.NOTIFICATION_CONTENT_TITLE"));
if (StringUtil.isNotBlank(bundle.getString("cn.jpush.android.NOTIFICATION_CONTENT_TITLE"))) {
SharPreUtil.saveField("haveNew", "1");
SharPreUtil.saveField("noticeContent",bundle.getString("cn.jpush.android.ALERT"));
//TODO 播放铃声
// try {
// IMUtils.playNotifycationMusic(CCPAppManager.getContext(), "avchat_ring.mp3");
// } catch (IOException e) {
// e.printStackTrace();
// }
if(RecentContactsFragment.adapter != null){
RecentContactsFragment.adapter.getCallback().onRecentContactsLoaded();
}
}
}
}
|
[
"lixin890403@163.com"
] |
lixin890403@163.com
|
232c24ce275690638bb491df1a0910f74cc997e0
|
367f8bc0eddec958ca67b253b5b6ccde167ba980
|
/benchmarks/github/PortletModel.java
|
22571257279338390a97a04a5a5fff5769079d3e
|
[] |
no_license
|
lmpick/synonym
|
bafc6c165a79c3fac4d8d5558a076a5b0587bdb8
|
44cd2270ba43f9793dd6aba6b7a602dab6230341
|
refs/heads/master
| 2020-03-20T20:15:31.458764
| 2018-12-15T16:31:02
| 2018-12-15T16:31:02
| 137,677,878
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,144
|
java
|
/* ./liferay-liferay-portal-b66e4b4/portal-service/src/com/liferay/portal/model/PortletModel.java */
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.portal.model;
import aQute.bnd.annotation.ProviderType;
import com.liferay.portal.kernel.bean.AutoEscape;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.expando.model.ExpandoBridge;
import java.io.Serializable;
/**
* The base model interface for the Portlet service. Represents a row in the "Portlet" database table, with each column mapped to a property of this class.
*
* <p>
* This interface and its corresponding implementation {@link com.liferay.portal.model.impl.PortletModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link com.liferay.portal.model.impl.PortletImpl}.
* </p>
*
* @author Brian Wing Shun Chan
* @see Portlet
* @see com.liferay.portal.model.impl.PortletImpl
* @see com.liferay.portal.model.impl.PortletModelImpl
* @generated
*/
@ProviderType
public interface PortletModel extends BaseModel<Portlet>, MVCCModel {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify or reference this interface directly. All methods that expect a portlet model instance should use the {@link Portlet} interface instead.
*/
/**
* Returns the primary key of this portlet.
*
* @return the primary key of this portlet
*/
public long getPrimaryKey();
/**
* Sets the primary key of this portlet.
*
* @param primaryKey the primary key of this portlet
*/
public void setPrimaryKey(long primaryKey);
/**
* Returns the mvcc version of this portlet.
*
* @return the mvcc version of this portlet
*/
@Override
public long getMvccVersion();
/**
* Sets the mvcc version of this portlet.
*
* @param mvccVersion the mvcc version of this portlet
*/
@Override
public void setMvccVersion(long mvccVersion);
/**
* Returns the ID of this portlet.
*
* @return the ID of this portlet
*/
public long getId();
/**
* Sets the ID of this portlet.
*
* @param id the ID of this portlet
*/
public void setId(long id);
/**
* Returns the company ID of this portlet.
*
* @return the company ID of this portlet
*/
public long getCompanyId();
/**
* Sets the company ID of this portlet.
*
* @param companyId the company ID of this portlet
*/
public void setCompanyId(long companyId);
/**
* Returns the portlet ID of this portlet.
*
* @return the portlet ID of this portlet
*/
@AutoEscape
public String getPortletId();
/**
* Sets the portlet ID of this portlet.
*
* @param portletId the portlet ID of this portlet
*/
public void setPortletId(String portletId);
/**
* Returns the roles of this portlet.
*
* @return the roles of this portlet
*/
@AutoEscape
public String getRoles();
/**
* Sets the roles of this portlet.
*
* @param roles the roles of this portlet
*/
public void setRoles(String roles);
/**
* Returns the active of this portlet.
*
* @return the active of this portlet
*/
public boolean getActive();
/**
* Returns <code>true</code> if this portlet is active.
*
* @return <code>true</code> if this portlet is active; <code>false</code> otherwise
*/
public boolean isActive();
/**
* Sets whether this portlet is active.
*
* @param active the active of this portlet
*/
public void setActive(boolean active);
@Override
public boolean isNew();
@Override
public void setNew(boolean n);
@Override
public boolean isCachedModel();
@Override
public void setCachedModel(boolean cachedModel);
@Override
public boolean isEscapedModel();
@Override
public Serializable getPrimaryKeyObj();
@Override
public void setPrimaryKeyObj(Serializable primaryKeyObj);
@Override
public ExpandoBridge getExpandoBridge();
@Override
public void setExpandoBridgeAttributes(BaseModel<?> baseModel);
@Override
public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge);
@Override
public void setExpandoBridgeAttributes(ServiceContext serviceContext);
@Override
public Object clone();
@Override
public int compareTo(com.liferay.portal.model.Portlet portlet);
@Override
public int hashCode();
@Override
public CacheModel<com.liferay.portal.model.Portlet> toCacheModel();
@Override
public com.liferay.portal.model.Portlet toEscapedModel();
@Override
public com.liferay.portal.model.Portlet toUnescapedModel();
@Override
public String toString();
@Override
public String toXmlString();
}
|
[
"mihirthegenius@gmail.com"
] |
mihirthegenius@gmail.com
|
8f253b696d1bdbb07d40849911035f543d1d9278
|
9412cd1fc2ae3151f8516b7c141787a45da1cde6
|
/flight-server/src/main/java/com/metasoft/flying/vo/PlayerGoldVO.java
|
b2b0fe9908af03aa0a5c3d3593be3f0c0725f83d
|
[] |
no_license
|
imjamespond/java-recipe
|
2322d98d8db657fcd7e4784f706b66c10bee8d8b
|
6b8b0a6b46326dde0006d7544ffa8cc1ae647a0b
|
refs/heads/master
| 2021-08-28T18:22:43.811299
| 2016-09-27T06:41:00
| 2016-09-27T06:41:00
| 68,710,592
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,099
|
java
|
package com.metasoft.flying.vo;
import com.metasoft.flying.net.annotation.DescAnno;
@DescAnno("财富排行信息")
public class PlayerGoldVO {
@DescAnno("Id")
private long userId;
@DescAnno("昵称")
private String userName;
@DescAnno("分数")
private int gold;
@DescAnno("等级")
private int level;
@DescAnno("0下线1在线 2在房间")
private int online;
@DescAnno("是否关注")
private int follow;
public long getUserId() {
return userId;
}
public void setUserId(long userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public int getOnline() {
return online;
}
public void setOnline(int online) {
this.online = online;
}
public int getFollow() {
return follow;
}
public void setFollow(int follow) {
this.follow = follow;
}
public int getGold() {
return gold;
}
public void setGold(int gold) {
this.gold = gold;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
}
|
[
"imjamespond@gmai.com"
] |
imjamespond@gmai.com
|
7e6af54406c7ef0ca036235a9fd3033a8c597eb5
|
e1bddfeabcb0b18495118916f5a5cbd632da5225
|
/pinyougou_dao/src/main/java/com/pinyougou/mapper/TbSpecificationMapper.java
|
6ed7143cab13c6751e67ab1f083bb827a9e77c0b
|
[] |
no_license
|
zzr156/pinyougou
|
a7505cf6b01183c14477e85e74bfa1706389ce82
|
51703fe45b1b4b36d500520ec3bf7d1e77912105
|
refs/heads/master
| 2022-12-22T13:23:25.402374
| 2019-10-20T07:35:49
| 2019-10-20T07:35:49
| 210,571,027
| 0
| 0
| null | 2019-09-24T10:06:00
| 2019-09-24T10:03:32
|
Java
|
UTF-8
|
Java
| false
| false
| 1,061
|
java
|
package com.pinyougou.mapper;
import com.pinyougou.pojo.TbSpecification;
import com.pinyougou.pojo.TbSpecificationExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface TbSpecificationMapper {
int countByExample(TbSpecificationExample example);
int deleteByExample(TbSpecificationExample example);
int deleteByPrimaryKey(Long id);
int insert(TbSpecification record);
int insertSelective(TbSpecification record);
List<TbSpecification> selectByExample(TbSpecificationExample example);
TbSpecification selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") TbSpecification record, @Param("example") TbSpecificationExample example);
int updateByExample(@Param("record") TbSpecification record, @Param("example") TbSpecificationExample example);
int updateByPrimaryKeySelective(TbSpecification record);
int updateByPrimaryKey(TbSpecification record);
//模板 编辑 :规格下拉选项
List<Map> selectOptionList();
}
|
[
"1565344173@qq.com"
] |
1565344173@qq.com
|
1d020cd5a1bd6fff0703a4504276d8db0e1007e7
|
a7c312a043a43a6006d36b64f2bc9fe6d20f1c55
|
/src/_03objects/P8_15/Sphere.java
|
97c006c990ca5cba09b8d6efa9ca1fa42785dc11
|
[] |
no_license
|
yangmei555/My-Java-Programming-Coursework
|
2436be9780197e21c72e1ba76115a70d130a661d
|
af25b36307b62266ab493cf7b9598d9ba8c90049
|
refs/heads/master
| 2021-01-11T16:30:18.614965
| 2017-01-26T07:11:20
| 2017-01-26T07:11:20
| 80,092,806
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 274
|
java
|
package _03objects.P8_15;
/**
* Created by yangmei555 on 2016/10/16.
*/
public class Sphere {
public static double sphereVolume(double r){
return 4*Math.PI*r*r*r/3;
}
public static double sphereSurface(double r){
return 4*Math.PI*r*r;
}
}
|
[
"myang3@uchicago.edu"
] |
myang3@uchicago.edu
|
4f1c40151002f27db49619b87bfb0373947a4136
|
a5d01febfd8d45a61f815b6f5ed447e25fad4959
|
/Source Code/5.5.1/sources/com/iqoption/d/no.java
|
82ee5ee778e62b394bda87ac1abf71e0658d01dd
|
[] |
no_license
|
kkagill/Decompiler-IQ-Option
|
7fe5911f90ed2490687f5d216cb2940f07b57194
|
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
|
refs/heads/master
| 2020-09-14T20:44:49.115289
| 2019-11-04T06:58:55
| 2019-11-04T06:58:55
| 223,236,327
| 1
| 0
| null | 2019-11-21T18:17:17
| 2019-11-21T18:17:16
| null |
UTF-8
|
Java
| false
| false
| 4,530
|
java
|
package com.iqoption.d;
import android.arch.lifecycle.LifecycleOwner;
import android.databinding.DataBindingComponent;
import android.databinding.ViewDataBinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.iqoption.x.R;
/* compiled from: FragmentKycQuestionSingleChoiceBindingImpl */
public class no extends nn {
@Nullable
private static final IncludedLayouts awU = new IncludedLayouts(5);
@Nullable
private static final SparseIntArray awV = new SparseIntArray();
private long awW;
@NonNull
private final LinearLayout axx;
public boolean setVariable(int i, @Nullable Object obj) {
return true;
}
static {
awU.setIncludes(0, new String[]{"kyc_toolbar_layout", "kyc_continue_button"}, new int[]{1, 2}, new int[]{R.layout.kyc_toolbar_layout, R.layout.kyc_continue_button});
awV.put(R.id.question, 3);
awV.put(R.id.answers, 4);
}
public no(@Nullable DataBindingComponent dataBindingComponent, @NonNull View view) {
this(dataBindingComponent, view, ViewDataBinding.mapBindings(dataBindingComponent, view, 5, awU, awV));
}
private no(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
super(dataBindingComponent, view, 2, (LinearLayout) objArr[4], (wr) objArr[1], (wp) objArr[2], (TextView) objArr[3]);
this.awW = -1;
this.axx = (LinearLayout) objArr[0];
this.axx.setTag(null);
setRootTag(view);
invalidateAll();
}
public void invalidateAll() {
synchronized (this) {
this.awW = 4;
}
this.bxz.invalidateAll();
this.bxE.invalidateAll();
requestRebind();
}
/* JADX WARNING: Missing block: B:8:0x0013, code:
if (r5.bxz.hasPendingBindings() == false) goto L_0x0016;
*/
/* JADX WARNING: Missing block: B:9:0x0015, code:
return true;
*/
/* JADX WARNING: Missing block: B:11:0x001c, code:
if (r5.bxE.hasPendingBindings() == false) goto L_0x001f;
*/
/* JADX WARNING: Missing block: B:12:0x001e, code:
return true;
*/
/* JADX WARNING: Missing block: B:14:0x0020, code:
return false;
*/
public boolean hasPendingBindings() {
/*
r5 = this;
monitor-enter(r5);
r0 = r5.awW; Catch:{ all -> 0x0021 }
r2 = 0;
r4 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));
r0 = 1;
if (r4 == 0) goto L_0x000c;
L_0x000a:
monitor-exit(r5); Catch:{ all -> 0x0021 }
return r0;
L_0x000c:
monitor-exit(r5); Catch:{ all -> 0x0021 }
r1 = r5.bxz;
r1 = r1.hasPendingBindings();
if (r1 == 0) goto L_0x0016;
L_0x0015:
return r0;
L_0x0016:
r1 = r5.bxE;
r1 = r1.hasPendingBindings();
if (r1 == 0) goto L_0x001f;
L_0x001e:
return r0;
L_0x001f:
r0 = 0;
return r0;
L_0x0021:
r0 = move-exception;
monitor-exit(r5); Catch:{ all -> 0x0021 }
throw r0;
*/
throw new UnsupportedOperationException("Method not decompiled: com.iqoption.d.no.hasPendingBindings():boolean");
}
public void setLifecycleOwner(@Nullable LifecycleOwner lifecycleOwner) {
super.setLifecycleOwner(lifecycleOwner);
this.bxz.setLifecycleOwner(lifecycleOwner);
this.bxE.setLifecycleOwner(lifecycleOwner);
}
protected boolean onFieldChange(int i, Object obj, int i2) {
switch (i) {
case 0:
return a((wp) obj, i2);
case 1:
return a((wr) obj, i2);
default:
return false;
}
}
private boolean a(wp wpVar, int i) {
if (i != 0) {
return false;
}
synchronized (this) {
this.awW |= 1;
}
return true;
}
private boolean a(wr wrVar, int i) {
if (i != 0) {
return false;
}
synchronized (this) {
this.awW |= 2;
}
return true;
}
protected void executeBindings() {
synchronized (this) {
long j = this.awW;
this.awW = 0;
}
ViewDataBinding.executeBindingsOn(this.bxz);
ViewDataBinding.executeBindingsOn(this.bxE);
}
}
|
[
"yihsun1992@gmail.com"
] |
yihsun1992@gmail.com
|
e8ab777b494bff7d950648f1e2aff5c93e7db7d5
|
671daf60cdb46250214da19132bb7f21dbc29612
|
/android/src/com/android/tools/idea/ui/resourcemanager/sketchImporter/parser/deserializers/SketchLayerDeserializer.java
|
869b2323d0537f1772ac5fb9e426525598541704
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/android
|
3732f6fe3ae742182c2684a13ea8a1e6a996c9a1
|
9aa80ad909cf4b993389510e2c1efb09b8cdb5a0
|
refs/heads/master
| 2023-09-01T14:11:56.555718
| 2023-08-31T16:50:03
| 2023-08-31T16:53:27
| 60,701,247
| 947
| 255
|
Apache-2.0
| 2023-09-05T12:44:24
| 2016-06-08T13:46:48
|
Kotlin
|
UTF-8
|
Java
| false
| false
| 4,848
|
java
|
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.deserializers;
import com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.interfaces.SketchLayer;
import com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.pages.SketchArtboard;
import com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.pages.SketchBitmap;
import com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.pages.SketchPage;
import com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.pages.SketchShapeGroup;
import com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.pages.SketchShapePath;
import com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.pages.SketchSlice;
import com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.pages.SketchSymbolInstance;
import com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.pages.SketchSymbolMaster;
import com.android.tools.idea.ui.resourcemanager.sketchImporter.parser.pages.SketchText;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.intellij.openapi.diagnostic.Logger;
import java.lang.reflect.Type;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Since abstract classes (such as {@link SketchLayer} cannot be instantiated, GSON needs to know how to handle fields of type
* {@link SketchLayer}.
* This is a {@link JsonDeserializer} that uses the "_class" field in the JSON file to determine which type of layer should be instantiated.
*/
public class SketchLayerDeserializer implements JsonDeserializer<SketchLayer> {
public static final String ARTBOARD_CLASS_TYPE = "artboard";
public static final String BITMAP_CLASS_TYPE = "bitmap";
public static final String GROUP_CLASS_TYPE = "group";
public static final String OVAL_CLASS_TYPE = "oval";
public static final String PAGE_CLASS_TYPE = "page";
public static final String POLYGON_CLASS_TYPE = "polygon";
public static final String RECTANGLE_CLASS_TYPE = "rectangle";
public static final String SHAPE_GROUP_CLASS_TYPE = "shapeGroup";
public static final String SHAPE_PATH_CLASS_TYPE = "shapePath";
public static final String SLICE_CLASS_TYPE = "slice";
public static final String STAR_CLASS_TYPE = "star";
public static final String SYMBOL_INSTANCE_CLASS_TYPE = "symbolInstance";
public static final String SYMBOL_MASTER_CLASS_TYPE = "symbolMaster";
public static final String TEXT_CLASS_TYPE = "text";
public static final String TRIANGLE_CLASS_TYPE = "triangle";
@Override
@Nullable
public SketchLayer deserialize(@NotNull JsonElement json,
@NotNull Type typeOfT,
@NotNull JsonDeserializationContext context) {
final JsonObject jsonObject = json.getAsJsonObject();
final String classType = jsonObject.get("_class").getAsString();
switch (classType) {
case ARTBOARD_CLASS_TYPE:
return context.deserialize(json, SketchArtboard.class);
case BITMAP_CLASS_TYPE:
return context.deserialize(json, SketchBitmap.class);
case GROUP_CLASS_TYPE:
case PAGE_CLASS_TYPE:
return context.deserialize(json, SketchPage.class);
case OVAL_CLASS_TYPE:
case POLYGON_CLASS_TYPE:
case RECTANGLE_CLASS_TYPE:
case SHAPE_PATH_CLASS_TYPE:
case STAR_CLASS_TYPE:
case TRIANGLE_CLASS_TYPE:
return context.deserialize(json, SketchShapePath.class);
case SHAPE_GROUP_CLASS_TYPE:
return context.deserialize(json, SketchShapeGroup.class);
case SLICE_CLASS_TYPE:
return context.deserialize(json, SketchSlice.class);
case SYMBOL_INSTANCE_CLASS_TYPE:
return context.deserialize(json, SketchSymbolInstance.class);
case SYMBOL_MASTER_CLASS_TYPE:
return context.deserialize(json, SketchSymbolMaster.class);
case TEXT_CLASS_TYPE:
return context.deserialize(json, SketchText.class);
default:
Logger.getInstance(SketchLayerDeserializer.class).warn("Class " + classType + " not found.");
return null;
}
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
9d58172aaf20839a138e025d4e0077e558ae5a1d
|
10186b7d128e5e61f6baf491e0947db76b0dadbc
|
/org/apache/batik/script/rhino/RhinoClassLoader.java
|
cd69c7fc0ef97dcab8982ba74fb202772bb5c020
|
[
"SMLNJ",
"Apache-1.1",
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
MewX/contendo-viewer-v1.6.3
|
7aa1021e8290378315a480ede6640fd1ef5fdfd7
|
69fba3cea4f9a43e48f43148774cfa61b388e7de
|
refs/heads/main
| 2022-07-30T04:51:40.637912
| 2021-03-28T05:06:26
| 2021-03-28T05:06:26
| 351,630,911
| 2
| 0
|
Apache-2.0
| 2021-10-12T22:24:53
| 2021-03-26T01:53:24
|
Java
|
UTF-8
|
Java
| false
| false
| 4,674
|
java
|
/* */ package org.apache.batik.script.rhino;
/* */
/* */ import java.io.File;
/* */ import java.io.FilePermission;
/* */ import java.io.IOException;
/* */ import java.net.URL;
/* */ import java.net.URLClassLoader;
/* */ import java.security.AccessControlContext;
/* */ import java.security.CodeSource;
/* */ import java.security.Permission;
/* */ import java.security.PermissionCollection;
/* */ import java.security.ProtectionDomain;
/* */ import java.security.cert.Certificate;
/* */ import org.mozilla.javascript.GeneratedClassLoader;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class RhinoClassLoader
/* */ extends URLClassLoader
/* */ implements GeneratedClassLoader
/* */ {
/* */ protected URL documentURL;
/* */ protected CodeSource codeSource;
/* */ protected AccessControlContext rhinoAccessControlContext;
/* */
/* */ public RhinoClassLoader(URL documentURL, ClassLoader parent) {
/* 67 */ super((documentURL != null) ? new URL[1] : new URL[0], parent);
/* */
/* 69 */ this.documentURL = documentURL;
/* 70 */ if (documentURL != null) {
/* 71 */ this.codeSource = new CodeSource(documentURL, (Certificate[])null);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* 78 */ ProtectionDomain rhinoProtectionDomain = new ProtectionDomain(this.codeSource, getPermissions(this.codeSource));
/* */
/* */
/* */
/* 82 */ this.rhinoAccessControlContext = new AccessControlContext(new ProtectionDomain[] { rhinoProtectionDomain });
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ static URL[] getURL(ClassLoader parent) {
/* 91 */ if (parent instanceof RhinoClassLoader) {
/* 92 */ URL documentURL = ((RhinoClassLoader)parent).documentURL;
/* 93 */ if (documentURL != null) {
/* 94 */ return new URL[] { documentURL };
/* */ }
/* 96 */ return new URL[0];
/* */ }
/* */
/* 99 */ return new URL[0];
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Class defineClass(String name, byte[] data) {
/* 108 */ return defineClass(name, data, 0, data.length, this.codeSource);
/* */ }
/* */
/* */
/* */
/* */
/* */ public void linkClass(Class<?> clazz) {
/* 115 */ resolveClass(clazz);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public AccessControlContext getAccessControlContext() {
/* 123 */ return this.rhinoAccessControlContext;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ protected PermissionCollection getPermissions(CodeSource codesource) {
/* 133 */ PermissionCollection perms = null;
/* */
/* 135 */ if (codesource != null) {
/* 136 */ perms = super.getPermissions(codesource);
/* */ }
/* */
/* 139 */ if (this.documentURL != null && perms != null) {
/* 140 */ Permission p = null;
/* 141 */ Permission dirPerm = null;
/* */ try {
/* 143 */ p = this.documentURL.openConnection().getPermission();
/* 144 */ } catch (IOException e) {
/* 145 */ p = null;
/* */ }
/* */
/* 148 */ if (p instanceof FilePermission) {
/* 149 */ String path = p.getName();
/* 150 */ if (!path.endsWith(File.separator)) {
/* */
/* */
/* 153 */ int dirEnd = path.lastIndexOf(File.separator);
/* 154 */ if (dirEnd != -1) {
/* */
/* 156 */ path = path.substring(0, dirEnd + 1);
/* 157 */ path = path + "-";
/* 158 */ dirPerm = new FilePermission(path, "read");
/* 159 */ perms.add(dirPerm);
/* */ }
/* */ }
/* */ }
/* */ }
/* */
/* 165 */ return perms;
/* */ }
/* */ }
/* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/batik/script/rhino/RhinoClassLoader.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"xiayuanzhong+gpg2020@gmail.com"
] |
xiayuanzhong+gpg2020@gmail.com
|
3dc3e58760756ac4ee860b2dd8986e9f6a84c2a8
|
c474b03758be154e43758220e47b3403eb7fc1fc
|
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/google/android/gms/internal/jp.java
|
d6d965916cc2d65b3054bff2e215dcab1892023d
|
[] |
no_license
|
EstebanDalelR/tinderAnalysis
|
f80fe1f43b3b9dba283b5db1781189a0dd592c24
|
941e2c634c40e5dbf5585c6876ef33f2a578b65c
|
refs/heads/master
| 2020-04-04T09:03:32.659099
| 2018-11-23T20:41:28
| 2018-11-23T20:41:28
| 155,805,042
| 0
| 0
| null | 2018-11-18T16:02:45
| 2018-11-02T02:44:34
| null |
UTF-8
|
Java
| false
| false
| 1,229
|
java
|
package com.google.android.gms.internal;
import android.annotation.TargetApi;
import android.content.Context;
import android.view.TextureView;
@zzzv
@TargetApi(14)
public abstract class jp extends TextureView implements kg {
/* renamed from: a */
protected final jw f23346a = new jw();
/* renamed from: b */
protected final kf f23347b;
public jp(Context context) {
super(context);
this.f23347b = new kf(context, this);
}
/* renamed from: a */
public abstract String mo6875a();
/* renamed from: a */
public abstract void mo6876a(float f, float f2);
/* renamed from: a */
public abstract void mo6877a(int i);
/* renamed from: a */
public abstract void mo6878a(zzama zzama);
/* renamed from: b */
public abstract void mo6879b();
/* renamed from: c */
public abstract void mo6880c();
/* renamed from: d */
public abstract void mo6881d();
/* renamed from: e */
public abstract void mo4635e();
public abstract int getCurrentPosition();
public abstract int getDuration();
public abstract int getVideoHeight();
public abstract int getVideoWidth();
public abstract void setVideoPath(String str);
}
|
[
"jdguzmans@hotmail.com"
] |
jdguzmans@hotmail.com
|
a6299098ecf76a3f5eab55ff6c30ce52b258d9ce
|
01dfb27f1288a9ed62f83be0e0aeedf121b4623a
|
/NFe/src/java/com/t2tierp/nfe/cliente/NfeDetEspecificoArmamentoGridController.java
|
267aaa80681333b4a8add237dc03ff3f96f1a98c
|
[
"MIT"
] |
permissive
|
FabinhuSilva/T2Ti-ERP-2.0-Java-OpenSwing
|
deb486a13c264268d82e5ea50d84d2270b75772a
|
9531c3b6eaeaf44fa1e31b11baa630dcae67c18e
|
refs/heads/master
| 2022-11-16T00:03:53.426837
| 2020-07-08T00:36:48
| 2020-07-08T00:36:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,284
|
java
|
/*
* The MIT License
*
* Copyright: Copyright (C) 2014 T2Ti.COM
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* The author may be contacted at: t2ti.com@gmail.com
*
* @author Claudio de Barros (T2Ti.com)
* @version 2.0
*/
package com.t2tierp.nfe.cliente;
import com.t2tierp.nfe.java.NfeDetEspecificoArmamentoVO;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.openswing.swing.message.receive.java.Response;
import org.openswing.swing.message.receive.java.VOListResponse;
import org.openswing.swing.table.client.GridController;
import org.openswing.swing.table.java.GridDataLocator;
public class NfeDetEspecificoArmamentoGridController extends GridController implements GridDataLocator {
private List<NfeDetEspecificoArmamentoVO> armamento;
public NfeDetEspecificoArmamentoGridController() {
}
public Response loadData(int action, int startIndex, Map filteredColumns, ArrayList currentSortedColumns, ArrayList currentSortedVersusColumns, Class valueObjectType, Map otherGridParams) {
return new VOListResponse(armamento, false, armamento.size());
}
public void setArmamento(List<NfeDetEspecificoArmamentoVO> armamento) {
this.armamento = armamento;
}
}
|
[
"claudiobsi@gmail.com"
] |
claudiobsi@gmail.com
|
b2371ba6e2669c887f8bd20551db554c07f35d26
|
1e26a8ac0d2150ac0c7924b44388be21e58f7c0e
|
/src/com/Class43.java
|
549fc78c4fee2a3a15ba0163f9d2abc9f12241f2
|
[] |
no_license
|
titandino/2k6Bot
|
fe6fabd8bf4945dec5e0fa60979d9e211b31ed63
|
a87f3859b91173c070d24868adf01f5979cba917
|
refs/heads/master
| 2020-12-25T13:45:04.770523
| 2017-03-16T05:47:57
| 2017-03-16T05:47:57
| 64,186,020
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 559
|
java
|
package com;
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
final class Class43 {
public Class43(int i, int j, int k, int l, int i1, int j1, boolean flag) {
aBoolean721 = true;
anInt716 = i;
anInt717 = j;
anInt718 = k;
anInt719 = l;
anInt720 = i1;
anInt722 = j1;
aBoolean721 = flag;
}
final int anInt716;
final int anInt717;
final int anInt718;
final int anInt719;
final int anInt720;
boolean aBoolean721;
final int anInt722;
}
|
[
"trenton.kress@gmail.com"
] |
trenton.kress@gmail.com
|
73a45d3cd42cb365f9ef22f0c5b70917f1da6c8d
|
f7770e21f34ef093eb78dae21fd9bde99b6e9011
|
/src/main/java/com/hengyuan/hicash/parameters/request/user/StuAppSchoolReq.java
|
6910a0175212785784e79eb9c5c577e5e150587a
|
[] |
no_license
|
webvul/HicashAppService
|
9ac8e50c00203df0f4666cd81c108a7f14a3e6e0
|
abf27908f537979ef26dfac91406c1869867ec50
|
refs/heads/master
| 2020-03-22T19:58:41.549565
| 2017-12-26T08:30:04
| 2017-12-26T08:30:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 847
|
java
|
package com.hengyuan.hicash.parameters.request.user;
import com.hengyuan.hicash.parameters.request.RequestSequence;
/**
* hicash手机端学生提现申请根据城市查询学校请求参数
*
* @author lihua.Ren
* @create date 2015-05-27
*
*/
public class StuAppSchoolReq extends RequestSequence{
private static final long serialVersionUID = 2733124823620746442L;
// private String uuid;
private String cityCode;
/**
* @return the cityCode
*/
public String getCityCode() {
return cityCode;
}
/**
* @param cityCode the cityCode to set
*/
public void setCityCode(String cityCode) {
this.cityCode = cityCode;
}
// /**
// * @return the uuid
// */
// public String getUuid() {
// return uuid;
// }
// /**
// * @param uuid the uuid to set
// */
// public void setUuid(String uuid) {
// this.uuid = uuid;
// }
}
|
[
"hanlu@dpandora.cn"
] |
hanlu@dpandora.cn
|
2fd7adbd540631992d1723282baa3499f1c356f9
|
b9be35086be50aee9c5e1880218ba3f5def5a521
|
/Common/src/main/java/xyz/zimuju/common/util/CropUtil.java
|
f773ee6557574af471dac6de5e3a66e9655bb665
|
[
"Apache-2.0"
] |
permissive
|
yibulaxi/YuanYuan
|
97297896810962a2f78df761946aeac6fa9028c7
|
16ac8db40a3bc4d31325521e388f347206ff2b80
|
refs/heads/master
| 2021-01-16T19:23:40.798776
| 2017-08-13T05:38:46
| 2017-08-13T05:38:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,508
|
java
|
package xyz.zimuju.common.util;
import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.media.ExifInterface;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.provider.MediaStore;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import java.io.Closeable;
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
/*
* @description CropUtil :剪裁器
* @author Nathaniel-nathanwriting@126.com
* @time 2016/7/1-13:47
* @version v1.0.0
*/
public class CropUtil {
private static final String SCHEME_FILE = "file";
private static final String SCHEME_CONTENT = "content";
public static void closeSilently(@Nullable Closeable c) {
if (c == null) return;
try {
c.close();
} catch (Throwable t) {
// Do nothing
}
}
public static int getExifRotation(File imageFile) {
if (imageFile == null) return 0;
try {
ExifInterface exif = new ExifInterface(imageFile.getAbsolutePath());
// We only recognize a subset of orientation tag values
switch (exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_UNDEFINED)) {
case ExifInterface.ORIENTATION_ROTATE_90:
return 90;
case ExifInterface.ORIENTATION_ROTATE_180:
return 180;
case ExifInterface.ORIENTATION_ROTATE_270:
return 270;
default:
return ExifInterface.ORIENTATION_UNDEFINED;
}
} catch (IOException e) {
return 0;
}
}
public static boolean copyExifRotation(File sourceFile, File destFile) {
if (sourceFile == null || destFile == null) return false;
try {
ExifInterface exifSource = new ExifInterface(sourceFile.getAbsolutePath());
ExifInterface exifDest = new ExifInterface(destFile.getAbsolutePath());
exifDest.setAttribute(ExifInterface.TAG_ORIENTATION, exifSource.getAttribute(ExifInterface.TAG_ORIENTATION));
exifDest.saveAttributes();
return true;
} catch (IOException e) {
return false;
}
}
@Nullable
public static File getFromMediaUri(Context context, ContentResolver resolver, Uri uri) {
if (uri == null) return null;
if (SCHEME_FILE.equals(uri.getScheme())) {
return new File(uri.getPath());
} else if (SCHEME_CONTENT.equals(uri.getScheme())) {
final String[] filePathColumn = {MediaStore.MediaColumns.DATA, MediaStore.MediaColumns.DISPLAY_NAME};
Cursor cursor = null;
try {
cursor = resolver.query(uri, filePathColumn, null, null, null);
if (cursor != null && cursor.moveToFirst()) {
final int columnIndex = (uri.toString().startsWith("content://com.google.android.gallery3d")) ?
cursor.getColumnIndex(MediaStore.MediaColumns.DISPLAY_NAME) :
cursor.getColumnIndex(MediaStore.MediaColumns.DATA);
// Picasa images on API 13+
if (columnIndex != - 1) {
String filePath = cursor.getString(columnIndex);
if (! TextUtils.isEmpty(filePath)) {
return new File(filePath);
}
}
}
} catch (IllegalArgumentException e) {
// Google Drive images
return getFromMediaUriPfd(context, resolver, uri);
} catch (SecurityException ignored) {
// Nothing we can do
} finally {
if (cursor != null) cursor.close();
}
}
return null;
}
private static String getTempFilename(Context context) throws IOException {
File outputDir = context.getCacheDir();
File outputFile = File.createTempFile("image", "tmp", outputDir);
return outputFile.getAbsolutePath();
}
@Nullable
private static File getFromMediaUriPfd(Context context, ContentResolver resolver, Uri uri) {
if (uri == null) return null;
FileInputStream input = null;
FileOutputStream output = null;
try {
ParcelFileDescriptor pfd = resolver.openFileDescriptor(uri, "r");
FileDescriptor fd = pfd.getFileDescriptor();
input = new FileInputStream(fd);
String tempFilename = getTempFilename(context);
output = new FileOutputStream(tempFilename);
int read;
byte[] bytes = new byte[4096];
while ((read = input.read(bytes)) != - 1) {
output.write(bytes, 0, read);
}
return new File(tempFilename);
} catch (IOException ignored) {
// Nothing we can do
} finally {
closeSilently(input);
closeSilently(output);
}
return null;
}
// public static void startBackgroundJob(MonitoredActivity activity,
// String title, String message, Runnable job, Handler handler) {
// // Make the progress dialog uncancelable, so that we can guarantee
// // the thread will be done before the activity getting destroyed
// ProgressDialog dialog = ProgressDialog.show(
// activity, title, message, true, false);
// new Thread(new BackgroundJob(activity, job, dialog, handler)).start();
// }
// private static class BackgroundJob extends MonitoredActivity.LifeCycleAdapter implements Runnable {
//
// private final MonitoredActivity activity;
// private final ProgressDialog dialog;
// private final Runnable job;
// private final Handler handler;
// private final Runnable cleanupRunner = new Runnable() {
// public void run() {
// activity.removeLifeCycleListener(BackgroundJob.this);
// if (dialog.getWindow() != null) dialog.dismiss();
// }
// };
//
// public BackgroundJob(MonitoredActivity activity, Runnable job,
// ProgressDialog dialog, Handler handler) {
// this.activity = activity;
// this.dialog = dialog;
// this.job = job;
// this.activity.addLifeCycleListener(this);
// this.handler = handler;
// }
//
// public void run() {
// try {
// job.run();
// } finally {
// handler.post(cleanupRunner);
// }
// }
//
// @Override
// public void onActivityDestroyed(MonitoredActivity activity) {
// // We get here only when the onDestroyed being called before
// // the cleanupRunner. So, run it now and remove it from the queue
// cleanupRunner.run();
// handler.removeCallbacks(cleanupRunner);
// }
//
// @Override
// public void onActivityStopped(MonitoredActivity activity) {
// dialog.hide();
// }
//
// @Override
// public void onActivityStarted(MonitoredActivity activity) {
// dialog.show();
// }
// }
}
|
[
"nathanwriting@126.com"
] |
nathanwriting@126.com
|
02692cad63efe566cf9a49f98bc4aec8022c551d
|
863fd095740b1633bd9833a827977f1416182ad1
|
/Member_spring/src/main/java/kr/or/ddit/common/model/PageVo.java
|
f9efce8ad690c1854361ce5752079670852e8f9e
|
[] |
no_license
|
yezlee/course_PracticeSpring
|
9d75bf1ae2572d2f19e3261f78b39f7a4441cfca
|
c0071bff026ddf9c320af85c03a23fa487b67b92
|
refs/heads/main
| 2023-04-13T08:56:11.832922
| 2021-04-15T02:37:08
| 2021-04-15T02:37:08
| 358,100,808
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 586
|
java
|
package kr.or.ddit.common.model;
public class PageVo {
private int page;
private int pageSize;
public PageVo() {}
public PageVo(int page, int pageSize) {
this.page = page;
this.pageSize = pageSize;
}
public int getPage() {
return page == 0 ? 1:page;
}
public void setPage(int page) {
this.page = page;
}
public int getPageSize() {
return pageSize == 0 ? 5 : pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
@Override
public String toString() {
return "PageVo [page=" + page + ", pageSize=" + pageSize + "]";
}
}
|
[
"heemong9@gmail.com"
] |
heemong9@gmail.com
|
e56e870ac4a52930bcffed5fc2b391385f939811
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/4/4_160dbab8a7eaa08cb4cc86b57016e41c36e4d204/DispenserPrevention/4_160dbab8a7eaa08cb4cc86b57016e41c36e4d204_DispenserPrevention_s.java
|
74fdc76c51de4a9e26e088b0325dce7eb7258d37
|
[] |
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,293
|
java
|
package de.codeinfection.quickwango.AntiGuest.Preventions.Bukkit;
import de.codeinfection.quickwango.AntiGuest.AntiGuestBukkit;
import de.codeinfection.quickwango.AntiGuest.Prevention;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.inventory.InventoryOpenEvent;
/**
* Prevents dispenser access
*
* @author Phillip Schichtel
*/
public class DispenserPrevention extends Prevention
{
public DispenserPrevention()
{
super("dispenser", AntiGuestBukkit.getInstance());
}
@Override
public ConfigurationSection getDefaultConfig()
{
ConfigurationSection config = super.getDefaultConfig();
config.set("message", "&4You are not allowed to access dispensers!");
return config;
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void handle(InventoryOpenEvent event)
{
if ("container.dispenser".equals(event.getInventory().getName()))
{
if (event.getPlayer() instanceof Player)
{
prevent(event, (Player)event.getPlayer());
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
0f12147518615dc071cda9d3c2ba97db0ac5e87b
|
aabb2bd85ccca5e36e95587e3272c2d6844cfbcd
|
/src/main/java/tech/punklu/myspringboot/demo/error/ErrorInfo.java
|
d1927c4ecff62b1c55b800c11a2a4ab14d29e8a8
|
[] |
no_license
|
punk1u/spring-boot-demo
|
86243571739c1cf4e9fc91c410e53da4eba2f5b8
|
63497fec31b92e4f613e35afed18ca67af2fbfa3
|
refs/heads/main
| 2023-02-18T13:10:33.311909
| 2021-01-19T15:09:22
| 2021-01-19T15:09:22
| 331,018,653
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,248
|
java
|
package tech.punklu.myspringboot.demo.error;
/**
* 错误信息类
*
* @param <T>
*/
public class ErrorInfo<T> {
public static final Integer SUCCESS = 200;
public static final Integer ERROR = 100;
// 错误信息
private Integer code;
// 错误码
private String message;
private String url;
private T data;
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("ErrorInfo{");
sb.append("code=").append(code);
sb.append(", message='").append(message).append('\'');
sb.append(", url='").append(url).append('\'');
sb.append(", data=").append(data);
sb.append('}');
return sb.toString();
}
}
|
[
"punk1u@protonmail.com"
] |
punk1u@protonmail.com
|
013ad706cede5f3439ca698b7c8487b1880b59af
|
b25e847523102664b7c7c9984df67130e6bec697
|
/src/com/antoinecronier/pokebattle/menu/base/package-info.java
|
d067ffd1c04faad7fe1ad594bcac29df465f4777
|
[] |
no_license
|
antoinecronier/pokeAndroid
|
ebe0e9804f3b8d77b609c7006d9c99adf379ea6e
|
8ffe8c777782ba7cb18fc96e789940cda778ad9f
|
refs/heads/master
| 2021-01-17T13:10:40.246374
| 2016-05-25T06:34:07
| 2016-05-25T06:34:07
| 59,842,113
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 243
|
java
|
/**
* Base menu package of the application.
* This package contains all the base classes for your application's menus.
*
* Don't modifiy any of those classes. They will be regenerated.
*/
package com.antoinecronier.pokebattle.menu.base;
|
[
"antoine.cronier@tactfactory.com"
] |
antoine.cronier@tactfactory.com
|
07d5724ce2380089ead254072e2576443ec3c917
|
ccdfc914ce4b1b745c9851c13336b3607d6b5b2f
|
/android/app/src/main/java/com/constology_28992/MainApplication.java
|
f77811b75bf613350ac1f1b62b83758e0a1bd29e
|
[] |
no_license
|
crowdbotics-apps/constology-28992
|
194d453c3a98590a9f29b11da2ed846cc12fbf79
|
2f228c06b00da1c09b5f41ddd8e2b4f2d5076774
|
refs/heads/master
| 2023-06-23T12:32:20.466184
| 2021-07-20T20:48:06
| 2021-07-20T20:48:06
| 387,909,902
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,615
|
java
|
package com.constology_28992;
import android.app.Application;
import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
/**
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
*
* @param context
* @param reactInstanceManager
*/
private static void initializeFlipper(
Context context, ReactInstanceManager reactInstanceManager) {
if (BuildConfig.DEBUG) {
try {
/*
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.constology_28992.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
.invoke(null, context, reactInstanceManager);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
}
|
[
"team@crowdbotics.com"
] |
team@crowdbotics.com
|
4eff8b7698c0bcd882026604bd90fd6e56359f48
|
9d1870a895c63f540937f04a6285dd25ada5e52a
|
/chromecast-app-reverse-engineering/src/from-jd-gui/bdt.java
|
d63a9d1666c2d0887953e83c23594c53d617c7be
|
[] |
no_license
|
Churritosjesus/Chromecast-Reverse-Engineering
|
572aa97eb1fd65380ca0549b4166393505328ed4
|
29fae511060a820f2500a4e6e038dfdb591f4402
|
refs/heads/master
| 2023-06-04T10:27:15.869608
| 2015-10-27T10:43:11
| 2015-10-27T10:43:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,060
|
java
|
import java.io.IOException;
import java.util.ArrayList;
import java.util.concurrent.TimeoutException;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class bdt
extends bfp
{
ArrayList a;
public bdt(String paramString)
{
super(paramString);
}
public final int a()
{
int i = -1;
try
{
Object localObject1 = a("supported_timezones", c);
if (((bfq)localObject1).b() != 200) {}
for (;;)
{
return i;
localObject1 = ((bfq)localObject1).c();
if ((localObject1 != null) && ("application/json".equals(((bfc)localObject1).b))) {
break;
}
i = -3;
}
}
catch (TimeoutException localTimeoutException)
{
for (;;)
{
i = -2;
continue;
Object localObject2 = localTimeoutException.a();
if (localObject2 == null) {
i = -3;
} else {
try
{
JSONArray localJSONArray = new org/json/JSONArray;
localJSONArray.<init>((String)localObject2);
ArrayList localArrayList = new java/util/ArrayList;
localArrayList.<init>();
int j = localJSONArray.length();
for (i = 0; i < j; i++)
{
JSONObject localJSONObject = localJSONArray.getJSONObject(i);
localObject2 = new bdb;
((bdb)localObject2).<init>(localJSONObject.getString("timezone"), localJSONObject.getString("display_string"), localJSONObject.getInt("offset"));
localArrayList.add(localObject2);
}
this.a = localArrayList;
i = 0;
}
catch (JSONException localJSONException)
{
i = -3;
}
}
}
}
catch (IOException localIOException)
{
for (;;) {}
}
}
}
/* Location: C:\DEV\android\dex2jar-2.1-SNAPSHOT\classes-dex2jar.jar!\bdt.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"v.richomme@gmail.com"
] |
v.richomme@gmail.com
|
7d2cf91afb2674ab859e5abb3d2c54bc416cb88f
|
d2be28203a59003372810b09939deba5c91927f0
|
/worker1/src/main/java/com/hframe/hamster/node/task/statistics/SelectTask.java
|
d6951b1bf717429b1e15d23130b510461758cdaa
|
[
"Apache-2.0"
] |
permissive
|
taiziwang/hamster
|
c3532a1ca2b6c72ce500ded31589206d161d5fd2
|
5f20159d0811d89f96e14cbed475a6e6bceb3e34
|
refs/heads/master
| 2023-03-16T12:26:53.131139
| 2019-09-02T09:25:50
| 2019-09-02T09:25:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,012
|
java
|
package com.hframe.hamster.node.task.statistics;
import com.hframe.ext.bean.CanalConfig;
import com.hframe.ext.service.CfgStatisticsService;
import com.hframe.hamster.node.HamsterContextInitializer;
import com.hframe.hamster.node.monitor.bean.FlowKey;
import com.hframe.hamster.node.monitor.bean.PrototypeKey;
import com.hframe.hamster.node.task.AbstractSelectTask;
import com.hframe.hamster.node.task.common.FlowTask;
/**
* Created by zhangquanhong on 2016/9/28.
*/
public class SelectTask extends AbstractSelectTask{
public SelectTask(FlowKey flowKey, PrototypeKey prototypeKey) {
super(flowKey, prototypeKey);
}
@Override
public CanalConfig getCanalConfig(FlowKey flowKey, PrototypeKey prototypeKey) throws Exception {
return HamsterContextInitializer.getBean(
CfgStatisticsService.class).getCanalConfig(Long.valueOf(prototypeKey.value()));
}
@Override
public Class<? extends FlowTask> nextTask() {
return ExtractTask.class;
}
}
|
[
"you@example.com"
] |
you@example.com
|
ab4917625d32af5adf39fbd294044443c875d988
|
edd83fe036eb4b47fff7b8df74edb339f625d7dd
|
/src/frameworks/apache-camel/apache-camel-commercial/src/main/java/com/manhpd/apachecamelcommercial/model/Product.java
|
fe5080eb46f57890cc1425fb35404300f560afa8
|
[] |
no_license
|
DucManhPhan/J2EE
|
1a7cb661f739bf577a4271f86e3af3baad196c3c
|
2e3636d126b5e82971627b49696beb93726d8472
|
refs/heads/master
| 2023-04-15T00:15:02.218224
| 2023-04-10T16:10:15
| 2023-04-10T16:10:15
| 171,880,152
| 3
| 5
| null | 2022-11-24T05:51:47
| 2019-02-21T13:49:34
|
Java
|
UTF-8
|
Java
| false
| false
| 226
|
java
|
package com.manhpd.apachecamelcommercial.model;
import lombok.AllArgsConstructor;
import lombok.Data;
@AllArgsConstructor
@Data
public class Product {
private String productName;
private String productCategory;
}
|
[
"ducmanhphan93@gmail.com"
] |
ducmanhphan93@gmail.com
|
d193ffdf808d203457ed3f524cf7563d2289e16c
|
b863479f00471986561c57291edb483fc5f4532c
|
/src/main/java/example/DataAnalysis.java
|
1ed38c3c51ab912fe5041b4e9fd2b84b82475486
|
[] |
permissive
|
bdezonia/zorbage
|
6da6cbdc8f9fcb6cde89d39aca9687e2eee08c9b
|
651625e60b7d6ca9273ffc1a282b6a8af5c2d925
|
refs/heads/master
| 2023-09-01T08:32:59.157936
| 2023-08-08T00:57:18
| 2023-08-08T00:57:18
| 74,696,586
| 11
| 0
|
BSD-2-Clause
| 2020-11-09T03:01:42
| 2016-11-24T18:24:55
|
Java
|
UTF-8
|
Java
| false
| false
| 6,204
|
java
|
/*
* Zorbage: an algebraic data hierarchy for use in numeric processing.
*
* Copyright (c) 2016-2022 Barry DeZonia 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 <copyright holder> 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 <COPYRIGHT HOLDER> 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 example;
import nom.bdezonia.zorbage.algebra.G;
import nom.bdezonia.zorbage.algorithm.ApproxStdDev;
import nom.bdezonia.zorbage.algorithm.ApproxVariance;
import nom.bdezonia.zorbage.algorithm.Mean;
import nom.bdezonia.zorbage.algorithm.StdDev;
import nom.bdezonia.zorbage.algorithm.Sum;
import nom.bdezonia.zorbage.algorithm.Variance;
import nom.bdezonia.zorbage.datasource.IndexedDataSource;
import nom.bdezonia.zorbage.datasource.ReadOnlyHighPrecisionDataSource;
import nom.bdezonia.zorbage.type.integer.int32.UnsignedInt32Algebra;
import nom.bdezonia.zorbage.type.integer.int32.UnsignedInt32Member;
import nom.bdezonia.zorbage.type.real.float64.Float64Member;
import nom.bdezonia.zorbage.type.real.highprec.HighPrecisionAlgebra;
import nom.bdezonia.zorbage.type.real.highprec.HighPrecisionMember;
/**
* @author Barry DeZonia
*/
class DataAnalysis {
// Zorbage has a few nice wrinkles for accurately calculating numbers from data.
// When you are summing a lot of numbers most programs are susceptible to overflow.
// However Zorbage can work around limitations like these.
void example1() {
IndexedDataSource<UnsignedInt32Member> uints =
nom.bdezonia.zorbage.storage.Storage.allocate(G.UINT32.construct(), Integer.MAX_VALUE);
// elsewhere: fill the list with values
// now sum all the numbers in the list
UnsignedInt32Member sum = G.UINT32.construct();
Sum.compute(G.UINT32, uints, sum); // sum may have overflowed
// so this is how we avoid overflow if we're worried about it
HighPrecisionMember sum2 = G.HP.construct();
ReadOnlyHighPrecisionDataSource<UnsignedInt32Algebra,UnsignedInt32Member> filteredData =
new ReadOnlyHighPrecisionDataSource<>(G.UINT32, uints);
Sum.compute(G.HP, filteredData, sum2); // sum2 cannot overflow
}
// Zorbage can also avoid roundoff errors, especially when using large amounts of data
void example2() {
HighPrecisionAlgebra.setPrecision(150);
IndexedDataSource<UnsignedInt32Member> uints =
nom.bdezonia.zorbage.storage.Storage.allocate(G.UINT32.construct(), Integer.MAX_VALUE);
// elsewhere: fill the list with values
// now sum all the numbers in the list avoiding overflow and rounding errors
HighPrecisionMember sum = G.HP.construct();
ReadOnlyHighPrecisionDataSource<UnsignedInt32Algebra,UnsignedInt32Member> filteredData =
new ReadOnlyHighPrecisionDataSource<>(G.UINT32, uints);
Sum.compute(G.HP, filteredData, sum); // sum cannot have lost precision within 150 places
}
// This approach also makes sure means, variances, and stddevs are perfectly accurate
void example3() {
HighPrecisionAlgebra.setPrecision(150);
IndexedDataSource<UnsignedInt32Member> uints =
nom.bdezonia.zorbage.storage.Storage.allocate(G.UINT32.construct(), Integer.MAX_VALUE);
// elsewhere: fill the list with values
// now sum all the numbers in the list avoiding overflow and rounding errors
HighPrecisionMember mean = G.HP.construct();
HighPrecisionMember variance = G.HP.construct();
HighPrecisionMember stddev = G.HP.construct();
ReadOnlyHighPrecisionDataSource<UnsignedInt32Algebra,UnsignedInt32Member> filteredData =
new ReadOnlyHighPrecisionDataSource<>(G.UINT32, uints);
Mean.compute(G.HP, filteredData, mean); // accurate to 150 decimal places
Variance.compute(G.HP, filteredData, variance); // accurate to 150 decimal places
StdDev.compute(G.HP, filteredData, stddev); // accurate to 150 decimal places
}
// The exact calculations use naive mathematically correct implementations. When using the
// high precision infrastructure you get accurate results. This comes at a cost of increased
// processing time. If you need to trade off accuracy for speed you can use the approximate
// algorithms. They guard against overflow and roundoff errors but their results are as a
// consequence less precise. In fact some values simply cannot be calculated using these
// methods (for instance doing math with numbers that approach max float values etc.).
void example4() {
IndexedDataSource<Float64Member> data =
nom.bdezonia.zorbage.storage.Storage.allocate(G.DBL.construct(), 1000000);
// elsewhere fill list with data
// now calc approximate results
Float64Member variance = G.DBL.construct();
Float64Member stddev = G.DBL.construct();
ApproxVariance.compute(G.DBL, data, variance); // close to correct. faster than exact.
ApproxStdDev.compute(G.DBL, data, stddev); // close to correct. faster than exact.
}
}
|
[
"bdezonia@gmail.com"
] |
bdezonia@gmail.com
|
ebc6abd08ac8858316b7681dcbb7ab4224a46b38
|
b9c6b0c5a34d55ffe9e43e2a1275b09b3b1ed9d8
|
/src-gen/main/java/net/opengis/gml/ScalarValuePropertyType.java
|
7ad46470a8a1e047bcd6924d2d57997c64000f4c
|
[
"LGPL-3.0-only",
"Apache-2.0"
] |
permissive
|
nls-jajuko/citygml4j
|
c0d2051218ab9eca97915668901cd7435d4aefc3
|
ebbd22846e4ab36140b72fe76500af2cc9901b9e
|
refs/heads/master
| 2021-11-19T16:00:00.899899
| 2021-09-25T15:52:28
| 2021-09-25T15:52:28
| 235,549,623
| 0
| 0
|
Apache-2.0
| 2020-01-22T10:28:25
| 2020-01-22T10:28:24
| null |
UTF-8
|
Java
| false
| false
| 1,310
|
java
|
//
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2 generiert
// Siehe <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Änderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
// Generiert: 2019.02.03 um 11:14:53 PM CET
//
package net.opengis.gml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* Property whose content is a scalar value.
*
* <p>Java-Klasse für ScalarValuePropertyType complex type.
*
* <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
*
* <pre>
* <complexType name="ScalarValuePropertyType">
* <complexContent>
* <restriction base="{http://www.opengis.net/gml}ValuePropertyType">
* <sequence minOccurs="0">
* <group ref="{http://www.opengis.net/gml}ScalarValue"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ScalarValuePropertyType")
public class ScalarValuePropertyType
extends ValuePropertyType
{
}
|
[
"cnagel@virtualcitysystems.de"
] |
cnagel@virtualcitysystems.de
|
7bcc51626b286347b67afbbe1c1f70ec14e0bc84
|
07881ea03a7a3adc8bc07f36250198d77d35d429
|
/L28-springDataJdbc/src/main/java/ru/otus/crm/repository/ManagerResultSetExtractorClass.java
|
c1f438af760ddb18006e1a9b0792d48911c5b19c
|
[] |
no_license
|
petrelevich/otus_java_2020_12
|
7d341a8ddc532cc2f0667977b7dd61ff1f7b6a07
|
0b6508d8c0c7818ac8f5ef874f02ecc8aa2d0217
|
refs/heads/main
| 2023-05-01T15:19:41.954507
| 2021-05-27T21:15:16
| 2021-05-27T21:15:16
| 323,437,714
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,186
|
java
|
package ru.otus.crm.repository;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;
import ru.otus.crm.model.Client;
import ru.otus.crm.model.Manager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class ManagerResultSetExtractorClass implements ResultSetExtractor<List<Manager>> {
@Override
public List<Manager> extractData(ResultSet rs) throws SQLException, DataAccessException {
var managerList = new ArrayList<Manager>();
Set<Client> clients = new HashSet<>();
while (rs.next()) {
clients.add(new Client(rs.getLong("client_id"), rs.getString("client_name"), rs.getString("client_manager_id")));
var newManagerId = rs.getString("new_manager_id");
if (newManagerId != null) {
var manager = new Manager(rs.getString("manager_id"), rs.getString("manager_label"), clients, false);
managerList.add(manager);
clients = new HashSet<>();
}
}
return managerList;
}
}
|
[
"petrelevich@yandex.ru"
] |
petrelevich@yandex.ru
|
b8ee8ada9cd307f253555471f5f68e81c29ad77d
|
f72971fbab14458776400d240216442d8a46cbe1
|
/modules/common/src/main/java/wsimport/lib/amadeus/airfliforq/OperationTimeTimeType.java
|
a75c278742d6b977f87cc2fb40576e81d374c27e
|
[] |
no_license
|
hamzzy/Amadeus-Sabre-Java-Multi-GDS-SDK
|
cea5ee9f3be520bfbf509d5207adcc7c0f4ec4b8
|
a21e706c17b85d99e1ef573f66c88efa9e2918fe
|
refs/heads/master
| 2022-11-05T16:49:24.067050
| 2020-06-28T03:59:13
| 2020-06-28T03:59:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,385
|
java
|
package wsimport.lib.amadeus.airfliforq;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for OperationTimeTimeType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="OperationTimeTimeType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Actual"/>
* <enumeration value="Scheduled"/>
* <enumeration value="Estimated"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "OperationTimeTimeType")
@XmlEnum
public enum OperationTimeTimeType {
@XmlEnumValue("Actual")
ACTUAL("Actual"),
@XmlEnumValue("Scheduled")
SCHEDULED("Scheduled"),
@XmlEnumValue("Estimated")
ESTIMATED("Estimated");
private final String value;
OperationTimeTimeType(String v) {
value = v;
}
public String value() {
return value;
}
public static OperationTimeTimeType fromValue(String v) {
for (OperationTimeTimeType c: OperationTimeTimeType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"info@brakket.tech"
] |
info@brakket.tech
|
584b997ce43fb182d5597a7e7e5673ffb94eef4f
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/4/4_b40720d986333aa6697117eaa4b20476e193d749/JsonImportTest/4_b40720d986333aa6697117eaa4b20476e193d749_JsonImportTest_t.java
|
15cf5bb6d1142fe2a64cafddf684891590ae6954
|
[] |
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
| 998
|
java
|
package net.ishchenko.omfp.pdf;
import org.junit.Test;
import java.io.IOException;
import java.io.InputStream;
import static org.junit.Assert.assertEquals;
/**
* Created by IntelliJ IDEA.
* User: Max
* Date: 05.05.2010
* Time: 22:24:30
*/
public class JsonImportTest {
@Test
public void testJsonImport() throws IOException, InvalidConfigurationException {
InputStream input = SettingsBuilderTest.class.getResourceAsStream("/new.stylesheet.json");
PdfSettings settings = new PdfSettings.Builder(input, PdfSettings.Builder.StyleType.FB2PDF).build();
assertEquals(111.11f, settings.getPageWidth(), .001);
assertEquals(222.22f, settings.getPageHeight(), .001);
assertEquals(13f, settings.getSize(), .001);
assertEquals(13f * .777f, settings.getSizeSmall(), .001);
assertEquals(13f * .555f, settings.getSizeVerysmall(), .001);
assertEquals(3.14f, settings.getMargin(), .001);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.