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
a27cb9c8609f534c631c298b637e0e6b3d7a9a41
09ef2687ffeeca6aeef6f515272ddd5d23e4c980
/src/main/java/zh/learn/java/ch01inroduction/exercises/PrintTable.java
9adc6a73bb91621c73cf4438dbe26a92b589da2f
[]
no_license
dzheleznyakov/Learning-Java
c4d9a972ebb43b759aaeefd339567b475260fcef
ce7fa558eb056ea9d6914d3dfd472c95c9fc85c3
refs/heads/master
2022-08-15T00:10:25.501464
2022-08-04T06:31:02
2022-08-04T06:31:02
226,674,344
0
0
null
2020-10-13T18:58:38
2019-12-08T13:46:07
Java
UTF-8
Java
false
false
433
java
// chapter 01 exercise 1.4 package zh.learn.java.ch01inroduction.exercises; public class PrintTable { public static void main(String[] args) { System.out.println("a a^2 a^3 a^4"); System.out.println("1 1 1 1"); System.out.println("2 4 8 16"); System.out.println("3 9 27 81"); System.out.println("4 16 64 256"); } }
[ "zheleznyakov.dmitry@gmail.com" ]
zheleznyakov.dmitry@gmail.com
4c1a59545f885d657ba1ae9e66125c2f82dbf5b2
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2015/12/MessageProcessingCallback.java
237a389c879e7df20106fc31846853cab9c8c55e
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
3,873
java
/* * Copyright (c) 2002-2015 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.bolt.v1.messaging.msgprocess; import java.io.IOException; import java.util.Collections; import java.util.Map; import org.neo4j.logging.Log; import org.neo4j.bolt.v1.messaging.MessageHandler; import org.neo4j.bolt.v1.runtime.Session; import org.neo4j.bolt.v1.runtime.internal.Neo4jError; public class MessageProcessingCallback<T> extends Session.Callback.Adapter<T,Void> { // TODO: move this somewhere more sane (when modules are unified) public static void publishError( MessageHandler<IOException> out, Neo4jError error ) throws IOException { if ( error.status().code().classification().publishable() ) { // If publishable, we forward the message as-is to the user. out.handleFailureMessage( error.status(), error.message() ); } else { // If not publishable, we only return an error reference to the user. This must // be cross-referenced with the log files for full error detail. This feature // exists to improve security so that sensitive information is not leaked. out.handleFailureMessage( error.status(), String.format( "An unexpected failure occurred, see details in the database " + "logs, reference number %s.", error.reference() ) ); } } protected final Log log; protected MessageHandler<IOException> out; private Neo4jError error; private Runnable onCompleted; private boolean ignored; public MessageProcessingCallback( Log logger ) { this.log = logger; } public MessageProcessingCallback reset( MessageHandler<IOException> out, Runnable onCompleted ) { this.out = out; this.onCompleted = onCompleted; clearState(); return this; } @Override public void failure( Neo4jError err, Void none ) { this.error = err; } @Override public void ignored( Void none ) { this.ignored = true; } @Override public void completed( Void none ) { try { if ( ignored ) { out.handleIgnoredMessage(); } else if ( error != null ) { publishError( out, error ); } else { out.handleSuccessMessage( successMetadata() ); } } catch ( Throwable e ) { // TODO: we've lost the ability to communicate with the client. Shut down the session, close transactions. log.error( "Failed to write response to driver", e ); } finally { onCompleted.run(); clearState(); } } /** Allow sub-classes to override this to provide custom metadata */ protected Map<String,Object> successMetadata() { return Collections.emptyMap(); } protected void clearState() { error = null; ignored = false; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
cfa16a9ad3696bfd146d2db419db748f41a84ab0
ec79e7da1321e7b4b83364d45dc692836bd70c2e
/src/main/java/soot/block/overrides/BlockMixerImproved.java
289ee2a32d0f3db36f608f2314ea7beebd337179
[ "MIT" ]
permissive
Aemande123/Soot
6f0337659c141b67e2dbf07b7900a9c3ea135b94
7f1bcd2bb6e4169006f14b9704447a8ac4ae417a
refs/heads/master
2020-03-30T04:17:34.873599
2018-09-28T12:22:21
2018-09-28T12:22:21
139,576,712
0
0
MIT
2018-07-03T11:58:06
2018-07-03T11:58:05
null
UTF-8
Java
false
false
1,964
java
package soot.block.overrides; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import soot.tile.overrides.TileEntityMixerBottomImproved; import soot.util.EmberUtil; import soot.util.IMigrateable; import soot.util.MigrationUtil; import teamroots.embers.RegistryManager; import teamroots.embers.block.BlockMixer; import teamroots.embers.item.ItemTinkerHammer; import teamroots.embers.tileentity.TileEntityMixerTop; import javax.annotation.Nullable; public class BlockMixerImproved extends BlockMixer implements IMigrateable { public BlockMixerImproved(Material material, String name, boolean addToTab) { super(material, name, addToTab); EmberUtil.overrideRegistryLocation(this,name); } @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float x, float y, float z) { ItemStack heldItem = player.getHeldItem(hand); if (heldItem.getItem() instanceof ItemTinkerHammer && state.getBlock() == this){ MigrationUtil.migrateBlock(world,pos); return true; } return super.onBlockActivated(world, pos, state, player, hand, facing, x, y, z); } @Nullable @Override public TileEntity createNewTileEntity(World worldIn, int meta) { if(meta == 1) return new TileEntityMixerTop(); else return new TileEntityMixerBottomImproved(); } @Override public IBlockState getReplacementState(IBlockState state) { return RegistryManager.mixer.getDefaultState().withProperty(isTop,state.getValue(isTop)); } }
[ "bordlistian@hotmail.de" ]
bordlistian@hotmail.de
0bb92ead0c861c2f69557c08347ff30401b80c1e
ec3ee5557e2120e9046f61a81b9d828e63f24c88
/frostmourne-monitor/src/main/java/com/autohome/frostmourne/monitor/dao/mybatis/frostmourne/mapper/dynamic/RecipientDynamicSqlSupport.java
7610273fff816865217f3644551ab87436eee5ea
[ "MIT" ]
permissive
xyzj91/frostmourne-1
34d9f4a1b12ca471a4b40aeb309dfefefa3bfd77
d66da4e0a6c17b7e0eee910c2c3950a0ef0c6b79
refs/heads/master
2022-11-19T08:07:09.781357
2020-07-16T16:21:23
2020-07-16T16:21:23
280,370,796
1
0
MIT
2020-07-17T08:31:12
2020-07-17T08:31:11
null
UTF-8
Java
false
false
2,299
java
package com.autohome.frostmourne.monitor.dao.mybatis.frostmourne.mapper.dynamic; import java.sql.JDBCType; import java.util.Date; import javax.annotation.Generated; import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final class RecipientDynamicSqlSupport { @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2020-07-11T14:44:51.801+08:00", comments="Source Table: recipient") public static final Recipient recipient = new Recipient(); @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2020-07-11T14:44:51.801+08:00", comments="Source field: recipient.id") public static final SqlColumn<Long> id = recipient.id; @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2020-07-11T14:44:51.801+08:00", comments="Source field: recipient.alarm_id") public static final SqlColumn<Long> alarm_id = recipient.alarm_id; @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2020-07-11T14:44:51.801+08:00", comments="Source field: recipient.alert_id") public static final SqlColumn<Long> alert_id = recipient.alert_id; @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2020-07-11T14:44:51.801+08:00", comments="Source field: recipient.account") public static final SqlColumn<String> account = recipient.account; @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2020-07-11T14:44:51.801+08:00", comments="Source field: recipient.create_at") public static final SqlColumn<Date> create_at = recipient.create_at; @Generated(value="org.mybatis.generator.api.MyBatisGenerator", date="2020-07-11T14:44:51.801+08:00", comments="Source Table: recipient") public static final class Recipient extends SqlTable { public final SqlColumn<Long> id = column("id", JDBCType.BIGINT); public final SqlColumn<Long> alarm_id = column("alarm_id", JDBCType.BIGINT); public final SqlColumn<Long> alert_id = column("alert_id", JDBCType.BIGINT); public final SqlColumn<String> account = column("account", JDBCType.VARCHAR); public final SqlColumn<Date> create_at = column("create_at", JDBCType.TIMESTAMP); public Recipient() { super("recipient"); } } }
[ "kechangqing@autohome.com.cn" ]
kechangqing@autohome.com.cn
c92ad14fc1185e090a5a84fa3b19b77b66f32882
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_88d681204b8fdb8aa10813dd393b532df9401d3b/TextComponentOperator/8_88d681204b8fdb8aa10813dd393b532df9401d3b_TextComponentOperator_t.java
e1d69f2b62b69b9fd88732e3f2c5156015ded5f0
[]
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,459
java
/* * Copyright 2008 Nokia Siemens Networks Oyj * * 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.robotframework.swing.textcomponent; import org.netbeans.jemmy.ComponentChooser; import org.netbeans.jemmy.operators.ContainerOperator; import org.netbeans.jemmy.operators.JTextComponentOperator; import org.robotframework.swing.operator.ComponentWrapper; public class TextComponentOperator extends JTextComponentOperator implements ComponentWrapper { public TextComponentOperator(ContainerOperator container, int index) { super(container, index); } public TextComponentOperator(ContainerOperator container, ComponentChooser chooser) { super(container, chooser); } /* * We want to let the application do whatever it wants with the inputs the textfield receives. */ @Override public boolean getVerification() { return false; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a4732979a7ad34cb9cd07377809bab758af047fd
8f87065bc3cb6d96ea2e398a98aacda4fc4bbe43
/src/Class00000400Better.java
b51ae81010ab2efd705fc000445cf06eb6b22a0e
[]
no_license
fracz/code-quality-benchmark
a243d345441582473532f9b013993f77d59e19ae
c23e76fe315f43bea899beabb856e61348c34e09
refs/heads/master
2020-04-08T23:40:36.408828
2019-07-31T17:54:53
2019-07-31T17:54:53
159,835,188
0
0
null
null
null
null
UTF-8
Java
false
false
296
java
// original filename: 00028270.txt // after public class Class00000400Better { @Override public WebSocketConnectOptions setPort(int port) { Arguments.requireInRange(port, 1, 65535, "port p must be in range 1 <= p <= 65535"); this.port = port; return this; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
ed14a36c127033bc806a5c1320f3afaeb9beeac4
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/flink/2015/4/SimpleCommunityDetectionData.java
20b562b5e0740d9e228179d2fb2c140227c68504
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
2,585
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.graph.example.utils; import org.apache.flink.api.java.DataSet; import org.apache.flink.api.java.ExecutionEnvironment; import org.apache.flink.graph.Edge; import java.util.ArrayList; import java.util.List; /** * Provides the default data set used for the Simple Community Detection example program. * If no parameters are given to the program, the default edge data set is used. */ public class SimpleCommunityDetectionData { // the algorithm is not guaranteed to always converge public static final Integer MAX_ITERATIONS = 30; public static final double DELTA = 0.5f; public static DataSet<Edge<Long, Double>> getDefaultEdgeDataSet(ExecutionEnvironment env) { List<Edge<Long, Double>> edges = new ArrayList<Edge<Long, Double>>(); edges.add(new Edge<Long, Double>(1L, 2L, 1.0)); edges.add(new Edge<Long, Double>(1L, 3L, 2.0)); edges.add(new Edge<Long, Double>(1L, 4L, 3.0)); edges.add(new Edge<Long, Double>(2L, 3L, 4.0)); edges.add(new Edge<Long, Double>(2L, 4L, 5.0)); edges.add(new Edge<Long, Double>(3L, 5L, 6.0)); edges.add(new Edge<Long, Double>(5L, 6L, 7.0)); edges.add(new Edge<Long, Double>(5L, 7L, 8.0)); edges.add(new Edge<Long, Double>(6L, 7L, 9.0)); edges.add(new Edge<Long, Double>(7L, 12L, 10.0)); edges.add(new Edge<Long, Double>(8L, 9L, 11.0)); edges.add(new Edge<Long, Double>(8L, 10L, 12.0)); edges.add(new Edge<Long, Double>(8L, 11L, 13.0)); edges.add(new Edge<Long, Double>(9L, 10L, 14.0)); edges.add(new Edge<Long, Double>(9L, 11L, 15.0)); edges.add(new Edge<Long, Double>(10L, 11L, 16.0)); edges.add(new Edge<Long, Double>(10L, 12L, 17.0)); edges.add(new Edge<Long, Double>(11L, 12L, 18.0)); return env.fromCollection(edges); } private SimpleCommunityDetectionData() {} }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
e5f4f525d20f19bdc54a2816a0cdf57fb81a2314
c47d4038f4b30ce6ea2ef25609686ea438b6d11f
/src/main/java/study/dfs/ActualProblem4.java
08e47e2e00d228d6fe4cdb6f3bb6c90d69065e45
[]
no_license
Rok93/codingtest-example
b93ed2b1683e4187aece21cb3499128585501b3e
729c425a7cfacb83f8ad6a0981a77670ab1617d6
refs/heads/master
2021-08-22T04:05:04.225362
2021-07-13T09:49:20
2021-07-13T09:49:20
232,443,346
0
0
null
null
null
null
UTF-8
Java
false
false
1,675
java
package study.dfs; //괄호 변환 public class ActualProblem4 { public String solution(String p) { if (isCorrect(p)) { // 올바른 괄호문자열! return p; } return editWord(p); } private boolean isCorrect(String s) { int repetitionNumber = s.length() / 2; String copiedP = s; for (int i = 0; i < repetitionNumber; i++) { copiedP = copiedP.replaceAll("\\(\\)", ""); } return copiedP.isEmpty(); } private String editWord(String p) { if (p.isEmpty()) { return p; } int findIndex = findUIndex(p); String u = p.substring(0, findIndex + 1); String v = p.substring(findIndex + 1); if (isCorrect(u)) { return u + editWord(v); } return "(" + editWord(v) + ")" + turnString(u.substring(1, u.length() - 1)); } private String turnString(String s) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == '(') { sb.append(")"); continue; } sb.append("("); } return sb.toString(); } private int findUIndex(String p) { int leftCnt = 0; int rightCnt = 0; int i = 0; while (true) { char c = p.charAt(i); if (c == '(') { leftCnt++; } if (c == ')') { rightCnt++; } if (leftCnt == rightCnt) { break; } i++; } return i; } }
[ "goodboy3421@gmail.com" ]
goodboy3421@gmail.com
1eb309867ee77c29f34fafa3fc51c61511832934
e4c8f47b59e3025d66089d8606db5d4311975b7f
/app/src/main/java/com/taran/instagram/MainActivity.java
0d61fad599e0824f4dedaded6f160a6cdffdcb45
[]
no_license
fatemehtaran/Instagram
673995e5d6107f6a941aac1707fb593d91a1ab56
db79b9d28d139ea05fd4ed2341dcd02c75950a76
refs/heads/master
2023-01-19T02:36:22.732739
2020-11-28T20:04:26
2020-11-28T20:04:26
316,812,599
0
0
null
null
null
null
UTF-8
Java
false
false
1,069
java
package com.taran.instagram; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends AppCompatActivity implements View.OnClickListener { private EditText edtUserNameL , edtPasswordL; private Button btnLogInL , btnSignUpL; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setTitle("log in"); btnSignUpL = findViewById(R.id.btnSignUpL); btnLogInL = findViewById(R.id.btnLogInL); edtUserNameL = findViewById(R.id.edtUserNameL); edtPasswordL = findViewById(R.id.edtPasswordL); // btnLogInL.setOnClickListener(this); btnSignUpL.setOnClickListener(this); } @Override public void onClick(View view) { Intent intent = new Intent(MainActivity.this,SignUp.class); startActivity(intent); } }
[ "you@example.com" ]
you@example.com
63237825382bd507b936491a45f747e862b5634e
6d75d4faed98defc08e9ac9cd2cb47b79daa77cd
/achieve-parent/achieve-summary/src/main/java/com/wei/designmodel/construction/proxy/dynamicproxy/cglibproxy/CGlibMeipo.java
eaeb3d00914875c3d7081677dfb4af52e91fa453
[]
no_license
xingxingtx/common-parent
e37763444332ddb2fbca4254a9012226ab48ed76
a6b26cf88fc94943881b6cba2aecaf2b19a93755
refs/heads/main
2023-06-16T20:23:45.412285
2021-07-14T12:04:07
2021-07-14T12:04:07
352,091,214
1
0
null
null
null
null
UTF-8
Java
false
false
1,154
java
package com.wei.designmodel.construction.proxy.dynamicproxy.cglibproxy; import org.springframework.cglib.proxy.Enhancer; import org.springframework.cglib.proxy.MethodInterceptor; import org.springframework.cglib.proxy.MethodProxy; import java.lang.reflect.Method; /** * @Author wei.peng on 2019/3/11. */ public class CGlibMeipo implements MethodInterceptor { public Object getInstance(Class<?> clazz) throws Exception{ //相当于Proxy,代理的工具类 Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(clazz); enhancer.setCallback(this); return enhancer.create(); } @Override public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable { before(); Object obj = methodProxy.invokeSuper(o,objects); after(); return obj; } private void before(){ System.out.println("我是媒婆,我要给你找对象,现在已经确认你的需求"); System.out.println("开始物色"); } private void after(){ System.out.println("OK的话,准备办事"); } }
[ "982084398@qq.com" ]
982084398@qq.com
9b9220bce994c20dd522890ba99938163a06960c
8fa221482da055f4c8105b590617a27595826cc3
/sources/net/gogame/gopay/sdk/support/C1030q.java
de04676d24bac97c28936072e1f0a530de2b985b
[]
no_license
TehVenomm/sauceCodeProject
4ed2f12393e67508986aded101fa2db772bd5c6b
0b4e49a98d14b99e7d144a20e4c9ead408694d78
refs/heads/master
2023-03-15T16:36:41.544529
2018-10-08T03:44:58
2018-10-08T03:44:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
210
java
package net.gogame.gopay.sdk.support; import android.graphics.Bitmap; /* renamed from: net.gogame.gopay.sdk.support.q */ public interface C1030q { /* renamed from: a */ void mo4403a(Bitmap bitmap); }
[ "gabrielbrazs@gmail.com" ]
gabrielbrazs@gmail.com
8cd3596c116d427203ec53477e4421d117a0cf80
953bb078a907c516394dc2c1f4fe1fdd98392f7c
/qxcmp-core/src/main/java/com/qxcmp/web/view/modules/table/AbstractTableCell.java
41329190ecd556912dadd14ab0365f850c4c537d
[ "MIT" ]
permissive
guoyu07/qxcmp-framework
97625017c0eadad66418b3be0e34b1ba2f098d61
e53ef2fc24f1faa166d086d735ff808bd063eddb
refs/heads/master
2020-03-18T13:32:34.473937
2018-03-30T08:51:01
2018-03-30T08:51:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,711
java
package com.qxcmp.web.view.modules.table; import com.google.common.collect.Lists; import com.qxcmp.web.view.Component; import com.qxcmp.web.view.support.Alignment; import com.qxcmp.web.view.support.VerticalAlignment; import com.qxcmp.web.view.support.Wide; import lombok.Getter; import lombok.Setter; import java.util.Collection; import java.util.List; /** * 数据表格单元格抽象类 * * @author Aaric */ @Getter @Setter public abstract class AbstractTableCell extends AbstractTableComponent { /** * 单元格内容 */ private List<Component> components = Lists.newArrayList(); /** * 单元格文本 * <p> * 当单元格未设置内容时,将使用单元格文本作为内容填充 */ private String content; /** * 行跨度 */ private int rowSpan; /** * 列跨度 */ private int colSpan; /** * 是否为正确状态 */ private boolean positive; /** * 是否为不正确状态 */ private boolean negative; /** * 是否为错误状态 */ private boolean error; /** * 是否为警告状态 */ private boolean warning; /** * 是否为激活状态 */ private boolean active; /** * 是否为禁用状态 */ private boolean disabled; /** * 是否为崩塌 * <p> * 该属性会让单元格只占用实际宽度 */ private boolean collapsing; /** * 对齐方式 */ private Alignment alignment = Alignment.NONE; /** * 垂直对齐方式 */ private VerticalAlignment verticalAlignment = VerticalAlignment.NONE; /** * 是否为可选择 * <p> * 在鼠标悬浮的时候高亮显示 * <p> * 如果使用 a 超链接作为单元格内容,则会让整个单元格都可点击 */ private boolean selectable; /** * 单元格宽度 */ private Wide wide = Wide.NONE; public AbstractTableCell() { } public AbstractTableCell(String content) { this.content = content; } public AbstractTableCell(Component component) { this.components.add(component); } public AbstractTableCell addComponent(Component component) { this.components.add(component); return this; } public AbstractTableCell addComponents(Collection<? extends Component> components) { this.components.addAll(components); return this; } @Override public String getClassContent() { final StringBuilder stringBuilder = new StringBuilder(); if (positive) { stringBuilder.append(" positive"); } if (negative) { stringBuilder.append(" negative"); } if (error) { stringBuilder.append(" error"); } if (warning) { stringBuilder.append(" warning"); } if (active) { stringBuilder.append(" active"); } if (disabled) { stringBuilder.append(" disabled"); } if (collapsing) { stringBuilder.append(" collapsing"); } if (selectable) { stringBuilder.append(" selectable"); } return stringBuilder.append(alignment).append(verticalAlignment).append(wide).toString(); } public AbstractTableCell setRowSpan(int rowSpan) { this.rowSpan = rowSpan; return this; } public AbstractTableCell setColSpan(int colSpan) { this.colSpan = colSpan; return this; } public AbstractTableCell setPositive() { setPositive(true); return this; } public AbstractTableCell setNegative() { setNegative(true); return this; } public AbstractTableCell setError() { setError(true); return this; } public AbstractTableCell setWarning() { setWarning(true); return this; } public AbstractTableCell setActive() { setActive(true); return this; } public AbstractTableCell setDisabled() { setDisabled(true); return this; } public AbstractTableCell setCollapsing() { setCollapsing(true); return this; } public AbstractTableCell setSelectable() { setSelectable(true); return this; } public AbstractTableCell setAlignment(Alignment alignment) { this.alignment = alignment; return this; } public AbstractTableCell setVerticalAlignment(VerticalAlignment verticalAlignment) { this.verticalAlignment = verticalAlignment; return this; } }
[ "aaricchen@foxmail.com" ]
aaricchen@foxmail.com
fb743380bb4872b52028627b7674c11c5bc3c658
01d6b951ce24b3d2c89b1ffa18fd79aaa9c4599c
/src/android/support/v4/c/h.java
670cfdfbd1fcb5c5f5df72d735fdfd973ad3554f
[]
no_license
mohsenuss91/KGBANDROID
1a5cc246bf17b85dae4733c10a48cc2c34f978fd
a2906e3de617b66c5927a4d1fd85f6a3c6ed89d0
refs/heads/master
2016-09-03T06:45:38.912322
2015-03-08T12:03:35
2015-03-08T12:03:35
31,847,141
0
0
null
null
null
null
UTF-8
Java
false
false
3,171
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 android.support.v4.c; import java.util.Collection; import java.util.Iterator; import java.util.Set; // Referenced classes of package android.support.v4.c: // f, c, j final class h implements Set { final f a; h(f f1) { a = f1; super(); } public final boolean add(Object obj) { throw new UnsupportedOperationException(); } public final boolean addAll(Collection collection) { int i = a.a(); java.util.Map.Entry entry; for (Iterator iterator1 = collection.iterator(); iterator1.hasNext(); a.a(entry.getKey(), entry.getValue())) { entry = (java.util.Map.Entry)iterator1.next(); } return i != a.a(); } public final void clear() { a.c(); } public final boolean contains(Object obj) { if (obj instanceof java.util.Map.Entry) { java.util.Map.Entry entry = (java.util.Map.Entry)obj; int i = a.a(entry.getKey()); if (i >= 0) { return c.a(a.a(i, 1), entry.getValue()); } } return false; } public final boolean containsAll(Collection collection) { for (Iterator iterator1 = collection.iterator(); iterator1.hasNext();) { if (!contains(iterator1.next())) { return false; } } return true; } public final boolean equals(Object obj) { return f.a(this, obj); } public final int hashCode() { int i = -1 + a.a(); int k = 0; while (i >= 0) { Object obj = a.a(i, 0); Object obj1 = a.a(i, 1); int l; int i1; int j1; if (obj == null) { l = 0; } else { l = obj.hashCode(); } if (obj1 == null) { i1 = 0; } else { i1 = obj1.hashCode(); } j1 = k + (i1 ^ l); i--; k = j1; } return k; } public final boolean isEmpty() { return a.a() == 0; } public final Iterator iterator() { return new j(a); } public final boolean remove(Object obj) { throw new UnsupportedOperationException(); } public final boolean removeAll(Collection collection) { throw new UnsupportedOperationException(); } public final boolean retainAll(Collection collection) { throw new UnsupportedOperationException(); } public final int size() { return a.a(); } public final Object[] toArray() { throw new UnsupportedOperationException(); } public final Object[] toArray(Object aobj[]) { throw new UnsupportedOperationException(); } }
[ "mohsenuss91@hotmail.com" ]
mohsenuss91@hotmail.com
a9069bdf15926d2db4f9f7df2a690053a69b9bc6
e6fa3964d7f41ae579cb1c93546e4a76c30cd914
/taobao-sdk-java-auto_1479188381469-20210114-source/DingTalk/com/dingtalk/api/response/OapiProcessDeleteResponse.java
8b1d82a2392234e808f8ff3c7c10c99243774821
[]
no_license
devops-utils/dingtalk-sdk-java
14c4eb565dc605e6a7469ea0a00416567278846d
6381d0a22fdc948cba20fa0fc88c5818742177b7
refs/heads/master
2023-02-17T04:46:14.429121
2021-01-14T03:41:39
2021-01-14T03:41:39
329,497,955
0
0
null
null
null
null
UTF-8
Java
false
false
1,086
java
package com.dingtalk.api.response; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.TaobaoResponse; /** * TOP DingTalk-API: dingtalk.oapi.process.delete response. * * @author top auto create * @since 1.0, null */ public class OapiProcessDeleteResponse extends TaobaoResponse { private static final long serialVersionUID = 8257315925883445597L; /** * 错误码 */ @ApiField("errcode") private Long errcode; /** * 错误信息 */ @ApiField("errmsg") private String errmsg; /** * 成功标识 */ @ApiField("success") private Boolean success; public void setErrcode(Long errcode) { this.errcode = errcode; } public Long getErrcode( ) { return this.errcode; } public void setErrmsg(String errmsg) { this.errmsg = errmsg; } public String getErrmsg( ) { return this.errmsg; } public void setSuccess(Boolean success) { this.success = success; } public Boolean getSuccess( ) { return this.success; } public boolean isSuccess() { return getErrcode() == null || getErrcode().equals(0L); } }
[ "zhangchunsheng423@gmail.com" ]
zhangchunsheng423@gmail.com
312bfeb5a6e73f7bcf637016971e74079d83ed14
e108d65747c07078ae7be6dcd6369ac359d098d7
/org/opencv/objdetect/CascadeClassifier.java
5d18be3ac2bab26a14eef87c499ee347d7d3a730
[ "MIT" ]
permissive
kelu124/pyS3
50f30b51483bf8f9581427d2a424e239cfce5604
86eb139d971921418d6a62af79f2868f9c7704d5
refs/heads/master
2020-03-13T01:51:42.054846
2018-04-24T21:03:03
2018-04-24T21:03:03
130,913,008
1
0
null
null
null
null
UTF-8
Java
false
false
2,908
java
package org.opencv.objdetect; import org.opencv.core.Mat; import org.opencv.core.MatOfDouble; import org.opencv.core.MatOfInt; import org.opencv.core.MatOfRect; import org.opencv.core.Size; public class CascadeClassifier { protected final long nativeObj; private static native long CascadeClassifier_0(); private static native long CascadeClassifier_1(String str); private static native void delete(long j); private static native void detectMultiScale_0(long j, long j2, long j3, double d, int i, int i2, double d2, double d3, double d4, double d5); private static native void detectMultiScale_1(long j, long j2, long j3); private static native void detectMultiScale_2(long j, long j2, long j3, long j4, long j5, double d, int i, int i2, double d2, double d3, double d4, double d5, boolean z); private static native void detectMultiScale_3(long j, long j2, long j3, long j4, long j5); private static native boolean empty_0(long j); private static native boolean load_0(long j, String str); protected CascadeClassifier(long addr) { this.nativeObj = addr; } public CascadeClassifier() { this.nativeObj = CascadeClassifier_0(); } public CascadeClassifier(String filename) { this.nativeObj = CascadeClassifier_1(filename); } public void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize) { double d = scaleFactor; int i = minNeighbors; int i2 = flags; detectMultiScale_0(this.nativeObj, image.nativeObj, objects.nativeObj, d, i, i2, minSize.width, minSize.height, maxSize.width, maxSize.height); } public void detectMultiScale(Mat image, MatOfRect objects) { detectMultiScale_1(this.nativeObj, image.nativeObj, objects.nativeObj); } public void detectMultiScale(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels) { double d = scaleFactor; int i = minNeighbors; int i2 = flags; detectMultiScale_2(this.nativeObj, image.nativeObj, objects.nativeObj, rejectLevels.nativeObj, levelWeights.nativeObj, d, i, i2, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels); } public void detectMultiScale(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights) { detectMultiScale_3(this.nativeObj, image.nativeObj, objects.nativeObj, rejectLevels.nativeObj, levelWeights.nativeObj); } public boolean empty() { return empty_0(this.nativeObj); } public boolean load(String filename) { return load_0(this.nativeObj, filename); } protected void finalize() throws Throwable { delete(this.nativeObj); } }
[ "kelu124@gmail.com" ]
kelu124@gmail.com
f22fbd7f61fee1edfac829e0b9fa2d1f9b7f7a1d
7a1c0d948c2b914f954b2f2ec5092bab250ad0e8
/app/src/main/java/com/trannguyentanthuan2903/yourfoods/category/view/CategoryListFragment.java
d3604903f771d1c4a1703b3c578881c1934ec0c7
[]
no_license
Testtaccount/YourFoods-master
649323eb52cb899947db08ddaaf422895682891f
91f09d241d975371e3afbb84a5c6fea13df64d27
refs/heads/master
2020-03-27T11:02:54.590050
2018-08-28T14:41:30
2018-08-28T14:41:30
146,461,615
0
0
null
null
null
null
UTF-8
Java
false
false
4,093
java
package com.trannguyentanthuan2903.yourfoods.category.view; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener; import com.trannguyentanthuan2903.yourfoods.R; import com.trannguyentanthuan2903.yourfoods.category.model.Category; import com.trannguyentanthuan2903.yourfoods.category.model.CategoryListAdapter; import com.trannguyentanthuan2903.yourfoods.utility.Constain; import java.util.ArrayList; /** * Created by Administrator on 10/16/2017. */ public class CategoryListFragment extends Fragment { private RecyclerView recyclerCategory; private ArrayList<Category> arrCategory; private CategoryListAdapter adapter; private LinearLayoutManager mManager; private DatabaseReference mData; private String idStore; private ImageView imgCreate; //Contructor public CategoryListFragment() { } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } private void addEvents() { imgCreate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(getActivity(), CreateCategory.class); intent.putExtra(Constain.ID_STORE, idStore); startActivity(intent); } }); } private void initInfo() { try { mData.child(Constain.STORES).child(idStore).child(Constain.CATEGORY).addValueEventListener( new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { if (dataSnapshot.getValue() != null) { arrCategory.clear(); for (DataSnapshot dt : dataSnapshot.getChildren()) { try { Category category = dt.getValue(Category.class); arrCategory.add(category); adapter.notifyDataSetChanged(); } catch (Exception ex) { } } } } @Override public void onCancelled(DatabaseError databaseError) { } }); recyclerCategory.setLayoutManager(mManager); } catch (Exception ex) { ex.printStackTrace(); } } private void addControls() { imgCreate = (ImageView) getActivity().findViewById(R.id.imgCreateCategoryFrag); mData = FirebaseDatabase.getInstance().getReference(); Intent intent = getActivity().getIntent(); idStore = intent.getStringExtra(Constain.ID_STORE); //List Category mManager = new LinearLayoutManager(getActivity()); recyclerCategory = (RecyclerView) getActivity().findViewById(R.id.recyclerCategory); arrCategory = new ArrayList<>(); adapter = new CategoryListAdapter(arrCategory, getActivity(), idStore); recyclerCategory.setAdapter(adapter); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_category_list, container, false); } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); addControls(); initInfo(); addEvents(); } }
[ "avetik.avetik@gmail.com" ]
avetik.avetik@gmail.com
5a3ef417c618b04c43e3c568ac9295424c00942b
b9f9e9debaa4d2d024bc21ff2b2b3cb9dfb2918c
/trunk/zing/ZingWeb/src/com/iLabs/spice/common/servicelocator/ServiceLocator.java
129f861fb682c43ca5c07e8dbe8e0a6a2f92d9db
[ "Apache-2.0", "CC-BY-2.5" ]
permissive
BGCX261/zing-svn-to-git
bbe059b19324d1d1ceb5e8661a28baa1fac14ee2
43c7c1227e85053e965e9d88d375a0622dd4bf3a
refs/heads/master
2020-04-04T01:04:29.530120
2015-08-25T15:16:18
2015-08-25T15:16:18
41,590,300
0
0
null
null
null
null
UTF-8
Java
false
false
3,011
java
/* * Copyright 2008 Impetus Infotech. * * 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.iLabs.spice.common.servicelocator; import java.lang.reflect.InvocationTargetException; import com.iLabs.spice.common.exception.SysException; /** * This class provides a mechanism to lookup to a service by name and * optionally by the name of the implementation. */ public class ServiceLocator { /** * This is the constructor of the class. */ public ServiceLocator() { } /** * This method returns an instance of a service that has been looked up by name. * * @param svcName This is the the name of the service as given in the services configuration * @return If a service is successfully located, it is returned. * @throws SysException */ public static Object getService(String svcName) throws SysException { return getService(svcName,null); } /** * This method returns an instance of a service that has been looked up by * service name and implementation name. * @param svcName This is the the name of the service as given in the * services configuration * @param implName This is the the name of the service implementation * as given in the services configuration * @return If a service is successfully located , it is returned. * @throws SysException */ public static Object getService(String svcName, String implName) throws SysException { Object svc = null; try { Class svcFactoryClass=Class.forName("com.iLabs.spice.common.core.ServiceFactory"); Object svcFactory=svcFactoryClass.getMethod("getInstance",null).invoke(null,null); if (implName==null || implName.trim().length()==0) { implName = "default"; } Class[] paramTypes = {String.class,String.class}; Object[] paramValues = {svcName,implName}; svc=svcFactory.getClass().getMethod("getService", paramTypes).invoke(svcFactory, paramValues); } catch (ClassNotFoundException classNotFoundException) { throw new SysException("SL001", classNotFoundException); } catch (IllegalAccessException illegalAccessException) { throw new SysException("SL001", illegalAccessException); } catch (InvocationTargetException invocationTargetException) { throw new SysException("SL001", invocationTargetException); } catch (NoSuchMethodException noSuchMethodException) { throw new SysException("SL001", noSuchMethodException); } return svc; } }
[ "you@example.com" ]
you@example.com
f90ea48b89319b07bd84c94218ab9fcc53a10d6b
b6618b68bcfde72a71cd50bc22b76f34e3e528c0
/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java
ec2cee7bb65d9afc1a0f407c427482431d6981a8
[]
no_license
ibuziuk/jbosstools-integration-tests
55549324de5070d27255a88f369993c95a07484d
c832194438546d43f79abebe603d718583472582
refs/heads/master
2021-01-24T05:05:33.995094
2015-08-20T15:26:26
2015-08-31T12:20:50
41,677,117
1
0
null
2015-08-31T13:33:43
2015-08-31T13:33:43
null
UTF-8
Java
false
false
4,159
java
/******************************************************************************* * Copyright (c) 2007-2011 Exadel, Inc. and Red Hat, Inc. * Distributed under license by Red Hat, Inc. All rights reserved. * This program is made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Exadel, Inc. and Red Hat, Inc. - initial API and implementation ******************************************************************************/ package org.jboss.tools.vpe.ui.bot.test.editor.tags; import org.jboss.tools.ui.bot.ext.Timing; /** * Tests Rich Faces InplaceSelectInput Tag behavior * @author vlado pakan * */ public class InplaceSelectInputTagTest extends AbstractTagTest{ private static final String defaultLabel = "DefaultLabel"; private static final String option1 = "Option 1"; private static final String option2 = "Option 2"; @Override protected void initTestPage() { initTestPage(TestPageType.JSP, "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" + "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" + "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" + "<html>\n" + " <head>\n" + " </head>\n" + " <body>\n" + " <f:view>\n" + " <rich:inplaceSelect value=\"0\" defaultLabel=\"" + defaultLabel + "\">\n"+ " <f:selectItem itemValue=\"0\" itemLabel=\"" + option1 +"\" />\n" + " <f:selectItem itemValue=\"1\" itemLabel=\"" + option2 +"\" />\n" + " </rich:inplaceSelect>\n" + " </f:view>\n" + " </body>\n" + "</html>"); } @Override protected void verifyTag() { assertVisualEditorContains(getVisualEditor(), "SPAN", new String[]{"vpe-user-toggle-id","title","class"}, new String[]{"false","rich:inplaceSelect value: 0 defaultLabel: " + defaultLabel,"rich-inplace-select rich-inplace-select-view"}, getTestPageFileName()); assertVisualEditorContainsNodeWithValue(getVisualEditor(), defaultLabel, getTestPageFileName()); // check tag selection getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("SPAN",2), 0); bot.sleep(Timing.time3S()); String selectedText = getSourceEditor().getSelection(); final String hasToStartWith = "<rich:inplaceSelect value=\"0\" defaultLabel=\"" + defaultLabel + "\">"; assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" + "\nbut it is '" + selectedText + "'", selectedText.trim().startsWith(hasToStartWith)); final String hasEndWith = "</rich:inplaceSelect>"; assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" + "\nbut it is '" + selectedText + "'", selectedText.trim().endsWith(hasEndWith)); // Click on tag and check correct tag displaying getVisualEditor().mouseClickOnNode(getVisualEditor().getDomNodeByTagName("SPAN",2)); bot.sleep(Timing.time3S()); assertVisualEditorContains(getVisualEditor(), "SPAN", new String[]{"vpe-user-toggle-id","class"}, new String[]{"true","rich-inplace-select rich-inplace-select-edit"}, getTestPageFileName()); assertVisualEditorContainsNodeWithValue(getVisualEditor(), option1, getTestPageFileName()); assertVisualEditorContainsNodeWithValue(getVisualEditor(), option2, getTestPageFileName()); assertVisualEditorNotContainNodeWithValue(getVisualEditor(), defaultLabel, getTestPageFileName()); selectedText = getSourceEditor().getSelection(); // check tag selection assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" + "\nbut it is '" + selectedText + "'", selectedText.trim().startsWith(hasToStartWith)); assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" + "\nbut it is '" + selectedText + "'", selectedText.trim().endsWith(hasEndWith)); } }
[ "vpakan@redhat.com" ]
vpakan@redhat.com
85d1c7226336aee3e82847d4bd7e484251376819
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/ui/ar.java
e32cb55386475c71a7f45c2a93c33b0e6d6d2d19
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
1,284
java
package com.tencent.mm.ui; import android.content.Context; import android.graphics.Point; import android.os.Build.VERSION; import android.view.Display; import android.view.WindowManager; import java.lang.reflect.Method; public final class ar { public static Point gu(Context paramContext) { Point localPoint = new Point(); paramContext = ((WindowManager)paramContext.getSystemService("window")).getDefaultDisplay(); if (Build.VERSION.SDK_INT >= 17) { paramContext.getRealSize(localPoint); return localPoint; } if (Build.VERSION.SDK_INT >= 14) { try { Method localMethod = Display.class.getMethod("getRawHeight", new Class[0]); localPoint.x = ((Integer)Display.class.getMethod("getRawWidth", new Class[0]).invoke(paramContext, new Object[0])).intValue(); localPoint.y = ((Integer)localMethod.invoke(paramContext, new Object[0])).intValue(); return localPoint; } catch (Exception localException) {} } paramContext.getSize(localPoint); return localPoint; } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes3-dex2jar.jar!/com/tencent/mm/ui/ar.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
de949b21e2147e674788c5b6ceb1aca51501938d
dc0beecadd0404435e6fea1a49f2014f85b4c004
/test/net/ion/framework/parse/html/HTMLTest.java
52ad2993f6e6f80c903817cde9cda0cc30aa03dc
[]
no_license
bleujin/ionframework
6295ef747429b6d80b52c5372f54ad0aff461f43
bf1c5c5a2d46985a81114a9578adfb5823887350
refs/heads/master
2022-11-20T10:53:20.831425
2016-10-10T07:14:41
2016-10-10T07:14:41
1,971,241
0
0
null
null
null
null
UTF-8
Java
false
false
4,896
java
package net.ion.framework.parse.html; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.StringReader; import java.net.URL; import java.util.Date; import java.util.Iterator; import org.apache.http.impl.cookie.DateUtils; import junit.framework.TestCase; import net.htmlparser.jericho.Element; import net.htmlparser.jericho.Segment; import net.htmlparser.jericho.Source; import net.htmlparser.jericho.StartTag; import net.htmlparser.jericho.Tag; import net.ion.framework.util.DateUtil; import net.ion.framework.util.Debug; import net.ion.framework.util.FileUtil; import net.ion.framework.util.IOUtil; public class HTMLTest extends TestCase { public void testInsensitive() throws Exception { String str = "<Hello Attr='Tag'>Hello</hello>"; StringReader reader = new StringReader(str); HTag root = GeneralParser.parseHTML(reader); assertEquals("hello", root.getTagName()); assertEquals("Tag", root.getAttributeValue("attr")); } public void testEmpty() throws Exception { String str = ""; StringReader reader = new StringReader(str); HTag root = GeneralParser.parseHTML(reader); } private String html = "<!DOCTYPE html>" + "<script atrr='a1'>Bla Bla</script>" + "<html><head><title>TITLE</title></head><body></body></html>"; public void testDocType() throws Exception { HTag root = GeneralParser.parseHTML(new StringReader(html)); assertEquals("TITLE", root.getChild("head/title").getOnlyText()); } public void testOnlyText() throws Exception { HTag root = GeneralParser.parseHTML(new StringReader(html)); assertEquals("TITLE", root.getOnlyText()); assertEquals("TITLE", root.getChild("head").getOnlyText()); assertEquals("TITLE", root.getChild("head/title").getOnlyText()); } public void testPrefix() throws Exception { HTag root = GeneralParser.parseHTML(new StringReader(html)); assertEquals(true, root.getPrefixTag().hasChild()); } public void testContent() throws Exception { HTag root = GeneralParser.parseHTML(new StringReader(html)); HTag script = root.getPrefixTag().getChildren().get(1); assertEquals("<script atrr='a1'>Bla Bla</script>", script.getContent()); assertEquals(false, script.hasChild()); assertEquals(0, script.getChildren().size()); } public void testTagText() throws Exception { HTag root = GeneralParser.parseHTML(new StringReader(html)); HTag script = root.getPrefixTag().getChildren().get(1); assertEquals("Bla Bla", script.getTagText()); assertEquals("<head><title>TITLE</title></head><body></body>", root.getTagText()); } public void testDepth() throws Exception { HTag root = GeneralParser.parseHTML(new StringReader(html)); assertEquals(0, root.getDepth()); } public void testGetValue() throws Exception { String s = "<root abcd='d'><abc><center atr='3'>gacdd</center><br><br><br></abc><pd></pd></root>"; HTag root = HTag.createGeneral(new StringReader(s), "root"); assertEquals("gacdd", root.getValue("abc/center")); assertEquals("3", root.getValue("abc/center@atr")); assertEquals("d", root.getValue("@abcd")); // assertEquals("3", root.getValue("p/center/@a")) ; } public void testChild() throws Exception { String s = "<root><p><center><img src=''/>gacdd</center><br><br><br></p><p></p></root>"; HTag root = GeneralParser.parseHTML(new StringReader(s)); Debug.debug(DateUtils.formatDate(new Date(), "yyyyMMdd") + "/DEFAULT"); for (HTag child : root.getChildren()) { Element celement = child.getElement(); Debug.debug(child, celement.getDebugInfo(), celement.getEndTag(), celement.getBegin(), celement.getEnd()); } } public void xtestBigParse() throws Exception { try { HTag root = HTag.createGeneral(new BufferedReader(new FileReader(new File("c:/temp/BookItem2nd.aspx"))), "html"); Debug.line(root.getChild("/html/head")); } catch (Throwable e) { e.printStackTrace(); } } public void xtestStack() throws Exception { StringBuilder sb = new StringBuilder(); for (int i = 0; i < 900; i++) { sb.append("<span href=\"" + i + "\">"); sb.append("0123456789ABCDEF "); sb.append("<span href=\"" + i + ".1\">"); sb.append("first"); sb.append("</span>"); sb.append("<span href=\"" + i + ".2\">"); sb.append("second"); sb.append("</span>"); sb.append("<span href=\"" + i + ".3\"/>"); sb.append("</span>"); } Source source = new Source(sb); // Debug.line(source.getMaxDepthIndicator()); // // int maxDepth=0; // int depth=0; // for (Tag tag : source.getAllTags()) { // if (tag instanceof StartTag) { // if (!((StartTag) tag).isEmptyElementTag()) { // depth++; // if (depth > maxDepth) // maxDepth++; // } // } else { // depth--; // } // // } // Debug.line(maxDepth, depth) ; HTag root = HTag.createGeneral(new StringReader(sb.toString()), "html"); // Debug.line(source.getAllElements().size()); } }
[ "bleujin@gmail.com" ]
bleujin@gmail.com
f0addd812489ebeb08743f1ebf1c541838703913
222c56bda708da134203560d979fb90ba1a9da8d
/uapunit测试框架/engine/src/public/uap/workflow/engine/context/TakeBackTaskInsCtx.java
7b82a911221f3ffac90077dc6cfdc97c21c9db9f
[]
no_license
langpf1/uapunit
7575b8a1da2ebed098d67a013c7342599ef10ced
c7f616bede32bdc1c667ea0744825e5b8b6a69da
refs/heads/master
2020-04-15T00:51:38.937211
2013-09-13T04:58:27
2013-09-13T04:58:27
12,448,060
0
1
null
null
null
null
UTF-8
Java
false
false
552
java
package uap.workflow.engine.context; import uap.workflow.engine.core.TaskInstanceFinishMode; public class TakeBackTaskInsCtx extends StartedProInsCtx { private static final long serialVersionUID = 7640753231594552557L; private String[] subTaskPks; @Override public void setTaskPk(String taskPk) { this.taskPk = taskPk; } public String[] getSubTaskPks() { return subTaskPks; } public void setSubTaskPks(String[] subTaskPks) { this.subTaskPks = subTaskPks; } @Override public TaskInstanceFinishMode getFinishType() { return null; } }
[ "langpf1@yonyou.com" ]
langpf1@yonyou.com
d88161fe82a1514b3d758ba7fcf53204d4e2e3c3
2054895337b913b51fa8be9d2906f6c97923eda4
/src/main/java/org/hr_xml/_3/RankedSearchResultsType.java
53c86c606eba96024d553943afb9a0d1e732e73d
[]
no_license
jkomorek/hrxml
92e9fee42336a2b4b9e91fa7383584de452b8e79
4151d85f1a4e05132f4f1bda3d06b3e0705069f9
refs/heads/master
2021-01-23T03:04:51.415157
2014-02-28T05:51:52
2014-02-28T05:51:52
16,828,973
3
0
null
null
null
null
UTF-8
Java
false
false
2,310
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: 2014.01.06 at 10:26:45 PM EST // package org.hr_xml._3; 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.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for RankedSearchResultsType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="RankedSearchResultsType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://www.hr-xml.org/3}RankedResult" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RankedSearchResultsType", propOrder = { "rankedResult" }) public class RankedSearchResultsType { @XmlElement(name = "RankedResult") protected List<RankedSearchRelevanceType> rankedResult; /** * Gets the value of the rankedResult 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 rankedResult property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRankedResult().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link RankedSearchRelevanceType } * * */ public List<RankedSearchRelevanceType> getRankedResult() { if (rankedResult == null) { rankedResult = new ArrayList<RankedSearchRelevanceType>(); } return this.rankedResult; } }
[ "jonathan.komorek@gmail.com" ]
jonathan.komorek@gmail.com
9caa1a5fd4f5e7b4c99c10c7b12d82913edf57f5
cca87c4ade972a682c9bf0663ffdf21232c9b857
/com/tencent/mm/boot/svg/a/a/aks.java
6ccf7270abb78bed736d53a001dce1884f85e344
[]
no_license
ZoranLi/wechat_reversing
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
refs/heads/master
2021-07-05T01:17:20.533427
2017-09-25T09:07:33
2017-09-25T09:07:33
104,726,592
12
1
null
null
null
null
UTF-8
Java
false
false
3,365
java
package com.tencent.mm.boot.svg.a.a; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Paint.Cap; import android.graphics.Paint.Join; import android.graphics.Paint.Style; import android.graphics.Path; import android.os.Looper; import com.tencent.mm.svg.WeChatSVGRenderC2Java; import com.tencent.mm.svg.c; import com.tencent.smtt.sdk.WebView; public final class aks extends c { private final int height = 60; private final int width = 108; protected final int b(int i, Object... objArr) { switch (i) { case 0: return 108; case 1: return 60; case 2: Canvas canvas = (Canvas) objArr[0]; Looper looper = (Looper) objArr[1]; Matrix d = c.d(looper); float[] c = c.c(looper); Paint g = c.g(looper); g.setFlags(385); g.setStyle(Style.FILL); Paint g2 = c.g(looper); g2.setFlags(385); g2.setStyle(Style.STROKE); g.setColor(WebView.NIGHT_MODE_COLOR); g2.setStrokeWidth(1.0f); g2.setStrokeCap(Cap.BUTT); g2.setStrokeJoin(Join.MITER); g2.setStrokeMiter(4.0f); g2.setPathEffect(null); c.a(g2, looper).setStrokeWidth(1.0f); canvas.save(); Paint a = c.a(g, looper); a.setColor(-3355444); c = c.a(c, 1.0f, 0.0f, 22.0f, 0.0f, 1.0f, 17.0f); d.reset(); d.setValues(c); canvas.concat(d); canvas.save(); Paint a2 = c.a(a, looper); Path h = c.h(looper); h.moveTo(6.095757f, 5.7777686f); h.cubicTo(22.562868f, -1.9462895f, 42.458115f, -1.9055293f, 58.93528f, 5.7777686f); h.cubicTo(64.454475f, 8.08072f, 64.40421f, 14.979384f, 63.620064f, 20.023458f); h.cubicTo(63.13751f, 21.694628f, 63.54969f, 24.11986f, 61.699905f, 24.975822f); h.cubicTo(56.512463f, 24.36442f, 51.31497f, 23.528835f, 46.23811f, 22.36717f); h.cubicTo(45.956623f, 22.07166f, 45.41375f, 21.460257f, 45.142315f, 21.164745f); h.cubicTo(45.464016f, 17.649178f, 46.80109f, 14.357791f, 47.97731f, 11.066404f); h.cubicTo(45.293114f, 9.833408f, 42.548595f, 8.671742f, 39.592957f, 8.366041f); h.cubicTo(32.032967f, 7.418367f, 23.950207f, 7.499887f, 17.013512f, 11.056214f); h.cubicTo(17.958511f, 14.561592f, 20.491913f, 18.454191f, 19.34585f, 22.000328f); h.cubicTo(14.580642f, 23.763206f, 9.322828f, 23.946629f, 4.33645f, 24.904493f); h.cubicTo(1.8432609f, 25.597416f, 1.8332077f, 22.34679f, 1.4813464f, 20.736763f); h.cubicTo(0.6167728f, 15.509267f, 0.29507095f, 8.213191f, 6.095757f, 5.7777686f); h.lineTo(6.095757f, 5.7777686f); h.close(); WeChatSVGRenderC2Java.setFillType(h, 2); canvas.drawPath(h, a2); canvas.restore(); canvas.restore(); c.f(looper); break; } return 0; } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
a00cadf3c3f048652983fb289d0f02d810c23b9b
75eb061709fba7ab7ab7e7dbb31c6720c353ef9e
/WCM_MDM_SONAMA_DB2_14June2018_2/auth/src/main/java/com/ibm/gbs/wcm/vo/ReferralLAVO.java
caf5c69378c517d015563d480f2b5b19235c4562
[ "MIT" ]
permissive
svanandkumar/Connect_360_Release1
8867ab02988af510b759d49ed344e60dfc5b542f
9da56fdc7bd1d57b26c516b9214f5e7ca9b740c2
refs/heads/master
2020-03-28T01:00:23.393795
2018-09-05T13:29:59
2018-09-05T13:29:59
147,468,585
0
0
null
null
null
null
UTF-8
Java
false
false
2,917
java
package com.ibm.gbs.wcm.vo; import java.math.BigDecimal; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; import javax.persistence.Table; public class ReferralLAVO { private BigDecimal referralID ; private String clientID ; private String customerName ; private String customer_name ; private String minor; private String parolee; public String getCustomer_name() { return customer_name; } public void setCustomer_name(String customer_name) { this.customer_name = customer_name; } private String Other_info ; private String Referral_Type ; private String fname ; private String lname ; private String memberID; private String srccode; private String cvwName; private String bdate; private String transName ; public String getTransName() { return transName; } public void setTransName(String transName) { this.transName = transName; } public String getBdate() { return bdate; } public void setBdate(String bdate) { this.bdate = bdate; } public String getFname() { return fname; } public void setFname(String fname) { this.fname = fname; } public String getLname() { return lname; } public void setLname(String lname) { this.lname = lname; } public String getMemberID() { return memberID; } public void setMemberID(String memberID) { this.memberID = memberID; } public String getSrccode() { return srccode; } public void setSrccode(String srccode) { this.srccode = srccode; } public String getCvwName() { return cvwName; } public void setCvwName(String cvwName) { this.cvwName = cvwName; } public BigDecimal getReferralID() { return referralID; } public void setReferralID(BigDecimal referralID) { this.referralID = referralID; } public String getClientID() { return clientID; } public void setClientID(String clientID) { this.clientID = clientID; } public String getCustomerName() { return customerName; } public void setCustomerName(String customerName) { this.customerName = customerName; this.customer_name = customerName ; } public String getOther_info() { return Other_info; } public void setOther_info(String other_info) { Other_info = other_info; } public String getReferral_Type() { return Referral_Type; } public void setReferral_Type(String referral_Type) { Referral_Type = referral_Type; } public String getMinor() { return minor; } public void setMinor(String minor) { this.minor = minor; } public String getParolee() { return parolee; } public void setParolee(String parolee) { this.parolee = parolee; } }
[ "anandkumar.swami@in.ibm.com" ]
anandkumar.swami@in.ibm.com
6506471bcdfa40c84e7432551cd3ebce76b61950
a0728a167e1cb883255a34e055cac4ac60309f20
/docu/rbm (2)/src/snis/rbm/business/rem4050/activity/SaveSendVeri.java
4f5497e612af45303f5b922f67a36bcf6b1125f5
[]
no_license
jingug1004/pythonBasic
3d3c6c091830215c8be49cc6280b7467fd19dc76
554e3d1a9880b4f74872145dc4adaf0b099b0845
refs/heads/master
2023-03-06T06:24:05.671015
2022-03-09T08:16:58
2022-03-09T08:16:58
179,009,504
0
0
null
2023-03-03T13:09:01
2019-04-02T06:02:44
Java
UHC
Java
false
false
4,241
java
/* * ================================================================================ * 시스템 : 관리 * 소스파일 이름 : snis.rbm.business.rem4050.activity.SaveSendVeri.java * 파일설명 : 수동전송주기 관리 * 작성자 : 신재선 * 버전 : 1.0.0 * 생성일자 : 2012.12.29 * 최종수정일자 : * 최종수정자 : * 최종수정내용 : * ================================================================================= */ package snis.rbm.business.rem4050.activity; import com.posdata.glue.biz.constants.PosBizControlConstants; import com.posdata.glue.context.PosContext; import com.posdata.glue.dao.vo.PosParameter; import com.posdata.glue.miplatform.vo.PosDataset; import com.posdata.glue.miplatform.vo.PosRecord; import snis.rbm.common.util.SnisActivity; import snis.rbm.common.util.Util; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.SQLException; public class SaveSendVeri extends SnisActivity { public SaveSendVeri(){ } /** * <p> SaveStates Activity를 실행시키기 위한 메소드 </p> * @param ctx PosContext 저장소 * @return SUCCESS String sucess 문자열 * @throws none */ public String runActivity(PosContext ctx) { // 사용자 정보 확인 if ( !setUserInfo(ctx).equals(PosBizControlConstants.SUCCESS) ) { Util.setSvcMsgCode(ctx, "L_COM_ALT_0028"); return PosBizControlConstants.SUCCESS; } saveState(ctx); return PosBizControlConstants.SUCCESS; } /** * <p> 하나의 데이타셋을 가져와 한 레코드씩 looping하면서 DML 메소드를 호출하기 위한 메소드 </p> * @param ctx PosContext 저장소 * @return none * @throws none */ /** * @param ctx */ protected void saveState(PosContext ctx) { int nSaveCount = 0; int nDeleteCount = 0; String sDsName = ""; PosDataset ds; int nSize = 0; // 검증여부 저장 sDsName = "dsSendVeri"; if ( ctx.get(sDsName) != null ) { ds = (PosDataset) ctx.get(sDsName); nSize = ds.getRecordCount(); for ( int i = 0; i < nSize; i++ ) { PosRecord record = ds.getRecord(i); if ( record.getType() == com.posdata.glue.miplatform.vo.PosRecord.UPDATE ) { nSaveCount += saveSendVeri(record); } } } Util.setSaveCount (ctx, nSaveCount ); Util.setDeleteCount(ctx, nDeleteCount); } /** * <p> 선수정보 입력/수정 </p> * @param record PosRecord 데이타셋에 대한 하나의 레코드 * @return dmlcount int update 레코드 개수 * @throws none */ protected int saveSendVeri(PosRecord record) { PosParameter param = new PosParameter(); int i = 0; param.setValueParamter(i++, record.getAttribute("VERI")); //종목코드 param.setValueParamter(i++, SESSION_USER_ID); //사용자ID(수정자) param.setValueParamter(i++, record.getAttribute("TRAN_DT")); //대회분류 연번 int dmlcount = this.getDao("rbmdao").update("rem4050_u01", param); return dmlcount; } /** * <p> 선수정보 삭제 </p> * @param record PosRecord 데이타셋에 대한 하나의 레코드 * @return dmlcount int update 레코드 개수 * @throws none */ protected int deletePayAdjScrRule(PosRecord record) { PosParameter param = new PosParameter(); int i = 0; param.setValueParamter(i++, record.getAttribute("GAME_CD")); //종목코드 param.setValueParamter(i++, record.getAttribute("CONTEST_TYPE_SEQ")); //대회분류코드 param.setValueParamter(i++, record.getAttribute("RANK")); //순위 param.setValueParamter(i++, record.getAttribute("MRTN_RACE_TYPE")); //코스종류 int dmlcount = this.getDao("rbmdao").update("rbs5050_d01", param); return dmlcount; } }
[ "jingug1004@gmail.com" ]
jingug1004@gmail.com
c201bff443633c27b38e6bcb3458c9922eb6062e
6fae6fea4f8c6be7f2ca642044911654d3585f89
/src/test/java/com/javaguru/shoppinglist/service/ShoppingCartServiceTest.java
0ccc9c5a877614776e4e7453901559a09277c26e
[]
no_license
Art1985ss/ProjectJava2
e3c818dfe32ef7c094a6276e80644411e27f5654
6fe82108a4a8b6f4b6439cc410e8e0714c64cdb8
refs/heads/master
2022-12-23T23:12:41.870641
2021-06-10T08:53:30
2021-06-10T08:53:30
210,909,294
1
1
null
2022-12-16T10:00:51
2019-09-25T18:05:08
Java
UTF-8
Java
false
false
6,027
java
package com.javaguru.shoppinglist.service; import com.javaguru.shoppinglist.entity.Product; import com.javaguru.shoppinglist.entity.ShoppingCart; import com.javaguru.shoppinglist.repository.shoppingcart.RamShoppingCartRepository; import com.javaguru.shoppinglist.service.validation.shoppingcart.ShoppingCartNotFoundException; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; import java.math.BigDecimal; import java.util.List; import java.util.Optional; import static org.junit.Assert.*; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) public class ShoppingCartServiceTest { @Rule public ExpectedException expectedException = ExpectedException.none(); @Mock private RamShoppingCartRepository shoppingCartRepository; private ShoppingCart mockShoppingCart; @InjectMocks private ShoppingCartService victim; private ShoppingCart testShoppingCart; @Before public void setUp() { mockShoppingCart = Mockito.mock(ShoppingCart.class); victim = new ShoppingCartService(shoppingCartRepository); testShoppingCart = shoppingCart(); } @Test public void createShoppingCartShouldThrowException() { expectedException.expect(ShoppingCartNotFoundException.class); expectedException.expectMessage("Shopping cart was not found in database."); when(shoppingCartRepository.save(testShoppingCart)).thenReturn(Optional.empty()); victim.createShoppingCart(shoppingCart()); } @Test public void createShoppingCartShouldReturnCartId() { when(shoppingCartRepository.save(testShoppingCart)).thenReturn(Optional.ofNullable(testShoppingCart)); Long id = victim.createShoppingCart(testShoppingCart); assertEquals(testShoppingCart.getId(), id); } @Test public void findByIdShouldThrowException() { Long id = 2L; expectedException.expect(ShoppingCartNotFoundException.class); expectedException.expectMessage("Shopping cart with id " + id + " was not found."); when(shoppingCartRepository.findById(id)).thenReturn(Optional.empty()); victim.findById(id); } @Test public void findByIdShouldReturnShoppingCart() { Long id = testShoppingCart.getId(); when(shoppingCartRepository.findById(id)).thenReturn(Optional.ofNullable(testShoppingCart)); ShoppingCart shoppingCart = victim.findById(id); assertEquals(testShoppingCart, shoppingCart); } @Test public void findByNameShouldThrowException() { String name = testShoppingCart.getName(); expectedException.expect(ShoppingCartNotFoundException.class); expectedException.expectMessage("Shopping cart with name " + name + " was not found."); when(shoppingCartRepository.findByName(name)).thenReturn(Optional.empty()); victim.findByName(name); } @Test public void findByNameShouldReturnCart() { String name = testShoppingCart.getName(); when(shoppingCartRepository.findByName(name)).thenReturn(Optional.ofNullable(testShoppingCart)); ShoppingCart shoppingCart = victim.findByName(name); assertEquals(testShoppingCart, shoppingCart); } @Test public void deleteShouldThrowException() { Long id = 2L; expectedException.expect(ShoppingCartNotFoundException.class); expectedException.expectMessage("Shopping cart didn't exist to delete."); when(shoppingCartRepository.delete(id)).thenReturn(Optional.empty()); victim.delete(id); } @Test public void deleteShouldReturnCart() { Long id = testShoppingCart.getId(); when(shoppingCartRepository.delete(id)).thenReturn(Optional.ofNullable(testShoppingCart)); ShoppingCart shoppingCart = victim.delete(id); assertEquals(testShoppingCart, shoppingCart); } @Test public void addProductShouldThrowException() { expectedException.expect(ShoppingCartNotFoundException.class); expectedException.expectMessage("Shopping cart product list is empty."); Product product = product(); when(mockShoppingCart.addProduct(product)).thenReturn(Optional.empty()); victim.addProduct(mockShoppingCart, product); } @Test public void addProductShouldReturnList() { Product product = product(); List<Product> productList = victim.addProduct(testShoppingCart, product); assertNotNull(productList); } @Test public void getTotalPriceOfProductsFromShoppingCartShouldThrowException() { expectedException.expect(RuntimeException.class); expectedException.expectMessage("Could not calculate total price for products in this shopping cart."); when(mockShoppingCart.getPriceTotal()).thenReturn(Optional.empty()); victim.getTotalPriceOfProductsFromShoppingCart(mockShoppingCart); } @Test public void getTotalPriceOfProductsFromShoppingCartShouldReturnTotalPrice() { when(mockShoppingCart.getPriceTotal()).thenReturn(Optional.of(new BigDecimal("200"))); BigDecimal totalPrice = victim.getTotalPriceOfProductsFromShoppingCart(mockShoppingCart); assertNotNull(totalPrice); } private ShoppingCart shoppingCart() { ShoppingCart shoppingCart = new ShoppingCart(); shoppingCart.setId(1L); shoppingCart.setName("Cart1"); return shoppingCart; } private Product product() { Product product = new Product(); product.setId(1L); product.setName("Apple"); product.setPrice(new BigDecimal("32.20")); product.setCategory("Fruit"); product.setDiscount(new BigDecimal("5")); product.setDescription("This is apple for testing."); return product; } }
[ "art_1985@inbox.lv" ]
art_1985@inbox.lv
c586fb39595942f893bbcc3dcb537a2bc1e61bad
9c16d6b984c9a22c219bd2a20a02db21a51ba8d7
/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelFeatures.java
08c834c85dc8d0e27b6abdc589b8f77c0e156e11
[ "BSD-3-Clause" ]
permissive
nv-chromium/chromium-crosswalk
fc6cc201cb1d6a23d5f52ffd3a553c39acd59fa7
b21ec2ffe3a13b6a8283a002079ee63b60e1dbc5
refs/heads/nv-crosswalk-17
2022-08-25T01:23:53.343546
2019-01-16T21:35:23
2019-01-16T21:35:23
63,197,891
0
0
NOASSERTION
2019-01-16T21:38:06
2016-07-12T22:58:43
null
UTF-8
Java
false
false
1,313
java
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.compositor.bottombar.contextualsearch; import org.chromium.chrome.browser.customtabs.CustomTab; /** * A utility class meant to determine whether certain features are available in the Search Panel. */ public class ContextualSearchPanelFeatures { private boolean mIsCustomTab; /** * @param isCustomTab Whether the current activity contains a {@link CustomTab}. */ public ContextualSearchPanelFeatures(boolean isCustomTab) { mIsCustomTab = isCustomTab; } /** * @return {@code true} Whether search term refining is available. */ public boolean isSearchTermRefiningAvailable() { return !mIsCustomTab; } /** * @return {@code true} Whether the close button is available. */ public boolean isCloseButtonAvailable() { return mIsCustomTab; } /** * @return {@code true} Whether the close animation should run when the the panel is closed * due the panel being promoted to a tab. */ public boolean shouldAnimatePanelCloseOnPromoteToTab() { return mIsCustomTab; } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
7be205af9f9e7495df8e670451f4198d36c3875f
24121da2d56f6f76a0a774494ad8941fd498bf52
/app/src/main/java/app/food/patient_app/activity/BottomActivity.java
0a8a9842aafef7985aff8640bbc2a5f1bae315b5
[]
no_license
saubhagyamapps/IMOOD_TRACKES_APP
b3437c7a402c0d4becb73f7c40ea77fef58dd60f
fa944188f41e7526a3a8e1f1152dc31dfe831ace
refs/heads/master
2020-05-20T10:53:46.322979
2019-05-08T13:20:50
2019-05-08T13:20:50
185,533,924
0
0
null
null
null
null
UTF-8
Java
false
false
1,617
java
package app.food.patient_app.activity; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.design.widget.BottomNavigationView; import android.support.v7.app.AppCompatActivity; import android.view.MenuItem; import android.widget.TextView; import app.food.patient_app.R; public class BottomActivity extends AppCompatActivity { private TextView mTextMessage; private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener = new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case R.id.nav_socialapp: mTextMessage.setText(R.string.title_home); return true; case R.id.nav_manage: mTextMessage.setText(R.string.title_dashboard); return true; case R.id.nav_calllogs: mTextMessage.setText(R.string.title_notifications); return true; } return false; } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bottom); mTextMessage = (TextView) findViewById(R.id.message); BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation); navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener); } }
[ "keshuvodedara@gmail.com" ]
keshuvodedara@gmail.com
a0ecb6cbf8cbde3e4b16d02804bbf711b58a0937
ef954387d4dedf809dff0e92c4749ab12806d3cb
/spring-security-web/spring-security-web-csrf/src/main/java/com/ymmihw/springsecuritycsrf/dto/Foo.java
62fba69361e172f867faa7bb2a8ae449af52e1ab
[]
no_license
ymmihw/spring-security
86be48d78956f6f3ddcfc7b40d8a5feb865d5950
ec3d600244569e710558855b7087f7ce5d51c2b7
refs/heads/master
2022-02-02T06:41:23.355866
2021-06-25T09:45:30
2021-06-25T09:45:30
135,403,726
0
0
null
2022-01-21T23:18:54
2018-05-30T07:17:03
Java
UTF-8
Java
false
false
1,363
java
package com.ymmihw.springsecuritycsrf.dto; import java.io.Serializable; public class Foo implements Serializable { private static final long serialVersionUID = 1L; private long id; private String name; public Foo() { super(); } public Foo(final String name) { super(); this.name = name; } // API public long getId() { return id; } public void setId(final long id) { this.id = id; } public String getName() { return name; } public void setName(final String name) { this.name = name; } // @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Foo other = (Foo) obj; if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } return true; } @Override public String toString() { final StringBuilder builder = new StringBuilder(); builder.append("Foo [name=").append(name).append("]"); return builder.toString(); } }
[ "whimmy@126.com" ]
whimmy@126.com
6a260d78da5a1612f0a0fb2e175134f242e2c9ea
49b4cb79c910a17525b59d4b497a09fa28a9e3a8
/parserValidCheck/src/main/java/com/ke/css/cimp/fwb/fwb12/Rule_ULD_TYPE.java
7fac9be93873b94fa5d6b9c3826cea811b918d9b
[]
no_license
ganzijo/koreanair
a7d750b62cec2647bfb2bed4ca1bf8648d9a447d
e980fb11bc4b8defae62c9d88e5c70a659bef436
refs/heads/master
2021-04-26T22:04:17.478461
2018-03-06T05:59:32
2018-03-06T05:59:32
124,018,887
0
0
null
null
null
null
UTF-8
Java
false
false
3,621
java
package com.ke.css.cimp.fwb.fwb12; /* ----------------------------------------------------------------------------- * Rule_ULD_TYPE.java * ----------------------------------------------------------------------------- * * Producer : com.parse2.aparse.Parser 2.5 * Produced : Tue Mar 06 10:36:09 KST 2018 * * ----------------------------------------------------------------------------- */ import java.util.ArrayList; final public class Rule_ULD_TYPE extends Rule { public Rule_ULD_TYPE(String spelling, ArrayList<Rule> rules) { super(spelling, rules); } public Object accept(Visitor visitor) { return visitor.visit(this); } public static Rule_ULD_TYPE parse(ParserContext context) { context.push("ULD_TYPE"); boolean parsed = true; int s0 = context.index; ParserAlternative a0 = new ParserAlternative(s0); ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>(); parsed = false; { int s1 = context.index; ParserAlternative a1 = new ParserAlternative(s1); parsed = true; if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { int g1 = context.index; ArrayList<ParserAlternative> as2 = new ArrayList<ParserAlternative>(); parsed = false; { int s2 = context.index; ParserAlternative a2 = new ParserAlternative(s2); parsed = true; if (parsed) { boolean f2 = true; int c2 = 0; for (int i2 = 0; i2 < 1 && f2; i2++) { Rule rule = Rule_Typ_Alpha.parse(context); if ((f2 = rule != null)) { a2.add(rule, context.index); c2++; } } parsed = c2 == 1; } if (parsed) { boolean f2 = true; int c2 = 0; for (int i2 = 0; i2 < 2 && f2; i2++) { Rule rule = Rule_Typ_Mixed.parse(context); if ((f2 = rule != null)) { a2.add(rule, context.index); c2++; } } parsed = c2 == 2; } if (parsed) { as2.add(a2); } context.index = s2; } ParserAlternative b = ParserAlternative.getBest(as2); parsed = b != null; if (parsed) { a1.add(b.rules, b.end); context.index = b.end; } f1 = context.index > g1; if (parsed) c1++; } parsed = c1 == 1; } if (parsed) { as1.add(a1); } context.index = s1; } ParserAlternative b = ParserAlternative.getBest(as1); parsed = b != null; if (parsed) { a0.add(b.rules, b.end); context.index = b.end; } Rule rule = null; if (parsed) { rule = new Rule_ULD_TYPE(context.text.substring(a0.start, a0.end), a0.rules); } else { context.index = s0; } context.pop("ULD_TYPE", parsed); return (Rule_ULD_TYPE)rule; } } /* ----------------------------------------------------------------------------- * eof * ----------------------------------------------------------------------------- */
[ "wrjo@wrjo-PC" ]
wrjo@wrjo-PC
0b27aaca9a34a02f933f6c667c71ea8a7a6d5a78
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-13407-3-2-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/store/XWikiCacheStore_ESTest.java
0902a6041c510ed063917aa9ddbed7698bde84f4
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
556
java
/* * This file was automatically generated by EvoSuite * Wed Apr 01 03:20:21 UTC 2020 */ package com.xpn.xwiki.store; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class XWikiCacheStore_ESTest extends XWikiCacheStore_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
dbae0c197f8d8ed9a57fc9d530f2b733c042cad7
17ff6945de2a4aed04eb8da96b7c995034c0febb
/src/test/java/com/mycompany/dashboard/service/dto/CommonTableFieldDTOTest.java
024a7be49b14f19c1c0750a66a865a70561f8b21
[]
no_license
elliottlin2020/xf
ec4b0fcebc30877359ebadeba166f069a92cc23e
1fbe4395b5b9119c004477aa5aeb267bf6830232
refs/heads/main
2023-06-11T09:49:25.329636
2021-07-01T15:32:35
2021-07-01T15:32:35
382,079,051
0
0
null
null
null
null
UTF-8
Java
false
false
999
java
package com.mycompany.dashboard.service.dto; import static org.assertj.core.api.Assertions.assertThat; import com.mycompany.dashboard.web.rest.TestUtil; import org.junit.jupiter.api.Test; class CommonTableFieldDTOTest { @Test void dtoEqualsVerifier() throws Exception { TestUtil.equalsVerifier(CommonTableFieldDTO.class); CommonTableFieldDTO commonTableFieldDTO1 = new CommonTableFieldDTO(); commonTableFieldDTO1.setId(1L); CommonTableFieldDTO commonTableFieldDTO2 = new CommonTableFieldDTO(); assertThat(commonTableFieldDTO1).isNotEqualTo(commonTableFieldDTO2); commonTableFieldDTO2.setId(commonTableFieldDTO1.getId()); assertThat(commonTableFieldDTO1).isEqualTo(commonTableFieldDTO2); commonTableFieldDTO2.setId(2L); assertThat(commonTableFieldDTO1).isNotEqualTo(commonTableFieldDTO2); commonTableFieldDTO1.setId(null); assertThat(commonTableFieldDTO1).isNotEqualTo(commonTableFieldDTO2); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
4d27e3317c1924a709d79ec7b20f53774162ca22
8271d9b64896d2bba66dff17ce89ba1debcbb6ee
/src/main/java/mezz/jei/ingredients/IngredientBlacklistInternal.java
2291454eedf549d9f788ed1eb4a9ee26e5498430
[ "MIT" ]
permissive
IMarvinTPA/JustEnoughItems
e754dc26fd4476910d6e07dbd212554ab9d4f0e4
19236745fd58cecd9b044f289508e9749b0d0f68
refs/heads/1.16
2022-06-01T15:52:45.262792
2022-02-17T23:52:36
2022-03-08T00:57:31
78,608,999
0
0
MIT
2022-05-21T06:37:49
2017-01-11T06:20:31
Java
UTF-8
Java
false
false
1,128
java
package mezz.jei.ingredients; import java.util.HashSet; import java.util.List; import java.util.Set; import mezz.jei.api.ingredients.IIngredientHelper; import mezz.jei.api.ingredients.subtypes.UidContext; public class IngredientBlacklistInternal { private final Set<String> ingredientBlacklist = new HashSet<>(); public <V> void addIngredientToBlacklist(V ingredient, IIngredientHelper<V> ingredientHelper) { String uniqueName = ingredientHelper.getUniqueId(ingredient, UidContext.Ingredient); ingredientBlacklist.add(uniqueName); } public <V> void removeIngredientFromBlacklist(V ingredient, IIngredientHelper<V> ingredientHelper) { String uniqueName = ingredientHelper.getUniqueId(ingredient, UidContext.Ingredient); ingredientBlacklist.remove(uniqueName); } public <V> boolean isIngredientBlacklistedByApi(V ingredient, IIngredientHelper<V> ingredientHelper) { List<String> uids = IngredientInformation.getUniqueIdsWithWildcard(ingredientHelper, ingredient, UidContext.Ingredient); for (String uid : uids) { if (ingredientBlacklist.contains(uid)) { return true; } } return false; } }
[ "tehgeek@gmail.com" ]
tehgeek@gmail.com
b2e0b1b818f4c66ab2379a5c319f093c124817f6
fbf95d693ad5beddfb6ded0be170a9e810a10677
/core-services/egov-data-uploader/src/main/java/org/egov/dataupload/property/models/Calculation.java
12d584fa9aced8144a552d9944b3d5570ef018e5
[ "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
egovernments/DIGIT-OSS
330cc364af1b9b66db8914104f64a0aba666426f
bf02a2c7eb783bf9fdf4b173faa37f402e05e96e
refs/heads/master
2023-08-15T21:26:39.992558
2023-08-08T10:14:31
2023-08-08T10:14:31
353,807,330
25
91
MIT
2023-09-10T13:23:31
2021-04-01T19:35:55
Java
UTF-8
Java
false
false
950
java
package org.egov.dataupload.property.models; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import java.math.BigDecimal; import java.util.List; /** * Calculation */ @Getter @Setter @AllArgsConstructor @NoArgsConstructor @Builder public class Calculation { @JsonProperty("serviceNumber") private String serviceNumber; @JsonProperty("totalAmount") private BigDecimal totalAmount; private BigDecimal taxAmount; @JsonProperty("penalty") private BigDecimal penalty; @JsonProperty("exemption") private BigDecimal exemption; @JsonProperty("rebate") private BigDecimal rebate; @JsonProperty("fromDate") private Long fromDate; @JsonProperty("toDate") private Long toDate; @JsonProperty("tenantId") private String tenantId; List<TaxHeadEstimate> taxHeadEstimates; }
[ "36623418+nithindv@users.noreply.github.com" ]
36623418+nithindv@users.noreply.github.com
75ac8dd1139609c7dedb6b1a3cd8233bc9dc89a4
c3e873c60b2b9990cdf47c9b4e5fca9ba70a0557
/core/src/main/java/de/danoeh/antennapod/core/asynctask/PicassoProvider.java
1ed29c23a6a7f469ec766110005013ef00bd860b
[ "MIT" ]
permissive
geir54/AntennaPod
3e51c7a647f05bc2bf46a8fc5947435ec4aeb422
9659c18d899349d9be1573fb9520defc7d3a19cd
refs/heads/master
2020-12-25T11:41:59.180172
2014-12-08T18:18:34
2014-12-08T18:18:34
21,230,988
1
0
null
null
null
null
UTF-8
Java
false
false
8,036
java
package de.danoeh.antennapod.core.asynctask; import android.content.ContentResolver; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.media.MediaMetadataRetriever; import android.net.Uri; import android.util.Log; import com.squareup.picasso.Cache; import com.squareup.picasso.LruCache; import com.squareup.picasso.OkHttpDownloader; import com.squareup.picasso.Picasso; import com.squareup.picasso.Request; import com.squareup.picasso.RequestHandler; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * Provides access to Picasso instances. */ public class PicassoProvider { private static final String TAG = "PicassoProvider"; private static final boolean DEBUG = false; private static ExecutorService executorService; private static Cache memoryCache; private static synchronized ExecutorService getExecutorService() { if (executorService == null) { executorService = Executors.newFixedThreadPool(3); } return executorService; } private static synchronized Cache getMemoryCache(Context context) { if (memoryCache == null) { memoryCache = new LruCache(context); } return memoryCache; } private static volatile boolean picassoSetup = false; public static synchronized void setupPicassoInstance(Context appContext) { if (picassoSetup) { return; } Picasso picasso = new Picasso.Builder(appContext) .indicatorsEnabled(DEBUG) .loggingEnabled(DEBUG) .downloader(new OkHttpDownloader(appContext)) .addRequestHandler(new MediaRequestHandler(appContext)) .executor(getExecutorService()) .memoryCache(getMemoryCache(appContext)) .listener(new Picasso.Listener() { @Override public void onImageLoadFailed(Picasso picasso, Uri uri, Exception e) { Log.e(TAG, "Failed to load Uri:" + uri.toString()); e.printStackTrace(); } }) .build(); Picasso.setSingletonInstance(picasso); picassoSetup = true; } private static class MediaRequestHandler extends RequestHandler { final Context context; public MediaRequestHandler(Context context) { super(); this.context = context; } @Override public boolean canHandleRequest(Request data) { return StringUtils.equals(data.uri.getScheme(), PicassoImageResource.SCHEME_MEDIA); } @Override public Result load(Request data) throws IOException { Bitmap bitmap = null; MediaMetadataRetriever mmr = null; try { mmr = new MediaMetadataRetriever(); mmr.setDataSource(data.uri.getPath()); byte[] image = mmr.getEmbeddedPicture(); if (image != null) { bitmap = decodeStreamFromByteArray(data, image); } } catch (RuntimeException e) { Log.e(TAG, "Failed to decode image in media file", e); } finally { if (mmr != null) { mmr.release(); } } if (bitmap == null) { // check for fallback Uri String fallbackParam = data.uri.getQueryParameter(PicassoImageResource.PARAM_FALLBACK); if (fallbackParam != null) { Uri fallback = Uri.parse(fallbackParam); bitmap = decodeStreamFromFile(data, fallback); } } return new Result(bitmap, Picasso.LoadedFrom.DISK); } /* Copied/Adapted from Picasso RequestHandler classes */ private Bitmap decodeStreamFromByteArray(Request data, byte[] bytes) throws IOException { final BitmapFactory.Options options = createBitmapOptions(data); final ByteArrayInputStream in = new ByteArrayInputStream(bytes); in.mark(0); if (requiresInSampleSize(options)) { try { BitmapFactory.decodeStream(in, null, options); } finally { in.reset(); } calculateInSampleSize(data.targetWidth, data.targetHeight, options, data); } try { return BitmapFactory.decodeStream(in, null, options); } finally { IOUtils.closeQuietly(in); } } private Bitmap decodeStreamFromFile(Request data, Uri uri) throws IOException { ContentResolver contentResolver = context.getContentResolver(); final BitmapFactory.Options options = createBitmapOptions(data); if (requiresInSampleSize(options)) { InputStream is = null; try { is = contentResolver.openInputStream(uri); BitmapFactory.decodeStream(is, null, options); } finally { IOUtils.closeQuietly(is); } calculateInSampleSize(data.targetWidth, data.targetHeight, options, data); } InputStream is = contentResolver.openInputStream(uri); try { return BitmapFactory.decodeStream(is, null, options); } finally { IOUtils.closeQuietly(is); } } private BitmapFactory.Options createBitmapOptions(Request data) { final boolean justBounds = data.hasSize(); final boolean hasConfig = data.config != null; BitmapFactory.Options options = null; if (justBounds || hasConfig) { options = new BitmapFactory.Options(); options.inJustDecodeBounds = justBounds; if (hasConfig) { options.inPreferredConfig = data.config; } } return options; } private static boolean requiresInSampleSize(BitmapFactory.Options options) { return options != null && options.inJustDecodeBounds; } private static void calculateInSampleSize(int reqWidth, int reqHeight, BitmapFactory.Options options, Request request) { calculateInSampleSize(reqWidth, reqHeight, options.outWidth, options.outHeight, options, request); } private static void calculateInSampleSize(int reqWidth, int reqHeight, int width, int height, BitmapFactory.Options options, Request request) { int sampleSize = 1; if (height > reqHeight || width > reqWidth) { final int heightRatio; final int widthRatio; if (reqHeight == 0) { sampleSize = (int) Math.floor((float) width / (float) reqWidth); } else if (reqWidth == 0) { sampleSize = (int) Math.floor((float) height / (float) reqHeight); } else { heightRatio = (int) Math.floor((float) height / (float) reqHeight); widthRatio = (int) Math.floor((float) width / (float) reqWidth); sampleSize = request.centerInside ? Math.max(heightRatio, widthRatio) : Math.min(heightRatio, widthRatio); } } options.inSampleSize = sampleSize; options.inJustDecodeBounds = false; } } }
[ "daniel.oeh@gmail.com" ]
daniel.oeh@gmail.com
17b4bc51967a13ede6ab8846fa159472af3afbfa
760b2dd25d0c42c8a755384052bbc515da3ae183
/esb/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/edit/commands/MediatorFlow8CreateCommand.java
728fe62e84f8641686315c45f77548e42f0fe064
[ "Apache-2.0" ]
permissive
harshana05/developer-studio
56ee93a9a61857f224c56d0044dfc64540861148
55c128e5ceb73ddd454c1521de856c3fd13e3dba
refs/heads/master
2020-05-29T12:31:19.992369
2014-09-25T09:03:45
2014-09-25T09:03:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,834
java
package org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.commands; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.ecore.EObject; import org.eclipse.gmf.runtime.common.core.command.CommandResult; import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand; import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.gmf.runtime.notation.View; import org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory; import org.wso2.developerstudio.eclipse.gmf.esb.FilterFailContainer; import org.wso2.developerstudio.eclipse.gmf.esb.MediatorFlow; /** * @generated */ public class MediatorFlow8CreateCommand extends EditElementCommand { /** * @generated */ public MediatorFlow8CreateCommand(CreateElementRequest req) { super(req.getLabel(), null, req); } /** * FIXME: replace with setElementToEdit() * @generated */ protected EObject getElementToEdit() { EObject container = ((CreateElementRequest) getRequest()).getContainer(); if (container instanceof View) { container = ((View) container).getElement(); } return container; } /** * @generated */ public boolean canExecute() { FilterFailContainer container = (FilterFailContainer) getElementToEdit(); if (container.getMediatorFlow() != null) { return false; } return true; } /** * @generated */ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { MediatorFlow newElement = EsbFactory.eINSTANCE.createMediatorFlow(); FilterFailContainer owner = (FilterFailContainer) getElementToEdit(); owner.setMediatorFlow(newElement); doConfigure(newElement, monitor, info); ((CreateElementRequest) getRequest()).setNewElement(newElement); return CommandResult.newOKCommandResult(newElement); } /** * @generated */ protected void doConfigure(MediatorFlow newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException { IElementType elementType = ((CreateElementRequest) getRequest()).getElementType(); ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType); configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext()); configureRequest.addParameters(getRequest().getParameters()); ICommand configureCommand = elementType.getEditCommand(configureRequest); if (configureCommand != null && configureCommand.canExecute()) { configureCommand.execute(monitor, info); } } }
[ "harshana@wso2.com" ]
harshana@wso2.com
135cdb6caa68f7fbf7fa8357567df43985f2d0fc
27b88147aab9e9a3ae5534ea36ebf4e64fb10153
/lab09/src/hust/soict/hedspi/aims/media/DigitalVideoDisc.java
63db8e5459522515e3b53952bc8e954bdb5c344c
[]
no_license
hungnv281/OOLT.20202.20184115.NguyenVanHung
a75f2a28990933f38a70d4ae232957106fc47d4e
ae75486146a5833a53729813a9e0eee70fcabc2d
refs/heads/main
2023-05-02T09:27:11.480574
2021-05-18T06:44:19
2021-05-18T06:44:19
342,277,375
0
0
null
null
null
null
UTF-8
Java
false
false
1,415
java
package hust.soict.hedspi.aims.media; public class DigitalVideoDisc extends Disc implements Playable { public DigitalVideoDisc(String title, String category, float cost, int length, String director) { super(title, category, cost, length, director); // TODO Auto-generated constructor stub } public DigitalVideoDisc() { // TODO Auto-generated constructor stub } public String getDirector() { return director; } public void setDirector(String director) { this.director = director; } public int getLength() { return length; } public void setLength(int length) { this.length = length; } @Override public void play() { System.out.println("playing DVD : " + this.getTitle()); System.out.println("DVD length : " + this.getLength()); } public int compareTo(Object obj) { DigitalVideoDisc media = (DigitalVideoDisc)obj; if (media == null ) { System.out.println("Error !!!"); return -2; } if (this.cost > media.getCost()) { return 1; } else if ( this.cost < media.getCost()) { return -1; } else if ((this.cost == media.getCost()) && (this.length > media.getLength())) { return 1; } else if ((this.cost == media.getCost()) && (this.length < media.getLength())) { return -1; }else if (this.title.equals(media.getTitle())) { return 0; } else if (this.title.equals(media.getTitle()) ) { return 1; } else return -1; // return 0; } }
[ "=" ]
=
660a5d59a267bafed56358af3070fbf8b9a44eb3
8e13c338dec36021668e46798ff40c7ea9b6b065
/Mage.Sets/src/mage/cards/p/PretendersClaim.java
40bbfa3abd0ac93743303df7fe72740d4a087f8d
[ "MIT" ]
permissive
ninthworld/mage
c38aeeaa65a2a0afa908779b7c63ef2e1b1e413a
ba558f9a18032148a2936eedf874d90c97c7d46c
refs/heads/master
2022-07-29T23:17:30.439762
2022-07-02T22:20:41
2022-07-02T22:20:41
140,520,040
1
0
MIT
2018-07-11T04:08:35
2018-07-11T04:08:35
null
UTF-8
Java
false
false
2,892
java
package mage.cards.p; import java.util.List; import java.util.UUID; import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; import mage.abilities.Ability; import mage.abilities.common.BecomesBlockedAttachedTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AttachEffect; import mage.constants.Outcome; import mage.target.TargetPermanent; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; /** * * @author jeffwadsworth */ public final class PretendersClaim extends CardImpl { public PretendersClaim(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Whenever enchanted creature becomes blocked, tap all lands defending player controls. this.addAbility(new BecomesBlockedAttachedTriggeredAbility(new TapDefendingPlayerLandEffect(), false)); } private PretendersClaim(final PretendersClaim card) { super(card); } @Override public PretendersClaim copy() { return new PretendersClaim(this); } } class TapDefendingPlayerLandEffect extends OneShotEffect { public TapDefendingPlayerLandEffect() { super(Outcome.Tap); staticText = "tap all lands defending player controls"; } public TapDefendingPlayerLandEffect(final TapDefendingPlayerLandEffect effect) { super(effect); } @Override public boolean apply(Game game, Ability source) { Permanent aura = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (aura != null && aura.getAttachedTo() != null) { Player defendingPlayer = game.getPlayer(game.getCombat().getDefendingPlayerId(aura.getAttachedTo(), game)); if (defendingPlayer != null) { List<Permanent> permanents = game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND, defendingPlayer.getId(), game); for (Permanent land : permanents) { land.tap(source, game); } return true; } } return false; } @Override public TapDefendingPlayerLandEffect copy() { return new TapDefendingPlayerLandEffect(this); } }
[ "theelk801@gmail.com" ]
theelk801@gmail.com
d0877c9e13725df0b0db0f94533056e77c94c1c6
a422de59c29d077c512d66b538ff17d179cc077a
/hsxt/hsxt-common/src/main/java/com/gy/hsxt/common/exception/HsException.java
58a24be99666ff69d2d3d48e844e4d81c3b57ee0
[]
no_license
liveqmock/hsxt
c554e4ebfd891e4cc3d57e920d8a79ecc020b4dd
40bb7a1fe5c22cb5b4f1d700e5d16371a3a74c04
refs/heads/master
2020-03-28T14:09:31.939168
2018-09-12T10:20:46
2018-09-12T10:20:46
148,461,898
0
0
null
2018-09-12T10:19:11
2018-09-12T10:19:10
null
UTF-8
Java
false
false
3,783
java
/*************************************************************************** * This document contains confidential and proprietary information * subject to non-disclosure agreements with GUIYI Technology, Ltd. * This information shall not be distributed or copied without written * permission from GUIYI technology, Ltd. ***************************************************************************/ package com.gy.hsxt.common.exception; import org.apache.commons.lang3.StringUtils; import com.gy.hsxt.common.constant.IRespCode; import com.gy.hsxt.common.constant.RespCode; /*************************************************************************** * <PRE> * Project Name : hsxt-common * <p/> * Package Name : com.gy.hsxt * <p/> * File Name : HsException.java * <p/> * Creation Date : 2015-7-8 * <p/> * Author : yangjianguo * <p/> * Purpose : 通用异常类 * <p/> * <p/> * History : TODO * <p/> * </PRE> ***************************************************************************/ public class HsException extends RuntimeException { private static final long serialVersionUID = -6465404826204357739L; /** * 错误代码 */ private Integer errorCode; /** * 错误代码接口 */ private IRespCode respCode; public HsException() { super(); errorCode = RespCode.UNKNOWN.getCode(); respCode = RespCode.UNKNOWN; } /** * 该构造方法已经被遗弃 * * @param errorCode * 错误代码 * @deprecated Please use {@link HsException#HsException(IRespCode)} * instead. */ @Deprecated public HsException(int errorCode) { super(); this.errorCode = errorCode; } /** * 该构造方法已被遗弃 * * @param errorCode * 错误代码 * @param message * 消息 */ public HsException(int errorCode, String message) { super(message); this.errorCode = errorCode; } /** * 添加构造方法 * * @param respCode * 错误代码枚举类型 * @author LiZhi Peter * @see 2015-12-21 */ public HsException(IRespCode respCode) { super(respCode.getDesc()); this.errorCode = respCode.getCode(); this.respCode = respCode; } /** * 构造方法 * * @param respCode * 错误代码 * @param message * 默认消息 */ public HsException(IRespCode respCode, String message) { super(StringUtils.isNotBlank(message) ? message : respCode.getDesc()); this.respCode = respCode; this.errorCode = respCode.getCode(); } public Integer getErrorCode() { if (respCode != null) { return respCode.getCode(); } return errorCode; } public void setErrorCode(Integer errorCode) { this.errorCode = errorCode; } public IRespCode getRespCode() { return respCode; } public void setRespCode(IRespCode respCode) { this.respCode = respCode; } @Override public String toString() { StringBuilder messageBuilder = new StringBuilder(getClass().getName()); messageBuilder.append(":"); if (respCode == null) { messageBuilder.append(this.errorCode); } else { messageBuilder.append(respCode.getCode()).append(":").append(respCode.name()); } String message = getLocalizedMessage(); return StringUtils.isNotBlank(message) ? messageBuilder.append(":").append(message).toString() : messageBuilder .toString(); } }
[ "864201042@qq.com" ]
864201042@qq.com
b01971d199e70c003b11d608bca3908698b749a5
da0efa8ffd08b86713aad007f10794c4b04d8267
/com/telkom/mwallet/coupon/C1462e.java
7e4b55b8725bafa975e26bb02969bf5895a05cb6
[]
no_license
ibeae/tcash
e200c209c63fdfe63928b94846824d7091533f8a
4bd25deb63ea7605202514f6a405961a14ef2553
refs/heads/master
2020-05-05T13:09:34.582260
2017-09-07T06:19:19
2017-09-07T06:19:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,601
java
package com.telkom.mwallet.coupon; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; import com.telkom.mwallet.R; import com.telkom.mwallet.dialog.p063a.C1326f; import com.telkom.mwallet.tcash.fragment.C1386e; public class C1462e extends C1386e { private static final String f3435a = C1462e.class.getSimpleName(); private Button f3436b; private String f3437c = null; private CouponRedeemNFCActivity f3438j; private OnClickListener f3439k = new C14601(this); private C1326f f3440l = new C14612(this); class C14601 implements OnClickListener { final /* synthetic */ C1462e f3433a; C14601(C1462e c1462e) { this.f3433a = c1462e; } public void onClick(View view) { switch (view.getId()) { case R.id.coupon_redeem_topin_button: this.f3433a.f3438j.startActivityForResult(new Intent(this.f3433a.f3438j, CouponRedeemPINActivity.class), 3); return; default: return; } } } class C14612 implements C1326f { final /* synthetic */ C1462e f3434a; C14612(C1462e c1462e) { this.f3434a = c1462e; } public void mo1485a() { if (this.f3434a.f != null) { this.f3434a.f.dismiss(); } } public void mo1486b() { } } public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.activity_coupon_redeem_nfc, null); m5208c(R.string.title_couponlist); this.f3438j = (CouponRedeemNFCActivity) getActivity(); String stringExtra = this.f3438j.getIntent().getStringExtra("PIN_REDEEM"); this.f3436b = (Button) inflate.findViewById(R.id.coupon_redeem_topin_button); View view = (TextView) inflate.findViewById(R.id.coupon_redeem_topin_text); if ("N".equalsIgnoreCase(stringExtra)) { this.f3436b.setVisibility(8); view.setVisibility(8); } else { this.f3436b.setOnClickListener(this.f3439k); } this.h.m4932a(this.f3438j, (TextView) inflate.findViewById(R.id.coupon_code_text), 2); this.h.m4932a(this.f3438j, this.f3436b, 2); this.h.m4932a(this.f3438j, view, 2); return inflate; } }
[ "igedetirtanata@gmail.com" ]
igedetirtanata@gmail.com
01991f40b42a52fd1c28217e667cc7f365e3ad23
de3a3b121bb58900134eec13c702509109015843
/src/main/java/com/xnjr/mall/api/impl/XN808265.java
03151d2622fbd6c4a48a66945546697a3a6f3802
[]
no_license
yiwocao2017/cswstdmall
8d422afef6ba338fe5db34683c115b30c03336ff
ad2c10994e7d844429cd74131e903e7b326000e9
refs/heads/master
2022-06-27T13:59:26.488189
2019-07-01T06:30:05
2019-07-01T06:30:05
194,613,061
0
0
null
2022-06-17T02:17:53
2019-07-01T06:30:04
Java
UTF-8
Java
false
false
2,047
java
/** * @Title XN808228.java * @Package com.xnjr.mall.api.impl * @Description * @author haiqingzheng * @date 2016年12月18日 下午11:28:37 * @version V1.0 */ package com.xnjr.mall.api.impl; import org.apache.commons.lang3.StringUtils; import com.xnjr.mall.ao.IUserTicketAO; import com.xnjr.mall.api.AProcessor; import com.xnjr.mall.common.JsonUtil; import com.xnjr.mall.core.StringValidater; import com.xnjr.mall.domain.UserTicket; import com.xnjr.mall.dto.req.XN808265Req; import com.xnjr.mall.exception.BizException; import com.xnjr.mall.exception.ParaException; import com.xnjr.mall.spring.SpringContextHolder; /** * 我的折扣券分页查询 * @author: haiqingzheng * @since: 2016年12月18日 下午11:28:37 * @history: */ public class XN808265 extends AProcessor { private IUserTicketAO userTicketAO = SpringContextHolder .getBean(IUserTicketAO.class); private XN808265Req req = null; /** * @see com.xnjr.mall.api.IProcessor#doBusiness() */ @Override public Object doBusiness() throws BizException { UserTicket condition = new UserTicket(); condition.setUserId(req.getUserId()); condition.setStoreCode(req.getStoreCode()); condition.setStatus(req.getStatus()); String orderColumn = req.getOrderColumn(); if (StringUtils.isBlank(orderColumn)) { orderColumn = IUserTicketAO.DEFAULT_ORDER_COLUMN; } condition.setOrder(orderColumn, req.getOrderDir()); int start = StringValidater.toInteger(req.getStart()); int limit = StringValidater.toInteger(req.getLimit()); return userTicketAO.queryUserTicketPage(start, limit, condition); } /** * @see com.xnjr.mall.api.IProcessor#doCheck(java.lang.String) */ @Override public void doCheck(String inputparams) throws ParaException { req = JsonUtil.json2Bean(inputparams, XN808265Req.class); StringValidater.validateBlank(req.getUserId(), req.getStart(), req.getLimit()); } }
[ "admin@yiwocao.com" ]
admin@yiwocao.com
0c4fe9abfa4d588ac771d11fc0adf14222b03368
cf18c1d3e78706b95120a37f5c30a802e39efde7
/syh_mall/src/main/java/com/visionet/syh_mall/repository/cart/ShopCartRepository.java
c6e4628e99cb725c9e80e937eee06bc43f996fc5
[]
no_license
JavaLeeLi/shscce_syh
c31447ebc4aa5b1a555a7e99567ffe8459664e87
2ccc815aabfe23051a305964170310a1e8a9f4c1
refs/heads/master
2021-04-15T09:47:24.389650
2018-03-27T03:07:08
2018-03-27T03:07:08
126,915,503
0
2
null
null
null
null
UTF-8
Java
false
false
925
java
package com.visionet.syh_mall.repository.cart; import java.util.List; import org.springframework.data.jpa.repository.Query; import com.visionet.syh_mall.entity.cart.ShopCart; import com.visionet.syh_mall.repository.BaseRepository; /** * 购物车Dao层 * @author mulongfei * @date 2017年8月31日上午10:16:50 */ public interface ShopCartRepository extends BaseRepository<ShopCart, String> { @Query(value="FROM ShopCart s WHERE s.userId=?1 AND s.goodsId=?2 AND s.isDeleted=0") List<ShopCart> findOne(String UserId,String GoodId); @Query(value="FROM ShopCart s WHERE s.userId=?1 AND s.isDeleted=0") List<ShopCart> findAll(String UserId); @Query(value="FROM ShopCart s WHERE s.userId=?1 AND s.goodsId=?2 AND s.isDeleted=0") ShopCart findByUserIdAndGoodId(String userId,String goodId); @Query(value="SELECT COUNT(1) FROM ShopCart s WHERE s.userId=?1 AND s.isDeleted=0") int findByUserId(String userId); }
[ "liym@visionet.com.cn" ]
liym@visionet.com.cn
b23854fd33510b46f9a5016984566b753dda3d8a
f9a9fd3f1e18c2f2cabcc2f0ebc225b1b25de60e
/app/src/main/java/com/ming/sjll/my/fragment/CollectionProjectFragemt.java
889163dd1cc898ce4b60dbf91a9ec25c69afd5cd
[]
no_license
15307388990/SJLL
273541dfa40f8a3a92e88890941ed68a5cd129d5
e4dd377d6408b6c28e6683843cc4f39c11f2442b
refs/heads/master
2020-08-03T04:27:46.225903
2019-11-23T02:41:32
2019-11-23T02:41:32
211,624,684
1
0
null
null
null
null
UTF-8
Java
false
false
2,398
java
package com.ming.sjll.my.fragment; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import com.chad.library.adapter.base.BaseQuickAdapter; import com.ming.sjll.R; import com.ming.sjll.base.fragment.MvpFragment; import com.ming.sjll.base.widget.ToastShow; import com.ming.sjll.my.adapter.CollectionGoodsAdapter; import com.ming.sjll.my.bean.ColletionGoodsBean; import com.ming.sjll.my.presenter.ColletionGoodsPresenter; import com.ming.sjll.my.presenter.ColletionProjectPresenter; import com.ming.sjll.my.view.ColletionGoodslView; import com.ming.sjll.my.view.ColletionProjectlView; import com.ming.sjll.supplier.adapter.Comprehendapter; import com.ming.sjll.supplier.bean.ComprehenBean; import butterknife.BindView; /** * @author luoming * created at 2019-10-14 10:32 * 收藏 项目 */ public class CollectionProjectFragemt extends MvpFragment<ColletionProjectlView, ColletionProjectPresenter> implements ColletionProjectlView { @BindView(R.id.recyclerview) RecyclerView recyclerview; public static CollectionProjectFragemt newInstance() { CollectionProjectFragemt projectManagementFragemt = new CollectionProjectFragemt(); return projectManagementFragemt; } @Override protected void onCreateView(Bundle savedInstanceState) { super.onCreateView(savedInstanceState); setContentView(R.layout.fragemt_recycle); } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); } @Override protected ColletionProjectPresenter createPresenter() { return new ColletionProjectPresenter(); } @Override public void showLoading(String msg) { } @Override public void hideLoading() { } @Override public void showError(String msg) { ToastShow.s(msg); } @Override public void onDestroyView() { super.onDestroyView(); } @Override public void ShowData(ComprehenBean pBean) { recyclerview.setLayoutManager(new LinearLayoutManager(getActivity())); Comprehendapter comprehendapter=new Comprehendapter(pBean.getData().getData()); recyclerview.setAdapter(comprehendapter); } }
[ "lan.sha@163.com" ]
lan.sha@163.com
70d6b82b0c476527c66fb3a40dd13ab126de7a8e
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/geometer_FBReaderJ/third-party/android-filechooser/code/src/group/pals/android/lib/ui/filechooser/io/localfile/LocalFile.java
6ddb96f27718bde526b24a62bd491d180597ff92
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,974
java
// isComment package group.pals.android.lib.ui.filechooser.io.localfile; import group.pals.android.lib.ui.filechooser.io.IFile; import group.pals.android.lib.ui.filechooser.utils.history.History; import java.io.File; import java.util.List; import android.os.Parcel; import android.os.Parcelable; /** * isComment */ public class isClassOrIsInterface extends File implements IFile { /** * isComment */ private static final long isVariable = isStringConstant; public isConstructor(String isParameter) { super(isNameExpr); } public isConstructor(File isParameter) { this(isNameExpr.isMethod()); } // isComment @Override public IFile isMethod() { return isMethod() == null ? null : new ParentFile(isMethod()); } // isComment public String isMethod() { return isMethod(); } // isComment /** * isComment */ @Override public boolean isMethod(Object isParameter) { return this == isNameExpr; } @Override public boolean isMethod(IFile isParameter) { return isNameExpr == null ? true : isMethod().isMethod(isNameExpr.isMethod()); } // isComment @Override public IFile isMethod() { return new LocalFile(isMethod()); } /*isComment*/ @Override public int isMethod() { // isComment return isIntegerConstant; } @Override public void isMethod(Parcel isParameter, int isParameter) { isNameExpr.isMethod(isMethod()); } public static final Parcelable.Creator<LocalFile> isVariable = new Parcelable.Creator<LocalFile>() { public LocalFile isMethod(Parcel isParameter) { return new LocalFile(isNameExpr); } public LocalFile[] isMethod(int isParameter) { return new LocalFile[isNameExpr]; } }; private isConstructor(Parcel isParameter) { this(isNameExpr.isMethod()); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
7c3cb3c5db24fa8f0e6268bd0b4bf79139883119
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/C12920jJ.java
63438761f4312e3a740f27827262216e2a8c7ba0
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
4,644
java
package X; import android.content.Context; import android.view.ActionMode; import android.view.Menu; import android.view.MenuInflater; import android.view.View; import java.lang.ref.WeakReference; /* renamed from: X.0jJ reason: invalid class name and case insensitive filesystem */ public class C12920jJ extends ActionMode { public final Context A00; public final AbstractC06110Rt A01; public C12920jJ(Context context, AbstractC06110Rt r2) { this.A00 = context; this.A01 = r2; } public void finish() { this.A01.A00(); } public View getCustomView() { AbstractC06110Rt r1 = this.A01; if (!(r1 instanceof AnonymousClass1ZM)) { WeakReference weakReference = ((AnonymousClass0V6) r1).A01; if (weakReference != null) { return (View) weakReference.get(); } return null; } WeakReference weakReference2 = ((AnonymousClass1ZM) r1).A04; if (weakReference2 != null) { return (View) weakReference2.get(); } return null; } public Menu getMenu() { AnonymousClass0T8 r1; Context context = this.A00; AbstractC06110Rt r12 = this.A01; if (!(r12 instanceof AnonymousClass1ZM)) { r1 = ((AnonymousClass0V6) r12).A03; } else { r1 = ((AnonymousClass1ZM) r12).A02; } return new AnonymousClass1ZY(context, r1); } public MenuInflater getMenuInflater() { AbstractC06110Rt r1 = this.A01; if (!(r1 instanceof AnonymousClass1ZM)) { return new C12950jM(((AnonymousClass0V6) r1).A02); } return new C12950jM(((AnonymousClass1ZM) r1).A03.getContext()); } public CharSequence getSubtitle() { AbstractC06110Rt r1 = this.A01; if (!(r1 instanceof AnonymousClass1ZM)) { return ((AnonymousClass0V6) r1).A04.A09.A08; } return ((AnonymousClass1ZM) r1).A03.A08; } public Object getTag() { return this.A01.A00; } public CharSequence getTitle() { AbstractC06110Rt r1 = this.A01; if (!(r1 instanceof AnonymousClass1ZM)) { return ((AnonymousClass0V6) r1).A04.A09.A09; } return ((AnonymousClass1ZM) r1).A03.A09; } public boolean getTitleOptionalHint() { return this.A01.A01; } public void invalidate() { this.A01.A01(); } public boolean isTitleOptional() { AbstractC06110Rt r1 = this.A01; if (r1 instanceof AnonymousClass1ZM) { return ((AnonymousClass1ZM) r1).A03.A0A; } if (!(r1 instanceof AnonymousClass0V6)) { return false; } return ((AnonymousClass0V6) r1).A04.A09.A0A; } public void setCustomView(View view) { this.A01.A02(view); } @Override // android.view.ActionMode public void setSubtitle(int i) { AbstractC06110Rt r2 = this.A01; if (!(r2 instanceof AnonymousClass1ZM)) { AnonymousClass0V6 r22 = (AnonymousClass0V6) r2; r22.A03(r22.A04.A01.getResources().getString(i)); return; } AnonymousClass1ZM r23 = (AnonymousClass1ZM) r2; r23.A03.setSubtitle(r23.A00.getString(i)); } @Override // android.view.ActionMode public void setSubtitle(CharSequence charSequence) { this.A01.A03(charSequence); } public void setTag(Object obj) { this.A01.A00 = obj; } @Override // android.view.ActionMode public void setTitle(int i) { AbstractC06110Rt r2 = this.A01; if (!(r2 instanceof AnonymousClass1ZM)) { AnonymousClass0V6 r22 = (AnonymousClass0V6) r2; r22.A04(r22.A04.A01.getResources().getString(i)); return; } AnonymousClass1ZM r23 = (AnonymousClass1ZM) r2; r23.A03.setTitle(r23.A00.getString(i)); } @Override // android.view.ActionMode public void setTitle(CharSequence charSequence) { this.A01.A04(charSequence); } public void setTitleOptionalHint(boolean z) { AbstractC06110Rt r1 = this.A01; if (r1 instanceof AnonymousClass1ZM) { AnonymousClass1ZM r12 = (AnonymousClass1ZM) r1; ((AbstractC06110Rt) r12).A01 = z; r12.A03.setTitleOptional(z); } else if (!(r1 instanceof AnonymousClass0V6)) { r1.A01 = z; } else { AnonymousClass0V6 r13 = (AnonymousClass0V6) r1; ((AbstractC06110Rt) r13).A01 = z; r13.A04.A09.setTitleOptional(z); } } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
a224e7233230de68e5053f75a8cd08d893ed5742
5d5c2688698a2d6689c1d635724b550b31224c86
/extlib/lwp/product/runtime/eclipse/plugins/com.ibm.xsp.extlib.controls/src/com/ibm/xsp/extlib/component/dojo/form/UIDojoRangeBoundTextBox.java
e26e034ba68486a287e4a92d0fe7fd3160a92d6f
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-other-permissive", "MIT", "CDDL-1.1", "LicenseRef-scancode-public-domain" ]
permissive
OpenNTF/XPagesExtensionLibrary
6bffba4bd5eab5b148a3b4d700da244aab053743
25b3b1df7fafb7ceb131e07ade93de5c9ff733d5
refs/heads/master
2020-04-15T16:12:15.910509
2020-03-11T11:49:17
2020-03-11T11:49:17
26,643,618
21
35
Apache-2.0
2019-03-25T12:55:44
2014-11-14T15:08:35
Java
WINDOWS-1252
Java
false
false
1,719
java
/* * © Copyright IBM Corp. 2010 * * 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.ibm.xsp.extlib.component.dojo.form; import javax.faces.context.FacesContext; import javax.faces.el.ValueBinding; public class UIDojoRangeBoundTextBox extends UIDojoMappedTextBox { // RangeBoundTextBox private String rangeMessage; public UIDojoRangeBoundTextBox() { } public String getRangeMessage() { if (null != this.rangeMessage) { return this.rangeMessage; } ValueBinding _vb = getValueBinding("rangeMessage"); //$NON-NLS-1$ if (_vb != null) { return (java.lang.String) _vb.getValue(FacesContext.getCurrentInstance()); } else { return null; } } public void setRangeMessage(String rangeMessage) { this.rangeMessage = rangeMessage; } // State management @Override public void restoreState(FacesContext _context, Object _state) { Object _values[] = (Object[]) _state; super.restoreState(_context, _values[0]); this.rangeMessage = (String)_values[1]; } @Override public Object saveState(FacesContext _context) { Object _values[] = new Object[2]; _values[0] = super.saveState(_context); _values[1] = rangeMessage; return _values; } }
[ "padraic.edwards@ie.ibm.com" ]
padraic.edwards@ie.ibm.com
8dfbfe49aa4eb9f2ab27d264d8f961f9e856b322
208ba847cec642cdf7b77cff26bdc4f30a97e795
/fg/fc/src/main/java/org.wp.fc/util/GravatarUtils.java
2d9beae719a7a6a0d9910cb6503b8420d77b3c27
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
3,025
java
package org.wp.fc.util; import android.text.TextUtils; /** * see https://en.gravatar.com/site/implement/images/ */ public class GravatarUtils { // by default tell gravatar to respond to non-existent images with a 404 - this means // it's up to the caller to catch the 404 and provide a suitable default image private static final DefaultImage DEFAULT_GRAVATAR = DefaultImage.STATUS_404; public static enum DefaultImage { MYSTERY_MAN, STATUS_404, IDENTICON, MONSTER, WAVATAR, RETRO, BLANK; @Override public String toString() { switch (this) { case MYSTERY_MAN: return "mm"; case STATUS_404: return "404"; case IDENTICON: return "identicon"; case MONSTER: return "monsterid"; case WAVATAR: return "wavatar"; case RETRO: return "retro"; default: return "blank"; } } } /* * gravatars often contain the ?s= parameter which determines their size - detect this and * replace it with a new ?s= parameter which requests the avatar at the exact size needed */ public static String fixGravatarUrl(final String imageUrl, int avatarSz) { return fixGravatarUrl(imageUrl, avatarSz, DEFAULT_GRAVATAR); } public static String fixGravatarUrl(final String imageUrl, int avatarSz, DefaultImage defaultImage) { if (TextUtils.isEmpty(imageUrl)) { return ""; } // if this isn't a gravatar image, return as resized photon image url if (!imageUrl.contains("gravatar.com")) { return PhotonUtils.getPhotonImageUrl(imageUrl, avatarSz, avatarSz); } // remove all other params, then add query string for size and default image return UrlUtils.removeQuery(imageUrl) + "?s=" + avatarSz + "&d=" + defaultImage.toString(); } public static String gravatarFromEmail(final String email, int size) { return gravatarFromEmail(email, size, DEFAULT_GRAVATAR); } public static String gravatarFromEmail(final String email, int size, DefaultImage defaultImage) { return "http://gravatar.com/avatar/" + StringUtils.getMd5Hash(StringUtils.notNullStr(email)) + "?d=" + defaultImage.toString() + "&size=" + Integer.toString(size); } public static String blavatarFromUrl(final String url, int size) { return blavatarFromUrl(url, size, DEFAULT_GRAVATAR); } public static String blavatarFromUrl(final String url, int size, DefaultImage defaultImage) { return "http://gravatar.com/blavatar/" + StringUtils.getMd5Hash(UrlUtils.getHost(url)) + "?d=" + defaultImage.toString() + "&size=" + Integer.toString(size); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
5001d9931eb38a46e2e0aea93a77157da2b3ec85
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/AbstractC05020Mv.java
e9e1b7825aed4b37a82bb46b45647190444a5a5f
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
180
java
package X; /* renamed from: X.0Mv reason: invalid class name and case insensitive filesystem */ public interface AbstractC05020Mv { byte[] A39(byte[] bArr, int i, int i2); }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
374139f2be6024ff40f01d37008e0b3333a23d8b
9a9fcafa9bbc28c9f1930e01c46af8f023955aea
/JavaEE就业班面向对象IO阶段/day12/code/day12/src/cn/itcast04/print/PrintDemo.java
3f3b4bdbbff44c86339643c89298b4a52a64b6c5
[]
no_license
zhengbingyanbj/JavaSE
84cd450ef5525050809c78a8b6660b9495c072db
671ac02dcafe81d425c3c191c313b6040e8ae557
refs/heads/master
2021-09-01T18:20:49.082475
2017-12-28T07:13:30
2017-12-28T07:13:30
115,139,599
0
0
null
null
null
null
GB18030
Java
false
false
875
java
package cn.itcast04.print; import java.io.FileNotFoundException; import java.io.IOException; import java.io.PrintWriter; /* * * PrintStream 字节打印流 * System.out 是一个通道 从程序 通向 控制台的 一个通道 * PrintWriter 字符打印流 也是一个字符输出流 * * print() 直接输出 println()输出后换行 * * write() 输出 * * print println可以写任何类型 * write写的范围小 * * */ public class PrintDemo { public static void main(String[] args) throws IOException { // System.out.println(); //创建字符输出流对象 PrintWriter pw = new PrintWriter("nba.txt");//通向哪里 数据就到哪里 //写数据 pw.write("凯文杜软特"); pw.println(new Object()); pw.print(true); //释放资源 pw.close(); } }
[ "zhengbingyanbj@163.com" ]
zhengbingyanbj@163.com
5d2a2fdcd054ee09084199dca5120d8042ea6681
65ffeaba767291afbab6ca6ea0c6aa82c27217dc
/testng.integration/src/test/java/com/github/toy/constructor/testng/integration/test/ignored/IgnoredStubTest.java
ca8126894b1e968cd7824da84a80ad32defa762a
[]
no_license
TikhomirovSergey/toy.constructor
cac0dd3599b07bb6ec4fbe16ea54c2878987786e
1c5ceae47bea68f37356f92f8f4d9827231fd831
refs/heads/master
2021-01-20T07:57:29.177684
2018-07-17T17:16:20
2018-07-17T17:16:20
90,073,743
1
2
null
null
null
null
UTF-8
Java
false
false
1,337
java
package com.github.toy.constructor.testng.integration.test.ignored; import com.github.toy.constructor.testng.integration.test.BaseTestNgIntegrationTest; import org.testng.annotations.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; @Ignore public class IgnoredStubTest extends BaseTestNgIntegrationTest { @BeforeSuite public static void beforeSuiteStatic3() { //does nothing } @BeforeSuite public void beforeSuiteObject3() { //does nothing } @BeforeTest public static void beforeTestStatic3() { //does nothing } @BeforeTest public void beforeTestObject3() { //does nothing } @BeforeClass public static void beforeClassStatic3() { //does nothing } @BeforeClass public void beforeClassObject3() { //does nothing } @BeforeMethod public static void beforeMethodStatic3() { //does nothing } @BeforeMethod public void beforeMethodObject3() { //does nothing } @Test public void someEmptyTest() { assertThat(true, is(true)); } @Test public void someEmptyTest2() { assertThat(false, is(false)); } @Test public void someEmptyTest3() { assertThat(true, is(true)); } }
[ "tichomirovsergey@gmail.com" ]
tichomirovsergey@gmail.com
f915a3320149d8c7768c6384d07b25109f562101
10d77fabcbb945fe37e15ae438e360a89a24ea05
/graalvm/transactions/fork/narayana/qa/tests/src/org/jboss/jbossts/qa/PerfProfile01Clients/Client_ExplicitObject_TranCommit_TranRollbackNullOper.java
abd05436fd3e5919ae634649d1e2215ee16fbef2
[ "Apache-2.0", "LGPL-2.1-only", "LGPL-2.1-or-later", "LicenseRef-scancode-other-copyleft" ]
permissive
nmcl/scratch
1a881605971e22aa300487d2e57660209f8450d3
325513ea42f4769789f126adceb091a6002209bd
refs/heads/master
2023-03-12T19:56:31.764819
2023-02-05T17:14:12
2023-02-05T17:14:12
48,547,106
2
1
Apache-2.0
2023-03-01T12:44:18
2015-12-24T15:02:58
Java
UTF-8
Java
false
false
3,815
java
/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. * See the copyright.txt in the distribution for a * full listing of individual contributors. * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU Lesser General Public License, v. 2.1. * This program is distributed in the hope that it will be useful, but WITHOUT A * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License, * v.2.1 along with this distribution; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * (C) 2005-2006, * @author JBoss Inc. */ // // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 // // Arjuna Technologies Ltd., // Newcastle upon Tyne, // Tyne and Wear, // UK. // package org.jboss.jbossts.qa.PerfProfile01Clients; /* * Copyright (C) 1999-2001 by HP Bluestone Software, Inc. All rights Reserved. * * HP Arjuna Labs, * Newcastle upon Tyne, * Tyne and Wear, * UK. * * $Id: Client_ExplicitObject_TranCommit_TranRollbackNullOper.java,v 1.2 2003/06/26 11:44:19 rbegg Exp $ */ /* * Try to get around the differences between Ansi CPP and * K&R cpp with concatenation. */ /* * Copyright (C) 1999-2001 by HP Bluestone Software, Inc. All rights Reserved. * * HP Arjuna Labs, * Newcastle upon Tyne, * Tyne and Wear, * UK. * * $Id: Client_ExplicitObject_TranCommit_TranRollbackNullOper.java,v 1.2 2003/06/26 11:44:19 rbegg Exp $ */ import com.arjuna.ats.jts.extensions.AtomicTransaction; import org.jboss.jbossts.qa.PerfProfile01.*; import org.jboss.jbossts.qa.Utils.*; import java.util.Date; public class Client_ExplicitObject_TranCommit_TranRollbackNullOper { public static void main(String[] args) { try { ORBInterface.initORB(args, null); OAInterface.initOA(); String prefix = args[args.length - 3]; int numberOfCalls = Integer.parseInt(args[args.length - 2]); String explicitObjectIOR = ServerIORStore.loadIOR(args[args.length - 1]); ExplicitObject explicitObject = ExplicitObjectHelper.narrow(ORBInterface.orb().string_to_object(explicitObjectIOR)); boolean correct = true; Date start = new Date(); for (int index = 0; index < numberOfCalls; index++) { AtomicTransaction atomicTransaction = new AtomicTransaction(); atomicTransaction.begin(); explicitObject.tran_rollback_nulloper(OTS.current().get_control()); atomicTransaction.commit(true); } Date end = new Date(); float operationDuration = ((float) (end.getTime() - start.getTime())) / ((float) numberOfCalls); System.err.println("Operation duration : " + operationDuration + "ms"); System.err.println("Test duration : " + (end.getTime() - start.getTime()) + "ms"); correct = PerformanceProfileStore.checkPerformance(prefix + "_ExplicitObject_TranCommit_TranRollbackNullOper", operationDuration); if (correct) { System.out.println("Passed"); } else { System.out.println("Failed"); } } catch (Exception exception) { System.out.println("Failed"); System.err.println("Client_ExplicitObject_TranCommit_TranRollbackNullOper.main: " + exception); exception.printStackTrace(System.err); } try { OAInterface.shutdownOA(); ORBInterface.shutdownORB(); } catch (Exception exception) { System.err.println("Client_ExplicitObject_TranCommit_TranRollbackNullOper.main: " + exception); exception.printStackTrace(System.err); } } }
[ "mlittle@redhat.com" ]
mlittle@redhat.com
3811e83cb7da5acd94ef5c920b3e5762039f6bbe
c3e730d86586b2f7b58dd27a3b494d2c9970f0f0
/ndisconf-server/src/main/java/com/nsb/ndisconf/server/disconf/web/service/role/service/impl/RoleMgrImpl.java
9f5f8c8d7ac5e55605ccc716e50b3cd99fe975d6
[ "Apache-2.0" ]
permissive
Dorae132/ndisconf
0be3f1b86936e20d60d5a35ed52094993b26927c
e6d84e1fbfb0f3d8b610d60cb6ec2e3f02639fba
refs/heads/master
2020-03-22T10:52:40.036660
2018-10-23T03:34:39
2018-10-23T03:34:39
139,933,310
3
0
null
2018-10-23T03:34:40
2018-07-06T04:31:20
Java
UTF-8
Java
false
false
713
java
package com.nsb.ndisconf.server.disconf.web.service.role.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.nsb.ndisconf.server.disconf.web.service.role.bo.Role; import com.nsb.ndisconf.server.disconf.web.service.role.dao.RoleDao; import com.nsb.ndisconf.server.disconf.web.service.role.service.RoleMgr; /** * */ @Service public class RoleMgrImpl implements RoleMgr { @Autowired private RoleDao roleDao; @Override public Role get(Integer roleId) { return roleDao.get(roleId); } @Override public List<Role> findAll() { return roleDao.findAll(); } }
[ "nsb_2017@163.com" ]
nsb_2017@163.com
c785b22567fa1ff3d3eea1609c1e0d8d22035449
5440c44721728e87fb827fb130b1590b25f24989
/GPP/clientes/ClienteImportacaoUsuarioNDSPortalGPP.java
7a3c197843ab67a597c0d7335e85544251882979
[]
no_license
amigosdobart/gpp
b36a9411f39137b8378c5484c58d1023c5e40b00
b1fec4e32fa254f972a0568fb7ebfac7784ecdc2
refs/heads/master
2020-05-15T14:20:11.462484
2019-04-19T22:34:54
2019-04-19T22:34:54
182,328,708
0
0
null
null
null
null
UTF-8
Java
false
false
1,719
java
// Cliente que envia bonus por chamada sainte com CSP 14 - Bonus Toma La Da Ca package clientes; import com.brt.gpp.componentes.processosBatch.orb.*; public class ClienteImportacaoUsuarioNDSPortalGPP { public ClienteImportacaoUsuarioNDSPortalGPP ( ) { } public static void main(String[] args) { java.util.Properties props = System.getProperties(); props.put("vbroker.agent.port", args[0]); props.put("vbroker.agent.addr", args[1]); System.setProperties ( props ); // Inicializando o ORB org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, props); byte[] managerId = "ComponenteNegociosProcessosBatch".getBytes(); processosBatch pPOA = processosBatchHelper.bind(orb, "/AtivaComponentesPOA", managerId); short retValue=0; try { retValue = pPOA.importaUsuarioPortalNDS(); if (retValue == 0) System.out.println ("Metodo de importacao executado com sucesso..."); else System.out.println ("Metodo de importacao executado com erro..."); System.exit(retValue); } catch (Exception e) { System.out.println ("Metodo remoto de importacao de Usuarios executado com erro..."); System.out.println("Erro:" + e); System.exit(retValue); } } public static void menuOpcoes ( ) { // int userOption; System.out.println ("\n\n"); System.out.println ("+--------------------------------------------------------------------+"); System.out.println ("+ Sistema de Teste de Importacao de Usuarios do NDS para o Portal +"); System.out.println ("+--------------------------------------------------------------------+\n"); System.out.println (" Procesando ....."); System.out.print (" Fim do Processo "); System.out.print ("\n"); } }
[ "lucianovilela@gmail.com" ]
lucianovilela@gmail.com
0faaf4c84dbed787c68f9736e2028068cbdae822
c343a0ef45405fb447d6a8735509efe2c1d6febf
/ServerCode-Pucho/main-service/src/main/java/com/pucho/service/NotificationService.java
092b6f414d2091785925aaf7e2d97328461ab18a
[]
no_license
MouleshS/SamplesAndroid
89fcc15efb707e63fcf01adf5b02a33f9a5f39c4
8342cc4a5d596a4ac33db12a3c2aa4ef3aaea83e
refs/heads/master
2020-03-18T21:02:51.889155
2018-05-26T16:50:58
2018-05-26T16:50:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
300
java
package com.pucho.service; import com.pucho.domain.Answer; import com.pucho.domain.Question; /** * Created by dinesh.rathore on 27/09/15. */ public interface NotificationService { public void notificationRequest(Question question); public void notificationRequest(Answer answer); }
[ "raghunandankavi2010@gmail.com" ]
raghunandankavi2010@gmail.com
a8a720cdab116faaa962b09aa6c6458a482b112d
902564d740bee866d7798df985a25f0f664f6240
/src/trunk/mywar-game-msgbody/src/main/java/com/fantingame/game/msgbody/client/mail/MailAction_deleteRes.java
5c9d0fc3b39b485d96ad549b5e0c57a73a34f2b9
[]
no_license
hw233/Server-java
539b416821ad67d22120c7146b4c3c7d4ad15929
ff74787987f146553684bd823d6bd809eb1e27b6
refs/heads/master
2020-04-29T04:46:03.263306
2016-05-20T12:45:44
2016-05-20T12:45:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
package com.fantingame.game.msgbody.client.mail; import com.fantingame.game.msgbody.common.io.iface.IXInputStream; import com.fantingame.game.msgbody.common.io.iface.IXOutStream; import com.fantingame.game.msgbody.common.model.ICodeAble; import java.io.IOException; /**删除邮件**/ public class MailAction_deleteRes implements ICodeAble { @Override public void encode(IXOutStream outputStream) throws IOException { } @Override public void decode(IXInputStream inputStream) throws IOException { } }
[ "dogdog7788@qq.com" ]
dogdog7788@qq.com
320f51e73ebde584be481cd31ea4b5014a30618d
aa5f25d714519ccfda2a89f382dfcefe1b3642fc
/trunk/dmisArea/src/com/techstar/dmis/service/workflow/handler/DDDayPlanSent.java
af3cfe3c018e28e08e40c4b99bd9f9e86ef8711d
[]
no_license
BGCX261/zhouwei-repository-svn-to-git
2b85060757568fadc0d45b526e2546ed1965d48a
cd7f50db245727418d5f1c0061681c11703d073e
refs/heads/master
2021-01-23T03:44:27.914196
2015-08-25T15:45:29
2015-08-25T15:45:29
41,599,666
0
0
null
null
null
null
UTF-8
Java
false
false
1,812
java
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html // Decompiler options: packimports(3) fieldsfirst ansi // Source File Name: DDDayPlanSent.java package com.techstar.dmis.service.workflow.handler; import com.techstar.dmis.service.workflow.impl.helper.DimsWorkflowHelper; import com.techstar.framework.service.workflow.IAssignment; import java.sql.*; import org.jbpm.JbpmContext; import org.jbpm.context.exe.ContextInstance; import org.jbpm.graph.exe.ExecutionContext; import org.jbpm.taskmgmt.def.Task; import org.jbpm.taskmgmt.exe.Assignable; import org.jbpm.taskmgmt.exe.TaskInstance; public class DDDayPlanSent implements IAssignment { public DDDayPlanSent() { } public void assign(Assignable arg0, ExecutionContext arg1) throws Exception { arg1.getTaskInstance().setBussId((String)arg1.getContextInstance().getVariable("businessId")); long taskId = arg1.getTaskInstance().getTask().getId(); String taskRoles = ""; String agencyRoles = ""; Connection connection = arg1.getJbpmContext().getConnection(); Statement statement = connection.createStatement(); ResultSet resultSet; for(resultSet = statement.executeQuery("select TASK_ROLE,AGENCY_ROLE from JBPM_EXT_PERMISSION where task_id='" + taskId + "' "); resultSet.next();) { taskRoles = resultSet.getString("TASK_ROLE"); agencyRoles = resultSet.getString("AGENCY_ROLE"); } resultSet.close(); statement.close(); String currentUserIds[] = DimsWorkflowHelper.getCurrentUsers(taskRoles, agencyRoles); arg0.setPooledActors(currentUserIds); } }
[ "you@example.com" ]
you@example.com
bcf91dcd45400638ff50015f4dfd255245a51e25
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/63/1957.java
3979e586e189ba370a328f42f9a631a6eec9e555
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,214
java
package <missing>; public class GlobalMembers { public static int Main() { int[][] a = new int[100][100]; int[][] b = new int[100][100]; int x1; int y1; int x2; int y2; int x3; int y3; int c; int d; int[][] e = new int[100][100]; char i; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { x1 = Integer.parseInt(tempVar); } String tempVar2 = ConsoleInput.scanfRead(" "); if (tempVar2 != null) { y1 = Integer.parseInt(tempVar2); } for (c = 0;c <= x1 - 1;c++) { for (d = 0;d <= y1 - 1;d++) { String tempVar3 = ConsoleInput.scanfRead(); if (tempVar3 != null) { a[c][d] = Integer.parseInt(tempVar3); } String tempVar4 = ConsoleInput.scanfRead(null, 1); if (tempVar4 != null) { i = tempVar4.charAt(0); } if (i != ' ') { break; } else { ; } } } String tempVar5 = ConsoleInput.scanfRead(); if (tempVar5 != null) { x2 = Integer.parseInt(tempVar5); } String tempVar6 = ConsoleInput.scanfRead(" "); if (tempVar6 != null) { y2 = Integer.parseInt(tempVar6); } for (c = 0;c <= x2 - 1;c++) { for (d = 0;d <= y2 - 1;d++) { String tempVar7 = ConsoleInput.scanfRead(); if (tempVar7 != null) { b[c][d] = Integer.parseInt(tempVar7); } String tempVar8 = ConsoleInput.scanfRead(null, 1); if (tempVar8 != null) { i = tempVar8.charAt(0); } if (i != ' ') { break; } else { ; } } } x3 = x1; y3 = y2; // printf("%d\n",a[0][4]); for (c = 0;c <= x3 - 1;c++) { for (d = 0;d <= y3 - 1;d++) { e[c][d] = 0; for (i = 0;i <= x2 - 1;i++) { e[c][d] = e[c][d] + a[c][i] * b[i][d]; //printf("%d %d %d\n",i,c,d); //printf("%d %d %d\n",a[c][i],b[i][d],e[c][d]); } } } for (c = 0;c <= x3 - 1;c++) { for (d = 0;d <= y3 - 2;d++) { System.out.printf("%d ",e[c][d]); } System.out.printf("%d\n",e[c][y3 - 1]); } //printf("%d",e[0][1]); } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
89bcb2bbb61738b0118221153412c95c9d9e73e7
0c669c238f7106566f275b24549932f127e69f56
/app/src/main/java/com/jinhui/androidprojecthelper/base/baseadapter/ScaleInAnimation.java
805981c123c1dc7fefc097c9e9910ffb4cf96383
[]
no_license
jimmyleung/AndroidProjectHelper
28cfb74a9bcb7eb2efdf7ca7b04f0807c1b3bd53
e0f60a66514cd9b6abf0464e7f8500120abde240
refs/heads/master
2020-05-02T18:41:48.449758
2018-09-22T08:14:22
2018-09-22T08:14:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
708
java
package com.jinhui.androidprojecthelper.base.baseadapter; import android.animation.Animator; import android.animation.ObjectAnimator; import android.view.View; public class ScaleInAnimation implements BaseAnimation { private static final float DEFAULT_SCALE_FROM = .5f; private final float mFrom; public ScaleInAnimation() { this(DEFAULT_SCALE_FROM); } public ScaleInAnimation(float from) { mFrom = from; } @Override public Animator[] getAnimators(View view) { ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", mFrom, 1f); ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", mFrom, 1f); return new ObjectAnimator[] { scaleX, scaleY }; } }
[ "1004260403@qq.com" ]
1004260403@qq.com
7954fb1f54249b0ed8463730abf271bff70d1e5f
8f8f22d23c049015162ac38b3308a376fe57e25b
/modules/core/src/main/java/cgl/iotcloud/core/sensor/SCSensorUtils.java
59c639ef189da8088ab5d406946169c722f1ee07
[]
no_license
kouweizhong/IoTCloud
9b7470fa518c3845eb02d8763d2ae8fdca1b5a1d
8e6e0b6d4c1d81facfe0539eab28bfdc17a4bcf7
refs/heads/master
2020-03-26T10:51:56.431517
2018-02-25T16:18:58
2018-02-25T16:18:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,318
java
package cgl.iotcloud.core.sensor; import cgl.iotcloud.core.Constants; import cgl.iotcloud.core.IOTRuntimeException; import cgl.iotcloud.core.endpoint.JMSEndpoint; import cgl.iotcloud.core.endpoint.StreamingEndpoint; import com.iotcloud.sensorInfo.xsd.*; import com.iotcloud.sensorInfo.xsd.Endpoint; import com.iotcloud.sensorInfo.xsd.Sensor; import org.apache.xmlbeans.XmlException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Utility class for converting sensor */ public class SCSensorUtils { private static Logger log = LoggerFactory.getLogger(SCSensorUtils.class); public static String convertToString(List<SCSensor> sensors) { AllSensorsDocument document = AllSensorsDocument.Factory.newInstance(); AllSensorsDocument.AllSensors allSensors = document.addNewAllSensors(); Sensor []sensorArray = new Sensor[sensors.size()]; for (int i = 0; i < sensors.size(); i++) { sensorArray[i] = convertToXML(sensors.get(i)); } if (sensors.size() > 0) { allSensors.setSensorArray(sensorArray); } return document.toString(); } public static String convertToString(SCSensor sensor) { SensorInfoDocument document = SensorInfoDocument.Factory.newInstance(); Sensor s = convertToXML(sensor); document.setSensorInfo(s); return document.toString(); } private static Sensor convertToXML(SCSensor sensor) { Sensor sensorInfo = Sensor.Factory.newInstance(); sensorInfo.setName(sensor.getName()); sensorInfo.setType(sensor.getType()); sensorInfo.setId(sensor.getId()); Endpoint controlEndpoint = sensorInfo.addNewControlEndpoint(); Endpoint dataEndpoint = sensorInfo.addNewDataEndpoint(); Endpoint updateEndpoint = sensorInfo.addNewUpdateEndpoint(); cgl.iotcloud.core.Endpoint epr = sensor.getControlEndpoint(); controlEndpoint.setAddress(epr.getAddress()); Properties properties = controlEndpoint.addNewProperties(); for (Map.Entry<String, String> e : epr.getProperties().entrySet()) { Property property = properties.addNewProperty(); property.setName(e.getKey()); property.setStringValue(e.getValue()); } epr = sensor.getDataEndpoint(); dataEndpoint.setAddress(epr.getAddress()); properties = dataEndpoint.addNewProperties(); for (Map.Entry<String, String> e : epr.getProperties().entrySet()) { Property property = properties.addNewProperty(); property.setName(e.getKey()); property.setStringValue(e.getValue()); } epr = sensor.getUpdateEndpoint(); updateEndpoint.setAddress(epr.getAddress()); properties = updateEndpoint.addNewProperties(); for (Map.Entry<String, String> e : epr.getProperties().entrySet()) { Property property = properties.addNewProperty(); property.setName(e.getKey()); property.setStringValue(e.getValue()); } return sensorInfo; } public static List<SCSensor> convertToSensors(InputStream in) { try { AllSensorsDocument document = AllSensorsDocument.Factory.parse(in); List<SCSensor> ss = new ArrayList<SCSensor>(); Sensor sensors[] = document.getAllSensors().getSensorArray(); for (Sensor s : sensors) { ss.add(convertToSensor(s)); } return ss; } catch (XmlException e) { handleException("Invalid XML returned", e); } catch (IOException e) { handleException("Error reading the XML from the input stream", e); } return null; } public static List<SCSensor> convertToSensors(String string) { try { AllSensorsDocument document = AllSensorsDocument.Factory.parse(string); List<SCSensor> ss = new ArrayList<SCSensor>(); Sensor sensors[] = document.getAllSensors().getSensorArray(); for (Sensor s : sensors) { ss.add(convertToSensor(s)); } return ss; } catch (XmlException e) { handleException("Invalid XML returned", e); } return null; } public static SCSensor convertToSensor(InputStream in) { try { SensorInfoDocument document = SensorInfoDocument.Factory.parse(in); return convertToSensor(document.getSensorInfo()); } catch (XmlException e) { handleException("Failed to convert the text to a XML", e); } catch (IOException e) { handleException("Error reading the XML from the input stream", e); } return null; } public static SCSensor convertToSensor(String string) { try { SensorInfoDocument document = SensorInfoDocument.Factory.parse(string); return convertToSensor(document.getSensorInfo()); } catch (XmlException e) { handleException("Failed to convert the text to a XML", e); } return null; } public static SCSensor convertToSensor(Sensor xmlSensor) { SCSensor sensor = new SCSensor(xmlSensor.getName()); sensor.setId(xmlSensor.getId()); sensor.setType(xmlSensor.getType()); cgl.iotcloud.core.Endpoint epr; if (sensor.getType().equals(Constants.SENSOR_TYPE_BLOCK)) { epr = convertToEndpoint(xmlSensor.getDataEndpoint(), 0); sensor.setDataEndpoint(epr); } else if (sensor.getType().equals(Constants.SENSOR_TYPE_STREAMING)) { epr = convertToEndpoint(xmlSensor.getDataEndpoint(), 1); sensor.setDataEndpoint(epr); } if (xmlSensor.getControlEndpoint() != null) { epr = convertToEndpoint(xmlSensor.getControlEndpoint(), 0); sensor.setControlEndpoint(epr); } if (xmlSensor.getUpdateEndpoint() != null) { epr = convertToEndpoint(xmlSensor.getUpdateEndpoint(), 0); sensor.setUpdateEndpoint(epr); } return sensor; } private static cgl.iotcloud.core.Endpoint convertToEndpoint(Endpoint endpoint, int type) { cgl.iotcloud.core.Endpoint epr; if (type == 0) { epr = new JMSEndpoint(); } else if (type == 1) { epr = new StreamingEndpoint(); } else { handleException(""); return null; } epr.setAddress(endpoint.getAddress()); Properties properties = endpoint.getProperties(); Map<String, String> props = new HashMap<String, String>(); for (Property p : properties.getPropertyArray()) { props.put(p.getName(), p.getStringValue()); } epr.setProperties(props); return epr; } private static void handleException(String s, Exception e) { log.error(s, e); throw new IOTRuntimeException(s, e); } private static void handleException(String s) { log.error(s); throw new IOTRuntimeException(s); } }
[ "supun06@gmail.com" ]
supun06@gmail.com
d9b4bfa9228f9c8552be8eb3c218d08acb452700
6aefa64d30949edfff0cd9da8283ae93f57043fa
/agrest-cayenne/src/test/java/io/agrest/cayenne/POST/RelateIT.java
bd45f6267f4a9d06e87b98e43d5fd849ff226406
[ "Apache-2.0" ]
permissive
agrestio/agrest
75e58103fea11c797093e9a86b2475578c7fd7ac
328b9610b7a490d6fcb5c1554a3ef6bf7e5e4248
refs/heads/master
2023-09-05T02:29:17.222528
2023-07-31T11:48:20
2023-07-31T11:48:20
19,821,698
25
15
Apache-2.0
2023-07-29T16:43:45
2014-05-15T14:09:45
Java
UTF-8
Java
false
false
6,334
java
package io.agrest.cayenne.POST; import io.agrest.DataResponse; import io.agrest.cayenne.cayenne.main.E2; import io.agrest.cayenne.cayenne.main.E29; import io.agrest.cayenne.cayenne.main.E3; import io.agrest.cayenne.cayenne.main.E30; import io.agrest.cayenne.unit.main.MainDbTest; import io.agrest.cayenne.unit.main.MainModelTester; import io.agrest.jaxrs3.AgJaxrs; import io.bootique.junit5.BQTestTool; import jakarta.ws.rs.POST; import jakarta.ws.rs.Path; import jakarta.ws.rs.core.Configuration; import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.UriInfo; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertNotNull; public class RelateIT extends MainDbTest { @BQTestTool static final MainModelTester tester = tester(Resource.class) .entitiesAndDependencies(E2.class, E3.class, E29.class, E30.class) .build(); @Test public void toOne() { tester.e2().insertColumns("id_", "name") .values(1, "xxx") .values(8, "yyy").exec(); tester.target("/e3") .post("{\"e2\":8,\"name\":\"MM\"}") .wasCreated() .replaceId("RID") .bodyEquals(1, "{\"id\":RID,\"name\":\"MM\",\"phoneNumber\":null}"); tester.e3().matcher().assertOneMatch(); tester.e3().matcher().eq("e2_id", 8).andEq("name", "MM").assertOneMatch(); } @Test public void toOne_Null() { tester.target("/e3") .post("{\"e2\":null,\"name\":\"MM\"}") .wasCreated() .replaceId("RID") .bodyEquals(1, "{\"id\":RID,\"name\":\"MM\",\"phoneNumber\":null}"); tester.e3().matcher().assertOneMatch(); tester.e3().matcher().eq("e2_id", null).assertOneMatch(); } @Test public void toOne_CompoundId() { tester.e29().insertColumns("id1", "id2") .values(11, 21) .values(12, 22).exec(); tester.target("/e30") .queryParam("include", "e29.id") .post("{\"e29\":{\"db:id1\":11,\"id2Prop\":21}}") .wasCreated() .replaceId("RID") .bodyEquals(1, "{\"id\":RID,\"e29\":{\"id\":{\"db:id1\":11,\"id2Prop\":21}}}"); tester.e30().matcher().assertOneMatch(); } @Test public void toOne_BadFK() { tester.target("/e3") .post("{\"e2\":15,\"name\":\"MM\"}") .wasNotFound() .bodyEquals("{\"message\":\"Related object 'E2' with id of '15' is not found\"}"); tester.e3().matcher().assertNoMatches(); } @Test public void toMany() { tester.e3().insertColumns("id_", "name") .values(1, "xxx") .values(8, "yyy").exec(); Long id = tester.target("/e2") .queryParam("include", E2.E3S.getName()) .queryParam("exclude", E2.ADDRESS.getName(), E2.E3S.dot(E3.NAME).getName(), E2.E3S.dot(E3.PHONE_NUMBER).getName()) .post("{\"e3s\":[1,8],\"name\":\"MM\"}") .wasCreated() .replaceId("RID") .bodyEquals(1, "{\"id\":RID,\"e3s\":[{\"id\":1},{\"id\":8}],\"name\":\"MM\"}") .getId(); assertNotNull(id); tester.e3().matcher().eq("e2_id", id).assertMatches(2); } @Test // so while e29 -> e30 is a multi-column join, e30's own ID is single column public void toMany_OverMultiKeyRelationship() { tester.e30().insertColumns("id") .values(100) .values(101) .values(102).exec(); tester.target("/e29") .queryParam("include", "e30s.id") .queryParam("exclude", "id") .post("{\"id2Prop\":54,\"e30s\":[100, 102]}") .wasCreated() .bodyEquals(1, "{\"e30s\":[{\"id\":100},{\"id\":102}],\"id2Prop\":54}"); tester.e29().matcher().assertOneMatch(); } @Test public void toMany_AsNewObjects() { tester.target("/e2") .queryParam("include", "name", "e3s.name") .post("{\"e3s\":[{\"name\":\"new_to_many1\"},{\"name\":\"new_to_many2\"}],\"name\":\"MM\"}") .wasCreated() .bodyEquals(1, "{\"e3s\":[],\"name\":\"MM\"}") .getId(); tester.e2().matcher().assertOneMatch(); tester.e3().matcher().assertNoMatches(); } @Test public void toOne_AsNewObject() { // While Agrest does not yet support processing full related objects, it should not fail either. // Testing this condition here. tester.target("/e3") .queryParam("include", "name", "e2.id") .post("{\"e2\":{\"name\":\"new_to_one\"},\"name\":\"MM\"}") .wasCreated() .replaceId("RID") .bodyEquals(1, "{\"e2\":null,\"name\":\"MM\"}"); tester.e3().matcher().assertOneMatch(); tester.e2().matcher().assertNoMatches(); } @Path("") public static class Resource { @Context private Configuration config; @POST @Path("e2") public DataResponse<E2> createE2(String targetData, @Context UriInfo uriInfo) { return AgJaxrs.create(E2.class, config).clientParams(uriInfo.getQueryParameters()).syncAndSelect(targetData); } @POST @Path("e3") public DataResponse<E3> create(@Context UriInfo uriInfo, String requestBody) { return AgJaxrs.create(E3.class, config).clientParams(uriInfo.getQueryParameters()).syncAndSelect(requestBody); } @POST @Path("e29") public DataResponse<E29> createE29(String targetData, @Context UriInfo uriInfo) { return AgJaxrs.create(E29.class, config) .clientParams(uriInfo.getQueryParameters()) .syncAndSelect(targetData); } @POST @Path("e30") public DataResponse<E30> createE30(String targetData, @Context UriInfo uriInfo) { return AgJaxrs.create(E30.class, config) .clientParams(uriInfo.getQueryParameters()) .syncAndSelect(targetData); } } }
[ "andrus@objectstyle.com" ]
andrus@objectstyle.com
ff8633e2ec58df60cc85af94e96f441176baaabb
b7968352a602687f59cb801dcec234d12d0a491b
/studentManage/src/main/webapp/js/web/dao/StudentDao.java
04a34d06cb8f537d4a47c472ea78f37229f6dcc5
[ "MIT" ]
permissive
IsSenHu/studentRedisManage
5338abbaac5a9a24ab465a6f27fed3121282eaee
b09e4e84c56a43149f06fa9b226b604eb38ea93d
refs/heads/master
2021-05-01T21:25:47.410618
2018-02-10T02:33:06
2018-02-10T02:33:06
120,977,382
0
0
null
null
null
null
UTF-8
Java
false
false
471
java
package com.husen.web.dao; import com.husen.web.pojo.Student; import java.util.List; public interface StudentDao { boolean addStudent(Student student) throws Exception; List<Student> pageStudent(long offset, long end) throws Exception; Long total() throws Exception; Student findStudentById(String studentId) throws Exception; boolean updateStudent(Student student) throws Exception; boolean deleteStudent(String studentId) throws Exception; }
[ "1178515826@qq.com" ]
1178515826@qq.com
ea17785a79ef8d6d9f17213cf964461fa64ef281
374ad03287670140e4a716aa211cdaf60f50c944
/ztr-framework/framework-dao-base/src/main/java/com/travelzen/framework/dao/rdbms/SequenceGenerator.java
901a40917614ef96afb40c0cf5d0f47ffe1efbab
[]
no_license
xxxJppp/firstproj
ca541f8cbe004a557faff577698c0424f1bbd1aa
00dcfbe731644eda62bd2d34d55144a3fb627181
refs/heads/master
2020-07-12T17:00:00.549410
2017-04-17T08:29:58
2017-04-17T08:29:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,575
java
package com.travelzen.framework.dao.rdbms; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.lang3.StringUtils; public class SequenceGenerator { private static Map<String, SequencePool> seqMap = new ConcurrentHashMap<String, SequencePool>(); private BatchSequenceDaoImpl batchSequenceDao; //每次请求分配的序列数个数 private final int allotment = 100; public synchronized String getNextSeq(String sequenceName, int width, int allotment) throws Exception { SequencePool pool = seqMap.get(sequenceName); if (seqMap.get(sequenceName) == null || pool.isEmpty()) { pool = refillPool(sequenceName, allotment); seqMap.put(sequenceName, pool); } if (width > 0) { return formatSequence(String.valueOf(pool.next()), width); } else { return String.valueOf(pool.next()); } } public synchronized String getNextSeq(String sequenceName, int width) throws Exception { return getNextSeq(sequenceName, width, allotment); } public synchronized String getNextSeq(String sequenceName) throws Exception { return getNextSeq(sequenceName, -1, allotment); } private SequencePool refillPool(String sequenceName, int allotment) throws Exception { long nextSeq = batchSequenceDao.getNextSeq(sequenceName, allotment); return new SequencePool(nextSeq, nextSeq + allotment - 1); } /** * description: 将传入的字符串的长度限制为一定值 * * @param is * @param width * @return */ private static String formatSequence(String is, int width) { if (is.length() < width) { return StringUtils.leftPad(is, width, '0'); } // for (; is.length() < width; is = "0" + is) ; else { is = is.substring(is.length() - width, is.length()); } return is; } private static class SequencePool { private long low; private long high; public SequencePool(long low, long high) { this.low = low; this.high = high; } public long next() { return low++; } public boolean isEmpty() { return low > high; } } public BatchSequenceDaoImpl getBatchSequenceDao() { return batchSequenceDao; } public void setBatchSequenceDao(BatchSequenceDaoImpl batchSequenceDao) { this.batchSequenceDao = batchSequenceDao; } }
[ "yining.ni@travelzen.com" ]
yining.ni@travelzen.com
60abeb77f7f37e7c7b44f8011536dbcc9906e545
c74c2e590b6c6f967aff980ce465713b9e6fb7ef
/game-logic-reset/src/main/java/com/bdoemu/gameserver/model/skills/buffs/effects/SwimmingSpeedEffect.java
be54441e9b70318c665a3c5ea50803a396a1b659
[]
no_license
lingfan/bdoemu
812bb0abb219ddfc391adadf68079efa4af43353
9c49b29bfc9c5bfe3192b2a7fb1245ed459ef6c1
refs/heads/master
2021-01-01T13:10:13.075388
2019-12-02T09:23:20
2019-12-02T09:23:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,165
java
package com.bdoemu.gameserver.model.skills.buffs.effects; import com.bdoemu.gameserver.model.creature.Creature; import com.bdoemu.gameserver.model.creature.player.Player; import com.bdoemu.gameserver.model.skills.buffs.ABuffEffect; import com.bdoemu.gameserver.model.skills.buffs.ActiveBuff; import com.bdoemu.gameserver.model.skills.buffs.templates.BuffTemplate; import com.bdoemu.gameserver.model.skills.templates.SkillT; import com.bdoemu.gameserver.model.stats.elements.BuffElement; import java.util.ArrayList; import java.util.Collection; import java.util.List; /** * @ClassName SwimmingSpeedEffect * @Description TODO * @Author JiangBangMing * @Date 2019/7/12 10:18 * VERSION 1.0 */ public class SwimmingSpeedEffect extends ABuffEffect { @Override public Collection<ActiveBuff> initEffect(final Creature owner, final Collection<? extends Creature> targets, final SkillT skillT, final BuffTemplate buffTemplate) { final List<ActiveBuff> buffs = new ArrayList<ActiveBuff>(); final Integer[] params = buffTemplate.getParams(); final int swimmingValue = params[0]; final BuffElement element = new BuffElement(swimmingValue); for (final Creature target : targets) { buffs.add(new ActiveBuff(skillT, buffTemplate, owner, target, element)); } return buffs; } @Override public void applyEffect(final ActiveBuff activeBuff) { final Creature target = activeBuff.getTarget(); if (target.isPlayer()) { target.getGameStats().getSwimmingStat().addElement(activeBuff.getElement()); final Player player = (Player) target; // player.sendBroadcastItSelfPacket(new SMSetCharacterPublicPoints(player)); } } @Override public void endEffect(final ActiveBuff activeBuff) { final Creature target = activeBuff.getTarget(); if (target.isPlayer()) { target.getGameStats().getSwimmingStat().removeElement(activeBuff.getElement()); final Player player = (Player) target; // player.sendBroadcastItSelfPacket(new SMSetCharacterPublicPoints(player)); } } }
[ "511459965@qq.com" ]
511459965@qq.com
23b9beb09658d4dea3fb05b0f0a5b8e98195aa09
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/29/147.java
e2d7982cd52f59677e39e2caaceac10c2bde6932
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
763
java
package <missing>; public class GlobalMembers { public static int k(int n) { int i; int k1 = 1; int k2 = 2; int a; if (n > 1) { for (i = 1;i < n;i++) { a = k2; k2 = k1 + k2; k1 = a; } } else if (n = 1) { k2 = 2; } return k2; } public static int Main() { int n; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } int i; int j; for (i = 0;i < n;i++) { int num; String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { num = Integer.parseInt(tempVar2); } double sum = 2; for (j = 2;j <= num;j++) { sum = sum + ((double)k(j) / (double)k(j - 1)); } System.out.printf("%.3lf\n",sum); } } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
a809710b7aada686ac1d28d06f1ecf88308ab677
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/main/java/org/gradle/test/performancenull_439/Productionnull_43877.java
3319675afc55a43a33b7a79ec8c9f98aebe48194
[]
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
588
java
package org.gradle.test.performancenull_439; public class Productionnull_43877 { private final String property; public Productionnull_43877(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
4f6983536af3911a9a200e0bde18042354500b14
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_8fde77a843431037fde796c92b22f699bd28953f/ReactorTarget/4_8fde77a843431037fde796c92b22f699bd28953f_ReactorTarget_t.java
5d79d549d4b2c95cd6b85d1919eaf7f6cf5d425d
[]
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
930
java
package openccsensors.common.sensors.industrialcraft; import ic2.api.IReactor; import ic2.api.IC2Reactor; import java.util.HashMap; import java.util.Map; import net.minecraft.src.TileEntity; import net.minecraft.src.World; import openccsensors.common.api.ISensorTarget; import openccsensors.common.sensors.TileSensorTarget; public class ReactorTarget extends TileSensorTarget implements ISensorTarget { ReactorTarget(TileEntity targetEntity) { super(targetEntity); } public Map getDetailInformation(World world) { HashMap retMap = new HashMap(); IReactor reactor = (IReactor) world.getBlockTileEntity(xCoord, yCoord, zCoord); retMap.put("Heat", reactor.getHeat()); retMap.put("MaxHeat", reactor.getMaxHeat()); retMap.put("Output", reactor.getOutput() * new IC2Reactor().getEUOutput()); retMap.put("Active", reactor.produceEnergy()); return retMap; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1e0d24cdb7a416ff20218662212a250e0926151f
f60d91838cc2471bcad3784a56be2aeece101f71
/spring-framework-4.3.15.RELEASE/spring-websocket/src/main/java/org/springframework/web/socket/server/support/package-info.java
33b4aec1832186c90212574e15ad6bfbf78eb8a3
[ "Apache-2.0" ]
permissive
fisher123456/spring-boot-1.5.11.RELEASE
b3af74913eb1a753a20c3dedecea090de82035dc
d3c27f632101e8be27ea2baeb4b546b5cae69607
refs/heads/master
2023-01-07T04:12:02.625478
2019-01-26T17:44:05
2019-01-26T17:44:05
167,649,054
0
0
Apache-2.0
2022-12-27T14:50:58
2019-01-26T04:21:05
Java
UTF-8
Java
false
false
162
java
/** * Server-side support classes including container-specific strategies * for upgrading a request. */ package org.springframework.web.socket.server.support;
[ "171509086@qq.com" ]
171509086@qq.com
8f660102cd6b1920b83d378116606289879e87e9
680f7d92cc608cc6850cd5c150226aacbb419c06
/andEngineLib/src/main/java/org/andengine/entity/particle/initializer/GravityParticleInitializer.java
1273061c3649dfac2f32e1b5c65d737cbc1b6090
[]
no_license
mnafian/IsometricMapExample
e002b3e165abb5e52ec13fb4f541de155688bbc0
9dc08b462f5ad02cf70eab16328437fe5c8ad141
refs/heads/master
2021-01-22T06:58:51.347531
2015-08-19T08:27:05
2015-08-19T08:27:05
35,424,784
1
0
null
null
null
null
UTF-8
Java
false
false
1,569
java
package org.andengine.entity.particle.initializer; import org.andengine.entity.IEntity; import android.hardware.SensorManager; /** * (c) 2010 Nicolas Gramlich * (c) 2011 Zynga Inc. * * @author Nicolas Gramlich * @since 12:04:00 - 15.03.2010 */ public class GravityParticleInitializer<T extends IEntity> extends AccelerationParticleInitializer<T> { // =========================================================== // Constants // =========================================================== // =========================================================== // Fields // =========================================================== // =========================================================== // Constructors // =========================================================== public GravityParticleInitializer() { super(0, SensorManager.GRAVITY_EARTH); } // =========================================================== // Getter & Setter // =========================================================== // =========================================================== // Methods for/from SuperClass/Interfaces // =========================================================== // =========================================================== // Methods // =========================================================== // =========================================================== // Inner and Anonymous Classes // =========================================================== }
[ "mnafian@icloud.com" ]
mnafian@icloud.com
af77e52677ef2a64bb41f52f43a3c343a6a0038a
f69976ab2b2f80d76c08f1d0001045321c2f93ec
/app/src/main/java/com/shoppay/wyoilnew/modle/InterfaceWeixinPay.java
07be87f7e6e0e5938d5ec3bc1656f0281b5d6096
[]
no_license
yy471101598/chuanfooilnew
632ac7bee9c078385da7969fe8c7d5fb9c97efd8
5761ed60b0026f8e2b998f1285ba954f0baa6d4b
refs/heads/master
2020-04-06T14:54:26.427759
2019-01-15T09:53:23
2019-01-15T09:53:23
157,558,712
0
0
null
null
null
null
UTF-8
Java
false
false
218
java
package com.shoppay.wyoilnew.modle; import android.content.Context; public interface InterfaceWeixinPay { public void weixinPay(Context context,String moeny,String orderNo,String pName, InterfaceMVC interf); }
[ "471101598@qq.com" ]
471101598@qq.com
f5d5dcc2859dbb06112eba92b159808db24112ef
3fc13b4068f552b502e04b1c26553592a446d7ac
/api/src/main/java/mb/resource/hierarchical/walk/ResourceWalker.java
7fb70a5b507bdcdab18ed71c8f33720848e48bc9
[ "Apache-2.0" ]
permissive
metaborg/resource
5240772d3b5b3bc58c23dfd233697fdaebc14133
197057fb397b49663bee8e1a0bbcac2452ed4276
refs/heads/master
2022-05-25T05:27:36.397559
2022-05-11T13:41:09
2022-05-11T13:41:09
179,507,450
0
4
Apache-2.0
2021-08-24T09:35:45
2019-04-04T13:53:57
Java
UTF-8
Java
false
false
1,857
java
package mb.resource.hierarchical.walk; import mb.resource.hierarchical.HierarchicalResource; import mb.resource.hierarchical.match.path.PathMatcher; import java.io.IOException; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; @FunctionalInterface public interface ResourceWalker extends Serializable { boolean traverse(HierarchicalResource directory, HierarchicalResource rootDirectory) throws IOException; static TrueResourceWalker ofTrue() { return new TrueResourceWalker(); } static FalseResourceWalker ofFalse() { return new FalseResourceWalker(); } static AllResourceWalker ofAll(ResourceWalker... walkers) { return new AllResourceWalker(walkers); } static AnyResourceWalker ofAny(ResourceWalker... walkers) { return new AnyResourceWalker(walkers); } static NotResourceWalker ofNot(ResourceWalker walkers) { return new NotResourceWalker(walkers); } static PathResourceWalker ofPath(PathMatcher matcher) { return new PathResourceWalker(matcher); } default NotResourceWalker not() { return new NotResourceWalker(this); } default AllResourceWalker and(ResourceWalker... walkers) { final ArrayList<ResourceWalker> allWalkers = new ArrayList<>(walkers.length + 1); allWalkers.add(this); Collections.addAll(allWalkers, walkers); return new AllResourceWalker(allWalkers); } default AnyResourceWalker or(ResourceWalker... walkers) { final ArrayList<ResourceWalker> anyWalkers = new ArrayList<>(walkers.length + 1); anyWalkers.add(this); Collections.addAll(anyWalkers, walkers); return new AnyResourceWalker(anyWalkers); } static PathResourceWalker ofNoHidden() {return ofPath(PathMatcher.ofNoHidden());} }
[ "gabrielkonat@gmail.com" ]
gabrielkonat@gmail.com
7fd12f7b8db4e5dc2d934202a07ea3009b504adf
977e4cdedd721264cfeeeb4512aff828c7a69622
/ares.standard/src/test/java/cz/stuchlikova/ares/application/connector/AresRzpClientTestImpl.java
2f8cf50890de333770626c8f9c3c3670e93057c7
[]
no_license
PavlaSt/ares.standard
ed5b177ca7ca71173b7fa7490cf939f8c3e050fb
1d3a50fa4397a490cfb4414f7bd94d5dcac1a45e
refs/heads/main
2023-05-08T02:28:09.921215
2021-05-27T10:03:07
2021-05-27T10:03:07
346,669,475
0
0
null
null
null
null
UTF-8
Java
false
false
906
java
package cz.stuchlikova.ares.application.connector; import cz.stuchlikova.ares.application.stub.rzp.AresDotazy; import cz.stuchlikova.ares.application.stub.rzp.AresOdpovedi; import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Component; import javax.xml.bind.JAXB; import java.io.InputStream; @Component @Primary public class AresRzpClientTestImpl extends ClientBaseTest<AresOdpovedi> implements AresClient<AresOdpovedi, AresDotazy> { @Override public AresOdpovedi getAresResponse(AresDotazy dotazy) { String ico = dotazy.getDotaz().get(0).getICO(); String url = "src/test/resources/getDtoRzpResponseByIco/ico=" + ico + ".xml"; return openXmlFileUnmarshalToObject(url); } @Override AresOdpovedi unmarshalStringToObject(InputStream xmlResult) { return JAXB.unmarshal(xmlResult, AresOdpovedi.class); } }
[ "pavla.p.novotna@seznam.cz" ]
pavla.p.novotna@seznam.cz
75e0d82fbc1584f9db7dbe9a79ddd692d100b1be
1fe33cac3819ba7832c495677fa8d90ba51ca66c
/src/test/java/com/vc/web/rest/util/PaginationUtilUnitTest.java
e8424f32930c3166945ad122c8c9a95021eb55f7
[]
no_license
valeriyc/ThreadNote
d353801d3b077084db2cf6d872115d53979e9a03
dafbdc61c01ff5b29ba93a11cc0f02593df08a50
refs/heads/master
2021-01-16T17:55:13.449294
2017-08-11T11:06:16
2017-08-11T11:06:16
100,023,388
0
0
null
null
null
null
UTF-8
Java
false
false
1,733
java
package com.vc.web.rest.util; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; import org.junit.Test; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageRequest; import org.springframework.http.HttpHeaders; /** * Tests based on parsing algorithm in app/components/util/pagination-util.service.js * * @see PaginationUtil */ public class PaginationUtilUnitTest { @Test public void generatePaginationHttpHeadersTest() { String baseUrl = "/api/_search/example"; List<String> content = new ArrayList<>(); Page<String> page = new PageImpl<>(content,new PageRequest(6, 50),400L); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, baseUrl); List<String> strHeaders = headers.get(HttpHeaders.LINK); assertNotNull(strHeaders); assertTrue(strHeaders.size() == 1); String headerData = strHeaders.get(0); assertTrue(headerData.split(",").length == 4); String expectedData = "</api/_search/example?page=7&size=50>; rel=\"next\"," + "</api/_search/example?page=5&size=50>; rel=\"prev\"," + "</api/_search/example?page=7&size=50>; rel=\"last\"," + "</api/_search/example?page=0&size=50>; rel=\"first\""; assertEquals(expectedData, headerData); List<String> xTotalCountHeaders = headers.get("X-Total-Count"); assertTrue(xTotalCountHeaders.size() == 1); assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L)); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
80b2c9d6d8f20d9ea2cdedf6de2e6ee6cf86c072
a695eac710fe15bb64c86869dcedfb8e402a5001
/fluent-mybatis-processor/src/main/java/cn/org/atool/fluent/processor/mybatis/base/IProcessor.java
4f27c2251a225195cbb5d8f9dc48c7dc0bb04699
[ "Apache-2.0" ]
permissive
atool/fluent-mybatis
33e6eb3dccac0db264fcb3c531005d7a28ab7d20
500522573c82d470d33a1f347903597edad4808d
refs/heads/master
2023-06-22T13:50:12.298938
2022-12-22T11:04:06
2022-12-22T11:04:06
218,672,433
789
84
Apache-2.0
2023-06-15T09:18:27
2019-10-31T02:57:34
Java
UTF-8
Java
false
false
310
java
package cn.org.atool.fluent.processor.mybatis.base; import javax.annotation.processing.Messager; /** * 编译器相关类 * * @author darui.wu */ @SuppressWarnings({"unused"}) public interface IProcessor { /** * 返回Messager * * @return Messager */ Messager getMessager(); }
[ "darui.wu@163.com" ]
darui.wu@163.com
4400e475c9eaf955f29d4231d773201f5acc7d55
0f24f1133b44ee939fa9ce5ddad61f44a27dfcdd
/src/main/java/net/easyappsecurity/account/recovery/repository/PasswordResetTokenRepository.java
c60cd1059b4f605a2e00496a218195933f40acb0
[]
no_license
Jzacha21/secure-account-recovery
326aa2f976299e4b929d7c551f386d425a871af1
8fdeb163ab4660c75b33cdc2e81d6384fcf440d7
refs/heads/master
2022-01-06T20:08:03.074977
2018-05-14T15:09:45
2018-05-14T15:09:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
490
java
package net.easyappsecurity.account.recovery.repository; import net.easyappsecurity.account.recovery.domain.PasswordResetToken; import java.util.Date; public interface PasswordResetTokenRepository { public PasswordResetToken save(PasswordResetToken token); public PasswordResetToken update(PasswordResetToken token); public PasswordResetToken getToken(String selector); public void deleteExpiredSince(Date date); public void delete(PasswordResetToken token); }
[ "mikhail.complete@gmail.com" ]
mikhail.complete@gmail.com
2f1c929e9bb81606c039b293e8d87d7a13d3e050
8494c17b608e144370ee5848756b7c6ae38e8046
/gulimall-coupon/src/main/java/com/atguigu/gulimall/coupon/controller/SkuLadderController.java
7b4a0c039c5206252115304f1ac2a56ac945e8ce
[ "Apache-2.0" ]
permissive
cchaoqun/SideProject1_GuliMall
b235ee01df30bc207c747cf281108006482a778a
aef4c26b7ed4b6d17f7dcadd62e725f5ee68b13e
refs/heads/main
2023-06-11T02:23:28.729831
2021-07-07T11:56:13
2021-07-07T11:56:13
375,354,919
0
0
null
null
null
null
UTF-8
Java
false
false
2,301
java
package com.atguigu.gulimall.coupon.controller; import java.util.Arrays; import java.util.Map; //import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.atguigu.gulimall.coupon.entity.SkuLadderEntity; import com.atguigu.gulimall.coupon.service.SkuLadderService; import com.atguigu.common.utils.PageUtils; import com.atguigu.common.utils.R; /** * 商品阶梯价格 * * @author chengchaoqun * @email chengchaoqun@gmail.com * @date 2021-06-10 17:23:56 */ @RestController @RequestMapping("coupon/skuladder") public class SkuLadderController { @Autowired private SkuLadderService skuLadderService; /** * 列表 */ @RequestMapping("/list") //@RequiresPermissions("coupon:skuladder:list") public R list(@RequestParam Map<String, Object> params){ PageUtils page = skuLadderService.queryPage(params); return R.ok().put("page", page); } /** * 信息 */ @RequestMapping("/info/{id}") //@RequiresPermissions("coupon:skuladder:info") public R info(@PathVariable("id") Long id){ SkuLadderEntity skuLadder = skuLadderService.getById(id); return R.ok().put("skuLadder", skuLadder); } /** * 保存 */ @RequestMapping("/save") //@RequiresPermissions("coupon:skuladder:save") public R save(@RequestBody SkuLadderEntity skuLadder){ skuLadderService.save(skuLadder); return R.ok(); } /** * 修改 */ @RequestMapping("/update") //@RequiresPermissions("coupon:skuladder:update") public R update(@RequestBody SkuLadderEntity skuLadder){ skuLadderService.updateById(skuLadder); return R.ok(); } /** * 删除 */ @RequestMapping("/delete") //@RequiresPermissions("coupon:skuladder:delete") public R delete(@RequestBody Long[] ids){ skuLadderService.removeByIds(Arrays.asList(ids)); return R.ok(); } }
[ "chengchaoqun@hotmail.com" ]
chengchaoqun@hotmail.com
346560ac3c6abb471b1809bd7428781ff88b1952
ac9755d08b16d9a7ae3f7f97858889855068ad53
/lang/lucene/src/main/java/org/carrot2/language/extras/BrazilianLanguageComponents.java
85b5e25b595b5e809d12562fb78fe11abbcf495c
[ "LicenseRef-scancode-bsd-ack-carrot2", "BSD-3-Clause", "Apache-2.0" ]
permissive
rahulanishetty/carrot2
febaddececa6c18f435645ae74438e89561ab0ae
cb4adcc3b4ea030f4b64e2d0b881f43b51a90ae6
refs/heads/master
2022-02-19T03:18:34.730395
2022-01-10T08:32:00
2022-01-10T08:32:04
91,449,061
0
0
null
null
null
null
UTF-8
Java
false
false
1,665
java
/* * Carrot2 project. * * Copyright (C) 2002-2021, Dawid Weiss, Stanisław Osiński. * All rights reserved. * * Refer to the full license file "carrot2.LICENSE" * in the root folder of the repository checkout or at: * https://www.carrot2.org/carrot2.LICENSE */ package org.carrot2.language.extras; import java.util.Objects; import org.apache.lucene.analysis.br.BrazilianStemmer; import org.carrot2.language.ExtendedWhitespaceTokenizer; import org.carrot2.language.SingleLanguageComponentsProviderImpl; import org.carrot2.language.Stemmer; import org.carrot2.language.Tokenizer; import org.carrot2.text.preprocessing.LabelFormatter; import org.carrot2.text.preprocessing.LabelFormatterImpl; /** */ public class BrazilianLanguageComponents extends SingleLanguageComponentsProviderImpl { public static final String NAME = "Brazilian"; public BrazilianLanguageComponents() { super("Carrot2 (" + NAME + " support via Apache Lucene components)", NAME); registerResourceless(Tokenizer.class, ExtendedWhitespaceTokenizer::new); registerResourceless(LabelFormatter.class, () -> new LabelFormatterImpl(" ")); registerDefaultLexicalData(); registerResourceless( Stemmer.class, () -> new LuceneStemmerAdapter(new BrazilianStemmerAdapter()::stems, 5)); } private class BrazilianStemmerAdapter extends BrazilianStemmer { public int stems(char[] chars, int len) { String word = new String(chars, 0, len); String stem = super.stem(word); if (Objects.equals(word, stem)) { return len; } else { stem.getChars(0, stem.length(), chars, 0); return stem.length(); } } } }
[ "dawid.weiss@carrotsearch.com" ]
dawid.weiss@carrotsearch.com
cd540ce5e0fac1d7c9c20804c134477a500b6c13
3dbbfac39ac33d3fabec60b290118b361736f897
/BOJ/9000/9011.java
c13845c4a16c9914ba26ab5bad04177ec3783cc7
[]
no_license
joshua-qa/PS
7e0a61f764f7746e6b3c693c103da06b845552b7
c49c0b377f85c483b6d274806afb0cbc534500b7
refs/heads/master
2023-05-28T15:01:28.709522
2023-05-21T04:46:29
2023-05-21T04:46:29
77,836,098
7
2
null
null
null
null
UTF-8
Java
false
false
2,599
java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); Task task = new Task(); task.run(in, out); out.close(); } static class Task { int n, count; StringBuilder sb = new StringBuilder(); Stack<Integer> currList = new Stack<>(); ArrayList<Integer> numList = new ArrayList<>(); public void run(InputReader in, PrintWriter out) { n = in.nextInt(); while(n-- > 0) { count = in.nextInt(); int[] rank = new int[count]; for(int i = 1; i <= count; i++) { rank[i-1] = in.nextInt(); numList.add(i); } for(int i = count-1; i >= 0; i--) { if(numList.size() > rank[i]) { currList.push(numList.remove(rank[i])); } else { break; } } if(!numList.isEmpty()) { numList.clear(); currList.clear(); sb.append("IMPOSSIBLE\n"); } else { while(!currList.isEmpty()) { sb.append(currList.pop() + " "); } sb.append("\n"); } } out.print(sb); } } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String nextLine() { try { return reader.readLine(); } catch (IOException e) { throw new RuntimeException(e); } } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } }
[ "jgchoi.qa@gmail.com" ]
jgchoi.qa@gmail.com
5fcd0722649fc330c73c1997fca4da5a6cdeb7ef
bfac99890aad5f43f4d20f8737dd963b857814c2
/reg4/v1/xwiki-platform-core/xwiki-platform-formula/xwiki-platform-formula-renderer/src/main/java/org/xwiki/formula/AbstractFormulaRenderer.java
125ff5dcf9757065c293205221b3483c6cf61e9a
[]
no_license
STAMP-project/dbug
3b3776b80517c47e5cac04664cc07112ea26b2a4
69830c00bba4d6b37ad649aa576f569df0965c72
refs/heads/master
2021-01-20T03:59:39.330218
2017-07-12T08:03:40
2017-07-12T08:03:40
89,613,961
0
1
null
null
null
null
UTF-8
Java
false
false
6,046
java
/* * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.xwiki.formula; import java.io.IOException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Base class for all implementations of the {@link FormulaRenderer} component. Provides all the common functionalities * (caching, storage, and retrieval), so that the only responsibility of each implementation remains just to actually * transform the formula into an image. * * @version $Id: a80ee6a82c57e8f2e63db62b903ad982618b96c2 $ * @since 2.0M3 */ public abstract class AbstractFormulaRenderer implements FormulaRenderer { /** Logging helper object. */ private static final Logger LOGGER = LoggerFactory.getLogger(AbstractFormulaRenderer.class); /** A storage system for rendered images, for reuse in subsequent requests. */ @Inject private ImageStorage storage; @Override public String process(String formula, boolean inline, FontSize size, Type type) throws IllegalArgumentException, IOException { // Only render the image if it is not already in the cache String cacheKey = computeImageID(formula, inline, size, type); if (this.storage.get(cacheKey) == null) { ImageData image = renderImage(formula, inline, size, type); this.storage.put(cacheKey, image); } return cacheKey; } @Override public ImageData getImage(String imageID) { return this.storage.get(imageID); } /** * Renders a mathematical formula into an image. * * @param formula a string representation of the formula, in LaTeX syntax, without any commands that specify the * environment (such as $$ .. $$, \begin{math} ... \end{math}, etc) * @param inline specifies if the rendered formula will be displayed inline in the text, or as a separate block * @param size the font size used for displaying the formula * @param type the format in which the formula is rendered * @return the rendered image, as an {@link ImageData} instance * @throws IllegalArgumentException if the LaTeX syntax of the formula is incorrect and the error is unrecoverable * @throws IOException in case of a renderer execution error */ protected abstract ImageData renderImage(String formula, boolean inline, FontSize size, Type type) throws IllegalArgumentException, IOException; /** * Computes the identifier under which the rendered formula will be stored for later reuse. * * @param formula a string representation of the formula, in LaTeX syntax, without any commands that specify the * environment (such as $$ .. $$, \begin{math} ... \end{math}, etc) * @param inline specifies if the rendered formula will be displayed inline in the text, or as a separate block * @param size the font size used for displaying the formula * @param type the format in which the formula is rendered * @return a string representation of the hash code for the four information items */ protected String computeImageID(String formula, boolean inline, FontSize size, Type type) { // Try computing a long hash try { MessageDigest hashAlgorithm = MessageDigest.getInstance("SHA-256"); hashAlgorithm.update(inline ? (byte) 't' : (byte) 'f'); hashAlgorithm.update((byte) size.ordinal()); hashAlgorithm.update((byte) type.ordinal()); hashAlgorithm.update(formula.getBytes()); return new String(org.apache.commons.codec.binary.Hex.encodeHex(hashAlgorithm.digest())); } catch (NoSuchAlgorithmException ex) { LOGGER.error("No MD5 hash algorithm implementation", ex); } catch (NullPointerException ex) { LOGGER.error("Error hashing image name", ex); } // Fallback to a simple hashcode final int prime = 37; int result = 1; result = prime * result + formula.hashCode(); result = prime * result + (inline ? 0 : 1); result = prime * result + size.hashCode(); result = prime * result + type.hashCode(); result = prime * result + this.getClass().getCanonicalName().hashCode(); return result + ""; } /** * Prepares the mathematical formula for rendering by wrapping it in the proper math environment. * * @param formula the mathematical formula that needs to be rendered * @param inline a boolean that specifies if the rendered formula will be displayed inline in the text, or as a * separate block * @return the formula, surrounded by "\begin{math}" / "\end{math}" if it is supposed to be displayed inline, and by * "\begin{displaymath}" / \end{displaymath} if it should be displayed as a block. */ protected String wrapFormula(String formula, boolean inline) { return (inline ? "\\begin{math}" : "\\begin{displaymath}") + "\n{ " + formula + " }\n" + (inline ? "\\end{math}" : "\\end{displaymath}"); } }
[ "caroline.landry@inria.fr" ]
caroline.landry@inria.fr
3d4bcedb9e6489e3b4af57d1b0a59ccfa14ccef8
aad637ff6b08065ba40937653bb071f97a971311
/app/src/main/java/com/example/chatapplication/HomeFragment.java
00f6d5a126825aea873ee61ffa8731e75a028810
[]
no_license
MdGolam-Kibria/SocialMediaChatApplication
46df2032bb8c9a08131fed5fce48cf6a5e923d1b
cf2b084f967ae7b0a609e23aa9063a7cf3a8c8ed
refs/heads/master
2022-11-14T13:11:38.514638
2020-06-29T18:55:45
2020-06-29T18:55:45
266,576,270
2
0
null
null
null
null
UTF-8
Java
false
false
7,474
java
package com.example.chatapplication; import android.content.Intent; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.widget.SearchView; import androidx.core.view.MenuItemCompat; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.Toast; import com.example.chatapplication.adapter.AdapterPost; import com.example.chatapplication.modelAll.ModelPost; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener; import java.util.ArrayList; import java.util.List; /** * A simple {@link Fragment} subclass. */ public class HomeFragment extends Fragment { FirebaseAuth firebaseAuth; RecyclerView recyclerView; List<ModelPost> postList; AdapterPost adapterPost; public HomeFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_home, container, false); firebaseAuth = FirebaseAuth.getInstance(); //recycler view and its properties recyclerView = view.findViewById(R.id.postsRecyclerview); LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity()); //show newest post last ,for this load from last layoutManager.setStackFromEnd(true); layoutManager.setReverseLayout(true); recyclerView.setLayoutManager(layoutManager); //inti...post list postList = new ArrayList<>(); loadPosts(); return view; } private void loadPosts() { //path of all posts final DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference("Posts"); //now get all data from this databaseReference databaseReference.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { postList.clear(); for (DataSnapshot ds : dataSnapshot.getChildren()) { ModelPost modelPost = ds.getValue(ModelPost.class); postList.add(modelPost); //adapter adapterPost = new AdapterPost(getActivity(),postList); //now set adapter to recycler view recyclerView.setAdapter(adapterPost); } } @Override public void onCancelled(@NonNull DatabaseError databaseError) { //in case any error from loading data time Toast.makeText(getActivity(), ""+ databaseError.getMessage(), Toast.LENGTH_SHORT).show(); } }); } private void searchPost(final String searchQuery){ //path of all posts final DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference("Posts"); //now get all data from this databaseReference databaseReference.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { postList.clear(); for (DataSnapshot ds : dataSnapshot.getChildren()) { ModelPost modelPost = ds.getValue(ModelPost.class); /* if in search view user enter query match with postTitle and descriptions */ if (modelPost.getPTitle().toLowerCase().contains(searchQuery.toLowerCase())|| modelPost.getPDescr().toLowerCase().contains(searchQuery.toLowerCase())){ postList.add(modelPost); } //adapter adapterPost = new AdapterPost(getActivity(),postList); //now set adapter to recycler view recyclerView.setAdapter(adapterPost); } } @Override public void onCancelled(@NonNull DatabaseError databaseError) { //in case any error from loading data time Toast.makeText(getActivity(), ""+ databaseError.getMessage(), Toast.LENGTH_SHORT).show(); } }); } private void checkUserStatus() {//check user sign in or not and accessibility FirebaseUser user = firebaseAuth.getCurrentUser();//get current user if (user != null) { //user signed in stay here // mProfileTv.setText(user.getEmail()); } else { //user not signed in startActivity(new Intent(getActivity(), MainActivity.class)); getActivity().finish(); } } @Override public void onCreate(@Nullable Bundle savedInstanceState) { setHasOptionsMenu(true);//to show menu option in fragment super.onCreate(savedInstanceState); } @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {//for inflate option menu inflater.inflate(R.menu.menu, menu); //add search view for search post by title/description MenuItem menuItem = menu.findItem(R.id.action_search); SearchView searchView = (SearchView) MenuItemCompat.getActionView(menuItem); //now search listen... searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit(String query) {//called when user press search button if (!TextUtils.isEmpty(query)){//if user set any search query in search view searchPost(query); }else {//if user dont search anything loadPosts(); } return false; } @Override public boolean onQueryTextChange(String query) {//called as when user press any latter if (!TextUtils.isEmpty(query)){//if user set any search query in search view searchPost(query); }else {//if user dont search anything loadPosts(); } return false; } }); super.onCreateOptionsMenu(menu, inflater); } @Override public boolean onOptionsItemSelected(@NonNull MenuItem item) {//for option item selection handle "logout" int id = item.getItemId(); if (id == R.id.actionLogout) { firebaseAuth.signOut(); checkUserStatus(); } if (id == R.id.actionAddPost) { startActivity(new Intent(getActivity(), AddPostActivity.class)); } return super.onOptionsItemSelected(item); } }
[ "kibria92@gmail.com" ]
kibria92@gmail.com
ef6ab20ed60a3557c1ee59522e06c4c2b604b99f
3ec2dd7eba10b0dfaaf5aa95252262cdaf3d7ef4
/java/src/zuzu/compiler/ir/convert/LongToIntNode.java
65bd2b2b284a95174906c39e2331421967495c2a
[]
no_license
hrskevin/zuzu
5faa2666dc0a23d652bcbae8014388597731e9f3
eebe6c4f276a56537b6ac088e290946a67f0413b
refs/heads/master
2016-09-02T16:12:08.679666
2013-04-18T04:00:32
2013-04-18T04:00:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
608
java
package zuzu.compiler.ir.convert; import zuzu.compiler.ir.InterpreterState; import zuzu.compiler.ir.constant.ConstantIntNode; import zuzu.compiler.ir.node.LongNode; import zuzu.compiler.ir.node.UnaryIntNode; public class LongToIntNode extends UnaryIntNode<LongNode> { public LongToIntNode(LongNode input) { super(input); } @Override public void interpret(InterpreterState state) { state.pushInt((int) state.popLong()); } @Override public ConstantIntNode replaceWithConstant() { return newConstant((int) _input.constantLongValue()); } }
[ "Christopher.Barber@analog.com" ]
Christopher.Barber@analog.com
9ab6318f19d347f1f87e0ef9342c2a68266afab3
7ad527bad3bd0d7eb94d1d8a0fe08df67aa26c3e
/软件学院/高级语言程序设计(Java)/答案/Exercise18_33.java
b702daa4f85db663afb2e41efa9ca8add0e35070
[]
no_license
SCUTMSC/SCUT-Course
67e67ac494aef7fc73de17f61b7fab8450f17952
90f884a9032e951ebc9421cc88ca807b9ec211da
refs/heads/master
2020-07-16T22:22:53.359477
2019-09-07T08:28:09
2019-09-07T08:28:09
205,880,291
10
6
null
null
null
null
UTF-8
Java
false
false
7,770
java
import java.util.ArrayList; import javafx.animation.KeyFrame; import javafx.animation.Timeline; import javafx.application.Application; import javafx.geometry.Point2D; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.image.ImageView; import javafx.scene.layout.BorderPane; import javafx.scene.layout.Pane; import javafx.scene.shape.Line; import javafx.stage.Stage; import javafx.util.Duration; public class Exercise18_33 extends Application { private static final int SIZE = 8; private int startX = 0; private int startY = 0; private ArrayList<Point2D> moveHistory = null; @Override // Override the start method in the Application class public void start(Stage primaryStage) { BorderPane pane = new BorderPane(); ChessBoard board = new ChessBoard(); pane.setCenter(board); Button btSolve = new Button("Solve"); pane.setBottom(btSolve); BorderPane.setAlignment(btSolve, Pos.CENTER); // Create a scene and place it in the stage Scene scene = new Scene(pane, 250, 250); primaryStage.setTitle("Exercise18_33"); // Set the stage title primaryStage.setScene(scene); // Place the scene in the stage primaryStage.show(); // Display the stage board.paint(); btSolve.setOnAction(e -> { boolean[][] moves = new boolean[SIZE][SIZE]; moves[startX][startY] = true; resetMoveHistory(); addMoveHistory(startX, startY); solvePuzzle(moves, 1, startX, startY); board.startAnimation();; }); scene.widthProperty().addListener(ov -> board.paint()); scene.heightProperty().addListener(ov -> board.paint()); } // This method does the bulk of the work. // I'm not *thrilled* with this solution as // it has more redundant code than I'd prefer // but it gets the job done and done efficiently. // Uses Warnsdorf's heuristic discovered in 1823 // that says the best move is the one with the // fewest next moves. I found it necessary to // back up in only one case (3,0) and choose to // try the second best move which worked well. private boolean solvePuzzle(boolean[][] moves, int numMoves, int x, int y) { int nextX = 0; int nextY = 0; int bestMoveX = 0; int bestMoveY = 0; int bestMoveX2 = 0; int bestMoveY2 = 0; int minMoveCount = SIZE; // Knight has max of 8 moves int moveCount = 0; for (int i = 2; i >= -2; i += -4) { for (int j = 1; j >= -1; j += -2) { nextX = x + i; nextY = y + j; if (nextX >= 0 && nextX <= SIZE - 1 && nextY >= 0 && nextY <= SIZE - 1 && !moves[nextX][nextY]) { moveCount = lookAheadCount(moves, nextX, nextY); if (moveCount <= minMoveCount) { minMoveCount = moveCount; bestMoveX2 = bestMoveX; bestMoveY2 = bestMoveY; bestMoveX = nextX; bestMoveY = nextY; } } nextX = x + j; nextY = y + i; if (nextX >= 0 && nextX <= SIZE - 1 && nextY >= 0 && nextY <= SIZE - 1 && !moves[nextX][nextY]) { moveCount = lookAheadCount(moves, nextX, nextY); if (moveCount <= minMoveCount) { minMoveCount = moveCount; bestMoveX2 = bestMoveX; bestMoveY2 = bestMoveY; bestMoveX = nextX; bestMoveY = nextY; } } } } moves[bestMoveX][bestMoveY] = true; addMoveHistory(bestMoveX, bestMoveY); numMoves++; if (numMoves == (SIZE * SIZE)) return true; if (moveCount > 0 && solvePuzzle(moves, numMoves, bestMoveX, bestMoveY)) { return true; } moves[bestMoveX][bestMoveY] = false; moves[bestMoveX2][bestMoveY2] = true; removeLastMoveHistory(); addMoveHistory(bestMoveX2, bestMoveY2); if (moveCount > 1 && solvePuzzle(moves, numMoves, bestMoveX2, bestMoveY2)) { return true; } moves[bestMoveX2][bestMoveY2] = false; removeLastMoveHistory(); numMoves--; return false; } private int lookAheadCount(boolean[][] moves, int x, int y) { int maxCount = 0; for (int i = -2; i <= 2; i += 4) { for (int j = -1; j <= 1; j += 2) { int nextX = x + i; int nextY = y + j; if (nextX >= 0 && nextX <= SIZE - 1 && nextY >= 0 && nextY <= SIZE - 1 && !moves[nextX][nextY]) { maxCount++; } nextX = x + j; nextY = y + i; if (nextX >= 0 && nextX <= SIZE - 1 && nextY >= 0 && nextY <= SIZE - 1 && !moves[nextX][nextY]) { maxCount++; } } } return maxCount; } public void resetMoveHistory() { moveHistory = new ArrayList(63); } public void addMoveHistory(int x, int y) { moveHistory.add(new Point2D(x, y)); } public void removeLastMoveHistory() { moveHistory.remove(moveHistory.size() - 1); } private class ChessBoard extends Pane { private ImageView knightImageView = new ImageView("image/knight.jpg"); private Timeline animation; private int index = 0; ChessBoard() { this.setOnMouseClicked(e -> { startX = (int)(e.getX() / (getWidth() / SIZE)); startY = (int)(e.getY() / (getHeight() / SIZE)); resetMoveHistory(); paint(); }); animation = new Timeline( new KeyFrame(Duration.millis(1000), e -> controlPaint())); animation.setCycleCount(Timeline.INDEFINITE); } private void controlPaint() { index++; paint(); if (index == moveHistory.size()) animation.stop(); } public void startAnimation() { index = 0; animation.play(); } private void paint() { // Clear previous drawing this.getChildren().clear(); // Add the Knight image this.getChildren().add(knightImageView); knightImageView.setX(startX * getWidth() / SIZE); knightImageView.setY(startY * getHeight() / SIZE); knightImageView.setFitWidth(getWidth() / SIZE); knightImageView.setFitHeight(getHeight() / SIZE); // Draw the lines for (int i = 1; i <= SIZE; i++) { this.getChildren().add( new Line(0, i * getHeight() / SIZE, getWidth(), i * getHeight() / SIZE)); this.getChildren().add( new Line(i * getWidth() / SIZE, 0, i * getWidth() / SIZE, getHeight())); } // Draw the moves if (moveHistory != null && moveHistory.size() > 0) { for (int i = 1; i < index; i++) { Point2D p1 = moveHistory.get(i - 1); Point2D p2 = moveHistory.get(i); this.getChildren().add( new Line(p1.getX() * (getWidth() / SIZE) + getWidth() / SIZE / 2, p1.getY() * (getHeight() / SIZE) + (getHeight() / SIZE / 2), p2.getX() * (getWidth() / SIZE) + getWidth() / SIZE / 2, p2.getY() * (getHeight() / SIZE) + getHeight() / SIZE / 2)); } // Add the Knight image if (moveHistory.size() > 0) { // Add the Knight image ImageView knightImageView1 = new ImageView("image/knight.jpg"); this.getChildren().add(knightImageView1); Point2D p = moveHistory.get(index - 1); knightImageView1.setX(p.getX() * getWidth() / SIZE); knightImageView1.setY(p.getY() * getHeight() / SIZE); knightImageView1.setFitWidth(getWidth() / SIZE); knightImageView1.setFitHeight(getHeight() / SIZE); } } } } /** * The main method is only needed for the IDE with limited * JavaFX support. Not needed for running from the command line. */ public static void main(String[] args) { launch(args); } }
[ "LotteWong21@gmail.com" ]
LotteWong21@gmail.com
d071f7cfd6b11b92ba1ee504471a0f21b229ac67
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
/laravel-converted/src/main/java/com/project/convertedCode/globalNamespace/namespaces/Illuminate/namespaces/Notifications/classes/AnonymousNotifiable.java
8898f1af1b62f4c5f7d2932120191878ebe89c87
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
RuntimeConverter/RuntimeConverterLaravelJava
657b4c73085b4e34fe4404a53277e056cf9094ba
7ae848744fbcd993122347ffac853925ea4ea3b9
refs/heads/master
2020-04-12T17:22:30.345589
2018-12-22T10:32:34
2018-12-22T10:32:34
162,642,356
0
0
null
null
null
null
UTF-8
Java
false
false
5,816
java
package com.project.convertedCode.globalNamespace.namespaces.Illuminate.namespaces.Notifications.classes; import com.runtimeconverter.runtime.references.ReferenceContainer; import com.project.convertedCode.globalNamespace.functions.app; import com.runtimeconverter.runtime.passByReference.PassByReferenceArgs; import com.runtimeconverter.runtime.references.BasicReferenceContainer; import com.runtimeconverter.runtime.classes.StaticBaseClass; import com.runtimeconverter.runtime.classes.RuntimeClassBase; import com.runtimeconverter.runtime.RuntimeEnv; import com.runtimeconverter.runtime.passByReference.RuntimeArgsWithReferences; import com.runtimeconverter.runtime.references.ReferenceClassProperty; import com.project.convertedCode.globalNamespace.namespaces.Illuminate.namespaces.Contracts.namespaces.Notifications.classes.Dispatcher; import com.runtimeconverter.runtime.ZVal; import com.runtimeconverter.runtime.reflection.ReflectionClassData; import com.runtimeconverter.runtime.annotations.ConvertedParameter; import com.runtimeconverter.runtime.arrays.ZPair; import java.lang.invoke.MethodHandles; import com.runtimeconverter.runtime.classes.NoConstructor; import com.runtimeconverter.runtime.annotations.ConvertedMethod; import static com.runtimeconverter.runtime.ZVal.assignParameter; /* Converted with The Runtime Converter (runtimeconverter.com) vendor/laravel/framework/src/Illuminate/Notifications/AnonymousNotifiable.php */ public class AnonymousNotifiable extends RuntimeClassBase { public Object routes = ZVal.newArray(); public AnonymousNotifiable(RuntimeEnv env, Object... args) { super(env); } public AnonymousNotifiable(NoConstructor n) { super(n); } @ConvertedMethod @ConvertedParameter(index = 0, name = "channel") @ConvertedParameter(index = 1, name = "route") public Object route(RuntimeEnv env, Object... args) { Object channel = assignParameter(args, 0, false); Object route = assignParameter(args, 1, false); new ReferenceClassProperty(this, "routes", env).arrayAccess(env, channel).set(route); return ZVal.assign(this); } @ConvertedMethod @ConvertedParameter(index = 0, name = "notification") public Object notify(RuntimeEnv env, Object... args) { ReferenceContainer notification = new BasicReferenceContainer(assignParameter(args, 0, false)); env.callMethod( app.f.env(env).call(Dispatcher.CONST_class).value(), new RuntimeArgsWithReferences().add(1, notification), "send", AnonymousNotifiable.class, this, notification.getObject()); return null; } @ConvertedMethod @ConvertedParameter(index = 0, name = "notification") public Object notifyNow(RuntimeEnv env, Object... args) { Object notification = assignParameter(args, 0, false); env.callMethod( app.f.env(env).call(Dispatcher.CONST_class).value(), "sendNow", AnonymousNotifiable.class, this, notification); return null; } @ConvertedMethod @ConvertedParameter(index = 0, name = "driver") public Object routeNotificationFor(RuntimeEnv env, Object... args) { Object driver = assignParameter(args, 0, false); Object ternaryExpressionTemp = null; return ZVal.assign( ZVal.isDefined( ternaryExpressionTemp = new ReferenceClassProperty(this, "routes", env) .arrayGet(env, driver)) ? ternaryExpressionTemp : ZVal.getNull()); } @ConvertedMethod public Object getKey(RuntimeEnv env, Object... args) { return null; } public static final Object CONST_class = "Illuminate\\Notifications\\AnonymousNotifiable"; // Runtime Converter Internals // RuntimeStaticCompanion contains static methods // RequestStaticProperties contains static (per-request) properties // ReflectionClassData contains php reflection data used by the runtime library public static class RuntimeStaticCompanion extends StaticBaseClass { private static final MethodHandles.Lookup staticCompanionLookup = MethodHandles.lookup(); } public static final RuntimeStaticCompanion runtimeStaticObject = new RuntimeStaticCompanion(); private static final ReflectionClassData runtimeConverterReflectionData = ReflectionClassData.builder() .setName("Illuminate\\Notifications\\AnonymousNotifiable") .setLookup( AnonymousNotifiable.class, MethodHandles.lookup(), RuntimeStaticCompanion.staticCompanionLookup) .setLocalProperties("routes") .setFilename( "vendor/laravel/framework/src/Illuminate/Notifications/AnonymousNotifiable.php") .get(); @Override public ReflectionClassData getRuntimeConverterReflectionData() { return runtimeConverterReflectionData; } @Override public Object converterRuntimeCallExtended( RuntimeEnv env, String method, Class<?> caller, PassByReferenceArgs passByReferenceArgs, Object... args) { return RuntimeClassBase.converterRuntimeCallExtendedWithDataStatic( this, runtimeConverterReflectionData, env, method, caller, passByReferenceArgs, args); } }
[ "git@runtimeconverter.com" ]
git@runtimeconverter.com
7b159fc125c921b8e147dfce3bbe3f4f1ebe56fd
a7d2b45e72d745f51db450cc16dc332269a6b5f1
/AlmullaExchange/src/com/amg/exchange/remittance/bean/AdditionalBankAmiecTemp.java
5867d4ac1a16eece1a59af4a9260ca472ea7696b
[]
no_license
Anilreddyvasantham/AlmullaExchange
2974ecd53b1d752931c50b7ecd22c5a37fa05a03
b68bca218ce4b7585210deeda2a8cf84c6306ee3
refs/heads/master
2021-05-08T17:48:01.976582
2018-02-02T09:32:22
2018-02-02T09:32:22
119,484,446
1
0
null
null
null
null
UTF-8
Java
false
false
1,642
java
package com.amg.exchange.remittance.bean; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; import com.amg.exchange.remittance.model.AdditionalBankRuleAddData; public class AdditionalBankAmiecTemp implements Serializable{ private static final long serialVersionUID = 1L; private BigDecimal bankId; private String bankName; private String addtionalFieldDesc; private Boolean ifRecordEdited; private BigDecimal amiecAndBankMappingPK; private List<AdditionalBankRuleAddData> addtionalBankRuleList; public Boolean getIfRecordEdited() { return ifRecordEdited; } public void setIfRecordEdited(Boolean ifRecordEdited) { this.ifRecordEdited = ifRecordEdited; } public BigDecimal getAmiecAndBankMappingPK() { return amiecAndBankMappingPK; } public void setAmiecAndBankMappingPK(BigDecimal amiecAndBankMappingPK) { this.amiecAndBankMappingPK = amiecAndBankMappingPK; } public BigDecimal getBankId() { return bankId; } public String getBankName() { return bankName; } public List<AdditionalBankRuleAddData> getAddtionalBankRuleList() { return addtionalBankRuleList; } public void setBankId(BigDecimal bankId) { this.bankId = bankId; } public void setBankName(String bankName) { this.bankName = bankName; } public void setAddtionalBankRuleList( List<AdditionalBankRuleAddData> addtionalBankRuleList) { this.addtionalBankRuleList = addtionalBankRuleList; } public String getAddtionalFieldDesc() { return addtionalFieldDesc; } public void setAddtionalFieldDesc(String addtionalFieldDesc) { this.addtionalFieldDesc = addtionalFieldDesc; } }
[ "anilreddy.vasantham@gmail.com" ]
anilreddy.vasantham@gmail.com
4d93399556785dcfd1b87add86dee31c8bf6f380
9254e7279570ac8ef687c416a79bb472146e9b35
/sofa-20190815/src/main/java/com/aliyun/sofa20190815/models/RemoveLinkeLinktWorkitemtagResponse.java
d708b1511a3e7003e77e67124e5f9733e05ae7b4
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,170
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sofa20190815.models; import com.aliyun.tea.*; public class RemoveLinkeLinktWorkitemtagResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public RemoveLinkeLinktWorkitemtagResponseBody body; public static RemoveLinkeLinktWorkitemtagResponse build(java.util.Map<String, ?> map) throws Exception { RemoveLinkeLinktWorkitemtagResponse self = new RemoveLinkeLinktWorkitemtagResponse(); return TeaModel.build(map, self); } public RemoveLinkeLinktWorkitemtagResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public RemoveLinkeLinktWorkitemtagResponse setBody(RemoveLinkeLinktWorkitemtagResponseBody body) { this.body = body; return this; } public RemoveLinkeLinktWorkitemtagResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
b129ba83d4283c5e9c3449899e1d8df07f1d7d2a
34b713d69bae7d83bb431b8d9152ae7708109e74
/core/broadleaf-framework/src/main/java/org/broadleafcommerce/core/payment/service/OrderToPaymentRequestDTOService.java
0253ac3bc9eae3153a781b575654ba3f4d118b1f
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sinotopia/BroadleafCommerce
d367a22af589b51cc16e2ad094f98ec612df1577
502ff293d2a8d58ba50a640ed03c2847cb6369f6
refs/heads/BroadleafCommerce-4.0.x
2021-01-23T14:14:45.029362
2019-07-26T14:18:05
2019-07-26T14:18:05
93,246,635
0
0
null
2017-06-03T12:27:13
2017-06-03T12:27:13
null
UTF-8
Java
false
false
3,784
java
/* * #%L * BroadleafCommerce Framework * %% * Copyright (C) 2009 - 2013 Broadleaf Commerce * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ package org.broadleafcommerce.core.payment.service; import org.broadleafcommerce.common.money.Money; import org.broadleafcommerce.common.payment.PaymentType; import org.broadleafcommerce.common.payment.dto.PaymentRequestDTO; import org.broadleafcommerce.core.order.domain.Order; import org.broadleafcommerce.core.order.service.FulfillmentGroupService; import org.broadleafcommerce.core.payment.domain.PaymentTransaction; /** * @author Elbert Bautista (elbertbautista) */ public interface OrderToPaymentRequestDTOService { /** * <p>This translates an Order of {@link PaymentType#CREDIT_CARD} into a PaymentRequestDTO. * This method assumes that this translation will apply to a final payment which means that the transaction amount for * the returned {@link PaymentRequestDTO} will be {@link Order#getTotalAfterAppliedPayments()} * It assumes that all other payments (e.g. gift cards/account credit) have already * been applied to the {@link Order}.</p> * * @param order the {@link Order} to be translated * @return a {@link PaymentRequestDTO} based on the properties of <b>order</b>. This will only utilize the payments * that are of type {@link PaymentType#CREDIT_CARD} */ public PaymentRequestDTO translateOrder(Order order); /** * Utilizes the {@link PaymentTransaction#getAdditionalFields()} map to populate necessary request parameters on the * resulting {@link PaymentRequestDTO}. These additional fields are then used by the payment gateway to construct * additional requests to the payment gateway. For instance, this might be use to refund or void the given <b>paymentTransaction</b> * * @param transactionAmount the amount that should be placed on {@link PaymentRequestDTO#getTransactionTotal()} * @param paymentTransaction the transaction whose additional fields should be placed on {@link PaymentRequestDTO#getAdditionalFields()} * for the gateway to use * @return a new {@link PaymentRequestDTO} populated with the additional fields from <b>paymentTransaction</b> and * the amount from <b>transactionAmount<b> */ public PaymentRequestDTO translatePaymentTransaction(Money transactionAmount, PaymentTransaction paymentTransaction); public void populateTotals(Order order, PaymentRequestDTO requestDTO); public void populateCustomerInfo(Order order, PaymentRequestDTO requestDTO); /** * Uses the first shippable fulfillment group to populate the {@link PaymentRequestDTO#shipTo()} object * @param order the {@link Order} to get data from * @param requestDTO the {@link PaymentRequestDTO} that should be populated * @see {@link FulfillmentGroupService#getFirstShippableFulfillmentGroup(Order)} */ public void populateShipTo(Order order, PaymentRequestDTO requestDTO); public void populateBillTo(Order order, PaymentRequestDTO requestDTO); public void populateDefaultLineItemsAndSubtotal(Order order, PaymentRequestDTO requestDTO); }
[ "sinosie7en@gmail.com" ]
sinosie7en@gmail.com
761388d09ab5e70644da0867ca748dd191cd8029
3a2e106de7ae82f16b69af9b52ec6b1052a5aba6
/Core_Java/Arrays/arrays/ArraysDemo.java
6e04aa5f68bfcc88023485b094f1f49d1c6e1ff7
[]
no_license
nageshphaniraj81/BigLeapProject
d3b8ad03f9e76313a80bc0151eca6b63e101caf4
488d556dda3cba5cc4ee14cb468e22fc9e44edfc
refs/heads/master
2021-01-20T16:16:46.572634
2017-06-02T19:38:02
2017-06-02T19:38:02
90,828,501
0
0
null
null
null
null
UTF-8
Java
false
false
620
java
package arrays; public class ArraysDemo { public static void main(String[] args) { //Define array with values int [] a = {10,20,30,40,50}; // Need to provide array size int arr[] = new int[4]; arr[0] = 10; arr[1] = new Integer(20); // Autoboxing arr[2] = (int) 30.54; arr[3] = 40; try{ arr[7] = 400; }catch(ArrayIndexOutOfBoundsException e){ System.out.println("Array Index out of bound exception"); } System.out.println("Elements of the array"); for (int i : arr) { System.out.println(i); } } }
[ "nageshphaniraj81@gmail.com" ]
nageshphaniraj81@gmail.com
39f407ad986784549875172ca8c185cf55f08314
c2091a77af5174dc04426414d76a2c3f474fcaae
/spring-data-rest-repository/src/main/java/org/springframework/data/rest/repository/RepositoryMetadata.java
c941c3d6b30c951149a7dce6f94a5d624fa9d1e5
[ "Apache-2.0" ]
permissive
fvarg00/spring-data-rest
4661913a46bbd289612b8ba067e8e7aeba2f7498
269d6f5983b73971f7a7a70dc409a520a8d8421c
refs/heads/master
2021-01-18T12:01:05.077404
2012-11-27T16:43:22
2012-11-27T16:43:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,328
java
package org.springframework.data.rest.repository; import java.io.Serializable; import java.lang.reflect.Method; import java.util.Map; import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.Repository; import org.springframework.data.rest.repository.invoke.CrudMethod; import org.springframework.data.rest.repository.invoke.RepositoryQueryMethod; /** * Encapsulates necessary metadata about a {@link Repository}. * * @author Jon Brisbin <jbrisbin@vmware.com> */ public interface RepositoryMetadata<E extends EntityMetadata<? extends AttributeMetadata>> { /** * The name this {@link Repository} is exported under. * * @return Name used in the URL for this Repository. */ String name(); /** * Get the string value to be used as part of a link {@literal rel} attribute. * * @return Rel value used in links. */ String rel(); /** * The type of domain object this {@link Repository} is repsonsible for. * * @return Type of the domain class. */ Class<?> domainType(); /** * The Class of the {@link Repository} subinterface. * * @return Type of the Repository being proxied. */ Class<?> repositoryClass(); /** * The {@link Repository} instance. * * @return The actual {@link Repository} instance. */ CrudRepository<Object, Serializable> repository(); /** * The {@link EntityMetadata} associated with the domain type of this {@literal Repository}. * * @return EntityMetadata associated with this Repository's domain type. */ E entityMetadata(); /** * Get a {@link org.springframework.data.rest.repository.invoke.RepositoryQueryMethod} by key. * * @param key * Segment of the URL to find a query method for. * * @return Found {@link org.springframework.data.rest.repository.invoke.RepositoryQueryMethod} or {@literal null} if * none found. */ RepositoryQueryMethod queryMethod(String key); /** * Get a Map of all {@link RepositoryQueryMethod}s, keyed by name. * * @return All query methods for this Repository. */ Map<String, RepositoryQueryMethod> queryMethods(); /** * Does this Repository all this method to be exported? * * @param method * * @return */ Boolean exportsMethod(CrudMethod method); }
[ "jon@jbrisbin.com" ]
jon@jbrisbin.com
54df73c02a01467a093847136b513c4a800ad1bd
4a47c37bcea65b6b852cc7471751b5239edf7c94
/src/academy/everyonecodes/java/week4/reflection/exercise1/FromZeroRounder.java
a87cac5b08ae9179ef63250db99b1e99543d97f6
[]
no_license
uanave/java-module
acbe808944eae54cfa0070bf8b80edf453a3edcf
f98e49bd05473d394329602db82a6945ad1238b5
refs/heads/master
2022-04-07T15:42:36.210153
2020-02-27T14:43:29
2020-02-27T14:43:29
226,831,034
0
0
null
null
null
null
UTF-8
Java
false
false
253
java
package academy.everyonecodes.java.week4.reflection.exercise1; public class FromZeroRounder { public double round(double number) { if (number < 0) { return Math.floor(number); } return Math.ceil(number); } }
[ "uanavasile@gmail.com" ]
uanavasile@gmail.com
553edbfe0927f6377b29ff61743c4a0ee6931c02
43f0ee726d3f65b2fb77eb80a3473ae646d17d02
/core/src/io/piotrjastrzebski/playground/simple/AtlasSaveTest.java
c663240d5f5c74242ecc7a66237f5b932b90b394
[]
no_license
piotr-j/libgdxplayground
a4280a672152d5a059a6828d9f56c1eab840a45e
db30e4c6b6c5f6476e8ce0794a40c9276e3e2e2b
refs/heads/master
2023-01-22T20:56:28.570574
2023-01-19T19:58:44
2023-01-19T19:58:44
37,018,024
41
8
null
null
null
null
UTF-8
Java
false
false
1,309
java
package io.piotrjastrzebski.playground.simple; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Pixmap; import com.badlogic.gdx.graphics.PixmapIO; import com.badlogic.gdx.graphics.TextureData; import com.badlogic.gdx.graphics.g2d.TextureAtlas; import io.piotrjastrzebski.playground.BaseScreen; import io.piotrjastrzebski.playground.GameReset; public class AtlasSaveTest extends BaseScreen { private final static String TAG = AtlasSaveTest.class.getSimpleName(); public AtlasSaveTest (GameReset game) { super(game); TextureAtlas atlas = new TextureAtlas("gui/uiskin.atlas"); FileHandle save = Gdx.files.external("save"); for (TextureAtlas.AtlasRegion region : atlas.getRegions()) { TextureData td = region.getTexture().getTextureData(); td.prepare(); Pixmap source = td.consumePixmap(); Pixmap pixmap = new Pixmap(region.originalWidth, region.originalHeight, Pixmap.Format.RGBA8888); pixmap.drawPixmap( source, (int)(td.getWidth() * region.getU()), (int)(td.getHeight() * region.getV()), region.originalWidth, region.originalHeight, (int)region.offsetX, (int)region.offsetY, region.originalWidth, region.originalHeight); PixmapIO.writePNG(save.child(region.name), pixmap); pixmap.dispose(); } } }
[ "me@piotrjastrzebski.io" ]
me@piotrjastrzebski.io
e91414b0b302a268ef66aa0a10dc525add25bbf4
07e1eb3b5d426014575e50e7dcc22072bd9fe9b5
/osm-tools-ra/src/main/java/org/osmtools/ra/analyzer/RoundaboutService.java
c5eda08f5eb0e9eaa6ac097b0a53c52a37fb1314
[]
no_license
grundid/osm-tools
1389d6f01b97799ca4e45f05755990957b299275
28250f4baf755e2e17f3a83780e733d50a7f7c17
refs/heads/master
2023-03-16T04:50:13.444351
2019-04-08T07:32:29
2019-04-08T07:32:29
2,287,347
2
4
null
2017-04-05T18:44:37
2011-08-29T08:09:38
Java
UTF-8
Java
false
false
1,228
java
/** * This file is part of Relation Analyzer for OSM. * Copyright (c) 2001 by Adrian Stabiszewski, as@grundid.de * * Relation Analyzer is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Relation Analyzer 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Relation Analyzer. If not, see <http://www.gnu.org/licenses/>. */ package org.osmtools.ra.analyzer; import java.util.List; import org.osmtools.ra.data.Node; import org.osmtools.ra.data.Way; public class RoundaboutService { public static boolean isRoundabout(Way way) { List<Node> nodes = way.getNodes(); if (nodes.size() > 1) { Node firstNode = nodes.get(0); Node lastNode = nodes.get(nodes.size() - 1); return firstNode.equals(lastNode); } else return false; } }
[ "as@grundid.de" ]
as@grundid.de
d4c2afebbdaeb1372ab4b44be4e5a1150de3e88f
6ead9d94dbd42a9384214c33eba0288a2b99fd0e
/z3950-common/src/main/java/org/xbib/z3950/common/v3/ElementSetNames.java
018adac4f2ccc5719c2ff4355c77d388c937950f
[ "Apache-2.0" ]
permissive
xbib/z3950
541ab68b508822e6d27a9dfbb16e788981d8a85a
a66d7b039e81528395c883bd8872c8970947eab4
refs/heads/main
2023-04-09T05:26:49.230168
2023-04-01T07:17:00
2023-04-01T07:17:00
110,899,227
7
4
null
null
null
null
UTF-8
Java
false
false
4,926
java
package org.xbib.z3950.common.v3; import org.xbib.asn1.ASN1Any; import org.xbib.asn1.ASN1EncodingException; import org.xbib.asn1.ASN1Exception; import org.xbib.asn1.BERConstructed; import org.xbib.asn1.BEREncoding; /** * Class for representing a <code>ElementSetNames</code> from <code>Z39-50-APDU-1995</code>. * <pre> * ElementSetNames ::= * CHOICE { * genericElementSetName [0] IMPLICIT InternationalString * databaseSpecific [1] IMPLICIT SEQUENCE OF ElementSetNames_databaseSpecific * } * </pre> */ public final class ElementSetNames extends ASN1Any { public InternationalString cGenericElementSetName; public ElementSetNamesDatabaseSpecific[] cDatabaseSpecific; /** * Default constructor for a ElementSetNames. */ public ElementSetNames() { } /** * Constructor for a ElementSetNames from a BER encoding. * * @param ber the BER encoding. * @param checkTag will check tag if true, use false * if the BER has been implicitly tagged. You should * usually be passing true. * @throws ASN1Exception if the BER encoding is bad. */ public ElementSetNames(BEREncoding ber, boolean checkTag) throws ASN1Exception { super(ber, checkTag); } /** * Initializing object from a BER encoding. * This method is for internal use only. You should use * the constructor that takes a BEREncoding. * * @param ber the BER to decode. * @param checkTag if the tag should be checked. * @throws ASN1Exception if the BER encoding is bad. */ @Override public void berDecode(BEREncoding ber, boolean checkTag) throws ASN1Exception { cGenericElementSetName = null; cDatabaseSpecific = null; if (ber.getTag() == 0 && ber.getTagType() == BEREncoding.CONTEXT_SPECIFIC_TAG) { cGenericElementSetName = new InternationalString(ber, false); return; } if (ber.getTag() == 1 && ber.getTagType() == BEREncoding.CONTEXT_SPECIFIC_TAG) { BEREncoding berData; berData = ber; BERConstructed berConstructed; try { berConstructed = (BERConstructed) berData; } catch (ClassCastException e) { throw new ASN1EncodingException("bad BER form"); } int numParts = berConstructed.numberComponents(); int p; cDatabaseSpecific = new ElementSetNamesDatabaseSpecific[numParts]; for (p = 0; p < numParts; p++) { cDatabaseSpecific[p] = new ElementSetNamesDatabaseSpecific(berConstructed.elementAt(p), true); } return; } throw new ASN1Exception("bad BER encoding: choice not matched"); } /** * Returns a BER encoding of ElementSetNames. * * @return The BER encoding. * @throws ASN1Exception Invalid or cannot be encoded. */ @Override public BEREncoding berEncode() throws ASN1Exception { BEREncoding chosen = null; BEREncoding[] f2; int p; if (cGenericElementSetName != null) { chosen = cGenericElementSetName.berEncode(BEREncoding.CONTEXT_SPECIFIC_TAG, 0); } if (cDatabaseSpecific != null) { if (chosen != null) { throw new ASN1Exception("CHOICE multiply set"); } f2 = new BEREncoding[cDatabaseSpecific.length]; for (p = 0; p < cDatabaseSpecific.length; p++) { f2[p] = cDatabaseSpecific[p].berEncode(); } chosen = new BERConstructed(BEREncoding.CONTEXT_SPECIFIC_TAG, 1, f2); } if (chosen == null) { throw new ASN1Exception("CHOICE not set"); } return chosen; } @Override public BEREncoding berEncode(int tagType, int tag) throws ASN1Exception { throw new ASN1EncodingException("cannot implicitly tag"); } /** * Returns a new String object containing a text representing * of the ElementSetNames. */ @Override public String toString() { int p; StringBuilder str = new StringBuilder("{"); boolean found = false; if (cGenericElementSetName != null) { found = true; str.append("genericElementSetName "); str.append(cGenericElementSetName); } if (cDatabaseSpecific != null) { if (found) { str.append("<ERROR: multiple CHOICE: databaseSpecific> "); } str.append("databaseSpecific "); str.append("{"); for (p = 0; p < cDatabaseSpecific.length; p++) { str.append(cDatabaseSpecific[p]); } str.append("}"); } str.append("}"); return str.toString(); } }
[ "joergprante@gmail.com" ]
joergprante@gmail.com
42bea1077f1260d0d510c93f534f16ab36f78d47
3dd35c0681b374ce31dbb255b87df077387405ff
/generated/productmodel/GenericGL7PremiumDeterminationType.java
02d068a6576f51f575831aa362791431cb2f7e06
[]
no_license
walisashwini/SBTBackup
58b635a358e8992339db8f2cc06978326fed1b99
4d4de43576ec483bc031f3213389f02a92ad7528
refs/heads/master
2023-01-11T09:09:10.205139
2020-11-18T12:11:45
2020-11-18T12:11:45
311,884,817
0
0
null
null
null
null
UTF-8
Java
false
false
532
java
package productmodel; @gw.lang.SimplePropertyProcessing @javax.annotation.Generated(comments = "config/resources/productmodel/policylinepatterns/GL7Line/coveragepatterns/GL7PolicyChangesExceptions.xml", date = "", value = "com.guidewire.pc.productmodel.codegen.ProductModelCodegen") public interface GenericGL7PremiumDeterminationType extends gw.api.domain.covterm.BooleanCovTerm { productmodel.GL7PolicyChangesExceptions getCondition(); productmodel.GL7PolicyChangesExceptions getGL7PolicyChangesExceptions(); }
[ "ashwini@cruxxtechnologies.com" ]
ashwini@cruxxtechnologies.com
f917fda60b0713bde29e0d9e09285f7da0c8caa6
17f3774576dc100980708565bf90762ca8545438
/app/src/main/java/com/codeinger/technorizentask/repository/UserRepo.java
9744fbf721ff0cc4cfcd3c3d09a9e68068c46251
[]
no_license
Amirkhan5949/Technorizentask
d4a1c64433d5994245eea8831e8355cadb1109eb
93715202c8ee47aec9ecaaa34443bfcf40e56485
refs/heads/master
2023-06-17T12:54:45.875671
2021-07-16T20:42:31
2021-07-16T20:42:31
386,304,557
0
0
null
null
null
null
UTF-8
Java
false
false
1,141
java
package com.codeinger.technorizentask.repository; import androidx.lifecycle.LiveData; import com.codeinger.technorizentask.data.room.UserDao; import com.codeinger.technorizentask.model.UserModel; import java.util.List; import javax.inject.Inject; public class UserRepo { private final UserDao userDao; @Inject public UserRepo(UserDao userDao) { this.userDao = userDao; } public long addUser(UserModel userModels) { return userDao.addtUser(userModels); } public void updateUser(UserModel... userModels) { userDao.updateUser(userModels); } public void deleteUser(UserModel... userModels) { userDao.deleteUser(userModels); } public LiveData<List<UserModel>> getAllUSers(){ return userDao.getAllUSers(); } public List<UserModel> getUserById(long userIds) { return userDao.getUserById(userIds); } public List<UserModel> getEmailAndPass(String email,String pass) { return userDao.getEmailAndPass(email,pass); } public List<UserModel> getEmail(String email) { return userDao.getEmail(email); } }
[ "ak4729176@gmail.com" ]
ak4729176@gmail.com
d2dcc5119f75e5b050c86e7a879d07347210bfd2
4da9097315831c8639a8491e881ec97fdf74c603
/src/StockIT-v2-release_source_from_JADX/sources/kotlin/text/StringsKt___StringsKt$windowedSequence$2.java
903436a8c5d0051397592da9824e1056f777fc96
[ "Apache-2.0" ]
permissive
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
refs/heads/main
2023-08-11T06:17:05.659651
2021-10-01T08:48:06
2021-10-01T08:48:06
410,595,708
1
1
null
null
null
null
UTF-8
Java
false
false
1,516
java
package kotlin.text; import kotlin.Metadata; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Lambda; @Metadata(mo40251bv = {1, 0, 3}, mo40252d1 = {"\u0000\f\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0002\u0010\u0000\u001a\u0002H\u0001\"\u0004\b\u0000\u0010\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, mo40253d2 = {"<anonymous>", "R", "index", "", "invoke", "(I)Ljava/lang/Object;"}, mo40254k = 3, mo40255mv = {1, 4, 1}) /* compiled from: _Strings.kt */ final class StringsKt___StringsKt$windowedSequence$2 extends Lambda implements Function1<Integer, R> { final /* synthetic */ int $size; final /* synthetic */ CharSequence $this_windowedSequence; final /* synthetic */ Function1 $transform; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ StringsKt___StringsKt$windowedSequence$2(CharSequence charSequence, int i, Function1 function1) { super(1); this.$this_windowedSequence = charSequence; this.$size = i; this.$transform = function1; } public /* bridge */ /* synthetic */ Object invoke(Object obj) { return invoke(((Number) obj).intValue()); } public final R invoke(int i) { int i2 = this.$size + i; if (i2 < 0 || i2 > this.$this_windowedSequence.length()) { i2 = this.$this_windowedSequence.length(); } return this.$transform.invoke(this.$this_windowedSequence.subSequence(i, i2)); } }
[ "57108396+atul-vyshnav@users.noreply.github.com" ]
57108396+atul-vyshnav@users.noreply.github.com
dba1dd4f5935eaa34d1b42faf3a76a72861cb48a
b451d80fa0f3d831a705ed58314b56dcd180ef4a
/kpluswebup_service_system/src/main/java/com/kpluswebup/web/admin/system/service/WhiteListService.java
74708e124b193e08e4ab83d7ba7941bcf0139c19
[]
no_license
beppezhang/sobe
8cbd9bbfcc81330964c2212c2a75f71fe98cc8df
5fafd84d96a3b082edbadced064a9c135115e719
refs/heads/master
2021-01-13T06:03:19.431407
2017-06-22T03:35:54
2017-06-22T03:35:54
95,071,332
0
1
null
null
null
null
UTF-8
Java
false
false
762
java
package com.kpluswebup.web.admin.system.service; import java.util.List; import com.kpluswebup.web.domain.WhiteListDTO; import com.kpluswebup.web.vo.WhiteListVO; public interface WhiteListService { /** * 查询IP白名单 * * @date 2014年11月24日 * @author wanghehua * @return * @since JDK 1.6 * @Description */ public List<WhiteListVO> findWhileList(); /** * 添加白名单 * * @date 2014年11月24日 * @author wanghehua * @param whiteListVO * @return * @since JDK 1.6 * @Description */ public void addWhiteIP(WhiteListDTO whiteListDTO); /** * 删除白名单 * @date 2014年11月24日 * @author wanghehua * @param id * @since JDK 1.6 * @Description */ public Boolean deleteWhiteIP(Long id); }
[ "zhangshangliang@sunlight.bz" ]
zhangshangliang@sunlight.bz
dedd2a41fbf7c560ab7a4bc1a2dcda712c787706
a15e6062d97bd4e18f7cefa4fe4a561443cc7bc8
/src/combit/ListLabel24/Dom/PropertyFontExt.java
462d92190e813a847cbed127cd10de092a5fd284
[]
no_license
Javonet-io-user/e66e9f78-68be-483d-977e-48d29182c947
017cf3f4110df45e8ba4a657ba3caba7789b5a6e
02ec974222f9bb03a938466bd6eb2421bb3e2065
refs/heads/master
2020-04-15T22:55:05.972920
2019-01-10T16:01:59
2019-01-10T16:01:59
165,089,187
0
0
null
null
null
null
UTF-8
Java
false
false
1,723
java
package combit.ListLabel24.Dom; import Common.Activation; import static Common.Helper.Convert; import static Common.Helper.getGetObjectName; import static Common.Helper.getReturnObjectName; import static Common.Helper.ConvertToConcreteInterfaceImplementation; import Common.Helper; import com.javonet.Javonet; import com.javonet.JavonetException; import com.javonet.JavonetFramework; import com.javonet.api.NObject; import com.javonet.api.NEnum; import com.javonet.api.keywords.NRef; import com.javonet.api.keywords.NOut; import com.javonet.api.NControlContainer; import java.util.concurrent.atomic.AtomicReference; import java.util.Iterator; import java.lang.*; import combit.ListLabel24.Dom.*; public class PropertyFontExt extends PropertyFont { protected NObject javonetHandle; /** SetProperty */ public void setDefault(java.lang.String value) { try { javonetHandle.set("Default", value); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } } /** GetProperty */ public java.lang.String getDefault() { try { java.lang.String res = javonetHandle.get("Default"); if (res == null) return ""; return (java.lang.String) res; } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return ""; } } public PropertyFontExt(NObject handle) { super(handle); this.javonetHandle = handle; } public void setJavonetHandle(NObject handle) { this.javonetHandle = handle; } static { try { Activation.initializeJavonet(); } catch (java.lang.Exception e) { e.printStackTrace(); } } }
[ "support@javonet.com" ]
support@javonet.com
c6c97a09cae78a271076a7b561e2ef0f0ca3d254
ffe6ab9fb831511f3b2eea4470b166c151a3fc21
/src/fr/redmoon/tictac/gui/dialogs/EditExtraFragment.java
1abc978fbd7fa356fe042c315c4d1878d299eabf
[]
no_license
opack/welltime
0b1cc95e71abee44243a92a7b0b265b6dd40613e
995142f350fe8c553985af2b7f8f7569baadcfd7
refs/heads/master
2020-12-02T15:46:23.353009
2014-03-04T12:15:08
2014-03-04T12:15:08
67,418,776
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,642
java
package fr.redmoon.tictac.gui.dialogs; import android.app.Dialog; import android.app.TimePickerDialog; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.text.format.DateFormat; import android.widget.TimePicker; import fr.redmoon.tictac.bus.TimeUtils; import fr.redmoon.tictac.db.DbAdapter; import fr.redmoon.tictac.gui.activities.TicTacActivity; public class EditExtraFragment extends DialogFragment implements TimePickerDialog.OnTimeSetListener { public final static String TAG = EditExtraFragment.class.getName(); private long mDate; private int mOldValue; @Override public void setArguments(Bundle args) { mDate = args.getLong(DialogArgs.DATE.name()); mOldValue = args.getInt(DialogArgs.TIME.name()); } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { final int hour = TimeUtils.extractHour(mOldValue); final int minute = TimeUtils.extractMinutes(mOldValue); return new TimePickerDialog(getActivity(), this, hour, minute, DateFormat.is24HourFormat(getActivity())); } @Override public void onTimeSet(TimePicker view, int hourOfDay, int minute) { final int newTime = hourOfDay * 100 + minute; final TicTacActivity activity = (TicTacActivity)getActivity(); if (newTime == mOldValue) { return; } // Mise à jour de la base de données final DbAdapter db = DbAdapter.getInstance(activity); db.openDatabase(); final boolean dbUpdated = db.updateDayExtra(mDate, newTime); db.closeDatabase(); if (dbUpdated) { // Mise à jour de l'affichage activity.populateView(mDate); } } }
[ "opack@users.noreply.github.com" ]
opack@users.noreply.github.com
76b8ae0274a61a4e88edf3470300c83ea263923b
1d11d02630949f18654d76ed8d5142520e559b22
/OnlineContributors/src/org/tolweb/tapestry/WebquestViewIntroduction.java
e192c3755d02257776c9f646370d05b664ea4753
[]
no_license
tolweb/tolweb-app
ca588ff8f76377ffa2f680a3178351c46ea2e7ea
3a7b5c715f32f71d7033b18796d49a35b349db38
refs/heads/master
2021-01-02T14:46:52.512568
2012-03-31T19:22:24
2012-03-31T19:22:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
539
java
/* * Created on Jun 23, 2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package org.tolweb.tapestry; /** * @author dmandel * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public abstract class WebquestViewIntroduction extends ViewWebquest { public String getIntroduction() { return getPreparedText(getWebquest().getIntroduction()); } }
[ "lenards@iplantcollaborative.org" ]
lenards@iplantcollaborative.org
3c00299629e5e31720fd241524cb4e4611dda2ef
736e4a61e9f0fad887a74099c4b437ef1deab68b
/vertx-pin/zero-ambient/src/main/java/io/vertx/tp/ambient/refine/At.java
d1625595da29ee16976b49d5da4ad59e1a49193e
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
javac-xinghejun/vertx-zero
29ffdd7edbe31ce88c5b7be0a20838c64f0c9570
9c6e9a3fce574a2c3c1ffc29feb8d8769894eb4b
refs/heads/master
2022-04-05T18:26:57.172562
2020-03-02T03:59:35
2020-03-02T03:59:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,907
java
package io.vertx.tp.ambient.refine; import cn.vertxup.ambient.domain.tables.pojos.XApp; import cn.vertxup.ambient.domain.tables.pojos.XNumber; import io.vertx.core.Future; import io.vertx.core.json.JsonArray; import io.vertx.core.json.JsonObject; import io.vertx.ext.web.FileUpload; import io.vertx.up.commune.config.Database; import io.vertx.up.log.Annal; import io.vertx.up.unity.Ux; import org.jooq.DSLContext; import java.util.List; /* * Tool class available in current service only */ public class At { /* * Log */ public static void infoInit(final Annal logger, final String pattern, final Object... args) { AtLog.infoInit(logger, pattern, args); } public static void infoEnv(final Annal logger, final String pattern, final Object... args) { AtLog.infoEnv(logger, pattern, args); } public static void infoFile(final Annal logger, final String pattern, final Object... args) { AtLog.infoFile(logger, pattern, args); } public static void infoApp(final Annal logger, final String pattern, final Object... args) { AtLog.infoApp(logger, pattern, args); } public static void infoFlow(final Class<?> clazz, final String pattern, final Object... args) { AtLog.infoExec(clazz, pattern, args); } /* * App Info, Bind to new datasource or current get. */ public static XApp app(final DSLContext context, final String name) { return AtEnv.getApp(context, name); } public static XApp app(final String name) { return AtEnv.getApp(name); } public static Future<Database> databaseAsync(final String appId) { return AtEnv.getDatabaseWithCache(appId); } public static List<String> serials(final XNumber number, final Integer count) { return AtSerial.serials(number, count); } public static Future<List<String>> serialsAsync(final XNumber number, final Integer count) { return Ux.future(AtSerial.serials(number, count)); } /* * File */ public static JsonObject upload(final String category, final FileUpload fileUpload) { return AtEnv.upload(category, fileUpload); } public static JsonObject filters(final String appId, final String type, final String code) { return AtQuery.filters(appId, new JsonArray().add(type), code); } public static JsonObject filters(final String appId, final JsonArray types, final String code) { return AtQuery.filters(appId, types, code); } public static JsonObject filtersSigma(final String sigma, final String type, final String code) { return AtQuery.filtersSigma(sigma, new JsonArray().add(type), code); } public static JsonObject filtersSigma(final String sigma, final JsonArray types, final String code) { return AtQuery.filtersSigma(sigma, types, code); } }
[ "silentbalanceyh@126.com" ]
silentbalanceyh@126.com
f72b5d780663a8027c9a7e4ae7d60f13d2c3e610
b34654bd96750be62556ed368ef4db1043521ff2
/auto_screening_management/tags/before_replatforming/src/java/tests/com/cronos/onlinereview/autoscreening/management/accuracytests/PersistenceExceptionAccurayTest.java
5871e6b94612df902b54797eae4f50359dc6f484
[]
no_license
topcoder-platform/tcs-cronos
81fed1e4f19ef60cdc5e5632084695d67275c415
c4ad087bb56bdaa19f9890e6580fcc5a3121b6c6
refs/heads/master
2023-08-03T22:21:52.216762
2019-03-19T08:53:31
2019-03-19T08:53:31
89,589,444
0
1
null
2019-03-19T08:53:32
2017-04-27T11:19:01
null
UTF-8
Java
false
false
3,327
java
/* * Copyright (C) 2006 TopCoder Inc., All Rights Reserved. */ package com.cronos.onlinereview.autoscreening.management.accuracytests; import com.cronos.onlinereview.autoscreening.management.PersistenceException; import com.cronos.onlinereview.autoscreening.management.ScreeningManagementException; import junit.framework.TestCase; /** * <p>The accuracy test cases for PersistenceException class.</p> * * @author oodinary * @version 1.0 */ public class PersistenceExceptionAccurayTest extends TestCase { /** * <p>The Default Exception Message.</p> */ private final String defaultExceptionMessage = "DefaultExceptionMessage"; /** * <p>The Default Throwable Message.</p> */ private final String defaultThrowableMessage = "DefaultThrowableMessage"; /** * <p>An instance for testing.</p> */ private PersistenceException defaultException = null; /** * <p>Initialization.</p> * * @throws Exception to JUnit. */ protected void setUp() throws Exception { defaultException = new PersistenceException(defaultExceptionMessage); } /** * <p>Set defaultException to null.</p> * * @throws Exception to JUnit. */ protected void tearDown() throws Exception { defaultException = null; } /** * <p>Tests the ctor(String).</p> * <p>The PersistenceException instance should be created successfully.</p> */ public void testCtor_String_Accuracy() { assertNotNull("PersistenceException should be accurately created.", defaultException); assertTrue("defaultException should be instance of PersistenceException.", defaultException instanceof PersistenceException); assertTrue("defaultException should be instance of ScreeningManagementException.", defaultException instanceof ScreeningManagementException); assertTrue("PersistenceException should be accurately created with the same Exception message.", defaultException.getMessage().indexOf(defaultExceptionMessage) >= 0); } /** * <p>Tests the ctor(String, Throwable).</p> * <p>The PersistenceException instance should be created successfully.</p> */ public void testCtor_StringThrowable_Accuracy() { defaultException = new PersistenceException(defaultExceptionMessage, new Throwable(defaultThrowableMessage)); assertNotNull("PersistenceException should be accurately created.", defaultException); assertTrue("defaultException should be instance of PersistenceException.", defaultException instanceof PersistenceException); assertTrue("defaultException should be instance of ScreeningManagementException.", defaultException instanceof ScreeningManagementException); assertTrue("PersistenceException should be accurately created with the same Exception message.", defaultException.getMessage().indexOf(defaultExceptionMessage) >= 0); assertTrue("PersistenceException should be accurately created with the same Throwable message.", defaultException.getMessage().indexOf(defaultThrowableMessage) >= 0); } }
[ "mashannon168@fb370eea-3af6-4597-97f7-f7400a59c12a" ]
mashannon168@fb370eea-3af6-4597-97f7-f7400a59c12a