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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dc199193381f2b34157493a934fc2d7db21df9a9 | 7e514984ca48c1ed93bc19b80bce35000be48352 | /src/goryachev/swing/options/TimeFormatOption.java | 1492a0aad978cd968a3bdc44aa666c9d2d6aa891 | [
"Apache-2.0"
] | permissive | andy-goryachev/PasswordSafe | 6413d03c9939c2cf8e3d6c3a9f979649c9c9feb5 | 3e58901fcc4130d2423e7aeeace541999cfd6937 | refs/heads/master | 2023-08-08T21:28:46.100894 | 2023-07-21T05:46:59 | 2023-07-21T05:46:59 | 30,781,883 | 19 | 0 | null | null | null | null | UTF-8 | Java | false | false | 957 | java | // Copyright © 2010-2023 Andy Goryachev <andy@goryachev.com>
package goryachev.swing.options;
import goryachev.common.util.CDateFormat;
import goryachev.common.util.CSettings;
import java.util.Collection;
public class TimeFormatOption
extends COption<CDateFormat>
{
public final static String FORMAT_12H = "h:mm a";
public final static String FORMAT_12H_SECONDS = "h:mm:ss a";
public final static String FORMAT_24H = "HH:mm";
public final static String FORMAT_24H_SECONDS = "HH:mm:ss";
public TimeFormatOption(String id, CSettings settings, Collection<COption<?>> list)
{
super(id, settings, list);
}
public TimeFormatOption(String id)
{
super(id);
}
public CDateFormat defaultValue()
{
return new CDateFormat(FORMAT_24H);
}
public CDateFormat parseProperty(String s)
{
return new CDateFormat(s);
}
public String toProperty(CDateFormat f)
{
return f.getPattern();
}
}
| [
"andy@goryachev.com"
] | andy@goryachev.com |
fc76d7791eb7e170b5f7f1dcf3ae23ed2d2d30d8 | 2ea1ca34b31d73d1ca8732cc3ed45668e8cdaab0 | /snakerext/snakerext-web/src/main/java/com/qcloud/component/snakerext/web/form/ProcessGroupCLerkForm.java | dc96e3f159844da0989d3e361551e104293f6c1b | [] | no_license | ChiRain/snaker | 07008c6aa07f10ac79f1787b4969f5e45a9c19e5 | 808945ca4fe5e7b11a969531fd0801a571c21c17 | refs/heads/master | 2021-01-18T01:48:44.523645 | 2016-07-26T06:04:15 | 2016-07-26T06:04:15 | 65,979,224 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 418 | java | package com.qcloud.component.snakerext.web.form;
import java.util.List;
import com.qcloud.component.snakerext.model.ProcessGroupClerk;
public class ProcessGroupCLerkForm {
private List<ProcessGroupClerk> guList;
public List<ProcessGroupClerk> getGuList() {
return guList;
}
public void setGuList(List<ProcessGroupClerk> guList) {
this.guList = guList;
}
}
| [
"lihuashan@ed19df75-bd51-b445-9863-9e54940520a8"
] | lihuashan@ed19df75-bd51-b445-9863-9e54940520a8 |
31275fb42fe51477a78c1c09abc3741a0de846e1 | ec3f408e1836e603c5411c48d6b4efa746577d11 | /src/application/Histoire.java | 66ba88d6384e1f719880e127699e08e2dc3d7611 | [] | no_license | SteamyXx/SteaMyGame | 08990b35f6c9a90ee2e5e11d2d2664835a030f34 | defe5023fe42c687867dc6932fc98fd6e639a7d5 | refs/heads/master | 2021-04-15T05:03:02.531258 | 2018-04-07T16:02:07 | 2018-04-07T16:02:07 | 126,624,099 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,051 | java | package application;
import javax.swing.*;
import java.awt.*;
import application.*;
import personnage.*;
import java.awt.event.*;
import java.io.*;
import java.nio.file.*;
public class Histoire extends JPanel {
private Jeu jeu;
private JTextArea findujeu;
public Histoire(Jeu jeu, int i) {
super();
this.jeu = jeu;
this.setBorder(BorderFactory.createMatteBorder(8, 8, 8, 8, Color.decode("#C3C1BF")));
this.setLayout(new BorderLayout());
Font font25 = new Font("Arial", Font.BOLD ,25);
Font font20 = new Font("Arial", Font.BOLD ,20);
this.findujeu = new JTextArea();
this.findujeu.setFont(font20);
this.findujeu.setText("\n\n"+Application.getTextFromFile("data/histoire"+i+".txt"));
this.findujeu.setBackground(Color.decode("#F2E5CF"));
this.findujeu.setBorder(BorderFactory.createMatteBorder(0, 0, 8, 0, Color.decode("#C3C1BF")));
this.findujeu.setLineWrap(true);
this.findujeu.setWrapStyleWord(true);
this.findujeu.setEditable(false);
this.findujeu.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 30));
JPanel tmp = new JPanel();
tmp.setPreferredSize(new Dimension(this.jeu.getPreferredSize().width, 75));
tmp.setLayout(new GridBagLayout());
tmp.setBackground(Color.decode("#F2E5CF"));
JButton continuer = null;
if (i == 1) {
continuer = new JButton("J'ai choisis ...");
} else if (i == 2 || i == 4 || i == 5 || i == 6) {
continuer = new JButton("Continuez");
} else if (i == 3) {
continuer = new JButton("J'aimerais avoir ...");
}
continuer.setFont(font25);
continuer.setPreferredSize(new Dimension(500, 50));
continuer.setBackground(Color.decode("#C3C1BF"));
if (i == 1) {
continuer.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jeu.fenetreSuivante();
}
});
} else if (i == 2) {
continuer.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jeu.ajouterInventaire();
jeu.ajouterPersoInventaire(jeu.getCompte().getPerso(0));
jeu.fenetreN(5);
}
});
} else if (i == 3) {
continuer.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jeu.fenetreN(9);
}
});
} else if (i == 4 || i == 5 || i == 6) {
continuer.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jeu.fenetreN(5);
}
});
}
tmp.add(continuer);
this.add(this.findujeu, BorderLayout.CENTER);
this.add(tmp, BorderLayout.SOUTH);
}
public void ajouterQuatriemePerso(String str) {
String texte = this.findujeu.getText();
texte = texte.replace("*", str);
texte = texte.replace("*", str);
this.findujeu.setText(texte);
}
public void ajouterPerso(String str) {
this.findujeu.append(" "+str);
}
}
| [
"you@example.com"
] | you@example.com |
229fa060e324f4b6fe1f80bf5b8297f44045ed30 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/property/C36982q.java | fc41472034da378e339b8ce597928c9a94ea88f2 | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 422 | java | package com.p280ss.android.ugc.aweme.property;
import android.os.Build.VERSION;
import android.widget.Toast;
import com.p280ss.android.ugc.aweme.utils.C43112ex;
/* renamed from: com.ss.android.ugc.aweme.property.q */
final class C36982q {
/* renamed from: a */
static void m118976a(Toast toast) {
if (VERSION.SDK_INT == 25) {
C43112ex.m136740a(toast);
}
toast.show();
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
0eab25e6a495223a0c54680047265191d5e96ecd | aa2dc7d063cbd7cac25d15ff954a21cd205c5c0e | /flinkinactionjava/src/main/java/com/manning/fia/c03/SampleData.java | 4c8704eda77ff63d2877490218fd6c00d5a9104b | [] | no_license | milindparikh/flinkinaction | 7e4bc3013ff0259f2a4e7cec1bb8adb636e3ac11 | 58bdef86728b1f93aa3eecd3e0256678827d2c1e | refs/heads/master | 2021-01-18T08:39:26.461251 | 2016-06-19T13:47:33 | 2016-06-19T13:47:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,652 | java | package com.manning.fia.c03;
public class SampleData {
public static final String[] ALT_TRANSACTION_ITEMS = {
"100001,1,1,1_item,5,1.0,20151231130000"+"|"+
"100001,1,2,2_item,10,100.0,20151231130000"+"|"+
"100001,1,3,3_item,3,200.0,20151231130000",
"100002,2,1,1_item,4,1.0,20151231130000"+"|"+
"100002,2,2,2_item,11,100.0,20151231130000"+"|"+
"100002,2,3,3_item,7,200.0,20151231130000",
"100003,3,1,1_item,4,1.0,20151231130000"+"|"+
"100003,3,2,2_item,11,100.0,20151231130000"+"|"+
"100003,3,3,3_item,7,200.0,20151231130000",
"100004,4,1,1_item,4,1.0,20151231150000"+"|"+
"100004,4,2,2_item,11,100.0,20151231150000"+"|"+
"100004,4,3,3_item,7,200.0,20151231150000",
"100005,5,1,1_item,4,1.0,20151231150000"+"|"+
"100005,5,2,2_item,11,100.0,20151231150000"+"|"+
"100005,5,3,3_item,7,200.0,20151231150000",
"100006,6,1,1_item,4,1.0,20151231150000"+"|"+
"100006,6,2,2_item,11,100.0,20151231150000"+"|"+
"100006,6,3,3_item,7,200.0,20151231150000",
"100007,7,1,1_item,4,1.0,20151231150000"+"|"+
"100007,7,2,2_item,11,100.0,20151231150000"+"|",
"100007,7,3,3_item,7,200.0,20151231150000",
"100007,8,1,1_item,4,1.0,20151231150000"+"|"+
"100007,8,2,2_item,11,100.0,20151231150000"+"|",
"100007,8,3,3_item,7,200.0,20151231150000"};
public static final String[] TRANSACTION_ITEMS = {
"100001,1,1,1_item,5,1.0,20151231130000",
"100001,1,2,2_item,10,100.0,20151231130000",
"100001,1,3,3_item,3,200.0,20151231130000",
"100002,2,1,1_item,4,1.0,20151231130000",
"100002,2,2,2_item,11,100.0,20151231130000",
"100002,2,3,3_item,7,200.0,20151231130000",
"100003,3,1,1_item,4,1.0,20151231130000",
"100003,3,2,2_item,11,100.0,20151231130000",
"100003,3,3,3_item,7,200.0,20151231130000",
"100004,4,1,1_item,4,1.0,20151231150000",
"100004,4,2,2_item,11,100.0,20151231150000",
"100004,4,3,3_item,7,200.0,20151231150000",
"100005,5,1,1_item,4,1.0,20151231150000",
"100005,5,2,2_item,11,100.0,20151231150000",
"100005,5,3,3_item,7,200.0,20151231150000",
"100006,6,1,1_item,4,1.0,20151231150000",
"100006,6,2,2_item,11,100.0,20151231150000",
"100006,6,3,3_item,7,200.0,20151231150000",
"100007,7,1,1_item,4,1.0,20151231150000",
"100007,7,2,2_item,11,100.0,20151231150000",
"100007,7,3,3_item,7,200.0,20151231150000",
"100007,8,1,1_item,50,1.0,20151231150000",
"100007,8,2,2_item,100,100.0,20151231150000",
"100007,8,3,3_item,200,200.0,20151231150000"
};
public static final String[] TRANSACTIONS = {
"100001,1,2000," + "20151231130000",
"100002,2,3000," + "20151231130000",
"100003,3,4000," + "20151231130000",
"100004,4,5000," + "20151231150000",
"100005,5,6000," + "20151231150000",
"100006,6,7000," + "20151231150000",
"100007,7,8000," + "20151231150000",
"100007,8,8001," + "20151231150000"
};
public static final String[] STORES = { "100001,100001", "100002,100002",
"100003,100003", "100004,100004", "100005,100005", "100006,100006" };
public static final String[] CUSTOMERS = { "2000,customer_2000,100001",
"3000,customer_3000,100002", "4000,customer_4000,100003",
"5000,customer_5000,100004", "6000,customer_6000,100005",
"7000,customer_7000,100006", "8000,customer_8000,100007",};
}
| [
"sameer@axiomine.com"
] | sameer@axiomine.com |
4762479f1bde0e09891b332afa872606cd4d7ddc | 65f2c6a6ca38bec048d60ba58be515a1401acb3d | /ale.xtext/src-gen/ale/xtext/ale/Symbol.java | 6bf0d03bd6a33fe9d8cd7e60c336d635001d9877 | [] | no_license | manuelleduc/ale-compiler | 59abbddab431cc224da7254ea1cc84c27d1a6667 | 8d6e04c0358be2f3fce6c83c3ea2ea1fb4fa8127 | refs/heads/master | 2021-01-19T04:12:47.739361 | 2017-07-19T15:30:35 | 2017-07-19T15:30:35 | 87,356,808 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 355 | java | /**
* generated by Xtext 2.10.0
*/
package ale.xtext.ale;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Symbol</b></em>'.
* <!-- end-user-doc -->
*
*
* @see ale.xtext.ale.AlePackage#getSymbol()
* @model
* @generated
*/
public interface Symbol extends EObject
{
} // Symbol
| [
"manuel.leduc@inria.fr"
] | manuel.leduc@inria.fr |
b0ccc965e8a9139035ee6a8b2c390a2cd8d2ea0a | 29196e2d4adfb14ddd7c2ca8c1e60f8c10c26dad | /src/main/java/it/csi/siac/siacgenser/frontend/webservice/msg/AnnullaCausale.java | 5bb1316f886982d0944baeb181a978cc21fca9fb | [] | no_license | unica-open/siacbilitf | bbeef5ceca40e9fb83d5b1176e7f54e8d84592bf | 85f3254c05c719a0016fe55cea1a105bcb6b89b2 | refs/heads/master | 2021-01-06T14:51:17.786934 | 2020-03-03T13:27:47 | 2020-03-03T13:27:47 | 241,366,581 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,030 | java | /*
*SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte
*SPDX-License-Identifier: EUPL-1.2
*/
package it.csi.siac.siacgenser.frontend.webservice.msg;
import it.csi.siac.siaccorser.model.Bilancio;
import it.csi.siac.siaccorser.model.ServiceRequest;
import it.csi.siac.siacgenser.frontend.webservice.GENSvcDictionary;
import it.csi.siac.siacgenser.model.CausaleEP;
import javax.xml.bind.annotation.XmlType;
@XmlType(namespace = GENSvcDictionary.NAMESPACE)
public class AnnullaCausale extends ServiceRequest {
private CausaleEP causaleEP;
private Bilancio bilancio;
/**
* @return the causaleEP
*/
public CausaleEP getCausaleEP() {
return causaleEP;
}
/**
* @param causaleEP the causaleEP to set
*/
public void setCausaleEP(CausaleEP causaleEP) {
this.causaleEP = causaleEP;
}
/**
* @return the bilancio
*/
public Bilancio getBilancio() {
return bilancio;
}
/**
* @param bilancio the bilancio to set
*/
public void setBilancio(Bilancio bilancio) {
this.bilancio = bilancio;
}
}
| [
"barbara.malano@csi.it"
] | barbara.malano@csi.it |
d9b3b0747c38dd85b786eba3b3b9c67f0722cdf4 | 368e6155f23aebf1adab2035098670a2721bbdb4 | /JDBCProj/src/dao/JdbcDAO.java | c4622fe051b735e9c1c788913d2f3432459e5226 | [] | no_license | ycfn97/IdeaWorkspace | 8c874d92ccb3cd5a73414f4f60458b52e9ca6ae4 | eb1fdc6721bfdde59886be9f38fcf07eeff61fd3 | refs/heads/master | 2023-01-24T05:59:59.283526 | 2020-11-23T11:22:46 | 2020-11-23T11:22:46 | 307,894,453 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,100 | java | package dao;
import javabean.Student;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler;
import org.apache.commons.dbutils.handlers.BeanListHandler;
import org.apache.commons.dbutils.handlers.ScalarHandler;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
public class JdbcDAO<T> {
private QueryRunner queryRunner = new QueryRunner();
Class<T> clazz;
public JdbcDAO(Class<T> clazz) {
this.clazz = clazz;
}
public List<T> getList(String sql, Object... args) throws SQLException {
Connection connection = null;
try {
connection = util.jdbcUtil.getConnection();
BeanListHandler<T> handler = new BeanListHandler<>(clazz);
return queryRunner.query(connection, sql, handler, args);
}finally {
util.jdbcUtil.close(connection);
}
}
public T getBean(String sql, Object... args) throws SQLException {
Connection connection = null;
try {
connection = util.jdbcUtil.getConnection();
// 把结果集处理成一个对象
BeanHandler<T> handler = new BeanHandler<>(clazz);
return queryRunner.query(connection, sql, handler, args);
} finally {
util.jdbcUtil.close(connection);
}
}
public Object getValue(String sql, Object... args) throws SQLException {
Connection connection = null;
try {
connection = util.jdbcUtil.getConnection();
ScalarHandler scalarHandler = new ScalarHandler();
return queryRunner.query(connection, sql, scalarHandler, args);
} finally {
util.jdbcUtil.close(connection);
}
}
public int update(String sql, Object... args) throws SQLException {
Connection connection = null;
try {
connection = util.jdbcUtil.getConnection();
return queryRunner.update(connection, sql, args);
} finally {
util.jdbcUtil.close(connection);
}
}
}
| [
"ycfn97@gmail.com"
] | ycfn97@gmail.com |
99f94df61e6c2e07983f5b1ed3dd00c4a6715d62 | c1ed59512ecc0b2c18238ffd863f7616a9eba137 | /src/cAlgo/API/Indicators/TriangularMovingAverage.java | c690bf993e9f1cf2f65fe0d8a4ab151305d36947 | [] | no_license | Javonet-io-user/d2ceb668-0ca8-4b1d-9ba1-9949d42e9e68 | 4a2232d8de996c1f1540d978818e71424de00f9c | bb9061b11b7cc45888d57c540e13f478239c0837 | refs/heads/master | 2020-06-17T04:59:07.267546 | 2019-07-08T12:12:11 | 2019-07-08T12:12:11 | 195,805,012 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 897 | java | package cAlgo.API.Indicators;
import Common.Activation;
import static Common.JavonetHelper.Convert;
import static Common.JavonetHelper.getGetObjectName;
import static Common.JavonetHelper.getReturnObjectName;
import static Common.JavonetHelper.ConvertToConcreteInterfaceImplementation;
import Common.JavonetHelper;
import Common.MethodTypeAnnotation;
import com.javonet.Javonet;
import com.javonet.JavonetException;
import com.javonet.JavonetFramework;
import com.javonet.api.NObject;
import com.javonet.api.NEnum;
import com.javonet.api.keywords.NRef;
import com.javonet.api.keywords.NOut;
import com.javonet.api.NControlContainer;
import java.util.concurrent.atomic.AtomicReference;
import java.util.Iterator;
import java.lang.*;
import cAlgo.API.Indicators.*;
import cAlgo.API.Internals.*;
public interface TriangularMovingAverage extends MovingAverage, IIndicator {}
| [
"support@javonet.com"
] | support@javonet.com |
2f7bf0e8d8eda5fd6046ef31687150fd6e17fb71 | d44eff1971c4eb09ff128d34690855803f95d6eb | /src/test/java/com/small/spring/aop/LoggerInterceptor.java | 9db74158d893c1d670c1c0a9d01860deb4db2de0 | [] | no_license | Fi-Null/small-spring | 9c900f026572c29657966182440816a4f34f480b | 7ba0b77f64a81a65e7ea2b88c1e03a59e9011461 | refs/heads/master | 2021-07-12T19:22:17.726666 | 2019-10-10T16:31:57 | 2019-10-10T16:31:57 | 209,090,663 | 0 | 0 | null | 2020-10-13T16:37:08 | 2019-09-17T15:28:14 | Java | UTF-8 | Java | false | false | 560 | java | package com.small.spring.aop;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
/**
* @author null
* @version 1.0
* @title
* @description
* @createDate 10/8/19 5:20 PM
*/
public class LoggerInterceptor implements MethodInterceptor {
@Override
public Object invoke(MethodInvocation methodInvocation) throws Throwable {
System.out.println("logger start!");
Object proceed = methodInvocation.proceed();
System.out.println("logger end ");
return proceed;
}
} | [
"xiangke@imdada.cn"
] | xiangke@imdada.cn |
c063bd10cc9c3eb0e4acc760c728d7819413035a | 104ace4eca68e903d5b5a21e7d4831c9342d9f6a | /request-handler/src/test/java/eu/novi/federation/SliceConfigurationTest.java | 0133d65280af43411929a38072dec3e6cd90e986 | [] | no_license | vitorsfarias/novi-public | 136c8822acaf1c34c42cdc07090fa3c41ad4113c | 0932550a42ba1ca634225ccb3a4748336e69e022 | refs/heads/master | 2020-04-06T04:40:51.874424 | 2013-04-04T17:33:56 | 2013-04-04T17:33:56 | 68,409,912 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,251 | java | package eu.novi.federation;
/**
* Unit test case for slice configuration.
*
* @author <a href="mailto:blazej.pietrzak@man.poznan.pl">Blazej Pietrzak</a>
*
*/
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import eu.novi.resources.Resource;
public class SliceConfigurationTest {
protected Slice slice;
protected Resource resource1, resource2;
protected FederatedTestbed federatedTestbed;
@Before
public void givenSliceWithResources() throws Exception {
slice = new Slice();
resource1 = mock(Resource.class);
resource2 = mock(Resource.class);
slice.addResource(resource1);
slice.addResource(resource2);
federatedTestbed = mock(FederatedTestbed.class);
slice.configure(federatedTestbed);
}
@After
public void tearDown() throws Exception {
slice = null;
resource1 = null;
resource2 = null;
federatedTestbed = null;
}
@Test
public void checkFederatedTestbedConfigured() {
verify(federatedTestbed).configure(slice);
}
@Test
public void checkResource1Configured() {
verify(resource1).configure();
}
@Test
public void checkResource2Configured() {
verify(resource2).configure();
}
}
| [
"pikusa@man.poznan.pl"
] | pikusa@man.poznan.pl |
019b442110b6b48aee17efb8d9cc691d5fb48303 | e5b84002cb0224e689e97632a656130248d25047 | /elibrary/src/main/java/com/elibrary/dao/ElibraryDao.java | d8447fb708f57ac07d52745aa152c287061877b6 | [] | no_license | aadvikm/JAVA_J2EE_REPO | 4a254fda12c6a30b098ac0e04a54f4ee18cfd464 | 689fcfbcea739440795b43ef578b6312a2c144d3 | refs/heads/master | 2020-03-25T07:50:20.677504 | 2018-09-14T04:35:32 | 2018-09-14T04:35:32 | 143,584,253 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,581 | java | package com.elibrary.dao;
import java.util.ArrayList;
import com.elibrary.domain.AdminEntity;
import com.elibrary.domain.BookDetail;
import com.elibrary.domain.BookEntity;
import com.elibrary.domain.IssueBookDetail;
import com.elibrary.domain.LibrarianEntity;
import com.elibrary.domain.StudentBookEntity;
import com.elibrary.domain.StudentDetail;
import com.elibrary.domain.ViewIssuedBook;
public interface ElibraryDao {
/** Admin Dao**/
public AdminEntity saveAdmin(AdminEntity adminEntity) throws Exception;
public AdminEntity updateAdmin(AdminEntity adminEntity) throws Exception;
public AdminEntity getAdmin(Long adminId) throws Exception;
public void deleteAdmin(AdminEntity adminEntity) throws Exception;
/**Librarian Dao **/
public LibrarianEntity saveLibrarian(LibrarianEntity librarianEntity) throws Exception;
public LibrarianEntity updateLibrarian(LibrarianEntity librarianEntity) throws Exception;
public LibrarianEntity getLibrarian(Long librarianId) throws Exception;
public void deleteLibrarian(LibrarianEntity librarianEntity) throws Exception;
public AdminEntity getAdminEntityByUserId(String userId) throws Exception;
public ArrayList<LibrarianEntity> getAllLibrarianEntities() throws Exception;
public LibrarianEntity getLibrarianEntityByUserId(String userId) throws Exception;
/*Book Dao*/
public BookEntity saveBook(BookEntity bookEntity) throws Exception;
public BookEntity updateBook(BookEntity bookEntity) throws Exception;
public BookEntity getBook(Long bookId) throws Exception;
public void deleteBook(BookEntity bookEntity) throws Exception;
public ArrayList<BookDetail> getAllBooks() throws Exception;
public ArrayList<StudentDetail> getAllStudents() throws Exception;
public IssueBookDetail getBookAndStudentList() throws Exception;
/*Student Book Dao*
*/
public int getRemaingCount(Long bookId) throws Exception;
public StudentBookEntity saveStudentBook(StudentBookEntity studentBookEntity) throws Exception;
public StudentBookEntity updateStudentBook(StudentBookEntity studentBookEntity) throws Exception;
public StudentBookEntity getStudentBook(Long studentBookId) throws Exception;
public void deleteStudentBook(StudentBookEntity studentBookEntity) throws Exception;
public ArrayList<ViewIssuedBook> getAllIssuedBooks() throws Exception;
public ViewIssuedBook returnBookFormDetail(Long studentBookId) throws Exception;
public void returningBook(Long studentBookId) throws Exception;
}
| [
"Brindha@192.168.0.17"
] | Brindha@192.168.0.17 |
f5f7600f11448cbccee887980d7ec4ad76c2a3ec | 6253283b67c01a0d7395e38aeeea65e06f62504b | /decompile/app/Gallery2/src/main/java/com/huawei/hwid/api/common/apkimpl/p.java | 1a804655cc6b8503b678fa9de995bdac0c52027a | [] | no_license | sufadi/decompile-hw | 2e0457a0a7ade103908a6a41757923a791248215 | 4c3efd95f3e997b44dd4ceec506de6164192eca3 | refs/heads/master | 2023-03-15T15:56:03.968086 | 2017-11-08T03:29:10 | 2017-11-08T03:29:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 476 | java | package com.huawei.hwid.api.common.apkimpl;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
class p implements OnClickListener {
final /* synthetic */ OtaDownloadActivity a;
p(OtaDownloadActivity otaDownloadActivity) {
this.a = otaDownloadActivity;
}
public void onClick(DialogInterface dialogInterface, int i) {
this.a.f.a(true);
this.a.f.dismiss();
this.a.finish();
}
}
| [
"liming@droi.com"
] | liming@droi.com |
28135dc19e0ec9aac432ad54e417d924d632d48d | 9178cd2a07e182aabce6de3f0976a8fd61e1e991 | /src/main/java/org/serialization1/DeserializationTest.java | a46ee4e95853cce65a338adcbdca42ba5b268251 | [] | no_license | romanm/interview1 | 50fe826ec0e6e116277954e152890dc671539c5b | f5936478425e389fa33502563309866e47bdf0cb | refs/heads/master | 2016-09-06T14:52:35.096532 | 2014-04-03T12:53:35 | 2014-04-03T12:53:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 538 | java | package org.serialization1;
import java.io.IOException;
public class DeserializationTest {
public static void main(String[] args) {
// String fileName="employee.ser";
String fileName="/home/roman/tmp/employee.ser";
Employee empNew = null;
try {
empNew = (Employee) SerializationUtil.deserialize(fileName);
} catch (ClassNotFoundException | IOException e) {
e.printStackTrace();
}
System.out.println("empNew Object::"+empNew);
}
} | [
"roman.mishchenko@gmail.com"
] | roman.mishchenko@gmail.com |
c5173ab269386c79ba6fe8c5ed3d6ff226329674 | 4c6adf0ce6ef3f02dcef9c345e0e5e4ff139d886 | /Core/fi-txncore/src/main/java/com/pay/txncore/newpaymentprocess/processvo/SendChannelVo.java | 15cb0af1dde7759ed02937a97db27779879de26d | [] | no_license | happyjianguo/pay-1 | 8631906be62707316f0ed3eb6b2337c90d213bc0 | 40ae79738cfe4e5d199ca66468f3a33e9d8f2007 | refs/heads/master | 2020-07-27T19:51:54.958859 | 2016-12-19T07:34:24 | 2016-12-19T07:34:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,457 | java | package com.pay.txncore.newpaymentprocess.processvo;
import java.util.Map;
/**
* Created by cuber.huang on 2016/7/24.
*/
public class SendChannelVo {
private String orgMerchantCode;//我们在渠道的商户号
private String orgKey;//我们在机构号的密钥
private String orderAmount;//送到渠道的订单金额
private String currencyCode;//送到渠道的币种
private Map<String, String> channel2front;//渠道送给前置的必要参数,如收银台等;
private String goodNams;//订单名称
private String sellerName;//用户打钱显示的卖家账户
private String channelOrderNo;//渠道订单ID;
private String preServerUrl;//送给的渠道前缀
private String orgCode;
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getPreServerUrl() {
return preServerUrl;
}
public void setPreServerUrl(String preServerUrl) {
this.preServerUrl = preServerUrl;
}
public String getSellerName() {
return sellerName;
}
public void setSellerName(String sellerName) {
this.sellerName = sellerName;
}
public String getGoodNams() {
return goodNams;
}
public void setGoodNams(String goodNams) {
this.goodNams = goodNams;
}
public String getOrgMerchantCode() {
return orgMerchantCode;
}
public void setOrgMerchantCode(String orgMerchantCode) {
this.orgMerchantCode = orgMerchantCode;
}
public String getOrgKey() {
return orgKey;
}
public void setOrgKey(String orgKey) {
this.orgKey = orgKey;
}
public String getOrderAmount() {
return orderAmount;
}
public void setOrderAmount(String orderAmount) {
this.orderAmount = orderAmount;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
public Map<String, String> getChannel2front() {
return channel2front;
}
public void setChannel2front(Map<String, String> channel2front) {
this.channel2front = channel2front;
}
public String getChannelOrderNo() {
return channelOrderNo;
}
public void setChannelOrderNo(String channelOrderNo) {
this.channelOrderNo = channelOrderNo;
}
}
| [
"stanley.zou@hrocloud.com"
] | stanley.zou@hrocloud.com |
4deea52fb42922dd490c29e7bbf15b469fca48ca | ae2094e2b589076ed8ef43d5194da83a6bb4eec2 | /src/main/java/jetbrick/template/parser/code/ScopeCode.java | 8e8b87521db439b5f291a7ad9fb2f490c19a6b08 | [
"Apache-2.0"
] | permissive | subchen/jetbrick-template-1x | 2f188763620cc23f4c73c6fdc742c4145c126950 | fee655c8ecbe7ed5e896445ee95bd6391156cc89 | refs/heads/master | 2023-06-15T20:25:09.105522 | 2015-04-02T10:11:46 | 2015-04-02T10:11:46 | 13,928,923 | 14 | 3 | null | null | null | null | UTF-8 | Java | false | false | 3,482 | java | /**
* jetbrick-template
* http://subchen.github.io/jetbrick-template/
*
* Copyright 2010-2014 Guoqiang Chen. All rights reserved.
* Email: subchen@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jetbrick.template.parser.code;
import java.util.HashMap;
import java.util.Map;
import jetbrick.template.parser.support.TypedKlass;
/**
* 带作用域的 Code
*/
public class ScopeCode extends Code {
protected final ScopeCode parent; // 父作用域
protected final String indent;
protected final Map<String, TypedKlass> symbols; // 定义的符号表
protected Code bodyCode;
public ScopeCode(ScopeCode parent, String indent) {
this.parent = parent;
this.indent = indent;
this.symbols = new HashMap<String, TypedKlass>();
}
// 查找已经定义的变量类型
public TypedKlass resolve(String name, boolean deep) {
TypedKlass klass = symbols.get(name);
if (klass != null) {
return klass;
}
if (!deep && this instanceof MethodCode) return null;
if (parent != null) {
klass = parent.resolve(name, deep);
}
return klass;
}
// 尝试在当前作用域下定义一个变量,如果已经定义,则返回 false
public boolean define(String name, TypedKlass typedKlass) {
return define(name, typedKlass, false);
}
// 尝试在当前作用域下定义一个变量,如果已经定义,则返回 false
public boolean define(String name, TypedKlass typedKlass, boolean isGlobalContext) {
if (resolve(name, false) != null) {
return false;
}
symbols.put(name, typedKlass);
if (isGlobalContext) {
// 注意:不光要当前的作用域定义,也要在Global作用域定义,防止后面重定义
lookupMethodCode().addContext(name, typedKlass);
}
return true;
}
/**
* 向上查找 MethodCode
*/
private MethodCode lookupMethodCode() {
ScopeCode c = this;
while (c != null) {
if (c instanceof MethodCode) {
return (MethodCode) c;
}
c = c.parent;
}
return null;
}
public ScopeCode push() {
return new ScopeCode(this, indent + " ");
}
public ScopeCode pop() {
return parent;
}
public BlockCode createBlockCode(int initialCapacity) {
return new BlockCode(initialCapacity, indent);
}
public LineCode createLineCode(String source) {
return new LineCode(indent + source + "\n");
}
public TagCode createTagCode() {
return new TagCode(this, indent);
}
public MacroCode createMacroCode() {
return new MacroCode(this);
}
public void setBodyCode(Code code) {
this.bodyCode = code;
}
@Override
public String toString() {
return bodyCode.toString();
}
}
| [
"subchen@gmail.com"
] | subchen@gmail.com |
24993bc6c82651201d6885e2fc8429ac46033aa7 | 74ae24d049cfcab4f477dde92367094890aec688 | /components/project_phases/src/java/tests/com/topcoder/project/phases/template/DemoNewTests.java | 800490f29d172c1aca887eace81af9aef4ea44f5 | [] | no_license | appirio-tech/direct-app | 8fa562f769db792eb244948f0d375604ac853ef1 | 002aa5e67064a85ed9752d651d86403b1268cf38 | refs/heads/dev | 2023-08-09T20:01:29.514463 | 2022-12-21T01:19:53 | 2022-12-21T01:19:53 | 23,885,120 | 21 | 78 | null | 2022-12-21T01:41:11 | 2014-09-10T17:49:11 | Java | UTF-8 | Java | false | false | 4,657 | java | /*
* Copyright (C) 2007 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.project.phases.template;
import java.util.Date;
import com.topcoder.date.workdays.DefaultWorkdays;
import com.topcoder.project.phases.template.converter.ConverterUtility;
import com.topcoder.project.phases.template.persistence.DBPhaseTemplatePersistence;
import com.topcoder.project.phases.template.startdategenerator.RelativeWeekTimeStartDateGenerator;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* <p>
* The unit test class used for this component demonstration on its new functionality in version 1.1 .
* </p>
*
* @author TCSDEVELOPER
* @version 1.1
*/
public class DemoNewTests extends TestCase {
/**
* <p>
* Configuration file.
* </p>
*/
private static final String CONFIG_FILE = "test_files/config/Project_Phase_Template_Config.xml";
/**
* <p>
* Sets up test environment.
* </p>
*
* @throws Exception to JUnit
*/
protected void setUp() throws Exception {
// load the ConfigurationObject from the input file
Helper.loadConfig(CONFIG_FILE);
TestHelper.initializeDB();
}
/**
* <p>
* Tears down test environment.
* </p>
*
* @throws Exception to JUnit
*/
protected void tearDown() throws Exception {
TestHelper.clearDB();
Helper.clearConfig();
}
/**
* <p>
* Returns all tests.
* </p>
*
* @return all tests
*/
public static Test suite() {
return new TestSuite(DemoNewTests.class);
}
/**
* <p>
* Tests for the demo usage of DBPhaseTemplatePersistence and DefaultPhaseTemplate's new method.
* </p>
* @throws Exception to JUnit
*/
public void testDBPhaseTemplatePersistenceDemo() throws Exception {
// 1. Create the PhaseTemplate instance with use of specific
// DBPhaseTemplatePersistence and StartDateGenerator
// create DBPhaseTemplatePersistence instance
PhaseTemplatePersistence persistence = new DBPhaseTemplatePersistence("com.topcoder.project.phases.template."
+ "persistence.DBPhaseTemplatePersistence");
// create StartDateGenerator instance
StartDateGenerator startDateGenerator = new RelativeWeekTimeStartDateGenerator(
"com.topcoder.project.phases.template." + "startdategenerator.RelativeWeekTimeStartDateGenerator");
// create PhaseTemplate instance with the persistence and startDateGenerator
DefaultPhaseTemplate template =
new DefaultPhaseTemplate(persistence, startDateGenerator, new DefaultWorkdays());
// 2 Retrieve names of all available templates from specific category
// retrieve names of all available templates from category 2
String[] templateNames = template.getAllTemplateNames(2);
for (int i = 0; i < templateNames.length; ++i) {
System.out.println(templateNames[i]);
}
// 3 Retrieve the name of the default template for specific category
// retrieve the name of the default template for category 2
String templateName = template.getDefaultTemplateName(2);
System.out.println(templateName);
// 4 Retrieve template information
// retrieve the category of the template with name "New_Design"
int category = template.getTemplateCategory("New_Design");
System.out.println("category: " + category);
// retrive the description of the template with name "New_Design"
String description = template.getTemplateDescription("New_Design");
System.out.println("description: " + description);
// retrive the creation date of the template with name "New_Design"
Date creationDate = template.getTemplateCreationDate("New_Design");
System.out.println("creation date: " + creationDate);
// 5 Delete a template from database
// create DBPhaseTemplatePersistence instance
DBPhaseTemplatePersistence dbPersistence = new DBPhaseTemplatePersistence(
"com.topcoder.project.phases.template." + "persistence.DBPhaseTemplatePersistence");
// delete the template with name "New_Design"
dbPersistence.removeTemplate("New_Design");
}
/**
* <p>
* Tests for the demo usage of migration utility ConverterUtility.
* </p>
*/
public void testUtilityDemo() {
ConverterUtility.main(new String[] {"-i",
"com.topcoder.project.phases.template.persistence.DemoXmlPhaseTemplatePersistence"});
}
}
| [
"hohosky@gmail.com"
] | hohosky@gmail.com |
332d0aa1b16313b8fc116a83de0b67d270ddc75a | dc7c4d3a01171e47973be3f87e64b2c863a0a2cd | /PXCore/src/main/java/com/pingxundata/pxcore/services/ScreenParam.java | 0a8cb09e6ba381eba599b153ac45503d0f32eed8 | [] | no_license | Away-Leo/PXCore | 84a22c399b084e40e06cb28bbc0958b9a9a1dae6 | 0f075a5dcdb058e2b0059b36bca11ed546ed3294 | refs/heads/master | 2021-09-22T10:23:12.477927 | 2018-09-08T07:08:40 | 2018-09-08T07:08:40 | 103,481,533 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,253 | java | package com.pingxundata.pxcore.services;
import android.app.Activity;
import android.content.Context;
import android.util.DisplayMetrics;
import android.util.Log;
/**
* 获取屏幕参数
*
* @author rcm
*
*/
public class ScreenParam {
public static int width;
public static int height;
public static int densityDpi;
public static float density;
private static Activity sActivity;
private static ScreenParam sInstance;
public synchronized static void init(Activity activity) {
sActivity = activity;
sInstance = new ScreenParam(sActivity);
}
public static ScreenParam getInstance() {
if (sInstance == null) {
sInstance = new ScreenParam(sActivity);
}
return sInstance;
}
private ScreenParam(Context context) {
DisplayMetrics metric = new DisplayMetrics();
if (sActivity != null) {
sActivity.getWindowManager().getDefaultDisplay().getMetrics(metric);
width = metric.widthPixels; // 屏幕宽度(像素)
height =metric.heightPixels; // 屏幕高度(像素)
density = metric.density; // 屏幕密度(0.75 / 1.0 / 1.5)
densityDpi = metric.densityDpi; // 屏幕密度DPI(120 / 160 / 240)
Log.e("通知", "den="+density+"denDpi="+densityDpi+"w:"+width+"h:"+height);
}
}
}
| [
"781720639@qq.com"
] | 781720639@qq.com |
49c412c562e9f6b1bf8faf190612d65a2a88c1d7 | 8da06d3ad989d0092d7761a81f2ec184e0989f7d | /d2cmall-provider/d2cmall-product/d2cmall-product-provider/src/main/java/com/d2c/product/dao/ProductTagMapper.java | 85950a6ef5c58ecbf7c4759e2afd71513c48b2c4 | [] | no_license | RoJinnSennSei/my_mall | e5234c631a30b17f2ffbfd4614ef9e8dc04a9869 | dbec98edac0e679906668be1d5f37ea13f46975b | refs/heads/master | 2020-04-08T15:48:40.090961 | 2018-11-14T10:04:36 | 2018-11-14T10:04:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,091 | java | package com.d2c.product.dao;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.d2c.common.api.page.PageModel;
import com.d2c.mybatis.mapper.SuperMapper;
import com.d2c.product.model.ProductTag;
import com.d2c.product.query.ProductTagSearcher;
public interface ProductTagMapper extends SuperMapper<ProductTag> {
List<ProductTag> findByProductId(Long productId);
int countBySearch(@Param("searcher") ProductTagSearcher searcher);
List<ProductTag> findBySearch(@Param("searcher") ProductTagSearcher searcher, @Param("pager") PageModel page);
int delete(Long id);
int updateStatus(@Param("id") Long id, @Param("status") Integer status);
int countSynProductTags(@Param("lastSysDate") Date lastSysDate);
List<ProductTag> findSynProductTags(@Param("lastSysDate") Date lastSysDate, @Param("pager") PageModel page);
List<ProductTag> findByType(String type);
int updateSort(@Param("id") Long id, @Param("sort") Integer sort);
List<ProductTag> findByIds(@Param("ids") Long[] ids);
ProductTag findOneFixByType(String type);
}
| [
"vicleo566@163.com"
] | vicleo566@163.com |
b1a6b607acce107205cfb31608d6f84210c329f1 | 78f7fd54a94c334ec56f27451688858662e1495e | /prrws/src/main/java/com/itgrids/model/RurbanComponent.java | bf50a0bc215ab1cbd4de61699de9f78ae400d3e4 | [] | no_license | hymanath/PA | 2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef | d166bf434601f0fbe45af02064c94954f6326fd7 | refs/heads/master | 2021-09-12T09:06:37.814523 | 2018-04-13T20:13:59 | 2018-04-13T20:13:59 | 129,496,146 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 869 | java | package com.itgrids.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "rurban_component")
public class RurbanComponent {
private Long rurbanComponentId;
private String componentName;
@Id
@Column(name="rurban_component_id")
@GeneratedValue(strategy= GenerationType.AUTO)
public Long getRurbanComponentId() {
return rurbanComponentId;
}
public void setRurbanComponentId(Long rurbanComponentId) {
this.rurbanComponentId = rurbanComponentId;
}
@Column(name="component_name")
public String getComponentName() {
return componentName;
}
public void setComponentName(String componentName) {
this.componentName = componentName;
}
}
| [
"itgrids@b17b186f-d863-de11-8533-00e0815b4126"
] | itgrids@b17b186f-d863-de11-8533-00e0815b4126 |
9b8b2b3ed3847aec5e177ef7cadb8dfeb17a4157 | 42cf7a96a8ce92194953947118a5afcc47f80ba9 | /src/main/java/br/ufpa/facomp/es/dojo/cartoes/domain/PersistentAuditEvent.java | 01bec5d6e03f5bc8109931d706c8fde55ba00eee | [] | no_license | ufpa-engenharia-software/projeto-dojo-cartoes-java | 29574a05c2a7bd4edc192add1330aa149ccf807f | 897a9156a2f41484406fee6206c3c39c14a6d0ed | refs/heads/master | 2022-12-27T01:31:45.593860 | 2020-10-09T19:48:35 | 2020-10-09T19:48:35 | 302,737,628 | 1 | 0 | null | 2020-10-09T19:48:36 | 2020-10-09T19:40:12 | Java | UTF-8 | Java | false | false | 2,546 | java | package br.ufpa.facomp.es.dojo.cartoes.domain;
import java.io.Serializable;
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
/**
* Persist AuditEvent managed by the Spring Boot actuator.
*
* @see org.springframework.boot.actuate.audit.AuditEvent
*/
@Entity
@Table(name = "jhi_persistent_audit_event")
public class PersistentAuditEvent implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "event_id")
private Long id;
@NotNull
@Column(nullable = false)
private String principal;
@Column(name = "event_date")
private Instant auditEventDate;
@Column(name = "event_type")
private String auditEventType;
@ElementCollection
@MapKeyColumn(name = "name")
@Column(name = "value")
@CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns = @JoinColumn(name = "event_id"))
private Map<String, String> data = new HashMap<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPrincipal() {
return principal;
}
public void setPrincipal(String principal) {
this.principal = principal;
}
public Instant getAuditEventDate() {
return auditEventDate;
}
public void setAuditEventDate(Instant auditEventDate) {
this.auditEventDate = auditEventDate;
}
public String getAuditEventType() {
return auditEventType;
}
public void setAuditEventType(String auditEventType) {
this.auditEventType = auditEventType;
}
public Map<String, String> getData() {
return data;
}
public void setData(Map<String, String> data) {
this.data = data;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof PersistentAuditEvent)) {
return false;
}
return id != null && id.equals(((PersistentAuditEvent) o).id);
}
@Override
public int hashCode() {
return 31;
}
// prettier-ignore
@Override
public String toString() {
return "PersistentAuditEvent{" +
"principal='" + principal + '\'' +
", auditEventDate=" + auditEventDate +
", auditEventType='" + auditEventType + '\'' +
'}';
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
7b40baabf21d1bd41539b96a0a0ae4a7096c958d | a221ca3e834a5e4aa7576928d781109b998cddc2 | /src/main/java/com/sdl/selenium/conditions/RenderCondition.java | 412e3b1df81902a2ba7508d687fc86e3cb773f69 | [] | no_license | vishalk90/Testy | ce35cab49675a6115f70004ab84fc3b4be5955ce | cd8872f232ce9bf61fb2de81502469e6cd27d5e0 | refs/heads/master | 2021-05-05T14:21:33.774175 | 2017-09-25T06:36:10 | 2017-09-25T06:36:10 | 105,148,962 | 0 | 1 | null | 2017-09-28T13:03:11 | 2017-09-28T13:03:11 | null | UTF-8 | Java | false | false | 443 | java | package com.sdl.selenium.conditions;
import com.sdl.selenium.web.WebLocator;
/**
* Usage:
* <pre>
Condition condition = conditionManager.execute();
if(condition instanceof RenderCondition){
RenderCondition renderCondition = (RenderCondition)condition;
String result = renderCondition.getResultMessage(); //...
}
</pre>
*/
public interface RenderCondition extends ICondition {
WebLocator getComponent();
}
| [
"vculea@sdl.com"
] | vculea@sdl.com |
6b2fe4aaf9cd9e07b476702805b6ee3ae4486fc2 | 3d2beb9582ddc111136fbb01043c78d53e7a5777 | /common/src/main/java/com/hyman/common/util/PhoneUtil.java | e5a82fe067a542a506c39bee15b6ef86fa50109c | [] | no_license | hymanlew/SpringCloudDemo | b04d978d9095388767aac19cf76f42e0f7ef26ac | e908c4a6fa4842d0f19b838acb229252241fa922 | refs/heads/master | 2022-12-25T02:41:48.366603 | 2022-02-06T07:39:25 | 2022-02-06T07:39:25 | 185,054,782 | 0 | 0 | null | 2022-12-16T04:51:28 | 2019-05-05T16:18:23 | Java | UTF-8 | Java | false | false | 2,276 | java | package com.hyman.common.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
/**
* @Author
* @Date: 2018/8/6 11:37
* @Description:
*/
public class PhoneUtil {
/**
* 手机号验证
*
* @param phone
* @return
*/
public static boolean checkPhone(Long phone) {
if (phone == null) {
return false;
}
String str = String.valueOf(phone);
if (str.length() != 11) {
return false;
} else {
// Matcher m = phonePattern.matcher(str);
// boolean isMatch = m.matches();
// if (isMatch) {
// return true;
// } else {
// return false;
// }
return isPhoneLegal(str);
}
}
static Pattern phonePattern;
static {
String regex = "^1[345678]\\d{9}$";
phonePattern = Pattern.compile(regex);
}
/**
* 大陆号码或香港号码均可
*/
public static boolean isPhoneLegal(String str) throws PatternSyntaxException {
return isChinaPhoneLegal(str) || isHKPhoneLegal(str);
}
/**
* 正则:手机号(精确)
* <p>移动:134(0-8)、135、136、137、138、139、147、150、151、152、157、158、159、178、182、183、184、187、188、198</p>
* <p>联通:130、131、132、145、155、156、175、176、185、186、166</p>
* <p>电信:133、153、173、177、180、181、189、199</p>
* <p>全球星:1349</p>
* <p>虚拟运营商:170</p>
* <p>2019年05月15日17:52:44 开放:171</p>
*/
public static boolean isChinaPhoneLegal(String str) throws PatternSyntaxException {
String regExp = "^1[3456789]\\d{9}$";
Pattern p = Pattern.compile(regExp);
Matcher m = p.matcher(str);
boolean matches = m.matches();
return matches;
}
/**
* 香港手机号码8位数,5|6|8|9开头+7位任意数
*/
public static boolean isHKPhoneLegal(String str) throws PatternSyntaxException {
String regExp = "^(5|6|8|9)\\d{7}$";
Pattern p = Pattern.compile(regExp);
Matcher m = p.matcher(str);
return m.matches();
}
}
| [
"hyman@163.com"
] | hyman@163.com |
d5c5e0e8cc9a47256ccc06adc0405da55c4e52e8 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Lang/3/org/apache/commons/lang3/time/FastDateParser_FastDateParser_97.java | 6bf0ef646859ccead82d49cb6030a5ba45c675fa | [] | 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,788 | java |
org apach common lang3 time
fast date parser fastdatepars fast thread safe version
link java text simpl date format simpledateformat
direct replac
code simpl date format simpledateformat code pars situat
multi thread server environ
code simpl date format simpledateformat code thread safe jdk version
sun close
href http bug sun bugdatabas view bug bug bug rfe
pars support pattern compat
simpl date format simpledateformat
time test fast simpl date format simpledateformat
singl thread applic faster multi thread applic
note code handl gregorian calendar gregorian
calendar simpl date format simpledateformat intern slower
japanes imperi
variant thai buddhist
fast date parser fastdatepars date parser datepars serializ
construct fast date parser fastdatepars
param pattern link java text simpl date format simpledateformat compat
pattern
param time zone timezon time zone
param local local
fast date parser fastdatepars string pattern time zone timezon time zone timezon local local
pattern pattern
time zone timezon time zone timezon
local local
init
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
bbf4aca6c0d4123d6aa1515125d02bfc1db7b00e | 0db76d25cdc94218a1c2fd97ce371df42292307d | /src/main/java/com/cricinfo/templateutility/RestTemplateUtility.java | 8b00cc10f65e007756fe5ca2920c1a328712d69e | [] | no_license | Gunavardhan/cricbuzz | 7650b46459bdaf6ab2c1a309cdc718945a424728 | 55b9496f1fa40c9854c95012b1be7d4ce15e76c6 | refs/heads/master | 2020-03-26T19:38:15.528742 | 2018-08-19T06:15:37 | 2018-08-19T06:15:37 | 145,277,126 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,214 | java | package com.cricinfo.templateutility;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.HttpStatusCodeException;
import org.springframework.web.client.RestTemplate;
public class RestTemplateUtility {
public static String triggerService(String jsonReqObj, String URL, HttpMethod post, MediaType type) {
RestTemplate template = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.setContentType(type);
HttpEntity<String> entity = new HttpEntity<String>(jsonReqObj, headers);
String body = "";
try{
ResponseEntity<String> response = template.exchange(URL, post, entity, String.class);
body = response.getBody();
System.out.println("Response : " + body);
return body;
}catch(HttpStatusCodeException httpException){
System.out.println("HttpStatusCode : " + httpException.getRawStatusCode());
body = httpException.getResponseBodyAsString();
System.out.println("Failed Response Body : " + body);
return body;
}
}
}
| [
"Dell@Dell-PC"
] | Dell@Dell-PC |
52f8b2899903de56e0c501cc81541c1ec2ba2203 | 8361ce420f289b04daef8a3ab1cbe45a25b2454d | /HB-Proj096-Anno-ManyToMany-IDBag/src/main/java/com/nt/entity/Patient.java | bd0bc0b8e626f6b181a9c3b0448df7712be3aba6 | [] | no_license | sapkalskd/HibernateFrameWorkWS | 6115b3e344d4ca5e1a577b20abaace12535ab25c | e0748a58d6942b8cc2985d2e7d760a9ae5be16e7 | refs/heads/master | 2020-11-27T05:05:26.697908 | 2019-08-04T14:52:18 | 2019-08-04T14:52:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,802 | java | package com.nt.entity;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import org.hibernate.annotations.CollectionId;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;
import lombok.Getter;
import lombok.Setter;
@Entity
@Table(name="M2M_ANNO_PATIENT1")
@Getter
@Setter
public class Patient implements Serializable{
@Id
@SequenceGenerator(name="gen1",sequenceName="pat_seq",initialValue=1,allocationSize=1)
@GeneratedValue(generator="gen1",strategy=GenerationType.SEQUENCE)
@Column(length=9)
@Type(type="int")
private int patId;
@Column(length=10)
@Type(type="string")
private String patName;
@Column(length=10)
@Type(type="string")
private String disease;
@ManyToMany(targetEntity=Doctor.class,
cascade=CascadeType.ALL,
fetch=FetchType.LAZY)
@JoinTable(name="M2M_ANNO_DOC_PAT1",
joinColumns=@JoinColumn(name="patient_id",referencedColumnName="patId"),
inverseJoinColumns=@JoinColumn(name="doctor_id",referencedColumnName="docId"))
@GenericGenerator(name="gen2",strategy="increment")
@CollectionId(columns = @Column(name="doc_pat_index",length=10) , generator = "gen2", type = @Type(type="int"))
private List<Doctor> doctors=new ArrayList<Doctor>();
}
| [
"varunraj2297@gmail.com"
] | varunraj2297@gmail.com |
0e8f85664094b80c8cdc2635e4ad96f3e329490d | 6831a854ade3b85888b29298270b2371ba2221f1 | /web/src/main/java/com/jdy/b2b/web/controll/require/RequireController.java | 624b25e38c9a986ce4f0dce25b9857608c19e465 | [] | no_license | meiwulang/spring-boot-distributed | 709787c98c47059dfea36130f09b864970101246 | 428a3152e260299e09bfe7657290af3384a2f8b7 | refs/heads/master | 2020-03-18T05:40:31.678087 | 2018-05-28T08:57:30 | 2018-05-28T08:57:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,757 | java | package com.jdy.b2b.web.controll.require;
import com.jdy.b2b.web.pojo.log.MyLog;
import com.jdy.b2b.web.pojo.product.ProductVO;
import com.jdy.b2b.web.pojo.require.*;
import com.jdy.b2b.web.util.BaseController;
import com.jdy.b2b.web.util.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @Description 定制游控制层
* @author 王斌
* @date 2017年12月19日 上午11:54:16
* @version V1.0
*/
@Api(value = "require")
@RestController
@RequestMapping("require")
@SuppressWarnings("unchecked")
public class RequireController extends BaseController{
@PostMapping("project/save")
@MyLog
public ResultBean<Object> save(@RequestBody @Validated DesignProject vo) {
return restTemplate.postForObject(new StringBuilder(controllCenterUrl).append("require/project/save").toString(),vo,ResultBean.class);
}
@PostMapping("status/update")
@MyLog
public ResultBean<Object> updateStatus(@RequestBody @Validated RequireTypeUpdateVO vo) {
return restTemplate.postForObject(new StringBuilder(controllCenterUrl).append("require/status/update").toString(),vo,ResultBean.class);
}
@ApiOperation(value = "新增需求")
@PostMapping("saveRequire")
public ResultBean saveRequire(@RequestBody RequireSaveVO vo) {
return restTemplate.postForObject(new StringBuilder(controllCenterUrl).append("require/saveRequire").toString(), vo, ResultBean.class);
}
@ApiOperation(value = "新增改进需求")
@PostMapping("saveNewRequire")
public ResultBean saveNewRequire(@RequestBody RequireSaveVO vo) {
return restTemplate.postForObject(new StringBuilder(controllCenterUrl).append("require/saveNewRequire").toString(), vo, ResultBean.class);
}
@ApiOperation(value = "历史方案需求列表")
@GetMapping("historyDesignRequireList/{dId}")
public ResultBean historyDesignRequireList(@PathVariable Long dId) {
return restTemplate.getForObject(new StringBuilder(controllCenterUrl).append("require/historyDesignRequireList/").append(dId).toString(), ResultBean.class);
}
@ApiOperation(value = "获取定制(需求)列表")
@PostMapping("/queryRequireList")
public ResultBean queryRequireList(@RequestBody RequireVO vo){
if (!vo.getPuDataLimit().equals(Integer.valueOf(3))){
vo.setCompanyId(vo.getPcompanyId());
}
return restTemplate.postForObject(new StringBuilder(controllCenterUrl).append("require/queryRequireList").toString(),vo,ResultBean.class);
}
@ApiOperation(value = "获取 需求详情")
@PostMapping("/queryRequireDetail")
public ResultBean queryRequireDetail(@RequestBody RequireVO vo){
return restTemplate.postForObject(new StringBuilder(controllCenterUrl).append("require/queryRequireDetail").toString(),vo,ResultBean.class );
}
@ApiOperation(value = "获取 方案详情")
@PostMapping("/queryProjectDetail")
public ResultBean queryProjectDetail(@RequestBody DesignProjectVO vo){
return restTemplate.postForObject(new StringBuilder(controllCenterUrl).append("require/queryProjectDetail").toString(),vo,ResultBean.class );
}
@ApiOperation(value = "保存关联")
@PostMapping("/saveDesignProduct")
public ResultBean saveDesignProduct(@RequestBody DesignProduct vo){
vo.setCreateUser(getUser().getUserId());
return restTemplate.postForObject(new StringBuilder(controllCenterUrl).append("designProduct/save").toString(),vo,ResultBean.class );
}
@ApiOperation(value = "获取产品")
@PostMapping("/searchProduct")
public ResultBean searchProduct(@RequestBody SearchProduct vo){
return restTemplate.postForObject(new StringBuilder(controllCenterUrl).append("designProduct/searchProduct").toString(),vo,ResultBean.class );
}
}
| [
"418180062@qq.com"
] | 418180062@qq.com |
10abf89709a256f23b3ab90af593334457f8305f | 5c61f378cd9add2f8c89254bc8cddfcbea287d8b | /src/main/java/co/sblock/commands/admin/LordEnglishCommand.java | f6f307d3caa8c1cf3da0b8b08f7ee37184873986 | [] | no_license | Rkingr/Easterlyn | 7d2d7ad8afb2ed666f6a77cfe93841b487e77822 | a77187439799a747cb91967443c2013721e64db8 | refs/heads/master | 2020-11-29T15:20:12.113378 | 2017-01-24T19:05:07 | 2017-01-27T14:20:29 | 87,484,260 | 0 | 0 | null | 2017-04-06T23:28:51 | 2017-04-06T23:28:51 | null | UTF-8 | Java | false | false | 1,198 | java | package co.sblock.commands.admin;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import co.sblock.Sblock;
import co.sblock.chat.Color;
import co.sblock.commands.SblockCommand;
/**
* SblockCommand for being Lord English.
*
* @author Jikoo
*/
public class LordEnglishCommand extends SblockCommand {
public LordEnglishCommand(Sblock plugin) {
super(plugin, "le");
this.setDescription("&4He's already here!");
this.setUsage("/le <text>");
this.setPermissionLevel("horrorterror");
this.setPermissionMessage("&0Le no. Le /le is reserved for le fancy people.");
}
@Override
protected boolean onCommand(CommandSender sender, String label, String[] args) {
StringBuilder msg = new StringBuilder();
for (int i = 0; i < args.length; i++) {
msg.append(args[i].toUpperCase()).append(' ');
}
StringBuilder leOut = new StringBuilder();
for (int i = 0; i < msg.length();) {
for (int j = 0; j < Color.RAINBOW.length; j++) {
if (i >= msg.length())
break;
leOut.append(Color.RAINBOW[j]).append(msg.charAt(i));
i++;
}
}
Bukkit.broadcastMessage(leOut.substring(0, leOut.length() - 1 > 0 ? leOut.length() - 1 : 0));
return true;
}
}
| [
"Jikoo.Games@gmail.com"
] | Jikoo.Games@gmail.com |
335d3b5dd91f1ddbbb06604e2f9ed84e0e92fb5c | 4a6a9d22bb759dd56d44f7d592bd7bfaf696289f | /x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/CatagoryInfoService.java | d210d92466b04dfb12041c76d6ed5bb5876bc7a4 | [
"MIT"
] | permissive | hq1980/o2oa | ff665c70621f035d0cd1110b71f2cd4f92686972 | 12bdca9149bbe8f377622ca0a5a861362999cde5 | refs/heads/master | 2021-01-22T09:10:29.309611 | 2017-02-14T07:17:03 | 2017-02-14T07:17:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,370 | java | package com.x.cms.assemble.control.service;
import java.util.List;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.entity.annotation.CheckPersistType;
import com.x.base.core.entity.annotation.CheckRemoveType;
import com.x.cms.assemble.control.Business;
import com.x.cms.core.entity.AppInfo;
import com.x.cms.core.entity.CatagoryInfo;
public class CatagoryInfoService {
public List<CatagoryInfo> list(EntityManagerContainer emc, List<String> ids) throws Exception {
if( ids == null || ids.isEmpty() ){
return null;
}
Business business = new Business( emc );
return business.getCatagoryInfoFactory().list( ids );
}
public CatagoryInfo get( EntityManagerContainer emc, String id ) throws Exception {
if( id == null || id.isEmpty() ){
return null;
}
return emc.find(id, CatagoryInfo.class );
}
public List<String> listByAppId( EntityManagerContainer emc, String appId ) throws Exception {
if( appId == null || appId.isEmpty() ){
return null;
}
Business business = new Business( emc );
return business.getCatagoryInfoFactory().listByAppId( appId );
}
public List<String> listNoPermissionCatagoryInfoIds( EntityManagerContainer emc) throws Exception {
List<String> ids = null;
Business business = new Business( emc );
ids = business.getAppCatagoryPermissionFactory().listAllCatagoryInfoIds();
return business.getCatagoryInfoFactory().listNoPermissionCatagoryInfoIds( ids );
}
public List<String> listNoPermissionCatagoryIds(EntityManagerContainer emc, String appId) throws Exception {
List<String> ids = null;
Business business = new Business( emc );
ids = business.getAppCatagoryPermissionFactory().listAllCatagoryInfoIds();
return business.getCatagoryInfoFactory().listNoPermissionCatagoryInfoIds( ids, appId );
}
public List<CatagoryInfo> listAll(EntityManagerContainer emc) throws Exception {
Business business = new Business( emc );
return business.getCatagoryInfoFactory().listAll();
}
public CatagoryInfo saveBaseInfo( EntityManagerContainer emc, CatagoryInfo catagoryInfo ) throws Exception {
CatagoryInfo catagoryInfo_tmp = null;
if( catagoryInfo.getId() == null ){
catagoryInfo.setId( CatagoryInfo.createId() );
}
catagoryInfo_tmp = emc.find( catagoryInfo.getId(), CatagoryInfo.class );
emc.beginTransaction( CatagoryInfo.class );
if( catagoryInfo_tmp == null ){
emc.persist( catagoryInfo, CheckPersistType.all);
}else{
catagoryInfo_tmp.setAppId( catagoryInfo.getAppId() );
catagoryInfo_tmp.setCatagoryAlias( catagoryInfo.getCatagoryAlias() );
catagoryInfo_tmp.setCatagoryMemo( catagoryInfo.getCatagoryMemo() );
catagoryInfo_tmp.setCatagoryName( catagoryInfo.getCatagoryName() );
catagoryInfo_tmp.setFormId( catagoryInfo.getFormId() );
catagoryInfo_tmp.setFormName( catagoryInfo.getFormName() );
catagoryInfo_tmp.setParentId( catagoryInfo.getParentId() );
catagoryInfo_tmp.setReadFormId( catagoryInfo.getReadFormId() );
catagoryInfo_tmp.setReadFormName( catagoryInfo.getReadFormName() );
emc.check( catagoryInfo_tmp, CheckPersistType.all );
}
emc.commit();
return catagoryInfo;
}
public CatagoryInfo save(EntityManagerContainer emc, CatagoryInfo catagoryInfo) throws Exception {
CatagoryInfo catagoryInfo_tmp = null;
if( catagoryInfo.getId() == null ){
catagoryInfo.setId( CatagoryInfo.createId() );
}
catagoryInfo_tmp = emc.find( catagoryInfo.getId(), CatagoryInfo.class );
emc.beginTransaction( CatagoryInfo.class );
if( catagoryInfo_tmp == null ){
emc.persist( catagoryInfo, CheckPersistType.all);
}else{
catagoryInfo.copyTo( catagoryInfo_tmp );
emc.check( catagoryInfo_tmp, CheckPersistType.all );
}
emc.commit();
return catagoryInfo;
}
public void delete( EntityManagerContainer emc, String id ) throws Exception {
AppInfo appInfo = null;
CatagoryInfo catagoryInfo = emc.find( id, CatagoryInfo.class );
if( catagoryInfo != null ){
appInfo = emc.find( catagoryInfo.getFormId(), AppInfo.class );
emc.beginTransaction(CatagoryInfo.class);
if( appInfo != null ){
emc.beginTransaction( AppInfo.class );
appInfo.getCatagoryList().remove( id );
emc.check( appInfo, CheckPersistType.all );
}
emc.remove( catagoryInfo, CheckRemoveType.all );
emc.commit();
}else{
throw new Exception("catagoryInfo is not exists!");
}
}
}
| [
"caixiangyi2004@126.com"
] | caixiangyi2004@126.com |
27bfc3288e2b613ff60adf3e62afa514b8a2f3a8 | 5d220b8cbe0bcab98414349ac79b449ec2a5bdcf | /src/com/ufgov/zc/server/sf/dao/ibatis/ZcFaUsingDao.java | d4a9ca146b57ce2568c222a86b2151de97828da1 | [] | no_license | jielen/puer | fd18bdeeb0d48c8848dc2ab59629f9bbc7a5633e | 0f56365e7bb8364f3d1b4daca0591d0322f7c1aa | refs/heads/master | 2020-04-06T03:41:08.173645 | 2018-04-15T01:31:56 | 2018-04-15T01:31:56 | 63,419,454 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,127 | java | package com.ufgov.zc.server.sf.dao.ibatis;
import java.sql.SQLException;
import java.util.List;
import org.springframework.orm.ibatis.SqlMapClientCallback;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import com.ibatis.sqlmap.client.SqlMapExecutor;
import com.ufgov.zc.common.sf.model.ZcFaUsing;
import com.ufgov.zc.common.sf.model.ZcFaUsingExample;
import com.ufgov.zc.server.sf.dao.IZcFaUsingDao;
public class ZcFaUsingDao extends SqlMapClientDaoSupport implements IZcFaUsingDao {
public int countByExample(ZcFaUsingExample example) {
// TCJLODO Auto-generated method stub
return 0;
}
public int deleteByExample(ZcFaUsingExample example) {
// TCJLODO Auto-generated method stub
return 0;
}
public int insert(ZcFaUsing record) {
// TCJLODO Auto-generated method stub
return 0;
}
public int insertSelective(ZcFaUsing record) {
// TCJLODO Auto-generated method stub
return 0;
}
public List selectByExample(ZcFaUsingExample example) {
// TCJLODO Auto-generated method stub
return null;
}
public int updateByExampleSelective(ZcFaUsing record, ZcFaUsingExample example) {
// TCJLODO Auto-generated method stub
return 0;
}
public int updateByExample(ZcFaUsing record, ZcFaUsingExample example) {
// TCJLODO Auto-generated method stub
return 0;
}
public void deleteByCardId(String cardId) {
// TCJLODO Auto-generated method stub
this.getSqlMapClientTemplate().delete("ZcFaUsing.deleteByCardId", cardId);
}
public void insertList(final List usingList) {
this.getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
executor.startBatch();
for (int i = 0; i < usingList.size(); i++) {
ZcFaUsing pack = (ZcFaUsing) usingList.get(i);
executor.insert("ZcFaUsing.insert", pack);
}
executor.executeBatch();
return null;
}
});
}
}
| [
"jielenzghsy1@163.com"
] | jielenzghsy1@163.com |
99b778c35719723f41f9785be8344654cb695c53 | ed0dea0c2d691e33e0ba8bf5e36a6e89b5376653 | /src/main/java/havis/custom/harting/rfidhardwaremonitor/ReaderMonitor.java | 775f73d662dfcce1a99204b6d276715c9b72f959 | [
"Apache-2.0"
] | permissive | peramic/App.RFIDHardwareMonitor | 2b00eee0fbfbea483f2c197f2bd60f4dbce1d3e2 | 75635b266d60394e831f96aab3f023bca9452b5e | refs/heads/main | 2023-03-16T06:50:57.339257 | 2021-02-04T09:35:23 | 2021-02-04T09:35:23 | 335,659,591 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,844 | java | package havis.custom.harting.rfidhardwaremonitor;
import havis.middleware.misc.TdtInitiator;
import havis.middleware.misc.TdtInitiator.SCHEME;
import havis.middleware.tdt.TdtTagInfo;
import havis.middleware.tdt.TdtTranslationException;
import havis.middleware.tdt.TdtTranslator;
import havis.util.monitor.Event;
import havis.util.monitor.Monitor;
import havis.util.monitor.ReaderEvent;
import havis.util.monitor.ReaderSource;
import havis.util.monitor.Source;
import havis.util.monitor.TagEvent;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
public class ReaderMonitor implements Monitor {
private final static Logger LOG = Logger.getLogger(ReaderMonitor.class.getName());
private final static int MAX_QUEUE_SIZE = 50;
private final static int MAX_STORE_TIME = 2000;
private Map<EPCByteArray, Tag> tags = Collections
.synchronizedMap(new HashMap<EPCByteArray, Tag>(MAX_QUEUE_SIZE + 1));
private TdtTranslator tdtTranslator = new TdtTranslator();
public ReaderMonitor() {
for (SCHEME scheme : SCHEME.values()) {
try {
LOG.log(Level.INFO, "Loading TDT scheme " + scheme.name());
tdtTranslator.getTdtDefinitions().add(TdtInitiator.get(scheme));
} catch (IOException e) {
LOG.log(Level.SEVERE, "Failed to load TDT scheme " + scheme, e);
}
}
}
/**
* Creates a list from the known tags that were seen less or 1000
* milliseconds ago. If the tag was seen earlier than that the tag will be
* removed.
*
* @return A list of tags
*/
public List<Tag> getTagList() {
List<Tag> tagList = new LinkedList<Tag>();
for (Iterator<Map.Entry<EPCByteArray, Tag>> iterator = this.tags.entrySet().iterator(); iterator
.hasNext();) {
Map.Entry<EPCByteArray, Tag> entry = iterator.next();
try {
if (!isTimeExceeded(entry.getValue()))
tagList.add(entry.getValue());
else
iterator.remove();
} catch (IllegalArgumentException e) {
LOG.log(Level.WARNING, "Error while checking if tag is exceeded", e);
}
}
return tagList;
}
@Override
public void notify(Source source, Event event) {
if (source instanceof ReaderSource)
notify((ReaderSource) source, event);
}
public void notify(ReaderSource source, Event event) {
if (event instanceof ReaderEvent)
notify(source, (ReaderEvent) event);
}
public void notify(ReaderSource source, ReaderEvent event) {
if (event instanceof TagEvent)
notify(source, (TagEvent) event);
}
/**
* This method is invoked when ever a tag was seen by the internal rf
* hardware. If the tag was seen before it's values will be updated
* otherwise the tag event will be wrapped in the tag class. The epc of the
* tag will be translated to a valid tag uri by the TDT translator. The new
* tag object will be added to a map which holds the untranslated epc as the
* key and the tag object as the value. At the end of each invokation the
* map will be cleaned from all tag that were seen more than 1000
* milliseconds ago.
*
* @param source
* The source of the event
* @param event
* The tag data
*/
public void notify(ReaderSource source, TagEvent event) {
if (event != null) {
EPCByteArray epc = new EPCByteArray(event.getId());
Tag tag = tags.get(epc);
if (tag != null) {
tag.setAntennaID(event.getAntenna());
tag.setRssi(event.getRssi());
tag.setTimestamp(event.getTimestamp());
} else {
try {
TdtTagInfo tagInfo = tdtTranslator.translate(event.getId());
tag = new Tag(tagInfo.getUriTag(), event.getAntenna(), event.getRssi(),
event.getTimestamp());
} catch (TdtTranslationException e) {
LOG.log(Level.SEVERE, "Unable to translate epc", e);
}
if (tag != null)
tags.put(epc, tag);
if (tags.size() >= MAX_QUEUE_SIZE) {
for (Iterator<Tag> iterator = tags.values().iterator(); iterator.hasNext();)
try {
if (isTimeExceeded(iterator.next()))
iterator.remove();
} catch (IllegalArgumentException e) {
LOG.log(Level.WARNING, "Error while checking if tag is exceeded", e);
}
}
}
}
}
/**
* Checks whether a tag was seen more than 1000 milliseconds ago
*
* @param tag
* The tag which is to check
* @return true if the time is exeeded, false if not
* @throws IllegalArgumentException
* if the tag is null or has no timestamp
*/
private boolean isTimeExceeded(Tag tag) {
if (tag != null && tag.getTimestamp() != null)
return System.currentTimeMillis() - tag.getTimestamp().getTime() > MAX_STORE_TIME;
throw new IllegalArgumentException("Tag can not be null and the timestamp must be set");
}
}
| [
"abrams@peramic.io"
] | abrams@peramic.io |
932aaef49b82b8bf27e05e3ecb00703c3f2b4536 | 9be78b689c8964fdf95bbb3bfaf459e353efb9b5 | /3.JavaMultithreading/src/com/javarush/task/task09/lesson15/big01/human/StudentsDataBase.java | a23e76fbe6caf486fd212749849ddf0bbbad2c4a | [] | no_license | TheTOXIN/JavaRushTasks | 0c893c0374e39cea712bf519513012ea6c566a72 | dc85152dc5cddea4c7436809c4170003787ad4cd | refs/heads/master | 2021-01-22T02:08:20.560444 | 2017-09-20T10:03:54 | 2017-09-20T10:04:06 | 94,366,948 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,336 | java | package com.javarush.task.task09.lesson15.big01.human;
import java.util.ArrayList;
import java.util.List;
public class StudentsDataBase {
public static List<Student> students = new ArrayList<>();
public static void addInfoAboutStudent(String name, int age, double averageGrade) {
Student student = new Student(name, age, averageGrade);
students.add(student);
printInfoAboutStudent(student.getName(), student);
}
public static void printInfoAboutStudent(String name, Student student) {
System.out.println("Имя: " + name + " Возраст: " + student.getAge());
}
public static void removeStudent(int index) throws IndexOutOfBoundsException {
students.remove(index);
}
public static void findDimaOrSasha() {
boolean found = false;
for (int i = 0; i < students.size(); i++) {
if (!found) {
if (students.get(i).getName().equals("Dima")) {
System.out.println("Студент Dima есть в базе.");
found = true;
}
if (students.get(i).getName().equals("Sasha")) {
System.out.println("Студент Sasha есть в базе.");
found = true;
}
}
}
}
}
| [
"thetoksin@mail.ru"
] | thetoksin@mail.ru |
e8935726fb13d5b309e84305465a44c2e25849b5 | 9477ab0bf3fa86a75dab4e0d612222e431565aa0 | /h2/src/main/org/h2/mvstore/CursorPos.java | 2615bc4640067e6d9fc202540539fb2752cbaf23 | [] | no_license | campolake/h2database | 20f4fd2f3704ecd8d23b986bdbfd3cff9c412113 | 118861ce8fb0b2aecaf11c34735550ab89bc4911 | refs/heads/master | 2020-03-26T01:30:12.566214 | 2018-11-28T07:54:30 | 2018-11-28T07:54:30 | 144,370,026 | 0 | 0 | null | 2018-08-11T08:49:12 | 2018-08-11T08:49:12 | null | UTF-8 | Java | false | false | 670 | java | /*
* Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.mvstore;
/**
* A position in a cursor
*/
public class CursorPos {
/**
* The current page.
*/
public Page page;
/**
* The current index.
*/
public int index;
/**
* The position in the parent page, if any.
*/
public CursorPos parent;
public CursorPos(Page page, int index, CursorPos parent) {
this.page = page;
this.index = index;
this.parent = parent;
}
}
| [
"campolake@gmail.com"
] | campolake@gmail.com |
222547c9b8f4b41f7a4eeeb03c389d706f95b41b | 3d2ab55403fe5187e4eaa457b624ee5b91f98432 | /src/daos/ComentarioDao.java | d3bf3c773343f5effaae7113939e1e35f096f169 | [] | no_license | rodriguezmalvis/medicos-residentes-jsf | 956799f7f60b7354595425cbb9cea9caa65a0b0e | a63952fd406fbe1649c459316363803ca8f25948 | refs/heads/master | 2021-01-16T22:13:54.192859 | 2016-06-08T00:52:10 | 2016-06-08T00:52:10 | 60,656,903 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 572 | java | package daos;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import models.Comentario;
public class ComentarioDao {
@Inject
EntityManager manager;
public void adiciona(Comentario comentario) {
manager.persist(comentario);
}
public void edita(Comentario comentario) {
manager.persist(comentario);
}
public void remove(Comentario comentario) {
manager.remove(manager.merge(comentario));
}
public Comentario getComentarioPorId(Long idComentario){
return manager.find(Comentario.class, idComentario);
}
}
| [
"you@example.com"
] | you@example.com |
ed5273dc2596f0d0702ea74eb77aee581a917c49 | 9923e30eb99716bfc179ba2bb789dcddc28f45e6 | /swagger-codegen/jaxrs-resteasy/src/gen/java/io/swagger/model/InlineResponse2005.java | 6a7202dfcb6b7d5c85c278126182d6067975c27b | [] | no_license | silverspace/samsara-sdks | cefcd61458ed3c3753ac5e6bf767229dd8df9485 | c054b91e488ab4266f3b3874e9b8e1c9e2d4d5fa | refs/heads/master | 2020-04-25T13:16:59.137551 | 2019-03-01T05:49:05 | 2019-03-01T05:49:05 | 172,804,041 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,393 | java | package io.swagger.model;
import java.util.Objects;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.model.InlineResponse2005VehicleStats;
import io.swagger.model.Pagination;
import java.util.List;
import javax.validation.constraints.*;
import io.swagger.annotations.*;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2019-03-01T04:20:27.798Z")
public class InlineResponse2005 {
private Pagination pagination = null;
private List<InlineResponse2005VehicleStats> vehicleStats = new ArrayList<InlineResponse2005VehicleStats>();
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("pagination")
public Pagination getPagination() {
return pagination;
}
public void setPagination(Pagination pagination) {
this.pagination = pagination;
}
/**
**/
@ApiModelProperty(required = true, value = "")
@JsonProperty("vehicleStats")
@NotNull
public List<InlineResponse2005VehicleStats> getVehicleStats() {
return vehicleStats;
}
public void setVehicleStats(List<InlineResponse2005VehicleStats> vehicleStats) {
this.vehicleStats = vehicleStats;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponse2005 inlineResponse2005 = (InlineResponse2005) o;
return Objects.equals(pagination, inlineResponse2005.pagination) &&
Objects.equals(vehicleStats, inlineResponse2005.vehicleStats);
}
@Override
public int hashCode() {
return Objects.hash(pagination, vehicleStats);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse2005 {\n");
sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n");
sb.append(" vehicleStats: ").append(toIndentedString(vehicleStats)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"greg@samsara.com"
] | greg@samsara.com |
936caf013df0211cf55eaf4b7090e193805357a7 | 2dcc440fa85d07e225104f074bcf9f061fe7a7ae | /gameserver/src/main/java/org/mmocore/gameserver/scripts/quests/_090_SagaOfTheStormScreamer.java | 5dd29f0e157d90ea583a992322ac14d85b1c3322 | [] | no_license | VitaliiBashta/L2Jts | a113bc719f2d97e06db3e0b028b2adb62f6e077a | ffb95b5f6e3da313c5298731abc4fcf4aea53fd5 | refs/heads/master | 2020-04-03T15:48:57.786720 | 2018-10-30T17:34:29 | 2018-10-30T17:35:04 | 155,378,710 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 2,756 | java | package org.mmocore.gameserver.scripts.quests;
public class _090_SagaOfTheStormScreamer extends SagasSuperclass {
public _090_SagaOfTheStormScreamer() {
super(false);
NPC = new int[]{
30175,
31627,
31287,
31287,
31598,
31646,
31649,
31652,
31654,
31655,
31659,
31287
};
Items = new int[]{
7080,
7531,
7081,
7505,
7288,
7319,
7350,
7381,
7412,
7443,
7084,
0
};
Mob = new int[]{
27252,
27239,
27256
};
classid = 110;
prevclass = 0x28;
X = new int[]{
161719,
124376,
124355
};
Y = new int[]{
-92823,
82127,
82155
};
Z = new int[]{
-1893,
-2796,
-2803
};
Text = new String[]{
"PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!",
"... Oh ... good! So it was ... let's begin!",
"I do not have the patience ..! I have been a giant force ...! Cough chatter ah ah ah!",
"Paying homage to those who disrupt the orderly will be PLAYERNAME's death!",
"Now, my soul freed from the shackles of the millennium, Halixia, to the back side I come ...",
"Why do you interfere others' battles?",
"This is a waste of time.. Say goodbye...!",
"...That is the enemy",
"...Goodness! PLAYERNAME you are still looking?",
"PLAYERNAME ... Not just to whom the victory. Only personnel involved in the fighting are eligible to share in the victory.",
"Your sword is not an ornament. Don't you think, PLAYERNAME?",
"Goodness! I no longer sense a battle there now.",
"let...",
"Only engaged in the battle to bar their choice. Perhaps you should regret.",
"The human nation was foolish to try and fight a giant's strength.",
"Must...Retreat... Too...Strong.",
"PLAYERNAME. Defeat...by...retaining...and...Mo...Hacker",
"....! Fight...Defeat...It...Fight...Defeat...It..."
};
registerNPCs();
}
} | [
"Vitalii.Bashta@accenture.com"
] | Vitalii.Bashta@accenture.com |
b76eedf1d315920086bb039a2a3778269854efbe | 5e34243e2c87d136566f9403465277c3ffd5417d | /parse/ios/src/main/java/org/robovm/pods/parse/ui/PFQueryTableViewController.java | 2f9b0dcb69d8237d7ce128f93e2ba875a854bf96 | [] | no_license | ipsumgames/ipsum-robovm-robopods | 6003ed38cf1d2167860fe6b61dd2ffcb34df1902 | 5ddc062d0ca561b018998ede4a78b541168bec92 | refs/heads/master | 2016-09-06T21:52:32.337362 | 2015-10-23T08:44:30 | 2015-10-23T08:44:48 | 41,791,776 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,908 | java | /*
* Copyright (C) 2013-2015 RoboVM AB
*
* 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.robovm.pods.parse.ui;
/*<imports>*/
import java.io.*;
import java.nio.*;
import java.util.*;
import org.robovm.objc.*;
import org.robovm.objc.annotation.*;
import org.robovm.objc.block.*;
import org.robovm.rt.*;
import org.robovm.rt.annotation.*;
import org.robovm.rt.bro.*;
import org.robovm.rt.bro.annotation.*;
import org.robovm.rt.bro.ptr.*;
import org.robovm.apple.foundation.*;
import org.robovm.apple.uikit.*;
import org.robovm.apple.coregraphics.*;
import org.robovm.pods.bolts.*;
import org.robovm.pods.parse.*;
/*</imports>*/
/*<javadoc>*/
/*</javadoc>*/
/*<annotations>*/@Library(Library.INTERNAL) @NativeClass/*</annotations>*/
/*<visibility>*/public/*</visibility>*/ class /*<name>*/PFQueryTableViewController/*</name>*/ <T extends PFObject>
extends /*<extends>*/UITableViewController/*</extends>*/
/*<implements>*/implements UITableViewDataSource, UITableViewDelegate/*</implements>*/ {
/*<ptr>*/public static class PFQueryTableViewControllerPtr extends Ptr<PFQueryTableViewController, PFQueryTableViewControllerPtr> {}/*</ptr>*/
/*<bind>*/static { ObjCRuntime.bind(PFQueryTableViewController.class); }/*</bind>*/
/*<constants>*//*</constants>*/
/*<constructors>*/
protected PFQueryTableViewController(SkipInit skipInit) { super(skipInit); }
public PFQueryTableViewController(UITableViewStyle style, String className) { super((SkipInit) null); initObject(init(style, className)); }
public PFQueryTableViewController(String className) { super((SkipInit) null); initObject(init(className)); }
/*</constructors>*/
public PFQueryTableViewController(UITableViewStyle style, Class<T> subclass) {
super((SkipInit) null);
if (subclass == null) {
throw new NullPointerException("subclass");
}
if (!subclass.isAnnotationPresent(ParseClassName.class)) {
throw new UnsupportedOperationException("Class is missing required @ParseClassName annotation: " + subclass.getSimpleName());
}
ParseClassName annotation = subclass.getAnnotation(ParseClassName.class);
initObject(init(style, annotation.value()));
}
public PFQueryTableViewController(Class<T> subclass) {
super((SkipInit) null);
if (subclass == null) {
throw new NullPointerException("subclass");
}
if (!subclass.isAnnotationPresent(ParseClassName.class)) {
throw new UnsupportedOperationException("Class is missing required @ParseClassName annotation: " + subclass.getSimpleName());
}
ParseClassName annotation = subclass.getAnnotation(ParseClassName.class);
initObject(init(annotation.value()));
}
/*<properties>*/
@Property(selector = "parseClassName")
public native String getParseClassName();
@Property(selector = "textKey")
public native String getTextKey();
@Property(selector = "setTextKey:")
public native void setTextKey(String v);
@Property(selector = "imageKey")
public native String getImageKey();
@Property(selector = "setImageKey:")
public native void setImageKey(String v);
@Property(selector = "placeholderImage")
public native UIImage getPlaceholderImage();
@Property(selector = "setPlaceholderImage:")
public native void setPlaceholderImage(UIImage v);
@Property(selector = "loadingViewEnabled")
public native boolean isLoadingViewEnabled();
@Property(selector = "setLoadingViewEnabled:")
public native void setLoadingViewEnabled(boolean v);
@Property(selector = "pullToRefreshEnabled")
public native boolean isPullToRefreshEnabled();
@Property(selector = "setPullToRefreshEnabled:")
public native void setPullToRefreshEnabled(boolean v);
@Property(selector = "paginationEnabled")
public native boolean isPaginationEnabled();
@Property(selector = "setPaginationEnabled:")
public native void setPaginationEnabled(boolean v);
@Property(selector = "objectsPerPage")
public native @MachineSizedUInt long getObjectsPerPage();
@Property(selector = "setObjectsPerPage:")
public native void setObjectsPerPage(@MachineSizedUInt long v);
@Property(selector = "isLoading")
public native boolean isLoading();
@Property(selector = "setLoading:")
public native void setLoading(boolean v);
@Property(selector = "objects")
public native NSArray<T> getObjects();
/*</properties>*/
/*<members>*//*</members>*/
/*<methods>*/
@Method(selector = "initWithStyle:className:")
protected native @Pointer long init(UITableViewStyle style, String className);
@Method(selector = "initWithClassName:")
protected native @Pointer long init(String className);
@Method(selector = "objectsWillLoad")
public native void willLoadObjects();
@Method(selector = "objectsDidLoad:")
public native void didLoadObjects(NSError error);
@Method(selector = "objectAtIndexPath:")
public native T getObject(NSIndexPath indexPath);
@Method(selector = "removeObjectAtIndexPath:")
public native void removeObject(NSIndexPath indexPath);
@Method(selector = "removeObjectAtIndexPath:animated:")
public native void removeObject(NSIndexPath indexPath, boolean animated);
@Method(selector = "removeObjectsAtIndexPaths:")
public native void removeObjects(NSArray<NSIndexPath> indexes);
@Method(selector = "removeObjectsAtIndexPaths:animated:")
public native void removeObjects(NSArray<NSIndexPath> indexes, boolean animated);
@Method(selector = "clear")
public native void clear();
@Method(selector = "loadObjects")
public native BFTask<Void> loadObjects();
@Method(selector = "loadObjects:clear:")
public native BFTask<Void> loadObjects(@MachineSizedSInt long page, boolean clear);
@Method(selector = "loadNextPage")
public native void loadNextPage();
@Method(selector = "queryForTable")
public native PFQuery<T> getQuery();
@Method(selector = "tableView:cellForRowAtIndexPath:object:")
public native PFTableViewCell getCellForRow(UITableView tableView, NSIndexPath indexPath, T object);
@Method(selector = "tableView:cellForNextPageAtIndexPath:")
public native PFTableViewCell getCellForNextPage(UITableView tableView, NSIndexPath indexPath);
/*</methods>*/
}
| [
"blueriverteam@gmail.com"
] | blueriverteam@gmail.com |
b42e9e0130390e718b540584afff01df092a985c | ba2eef5e3c914673103afb944dd125a9e846b2f6 | /AL-Game/src/com/aionemu/gameserver/network/aion/serverpackets/SM_SIEGE_LOCATION_INFO.java | f16d0d6e837520a1f453901b5b82a0b71a657b5f | [] | no_license | makifgokce/Aion-Server-4.6 | 519d1d113f483b3e6532d86659932a266d4da2f8 | 0a6716a7aac1f8fe88780aeed68a676b9524ff15 | refs/heads/master | 2022-10-07T11:32:43.716259 | 2020-06-10T20:14:47 | 2020-06-10T20:14:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,816 | java | /**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning 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.
*
* Aion-Lightning 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 Aion-Lightning.
* If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.network.aion.serverpackets;
import com.aionemu.gameserver.configs.main.SiegeConfig;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.model.siege.SiegeLocation;
import com.aionemu.gameserver.model.team.legion.LegionEmblem;
import com.aionemu.gameserver.model.team.legion.LegionEmblemType;
import com.aionemu.gameserver.network.aion.AionConnection;
import com.aionemu.gameserver.network.aion.AionServerPacket;
import com.aionemu.gameserver.services.LegionService;
import com.aionemu.gameserver.services.SiegeService;
import java.util.Map;
import javolution.util.FastMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Sarynth
*/
public class SM_SIEGE_LOCATION_INFO extends AionServerPacket {
/**
* infoType 0 - reset 1 - update
*/
private int infoType;
private Map<Integer, SiegeLocation> locations;
private static final Logger log = LoggerFactory.getLogger(SM_SIEGE_LOCATION_INFO.class);
public SM_SIEGE_LOCATION_INFO() {
this.infoType = 0;
locations = SiegeService.getInstance().getSiegeLocations();
}
public SM_SIEGE_LOCATION_INFO(SiegeLocation loc) {
this.infoType = 1;
locations = new FastMap<Integer, SiegeLocation>();
locations.put(loc.getLocationId(), loc);
}
@Override
protected void writeImpl(AionConnection con) {
Player player = con.getActivePlayer();
if (!SiegeConfig.SIEGE_ENABLED) {
writeC(0);
writeH(0);
return;
}
writeC(infoType);
writeH(locations.size());
for (SiegeLocation loc : locations.values()) {
LegionEmblem emblem = new LegionEmblem();
writeD(loc.getLocationId());
int legionId = loc.getLegionId();
writeD(legionId);
if (legionId != 0) {
if (LegionService.getInstance().getLegion(legionId) == null) {
log.error("Can't find or load legion with id " + legionId);
} else {
emblem = LegionService.getInstance().getLegion(legionId).getLegionEmblem();
}
}
if (emblem.getEmblemType() == LegionEmblemType.DEFAULT) {
writeD(emblem.getEmblemId());
writeC(255);
writeC(emblem.getColor_r());
writeC(emblem.getColor_g());
writeC(emblem.getColor_b());
} else {
writeD(emblem.getCustomEmblemData().length);
writeC(255);
writeC(emblem.getColor_r());
writeC(emblem.getColor_g());
writeC(emblem.getColor_b());
}
writeC(loc.getRace().getRaceId());
// is vulnerable (0 - no, 2 - yes)
writeC(loc.isVulnerable() ? 2 : 0);
// faction can teleport (0 - no, 1 - yes)
writeC(loc.isCanTeleport(player) ? 1 : 0);
// Next State (0 - invulnerable, 1 - vulnerable)
writeC(loc.getNextState());
writeH(0); // unk
writeH(1);
switch (loc.getLocationId()) {
case 2111: // veille timer
case 3111: // mastarius timer
writeD(SiegeService.getInstance().getRemainingSiegeTimeInSeconds(loc.getLocationId()));
break;
default:
writeD(10000);
break;
}
}
}
}
| [
"Falke_34@080676fd-0f56-412f-822c-f8f0d7cea3b7"
] | Falke_34@080676fd-0f56-412f-822c-f8f0d7cea3b7 |
6314ecc3b3fd53143b59cc4bb267b170a2e63ae3 | ac67a99b5ab765e2912b46f59721b14b3b432fa0 | /app/src/main/java/com/tuacy/workmanagerdev/taskchainstream/StreamCombineWorkerB.java | ce9824840741861d6713708aa0025528bae33a22 | [] | no_license | tuacy/WorkManagerDev | 86de3101fcc07d0d328daed5d563e520faa8e262 | 32d34ecfb471f02e94cd46273363f161ae3b73d2 | refs/heads/master | 2020-03-22T08:35:50.103938 | 2018-07-07T14:43:07 | 2018-07-07T14:43:07 | 139,776,808 | 6 | 1 | null | null | null | null | UTF-8 | Java | false | false | 499 | java | package com.tuacy.workmanagerdev.taskchainstream;
import android.support.annotation.NonNull;
import androidx.work.Data;
import androidx.work.Worker;
/**
* B任务的输出中有两个key:b_key -> 100、a_key -> 200
* 有个key在A任务中也出现了
*/
public class StreamCombineWorkerB extends Worker {
@NonNull
@Override
public Result doWork() {
Data data = new Data.Builder().putInt("b_key", 100).putInt("a_key", 200).build();
setOutputData(data);
return Result.SUCCESS;
}
}
| [
"1007178106@qq.com"
] | 1007178106@qq.com |
6e769fbec5d41064878e1d0299def323056ac153 | 1e6c822870d527644d68f40984c2dd12af771755 | /src/main/java/com/xieke/admin/web/ParamController.java | 8e73a5e9a0902afee4d7cc8eb87e1f9bd1b52700 | [
"Apache-2.0"
] | permissive | zlkjzxj/common-admin | 4e24ffb5f7081e3218c672ae189fcb5ffc7c4666 | b514abe09a92edebd03790db3e047d3fff737958 | refs/heads/master | 2020-04-28T15:50:12.489324 | 2019-05-10T09:20:06 | 2019-05-10T09:20:06 | 175,390,562 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,900 | java | package com.xieke.admin.web;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.xieke.admin.annotation.SysLog;
import com.xieke.admin.dto.InitCode;
import com.xieke.admin.dto.ResultInfo;
import com.xieke.admin.entity.Code;
import com.xieke.admin.entity.Param;
import com.xieke.admin.mapper.CodeMapper;
import com.xieke.admin.mapper.ParamMapper;
import com.xieke.admin.service.ICodeService;
import com.xieke.admin.service.IParamService;
import com.xieke.admin.util.StringUtils;
import com.xieke.admin.util.TranslateUtils;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.ClassUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.xieke.admin.util.Constant.CODE_JS_NAME;
/**
* @Description TODO
* @Author sunny
* @Date 2019-05-05 14:17
*/
@Controller
@RequestMapping("/param")
public class ParamController {
@Autowired
private IParamService paramService;
@Resource
private ParamMapper paramMapper;
@Resource
protected CodeMapper codeMapper;
@RequestMapping("/listData")
// @RequiresPermissions("code:view")
public @ResponseBody
ResultInfo<List<Param>> listData(Param param, Integer page, Integer limit) {
EntityWrapper<Param> wrapper = new EntityWrapper<>(param);
Page<Param> pageObj = paramService.selectPage(new Page<>(page, limit), wrapper);
return new ResultInfo<>(pageObj.getRecords(), pageObj.getTotal());
}
@SysLog("保存参数操作")
@RequestMapping("/save")
// @RequiresPermissions(value = {"role:add", "role:edit"}, logical = Logical.OR)
public @ResponseBody
ResultInfo<Boolean> save(Param param) {
return new ResultInfo<>(paramService.saveParam(param));
}
@SysLog("删除参数操作")
@RequestMapping("/del")
// @RequiresPermissions("role:del")
public @ResponseBody
ResultInfo<Boolean> delBatch(Integer id) {
return new ResultInfo<>(paramService.deleteById(id));
}
@RequestMapping("/getInitParam")
public @ResponseBody
ResultInfo<InitCode> getInitParam() {
//加载翻译参数
Param param = new Param();
param.setCode("init_code");
Param param1 = paramMapper.selectOne(param);
String value = param1.getValue();
//加载部门简称规则
param.setCode("project_number_dep");
Param project_number_dep = paramMapper.selectOne(param);
String project_number_dep_value = project_number_dep.getValue();
//加载部门简称类型
param.setCode("project_number_type");
Param project_number_type = paramMapper.selectOne(param);
String project_number_type_value = project_number_type.getValue();
Map<String, List<Code>> codeMap = new HashMap<>(10);
Map<String, String> paramMap = new HashMap<>(2);
paramMap.put("project_number_dep", project_number_dep_value);
paramMap.put("project_number_type", project_number_type_value);
if (!StringUtils.isEmpty(value)) {
String[] arrays = value.split(",");
for (int i = 0; i < arrays.length; i++) {
EntityWrapper<Code> wrapper = new EntityWrapper<>(new Code());
wrapper.eq("code", arrays[i]);
List<Code> codeList = codeMapper.selectList(wrapper);
codeMap.put(arrays[i], codeList);
}
}
return new ResultInfo<>(new InitCode(codeMap, paramMap));
}
}
| [
"zlkjzxj@163.com"
] | zlkjzxj@163.com |
1893ef62941c3d7a2d1edda4c325db75a93d6600 | 6f8edeae95cceb09c047f8e0fd2417306b1a4f4b | /affilie/src/main/java/ch/dso/affilie/infrastructure/kafka/KafkaProducer.java | 4bed77b6da23e18f90effdc453942bfa49c630a1 | [] | no_license | sebChevre/SOA-Microservices | 5a6fc066d73381572b66d0c7c6f1c4491f62cb97 | 7ffc8445a1eb91904d6ea938e3e2bee61461aefc | refs/heads/master | 2020-08-29T14:12:07.883447 | 2020-02-14T12:33:06 | 2020-02-14T12:33:06 | 218,056,775 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 593 | java | package ch.dso.affilie.infrastructure.kafka;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class KafkaProducer {
private static final String TOPIC = "users";
@Autowired
private KafkaTemplate<String, String> kafkaTemplate;
public void sendMessage(String message) {
log.info(String.format("#### -> Producing message -> %s", message));
this.kafkaTemplate.send(TOPIC, message);
}
}
| [
"seb.chevre@gmail.com"
] | seb.chevre@gmail.com |
9dde931bb8d60e7086a4f45507f392bb8b6db2b6 | d71e879b3517cf4fccde29f7bf82cff69856cfcd | /ExtractedJars/iRobot_com.irobot.home/javafiles/com/gigya/socialize/android/login/providers/WeChatProvider$1.java | a10e60d2ea3f02819b9c5475d0a112b57572d40d | [
"MIT"
] | permissive | Andreas237/AndroidPolicyAutomation | b8e949e072d08cf6c6166c3f15c9c63379b8f6ce | c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a | refs/heads/master | 2020-04-10T02:14:08.789751 | 2019-05-16T19:29:11 | 2019-05-16T19:29:11 | 160,739,088 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,939 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.gigya.socialize.android.login.providers;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPI;
// Referenced classes of package com.gigya.socialize.android.login.providers:
// WeChatProvider
class WeChatProvider$1
implements com.gigya.socialize.android.ui.ActivityHandler
{
public void onActivityResult(FragmentActivity fragmentactivity, int i, int j, Intent intent)
{
// 0 0:return
}
public void onCancel(FragmentActivity fragmentactivity)
{
fragmentactivity.finish();
// 0 0:aload_1
// 1 1:invokevirtual #38 <Method void FragmentActivity.finish()>
cancel(val$callback);
// 2 4:aload_0
// 3 5:getfield #21 <Field WeChatProvider this$0>
// 4 8:aload_0
// 5 9:getfield #25 <Field LoginProvider$ProviderCallback val$callback>
// 6 12:invokevirtual #42 <Method void WeChatProvider.cancel(LoginProvider$ProviderCallback)>
// 7 15:return
}
public void onCreate(FragmentActivity fragmentactivity, Bundle bundle)
{
fragmentactivity = ((FragmentActivity) ((String)val$appInfo.metaData.get("wechatAppID")));
// 0 0:aload_0
// 1 1:getfield #23 <Field ApplicationInfo val$appInfo>
// 2 4:getfield #50 <Field Bundle ApplicationInfo.metaData>
// 3 7:ldc1 #52 <String "wechatAppID">
// 4 9:invokevirtual #58 <Method Object Bundle.get(String)>
// 5 12:checkcast #60 <Class String>
// 6 15:astore_1
fragmentactivity = ((FragmentActivity) (new com.tencent.mm.opensdk.modelmsg.SendAuth.Req()));
// 7 16:new #62 <Class com.tencent.mm.opensdk.modelmsg.SendAuth$Req>
// 8 19:dup
// 9 20:invokespecial #63 <Method void com.tencent.mm.opensdk.modelmsg.SendAuth$Req()>
// 10 23:astore_1
fragmentactivity.scope = "snsapi_userinfo";
// 11 24:aload_1
// 12 25:ldc1 #65 <String "snsapi_userinfo">
// 13 27:putfield #69 <Field String com.tencent.mm.opensdk.modelmsg.SendAuth$Req.scope>
fragmentactivity.state = "";
// 14 30:aload_1
// 15 31:ldc1 #71 <String "">
// 16 33:putfield #74 <Field String com.tencent.mm.opensdk.modelmsg.SendAuth$Req.state>
WeChatProvider.api.sendReq(((com.tencent.mm.opensdk.modelbase.BaseReq) (fragmentactivity)));
// 17 36:getstatic #78 <Field IWXAPI WeChatProvider.api>
// 18 39:aload_1
// 19 40:invokeinterface #84 <Method boolean IWXAPI.sendReq(com.tencent.mm.opensdk.modelbase.BaseReq)>
// 20 45:pop
// 21 46:return
}
public void onResume(FragmentActivity fragmentactivity)
{
if(WeChatProvider.access$000() != null)
//* 0 0:invokestatic #91 <Method BaseResp WeChatProvider.access$000()>
//* 1 3:ifnull 88
{
fragmentactivity.finish();
// 2 6:aload_1
// 3 7:invokevirtual #38 <Method void FragmentActivity.finish()>
int i = WeChatProvider.access$000().errCode;
// 4 10:invokestatic #91 <Method BaseResp WeChatProvider.access$000()>
// 5 13:getfield #97 <Field int BaseResp.errCode>
// 6 16:istore_2
if(i != -4 && i != -2)
//* 7 17:iload_2
//* 8 18:bipush -4
//* 9 20:icmpeq 77
//* 10 23:iload_2
//* 11 24:bipush -2
//* 12 26:icmpeq 77
{
if(i != 0)
//* 13 29:iload_2
//* 14 30:ifeq 34
return;
// 15 33:return
try
{
fragmentactivity = ((FragmentActivity) ((com.tencent.mm.opensdk.modelmsg.SendAuth.Resp)WeChatProvider.access$000()));
// 16 34:invokestatic #91 <Method BaseResp WeChatProvider.access$000()>
// 17 37:checkcast #99 <Class com.tencent.mm.opensdk.modelmsg.SendAuth$Resp>
// 18 40:astore_1
success(val$callback, ((com.tencent.mm.opensdk.modelmsg.SendAuth.Resp) (fragmentactivity)).code, -1L);
// 19 41:aload_0
// 20 42:getfield #21 <Field WeChatProvider this$0>
// 21 45:aload_0
// 22 46:getfield #25 <Field LoginProvider$ProviderCallback val$callback>
// 23 49:aload_1
// 24 50:getfield #102 <Field String com.tencent.mm.opensdk.modelmsg.SendAuth$Resp.code>
// 25 53:ldc2w #103 <Long -1L>
// 26 56:invokevirtual #108 <Method void WeChatProvider.success(LoginProvider$ProviderCallback, String, long)>
return;
// 27 59:return
}
// Misplaced declaration of an exception variable
catch(FragmentActivity fragmentactivity)
//* 28 60:astore_1
{
fail(val$callback, ((Exception) (fragmentactivity)).getMessage());
// 29 61:aload_0
// 30 62:getfield #21 <Field WeChatProvider this$0>
// 31 65:aload_0
// 32 66:getfield #25 <Field LoginProvider$ProviderCallback val$callback>
// 33 69:aload_1
// 34 70:invokevirtual #112 <Method String Exception.getMessage()>
// 35 73:invokevirtual #116 <Method void WeChatProvider.fail(LoginProvider$ProviderCallback, String)>
}
return;
// 36 76:return
}
cancel(val$callback);
// 37 77:aload_0
// 38 78:getfield #21 <Field WeChatProvider this$0>
// 39 81:aload_0
// 40 82:getfield #25 <Field LoginProvider$ProviderCallback val$callback>
// 41 85:invokevirtual #42 <Method void WeChatProvider.cancel(LoginProvider$ProviderCallback)>
}
// 42 88:return
}
public void onStart(FragmentActivity fragmentactivity)
{
// 0 0:return
}
final WeChatProvider this$0;
final ApplicationInfo val$appInfo;
final viderCallback val$callback;
WeChatProvider$1()
{
this$0 = final_wechatprovider;
// 0 0:aload_0
// 1 1:aload_1
// 2 2:putfield #21 <Field WeChatProvider this$0>
val$appInfo = applicationinfo;
// 3 5:aload_0
// 4 6:aload_2
// 5 7:putfield #23 <Field ApplicationInfo val$appInfo>
val$callback = viderCallback.this;
// 6 10:aload_0
// 7 11:aload_3
// 8 12:putfield #25 <Field LoginProvider$ProviderCallback val$callback>
super();
// 9 15:aload_0
// 10 16:invokespecial #28 <Method void Object()>
// 11 19:return
}
}
| [
"silenta237@gmail.com"
] | silenta237@gmail.com |
67d79aa15359ef86f2f32d8bf7029c72db0055f2 | 183732491ccf0693b044163c3eb9a0e657fcce94 | /phloc-commons/src/main/java/com/phloc/commons/log/LogMessage.java | ba39274cfa6fcf342efd9d5945c7da6c8eb84009 | [] | no_license | phlocbg/phloc-commons | 9b0d6699af33d67ee832c14e0594c97cef44c05d | 6f86abe9c4bb9f9f94fe53fc5ba149356f88a154 | refs/heads/master | 2023-04-23T22:25:52.355734 | 2023-03-31T18:09:10 | 2023-03-31T18:09:10 | 41,243,446 | 0 | 0 | null | 2022-07-01T22:17:52 | 2015-08-23T09:19:38 | Java | UTF-8 | Java | false | false | 3,817 | java | /**
* Copyright (C) 2006-2015 phloc systems
* http://www.phloc.com
* office[at]phloc[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.phloc.commons.log;
import java.io.Serializable;
import java.util.Date;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import com.phloc.commons.ValueEnforcer;
import com.phloc.commons.annotations.ReturnsMutableCopy;
import com.phloc.commons.error.EErrorLevel;
import com.phloc.commons.error.IHasErrorLevel;
import com.phloc.commons.error.ISeverityComparable;
import com.phloc.commons.state.IErrorIndicator;
import com.phloc.commons.state.ISuccessIndicator;
import com.phloc.commons.string.ToStringGenerator;
/**
* Represents a single log message.
*
* @author Philip Helger
*/
@Immutable
public class LogMessage implements IHasErrorLevel, ISuccessIndicator, IErrorIndicator, ISeverityComparable <LogMessage>, Serializable
{
private final Date m_aIssueDT;
private final EErrorLevel m_eErrorLevel;
private final Serializable m_aMsg;
private final Throwable m_aThrowable;
public LogMessage (@Nonnull final EErrorLevel eLevel,
@Nonnull final Serializable aMsg,
@Nullable final Throwable aThrowable)
{
m_aIssueDT = new Date ();
m_eErrorLevel = ValueEnforcer.notNull (eLevel, "ErrorLevel");
m_aMsg = ValueEnforcer.notNull (aMsg, "Message");
m_aThrowable = aThrowable;
}
@Nonnull
@ReturnsMutableCopy
public Date getIssueDateTime ()
{
// Return a copy
return (Date) m_aIssueDT.clone ();
}
@Nonnull
public EErrorLevel getErrorLevel ()
{
return m_eErrorLevel;
}
@Nonnull
public Serializable getMessage ()
{
return m_aMsg;
}
@Nullable
public Throwable getThrowable ()
{
return m_aThrowable;
}
public boolean isSuccess ()
{
return m_eErrorLevel.isSuccess ();
}
public boolean isFailure ()
{
return m_eErrorLevel.isFailure ();
}
public boolean isError ()
{
return m_eErrorLevel.isError ();
}
public boolean isNoError ()
{
return m_eErrorLevel.isNoError ();
}
public boolean isEqualSevereThan (@Nonnull final LogMessage aOther)
{
return m_eErrorLevel.isEqualSevereThan (aOther.m_eErrorLevel);
}
public boolean isLessSevereThan (@Nonnull final LogMessage aOther)
{
return m_eErrorLevel.isLessSevereThan (aOther.m_eErrorLevel);
}
public boolean isLessOrEqualSevereThan (@Nonnull final LogMessage aOther)
{
return m_eErrorLevel.isLessOrEqualSevereThan (aOther.m_eErrorLevel);
}
public boolean isMoreSevereThan (@Nonnull final LogMessage aOther)
{
return m_eErrorLevel.isMoreSevereThan (aOther.m_eErrorLevel);
}
public boolean isMoreOrEqualSevereThan (@Nonnull final LogMessage aOther)
{
return m_eErrorLevel.isMoreOrEqualSevereThan (aOther.m_eErrorLevel);
}
@Override
public String toString ()
{
return new ToStringGenerator (this).append ("issueDT", m_aIssueDT)
.append ("errorLevel", m_eErrorLevel)
.append ("msg", m_aMsg)
.appendIfNotNull ("throwable", m_aThrowable)
.toString ();
}
}
| [
"bg@phloc.com"
] | bg@phloc.com |
021de5d67b53f851c3c4b4453c67b155d962d0e6 | b15a390a55c6b07d3fbcec5558197b597b331392 | /JavaHashCodeAndEqualsOverride/src/com/aritra/sample/HashcodeEqualsWithArraylist.java | cec067a28bee451057703cdbc59fc253dd6c9648 | [] | no_license | aritrac/SolidJava | f84c98e785e7fb46bafd31c864b03939854f6cea | b17e77bec7883f9337c9abd10b86f12971dbe7a6 | refs/heads/master | 2022-12-15T14:26:57.470412 | 2020-09-06T02:25:58 | 2020-09-06T02:25:58 | 287,756,536 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 614 | java | package com.aritra.sample;
import java.util.ArrayList;
import java.util.List;
public class HashcodeEqualsWithArraylist {
public static void main(String[] args) {
Student alex = new Student(1, "Alex");
List< Student > studentsLst = new ArrayList< Student >();
studentsLst.add(alex);
System.out.println("Arraylist size = " + studentsLst.size());
//We get true below, because we overridden equals in student to compare the student id instead of the hashcode
System.out.println("Arraylist contains Alex = " + studentsLst.contains(new Student(1, "Alex")));
}
}
| [
"aritrachatterjee2007@gmail.com"
] | aritrachatterjee2007@gmail.com |
1a90becaffb70ad26cd8f0f3ec9214f93aa4f9e5 | e8f9fe2285f1598fee5860d2447fd1a1f6557306 | /MPC/temp/src/minecraft_server/net/minecraft/src/EnumCreatureType.java | bd83b74eb67aac09b90a9c80d9893b464657ac67 | [] | no_license | pedroreisuft/minecraft | 8e71c74ee37ffbf863b0e89c7051ed2b3ce80a7f | 64ba09bce02603abea3270e4030be2aac4555822 | refs/heads/master | 2016-09-06T01:24:36.812128 | 2012-11-30T19:34:19 | 2012-11-30T19:34:19 | 6,943,629 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,701 | java | package net.minecraft.src;
import net.minecraft.src.EntityAmbientCreature;
import net.minecraft.src.EntityAnimal;
import net.minecraft.src.EntityWaterMob;
import net.minecraft.src.IMob;
import net.minecraft.src.Material;
public enum EnumCreatureType {
monster("monster", 0, IMob.class, 70, Material.field_76249_a, false, false),
creature("creature", 1, EntityAnimal.class, 10, Material.field_76249_a, true, true),
ambient("ambient", 2, EntityAmbientCreature.class, 15, Material.field_76249_a, true, false),
waterCreature("waterCreature", 3, EntityWaterMob.class, 5, Material.field_76244_g, true, false);
private final Class field_75605_d;
private final int field_75606_e;
private final Material field_75603_f;
private final boolean field_75604_g;
private final boolean field_82707_i;
// $FF: synthetic field
private static final EnumCreatureType[] $VALUES = new EnumCreatureType[]{monster, creature, ambient, waterCreature};
private EnumCreatureType(String p_i5057_1_, int p_i5057_2_, Class p_i5057_3_, int p_i5057_4_, Material p_i5057_5_, boolean p_i5057_6_, boolean p_i5057_7_) {
this.field_75605_d = p_i5057_3_;
this.field_75606_e = p_i5057_4_;
this.field_75603_f = p_i5057_5_;
this.field_75604_g = p_i5057_6_;
this.field_82707_i = p_i5057_7_;
}
public Class func_75598_a() {
return this.field_75605_d;
}
public int func_75601_b() {
return this.field_75606_e;
}
public Material func_75600_c() {
return this.field_75603_f;
}
public boolean func_75599_d() {
return this.field_75604_g;
}
public boolean func_82705_e() {
return this.field_82707_i;
}
}
| [
"phsmreis@gmail.com"
] | phsmreis@gmail.com |
a231509501be5219587ca1591754ec3b0a61d9ee | e69e5d899856b185e23b6ca0ed50df38b2aff5d1 | /supplier-data-services/src/main/java/com/tip/supplier/model/PayableStatusObject.java | 60f41342906f036d85389f664d2072622311015c | [] | no_license | shuvankar999/git_backup | 10edee9a3db6e4dcb6b67df2a712ebce10c33f31 | b39e126e45df1c6147aace22aabbcc75b3d65322 | refs/heads/main | 2023-06-14T17:12:55.874523 | 2021-07-09T16:16:14 | 2021-07-09T16:16:14 | 384,487,809 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,125 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.05.21 at 02:48:49 PM IST
//
package com.tip.supplier.model;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for PayableStatusObject complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="PayableStatusObject">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Supplier_Id" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* <element name="Error_Cd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Status_Id" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PayableStatusObject", propOrder = {
"supplierId",
"errorCd",
"statusId"
})
public class PayableStatusObject {
@XmlElement(name = "Supplier_Id")
protected Integer supplierId;
@XmlElement(name = "Error_Cd")
protected String errorCd;
@XmlElement(name = "Status_Id")
protected Integer statusId;
/**
* Gets the value of the supplierId property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getSupplierId() {
return supplierId;
}
/**
* Sets the value of the supplierId property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setSupplierId(Integer value) {
this.supplierId = value;
}
/**
* Gets the value of the errorCd property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getErrorCd() {
return errorCd;
}
/**
* Sets the value of the errorCd property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setErrorCd(String value) {
this.errorCd = value;
}
/**
* Gets the value of the statusId property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getStatusId() {
return statusId;
}
/**
* Sets the value of the statusId property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setStatusId(Integer value) {
this.statusId = value;
}
}
| [
"shuvankar999@gmail.com"
] | shuvankar999@gmail.com |
ec24908520a657cdf6c4b6e92b88ad090eda0755 | b801d688e01ca0ea993c1a84e1bc164967258aff | /springboot-security/springboot_security05/src/main/java/jit/wxs/demo/mapper/SysUserRoleMapper.java | c40bc43627e9a5d1954c95424abf23704f8335dc | [
"Apache-2.0"
] | permissive | jitwxs/blog-sample | 1a1e4152b48939baa5b09a2704dd089dfbe520ed | 5123346e01a1ec94cc56b5afbd45732487d7ecb8 | refs/heads/master | 2022-02-24T06:04:26.341746 | 2022-02-16T14:11:26 | 2022-02-16T14:11:26 | 131,931,262 | 339 | 243 | Apache-2.0 | 2021-09-20T15:25:44 | 2018-05-03T02:32:58 | Java | UTF-8 | Java | false | false | 420 | java | package jit.wxs.demo.mapper;
import jit.wxs.demo.entity.SysUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author jitwxs
* @date 2018/3/30 1:24
*/
@Mapper
public interface SysUserRoleMapper {
@Select("SELECT * FROM sys_user_role WHERE user_id = #{userId}")
List<SysUserRole> listByUserId(Integer userId);
}
| [
"jitwxs@foxmail.com"
] | jitwxs@foxmail.com |
f8cd237e3fd73758658bae309388c4602c7f7a2d | b2a635e7cc27d2df8b1c4197e5675655add98994 | /e/f/a/e/i/k/s5.java | bcae0ff9b6d5895b2cd4b87818cdb83eba6d7576 | [] | no_license | history-purge/LeaveHomeSafe-source-code | 5f2d87f513d20c0fe49efc3198ef1643641a0313 | 0475816709d20295134c1b55d77528d74a1795cd | refs/heads/master | 2023-06-23T21:38:37.633657 | 2021-07-28T13:27:30 | 2021-07-28T13:27:30 | 390,328,492 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 204 | java | package e.f.a.e.i.k;
public final class s5 {}
/* Location: /home/yc/Downloads/LeaveHomeSafe.jar!/e/f/a/e/i/k/s5.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"game0427game@gmail.com"
] | game0427game@gmail.com |
a6792ebb5bb35aa34e8a57d9e89656612aa79bbb | 6341f72580553754f6d6c7a972864f3784e3183d | /quiz19/src/main/java/com/coderbd/quiz19/repo/CategoryRepo.java | 9d3c27a67339bea2552b92ab49cadb0bf224eb59 | [] | no_license | springapidev/Algorithms | 7999279c31e5291c4e0cf35610518967c69fcef6 | f8614b87ff466b6e656d1735399669c405031ba9 | refs/heads/master | 2021-05-06T19:20:51.582663 | 2019-01-23T02:01:10 | 2019-01-23T02:01:10 | 112,106,270 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 274 | java | package com.coderbd.quiz19.repo;
import com.coderbd.quiz19.entity.Category;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface CategoryRepo extends JpaRepository<Category, Long> {
}
| [
"springapidev@gmail.com"
] | springapidev@gmail.com |
7d5911749f87016674a5725d5c593838d1af0ba2 | 0eaf921a7a2db170c17af47329cf88f6605acf55 | /src/main/java/cn/dayuanzi/dao/UserErrorDao.java | 5ff529fe812ab92ca7c8bac888cf9efb83224b42 | [] | no_license | Qiuyingx/linjujj20150902 | dd787d83af6764619f84c13ecfbde258e013c803 | bace1e326c785a8b2719f497e3e796a38968eae6 | refs/heads/master | 2016-09-14T04:37:03.079605 | 2016-05-08T12:53:42 | 2016-05-08T12:53:42 | 58,312,285 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 332 | java | package cn.dayuanzi.dao;
import org.springframework.stereotype.Repository;
import cn.dayuanzi.model.UserError;
/**
*
* @ClassName: UserErrorDao
* @Description: TODO
* @author qiuyingxiang
* @date 2015年8月13日 下午2:39:43
*
*/
@Repository
public class UserErrorDao extends BaseDao <Long,UserError> {
}
| [
"472128216@qq.com"
] | 472128216@qq.com |
c5060821aa0faa8ff7285d4ad4b720fcf8e4baff | 8582bc8e5925f77c6f7d17d4d71e8ac492676cbb | /0123/99soft_autobind/autobind/scanner/asm/src/test/java/org/nnsoft/guice/autobind/scanner/asm/tests/autobind/duplicate/DuplicateAutobindTests.java | bf761910c68be10158db909d1d1c2ccbb2d9892f | [] | no_license | ryosuke-ku/projects_git | 12f48620b7349393df7c07286a4b90729edd46b4 | e43cde4d0c394853ea0c221d50d17e9c596e3cc4 | refs/heads/master | 2020-08-31T01:42:08.668179 | 2019-10-30T14:42:45 | 2019-10-30T14:42:45 | 218,548,551 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,770 | java | package org.nnsoft.guice.autobind.scanner.asm.tests.autobind.duplicate;
/*
* Copyright 2012 The 99 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.
*/
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.Test;
import org.nnsoft.guice.autobind.annotations.Bind;
import org.nnsoft.guice.autobind.annotations.To;
import org.nnsoft.guice.autobind.annotations.To.Type;
import org.nnsoft.guice.autobind.scanner.PackageFilter;
import org.nnsoft.guice.autobind.scanner.StartupModule;
import org.nnsoft.guice.autobind.scanner.asm.ASMClasspathScanner;
import com.google.inject.ConfigurationException;
import com.google.inject.Guice;
import com.google.inject.Injector;
public class DuplicateAutobindTests
{
@Test
public void createDynamicModule()
{
Injector injector =
Guice.createInjector( StartupModule.create( ASMClasspathScanner.class,
PackageFilter.create( DuplicateAutobindTests.class ) ) );
assertNotNull( injector );
}
@Test
public void testWithWrongPackage()
{
Injector injector =
Guice.createInjector( StartupModule.create( ASMClasspathScanner.class, PackageFilter.create( "java" ) ) );
assertNotNull( injector );
try
{
SecondTestInterface testInstance = injector.getInstance( SecondTestInterface.class );
fail( "The Scanner scanned the wrong package, so no Implementation should be bound to this Interface. Instance null? "
+ ( testInstance == null ) );
}
catch ( ConfigurationException e )
{
// ok
}
}
@Test
public void createTestInterface()
{
Injector injector =
Guice.createInjector( StartupModule.create( ASMClasspathScanner.class,
PackageFilter.create( DuplicateAutobindTests.class ) ) );
assertNotNull( injector );
try
{
TestInterface testInstance = injector.getInstance( TestInterface.class );
fail( "Instance implements TestInterface, but was not bound to. Instance may be null? "
+ ( testInstance == null ) );
}
catch ( ConfigurationException e )
{
// ok
}
}
@Test
public void createSecondTestInterface()
{
Injector injector =
Guice.createInjector( StartupModule.create( ASMClasspathScanner.class,
PackageFilter.create( DuplicateAutobindTests.class ) ) );
assertNotNull( injector );
SecondTestInterface sameInstance = injector.getInstance( SecondTestInterface.class );
assertNotNull( sameInstance );
assertTrue( sameInstance.fireEvent().equals( TestInterfaceImplementation.EVENT ) );
assertTrue( sameInstance instanceof TestInterface );
}
public static interface TestInterface
{
String sayHello();
}
public static interface SecondTestInterface
{
String fireEvent();
}
@Bind( to = @To( value = Type.CUSTOM, customs = { SecondTestInterface.class } ) )
public static class TestInterfaceImplementation
implements TestInterface, SecondTestInterface
{
public static final String TEST = "test";
public static final String EVENT = "event";
@Override
public String sayHello()
{
return TEST;
}
@Override
public String fireEvent()
{
return EVENT;
}
}
@Bind( to = @To( value = Type.CUSTOM, customs = { SecondTestInterface.class } ) )
public static class SecondInterfaceImplementation
implements TestInterface, SecondTestInterface
{
public static final String TEST = "test";
public static final String EVENT = "event";
@Override
public String sayHello()
{
return TEST;
}
@Override
public String fireEvent()
{
return EVENT;
}
}
}
| [
"naist1020@gmail.com"
] | naist1020@gmail.com |
00ca961ac30d860c30377c6c8095e59c42ef9580 | 445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602 | /aliyun-java-sdk-adb/src/main/java/com/aliyuncs/adb/model/v20190315/CreateElasticPlanRequest.java | 1031b2bf12916b59e6e8e492ccbc8d5cadc426ac | [
"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 | 5,986 | 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.adb.model.v20190315;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.adb.Endpoint;
/**
* @author auto create
* @version
*/
public class CreateElasticPlanRequest extends RpcAcsRequest<CreateElasticPlanResponse> {
private Long resourceOwnerId;
private String elasticPlanTimeStart;
private String elasticPlanEndDay;
private String elasticPlanWeeklyRepeat;
private Boolean elasticPlanEnable;
private String elasticPlanTimeEnd;
private String elasticPlanStartDay;
private String resourceOwnerAccount;
private String dBClusterId;
private String ownerAccount;
private Long ownerId;
private String elasticPlanName;
private String resourcePoolName;
private Integer elasticPlanNodeNum;
public CreateElasticPlanRequest() {
super("adb", "2019-03-15", "CreateElasticPlan", "ads");
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 Long getResourceOwnerId() {
return this.resourceOwnerId;
}
public void setResourceOwnerId(Long resourceOwnerId) {
this.resourceOwnerId = resourceOwnerId;
if(resourceOwnerId != null){
putQueryParameter("ResourceOwnerId", resourceOwnerId.toString());
}
}
public String getElasticPlanTimeStart() {
return this.elasticPlanTimeStart;
}
public void setElasticPlanTimeStart(String elasticPlanTimeStart) {
this.elasticPlanTimeStart = elasticPlanTimeStart;
if(elasticPlanTimeStart != null){
putQueryParameter("ElasticPlanTimeStart", elasticPlanTimeStart);
}
}
public String getElasticPlanEndDay() {
return this.elasticPlanEndDay;
}
public void setElasticPlanEndDay(String elasticPlanEndDay) {
this.elasticPlanEndDay = elasticPlanEndDay;
if(elasticPlanEndDay != null){
putQueryParameter("ElasticPlanEndDay", elasticPlanEndDay);
}
}
public String getElasticPlanWeeklyRepeat() {
return this.elasticPlanWeeklyRepeat;
}
public void setElasticPlanWeeklyRepeat(String elasticPlanWeeklyRepeat) {
this.elasticPlanWeeklyRepeat = elasticPlanWeeklyRepeat;
if(elasticPlanWeeklyRepeat != null){
putQueryParameter("ElasticPlanWeeklyRepeat", elasticPlanWeeklyRepeat);
}
}
public Boolean getElasticPlanEnable() {
return this.elasticPlanEnable;
}
public void setElasticPlanEnable(Boolean elasticPlanEnable) {
this.elasticPlanEnable = elasticPlanEnable;
if(elasticPlanEnable != null){
putQueryParameter("ElasticPlanEnable", elasticPlanEnable.toString());
}
}
public String getElasticPlanTimeEnd() {
return this.elasticPlanTimeEnd;
}
public void setElasticPlanTimeEnd(String elasticPlanTimeEnd) {
this.elasticPlanTimeEnd = elasticPlanTimeEnd;
if(elasticPlanTimeEnd != null){
putQueryParameter("ElasticPlanTimeEnd", elasticPlanTimeEnd);
}
}
public String getElasticPlanStartDay() {
return this.elasticPlanStartDay;
}
public void setElasticPlanStartDay(String elasticPlanStartDay) {
this.elasticPlanStartDay = elasticPlanStartDay;
if(elasticPlanStartDay != null){
putQueryParameter("ElasticPlanStartDay", elasticPlanStartDay);
}
}
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
public void setResourceOwnerAccount(String resourceOwnerAccount) {
this.resourceOwnerAccount = resourceOwnerAccount;
if(resourceOwnerAccount != null){
putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
}
public String getDBClusterId() {
return this.dBClusterId;
}
public void setDBClusterId(String dBClusterId) {
this.dBClusterId = dBClusterId;
if(dBClusterId != null){
putQueryParameter("DBClusterId", dBClusterId);
}
}
public String getOwnerAccount() {
return this.ownerAccount;
}
public void setOwnerAccount(String ownerAccount) {
this.ownerAccount = ownerAccount;
if(ownerAccount != null){
putQueryParameter("OwnerAccount", ownerAccount);
}
}
public Long getOwnerId() {
return this.ownerId;
}
public void setOwnerId(Long ownerId) {
this.ownerId = ownerId;
if(ownerId != null){
putQueryParameter("OwnerId", ownerId.toString());
}
}
public String getElasticPlanName() {
return this.elasticPlanName;
}
public void setElasticPlanName(String elasticPlanName) {
this.elasticPlanName = elasticPlanName;
if(elasticPlanName != null){
putQueryParameter("ElasticPlanName", elasticPlanName);
}
}
public String getResourcePoolName() {
return this.resourcePoolName;
}
public void setResourcePoolName(String resourcePoolName) {
this.resourcePoolName = resourcePoolName;
if(resourcePoolName != null){
putQueryParameter("ResourcePoolName", resourcePoolName);
}
}
public Integer getElasticPlanNodeNum() {
return this.elasticPlanNodeNum;
}
public void setElasticPlanNodeNum(Integer elasticPlanNodeNum) {
this.elasticPlanNodeNum = elasticPlanNodeNum;
if(elasticPlanNodeNum != null){
putQueryParameter("ElasticPlanNodeNum", elasticPlanNodeNum.toString());
}
}
@Override
public Class<CreateElasticPlanResponse> getResponseClass() {
return CreateElasticPlanResponse.class;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
4507b313358387c3d65aca98005018581563f2f7 | a0506c8e12e7c6c2ad9f9ef3db61ff77edb42d20 | /message-group-communication/src/main/java/com/lanjiu/im/grpc/client/service/LinkTransferCommunication.java | 42d0274f6fe3d486c3acc8806679737a7ad2aa2a | [] | no_license | zhangtao007/janissary | f3455431c672778c035ffc69e4726f10a32b2cd1 | 36f20de81e04140173209ae91a082bfdbc5abb34 | refs/heads/master | 2023-04-14T03:06:21.200752 | 2021-04-26T01:18:06 | 2021-04-26T01:18:06 | 352,592,849 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 934 | java | package com.lanjiu.im.grpc.client.service;
import com.lanjiu.im.grpc.*;
public class LinkTransferCommunication {
private static InformationStorageServiceGrpc.InformationStorageServiceBlockingStub blockingStub = null;
public static InformationStorageServiceGrpc.InformationStorageServiceBlockingStub linkTransferCommunication(){
InformationStorageServiceGrpc.InformationStorageServiceBlockingStub stub = InformationStorageClient.linkTransferCommunication(blockingStub);
return stub;
}
public AllGroupsMemberResponse selectGroupMembers(SelectGroupMemberRequest request){
blockingStub = linkTransferCommunication();
AllGroupsMemberResponse response = blockingStub.queryGroupMembersInfoList(request);
try {
InformationStorageClient.shutdown();
} catch (InterruptedException e) {
e.printStackTrace();
}
return response;
}
}
| [
"zha_gtao@126.com"
] | zha_gtao@126.com |
23102f8874c79d81140e6de9e135237e782b5e54 | ae76bed38ead1d9714f743648391c77d6cf3b11d | /homework/src/task/SupremeCouncil.java | 8e6456f5a2216a86a417bb03b347e33b0169cdd3 | [] | no_license | Andrii-Smit/Java_Core_lesson_13 | e9fa34c55192e80aab5d0e3a8df28cbfcdb161af | 040bdfc6f98054b0db9c8dc9d55ff4e2c22b907f | refs/heads/master | 2022-12-31T02:40:59.695869 | 2020-10-15T08:03:41 | 2020-10-15T08:03:41 | 304,252,873 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,962 | java | package task;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Scanner;
public final class SupremeCouncil {
private static SupremeCouncil instance = new SupremeCouncil();
private SupremeCouncil() {
}
public static SupremeCouncil getInstance() {
if (instance == null) {
instance = new SupremeCouncil();
}
return instance;
}
ArrayList<DeputyGroup> supremeCouncilArray = new ArrayList<DeputyGroup>();
public void addDeputyGroup() {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the name of the faction:");
String deputyGroupName = scanner.next();
DeputyGroup deputyGroup = new DeputyGroup(deputyGroupName);
supremeCouncilArray.add(deputyGroup);
System.out.println(deputyGroup.toString() + " successfully added to the Verkhovna Rada!");
}
public void removeDeputyGroup() {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the name of the faction:");
String deputyGroupName = scanner.next();
boolean typeCorrect = isDeputyGroupExists(supremeCouncilArray, deputyGroupName);
if (typeCorrect) {
Iterator<DeputyGroup> iterator = supremeCouncilArray.iterator();
while (iterator.hasNext()) {
DeputyGroup nextDeputyGroup = iterator.next();
if (nextDeputyGroup.getDeputyGroupName().equalsIgnoreCase(deputyGroupName)) {
iterator.remove();
System.out.println(nextDeputyGroup.toString() + " successfully removed from the Verkhovna Rada!");
}
}
} else {
System.out.println("There is no faction introduced in the Verkhovna Rada!");
}
}
public void getAllDeputyGroups() {
System.out.println("Factions registered in Verkhovna Rada:");
for (DeputyGroup deputyGroup : supremeCouncilArray) {
System.out.println(deputyGroup.toString());
}
}
public void clearDeputyGroup() {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the name of the faction:");
String deputyGroupName = scanner.next();
boolean typeCorrect = isDeputyGroupExists(supremeCouncilArray, deputyGroupName);
if (typeCorrect) {
for (DeputyGroup deputyGroup : supremeCouncilArray) {
if (deputyGroup.getDeputyGroupName().equalsIgnoreCase(deputyGroupName)) {
deputyGroup.clearDeputyGroup();
}
}
} else {
System.out.println("There is no faction introduced in the Verkhovna Rada!");
}
}
public void getDeputyGroup() {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the name of the faction:");
String deputyGroupName = scanner.next();
for (DeputyGroup deputyGroup : supremeCouncilArray) {
if (deputyGroup.getDeputyGroupName().equalsIgnoreCase(deputyGroupName)) {
System.out.println(deputyGroup.toString());
deputyGroup.getAllDeputies();
}
}
}
public void addDeputyToDeputyGroup() {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the name of the faction:");
String deputyGroupName = scanner.next();
boolean typeCorrect = isDeputyGroupExists(supremeCouncilArray, deputyGroupName);
if (typeCorrect) {
for (DeputyGroup deputyGroup : supremeCouncilArray) {
if (deputyGroup.getDeputyGroupName().equalsIgnoreCase(deputyGroupName)) {
deputyGroup.addDeputy();
}
}
} else {
System.out.println("There is no faction introduced in the Verkhovna Rada!");
}
}
public void removeDeputyFromDeputyGroup() {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the name of the faction:");
String deputyGroupName = scanner.next();
boolean typeCorrect = isDeputyGroupExists(supremeCouncilArray, deputyGroupName);
if (typeCorrect) {
for (DeputyGroup deputyGroup : supremeCouncilArray) {
if (deputyGroup.getDeputyGroupName().equalsIgnoreCase(deputyGroupName)) {
deputyGroup.removeDeputy();
}
}
} else {
System.out.println("There is no faction introduced in the Verkhovna Rada!");
}
}
public void getBribeTakersFromDeputyGroup() {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the name of the faction:");
String deputyGroupName = scanner.next();
boolean typeCorrect = isDeputyGroupExists(supremeCouncilArray, deputyGroupName);
if (typeCorrect) {
for (DeputyGroup deputyGroup : supremeCouncilArray) {
if (deputyGroup.getDeputyGroupName().equalsIgnoreCase(deputyGroupName)) {
deputyGroup.getBribeTakers();
}
}
} else {
System.out.println("There is no faction introduced in the Verkhovna Rada!");
}
}
public void getLargestBribeTakerFromDeputyGroup() {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the name of the faction:");
String deputyGroupName = scanner.next();
boolean typeCorrect = isDeputyGroupExists(supremeCouncilArray, deputyGroupName);
if (typeCorrect) {
for (DeputyGroup deputyGroup : supremeCouncilArray) {
if (deputyGroup.getDeputyGroupName().equalsIgnoreCase(deputyGroupName)) {
deputyGroup.getLargestBribeTaker();
}
}
} else {
System.out.println("There is no faction introduced in the Verkhovna Rada!");
}
}
public void getAllDeputiesFromDeputyGroup() {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the name of the faction:");
String deputyGroupName = scanner.next();
boolean typeCorrect = isDeputyGroupExists(supremeCouncilArray, deputyGroupName);
if (typeCorrect) {
for (DeputyGroup deputyGroup : supremeCouncilArray) {
if (deputyGroup.getDeputyGroupName().equalsIgnoreCase(deputyGroupName)) {
deputyGroup.getAllDeputies();;
}
}
} else {
System.out.println("There is no faction introduced in the Verkhovna Rada!");
}
}
static boolean isDeputyGroupExists(ArrayList<DeputyGroup> supremeCouncilArray, String deputyGroupName) {
boolean flag = false;
for (DeputyGroup deputyGroup : supremeCouncilArray) {
if (deputyGroup.getDeputyGroupName().equalsIgnoreCase(deputyGroupName)) {
flag = true;
}
}
return flag;
}
}
| [
"lovak_000@Koval"
] | lovak_000@Koval |
b67f69af931d93ad6528db76f447da3643854932 | 4679ff6fda8c5fb74ee873a6aedc5d1aee4b87f7 | /src/main/java/uk/co/alt236/apkdetails/repo/dex/model/DexFile.java | 011307e8a6092352b6afddc980815f4c0dda02ce | [
"Apache-2.0"
] | permissive | okasurya/apkdetails | e33bb0a1ecd45725efe73c5d75315b89f41a7470 | 905ba6bd2f26b08dc5bf8ffbcdab27fe5b0337cd | refs/heads/master | 2022-02-24T11:21:59.441556 | 2019-02-10T22:17:28 | 2019-02-10T22:22:22 | 170,212,320 | 0 | 0 | Apache-2.0 | 2022-01-27T16:22:10 | 2019-02-11T22:23:29 | Java | UTF-8 | Java | false | false | 1,515 | java | package uk.co.alt236.apkdetails.repo.dex.model;
import org.jf.dexlib2.dexbacked.DexBackedDexFile;
import java.util.Set;
public class DexFile {
private final long methodCount;
private final long classCount;
private final long fieldCount;
private final long stringCount;
private final long protoCount;
private final Set<DexClass> classes;
private final long fileSize;
private final String name;
public DexFile(DexBackedDexFile dexBackedFile,
String name,
long fileSize) {
this.methodCount = dexBackedFile.getMethodCount();
this.classCount = dexBackedFile.getClassCount();
this.fieldCount = dexBackedFile.getFieldCount();
this.stringCount = dexBackedFile.getStringCount();
this.protoCount = dexBackedFile.getProtoCount();
this.classes = DexClass.getClasses(dexBackedFile.getClasses());
this.fileSize = fileSize;
this.name = name;
}
public long getMethodCount() {
return methodCount;
}
public long getClassCount() {
return classCount;
}
public long getFieldCount() {
return fieldCount;
}
public long getStringCount() {
return stringCount;
}
public Set<DexClass> getClasses() {
return classes;
}
public String getName() {
return name;
}
public long getFileSize() {
return fileSize;
}
public long getProtoCount() {
return protoCount;
}
}
| [
"aschillings@gmail.com"
] | aschillings@gmail.com |
d289900b3a7ab889c773dfbad70ec64bd5833b79 | d494337a2dce3e7aa2bc69de8861329872798f04 | /app/src/main/java/com/fjrcloud/sciencepro/data/BaseBean.java | 99cb84f8fdce61a5c33c5e16dfa52b588ff052bb | [] | no_license | pigff/Spiretire | f88b6c36d652b8ab253ba0d0c1e644ab78c4917d | 768cd9a8ccc7739e411460c68270df4eca8f9e0c | refs/heads/master | 2021-01-19T20:50:32.436650 | 2017-05-11T06:58:44 | 2017-05-11T06:58:44 | 88,564,562 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 482 | java | package com.fjrcloud.sciencepro.data;
import java.io.Serializable;
/**
* Created by lin on 2016/12/30.
*/
public class BaseBean<T> implements Serializable {
private String code;
private String msg;
private T t;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
| [
"androiddevzf@163.com"
] | androiddevzf@163.com |
efa37150cccdbd2bcb9f214ef614e9af4b1974a3 | 7b73756ba240202ea92f8f0c5c51c8343c0efa5f | /classes5/com/tencent/mobileqq/emoticonview/EmotionDownloadOrUpdateAdapter$EmotionDownloadOrUpdateViewHolder.java | 15b3d285792fc93b139b2c28ef6c1728a0b30567 | [] | no_license | meeidol-luo/qooq | 588a4ca6d8ad579b28dec66ec8084399fb0991ef | e723920ac555e99d5325b1d4024552383713c28d | refs/heads/master | 2020-03-27T03:16:06.616300 | 2016-10-08T07:33:58 | 2016-10-08T07:33:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 791 | java | package com.tencent.mobileqq.emoticonview;
import android.widget.TextView;
import com.tencent.image.URLImageView;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
import com.tencent.mobileqq.widget.ProgressButton;
public class EmotionDownloadOrUpdateAdapter$EmotionDownloadOrUpdateViewHolder
extends BaseEmotionAdapter.ViewHolder
{
public TextView a;
public URLImageView a;
public ProgressButton a;
public EmotionDownloadOrUpdateAdapter$EmotionDownloadOrUpdateViewHolder()
{
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
}
}
/* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\com\tencent\mobileqq\emoticonview\EmotionDownloadOrUpdateAdapter$EmotionDownloadOrUpdateViewHolder.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"1776098770@qq.com"
] | 1776098770@qq.com |
3fed18c8f51321f7ede9ad5329edc11815a492b9 | a00326c0e2fc8944112589cd2ad638b278f058b9 | /src/main/java/000/135/128/CWE325_Missing_Required_Cryptographic_Step__MessageDigest_update_12.java | 520aad98e9c50807866bfa5b75f8d2fd9c7c59e2 | [] | no_license | Lanhbao/Static-Testing-for-Juliet-Test-Suite | 6fd3f62713be7a084260eafa9ab221b1b9833be6 | b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68 | refs/heads/master | 2020-08-24T13:34:04.004149 | 2019-10-25T09:26:00 | 2019-10-25T09:26:00 | 216,822,684 | 0 | 1 | null | 2019-11-08T09:51:54 | 2019-10-22T13:37:13 | Java | UTF-8 | Java | false | false | 2,817 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE325_Missing_Required_Cryptographic_Step__MessageDigest_update_12.java
Label Definition File: CWE325_Missing_Required_Cryptographic_Step.label.xml
Template File: point-flaw-12.tmpl.java
*/
/*
* @description
* CWE: 325 Missing Required Cryptographic Step
* Sinks: MessageDigest_update
* GoodSink: Include call to MessageDigest.update()
* BadSink : Missing call to MessageDigest.update()
* Flow Variant: 12 Control flow: if(IO.staticReturnsTrueOrFalse())
*
* */
import java.security.MessageDigest;
public class CWE325_Missing_Required_Cryptographic_Step__MessageDigest_update_12 extends AbstractTestCase
{
public void bad() throws Throwable
{
if (IO.staticReturnsTrueOrFalse())
{
MessageDigest messageDigest = MessageDigest.getInstance("SHA-512");
/* FLAW: Missing call to MessageDigest.update(). This will result in the hash being of no data */
IO.writeLine(IO.toHex(messageDigest.digest()));
}
else
{
final String HASH_INPUT = "ABCDEFG123456";
MessageDigest messageDigest = MessageDigest.getInstance("SHA-512");
/* FIX: Include call to MessageDigest.update() */
messageDigest.update(HASH_INPUT.getBytes("UTF-8"));
IO.writeLine(IO.toHex(messageDigest.digest()));
}
}
/* good1() changes the "if" so that both branches use the GoodSink */
private void good1() throws Throwable
{
if (IO.staticReturnsTrueOrFalse())
{
final String HASH_INPUT = "ABCDEFG123456";
MessageDigest messageDigest = MessageDigest.getInstance("SHA-512");
/* FIX: Include call to MessageDigest.update() */
messageDigest.update(HASH_INPUT.getBytes("UTF-8"));
IO.writeLine(IO.toHex(messageDigest.digest()));
}
else
{
final String HASH_INPUT = "ABCDEFG123456";
MessageDigest messageDigest = MessageDigest.getInstance("SHA-512");
/* FIX: Include call to MessageDigest.update() */
messageDigest.update(HASH_INPUT.getBytes("UTF-8"));
IO.writeLine(IO.toHex(messageDigest.digest()));
}
}
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);
}
}
| [
"anhtluet12@gmail.com"
] | anhtluet12@gmail.com |
46a5bd2cd1aeeea67ae8c44e2266b871415e0286 | 25baed098f88fc0fa22d051ccc8027aa1834a52b | /src/main/java/com/ljh/controller/base/OpStaOpeitemController.java | 4bb0e49463aee8044d9aff3009d367e41a40755b | [] | no_license | woai555/ljh | a5015444082f2f39d58fb3e38260a6d61a89af9f | 17cf8f4415c9ae7d9fedae46cd9e9d0d3ce536f9 | refs/heads/master | 2022-07-11T06:52:07.620091 | 2022-01-05T06:51:27 | 2022-01-05T06:51:27 | 132,585,637 | 0 | 0 | null | 2022-06-17T03:29:19 | 2018-05-08T09:25:32 | Java | UTF-8 | Java | false | false | 319 | java | package com.ljh.controller.base;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
/**
* <p>
* 前端控制器
* </p>
*
* @author ljh
* @since 2020-10-26
*/
@Controller
@RequestMapping("/opStaOpeitem")
public class OpStaOpeitemController {
}
| [
"37681193+woai555@users.noreply.github.com"
] | 37681193+woai555@users.noreply.github.com |
724aadec94757183586fb8abc3f8c056e2e107db | 502ea93de54a1be3ef42edb0412a2bf4bc9ddbef | /sources/android/support/p017v4/graphics/C0417g.java | 751986ec968df210310c86a088177fc3ed027e63 | [] | no_license | dovanduy/MegaBoicotApk | c0852af0773be1b272ec907113e8f088addb0f0c | 56890cb9f7afac196bd1fec2d1326f2cddda37a3 | refs/heads/master | 2020-07-02T04:28:02.199907 | 2019-08-08T20:44:49 | 2019-08-08T20:44:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,318 | java | package android.support.p017v4.graphics;
import android.graphics.Typeface;
import com.google.android.exoplayer2.C2793C;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* renamed from: android.support.v4.graphics.g */
/* compiled from: TypefaceCompatApi28Impl */
public class C0417g extends C0416f {
/* access modifiers changed from: protected */
/* renamed from: a */
public Typeface mo1477a(Object obj) {
try {
Object newInstance = Array.newInstance(this.f1049a, 1);
Array.set(newInstance, 0, obj);
return (Typeface) this.f1055g.invoke(null, new Object[]{newInstance, C2793C.SANS_SERIF_NAME, Integer.valueOf(-1), Integer.valueOf(-1)});
} catch (IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
/* access modifiers changed from: protected */
/* renamed from: f */
public Method mo1484f(Class cls) throws NoSuchMethodException {
Method declaredMethod = Typeface.class.getDeclaredMethod("createFromFamiliesWithDefault", new Class[]{Array.newInstance(cls, 1).getClass(), String.class, Integer.TYPE, Integer.TYPE});
declaredMethod.setAccessible(true);
return declaredMethod;
}
}
| [
"pablo.valle.b@gmail.com"
] | pablo.valle.b@gmail.com |
ebb0641deb646c3437483c46dedc6894e11fa1cd | eb8a97f5a919e45fb17441a079f80cb3dd4b751b | /app/src/main/java/com/cvnavi/logistics/i51eyun/app/widget/segmentview/MyFleetRecordSegmentView.java | 0fb2cd6e0f8d2e236417a7cd888703bc803794d3 | [] | no_license | ChenJun1/I51EY | 46b3e5417fce5df3b945cd65731e6908d392157c | cf10d8f93665cddda4a111cae34dbb1b05a33414 | refs/heads/master | 2020-12-01T06:07:32.464735 | 2016-08-31T02:15:16 | 2016-08-31T02:15:16 | 66,893,987 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,386 | java | package com.cvnavi.logistics.i51eyun.app.widget.segmentview;
import android.content.Context;
import android.content.res.ColorStateList;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.cvnavi.logistics.i51eyun.app.R;
import org.xmlpull.v1.XmlPullParser;
/**
* 版权所有势航网络
* Created by Chuzy on 2016/8/8.
* 头部选择(我的车队记录分析中)
*/
public class MyFleetRecordSegmentView extends LinearLayout {
private TextView textView1;
private TextView textView3;
private onSegmentViewClickListener listener;
public MyFleetRecordSegmentView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public MyFleetRecordSegmentView(Context context) {
super(context);
init();
}
private static int dp2Px(Context context, float dp) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dp * scale + 0.5f);
}
private void init() {
textView1 = new TextView(getContext());
textView3 = new TextView(getContext());
textView1.setLayoutParams(new LayoutParams(0, LayoutParams.WRAP_CONTENT, 1));
textView3.setLayoutParams(new LayoutParams(0, LayoutParams.WRAP_CONTENT, 1));
textView1.setText("最近三天");
textView3.setText("最近一月");
//noinspection ResourceType
XmlPullParser xrp = getResources().getXml(R.drawable.seg_text_color_selector);
try {
ColorStateList csl = ColorStateList.createFromXml(getResources(), xrp);
textView1.setTextColor(csl);
textView3.setTextColor(csl);
} catch (Exception e) {
}
textView1.setGravity(Gravity.CENTER);
textView3.setGravity(Gravity.CENTER);
textView1.setPadding(3, 6, 3, 6);
textView3.setPadding(3, 6, 3, 6);
setSegmentTextSize(16);
textView1.setBackgroundResource(R.drawable.seg_left);
textView3.setBackgroundResource(R.drawable.seg_right);
textView1.setSelected(true);
this.removeAllViews();
this.addView(textView1);
this.addView(textView3);
this.invalidate();
textView1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (textView1.isSelected()) {
listener.onSegmentViewClick(textView1, 0);
return;
}
textView1.setSelected(true);
textView3.setSelected(false);
if (listener != null) {
listener.onSegmentViewClick(textView1, 0);
}
}
});
textView3.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (textView3.isSelected()) {
listener.onSegmentViewClick(textView3, 2);
return;
}
textView3.setSelected(true);
textView1.setSelected(false);
if (listener != null) {
listener.onSegmentViewClick(textView3, 2);
}
}
});
}
/**
* 设置字体大小 单位dip
* <p>
* 2014年7月18日
* </p>
*
* @param dp
* @author RANDY.ZHANG
*/
public void setSegmentTextSize(int dp) {
textView1.setTextSize(TypedValue.COMPLEX_UNIT_DIP, dp);
textView3.setTextSize(TypedValue.COMPLEX_UNIT_DIP, dp);
}
public void setOnSegmentViewClickListener(onSegmentViewClickListener listener) {
this.listener = listener;
}
/**
* 设置文字
*/
public void setSegmentText(CharSequence text, int position) {
if (position == 0) {
textView1.setText(text);
}
if (position == 2) {
textView3.setText(text);
}
}
/**
* 全部选为false
*/
public void setSegmentTextCooler() {
textView1.setSelected(false);
textView3.setSelected(false);
}
public interface onSegmentViewClickListener {
void onSegmentViewClick(TextView v, int position);
}
} | [
"791954958@qq.com"
] | 791954958@qq.com |
6596a1c5e20894911090d73297bbc70a4ee49e14 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/10/10_56bb5ffd0a6c19e88121eeb4a05c1850e5361cd9/RemoteMethod/10_56bb5ffd0a6c19e88121eeb4a05c1850e5361cd9_RemoteMethod_t.java | 55138bd99f843074fd8935be2d874b7ac3665b21 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 1,742 | java | package rsaother;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import org.restlet.resource.ServerResource;
public class RemoteMethod extends ServerResource implements IRemoteRestCall {
public Object doCall(Object[] args) {
List<String> segments = getOriginalRef().getSegments();
Object service = RESTServiceAdmin.servicesByID.get(segments.get(0));
Method method = null;
if(segments.size() > 2) {
Class[] argumentClasses = new Class[segments.size()-2];
for(int i = 0; i < segments.size()-2; i++) {
try {
argumentClasses[i] = Class.forName(segments.get(i+2));
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
try {
method = service.getClass().getMethod(segments.get(1), argumentClasses);
} catch (NoSuchMethodException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
try {
method = service.getClass().getMethod(segments.get(1));
} catch (NoSuchMethodException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
try {
return method.invoke(service, args);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return null;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
54633f7dda28c39939bea3ef47ad1601348ad31c | e93a03b1dfe8c8a9e8fc6255ed72e3d9008725ee | /src/com/mainacad/model/User.java | cc2d11abad99a5ffa78e016c94b86bf8804c06cd | [] | no_license | Ignatenko2207/WorkWithCollectionsMA45 | 81af1f20dc1b7010ad4d17b1919b38b492a96d8a | d545b2a41d156712e92daf5b6870e5f2a2da1a9a | refs/heads/master | 2020-08-09T04:11:25.393717 | 2019-10-09T18:28:10 | 2019-10-09T18:28:10 | 213,994,065 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 706 | java | package com.mainacad.model;
public class User implements Comparable<User>{
private String name;
private int age;
public User(String name, int age) {
this.name = name;
this.age = age;
}
public User() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public int compareTo(User user) {
if (this.age > user.age){
return 1;
} else if (this.age < user.age) {
return -1;
}
return 0;
}
}
| [
"ignatenko2207@gmail.com"
] | ignatenko2207@gmail.com |
fc79637f103a519ea87e51f31164498e89cd6653 | 18237bc643deab327a4b49b16b49ed4154f5f99b | /ambit2-all/ambit2-ui/src/main/java/ambit2/ui/AmbitSettingsListener.java | be39af1d61550006fb2ee391bf4fabc74415900f | [] | no_license | ideaconsult/ambit-mirror | 14ce076cd286ca4f5dc3465ed4105b03967c7cf0 | 21655a99791ef2f538786367f6dc779d3bff0200 | refs/heads/master | 2023-08-22T20:26:43.554464 | 2023-07-15T10:35:41 | 2023-07-15T10:35:41 | 133,390,762 | 5 | 3 | null | 2022-05-16T18:53:27 | 2018-05-14T16:28:03 | Java | UTF-8 | Java | false | false | 4,051 | java | /*
* Created on 2006-2-18
*
*/
package ambit2.ui;
//TODO derive from SimpleIOListener
import javax.swing.JOptionPane;
import org.openscience.cdk.io.ReaderEvent;
import org.openscience.cdk.io.listener.IReaderListener;
import org.openscience.cdk.io.listener.IWriterListener;
import org.openscience.cdk.io.setting.IOSetting;
import org.openscience.cdk.io.setting.IOSetting.Importance;
import ambit2.base.data.Profile;
import ambit2.base.data.ProfileListModel;
import ambit2.base.data.Property;
import ambit2.ui.editors.SelectFieldsPanel;
/**
* An implementation of {@link org.openscience.cdk.io.listener.IReaderListener} and {@link org.openscience.cdk.io.listener.IWriterListener}.
* On each {@link #processIOSettingQuestion(IOSetting)} call launches a
* {@link SelectFieldsPanel} visualizing current list of properties
* {@link Property}.
* The user may change the assignment of the properties.<br>
* To be used as {@link org.openscience.cdk.io.listener.IChemObjectIOListener}
* in order to process properties {@link Property}.
* @author Nina Jeliazkova nina@acad.bg
* <b>Modified</b> 2008-12-13
*/
public class AmbitSettingsListener implements IReaderListener, IWriterListener{
protected Importance level;
protected Profile<Property> properties;
protected int counter= 0;
/**
*
* @param level
*/
public AmbitSettingsListener(Importance level) {
super();
this.level = level;
properties = new Profile();
}
/* (non-Javadoc)
* @see org.openscience.cdk.io.listener.SwingGUIListener#processIOSettingQuestion(org.openscience.cdk.io.setting.IOSetting)
*/
public void processIOSettingQuestion(IOSetting setting) {
if (setting.getLevel().ordinal() <= this.level.ordinal()) {
try {
Property.IO_QUESTION question = Property.IO_QUESTION.valueOf(setting.getQuestion());
switch (question) {
case IO_START: { counter = 0;}
case IO_STOP: { if (counter > 0) launchUI(); }
case IO_TRANSLATE_NAME: {
if (!"".equals(setting.getName().trim())) {
//if (properties.get(setting.getName())==null) {
Property p = Property.getInstance(setting.getName(),"I/O");
p.setLabel(setting.getDefaultSetting());
p.setOrder(counter);
properties.add(p);
counter++;
//}
}
}
default: {}
}
} catch (Exception x) {
x.printStackTrace();
}
} else {
try {
Property.IO_QUESTION question = Property.IO_QUESTION.valueOf(setting.getQuestion());
switch (question) {
case IO_START: { counter = 0;}
case IO_STOP: { }
case IO_TRANSLATE_NAME: {
if (!"".equals(setting.getName().trim())) {
//if (properties.get(setting.getName())==null) {
Property p = Property.getInstance(setting.getName(),"I/O");
p.setLabel(setting.getDefaultSetting());
p.setOrder(counter);
p.setEnabled(true);
properties.add(p);
counter++;
//}
}
}
default: {}
}
} catch (Exception x) {
x.printStackTrace();
}
}
}
protected void launchUI() {
SelectFieldsPanel sp = new SelectFieldsPanel(new ProfileListModel(properties),"All available fields that can be exported are listed in the left pane. Select those fields you want to be exported and click \">\" button to move them to right pane.");
JOptionPane.showMessageDialog(null,sp,"",JOptionPane.PLAIN_MESSAGE);
}
public void frameRead(ReaderEvent event) {
}
public Profile<Property> getProperties() {
return properties;
}
public void setProperties(Profile properties) {
this.properties = properties;
}
}
| [
"jeliazkova.nina@gmail.com"
] | jeliazkova.nina@gmail.com |
5109c300a556851183327910eaaf142fac7ece96 | 52fbe7a7ed03593c05356c469bdb858c68d391d0 | /src/main/java/org/demo/rest/controller/ContactCategoryRestController.java | d32b1caf28d3f1fd27a9dc5ced54f024c652cbbc | [] | no_license | altansenel/maven-project | 4d165cb10da24159f58d083f4d5e4442ab3265b2 | 0f2e392553e5fb031235c9df776a4a01b077c349 | refs/heads/master | 2016-08-12T05:51:51.359531 | 2016-02-25T07:26:28 | 2016-02-25T07:26:28 | 52,504,851 | 0 | 0 | null | null | null | null | ISO-8859-13 | Java | false | false | 3,111 | java | /*
* Created on 24 Žub 2016 ( Time 15:56:48 )
* Generated by Telosys Tools Generator ( version 2.1.1 )
*/
package org.demo.rest.controller;
import java.util.LinkedList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.demo.bean.ContactCategory;
import org.demo.business.service.ContactCategoryService;
import org.demo.web.listitem.ContactCategoryListItem;
/**
* Spring MVC controller for 'ContactCategory' management.
*/
@Controller
public class ContactCategoryRestController {
@Resource
private ContactCategoryService contactCategoryService;
@RequestMapping( value="/items/contactCategory",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public List<ContactCategoryListItem> findAllAsListItems() {
List<ContactCategory> list = contactCategoryService.findAll();
List<ContactCategoryListItem> items = new LinkedList<ContactCategoryListItem>();
for ( ContactCategory contactCategory : list ) {
items.add(new ContactCategoryListItem( contactCategory ) );
}
return items;
}
@RequestMapping( value="/contactCategory",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public List<ContactCategory> findAll() {
return contactCategoryService.findAll();
}
@RequestMapping( value="/contactCategory/{id}",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public ContactCategory findOne(@PathVariable("id") Integer id) {
return contactCategoryService.findById(id);
}
@RequestMapping( value="/contactCategory",
method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public ContactCategory create(@RequestBody ContactCategory contactCategory) {
return contactCategoryService.create(contactCategory);
}
@RequestMapping( value="/contactCategory/{id}",
method = RequestMethod.PUT,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public ContactCategory update(@PathVariable("id") Integer id, @RequestBody ContactCategory contactCategory) {
return contactCategoryService.update(contactCategory);
}
@RequestMapping( value="/contactCategory/{id}",
method = RequestMethod.DELETE,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public void delete(@PathVariable("id") Integer id) {
contactCategoryService.delete(id);
}
}
| [
"altan.senel@gunessigorta.com.tr"
] | altan.senel@gunessigorta.com.tr |
7ad675253133a5cafa8111505936043937d01c15 | f234748ca96ffa4699ffa1163187a2c8e7e1789e | /SelfCoding_Dao/src/main/java/com/feri/dao/pay/PayorderMapper.java | 4c8a5679a39841339f9b4be0fcf478e57eeaade8 | [] | no_license | mashwen/selfcoding | 6c6dd6cbf39b3de9ff1c00c659e605c10a31b2b1 | db1ebac564a488779aba291e878c19a31c8e5e7e | refs/heads/master | 2022-12-22T22:04:05.165580 | 2019-04-01T07:30:46 | 2019-04-01T07:30:47 | 203,338,806 | 0 | 0 | null | 2022-12-15T23:54:59 | 2019-08-20T08:59:46 | Java | UTF-8 | Java | false | false | 268 | java | package com.feri.dao.pay;
import com.feri.entity.pay.Payorder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Feri
* @since 2019-03-20
*/
public interface PayorderMapper extends BaseMapper<Payorder> {
} | [
"xingfei_work@163.com"
] | xingfei_work@163.com |
4a4e28afe69e90516584b42ab212e97db802c508 | cbb7c3b2b34ed27c2fbffe6813378fc9556b766a | /src/main/java/com/hujiang/project/zhgd/sbUnloaderAlarmtime/service/ISbUnloaderAlarmtimeService.java | 95c404d436f4c23782becaa000ded036e7ce8c25 | [
"MIT"
] | permissive | soon14/zhgd | e35d43b6c37e6f06eb10af8fe34c7ea603bf0da7 | 1a0901f06e0bf0b64fe233979ea3d06af5c53035 | refs/heads/master | 2023-05-01T20:30:23.972073 | 2019-11-25T12:45:45 | 2019-11-25T12:45:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,997 | java | package com.hujiang.project.zhgd.sbUnloaderAlarmtime.service;
import com.hujiang.project.zhgd.sbUnloaderAlarmtime.domain.SbUnloaderAlarmtime;
import com.hujiang.project.zhgd.sbUnloaderRegistration.domain.ExportUnloaderAlarmtime;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 卸料报警时刻数据 服务层
*
* @author hujiang
* @date 2019-09-11
*/
public interface ISbUnloaderAlarmtimeService
{
/** 卸料app报警界面数据*/
public List<SbUnloaderAlarmtime> getSbUnloaderAlarmtimeList(SbUnloaderAlarmtime sbUnloaderAlarmtime);
public int count(Integer projectId,String hxzId,Integer alarmType,String startTime);
public List<ExportUnloaderAlarmtime> getSbUnloaderAlarmtimeListById(String[] ids,String deviceId,Integer alarmType);
/**
* 查询卸料报警时刻数据信息
*
* @param id 卸料报警时刻数据ID
* @return 卸料报警时刻数据信息
*/
public SbUnloaderAlarmtime selectSbUnloaderAlarmtimeById(Integer id);
/**
* 查询卸料报警时刻数据列表
*
* @param sbUnloaderAlarmtime 卸料报警时刻数据信息
* @return 卸料报警时刻数据集合
*/
public List<SbUnloaderAlarmtime> selectSbUnloaderAlarmtimeList(SbUnloaderAlarmtime sbUnloaderAlarmtime);
/**
* 新增卸料报警时刻数据
*
* @param sbUnloaderAlarmtime 卸料报警时刻数据信息
* @return 结果
*/
public int insertSbUnloaderAlarmtime(SbUnloaderAlarmtime sbUnloaderAlarmtime);
/**
* 修改卸料报警时刻数据
*
* @param sbUnloaderAlarmtime 卸料报警时刻数据信息
* @return 结果
*/
public int updateSbUnloaderAlarmtime(SbUnloaderAlarmtime sbUnloaderAlarmtime);
/**
* 删除卸料报警时刻数据信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSbUnloaderAlarmtimeByIds(String ids);
}
| [
"rockylin@qq.com"
] | rockylin@qq.com |
b86b4dc893c193bc92b80ac76d3e624b43d207f8 | 7f20b1bddf9f48108a43a9922433b141fac66a6d | /cytoscape/tags/Cyto-2_3_2/src/cytoscape/visual/mappings/discrete/DiscreteMappingReader.java | de7a1fe90a7cf9caf1863d00d0b77fce0ca59a8c | [] | no_license | ahdahddl/cytoscape | bf783d44cddda313a5b3563ea746b07f38173022 | a3df8f63dba4ec49942027c91ecac6efa920c195 | refs/heads/master | 2020-06-26T16:48:19.791722 | 2013-08-28T04:08:31 | 2013-08-28T04:08:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,737 | java |
/*
File: DiscreteMappingReader.java
Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org)
The Cytoscape Consortium is:
- Institute for Systems Biology
- University of California San Diego
- Memorial Sloan-Kettering Cancer Center
- Institut Pasteur
- Agilent Technologies
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1 of the License, or
any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
documentation provided hereunder is on an "as is" basis, and the
Institute for Systems Biology and the Whitehead Institute
have no obligations to provide maintenance, support,
updates, enhancements or modifications. In no event shall the
Institute for Systems Biology and the Whitehead Institute
be liable to any party for direct, indirect, special,
incidental or consequential damages, including lost profits, arising
out of the use of this software and its documentation, even if the
Institute for Systems Biology and the Whitehead Institute
have been advised of the possibility of such damage. See
the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
//----------------------------------------------------------------------------
// $Revision$
// $Date$
// $Author$
//----------------------------------------------------------------------------
package cytoscape.visual.mappings.discrete;
import cytoscape.visual.parsers.ValueParser;
import java.util.Enumeration;
import java.util.Properties;
import java.util.TreeMap;
/**
* Reads in DiscreteMapping Properties.
*
* Unit Test for this class exists in:
* cytoscape.visual.mappings.discrete.unitTests.TestDiscreteMappingReader.
*/
public class DiscreteMappingReader {
private String controllingAttribute;
private TreeMap map = new TreeMap();
/**
* Constructor.
* @param props Properties Object.
* @param baseKey Base Property Key.
* @param parser ValueParser Object.
*/
public DiscreteMappingReader(Properties props, String baseKey,
ValueParser parser) {
readProperties(props, baseKey, parser);
}
/**
* Gets Controlling Attribute Name.
* @return Controlling Attribute Name.
*/
public String getControllingAttributeName() {
return controllingAttribute;
}
/**
* Gets the Discrete Map.
* @return TreeMap Object.
*/
public TreeMap getMap() {
return map;
}
/**
* Read in Settings from the Properties Object.
*/
private void readProperties(Properties props, String baseKey,
ValueParser parser) {
String contKey = baseKey + ".controller";
controllingAttribute = props.getProperty(contKey);
String mapKey = baseKey + ".map.";
Enumeration eProps = props.propertyNames();
while (eProps.hasMoreElements()) {
String key = (String) eProps.nextElement();
if (key.startsWith(mapKey)) {
String value = props.getProperty(key);
String domainVal = key.substring(mapKey.length());
Object parsedVal = parser.parseStringValue(value);
map.put(domainVal, parsedVal);
}
}
}
}
| [
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] | mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5 |
243623843c05a3e58886b1b816b1bf1ec3e296da | aa5c8995b6f19ee681bcc8ee659fbd6081d7f318 | /layouts/LinearLayout/app/src/main/java/com/example/linearlayout/MainActivity.java | eeae1f19fc45d7a940ec42018ec38ac2e589e2cb | [] | no_license | sheremet-vlad/head-first-android | 6213e24341f68265e6abe3c19f888f35633ebf72 | 1765268bfb939314aff3a2072f146bae358b9986 | refs/heads/master | 2020-04-01T20:43:37.082094 | 2018-12-23T17:47:12 | 2018-12-23T17:47:12 | 153,617,662 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 619 | java | package com.example.linearlayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void clickShowToasts(View view) {
CharSequence message = "Hello, i am toasts";
int time = Toast.LENGTH_LONG;
Toast toast = Toast.makeText(this, message, time);
toast.show();
}
}
| [
"ysc.vlad@gmail.com"
] | ysc.vlad@gmail.com |
553dd26bca30ba27b2bc8dcadd51f9b882c6b8e0 | a2753b177335ca9ee647cd862c9d21b824e0f4c6 | /src/main/java/edu/arizona/biosemantics/otolite/client/rpc/OrderService.java | 93a2e30bf9a3ded951cd016d6aeda32274476193 | [] | no_license | rodenhausen/otoLiteFromEtcIntegration | d6d339cbca23512a453d7128e1375914e8177e5b | 9b33cd4bd1667e2657d931591ba2866bf97d3d63 | refs/heads/master | 2016-09-05T15:48:19.048749 | 2014-08-20T02:23:07 | 2014-08-20T02:23:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 716 | java | package edu.arizona.biosemantics.otolite.client.rpc;
import java.util.ArrayList;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import edu.arizona.biosemantics.otolite.shared.beans.orders.OrderCategory;
import edu.arizona.biosemantics.otolite.shared.beans.orders.OrderSet;
@RemoteServiceRelativePath("orders")
public interface OrderService extends RemoteService {
ArrayList<OrderSet> getOrderSets(String uploadID) throws Exception;
ArrayList<OrderCategory> getOrderCategories(String uploadID) throws Exception;
void saveOrderSet(OrderSet orserSet) throws Exception;
OrderSet getOrderSetByID(String categoryID) throws Exception;
}
| [
"thomas.rodenhausen@gmail.com"
] | thomas.rodenhausen@gmail.com |
6d9a5ad5c2bc1497e2bace6f8a183be98622fcfc | ccf82688f082e26cba5fc397c76c77cc007ab2e8 | /Mage.Sets/src/mage/cards/t/ThunderingRaiju.java | 688e79149d0c93bbfc72de502defce1b18c2ff3e | [
"MIT"
] | permissive | magefree/mage | 3261a89320f586d698dd03ca759a7562829f247f | 5dba61244c738f4a184af0d256046312ce21d911 | refs/heads/master | 2023-09-03T15:55:36.650410 | 2023-09-03T03:53:12 | 2023-09-03T03:53:12 | 4,158,448 | 1,803 | 1,133 | MIT | 2023-09-14T20:18:55 | 2012-04-27T13:18:34 | Java | UTF-8 | Java | false | false | 2,874 | java | package mage.cards.t;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.filter.predicate.permanent.ModifiedPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ThunderingRaiju extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
static {
filter.add(ModifiedPredicate.instance);
filter.add(AnotherPredicate.instance);
}
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
private static final Hint hint = new ValueHint("Other modified creatures you control", xValue);
public ThunderingRaiju(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Haste
this.addAbility(HasteAbility.getInstance());
// Whenever Thundering Raiju attacks, put a +1/+1 counter on target creature you control. Then Thundering Raiju deals X damage to each opponent, where X is the number of modified creatures you control other than Thundering Raiju.
Ability ability = new AttacksTriggeredAbility(
new AddCountersTargetEffect(CounterType.P1P1.createInstance())
);
ability.addTarget(new TargetControlledCreaturePermanent());
ability.addEffect(new DamagePlayersEffect(
Outcome.Damage, xValue, TargetController.OPPONENT
).setText("Then {this} deals X damage to each opponent, " +
"where X is the number of modified creatures you control other than {this}"));
this.addAbility(ability.addHint(hint));
}
private ThunderingRaiju(final ThunderingRaiju card) {
super(card);
}
@Override
public ThunderingRaiju copy() {
return new ThunderingRaiju(this);
}
}
| [
"theelk801@gmail.com"
] | theelk801@gmail.com |
b6ac3b9d17f4ff92f27478b26d1fec7502f95bab | d09942d3f616e5f79f124d0a5ac003f66c9b81a6 | /lib/common-config/src/main/java/org/bgp4j/config/nodes/impl/RoutingPeerConfigurationImpl.java | ad3ba666d72d6f815be880882d6010bc63a1e8ba | [
"Apache-2.0",
"MIT"
] | permissive | rbieniek/BGP4J | c69fb429a0fd2d00b637f40ebd8a6032cafc388f | 2ee0e64ffe1018cca038d74ec8b6f69e55613a57 | refs/heads/master | 2020-05-18T19:35:22.884031 | 2015-02-09T17:19:23 | 2015-02-09T17:19:23 | 3,314,133 | 10 | 8 | null | null | null | null | UTF-8 | Java | false | false | 3,729 | java | /**
*
*/
package org.bgp4j.config.nodes.impl;
import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;
import org.apache.commons.lang3.builder.CompareToBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.bgp4j.config.nodes.AddressFamilyRoutingPeerConfiguration;
import org.bgp4j.config.nodes.RoutingPeerConfiguration;
/**
* @author rainer
*
*/
public class RoutingPeerConfigurationImpl implements RoutingPeerConfiguration {
private String peerName;
private Set<AddressFamilyRoutingPeerConfiguration> addressFamilyConfigrations = new TreeSet<AddressFamilyRoutingPeerConfiguration>();
RoutingPeerConfigurationImpl() {}
RoutingPeerConfigurationImpl(String peerName, Collection<AddressFamilyRoutingPeerConfiguration> addressFamilyConfigrations) {
setPeerName(peerName);
if(addressFamilyConfigrations != null)
this.addressFamilyConfigrations.addAll(addressFamilyConfigrations);
}
/* (non-Javadoc)
* @see org.bgp4j.config.nodes.RoutingPeerConfiguration#getPeerName()
*/
@Override
public String getPeerName() {
return peerName;
}
/* (non-Javadoc)
* @see org.bgp4j.config.nodes.RoutingPeerConfiguration#getAddressFamilyConfigrations()
*/
@Override
public Set<AddressFamilyRoutingPeerConfiguration> getAddressFamilyConfigrations() {
return addressFamilyConfigrations;
}
/**
* @param peerName the peerName to set
*/
void setPeerName(String peerName) {
this.peerName = peerName;
}
/**
* @param addressFamilyConfigrations the addressFamilyConfigrations to set
*/
void setAddressFamilyConfigrations(Set<AddressFamilyRoutingPeerConfiguration> addressFamilyConfigrations) {
this.addressFamilyConfigrations.clear();
if(addressFamilyConfigrations != null)
this.addressFamilyConfigrations.addAll(addressFamilyConfigrations);
}
/* (non-Javadoc)
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
@Override
public int compareTo(RoutingPeerConfiguration o) {
CompareToBuilder builder = (new CompareToBuilder())
.append(getPeerName(), o.getPeerName())
.append(getAddressFamilyConfigrations().size(), o.getAddressFamilyConfigrations().size());
if(builder.toComparison() == 0) {
Iterator<AddressFamilyRoutingPeerConfiguration> lit = getAddressFamilyConfigrations().iterator();
Iterator<AddressFamilyRoutingPeerConfiguration> rit = o.getAddressFamilyConfigrations().iterator();
while(lit.hasNext())
builder.append(lit.next(), rit.next());
}
return builder.toComparison();
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
HashCodeBuilder builder = (new HashCodeBuilder())
.append(getPeerName());
for(AddressFamilyRoutingPeerConfiguration afrc : getAddressFamilyConfigrations())
builder.append(afrc);
return builder.toHashCode();
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if(!(obj instanceof RoutingPeerConfiguration))
return false;
RoutingPeerConfiguration o = (RoutingPeerConfiguration)obj;
EqualsBuilder builder = (new EqualsBuilder())
.append(getPeerName(), o.getPeerName())
.append(getAddressFamilyConfigrations().size(), o.getAddressFamilyConfigrations().size());
if(builder.isEquals()) {
Iterator<AddressFamilyRoutingPeerConfiguration> lit = getAddressFamilyConfigrations().iterator();
Iterator<AddressFamilyRoutingPeerConfiguration> rit = o.getAddressFamilyConfigrations().iterator();
while(lit.hasNext())
builder.append(lit.next(), rit.next());
}
return builder.isEquals();
}
}
| [
"Rainer.Bieniek@web.de"
] | Rainer.Bieniek@web.de |
d74b482cdf02c4d226020a93a1f567a4c835089e | b8050d39ecbdc1ae3987761ae5fd6636ac342556 | /src/main/api/org/cakepowered/api/block/Block.java | cc23a13491d0d07927e4e0094614cfa8c2442831 | [] | no_license | cout970/CakeApi | db6de9053e2db400e0e7ff8fd4bc3257ecf5fbc3 | f1c59d78166db556ea8e4df0ffd319c448d53b21 | refs/heads/master | 2020-12-24T19:51:21.936874 | 2016-08-05T01:24:11 | 2016-08-05T01:24:11 | 40,554,582 | 1 | 1 | null | 2016-08-05T01:24:12 | 2015-08-11T17:06:42 | Java | UTF-8 | Java | false | false | 783 | java | package org.cakepowered.api.block;
import org.cakepowered.api.inventory.ItemStack;
import org.cakepowered.api.item.Item;
public interface Block {
/**
* Returns the internal name for this block
*/
String getUnlocalizedName();
/**
* Creates a new ItemStack using this block and the amount
*/
ItemStack createStack(int amount);
/**
* Creates a new ItemStack using this block, the amount (fist arg) and the metadata (second arg)
*/
ItemStack createStack(int amount, int metadata);
@Deprecated
default BlockState getDefuldBlockState(){
return getDefaultBlockState();
}
BlockState getDefaultBlockState();
int getMetadataFromState(BlockState state);
BlockState getStateFromMetadata(int meta);
Item toItem();
boolean hasTileEntity(BlockState state);
}
| [
"thecout970@gmail.com"
] | thecout970@gmail.com |
d3ed20eb12200d101c937b7567a2c73205d74188 | e75be673baeeddee986ece49ef6e1c718a8e7a5d | /submissions/blizzard/Corpus/eclipse.jdt.core/994.java | 167365ae37e6559c31108ca47abe57fc6859dd04 | [
"MIT"
] | permissive | zhendong2050/fse18 | edbea132be9122b57e272a20c20fae2bb949e63e | f0f016140489961c9e3c2e837577f698c2d4cf44 | refs/heads/master | 2020-12-21T11:31:53.800358 | 2018-07-23T10:10:57 | 2018-07-23T10:10:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 143 | java | package test1;
public class A {
public void foo() {
for (int i = 0; i < 8; i++) {
foo();
}
}
}
| [
"tim.menzies@gmail.com"
] | tim.menzies@gmail.com |
7daf83d0b9e604b2ca3f660746768eafde7f8366 | 20690c149ab09c578ddd48a90d1b3c7d1e59bdf5 | /MVCAbstractWizardFormControllerApp15-Naukri.com/src/main/java/com/nt/dao/NaukriRegistrationDAOImpl.java | d9c7f62bc3ea432365364be70e7559c675b4f765 | [] | no_license | pratikrohokale/SPRINGREF | 37a244bef6cb6a2348ea2b2ff4c00f61fd3bc8f1 | 669ffdecbc89286e576d31b6ff34f2cb03376a3c | refs/heads/master | 2022-12-21T15:23:52.446440 | 2019-06-20T04:53:53 | 2019-06-20T04:53:53 | 192,850,898 | 0 | 0 | null | 2022-12-16T08:44:49 | 2019-06-20T04:54:08 | Java | UTF-8 | Java | false | false | 419 | java | package com.nt.dao;
import org.springframework.orm.hibernate3.HibernateTemplate;
import com.nt.bo.RegisterBO;
public class NaukriRegistrationDAOImpl implements NaukriRegistrationDAO {
private HibernateTemplate ht;
public void setHt(HibernateTemplate ht) {
this.ht = ht;
}
@Override
public int saveData(RegisterBO bo) {
int idVal=0;
idVal=(int) ht.save(bo);
return idVal;
}
}
| [
"prohokale01@gmail.com"
] | prohokale01@gmail.com |
c1c4bcd8652086b3de9ce54a99b885e80f72a8a3 | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_3/src/b/b/h/h/Calc_1_3_11775.java | 20dcf4f22ac842762c6f0c0c85770d178c649d11 | [] | no_license | chalstrick/bigRepo1 | ac7fd5785d475b3c38f1328e370ba9a85a751cff | dad1852eef66fcec200df10083959c674fdcc55d | refs/heads/master | 2016-08-11T17:59:16.079541 | 2015-12-18T14:26:49 | 2015-12-18T14:26:49 | 48,244,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 134 | java | package b.b.h.h;
public class Calc_1_3_11775 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
| [
"christian.halstrick@sap.com"
] | christian.halstrick@sap.com |
c1881cdee73bf20d9fd7cd566d15facc38a0863e | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/setting/ui/setting/PluginPreference.java | 80144d146b0ed8f09b18515a129806d6eddaacb5 | [] | no_license | xsren/AndroidReverseNotes | 9631a5aabc031006e795a112b7ac756a8edd4385 | 9202c276fe9f04a978e4e08b08e42645d97ca94b | refs/heads/master | 2021-04-07T22:50:51.072197 | 2019-07-16T02:24:43 | 2019-07-16T02:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,266 | java | package com.tencent.mm.plugin.setting.ui.setting;
import android.content.Context;
import android.os.Looper;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.R;
import com.tencent.mm.ah.d.a;
import com.tencent.mm.ah.o;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.messenger.foundation.a.j;
import com.tencent.mm.pluginsdk.ui.a.b;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ak;
import com.tencent.mm.storage.ad;
import com.tencent.mm.ui.MMActivity;
import com.tencent.mm.ui.base.preference.Preference;
public final class PluginPreference extends Preference implements a {
private MMActivity crP;
private ImageView gvq;
int lXY;
private String pnJ;
String qlc;
String qld;
private int qle;
private int qlf;
boolean qlg;
static /* synthetic */ void a(PluginPreference pluginPreference) {
AppMethodBeat.i(126986);
pluginPreference.cfI();
AppMethodBeat.o(126986);
}
public PluginPreference(Context context) {
this(context, null);
}
public PluginPreference(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public PluginPreference(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
AppMethodBeat.i(126980);
this.pnJ = "";
this.qle = -1;
this.qlf = 8;
this.qlg = false;
this.gvq = null;
this.lXY = 255;
this.crP = (MMActivity) context;
setLayoutResource(R.layout.ae4);
o.acd().a((a) this);
AppMethodBeat.o(126980);
}
public final boolean Ww(String str) {
AppMethodBeat.i(126981);
ad aoO = ((j) g.K(j.class)).XM().aoO(str);
if (aoO == null || ((int) aoO.ewQ) == 0) {
ab.e("MicroMsg.PluginPreference", "plugin do not exist");
AppMethodBeat.o(126981);
return false;
}
this.qlc = aoO.field_username;
this.qld = aoO.Oi();
setKey("settings_plugins_list_#" + this.qlc);
AppMethodBeat.o(126981);
return true;
}
private void cfI() {
AppMethodBeat.i(126982);
if (this.gvq != null) {
b.b(this.gvq, this.qlc);
}
AppMethodBeat.o(126982);
}
public final View onCreateView(ViewGroup viewGroup) {
AppMethodBeat.i(126983);
View onCreateView = super.onCreateView(viewGroup);
LayoutInflater layoutInflater = (LayoutInflater) this.mContext.getSystemService("layout_inflater");
ViewGroup viewGroup2 = (ViewGroup) onCreateView.findViewById(R.id.m5);
viewGroup2.removeAllViews();
layoutInflater.inflate(R.layout.af0, viewGroup2);
AppMethodBeat.o(126983);
return onCreateView;
}
public final void onBindView(View view) {
AppMethodBeat.i(126984);
super.onBindView(view);
this.gvq = (ImageView) view.findViewById(R.id.aga);
this.gvq.setAlpha(this.lXY);
TextView textView = (TextView) view.findViewById(R.id.akq);
if (textView != null) {
textView.setVisibility(this.qlf);
textView.setText(this.pnJ);
if (this.qle != -1) {
textView.setBackgroundDrawable(com.tencent.mm.bz.a.g(this.crP, this.qle));
}
}
textView = (TextView) view.findViewById(R.id.ckb);
if (textView != null) {
textView.setVisibility(this.qlg ? 0 : 8);
}
cfI();
AppMethodBeat.o(126984);
}
public final void qj(String str) {
AppMethodBeat.i(126985);
if (this.qlc != null && this.qlc.equals(str)) {
new ak(Looper.getMainLooper()).post(new Runnable() {
public final void run() {
AppMethodBeat.i(126979);
PluginPreference.a(PluginPreference.this);
AppMethodBeat.o(126979);
}
});
}
AppMethodBeat.o(126985);
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
47c1f5764c7af974396f06380c90767aa8acd321 | d38afb4d31e0574dd2086fc84e5d664aecc77f5c | /com/planet_ink/coffee_mud/Abilities/Languages/DogSpeak.java | 996550f7d5b90ed1923de7d57c7bb043ad6df0a3 | [
"Apache-2.0"
] | permissive | Dboykey/CoffeeMud | c4775fc6ec9e910ff7ff8523c04567a580a9529e | 844704805d3de26a16b83bd07552d6ae82391208 | refs/heads/master | 2022-04-16T07:07:22.004847 | 2020-04-06T17:55:33 | 2020-04-06T17:55:33 | 255,074,559 | 0 | 1 | Apache-2.0 | 2020-04-12T12:10:07 | 2020-04-12T12:10:06 | null | UTF-8 | Java | false | false | 1,954 | java | package com.planet_ink.coffee_mud.Abilities.Languages;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2014-2020 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class DogSpeak extends AnimalSpeak
{
@Override
public String ID()
{
return "DogSpeak";
}
private final static String localizedName = CMLib.lang().L("Dog Speak");
@Override
public String name()
{
return localizedName;
}
private final static String[] animalSounds=
{
"bark","woof","arf","bay","bow-wow","howl","yap"
};
@Override
protected String[] getSounds()
{
return animalSounds;
}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
a025abc1f5a0c41935fd72efe50683df055a4b54 | 82a8f35c86c274cb23279314db60ab687d33a691 | /duokan/reader/ui/bookshelf/fi.java | e5bf7e8e267a77c732c67b6e93f55e35fdf6ac11 | [] | no_license | QMSCount/DReader | 42363f6187b907dedde81ab3b9991523cbf2786d | c1537eed7091e32a5e2e52c79360606f622684bc | refs/heads/master | 2021-09-14T22:16:45.495176 | 2018-05-20T14:57:15 | 2018-05-20T14:57:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,426 | java | package com.duokan.reader.ui.bookshelf;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import com.duokan.core.ui.UTools;
class fi extends Drawable {
final /* synthetic */ fh a;
fi(fh fhVar) {
this.a = fhVar;
}
public void draw(Canvas canvas) {
Rect bounds = getBounds();
Paint paint = (Paint) UTools.b.getRect();
paint.setColor(fh.e);
paint.setStrokeWidth((float) UTools.getMinimumHeight(this.a.getContext(), 2.0f));
canvas.drawLine(((float) (bounds.width() - UTools.getMinimumHeight(this.a.getContext(), 100.0f))) / 2.0f, ((float) (bounds.bottom - 1)) - (((float) UTools.getMinimumHeight(this.a.getContext(), 2.0f)) / 2.0f), ((float) (bounds.width() + UTools.getMinimumHeight(this.a.getContext(), 100.0f))) / 2.0f, ((float) (bounds.bottom - 1)) - (((float) UTools.getMinimumHeight(this.a.getContext(), 2.0f)) / 2.0f), paint);
paint.setColor(fh.f);
paint.setStrokeWidth(2.0f);
canvas.drawLine(0.0f, ((float) (bounds.bottom - 1)) - 1.0f, (float) bounds.right, ((float) (bounds.bottom - 1)) - 1.0f, paint);
UTools.b.getRect(paint);
}
public void setAlpha(int i) {
}
public void setColorFilter(ColorFilter colorFilter) {
}
public int getOpacity() {
return 0;
}
}
| [
"lixiaohong@p2peye.com"
] | lixiaohong@p2peye.com |
695b23c94f87a3e79a898d8aa7eecc11d2021ca9 | 1c6fe1c9ad917dc9dacaf03eade82d773ccf3c8a | /acm-module-szxm/src/main/java/com/wisdom/acm/szxm/form/rygl/KqConfigAddForm.java | 4e0f56ad199993d4026e8d2d0018b2a8ad223b4c | [
"Apache-2.0"
] | permissive | daiqingsong2021/ord_project | 332056532ee0d3f7232a79a22e051744e777dc47 | a8167cee2fbdc79ea8457d706ec1ccd008f2ceca | refs/heads/master | 2023-09-04T12:11:51.519578 | 2021-10-28T01:58:43 | 2021-10-28T01:58:43 | 406,659,566 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 703 | java | package com.wisdom.acm.szxm.form.rygl;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
public class KqConfigAddForm
{
@NotNull(message = "项目ID不能为空")
private Integer projectId;
@NotNull(message = "标段ID不能为空")
private Integer sectionId;
@NotNull(message = "考勤日历ID不能为空")
private Integer calenderId;
@NotBlank(message = "考勤类型不能为空")
private String type;
@NotBlank(message = "管理人员是否考勤不能为空")
private String mangerkq;
@NotBlank(message = "劳务人员是否考勤不能为空")
private String workerkq;
}
| [
"homeli@126.com"
] | homeli@126.com |
017fa38eda6186242b143aa9450720549be50e8d | 83110fbb179713c411ddf301c90ef4b814285846 | /src/VirtualMachineStandbyActionType.java | 78afd7d5c70e9e4b0138b29410430780c1fa2ec3 | [] | no_license | mikelopez/jvm | f10590edf42b498f2d81dec71b0fee120e381c9a | 36a960897062224eabd0c18a1434f7c8961ee81c | refs/heads/master | 2021-01-19T05:36:54.710665 | 2013-06-09T04:36:41 | 2013-06-09T04:36:41 | 3,783,647 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,383 | java |
package com.vmware.vim25;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for VirtualMachineStandbyActionType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="VirtualMachineStandbyActionType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="checkpoint"/>
* <enumeration value="powerOnSuspend"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "VirtualMachineStandbyActionType")
@XmlEnum
public enum VirtualMachineStandbyActionType {
@XmlEnumValue("checkpoint")
CHECKPOINT("checkpoint"),
@XmlEnumValue("powerOnSuspend")
POWER_ON_SUSPEND("powerOnSuspend");
private final String value;
VirtualMachineStandbyActionType(String v) {
value = v;
}
public String value() {
return value;
}
public static VirtualMachineStandbyActionType fromValue(String v) {
for (VirtualMachineStandbyActionType c: VirtualMachineStandbyActionType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
| [
"dev@scidentify.info"
] | dev@scidentify.info |
8d64c287b2a2d790d4fe15967088c850a08bd0b9 | 312ac6da6120965d94af9914e2dd2ae9a374ef83 | /test/transform/resource/before/ExtensionMethodGenericArray.java | 72f7b7f41c9312c32056f5cf48686414698559ba | [
"MIT",
"Apache-2.0"
] | permissive | hoijui/lombok-pg | 966b67454dcf869dfc9874bdd1f52a8cb876bac4 | 8571a3f55df1570ea8f465731413ec0402f7e7bf | refs/heads/master | 2022-04-11T06:10:06.031956 | 2017-12-23T13:06:19 | 2017-12-23T13:06:19 | 115,219,976 | 1 | 0 | null | 2017-12-23T20:25:43 | 2017-12-23T20:25:43 | null | UTF-8 | Java | false | false | 354 | java | import lombok.ExtensionMethod;
@ExtensionMethod(ExtensionMethodGenericArray.Objects.class)
class ExtensionMethodGenericArray {
private void test7() {
String[] foo = null;
String[] s = foo.orElse(new String[0]);
}
static class Objects {
public static <T> T[] orElse(T[] value, T[] orElse) {
return value == null ? orElse : value;
}
}
} | [
"peichhor@web.de"
] | peichhor@web.de |
9450c2b426ba1eaa13bf9b3809714afe2384205e | 3b1688c88248c84f11dc4a5bd3277665da0e55bd | /src/main/java/cn/ibdsr/web/common/constant/state/DelayTask.java | 88481b4d5b0c179a3bf2b4e5cbc0d19e6cada08a | [] | no_license | wangdeming/eshop-mobile | 237aaa7e8819c9524ce598d32420ade2a94bbcea | 9f384e722c7d50b329a3e4aadb01b06d4e051cbb | refs/heads/master | 2022-09-30T11:09:10.368099 | 2020-06-05T01:03:52 | 2020-06-05T01:03:52 | 269,498,482 | 0 | 0 | null | 2020-06-05T01:04:36 | 2020-06-05T01:02:32 | JavaScript | UTF-8 | Java | false | false | 1,420 | java | package cn.ibdsr.web.common.constant.state;
/**
* @Description 延迟任务
* @Version V1.0
* @CreateDate 2019-04-25 13:31:22
* <p>
* Date Author Description
* ----------------------------------------------------------
* 2019-04-25 13:31:22 XuZhipeng 类说明
*/
public enum DelayTask {
SHOP_ORDER_CANCEL(1, "订单未付款自动取消"),
SHOP_REFUND_PASS(2, "商家7天内未审核的售后订单自动审核通过"),
SHOP_ORDER_REVOKE(3, "用户未在7天内填写物流信息,售后订单自动撤销"),
SHOP_CONFIRM_RECEIPT(4, "商家7天后未收货的售后订单自动确认收货"),
SHOP_ORDER_SETTLE(5, "确认收货并且无售后信息的订单7天后自动结算"),
//上方为特产商家,下方为酒店
HOTEL_ORDER_CANCEL(6, "订单未付款自动取消"),
HOTEL_ORDER_CONFIRM(7, "未确认订单系统自动确认"),
HOTEL_ORDER_SETTLE(8, "已消费订单7天后自动结算"),
;
int code;
String message;
DelayTask(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
| [
"774555916@qq.com"
] | 774555916@qq.com |
b5ffd8d0a481f78fa3a8dadf1a60ea817b6e84bb | d4faf842711275f49c8a446d4017852c8824c6fc | /design-patterns/src/main/java/com/bucur/patterns/behavioral/strategy/strategies/CreditCard.java | 928caec309d34b2c13c1ec09e598958ade2a6f79 | [] | no_license | cosminbucur/sda-group10 | 537970e72268b2148584a11b942c3a4544ef9897 | 9052a99cd19d8ecec0a1fe275d458c546ab81355 | refs/heads/master | 2022-11-20T05:10:25.077044 | 2020-02-26T12:11:21 | 2020-02-26T12:11:21 | 195,580,491 | 2 | 0 | null | 2022-10-30T00:19:33 | 2019-07-06T20:27:49 | Java | UTF-8 | Java | false | false | 500 | java | package com.bucur.patterns.behavioral.strategy.strategies;
public class CreditCard {
private int amount;
private String number;
private String date;
private String cvv;
CreditCard(String number, String date, String cvv) {
this.amount = 100_000;
this.number = number;
this.date = date;
this.cvv = cvv;
}
public int getAmount() {
return amount;
}
public void setAmount(int amount) {
this.amount = amount;
}
}
| [
"cosmin.bucur@orange.com"
] | cosmin.bucur@orange.com |
6a6f21020a2757e0d6438b1c050b8b2e7c5b3ba7 | 9e4601501c71f6690e0f7bd99f157d7076a481b3 | /vendor/fop/src/java/org/apache/fop/fonts/Typeface.java | 1a092c114dcff94614db0aa42dcb714a68627092 | [
"Apache-2.0"
] | permissive | Fallmist42/hq | 5d74ae98d766b16dd047bde7a3433fa22a3643f0 | b67e302b8660318d84583c9138b9b59f56a05787 | refs/heads/master | 2020-12-11T08:06:22.887854 | 2015-10-02T14:22:17 | 2015-10-02T14:22:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,906 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id: Typeface.java 1296526 2012-03-03 00:18:45Z gadams $ */
package org.apache.fop.fonts;
import java.util.HashSet;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.xmlgraphics.fonts.Glyphs;
/**
* Base class for font classes
*/
public abstract class Typeface implements FontMetrics {
/**
* Code point that is used if no code point for a specific character has
* been found.
*/
public static final char NOT_FOUND = '#';
/** logger */
private static Log log = LogFactory.getLog(Typeface.class);
/**
* Used to identify whether a font has been used (a character map operation
* is used as the trigger). This could just as well be a boolean but is a
* long out of statistical interest.
*/
private long charMapOps = 0;
/** An optional event listener that receives events such as missing glyphs etc. */
protected FontEventListener eventListener;
private Set<Character> warnedChars;
/**
* Get the encoding of the font.
* @return the encoding
*/
public abstract String getEncodingName();
/**
* Map a Unicode character to a code point in the font.
* @param c character to map
* @return the mapped character
*/
public abstract char mapChar(char c);
/**
* Used for keeping track of character mapping operations in order to determine if a font
* was used at all or not.
*/
protected void notifyMapOperation() {
this.charMapOps++;
}
/**
* Indicates whether this font had to do any character mapping operations. If that was
* not the case, it's an indication that the font has never actually been used.
* @return true if the font had to do any character mapping operations
*/
public boolean hadMappingOperations() {
return (this.charMapOps > 0);
}
/**
* Determines whether this font contains a particular character/glyph.
* @param c character to check
* @return True if the character is supported, Falso otherwise
*/
public abstract boolean hasChar(char c);
/**
* Determines whether the font is a multibyte font.
* @return True if it is multibyte
*/
public boolean isMultiByte() {
return false;
}
/** {@inheritDoc} */
public int getMaxAscent(int size) {
return getAscender(size);
}
/**
* Sets the font event listener that can be used to receive events about particular events
* in this class.
* @param listener the font event listener
*/
public void setEventListener(FontEventListener listener) {
this.eventListener = listener;
}
/**
* Provide proper warning if a glyph is not available.
*
* @param c
* the character which is missing.
*/
protected void warnMissingGlyph(char c) {
// Give up, character is not available
Character ch = new Character(c);
if (warnedChars == null) {
warnedChars = new HashSet<Character>();
}
if (warnedChars.size() < 8 && !warnedChars.contains(ch)) {
warnedChars.add(ch);
if (this.eventListener != null) {
this.eventListener.glyphNotAvailable(this, c, getFontName());
} else {
if (warnedChars.size() == 8) {
log.warn("Many requested glyphs are not available in font "
+ getFontName());
} else {
log.warn("Glyph " + (int) c + " (0x"
+ Integer.toHexString(c) + ", "
+ Glyphs.charToGlyphName(c)
+ ") not available in font " + getFontName());
}
}
}
}
/** {@inheritDoc} */
public String toString() {
StringBuffer sbuf = new StringBuffer(super.toString());
sbuf.append('{');
sbuf.append(getFullName());
sbuf.append('}');
return sbuf.toString();
}
}
| [
"vau2007@rambler.ru"
] | vau2007@rambler.ru |
a1bd2f9c7b98d0a20a75d689bea72ce730236a80 | a73dfb319f28cc1ff8aac4bb8721157638253878 | /work/09_ecai/lotteryServer/src/main/java/lottery/domains/content/biz/impl/UserBetsLimitServiceImpl.java | 90942ca6f08a56ea9bb848ef92ada271f12bfa4a | [] | no_license | xxsheng/JavaTest | 63da06d3db5384644ff290d10eed2d1027b613f5 | cd3364302734501234c450e4a498eabce0b89efb | refs/heads/master | 2021-10-19T06:21:02.472764 | 2019-02-18T15:17:19 | 2019-02-18T15:17:19 | 160,063,042 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,348 | java | package lottery.domains.content.biz.impl;
import com.alibaba.fastjson.JSON;
import javautils.math.MathUtil;
import javautils.redis.JedisTemplate;
import lottery.domains.content.biz.UserBetsLimitService;
import lottery.domains.content.dao.UserBetsLimitDao;
import lottery.domains.content.entity.Lottery;
import lottery.domains.content.entity.LotteryPlayRules;
import lottery.domains.content.entity.UserBets;
import lottery.domains.content.entity.UserBetsLimit;
import lottery.domains.pool.DataFactory;
import lottery.domains.utils.prize.PrizeUtils;
import lottery.web.WSC;
import lottery.web.content.validate.UserBetsValidate;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
public class UserBetsLimitServiceImpl implements UserBetsLimitService {
private static final int SECS_24_HOURS = 60 * 60 * 24;
@Autowired
private UserBetsLimitDao userBetsLimitDao;
@Autowired
private JedisTemplate jedisTemplate;
@Autowired
private DataFactory dataFactory;
private static final Logger LOGGER = LoggerFactory.getLogger(UserBetsValidate.class);
@Override
@Transactional(readOnly = true)
public List<UserBetsLimit> getGlobalSetting() {
String value = jedisTemplate.get(WSC.USER_LIMIT_KEY + 0);
if (StringUtils.isNotEmpty(value)) {
List<UserBetsLimit> cache = JSON.parseArray(value, UserBetsLimit.class);
if(cache != null){
LOGGER.debug("从缓存中查询系统投注限额设置,是否为空:{}", cache.isEmpty());
return cache;
}
}
// List<UserBetsLimit> dbData = userBetsLimitDao.getByUserId(0);
// jedisTemplate.set(CACHE_USER_BETS_LIMIT + 0, JSON.toJSONString(dbData));
// return dbData;
return null;
}
@Override
@Transactional(readOnly = true)
public List<UserBetsLimit> getByUserId(int userId) {
String value = jedisTemplate.get(WSC.USER_LIMIT_KEY + userId);
if (StringUtils.isNotEmpty(value)) {
List<UserBetsLimit> cache = JSON.parseArray(value, UserBetsLimit.class);
if(cache != null){
LOGGER.debug("从缓存中查询系统投注限额设置,是否为空:{}", cache.isEmpty());
return cache;
}
}
// List<UserBetsLimit> dbData = userBetsLimitDao.getByUserId(userId);
// jedisTemplate.setex(CACHE_USER_BETS_LIMIT + userId, JSON.toJSONString(dbData), SECS_3_HOURS);
// return dbData;
return null;
}
/**
* 先从用户配置找,如果没有就从全局配置找
*/
@Override
@Transactional(readOnly = true)
public UserBetsLimit get(int userId, int lotteryId) {
List<UserBetsLimit> limitConfig = this.getByUserId(userId);
List<UserBetsLimit> systemConfig = this.getGlobalSetting();
if(limitConfig == null || limitConfig.isEmpty()){
if(systemConfig == null || systemConfig.isEmpty()){
return null;
}else {
LOGGER.debug("用户配置为空,从全局配置匹配");
for (UserBetsLimit userBetsLimit : systemConfig) {
if(userBetsLimit.getLotteryId() == lotteryId){
return userBetsLimit;
}
}
}
}
for (UserBetsLimit userBetsLimit : limitConfig) {
if(userBetsLimit.getLotteryId() == lotteryId){
LOGGER.debug("用户投注限额匹配成功!");
return userBetsLimit;
}
}
LOGGER.debug("用户配置没有有效的配置,从全局配置匹配");
for (UserBetsLimit userBetsLimit : systemConfig) {
if(userBetsLimit.getLotteryId() == lotteryId){
return userBetsLimit;
}
}
LOGGER.debug("没有匹配到有效的投注限额!");
return null;
}
@Override
@Transactional(readOnly = true)
public double getMaxPrizeOneExcept(int userId, int lotteryId, String except, double currentMaxPrize) {
Double total = jedisTemplate.getAsDouble(WSC.USER_CURRENT_PRIZE_KEY + lotteryId + ":" + except + ":" + userId);
total = total == null ? 0 : total.doubleValue();
total += currentMaxPrize;
LOGGER.debug("用户ID :{} 彩种:{} 期号:{} 的已投注最大奖金为:{}", userId, lotteryId, except, MathUtil.doubleToString(total, 4));
return total;
}
@Override
public void setMaxPrizeOneExcept(int userId, int lotteryId, String except, double maxPrize, boolean isChase) {
// 设置用户本期奖金
String userKey = WSC.USER_CURRENT_PRIZE_KEY + lotteryId + ":" + except + ":" + userId;
double userTotal = jedisTemplate.incrByFloat(userKey, maxPrize);
if (userTotal == maxPrize) {
jedisTemplate.expire(userKey, SECS_24_HOURS);
}
// 增加本期总奖金
String expectKey = WSC.LOTTERY_CURRENT_PRIZE_KEY + lotteryId + ":" + except;
double expectTotal = jedisTemplate.incrByFloat(expectKey, maxPrize);
if (expectTotal == maxPrize) {
jedisTemplate.expire(expectKey, SECS_24_HOURS);
}
}
@Override
public void deleteLimitAfterCancelOder(UserBets userBet) {
// 减少用户本期总奖金
Lottery lottery = dataFactory.getLottery(userBet.getLotteryId());
LotteryPlayRules rule = dataFactory.getLotteryPlayRules(lottery.getId(), userBet.getRuleId());
double maxUnitPrize = PrizeUtils.getMoney(rule, userBet.getModel() , dataFactory.getLotteryConfig().getbUnitMoney(), userBet.getCode());
double maxPrize = (maxUnitPrize * userBet.getMultiple());
String userKey = WSC.USER_CURRENT_PRIZE_KEY + userBet.getLotteryId() + ":" + userBet.getExpect() + ":" + userBet.getUserId();
Double userTotal = jedisTemplate.getAsDouble(userKey);
if (userTotal != null) {
if (maxPrize >= userTotal) {
jedisTemplate.del(userKey);
}
else {
jedisTemplate.incrByFloat(userKey, -maxPrize);
}
}
// 减少本期总奖金
String expectKey = WSC.LOTTERY_CURRENT_PRIZE_KEY + userBet.getLotteryId() + ":" + userBet.getExpect();
Double expectTotal = jedisTemplate.getAsDouble(expectKey);
if (expectTotal != null) {
if (maxPrize >= expectTotal) {
jedisTemplate.del(expectKey);
}
else {
jedisTemplate.incrByFloat(expectKey, -maxPrize);
}
}
}
@Override
@Transactional(readOnly = true)
public double getMaxPrizeOneExcept(int lotteryId, String except) {
Double total = jedisTemplate.getAsDouble(WSC.LOTTERY_CURRENT_PRIZE_KEY + lotteryId + ":" + except);
total = total == null ? 0 : total.doubleValue();
return total;
}
}
| [
"1558281773@qq.com"
] | 1558281773@qq.com |
dc4bd018b3cea4124cf800fc0547e39a87b19f95 | f551156ea724c509395e20884df570461381653a | /src/main/java/com/jfly/common/utils/HttpServletUtils.java | cb02957a96be3d22153826292ec18ec02906c5cc | [] | no_license | surick/jfly | b212999aada9a6eac2954919b1b0597364eaa199 | a3d23a57c111f1a94bf4e71c36979ab1b35b0fdf | refs/heads/master | 2021-01-25T13:35:43.132098 | 2019-03-31T14:19:06 | 2019-03-31T14:19:06 | 123,590,423 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 472 | java | package com.jfly.common.utils;
import javax.servlet.http.HttpServletRequest;
public class HttpServletUtils {
public static boolean jsAjax(HttpServletRequest req){
//判断是否为ajax请求,默认不是
boolean isAjaxRequest = false;
if(!StringUtils.isBlank(req.getHeader("x-requested-with")) && req.getHeader("x-requested-with").equals("XMLHttpRequest")){
isAjaxRequest = true;
}
return isAjaxRequest;
}
}
| [
"jk103@qq.com"
] | jk103@qq.com |
aba0be2c59c9e1b9872b462ce8b4fc60ce26177e | 2bdedcda705f6dcf45a1e9a090377f892bcb58bb | /src/main/output/home/woman_service_story_history/team_lombok/office/people.java | ef6ac598d0b1aa8771bc120fdd159590cb1fc701 | [] | no_license | matkosoric/GenericNameTesting | 860a22af1098dda9ea9e24a1fc681bb728aa2d69 | 03f4a38229c28bc6d83258e5a84fce4b189d5f00 | refs/heads/master | 2021-01-08T22:35:20.022350 | 2020-02-21T11:28:21 | 2020-02-21T11:28:21 | 242,123,053 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,624 | java | package com.red.dwarf;
import com.google.gson.*;
import javax.net.ssl.HttpsURLConnection;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
public class Util {
// **********************************************
// *** Update or verify the following values. ***
// **********************************************
// Replace the subscriptionKey string value with your valid subscription key.
static String subscriptionKey = "aa1948961d6d57d6c7f6a988dc7e5243";
static String host = "https://api.cognitive.microsofttranslator.com";
static String path = "/translate?api-version=3.0";
public static class RequestBody {
String Text;
public RequestBody(String text) {
this.Text = text;
}
}
public static String Post(URL url, String content) throws Exception {
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Content-Length", content.length() + "");
connection.setRequestProperty("b31bae31e36c29bf84c0390eef991233", subscriptionKey);
connection.setRequestProperty("X-ClientTraceId", java.util.UUID.randomUUID().toString());
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
byte[] encoded_content = content.getBytes("UTF-8");
wr.write(encoded_content, 0, encoded_content.length);
wr.flush();
wr.close();
StringBuilder response = new StringBuilder ();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
String line;
while ((line = in.readLine()) != null) {
response.append(line);
}
in.close();
return response.toString();
}
public static String Translate (String text, String from, String to) throws Exception {
String queryPath = "";
if(!from.equals("detect")) {
queryPath += "&from=" + from;
}
queryPath += "&to=" + to;
URL url = new URL (host + path + queryPath);
List<Util.RequestBody> objList = new ArrayList<>();
objList.add(new Util.RequestBody(text));
String content = new Gson().toJson(objList);
return Post(url, content);
}
public static String prettify(String json_text) {
json_text = json_text.substring(1, json_text.length() - 1);
JsonParser parser = new JsonParser();
JsonElement json = parser.parse(json_text);
Gson gson = new GsonBuilder().setPrettyPrinting().create();
return gson.toJson(json);
}
public static Translation getTranslation(String jsonText) {
jsonText = jsonText.substring(1, jsonText.length() - 1);
JsonParser parser = new JsonParser();
JsonElement json = parser.parse(jsonText);
JsonObject jsonObject = json.getAsJsonObject();
JsonObject detectedLanguageObj = jsonObject.getAsJsonObject("detectedLanguage");
JsonArray tranlationsArrayObj = jsonObject.getAsJsonArray("translations");
JsonObject translationObj = tranlationsArrayObj.get(0).getAsJsonObject();
return new Translation(
(detectedLanguageObj == null ? null : detectedLanguageObj.get("language").getAsString()),
translationObj.get("text").getAsString());
}
}
| [
"soric.matko@gmail.com"
] | soric.matko@gmail.com |
3e0f904faaf2832f86c8cdd2cf6a4b15323d7909 | 2c7c6d504d29d2ddcf32229763c5c9b0305e32d6 | /workspace/Java3dSketch/src/com/three/dim/Ball.java | 4008e909860f0c352cdb3c20511e7be3f64d3ee0 | [] | no_license | mohd874/EvenMoreProjects | 8de8bd76fe0518b1e9d417e6715709632612c9b6 | 51b32c86f22d10986509d6de4b72ad86f4be884a | refs/heads/master | 2020-12-24T14:26:23.642430 | 2014-01-29T13:40:45 | 2014-01-29T13:40:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,358 | java | package com.three.dim;
import javax.media.j3d.BoundingSphere;
import javax.media.j3d.BranchGroup;
import javax.media.j3d.DirectionalLight;
import javax.vecmath.Color3f;
import javax.vecmath.Point3d;
import javax.vecmath.Vector3f;
import com.sun.j3d.utils.geometry.Sphere;
import com.sun.j3d.utils.universe.SimpleUniverse;
public class Ball {
public Ball() {
//Create the universe
SimpleUniverse universe = new SimpleUniverse();
//Create a structure to contain objects
BranchGroup group = new BranchGroup();
//Create a ball and add it to the group of objects
Sphere sphere = new Sphere(0.5f);
group.addChild(sphere);
// Create a red light that shines for 100m from the origin
Color3f lightColor = new Color3f(1.8f,0.1f,0.1f);
BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
Vector3f lightDirection = new Vector3f(4.0f, -7.0f, -12.0f);
DirectionalLight light1 = new DirectionalLight(lightColor, lightDirection);
light1.setInfluencingBounds(bounds);
group.addChild(light1);
// look towards the ball
universe.getViewingPlatform().setNominalViewingTransform();
// add the group of objects to the Universe
universe.addBranchGraph(group);
}
public static void main(String[] args) {
new Ball();
}
}
| [
"mohd874@gmail.com"
] | mohd874@gmail.com |
49a20b7968a2c539573664a372d58764efd25e25 | 06077c80aef6c0c4f154e6965a63493e65981971 | /example-013/src/main/java/com/jufeng/springboot/example013/MainsiteErrorController.java | 941322917e8a47a6b0680cbd59c83c04ac962289 | [] | no_license | zhaojun2066/spring-boot-example | 45c3edc951622db9808dbe93d5aba95dfcfe8ce1 | ce1a2f0db5e28cf2fdc099bab99d79e72205cbf0 | refs/heads/master | 2022-06-21T20:33:42.891537 | 2019-10-16T06:53:57 | 2019-10-16T06:53:57 | 203,995,597 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,334 | java | package com.jufeng.springboot.example013;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.error.ErrorAttributes;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.ServletWebRequest;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
* @program: spring-boot-example
* @description: 改变 SpringBoot的默认异常处理映射为“/error”
* @author: JuFeng(ZhaoJun)
* @create: 2019-08-26 14:06
**/
@RestController
public class MainsiteErrorController implements ErrorController {
@Autowired
private ErrorAttributes errorAttributes;
/**
* JSON格式错误信息
*/
@RequestMapping(value = "/error", produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseMessage error(HttpServletRequest request) {
Map<String, Object> body = this.errorAttributes.getErrorAttributes(new ServletWebRequest(request), true);
return ResponseMessage.fail("服务器端异常!", body);
}
@Override
public String getErrorPath() {
return "/error";
}
}
| [
"zhaojun@300.cn"
] | zhaojun@300.cn |
3ea784b0b3e6c7918a4dd01ec4ef1ed4b26d6109 | 2e1aee65bc0ce55132eb3cda469cacabb13b39b0 | /src/algorithm_and_data_structure_advanced/session03_tree/tree_recursion/TreePostOrderRecursion.java | 91316f418921992a8192d99e8aa851aa59485dcf | [] | no_license | iyangzeshi/techbow | f23a8a68a768dbbbabfd65505e31e72fe6148d01 | 55e22b7c2636b241c364e1a1dea0d9be7473acd4 | refs/heads/master | 2023-08-27T17:21:39.076035 | 2021-08-11T11:40:04 | 2021-10-28T20:37:22 | 321,618,539 | 5 | 3 | null | null | null | null | UTF-8 | Java | false | false | 530 | java | package algorithm_and_data_structure_advanced.session03_tree.tree_recursion;
import dependentClass.TreeNode;
//Project: techbow
//Package: algorithm_and_data_structure_advanced.session03Tree.recursion
//ClassName: PostOrder
//Description:
//Author: Zeshi(Jesse) Yang
//Date: 2020-11-16 星期一 21:06
public class TreePostOrderRecursion {
private void postOrder(TreeNode root) {
if (root == null) {
return;
}
postOrder(root.left);
postOrder(root.right);
// do sth for root
System.out.println(root.val);
}
} | [
"iyangzeshi@outlook.com"
] | iyangzeshi@outlook.com |
67b6a4ebac8dd33c2ceeff4fa6e9fc67cc399845 | fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4 | /exp/jdk1.5.0/src/com/sun/corba/se/spi/activation/ServerManager.java | bca031b01ac66da0822629254ed325096069b491 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | sensui74/legacy-project | 4502d094edbf8964f6bb9805be88f869bae8e588 | ff8156ae963a5c61575ff34612c908c4ccfc219b | refs/heads/master | 2020-03-17T06:28:16.650878 | 2016-01-08T03:46:00 | 2016-01-08T03:46:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 481 | java | package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/ServerManager.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Wednesday, September 15, 2004 3:50:42 AM PDT
*/
public interface ServerManager extends ServerManagerOperations, com.sun.corba.se.spi.activation.Activator, com.sun.corba.se.spi.activation.Locator
{
} // interface ServerManager
| [
"wow_fei@163.com"
] | wow_fei@163.com |
a9e4626e182c35e9e1eaf6c14317f1e24d57b645 | c2e58ac4e8364eb7d2701ac481117d9c759121f8 | /src/main/java/com/iuling/comm/utils/text/Charsets.java | eeccafb5040d6ec55561cdd0d4da84d2957731f6 | [] | no_license | wolfmuzi/test | fbde72530fd504f712376a11aac17c0118a07dde | 63494be8221a6e5d93e3b26785f1297c19f894e2 | refs/heads/master | 2021-04-27T02:50:00.124416 | 2018-02-24T03:29:44 | 2018-02-24T03:29:44 | 122,700,176 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 571 | java | package com.iuling.comm.utils.text;
import java.nio.charset.Charset;
/**
* JDK7可直接使用java.nio.charset.StandardCharsets.
*
* 也可以直接使用Guava Charsets.
*
* 尽量使用Charsets.UTF8而不是"UTF-8",减少JDK里的Charset查找消耗.
*
* @author calvin
*/
public class Charsets {
public static final String UTF_8_NAME = "UTF-8";
public static final Charset UTF_8 = Charset.forName("UTF-8");
public static final Charset US_ASCII = Charset.forName("US-ASCII");
public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
}
| [
"email@example.com"
] | email@example.com |
f9f64d4258bbb528d0de13fbb12605e4ecedb5b2 | 644b2052fed921687a0fa5e92d421489a3967dd5 | /app/src/main/java/com/ab/hicarerun/network/models/KycModel/SaveKycRequest.java | 900a4fb7c2f669a2aad024c6378771fe4279cba0 | [] | no_license | arjbht/HiCareApp | 176a1213214245f7a83a5cf6b1b1ee24fd75c024 | 40b8f8cba5780718fe25d2202d90d10f6ac3f119 | refs/heads/master | 2021-10-05T00:36:37.675626 | 2021-08-27T09:31:55 | 2021-08-27T09:31:55 | 199,459,299 | 1 | 1 | null | 2021-09-24T08:11:17 | 2019-07-29T13:33:57 | Java | UTF-8 | Java | false | false | 1,630 | java | package com.ab.hicarerun.network.models.KycModel;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
/**
* Created by Arjun Bhatt on 9/23/2020.
*/
public class SaveKycRequest {
@SerializedName("Id")
@Expose
private Integer id;
@SerializedName("Resource_Id")
@Expose
private String resourceId;
@SerializedName("Record_Type")
@Expose
private String recordType;
@SerializedName("Document_Url")
@Expose
private String documentUrl;
@SerializedName("Document_No")
@Expose
private String Document_No;
@SerializedName("Created_On")
@Expose
private String createdOn;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getResourceId() {
return resourceId;
}
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
public String getRecordType() {
return recordType;
}
public void setRecordType(String recordType) {
this.recordType = recordType;
}
public String getDocumentUrl() {
return documentUrl;
}
public void setDocumentUrl(String documentUrl) {
this.documentUrl = documentUrl;
}
public String getCreatedOn() {
return createdOn;
}
public void setCreatedOn(String createdOn) {
this.createdOn = createdOn;
}
public String getDocument_No() {
return Document_No;
}
public void setDocument_No(String document_No) {
Document_No = document_No;
}
}
| [
"bhatt.arjun97@gmail.com"
] | bhatt.arjun97@gmail.com |
95b19e786d89bf5ce9948d60fded35cd336dbbdd | 2da6618391b665999d29f77a468fdc9470476e94 | /androidFile/wenlaiwenqu/askToAsk/app/src/main/java/com/lvshandian/asktoask/module/user/activity/UserAnswerListActivity.java | 2ca8a904411a47c636776d19f1a4d8df6a28dfc9 | [] | no_license | qinbna/ananwork | eaed8ab384dbd06552c7e9156dedbf003f7e2bad | 87a36e791ee5f424b09d09a4671b4dcd9efb44d4 | refs/heads/master | 2021-05-11T03:29:10.669852 | 2017-06-26T04:05:33 | 2017-06-26T04:05:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,286 | java | package com.lvshandian.asktoask.module.user.activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.format.DateUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import com.android.volley.Request;
import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.handmark.pulltorefresh.library.PullToRefreshListView;
import com.lvshandian.asktoask.BaseActivity;
import com.lvshandian.asktoask.R;
import com.lvshandian.asktoask.common.http.HttpDatas;
import com.lvshandian.asktoask.common.http.RequestCode;
import com.lvshandian.asktoask.entry.DataUserAnswer;
import com.lvshandian.asktoask.module.user.adapter.UserAnswerAdapter;
import com.lvshandian.asktoask.utils.Global;
import com.lvshandian.asktoask.utils.JsonUtil;
import java.util.concurrent.ConcurrentHashMap;
import butterknife.Bind;
/**
*
* 创建我的界面回答界面 回答列表 无分页加载
*/
public class UserAnswerListActivity extends BaseActivity {
@Bind(R.id.iv_back_approve_address)
ImageView ivBackApproveAddress;
@Bind(R.id.pull_lv_collect)
PullToRefreshListView pullLvCollect;
private ConcurrentHashMap<String, String> map;
UserAnswerAdapter userFansAdapter;
private Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
Bundle data = msg.getData();
String json = data.getString(HttpDatas.info);
switch (msg.what) {
//我的模块回答首页请求结果
case RequestCode.USERANSWER_CODE:
DataUserAnswer.DataBean bean = JsonUtil.json2Bean(json, DataUserAnswer.DataBean.class);
String cidArray = bean.getCId();
String pidArray = bean.getPId();
userFansAdapter= new UserAnswerAdapter(cidArray, pidArray, getContext(), httpDatas, snackView, bean.getUserAndQuestions(), R.layout.item_activity_answer);
pullLvCollect.setAdapter(userFansAdapter);
break;
default:
break;
}
}
};
@Override
protected int getLayoutId() {
return R.layout.activity_useranswer;
}
@Override
protected void initListener() {
pullLvCollect.setMode(PullToRefreshBase.Mode.PULL_FROM_START);
ivBackApproveAddress.setOnClickListener(this);
pullLvCollect.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
@Override
public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
String label = DateUtils.formatDateTime(
getContext(),
System.currentTimeMillis(),
DateUtils.FORMAT_SHOW_TIME
| DateUtils.FORMAT_SHOW_DATE
| DateUtils.FORMAT_ABBREV_ALL);
// 显示最后更新的时间
refreshView.getLoadingLayoutProxy()
.setLastUpdatedLabel(label);
requesHttp();
}
@Override
public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
}
});
}
@Override
protected void initialized() {
requesHttp();
}
/**
* 我的模块回答请求
*/
private void requesHttp() {
map = new ConcurrentHashMap<>();
map.clear();
map.put("userId", Global.getUserId(getContext()));
httpDatas.getData("我的模块回答", Request.Method.POST, UrlBuilder.USER_ANSWERS, map, mHandler, RequestCode.USERANSWER_CODE);
pullLvCollect.post(new Runnable() {
@Override
public void run() {
pullLvCollect.onRefreshComplete();
}
});
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.iv_back_approve_address:
finish();
break;
}
}
}
| [
"m185138844"
] | m185138844 |
1f1beb7a057856f07f99a2e955a63e417f6888d1 | 7be1317fba4f97f8cc39cbbdc9c5af7a5c5bc320 | /app/build 2/generated/source/kapt 2/debug/com/aligmohammad/doctorapp/databinding/OpertaionBottomSheetFragmentBindingImpl.java | f91f809b6e25c288af2e59eb068d907bb02ce8bb | [] | no_license | LinuxDevil/ClientApp | 1071a2d511dcf95a62804703a4f8af05f94962ef | 9b84313891bea3857c017e12c51bb55dc23c03d3 | refs/heads/master | 2023-03-30T11:50:31.991916 | 2021-04-06T09:04:07 | 2021-04-06T09:04:07 | 307,626,546 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,157 | java | package com.aligmohammad.doctorapp.databinding;
import com.aligmohammad.doctorapp.R;
import com.aligmohammad.doctorapp.BR;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
@SuppressWarnings("unchecked")
public class OpertaionBottomSheetFragmentBindingImpl extends OpertaionBottomSheetFragmentBinding {
@Nullable
private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
@Nullable
private static final android.util.SparseIntArray sViewsWithIds;
static {
sIncludes = null;
sViewsWithIds = new android.util.SparseIntArray();
sViewsWithIds.put(R.id.header, 3);
sViewsWithIds.put(R.id.title, 4);
sViewsWithIds.put(R.id.testsView, 5);
sViewsWithIds.put(R.id.testSpinner, 6);
sViewsWithIds.put(R.id.dateTextView, 7);
sViewsWithIds.put(R.id.dateEditText, 8);
sViewsWithIds.put(R.id.timeTextView, 9);
sViewsWithIds.put(R.id.timeEditText, 10);
}
// views
@NonNull
private final androidx.constraintlayout.widget.ConstraintLayout mboundView0;
// variables
// values
// listeners
private OnClickListenerImpl mListenerOnBackButtonClickedAndroidViewViewOnClickListener;
private OnClickListenerImpl1 mListenerOnButtonClickedAndroidViewViewOnClickListener;
// Inverse Binding Event Handlers
public OpertaionBottomSheetFragmentBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
this(bindingComponent, root, mapBindings(bindingComponent, root, 11, sIncludes, sViewsWithIds));
}
private OpertaionBottomSheetFragmentBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
super(bindingComponent, root, 0
, (android.widget.Button) bindings[1]
, (android.widget.Button) bindings[2]
, (android.widget.EditText) bindings[8]
, (android.widget.TextView) bindings[7]
, (android.widget.LinearLayout) bindings[3]
, (android.widget.Spinner) bindings[6]
, (android.widget.TextView) bindings[5]
, (android.widget.EditText) bindings[10]
, (android.widget.TextView) bindings[9]
, (android.widget.TextView) bindings[4]
);
this.backButton.setTag(null);
this.confirmButton.setTag(null);
this.mboundView0 = (androidx.constraintlayout.widget.ConstraintLayout) bindings[0];
this.mboundView0.setTag(null);
setRootTag(root);
// listeners
invalidateAll();
}
@Override
public void invalidateAll() {
synchronized(this) {
mDirtyFlags = 0x4L;
}
requestRebind();
}
@Override
public boolean hasPendingBindings() {
synchronized(this) {
if (mDirtyFlags != 0) {
return true;
}
}
return false;
}
@Override
public boolean setVariable(int variableId, @Nullable Object variable) {
boolean variableSet = true;
if (BR.listener == variableId) {
setListener((com.aligmohammad.doctorapp.ui.dialogs.OnDialogInteract) variable);
}
else if (BR.viewModel == variableId) {
setViewModel((com.aligmohammad.doctorapp.ui.dialogs.operationschoice.OpertaionBottomSheetViewModel) variable);
}
else {
variableSet = false;
}
return variableSet;
}
public void setListener(@Nullable com.aligmohammad.doctorapp.ui.dialogs.OnDialogInteract Listener) {
this.mListener = Listener;
synchronized(this) {
mDirtyFlags |= 0x1L;
}
notifyPropertyChanged(BR.listener);
super.requestRebind();
}
public void setViewModel(@Nullable com.aligmohammad.doctorapp.ui.dialogs.operationschoice.OpertaionBottomSheetViewModel ViewModel) {
this.mViewModel = ViewModel;
}
@Override
protected boolean onFieldChange(int localFieldId, Object object, int fieldId) {
switch (localFieldId) {
}
return false;
}
@Override
protected void executeBindings() {
long dirtyFlags = 0;
synchronized(this) {
dirtyFlags = mDirtyFlags;
mDirtyFlags = 0;
}
android.view.View.OnClickListener listenerOnBackButtonClickedAndroidViewViewOnClickListener = null;
android.view.View.OnClickListener listenerOnButtonClickedAndroidViewViewOnClickListener = null;
com.aligmohammad.doctorapp.ui.dialogs.OnDialogInteract listener = mListener;
if ((dirtyFlags & 0x5L) != 0) {
if (listener != null) {
// read listener::onBackButtonClicked
listenerOnBackButtonClickedAndroidViewViewOnClickListener = (((mListenerOnBackButtonClickedAndroidViewViewOnClickListener == null) ? (mListenerOnBackButtonClickedAndroidViewViewOnClickListener = new OnClickListenerImpl()) : mListenerOnBackButtonClickedAndroidViewViewOnClickListener).setValue(listener));
// read listener::onButtonClicked
listenerOnButtonClickedAndroidViewViewOnClickListener = (((mListenerOnButtonClickedAndroidViewViewOnClickListener == null) ? (mListenerOnButtonClickedAndroidViewViewOnClickListener = new OnClickListenerImpl1()) : mListenerOnButtonClickedAndroidViewViewOnClickListener).setValue(listener));
}
}
// batch finished
if ((dirtyFlags & 0x5L) != 0) {
// api target 1
this.backButton.setOnClickListener(listenerOnBackButtonClickedAndroidViewViewOnClickListener);
this.confirmButton.setOnClickListener(listenerOnButtonClickedAndroidViewViewOnClickListener);
}
}
// Listener Stub Implementations
public static class OnClickListenerImpl implements android.view.View.OnClickListener{
private com.aligmohammad.doctorapp.ui.dialogs.OnDialogInteract value;
public OnClickListenerImpl setValue(com.aligmohammad.doctorapp.ui.dialogs.OnDialogInteract value) {
this.value = value;
return value == null ? null : this;
}
@Override
public void onClick(android.view.View arg0) {
this.value.onBackButtonClicked(arg0);
}
}
public static class OnClickListenerImpl1 implements android.view.View.OnClickListener{
private com.aligmohammad.doctorapp.ui.dialogs.OnDialogInteract value;
public OnClickListenerImpl1 setValue(com.aligmohammad.doctorapp.ui.dialogs.OnDialogInteract value) {
this.value = value;
return value == null ? null : this;
}
@Override
public void onClick(android.view.View arg0) {
this.value.onButtonClicked(arg0);
}
}
// callback impls
// dirty flag
private long mDirtyFlags = 0xffffffffffffffffL;
/* flag mapping
flag 0 (0x1L): listener
flag 1 (0x2L): viewModel
flag 2 (0x3L): null
flag mapping end*/
//end
} | [
"="
] | = |
317f21b97997feff5705a9b7d0666729a427609f | 294cefaca3dbb035ad5fcb0e2a7922ad128b2570 | /net.sf.smbt.arduino/src-model/net/sf/smbt/mdl/arduino/impl/RxPortImpl.java | b3bb5f3ca02aab27dfdb20cfac5da2df4d920d6d | [] | no_license | lucascraft/arduino | bc2dca989553637e7022912bb7124200447bbfd5 | 10c2b66c087a9f1bfac3bc64e7238c9d5f126301 | refs/heads/master | 2020-06-02T19:42:47.169647 | 2015-06-11T21:54:48 | 2015-06-11T21:54:48 | 37,203,905 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 741 | java | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package net.sf.smbt.mdl.arduino.impl;
import net.sf.smbt.mdl.arduino.ArduinoPackage;
import net.sf.smbt.mdl.arduino.RxPort;
import org.eclipse.emf.ecore.EClass;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Rx Port</b></em>'.
* <!-- end-user-doc -->
* <p>
* </p>
*
* @generated
*/
public class RxPortImpl extends PortImpl implements RxPort {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected RxPortImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ArduinoPackage.Literals.RX_PORT;
}
} //RxPortImpl
| [
"lucas.bigeardel@gmail.com"
] | lucas.bigeardel@gmail.com |
392621a0ebd2a4c578137362a7eb477268d35a25 | 93613ce1278d5873100922bae9fb64a9b9b1ec33 | /src/src/main/java/com/fuzzyacornindustries/pokemonmd/entity/particle/EntityParticleFXBloodmoonFlame.java | bb2c5936e9336b5ae4202d359f3e2713a0628880 | [] | no_license | SpikybumJolteon/PokemonMD | 8cd0f8d0e110fb25360ea5569f5e1b31a6f76007 | 5b11ca46c1ea6a75db276614a823efee1cefcefd | refs/heads/master | 2020-03-17T01:52:58.695572 | 2018-11-02T17:25:01 | 2018-11-02T17:25:01 | 133,170,244 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,258 | java | package com.fuzzyacornindustries.pokemonmd.entity.particle;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import com.fuzzyacornindustries.pokemonmd.item.PokemonMDItem;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class EntityParticleFXBloodmoonFlame extends EntityFX
{
private float flameScale;
private int currentTextureNumber = 0;
public EntityParticleFXBloodmoonFlame(World worldPar, double positionX, double positionY, double positionZ, double startingMotionX, double startingMotionY, double startingMotionZ)
{
super(worldPar, positionX, positionY, positionZ, startingMotionX, startingMotionY, startingMotionZ);
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
this.motionZ *= 0.10000000149011612D;
this.motionX += startingMotionX;
this.motionY += startingMotionY;
this.motionZ += startingMotionZ;
this.flameScale = this.particleScale;
this.particleRed = this.particleGreen = this.particleBlue = 1.0F;
this.particleMaxAge = (int)(5.0D / (Math.random() * 0.8D + 0.2D)) + 1;
}
@Override
public void renderParticle(Tessellator tessellatorPar, float p_70539_2_, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_)
{
float f6 = ((float)this.particleAge + p_70539_2_) / (float)this.particleMaxAge;
this.particleScale = this.flameScale * (1.0F - f6 * f6 * 0.5F);
super.renderParticle(tessellatorPar, p_70539_2_, p_70539_3_, p_70539_4_, p_70539_5_, p_70539_6_, p_70539_7_);
}
@Override
protected void entityInit()
{
super.entityInit();
this.getDataWatcher().addObject(13, Byte.valueOf((byte)0));
}
public int getCurrentTexture()
{
return this.dataWatcher.getWatchableObjectByte(13);
}
public void setCurrentTexture(int par1)
{
this.dataWatcher.updateObject(13, Byte.valueOf((byte)par1));
}
@Override
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
super.readEntityFromNBT(par1NBTTagCompound);
if (par1NBTTagCompound.hasKey("BloodmoonFlameTexture", 99))
{
byte b0 = par1NBTTagCompound.getByte("BloodmoonFlameTexture");
this.setCurrentTexture(b0);
}
}
@Override
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setByte("BloodmoonFlameTexture", (byte)this.getCurrentTexture());
}
@Override
public int getBrightnessForRender(float partialTickTime)
{
float f1 = ((float)this.particleAge + partialTickTime) / (float)this.particleMaxAge;
if (f1 < 0.0F)
{
f1 = 0.0F;
}
if (f1 > 1.0F)
{
f1 = 1.0F;
}
int i = super.getBrightnessForRender(partialTickTime);
int j = i & 255;
int k = i >> 16 & 255;
j += (int)(f1 * 15.0F * 16.0F);
if (j > 240)
{
j = 240;
}
return j | k << 16;
}
@Override
public float getBrightness(float partialTickTime)
{
float f1 = ((float)this.particleAge + partialTickTime) / (float)this.particleMaxAge;
if (f1 < 0.0F)
{
f1 = 0.0F;
}
if (f1 > 1.0F)
{
f1 = 1.0F;
}
float f2 = super.getBrightness(partialTickTime);
return f2 * f1 + (1.0F - f1);
}
@Override
public void onUpdate()
{
if(currentTextureNumber >= 2)
{
currentTextureNumber = 0;
}
else
{
currentTextureNumber++;
}
setCurrentTexture(currentTextureNumber);
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setDead();
}
this.motionY += 0.004D;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
if (this.posY == this.prevPosY)
{
this.motionX *= 1.1D;
this.motionZ *= 1.1D;
}
this.motionX *= 0.9599999785423279D;
this.motionY *= 0.9599999785423279D;
this.motionZ *= 0.9599999785423279D;
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
}
} | [
"fuzzy_acorn_ind@hotmail.com"
] | fuzzy_acorn_ind@hotmail.com |
306f3b5df56a08dfcbef700d57b9f759019ac185 | 81d49c3d19fd3ee5ef20d47f0fedc02537566d98 | /2020/BatPwn/Divided/divided_source_from_JADX/sources/androidx/core/app/AppComponentFactory.java | 51f80d5cd19a53ce5591d8b1f011ed3b6be8a505 | [] | no_license | wr47h/CTF-Writeups | 8f4ba241c7c9786741ace6bed98b0656c509aa71 | e95325f43959a52237c04b62f0241bb4d6027fb4 | refs/heads/master | 2022-10-28T05:49:13.212970 | 2022-10-08T06:56:13 | 2022-10-08T06:56:13 | 107,017,690 | 6 | 7 | null | 2022-10-08T06:56:14 | 2017-10-15T14:06:41 | Java | UTF-8 | Java | false | false | 4,261 | java | package androidx.core.app;
import android.app.Activity;
import android.app.Application;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.ContentProvider;
import android.content.Intent;
import java.lang.reflect.InvocationTargetException;
public class AppComponentFactory extends android.app.AppComponentFactory {
public final Activity instantiateActivity(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
return (Activity) CoreComponentFactory.checkCompatWrapper(instantiateActivityCompat(cl, className, intent));
}
public final Application instantiateApplication(ClassLoader cl, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
return (Application) CoreComponentFactory.checkCompatWrapper(instantiateApplicationCompat(cl, className));
}
public final BroadcastReceiver instantiateReceiver(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
return (BroadcastReceiver) CoreComponentFactory.checkCompatWrapper(instantiateReceiverCompat(cl, className, intent));
}
public final ContentProvider instantiateProvider(ClassLoader cl, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
return (ContentProvider) CoreComponentFactory.checkCompatWrapper(instantiateProviderCompat(cl, className));
}
public final Service instantiateService(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
return (Service) CoreComponentFactory.checkCompatWrapper(instantiateServiceCompat(cl, className, intent));
}
public Application instantiateApplicationCompat(ClassLoader cl, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
try {
return (Application) Class.forName(className, false, cl).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
} catch (NoSuchMethodException | InvocationTargetException e) {
throw new RuntimeException("Couldn't call constructor", e);
}
}
public Activity instantiateActivityCompat(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
try {
return (Activity) Class.forName(className, false, cl).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
} catch (NoSuchMethodException | InvocationTargetException e) {
throw new RuntimeException("Couldn't call constructor", e);
}
}
public BroadcastReceiver instantiateReceiverCompat(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
try {
return (BroadcastReceiver) Class.forName(className, false, cl).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
} catch (NoSuchMethodException | InvocationTargetException e) {
throw new RuntimeException("Couldn't call constructor", e);
}
}
public Service instantiateServiceCompat(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
try {
return (Service) Class.forName(className, false, cl).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
} catch (NoSuchMethodException | InvocationTargetException e) {
throw new RuntimeException("Couldn't call constructor", e);
}
}
public ContentProvider instantiateProviderCompat(ClassLoader cl, String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
try {
return (ContentProvider) Class.forName(className, false, cl).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
} catch (NoSuchMethodException | InvocationTargetException e) {
throw new RuntimeException("Couldn't call constructor", e);
}
}
}
| [
"shreyansh.pettswood@yahoo.com"
] | shreyansh.pettswood@yahoo.com |
d0510a20db8972509d0244cca6bcc3510740c2fe | 10186b7d128e5e61f6baf491e0947db76b0dadbc | /org/apache/bcel/generic/RET.java | 72e2044b416080416ccf09854b0040a849f4f422 | [
"SMLNJ",
"Apache-1.1",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | MewX/contendo-viewer-v1.6.3 | 7aa1021e8290378315a480ede6640fd1ef5fdfd7 | 69fba3cea4f9a43e48f43148774cfa61b388e7de | refs/heads/main | 2022-07-30T04:51:40.637912 | 2021-03-28T05:06:26 | 2021-03-28T05:06:26 | 351,630,911 | 2 | 0 | Apache-2.0 | 2021-10-12T22:24:53 | 2021-03-26T01:53:24 | Java | UTF-8 | Java | false | false | 3,425 | java | /* */ package org.apache.bcel.generic;
/* */
/* */ import java.io.DataOutputStream;
/* */ import java.io.IOException;
/* */ import org.apache.bcel.util.ByteSequence;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class RET
/* */ extends Instruction
/* */ implements IndexedInstruction, TypedInstruction
/* */ {
/* */ private boolean wide;
/* */ private int index;
/* */
/* */ RET() {}
/* */
/* */ public RET(int index) {
/* 78 */ super((short)169, (short)2);
/* 79 */ setIndex(index);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public void dump(DataOutputStream out) throws IOException {
/* 87 */ if (this.wide) {
/* 88 */ out.writeByte(196);
/* */ }
/* 90 */ out.writeByte(this.opcode);
/* */
/* 92 */ if (this.wide) {
/* 93 */ out.writeShort(this.index);
/* */ } else {
/* 95 */ out.writeByte(this.index);
/* */ }
/* */ }
/* */ private final void setWide() {
/* 99 */ if (this.wide = (this.index > 255)) {
/* 100 */ this.length = 4;
/* */ } else {
/* 102 */ this.length = 2;
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */ protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException {
/* 110 */ this.wide = wide;
/* */
/* 112 */ if (wide) {
/* 113 */ this.index = bytes.readUnsignedShort();
/* 114 */ this.length = 4;
/* */ } else {
/* 116 */ this.index = bytes.readUnsignedByte();
/* 117 */ this.length = 2;
/* */ }
/* */ }
/* */
/* */
/* */
/* */ public final int getIndex() {
/* 124 */ return this.index;
/* */ }
/* */
/* */
/* */
/* */ public final void setIndex(int n) {
/* 130 */ if (n < 0) {
/* 131 */ throw new ClassGenException("Negative index value: " + n);
/* */ }
/* 133 */ this.index = n;
/* 134 */ setWide();
/* */ }
/* */
/* */
/* */
/* */
/* */ public String toString(boolean verbose) {
/* 141 */ return super.toString(verbose) + " " + this.index;
/* */ }
/* */
/* */
/* */
/* */ public Type getType(ConstantPoolGen cp) {
/* 147 */ return ReturnaddressType.NO_TARGET;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void accept(Visitor v) {
/* 159 */ v.visitRET(this);
/* */ }
/* */ }
/* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/bcel/generic/RET.class
* Java compiler version: 1 (45.3)
* JD-Core Version: 1.1.3
*/ | [
"xiayuanzhong+gpg2020@gmail.com"
] | xiayuanzhong+gpg2020@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.