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
3b4adcae1227272514fbf35a73150acd814f852e
1bf6613e21a5695582a8e6d9aaa643af4a1a5fa8
/src/dart/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/AnalyzeContextTask.java
524495206b85c19ddf0a7d23cacc84c362d1f852
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
pqrkchqps/MusicBrowser
ef5c9603105b4f4508a430d285334667ec3c1445
03216439d1cc3dae160f440417fcb557bb72f8e4
refs/heads/master
2020-05-20T05:12:14.141094
2013-05-31T02:21:07
2013-05-31T02:21:07
10,395,498
1
2
null
null
null
null
UTF-8
Java
false
false
1,822
java
/* * Copyright 2012 Dart project authors. * * Licensed under the Eclipse Public License v1.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.eclipse.org/legal/epl-v10.html * * 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.google.dart.tools.core.analysis; import com.google.dart.tools.core.DartCore; import java.io.File; import java.util.ArrayList; /** * Analyze all libraries in a context */ class AnalyzeContextTask extends Task { private final AnalysisServer server; AnalyzeContextTask(AnalysisServer server) { this.server = server; } @Override public boolean canRemove(File discarded) { return true; } @Override public boolean isPriority() { return false; } @Override public void perform() { File[] libraryFiles = server.getTrackedLibraryFiles(); ArrayList<File> todo = new ArrayList<File>(libraryFiles.length); // Analyze libraries in application directory hierarchies first for (File libFile : libraryFiles) { if (DartCore.getApplicationDirectory(libFile) != null) { server.queueSubTask(new AnalyzeLibraryTask(server, libFile, null)); } else { todo.add(libFile); } } // Then analyze all remaining libraries in the saved context for (File libFile : todo) { server.queueSubTask(new AnalyzeLibraryTask(server, libFile, null)); } } @Override public String toString() { return getClass().getName(); } }
[ "creps002@umn.edu" ]
creps002@umn.edu
c953d74571947fcc6a3ec08ae65256d20745ce6e
1ca6603d66dd38e5225ce429c755b584d1628c06
/src/main/java/com/vencislav/invoices/config/AsyncConfiguration.java
a207ca014363195e5d3655c55077a281810f4ff5
[]
no_license
venci78/invoicesproject
350450ea63f8e8170b7beefa062aa9caa8537842
4ef83be2575ef6f937e8eca57838e5347c9643a4
refs/heads/master
2022-12-21T05:13:39.845663
2019-12-21T18:20:35
2019-12-21T18:20:35
229,466,495
0
0
null
2022-12-16T04:42:35
2019-12-21T18:20:20
Java
UTF-8
Java
false
false
2,006
java
package com.vencislav.invoices.config; import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; import org.springframework.boot.autoconfigure.task.TaskExecutionProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.AsyncConfigurer; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import java.util.concurrent.Executor; @Configuration @EnableAsync @EnableScheduling public class AsyncConfiguration implements AsyncConfigurer { private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); private final TaskExecutionProperties taskExecutionProperties; public AsyncConfiguration(TaskExecutionProperties taskExecutionProperties) { this.taskExecutionProperties = taskExecutionProperties; } @Override @Bean(name = "taskExecutor") public Executor getAsyncExecutor() { log.debug("Creating Async Task Executor"); ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(taskExecutionProperties.getPool().getCoreSize()); executor.setMaxPoolSize(taskExecutionProperties.getPool().getMaxSize()); executor.setQueueCapacity(taskExecutionProperties.getPool().getQueueCapacity()); executor.setThreadNamePrefix(taskExecutionProperties.getThreadNamePrefix()); return new ExceptionHandlingAsyncTaskExecutor(executor); } @Override public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { return new SimpleAsyncUncaughtExceptionHandler(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
d349c28c58ca413344e47bb67876864821e12a4b
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/ant/1.6/.svn/pristine/d3/d349c28c58ca413344e47bb67876864821e12a4b.svn-base
440933bf46dcd762829f0ba3ca5094d091c41f49
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
4,722
/* * Copyright 2001-2002,2004 The Apache Software Foundation * * 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.apache.tools.ant.types; import java.util.Stack; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.util.regexp.Regexp; import org.apache.tools.ant.util.regexp.RegexpFactory; /*** * A regular expression datatype. Keeps an instance of the * compiled expression for speed purposes. This compiled * expression is lazily evaluated (it is compiled the first * time it is needed). The syntax is the dependent on which * regular expression type you are using. The system property * "ant.regexp.regexpimpl" will be the classname of the implementation * that will be used. * * <pre> * For jdk &lt;= 1.3, there are two available implementations: * org.apache.tools.ant.util.regexp.JakartaOroRegexp (the default) * Based on the jakarta-oro package * * org.apache.tools.ant.util.regexp.JakartaRegexpRegexp * Based on the jakarta-regexp package * * For jdk &gt;= 1.4 an additional implementation is available: * org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp * Based on the jdk 1.4 built in regular expression package. * </pre> * * <pre> * &lt;regexp [ [id="id"] pattern="expression" | refid="id" ] * /&gt; * </pre> * * @see org.apache.oro.text.regex.Perl5Compiler * @see org.apache.regexp.RE * @see java.util.regex.Pattern * * @see org.apache.tools.ant.util.regexp.Regexp * * @ant.datatype name="regexp" */ public class RegularExpression extends DataType { /** Name of this data type */ public static final String DATA_TYPE_NAME = "regexp"; private boolean alreadyInit = false; // The regular expression factory private static final RegexpFactory FACTORY = new RegexpFactory(); private Regexp regexp = null; // temporary variable private String myPattern; private boolean setPatternPending = false; /** * default constructor */ public RegularExpression() { } private void init(Project p) { if (!alreadyInit) { this.regexp = FACTORY.newRegexp(p); alreadyInit = true; } } private void setPattern() { if (setPatternPending) { regexp.setPattern(myPattern); setPatternPending = false; } } /** * sets the regular expression pattern * @param pattern regular expression pattern */ public void setPattern(String pattern) { if (regexp == null) { myPattern = pattern; setPatternPending = true; } else { regexp.setPattern(pattern); } } /*** * Gets the pattern string for this RegularExpression in the * given project. * @param p project * @return pattern */ public String getPattern(Project p) { init(p); if (isReference()) { return getRef(p).getPattern(p); } setPattern(); return regexp.getPattern(); } /** * provides a reference to the Regexp contained in this * @param p project * @return Regexp instance associated with this RegularExpression instance */ public Regexp getRegexp(Project p) { init(p); if (isReference()) { return getRef(p).getRegexp(p); } setPattern(); return this.regexp; } /*** * Get the RegularExpression this reference refers to in * the given project. Check for circular references too * @param p project * @return resolved RegularExpression instance */ public RegularExpression getRef(Project p) { if (!isChecked()) { Stack stk = new Stack(); stk.push(this); dieOnCircularReference(stk, p); } Object o = getRefid().getReferencedObject(p); if (!(o instanceof RegularExpression)) { String msg = getRefid().getRefId() + " doesn\'t denote a " + DATA_TYPE_NAME; throw new BuildException(msg); } else { return (RegularExpression) o; } } }
[ "hvdthong@github.com" ]
hvdthong@github.com
a56446a6df45d365b1ddf75497713f61b2a9085d
8cf71e843b32cdb607f95142d0a1bf1480044019
/WheatherReportClient_JAX_RPC_SI/src/com/wheatherreport/client/Test.java
a1381188490809aac9a4fed7a245a17d80e1fbd3
[]
no_license
Sam-786-18/soap-webservices
b53563602ae99465c2e927efe1c19ef50791842d
e9c25827a33986e41a6d7902291ee9f954f2bdd4
refs/heads/master
2020-12-20T20:51:15.625689
2020-01-25T17:52:57
2020-01-25T17:52:57
236,206,501
0
0
null
null
null
null
UTF-8
Java
false
false
613
java
package com.wheatherreport.client; import java.rmi.RemoteException; import javax.xml.rpc.ServiceException; import com.wheathereport.proxy.GlobalWeather; import com.wheathereport.proxy.GlobalWeatherSoap; import com.wheathereport.proxy.GlobalWeather_Impl; public class Test { public static void main(String[] args)throws ServiceException, RemoteException { GlobalWeather globalWeather=new GlobalWeather_Impl(); GlobalWeatherSoap sei=globalWeather.getGlobalWeatherSoap(); //String result=sei.getWeather("BHOPAL","INDIA"); String result1=sei.getCitiesByCountry("INDIA"); System.out.println(result1); } }
[ "smscjp28@gmail.com" ]
smscjp28@gmail.com
62f91dc023206b8826008b2bf0538811de91a247
1d2f971d687732298049a51bd774ce462c574d5e
/FaultyVersions/AORB_53/AlipayTransfer.java
f98b73ad570ab15897a4f9a8ce09d87717568270
[]
no_license
PaDMT-USTB/Alipay
3aeea3ab1ec9f396bb01a79fd0f8337dd644db7a
acaebdbe967bfdb4eeb25d09003c3cdc94d0eed6
refs/heads/main
2023-07-26T10:01:18.317308
2021-09-09T11:53:56
2021-09-09T11:53:56
307,378,154
3
0
null
null
null
null
UTF-8
Java
false
false
3,943
java
// This is a mutant program. // Author : ysma package ustb.edu.cn.alipay.mutant.AORB_53; import ustb.edu.cn.alipay.CardBand; import ustb.edu.cn.alipay.User; import utils.vaild; public class AlipayTransfer { public static double transferToBandCard( ustb.edu.cn.alipay.User user, java.lang.String bandCard, java.lang.String name, double transferAmount, int transferMethod, java.lang.String cardID ) { double handlingFee = 0; if (bandCard == null || name == null || transferMethod != 1 && transferMethod != 2 && transferMethod != 3 || user == null) { return -1; } if (!user.getActualName().equals( name ) && user.getIsAuthentication()) { if (transferMethod == 1) { if (transferAmount <= user.getFreeWithdrawalLimit()) { if (user.getMoneyInBalance() - transferAmount - handlingFee < 0) { return -1; } else { return handlingFee; } } else { handlingFee = (transferAmount - user.getFreeWithdrawalLimit()) * 0.02; if (user.getMoneyInBalance() - transferAmount - handlingFee < 0) { return -1; } else { return handlingFee; } } } if (transferMethod == 2) { return handlingFee; } if (transferMethod == 3) { if (transferAmount <= user.getFreeWithdrawalLimit()) { if (user.getCardBand( cardID ).getMoney() - transferAmount - handlingFee < 0) { return -1; } return handlingFee; } else { handlingFee = (transferAmount - user.getCardBand( cardID ).getMoney()) * 0.02; if (user.getCardBand( cardID ).getMoney() - transferAmount - handlingFee < 0) { return -1; } return handlingFee; } } } if (user.getActualName().equals( name ) && user.getIsAuthentication()) { if (transferMethod == 1) { return handlingFee; } if (transferMethod == 2) { return handlingFee; } if (transferMethod == 3) { return -1; } } if (!user.getIsAuthentication()) { if (transferMethod == 1) { handlingFee = (transferAmount - user.getFreeWithdrawalLimit()) / 0.02; if (user.getMoneyInBalance() - transferAmount - handlingFee < 0) { return -1; } else { return handlingFee; } } if (transferMethod == 2) { handlingFee = (transferAmount - user.getFreeWithdrawalLimit()) * 0.02; if (user.getMoneyInYuebao() - transferAmount - handlingFee < 0) { return -1; } else { return handlingFee; } } if (transferMethod == 3) { return -1; } } return handlingFee; } public static void main( java.lang.String[] args ) { ustb.edu.cn.alipay.User user = new ustb.edu.cn.alipay.User( "13121623363", "Liubaoli1" ); user.setActualName( "miss" ); user.setMemberName( "a" ); user.setIsAuthentication( true ); ustb.edu.cn.alipay.CardBand bc = new ustb.edu.cn.alipay.CardBand( "miss", 10, "12345678" ); user.setCb( bc ); System.out.println( transferToBandCard( user, "12345678", "miss", 3, 3, "12345678" ) ); } }
[ "57534835+liubaoli-and@users.noreply.github.com" ]
57534835+liubaoli-and@users.noreply.github.com
3d3456531d2bb6dffedd10d1df8e1a090c26bab6
8286e5ac33a59c61819cdf84445a4c2fd78fee36
/JavaOOP Advanced/01.InterfacesAbstraction-Lab/shapesDrawing/Circle.java
c9f3392e60a4b669378c841a2d4b9d72a50048a2
[ "MIT" ]
permissive
Jovtcho/JavaFundamentals
a385a55426f2267be1c30ced046628a8ae48100b
5e74a555d4fd33e0a77c2ccb61e900d074c013f3
refs/heads/master
2021-08-30T00:43:30.340962
2017-12-15T11:57:35
2017-12-15T11:57:35
104,317,671
0
0
null
null
null
null
UTF-8
Java
false
false
715
java
package shapesDrawing; public class Circle implements Drawable { private int radius; public Circle(int radius) { this.radius = radius; } @Override public void draw() { double rIn = this.radius - 0.4; double rOut = this.radius + 0.4; for (double y = this.radius; y >= -this.radius; --y) { for (double x = -this.radius; x < rOut; x += 0.5) { double value = x * x + y * y; if (value >= rIn * rIn && value <= rOut * rOut) { System.out.print("*"); } else { System.out.print(" "); } } System.out.println(); } } }
[ "yovtcho.yovtchev@gmail.com" ]
yovtcho.yovtchev@gmail.com
2b81a6ae9499b2bc150558971c395fa21d8bbe5c
0c87be2c3cfefd39487f43d3ade1b1816d4cc6f2
/src/extra/MorningZombie.java
15a2ac70f02ba8cbda73fe8ed25a572ba9e627b4
[]
no_license
League-Level0-Student/level-0-module-0-thecoolguy316
7d56a0cab79844b6dd1ee56aa16fa2d6b71426d5
4a850b55dfc6e4f3fa72a055cd947b911bf5ada3
refs/heads/master
2020-03-15T07:55:29.948534
2018-05-17T19:40:16
2018-05-17T19:40:16
132,040,307
0
0
null
null
null
null
UTF-8
Java
false
false
290
java
package extra; import javax.swing.JOptionPane; public class MorningZombie { public static void main(String[] args) throws Exception { JOptionPane.showMessageDialog(null, "Open your eyes."); JOptionPane.showMessageDialog(null"Get up"); JOptionPane.showMessageDialog(null, ""); } }
[ "leaguestudent@administrator-Inspiron-15-3552" ]
leaguestudent@administrator-Inspiron-15-3552
fa1f143809d8a9fb0b0fdc2349ab0cb962f0cc00
1d31cbab28b91d32640daccacdb89066e8d001bb
/src/main/java/io/biezhi/blog/util/SessionUtil.java
f66b26b808f2035f873275aad81ea7059be48a69
[]
no_license
ziyecheng/blog
c868dca5fa901fee3ec8b58367259c72095cee29
6081974c1c387a624f55e8c1322dd321bf572617
refs/heads/master
2020-12-25T20:43:02.761899
2016-09-12T09:53:33
2016-09-12T09:53:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
531
java
package io.biezhi.blog.util; import com.blade.context.WebContextHolder; import io.biezhi.blog.config.Constant; import io.biezhi.blog.model.User; public final class SessionUtil { public static void put(String key, Object value){ WebContextHolder.session().attribute(key, value); } public static User getUser(){ return WebContextHolder.session().attribute(Constant.LOGIN_SESSION_KEY); } public static void remove(String key) { WebContextHolder.session().removeAttribute(key); } }
[ "biezhi.me@gmail.com" ]
biezhi.me@gmail.com
19e0381116b632a7ef3827c96521127d881df73c
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
/aliyun-java-sdk-facebody/src/main/java/com/aliyuncs/facebody/model/v20191230/EnhanceFaceRequest.java
d3a046cf40a9c1694d59a55373bf0693136f3939
[ "Apache-2.0" ]
permissive
caojiele/aliyun-openapi-java-sdk
b6367cc95469ac32249c3d9c119474bf76fe6db2
ecc1c949681276b3eed2500ec230637b039771b8
refs/heads/master
2023-06-02T02:30:02.232397
2021-06-18T04:08:36
2021-06-18T04:08:36
172,076,930
0
0
NOASSERTION
2019-02-22T14:08:29
2019-02-22T14:08:29
null
UTF-8
Java
false
false
1,574
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.facebody.model.v20191230; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.facebody.Endpoint; /** * @author auto create * @version */ public class EnhanceFaceRequest extends RpcAcsRequest<EnhanceFaceResponse> { private String imageURL; public EnhanceFaceRequest() { super("facebody", "2019-12-30", "EnhanceFace"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public String getImageURL() { return this.imageURL; } public void setImageURL(String imageURL) { this.imageURL = imageURL; if(imageURL != null){ putBodyParameter("ImageURL", imageURL); } } @Override public Class<EnhanceFaceResponse> getResponseClass() { return EnhanceFaceResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
dbf15395dd7cb14a4b50b72963726db3afc0727b
283b6a64478cf95ad2e5cccf6bdb6036c3bd34ad
/Class Work/11.11.2018/SalesSystemO/src/com/jubayir/connection/view/ListOfCategory.java
9a9b15bc0f2aa4449e2aacecaa783d9fcc01779f
[]
no_license
jubayirhossain4448/JDBC
e14cbc60f892549403a575ae97d11fb68cf50504
17bc2ceeb614bdd52c7edfc05d5acc52e198f657
refs/heads/master
2020-04-05T16:15:21.145949
2018-12-09T18:27:50
2018-12-09T18:27:50
157,004,227
1
0
null
null
null
null
UTF-8
Java
false
false
1,043
java
package com.jubayir.connection.view; import com.jubayir.connection.MySqlDbConnection; import com.jubayir.connection.domain.Category; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; public class ListOfCategory { private static Connection conn = MySqlDbConnection.getConnection(); public static List<Category> getCategory(){ List<Category> list = new ArrayList<>(); String sql = "select * from category"; try { PreparedStatement ps = conn.prepareStatement(sql); ResultSet rs = ps.executeQuery(); while (rs.next()){ list.add(new Category(rs.getInt(1), rs.getString(2))); } } catch (SQLException ex) { Logger.getLogger(ListOfCategory.class.getName()).log(Level.SEVERE, null, ex); } return list; } }
[ "shshetu2017@gmail.com" ]
shshetu2017@gmail.com
7d3c574dde8919945980e97cb00fafb6df7c3432
799cce351010ca320625a651fb2e5334611d2ebf
/Data Set/Synthetic/Before/before_2676.java
97bba5e5c02bbb04ea3d5c58c2faa95c03e167d3
[]
no_license
dareenkf/SQLIFIX
239be5e32983e5607787297d334e5a036620e8af
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
refs/heads/main
2023-01-29T06:44:46.737157
2020-11-09T18:14:24
2020-11-09T18:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
265
java
public class Dummy { void sendRequest(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT JOB_ID, MIN_SALARY, MAX_SALARY FROM JOBS WHERE MIN_SALARY >" + val2+" AND MAX_SALARY >" + rand1); } }
[ "jahin99@gmail.com" ]
jahin99@gmail.com
a4423d34c7c6ef1f61921512637cdd969c8ef5b3
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/baike/sources/qsbk/app/im/QiushiPushView.java
8f4d8a4f1c49e88bfb5180c08cde5efe3a54b9aa
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
5,310
java
package qsbk.app.im; import android.content.Context; import android.content.Intent; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import org.json.JSONObject; import qsbk.app.QsbkApp; import qsbk.app.R; import qsbk.app.activity.SingleArticle; import qsbk.app.activity.SingleArticleLevel; import qsbk.app.image.FrescoImageloader; import qsbk.app.model.Article; import qsbk.app.utils.TileBackground; import qsbk.app.utils.TileBackground.BgImageType; public class QiushiPushView extends RelativeLayout { private ChatMsg a; private Article b; private int c; private String d; private String e; private TextView f; private TextView g; private TextView h; private ImageView i; private ImageView j; public interface Jump { public static final String JUMP_ARTICLE = "article"; public static final String JUMP_COMMENT = "comment"; } private static class a implements OnClickListener { private Article a; private int b; a(Article article, int i) { this.a = article; this.b = i; } public void onClick(View view) { if (this.a != null) { Context context = view.getContext(); Intent intent = new Intent(context, this.b > 0 ? SingleArticleLevel.class : SingleArticle.class); try { intent.putExtra("FROM_MSG", true); intent.putExtra("ARTICLEJSON", this.a.toJSONObject().toString()); intent.putExtra(SingleArticleLevel.COMMENT_FLOOR, this.b); context.startActivity(intent); } catch (Exception e) { } } } } public QiushiPushView(Context context) { super(context); } public QiushiPushView(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public QiushiPushView(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); } private void a() { if (this.f == null) { LayoutInflater.from(getContext()).inflate(R.layout.im_qiushi_push_item, this, true); this.f = (TextView) findViewById(R.id.tv_chatcontent); this.g = (TextView) findViewById(R.id.tv_chattitle); this.h = (TextView) findViewById(R.id.article_content); this.i = (ImageView) findViewById(R.id.article_image); this.j = (ImageView) findViewById(R.id.play); } } private void a(View view, int i) { if (view != null) { view.setVisibility(i); } } private void b() { if (this.b != null) { a(); if (this.b != null) { a(this.g, 8); this.f.setText(this.d); if (this.b.isVideoArticle()) { this.j.setImageResource(R.drawable.im_qiushi_push_play); a(this.j, 0); a(this.h, 8); a(this.i, 0); a(this.i, this.b.absPicPath); } else if (this.b.isWordsOnly()) { this.j.setImageDrawable(null); a(this.j, 8); a(this.h, 0); a(this.i, 8); this.i.setImageDrawable(null); this.h.setText(this.b.content); } else { this.j.setImageDrawable(null); a(this.j, 8); a(this.h, 8); a(this.i, 0); a(this.i, QsbkApp.absoluteUrlOfSmallContentImage(this.b.id, this.b.image)); } } if ("article".equals(this.e)) { setOnClickListener(new a(this.b, 0)); } else if ("comment".equals(this.e)) { setOnClickListener(new a(this.b, this.c)); } else { setOnClickListener(null); } } } private void a(ImageView imageView, String str) { if (imageView != null && str != null) { this.i.setImageDrawable(null); FrescoImageloader.displayImage(this.i, str, TileBackground.getBackgroud(getContext(), BgImageType.ARTICLE)); } } public void setData(ChatMsg chatMsg) { if (chatMsg != this.a) { this.a = chatMsg; if (this.a != null) { try { JSONObject jSONObject = new JSONObject(this.a.data); JSONObject jSONObject2 = jSONObject.getJSONObject("jump_data"); this.e = jSONObject.getString("jump"); this.d = jSONObject.optString("d"); if ("article".equals(this.e) || "comment".equals(this.e)) { this.b = new Article(jSONObject2); this.c = jSONObject2.optInt("jump_to_level"); } } catch (Exception e) { e.printStackTrace(); } } b(); } } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
5d5f7b1a83ca4de7410a70b333925b23665a6cd2
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2019/4/AdvertisedSocketAddress.java
be71d08d398507a790677d40ea33f989b86243aa
[]
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
1,326
java
/* * Copyright (c) 2002-2019 "Neo4j," * Neo4j Sweden AB [http://neo4j.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.helpers; public class AdvertisedSocketAddress extends SocketAddress { public AdvertisedSocketAddress( String hostname, int port ) { super( hostname, port ); } /** * Textual representation format for an advertised socket address. * @param hostname of the address. * @param port of the address. * @return a string representing the address. */ public static String advertisedAddress( String hostname, int port ) { return new AdvertisedSocketAddress( hostname, port ).toString(); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
1f6db12df50b6d3aa3119d81df1bb058efff5964
8beac3ce754ef52202c33a0fcba627ffe45ff69f
/talent-studio-application/src/main/java/com/zynap/talentstudio/questionnaires/QuestionnaireDefinition.java
14f94ec180344abe864aa7e490d50748dbc3362f
[]
no_license
bronwen-cassidy/talent-evolution
5723dd50bcd18b5e6ead5d9df812c7cb28f22cf5
0e8360ae344ac63101888185997e05eac014b56d
refs/heads/master
2021-01-20T12:10:10.207766
2017-11-17T21:30:09
2017-11-17T21:30:09
28,445,737
0
0
null
null
null
null
UTF-8
Java
false
false
3,152
java
package com.zynap.talentstudio.questionnaires; import com.zynap.domain.ZynapDomainObject; import com.zynap.talentstudio.organisation.attributes.DynamicAttribute; import org.apache.commons.lang.builder.ToStringBuilder; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; /** * @author Hibernate CodeGenerator */ public class QuestionnaireDefinition extends ZynapDomainObject { private static final long serialVersionUID = 6583957152226721208L; /** * default constructor */ public QuestionnaireDefinition() { } /** * minimal constructor * @param id unique identifier for questionnaire definition * @param label label for definition */ public QuestionnaireDefinition(Long id, String label) { super(id, label); } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Set<QuestionnaireWorkflow> getQuestionnaireWorkflows() { return this.questionnaireWorkflows; } public void setQuestionnaireWorkflows(Set<QuestionnaireWorkflow> questionnaireWorkflows) { this.questionnaireWorkflows = questionnaireWorkflows; } public void addQuestionnaireWorkflow(QuestionnaireWorkflow questionnaireWorkflow) { questionnaireWorkflow.setQuestionnaireDefinition(this); questionnaireWorkflows.add(questionnaireWorkflow); } public void removeQuestionnaireWorkflow(QuestionnaireWorkflow questionnaireWorkflow) { questionnaireWorkflows.remove(questionnaireWorkflow); } public List<DynamicAttribute> getDynamicAttributes() { return this.dynamicAttributes; } public void setDynamicAttributes(List<DynamicAttribute> dynamicAttributes) { this.dynamicAttributes = dynamicAttributes; } public QuestionnaireDefinitionModel getQuestionnaireDefinitionModel() { return questionnaireDefinitionModel; } public void setQuestionnaireDefinitionModel(QuestionnaireDefinitionModel questionnaireDefinitionModel) { this.questionnaireDefinitionModel = questionnaireDefinitionModel; } public String toString() { return new ToStringBuilder(this) .append("id", getId()) .append("label", getLabel()) .append("title", getTitle()) .append("description", getDescription()) .toString(); } /** * persistent field */ private Set<QuestionnaireWorkflow> questionnaireWorkflows = new LinkedHashSet<QuestionnaireWorkflow>(); /** * persistent field */ private List<DynamicAttribute> dynamicAttributes = new ArrayList<DynamicAttribute>(); /* persistant field */ private String title; /* description persistant field */ private String description; private QuestionnaireDefinitionModel questionnaireDefinitionModel; }
[ "bronwen.cassidy@gmail.com" ]
bronwen.cassidy@gmail.com
5c49a14db015500da5965562fea8f2998ac19d0f
292adbac12d525cc3541079cfc76cb50276bf96e
/Furnace-Classic/src/com/furnace/data/FurnaceWorld.java
b2da8b3d404fc5fa4a960da25283a2b5f76a7dbb
[]
no_license
0Zix0/Furnace-Classic
03a9a86848c4d476a169967aeeaea8c7187c4a5e
fcf4067e6bfd162c9271616058fa33920524450c
refs/heads/master
2021-01-22T20:55:29.780013
2017-03-18T06:02:46
2017-03-18T06:02:46
85,379,392
1
0
null
null
null
null
UTF-8
Java
false
false
5,038
java
package com.furnace.data; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; import com.furnace.c.api.Position; import com.furnace.c.api.World; public class FurnaceWorld implements World { /** * Checks if the world exists in the file already * @param name * @return */ public static boolean exists(String name) { return new File(System.getProperty("user.dir") + File.separator + "worlds" + File.separator + name + ".world").exists(); } private String name; private short length; private short depth; private short height; private byte[] data; private boolean[] availableEids = new boolean[256]; private Position spawn; public FurnaceWorld(String name, short length, short depth, short height) { if (length < 32) { length = 32; } if (depth < 32) { depth = 32; } if (height < 32) { height = 32; } this.name = name; this.length = length; this.depth = depth; this.height = height; data = new byte[length * depth * height]; for (int i = 0; i < data.length; i++) { data[i] = 0; } for (int i = 0; i < (length * depth * height * 0.5); i++) { data[i] = Block.Grass; } for (int i = 0; i < availableEids.length; i++) { availableEids[i] = true; } spawn = new Position(length / 2, (height / 2) + 3, depth / 2, (byte) 0, (byte) 0); } public FurnaceWorld(String name) { this.name = name; for (int i = 0; i < availableEids.length; i++) { availableEids[i] = true; } load(); } public void load() { File file = new File(System.getProperty("user.dir") + File.separator + "worlds" + File.separator + name + ".world"); //File file = new File(name); try { GZIPInputStream gis = new GZIPInputStream(new FileInputStream(file)); DataInputStream dis = new DataInputStream(gis); length = dis.readShort(); depth = dis.readShort(); height = dis.readShort(); short x = dis.readShort(); short y = dis.readShort(); short z = dis.readShort(); byte yaw = dis.readByte(); byte pitch = dis.readByte(); spawn = new Position(x, y, z, yaw, pitch); data = new byte[length * depth * height]; dis.read(data); dis.close(); gis.close(); } catch (Exception ex) { System.out.println("Failed to load map '" + name + "'!"); } } public void save() { File file = new File(System.getProperty("user.dir") + File.separator + "worlds" + File.separator + name + ".world"); try { GZIPOutputStream gos = new GZIPOutputStream(new FileOutputStream(file)); DataOutputStream dos = new DataOutputStream(gos); dos.writeShort(length); dos.writeShort(depth); dos.writeShort(height); dos.writeShort(spawn.getX()); dos.writeShort(spawn.getY()); dos.writeShort(spawn.getZ()); dos.writeByte(spawn.getYaw()); dos.writeByte(spawn.getPitch()); dos.write(data); dos.flush(); dos.close(); gos.flush(); gos.close(); } catch (Exception ex) { System.out.println("Failed to save map '" + name + "'!"); ex.printStackTrace(); } } /* public void broadcastWorldPacket(Packet packet) { broadcastWorldPacket(packet, null); } public void broadcastWorldPacket(Packet packet, Player exclude) { Player[] players = PowerBlock.getServer().getOnlinePlayers(); for (int i = 0; i < players.length; i++) { if (players[i] != exclude && this.equals(players[i].getWorld())) { players[i].push(packet); } } } */ private int getDataPosition(short x, short y, short z) { return y * (length * depth) + (z * length) + x; } public byte requestEntityId() {//throws NoAvailableEIDException { for (int i = 0; i < availableEids.length; i++) { if (availableEids[i]) { availableEids[i] = false; return (byte) i; } } return 0; //throw new NoAvailableEIDException(this); } public void reclaimEid(byte id) { //broadcastWorldPacket(new Packet12DespawnPlayer(id)); availableEids[(int) id] = true; } public byte getBlockAt(short x, short y, short z) { return data[getDataPosition(x, y, z)]; } public void setBlockAt(int x, int y, int z, byte block) { setBlockAt((short) x, (short) y, (short) z, block); } public void setBlockAt(short x, short y, short z, byte block) { data[getDataPosition(x, y, z)] = block; //Packet6SetBlock update = new Packet6SetBlock(x, y, z, block); //broadcastWorldPacket(update); } public byte getBlockAt(Position p) { return getBlockAt(p.getX(), p.getY(), p.getZ()); } public void setBlockAt(Position p, byte block) { setBlockAt(p.getX(), p.getY(), p.getZ(), block); } public String getName() { return name; } public short getLength() { return length; } public short getDepth() { return depth; } public short getHeight() { return height; } public byte[] getWorldData() { return data; } public Position getSpawn() { return spawn; } public void setSpawn(Position p) { spawn = p; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
d5ddba85ab408ba17d7c79190da741d3017dbcb6
d6a6e80aafb12fd21b4e81456ab18323c2d349c1
/blendee.plugin/src/org/blendee/plugin/PluginTableFacadeGenerator.java
0b264e81a49d4836ebee56c1e430a25ad60273c6
[ "MIT" ]
permissive
blendee/blendee-plugin
3bc4853705ea7b0dd4be17581aa304b0b9403b60
6aa7878ab906a3a982a82565a8063a6e26c38b0a
refs/heads/master
2021-08-29T16:29:19.363891
2021-08-18T19:42:55
2021-08-18T19:42:55
156,057,325
0
0
null
null
null
null
UTF-8
Java
false
false
577
java
package org.blendee.plugin; import org.blendee.codegen.CodeFormatter; import org.blendee.codegen.TableFacadeGenerator; import org.blendee.jdbc.Metadata; public class PluginTableFacadeGenerator extends TableFacadeGenerator { public PluginTableFacadeGenerator( Metadata metadata, String rootPackageName, Class<?> tableFacadeSuperclass, Class<?> rowSuperclass, CodeFormatter codeFormatter, boolean useNumberClass, boolean useNullGuard) { super(metadata, rootPackageName, tableFacadeSuperclass, rowSuperclass, codeFormatter, useNumberClass, useNullGuard); } }
[ "ats.t.chiba@gmail.com" ]
ats.t.chiba@gmail.com
9bc7ca764536fb9f83daadbbfec92d12cb89da36
58cfddd62eeb694afa67f85ac8f8281ada2bf0f2
/cmsWeb/src/main/java/ru/simplgroup/data/FaqData.java
6bb23594e8b20a40e264dba40d2f9fcdfed10e83
[]
no_license
juhnowski/mb
b3016e3c26a1f0df6b7daf7ca8cc77ba5433d0b7
0d05227d79dcc6059a10162924dbc49d21f6e637
refs/heads/master
2020-06-22T05:10:23.191165
2016-11-25T11:48:40
2016-11-25T11:48:40
74,754,230
0
0
null
null
null
null
UTF-8
Java
false
false
1,344
java
package ru.simplgroup.data; import java.util.List; /** * User: Parfenov * Date: 06.08.2015 * Time: 0:40 */ public class FaqData extends AbstractCmsData{ /** * текст в заголовке */ private String header; /** * имя файлы из ш */ private String fileName; private List<CategoryQuestionW> categorys; private List<QuestionDataW> questions; public FaqData() { } public FaqData(String header, List<CategoryQuestionW> categorys, List<QuestionDataW> questions) { this.header = header; this.categorys = categorys; this.questions = questions; } public String getHeader() { return header; } public void setHeader(String header) { this.header = header; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public List<CategoryQuestionW> getCategorys() { return categorys; } public void setCategorys(List<CategoryQuestionW> categorys) { this.categorys = categorys; } public List<QuestionDataW> getQuestions() { return questions; } public void setQuestions(List<QuestionDataW> questions) { this.questions = questions; } }
[ "juhnowski@gmail.com" ]
juhnowski@gmail.com
0526b6c6b6a599aac8d7c9f1e47f437cf1b4d878
a21996338407634f4ba4e5e03a58b828ffcdf20e
/src/compiler/virtualmachine/IsSmallerCommand.java
6bb4e1fccc69c7cceab0bad0951a8a5b69652639
[]
no_license
ingemar100/JavaCompiler
269a28e96ab496e419616989f7d8d556ae0a75f5
73a256821a42609112f5aadbbbbaa79059f8f8c7
refs/heads/master
2021-01-10T09:47:04.484531
2016-02-02T16:50:01
2016-02-02T16:50:01
50,935,901
0
0
null
null
null
null
UTF-8
Java
false
false
694
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package compiler.virtualmachine; import java.util.List; /** * * @author Ingemar */ class IsSmallerCommand extends BaseCommand { public IsSmallerCommand() { } @Override public void execute(VirtualMachine vm, List<String> parameters) { Variable variable1 = vm.getVariable(parameters.get(1)); Variable variable2 = vm.getVariable(parameters.get(2)); vm.setReturnValue((Integer.parseInt(variable1.getValue()) < Integer.parseInt(variable2.getValue())) + ""); } }
[ "a" ]
a
a0f39ff6963f5cca8d64a1e1deaee3b5ee74362b
38c43c7f37fd5205feb0fa6e23ba47e11879db18
/mall-product/src/main/java/daily/boot/gulimall/product/controller/SkuInfoController.java
8125ff77d77e878e937f1369cf5598cf2b73f9f1
[]
no_license
amykiki/gulimall
2e8be360302dee0a408d0a89e94e65003b1b66f0
c3f1b6a505360c669c6dcc9867b6b0de4d3c9f32
refs/heads/main
2023-02-21T08:42:58.239680
2021-01-28T13:07:24
2021-01-28T13:07:24
303,411,164
0
1
null
null
null
null
UTF-8
Java
false
false
3,075
java
package daily.boot.gulimall.product.controller; import daily.boot.common.Result; import daily.boot.gulimall.common.page.PageInfo; import daily.boot.gulimall.common.page.PageQueryVo; import daily.boot.gulimall.common.utils.R; import daily.boot.gulimall.product.entity.SkuInfoEntity; import daily.boot.gulimall.product.service.SkuInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.math.BigDecimal; import java.util.Arrays; import java.util.List; /** * sku信息 * * @author amy * @date 2020-10-14 15:18:58 */ @RestController @RequestMapping("/api/product/skuinfo") @Api(tags = "SkuInfo-sku信息接口") public class SkuInfoController { @Autowired private SkuInfoService skuInfoService; @GetMapping("/{skuId}/price") public Result<BigDecimal> getPrice(@PathVariable("skuId") Long skuId) { //获取当前商品信息 SkuInfoEntity skuInfo = skuInfoService.getById(skuId); //返回商品价格 return Result.ok(skuInfo.getPrice()); } /** * 列表 */ @GetMapping("/lists") //@RequiresPermissions("product:skuinfo:list") @ApiOperation(value = "所有列表") public R list(){ List<SkuInfoEntity> list = skuInfoService.list(); return R.ok().put("data", list); } /** * 信息 */ @GetMapping("/info/{skuId}") @ApiOperation(value = "根据主键ID查询") //@RequiresPermissions("product:skuinfo:info") public R info(@PathVariable("skuId") Long skuId){ SkuInfoEntity skuInfo = skuInfoService.getById(skuId); return R.ok().put("data", skuInfo); } /** * 保存 */ @PostMapping("/save") @ApiOperation(value = "新增数据") //@RequiresPermissions("product:skuinfo:save") public R save(@RequestBody SkuInfoEntity skuInfo){ skuInfoService.save(skuInfo); return R.ok(); } /** * 修改 */ @PostMapping("/update") @ApiOperation(value = "修改数据") //@RequiresPermissions("product:skuinfo:update") public R update(@RequestBody SkuInfoEntity skuInfo){ skuInfoService.updateById(skuInfo); return R.ok(); } /** * 删除 */ @DeleteMapping("/delete") @ApiOperation(value = "批量删除数据") //@RequiresPermissions("product:skuinfo:delete") public R delete(@RequestBody Long[] skuIds){ skuInfoService.removeByIds(Arrays.asList(skuIds)); return R.ok(); } /** * 无条件分页查询 */ @GetMapping("/list") @ApiOperation(value = "无条件分页查询", notes = "无条件分页查询") //@RequiresPermissions("product:skuinfo:pagelist") public R pageList(PageQueryVo pageQueryVo, SkuInfoEntity skuInfoEntity){ PageInfo<SkuInfoEntity> pageInfo = skuInfoService.queryPage(pageQueryVo, skuInfoEntity); return R.ok().put("page", pageInfo); } }
[ "staramy_2005@126.com" ]
staramy_2005@126.com
45df082c9d87f204d86747716df2f59c87dbdffd
8aeae1fd40c14f8f8175d17ed3420bc789bdc19e
/src/net/ion/radon/param/MyParameterKey.java
06f0da5eccd685dece02f87276d942c722d36410
[]
no_license
bleujin/aradon
15aa37a5fd479b0e84428095fabdf7d7eed022d4
589881dff83cb37d7798a286e5553be1f68fc9d6
refs/heads/master
2016-09-10T20:09:15.806224
2014-09-24T01:28:31
2014-09-24T01:28:31
2,208,277
2
0
null
null
null
null
UTF-8
Java
false
false
2,998
java
package net.ion.radon.param; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import net.ion.framework.parse.gson.JsonObject; import net.ion.framework.util.CaseInsensitiveHashMap; import net.ion.framework.util.StringUtil; public class MyParameterKey { private String keyName; private MyParameterKey nextKey; private boolean isFirst = false; private MyParameterKey(String keyName) { this.keyName = keyName; } public MyParameterKey() { this.isFirst = true ; } final static MyParameterKey create(String path) { if (StringUtil.isBlank(path)) return new MyParameterKey() ; String[] keys = StringUtil.split(path, "./"); List<MyParameterKey> keyStore = new ArrayList<MyParameterKey>(); for (String key : keys) { keyStore.add(new MyParameterKey(key)); } if (keyStore.size() <= 1) return keyStore.get(0); for (int i = 0; i < keyStore.size() - 1; i++) { keyStore.get(i).setNextKey(keyStore.get(i + 1)); } MyParameterKey startKey = keyStore.get(0); startKey.isFirst = true; return startKey; } private void setNextKey(MyParameterKey nextKey) { this.nextKey = nextKey; } public String getName() { return keyName; } public boolean isRequireArray() { return getName().endsWith("]") && getName().indexOf("[") > -1; } public MyParameterKey getNext() { return nextKey; } public boolean isLast() { return nextKey == null; } public boolean isFirst() { return isFirst; } public Object get(JsonObject json) { if (StringUtil.isBlank(keyName)) return json ; Object result = null ; if (json == null) { return null ; } else if (isRequireArray()) { String oname = StringUtil.substringBefore(getName(), "[") ; int index = Integer.parseInt(StringUtil.substringBetween(getName(), "[", "]")) ; result = json.asJsonArray(oname).get(index) ; } else { result = json.get(getName()) ; if (result == null) { return json.get(flatPath()) ; } } if (isLast()) { return result; } else { return getNext().get((JsonObject)result); } } public JsonObject getAsJSON(JsonObject json) { return (JsonObject) get(json); } public Map<String, Object> getAsMap(JsonObject json) { JsonObject jobj = getAsJSON(json); Map<String, ? extends Object> map = jobj.toMap(); Map<String, Object> result = new CaseInsensitiveHashMap<Object>(); for (Entry<String, ? extends Object> entry : map.entrySet()) { result.put(entry.getKey(), entry.getValue()); } return result; } private String flatPath(){ return toString() ; } public String toString() { MyParameterKey current = this; List<String> keyLink = new ArrayList<String>(); do { keyLink.add(current.keyName); current = current.nextKey; } while (current != null); return StringUtil.join(keyLink.toArray(new String[0]), '.'); } }
[ "bleujin@gmail.com" ]
bleujin@gmail.com
42c7130db8794b7f73610c711d5f009c6c92628e
a0735993b2c8756c9452ee73c33411fe63707d79
/loris-soccer/src/main/java/com/loris/soccer/repository/mapper/OpMapper.java
e2335ac6074881a32cb13c6ca5624d67790a26ae
[]
no_license
dsjzzwdy0/Finance
433de43a916d783a3f0713a77256af1879db2727
c5e889bac50bf963cd90fd3f40ceac9e4b33f0fe
refs/heads/master
2022-12-27T17:16:26.890097
2019-05-24T09:16:53
2019-05-24T09:16:53
155,797,343
2
1
null
2022-12-16T09:57:05
2018-11-02T01:26:55
Java
UTF-8
Java
false
false
190
java
package com.loris.soccer.repository.mapper; import com.baomidou.mybatisplus.mapper.BaseMapper; import com.loris.soccer.bean.table.Op; public interface OpMapper extends BaseMapper<Op> { }
[ "dsjzzwdy0@163.com" ]
dsjzzwdy0@163.com
27c1360e87d4831a8e17f05bf23922b7ba0abb0f
63437809733c1639826a1f2566e1579520208cbd
/ShoppingList/app/src/main/java/com/example/shoppinglist/ShoppingItems.java
0f103b8e1fc9e59e3d73a57d57ffdf5efdc18c4f
[]
no_license
rmmcosta/AndroidStudioProjects
db8c78312ae7986c5b41a3357a6eb2c3c3b9a272
a66989ce0bc6715a4eb029eb49c50786ef8112c2
refs/heads/master
2023-02-18T06:44:56.900651
2021-01-22T08:57:11
2021-01-22T08:57:11
291,245,257
0
0
null
null
null
null
UTF-8
Java
false
false
992
java
package com.example.shoppinglist; import android.content.Intent; import android.os.Bundle; import android.view.View; import androidx.appcompat.app.AppCompatActivity; public class ShoppingItems extends AppCompatActivity { public static final String SHOPPING_ITEM = "ShoppingItem"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_shopping_items); } public void addTomatoes(View view) { replyWithItem("Tomatoes"); } public void addApples(View view) { replyWithItem("Apples"); } public void addRice(View view) { replyWithItem("Rice"); } public void addCheese(View view) { replyWithItem("Cheese"); } private void replyWithItem(String item) { Intent replyIntent = new Intent(); replyIntent.putExtra(SHOPPING_ITEM, item); setResult(RESULT_OK, replyIntent); finish(); } }
[ "ricardocosta101085@gmail.com" ]
ricardocosta101085@gmail.com
99a54187c54a3cf36a5dea05c6cca8022a6e2f67
5bea0ac1671a2c7b2cd95c712181817408e2dce0
/advanced/bootique/bootique-synopsishelp/src/main/java/org/arakhne/afc/bootique/synopsishelp/annotations/ApplicationArgumentSynopsis.java
82ad9d3ef7e8ab9bbda4b4333e55e06ec6c54b2b
[ "Apache-2.0" ]
permissive
FengFind/afc
70f0479b9ff0d63124cf907f52f44a2b4f11220e
a16e5d77b004b5d10e0218e2b32159061992cc48
refs/heads/master
2022-04-10T21:58:34.200861
2020-04-06T07:34:24
2020-04-06T07:34:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,595
java
/* * $Id$ * This file is a part of the Arakhne Foundation Classes, http://www.arakhne.org/afc * * Copyright (c) 2000-2012 Stephane GALLAND. * Copyright (c) 2005-10, Multiagent Team, Laboratoire Systemes et Transports, * Universite de Technologie de Belfort-Montbeliard. * Copyright (c) 2013-2020 The original authors, and other authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.arakhne.afc.bootique.synopsishelp.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import com.google.inject.BindingAnnotation; /** * Annotation for marking a String value in order to define the synopsis of the application's arguments. * * @author $Author: sgalland$ * @version $FullVersion$ * @mavengroupid $GroupId$ * @mavenartifactid $ArtifactId$ * @since 15.0 */ @Target({ElementType.PARAMETER, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) @BindingAnnotation public @interface ApplicationArgumentSynopsis { // }
[ "galland@arakhne.org" ]
galland@arakhne.org
004883709e294a3769fef62906f894deadbdf538
4ba291307588bc3522a6117d632ea8cb7b2cc1ba
/liangliang/app/src/main/java/cn/chono/yopper/Service/Http/ExpiryDate/ExpiryDateBean.java
80335650bfac29ea9042733dd26c496a428a37aa
[]
no_license
439ED537979D8E831561964DBBBD7413/LiaLia
838cf98c5a737d63ec1d0be7023c0e9750bb232b
6b4f0ad1dbfd4e85240cf51ac1402a5bc6b35bd4
refs/heads/master
2020-04-03T12:58:16.317166
2016-09-12T02:50:21
2016-09-12T02:50:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
631
java
package cn.chono.yopper.Service.Http.ExpiryDate; import cn.chono.yopper.Service.Http.ParameterBean; /** * Created by jianghua on 2016/3/15. */ public class ExpiryDateBean extends ParameterBean { private String prizeId;//奖品Id private UserInfoBean userAddress;//用户地址信息 public UserInfoBean getUserAddress() { return userAddress; } public void setUserAddress(UserInfoBean userAddress) { this.userAddress = userAddress; } public String getPrizeId() { return prizeId; } public void setPrizeId(String prizeId) { this.prizeId = prizeId; } }
[ "jinyu_yang@ssic.cn" ]
jinyu_yang@ssic.cn
9e9059c51c43c003a332625bb463dc90c1d372e9
aa14c828094845be630af093d1e2b5b7aa6bb2d4
/android/app/src/main/java/com/the_tutor_app_22607/MainApplication.java
c06fbefead7f20e92a48cfd1265156838bfdf2e7
[]
no_license
crowdbotics-apps/the-tutor-app-22607
54c43dc85acdec0a4096e6e51519cf8533e4fb32
d7d2300b0cdc335f85cd4efe00c07d47f749e3df
refs/heads/master
2023-01-08T12:12:55.493361
2020-11-14T02:31:40
2020-11-14T02:31:40
312,729,739
0
0
null
null
null
null
UTF-8
Java
false
false
2,696
java
package com.the_tutor_app_22607; import android.app.Application; import android.content.Context; import com.facebook.react.PackageList; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactApplication; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; import java.lang.reflect.InvocationTargetException; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List<ReactPackage> packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); return packages; } @Override protected String getJSMainModuleName() { return "index"; } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } /** * Loads Flipper in React Native templates. Call this in the onCreate method with something like * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); * * @param context * @param reactInstanceManager */ private static void initializeFlipper( Context context, ReactInstanceManager reactInstanceManager) { if (BuildConfig.DEBUG) { try { /* We use reflection here to pick up the class that initializes Flipper, since Flipper library is not available in release mode */ Class<?> aClass = Class.forName("com.rndiffapp.ReactNativeFlipper"); aClass .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) .invoke(null, context, reactInstanceManager); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
370f727fe4ac07bed220103b2f4dd0a64405995c
f2597f7ef7e456a8627f97c98964d27085bd96e5
/Pcm-MondeEvent/src/com/gmail/cactus/cata/commands/warp/Warps.java
23ba906699e61a34620a0a8e81439e41afa40777
[]
no_license
CactusCata/Pcm-MondeEvent
b15959e07efe9b5faf4afaef7c3da6d925aee251
21e999eef038dd3fb7473fabfcba652085fd3805
refs/heads/master
2020-05-04T17:37:14.960489
2019-04-03T15:37:40
2019-04-03T15:37:40
179,318,861
0
0
null
null
null
null
UTF-8
Java
false
false
1,510
java
package com.gmail.cactus.cata.commands.warp; import java.io.File; import java.io.IOException; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import com.gmail.cactus.cata.Main; import com.gmail.cactus.cata.enums.PrefixMessage; public class Warps implements CommandExecutor { private Main main; public Warps(Main main) { this.main = main; } @Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if (cmd.getName().equalsIgnoreCase("warps")) { File file = new File(main.getDataFolder(), "warps.yml"); FileConfiguration config = YamlConfiguration.loadConfiguration(file); String warps = PrefixMessage.PREFIX + "Liste de tous les warps :"; int i = 0; if (!file.exists()) { try { config.save(file); } catch (IOException e) { e.printStackTrace(); } } if (config.getConfigurationSection("warps.") == null) { sender.sendMessage(PrefixMessage.PREFIX + "Il n'y a aucun warp existant !"); return true; } for (String key : config.getConfigurationSection("warps.").getKeys(false)) { warps += (i < 1) ? "" : ','; warps += " " + key; i++; } warps += " !"; sender.sendMessage(warps); return true; } return false; } }
[ "adam.chareyre.1999@gmail.com" ]
adam.chareyre.1999@gmail.com
fe3d1690b72decba0e671951a36763961a4a72eb
f96fe513bfdf2d1dbd582305e1cbfda14a665bec
/net.sf.smbt.touchosc/src-model/net/sf/smbt/touchosc/touchosccmd/impl/TouchosccmdFactoryImpl.java
2196e5dd30f376289c9dffd46c93bf296c03c77a
[]
no_license
lucascraft/ubq_wip
04fdb727e7b2dc384ba1d2195ad47e895068e1e4
eff577040f21be71ea2c76c187d574f1617703ce
refs/heads/master
2021-01-22T02:28:20.687330
2015-06-10T12:38:47
2015-06-10T12:38:47
37,206,324
0
0
null
null
null
null
UTF-8
Java
false
false
2,224
java
/** * <copyright> * </copyright> * * $Id$ */ package net.sf.smbt.touchosc.touchosccmd.impl; import net.sf.smbt.touchosc.touchosccmd.*; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class TouchosccmdFactoryImpl extends EFactoryImpl implements TouchosccmdFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static TouchosccmdFactory init() { try { TouchosccmdFactory theTouchosccmdFactory = (TouchosccmdFactory)EPackage.Registry.INSTANCE.getEFactory("http://touchosccmd/1.0"); if (theTouchosccmdFactory != null) { return theTouchosccmdFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new TouchosccmdFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public TouchosccmdFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case TouchosccmdPackage.TOUCH_OSC_CMD: return createTouchOscCmd(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public TouchOscCmd createTouchOscCmd() { TouchOscCmdImpl touchOscCmd = new TouchOscCmdImpl(); return touchOscCmd; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public TouchosccmdPackage getTouchosccmdPackage() { return (TouchosccmdPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static TouchosccmdPackage getPackage() { return TouchosccmdPackage.eINSTANCE; } } //TouchosccmdFactoryImpl
[ "lucas.bigeardel@gmail.com" ]
lucas.bigeardel@gmail.com
73386d5be720bf002f6321626730a717301411b6
c119345e24f383e93d2363edf1f1a4a8871e8e4b
/Copy of Assignment7/src/avatars/TalkingGuardAvatar.java
543d2e31532421f4745d64740c40f62b42994cd9
[]
no_license
kathryneh/Hyrule-Monty-Python
4cd46d0d1528a9d179de6db686e0c260468c7662
1ae413fd03ba28e3bc7a92a591e7786dbc5eb2dd
refs/heads/master
2021-01-02T09:01:54.514548
2012-10-23T04:16:55
2012-10-23T04:16:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,227
java
package avatars; import chat.ChatHistory; public class TalkingGuardAvatar implements Talkable { GuardAvatar avatar; ChatHistory chat; int x; int y; public void setX(int newVal) { x = newVal; avatar.setX(x); chat.setX(x); } public void setY(int newVal) { y = newVal; avatar.setY(y); chat.setY(y); } public int getX() { return x; } public int getY() { return y; } public TalkingGuardAvatar(int x, int y, String element) { buildTalkingAvatar(x, y, element); setX(x); setY(y); } public GuardAvatar getAvatar(){ return avatar; } public ChatHistory getChatHistory() { return chat; } public void pop() { chat.pop(); } public void push(int x, int y, String element) { chat.push(x, y, element); } public void removeElement() { chat.removeElement(); } public void moveX(int newX) { x = x + newX; setX(x); chat.moveX(newX); } public void moveY(int newY) { y = y + newY; setY(y); chat.moveY(newY); } @Override public void buildTalkingAvatar(int x, int y, String element) { avatar = new avatars.GuardAvatar(x, y); chat = new chat.ChatHistory(x, y, element); } }
[ "kathryne.h@gmail.com" ]
kathryne.h@gmail.com
be66fdc64220f549d836a58edd0ea1b48b1ce263
36095934b127dbb16483b35f36b444e54b619e35
/road-pricing-system/src/main/java/com/igoosd/rps/RoadPricingSystemApplication.java
2d68d2a637771d18e5c68964d18d7c38e321e0be
[]
no_license
yxxcrtd/RoadPricing
f0051ab0cd9fee59a283701183ae2277dc0bf95c
f84b0a1c1dd3b262c2afe829d71f2ffbdd52648e
refs/heads/master
2023-04-28T22:32:29.592467
2019-06-06T22:50:58
2019-06-06T22:50:58
190,588,439
0
0
null
null
null
null
UTF-8
Java
false
false
418
java
package com.igoosd.rps; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; @SpringBootApplication @ComponentScan("com.igoosd") public class RoadPricingSystemApplication { public static void main(String[] args) { SpringApplication.run(RoadPricingSystemApplication.class, args); } }
[ "yxxcrtd@gmail.com" ]
yxxcrtd@gmail.com
f7d90c457109673e892596eb8c833d4b741b013e
0fb111daa10ab63d7a2d1de3987e8a2a4cc49408
/057-quarkus-sample-security-openid-connect-service/src/main/java/com/iiit/sample/security/openidconnect/service/ProjectResource.java
857d6899dd329b45f8d6fd4156e70ef6fb6fb1ed
[ "Apache-2.0" ]
permissive
rainsun-sxy/iiit.quarkus.sample
db4bc7da2cb742d68f15624e4c1678669f098e70
3e40f67634d7927d3a62192f2d9ea4b9b7d176d4
refs/heads/master
2023-08-22T12:35:37.537292
2021-07-01T07:36:56
2021-07-01T07:36:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,127
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.iiit.sample.security.openidconnect.service; import javax.annotation.security.PermitAll; import javax.annotation.security.RolesAllowed; import javax.inject.Inject; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import io.quarkus.security.identity.SecurityIdentity; import org.jboss.logging.Logger; import org.jboss.resteasy.annotations.cache.NoCache; @Path("/projects") public class ProjectResource { private static final Logger LOGGER = Logger.getLogger(ProjectResource.class); @Inject SecurityIdentity identity; @Inject ProjectService service; @GET @Path("/api/public") @Produces(MediaType.APPLICATION_JSON) @PermitAll public String serveResource() { LOGGER.info("/api/public"); return service.getProjectInform(); } @GET @Path("/api/admin") @Produces(MediaType.TEXT_PLAIN) @RolesAllowed("admin") public String adminResource() { LOGGER.info("granted"); return service.getProjectInform(); } @GET @Path("/api/users/user") @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("user") @NoCache public User userResource() { return new User(identity); } public static class User { private final String userName; User(SecurityIdentity identity) { this.userName = identity.getPrincipal().getName(); } public String getUserName() { return userName; } } }
[ "rengang66@sina.com" ]
rengang66@sina.com
2acc2e845fa7e39709a9d34006126c86d8e71040
f321db1ace514d08219cc9ba5089ebcfff13c87a
/generated-tests/random/tests/s49/2_jxpath/evosuite-tests/org/apache/commons/jxpath/ri/parser/XPathParserTokenManager_ESTest_scaffolding.java
c050d110adb15f8e09ee318290d4d1a2a9f935ae
[]
no_license
sealuzh/dynamic-performance-replication
01bd512bde9d591ea9afa326968b35123aec6d78
f89b4dd1143de282cd590311f0315f59c9c7143a
refs/heads/master
2021-07-12T06:09:46.990436
2020-06-05T09:44:56
2020-06-05T09:44:56
146,285,168
2
2
null
null
null
null
UTF-8
Java
false
false
4,397
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Mar 24 10:52:04 GMT 2019 */ package org.apache.commons.jxpath.ri.parser; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class XPathParserTokenManager_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.jxpath.ri.parser.XPathParserTokenManager"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/home/apaniche/performance/Dataset/gordon_scripts/projects/2_jxpath"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(XPathParserTokenManager_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.jxpath.ri.parser.XPathParserTokenManager", "org.apache.commons.jxpath.ri.parser.XPathParserConstants", "org.apache.commons.jxpath.ri.parser.Token", "org.apache.commons.jxpath.ri.parser.TokenMgrError", "org.apache.commons.jxpath.ri.parser.SimpleCharStream" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(XPathParserTokenManager_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.jxpath.ri.parser.XPathParserTokenManager", "org.apache.commons.jxpath.ri.parser.XPathParserConstants", "org.apache.commons.jxpath.ri.parser.SimpleCharStream", "org.apache.commons.jxpath.ri.parser.TokenMgrError", "org.apache.commons.jxpath.ri.parser.Token" ); } }
[ "granogiovanni90@gmail.com" ]
granogiovanni90@gmail.com
869e0875e7d21091e3e360e7ead49c36bf5634b4
6b6058910e1e7b72362952505c3992198275e305
/src/com/ch/json/Patientname.java
a8116cb7de968d40276bc4e54626e9c83d2c825e
[]
no_license
adaideluanmaku/ehcache-st2
054171c851ce9fd11d0e9cfdf22eeb01b69b2121
fe38c6083d737081d1b8e80361e2303a867653a4
refs/heads/master
2021-05-09T05:35:57.151172
2018-01-29T01:09:49
2018-01-29T01:09:49
119,314,157
0
0
null
null
null
null
GB18030
Java
false
false
1,859
java
package com.ch.json; import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import net.sf.json.JSONObject; import com.ch.jdbc.Jdbcconnection; //获取输入json串的案例名,jmeter方便使用 public class Patientname { String sql; List listname1; public String getSql() { return sql; } public void setSql(String sql) { this.sql = sql; } public List getListname1() { return listname1; } public void setListname1(List listname) { this.listname1 = listname; } public String execute() throws ClassNotFoundException, SQLException{ System.out.println(sql); // String sql="select gatherbaseinfo from sa_gather_info where gatherbaseinfo like '%特殊字符%' and gatherbaseinfo like '%哺乳用药0%' and inserttime>'2016-04-22 15:50:00' order by inserttime asc"; Jdbcconnection jdbc=new Jdbcconnection(); Connection conn=jdbc.getConn(); Statement st=conn.createStatement(); ResultSet rs=st.executeQuery(sql); ResultSetMetaData rsmd=rs.getMetaData(); int len=rsmd.getColumnCount(); List listrs=new ArrayList(); while(rs.next()){ for(int j=1;j<=len;j++){ listrs.add(rs.getObject(j)); } } int sum=listrs.size(); List listname=new ArrayList(); for(int i=0;i<sum;i++){ String jsonstr=listrs.get(i).toString(); // System.out.println(jsonstr); // System.out.println(i); JSONObject json=JSONObject.fromObject(jsonstr); JSONObject Patient=json.getJSONObject("Patient"); // System.out.println(Patient); String Name=Patient.get("Name").toString(); // System.out.println(Name); listname.add(Name); } setListname1(listname); return "success"; } }
[ "531617826@qq.com" ]
531617826@qq.com
22c1af506e00728aed84f0d1550fde17e5ba0b6b
da0c355e7286771af9d34f2c20eb055bf3b900cc
/zlt-business/backstage-service/src/main/java/com/central/backstage/common/ResultGenerator.java
de2bf898d4975b857334a534dbb26dcb4d3dbb85
[]
no_license
TaiJi-team/finance-service-platform
fb7771b40b5dec81eb76491b15e1c5d815956f07
c92a474030705e556168c1f7cb3c39d9282ffdbf
refs/heads/main
2023-01-11T13:19:51.359503
2020-11-13T07:24:20
2020-11-13T07:24:20
311,711,444
0
0
null
null
null
null
UTF-8
Java
false
false
753
java
package com.central.backstage.common; /** * 响应结果生成工具 */ public class ResultGenerator { private static final String DEFAULT_SUCCESS_MESSAGE = "SUCCESS"; public static Result genSuccessResult() { return new Result() .setCode(ResultCode.SUCCESS) .setMessage(DEFAULT_SUCCESS_MESSAGE); } public static <T> Result<T> genSuccessResult(T data) { return new Result() .setCode(ResultCode.SUCCESS) .setMessage(DEFAULT_SUCCESS_MESSAGE) .setData(data); } public static Result genFailResult(String message) { return new Result() .setCode(ResultCode.FAIL) .setMessage(message); } }
[ "2491042435@qq.com" ]
2491042435@qq.com
4a41b32bbc9078667524df9ee0b9677cbda8c25d
7f4157724af82cc5c6607b9123b279682eb32cc5
/top-auto-sdk/src/main/java/com/dingtalk/api/request/SmartworkBpmsProcessSyncRequest.java
18cce579963b50f0d93d36f55f6d23dcfae98b2d
[]
no_license
wangyingjief/dingding
0368880b1471a2bfcfca0611dbc98ff57109ac50
b00fb55451eb7d0f2165f9599a7be66aee02a8a2
refs/heads/master
2020-03-26T00:12:41.233087
2018-08-10T16:43:31
2018-08-10T16:43:31
144,310,543
1
0
null
null
null
null
UTF-8
Java
false
false
3,030
java
package com.dingtalk.api.request; import com.taobao.api.internal.util.RequestCheckUtils; import java.util.Map; import java.util.List; import com.taobao.api.ApiRuleException; import com.dingtalk.api.BaseDingTalkRequest; import com.dingtalk.api.DingTalkConstants; import com.taobao.api.internal.util.TaobaoHashMap; import com.taobao.api.internal.util.TaobaoUtils; import com.dingtalk.api.response.SmartworkBpmsProcessSyncResponse; /** * TOP DingTalk-API: dingtalk.smartwork.bpms.process.sync request * * @author top auto create * @since 1.0, 2018.07.25 */ public class SmartworkBpmsProcessSyncRequest extends BaseDingTalkRequest<SmartworkBpmsProcessSyncResponse> { /** * 企业微应用标识 */ private Long agentId; /** * 业务分类标识(建议采用JAVA包名的命名方式,如:com.alibaba) */ private String bizCategoryId; /** * 审批流名称 */ private String processName; /** * 源审批流的唯一码 */ private String srcProcessCode; /** * 目标审批流的唯一码 */ private String targetProcessCode; public void setAgentId(Long agentId) { this.agentId = agentId; } public Long getAgentId() { return this.agentId; } public void setBizCategoryId(String bizCategoryId) { this.bizCategoryId = bizCategoryId; } public String getBizCategoryId() { return this.bizCategoryId; } public void setProcessName(String processName) { this.processName = processName; } public String getProcessName() { return this.processName; } public void setSrcProcessCode(String srcProcessCode) { this.srcProcessCode = srcProcessCode; } public String getSrcProcessCode() { return this.srcProcessCode; } public void setTargetProcessCode(String targetProcessCode) { this.targetProcessCode = targetProcessCode; } public String getTargetProcessCode() { return this.targetProcessCode; } public String getApiMethodName() { return "dingtalk.smartwork.bpms.process.sync"; } public String getApiCallType() { return DingTalkConstants.CALL_TYPE_TOP; } public Map<String, String> getTextParams() { TaobaoHashMap txtParams = new TaobaoHashMap(); txtParams.put("agent_id", this.agentId); txtParams.put("biz_category_id", this.bizCategoryId); txtParams.put("process_name", this.processName); txtParams.put("src_process_code", this.srcProcessCode); txtParams.put("target_process_code", this.targetProcessCode); if(this.udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public Class<SmartworkBpmsProcessSyncResponse> getResponseClass() { return SmartworkBpmsProcessSyncResponse.class; } public void check() throws ApiRuleException { RequestCheckUtils.checkNotEmpty(agentId, "agentId"); RequestCheckUtils.checkMaxLength(bizCategoryId, 64, "bizCategoryId"); RequestCheckUtils.checkMaxLength(processName, 64, "processName"); RequestCheckUtils.checkNotEmpty(srcProcessCode, "srcProcessCode"); RequestCheckUtils.checkNotEmpty(targetProcessCode, "targetProcessCode"); } }
[ "joymting@qq.com" ]
joymting@qq.com
a136d1df9cf6fb9e3a0a663c85a5a333e6e80412
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_322/Testnull_32166.java
606a93736b08c5a33a9615bea4394e2f3ebffd76
[]
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
308
java
package org.gradle.test.performancenull_322; import static org.junit.Assert.*; public class Testnull_32166 { private final Productionnull_32166 production = new Productionnull_32166("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
06bec5d418ecd16b8c2f80a3c36a7d7919ace178
5ecd15baa833422572480fad3946e0e16a389000
/framework/MCS-Open/subsystems/runtime/main/api/java/com/volantis/mcs/protocols/PhoneNumberAttributes.java
5b1f17347a60d5a8cb5cc61d827d86507fb75502
[]
no_license
jabley/volmobserverce
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
6d760f27ac5917533eca6708f389ed9347c7016d
refs/heads/master
2021-01-01T05:31:21.902535
2009-02-04T02:29:06
2009-02-04T02:29:06
38,675,289
0
1
null
null
null
null
UTF-8
Java
false
false
4,479
java
/* This file is part of Volantis Mobility Server. Volantis Mobility Server 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. Volantis Mobility Server 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 Volantis Mobility Server.  If not, see <http://www.gnu.org/licenses/>. */ /* ---------------------------------------------------------------------------- * $Header: /src/voyager/com/volantis/mcs/protocols/PhoneNumberAttributes.java,v 1.1 2003/04/10 12:53:24 philws Exp $ * ---------------------------------------------------------------------------- * (c) Volantis Systems Ltd 2003. * ---------------------------------------------------------------------------- * Change History: * * Date Who Description * --------- --------------- ----------------------------------------------- * 10-Mar-03 Phil W-S VBM:2002111502 - Created. Required attributes * class to support the new PhoneNumber PAPI * element. * ---------------------------------------------------------------------------- */ package com.volantis.mcs.protocols; import com.volantis.mcs.protocols.assets.TextAssetReference; /** * Encapsulate the attributes associated with a phone number link. * * @author <a href="mailto:phil.weighill-smith@volantis.com">Phil W-S</a> */ public class PhoneNumberAttributes extends AnchorBaseAttributes { private TextAssetReference fullNumber = null; private String qualifiedFullNumber = null; private String defaultContents; /** * This constructor delegates all its work to the initialise method, * no extra initialisation should be added here, instead it should be * added to the initialise method. */ public PhoneNumberAttributes() { initialise(); } /** * This method should reset the state of this object back to its * state immediately after it was constructed. */ public void resetAttributes() { super.resetAttributes(); // Call this after calling super.resetAttributes to allow initialise to // override any inherited attributes. initialise(); } /** * Initialise all the data members. This is called from the constructor * and also from resetAttributes. */ private void initialise() { // Set the default tag name, this is the name of the tag which makes // the most use of this class. setTagName("a"); fullNumber = null; qualifiedFullNumber = null; } /** * Return the fullNumber property. * * @return the fullNumber */ public TextAssetReference getFullNumber() { return fullNumber; } /** * Set or reset the fullNumber property. * * @param fullNumber the new value for the fullNumber property */ public void setFullNumber(TextAssetReference fullNumber) { this.fullNumber = fullNumber; } /** * Return the qualifiedFullNumber property. * * @return the qualifiedFullNumber */ public String getQualifiedFullNumber() { return qualifiedFullNumber; } /** * Set or reset the qualifiedFullNumber property. * * @param qualifiedFullNumber the new value for the qualifiedFullNumber * property */ public void setQualifiedFullNumber(String qualifiedFullNumber) { this.qualifiedFullNumber = qualifiedFullNumber; } public void setDefaultContents(String defaultContents) { this.defaultContents = defaultContents; } public String getDefaultContents() { return defaultContents; } } /* =========================================================================== Change History =========================================================================== $Log$ 08-Dec-04 6416/3 ianw VBM:2004120703 New Build 08-Dec-04 6416/1 ianw VBM:2004120703 New Build =========================================================================== */
[ "iwilloug@b642a0b7-b348-0410-9912-e4a34d632523" ]
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
c4c572d3ee5ea3807f5baaf8091026648f42f809
c147ba33044ef204fc25d70989e01afe8796ce17
/app/src/main/java/com/apextechies/myapplication/model/Consersation.java
058d98607754c6fe5570b1084c4dfbf503c013a0
[]
no_license
Shankar1056/chatdemo
b9363d7b4cabe8b626d11a10c29455474ff7f350
9c0ba7cd3d057a85307d2561192db7d6beeccbbf
refs/heads/master
2020-03-13T16:12:44.047024
2018-04-26T17:58:29
2018-04-26T17:58:29
131,192,252
0
0
null
null
null
null
UTF-8
Java
false
false
325
java
package com.apextechies.myapplication.model; import java.util.ArrayList; public class Consersation { private ArrayList<Message> listMessageData; public Consersation(){ listMessageData = new ArrayList<>(); } public ArrayList<Message> getListMessageData() { return listMessageData; } }
[ "shankar@spotsoon.com" ]
shankar@spotsoon.com
e2acaa17b52b8e553bc3a72b6a2099757557a558
58c79a1003a00ff338da92684810216f821c1489
/app/src/main/java/com/atfpm/vip/VipInscreverActivity.java
f50dd6826b5733b531f7ceb34f1601606def9999
[]
no_license
Mjh910101/ATFPM
0cb91423c7751e67910a1c12548133981beda09c
6acdd03176b16a4d2ebfad2a342a50204befe754
refs/heads/master
2016-09-14T06:07:45.198233
2016-04-26T07:33:15
2016-04-26T07:33:15
57,107,604
0
0
null
null
null
null
UTF-8
Java
false
false
1,165
java
package com.atfpm.vip; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.atfpm.R; import com.lidroid.xutils.ViewUtils; import com.lidroid.xutils.view.annotation.ViewInject; import com.lidroid.xutils.view.annotation.event.OnClick; public class VipInscreverActivity extends Activity { private Context context; @ViewInject(R.id.title_name) private TextView titleName; @ViewInject(R.id.title_vipHint) private ImageView vipHint; @ViewInject(R.id.title_vip) private ImageView vipIcon; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_vip_inscrever); context = this; ViewUtils.inject(this); initAcitvity(); } @OnClick({ R.id.titel_back }) public void onClick(View v) { switch (v.getId()) { case R.id.titel_back: finish(); break; } } private void initAcitvity() { titleName.setText(getResources().getString(R.string.detail)); vipHint.setVisibility(View.GONE); vipIcon.setVisibility(View.GONE); } }
[ "408951390@qq.com" ]
408951390@qq.com
61804d5423a6bb2808b7625cad0b7a2b5456ddac
ca3a26651f6b5cac88c803f7e8e068905413ce0d
/repository/src/main/java/pl/com/app/repository/UserMealParameterRepository.java
a674052725ff1f75f8586e4f2ac10ad0603f413d
[]
no_license
Tomek91/diet-set
9f9b2cb0ae968d433c96f08b84c135ac2c40d6b2
68f89fb7dd41ce90a62db22d52b62395c91aba06
refs/heads/master
2022-12-23T18:27:02.221189
2020-01-05T09:55:26
2020-01-05T09:55:26
223,760,718
0
0
null
2022-12-15T23:31:55
2019-11-24T14:51:44
Java
UTF-8
Java
false
false
323
java
package pl.com.app.repository; import org.springframework.data.jpa.repository.JpaRepository; import pl.com.app.model.UserMealParameter; import java.util.Optional; public interface UserMealParameterRepository extends JpaRepository<UserMealParameter, Long> { Optional<UserMealParameter> findByUser_Id(Long userId); }
[ "tomek.r9@wp.pl" ]
tomek.r9@wp.pl
63ffd31729c101b4c546d03b7986f987eb3bbf91
a34e43cbb3cced9c64647133a28e67e297e9a1b9
/xexchange/xexchange-usercenter/src/main/java/com/whoiszxl/usercenter/entity/vo/MemberAddressVo.java
181350ab16e8c8026405905835507a90bec7f0da
[ "Apache-2.0" ]
permissive
whoiszxl/BohemianRhapsody
9c4ed24eb992d1a74d9f9f47b114787e5ae95d5f
f269118da2ddee75b38e8a55dba916d7a38bbe5f
refs/heads/master
2022-03-27T11:05:06.838439
2020-01-20T03:13:02
2020-01-20T03:13:02
197,508,626
7
1
null
null
null
null
UTF-8
Java
false
false
418
java
package com.whoiszxl.usercenter.entity.vo; import lombok.Data; /** * @description: 用户地址返回Vo类 * @author: whoiszxl * @create: 2020-01-15 **/ @Data public class MemberAddressVo { /** * 币种ID */ private Long coinId; /** * 充值地址 */ private String rechargeAddress; /** * 钱包状态,0:关闭 1:开启 */ private Integer status; }
[ "whoiszxl@gmail.com" ]
whoiszxl@gmail.com
80d35fb1d0b0589e935dfceec4717ad3d65cccf8
370f689c430e0ee49beb4579aaca947656304125
/spring-boot-nclg-01-question-naire/src/main/java/com/nclg/controller/LoginCheckController.java
9d6481ce4c005fa8248f9359b9f07bf60b0ef3f3
[]
no_license
zhouzhitong/spring-boot-nclg-question_naire
4361ae556597a1c35428cb651f0326ff283c0df0
c03525e34089e6308af02b4f2f1a698f6d4bf1f8
refs/heads/master
2023-02-13T17:36:35.270895
2021-01-12T06:38:33
2021-01-12T06:38:33
295,182,228
0
0
null
null
null
null
UTF-8
Java
false
false
907
java
package com.nclg.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; /** * 描述:<br> * </> * * @author 周志通 * @version 1.0.0 * @date 2020/9/6 16:14 **/ @Controller @RequestMapping(value = "/admin") public class LoginCheckController { @GetMapping(value = {"/loginError"}) public String loginError(Model model) { model.addAttribute("error", "登录失败,请重新核对你的信息"); return "admin/login"; } /** * 登录成功【重定向,防止重复提交表单】 * @return 返回成功登录页面 {@link com.nclg.config.MyWebMvcConfig} */ @GetMapping("/loginSuccess") public String loginSuccess(){ return "redirect:/admin/main.html" ; } }
[ "528382226@qq.com" ]
528382226@qq.com
81fd8a0ef5e02ca28e7a5a0e75ebc3e5a44b90e2
7cb0d799781dee02c1653041fb71283593084c28
/app/src/main/java/com/kongtiaoapp/xxhj/utils/ViewHolder.java
ee8648b972209e68f14a2ebc82af8e89a80d9d44
[]
no_license
guochengabc/xxhj_project
2a7a41f000dc7c6512d93c83a641e6dd7a531a87
b6588be8e5c9436f88873e085a76c3241193a8c1
refs/heads/master
2020-09-21T13:09:44.562591
2020-01-19T09:17:05
2020-01-19T09:17:05
224,797,254
0
0
null
null
null
null
UTF-8
Java
false
false
716
java
package com.kongtiaoapp.xxhj.utils; import android.util.SparseArray; import android.view.View; public class ViewHolder { @SuppressWarnings("unchecked") public static <T extends View> T get(View view, int id) { // SparseArray<View>在代码理解上等价于HashMap<Interger, // View>,SparseArray是Android提供的一个数据结构,旨在提高查询的效率。 SparseArray<View> viewHolder = (SparseArray<View>) view.getTag(); if (viewHolder == null) { viewHolder = new SparseArray<View>(); view.setTag(viewHolder); } View childView = viewHolder.get(id); if (childView == null) { childView = view.findViewById(id); viewHolder.put(id, childView); } return (T) childView; } }
[ "guochengabc@163.com" ]
guochengabc@163.com
175cf0b025146e82280cfdcb7ef38957ab580ee9
510871234af380777bc31e28416509dcfb6bd750
/src/main/java/com/jairo/curso/boot/dao/impl/FuncionarioDaoImpl.java
6bc1e4e950998ffc03f2b50e491c211e23e5c9de
[]
no_license
jairosousa/demo-mvc
a30fb981c819d23c64ec747a51ceec6784196b74
89d1b08b87d39c2e42af6e08a177503dd846bcd3
refs/heads/master
2020-04-14T06:01:36.047152
2019-03-03T22:23:20
2019-03-03T22:23:20
163,675,590
0
0
null
null
null
null
UTF-8
Java
false
false
1,627
java
package com.jairo.curso.boot.dao.impl; import java.time.LocalDate; import java.util.List; import org.springframework.stereotype.Repository; import com.jairo.curso.boot.dao.AbstractDao; import com.jairo.curso.boot.dao.FuncionarioDao; import com.jairo.curso.boot.domain.Funcionario; @Repository public class FuncionarioDaoImpl extends AbstractDao<Funcionario, Long> implements FuncionarioDao { @Override public List<Funcionario> findByNome(String nome) { return createQuery("select f from Funcionario f where f.nome like concat('%',?1,'%') ", nome); } @Override public List<Funcionario> findByCargoId(Long id) { return createQuery("select f from Funcionario f where f.cargo.id = ?1", id); } @Override public List<Funcionario> findByDataEntradaDataSaida(LocalDate entrada, LocalDate saida) { String jpql = new StringBuilder("select f from Funcionario f ") .append("where f.dataEntrada >= ?1 and f.dataSaida <= ?2 ").append("order by f.dataEntrada asc") .toString(); return createQuery(jpql, entrada, saida); } @Override public List<Funcionario> findByDataEntrada(LocalDate entrada) { String jpql = new StringBuilder("select f from Funcionario f ").append("where f.dataEntrada >= ?1 ") .append("order by f.dataEntrada asc").toString(); return createQuery(jpql, entrada); } @Override public List<Funcionario> findByDataSaida(LocalDate saida) { String jpql = new StringBuilder("select f from Funcionario f ").append("where f.dataSaida >= ?1 ") .append("order by f.dataEntrada asc").toString(); return createQuery(jpql, saida); } }
[ "jaironsousa@gmail.com" ]
jaironsousa@gmail.com
ce5eaa98468f24f4ca06162e63e4388480d05275
95bca8b42b506860014f5e7f631490f321f51a63
/dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/view/ClassPathUriResolver.java
b5b7b72012faf719f411d47c3b48bbfeb4c80187
[ "BSD-3-Clause" ]
permissive
hispindia/HP-2.7
d5174d2c58423952f8f67d9846bec84c60dfab28
bc101117e8e30c132ce4992a1939443bf7a44b61
refs/heads/master
2022-12-25T04:13:06.635159
2020-09-29T06:32:53
2020-09-29T06:32:53
84,940,096
0
0
BSD-3-Clause
2022-12-15T23:53:32
2017-03-14T11:13:27
Java
UTF-8
Java
false
false
3,079
java
package org.hisp.dhis.api.view; /* * Copyright (c) 2004-2011, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import org.springframework.core.io.ClassPathResource; import javax.xml.transform.Source; import javax.xml.transform.TransformerException; import javax.xml.transform.URIResolver; import javax.xml.transform.stream.StreamSource; import java.io.IOException; /** * @author Morten Olav Hansen <mortenoh@gmail.com> */ public class ClassPathUriResolver implements URIResolver { private String templatePath = "/templates/"; public ClassPathUriResolver() { } public ClassPathUriResolver( String templatePath ) { this.templatePath = templatePath; } public String getTemplatePath() { return templatePath; } public void setTemplatePath( String templatePath ) { this.templatePath = templatePath; } @Override public Source resolve( String href, String base ) throws TransformerException { String url = getTemplatePath() + href; ClassPathResource classPathResource = new ClassPathResource( url ); if ( !classPathResource.exists() ) { throw (new TransformerException( "Resource " + url + " does not exist in classpath." )); } Source source = null; try { source = new StreamSource( classPathResource.getInputStream() ); } catch ( IOException e ) { throw (new TransformerException( "IOException while reading " + url + "." )); } return source; } }
[ "mithilesh.hisp@gmail.com" ]
mithilesh.hisp@gmail.com
eb097c9e2451cbad7dfa65e31b7f7d828f1a7d21
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/77/org/apache/commons/math/distribution/HypergeometricDistributionImpl_probability_197.java
0eb9004f4b481013172d9b1f90baffe310e34414
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,059
java
org apach common math distribut implement link hypergeometr distribut hypergeometricdistribut version revis date hypergeometr distribut impl hypergeometricdistributionimpl abstract integ distribut abstractintegerdistribut distribut method return param pmf evalu pmf distribut probabl ret popul size getpopulations number success getnumberofsuccess sampl size getsamples domain domain getdomain domain domain ret sampl size samples sampl size samples saddl point expans saddlepointexpans log binomi probabl logbinomialprob number success numberofsuccess saddl point expans saddlepointexpans log binomi probabl logbinomialprob sampl size samples saddl point expans saddlepointexpans log binomi probabl logbinomialprob sampl size samples ret math exp ret
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
5b2a8796b794f5bc30aecd55e3d69109b06f1db8
3bb932947a00b2f77deb1f9294340710f30ed2e0
/data/comp-changes-old/src/main/methodLessAccessible/MethodLessAccessible.java
837edc290d3e09abcfb88f612ee492a34f401e2b
[ "MIT" ]
permissive
crossminer/maracas
17684657b29293d82abe50249798e10312d192d6
4cb6fa22d8186d09c3bba6f5da0c548a26d044e1
refs/heads/master
2023-03-05T20:34:36.083662
2023-02-22T12:21:47
2023-02-22T12:21:47
175,425,329
8
0
null
2021-02-25T13:19:15
2019-03-13T13:21:53
Java
UTF-8
Java
false
false
907
java
package main.methodLessAccessible; public class MethodLessAccessible { public int methodLessAccessiblePublic2Protected() { return 0; } public int methodLessAccessiblePublic2PackPriv() { return 1; } public int methodLessAccessiblePublic2Private() { return 2; } protected int methodLessAccessibleProtected2Public() { return 3; } protected int methodLessAccessibleProtected2PackPriv() { return 4; } protected int methodLessAccessibleProtected2Private() { return 5; } int methodLessAccessiblePackPriv2Public() { return 6; } int methodLessAccessiblePackPriv2Protected() { return 7; } int methodLessAccessiblePackPriv2Private() { return 8; } private int methodLessAccessiblePrivate2Public() { return 9; } private int methodLessAccessiblePrivate2PackPriv() { return 10; } private int methodLessAccessiblePrivate2Protected() { return 11; } }
[ "lina.m8a@gmail.com" ]
lina.m8a@gmail.com
55004519ca4b94f99c889a16fad17c87313d0562
7f7cb7388a57b066b04ec863df7fe681515854c5
/src/main/java/com/klzan/plugin/pay/ips/withdrawrefticket/vo/IpsPayWithdrawRefundTicketResponse.java
9a4abed474975afa37bde0f6ab97b2b57cf0e2a6
[]
no_license
ybak/karazam-santian
9541fc0e02774ee5c5a27218a2639fbcb078ca93
dbd905913b9b6273d2028853d14396b0adc01ccc
refs/heads/master
2021-03-24T01:10:59.376527
2018-05-27T03:45:28
2018-05-27T03:45:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
819
java
package com.klzan.plugin.pay.ips.withdrawrefticket.vo; import com.klzan.plugin.pay.IDetailResponse; import java.math.BigDecimal; /** * Created by suhao Date: 2017/3/16 Time: 14:58 * * @version: 1.0 */ public class IpsPayWithdrawRefundTicketResponse implements IDetailResponse { /** * 商户订单号 */ private String merBillNo; /** * 退票金额 */ private BigDecimal refundAmt; /** * 退票日期 */ private String trdDate; /** * 退票原因 */ private String reason; public String getMerBillNo() { return merBillNo; } public BigDecimal getRefundAmt() { return refundAmt; } public String getTrdDate() { return trdDate; } public String getReason() { return reason; } }
[ "1922448115@qq.com" ]
1922448115@qq.com
da77f57e454dedb4d1d28048a603ac680f8016d7
12b75ba88d14631e2c99a2fff6b3f3683aafc976
/nts/texmf/source/nts/nts-1.00-beta/nts/noad/CloseNoad.java
68c8b7a63e8fa69cb0889b3f84c7525f20ea1236
[]
no_license
tex-other/nts
50b4f66b3cafa870be4572dff92d23ab4321ddc8
b4b333723326dc06a84bcd28e2672a76537d9752
refs/heads/master
2021-09-09T07:41:55.366960
2018-03-14T07:37:37
2018-03-14T07:37:37
125,165,059
0
1
null
null
null
null
UTF-8
Java
false
false
1,052
java
// Copyright 2001 by // DANTE e.V. and any individual authors listed elsewhere in this file. // // This file is part of the NTS system. // ------------------------------------ // // It may be distributed and/or modified under the // conditions of the NTS Public License (NTSPL), either version 1.0 // of this license or (at your option) any later version. // The latest version of this license is in // http://www.dante.de/projects/nts/ntspl.txt // and version 1.0 or later is part of all distributions of NTS // version 1.0-beta or later. // // The list of all files belonging to the NTS distribution is given in // the file `manifest.txt'. // // Filename: nts/noad/CloseNoad.java // $Id: CloseNoad.java,v 1.1.1.1 2000/10/04 10:20:17 ksk Exp $ package nts.noad; public class CloseNoad extends WordPartNoad { public CloseNoad(Field nucleus) { super(nucleus); } protected String getDesc() { return "mathclose"; } public boolean canFollowBin() { return false; } protected byte spacingType() { return SPACING_TYPE_CLOSE; } }
[ "shreevatsa.public@gmail.com" ]
shreevatsa.public@gmail.com
a6bc5f786251433e7838850933d21c8aeb159401
b015fcbd5743d4fea1741d9518b3112dc38685ad
/day07 Map/src/my2/TreeMapTest.java
840279b5c9a219602f18e21d9649484e10ef8a43
[]
no_license
qfei97/learnforJava_Senior
21393d18dbd26421e4b658ecaf49a89f7bd77fd6
d964c01ce22f1a580b5c61ba65a423d03c89c980
refs/heads/master
2022-11-30T11:04:42.913802
2020-08-17T03:51:58
2020-08-17T03:51:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,214
java
package my2; import org.junit.Test; import java.util.*; /** * @author 孟享广 * @create 2020-06-11 1:10 下午 */ public class TreeMapTest { @Test public void test1(){ TreeMap map = new TreeMap(new Comparator() { @Override public int compare(Object o1, Object o2) { if (o1 instanceof User && o2 instanceof User){ User u1 = (User)o1; User u2 = (User)o2; return Integer.compare(u1.getAge(), u2.getAge()); } throw new RuntimeException("111111"); } }); User u1 = new User("Tom", 23); User u2 = new User("Jerry",32); User u3 = new User("Jack",20); User u4 = new User("Rose",18); map.put(u1, 98); map.put(u2,89); map.put(u3,76); map.put(u4,100); // System.out.println(map); Set set = map.entrySet(); Iterator iterator = set.iterator(); while (iterator.hasNext()){ Object obj = iterator.next(); Map.Entry entry = (Map.Entry)obj; System.out.println(entry.getKey() + "->" + entry.getValue()); } } }
[ "‘396330646@qq.com’" ]
‘396330646@qq.com’
cce70336490bf83ba5d54fd09f72ba70ec6e38ca
9a8349e3e961699c4eb582e1bc0a571fcf3d28b6
/HdAndroid/app/src/main/java/com/giants3/hd/android/helper/SharedPreferencesHelper.java
af0dc5c1197bd945b680dc5a65abc52621a76944
[]
no_license
davidleen/WorkSpace
bb31ce2768b31d5e1276fc1d2eb014bd2ed57836
058b94c7092f531076c5bb7b629a4c028658fbc9
refs/heads/master
2021-09-12T07:19:45.209564
2021-09-05T15:49:03
2021-09-05T15:49:03
150,992,553
0
0
null
null
null
null
UTF-8
Java
false
false
5,957
java
package com.giants3.hd.android.helper; import android.content.Context; import android.content.SharedPreferences; import com.giants3.android.frame.util.StorageUtils; import com.giants3.hd.entity.app.AUser; import com.giants3.hd.noEntity.LoginHistory; import com.giants3.hd.data.utils.GsonUtils; import com.giants3.hd.exception.HdException; import com.giants3.hd.noEntity.BufferData; import com.giants3.hd.utils.StringUtils; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; /** * Created by david on 2016/1/2. */ public class SharedPreferencesHelper { public static Context mContext; public static final String SHARED_PREFERENCE_APP="SHARED_PREFERENCE_APP"; public static final String KEY_LOGIN_USER="LOGIN_USER"; public static final String KEY_LAST_LOGIN_TOKEN="LAST_LOGIN_TOKEN"; public static final String KEY_INIT_DATA="INIT_DATA"; public static final String KEY_LOGIN_HISTORY="LOGIN_HISTORY"; public static void init(Context context) { mContext=context; aUser=getLoginUserFromCache(); AuthorityUtil.getInstance().setLoginUser(aUser); aBufferData=getInitDataFromCache(); } private static final AUser getLoginUserFromCache() { String value= StorageUtils.readStringFromFile( KEY_LOGIN_USER); if(StringUtils.isEmpty(value)) { SharedPreferences sharedPreferences = mContext.getSharedPreferences(SHARED_PREFERENCE_APP, Context.MODE_PRIVATE); value = sharedPreferences.getString(KEY_LOGIN_USER, ""); if(!StringUtils.isEmpty(value)) { StorageUtils.writeString(value,KEY_LOGIN_USER); } } AUser user=null; try { user= GsonUtils.fromJson(value,AUser.class); } catch (Throwable e) { } return user; } private static AUser aUser; private static BufferData aBufferData; public static void saveLoginUser(AUser auser) { aUser=auser; String value=GsonUtils.toJson(auser); StorageUtils.writeString(value,KEY_LOGIN_USER); AuthorityUtil.getInstance().setLoginUser(auser); SharedPreferences sharedPreferences=mContext.getSharedPreferences(SHARED_PREFERENCE_APP,Context.MODE_PRIVATE); SharedPreferences.Editor editor=sharedPreferences.edit(); editor.putString(KEY_LOGIN_USER,value); editor.commit(); } public static AUser getLoginUser() { if(aUser==null) { aUser=getLoginUserFromCache(); } return aUser; } public static void saveInitData(BufferData bufferData) { aBufferData=bufferData; String value=GsonUtils.toJson(bufferData); StorageUtils.writeString(value,KEY_INIT_DATA); SharedPreferences sharedPreferences=mContext.getSharedPreferences(SHARED_PREFERENCE_APP,Context.MODE_PRIVATE); SharedPreferences.Editor editor=sharedPreferences.edit(); editor.putString(KEY_INIT_DATA,value); editor.commit(); } private static final BufferData getInitDataFromCache() { String value=StorageUtils.readStringFromFile(KEY_INIT_DATA); if(StringUtils.isEmpty(value)) { SharedPreferences sharedPreferences=mContext.getSharedPreferences(SHARED_PREFERENCE_APP,Context.MODE_PRIVATE); value=sharedPreferences.getString(KEY_INIT_DATA, ""); if(!StringUtils.isEmpty(value)) { StorageUtils.writeString(value,KEY_INIT_DATA); } } ; BufferData bufferData=null; try { bufferData= GsonUtils.fromJson(value,BufferData.class); } catch (Throwable e) { } return bufferData; } public static BufferData getInitData() { if(aBufferData==null) { aBufferData=getInitDataFromCache(); } return aBufferData; } private static List<LoginHistory> histories; public static List<LoginHistory> getLoginHistory() { if(histories==null) { histories=getLoginHistoryFromCache(); } return histories; } private static List<LoginHistory> getLoginHistoryFromCache() { String value=StorageUtils.readStringFromFile(KEY_LOGIN_HISTORY); List<LoginHistory> result=null; try { result=GsonUtils.fromJson(value, new ParameterizedType() { @Override public Type[] getActualTypeArguments() { return new Type[]{LoginHistory.class}; } @Override public Type getOwnerType() { return null; } @Override public Type getRawType() { return ArrayList.class; } }); } catch (Throwable e) { e.printStackTrace(); } return result; } public static void addLoginHistory(LoginHistory aHistory) { if(histories==null) { histories=new ArrayList<>(); } List<LoginHistory> removedList=new ArrayList<>(); for(LoginHistory temp:histories) { if(temp.name.equals(aHistory.name)) { removedList.add(temp); } } histories.removeAll(removedList); histories.add(aHistory); String value=GsonUtils.toJson(histories); StorageUtils.writeString(value,KEY_LOGIN_HISTORY); } public static void saveToken(String token) { StorageUtils.writeString(token,KEY_LAST_LOGIN_TOKEN); } public static String readToken() { return StorageUtils.readStringFromFile(KEY_LAST_LOGIN_TOKEN); } }
[ "davidleen29@gmail.com" ]
davidleen29@gmail.com
6ffb94dceac2e78f8a02c52d2a15df6431727e71
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a029/A029279Test.java
23cf757cb5bf04e0dc8eb4369632c0b9e6bb430d
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a029; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A029279Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
a5689224f8ece5be4c24afb8133ba3b30df26d5c
23f4d78623458d375cf23b7017c142dd45c32481
/Core/orient-sysmodel/com/orient/sysmodel/domain/tbom/AbstractRelationTbom.java
23163ecd8ec1fe7255104238f3954577aa60c015
[]
no_license
lcr863254361/weibao_qd
4e2165efec704b81e1c0f57b319e24be0a1e4a54
6d12c52235b409708ff920111db3e6e157a712a6
refs/heads/master
2023-04-03T00:37:18.947986
2021-04-11T15:12:45
2021-04-11T15:12:45
356,436,350
0
0
null
null
null
null
UTF-8
Java
false
false
2,433
java
/* * Title: AbstractRelationTbom.java * Company: DHC * Author: * Date: Nov 5, 2009 9:57:00 AM * Version: 4.0 */ package com.orient.sysmodel.domain.tbom; /** * AbstractRelationTBOM entity provides the base persistence definition of the * RelationTBOM entity. * * @author MyEclipse Persistence Tools */ public abstract class AbstractRelationTbom extends com.orient.sysmodel.domain.BaseBean implements java.io.Serializable { // Fields /** The id. */ private String id; /** The cwm tbom by node id. */ private Tbom cwmTbomByNodeId;//TBOM表的节点ID,不唯一,此表用来记录该节点关联的其他节点的信息表 /** The cwm tbom by relation id. */ private Tbom cwmTbomByRelationId;//节点ID所关联的ID // Constructors /** * default constructor. */ public AbstractRelationTbom() { } /** * full constructor. * * @param cwmTbomByNodeId * the cwm tbom by node id * @param cwmTbomByRelationId * the cwm tbom by relation id */ public AbstractRelationTbom(Tbom cwmTbomByNodeId, Tbom cwmTbomByRelationId) { this.cwmTbomByNodeId = cwmTbomByNodeId; this.cwmTbomByRelationId = cwmTbomByRelationId; } // Property accessors /** * Gets the id. * * @return the id */ public String getId() { return this.id; } /** * Sets the id. * * @param id * the new id */ public void setId(String id) { this.id = id; } /** * Gets the cwm tbom by node id. * * @return the cwm tbom by node id */ public Tbom getCwmTbomByNodeId() { return this.cwmTbomByNodeId; } /** * Sets the cwm tbom by node id. * * @param cwmTbomByNodeId * the new cwm tbom by node id */ public void setCwmTbomByNodeId(Tbom cwmTbomByNodeId) { this.cwmTbomByNodeId = cwmTbomByNodeId; } /** * Gets the cwm tbom by relation id. * * @return the cwm tbom by relation id */ public Tbom getCwmTbomByRelationId() { return this.cwmTbomByRelationId; } /** * Sets the cwm tbom by relation id. * * @param cwmTbomByRelationId * the new cwm tbom by relation id */ public void setCwmTbomByRelationId(Tbom cwmTbomByRelationId) { this.cwmTbomByRelationId = cwmTbomByRelationId; } }
[ "lcr18015367626" ]
lcr18015367626
8849ecbe1830d9d51daf831792e665046759b064
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/com/tencent/mm/pluginsdk/i$o$c.java
6f6fa898a2beb1e66ac18aee62f82167a5016b4e
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
901
java
package com.tencent.mm.pluginsdk; import android.app.Activity; import android.graphics.Bitmap; import android.view.View; import com.tencent.mm.protocal.b.adw; import com.tencent.mm.storage.z; public abstract interface i$o$c { public abstract void G(Activity paramActivity); public abstract void V(View paramView); public abstract Bitmap a(adw paramadw, View paramView, int paramInt, z paramz); public abstract void aBa(); public abstract void b(adw paramadw, View paramView, int paramInt, z paramz); public abstract void c(adw paramadw, View paramView, int paramInt, z paramz); public abstract void pause(); public abstract Bitmap r(adw paramadw); public abstract String s(adw paramadw); public abstract void start(); } /* Location: * Qualified Name: com.tencent.mm.pluginsdk.i.o.c * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
c27b2eda1c4538fa6d7cabf0f70cf9dbba5868eb
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-58b-8-9-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer_ESTest.java
72a7d57494b052a2bb75c197fe3bbda4fd1325a4
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
609
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 08:10:22 UTC 2020 */ package org.apache.commons.math.optimization.general; 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 AbstractLeastSquaresOptimizer_ESTest extends AbstractLeastSquaresOptimizer_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a915a1f354e292ee2232b15f4b59c9f15eed1f13
c55a758da768c00779aeb23f617e8883bde78d99
/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/programrule/ProgramRuleVariableServiceTest.java
734a9a15451800774cc311588fa359fba5e5c4aa
[ "BSD-3-Clause" ]
permissive
kakada/dhis2
2d229dad0a835e711c7c8923ba9ffd5c2845f462
7a47bad654a340a5c2bcfa0de936f4fdc885ca5e
refs/heads/master
2021-01-18T22:41:04.575412
2015-07-24T07:10:46
2015-07-24T07:10:46
39,616,913
0
1
null
2016-03-09T19:45:40
2015-07-24T07:01:37
Java
UTF-8
Java
false
false
7,709
java
package org.hisp.dhis.programrule; /* * Copyright (c) 2004-2015, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import java.util.Collection; import org.hisp.dhis.DhisSpringTest; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramService; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; import org.hisp.dhis.trackedentity.TrackedEntityAttributeService; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import static org.junit.Assert.*; public class ProgramRuleVariableServiceTest extends DhisSpringTest { private Program programA; private Program programB; private Program programC; private DataElement dataElementA; private TrackedEntityAttribute attributeA; @Autowired private ProgramService programService; @Autowired private DataElementService dataElementService; @Autowired private TrackedEntityAttributeService attributeService; @Autowired private ProgramRuleVariableService variableService; @Override public void setUpTest() { programA = createProgram( 'A', null, null ); programB = createProgram( 'B', null, null ); programC = createProgram( 'C', null, null ); dataElementA = createDataElement( 'A' ); attributeA = createTrackedEntityAttribute( 'A' ); programService.addProgram( programA ); programService.addProgram( programB ); programService.addProgram( programC ); dataElementService.addDataElement( dataElementA ); attributeService.addTrackedEntityAttribute( attributeA ); } @Test public void testAddGet() { ProgramRuleVariable variableA = new ProgramRuleVariable( "RuleVariableA", programA, ProgramRuleVariableSourceType.DATAELEMENT_CURRENT_EVENT, null, dataElementA, null ); ProgramRuleVariable variableB = new ProgramRuleVariable( "RuleVariableB", programA, ProgramRuleVariableSourceType.TEI_ATTRIBUTE, attributeA, null, null ); ProgramRuleVariable variableC = new ProgramRuleVariable( "RuleVariableC", programA, ProgramRuleVariableSourceType.CALCULATED_VALUE, null, null, null ); int idA = variableService.addProgramRuleVariable( variableA ); int idB = variableService.addProgramRuleVariable( variableB ); int idC = variableService.addProgramRuleVariable( variableC ); assertEquals( variableA, variableService.getProgramRuleVariable( idA ) ); assertEquals( variableB, variableService.getProgramRuleVariable( idB ) ); assertEquals( variableC, variableService.getProgramRuleVariable( idC ) ); } @Test public void testGetByProgram() { ProgramRuleVariable variableD = new ProgramRuleVariable( "RuleVariableD", programB, ProgramRuleVariableSourceType.DATAELEMENT_CURRENT_EVENT, null, dataElementA, null ); ProgramRuleVariable variableE = new ProgramRuleVariable( "RuleVariableE", programB, ProgramRuleVariableSourceType.TEI_ATTRIBUTE, attributeA, null, null ); ProgramRuleVariable variableF = new ProgramRuleVariable( "RuleVariableF", programB, ProgramRuleVariableSourceType.CALCULATED_VALUE, null, null, null ); //Add a var that is not part of programB.... ProgramRuleVariable variableG = new ProgramRuleVariable( "RuleVariableG", programA, ProgramRuleVariableSourceType.CALCULATED_VALUE, null, null, null ); variableService.addProgramRuleVariable( variableD ); variableService.addProgramRuleVariable( variableE ); variableService.addProgramRuleVariable( variableF ); variableService.addProgramRuleVariable( variableG ); //Get all the 3 rules for programB Collection<ProgramRuleVariable> vars = variableService.getProgramRuleVariable( programB ); assertEquals( 3, vars.size() ); assertTrue( vars.contains( variableD ) ); assertTrue( vars.contains( variableE ) ); assertTrue( vars.contains( variableF ) ); //Make sure that the var connected to program A is not returned as part of collection of vars in program B. assertFalse( vars.contains( variableG ) ); } @Test public void testUpdate() { ProgramRuleVariable variableH = new ProgramRuleVariable( "RuleVariableH", programA, ProgramRuleVariableSourceType.CALCULATED_VALUE, null, null, null ); int idH = variableService.addProgramRuleVariable( variableH ); variableH.setAttribute( attributeA ); variableH.setDataElement( dataElementA ); variableH.setName( "newname" ); variableH.setProgram( programC ); variableH.setSourceType( ProgramRuleVariableSourceType.DATAELEMENT_PREVIOUS_EVENT ); variableService.updateProgramRuleVariable( variableH ); assertEquals( variableH, variableService.getProgramRuleVariable( idH ) ); } @Test public void testDeleteProgramRuleVariable() { ProgramRuleVariable ruleVariableI = new ProgramRuleVariable( "RuleVariableI", programA, ProgramRuleVariableSourceType.DATAELEMENT_CURRENT_EVENT, null, dataElementA, null ); ProgramRuleVariable ruleVariableJ = new ProgramRuleVariable( "RuleVariableJ", programA, ProgramRuleVariableSourceType.TEI_ATTRIBUTE, attributeA, null, null ); int idI = variableService.addProgramRuleVariable( ruleVariableI ); int idJ = variableService.addProgramRuleVariable( ruleVariableJ ); assertNotNull( variableService.getProgramRuleVariable( idI ) ); assertNotNull( variableService.getProgramRuleVariable( idJ ) ); variableService.deleteProgramRuleVariable( ruleVariableI ); assertNull( variableService.getProgramRuleVariable( idI ) ); assertNotNull( variableService.getProgramRuleVariable( idJ ) ); variableService.deleteProgramRuleVariable( ruleVariableJ ); assertNull( variableService.getProgramRuleVariable( idI ) ); assertNull( variableService.getProgramRuleVariable( idJ ) ); } }
[ "kakada.chheang@gmail.com" ]
kakada.chheang@gmail.com
b43f11c0132e1dcc8824ff2104888ef42d6bdd7c
b146953fa6d3e3353579237832ea4b31d202a3af
/app/src/main/java/com/jwkj/adapter/LocalDeviceListAdapter.java
a20fc20ba8c52fd8491328e973f286e0c5c11925
[]
no_license
xiaoli1993/Smarthomes
bbfb595efa96c2a379e8628bfae10e320b223502
34b491d2d3ab77f9aa2166cc2866a11aff11e857
refs/heads/master
2021-01-19T12:03:28.829466
2017-06-11T13:30:17
2017-06-11T13:30:17
82,278,789
0
0
null
null
null
null
UTF-8
Java
false
false
6,717
java
package com.jwkj.adapter; import android.content.Context; import android.content.Intent; import android.graphics.Paint; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.jwkj.activity.AddApDeviceActivity; import com.jwkj.activity.AddContactNextActivity; import com.jwkj.data.APContact; import com.jwkj.data.Contact; import com.jwkj.data.DataManager; import com.jwkj.entity.LocalDevice; import com.jwkj.global.Constants; import com.jwkj.global.FList; import com.jwkj.global.NpcCommon; import com.jwkj.utils.Utils; import com.jwkj.utils.WifiUtils; import com.jwkj.widget.PromptDialog; import com.p2p.core.P2PValue; import com.nuowei.smarthome.R; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.List; public class LocalDeviceListAdapter extends BaseAdapter { List<LocalDevice> datas; Context mContext; private int addDeviceMethod=Constants.AddDeviceMethod.LAN_ADD; public LocalDeviceListAdapter(Context context) { datas = FList.getInstance().getLocalDevicesNoAP(); this.mContext = context; } @Override public int getCount() { return datas.size()+1; } @Override public LocalDevice getItem(int arg0) { // TODO Auto-generated method stub return datas.get(arg0); } @Override public long getItemId(int arg0) { // TODO Auto-generated method stub return arg0; } @Override public int getItemViewType(int position) { if(position<datas.size()){ return 0; }else{ return 1; } } @Override public int getViewTypeCount() { return 2; } public void setAddDeviceMethod(int addDeviceMethod){ this.addDeviceMethod=addDeviceMethod; } @Override public View getView(int position, View arg1, ViewGroup arg2) { // TODO Auto-generated method stub int type=getItemViewType(position); if(type==0){ View view = arg1; if (null == view) { view = LayoutInflater.from(mContext).inflate( R.layout.list_item_local_device, null); } TextView name = (TextView) view.findViewById(R.id.tx_device_id); ImageView typeImg = (ImageView) view.findViewById(R.id.img_type); TextView text_ip_address = (TextView) view .findViewById(R.id.tv_device_ip); final LocalDevice localDevice = datas.get(position); if (localDevice.flag == Constants.DeviceFlag.AP_MODE) { name.setText(localDevice.getName()); } else { name.setText(localDevice.getContactId()); } text_ip_address.setText(localDevice.address.getHostAddress()); switch (localDevice.getType()) { case P2PValue.DeviceType.NPC: typeImg.setImageResource(R.drawable.ic_device_type_npc); break; case P2PValue.DeviceType.IPC: typeImg.setImageResource(R.drawable.ic_device_type_ipc); break; case P2PValue.DeviceType.DOORBELL: typeImg.setImageResource(R.drawable.ic_device_type_door_bell); break; case P2PValue.DeviceType.UNKNOWN: typeImg.setImageResource(R.drawable.ic_device_type_unknown); break; case P2PValue.DeviceType.NVR: typeImg.setImageResource(R.drawable.ic_device_type_nvr); break; default: typeImg.setImageResource(R.drawable.ic_device_type_unknown); break; } view.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { // TODO Auto-generated method stub Contact saveContact = new Contact(); saveContact.contactId = localDevice.contactId; saveContact.contactName = localDevice.name; saveContact.contactType = localDevice.type; saveContact.contactFlag = localDevice.flag; saveContact.messageCount = 0; saveContact.activeUser = NpcCommon.mThreeNum; saveContact.rtspflag=localDevice.rtspFrag; saveContact.subType=localDevice.subType; String mark = localDevice.address.getHostAddress(); saveContact.ipadressAddress=localDevice.address; Intent modify = new Intent(); if (localDevice.getFlag() == Constants.DeviceFlag.ALREADY_SET_PASSWORD) { modify.setClass(mContext, AddContactNextActivity.class); modify.putExtra("isCreatePassword", false); } else if (localDevice.getFlag() == Constants.DeviceFlag.UNSET_PASSWORD) { modify.setClass(mContext, AddContactNextActivity.class); modify.putExtra("isCreatePassword", true); } else { try { saveContact.ipadressAddress = InetAddress .getByName(Utils.getAPDeviceIp(mContext)); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } modify.setClass(mContext, AddApDeviceActivity.class); modify.putExtra("isCreatePassword", false); Log.e("dxswifi", "saveContact.contactId-->" + saveContact.contactId + "---saveContact.contactName" + saveContact.contactName); if (WifiUtils.getInstance().isConnectWifi( saveContact.contactName)) { APContact cona = DataManager .findAPContactByActiveUserAndContactId( mContext, NpcCommon.mThreeNum, saveContact.contactId); if (cona != null && cona.Pwd != null && cona.Pwd.length() > 0) { saveContact.contactPassword = cona.Pwd; modify.putExtra("isAPModeConnect", 1); } else { modify.putExtra("isAPModeConnect", 0); } } else { modify.putExtra("isAPModeConnect", 0); } } modify.putExtra("contact", saveContact); modify.putExtra("ipFlag", mark.substring( mark.lastIndexOf(".") + 1, mark.length())); modify.putExtra("ip", mark); modify.putExtra("addDeviceMethod",addDeviceMethod); mContext.startActivity(modify); } }); return view; }else{ View view=arg1; final MainAdapter.ViewHolder3 holder3; if(view==null) { view = LayoutInflater.from(mContext).inflate(R.layout.list_item_local_no_device, null); } TextView tv_no_device = (TextView) view.findViewById(R.id.tv_no_device); tv_no_device.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG); tv_no_device.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { PromptDialog promptDialog=new PromptDialog(mContext); View v = LayoutInflater.from(mContext).inflate(R.layout.dialog_device_not_in_list,null); promptDialog.setTitle(mContext.getResources().getString(R.string.device_not_in_list)); promptDialog.addView(v); promptDialog.show(); } }); return view; } } public void updateData(List<LocalDevice> datas) { this.datas =datas; this.notifyDataSetChanged(); } }
[ "554674787@qq.com" ]
554674787@qq.com
6a7551e9c73021e1e58945ae8fb025eef5eaac27
f9b5fcb69b37241c82c9975c1a0323b14389b11b
/src/main/java/org/scijava/convert/NumberToFloatConverter.java
716ab1db25ca69a10c42244c4246a35dbd840221
[ "BSD-2-Clause", "Apache-2.0" ]
permissive
NicoKiaru/scijava-common
522fc1d0b4646171142a1b9673d83773b90c7669
8fdc98387b829c9ab7b670de9ddd2b385330af3f
refs/heads/master
2022-05-04T23:26:10.451857
2022-04-07T15:42:01
2022-04-07T15:42:01
133,023,609
0
0
BSD-2-Clause
2022-03-29T21:53:36
2018-05-11T10:05:15
Java
UTF-8
Java
false
false
1,800
java
/* * #%L * SciJava Common shared library for SciJava software. * %% * Copyright (C) 2009 - 2021 SciJava developers. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * #L% */ package org.scijava.convert; /** * Converts numbers to floats. * * @author Alison Walter */ public abstract class NumberToFloatConverter<N extends Number> extends NumberToNumberConverter<N, Float> { @Override public Float convert(Number n) { return n.floatValue(); } @Override public Class<Float> getOutputType() { return Float.class; } }
[ "ctrueden@wisc.edu" ]
ctrueden@wisc.edu
e0ed5a793c1cac46ffe4705816c5967bb82cdc85
dec6bd85db1d028edbbd3bd18fe0ca628eda012e
/eclipse-projects/folha-ponto-backend/src/test/java/br/com/app/common/builder/FuncionarioEntityBuilder.java
7fefa372d7ae241ad9a31ca3c6d161c695f68df3
[]
no_license
MatheusGrenfell/java-projects
21b961697e2c0c6a79389c96b588e142c3f70634
93c7bfa2e4f73a232ffde2d38f30a27f2a816061
refs/heads/master
2022-12-29T12:55:00.014296
2020-10-16T00:54:30
2020-10-16T00:54:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,915
java
package br.com.app.common.builder; import java.math.BigDecimal; import br.com.app.empresa.dao.EmpresaEntity; import br.com.app.funcionario.dao.FuncionarioEntity; import br.com.app.usuario.dao.UsuarioEntity; public class FuncionarioEntityBuilder { private FuncionarioEntity entity; public static FuncionarioEntityBuilder create(long id) { FuncionarioEntityBuilder builder = new FuncionarioEntityBuilder(); builder.entity = new FuncionarioEntity(); builder.entity.setId(id); return builder; } public static FuncionarioEntityBuilder create() { FuncionarioEntityBuilder builder = new FuncionarioEntityBuilder(); builder.entity = new FuncionarioEntity(); return builder; } public FuncionarioEntityBuilder withNome(String nome) { entity.setNome(nome); return this; } public FuncionarioEntityBuilder withCpf(String cpf) { entity.setCpf(cpf); return this; } public FuncionarioEntityBuilder withRg(String rg) { entity.setRg(rg); return this; } public FuncionarioEntityBuilder withValorHora(BigDecimal valorHora) { entity.setValorHora(valorHora); return this; } public FuncionarioEntityBuilder withQtHorasTrabalhoDia(BigDecimal qtHorasTrabalhoDia) { entity.setQtHorasTrabalhoDia(qtHorasTrabalhoDia); return this; } public FuncionarioEntityBuilder withQtHorasAlmoco(BigDecimal qtHorasAlmoco) { entity.setQtHorasAlmoco(qtHorasAlmoco); return this; } public FuncionarioEntityBuilder withEmpresa(EmpresaEntity empresa) { entity.setEmpresa(empresa); return this; } public FuncionarioEntityBuilder withUsuario(UsuarioEntity usuario) { entity.setUsuario(usuario); return this; } public FuncionarioEntity build() { return entity; } }
[ "caiohobus@gmail.com" ]
caiohobus@gmail.com
5d8866c255e2122f879672cfec7e0d07ad4f30e6
235d06d08187ae4af8c073e39c74572eff4a3afa
/spring-boot-api-rest-ii/src/main/java/br/com/cmdev/sbootapirestii/repository/CursoRepository.java
cea46f4a23dd31a2cf1f2b13432ddfe9e011d0bd
[]
no_license
calixtomacedo/alura-formacao-spring-framework
9e56aff574c7ab2e417ef15cbbf42bf10dadbca6
4a85223f9c143997d093433f0c909bc297513647
refs/heads/master
2023-07-14T14:06:14.532558
2021-08-19T03:13:10
2021-08-19T03:13:10
384,835,010
0
0
null
null
null
null
UTF-8
Java
false
false
290
java
package br.com.cmdev.sbootapirestii.repository; import org.springframework.data.jpa.repository.JpaRepository; import br.com.cmdev.sbootapirestii.model.Curso; public interface CursoRepository extends JpaRepository<Curso, Long> { public Curso findByNomeIgnoreCase(String nomeCurso); }
[ "calixto.macedo@gmail.com" ]
calixto.macedo@gmail.com
f27e4d6f6d2b5e6d60e77848dce0432fe19b8e04
4e4beb1bb07ee57f239157f26a35b03f1c1089af
/CollectionLearn/src/collection1/IteratorTest.java
6def904d80a8def3f6d5c695dac5efad2e9adaef
[]
no_license
Mbabysbreath/JavaReview
b0957ab3e167e2e80c565f795b85d9c8dce63a64
4948c41e6520f77481fc04f1c88c3460d76566a7
refs/heads/master
2020-12-09T13:45:02.078207
2020-04-22T15:55:26
2020-04-22T15:55:26
232,775,860
0
0
null
null
null
null
UTF-8
Java
false
false
2,175
java
package collection1; import org.junit.Test; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; /** * 集合元素的遍历操作,使用迭代器Iterator接口——仅用于遍历Collection,不包含Map * 1.内部的方法:hasNext() next() * 2.集合对象每次调用iterator()方法都得到一个全新的迭代器对象 * 默认游标都在集合的第一个元素之前 * 3.内部的remove(),会删除当前迭代器所指的集合的元素,不同于集合中的remove * * @author zhaomin * @date 2020/2/6 21:16 */ public class IteratorTest { @Test public void test(){ Collection coll=new ArrayList(); coll.add(123); coll.add("abc"); coll.add(new String("sdf")); Person p=new Person("ZhaoMin",20); coll.add(p); coll.add(new Person("WangYiBo",22)); Iterator iterator = coll.iterator(); while (iterator.hasNext()) { //指针开始是在第一个元素的前一个位置 //调next():(1)指针下移(2)将下移后集合位置上的元素返回 System.out.println(iterator.next()); } } //测试Iterator中的remove() //如果还未调用next()或在上一次调用next()方法之后已经调了remove()方法 //再调用remove()都会报IllegalStateException @Test public void test1(){ Collection coll=new ArrayList(); coll.add(123); coll.add("abc"); coll.add(new String("sdf")); Person p=new Person("ZhaoMin",20); coll.add(p); coll.add(new Person("WangYiBo",22)); /*删除集合中的“abc"*/ Iterator iterator=coll.iterator(); while (iterator.hasNext()) { // iterator.remove();//java.lang.IllegalStateException Object obj=iterator.next(); if("abc".equals(obj)){ iterator.remove(); } //iterator.remove();//java.lang.IllegalStateException } Iterator iterator1 = coll.iterator(); while (iterator1.hasNext()) { System.out.println(iterator1.next()); } } }
[ "1830817543@qq.com" ]
1830817543@qq.com
c09e523823e4375253b7b25be24847d9ade6735b
d9ece6eab6c1855207918b4e32a8ea1aaafd0974
/src/ro/zg/opengroups/gwt/client/GreetingServiceAsync.java
420d320193b69478f518e644de7f2f95ee017e0c
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
acionescu/open-groups-gwt
40208142bdf07cea8401e3647d83e560691699fe
a9d3b8f72eb2ad7717785452cc3c394177606565
refs/heads/master
2016-09-02T21:10:47.258831
2011-02-27T15:09:17
2011-02-27T15:09:17
1,418,115
0
0
null
null
null
null
UTF-8
Java
false
false
1,063
java
/******************************************************************************* * Copyright 2011 Adrian Cristian Ionescu * * 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 ro.zg.opengroups.gwt.client; import com.google.gwt.user.client.rpc.AsyncCallback; /** * The async counterpart of <code>GreetingService</code>. */ public interface GreetingServiceAsync { void greetServer(String input, AsyncCallback<String> callback) throws IllegalArgumentException; }
[ "adrian.ionescu.consulting@gmail.com" ]
adrian.ionescu.consulting@gmail.com
90c364d437eef8e60cb3a58d15809e4aeb882251
e92300e437407317bbf4b19dad869849a90a45a9
/tv_ut/src/main/java/com/iptv/rocky/view/home/HomeAnimView.java
7d32951a7b7ed7515236e2f1984a136567adb0a3
[]
no_license
yalong1221/tv
bc932b364a03c47ac6059ea34ed1abafbcbf9e72
c106fb5f8f4f10de7a8a1abc7e52294951f50501
refs/heads/master
2021-01-01T04:32:59.408838
2016-11-26T02:47:43
2016-11-26T02:47:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,064
java
package com.iptv.rocky.view.home; import android.animation.AnimatorInflater; import android.animation.ObjectAnimator; import android.content.Context; import android.graphics.Bitmap; import android.text.TextUtils; import android.util.AttributeSet; import android.view.View; import android.widget.RelativeLayout; import com.iptv.common.view.AsyncImageView; import com.iptv.rocky.model.TvApplication; import com.iptv.rocky.model.home.HomeAnimData; import com.iptv.rocky.view.FloatLayerView; import com.nostra13.universalimageloader.core.assist.FailReason.FailType; import com.iptv.rocky.R; public class HomeAnimView extends RelativeLayout { private int mViewLoadedFlag; private View mLayoutView; private AsyncImageView mBackImage; private AsyncImageView mImageView1; private AsyncImageView mImageView2; private FloatLayerView mFloatLayer; private HomeAnimData mAnimData; private View mDefaultImage; private ObjectAnimator mAnimator1; private ObjectAnimator mAnimator2; private ObjectAnimator mAnimator3; private ObjectAnimator mAnimator4; public HomeAnimView(Context context) { this(context, null, 0); } public HomeAnimView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public HomeAnimView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); setChildrenDrawingOrderEnabled(true); } public void initView(HomeAnimData data) { if (!data.isNotTopPadding) { mLayoutView.setPadding(0, TvApplication.sTvItemTopPadding, 0, 0); RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)mDefaultImage.getLayoutParams(); params.setMargins(0, TvApplication.sTvItemTopPadding, 0, 0); } mAnimData = data; if (data.pageItem.images != null) { int size = data.pageItem.images.size(); if (size > 0) { mImageView1.setImageUrl(data.pageItem.images.get(0)); } else { mImageView1.setImageUrl(null); } if (size > 1) { mImageView2.setImageUrl(data.pageItem.images.get(1)); } else { mImageView2.setImageUrl(null); } } else { mImageView1.setImageUrl(null); mImageView2.setImageUrl(null); } String title = data.pageItem.title; if (!TextUtils.isEmpty(title)) { mFloatLayer.initView(title); } mBackImage.setImageUrl(data.pageItem.background); } public void onOwnerFocusChange(boolean hasFocus) { mAnimator1.cancel(); mAnimator2.cancel(); mAnimator3.cancel(); mAnimator4.cancel(); if (hasFocus) { mAnimator1.start(); mAnimator2.start(); if (!TextUtils.isEmpty(mAnimData.pageItem.title)) { mFloatLayer.setVisibility(View.VISIBLE); mFloatLayer.startMarquee(); } } else { mAnimator3.start(); mAnimator4.start(); mFloatLayer.setVisibility(View.INVISIBLE); mFloatLayer.stopMarquee(); } } @Override protected int getChildDrawingOrder(int childCount, int i) { int img1Index = indexOfChild(mImageView1); int img2Index = indexOfChild(mImageView2); if (i == img1Index){ return childCount - 1; } if (i == img2Index) { return childCount - 3; } if (i == childCount - 1) { return childCount - 2; } if (i == childCount - 2) { return img1Index; } if (i == childCount - 3) { return img2Index; } return i; } @Override protected void onFinishInflate() { super.onFinishInflate(); mLayoutView = findViewById(R.id.home_anim_layout); mDefaultImage = findViewById(R.id.tv_default_img); mBackImage = (AsyncImageView)findViewById(R.id.home_anim_backimg); mImageView1 = (AsyncImageView)findViewById(R.id.home_anim_img1); mImageView2 = (AsyncImageView)findViewById(R.id.home_anim_img2); mFloatLayer = (FloatLayerView)findViewById(R.id.tv_floatlayer); mFloatLayer.setVisibility(View.GONE); mBackImage.setImageLoadedListener(new AsyncImageLoadedListener(1)); mImageView1.setImageLoadedListener(new AsyncImageLoadedListener(2)); mImageView2.setImageLoadedListener(new AsyncImageLoadedListener(4)); mBackImage.setImageFailedListener(new AsyncImageFailedListener(1)); mImageView1.setImageFailedListener(new AsyncImageFailedListener(2)); mImageView2.setImageFailedListener(new AsyncImageFailedListener(4)); mAnimator1 = (ObjectAnimator)AnimatorInflater.loadAnimator(getContext(), R.animator.home_translate_vertical); mAnimator2 = (ObjectAnimator)AnimatorInflater.loadAnimator(getContext(), R.animator.home_translate_horizontal); mAnimator3 = (ObjectAnimator)AnimatorInflater.loadAnimator(getContext(), R.animator.home_translate_vertical_reset); mAnimator4 = (ObjectAnimator)AnimatorInflater.loadAnimator(getContext(), R.animator.home_translate_horizontal_reset); mAnimator1.setTarget(mImageView1); mAnimator2.setTarget(mImageView2); mAnimator3.setTarget(mImageView1); mAnimator4.setTarget(mImageView2); RelativeLayout.LayoutParams mImageView1_lp = (LayoutParams) mImageView1.getLayoutParams(); mImageView1_lp.setMargins(1, 1, 1, 1); RelativeLayout.LayoutParams mImageView2_lp = (LayoutParams) mImageView2.getLayoutParams(); mImageView2_lp.setMargins(1, 1, 1, 1); RelativeLayout.LayoutParams mFloatLayer_lp = (LayoutParams) mFloatLayer.getLayoutParams(); mFloatLayer_lp.setMargins(1, 1, 1, 1); } private class AsyncImageLoadedListener implements AsyncImageView.AsyncImageLoadedListener { private int mFlag; public AsyncImageLoadedListener(int flag) { mFlag = flag; } @Override public void onLoadComplete(String imageUri, View view, Bitmap loadedImage) { mViewLoadedFlag |= mFlag; if (mViewLoadedFlag == 7) { mAnimData.isViewLoaded = true; } } } private class AsyncImageFailedListener implements AsyncImageView.AsyncImageFailListener { private int mFlag; public AsyncImageFailedListener(int flag) { mFlag = flag; } @Override public void onLoadFailed(String imageUri, View view, FailType failType) { mViewLoadedFlag |= mFlag; if (mViewLoadedFlag == 7) { mAnimData.isViewLoaded = true; } } } }
[ "415677303@qq.com" ]
415677303@qq.com
173f6717b3f19c4cc5698b60e05e27e0b74141ea
b5d4e06b3f3591db8355442ff5b6a1fbad9244fc
/src/main/java/com/concurrent/log/LogService.java
dbdb6b79569de32ae30111d949429c29724fff53
[]
no_license
a514760469/UnderstandJVM
a5dc3b0c2aadbdf1680ca63f478cd9390dfcad24
1b22127cb5cec4ea2615fafc1a8c56e358a04fbd
refs/heads/master
2021-08-17T00:14:41.652203
2021-06-23T09:07:24
2021-06-23T09:07:24
185,553,272
1
0
null
null
null
null
UTF-8
Java
false
false
2,564
java
package com.concurrent.log; import java.io.PrintWriter; import java.io.Writer; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; /** * @author zhanglifeng * @since 2020-06-22 15:25 */ public class LogService { private static final int CAPACITY = 1000; private final BlockingQueue<String> queue; private final LoggerThread logger; private boolean isShutdown;// true private int reservations;// 保留 public LogService(Writer writer) { this.queue = new LinkedBlockingQueue<>(CAPACITY); this.logger = new LoggerThread(writer); } public void start() { logger.start(); } /** * 存在竞态条件,判断和put不是原子操作 */ public void log(String msg) throws InterruptedException { synchronized (this) { if (isShutdown) { throw new IllegalStateException("logger 已经关闭"); } ++ reservations; } queue.put(msg); } public void stop() { synchronized (this) { isShutdown = true; } logger.interrupt(); } private class LoggerThread extends Thread { private final PrintWriter writer; private LoggerThread(Writer writer) { this.writer = new PrintWriter(writer, true); } @Override public void run() { try { while (true) { try { synchronized (LogService.this) { if (isShutdown && reservations == 0) { break; } } String msg = queue.take(); synchronized (LogService.this) { --reservations; } writer.println(msg); } catch (InterruptedException e) { /* retry */ } } } finally { writer.close(); } } } public static void main(String[] args) throws InterruptedException { LogService logWriter = new LogService(new PrintWriter(System.out)); logWriter.start(); Thread.sleep(1000); logWriter.log("hehehe"); Runtime.getRuntime().addShutdownHook(new Thread(() -> { System.out.println("JVM关闭钩子!"); logWriter.stop(); })); } }
[ "514760469@qq.com" ]
514760469@qq.com
2adfa60335c72ccbe07fd9711a07473b844b2c7d
228f85a03cf7b6cd93ca80c332b7c8fd7e5c1519
/manager/biz/src/main/java/com/alibaba/otter/manager/biz/user/dal/ibatis/IbatisUserDAO.java
0becc4e18f51da102e724402a8045e9addbf910e
[ "Apache-2.0" ]
permissive
alibaba/otter
4ef5ad538a3793a5737cd2fd80d68e4601b773c6
7af72a3f73094da25ab98bd7319e2a29d086075c
refs/heads/master
2023-07-17T23:17:08.088038
2023-05-31T06:18:32
2023-05-31T06:18:32
11,997,640
7,942
2,568
Apache-2.0
2023-09-14T13:51:43
2013-08-09T09:31:22
Java
UTF-8
Java
false
false
2,917
java
/* * Copyright (C) 2010-2101 Alibaba Group Holding Limited. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.otter.manager.biz.user.dal.ibatis; import java.util.List; import java.util.Map; import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport; import com.alibaba.otter.shared.common.utils.Assert; import com.alibaba.otter.manager.biz.user.dal.UserDAO; import com.alibaba.otter.manager.biz.user.dal.dataobject.UserDO; /** * TODO Comment of IbatisUserDAO * * @author simon */ public class IbatisUserDAO extends SqlMapClientDaoSupport implements UserDAO { public UserDO findUserById(Long userId) { Assert.assertNotNull(userId); return (UserDO) getSqlMapClientTemplate().queryForObject("findUserById", userId); } public List<UserDO> listAllUsers() { return (List<UserDO>) getSqlMapClientTemplate().queryForList("listUsers"); } public List<UserDO> listByCondition(Map condition) { return (List<UserDO>) getSqlMapClientTemplate().queryForList("listUsers", condition); } public UserDO insertUser(UserDO user) { Assert.assertNotNull(user); getSqlMapClientTemplate().insert("insertUser", user); return user; } public void updateUser(UserDO user) { Assert.assertNotNull(user); getSqlMapClientTemplate().update("updateUser", user); } public boolean chackUnique(UserDO user) { Assert.assertNotNull(user); int count = (Integer) getSqlMapClientTemplate().queryForObject("checkUserUnique", user); return count == 0 ? true : false; } public void deleteUser(Long userId) { Assert.assertNotNull(userId); getSqlMapClientTemplate().delete("deleteUserById", userId); } public UserDO getAuthenticatedUser(String name, String password) { UserDO userDo = new UserDO(); userDo.setName(name); userDo.setPassword(password); return (UserDO) getSqlMapClientTemplate().queryForObject("getUserByNameAndPassword", userDo); } public int getCount() { Integer count = (Integer) getSqlMapClientTemplate().queryForObject("getUserCount"); return count.intValue(); } public int getCount(Map condition) { Integer count = (Integer) getSqlMapClientTemplate().queryForObject("getUserCount", condition); return count.intValue(); } }
[ "jianghang.loujh@alibaba-inc.com" ]
jianghang.loujh@alibaba-inc.com
984322606c6e6365576951374130d5f878860734
6a95484a8989e92db07325c7acd77868cb0ac3bc
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201411/ArchiveLineItems.java
314d634c943bb736183d26be8b100d09539125c9
[ "Apache-2.0" ]
permissive
popovsh6/googleads-java-lib
776687dd86db0ce785b9d56555fe83571db9570a
d3cabb6fb0621c2920e3725a95622ea934117daf
refs/heads/master
2020-04-05T23:21:57.987610
2015-03-12T19:59:29
2015-03-12T19:59:29
33,672,406
1
0
null
2015-04-09T14:06:00
2015-04-09T14:06:00
null
UTF-8
Java
false
false
892
java
package com.google.api.ads.dfp.jaxws.v201411; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * The action used for archiving {@link LineItem} objects. * * * <p>Java class for ArchiveLineItems complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ArchiveLineItems"> * &lt;complexContent> * &lt;extension base="{https://www.google.com/apis/ads/publisher/v201411}LineItemAction"> * &lt;sequence> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ArchiveLineItems") public class ArchiveLineItems extends LineItemAction { }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
ffd5ba655b7d39b208868f16d4ae45f0bfcc6aa0
0aa1b8239a2a6324edae8729134897402d54eddb
/Server/src/main/java/com/mixail/AgentWebsocket.java
ebcd3a50d07136db29f15d52c7306b4e125d5016
[]
no_license
Silmixai/WebChatTouchSoft
21eedc067eb9e04fccd1c6d86859935f6a5dd5b3
9e2c4036bcbcb871fa2dcfe14591ddce38d39127
refs/heads/master
2020-04-13T12:30:21.818783
2019-01-31T14:43:09
2019-01-31T14:43:09
163,204,246
0
0
null
null
null
null
UTF-8
Java
false
false
2,812
java
package com.mixail; import com.mixail.model.Status; import com.mixail.model.User; import com.mixail.service.UserService; import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import javax.json.Json; import javax.websocket.OnMessage; import javax.websocket.OnOpen; import javax.websocket.Session; import javax.websocket.server.ServerEndpoint; import java.io.StringReader; import java.util.Base64; @ServerEndpoint("/agent") public class AgentWebsocket { private User agent; private UserService userService = UserService.getInstance(); private static final Logger logger = LogManager.getLogger(AgentWebsocket.class); @OnOpen public void onOpen(Session session) { logger.info(" New connection, session: " + session); agent = new User(); agent.setUserSession(session); agent.setStatus(Status.Registered); } @OnMessage public void handleMessage(String message,Session session) { String TypeofMessage = Json.createReader(new StringReader(message)).readObject().getString("TypeOfMessage"); switch (TypeofMessage) { case "/register": { { String agentPassword = Json.createReader(new StringReader(message)).readObject().getString("agentPassword"); byte[] decodedBytes = Base64.getDecoder().decode(agentPassword); String decodedString = new String(decodedBytes); agent.setPassword(decodedString); String mes = Json.createReader(new StringReader(message)).readObject().getString("message"); String maxCountActiveChat = Json.createReader(new StringReader(message)).readObject().getString("maxCountActiveChat"); String typeofAgent = Json.createReader(new StringReader(message)).readObject().getString("TypeofAgent"); if (typeofAgent.equals("console")) { agent.setConsoleAgent(true); } agent.setMaxCountActiveChat(Integer.parseInt(maxCountActiveChat)); userService.registrationUser(mes, agent); } break; } case "/signIn": { userService.signInAgent(message,agent); break; } case "/exit": { userService.exitAgent(agent); break; } case "/closeTab": userService.closeTabAgent(message, agent); break; case "new chatting": { userService.newChattingAgent(message, agent); break; } case "/leave": // liveUser(); break; } } }
[ "sil.mixail2010@yandex.ru" ]
sil.mixail2010@yandex.ru
6a5a8d779b509d7bda95b7a1f7f97660e4a92172
d116c326d035a2d375ab9ef941473edddaa036e6
/Java_26_WordQuiz/src/com/biz/word/exec/WordEx_03.java
27a530392b67e30cdf508f655fe05b88e558931c
[]
no_license
kol2005/JAVAWORKSS
537716a8f30498fbb8ed167dc0b7f8a39d89c35d
fffae5fd6827af96b56404211eed99d63b3e2190
refs/heads/master
2020-09-04T00:24:46.817028
2019-11-04T23:35:31
2019-11-04T23:35:31
219,616,377
0
0
null
null
null
null
UHC
Java
false
false
1,115
java
package com.biz.word.exec; import java.util.List; import com.biz.word.domain.WordVO; import com.biz.word.service.WordListMakeService; import com.biz.word.service.WordQuizServiceV1; import com.biz.word.service.WordQuizServiceV2; public class WordEx_03 { public static void main(String[] args) { String wordFileName = "src/com/biz/word/필수어휘.txt"; WordListMakeService wk = new WordListMakeService(); WordQuizServiceV1 wq = new WordQuizServiceV2(); // wk 에서 wordVOList 를 만들고 가져오기 try { // 1. 파일을 읽어서 list 를 생성해 두어라 wk.makeWordList(wordFileName); // 2. 생성 list 를 가져오기 List<WordVO> wordList = wk.getWordVOList(); // 3. wq 에게 wordList 를 주입하기 wq.setWordVOList(wordList); // 4. wq 에게 주입된 wordList 중에 한개를 추출하여 // 영단어를 콘솔에 보여라 wq.viewEngWord(); // 5. 키보드에서 입력하여 단어 맞추기 wq.quizExec(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "kol2005@naver.com" ]
kol2005@naver.com
8b827bc9c78a9bebd812f328004408c928c669e4
80dded658a2def9f19efda0285e22405a8dd451c
/decompiled_src/Procyon/org/anddev/andengine/sensor/orientation/IOrientationListener.java
7be007ff51c0afcd2ed0c4280bb70252ddd3a1c8
[ "Apache-2.0" ]
permissive
rLadia-demo/AttacknidPatch
57482e19c6e99e8923e299a121b9b2c74242b8ee
561fc5fa5c1bc5afa4bad28855bf16b480c3ab6a
refs/heads/master
2021-01-25T07:08:43.450419
2014-06-15T14:35:03
2014-06-15T14:35:03
20,852,359
1
0
null
null
null
null
UTF-8
Java
false
false
143
java
package org.anddev.andengine.sensor.orientation; public interface IOrientationListener { void onOrientationChanged(OrientationData p0); }
[ "rLadia@ymail.com" ]
rLadia@ymail.com
16a4f995bb50b618be06dd3165059e38f024dc25
a8c2430dd9dda03e62434574e7548ea27ab07781
/src/radon.system/net/ion/radon/impl/let/db/ProcedureLet.java
93aef1abd5d9831f082cb2e5a645249b255edfb4
[]
no_license
bleujin/aradonExtend
053d3ae7281480137a4d0a994c98204c53632e02
5036da200c963b4c4ed871e86536165f46b65361
refs/heads/master
2021-01-23T09:33:40.805795
2013-02-18T08:48:26
2013-02-18T08:48:26
4,709,992
0
1
null
null
null
null
UTF-8
Java
false
false
1,636
java
package net.ion.radon.impl.let.db; import net.ion.framework.db.IDBController; import net.ion.framework.db.procedure.IQueryable; import net.ion.framework.rest.IRequest; import net.ion.framework.rest.IResponse; import net.ion.framework.util.ListUtil; import net.ion.radon.core.let.AbstractLet; import org.restlet.representation.Representation; public class ProcedureLet extends AbstractLet { @Override protected Representation myPut(Representation entity) throws Exception { return notImpl(entity); } @Override protected Representation myDelete() throws Exception { return notImpl(); } @Override protected Representation myPost(Representation entity) throws Exception { Procedures procs = ProcedureHelper.getProcedures(getContext(), getInnerRequest().getAttribute("id")); IDBController dc = getDBController(); IQueryable query = procs.createQuery(dc, getInnerRequest().getGeneralParameter()) ; query.setPage(getInnerRequest().getAradonPage().toPage()) ; return QueryHandler.toRepresentation(query, procs.getExecType(), newMapListFormatHandler(), getContext()) ; } private IDBController getDBController() { String db_attriId = getContext().getAttributeObject("connect.db.attribute.id", String.class); return ProcedureHelper.getDBController(getContext(), db_attriId); } @Override protected Representation myGet() throws Exception { Procedures procs = ProcedureHelper.getProcedures(getContext(), getInnerRequest().getAttribute("id")); return toRepresentation(IRequest.EMPTY_REQUEST, ListUtil.EMPTY, IResponse.create(procs.toMap())); } }
[ "bleujin@gmail.com" ]
bleujin@gmail.com
e95776cd19314ff14612a8c1f50f856d0c14e61f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_f33e88cdd3cf4b52066299e83cb470b27139ec4c/EntityLuggage/26_f33e88cdd3cf4b52066299e83cb470b27139ec4c_EntityLuggage_t.java
47e12ace1e7a0987e46be6ebd57789db1d913ee6
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,706
java
package openblocks.common.entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.ai.EntityAIFollowOwner; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import openblocks.OpenBlocks; import openblocks.common.GenericInventory; import openblocks.common.entity.ai.EntityAICollectItem; import openblocks.utils.BlockUtils; public class EntityLuggage extends EntityTameable { private GenericInventory inventory = new GenericInventory("luggage", false, 27); public EntityLuggage(World world) { super(world); this.texture = OpenBlocks.getTexturesPath("models/luggage.png"); this.setSize(0.6F, 0.8F); this.moveSpeed = 0.4F; setTamed(true); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAICollectItem(this)); this.tasks.addTask(3, new EntityAIFollowOwner(this, this.moveSpeed, 5.0F, 2.0F)); } public boolean isAIEnabled() { return true; } @Override public int getMaxHealth() { return 100; } public GenericInventory getInventory() { return inventory; } @Override public EntityAgeable createChild(EntityAgeable entityageable) { return null; } @Override public boolean interact(EntityPlayer player) { if (!worldObj.isRemote) { if (player.isSneaking()) { ItemStack luggageItem = new ItemStack(OpenBlocks.Items.luggage); NBTTagCompound tag = new NBTTagCompound(); inventory.writeToNBT(tag); luggageItem.setTagCompound(tag); BlockUtils.dropItemStackInWorld(worldObj, posX, posY, posZ, luggageItem); setDead(); } else { player.openGui(OpenBlocks.instance, OpenBlocks.Gui.Luggage.ordinal(), player.worldObj, entityId, 0, 0); } } return false; } protected void playStepSound(int par1, int par2, int par3, int par4) { this.playSound("openblocks.feet", 0.5F, 0.7F + (worldObj.rand.nextFloat() * 0.5f)); } @Override public void writeEntityToNBT(NBTTagCompound tag) { super.writeEntityToNBT(tag); inventory.writeToNBT(tag); } @Override public void readEntityFromNBT(NBTTagCompound tag) { super.readEntityFromNBT(tag); inventory.readFromNBT(tag); } @Override public boolean isEntityInvulnerable() { return true; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
be4b92c9cd064c7b8ca8b51364ec309d4b3b1eb8
ddcf1d31fb637d7144f51e89bc8b1bc0645d65bd
/src/main/java/cgd/gh/persistence/files/Fgh516.java
702553a82c59f0c95a63a0b9a8e9d2c326feebbe
[]
no_license
joao-goncalves-morphis/CodeGuru
6b90a2fed061941a7020d143d9167f7434880cd4
3643af0dc69ed5b8a09ba89311b9b3afd27ca0e1
refs/heads/master
2022-09-02T23:29:10.586712
2020-05-06T14:31:03
2020-05-06T14:31:03
259,694,187
0
0
null
2020-05-27T13:40:19
2020-04-28T16:36:36
Java
UTF-8
Java
false
false
2,965
java
package cgd.gh.persistence.files; import java.math.BigDecimal ; import morphis.framework.datatypes.annotations.Condition ; import morphis.framework.datatypes.annotations.Data ; import morphis.framework.datatypes.conditions.ICondition ; import morphis.framework.datatypes.conditions.IConditions ; import morphis.framework.datatypes.fields.* ; import morphis.framework.datatypes.structs.IDataStruct ; import morphis.framework.persistence.files.DataFileHandler ; import static morphis.framework.commons.MathHandling.* ; import static morphis.framework.commons.StringHandling.* ; /** * * * @version 2.0 * */ public abstract class Fgh516 extends DataFileHandler { /** * @return instancia da classe local RegFgh516 */ @Data public abstract RegFgh516 regFgh516() ; /** * Inner Classes */ /** * Global */ public interface RegFgh516 extends IDataStruct { @Data(size=3) IString fgh516CPaisIsoaCont() ; @Data(size=4) IInt fgh516CBancCont() ; @Data(size=4) IInt fgh516COeEgcCont() ; @Data(size=7) IInt fgh516NsRdclCont() ; @Data(size=1) IInt fgh516VChkdCont() ; @Data(size=3) IInt fgh516CTipoCont() ; @Data(size=3) IString fgh516CMoedIsoScta() ; @Data(size=4) IInt fgh516NsDeposito() ; @Data(size=26) IString fgh516TsMovimento() ; @Data(size=15) ILong fgh516NsMovimento() ; @Data(size=10) IString fgh516ZValMov() ; @Data(size=10) IString fgh516ZMovLocl() ; @Data(size=1) IString fgh516IDbcr() ; @Data(size=17, decimal=2) IDecimal fgh516MMovimento() ; @Data(size=1) IString fgh516SMovimento() ; @Data(size=1) IString fgh516IEstorno() ; @Data(size=3) IString fgh516CMoedIsoOriMov() ; @Data(size=17, decimal=2) IDecimal fgh516MSldoCbloApos() ; @Data(size=1) IString fgh516SSldoCbloApos() ; @Data(size=17, decimal=2) IDecimal fgh516MSldoDpnlApos() ; @Data(size=1) IString fgh516SSldoDpnlApos() ; @Data(size=17, decimal=2) IDecimal fgh516MMovMoeOrigMov() ; @Data(size=1) IString fgh516SMovMoeOrigMov() ; @Data(size=21) IString fgh516XRefMov() ; @Data(size=10) ILong fgh516NDocOpps() ; @Data(size=10, decimal=7) IDecimal fgh516TJuro() ; @Data(size=2) IString fgh516AAplOrig() ; @Data(size=26) IString fgh516TsActzUlt() ; @Data(size=8) IString fgh516CUsidActzUlt() ; } }
[ "joao.goncalves@morphis-tech.com" ]
joao.goncalves@morphis-tech.com
7930ddbcff3b905f8ecf3c27ef989a204b2c7a8a
dce6c0fa6cc9f26315c69c626acddf01d1a120e4
/Backend/J2EE/Spring/Spring_Hibernate for Beginners/spring-hibernate-source-code-v18/05-spring-aop-5/solution-code-spring-aop-around-rethrow-exception/src/com/luv2code/aopdemo/aspect/MyDemoLoggingAspect.java
24f33a313ba3c57be2967c5e4a5cdfc3ae5a77db
[ "MIT" ]
permissive
specter01wj/LAB-Udemy
5df55e82c11eb2ef881045082d11791bfd307ae2
6bbb779c2d3efc84671674c124ae751bfb126a7e
refs/heads/master
2023-08-19T03:21:15.081682
2023-08-18T03:30:02
2023-08-18T03:30:02
102,077,376
1
0
MIT
2023-03-06T07:39:10
2017-09-01T05:36:39
HTML
UTF-8
Java
false
false
4,476
java
package com.luv2code.aopdemo.aspect; import java.util.List; import java.util.logging.Logger; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.After; import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.reflect.MethodSignature; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import com.luv2code.aopdemo.Account; @Aspect @Component @Order(2) public class MyDemoLoggingAspect { private Logger myLogger = Logger.getLogger(getClass().getName()); @Around("execution(* com.luv2code.aopdemo.service.*.getFortune(..))") public Object aroundGetFortune( ProceedingJoinPoint theProceedingJoinPoint) throws Throwable { // print out method we are advising on String method = theProceedingJoinPoint.getSignature().toShortString(); myLogger.info("\n=====>>> Executing @Around on method: " + method); // get begin timestamp long begin = System.currentTimeMillis(); // now, let's execute the method Object result = null; try { result = theProceedingJoinPoint.proceed(); } catch (Exception e) { // log the exception myLogger.warning(e.getMessage()); // rethrow exception throw e; } // get end timestamp long end = System.currentTimeMillis(); // compute duration and display it long duration = end - begin; myLogger.info("\n=====> Duration: " + duration / 1000.0 + " seconds"); return result; } @After("execution(* com.luv2code.aopdemo.dao.AccountDAO.findAccounts(..))") public void afterFinallyFindAccountsAdvice(JoinPoint theJoinPoint) { // print out which method we are advising on String method = theJoinPoint.getSignature().toShortString(); myLogger.info("\n=====>>> Executing @After (finally) on method: " + method); } @AfterThrowing( pointcut="execution(* com.luv2code.aopdemo.dao.AccountDAO.findAccounts(..))", throwing="theExc") public void afterThrowingFindAccountsAdvice( JoinPoint theJoinPoint, Throwable theExc) { // print out which method we are advising on String method = theJoinPoint.getSignature().toShortString(); myLogger.info("\n=====>>> Executing @AfterThrowing on method: " + method); // log the exception myLogger.info("\n=====>>> The exception is: " + theExc); } @AfterReturning( pointcut="execution(* com.luv2code.aopdemo.dao.AccountDAO.findAccounts(..))", returning="result") public void afterReturningFindAccountsAdvice( JoinPoint theJoinPoint, List<Account> result) { // print out which method we are advising on String method = theJoinPoint.getSignature().toShortString(); myLogger.info("\n=====>>> Executing @AfterReturning on method: " + method); // print out the results of the method call myLogger.info("\n=====>>> result is: " + result); // let's post-process the data ... let's modify it :-) // convert the account names to uppercase convertAccountNamesToUpperCase(result); myLogger.info("\n=====>>> result is: " + result); } private void convertAccountNamesToUpperCase(List<Account> result) { // loop through accounts for (Account tempAccount : result) { // get uppercase version of name String theUpperName = tempAccount.getName().toUpperCase(); // update the name on the account tempAccount.setName(theUpperName); } } @Before("com.luv2code.aopdemo.aspect.LuvAopExpressions.forDaoPackageNoGetterSetter()") public void beforeAddAccountAdvice(JoinPoint theJoinPoint) { myLogger.info("\n=====>>> Executing @Before advice on method"); // display the method signature MethodSignature methodSig = (MethodSignature) theJoinPoint.getSignature(); myLogger.info("Method: " + methodSig); // display method arguments // get args Object[] args = theJoinPoint.getArgs(); // loop thru args for (Object tempArg : args) { myLogger.info(tempArg.toString()); if (tempArg instanceof Account) { // downcast and print Account specific stuff Account theAccount = (Account) tempArg; myLogger.info("account name: " + theAccount.getName()); myLogger.info("account level: " + theAccount.getLevel()); } } } }
[ "specter01wj@gmail.com" ]
specter01wj@gmail.com
dfa88dcda514d19b70e39ebea674517b9947ab79
64c495510a349aac8ca67cab242ca5d49c6cca9e
/app/src/main/java/com/vipcenter/adapter/AccountAdapter.java
44154d8a7e54ed14bef38ad972f555890c63502c
[]
no_license
payencai/YunCheBao
6b303e1ccc74f85a168c948ddd796785758e010f
6870976cdda81a4cdf6835733c9d04b4c6c5478b
refs/heads/master
2020-04-15T18:11:04.702963
2019-06-20T10:50:48
2019-06-20T10:50:48
164,904,559
1
0
null
null
null
null
UTF-8
Java
false
false
2,805
java
package com.vipcenter.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.Button; import android.widget.RelativeLayout; import android.widget.TextView; import com.bumptech.glide.Glide; import com.example.yunchebao.R; import com.payencai.library.view.CircleImageView; import com.tool.AccountUtil; import java.util.List; /** * 作者:凌涛 on 2019/5/7 14:08 * 邮箱:771548229@qq..com */ public class AccountAdapter extends BaseAdapter { Context mContext; List<AccountUtil.Account> mAccounts; private MyPublishListAdapter.onDeleteClickListener mOnDeleteClickListener; public void setOnDeleteClickListener(MyPublishListAdapter.onDeleteClickListener mOnDeleteClickListener){ this.mOnDeleteClickListener=mOnDeleteClickListener; } public interface onDeleteClickListener{ void onClick(int pos); void onItemClick(int pos); } public AccountAdapter(Context context, List<AccountUtil.Account> accounts) { mContext = context; mAccounts = accounts; } @Override public int getCount() { return mAccounts.size(); } @Override public Object getItem(int position) { return mAccounts.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { convertView= LayoutInflater.from(mContext).inflate(R.layout.item_account,null); TextView tv_current=convertView.findViewById(R.id.tv_current); TextView tv_phone=convertView.findViewById(R.id.tv_phone); RelativeLayout ll_content= (RelativeLayout) convertView.findViewById(R.id.ll_content); Button btnDelete= (Button) convertView.findViewById(R.id.btnDelete); CircleImageView iv_head=convertView.findViewById(R.id.iv_head); AccountUtil.Account account=mAccounts.get(position); if(account.isCurrent()){ tv_current.setVisibility(View.VISIBLE); }else{ tv_current.setVisibility(View.GONE); } btnDelete.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mOnDeleteClickListener.onClick(position); } }); ll_content.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mOnDeleteClickListener.onItemClick(position); } }); tv_phone.setText(account.getAccount()); Glide.with(mContext).load(account.getPhoto()).into(iv_head); return convertView; } }
[ "payencai@sina.com" ]
payencai@sina.com
f40ab993c1bf1940fc597b379015222b87449a65
e05071d575dd3ede69a8ff6a282d169f0574410a
/src/test/java/com/github/GBSEcom/model/EncryptedGooglePayWalletPaymentMethodTest.java
05c06b10f57ecbf08f5169433950b1b6edeac541
[]
no_license
GBSEcom/java
6c4f2c08f3d0ce5f6273060f34630b5c1d3a51ef
f934d68a050e001bdb22bdcce755727c9232f257
refs/heads/master
2022-05-26T10:20:17.355268
2021-11-19T21:53:38
2021-11-19T21:53:38
136,058,114
2
4
null
2022-05-20T20:53:03
2018-06-04T17:10:09
Java
UTF-8
Java
false
false
1,890
java
/* * Payment Gateway API Specification. * The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway. * * The version of the OpenAPI document: 21.5.0.20211029.001 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.github.GBSEcom.model; import com.github.GBSEcom.model.EncryptedGooglePay; import com.github.GBSEcom.model.EncryptedGooglePayWalletPaymentMethodAllOf; import com.github.GBSEcom.model.WalletPaymentMethod; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for EncryptedGooglePayWalletPaymentMethod */ public class EncryptedGooglePayWalletPaymentMethodTest { private final EncryptedGooglePayWalletPaymentMethod model = new EncryptedGooglePayWalletPaymentMethod(); /** * Model tests for EncryptedGooglePayWalletPaymentMethod */ @Test public void testEncryptedGooglePayWalletPaymentMethod() { // TODO: test EncryptedGooglePayWalletPaymentMethod } /** * Test the property 'walletType' */ @Test public void walletTypeTest() { // TODO: test walletType } /** * Test the property 'encryptedGooglePay' */ @Test public void encryptedGooglePayTest() { // TODO: test encryptedGooglePay } }
[ "emargules@bluepay.com" ]
emargules@bluepay.com
5a9831a56dbea295c9cce943593813ad89f18f16
a0dc6d239311f16455f0ed738bb3b7d63bf90ccb
/Android-workspace/Step17_HybridApp/app/build/generated/source/buildConfig/debug/com/example/kosta_inst/step17_hybridapp/BuildConfig.java
df882d80c8228419ce601b39d786e37eb8b8f082
[]
no_license
8story8/java
e433ed74d251859baa30038b2ad8f57f424f9db5
2f59794f50cee6241fed182cedcf2a3d49c8d125
refs/heads/master
2021-04-03T09:22:28.516512
2018-07-09T08:21:47
2018-07-09T08:21:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
/** * Automatically generated file. DO NOT MODIFY */ package com.example.kosta_inst.step17_hybridapp; public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String APPLICATION_ID = "com.example.kosta_inst.step17_hybridapp"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = ""; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; }
[ "8story8@naver.com" ]
8story8@naver.com
0ac5042114019a72239099c3bf29d2d2bd417ddd
d5c45d051b057a13122bba64f81776d8f5fa92c5
/src/main/java/jhipster/online/test/config/Constants.java
9483f10bb19bcaadef081cb8ade14ef917f07724
[]
no_license
ToStefan/jhipster-online-test-app
5fb470daa5d6e60456b2d88dda90c5a66e16aa40
9b1db657df195b619150f6538c606e3e7a384686
refs/heads/master
2022-12-21T05:18:12.837911
2019-11-15T02:58:00
2019-11-15T02:58:00
221,832,048
0
0
null
2022-12-16T04:41:49
2019-11-15T02:57:52
Java
UTF-8
Java
false
false
197
java
package jhipster.online.test.config; /** * Application constants. */ public final class Constants { public static final String SYSTEM_ACCOUNT = "system"; private Constants() { } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
e29d2e8304b29304df4180b71b8ba41a6f7e7664
84837d55a3f8327f54880392bf239313f41442fe
/easeui/build/generated/source/r/release/android/support/coreutils/R.java
19eeead7bc036c7684c700814f1b32d7dacafb7e
[]
no_license
WhiteorBlack/mojiang
910d381c7bed984a2c68d37ba86ccd73ff5a1411
dca1f06818f79fb1953e9f7ca8bdf96363b99618
refs/heads/master
2020-04-07T04:54:58.654297
2018-12-29T10:28:37
2018-12-29T10:28:37
158,077,012
0
0
null
null
null
null
UTF-8
Java
false
false
7,316
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package android.support.coreutils; public final class R { public static final class attr { public static int font = 0x7f0400a2; public static int fontProviderAuthority = 0x7f0400a4; public static int fontProviderCerts = 0x7f0400a5; public static int fontProviderFetchStrategy = 0x7f0400a6; public static int fontProviderFetchTimeout = 0x7f0400a7; public static int fontProviderPackage = 0x7f0400a8; public static int fontProviderQuery = 0x7f0400a9; public static int fontStyle = 0x7f0400aa; public static int fontWeight = 0x7f0400ab; } public static final class bool { public static int abc_action_bar_embed_tabs = 0x7f050001; } public static final class color { public static int notification_action_color_filter = 0x7f060092; public static int notification_icon_bg_color = 0x7f060093; public static int ripple_material_light = 0x7f0600a2; public static int secondary_text_default_material_light = 0x7f0600a4; } public static final class dimen { public static int compat_button_inset_horizontal_material = 0x7f080052; public static int compat_button_inset_vertical_material = 0x7f080053; public static int compat_button_padding_horizontal_material = 0x7f080054; public static int compat_button_padding_vertical_material = 0x7f080055; public static int compat_control_corner_material = 0x7f080056; public static int notification_action_icon_size = 0x7f08009c; public static int notification_action_text_size = 0x7f08009d; public static int notification_big_circle_margin = 0x7f08009e; public static int notification_content_margin_start = 0x7f08009f; public static int notification_large_icon_height = 0x7f0800a0; public static int notification_large_icon_width = 0x7f0800a1; public static int notification_main_column_padding_top = 0x7f0800a2; public static int notification_media_narrow_margin = 0x7f0800a3; public static int notification_right_icon_size = 0x7f0800a4; public static int notification_right_side_padding_top = 0x7f0800a5; public static int notification_small_icon_background_padding = 0x7f0800a6; public static int notification_small_icon_size_as_large = 0x7f0800a7; public static int notification_subtext_size = 0x7f0800a8; public static int notification_top_pad = 0x7f0800a9; public static int notification_top_pad_large_text = 0x7f0800aa; } public static final class drawable { public static int notification_action_background = 0x7f090109; public static int notification_bg = 0x7f09010a; public static int notification_bg_low = 0x7f09010b; public static int notification_bg_low_normal = 0x7f09010c; public static int notification_bg_low_pressed = 0x7f09010d; public static int notification_bg_normal = 0x7f09010e; public static int notification_bg_normal_pressed = 0x7f09010f; public static int notification_icon_background = 0x7f090110; public static int notification_template_icon_bg = 0x7f090111; public static int notification_template_icon_low_bg = 0x7f090112; public static int notification_tile_bg = 0x7f090113; public static int notify_panel_notification_icon_bg = 0x7f090114; } public static final class id { public static int action_container = 0x7f0c0009; public static int action_divider = 0x7f0c000b; public static int action_image = 0x7f0c000c; public static int action_text = 0x7f0c0012; public static int actions = 0x7f0c0013; public static int async = 0x7f0c0018; public static int blocking = 0x7f0c001d; public static int chronometer = 0x7f0c0034; public static int forever = 0x7f0c0056; public static int icon = 0x7f0c005c; public static int icon_group = 0x7f0c005d; public static int info = 0x7f0c0064; public static int italic = 0x7f0c0066; public static int line1 = 0x7f0c0076; public static int line3 = 0x7f0c0077; public static int normal = 0x7f0c0095; public static int notification_background = 0x7f0c0096; public static int notification_main_column = 0x7f0c0097; public static int notification_main_column_container = 0x7f0c0098; public static int right_icon = 0x7f0c00ad; public static int right_side = 0x7f0c00b0; public static int tag_transition_group = 0x7f0c00e7; public static int text = 0x7f0c00e8; public static int text2 = 0x7f0c00e9; public static int time = 0x7f0c00f0; public static int title = 0x7f0c00f2; } public static final class integer { public static int status_bar_notification_info_maxnum = 0x7f0d000a; } public static final class layout { public static int notification_action = 0x7f0f0063; public static int notification_action_tombstone = 0x7f0f0064; public static int notification_template_custom_big = 0x7f0f006b; public static int notification_template_icon_group = 0x7f0f006c; public static int notification_template_part_chronometer = 0x7f0f0070; public static int notification_template_part_time = 0x7f0f0071; } public static final class string { public static int status_bar_notification_info_overflow = 0x7f150141; } public static final class style { public static int TextAppearance_Compat_Notification = 0x7f160104; public static int TextAppearance_Compat_Notification_Info = 0x7f160105; public static int TextAppearance_Compat_Notification_Line2 = 0x7f160107; public static int TextAppearance_Compat_Notification_Time = 0x7f16010a; public static int TextAppearance_Compat_Notification_Title = 0x7f16010c; public static int Widget_Compat_NotificationActionContainer = 0x7f160182; public static int Widget_Compat_NotificationActionText = 0x7f160183; } public static final class styleable { public static int[] FontFamily = { 0x7f0400a4, 0x7f0400a5, 0x7f0400a6, 0x7f0400a7, 0x7f0400a8, 0x7f0400a9 }; public static int FontFamily_fontProviderAuthority = 0; public static int FontFamily_fontProviderCerts = 1; public static int FontFamily_fontProviderFetchStrategy = 2; public static int FontFamily_fontProviderFetchTimeout = 3; public static int FontFamily_fontProviderPackage = 4; public static int FontFamily_fontProviderQuery = 5; public static int[] FontFamilyFont = { 0x01010532, 0x0101053f, 0x01010533, 0x7f0400a2, 0x7f0400aa, 0x7f0400ab }; public static int FontFamilyFont_android_font = 0; public static int FontFamilyFont_android_fontStyle = 1; public static int FontFamilyFont_android_fontWeight = 2; public static int FontFamilyFont_font = 3; public static int FontFamilyFont_fontStyle = 4; public static int FontFamilyFont_fontWeight = 5; } }
[ "415082375@qq.com" ]
415082375@qq.com
33e6c0055236646e69a65addc22d37721224f74a
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE481_Assigning_Instead_of_Comparing/CWE481_Assigning_Instead_of_Comparing__basic_16.java
f639809c6d357eb5b64e0684e81ad68b6533b50e
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
2,196
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE481_Assigning_Instead_of_Comparing__basic_16.java Label Definition File: CWE481_Assigning_Instead_of_Comparing__basic.label.xml Template File: point-flaw-16.tmpl.java */ /* * @description * CWE: 481 Assigning Instead of Comparing * Sinks: * GoodSink: Comparing * BadSink : Assigning instead of comparing * Flow Variant: 16 Control flow: while(true) * * */ package testcases.CWE481_Assigning_Instead_of_Comparing; import testcasesupport.*; import java.security.SecureRandom; public class CWE481_Assigning_Instead_of_Comparing__basic_16 extends AbstractTestCase { public void bad() throws Throwable { while(true) { int zeroOrOne = (new SecureRandom()).nextInt(2); boolean isZero = (zeroOrOne == 0); if(isZero = true) /* FLAW: should be == and INCIDENTIAL CWE 571 Expression Is Always True */ { IO.writeLine("zeroOrOne is 0"); } IO.writeLine("isZero is: " + isZero); break; } } /* good1() change the conditions on the while statements */ private void good1() throws Throwable { while(true) { int zeroOrOne = (new SecureRandom()).nextInt(2); /* i will be 0 or 1 */ boolean isZero = (zeroOrOne == 0); if(isZero == true) /* FIX: using == instead of = */ { IO.writeLine("zeroOrOne is 0"); } IO.writeLine("isZero is: " + isZero); break; } } public void good() throws Throwable { good1(); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
38c55a1ff7c25805f75659a4338411307a633ff0
4d5082243af397a07e6b45e5d756725054a2722b
/src/main/java/kr/pe/kwonnam/research/retrofit2/OkHttpClientBuilderCustomizer.java
910c22793d94c5575d2adf42579cdddf272f2564
[]
no_license
kwon37xi/research-retrofit-2
2becd74700f0bcd7beabf5147015bc67ec89e9a5
333f6e4082f1ecec2d5cfb3c03a5ffa41be4e3b9
refs/heads/main
2022-11-27T03:42:41.803158
2020-07-31T04:41:12
2020-07-31T04:41:12
281,326,933
0
0
null
null
null
null
UTF-8
Java
false
false
186
java
package kr.pe.kwonnam.research.retrofit2; import okhttp3.OkHttpClient; public interface OkHttpClientBuilderCustomizer { void customize(OkHttpClient.Builder okHttpClientBuilder); }
[ "kwon37xi@gmail.com" ]
kwon37xi@gmail.com
74c3fe724252322a72fa372fdbf4e2d6031fde02
5f8b20760ab90b2e6a42b650cee3c25c516546c2
/src/main/java/com/reason/bs/annotations/LineNumbering.java
e01e41bfc7ca438d8f5c9518fd3aa35e11734e9e
[ "MIT" ]
permissive
lexaurin/reasonml-idea-plugin
849ace04a40ddd11b7690847ad30880df9a9bb1b
f53ce3e5838bf79868b70c49910663823703e825
refs/heads/master
2021-04-10T10:33:45.266660
2018-03-17T22:54:43
2018-03-17T22:54:43
125,710,446
0
0
null
2018-03-18T09:39:23
2018-03-18T09:39:23
null
UTF-8
Java
false
false
674
java
package com.reason.bs.annotations; import java.util.ArrayList; import java.util.List; // TODO: delete that class class LineNumbering { private List<Integer> lineIndex = new ArrayList<>(); LineNumbering(CharSequence buffer) { this.lineIndex.add(0); int i = 0; while (i < buffer.length()) { if (buffer.charAt(i) == '\n') { lineIndex.add(i + 1); } i++; } lineIndex.add(Integer.MAX_VALUE); } Integer positionToOffset(int line, int col) { int size = this.lineIndex.size(); return this.lineIndex.get((size <= line) ? size - 1 : line) + col; } }
[ "giraud.contact@yahoo.fr" ]
giraud.contact@yahoo.fr
b85df9e455f442e6cb53cdb40bf91e865cd999c7
f249c74908a8273fdc58853597bd07c2f9a60316
/common/src/main/java/cn/edu/cug/cs/gtl/io/FileDataSplitter.java
418f06c750024eb25b0c20179ab1baee258773e8
[ "MIT" ]
permissive
zhaohhit/gtl-java
4819d7554f86e3c008e25a884a3a7fb44bae97d0
63581c2bfca3ea989a4ba1497dca5e3c36190d46
refs/heads/master
2020-08-10T17:58:53.937394
2019-10-30T03:06:06
2019-10-30T03:06:06
214,390,871
1
0
MIT
2019-10-30T03:06:08
2019-10-11T09:00:26
null
UTF-8
Java
false
false
1,126
java
package cn.edu.cug.cs.gtl.io; import java.io.Serializable; public enum FileDataSplitter implements Serializable { WKT("\t"), WKB("\t"), CSV(","), SSV(" "), TSV("\t"), GEOJSON(""), COMMA(","), TAB("\t"), QUESTIONMARK("?"), SINGLEQUOTE("'"), QUOTE("\""), UNDERSCORE("_"), DASH("-"), PERCENT("%"), TILDE("~"), PIPE("|"), SEMICOLON(";"), SPACE(" "); private String splitter; public static FileDataSplitter getFileDataSplitter(String str) { FileDataSplitter[] var1 = values(); int var2 = var1.length; for (int var3 = 0; var3 < var2; ++var3) { FileDataSplitter me = var1[var3]; if (me.getDelimiter().equalsIgnoreCase(str) || me.name().equalsIgnoreCase(str)) { return me; } } throw new IllegalArgumentException("[" + FileDataSplitter.class + "] Unsupported FileDataSplitter:" + str); } private FileDataSplitter(String splitter) { this.splitter = splitter; } public String getDelimiter() { return this.splitter; } }
[ "zwhe@cug.edu.cn" ]
zwhe@cug.edu.cn
a24c5926a59b3f330adbb3a484004bb284b3c74d
92e79f38a66d0875d2b611a6b518ecfcc167dc94
/app/src/main/java/eu/uk/ncl/pet5o/esper/epl/agg/aggregator/AggregatorMinMaxFilter.java
1b009f10a3ff35d569795f104e9dd7c1a40dfaec
[]
no_license
PetoMichalak/EsperOn
f8f23d24db21269070e302c0a6c329312491388b
688012d2a92217f4b24bf072dac04ed8902a313d
refs/heads/master
2020-03-24T01:06:17.446804
2018-07-25T15:53:50
2018-07-25T15:53:50
142,322,329
0
0
null
null
null
null
UTF-8
Java
false
false
1,595
java
/* *************************************************************************************** * Copyright (C) 2006 EsperTech, Inc. All rights reserved. * * http://www.espertech.com/esper * * http://www.espertech.com * * ---------------------------------------------------------------------------------- * * The software in this package is published under the terms of the GPL license * * a copy of which has been included with this distribution in the license.txt file. * *************************************************************************************** */ package eu.uk.ncl.pet5o.esper.epl.agg.aggregator; import eu.uk.ncl.pet5o.esper.epl.agg.service.common.AggregatorUtil; import eu.uk.ncl.pet5o.esper.epl.expression.core.MinMaxTypeEnum; /** * Min/max aggregator for all values. */ public class AggregatorMinMaxFilter extends AggregatorMinMax { public AggregatorMinMaxFilter(MinMaxTypeEnum minMaxTypeEnum) { super(minMaxTypeEnum); } @Override public void enter(Object parameters) { Object[] paramArray = (Object[]) parameters; if (!AggregatorUtil.checkFilter(paramArray)) { return; } super.enter(paramArray[0]); } @Override public void leave(Object parameters) { Object[] paramArray = (Object[]) parameters; if (!AggregatorUtil.checkFilter(paramArray)) { return; } super.leave(paramArray[0]); } }
[ "P.Michalak1@newcastle.ac.uk" ]
P.Michalak1@newcastle.ac.uk
2d93b7ec5de8f13a2a7b69371340ad052c2fc20c
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/WhereYouGo-0.9.3-beta/DecompiledCode/JADX/src/main/java/org/mapsforge/core/model/CoordinatesUtil.java
d21c275c22467d7283617cb67f6b43f02880a207
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,433
java
package org.mapsforge.core.model; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; public final class CoordinatesUtil { private static final double CONVERSION_FACTOR = 1000000.0d; private static final String DELIMITER = ","; public static final double LATITUDE_MAX = 90.0d; public static final double LATITUDE_MIN = -90.0d; public static final double LONGITUDE_MAX = 180.0d; public static final double LONGITUDE_MIN = -180.0d; public static int degreesToMicrodegrees(double coordinate) { return (int) (CONVERSION_FACTOR * coordinate); } public static double microdegreesToDegrees(int coordinate) { return ((double) coordinate) / CONVERSION_FACTOR; } public static double[] parseCoordinateString(String coordinatesString, int numberOfCoordinates) { StringTokenizer stringTokenizer = new StringTokenizer(coordinatesString, DELIMITER, true); boolean isDelimiter = true; List<String> tokens = new ArrayList(numberOfCoordinates); while (stringTokenizer.hasMoreTokens()) { String token = stringTokenizer.nextToken(); isDelimiter = !isDelimiter; if (!isDelimiter) { tokens.add(token); } } if (isDelimiter) { throw new IllegalArgumentException("invalid coordinate delimiter: " + coordinatesString); } else if (tokens.size() != numberOfCoordinates) { throw new IllegalArgumentException("invalid number of coordinate values: " + coordinatesString); } else { double[] coordinates = new double[numberOfCoordinates]; for (int i = 0; i < numberOfCoordinates; i++) { coordinates[i] = Double.parseDouble((String) tokens.get(i)); } return coordinates; } } public static void validateLatitude(double latitude) { if (Double.isNaN(latitude) || latitude < -90.0d || latitude > 90.0d) { throw new IllegalArgumentException("invalid latitude: " + latitude); } } public static void validateLongitude(double longitude) { if (Double.isNaN(longitude) || longitude < -180.0d || longitude > 180.0d) { throw new IllegalArgumentException("invalid longitude: " + longitude); } } private CoordinatesUtil() { throw new IllegalStateException(); } }
[ "crash@home.home.hr" ]
crash@home.home.hr
143deda3eb7af93838232c7b4b6939d4fe4dc9e4
5d8644a7b93d9ac8cc24dd1d685aca126262c371
/src/main/java/com/eps/springapp/web/InventoryController.java
1dea103e1f12e082b63a795952ea97546e5a88de
[]
no_license
enrpan/springappmaven
f228743979992570a68b72e3538337567efd2e0d
f29fca6488b34c1f73680a73dac6581339777f6c
refs/heads/master
2021-01-17T16:14:17.969975
2017-04-09T17:26:03
2017-04-09T17:26:03
84,124,137
0
0
null
null
null
null
UTF-8
Java
false
false
1,470
java
package com.eps.springapp.web; import java.io.IOException; import java.util.Date; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import com.eps.springapp.service.ProductManager; @Controller public class InventoryController { protected final Log logger = LogFactory.getLog(getClass()); @Autowired private ProductManager productManager; @RequestMapping(value="/hello.htm") public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String now = (new Date()).toString(); logger.info("Returning hello view with " + now); Map<String, Object> myModel = new HashMap<String, Object>(); myModel.put("now", now); myModel.put("products", this.productManager.getProducts()); return new ModelAndView("hello", "model", myModel); } public void setProductManager(ProductManager productManager) { this.productManager = productManager; } }
[ "epsbgt@gmail.com" ]
epsbgt@gmail.com
366f15ff942fcbecd7ab18a0228eb07245f00f31
17537c091572a94c58975214094fdfeedb57fde1
/core/common/data/commonData/src/main/java/com/home/commonData/message/game/serverRequest/game/social/GetRoleSocialDataToPlayerMO.java
0e9e9dfddad71921898b1ce8d6c270511eaa3f63
[ "Apache-2.0" ]
permissive
mengtest/home3
dc2e5f910bbca6e536ded94d3f749671f0ca76d5
a15a63694918483b2e4853edab197b5cdddca560
refs/heads/master
2023-01-29T13:49:23.822515
2020-12-11T10:17:39
2020-12-11T10:17:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
205
java
package com.home.commonData.message.game.serverRequest.game.social; public class GetRoleSocialDataToPlayerMO { long targetPlayerID; /** 查询玩家id */ long fromPlayerID; /** 类型 */ int type; }
[ "359944951@qq.com" ]
359944951@qq.com
897d4437817748c6ee4b7d30b90980132a7c7109
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XWIKI-13377-3-28-Single_Objective_GGA-WeightedSum-BasicBlockCoverage/com/xpn/xwiki/objects/classes/BaseClass_ESTest.java
70c952aeb0654659672e0a264a96840adc2bc7b1
[ "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
2,492
java
/* * This file was automatically generated by EvoSuite * Sun May 17 18:39:43 UTC 2020 */ package com.xpn.xwiki.objects.classes; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import com.xpn.xwiki.objects.BaseCollection; import com.xpn.xwiki.objects.classes.BaseClass; import com.xpn.xwiki.objects.meta.LevelsMetaClass; import java.util.HashMap; import java.util.Map; import java.util.function.BiConsumer; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.evosuite.runtime.javaee.injection.Injector; import org.junit.runner.RunWith; import org.xwiki.model.internal.reference.ExplicitReferenceDocumentReferenceResolver; import org.xwiki.model.reference.EntityReferenceResolver; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class BaseClass_ESTest extends BaseClass_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { BaseClass baseClass0 = new BaseClass(); baseClass0.addLevelsField("</>", "</>", 3103); baseClass0.getNumber(); String string0 = ""; baseClass0.addTextAreaField("</>", "", 62, 3103); HashMap<String, ExplicitReferenceDocumentReferenceResolver> hashMap0 = new HashMap<String, ExplicitReferenceDocumentReferenceResolver>(); BiConsumer<Object, Object> biConsumer0 = (BiConsumer<Object, Object>) mock(BiConsumer.class, new ViolatedAssumptionAnswer()); ExplicitReferenceDocumentReferenceResolver explicitReferenceDocumentReferenceResolver0 = new ExplicitReferenceDocumentReferenceResolver(); EntityReferenceResolver<LevelsMetaClass> entityReferenceResolver0 = (EntityReferenceResolver<LevelsMetaClass>) mock(EntityReferenceResolver.class, new ViolatedAssumptionAnswer()); Injector.inject(explicitReferenceDocumentReferenceResolver0, (Class<?>) ExplicitReferenceDocumentReferenceResolver.class, "entityReferenceResolver", (Object) entityReferenceResolver0); Injector.validateBean(explicitReferenceDocumentReferenceResolver0, (Class<?>) ExplicitReferenceDocumentReferenceResolver.class); hashMap0.put("</>", explicitReferenceDocumentReferenceResolver0); hashMap0.forEach(biConsumer0); // Undeclared exception! baseClass0.fromMap((Map<String, ?>) hashMap0, (BaseCollection) baseClass0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
de81668f0e5c76d69c3a36029db84abdebc8b718
cc5a7d0bfe6519e2d462de1ac9ef793fb610f2a7
/api1/src/main/java/com/heb/util/file/CsvParser.java
3471cbcd3555db60ac2eae1494af4162d80f7837
[]
no_license
manosbatsis/SAVEFILECOMPANY
d21535a46aebedf2a425fa231c678658d4b017a4
c33d41cf13dd2ff5bb3a882f6aecc89b24a206be
refs/heads/master
2023-03-21T04:46:23.286060
2019-10-10T10:38:02
2019-10-10T10:38:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,828
java
package com.heb.util.file; import java.util.ArrayList; import java.util.List; /** * Provides utility functions to parse CSV files. * * @author d116773 * @since 2.15.0 */ public class CsvParser { private static final char CSV_DELIMITER = ','; private static final char GROUP_CHARACTER = '"'; /** * Parses a String in a CSV format into an list of Strings. This is base on a function that can * be found here: https://www.mkyong.com/java/how-to-read-and-parse-csv-file-in-java/ * * @param csvLine A String in a CSV format. * @return A list of Strings parsed from the line. Empty or null strings will return an empty list. */ public List<String> parseLine(String csvLine) { List<String> result = new ArrayList<>(); if (csvLine == null || csvLine.isEmpty()) { return result; } StringBuffer curVal = new StringBuffer(); boolean inQuotes = false; boolean startCollectChar = false; char[] chars = csvLine.toCharArray(); for (char ch : chars) { if (inQuotes) { startCollectChar = true; if (ch == CsvParser.GROUP_CHARACTER) { inQuotes = false; } else { curVal.append(ch); } } else { switch (ch) { case CsvParser.GROUP_CHARACTER: inQuotes = true; //double quotes in column will hit this! if (startCollectChar) { curVal.append(CsvParser.GROUP_CHARACTER); } break; case CsvParser.CSV_DELIMITER: result.add(curVal.toString()); curVal = new StringBuffer(); startCollectChar = false; break; case '\r': continue; case '\n': break; default: curVal.append(ch); } } } if (inQuotes) { throw new IllegalArgumentException(String.format("'%s' has an unterminated quote", csvLine)); } result.add(curVal.toString()); return result; } }
[ "tran.than@heb.com" ]
tran.than@heb.com
ca17f9b2cd92d1eedfa5e9bfd581800aefa44dad
ab43ce76241aed84aaafdccb41fbaf2a9d599d0f
/dp/src/main/java/com/wxt/designpattern/iterator/test01/withdp/ArrayIteratorImpl.java
297f2353ff60e90a11ff7798ed6c0f9845f662db
[]
no_license
xiaotaowei1992/DesignPatternsForJava
983b949e0651331860836d3ee915f78d0f6b6f13
75c141655827cde2d24707243c09efe3a3697d2a
refs/heads/master
2022-06-26T22:10:33.218625
2019-07-19T03:10:43
2019-07-19T03:10:43
139,999,344
0
0
null
2022-06-21T01:28:13
2018-07-06T15:09:08
Java
UTF-8
Java
false
false
897
java
package com.wxt.designpattern.iterator.test01.withdp; /** * @Author: weixiaotao * @ClassName ArrayIteratorImpl * @Date: 2018/12/4 09:44 * @Description: 用来实现访问数组的迭代接口 */ public class ArrayIteratorImpl implements Iterator{ /** * 用来存放被迭代的聚合对象 */ private SalaryManager aggregate = null; /** * 用来记录当前迭代到的位置索引 * -1表示刚开始的时候,迭代器指向聚合对象第一个对象之前 */ private int index = -1; public ArrayIteratorImpl(SalaryManager aggregate){ this.aggregate = aggregate; } public void first(){ index = 0; } public void next(){ if(index < this.aggregate.size()){ index = index + 1; } } public boolean isDone(){ if(index == this.aggregate.size()){ return true; } return false; } public Object currentItem(){ return this.aggregate.get(index); } }
[ "weixiaotao@shein.com" ]
weixiaotao@shein.com
5a95d9530b8f75fe6b0795ced10ba29a0049cf75
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/zhihu/android/video/player2/base/C26557a.java
f696dd292f9033c43d2be70410a0564083f4d025
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,094
java
package com.zhihu.android.video.player2.base; import android.content.Context; import android.view.TextureView; import com.zhihu.android.video.player2.utils.C26722a; /* renamed from: com.zhihu.android.video.player2.base.a */ /* compiled from: AspectTextureView */ public class C26557a extends TextureView { /* renamed from: a */ private final C26722a.C26723a f92609a = new C26722a.C26723a(); /* renamed from: b */ private float f92610b = 0.0f; public C26557a(Context context) { super(context); } public void setAspectRatio(float f) { if (f != this.f92610b) { this.f92610b = f; requestLayout(); } } /* access modifiers changed from: protected */ public void onMeasure(int i, int i2) { C26722a.C26723a aVar = this.f92609a; aVar.f93235a = i; aVar.f93236b = i2; C26722a.m129442a(aVar, this.f92610b, getLayoutParams(), getPaddingLeft() + getPaddingRight(), getPaddingTop() + getPaddingBottom()); super.onMeasure(this.f92609a.f93235a, this.f92609a.f93236b); } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
9b226cc534bf9ca342f4328fb3fbc036350151da
c23d6151902d90c01241459c9823772ff58777bb
/loadui-project/loadui-api/src/main/java/com/eviware/loadui/api/events/ActionEvent.java
d96656827bd2188542a8169501a9a16cb2aee6d8
[]
no_license
nagyist/loadui
ba0969a89241eed6fa2fb7e11fa663178a12a7b4
68e6bc7d444a754ea4dbd45d17e36e2c8cc57484
refs/heads/master
2021-01-17T22:34:23.441939
2014-04-25T15:38:23
2014-04-25T15:38:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,266
java
/* * Copyright 2013 SmartBear Software * * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by the European Commission - subsequent * versions of the EUPL (the "Licence"); * You may not use this work except in compliance with the Licence. * You may obtain a copy of the Licence at: * * http://ec.europa.eu/idabc/eupl * * Unless required by applicable law or agreed to in writing, software distributed under the Licence is * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the Licence for the specific language governing permissions and limitations * under the Licence. */ package com.eviware.loadui.api.events; /** * An Event which represents an Action which has been fired for a specific * ModelItem. * * @author dain.nilsson */ public class ActionEvent extends BaseEvent { private static final long serialVersionUID = 3473705224577013888L; /** * Constructs an ActionEvent to be fired. * * @param source * The source ModelItem upon which the ActionEvent was initially * fired. * @param key * The name of the action. */ public ActionEvent( EventFirer source, String key ) { super( source, key ); } }
[ "maximilian.skog@smartbear.com" ]
maximilian.skog@smartbear.com
3a0a258d3b59dba2ce69281d1282cff3156c8bab
7b969dea4cad153c8c1296434dec2c8f3daea517
/fixflow-core/src/com/founder/fix/fixflow/core/impl/command/CommonCommandParams.java
9a1a2874245ba31073eec0c8dd1f62095ec59019
[]
no_license
eseawind/fixflow
7bf848f2108f945c3cbe5dca559934df3451a5d1
61bbebec4b3238401271d143394160d8cdfa83e3
refs/heads/master
2021-01-18T11:17:07.727356
2013-08-01T03:05:22
2013-08-01T03:05:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
180
java
package com.founder.fix.fixflow.core.impl.command; import com.founder.fix.fixflow.core.command.CommandParams; public class CommonCommandParams extends CommandParams { }
[ "kenshin.net@gmail.com" ]
kenshin.net@gmail.com
0552afd91c4405d490ffa65faad55552812e9eb8
8e8630ada84dd68dc1a6ad4445d7111086754a10
/booster-android-instrument-toast/src/main/java/com/didiglobal/booster/instrument/ShadowToast.java
61e651dfce81165e44ca2241ea126486e37de55c
[ "Apache-2.0" ]
permissive
drukqs722/booster
848cf83ce833cb631d0be75adb3084a733b01755
f3fe57e7dacd337086c7c43a67adc9ae1b8b058a
refs/heads/master
2021-01-08T16:18:48.660270
2020-02-20T11:21:34
2020-02-20T11:21:34
242,077,842
0
0
Apache-2.0
2020-02-21T07:18:27
2020-02-21T07:17:17
null
UTF-8
Java
false
false
1,696
java
package com.didiglobal.booster.instrument; import android.os.Build; import android.os.Handler; import android.util.Log; import android.widget.Toast; import com.didiglobal.booster.android.bugfix.CaughtCallback; import com.didiglobal.booster.android.bugfix.CaughtRunnable; import static com.didiglobal.booster.android.bugfix.Constants.TAG; import static com.didiglobal.booster.android.bugfix.Reflection.getFieldValue; import static com.didiglobal.booster.android.bugfix.Reflection.setFieldValue; public class ShadowToast { /** * Fix {@code WindowManager$BadTokenException} for Android N * * @param toast * The original toast */ public static void show(final Toast toast) { if (Build.VERSION.SDK_INT == 25) { workaround(toast).show(); } else { toast.show(); } } private static Toast workaround(final Toast toast) { final Object tn = getFieldValue(toast, "mTN"); if (null == tn) { Log.w(TAG, "Field mTN of " + toast + " is null"); return toast; } final Object handler = getFieldValue(tn, "mHandler"); if (handler instanceof Handler) { if (setFieldValue(handler, "mCallback", new CaughtCallback((Handler) handler))) { return toast; } } final Object show = getFieldValue(tn, "mShow"); if (show instanceof Runnable) { if (setFieldValue(tn, "mShow", new CaughtRunnable((Runnable) show))) { return toast; } } Log.w(TAG, "Neither field mHandler nor mShow of " + tn + " is accessible"); return toast; } }
[ "g.johnsonlee@gmail.com" ]
g.johnsonlee@gmail.com
86a4acf4739af8c8980c519d98dd4896445dd49d
c37d2a36312534a55c319b19b61060649c7c862c
/app/src/main/java/com/spongycastle/asn1/esf/RevocationValues.java
86311bf786be7deafe8194f4ddaa450473a98677
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
trwinowiecki/AndroidTexting
f5626ad91a07ea7b3cd3ee75893abf8b1fe7154f
27e84a420b80054e676c390b898705856364b340
refs/heads/master
2020-12-30T23:10:17.542572
2017-02-01T01:46:13
2017-02-01T01:46:13
80,580,124
0
0
null
null
null
null
UTF-8
Java
false
false
4,608
java
package com.spongycastle.asn1.esf; import java.util.Enumeration; import com.spongycastle.asn1.ASN1EncodableVector; import com.spongycastle.asn1.ASN1Object; import com.spongycastle.asn1.ASN1Primitive; import com.spongycastle.asn1.ASN1Sequence; import com.spongycastle.asn1.DERSequence; import com.spongycastle.asn1.DERTaggedObject; import com.spongycastle.asn1.ocsp.BasicOCSPResponse; import com.spongycastle.asn1.x509.CertificateList; /** * <pre> * RevocationValues ::= SEQUENCE { * crlVals [0] SEQUENCE OF CertificateList OPTIONAL, * ocspVals [1] SEQUENCE OF BasicOCSPResponse OPTIONAL, * otherRevVals [2] OtherRevVals OPTIONAL} * </pre> */ public class RevocationValues extends ASN1Object { private ASN1Sequence crlVals; private ASN1Sequence ocspVals; private OtherRevVals otherRevVals; public static RevocationValues getInstance(Object obj) { if (obj instanceof RevocationValues) { return (RevocationValues)obj; } else if (obj != null) { return new RevocationValues(ASN1Sequence.getInstance(obj)); } return null; } private RevocationValues(ASN1Sequence seq) { if (seq.size() > 3) { throw new IllegalArgumentException("Bad sequence size: " + seq.size()); } Enumeration e = seq.getObjects(); while (e.hasMoreElements()) { DERTaggedObject o = (DERTaggedObject)e.nextElement(); switch (o.getTagNo()) { case 0: ASN1Sequence crlValsSeq = (ASN1Sequence)o.getObject(); Enumeration crlValsEnum = crlValsSeq.getObjects(); while (crlValsEnum.hasMoreElements()) { CertificateList.getInstance(crlValsEnum.nextElement()); } this.crlVals = crlValsSeq; break; case 1: ASN1Sequence ocspValsSeq = (ASN1Sequence)o.getObject(); Enumeration ocspValsEnum = ocspValsSeq.getObjects(); while (ocspValsEnum.hasMoreElements()) { BasicOCSPResponse.getInstance(ocspValsEnum.nextElement()); } this.ocspVals = ocspValsSeq; break; case 2: this.otherRevVals = OtherRevVals.getInstance(o.getObject()); break; default: throw new IllegalArgumentException("invalid tag: " + o.getTagNo()); } } } public RevocationValues(CertificateList[] crlVals, BasicOCSPResponse[] ocspVals, OtherRevVals otherRevVals) { if (null != crlVals) { this.crlVals = new DERSequence(crlVals); } if (null != ocspVals) { this.ocspVals = new DERSequence(ocspVals); } this.otherRevVals = otherRevVals; } public CertificateList[] getCrlVals() { if (null == this.crlVals) { return new CertificateList[0]; } CertificateList[] result = new CertificateList[this.crlVals.size()]; for (int idx = 0; idx < result.length; idx++) { result[idx] = CertificateList.getInstance(this.crlVals .getObjectAt(idx)); } return result; } public BasicOCSPResponse[] getOcspVals() { if (null == this.ocspVals) { return new BasicOCSPResponse[0]; } BasicOCSPResponse[] result = new BasicOCSPResponse[this.ocspVals.size()]; for (int idx = 0; idx < result.length; idx++) { result[idx] = BasicOCSPResponse.getInstance(this.ocspVals .getObjectAt(idx)); } return result; } public OtherRevVals getOtherRevVals() { return this.otherRevVals; } public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(); if (null != this.crlVals) { v.add(new DERTaggedObject(true, 0, this.crlVals)); } if (null != this.ocspVals) { v.add(new DERTaggedObject(true, 1, this.ocspVals)); } if (null != this.otherRevVals) { v.add(new DERTaggedObject(true, 2, this.otherRevVals.toASN1Primitive())); } return new DERSequence(v); } }
[ "trw0511@gmail.com" ]
trw0511@gmail.com
415b61fae1c4079ad637503e4095bbb77d7c7655
9fcf05729b131e40eedb8bbc1b2e04dbf6f02c98
/Java/Loon-Lite(PureJava)/Loon-Lite-Core/src/loon/action/avg/AVGCG.java
5b3efc54d9d45b405a57ca963e4c8337e6595853
[ "Apache-2.0" ]
permissive
choiyongwoo/LGame
68661774ca4c913e8fae8378a2f291939430fa37
f007cee4c017702d5dd3d7966cb99b3c69bec616
refs/heads/master
2020-05-29T13:39:00.447566
2019-05-28T01:30:53
2019-05-28T01:30:53
189,168,503
1
0
null
2019-05-29T06:59:15
2019-05-29T06:59:14
null
UTF-8
Java
false
false
8,057
java
/** * Copyright 2008 - 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. * * @project loon * @author cping * @email:javachenpeng@yahoo.com * @version 0.1 */ package loon.action.avg; import loon.LRelease; import loon.LSystem; import loon.LTexture; import loon.Screen; import loon.action.sprite.ISprite; import loon.action.sprite.Sprites; import loon.event.Updateable; import loon.geom.PointI; import loon.opengl.GLEx; import loon.utils.ArrayMap; import loon.utils.MathUtils; import loon.utils.StringUtils; import loon.utils.TimeUtils; import loon.utils.timer.LTimerContext; public class AVGCG implements LRelease { protected Sprites actionRole; private long charaShowDelay = 60; private LTexture background; private ArrayMap charas; private boolean style, loop, closed; protected int sleep, sleepMax, shakeNumber; public AVGCG(Screen screen) { this.actionRole = new Sprites(screen); this.charas = new ArrayMap(10); this.style = true; this.loop = true; } public LTexture getBackgroundCG() { return background; } public void noneBackgroundCG() { if (background != null) { background.close(); background = null; } } public void setBackgroundCG(LTexture backgroundCG) { if (backgroundCG == this.background) { return; } if (background != null) { background.close(); background = null; } this.background = backgroundCG; } private final static String _update(final String n) { String name = n; if (StringUtils.startsWith(name, '"')) { name = StringUtils.replace(name, "\"", LSystem.EMPTY); } return name; } public void setBackgroundCG(final String resName) { this.setBackgroundCG(LSystem.loadTexture(_update(resName))); } public void add(final String resName, AVGChara chara) { if (chara == null) { return; } String path = _update(resName); synchronized (charas) { chara.setFlag(ISprite.TYPE_FADE_OUT, charaShowDelay); this.charas.put(path.replaceAll(" ", LSystem.EMPTY).toLowerCase(), chara); } } public void add(String resName, int x, int y) { add(resName, x, y, LSystem.viewSize.getWidth(), LSystem.viewSize.getHeight()); } public void add(final String resName, float x, float y, float w, float h) { add(resName, (int) x, (int) y, (int) w, (int) h); } public void add(final String resName, int x, int y, int w, int h) { String path = _update(resName); synchronized (charas) { String keyName = path.replaceAll(" ", LSystem.EMPTY).toLowerCase(); AVGChara chara = (AVGChara) charas.get(keyName); if (chara == null) { chara = new AVGChara(path, x, y, w, h); chara.setFlag(ISprite.TYPE_FADE_OUT, charaShowDelay); charas.put(keyName, chara); } else { chara.setFlag(ISprite.TYPE_FADE_OUT, charaShowDelay); chara.setX(x); chara.setY(y); } } } public AVGChara remove(final String resName) { String path = _update(resName); synchronized (charas) { final String name = path.replaceAll(" ", LSystem.EMPTY).toLowerCase(); AVGChara chara = null; if (style) { chara = (AVGChara) charas.get(name); if (chara != null) { chara.setFlag(ISprite.TYPE_FADE_IN, charaShowDelay); } } else { chara = (AVGChara) charas.remove(name); if (chara != null) { android_dispose(chara); } } return chara; } } public void replace(String res1, String res2) { String path1 = _update(res1); String path2 = _update(res2); synchronized (charas) { final String name = path1.replaceAll(" ", LSystem.EMPTY).toLowerCase(); AVGChara old = null; if (style) { old = (AVGChara) charas.get(name); if (old != null) { old.setFlag(ISprite.TYPE_FADE_IN, charaShowDelay); } } else { old = (AVGChara) charas.remove(name); if (old != null) { android_dispose(old); } } if (old != null) { final float x = old.getX(); final float y = old.getY(); AVGChara newObject = new AVGChara(path2, 0, 0, old.maxWidth, old.maxHeight); newObject.setMove(false); newObject.setX(x); newObject.setY(y); add(path2, newObject); } } } private final static void android_dispose(final AVGChara c) { Updateable remove = new Updateable() { @Override public void action(Object a) { c.close(); } }; LSystem.load(remove); } public void update(LTimerContext context) { actionRole.update(context.timeSinceLastUpdate); } public void paint(GLEx g) { if (background != null) { if (shakeNumber > 0) { g.draw(background, shakeNumber / 2 - MathUtils.random(shakeNumber), shakeNumber / 2 - MathUtils.random(shakeNumber)); } else { g.draw(background, 0, 0); } } synchronized (charas) { for (int i = 0; i < charas.size(); i++) { AVGChara chara = (AVGChara) charas.get(i); if (chara == null || !chara.visible) { continue; } if (style) { if (chara.flag != -1) { if (chara.flag == ISprite.TYPE_FADE_IN) { chara.currentFrame--; if (chara.currentFrame == 0) { chara.opacity = 0; chara.flag = -1; chara.close(); charas.remove(chara); } } else { chara.currentFrame++; if (chara.currentFrame == chara.time) { chara.opacity = 0; chara.flag = -1; } } chara.opacity = (chara.currentFrame / chara.time) * 255; if (chara.opacity > 0) { g.setAlpha(chara.opacity / 255); } } } if (chara.showAnimation) { AVGAnm animation = chara.anm; if (animation.load) { if (animation.loop && animation.startTime == -1) { animation.start(0, loop); } PointI point = animation.getPos(TimeUtils.millis()); if (animation.alpha != 1f) { g.setAlpha(animation.alpha); } g.draw(animation.texture, chara.getX(), chara.getY(), animation.width, animation.height, point.x, point.y, point.x + animation.imageWidth, point.y + animation.imageHeight, animation.color, animation.angle); if (animation.alpha != 1f) { g.setAlpha(1f); } } } else { chara.next(); chara.draw(g); } if (style) { if (chara.flag != -1 && chara.opacity > 0) { g.setAlpha(1f); } } } } actionRole.createUI(g); } public void clear() { synchronized (charas) { charas.clear(); actionRole.clear(); } } public ArrayMap getCharas() { return charas; } public int count() { if (charas != null) { return charas.size(); } return 0; } public long getCharaShowDelay() { return charaShowDelay; } public void setCharaShowDelay(long charaShowDelay) { this.charaShowDelay = charaShowDelay; } public boolean isStyle() { return style; } public void setStyle(boolean style) { this.style = style; } public boolean isLoop() { return loop; } public void setLoop(boolean loop) { this.loop = loop; } public Sprites getSprites() { return actionRole; } public Sprites getActionRole() { return actionRole; } public boolean isClosed() { return closed; } @Override public void close() { synchronized (charas) { if (style) { for (int i = 0; i < charas.size(); i++) { AVGChara ch = (AVGChara) charas.get(i); if (ch != null) { ch.setFlag(ISprite.TYPE_FADE_IN, charaShowDelay); } } } else { for (int i = 0; i < charas.size(); i++) { AVGChara ch = (AVGChara) charas.get(i); if (ch != null) { ch.close(); ch = null; } } charas.clear(); } actionRole.clear(); } closed = true; } }
[ "longwind2012@hotmail.com" ]
longwind2012@hotmail.com
89195fc8cbd5c655f8e2e86cbd3c890cef191067
693d4d063dfcc11c2e91d51962a47b7050b77477
/app/src/main/java/com/snqu/shopping/ui/main/frag/RecommendGoodFrag.java
00d01239d4fafc35138a5af733c2049484e9f5a4
[]
no_license
zhangquanit/project_shopping
e4bc6c5e67a52ac760a4c3b1671a6193a20bcb8e
7f39b9d7b2d28abd29deae5b5a690102b3e3c40b
refs/heads/master
2023-01-22T21:27:56.996050
2020-12-04T08:53:22
2020-12-04T08:53:22
303,890,611
0
0
null
null
null
null
UTF-8
Java
false
false
6,452
java
package com.snqu.shopping.ui.main.frag; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import androidx.annotation.Nullable; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.anroid.base.SimpleFrag; import com.chad.library.adapter.base.BaseQuickAdapter; import com.snqu.shopping.R; import com.snqu.shopping.common.Constant; import com.snqu.shopping.data.base.NetReqResult; import com.snqu.shopping.data.base.ResponseDataArray; import com.snqu.shopping.data.goods.entity.GoodsEntity; import com.snqu.shopping.data.goods.entity.GoodsQueryParam; import com.snqu.shopping.ui.goods.GoodsDetailActivity; import com.snqu.shopping.ui.main.adapter.GoodListAdapter; import com.snqu.shopping.ui.main.view.CommonLoadingMoreView; import com.snqu.shopping.ui.main.viewmodel.HomeViewModel; import com.snqu.shopping.util.statistics.SndoData; /** * @author 张全 */ public class RecommendGoodFrag extends SimpleFrag { private RecyclerView mFloorListView; private GoodListAdapter goodListAdapter; private GoodsQueryParam queryParam; private HomeViewModel mHomeViewModel; private static final String ITEM_SOURCE = "ITEM_SOURCEG"; public MutableLiveData<NetReqResult> mGoodLiveData; public static Bundle getParam(String itemSource) { Bundle bundle = new Bundle(); bundle.putString(ITEM_SOURCE, itemSource); return bundle; } @Override protected int getLayoutId() { return R.layout.recommend_good_item; } @Override protected void init(Bundle savedInstanceState) { mGoodLiveData = new MutableLiveData<>();// queryParam = new GoodsQueryParam(); queryParam.item_source = getArguments().getString(ITEM_SOURCE); initView(); initData(); } private void initView() { mFloorListView = findViewById(R.id.listview); goodListAdapter = new GoodListAdapter(); mFloorListView.setAdapter(goodListAdapter); mFloorListView.setLayoutManager(new LinearLayoutManager(mContext)); goodListAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { @Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { GoodsEntity goodsEntity = goodListAdapter.getData().get(position); GoodsDetailActivity.Companion.start(mContext, goodsEntity.get_id(), goodsEntity.getItem_source(), goodsEntity); String place = SndoData.PLACE.homepage_unique_recommend.name(); if (TextUtils.equals(queryParam.item_source, Constant.BusinessType.TB)) { place = SndoData.PLACE.homepage_unique_tb_recommend.name(); } else if (TextUtils.equals(queryParam.item_source, Constant.BusinessType.TM)) { place = SndoData.PLACE.homepage_unique_tm_recommend.name(); } else if (TextUtils.equals(queryParam.item_source, Constant.BusinessType.JD)) { place = SndoData.PLACE.homepage_unique_jd_recommend.name(); } else if (TextUtils.equals(queryParam.item_source, Constant.BusinessType.PDD)) { place = SndoData.PLACE.homepage_unique_pdd_recommend.name(); } SndoData.reportGoods(goodsEntity, position, place); //统计 SndoData.event(SndoData.XLT_EVENT_HOME_RECOMMEDN, SndoData.XLT_GOOD_ID, goodsEntity.get_id(), "xlt_item_firstcate_title", "null", "xlt_item_thirdcate_title", "null", "xlt_item_secondcate_title", "null", "good_name", goodsEntity.getItem_title(), SndoData.XLT_ITEM_PLACE, String.valueOf(position + 1), "xlt_item_source", goodsEntity.getItem_source() ); } }); goodListAdapter.setLoadMoreView(new CommonLoadingMoreView()); goodListAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() { @Override public void onLoadMoreRequested() { loadGoods(); } }, mFloorListView); } private void initData() { mHomeViewModel = ViewModelProviders.of(this).get(HomeViewModel.class); //推荐商品 mGoodLiveData.observe(getLifecycleOwner(), new Observer<NetReqResult>() { @Override public void onChanged(@Nullable NetReqResult netReqResult) { switch (netReqResult.tag) { case HomeViewModel.TAG_RECOMMEND_GOODS: //推荐商品 goodListAdapter.setEnableLoadMore(true); if (netReqResult.successful) { ResponseDataArray<GoodsEntity> goodsData = (ResponseDataArray<GoodsEntity>) netReqResult.data; if (queryParam.page == 1) { goodListAdapter.setNewData(goodsData.getDataList()); } else if (!goodsData.getDataList().isEmpty()) { goodListAdapter.addData(goodsData.getDataList()); } if (goodsData.hasMore()) { queryParam.page++; goodListAdapter.loadMoreComplete(); } else { goodListAdapter.loadMoreEnd(); } } else { if (queryParam.page > 1) { goodListAdapter.loadMoreFail(); } } break; } } }); loadGoods(); } public void scrollToTop() { mFloorListView.scrollToPosition(0); } private void loadGoods() { mHomeViewModel.getRecommendGoods(queryParam, mGoodLiveData); } public void refresh() { goodListAdapter.setEnableLoadMore(false); queryParam.page = 1; mHomeViewModel.getRecommendGoods(queryParam, mGoodLiveData); } }
[ "zhangquan@snqu.com" ]
zhangquan@snqu.com
6c90e508e72d59f3dffbc312bf2d2abd6386d047
7b733d7be68f0fa4df79359b57e814f5253fc72d
/modules/extensions-main/src/main/java/com/percussion/extensions/general/PSSimpleJavaUdf_overrideLiteral.java
b683ab9e276a260699d3e3a0431d40b103475cce
[ "LicenseRef-scancode-dco-1.1", "Apache-2.0", "OFL-1.1", "LGPL-2.0-or-later" ]
permissive
percussion/percussioncms
318ac0ef62dce12eb96acf65fc658775d15d95ad
c8527de53c626097d589dc28dba4a4b5d6e4dd2b
refs/heads/development
2023-08-31T14:34:09.593627
2023-08-31T14:04:23
2023-08-31T14:04:23
331,373,975
18
6
Apache-2.0
2023-09-14T21:29:25
2021-01-20T17:03:38
Java
UTF-8
Java
false
false
3,061
java
/* * Copyright 1999-2023 Percussion Software, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * limitations under the License. */ package com.percussion.extensions.general; import com.percussion.data.PSConversionException; import com.percussion.extension.IPSFieldInputTransformer; import com.percussion.extension.PSSimpleJavaUdfExtension; import com.percussion.server.IPSRequestContext; /** * This UDF converts the supplied parameter to a <code>String</code> and * returns that or the override value supplied through the request parameters. * The override value is removed from the request once it was consumed. */ public class PSSimpleJavaUdf_overrideLiteral extends PSSimpleJavaUdfExtension implements IPSFieldInputTransformer { /** * Returns the supplied literal (<code>params[0]</code>) as * <code>String</code> or the override value if an override parameter (<code>params[1]</code>) * is specified and was found on the supplied request. If found, the override * parameter is removed from the request. * * @params[0] the object which will be returned as <code>String</code>, * required, may be <code>null</code> or empty. * @params[1] the request parameter name used to allow overrides through the * HTML request, optional, may be <code>null</code> or empty. * @see com.percussion.extension.IPSUdfProcessor#processUdf(Object[], * IPSRequestContext) for additional documentation. */ public Object processUdf(Object[] params, IPSRequestContext request) throws PSConversionException { final int size = (params == null) ? 0 : params.length; if (size < 1) { int errCode = 0; String arg0 = "expect 1 parameter, "; arg0 += String.valueOf(size) + " parameters were specified."; Object[] args = { arg0, "PSSimpleJavaUdf_overrideLiteral/processUdf" }; throw new PSConversionException(errCode, args); } /* * If the override parameter name was supplied and a value for that was * found on the current request, the override value will be returned. */ if (size > 1 && params[1] != null) { String parameterName = params[1].toString().trim(); String parameterValue = request.getParameter(parameterName); if (parameterValue != null) { request.removeParameter(parameterName); return parameterValue.trim(); } } Object o = params[0]; if (o == null) return null; return o.toString(); } }
[ "nate.chadwick@gmail.com" ]
nate.chadwick@gmail.com
7e866dc4445f301921d4399595b86670bf91dfa2
3cd8ad76778ddabfd62414b2bf044def955d0d88
/pw-new/ylb-ticket-service/src/main/java/com/ectrip/ticket/provider/dao/impl/TripDAO.java
646f1a7053615c8c06f5e30cff44335bc72af2f5
[]
no_license
dbc1024/demos
65f640eb6bbc5b6476645eeb7c42c28e7218f6cb
ebbe48de090af138f55e8a1923768328452f1d69
refs/heads/master
2020-03-30T19:08:35.871801
2019-05-08T03:14:59
2019-05-08T03:14:59
151,530,128
1
3
null
null
null
null
UTF-8
Java
false
false
521
java
package com.ectrip.ticket.provider.dao.impl; import java.util.List; import org.springframework.stereotype.Repository; import com.ectrip.base.dao.GenericDao; import com.ectrip.ticket.provider.dao.ITripDAO; @Repository public class TripDAO extends GenericDao implements ITripDAO { @Override public List getTripByTripids(String tripids) { String hql="select distinct new map(t.tripid as tripid,t.tripname as tripname) from Trip t where t.tripid in ("+tripids+")"; List find = this.find(hql); return find; } }
[ "cy991587100@163.com" ]
cy991587100@163.com
40d1e31bb7ad73e271eaa0c7beaf975cc07dc1ff
6cba35091aca9d2cfb7924808bd29112c4adf29c
/src/main/java/cn/itdan/mq/SyncProducer.java
98d0ce45faf6d3e123e98868cd5900b53c14a22a
[]
no_license
18376108492/rokectmq_demo
1d0ddbcb73b67f8450a6e9244be02318c116d262
d946d4cf0d5a7199562aabd9e5f37c5c521b7c91
refs/heads/master
2020-09-12T02:01:28.927155
2019-11-17T14:50:47
2019-11-17T14:50:47
222,263,812
0
0
null
null
null
null
UTF-8
Java
false
false
1,226
java
package cn.itdan.mq; import org.apache.rocketmq.client.producer.DefaultMQProducer; import org.apache.rocketmq.client.producer.SendResult; import org.apache.rocketmq.common.message.Message; import org.apache.rocketmq.remoting.common.RemotingHelper; public class SyncProducer { public static void main(String[] args) throws Exception { //Instantiate with a producer group name. DefaultMQProducer producer = new DefaultMQProducer("test-group"); // Specify name server addresses. producer.setNamesrvAddr("123.57.128.124:9876"); //Launch the instance. producer.start(); for (int i = 0; i < 100; i++) { //Create a message instance, specifying topic, tag and message body. Message msg = new Message("TopicTest11" /* Topic */, "TagA" /* Tag */, ("Hello RocketMQ " + i).getBytes(RemotingHelper.DEFAULT_CHARSET) /* Message body */ ); //Call send message to deliver message to one of brokers. SendResult sendResult = producer.send(msg); System.out.printf("%s%n", sendResult); } } }
[ "2207161187@qq.com" ]
2207161187@qq.com
34779a6535e3d43e033051f662821fc5d255534e
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-14599-4-17-Single_Objective_GGA-WeightedSum/org/xwiki/extension/jar/internal/handler/JarExtensionJobFinishingListener_ESTest_scaffolding.java
203fbf8825934c36d9eec26f9fe6a69a31ed90c3
[ "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
477
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Apr 01 10:34:17 UTC 2020 */ package org.xwiki.extension.jar.internal.handler; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class JarExtensionJobFinishingListener_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
335be29b5f81a468b350485329db517c15154299
077eba739191e42d50d9fd2110f00e183d37f699
/mini-pms-45-a-server/src/main/java/com/eomcs/pms/web/ProjectUpdateServlet.java
248c45eb0e8a38b826be9558cbf5a08bbf616ffa
[]
no_license
eomcs/eomcs-java-project-2020
68fc8dd8e366e40860499898f0bff87c951ff014
95a643176f6fa1d52a10f0cfdcced6d3a76f9b86
refs/heads/master
2022-05-02T23:23:49.684296
2021-11-15T08:54:40
2021-11-15T08:54:40
242,740,849
9
4
null
2022-03-28T23:25:20
2020-02-24T13:17:14
Java
UTF-8
Java
false
false
2,037
java
package com.eomcs.pms.web; import java.io.IOException; import java.sql.Date; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.eomcs.pms.domain.Member; import com.eomcs.pms.domain.Project; import com.eomcs.pms.service.ProjectService; @WebServlet("/project/update") public class ProjectUpdateServlet extends HttpServlet { private static final long serialVersionUID = 1L; @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ServletContext ctx = request.getServletContext(); ProjectService projectService = (ProjectService) ctx.getAttribute("projectService"); try { Project project = new Project(); project.setNo(Integer.parseInt(request.getParameter("no"))); project.setTitle(request.getParameter("title")); project.setContent(request.getParameter("content")); project.setStartDate(Date.valueOf(request.getParameter("startDate"))); project.setEndDate(Date.valueOf(request.getParameter("endDate"))); // 프로젝트에 참여할 회원 정보를 담는다. List<Member> members = new ArrayList<>(); String[] memberNoList = request.getParameterValues("members"); if (memberNoList != null) { for (String memberNo : memberNoList) { members.add(new Member().setNo(Integer.parseInt(memberNo))); } } project.setMembers(members); if (projectService.update(project) == 0) { throw new Exception("해당 프로젝트가 존재하지 않습니다."); } response.sendRedirect("list"); } catch (Exception e) { request.setAttribute("exception", e); request.getRequestDispatcher("/error.jsp").forward(request, response); } } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com